Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

I got the CTD also with the new beta 2. I followed the reinforcement group who were heading to combat "vehicle". The game crashed when the group leader enter a nearby small building throught a door. It was a non-enterable small hut with door that ambient civilians use. :S

Edit: Now the game crashed even when I didnt have any reinforcement groups. The two normal groups with

nul=[leader _CG4,"alue2","move"] execVM "scripts\upsmon.sqf";

and

nul=[leader _CG3,"alue1"] execVM "scripts\upsmon.sqf";

init lines were also trying to get in a unknown combat vehicle soon after the enemy contact and little later the game crashed.

I would maybe guess that the groups think some of the houses as combat vehicles and when they enter then the game may crash.

This seems to be a bugged building submit sample mission so we can reproduce it, may be I can not solve bugged building but i can exclude his class from search.

---------- Post added at 04:27 PM ---------- Previous post was at 04:23 PM ----------

I still wonder what you use to tell whether the AI sees enemies or not, as every method I tried to use will still tell me the AI sees you for quite a while after he no longer sees you. For example "detected by" triggers will stay true for ~1-2 minutes even if there is only 1 enemy in the mission that detected you and you either go out of his LOS or straight out kill him.

Using knowsAbout value also doesn't work, as while it does get set to 0 when the enemy is dead, it says on 4 for a few minutes after he loses track of you, so again the script could think he knows where you are long after you've disappeared.

If you use any better method, please share ;)

I use nearTargets that have same problems, but after, in those targets I exclude dead soldiers, and surrended soldiers and static weapons without gunner etc..

Share this post


Link to post
Share on other sites

I reproduced the bug in separate test mission. All seemed to work fine at start, but after I added ambient civilian module the groups started to use positions in closed houses which breaks the game.

Last time the CTD came when a group was getting in some BIS_alice_door... location (and combat vehicle) which had room for 2 people.

http://www.filefront.com/15947145/buggedbuildings.Chernarus.rar

There is also a spawned chopper which is deleted later. I left it there but I dont think its causing the CTD. Also the destroyed buildings and burning tanks may be unneeded. You can prevent the house destroying by deleting one of the triggers in the middle of the village.

Share this post


Link to post
Share on other sites

Beware, as far as I know deleting vehicles and then trying to refer to them *can* cause a CTD, though to be honest I don't see why the engine wouldn't be able to always handle that and give the appropriate error.

Of course I never got a crash that I know was caused by this, but looking at deleteVehicle it says that can happen, so again you may want to watch out for that.

Share this post


Link to post
Share on other sites

@saok

Thanks, you help me fix a mission. I have been trying to figure out what was causing it to lock hard 10-30 mins from start. I would have to ctrl,alt,delete and close arma2 to fix the lockup. I have tried everything. I was about to delete it and remake it, thinking it had somehow gotten corrupted.

But, I removed the Ambient Civil mod and it works with no hard locks. I put the ambient civil mod back in and it will lock.

I never thought about upsmon and the ambient civil conflicting. I checked the rpt but still could not find a reason, but now it makes sense. When I first made the mission I used just the UPS.sqf and had no problems. I changed out to upsmon.sqf awhile back and changed the this mission along with all my others. Every mission worked great but this one ,and this was the only one that I was using the ambient civil mod.

Nomadd

Share this post


Link to post
Share on other sites

I have noticed that some members of opfor groups patroling with UPSMON are running, while at the same time other members of the same group are walking normally. These groups did not yet have contact, and my player character had not yet been detected by any enemy at all.

Why is that, and how can it be avoided?

Thanks in advance

A.

Share this post


Link to post
Share on other sites

Are you sure they're not simply running to catch up with the formation?

Share this post


Link to post
Share on other sites

Don't suppose there is a way to make the AI choppers land and dump the troops? Not a biggie, can just exclude the helos from this. Never been a fan of the OFP/Arma/Arma 2 heliborne paradrops from 50m into the middle of an active battlefield. ;)

Regardless, thanks for the package!

Share this post


Link to post
Share on other sites
Are you sure they're not simply running to catch up with the formation?

No, they are actually running way ahead of the formation. Its wierd...

Share this post


Link to post
Share on other sites
I reproduced the bug in separate test mission. All seemed to work fine at start, but after I added ambient civilian module the groups started to use positions in closed houses which breaks the game.

Last time the CTD came when a group was getting in some BIS_alice_door... location (and combat vehicle) which had room for 2 people.

http://www.filefront.com/15947145/buggedbuildings.Chernarus.rar

There is also a spawned chopper which is deleted later. I left it there but I dont think its causing the CTD. Also the destroyed buildings and burning tanks may be unneeded. You can prevent the house destroying by deleting one of the triggers in the middle of the village.

The problem is a bugged clas "BIS_alice_emptydoor"

http://forums.bistudio.com/showthread.php?p=1528889

I added control of these bugged class also controlled not using damaged buildings.

5.0.6 beta 3 released, must be final beta if no more bugs

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

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

// Bug with VEE formation, some times AI don't change vehaviour

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

downloads: http://dev-heaven.net/projects/upsmon/files

Share this post


Link to post
Share on other sites
The problem is a bugged clas "BIS_alice_emptydoor"

http://forums.bistudio.com/showthread.php?p=1528889

I added control of these bugged class also controlled not using damaged buildings.

Don't know if you already fixed this...

You can fix this problem by simply checking:

if (sizeOf typeOf _whatever > 1) then

The "BIS_alice_emptydoor" got a size of 0.23 if i remember right and is listed in the "Car" class.

So if you use scripts which check for vehicles of the kind "Car" then simply use the "if (sizeOf typeOf _vehicle > 1) then" and you will not have any problem with this in the future.

Share this post


Link to post
Share on other sites
Don't know if you already fixed this...

You can fix this problem by simply checking:

if (sizeOf typeOf _whatever > 1) then

The "BIS_alice_emptydoor" got a size of 0.23 if i remember right and is listed in the "Car" class.

So if you use scripts which check for vehicles of the kind "Car" then simply use the "if (sizeOf typeOf _vehicle > 1) then" and you will not have any problem with this in the future.

I fixed it, excluding this class from classes to use

Share this post


Link to post
Share on other sites

@monsada

The new Parameter "RESPAWN". Is their a way to set the number of times a unit can respawn.

For example.... "respawn:",2 . The unit will only respawn 2 times.

Also, anyway to make units/groups spawn in with a trigger like Murklors Murk_spawn.

http://forums.bistudio.com/showthread.php?t=84854&highlight=Murk.

The reason I ask. I use murk_spawn ,alot in missions, to spawn enemys. It would be nice to be able to do everything through UPSMON.

Nomadd

Share this post


Link to post
Share on other sites
@monsada

The new Parameter "RESPAWN". Is their a way to set the number of times a unit can respawn.

For example.... "respawn:",2 . The unit will only respawn 2 times.

Also, anyway to make units/groups spawn in with a trigger like Murklors Murk_spawn.

http://forums.bistudio.com/showthread.php?t=84854&highlight=Murk.

The reason I ask. I use murk_spawn ,alot in missions, to spawn enemys. It would be nice to be able to do everything through UPSMON.

Nomadd

Yes, I will implement it. Will run as explain as follow.

Ther will be a new parameter "ID:",1 this will set the Id of the squad. Upsmon will save its components. Example of who to use:

First ,creates a squad in editor and puts on the init this "ID",x this will save composition of squad as template x:

nul = [this,"town","ID:",1, "move","reinforcement", "delete:",600] execVM "scripts\upsmon.sqf";

Then you can use this ID when you want to create another group same as the template "ID:", x No matters if template squad dead, example of use in a trigger:

nul = [1,[0,0,0],3,["town", "move","reinforcement", "delete:",600]] EXECVM "SCRIPTS\UPSMON\SPAWN.SQF";

Param1 = Id of the template.

Param2 = Position to create new squad.

Param3 = Nº of copys to create

Param4 = Array of parameters of UPSMON, first must be name of marc to patrol

optional parameters:

"rf:"x = number of reinforcement squads to reposoriginal squads when dead

"rfpos:"x = position to create reinfocement squads

What do you think?

Edited by Monsada

Share this post


Link to post
Share on other sites

@Monsada

That sounds great. I can't wait to try it out.

Nomadd

Share this post


Link to post
Share on other sites

Has someone written a guide or tutorial for using this? Too much to understand for someone new at this... I know its well documented but it's still a bit daunting.

Share this post


Link to post
Share on other sites

Is there any way to make AI more "defensive" in their patrols? That is, not chase enemies if chasing them requires them going way out of their patrol zone? And if there isn't, is there any chance something like this will get implemented? I want to keep my AI patrolling and using UPS smart stuff when they are fighting in their designated area, but don't want them to leave the area that they are supposed to defend just to attack enemies a kilometer away from it.

I tried setting sharedist to low, which meant they don't call for their buddies from the other side of the island, but when they spot you themselves they will attack you no matter how far you are as long as you were in spotting range rather than stay on the nice hill they were ordered to patrol/defend and fight from there.

Share this post


Link to post
Share on other sites
Is there any way to make AI more "defensive" in their patrols? That is, not chase enemies if chasing them requires them going way out of their patrol zone? And if there isn't, is there any chance something like this will get implemented? I want to keep my AI patrolling and using UPS smart stuff when they are fighting in their designated area, but don't want them to leave the area that they are supposed to defend just to attack enemies a kilometer away from it.

I tried setting sharedist to low, which meant they don't call for their buddies from the other side of the island, but when they spot you themselves they will attack you no matter how far you are as long as you were in spotting range rather than stay on the nice hill they were ordered to patrol/defend and fight from there.

mmm there is a parameter "NOFOLLOW", can you try it?

Created issue for this: http://dev-heaven.net/issues/9824

---------- Post added at 09:31 AM ---------- Previous post was at 09:27 AM ----------

Has someone written a guide or tutorial for using this? Too much to understand for someone new at this... I know its well documented but it's still a bit daunting.

When I got time I must do Wiki of UPSMON.

I need someone with good english for doing it. Any volunteers?

---------- Post added at 11:14 AM ---------- Previous post was at 09:31 AM ----------

Is there any way to make AI more "defensive" in their patrols? That is, not chase enemies if chasing them requires them going way out of their patrol zone? And if there isn't, is there any chance something like this will get implemented? I want to keep my AI patrolling and using UPS smart stuff when they are fighting in their designated area, but don't want them to leave the area that they are supposed to defend just to attack enemies a kilometer away from it.

I tried setting sharedist to low, which meant they don't call for their buddies from the other side of the island, but when they spot you themselves they will attack you no matter how far you are as long as you were in spotting range rather than stay on the nice hill they were ordered to patrol/defend and fight from there.

solved, with NOFOLLOW AI will patrol always inside zone, when enemy detected and flanking spot is out of zone squad will rest holding position, so they will not exits from designated zone.

Added Beta 4 to repository for testing

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

Edited by Monsada

Share this post


Link to post
Share on other sites

Great little scripts suite which makes creating missions much easier/quicker and even enhances the mission experience..

Little things i found :

- When i enable a group to use this script my mission gets a short lagspike every 60 secs (probably due to the script updating enemy locations etc)

- The leader of a group who is in fortify mode just stands still on the spot u place it and doesn't move, although it switches combat modes (safe/aware/etc)

Last is a little personal wish, I would be nice to have a extra parameter which restricts the units of a group to board empty vehicles. Maybe this can be alrdy done by locking the vehicle but didn't test it yet.

Share this post


Link to post
Share on other sites
Great little scripts suite which makes creating missions much easier/quicker and even enhances the mission experience..

Little things i found :

- When i enable a group to use this script my mission gets a short lagspike every 60 secs (probably due to the script updating enemy locations etc)

- The leader of a group who is in fortify mode just stands still on the spot u place it and doesn't move, although it switches combat modes (safe/aware/etc)

Last is a little personal wish, I would be nice to have a extra parameter which restricts the units of a group to board empty vehicles. Maybe this can be alrdy done by locking the vehicle but didn't test it yet.

-AI calculations will be done each 60 s more or less.

-The leader gets in position to avoid soldiers follow him.

-Lock the vehicle will result for avoiding AI getin

---------- Post added at 03:22 PM ---------- Previous post was at 02:59 PM ----------

Im workin on artillery support, in wich situations would be nice to be implemented and how?

I think:

KRON_UPS_ARTILLERY_EAST=0 //Number of artilleries for doing fire, 0 for disable.

KRON_UPS_ARTILLERY_EAST_FIRE = false; "for doing Artilleries to fire on known

when in range.

Create a function for adding an artillery to ARMY

nul = [this,range,rounds,dispersion,mincadence,maxcadence,bullet] EXECVM "SCRIPTS\UPSMON\add_artillery.SQF";

// <- _object: artillery object, will fire if gunner is alive and KRON_UPS_ARTILLERY_x_FIRE where x is his side.

// <- _range: range of artillery

// <- _rounds: rounds to fire each time

// <- _dispersion: Dispersion area, 150m by default

// <- _maxcadence: Cadence of fire, is random between min

// <- _mincadence: Minimum cadence

// <- _bullet: class of bullet to fire, default ARTY_Sh_81_HE

Artillery will check if known target position has a friendly squad near, if has will no fire.

You can enable or disable artillery in your mission by changing KRON_UPS_ARTILLERY_EAST_FIRE and only will fire this artillery which has gunner and known targets in his range.

What do you mean?

Share this post


Link to post
Share on other sites

solved, with NOFOLLOW AI will patrol always inside zone, when enemy detected and flanking spot is out of zone squad will rest holding position, so they will not exits from designated zone.

Added Beta 4 to repository for testing

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

Thanks a lot! Will try this in the next version of my mission.

Share this post


Link to post
Share on other sites

[/color]Im workin on artillery support, in wich situations would be nice to be implemented and how?

I think:

KRON_UPS_ARTILLERY_EAST=0 //Number of artilleries for doing fire, 0 for disable.

KRON_UPS_ARTILLERY_EAST_FIRE = false; "for doing Artilleries to fire on known

when in range.

Create a function for adding an artillery to ARMY

nul = [this,range,rounds,dispersion,mincadence,maxcadence,bullet] EXECVM "SCRIPTS\UPSMON\add_artillery.SQF";

// <- _object: artillery object, will fire if gunner is alive and KRON_UPS_ARTILLERY_x_FIRE where x is his side.

// <- _range: range of artillery

// <- _rounds: rounds to fire each time

// <- _dispersion: Dispersion area, 150m by default

// <- _maxcadence: Cadence of fire, is random between min

// <- _mincadence: Minimum cadence

// <- _bullet: class of bullet to fire, default ARTY_Sh_81_HE

Artillery will check if known target position has a friendly squad near, if has will no fire.

Nice but I hope IA can use smoke artillery munition, for example when they try to attack player, Ia can fire HE round (if no friendly force near) and complete with smoke to blind player.

Some restriction:

ia don't use them if the target is not big (6-7 player minimum)

Ia can also use flare round for artillery if their unit don't wear NVG and if it is night ( :rolleyes: ).

thanks for you work..

Share this post


Link to post
Share on other sites

Is it a good idea to reduce AI calculations by 50% to improve leader decisons?

(30 instead of 60)

Share this post


Link to post
Share on other sites
Is it a good idea to reduce AI calculations by 50% to improve leader decisons?

(30 instead of 60)

I dont understand this question

Share this post


Link to post
Share on other sites

Changing these values, are we getting a better AI??

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

//Min time to wait for doing another reaction

KRON_UPS_minreact = 30;--------------------------------->15

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  

×