Forum Jump :

Author Message


Posts: 3
Rank:


Level: Member

Country: es
Location:
Occupation: Monsada
Age:
In-game name:

 
#1 Posted at 2010-02-02 19:47        
     
UPSMON-Urban Patrol Script
by
Monsada


Description:
This is a personal project 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.


Features:
- Squads of AI plays together, they comunicates each other by radio.
- There is a General commander of IA that organize the atack and defence of all groups of AI.
- AI does flanking movements in group.
- AI does suprise fire.
- AI can be supressed by fire and cancel their movements
- AI has enhaced their actions and movements, now they can use smoke grenades, avoid moves, run down when near enemy or in fire, etc..
- AI now avoid snipers when fired by uknown enemy.
- AI uses buildings to patrol and surprise enemy and taking covers.
- AI uses static weapons you place on map.
- AI uses empty land vehicles for moving and or to attack.
- AI uses empty helys for moving and or to attack.
- AI may paratroop near objectives if they take an hely.
- Range of combat of 1500 meters talking each others about enemys.
- NOMOVE squads tends to hold position while MOVE squads are more agressive.
- FORFIFY squads moves less than NOMOVE squads, get defence positions in nearly buildings, and static weapons.
- Added multiple reinforcement squads.
- AI can lay mines if enemy tanks are near.

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

Installation:
Copy content of rar into your folder mission.


Media:








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.

Usage:
In init.sqf you need to load init_upsmon.sqf
//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:
nul=[this,"town", "move","reinforcement", "delete:",600] execVM "scripts\upsmon.sqf";

Global variables of Init_UPSMON.sqf:
//Enable debug, in debug could see a mark positioning de leader and another mark of the destinity of movement, very useful for editing mision
//Habilita el estado de debug, el cual permite ver la posición de los grupos así como a donde se dirigen,
//en modo local tambien muestra mensajes del comportamiento de la IA
KRON_UPS_Debug = 1;

//Time that lider wait until doing another movement, this time reduced dinamically under fire, and on new targets
//Tiempo que tarda en calcular un nuevo movimiento (en combate), no le des poco tiempo o no hará más que moverse
KRON_UPS_react = 60;

//Min time to wait for doing another reaction
KRON_UPS_minreact = 30;

//Max waiting must be a negative number, is the maximum time patrol groups will wait when arrived to target for doing another target.
//Parámetro para patrullas (MOVE) Tiempo de espera máxima cerca del objetivo, transcurrido este tiempo  las patrullas se moveran a otro punto
KRON_UPS_maxwaiting = 120;

// how long AI units should be in alert mode after initially spotting an enemy
//Tiempo que las unidades permanecen alerta, este parámetro debe ser siempre superior a KRON_UPS_maxwaiting
KRON_UPS_alerttime= 120;

// how far opfors should move away if they're under attack
// Distancia de seguridad, se usa para calcular la distancia de flanqueo al objetivo
KRON_UPS_safedist = 300;

// how close unit has to be to target to generate a new one target or to enter stealth mode
// Se usa para determinar cuando es suficientemente cerca del objetivo, influye en la actitud de la IA
KRON_UPS_closeenough = 300;

// how close units have to be to each other to share information, over this, will lose target
//Distancia a la que tiene que estar el grupo de un enemigo conocido para que se les comunique la posición del enemigo.
//Fuera de este radio la IA puede perder el rastro
//Las patrullas con rol "MOVE" tendrán un 1.5 de este valor
KRON_UPS_sharedist = 1500;

//If enabled IA comunicating between them with radio defined sharedist distance, 
//1 check if visible friends in range (sharedist) are injured,  //Detecta cuando han herido a un compañero, menos óptimo
//2 check if enemy position is in range to atackt (sharedist) //Simula la comunicacion por radio entre la IA
KRON_UPS_comradio = 2;

//Distancia que debe haber de las unidades a los edificios para  cosiderarlo una ciudad y poder entrar en modo combate urbano
//KRON_UPS_intowndist = 60;  //deshabilitado por comportamientos extraños con algunos objetos builiding

//Habilita el envio de refuerzos cuando el enemigo es detectado, lo normal es que esté siempre a false
// y se use un trigger para activar/desactivar esta opcción
KRON_UPS_reinforcement = false; 

//Establece los bandos de enemigos que debe considerar la IAs de la resistencia
KRON_UPS_Res_enemy = [east];

//Tiempo en segundos que tarda en volver a ejecutarse
KRON_UPS_Cycle = 20;

//Height that heli will fly this input will be randomiced in a 10%
KRON_UPS_flyInHeight = 90;

//Max distance to target for doing paradrop, will be randomiced between 0 and 100% of this value.
KRON_UPS_paradropdist = 300;

//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;

Parameters of UPSMON.sqf:
The same as UPS of Kronzky, only new "reinforcement" for allowing a group to go where is called for.
//    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, units with fortify will don't move until reinforcement.

Change log:
v5.0.6
// -----------------------------------------------------------------------------
// Added:
// Parameter "RESPAWN" for alowing respawn UPSMON squads when all are dead
// "aware","combat","stealth" and "careless" added as a parameter so you can define default behaviour of squad
// Added AI stuff for water
// AI aware if find dead bodies
// Added fixed positions for reinforcement squads, those squads that have a reinforcement ID can be set reinforcement position by seting KRON_UPS_reinforcement"x"_pos = position; sample
// reinforcement: http://dev-heaven.net/projects/upsmon/wiki/Reinforcement
// Added Artillery module: http://dev-heaven.net/projects/upsmon/wiki/Artillery_module
// Added spawn module: http://dev-heaven.net/projects/upsmon/wiki/MON_spawn
// Modified:
// Solved bug in SPAWNED that not refreshed correctly army counters
// If in walk mode and safe will land hely.
// When Hely in squad column formation can not be used, last member assigned as driver
// Detected bug with VEE formation, some times AI don't change vehaviour, changed to wedge
// Folder estructure modified to gather upsmon scripts this will no affect already missions.
// Improved AI response under Supress fire in combat situation
// Avoid hurt soldiers than can not stand to get in vehicles and buildings
// Avoid to patrol in damaged buildings
// avoid bugged clases such as "BIS_alice_emptydoor";
// AI try to get in combat vehicles
// Performance optimization.
// Realistic reaction of squads depending on distance to target
// -----------------------------------------------------------------------------
v5.0.4
Added
- Implemented: It also would be great if they use smoke-grenades when ai is under fire by targets they dont see well. One example: I lay on a mountain with my squad and shoot with sniperrifles from the hill down at the ai in a village. The ai should throw smoke and try to get cover. That would be great.
- Feature #9559: parameter "spawned" = use only with squads created in runtime, this feature will add squad to UPSMON correctly.
- Feature #9558 parameter "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.
- Feature #9503 parameter "ambush" = Ambush squad will not move until in combat, will wait for incoming enemies stealth and ambush when near or discovered.
- Parameter "RFLOCK", if specified when reinforcement is called, target position is locked until reached reinforcement point
- Added surrended client control so now is no necessary create any trigger in mission to launch surrended.sqf
- Added stuck control to avoid that helis stopping flying
- New target sistem control based in last known positions instead of real position of targets
Modified:
- Bug #9666 fixed:AI Cheats with UPSMON - Groups always Flank Real Position instead of last known
- Bug #9662 fixed: Reinforcement Group returning home, does not get out of Vehicles (if used)
- Bug #9639 fixed: Reinforcement Group can get stuck if Transportvehicle back to Patrolmarker gets destroyed//
- Set DIAMOND formation when exiting vehicle
- bug with NOSLOW solved.
- solved other bugs such as no patrol without enemies.

v5.0.3
- Added
- KRON_UPS_searchVehicledist = 800
- KRON_UPS_EAST_SURRENDER, KRON_UPS_WEST_SURRENDER,KRON_UPS_GUER_SURRENDER
- Set percentaje of forces for surrender.
- Main control for all squads, doing comon proceses and saving performance.
- surrended.sqf script for enabling AI surrended to join your squad, must be executed in each client with trigger
- when KRON_UPS_EAST_SURRENDED or KRON_UPS_WEST_SURRENDED or KRON_UPS_GUER_SURRENDED
- Trigger condition: KRON_UPS_EAST_SURRENDED
- Trigger on act: nul=[east] execvm "scripts\surrended.sqf";
- Modified:
- Fixed Bug with resistance forces detected as enemies when not parametriced as enemy
- Fixed bug check if dead leader before moving.
- Fixed bug, "alive" not always returns someone is dead instanctly so controlled with canmove.
- Fixed bug, error _vehicle object expected.
- Controled not doing paradroop on water.

v 5.0.2
- Added KRON_UPS_useStatics, enables AI to use Static weapons.
- added KRON_UPS_useMines, enables AI to put mines when enemy armored vehicles near
- Now vehicles can be used for patrol, not only with target.
- Fixed Bug that do not sent reinforcement if parameter "reinforcement"
- Fixed bug with random 1 ocasiolly has been returned more than 1.
- Fixed bug that eventually do not change dead leader

v4.2.2
- Added frontal attack
- Added battle formations depending on situation.
- AI can enter buildings to take defending positions or while attacking AI can patrol the buildings searching for enemies or fire positions.
- Improved system to find, assign and get in the vehicles.
- Optimized performance, it can be executed every 20 seconds.
- Parameters modified: sharedist increased, react lowered, cycle increased.
- Modified the AI combat behavior, it will change depending on the situation.
- Fixed bug where reinforcements stopped patrolling if they hasn't any target.
- More dynamic flanking positions.
- Platoon with "NOMOVE" tends to hold positions and use the surrounding buildings.


Credits & thanks:
Kromzky for his script UPS.sqf that has inspired me for doing UPSMON.


Forum topic:
- CHS forums
- BI forums


UPSMON-Urban Patrol Script v5.0.6

This post was edited by Monsada (2010-04-06 09:38, ago)

IMPROVED AI PROJECT: UPSMON
- Makes mision editing easy, you will not need to use waypoints anymore.
- Squads of AI fights togheter flanking enemy.
- They use empty vehicles like truks, cars, Helis, static weapons, does parachut

Author Message

Big  

Armaholic icons master


Posts: 5559
Rank:


Level: Former Staff

Country: es
Location: Who knows
Occupation: Industrial Engineer
Age: 44
In-game name:

 
#2 Posted at 2010-02-02 19:59        
     
I'll fix it tomorrow, i cannot download from megaupload (limit exceeded)

Page updated.

This post was edited by Big (2010-02-03 07:22, ago)


Advertisement


Author Message


Posts: 10
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2010-02-10 04:19        
     
Souns fantastic! Do you know if it will clash with ACE and such?


Author Message


Posts: 10
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2010-02-17 16:42        
     
Hello,

I've been using the Kromzky's urban patrol script for a while, but now I think I could try this out. But I was just wondering, can you make the patrolling units go on "limited" speed and on "safe" behavior? They were supposed to patrol on those modes on default in Kromzky's script, but they didn't and on your videos they aren't either. Setting a waypoint with those modes didn't help either.

And how do I install this? Same way as Kromzky's? The profile/scripts file? =)


Author Message


Posts: 3
Rank:


Level: Member

Country: es
Location:
Occupation: Monsada
Age:
In-game name:

 
#5 Posted at 2010-02-20 20:55        
     
Japonaattori : Hello,

I've been using the Kromzky's urban patrol script for a while, but now I think I could try this out. But I was just wondering, can you make the patrolling units go on "limited" speed and on "safe" behavior? They were supposed to patrol on those modes on default in Kromzky's script, but they didn't and on your videos they aren't either. Setting a waypoint with those modes didn't help either.

And how do I install this? Same way as Kromzky's? The profile/scripts file? =)

units will patrol if you put "move" as parameter of squad and if no enemies are known, in the videos enemies are known because of this they run.
For installing follow the instructions or take a test mision. Please read before posting


[edit]
Bunnyman : Souns fantastic! Do you know if it will clash with ACE and such?

of course, try it in a known mission and u will see the diference how AI plays before and after



[modedit]Please do not double post, edit your previous when you have to add more info.[/modedit]

This post was edited by Foxhound (2010-02-20 22:51, ago)

IMPROVED AI PROJECT: UPSMON
- Makes mision editing easy, you will not need to use waypoints anymore.
- Squads of AI fights togheter flanking enemy.
- They use empty vehicles like truks, cars, Helis, static weapons, does parachut

Author Message

Big  

Armaholic icons master


Posts: 5559
Rank:


Level: Former Staff

Country: es
Location: Who knows
Occupation: Industrial Engineer
Age: 44
In-game name:

 
#6 Posted at 2010-03-22 05:55        
     
Page updated.