Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

I can not tell about zeus or GL4 as UPSMON is not tested with any others mod/scripts (apart from ACEs).

@heli transport

Maybe try do it this way: pack group 1 to the heli, heli fly (by waypoints) to LZ, land, group 1 disembark, heli fly away, group 1 wait 10 sec so the heli is far , and now initialize UPSMON to group 1.

Share this post


Link to post
Share on other sites
Is there any conclusion yet on if UPSMON (version now) is compatiable with ZEUS AI?

It depends on your definition of "compatible".

Share this post


Link to post
Share on other sites
yes i know, UPS is still great and lightweight, and are still far from "too old to use", i keep both UPS and UPSMON handy.

Monsada fixed some of the code flaws included in UPS.

http://forums.bistudio.com/showpost.php?p=1572344&postcount=101

That's why I always recommend to use UPSMON instead, because its development is still continued today.

I also believe it is less of a resource hog, but not sure to what extent. As UPSMON still costs a lot of FPS.

Excellent post Lonestar.

Had no idea it was so well documented.

THANKS

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

It is indeed very well documented (and can always be improved by the community - all you need is a DH account).

Edited by Lonestar

Share this post


Link to post
Share on other sites
i used default settings for 5.0.9

KRON_UPS_searchVehicledist = 600;

KRON_UPS_sharedist = 600;

Area marker was 500 , 500.

group started UPSMON inside heli when heli was at unload position and then group exited heli as before.

This was ca center of marker. maybe 100 from center.

group was only west group running UPSMON in mission, enemy was 8 groups of east.

I had debug on aswell in UPSMON and saw on map that wp of UPSMON group was not more than 200 away, maybe less.

Enemy groups, ca 100, 200 meter away spread around landing zone so West group was completely surrounded.

Bullets flying all over, very hot LZ, debug reported that all enemy groups had detected heli, and was detecting the various west units in group when they started exiting heli.

Other west groups was heli pilot, and he was only using waypoints and was in his own group.

and 3 other groups of west units 8000meter away(otther side of map) not using UPSMON, just part of some previous tests wich i had not deleted.

They only stood still.

I was spectator as civilian, and this setCaptured true;

This never happend in 5.0.7 to 5.0.8 R3. it came with 5.0.9 and i just asumed it had something to do with the new "noveh" param. and maybe some changes in the 1.59 official patch.

I am running A2 CO BAF + PMC all full. patch 1.59.

Hi demonized, seems that match the condition to search for vehicles, then I can not understand why is getting in again, may be when executing upsmon in the heli joins pilot to group, I think this may be the problem, but if is so with 5.7 would fail too.

mmm..

Can you put this lines of code?

looks for this in upsmon.sqf:

------------------------

//Search for vehicle

if ((!_gothit && _targetdist >= ( KRON_UPS_searchVehicledist )) && _isSoldier && !_noveh) then {

if ( vehicle _npc == _npc && _dist > _closeenough ) then {

----------------------------

then add these two lines please and report if executes and the results:

			
player sidechat format["%1: _gothit=%2 _targetdist=%3 _isSoldier=%4",_grpidx, _gothit, _targetdist,_isSoldier]; 

player sidechat format["%1: _noveh=%2 _dist=%3 _closeenough=%4 _npc=%5",_grpidx, _noveh, _dist, _closeenough, _npc]; 

This never happend in 5.0.7 to 5.0.8 R3. it came with 5.0.9 and i just asumed it had something to do with the new "noveh" param. and maybe some changes in the 1.59 official patch.

I am running A2 CO BAF + PMC all full. patch 1.59.

Could you mind to test again with 5.0.8 R3 to see if problem persist?, if problem desapear we will search in changes to find the bug.

Edited by Monsada

Share this post


Link to post
Share on other sites

@Demonized

The best if you attach sample mission to reproduce your problem. It helps a lot.

Thx

Share this post


Link to post
Share on other sites

The new Civ death counter with UPSON. How do I implement this again?

Share this post


Link to post
Share on other sites

It's not really UPSMON costing FPS, more the AI that are actually moving around costing FPS. Making them patrol similarly but without UPSMON (ex: with waypoints) will generally cost similar FPS.

Share this post


Link to post
Share on other sites
It's not really UPSMON costing FPS, more the AI that are actually moving around costing FPS. Making them patrol similarly but without UPSMON (ex: with waypoints) will generally cost similar FPS.

Agreed. Though theoretically UPSMON must have some impact in FPS, it is negligible compared with the standard IA routines that control core things like path finding and combat (specially in urban environments). Stutter and other short slowdowns, on the other hand, are generally UPSx, DAC, Zeus, etc.

Share this post


Link to post
Share on other sites

Is UPSON patrol script (for a simple standard patrol zone) better than UPS patrol script?? Or are they the same?

Fortify option of UPSON seems great for using in small towns, etc (that UPS doesn't allow for).

The use of smoke, is this the only major advantage of UPSON patrol Vs UPS patrol?

Share this post


Link to post
Share on other sites
Is UPSON patrol script (for a simple standard patrol zone) better than UPS patrol script?? Or are they the same?

Fortify option of UPSON seems great for using in small towns, etc (that UPS doesn't allow for).

The use of smoke, is this the only major advantage of UPSON patrol Vs UPS patrol?

upsmon is much more than a patrol script:

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

What can AI do with UPSMON?¶

* 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 uses combat formations depending on the situation.

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 does paratroop near objectives if they take an hely, may land too.

* 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 positions,AI patrol them when leader thinks that enemy is near or using it.

2. What else can be done with UPSMON?¶

* You can define diferent roles to your squads:

o MOVE squads are patrol squads, they moves inside mark and in fight are more agressive.

o NOMOVE if no enemies they do not move, in fight tends to hold position.

o FORTIFY squads do not move , get defence positions in nearly buildings, and static weapons.

* You can do a squad to respawn when entirely squad dead.

* You can add UPSMON artillery module for allowing AI to do support artillery fire to known position.

* You can set REINFORCEMENT squads and send to battle when you need in your mission.

* You can create squads dinamically using the UPSMON spawn module.

Share this post


Link to post
Share on other sites

Another thing that could be improved with UPSMON:

Groups that patrol normally (not using "fortify") seem to not use buildings very often. This was "OK" in Arma 2 where buildings often weren't enterable anyway so patroling inside buildings was pointless most of the time, but in OA (or in custom made towns) with most/all buildings being enterable, they seem to just not use them enough. IMO they should go through building positions way more often both when patrolling and when in combat. Note that this isn't really a new feature that needs adding - It seems to already exist - It just needs a bit of tweaking IMO, so that it happens more often.

Also, would be more interesting IMO if "FORTIFY" groups would take random building positions around a random position in the zone rather than around the group leader (which can be very far from the zone sometimes), and if the zone is moved also make them move to take new building positions somewhere in the new zone. Possibly make this an option rather than mandatory, aka "FORTIFY2" or whatever.

Share this post


Link to post
Share on other sites
Also, would be more interesting IMO if "FORTIFY" groups would take random building positions around a random position in the zone rather than around the group leader (which can be very far from the zone sometimes), and if the zone is moved also make them move to take new building positions somewhere in the new zone. Possibly make this an option rather than mandatory, aka "FORTIFY2" or whatever.

Agree here - Somewhat of a work around is just to create smaller fire teams with each team having their own "Fortify" command - Set them up in different locations around town to start -

---------- Post added at 05:59 PM ---------- Previous post was at 05:51 PM ----------

Also do you have to give the "Move" command witin the UPSON order (team leader's Init:) for them to patrol do you? Only if you want them to not move, you would need to use the "nomove" or "fortify". Correct?

Share this post


Link to post
Share on other sites

Does "MOVE" even do anything? I thought default behavior was "MOVE" anyway?

Also, we could really use some way to change the parameters while the script is running, either by being able to abort the script completely and then restart it with new parameters, or by actually being able to use some new functions that do it.

Share this post


Link to post
Share on other sites

Demonized, thanks for answering my question in the next post. Antigoon had already answered my question about the init file. I overlooked it my haste.

Edited by tod

Share this post


Link to post
Share on other sites

@tod, just download the demo mission and use that to see whats needed.

@Rafalski - yes i will make a demo mission and submit to you.

Share this post


Link to post
Share on other sites

What am I doing wrong?? I cannot get UPSON to work within any missions I create in the editor?

When using UPS.SQF patrol script. I simply need to place the UPS.SQF within my Missions file.

Is this not the case with UPSON??

I have my mission folder. I place the UPSON.SQF file in it. Yet whenever I launch preview I get the "cannot finde scripts\upson.sqf" or something along these lines?

In my missions folder I have my Mission.SQM, UPSON.SQF and HousePatrol.SQF.

I'm obviously missing another step. Do I need to create an Upson.Int file for each new mission I create? (this isn't needed with UPS patrol script...or HousePatrol script).

Thanks for all help.

______________________

UPdate - Figured it out - It was the int.file. Had to include that and then the entire script file. Wasn't use to that. But working now it seems.

Edited by meade95

Share this post


Link to post
Share on other sites

To use UPSMON its' simple ,

Three Very simple step :

First ,

Copy and Past The folder Named "Script" Of the example Mission,

Or if you have already a folder named "Script" in you mission Copy and past The content into your folder.

Second, add this line to your init.sqf :

if ((!isServer) && (player != player)) then
{
 waitUntil {player == player};
};

//Init UPSMON scritp (must be run on all clients)
call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";	

//Process statements stored using setVehicleInit
processInitCommands;
//Finish world initialization before mission is launched. 
finishMissionInit;

Three, add this line to you'r units leader init line :

nul=[this,"markername","move"] execVM ""scripts\upsmon.sqf"";

then it's work.

maybe a bit more complicated, than UPS script, but really better.

EDIT : NVM , was blind, I had not seen your Edit.

Share this post


Link to post
Share on other sites

hmm, since when does init_upsmon needs to run on all clients? I thoguht the script only runs on the server? Was this one of the recent changes?

And what does the waitUntil {player==player}, processInitCommands and finishMissionInit have to do with UPSMON? AFAIK they're not needed at all for this script?

Share this post


Link to post
Share on other sites

you're probably right, but this is what there is in the init.sqf of the mission example, So I thought it was good to execute as its

Share this post


Link to post
Share on other sites
hmm, since when does init_upsmon needs to run on all clients?
since : 5.0.6 at least. look at the beginning of init_upsmon
And what does the waitUntil {player==player}, processInitCommands and finishMissionInit have to do with UPSMON? AFAIK they're not needed at all for this script?
why you think so ? do not look only at mentioned line, look at whole condition:

if ((!isServer) && (player != player)) then
{
 waitUntil {player == player};
};

(if you are NOT server, wait here until your unit (slot) is player.)

"unit = player = client (local to player)).

as "unit != player = server"

This is quite important condition, making sure that code after will be run on server and local PC.

or I'm wrong ?

Edited by Rafalski

Share this post


Link to post
Share on other sites
Another thing that could be improved with UPSMON:

Groups that patrol normally (not using "fortify") seem to not use buildings very often. This was "OK" in Arma 2 where buildings often weren't enterable anyway so patroling inside buildings was pointless most of the time, but in OA (or in custom made towns) with most/all buildings being enterable, they seem to just not use them enough. IMO they should go through building positions way more often both when patrolling and when in combat. Note that this isn't really a new feature that needs adding - It seems to already exist - It just needs a bit of tweaking IMO, so that it happens more often.

Also, would be more interesting IMO if "FORTIFY" groups would take random building positions around a random position in the zone rather than around the group leader (which can be very far from the zone sometimes), and if the zone is moved also make them move to take new building positions somewhere in the new zone. Possibly make this an option rather than mandatory, aka "FORTIFY2" or whatever.

Hello galzohar,

When I created upsmon I had two posibilities when search for buildings,

a- search one time for leader and order soldiers to take positions.

b- search for near buildings on each soldier.

think in a mission with 100 soldiers each of them looking for near buildings each 10 seconds or 5.

I think in terms of performance that was only leader that does it.

On the other hand may be posible to make a parameter for setting buildings use on eachs upsmon squad so you can parametrice one or two scuads to be more defensive but less than fortify. Or create another role. SEEK for example that patrols but using much more buildings SEEKING for enemies.

in terms of programing, SEEK squad would be a MOVE squad but with a percentage of patrolling buildings greater.

_buildingdist = 80 instead of 60

Really only patrol if distance to enemy is close enough

				//If we are close enough patrol in buildings for searching enemies
				if ((( _wptype != "HOLD" && vehicle _npc == _npc && (random 100) < 90  ) 
					&& _npc == vehicle _npc && _dist <= ( _closeenough ))) then {
					[_npc,_buildingdist,true] spawn MON_moveNearestBuildings;
				};	
			};

in SEEK squads will patrol buildings if close enough of _targetdist (distance to destination point) so new code will be like this:

				if ((( _wptype != "HOLD" && vehicle _npc == _npc && (random 100) < 90  ) 
					&& _npc == vehicle _npc 
					&& ( _dist <= ( _closeenough ) 
						|| ( _targetdist <=  _closeenough && _seek )))) then {
					[_npc,_buildingdist,true] spawn MON_moveNearestBuildings;
				};

on init of upsmon file get seep parameter:

//seek group in near places
_seek= if ("SEEK" in _UCthis) then {true} else {false};
if (_seek) then {
	_nomove="MOVE";
	_buildingdist = 80;
	_wait = 90;
};

Rafalski I had troubles with developmen machine, can u try this for me please?

Edited by Monsada

Share this post


Link to post
Share on other sites

What I meant that instead of searching on the leader position, to have the option to search on a random position in the patrol zone (and maybe if too far away, then patrol to that position first, and then fortify buildings around it). Didn't mean to spread soldiers all over the zone, for that you can just place more (smaller) squads.

What do clients do with UPSMON? After all it only really controls AI on the server?

As for waitUntil {player==player} what I meant is that it shouldn't be needed if you never use the player variable anyway (which you probably don't use in a script that only controls AI units?).

Share this post


Link to post
Share on other sites
What I meant that instead of searching on the leader position, to have the option to search on a random position in the patrol zone (and maybe if too far away, then patrol to that position first, and then fortify buildings around it). Didn't mean to spread soldiers all over the zone, for that you can just place more (smaller) squads.

What do clients do with UPSMON? After all it only really controls AI on the server?

As for waitUntil {player==player} what I meant is that it shouldn't be needed if you never use the player variable anyway (which you probably don't use in a script that only controls AI units?).

SEEK squad will patrol to random point, as MOVE does, then will patrol buildings there, will wait a time, and then will go to another random point.

you want another parameter fortify2 that squad goes to random position and then fortify there no? ok is easy

only must add fortify2 parameter and put this code before buiding usage

//If fortify2 must change role to fortify when reached target position
if (_fortify2 && _targetdist <=  _closeenough ) then {
	_fortify = fortify2;
	_nomove="NOMOVE";
	_minreact = KRON_UPS_minreact * 3;
	_buildingdist = _buildingdist * 2;
	_makenewtarget = false;
	_wait = 3000;
};

//Buildings usage.
....

-------------------------------------------

UPSMON runs only on server

if (!isServer) exitWith {};

there is 2 types of server, dedicated server an client server, someone does as server and loads a mission this machine acts as server and client.

on dedicated server there is no problem but on client server sometimes player is not initialized when init is executed this command makes init to wait until player is ready because if not player has not value and condition not matchs.

waitUntil {player==player}

As for waitUntil {player==player} what I meant is that it shouldn't be needed if you never use the player variable anyway (which you probably don't use in a script that only controls AI units?).

you are all right if player is not used may be is not necessary, I used it for security reasons, if player is not initialiced yet, is posible that upsmon fails?

Edited by Monsada

Share this post


Link to post
Share on other sites

@galzohar

UPSMON.sqf runs only on server... but not init_upsmon.sqf, thats way make sure

call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf"; does not have conditions to make it runs only on server.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×