Nice work. Is there any way to stop the commander or group leader continuously shouting 'move up' - it's highly annoying. Like he's locked in a loop. I know this is a 'feature' of Arma but this script seems to make the group commander get stuck in an endless command loop. Like 'moveup' every second for 2 minutes non stop. Sounds very odd.
The script runs great but I get the following error message during game play:
private ["_sum"];
_sum = ((_dstX * _dstX)/(_sizeX * _sizeX)) + ((_dstY * _dstY)/(_sizeY * _sizeY));
Error Zero Divisor
"Mission Folder"\Scripts\UPSMON\Get_pos\UPSMON_pos_fnc_isinellipse.sqf, line 48
Private ["_dialog","_list","...'
Error Generic error in expression
Error Generic error in expression
Any idea on a fix for this?
Total comments : 4, displayed on page: 4
UPSMON - Urban Patrol Script
by
Cool=Azroul13 & Beerkan & Monsada & Rafalski
Description:
I (Cool=Azroul13) continue to work on the UPSMON script, created by Monsada for Arma2, improved by Rafalsky, Nordin and Shay_Gman and ported to Arma 3 by Ollem.
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:
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.
Installation:
Copy content of rar into your folder mission.
It comes with a mission as a demo version. Extract the folder to your ArmA3\other Profiles\Yournick\Missions and load it in the editor.
Performance:
UPSMON Script runs 1 time every 5 seconds for every group of IA, new movements calculates every 90 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:
Please read the "How to use UPSMON script" pdf file in the infos folder for knowing how to use the script.
To turn of messages and marks on map edit init_upsmon.sqf set debug to 0:
UPSMON_Debug = 0;
Wiki:
Check the infos folder
Known issues:
- Pilots are very stupid if they have to land, sometimes they crash the helicopter (trees).
- Sometimes a vehicle stops and wait for something (driver switches off the engine)? In the end (~2min) stuck control makes it move but I do not know if the problem is UPSMON or Arma.
Difficult to reproduce cause it happens at random times and very rarely. Expecialy when reinforcement AI use combat vehicle. Possible explanation: targetpos in the forest, AI lost the way, no radio contact etc
- Too much smoke might cause drop in Fps. (change parameters: UPSMON_USE_SMOKE= 13
Credits & thanks:
I (Cool=Azroul13) continue to work on the UPSMON script, created by Monsada for Arma2, improved by Rafalsky, Nordin and Shay_Gman and ported to Arma 3 by Ollem.
Many thanks to:
- Kronzky who create the UPS script which is the base of UPSMON
- Monsada who's the one that create this master piece.
- Rafalsky who made several improvements to the script.
- Beerkan,Ollem,Shaygman who made improvements and port the script to ArmaIII
- Mando for his "mando_check_los" script.
- Carl Gustav for his "sun_angle" script.
- Das Attornay for helping me with the fortify module.
- Shuko for his "shkpos" that help me a lot...
- All Armaholic 's staff ...
- Molina for all his advice...
- Grumpy old man for taking time to test this new version of UPSMON and for all his support.
- Gienkov,Kord,TMP95,RedArmy and many others who test all pieces of the script ...
Change log:
v6.0.9.5
- Corrected: Error in the Respawn module
v6.0.9.5
- Corrected: Variable error in Ambush module.
- Corrected: Errors when units leave UPSMON loop.
v6.0.9.4
- Corrected: Missing upsmon_retreat function
v6.0.9.3
- Corrected: Variable missed in the Target module (thanks Bardosy).
- Corrected: "Setvariable" error in the mainloop (thanks Bardosy)
- Corrected: Error when civilian flee (thanks nomisum)
- Corrected: Error Rearm module (thanks Gat
v6.0.9.2
- Corrected:-Weird defensive behaviour.
v6.0.9.1
- added: You can now use UPSMON_Creategroup to create random group with UPSMON parameters
- Corrected: corrections in the UPSMON manual.
v6.0.9
Added:
- New parameter "DORELAX", it must be use with civilian group.
- New parameter "NOARTILLERY", the group will not call artillery support.
- AI can mount static if there are a gunner and assistant in the group.
- AI can rearm themself (only for infantry), check the file UPSMON_Init to activate it.
- Equipment of each units in the group is saved for Template, respawn and clone module.
Corrected:
- If multiple groups are linked to the marker and only one of them has the "SHOWMARKER",
then the marker will be visible
- Group with Random parameter will not occupy building outside the marker area (specially if the marker area is an ellips or a rectangle)
- "TRACK" parameter is re-added.
- Corrections in the combat behaviour
- Correction of the vehicle respawn
v6.0.8 hotfix 2
Corrected: error in Fortify module (variables not defined)
Corrected: error in clones module
v6.0.8 hotfix
- Remove the yellow dot from ambush module
- Add beerkan's correction relative to the ambush module.
v6.08
Added:
- Speedmode parameter (FULL,LIMITED,NORMAL)
- You can change the respawn position via ["RESPAWNPOS:",[0,0,0]]
- you can add delay for the respawn ["RESPAWNDELAY",50]
- You can remove a group from UPSMON control via _grp setvariable ["UPSMON_Remove",true];
- ("RANDOMUP" or "RANDOMDN" or "RANDOMA")+"NOWP3" = "FORTIFY"
Modified:
- Artillery is now detected by UPSMON, just add nul = [this,"area0"] execvm "Scripts\UPSMON.sqf";
the old method is always available.
Corrected:
- AI patrol can't find their way in marker area less then 100*100
- AI try to mount autonomous static weapons
- AI Patrol in building
v6.0.7.2
Added:
- All artillery units are supported in UPSMON.
- Battery support an artillery group can have multiple artillery units of same type.
Modified:
- Ambush are now spawn to their ambush position (More usefull when you want to spawn quickly an ambush squad).
- With fortify parameter, the unit will search for cover if there are no buildings near.
Corrected:
- Debug message that can be shown without Debug on (i hope it's the last).
- delete UPSMON group should be faster ({_x setvariable ["UPSMON_Deletegroup",true];} foreach units _UPSMONgroup).
- "init:" parameter (for sp at least)
- Template module (there weren't spawning the template)
- Paradrop units.
v6.0.7.1
Corrected:
- Debug message that can be show without Debug on (thanks grumpy)
- Civilian counter not working (thanks Fett_Li)
- Reinforcement units reinforce near reinforcement unit ^^_ (thanks Fett_Li)
v6.0.7
Performance Gain (thanks Grumpy old man)
Corrected: -Correction of the clone module
-Rework most of the UPSMON modules.
-Problems with independant side.
-Random parameter errors.
-And many little errors.
Added: -The paradrop feature is reimplemented in UPSMON by default
-New parameter "LANDDROP" to make group unit with helico landing instead of paradroping.
-new parameter "RANDOMA" to make group unit spawn randomly in building without filtering the positions.
v6.0.6.6 hotfix
- fixes debug message
v6.0.6.6
-
v6.0.6.5 fix2
- fixed issue with reinforcements
v6.0.6.5
Corrected:
-error variable _pause
- Randomup and Randomdn parameter
- unit wont take vehicle if vehicle is locked for player or unlock
Added:
- You can delete an UPSMON group: {_x setvariable ["UPS_Deletegroup",true];} foreach units _UPSMONgroup
v6.0.6.3
- Correction of missing variable in Track and Respawn module
- Reorganization of some UPSMON module
- Solve problem with Reinforcement module
v6.0.6.2
-
v6.0.6.1
- I add one parameter for ambush module ("LINKED:")
- I remove TPWCAS from the folder so if you want to use it you need to download it separately.
- Set all new variable off by default.
- Add Some little corrections.
- And I add two test missions for Ambush and artillery module.
v6.0.3
Modified:
- Tweaks on fortify module
- Tweaks on Combat behaviour module
v6.0.2
Added:
-Improvement on Fortify module
-Improvement on Combat behaviour
-new Parameter "AmbushDistance"
v6.0.1
Added:
-New Artillery module system
-New Surrender module
-New Retreat module
-new Parameter "AmbushDir"
-new Parameter "Noveh2"
Modified:
- Solved bug with surrender system
- Solved bug with template system (error message)
- Solved bug with static weapons (some weapons cannot be taken)
v5.1.0
- Solved bug: parameter "random" does not work with vehicles. (r: by Lenestar)
- Fix small bug with "ambush". Sometimes AI do not react to nearest target.
- Small changes to the default numbers in Init_UPSMON.sqf
v5.0.9
Added:
- "noveh" - the group will not search for vehicles (untill in fight and only for combat vehicles). (code improved by: Nordin)
- Counter of civilians killed by players (array): KILLED_CIV_COUNTER [Total, by West, by East, by Resistance, the Killer] (works with civilians placed in editor or spawned by UPSMON)
- When player kills a civilian display globalchat info WHO (Player) did it. In "Init_UPSMON.sqf" R_WHO_IS_CIV_KILLER_INFO = 1, Set O to disable this feature.
- Add UPSMON version info in DEBUG display.
Modified:
- CBA is NOT required any more !
- Turning off ACE Wounds is now optional. (see Init_UPSMON.sqf to set it ON or OFF)
- Solved bug: Self wounds or friendly fire is treated as damages made by the enemy forces. (NOTE: If the killer is not recognize, AI will use smoke)
- Solved bug: MON_HeliStuckcontrol runs too often as bad speed read.
- Improved: Combat behaviour (now in close distance AI often in COMBAT mode)
- Improved: Stuck control for vehicles and units.
- Improved: Respawn for vehicles (multiple times vehicle respawn allowed)
- First parameter coud be Unit or Group. (Make sure when the script starts such GROUP's leader or the UNIT is present 100%).
- Improved Artillery module (code improved by: shay_gman)
- Change: armor vehicles using limited speed no matter range when placed directly from editor with default crew. Now the speed depends on the distance to the new targetpos (r.by Demonized)
- Fixed small code bugs: ex: {exit=true;}; should be: {_exit=true;};
- Solved bug: Respawn for vehicles not working. (r.by Demonized)
- Solved bug 99%: reinforcement AI after getting out of the combat vehicle, often the vehicle did not move. (r.by seba1976)
Misc:
- HMMWV_M998A2_SOV_DES_EP1 added to bugged vehicles for Vanilia players.
v5.0.8R2
*Improved:
Change: armor using limited speed no matter range when placed directly from editor with default crew. Now the speed depends on the distance to the new targetpos (r.by Demonized)
*Fixed:
Small code bugs: ex: {exit=true;}; should be: {_exit=true;};
Respawn for vehicles not working. (r.by Demonized)
*Misc
HMMWV_M998A2_SOV_DES_EP1 added to bugged vehicles for NoACE players.
v5.0.8R1
- CBA is no more required !!!
- Fixed problem 99%: reinforcement AI after getting out of the combat vehicle, often the vehicle did not move. (reported by seba1976).
v5.0.8
(1) FIXED: problem with "nowp" to generate target when no other groups around
(2) CHANGED : detection of new target/(generate new target) is longer just a bit. In Init_UPSMON.sqf : R_knowsAboutEnemy = 1.49; (original 0.5)
v5.0.7 !R-8a
(0) NEW: CBA is now required !!!.
(1) IMPROVED: AI use smokes when s/o hit or KIA. In Init_UPSMON.sqf there are two variable which set in percentage possibility that team-mates use the smoke. Depend on hit (15%) or dead (40%)
R_USE_SMOKE_wounded = 15; R_USE_SMOKE_killed = 40;
(2) NEW: "nosmoke" - the group will not use the smoke at all.
(3) NEW: UPSMON switches off "ACE wounds system for AI", as with this system UPSMON had sometimes problem to detect damages of the units.
v5.0.7 !R-7
(1) NEW: "onroad" - targetpos will be generated only on roads (unless unit in fight).
(2) IMPROVED: new targetpos depend on the type of the unit (air, water, land) - > water unit only on water etc
v5.0.7 !R-6
(1) FIXED: AI reinforcement had problem to get into helicopters (by !R)
(2) FIXED: AI had problem to paradrop around positions of the enemy (stuck problem) 99%(by !R)
(3) CHANGED: Civilians (UPSMON) do not take vehicles and static weapons (no more stealing). (by !R)
(4) IMPROVED: Helicopters fly on safe altitude
note for MissionMakers : UPSMON patrol vehicle after some time used all fuel and stop. Use a script to refuel the vehicles.
v5.0.7
* Added:
- nowp = No waypoints will be created for this squad until enemy is detected
- nowp2 = No waypoints will be created for this squad until enemy is detected and wounded
- 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
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:
- Added Artillery module:
- Added spawn module:
- 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.5
- Added - Parameter "AMBUSH:",3000 you can set max time to wait for ambush
- Modified Ambush squads exits if called for reinforcement so you can force exit creating a especific reinforcement group for this ex: setting "reinforcement:",100
you can force exit ambush setting KRON_UPS_reinforcement100 = true
you can put 0 seconds for putting mines and go away if combined with "move" for example
- Solved bug that sets reinforcement to false on init of scritp
- Improved getout and landheli algoritm
- Improved target debug console A=all units C=current alive units T=targets knonw by this side
- Improved movement with vehicles, now they go in safe until near known enemies
- adjusted flanking algorithm
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.
v5.0.2
- Added
- KRON_UPS_useStatics, enables AI to use Static weapons.
- KRON_UPS_useMines, enables AI to put mines when enemy armored vehicles near
- Now vehicles can be used for patrol, not only with target.
- Modified:
- 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
v5.0.1
- Added
- Mulitiple reinforcement reinforcement, now you can put an id of reinforcement for calling only this groups later
- Modified:
- Fixed fortify squads don't get defence positions until known enemys
- Fortify squads leave fortify status when called for reinforcement
v5.0.0
- Added
- KRON_UPS_flyInHeight: Height that heli will fly this input will be randomiced in a 10%
- KRON_UPS_paradropdist: Max distance to target for doing paradrop, will be randomiced between 0 and 100% of this value.
- parameter "fortify" makes leader order to take positions on nearly buildings at distance 100 meters near leader,
- squads with fortify will ignore "MOVE" rol.
- Modified:
- Fixed bug that eventually stoped hely when paradrops done.
v4.2.6
Modified:
- Fixed bug that leaves a soldier in front of vehicle afte geting out.
- Fixed bug that made AI to disenbark from heli before arriving objective.
v4.2.5
- Added
- Air transport
- Paratroop air transported units
- Improved comunications
- Modificaciones:
- Updated for an action radio of 1000 meters or avove.
- Added some translations to english
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.
You are using our website as a guest. Guest have the lowest downloadspeeds and will download from our public file servers. If you would like to know how you can download with higher speeds and have to wait less while downloading check out the Armaholic subscription system. When you have already subscribed and your account is not upgraded within 24 hours it means you probably forgot to include your username. If that is the case please contact us as soon as possible!
Thank you very much to all involved, loved UPS in Arma 2!
Looks nice...would like an updated tutorial :)
Nice work. Is there any way to stop the commander or group leader continuously shouting 'move up' - it's highly annoying. Like he's locked in a loop. I know this is a 'feature' of Arma but this script seems to make the group commander get stuck in an endless command loop. Like 'moveup' every second for 2 minutes non stop. Sounds very odd.
The script runs great but I get the following error message during game play:
private ["_sum"];
_sum = ((_dstX * _dstX)/(_sizeX * _sizeX)) + ((_dstY * _dstY)/(_sizeY * _sizeY));
Error Zero Divisor
"Mission Folder"\Scripts\UPSMON\Get_pos\UPSMON_pos_fnc_isinellipse.sqf, line 48
Private ["_dialog","_list","...'
Error Generic error in expression
Error Generic error in expression
Any idea on a fix for this?
Total comments : 4, displayed on page: 4