Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

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

Negative, only you do is to stress AI and down performance. You can try it and set as you wish, but I do not recomend to reduce

---------- Post added at 10:14 PM ---------- Previous post was at 10:12 PM ----------

Artillery suppor implemented in BETA 5

http://dev-heaven.net/issues/9831

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

KRON_UPS_ARTILLERY_WEST_FIRE = false; "for doing Artilleries to fire on known targets position

KRON_UPS_ARTILLERY_GUER_FIRE = false; "for doing Artilleries to fire on known targets position

Created a function for adding an artillery to ARMY

nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf";

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

// <- _artillery: object to attach artillery script, must be an object with gunner.

// <- (_rounds): rounds to fire each time, default 1

// <- (_range): range of artillery, default 800

// <- (_area): Dispersion area, 150m by default

// <- (_maxcadence): Cadence of fire, is random between min, default 10s

// <- (_mincadence): Minimum cadence, default 5s

// <- (_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.

If no gunner or dead, artillery will stop of fire.

How to use it:

1-Add nul=[this] execvm "scripts\UPSMON\MON_artillery_add.sqf"; to a static weapon. put with gunner or put a "fortify" squad near to take control of artillery.

2-Create a trigger for set artillery var to true KRON_UPS_ARTILLERY_EAST_FIRE = true; when you want to fire or set to false when you want to cease of fire.

Download beta 5 with sample of artillery:http://dev-heaven.net/attachments/download/5263/UPSMON5_6.utes_Beta_5.rar

Edited by Monsada

Share this post


Link to post
Share on other sites

Thanks, for your quick response and for your great effort too...

Keep up the good work!!

Cheers

Share this post


Link to post
Share on other sites

Will the artillery fire infinitely? And if yes, are you planning to add an option to give them a preset ammo limit (after it runs out, no more firing)?

Is this using the artillery module or just spawning the shells? Watch out that if you use the artillery module even if you just fire 1 round there is some kind of a minimum delay until another fire mission can be given.

Share this post


Link to post
Share on other sites
Will the artillery fire infinitely? And if yes, are you planning to add an option to give them a preset ammo limit (after it runs out, no more firing)?

Negative.

1-Artillery stops fire when his side orders to stop:

ej:KRON_UPS_ARTILLERY_EAST_FIRE = false;

2-When Artillery or gunner dies

3-When known positions of targets are out of range of artillery, default 800m

4-When no known targets or all dead

Share this post


Link to post
Share on other sites

Thanks for the asrty support hopefully I can figure out a way to use this instead of the other AI mortars I've been trying to use in my mission to no success. Now I just got find a way to make this script spawn with enemy Independent AI firing mortars at me only when I activate a certain trigger by my team leader(as player).

I just couldn't get the simple AI mortar scripts posted around here to work. I hope this can do something like that.

One quick thing I noticed about the last few example mission betas, has anyone else noticed that the date on them is 03/29/2009? I've never noticed that before, until today. Weird stuff.

Great script! Thanks for all the work on the advancement.

Share this post


Link to post
Share on other sites

Awesome script, I have it running well. But I would like to be able to randomize whether or not a squad spawns in. For example I put 30 groups, all with UPSMON in the editor, but I only want 10 percent of them to spawn so I will end up with about 3 enemy groups. I have tried setting probability of presence on the leader and it doesn't work. I made a script to delete some of the groups at random and that causes errors in UPSMON. I searched for an answer to this and can't find one. Please help thanks.

Share this post


Link to post
Share on other sites

you can do it puting this on init of leader

if ((random 100) > 10) then {
{
deletevehicle _x;
}foreach units this;
}else{
NUL=EXECVM "UPSMON..."
};

Share this post


Link to post
Share on other sites

Make sure you run that kind of thing on the server only, or else the unit will have 90% chance to get deleted for every player in the game, and then it might run UPSMON on the server on a unit that will later be deleted by a player which can cause all sorts of nasty stuff.

Share this post


Link to post
Share on other sites

I've been playing with this addon seriously for the first time and came across the following issue....

I'm using the reinforcement option and trigger and have placed an empty chopper near the troops that I want called in. It seems that the troops mount the chopper but don't go anywhere. I'm not sure if the trigger was activated at the point that they got in the chopper as they appear to do that immediately. I removed the chopper and they walked to their destination when the trigger was activated. Any ideas? I was using a empty Russian helo with blufor forces but I didn't think that mattered.

I'm also having a hard time understanding the following logic. I set up trigger to detect when OPFOR is present and setup Blufor as reinforcements. When the trigger is activated by Opfor, Blufor should move to that location is this correct? Is there supposed to be another group of BLUFOR calling them in or will the trigger do this? Sorry for the lame questions, I'm new at this.

Share this post


Link to post
Share on other sites

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

Added posibility of assign reinforcement position. If no done this AI reinforcements will go to nearest known position of enemy.

Lider:

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

Trigger:

KRON_UPS_reinforcement1 = true;

KRON_UPS_reinforcement1_pos = getmarkerpos "town2";

This will send squad "reinforcement:",1 to position of mark "town2".

Edited by Monsada

Share this post


Link to post
Share on other sites
set up trigger to detect when OPFOR is present and setup Blufor as reinforcements. When the trigger is activated by Opfor, Blufor should move to that location is this correct?

NO!, Blufor will go to the location of Opfor "known" by Blufor. Trigger with KRON..=true just activate that: reinforcement should go to the known position of Opfor, not to the trigger position.

To test it. First make sure that some Blufor unit knows about you (as Opfor) (eg: start fighting with Blufor) and then call the trigger. eg: Use activation by radio.

edit:

Just seen, that in beta 6 you can set some default position of reinforcement. :)

Edited by Rafalski

Share this post


Link to post
Share on other sites

from UPSMON.SQF

nul=[this,"town"] execVM "upsmon.sqf";

nul=[this,"town","move","random","delete:",300,"reinforcement"] execVM "upsmon.sqf";

question.

what does "move" parameter do? Above examples , is any difference in moving if you use "move" or not.

=====

should be ";" at the end of lines not ")"

from UPSMON.sqf

defensive squad samples:

nul=[this,"town","nomove"] execVM "scripts\upsmon.sqf")

nul=[this,"town","nomove","delete:",300,"fortify","ambush:",3000] execVM "scripts\upsmon.sqf")

Share this post


Link to post
Share on other sites
NO!, Blufor will go to the location of Opfor "known" by Blufor. Trigger with KRON..=true just activate that: reinforcement should go to the known position of Opfor, not to the trigger position.

To test it. First make sure that some Blufor unit knows about you (as Opfor) (eg: start fighting with Blufor) and then call the trigger. eg: Use activation by radio.

edit:

Just seen, that in beta 6 you can set some default position of reinforcement. :)

Well, my thinking was that if opfor was "present" and activated the trigger, reinforcements would go to the trigger which where the enemy is anyway, right?

Share this post


Link to post
Share on other sites
from UPSMON.SQF

question.

what does "move" parameter do? Above examples , is any difference in moving if you use "move" or not.

does the same, read first page, is no puts by default create patrols with "MOVE"

=====

should be ";" at the end of lines not ")"

from UPSMON.sqf

Ein? culo? what do you mean?

---------- Post added at 04:03 PM ---------- Previous post was at 04:02 PM ----------

Well, my thinking was that if opfor was "present" and activated the trigger, reinforcements would go to the trigger which where the enemy is anyway, right?

NO, will go to nearest ENEMY KNOWN POSITION.

if you want they go on especific position must tell.

KRON_UPS_reinforcement"x"_pos

I have explained up, see sample mission of BETA 6 if doubts.

Share this post


Link to post
Share on other sites

just small mistake in the samples of "defensive squad samples" in UPSMON.sqf

should be ";" at the end not ")".

Share this post


Link to post
Share on other sites

Oh yes! now I understand you, corrected, thanks ;)

Share this post


Link to post
Share on other sites

This is a great script from what I can figure out how to use. My only problem is that I haven't been able to figure out how to get many of the features to work. I'm just not good at reading about it.

Could someone that has used this for a while please post a small example mission with some of the features, I guess more then what the included mission has. I'm having a hard time getting my head around the integration of many of the features.

I'd love to have my current WIP mission use more of the features but I'm struggling with some stuff. Just something basic but a little more in depth.

I'm figuring it out slowly but I'd like to get my missions out to the community a little faster. My A2 time is limited these days but I'm still trying to spend that time I do have making some more SP missions to release. I guess I'm just hoping someone has made something to use as a template for their personal use. If anyone has this could you please post it? I realize making one just for this is a time consuming chore so hopefully someone already did.

Any help would be appreciated.

Share this post


Link to post
Share on other sites

I've been wondering if there was anything in this script to handle a group that may or may not include players who may connect/disconnect. Is it possible to make it work so that the script will control only non-player units - Once a unit becomes a player the script will stop controlling it (preferably while still providing info as with the "nowp" parameter), and as soon as a player disconnects the script will take over again? Both for group leaders and group members?

Share this post


Link to post
Share on other sites

player can play in group, but must not be leader, if player is the leader script ends

Share this post


Link to post
Share on other sites

If the leader dies but stays the group leader (this is a BIS bug and sometimes happens), will the script keep working properly?

Share this post


Link to post
Share on other sites

Another problem:

When loading AI units to vehicle (and not executing the script just yet), then as soon as the script is executed on a dedicated server all units immediately spew out of the vehicle at once, which both looks bad, is unrealistic, and worst - gets them killed because they land on top of eachother. In single player this does not happen which means I can unload them manually 1 by 1 with a 2.5 second delay by using the {[_x] orderGetIn false; unassignVehicle _x; sleep 2.5;} forEach units group groupName;

Is there any way to either make the script unload them properly or just not unload them at all, both offline and on dedicated servers?

Test mission to reproduce problem:

http://www.filefactory.com/file/b0f19ah/n/UPSMONUnloadTest.isladuala.pbo

Requires Isle Duala and ACE.

First AAV has the "orderGetIn false" commented out and the second one does not so you can compare.

Share this post


Link to post
Share on other sites

Hmmmm, I'm having trouble understanding this example mission. What are the 3 markers(Flank 1, Flank 2, target) for? Are they necessary for a certain feature? I don't see any units with those markers in their init line. Also what are the other zone markers for, who uses them? I see the airport zone is for the Russian troops, but where are the troops that use the other 2 zones? Lastly what do I do in the example mission?

My apologies for the dumb question but I'm having some difficulty figuring out how the mission is set-up and how I'm supposed to set it up in my missions. I'd like to, just can't figure out how?

Edited by Manzilla

Share this post


Link to post
Share on other sites

I second what manzilla said. The exmaple mission is bit unclear. Can you please explain what each marker does. And in last version are you still using fortify same way?

But previous mission the AI was great. But this last one is a bit unclear ..

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  

×