Jump to content
Sign in to follow this  
subroc

EBSS - Epic Battlefield System Scripted version

Recommended Posts

Epic Battlefield System Scripted version

Original Author: granQ

Modified for standalone use, and added features by: subroc

Download

http://www.ingaklena.se/tmp/arma2/ebss_RC1.7z

(Included two tech demo missions, one with HAC, one without)

Description:

Works like the BIS ACM module to spawn units around the player but works for any addon. Added support to use with Rydygiers excellent "HETMAN AI Commander" (HAC). EBSS will do the spawning of units. HAC will control the war

Added some additional features to be able to tweak the module behaviour. If used without hac you can place as many modules as you computer can handle, if used with HAC the number of HAC commanders are as many as HAC allows (8).

but you can still add modules not controlled by HAC.

Use:

Place a Function module in the map.

Place a unit from the faction you would like to spawn and a GameLogic in the editor and sync them together, name the GL something like "EBS1".

(If used together with HAC you need to name the units according to HAC naming standards and place the appropiate HAC logics)

Add the following line in the GL init:

0 = this execvm "epic_battle_system\init.sqf"

Parameter(s):

this: the Logic object representing the EBS.

Additional parameters to set via setvariable:

this setvariable ["maxunits", 100];

Max number of units active at the same time by the module. Default=100

this setvariable ["townradius", 500];

Maximal distance to scan for towns to capture. Default=5000

this setvariable ["orbat", 500];

Maximal number of units this module will spawn. Default=9999

this setvariable ["debug", true];

Will generate debug information in sidechat: module name, units alive, max number of spawned units at the same time, number of units left (orbat). Default=false

this setvariable ["minspawndist", 100];

If enemy is with x Meters EBS module will not spawn units. Default=50

this setvariable ["hacenabled", true];

Will enable HAC functionalty for the EBS module (Require leaders and gamelogics named according to HAC standards). Default=false

this setvariable ["hacautoplace", true];

Will place HAC objectives randomly in all locations found within townradius var (Require "hacenabled" variable to be true). Default=false

this setVariable ["planes", false, true];

Will prevent the module from spawning planes, avaliable parameters are:

- planes

- helicopters

- tanks

- apc

- trucks

- infantry

- patrols

Credits:

granQ - For making the original EBS Module

Rydygier - For the excellent HAC script (I can not say this enough)

theOden - For protips and unfuxxing my bad coding

Terms of use:

Any non-profit use is allowed, Check with granQ as he is the original author of the code.

Note:

The HAC demomission is based on HETMAN 1.1 wip4, but EBSS should run fine with any version of HAC

Changlog:

20120729 RC1 - Added HAC support, many of the variables, removed arty units from spawning

Edited by subroc
forgot to write about the function module requirements

Share this post


Link to post
Share on other sites

Wow, great! Must test this right away.

Share this post


Link to post
Share on other sites

Thanks subrok, this was always a promising but somewhat unfinished module! Great you have picked it up.

Share this post


Link to post
Share on other sites

Nice work mate. I remembered testing this with GQ a long time ago!

Share this post


Link to post
Share on other sites

cool !!

WTG add-on for implement THQ-level AI and below.

just hope its not slow my computer to crawl[reading in iNtel wold b laughing, reading such nonsense ;]

Share this post


Link to post
Share on other sites

Hey Subrok,

Playing around with this on Reshman Province map with a ridiculous townradius of 20000 :)

Nice options with being able to disable tanks, planes etc for each module and look forward to trying out the HAC version... need a good hour or two for that.

Dumb question time:yay: it spawns units which then move to a random town within the townradius, do they continue to move to other towns if no enemy is present after a certain amount of time? or is it possible to apply a guard waypoint on top for all units... im just thinking this as i use small amounts of units like ["maxunits", 20]; to save on performance and only 2-4 modules (weak rig)

Im concerned that these units may all end up in empty towns and the script is satisfied and nothing else happens... hope that makes sense :)

I did try using Demonized support script but not sure if its working properly anymore, need to test it properly when i get time.

Share this post


Link to post
Share on other sites

For EBSS own "dumb commanderAI" it sends units to random towns within townradius disregarding if he has sent a group there earlier. Dont have the script at hand right now, but as far as i remember when a group reach a town it will start patrolling in a 500m radius using BIS_fn_taskPatrol function. from what i recall it can be some trouble to control the AI manually once this function is in effect.

I will try some alternative "patrol functions" maybe set a guardtrig in the selected town and give the group a guard wp in that town, that will make them react to threats in other towns aswell.

For the HAC commander it will first send groups to random towns but relocate them according to where threats are. Best way to avoid sending groups to empty town that are not used in mission is to disable the "hacautoplace" var and manually place the HAC objectives in the editor. You can even setpos them around from a own script while game is running

I need to check how EBSS performs with "hacenabled" option. It may very well be that the patrol function also blocks out any commands from HAC.

Share this post


Link to post
Share on other sites
It may very well be that the patrol function also blocks out any commands from HAC.

Shouldn't be such problems there. If I'm not mistaken BIS patrol just adds couple of random waypoints with cycle wp at end, and then exits. HAC, at init part of any "Go" script (movement order execution code) removes all previously assigned to the group waypoints, same should be with WPs added via BIS patrol function.

Share this post


Link to post
Share on other sites

Cheers subroc, no biggie anyway, but I like the sound of a guard trigger, can't have them wondering around missing out on the action.

Good tip on the Hacautoplace, I just had a quick glance at it in the editor and thought I had to position them myself, these scripts combined sounds awesome!

Share this post


Link to post
Share on other sites

Thanks. I'm trying to make some Red Dawn stuff with Project 85 and this is perfect.

Share this post


Link to post
Share on other sites

I've been using this with the A3 version of HAC I maintain with great results, I love the use of diag_fps.

Share this post


Link to post
Share on other sites

great script but is there a way to make it so the units that spawn are a certain type of camo? for instance if i use this on takistan with us army commanders sometimes desert vehicles will spawn and sometimes woodland vehicles will spawn. i want only desert vehicles to spawn. thanks.

Share this post


Link to post
Share on other sites
great script but is there a way to make it so the units that spawn are a certain type of camo? for instance if i use this on takistan with us army commanders sometimes desert vehicles will spawn and sometimes woodland vehicles will spawn. i want only desert vehicles to spawn. thanks.

From a quick look at the code, it only looks for the faction of the synchronized unit, not its particular camo.

So the short answer is no.....

Maybe something like DAC is what you're after.....

Share this post


Link to post
Share on other sites

how would you tell what camo its using? For me faction is the best way?

fun to see people use this, I am not even sure why I made the orginal but guess I just wanted a easy way to get some units on map..

Share this post


Link to post
Share on other sites
From a quick look at the code, it only looks for the faction of the synchronized unit, not its particular camo.

So the short answer is no.....

Maybe something like DAC is what you're after.....

the reason why i like this script is that the enemies start in a specified position and move out to dynamically capture areas which feels more organic to me and similar to project reality for bf2. i dont know a lot about DAC, but i understand it has to do with players going into certain areas and then ai being created. i like this more because the enemy's existence isnt dependent on the presence and observation of the player like quantum mechanics or something. its not confined to zones so you never know what youre going to find or whats going to happen. ive had my base attacked, ive driven to the middle of nowhere and been sniped, ive driven around a corner too fast and had a convoy of 3 technicals in front of me. i can also use it in conjunction with CEP caching to reduce lag whereby i populate the map with clutter and checkpoints and bases but have CEP disabled on the commanding units for EBSS so they continue to carry out their operations. its not perfect, but i appreciate the cross-map movements and general sense of a dynamic front line.

btw do you know off the top of your head how to disable unit spawning when a player is within a certain distance of the commanding unit? or to turn off spawning when a trigger is activated? i remember doing it once a long time ago and it worked, but i lost the mission file.

like lets say i have a wizened takiban warlord living in the mountains in a camp full of men with tents, ammoboxes and what not. if a NATO soldier goes into the camp as long as hes in that area can i stop the takiban from spawning? and lets say the soldier plants a satchel charge on an ammobox "cache" and destroys it thus activating an !alive trigger, can i then make it so they will never spawn there again? thanks again.

Edited by rxnxr23
typo

Share this post


Link to post
Share on other sites

btw do you know off the top of your head how to disable unit spawning when a player is within a certain distance of the commanding unit? or to turn off spawning when a trigger is activated? i remember doing it once a long time ago and it worked, but i lost the mission file.

like lets say i have a wizened takiban warlord living in the mountains in a camp full of men with tents, ammoboxes and what not. if a NATO soldier goes into the camp as long as hes in that area can i stop the takiban from spawning? and lets say the soldier plants a satchel charge on an ammobox "cache" and destroys it thus activating an !alive trigger, can i then make it so they will never spawn there again? thanks again.

My script for A3, Jebus, allows pausing and deleting of spawns based on proximity of enemy units. It's not random like EBSS, however.

I tried to get it working in A2, but some of the functions it relies on have changed. I'm getting back into A2 ATM, so I might try to fix it up if I get a chance over the weekend.

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  

×