Page 1 of 142 123451151101 ... LastLast
Results 1 to 10 of 1417

  Click here to go to the first Developer post in this thread.  

Thread: UPSMON - Urban Patrol Script Mon

  1. #1

    UPSMON - Urban Patrol Script Mon

    Versión 5.0.7

    Project Space for Monsadas UPSMON at Dev-Heaven now available!
    Please Register for an account at Dev-heaven.net and post all your suggestions, bug-reports, support-request, etc. in the UPSMON Project Space under "Issues"
    Please open one Ticket for Feature-Request/Bug-Report/Support-Request only!

    Wiki:http://dev-heaven.net/projects/upsmon/wiki

    FAQ
    To turn of messages and marks on map edit init_upsmon.sqf and set debug to 0

    KRON_UPS_Debug = 0;

    Changes in version:
    // Added:
    // nowp = No waypoints will be created for this squad UNTIL ENEMY DETECTED
    // nowp2 = No waypoints will be created for this squad UNTIL ENEMY DETECTED AND DAMAGED
    // nowp3 = No waypoints will be created for this squad in any way.
    // Ambush2 Same as ambush but without using mines
    // Added spawn support for vehicles in squad
    // Modified:
    // FORTIFY moves leader too and prevents from moving when hurt
    // Solved bug in targetting of resistance
    // Solved bug when respawning a template squad were creating a new template
    // Solved bug that did exiting AI form vehicle when upsmon begins
    // Solved bug of squads loosing group and gets stucked
    // Avoid to take same position on buildings
    This is a personal projet to enhance IA in combat and making easier mission edition. I have used the version 2.0.3 of Urban Patrol Script de Kronzky. I have to congratulate Kromzky for his script UPS.sqf that has inspired me for doing UPSMON.

    With upsmon I don´t need to put any waypoints. My work area is in CHS Comunity so I will be pleased to meet you there

    http://www.simulacion-esp.com/v3/top...87&#entry60687


    //AI improvements
    * There is a General commander that organize the attack and defence of all UPSMON squads in the same side:
    o Squads of AI fights together as an army, so they comunicate each other by radio the enemy known positions.
    o flanking manauvers are taken depending on friendly position.
    o General commander can order to surrender entire side if army is seriously damaged
    * AI has enhanced actions and movements in combat:
    o AI can use smoke grenades.
    o AI run crouched when enemy is near or under fire.
    o AI does fire suppression and squad movement can be supressed by fire too.
    o AI moves are influenced by morale, so in low morale they can retreat.
    o AI can lay mines if enemy tanks are near.
    o AI avoid snipers when fired by uknown enemy.
    o AI paratroop near objectives if they take an hely.
    * AI take use of enviroment:
    o AI may use static weapons you place on map.
    o AI may use empty land vehicles for moving and or to attack.
    o AI may use empty helys for moving and or to attack.
    o AI uses buildings to take defence position and patrol them when leader thinks than enemy is near or using it.

    // Performance
    UPSMON Script runs 1 time every 20 seconds for every group of IA, new movements calculates every 60 s or less depending of under fire, enemy knowns...
    I have been implementing some functions in spawn mode to exploit the multithread of processors with very fast results.

    UPSMON has been tested in CHS comunity with more than 30 people and more than 25 groups of IA with UPSMON and the conclusion was perfect performance.

    //Download
    Dev-heaven


    //Installation
    Copy folder "scripts" into your folder mission.

    //How to Implement
    In init.sqf you need to load init_upsmon.sqf
    Code:
    //Init UPSMON scritp
    call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";
    In the mission editor run UPSMON script in the lider of each group exec UPSMON, sample:
    Code:
    nul=[this,"town", "move","reinforcement", "delete:",600] execVM "scripts\upsmon.sqf";
    //Global variables of Init_UPSMON.sqf
    Code:
    //1=Enable or 0=disable debug. in debug could see a mark positioning de leader and another mark of the destinity of movement, very useful for editing mision
    KRON_UPS_Debug = 1;
    
    //Time that lider wait until doing another movement, this time reduced dinamically under fire, and on new targets
    KRON_UPS_react = 60;
    
    //Min time to wait for doing another reaction
    KRON_UPS_minreact = 30;
    
    //Max waiting is the maximum time patrol groups will wait when arrived to target for doing another target.
    KRON_UPS_maxwaiting = 30;
    
    // how long AI units should be in alert mode after initially spotting an enemy
    KRON_UPS_alerttime = 90;
    
    // how far opfors should move away if they're under attack
    KRON_UPS_safedist = 300;
    
    // how close unit has to be to target to generate a new one target or to enter stealth mode
    KRON_UPS_closeenough = 300;
    
    // how close units have to be to each other to share information, over this, will lose target
    KRON_UPS_sharedist = 800;
    
    //If enabled IA comunicating between them with radio defined sharedist distance, 
    KRON_UPS_comradio = 2;
    
    //Sides that are enemies of resistance
    KRON_UPS_Res_enemy = [east];
    
    //Frequency for doin calculations for each squad.
    KRON_UPS_Cycle = 20;
    
    //Height that heli will fly this input will be randomiced in a 10%
    KRON_UPS_flyInHeight = 100;
    
    //Max distance to target for doing paradrop, will be randomiced between 0 and 100% of this value.
    KRON_UPS_paradropdist = 250;
    
    //Enables or disables AI to use static weapons
    KRON_UPS_useStatics = true;
    
    //Enables or disables AI to put mines if armored enemies near
    KRON_UPS_useMines = true;
    
    //Distance from destination for seraching vehicles
    KRON_UPS_searchVehicledist = 500;
    
    //Percentage of units to surrender.
    KRON_UPS_EAST_SURRENDER = 10;
    KRON_UPS_WEST_SURRENDER = 10;
    KRON_UPS_GUER_SURRENDER = 15;
    
    //Efective distance for doing perfect ambush (max distance is this x2)
    KRON_UPS_ambushdist = 50;
    
    //Enable it to send reinforcements, better done it in a trigger inside your mission.
    KRON_UPS_reinforcement = false; 
    
    //Artillery support, better control if set in trigger
    KRON_UPS_ARTILLERY_EAST_FIRE = false; //set to true for doing east to fire
    KRON_UPS_ARTILLERY_WEST_FIRE = false; //set to true for doing west to fire
    KRON_UPS_ARTILLERY_GUER_FIRE = false; //set to true for doing resistance to fire

    //Parámeters of UPSMON.sqf
    The same as UPS of Kronzky, only new "reinforcement" for allowing a group to go where is called for.

    Code:
    //  Required parameters:
    //    unit        = Unit to patrol area (1st argument)
    //    markername  = Name of marker that covers the active area. (2nd argument)
    //    (e.g. nul=[this,"town"] execVM "ups.sqf")
    //
    //  Optional parameters: //    random      = Place unit at random start position.
    //    randomdn    = Only use random positions on ground level.
    //    randomup    = Only use random positions at top building positions. 
    //    min:n/max:n = Create a random number (between min and max) of 'clones'.
    //    init:string = Custom init string for created clones.
    //    nomove      = Unit will stay at start position until enemy is spotted.
    //    nofollow    = Unit will only follow an enemy within the marker area.
    //    delete:n    = Delete dead units after 'n' seconds.
    //    nowait      = Do not wait at patrol end points.
    //    noslow      = Keep default behaviour of unit (don't change to "safe" and "limited").
    //    noai        = Don't use enhanced AI for evasive and flanking maneuvers.
    //    showmarker  = Display the area marker.
    //    trigger     = Display a message when no more units are left in sector.
    //    empty:n     = Consider area empty, even if 'n' units are left.
    //    track       = Display a position and destination marker for each unit.
    //    reinforcement  = Makes squad as reinforcement, when alarm KRON_UPS_reinforcement==true this squad will go where enemy were.
    //    reinforcement:x  = Makes squad as reinforcement id, when alarm KRON_UPS_reinforcementx==true this squad will go where enemy were.
    //    fortify = makes leader order to take positions on nearly buildings at distance 200 meters, squad fortified moves less than "nomove"
    //	spawned = use only with squads created in runtime, this feature will add squad to UPSMON correctly.
    //	nowp	= No waypoints will be created for this squad, so this squad will comunicate enemies but will not be moved, so you can do what you want with them using waypoints.
    //	ambush	= Ambush squad will not move until in combat, will wait for incoming enemies stealth and ambush when near or discovered.
    //	ambush:n	= Creates an anbush and wait maximun the especified time n in seconds. you can put 0 seconds for putting mines and go away if combined with "move" for example
    //	aware,combat,stealth,careless defines default behaviour of squad
    //	respawn = allow squad to respawn when all members are dead and no targets near
    //	respawn:x = allows to define the number of times squad may respawn.
    videos of youtube:
    5.0.4 Ambush: http://www.youtube.com/watch?v=3n9gPJvh7I0
    fortify and reinforcement: http://www.youtube.com/watch?v=fhobs...layer_embedded
    Getin: http://www.youtube.com/watch?v=J73DIfbyjhw
    Building Patrol: http://www.youtube.com/watch?v=JIYvsckQcRA
    paradrop: http://www.youtube.com/watch?v=gJOvX1lENH8
    combat: http://www.youtube.com/watch?v=PhbqlLRvchc
    Last edited by Monsada; Apr 21 2010 at 19:13. Reason: Change version to 5.0.7

  2. #2
    very cool!

    MattXR ( MxR )

    Check out my Twitter BIS Fans and Sub!
    -- MRKCCO Twitter --


  3. #3
    Amazing, sounds very cool.... will try it out for sure!
    Marek Spanel: [...] Every single element is well taught so that it fits together. So this is a significant change, because with ArmA 1 it was just random, really.
    We made some units because we had to. There wasn't much passion from our side with the first ArmA, to be honest. This time it's different. (Videogamer.com Interview

    Please BIS: Arma2 must become a TRUE MASTERPIECE - Not a middle-heavy catastrophe!

  4. #4
    Thanks! The new reinforcement parameter is very very nice :>
    And its cool that the AI uses vehicles if they are called for reinforcement

    But one question: Do I have to give the reinforcement troop a patrol marker also?

  5. #5
    Quote Originally Posted by Monsada View Post
    Versión 4.1.1

    In the mission editor run UPSMON script in the lider of each group exec UPSMON, sample:
    Code:
    nul=[this,"town", "move","reinforcement", "delete:",600] execVM "scripts\upsmon.sqf";
    Hi Monsada,

    Excellent script! I have tried it in a SP mission I'm creating and it is AWESOME!

    One questions though.

    I'm creating a lot of squads and teams, and it occurred to me that instead of having to read and execute the upsmon script (execVM "scripts\upsmon.sqf"), it would be more efficient to use either the call or spawn command to do so.

    So in the init.sqf script I added the following code:

    MyPatrol = compile preprocessFile "scripts\upsmon.sqf"

    and in the leader use the following code:

    nul=[this,"town", "move","reinforcement", "delete:",600] spwan MyPatrol;


    However, so far this doesn't work. It only works using execVM "scripts\upsmon.sqf"

    Could you or anybody give me a hand here and tell me what I am missing/doing wrong?

    Thanks much. Splicer.
    "We must either find a way or make one."
    - Hannibal

  6. #6
    Unit init lines are run before init.sqf afaik, which means that a script precompiled in init.sqf won't be compiled when you try to spawn it.

    Just name the leaders of the squads, like "cityPat1" and then run the script from init.sqf by nul=[cityPat1,"town","move","reinforcement","delete",60 0] spawn MyPatrol;

  7. #7
    Quote Originally Posted by Inkompetent View Post
    Unit init lines are run before init.sqf afaik, which means that a script precompiled in init.sqf won't be compiled when you try to spawn it.

    Just name the leaders of the squads, like "cityPat1" and then run the script from init.sqf by nul=[cityPat1,"town","move","reinforcement","delete",60 0] spawn MyPatrol;
    Hi Inkompetent,

    Thanks for that intel. Since it is not 100% clear that unit's init lines will be processed before the mission's init.sqf, I wonder if it would be possible to compile and load the script by placing a game logic in the map?

    And if so, what code line would you enter in the game logic?

    The point is to avoid the overhead of having to have a list of all units to be used in the mission.

    Thanks much. Best, Splicer.
    Last edited by Splicer; Jan 8 2010 at 17:31. Reason: Mention "overhead".

  8. #8
    First Lieutenant Manzilla's Avatar
    Join Date
    May 30 2007
    Location
    In the lab cooking up some serious s#%t!
    Posts
    5,118
    Where is this? The links give me some spanish message boaed with nothing there.
    (God damn bananas..... again)

    Join the most rootin', tootin'est crew on these here forums! That's right folks we're darn tootin'.

    Mike Tyson's ode to Manzilla's SP playing style:
    My style is impetuous. My defense is impregnable and I'm just ferocious.... I want your heart, I want to eat his children! Praise be to Allah!

  9. #9
    Same here, I cant really sign up or navigate there since I don't know spanish, anyone able to put up a mirror if the creator will allow it? Thanks

  10. #10
    Hmm... Just checked and the links don't work anymore.

    Bummer. I speak Spanish. I'll try to get a hold of Monsada to find out if a new hyperlink could be provided or get an official "blessing" about placing/mirroring his script somewhere else.

    Hey Monsada , que paso con los links de tu script?

    Splicer.

Page 1 of 142 123451151101 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •