Jump to content

Photo
- - - - -

Urban Patrol Script


  • Please log in to reply
160 replies to this topic

#1 Kronzky

Kronzky

    (Ex) Moderator

  • Members
  • 872 posts

Posted 06 March 2013 - 09:09 PM

The "Urban Patrol Script" has been ported to A3, and is available on my site: http://kronzky.info/ups

Most of you will probably be familiar with it, but for the newcomers, here's what it does:

It allows you to set up a quick mission in a couple of minutes, without having to worry about waypoints, scripts, or AI behaviour.

All you need to do is place a marker over the area to be patrolled, put some OPFORs in the area, and have them call the patrol script. That's it...

The script will take care of generating random movements, intelligent responses to enemy encounters, and notices when everybody's dead.

It's a very easy and fun way to familiarize yourself with a new map, without having to spend hours making a mission that will only be predictable after a couple of runs.

With this script every run will be totally random. And since you can set it up without even knowing the map too well, you will have a fairly realistic simulation of real-life scenarios, with unfamiliar environment and unpredictable enemy behavior.

Yes, you won't be able to make a "deep", multi-subjective, and inter-dependent "save-the-world" mission with this, but for simulating normal day-to-day patrolling missions, and the unpredictability associated with it, it does the job quite nicely.

Here's a rundown of the main features:
  • Setup Options
    • Patrol any "marker-designated" area with any unit or group, whether it's Infantry, Armored, Cars, Choppers, or even planes, using any side (east, west, resistance, civilians).
    • Several independent marker areas (for different units) can be used on the same map.
    • The start position of the units can be a random position anywhere in the active area - in that case some units may even end up on roofs.
    • You can create a random number of "clones" of a unit/group you placed in the active area.
  • AI Behavior
    • The AI will avoid "dangerous" areas, and react intelligently to attacks. If it sees a team-member being shot, or spots an enemy without themselves being detected, it will not continue on its regular path, but instead use a flanking approach to get to the shooter. The accuracy of the approach will depend on the "knowledge" the AI has about the shooter (i.e. whether the shooter was actually seen or only heard).(image)
    • If AI units get stuck (mostly due to bad pathfinding) they will try to free themselves after a while.
    • Units will make occasional stops of random lengths during their patrols.
    • When independent AI groups meet each other they will share their knowledge about any enemies they might have spotted.
    • By default units patrol in safe mode at limited speed, but they will switch to combat & full for a limited time when they encounter enemies.
  • "Intel" Options
    • An automatic trigger is generated for each area to announce when that section has been cleared of enemies. (image)
    • The units can be tracked via a dynamic marker on the map.

Here's what the paths look like, after a car and an infantry unit have been patrolling a city for about 15 minutes:
Posted Image

#2 Bushlurker

Bushlurker

    CWR² Developer

  • Members
  • 2134 posts

Posted 06 March 2013 - 09:32 PM

Many thanks Kronzky!

THE classic patrol script, back for a new generation :)


B
Posted Image

#3 xx4L0Mxx

xx4L0Mxx

    Newbie

  • Members
  • 1 posts

Posted 06 March 2013 - 10:02 PM

Thanks a lot. I love this script !

#4 Manzilla

Manzilla

    First Lieutenant

  • Members
  • 5142 posts

Posted 06 March 2013 - 10:59 PM

Kronsky, you are my hero. Thank you
:coop: :yay::yay::yay: (God damn bananas..... again)

Join the most rootin', tootin'est crew on these here forums! That's right folks we're darn tootin'.

Mike Tyson's ode to Manzilla's SP playing style:

My style is impetuous. My defense is impregnable and I'm just ferocious.... I want your heart, I want to eat his children! Praise be to Allah!


#5 -ACU-Tech

-ACU-Tech

    Lance Corporal

  • Members
  • 44 posts

Posted 06 March 2013 - 11:03 PM

Awesome! Thanks Kronsky!
=ACU=Tech
=Advanced*Combat*Unit=
TECH Systemes
Config 1 Config 2

#6 Günter Severloh

Günter Severloh

    Major

  • Members
  • 7006 posts

Posted 07 March 2013 - 01:17 AM

Nice Job Kronsky!
Question, did you fix the part of the script where the AI squads would gravitate and end up around the center of the marker?
WarMod Series - A Massive Addon & Mod Customizable Compilation mod for Arma1, Arma2,CO & soon Arma3 IFA3
Mission Repository - Hosting Missions & Files for Iron Front: Liberation 1944
WW2Epic - A Compilation Archive of Photos, Music, Videos, & References of WW2
AI Compilation List of Addons/Mods/Scripts & Misc for Arma3

#7 Mstq

Mstq

    Rookie

  • Members
  • 4 posts

Posted 07 March 2013 - 02:14 AM

Many thanks Kronzky!

THE classic patrol script, back for a new generation :)


B


Yeah, i sense the same ..:)

#8 ebarstad

ebarstad

    Staff Sergeant

  • Members
  • 276 posts

Posted 07 March 2013 - 06:20 AM

This is such a great script, Kronzky! Thanks for updating it.

The only problem I've run into is when I use the "track" parameter. I get an error at the start of the mission that says: "No entry 'bin\config.bin\cfgmarkers.DOT'". I'm not sure if I'm doing something wrong or if it's an UPSMON/Arma 3 issue.

#9 twisted

twisted

    Warrant Officer

  • Members
  • 2680 posts

Posted 07 March 2013 - 10:16 AM

a classic now in arma3! thanks

#10 jelf

jelf

    Private First Class

  • Members
  • 11 posts

Posted 07 March 2013 - 01:02 PM

I have put UPS.sqf in My Documents\ArmA 3 Alpha Other Profiles\[profile name]\missions

But when I have edited the map in editor and click preview, it says the script cannot be found. Also I can't see the demo mission even though I have put mission.sqm in that folder.

This is my first time using this editor. Sorry if this is a noob question. Thanks.

#11 NkEnNy

NkEnNy

    First Sergeant

  • Members
  • 919 posts

Posted 07 March 2013 - 01:27 PM

Legend!

This goes right into my next mission :)

-k
ARMA 2 Mission packs:LITE Coop mission package + LIMA coop mission package (ACE + ACRE) + More ACE + ACRE missions. + Aliabad coop Mission Package+ Fireforce Takistan
ARMA 3 Mission packs:Fourplay Coop Mission Pack OUTDATED
Kill things, break stuff. Repeat as necessary.

#12 Günter Severloh

Günter Severloh

    Major

  • Members
  • 7006 posts

Posted 07 March 2013 - 01:33 PM

@jelf
Script needs to be in the same folder as the mission you edited, also if when the editor creates and Sqm its in the correct folder.
the editor will create a folder with the same name as what you saved your mission as in the editor, inside that folder that the editor creates is the mission.sqm,
you do not want to move that out of that folder, so the UPS script will go into that mission folder, no where else, then you just need to add the code to a
squad leaders init line in the editor, and create a marker area where the squad will patrol.

I dont have the Arma3 Alpha but thats how the editor has worked since the series started so i highly doubt anything has changed in terms of that in Arma3.
If you want to know how to setup the UPS script in the editor, then heres a picture tutorial of the UPS script for previous games, it should be the same for the new script for A3.
http://kronzky.info/ups
also linked in the first post.
WarMod Series - A Massive Addon & Mod Customizable Compilation mod for Arma1, Arma2,CO & soon Arma3 IFA3
Mission Repository - Hosting Missions & Files for Iron Front: Liberation 1944
WW2Epic - A Compilation Archive of Photos, Music, Videos, & References of WW2
AI Compilation List of Addons/Mods/Scripts & Misc for Arma3

#13 BLACKHAWK1090

BLACKHAWK1090

    Private

  • Members
  • 9 posts

Posted 07 March 2013 - 02:21 PM

Much appreciated!
Time to start up a new mission.

#14 Kronzky

Kronzky

    (Ex) Moderator

  • Members
  • 872 posts

Posted 07 March 2013 - 03:02 PM

Script needs to be in the same folder as the mission you edited,
[...]
I dont have the Arma3 Alpha but thats how the editor has worked since the series started

Thanks for explaining the usage, Günter; and yes, it's still the same in A3.
(I've modified the readme a bit now, to hopefully make the requirements more clear.)

#15 Exigo

Exigo

    Private

  • Members
  • 8 posts

Posted 07 March 2013 - 05:18 PM

Thanks Kronzky for this great script.

I have an "issue" that I was wondering if you could clarify for me.

I'm creating a co-op mission for blue side where we are to attack and destroy some buildings held by the east side.
I placed a 2 man patrol at first just to test it out and it worked flawlessly, they where patrolling in a safe condition and speed was walking pace.
But the moment I started placing other east soldiers around the camp the behaviour of the patrol changed. They entered a combat state and their movement tempo increased.

Is there a way to tweak this in the actual script file?

Exi

#16 Kedrowski

Kedrowski

    Private First Class

  • Members
  • 13 posts

Posted 07 March 2013 - 08:06 PM

*Edit* Whoops, never mind, got it working and it is freaking great!
Well... This is awkward...

#17 Anatooli

Anatooli

    Newbie

  • Members
  • 1 posts

Posted 08 March 2013 - 02:41 PM

Thanks Kronzky for this great script.

I have an "issue" that I was wondering if you could clarify for me.

I'm creating a co-op mission for blue side where we are to attack and destroy some buildings held by the east side.
I placed a 2 man patrol at first just to test it out and it worked flawlessly, they where patrolling in a safe condition and speed was walking pace.
But the moment I started placing other east soldiers around the camp the behaviour of the patrol changed. They entered a combat state and their movement tempo increased.

Is there a way to tweak this in the actual script file?

Exi

Had the same problem and the cause seems to be that, according to the main loop of the script, the AI goes into "combat"-behaviour if there is another friendly troop in "aware" or "combat" -behaviour close enough (default 100m). Problem was fixed by ensuring that all units on the same side as the AI are forced to "safe"-behaviour at mission start, for example by using the setBehaviour-command (http://community.bis...ki/setBehaviour).

#18 skkeeper

skkeeper

    Rookie

  • Members
  • 3 posts

Posted 08 March 2013 - 03:18 PM

I just started messing around with the ARMA editor on the Alpha so I might be doing something stupid.

So I downloaded the script and made it work beautifully with footman patrols, my problem now is that I want to do the same with a vehicle.

So I searched a bit and I used a built in function to spawn a vehicle with a crew:
veh = [getMarkerPos "patrol1", 180, "O_Galkin_MG_F", patrol_squad] call bis_fnc_spawnvehicle;
And the vehicle spawns no problem, then I call:
nul = [units (veh select 0), "patrol1", "random"] execVM "ups.sqf";
And the vehicle respawns as expected on a random place in the marker, but the crewman spawns outside and only one of them enters it (the gunman) and the suposed driver stays still where he respawned.

After this I tried to provide the script with the leader of the squad object and after that an array with the crewmen, both approaches giving the same problem.

Can someone point me in the right direction? Thanks for your time and thank you Kronzky for this great script :)

Edited by skkeeper, 08 March 2013 - 03:56 PM.


#19 Seil

Seil

    Private First Class

  • Members
  • 20 posts

Posted 08 March 2013 - 05:54 PM

Not sure what goals / timeline looks like for the UPS script, however performance is verrry bad right now. We just removed this from every mission we were using it on for A3:A due to the performance overhead. Removing the script from the mission will remove about 2/3 of server load for the same mission unchanged in any other way.

I haven't had time to look at the logs at all, and I'm at work now; Just wanted to give you a heads up.

-Seil

#20 Victor87

Victor87

    Private First Class

  • Members
  • 11 posts

Posted 09 March 2013 - 07:15 PM

Maybe Im missing something, but how do i enter debug mode?