Air raid - bombing and siren

Fantastic, thanks babe. And yes, working great with BE so far. :)
The animated AI script? Same BE filters as you mentioned before? Just want to update the OP for everyone!
I'm going to pop by your server sometime soon to check it out, and anyone else who's running this script!
 
The animated AI script? Same BE filters as you mentioned before? Just want to update the OP for everyone!
I'm going to pop by your server sometime soon to check it out, and anyone else who's running this script!

Animated AI script: Same filters I mentioned, also using the scripts.txt from BluePhoenix175's Admin Panel- though I haven't set up the AI squad drops yet (would like to soon).
 
Animated AI script: Same filters I mentioned, also using the scripts.txt from BluePhoenix175's Admin Panel- though I haven't set up the AI squad drops yet (would like to soon).
Awesome! I'll say it works for both, and if someone says otherwise we'll know it's something in the admin panel!

I'll eventually figure out what I'm doing for AI calls, and get a link to the proper tutorial for the AI I am using. If not, I'll install Sarges AI since mine are kinda dumb - and then get that set up to work in my code. Then I can make that AI part easy to follow/change for people who have never scripted.

@Everyone!
I'm just wrapping up working on something big, (with the help of Kind-Sir, Sarge, and Saethkept!!) and it will be ready for release very soon!! (in testing now). You know, I've always hated the way loot and zeds spawn in dayz....

Add me on steam if you want to alphatest! (mmmyum)

EDIT:

AI stuff:
Basically, this post is what I'm using to call my AIs. I've mangled some of the code for my server, but I just tested, and this code will work if you want to spawn AIs after a bombing.
http://opendayz.net/threads/dayz-npc-ai-units-troops-add-to-server.8002/
Just install it like he outlines - change the call to add_unit_server to your needs from my example. Done!
 
Thanks for this code and keep up the great work.

Where would i find the timer to change the frequency of the bombing ? I would like it to happen every 30 mins.

I have noticed this in my log also.

17:44:15 "RANDOM WORLDSPACE: Initializing defaults... BalottaAirstrip | 4829.99 2450.11 1.5|"
17:44:15 "CLEANUP: INITIALIZING CLEANUP SCRIPT"
17:44:25 "RANDOM WORLDSPACE: Myshkino | [2019.25,7327.72,1.5]"
17:44:26 "RANDOM WORLDSPACE SELECTED: 25 | City: Myshkino | Coords: 2019.25 7327.72 |||Try 30"
17:44:26 "AIRRAID: SEL: [2019.25,7327.72,1.5] | TARGET: [2019.25,7327.72,1.5] | SHOULD MATCH APPROX"
17:44:29 "AIRRAID: BOMBER: MV-22 | Lift Off at [6993.7,173.053,300] | with Backup WP [7492.67,15263]"
17:44:29 "AIRRAID: BOMBER: MV-22 | TYPE: MV22 |"
17:44:29 "AIRRAID: BOMBER: MV-22 started flying from [6993.7,173.053,300] to [2124.35,7348.54] NOW!(TIME:4|)"
17:44:29 Unrecognized CfgVehicles simulation in bin\config.bin/CfgVehicles/MV22/
17:44:29 Cannot create entity with abstract type MV22 (scope = private?)
17:44:29 Cannot create non-ai vehicle MV22,
17:44:29 "AIRRAID: BOMBER: LANDINGZONE: [2124.35,7348.54,0] | BOMBER POS: [0,0,0] | POS LAND: [2124.35,7348.54]"
 
Thanks for this code and keep up the great work.

Where would i find the timer to change the frequency of the bombing ? I would like it to happen every 30 mins.

I have noticed this in my log also.
1)
_break is the number of seconds between attack attempts - it's set to 300 seconds right now (5 min wait).
------------------------note that this is only the time between cycles, it takes time for the bomber to reach position

2)
It looks like your bomber is being deleted - it can't find MV22 - are you running rMod? _rmodyn is set to true, I think - so it's trying to spawn rmod helis which are banned in dayz.
----------------------it's either this, or this line isn't working - did you make sure this is in your server_cleanup.fsm - it should be if you're using animated heli crashes (or sarges AI i think...)

You need to edit your system/server_cleanup.fsm inside your dayz_server.pbo, open it and search for:
//Check for hackers
2 Lines under it is a line starting with if(vehicle _x != ... exchange the complete line with:
Code:
" if(vehicle _x != _x && !(vehicle _x in _safety) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Sarge"",0] != 1)) then {" \n
If you dont do this, all AI-Choppers will insta killed over theire startpoint after they spawned in
 
Thanks for the speedy reply.

No i am not using rMod. So i need to set the rmodyn value to false ?

(What a doosh. I found the value and set it to false)

Thanks
 
A few suggestions for further growth:

Lurk Triggering:
If a player is in within x metres of a predefined location for more than y minutes it triggers a strike.
You could triggers in places people lurk - like sniper hill in electro - and set the timer for long enough for a spawnkilling scumbag to get settled in. I'd personally love to see a strike come in and watch 3-4 campers running like hell off that hill.
Would be good to set the sirens to sound in the nearest town of course, so I guess you'd need to have two locations defined for each trigger (siren & strike).

Less Tick:
Make the ordinance arrive in clumps and more randomly. Right now it's kind of like a ticking clock: whisle/boom/whistle/boom Might even be nice to choose how many crews are actually firing, so crews = 5 means 5 sources with a random delay between firing for each crew/shot (if that even makes sense!).

Chemical attack:
The ordinance isn't HE, it's green smoke. The green smoke spawns x zombies. These zombies are annoyed.

Zombie Aggro:
The air raid sirens attract zombies in the same way firing guns does.

As you can probably tell, I don't do much scripting myself - I'm not even sure it's possible to spawn zombies outside of the normal loop.

EDIT: Oh yes, It'd be nice to be able to switch off the heli/ai & also have a seperate config file to keep things tidy. I'm rambling. I'll shut up :D
 
A few suggestions for further growth:

Lurk Triggering:
If a player is in within x metres of a predefined location for more than y minutes it triggers a strike.
You could triggers in places people lurk - like sniper hill in electro - and set the timer for long enough for a spawnkilling scumbag to get settled in. I'd personally love to see a strike come in and watch 3-4 campers running like hell off that hill.
Would be good to set the sirens to sound in the nearest town of course, so I guess you'd need to have two locations defined for each trigger (siren & strike).

Less Tick:
Make the ordinance arrive in clumps and more randomly. Right now it's kind of like a ticking clock: whisle/boom/whistle/boom Might even be nice to choose how many crews are actually firing, so crews = 5 means 5 sources with a random delay between firing for each crew/shot (if that even makes sense!).

Chemical attack:
The ordinance isn't HE, it's green smoke. The green smoke spawns x zombies. These zombies are annoyed.

Zombie Aggro:
The air raid sirens attract zombies in the same way firing guns does.

As you can probably tell, I don't do much scripting myself - I'm not even sure it's possible to spawn zombies outside of the normal loop.

EDIT: Oh yes, It'd be nice to be able to switch off the heli/ai & also have a seperate config file to keep things tidy. I'm rambling. I'll shut up :D
Great ideas dude. Some of these are pretty ambitious, some quite doable.

Config file isn't going to happen (why one extra file?) but I will clean up the options and try to make it so there's only one or two places to change.

Lurk triggering is interesting and could be quite fun - I'm looking at making it strike more near where players are. Could set up a trigger in mission.sqm that runs an airraid on that location after x seconds, would be easy - for things like sniper hill.

Bomb timing - you're right, I want it to go more randomly - and possibly with two going off virtually simultaneously. I may just end up running the bombing loop twice at the same time. We'll see - also going to implement random choice of type of bomb, so you might get some bigger explosions as well. Not sure what you mean about crews, but we could have multiple helis come in at the same time.

Chemical attack - easy to do green smoke but

Zed stuff - this is where it gets really tricky. I've been working on a big project and basically rewritten zed spawning mechanics and starting to mess with their AI detection and speed. Running into some speed bumps about their detection and speed - but basically if you want to mess with zed mechanics you have to override multiple files in your mission init - it's a lot of work, much more than this airraid script, and more than the novice is willing to do I think. That, and AI code is a bitch (I hate fsm files.)

Lastly - what do you mean by switch off the heli? Like in game? Or do you mean the AI spawns after - (those are surrounded by an if statement, only spawn in when _repeat > 25 in my code).

Tutorial for my new stuff coming soon - I'm testing further (I made a lot of changes, have to isolate some performance issues). After I put up the new tutorial I'll come back to this and rewrite some stuff and give you guys and airraid update.
 
Hey guys, love the sound of having this mod on my server, but I can't seem to get it working. I keep getting this error in my RPT log:
Code:
21:56:13 Error in expression <,2758.7144,5304.3457]};
};
_city = _loc select 0;
_z = _loc select 1;
_xx = _loc>
21:56:13  Error position: <select 0;
_z = _loc select 1;
_xx = _loc>
21:56:13  Error select: Type Bool, expected Array,Config entry
21:56:13 File z\addons\dayz_server\compile\server_airRaid.sqf, line 56

I would post my file here, but I don't know how to link it in with my post. (newby here. :p)
 
Hey guys, love the sound of having this mod on my server, but I can't seem to get it working. I keep getting this error in my RPT log:
Code:
21:56:13 Error in expression <,2758.7144,5304.3457]};
};
_city = _loc select 0;
_z = _loc select 1;
_xx = _loc>
21:56:13  Error position: <select 0;
_z = _loc select 1;
_xx = _loc>
21:56:13  Error select: Type Bool, expected Array,Config entry
21:56:13 File z\addons\dayz_server\compile\server_airRaid.sqf, line 56

I would post my file here, but I don't know how to link it in with my post. (newby here. :p)
http://pastebin.com/

paste your server_airRaid.sqf on pastebin and give us the link.

You've made a syntax error I think - it's looking for _xx select 2 in {["Zelenogorsk",1.5,2758.7144,5304.3457]}; but coming up empty - did you remember the z value 1.5?

Here's an exerpt from mine:
Code:
case 42: {["Solnichny",1.5,13454.279,6233.647]};
case 43: {["Soosnovka",1.5,2528.7561,6354.9839]};
case 44: {["Staroye",1.5,10140.659,5434.4302]};
case 45: {["StarySobor",1.5,6143.6167,7721.5176]};
case 46: {["Tulga",1.5,12803.296,4450.7466]};
case 47: {["Vybor",1.5,3815.0635,8865.0938]};
case 48: {["Vyshnoye",1.5,6590.3159,6029.1128]};
case 49: {["Zelenogorsk",1.5,2758.7144,5304.3457]};
};
_city = _loc select 0;
_z = _loc select 1;
_xx = _loc select 2;
_y = _loc select 3;
_coords = [_xx,_y,_z]; ////////////////////////////////////////////////does this need spaces?
diag_log format ["RANDOM WORLDSPACE: %1 | %2",_city,_coords];
sleep 1;
 
Great ideas dude. Some of these are pretty ambitious, some quite doable.

Config file isn't going to happen (why one extra file?) but I will clean up the options and try to make it so there's only one or two places to change.

Sounds good :D

Lurk triggering is interesting and could be quite fun - I'm looking at making it strike more near where players are. Could set up a trigger in mission.sqm that runs an airraid on that location after x seconds, would be easy - for things like sniper hill.

Awesome! I think this would be the thing that makes me install it on my server tbh - as a mechanic to discourage camping somewhat. I'm not dead against camping, but it'd be good to shake those that do up a little from time to time.

Bomb timing - you're right, I want it to go more randomly - and possibly with two going off virtually simultaneously. I may just end up running the bombing loop twice at the same time. We'll see - also going to implement random choice of type of bomb, so you might get some bigger explosions as well. Not sure what you mean about crews, but we could have multiple helis come in at the same time.

Is it possible to vary the delay timer between bomb drops so they aren't that same and then run several "instances" of bombing at the same time? I guess you could even precalculate the delays beforehand if that helps somehow.

Instance 1 (--- represents random time between explosions)
whitleboom-----------whistleboom--whistleboom-------whistleboom-----------------whistleboom

Instance 2
whitleboom------whistleboom----------whistleboom---whistleboom---------whistleboom

etc.

Chemical attack - easy to do green smoke but

Zed stuff - this is where it gets really tricky. I've been working on a big project and basically rewritten zed spawning mechanics and starting to mess with their AI detection and speed. Running into some speed bumps about their detection and speed - but basically if you want to mess with zed mechanics you have to override multiple files in your mission init - it's a lot of work, much more than this airraid script, and more than the novice is willing to do I think. That, and AI code is a bitch (I hate fsm files.)

Actually green smoke might be funny as an option anyway - if they get dropped within a few metres of a camper.

Lastly - what do you mean by switch off the heli? Like in game? Or do you mean the AI spawns after - (those are surrounded by an if statement, only spawn in when _repeat > 25 in my code).

Tutorial for my new stuff coming soon - I'm testing further (I made a lot of changes, have to isolate some performance issues). After I put up the new tutorial I'll come back to this and rewrite some stuff and give you guys and airraid update.

I mean config options in the script like so:

-heli-aidrop-enable=false; //disable the dropping of troops
_heli-enable = false; // disable the AI helicopter altogether and just have an air raid siren followed by incoming ordenance

Just to make things a little different if people want.
 
Sounds good :D

I mean config options in the script like so:

-heli-aidrop-enable=false; //disable the dropping of troops
_heli-enable = false; // disable the AI helicopter altogether and just have an air raid siren followed by incoming ordenance

Just to make things a little different if people want.
I can just wrap the heli stuff in an if statement, and wrap the ai stuff in another if statement - yeah should be doable.
Then I can release one master version, instead of two!

As for the bomb timers - i'm not sure if i can run multiple instances in the same while loop - or of the same while loop - from within the code without separating into multiple files. BUT
I could wrap secondary bombs and an extra timer into an if statement - so 2 bombs will drop if you guys set it to, and with the delay timer slightly random it would give the whole bombardment the feeling of randomness.
 
What settings would allow the sirens to initiate when the bomber is like 30 seconds out and have it start bombing immediately when it shows up?

Basically I want people to drop everything they are doing and haul ass out of there
 
http://pastebin.com/qaEfxp0f

Thanks man for such a quick reply! I shaved the towns because I want the bombings to really be focused in hotspots around the map on my server. Thanks a bunch!
You need to change this:

rndSel=floor(random 49); //select random number 0-49, then set loc based on the case number

So it is random(13);
as you have changed the number of cases - it's trying to pick a case between 1-49, and you only have 13 cases.
 
What settings would allow the sirens to initiate when the bomber is like 30 seconds out and have it start bombing immediately when it shows up?

Basically I want people to drop everything they are doing and haul ass out of there
I think I'll redo this in the next version, as my knowledge is still growing but whats happening now is:

Bomber is within 2500 m and sirens immediately start to play (note some cities are within 2500 m of where the bomber spawns in, so timings don't always work.
waituntil {(_bomber distance _positionLand) <= 2500};

Then sirens play for the allotted number of cycles - change _playNum in the two places it is to the number of times you want the siren to repeat (each one approx 10-12 seconds). set to 15, twice, right now.(30 total sirens).

In the next version, these lines
//waituntil {(_bomber distance _positionLand) <= 700};
will probably be uncommented - I was having problems where the bomber wasn't going exactly where he's supposed to (problems with waypoints in arma) so he might not make it to
waituntil {(_bomber distance _positionLand) <= 100}; but stay 150 m away.
If you're comfortable with it, test messing around with these so the bombs won't start until he's close enough.

So basically right now:
bomber gets within 2500 m, sirens start to play
sirens play as bomber moves closer to city - play until playNum is 0 twice. (this is the time delay)
sirens under while (playNum... stop, bombing starts, sirens play while bombing continues.

Next version will have this all cleared up, and user changable, but it might be a week or so before I get to it.

Like I said earlier, big project that I'm working on right now.
 
Back
Top