Forum Jump :

Author Message


Posts: 104
Rank:


Level: Member

Country: uk
Location: Scotland
Occupation: Musician
Age: 28
In-game name: zorilya

 
#1 Posted at 2012-08-17 10:46        
     
Here is my Garrison script project. It allows you to task a group with garrisoning a building, where they will stay quite well underfire but will engage if not pushed on.

You define the unit it is used on and the radius within which he will search for buildings. This building list is then chosen from randomly for garrisoning, adding a much needed random element to the placement of units in urban environments.

I use it to make towns a little more lethal. having to check every window and door before clearing out a building adds a real edge to urban and cqb gameplay.
I hope you enjoy it as much as i do

Full readme is enclosed in the file.

There are also detailed videos on the features of the script at my youtube

http://www.youtube.com/zorilya

Works with all maps as long as buildings have path LODs.

Here is a video of it in action:

how to use video
also see 1.6 video for newer feature explanations and for details on older feature check out the channel on youtube.

v1.6 and other script stuff
skip to 7 mins for garrison script updates

v1.7 and other script stuff

v1.7 Vanilla and new CQC_AI

to install copy the sqf files and folders (both the Garrison and CQC_AI) into your mission folder and run with this template
the brackets denote optional variables.
nul = [unit,radius,stationary?(,[occupy percentage,maximum],warping?,allUseCQC_AI?)] execVM "Garrison_script.sqf"

where 'unit' is the leader of the group your using it on, 'radius' is the radius of the circle within which they will look for buildings and 'stationary' is true or false. you must change these, this is a template!

so an example would be :
nul = [this,100,true,[60,4],false,true] execVM "Garrison_script.sqf"

More info on what each script does

ChangeLog v1.7.1

ADDED : extra parameter to control if CQC_AI is applied to all units or just Garrisoned Units (see template);
FIXED : Stupid doStop removed that was making units unable to complete waypoints if using CQC_AI;

ChangeLog v1.7

ADDED : TOO MANY THINGS TO COUNT. many different functions to improve moving, reacting, and patroling.
ADDED : whole new CQC_AI; // Many thanks to TPW for the ideas for LOS checks
ADDED : ability for the use of waypoints to Garrison and unGarrison buildings (using above mentioned method);
FIXED : 3 major while loops that would under certain circumstances loop indefinately.
IMPROVED : performance through numerous reworks of functions.

Changelog v1.6

Added : new optional Variables (capacity limit and warping) for more customised use of the script.
index 3 accepts an array for capacity with two number enries [percentage,maximum].

percentage is the percentage of positions to fill of buildings encountered rounded up.
maximum is the maximum number of units to enter any building. 0 sets no limit.

default : [60,0]

index 4 accepts a boolean to control whether or not the units will walk into position.
if true they just teleport or 'warp' handy for a tidy mission start or dealing with that awkward pathing problem.

default : false

Added : new AI check to help AI recognise a door as a possible entry point for enemies.
Changed : silenced check for arma 3 so it now works as intended.
Fixed : patrol script error where units would just stop if nothing was around.


Changelog v1.5.2

Fixed : Silly typo causing the roaming function to have further problems

Changelog v1.5.1
hotfix

Fixed : sorted roaming problem caused by unstable variable. roaming now works as intended.
Changed : Tweaked the willwalk.sqf to improve roaming.

Changelog v1.5

Added : cqc reaction funtions. Units are now more aware of enemies when they fire round close by and look in a logical direction.
Added : garrisoned units can now move inside buildings, improving randomness of the environment.

Changed : 4 man limit to patrol groups then next group is made and so on.
Changed : many other little optimisations.

Changelog v1.4

Added : indoors check to control behaviour i.e. crouching on roofs and balconys (works better than the old top third check);
Added : check for watch towers (and other buiildings) to avoid 3 units garrisoning the one tower (who makes a one man watch tower with 3 positions? who does that?)
Added : vision obscured check to stop units looking in useless directions.

Changed : increased time that script waits for a patrol group before exiting to 4 minutes to handle yet more pathfinding issues.


Known issues

just pathinding issues.

AI are still AI and will occasionally be retarded, but what can be done :)

downloads :

Arma 3 version
https://rapidshare.com/files/2202730719/zorilyas%20Garrison_script%20v1.7.1%20Arma3.rar

Arma 2 version (not updated to 1.7 yet due to massive changes that need to be made in the code)
http://rapidshare.com/files/1918178644/Garrison_script%20v1.6%20for%20arma%202.rar

enjoy!

This post was edited by zorilya (2013-09-09 20:24, ago)


Author Message


Posts: 111
Rank:


Level: Member

Country: uk
Location: Suffolk
Occupation: Service Desk Team leader
Age: 56
In-game name: ninja_prime

 
#2 Posted at 2012-08-17 18:02        
     
File not found when I clicked on the URL????


Advertisement


Author Message


Posts: 104
Rank:


Level: Member

Country: uk
Location: Scotland
Occupation: Musician
Age: 28
In-game name: zorilya

 
#3 Posted at 2012-08-17 20:32        
     
# Ninja_Prime : File not found when I clicked on the URL????

should be sorted now thanks :)


Author Message


Posts: 111
Rank:


Level: Member

Country: uk
Location: Suffolk
Occupation: Service Desk Team leader
Age: 56
In-game name: ninja_prime

 
#4 Posted at 2012-08-18 07:16        
     
Cheers, now downloaded, will play around with it.


Author Message


Posts: 104
Rank:


Level: Member

Country: uk
Location: Scotland
Occupation: Musician
Age: 28
In-game name: zorilya

 
#5 Posted at 2012-09-20 13:19        
     
Updated to v1.1 see first post.


Author Message

SavageCDN  

Armaholics priest


Posts: 475
Rank:


Country: ca
Location: Ottawa
Occupation: Fighting with Exchange
Age: 44
In-game name: =VG= SavageCDN

 
#6 Posted at 2012-09-20 16:03        
     
look interesting will check it out.. I've used one like it before..

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

Is this for single units only or does it work for groups as well?

Bless you my son.

Author Message


Posts: 104
Rank:


Level: Member

Country: uk
Location: Scotland
Occupation: Musician
Age: 28
In-game name: zorilya

 
#7 Posted at 2012-09-20 18:15        
     
it's all in the read me, but you execute it on the leader of a group and it orders all in the group to move into a random building within a user defined area. also this script differes from the one you posted as it doesn't "place" units it orders them to move from their position. This makes it usable in waypoints and looks better because guys arent just teleporting. I realise that teleporting units have their place though.


Author Message


Posts: 20277
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#8 Posted at 2012-09-20 19:56        
     
The downloadlink is not working, can you upload somewhere else maybe?
It is time this is added to our database I would say, no idea why we never added version 1.0 as I cant find it :-[

Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 111
Rank:


Level: Member

Country: uk
Location: Suffolk
Occupation: Service Desk Team leader
Age: 56
In-game name: ninja_prime

 
#9 Posted at 2012-09-20 20:08        
     
Ditto, unable to get to URL :(
BTW I have used this on several maps I did and it works a treat, love the fact that enemy AI will hide in houses and shot through the windows, nice script I love it..
I would recommendnd this if you want a mission where you have to clear a town full of insurgents, keeps you on your toes. The also snipe from rooftops if they can get there. One thing tho, all the doors are open on the houses, any chance they could be closed?


Author Message


Posts: 104
Rank:


Level: Member

Country: uk
Location: Scotland
Occupation: Musician
Age: 28
In-game name: zorilya

 
#10 Posted at 2012-09-20 22:30        
     
i've update and tested it again... all seems well although i have had a few issues with rapidshare :(

as for the doors... i use a snippet by rommel to get this done... here

0 = [getpos this,300] spawn {
sleep 1;
{
private "_b";
_b = _x;
for "_i" from 0 to 7 do {
_b animate ["dvere" + str _i,1]
};
} foreach ((_this select 0) nearobjects (_this select 1))
}
]

(this will close doors you never knew existed hehe)

thought about putting this into the garrison script but i thought it might be a givaway if there is only closed doors on the houses with them inside so i just put a game logic down with this in the init and set the second variable to the desired radius (usually 5000 just to make sure) :)

also thankyou for the kind words and i encourage you to try out the stationary option to make things a little more close and personal as it actually works now hehe.

This post was edited by zorilya (2012-09-21 02:03, ago)


Author Message


Posts: 20277
Rank:


Level: Super Admin

Country: nl
Location: The Netherlands
Occupation:
Age: 41
In-game name: Foxhound

 
#11 Posted at 2012-09-21 08:13        
     
Yes, I was able to grab the file this morning :-)
I wrote some news about your script on the frontpage and you can find our mirror here:



Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 104
Rank:


Level: Member

Country: uk
Location: Scotland
Occupation: Musician
Age: 28
In-game name: zorilya

 
#12 Posted at 2012-09-21 09:23        
     
# Foxhound : Yes, I was able to grab the file this morning :-)
I wrote some news about your script on the frontpage and you can find our mirror here:



much appreciated thanks :)

This post was edited by zorilya (2012-10-14 12:17, ago)


Author Message

SavageCDN  

Armaholics priest


Posts: 475
Rank:


Country: ca
Location: Ottawa
Occupation: Fighting with Exchange
Age: 44
In-game name: =VG= SavageCDN

 
#13 Posted at 2012-09-21 13:10        
     
# zorilya : it's all in the read me, but you execute it on the leader of a group and it orders all in the group to move into a random building within a user defined area. also this script differes from the one you posted as it doesn't "place" units it orders them to move from their position. This makes it usable in waypoints and looks better because guys arent just teleporting. I realise that teleporting units have their place though.

Awesome can't wait to try this out then!!

Bless you my son.

Author Message


Posts: 52
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: Kyle_K_ski

 
#14 Posted at 2012-09-21 15:06        
     
Could anyone be so kind as to write up their experiences with this script versus what was experienced using GroupLink 4's Defend module? I use GL4 along with ZeusAI, and the results are usually pretty phenomenal.

The GL4+ZeusAI combination results in...
...AI randomly selecting buildings
...staying there for a while, with a portion moving on their own to garrison another building (patrolling buildings)
...sometimes the AI will close doors. I've entered apartment buildings where most of the doors are still closed, yet contained some unwelcome surprises. Apartments whose doors were left open aren't always occupied, while apartments with doors closed are sometimes occupied - talk about a nightmare! I'm assuming that the AI is opening/closing doors semi-randomly, as they patrol a structure that they're occupying.

Another good thing about using this combination, is how easy and quick it is to use. Simply drop the "Defend" module onto a map (before any units are placed) and then sync them to a group's leader. That's it. So far, it has worked on every island except for those with buildings that aren't configured to be recognized as buildings by the AI (the great island Namalsk suffers from this).

It's only drawback is that the AI sometimes seem to lose situational awareness - that is, they stop looking around, so it's not too hard to get the drop on them when entering a room.

How well does this garrison script do in comparison to what I've posted here?

Zorilya, do you think it's possible to setup what you're trying to do here inside a module? That will speed up its usability in the Editor.

The two largest tank producers in Hitler's Germany were Opel, a wholly owned subsidiary of General Motors (controlled by the J.P. Morgan firm), and the Ford A. G. subsidiary of the Ford Motor Company of Detroit.

~From Antony Sutton's magnum opus Wall Street and the Rise of Hitler

Author Message


Posts: 104
Rank:


Level: Member

Country: uk
Location: Scotland
Occupation: Musician
Age: 28
In-game name: zorilya

 
#15 Posted at 2012-09-21 17:27        
     
Zorilya, do you think it's possible to setup what you're trying to do here inside a module? That will speed up its usability in the Editor.

I'll need to do a little research in that regard as i've not made a module before but i wouldn't imagine it to be too hard at all considering the variables the script requires... only thing is, at the moment you can set individually how far groups look for buildings to garrison. I would imagine it would be hard to keep the flexibility whilst condensing it into a module. but still i'll look into it and i welcome anyone who perhaps knows a little more about that to message me with a few pointers :).

with regards to comparison to G4L...

I currently do not have a way for them to close doors although i think it would be done fairly easily. I use the above snippet to close doors in an area so i might just chuck that in there (with credit to rommel) and impliment a random closing door script so as not to make it too obvious where to look.

I have been toying with a random look script so that units might look about a bit. right now they track units as per vanilla but i have been using TPW AI_los to add to the lethality (is that a word?) of the CQC encounters.

As for the awareness... The random stationary option allows a few guys to leave 'Home' and go hunting so your often flanked whilst having your eyes on the 'big building that has lots of guys in it'. they are a sharp as i've seen them be in arma indoors and with the TPW AI los you just get a little added bite.

This is really just an on the fly garrison function at the moment and in that regard perhaps would be the perfect AI compliment to the G4L. garrison for defenders and G4L to patrol the area for attackers. hmmmm.... ideas hehe

Added 34 minutes later:

# zorilya : I'll need to do a little research in that regard

scratch that... anyone got any links to info on how to make a module?? can't seem to find anything that isn't 'here's how to use a module' :(

This post was edited by zorilya (2012-09-21 20:59, ago)