Forum Jump :

Author Message


Posts: 165
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 32
In-game name: SPUn

 
#1 Posted at 2013-03-28 12:45        
     
AI Spawn Script Pack
v1.0

New things are finally happening! Head to my new post!

NOTE!
One major change is that all the classnames for AI comes now from LV\config_aissp.hpp.
Therefore you must include this into your missions description.ext:
class aissp_configs
{
	#include "LV\config_aissp.hpp"
};

What?
Script pack that makes it fast and easy to add dynamic AI in your mission. AI group transported with chopper, para group, militarized area, buildings filled with soldiers, and ambient combat! It has also caching functionality and lots of stuff to be customized.

Flash app to setup calling lines:
For version 1.0
For version 0.9

Online documentation:
v1.0
v0.9

Content
At the moment this pack contains 5 main scripts:
  • ambientCombat.sqf
    Spawns random groups and vehicles around player/object and makes them patrol around it. You can define how many groups there is at the same time, how far they spawn, spawning delay, AI skill levels, do AI groups communicate, how far from "defined center" they dissapear, and other stuff.
    Every vehicle is counted as one group, so if 'groups' argument is set to 2, there might spawn only 2 vehicles, eventhough vehicles spawns with 30% probability. Once group is dead or distance between group and center object is more than defined max distance, group will be deleted and new one is created. Groups will spawn equally for all teams.
    AmbientCombat can also be deleted with external script, which has it's own features to offer you different solutions.
  • militarize.sqf
    Fills area with units. You can define the area size, units side, does soldiers or ground vehicles or both spawn, will they stay still or patrol inside area, how much there will spawn units, AI skill levels, and other stuff.
  • fillHouse.sqf
    Fills nearest building, OR all buildings in defined range, with soldiers. You can define side of soldiers, will they patrol or not, how will they patrol (only inside of building or also outside), spawning percentage, area radius, AI skill levels, and other stuff.
  • reinforcementChopper.sqf
    Spawns chopper which transports infantry group where ever you like and leaves after that. You can define side, does chopper land exactly on target or will it find suitable place, how far chopper comes from, from what direction it comes from, will it unload infantry group straight away or will it react against possible threats before that.
    And for infantry group you can choose its target, which can either be a single marker, array of markers (if so, you can set it also to cycle these markers), or unit/object, group size, AI skill levels, and other stuff.
  • heliParadrop.sqf
    Creates snazzy AI paradrop from chopper with various options, for example distance, direction, flyheight, drop distance, parachute open height, target, and many more!
Few patrolling scripts, caching scripts, and 20+ functions which these scripts uses.

1 mission template:
  • randomSectors1.sqf - creates "clear area" type of missions randomly in pre-placed GameLogics/Objects, and has also functionality to create random "defend area" type of mission after area is cleared first (Enemies gets air- and inf-reinforcements). Clear area -tasks uses militarize and fillhouse scripts, and additional Defend area -tasks uses reinforcementChopper and menGroup scripts.
More precise information in documentation.

Download:
AI Spawn Script Pack v1.0
v1.0 @Armaholic

Older:
AI Spawn Script Pack v0.90

I'm not even close to a pro scripter and sometimes my common sense fails big time, therefore there might be very stupid solutions and wrong ways I did stuff, so be gentle with feedback. :P
In my view these scripts are still WIP, but I decided to release them anyways and just hope someone finds them useful.
There's probably still a lot optimization to do, and I cannot guarantee MP compability.
If you have some time, check it out and push me to the right direction! :)

Sloppy video of v0.19:
http://www.youtube.com/watch?v=IqqTnyNQpsE#


RECENT NOTES / ADDITIONAL FIXES (These are only related to version 0.9, so DO NOT use these to overwrite files of version 1.0!)


-If you're having issues with reinforcementChopper (it doesn't land?), replace it with this version: http://kaartomedia.com/ARMA/reinforcementChopper.sqf (tweaked by -=XTRA=-)

-A lot faster and better version of simpleCache can be found here: http://forums.bistudio.com/showthread.php?174488-simpleCachev2-for-AISSP-%28AI-Spawn-Script-Pack%29 (by Na_Palm)

-If you wish to use simpleCache with fillHouse, here's fixed fillHouse for it: http://kaartomedia.com/ARMA/fillHouse.sqf. Info about this issue: BIS Forums.

This post was edited by spunFIN (2017-03-25 06:48, 183 days ago)

Need Flash apps or games? Or video related stuff? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 20236
Rank:


Level: Super Admin

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

 
#2 Posted at 2013-03-28 23:12        
     
Thanks for posting the release here :-)
News is on the frontpage and you can find our mirror here:



Visit my family webshop desteigerhoutshop.nl.

Advertisement


Author Message


Posts: 6
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2013-03-29 12:37        
     
Thanks a lot for something like this, there is nothing else out there like this, that I can find anyway
I pretty useless at scripting but I am learning slowly but surely

You have helped me a lot in seeing how spawning scripts work, my PC is not top of the range so I don't want enemy all over the map when I am not there

Again THANKS

Added 16 seconds later:

Thanks a lot for something like this, there is nothing else out there like this, that I can find anyway
I pretty useless at scripting but I am learning slowly but surely

You have helped me a lot in seeing how spawning scripts work, my PC is not top of the range so I don't want enemy all over the map when I am not there

Again THANKS


Author Message


Posts: 156
Rank:


Level: Member

Country: us
Location: NY
Occupation:
Age:
In-game name: A Hamburgler

 
#4 Posted at 2013-03-29 15:03        
     
Great scripts. I love makeing dynamic missions and the ACM will help out a lot. thanks


Author Message


Posts: 165
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 32
In-game name: SPUn

 
#5 Posted at 2013-03-29 15:51        
     
Thank you Foxhound! o7
And others too, good that you found these useful. I'll try to bring some new content to this pack in next few days and fix possible problems. I'm also open for suggestions! :)

Need Flash apps or games? Or video related stuff? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 2
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name: Gambit =(JSD)=

 
#6 Posted at 2013-03-29 19:14        
     
Hey SpunFIN,

The pack looks great! However i am experiencing some odd stuff happening when i try to implement this. It could be that I am using the dev build of the alpha or that i'm doing it wrong.

The AI is invincible when I use this script to militarize areas. I am not sure why the script wont reach the end where it applies allowdamage again. I have made no edits to the script at all and maybe you have noticed this as well?

I do love the pack though! Provides many options for mission creation, especially with limited content to use.

Units spawned with vehicles are killable though, just the infantry groups remain invincible. I also experience lag similar to what i see in loops that are stuck.

This post was edited by Gambit (2013-03-29 19:29, ago)


Author Message


Posts: 165
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 32
In-game name: SPUn

 
#7 Posted at 2013-03-29 19:55        
     
Hi Gambit,

I myself haven't experienced that invincible bug, but I've had couple of reports now about it, so it must be a real problem.
I'll try to figure out tonight why it happens to some people, and also trace that lag issue. It is really probable that some loop is stuck somewhere. Have you any clue if that lag occures only with militarize script or might it be some other one?

I just got also reported about fillHouse related bug, seems like in some high buildings the highest building positions makes soldiers swim somehow, gotta check out that also.

Thank you for the feedback!

Added 4 hours 3 minutes later:

I think I found and fixed that loop & lag issue in militarize.sqf, so I updated my first post with new version (0.23).
Can't be sure, but I hope that allowDamage issue was also consequence of that loop problem. At least it didn't occur to me during 2 hour testings.

Didn't see that fillHouses' swimming bug anywhere, so it is still open..

AI might still react pretty slow, but I'm working on it.

Also noticed that AI sucks so much that it's better to use militarize.sqf without vehicles. Biggest reasons are that AI still can't drive over bridges, or even dodge stones and stuff, so it will inevitably get stuck. :/

This post was edited by spunFIN (2013-03-29 23:59, ago)

Need Flash apps or games? Or video related stuff? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 2
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name: Gambit =(JSD)=

 
#8 Posted at 2013-03-30 05:06        
     
Ill keep helping you troubleshoot as much as I can with this pack if you want. I also do a lot of scripting so I am not totally lost with this stuff. I will grab the latest update and give it a shot!

I was also curious why you don't use the built in functions for spawning groups and setting patrols. It would probably clean up your scripts a bunch and save you the hassle with arrays.


Author Message


Posts: 165
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 32
In-game name: SPUn

 
#9 Posted at 2013-03-30 07:30        
     
# Gambit : Ill keep helping you troubleshoot as much as I can with this pack if you want. I also do a lot of scripting so I am not totally lost with this stuff. I will grab the latest update and give it a shot!

I was also curious why you don't use the built in functions for spawning groups and setting patrols. It would probably clean up your scripts a bunch and save you the hassle with arrays.
Thanks, that would be awesome!

Good question.
BIS_fnc_spawnCrew and BIS_fnc_spawnVehicle works like a charm but I'm having extremely hard time to get BIS_fnc_spawnGroup to work. I've used it a lot in Arma2 but here it just doesn't work for me, and can't see what am I doing wrong with it.. It gives no errors on .rpt but it also spawns nothing. Any idea if there's some common bugs with A3a or syntax changes?
For example if I use it in militarize like:
_grp = [_centerPos, WEST, _menAmount] call BIS_fnc_spawnGroup;
and setpos player to the position of leader _grp, I'll end up alone to south-west corner of map.

And in ambientCombat I guess it's impossible to use spawnCrew or spawnVehicle if I want both teams to have KA60 and AH9 with correct unifoms?

Somehow I've forgotten BIS_fnc_taskPatrol, maybe I'll have to try that today.

Added 22 minutes later:

Btw, if you like to give direct suggestions or advices, you can find me:
*IRC: SPUN @quakenet
*Steam: fdsspun
*XFire: spunnnn

This post was edited by spunFIN (2013-03-30 08:06, ago)

Need Flash apps or games? Or video related stuff? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 20236
Rank:


Level: Super Admin

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

 
#10 Posted at 2013-03-30 10:41        
     
Updated version is on the frontpage and you can find our updated mirror here:



Visit my family webshop desteigerhoutshop.nl.

Author Message


Posts: 156
Rank:


Level: Member

Country: us
Location: NY
Occupation:
Age:
In-game name: A Hamburgler

 
#11 Posted at 2013-03-30 17:11        
     
I have an idea you should add somthing to stop the spawning of the ACM script. Ex: If you enter the trigger area units will stop spawning. Or add something like in Arma 2 ACM if you put a marker with a certain name it will stop units from spawning in that area and make sure there waypoint dont go into that area.


Author Message


Posts: 165
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 32
In-game name: SPUn

 
#12 Posted at 2013-03-31 14:38        
     
With trigger you can easily control it:

Add to trigger's ON ACT -field for example:
war = [this] execVM "ambientCombat.sqf";
and then it will start when trigger meets its conditions. This way if you use variable (like 'war' here) instead of nul, you can shut down the script with another trigger by typing to its ON ACT -field:
terminate war;
Remember you need to group triggers to player, not synchronize.
Seems like my cleanup function creates some lag, and it stays on atm after you terminate the ambientcombat, I'll fix it soon.

Edit: Current version (0.3) has separated function for terminating ambientCombat properly, so you should use that. Further information in documentation.

This post was edited by spunFIN (2013-04-07 16:35, ago)

Need Flash apps or games? Or video related stuff? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 155
Rank:


Level: Member

Country: uk
Location: Birmingham, United Kingdom
Occupation:
Age:
In-game name: Haz

 
#13 Posted at 2013-04-01 17:36        
     
Is there anyway I can call the following code (see below) via a trigger ?
nul = [this, 2, 250, false, true, false, 0, 0.02] execVM "militarize.sqf";

Haz

Haz

Author Message


Posts: 165
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 32
In-game name: SPUn

 
#14 Posted at 2013-04-01 18:44        
     
# dirtyhaz : Is there anyway I can call the following code (see below) via a trigger ?
nul = [this, 2, 250, false, true, false, 0, 0.02] execVM "militarize.sqf";

Haz
Yes, basicly you just call that line from trigger, but instead of "this" you put there for example Game Logics' name and position that Game Logic wherever you like:
nul = [mygamelogic01, 2, 250, false, true, false, 0, 0.02] execVM "militarize.sqf";

Need Flash apps or games? Or video related stuff? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia

Author Message


Posts: 165
Rank:


Level: Member

Country: fi
Location:
Occupation:
Age: 32
In-game name: SPUn

 
#15 Posted at 2013-04-07 16:31        
     
Updated first post to version 0.30 along with few new files, a lot of fixes and better documentation which you can also find online: instructions.

Changelog
    v0.30 (7.4.13):
  • new main script; reinforcementKA60.sqf
  • added function to remove ambientCombat properly
  • added better patrol function for ambientCombat
  • lots of bug fixes, optimizations and lag reduced
  • added new parameters to every main script

Need Flash apps or games? Or video related stuff? I'll make 'em; http://kaartomedia.com/ || https://www.facebook.com/kaartomedia