Jump to content
Sign in to follow this  
Monsada

UPSMON - Urban Patrol Script Mon

Recommended Posts

Hi Splicer,

Your mission sounds great! I gave that Cipher a try too - dynamic missions have an extra appeal not knowing what to expect each time you play. Sounds like you have put a lot of work in - when will it be available for testing/playing?

I managed to get UPSMON to work in a new mission with one Marker and one Group - but still cannot get it to go in my mission! tried stripping out the init. file and the Description.ext file but still no luck. dunno what is killing it.

Unfortunately Monsada's does not seem to visit this forum often - I may have to end up using Kronski's version as i know that one works.

Later

Arkon2

---------- Post added at 21:17 ---------- Previous post was at 21:07 ----------

ya, I did that, I put it in the scripts folder and then in the main mission folder. Still got the same error

Hi RamadiIraq,

Dunno if you worked it out yet...if not...

The file "Init_UPSMON.sqf" also makes a call for the "MON_functions.sqf" file here:

call compile preprocessFileLineNumbers "scripts\common\MON_functions.sqf";

So you may need to edit the above line to point to the correct location of your functions file.

Hope this helps

Arkon2

EDIT: Dunno what happened with this post - would not let me post separately!

Edited by Arkon2

Share this post


Link to post
Share on other sites

Your mission sounds great! I gave that Cipher a try too - dynamic missions have an extra appeal not knowing what to expect each time you play. Sounds like you have put a lot of work in - when will it be available for testing/playing?

Hi Arkon2,

At this point I can't tell when the mission will be ready for prime time. I think I will release it in stages when a significant section is done. I'll keep you posted! :D

I managed to get UPSMON to work in a new mission with one Marker and one Group - but still cannot get it to go in my mission! tried stripping out the init. file and the Description.ext file but still no luck. dunno what is killing it.

Unfortunately Monsada's does not seem to visit this forum often - I may have to end up using Kronski's version as i know that one works.

Don't know why you're having so much trouble with UPSMON... It worked like a charm for me since the get go.

By the way, I noticed that in your original post you wrote you were using:

nul=[this,"Alpha"] execVM "UPSMON.sq";

Notice that "UPSMON.sq" should be "UPSMON.sqf"

Just making sure you got the whole code entered correctly. :D

Also, I started my mission fresh with no init.sqf or Description.ext, etc.

By the way, have you started ArmA2 with a code to monitor/debug scripts?

Have you checked the error file that is created when an error happens?

Best, Splicer.

Share this post


Link to post
Share on other sites

Great Script! I have implmented in my latest mission (Camel Joe) where is it door to door fighting. Combined with Zues AI, the fighting in town is pretty tense indeed!

Only clarification I have is aside from reinfrocment what other options are there?

Looking forward to future updates.

Share this post


Link to post
Share on other sites

Hi Spicer

Thanks for all the tips :)

I have finally sussed it:

Having this line "#SETVARIABLES" in the .init file seems to stop it from working - was getting CTD with preprocess errors - also not sure or not whether your .init file has to be .SQF - anyways its working now :bounce3:

Let us know how things go with your mission - I should have mine ready in a couple of weeks or so.

Regards

Arkon2

Share this post


Link to post
Share on other sites

Does anyone have a simple mission already put together that can I look at to see how to put this all together? I got the original UPS script to work but I haven't been able to get this one to work.

Edited by skooma

Share this post


Link to post
Share on other sites
Hi Spicer

Thanks for all the tips :)

You are very welcome Arkon2! :)

...also not sure or not whether your .init file has to be .SQF - anyways its working now :bounce3:

Yes, the init file is .sqf

Let us know how things go with your mission - I should have mine ready in a couple of weeks or so.

Will do! And look forward to seeing your mission! :D

My best, Splicer.

Share this post


Link to post
Share on other sites
Great Script! I have implmented in my latest mission (Camel Joe) where is it door to door fighting. Combined with Zues AI, the fighting in town is pretty tense indeed!

Only clarification I have is aside from reinfrocment what other options are there?

Looking forward to future updates.

Hi all, I'm working in new version wich improves IA's one more time. This is an advance, IA will use formations depending on the situation, for example in close combats will remain together. I am working in a better system to find and use vehicles too, that allow IA to use empty vehicles in base or of citicen in towns. This system will allow me to use helis and paratrops if far far away.

Answering questions.

KRON_UPS_reinforcement allows IA to send reinforcements. How it works, u need a group of IAs that will be reinforcement, that groups must have atribute "reinforcement" in this init, like this:

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

Well, now only you need is to set KRON_UPS_reinforcement = true when u want to be reinforces called, for example when enemy is detected in the heart of a base or town, you create a trigger of detection and put in act:

KRON_UPS_reinforcement = true;

If u put some empty trucks or cars near u could see that IA uses it to aproach the near war point.

I have been testing with calling UPSMON with spawn, the only way to run as spawn is compiling the function in the init of each unit, but I have not noticed diference. If any one want to test it try this:

UPSMON = compile preprocessFile "scripts\UPSMON.sqf"; 
nul=[this,"town", "move","reinforcement", "delete:",600] spawn Upsmon;

Edited by Monsada

Share this post


Link to post
Share on other sites
No one ever really answered my question my about where the functions file go?

I did answer you in an earlier post:

Put the file (MON_functions.sqf) in the same place as all your other scripts - for your problem you need to edit the "Init_UPSMON.sqf" file to point to where you have put that file (MON_functions.sqf) - then you will not get the error - see below:

The file "Init_UPSMON.sqf" also makes a call for the "MON_functions.sqf" file.

Look for the line below in the "Init_UPSMON.sqf" file.

call compile preprocessFileLineNumbers "scripts\common\MON_functions.sqf";

So you need to edit the above line to point to the correct location of your functions file.

Hope this helps

Arkon2

Share this post


Link to post
Share on other sites

New version available

//Version: 4.2.2

// Added

// Se ha añadido ataque frontal

// Formaciones de combate en función de la situación

// La IA puede entrar en los edificios a tomar posiciones de defensa y en ataque puede patrullarlos en busca de enemigos o posiciones de fuego.

// Modificaciones:

// Mejorado el sistema para localizar, asignar y entrar en vehiculos,.

// Optimizado el rendimiento. Se ha mejorado para que se pueda ejecutar cada 20s.

// Modificada la parametrización, sharedist incrementado, react reducido, cycle aumentado.

// Modificada la actitud e la IA en combate, se ha dado más especialización en función de la situación.

// Corregido bug que al enviar refuerzos hacía que dejaran de patrullar si no tenian ningún target

// Posiciones de flanqueo más dinámicas.

// Las escuadras con rol "NOMOVE" tienden a asegurar la posición y a hacer mayor uso de los edificios del entorno.

Vehicle getin improved:

Building patrol:

Download

To install you must put folder scripts of rar in your mission.

MON_functions updated too.

Edited by Monsada

Share this post


Link to post
Share on other sites

I have been implementing some functions in spawn mode to exploit the multithread of processors with very fast results.

As far as I can tell different spawned "threads" don't actually run in paralel, the game engine basically acts as the "operating system" and chooses which one to run when so that all of them get sufficient running time, and doesn't actually run them on actual windows threads. Splitting your code into multiple spawned scripts/functions unfortunately will do nothing to help performance. Spawning code is only really any good if it actually makes sense logically.

Share this post


Link to post
Share on other sites
New version available

//Version: 4.2.2

// Added

// Se ha añadido ataque frontal

// Formaciones de combate en función de la situación

// La IA puede entrar en los edificios a tomar posiciones de defensa y en ataque puede patrullarlos en busca de enemigos o posiciones de fuego.

// Modificaciones:

// Mejorado el sistema para localizar, asignar y entrar en vehiculos,.

// Optimizado el rendimiento. Se ha mejorado para que se pueda ejecutar cada 20s.

// Modificada la parametrización, sharedist incrementado, react reducido, cycle aumentado.

// Modificada la actitud e la IA en combate, se ha dado más especialización en función de la situación.

// Corregido bug que al enviar refuerzos hacía que dejaran de patrullar si no tenian ningún target

// Posiciones de flanqueo más dinámicas.

// Las escuadras con rol "NOMOVE" tienden a asegurar la posición y a hacer mayor uso de los edificios del entorno.

OK guys, here's the translation:

//Version: 4.2.2

// Added

// Front attack.

// Combat formation based on current situation.

// AIs can get in buildings to defend, and when on patrol they can chase the enemy or take position to attack.

// Modifications:

// Improved system to locate, assign and get in vehicles.

// Performance enhanced. It's been improved to be run every 20 secs.

// Parametrization has been modified, sharedist increased, react shorterned, cycle increased.

// AI's attitude has been modified when in combat, now they react in a more specialized way according to the situation.

// Fixed bug that made reinforcements wandered without direction when called to assist.

// More dynamic flanking attacks.

// Squads assigned "NOMOVE" now secure positions and make better use of nearby buildings.

I hope this helps.

By the way MONSADA, what do you mean by "Optimizado el rendimiento. Se ha mejorado para que se pueda ejecutar cada 20s."? Send me a private message and I will translate this to reflect what you mean since it is not clear what "rendimiento" is (i.e., performance, stamina, shoot/kill ration)? And also, what do you mean by "Modificada la parametrización"

MIL GRACIAS! -Splicer.

Edited by Splicer

Share this post


Link to post
Share on other sites

Thanks for the translation Splicer.

Are you going to give the new version a try?

Share this post


Link to post
Share on other sites

Hi Arkon2,

Yep, I'll try the new version. I'd like to see how things work with the latest tweaks. :yay:

I'm under the weather with a nasty cold... perhaps a massive dosage of ArmA2 can kill the virus! :D

And about the translation... U R :welcome:

My best, -Splicer.

Share this post


Link to post
Share on other sites

Hi all,

Thanks for the translation Splicer, I forget to translate :p in armaholic has been translated too.

http://www.armaholic.com/page.php?id=9213

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.

Well, when I say better performance I mean that I had have reduced the frecuency that needs to be executed for doing calculations. KRON_UPS_Cycle now is 20 seconds. This late represents the time to comunicate with other platoons. In adition to this I had added a wait in the init of each group for avoiding calculations will be done for each in the same time and free the processor.

If u test, u could see that IA is more hard, "NOMOVE" platoons tends to hold position while "MOVE" platoons do flanking movements, in adition to this has been added formations, in close combat situations they usually move together in COMPACT COLUMN, while holding positions forms a LINE in front of enemy, moving large distances forms a COLUMN etc..

Flanking position has been dinamiced, has been added frontal atack when flanking positions has been covered by friendly platoons.

The most impresive in this version is seen platoons catching vehicles for long transports and the patrol of buildings.

I tried to do videos for showing the news but I don't know why not sound, I hope someone can do a better video than these, I think this will not be so dificult XD.

This is a sample mission for view how to implement UPSMON u can teleport doing click on map.

SAMPLE MISION: http://www.megaupload.com/?d=9YRQG24O

A litle explanation of marks: Green dot with number is the number of platoon and this actual position, green litle circle with cross is the destination of platoon.

For your misions remember to change the debug parameter in init_UPSMON.SQF in order to quit messages and marks of position and destination platoons.

KRON_UPS_Debug = 0; // With 0 no debug coments and no mark position.

I hope see your impresion and ideas for news.

Thanks to all

Best regards,

---------- Post added at 09:50 AM ---------- Previous post was at 09:18 AM ----------

As far as I can tell different spawned "threads" don't actually run in paralel, the game engine basically acts as the "operating system" and chooses which one to run when so that all of them get sufficient running time, and doesn't actually run them on actual windows threads. Splitting your code into multiple spawned scripts/functions unfortunately will do nothing to help performance. Spawning code is only really any good if it actually makes sense logically.

"The new script is running in parallel, spawn does not wait for it to be done, instead spawn returns a Script handle. "

http://community.bistudio.com/wiki/spawn

I don't know how low level it runs but in my testings I noticed that spawning functions seems to run in parallel, principal process don't wait to finish it and continues runing, the result was more better performance than doing it with call. This is much util more over ordering units of group doing things like animations, getin, getout of vehicles and more commands that requires a litle sleep for good completion like enableAI. You can do the order and continue the principal process, each unit will do the order runing it in "parallel".

In the only I don't noticed nothing is spawning the enterely script in the init of leader group, as u could see in the sample. I tried it with 20 platoons spawning UPSMON and another time with EXECVM, I noticed no diference, I think i read somewhere that each units runs in parallel, same as spawn.

Edited by Monsada
Adding sample mission

Share this post


Link to post
Share on other sites

Hi there, i was just wondering if there is a respawn version of this available.

i.e similar to norrins modification for the original ups, where you can define a respawn position for group in the script and how many times then can respawn??

this is norrins respawn, for the original UPS:- http://www.armaholic.com/page.php?id=6540

Would this be possible with your version?

Thanks

Share this post


Link to post
Share on other sites

I have the problem that the script creates the track markers (start, destination), but did not use the "TRACK" parameter at all - Calling the script only with [this,"Marker"]....

Made a workaround by writing

_track = "NOTRACK";

at the specific line in upsmon.sqf, what really is dirty.

Next thing is that using spanish in "player sidechat ..." is absolutely inappropriate IMO.

I know spanish is one of the most-spoken languages at all (omg I hope this is not Portuguese instead of Spanish, if so I'm sorry for my ignorance). But there are still more people out there who are NOT speaking spanish and there are still more people out there who can at least understand english.

For me I am neither a native english speaking person, still I try to comment or output information ingame in english to keep it as international as possible.

So please please please please please either cut the "player sideChat 'Spanish stuff'" and replace it with lets say "diag_log 'Spanish stuff'" or use english sentences or use a stringtable.

Last thing: I am deeply impressed by the AI movement and behavior in your work, thanks for it.

Share this post


Link to post
Share on other sites
I have the problem that the script creates the track markers (start, destination), but did not use the "TRACK" parameter at all - Calling the script only with [this,"Marker"]....

Made a workaround by writing

_track = "NOTRACK";

at the specific line in upsmon.sqf, what really is dirty.

Next thing is that using spanish in "player sidechat ..." is absolutely inappropriate IMO.

I know spanish is one of the most-spoken languages at all (omg I hope this is not Portuguese instead of Spanish, if so I'm sorry for my ignorance). But there are still more people out there who are NOT speaking spanish and there are still more people out there who can at least understand english.

For me I am neither a native english speaking person, still I try to comment or output information ingame in english to keep it as international as possible.

So please please please please please either cut the "player sideChat 'Spanish stuff'" and replace it with lets say "diag_log 'Spanish stuff'" or use english sentences or use a stringtable.

Last thing: I am deeply impressed by the AI movement and behavior in your work, thanks for it.

This is because KRON_UPS_Debug = 1.

set the variable KRON_UPS_Debug = 0; in scripts\common\init_UPSMON.

Sorry avout language, u are right, I will try to translate in next revision.

---------- Post added at 01:33 PM ---------- Previous post was at 01:20 PM ----------

Hi there, i was just wondering if there is a respawn version of this available.

i.e similar to norrins modification for the original ups, where you can define a respawn position for group in the script and how many times then can respawn??

this is norrins respawn, for the original UPS:- http://www.armaholic.com/page.php?id=6540

Would this be possible with your version?

Thanks

Yes is posible but u need to change the reference to script of UPS scritp UPS_INIT

changing UPS_INIT for this

//  UPS_init.sqf
// © JULY 2009 - norrin

_unit 	= _this select 0;
_marker	= _this select 1;

[_unit,_marker] execVM "scripts\upsmon.sqf";

if (true) exitWith {};

but I see that is not implemented any parameters of ups. If is util I will implement a parameter of respawn in UPSMON for doing this.

Don't forget to add the reference to INIT_UPSMON in int.sqf

call compile preprocessFileLineNumbers "scripts\Init_UPSMON.sqf";

Edited by Monsada

Share this post


Link to post
Share on other sites
I have the problem that the script creates the track markers (start, destination), but did not use the "TRACK" parameter at all - Calling the script only with [this,"Marker"]....

Made a workaround by writing

_track = "NOTRACK";

at the specific line in upsmon.sqf, what really is dirty.

.

In the INIT script the debug = 1. change that to 0. After taht the track will respond normaly.

And language ya see is for debug only.

EDIT: Ah i see its answered already. Weird i did not ahve that answer when i started typing.

Share this post


Link to post
Share on other sites

Yeah in noticed that the respawn scripts dont utilise the extra UPS parameters. I have informed Norrin of this for his version and he is currently looking into the matter.

If there would be a possibility to add the respawn function to your system, including all the parameters. Then that would be a most welcome addition.

Edited by Shadow.D. ^BOB^

Share this post


Link to post
Share on other sites
In the INIT script the debug = 1. change that to 0. After taht the track will respond normaly.

Ya, thanks to you and Monsada for the hint, was maybe just too lazy to look into the documentation - so typical :p

And language ya see is for debug only.

I consider this project as high quality work, in which even documentation and debugging information should be in a form most people can understand.

Hf. Bon.

Share this post


Link to post
Share on other sites

Thanks for the awesome script :0 I use this one now for my MCC (mission generator ). However i would like some more details on the usage of vehicles.

Under what conditions are vehicles used? I havent seen them do that so i am curious.

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  

×