CH!LL3R

[Release] TNT - Terrible Nuke Territory

54 posts in this topic

Hi guys,

I think it's time to release something, that I called a script :D

There are maybe better ways to script that, but this is my first try and it's time to get the opinions of the community.

 

So, this is my Terrible Nuke Territory

It's an adaption from mmmyum's animated air raid dayz script, changed to the needs for arma 3 exile. Credits for the original script goes to mmmyum. The original one could be found here.

Also I like to thank some other people:

  • $p4rkY - he's my mentor
  • adR1 - he's my testing guy
  • @Eichi - he helped me with traderzone detection on Discord, thanks for that
  • Squanchy - beta-testing the files and pointing to some errors
  • My wife - for making awesome coffee
  • Saecco Minuto - because thats the reason for the "coffeeskills" of my wife :P
  • and the kids - dont forget the kids

Updates:

06-25-2017 || 05:45 pm --> added versionnumber, choosable godmode for jet, choosable if jet will attack other aI or get attacked from them, new notification if jet is crashed, cleaning the file

06-22-2017 || 08:45 am --> more fixes and sound adjustments. Thanks to HellBz

06-22-2017 || 12:05 am --> added some closing brackets, causing cycle runs only once. Thanks to HellBz

06-22-2017 || 03:38 pm --> updated installation instructions to prevent rpt-errors

06-21-2017 || 11:13 pm --> sleeptime on scriptstart + reworked notifications

06-20-2017 || 07:40 pm --> added a varibale to prevent freezing by DMS AI. Thanks to kuplion

 

 

What the hell does this script?

Well, it choose random locations at the map like Cities and Capitol Cities, spawns a jet, let it fly to the location and drop some bombs... thats it

Features:

  • use automatic generated locations or setup a static location
  • adjustable types of jets (random selection)
  • adjustable types of bombs (random selection)
  • shows toast to all players with informations about location and so on
  • plays sounds of sirens and falling bombs noises if enabled (soundfiles included)
  • runs on serverside, starts only if server has at least one player
  • adjustable sleep time between bomb cycle
  • adjustable spawnpoint and deletepoint for the jets (random selection included)
  • adjustable number of bombs per bombcycle, also bomb radius
  • adjustable minimum distance to trader zones

 

How to install that sh...?

 

INSTALLATION

This step is very hard, so if you are not familiar with scripting or setting up an arma 3 server with exile, I advise you to not install this on your server.....!

Just joking...

Step 1

Download the File from GitHub, open ACME_TNT.pbo\server\ACME_TNT.sqf and read the Setup-Part between line 30 and 90. Change the setups to your wishes and needs. If you dont want to use random locations you need to change line 75 to 79 for the static location. For now it is set to Balota airstrip on Chernarus.

If you are using DMS - Missions AI you need to check the freeze option in the config of DMS. If DMS_ai_freeze_Only_DMS_AI is false, the bomber will not bomb his target until a player is near to him to unfreeze him

Update: Added a variable to the script, so the pilot will not be freezed, thanks to kuplion...

Spoiler

	//////////////////////////////////////////////////////////
	//														//
    //	Start Setup - change settings below to your wishes	//
	//														//
	//////////////////////////////////////////////////////////
	
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	_debugRPT 			= false;						// true = extended debug messages || use only to check for errors, spams the server.rpt
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    _breakMin 			= 2700;							// minimum time between each bomb cycle in seconds |2700 = 45 minutes
    _breakMax 			= 3600;							// maximum time between each bomb cycle in seconds |3600 = 60 minutes
    _minDist2Trader     = 1000;                         //set minimum distance to TraderZones -- set to 0 if not needed
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    _jetModel 			= selectRandom [				// change to classnames of jets you want to random select.
						"B_Plane_CAS_01_F",				// A-164 --- Wipeout
						"I_Plane_Fighter_03_CAS_F",	    // A-143 --- Buzzard
						"O_Plane_CAS_02_F"              // To-199 -- Neophron
						];	                            // if you want only one kind of a jet, just change all to the same classname ;-) or delete all lines except the first line
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	_rdmBomb 			= selectRandom [				// change classnames of bombs random selectet.
						"Bo_Mk82_MI08",                 // if you want only one kind of bombs, just change all to the same classname ;-) or delete all lines except the first line
						"Bomb_03_F",                      
						"Bomb_04_F",
						"Bo_GBU12_LGB"                  // remember, the last entry will have no comma, even if it is the one and only line
						];
	_dropHeight			= 75;							// from this height bombs will fall down, needs to be lower than the bomber, or bomber = boom!!!
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	_spawnPointJet 		= selectRandom [				// random spawnpoints for the jet [x,y,z] | [0,0,300] is the bottom left corner of the map, height 300
						[0,0,300],		                // if you want to have only one point to start, just change all to the same coords :-) or delete all lines except the first line
						[0,0,300],		                // these coords are from Chernarus
						[0,0,300]		                // <-- Last entry, no comma
						];
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	_deleteJetLoc 		= selectRandom [				// random points to delete jet after bombing | for now its the top right corner of the map. For specific coords use [x,y,z]
						[_mapSize, _mapSize,300],		// handle the same way as _spawnPointJet above
						[_mapSize, _mapSize,300]        // <-- Last entry, no comma
						];
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	_ambientSound		= true;							// <-- set to false if you want no sounds like sirens and falling bombs around 1000m of the nukezone
	_alarm1 			= _soundPath + "Sounds\siren1.ogg";	// <-- change to matching soundpath for siren 1 -- this one plays a long siren for 2:08 minutes
    _alarm2 			= _soundPath + "Sounds\siren2.ogg";	// <-- change to matching soundpath for siren 2 -- this one plays a long siren for 1:39 minutes
    _alarm3 			= _soundPath + "Sounds\siren3.ogg";	// <-- change to matching soundpath for siren 3 -- this one plays a long siren for 0:12 minutes (it is for loop)
    _mortar 			= _soundPath + "Sounds\drop.ogg";	// <-- change to matching soundpath for falling Bomb -- this one plays a sound for 0:04 minutes
	_sirendist			= 1000;							// distance sirens are audible at
	_dropdist			= 500;							// distance droppingsounds are audible at
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    _randomLoc 			= true;							// true if you want random locations (be sure to set static location otherwise to your needs!)
    _loc 				= ["BalotaAirstrip",            // change this to your needs, this is for Chernarus. No spaces allowed
                           _dropHeight,                 // drop height of the bomb, you have set this 4 lines above
                           4829.9868,2450.1104          // these are x and y coords, you need to change them if you want to have a static location. If you use _rdomLoc you can skip this 
                          ];	//Set to static location format ["name",z,x,y]  //SKIP if using random locations
    _city 				= "BalotaAirstrip";				//Set to string name of static location. Allows for custom name in rpt no spaces
    _numberOfBombs 		= 10;							//how many bombs are dropped assuming 1 per cycle
	_preWaypoints 		= 2;							//add waypoints before arriving at location.
    _spawnRadius = 3000;								//radius to choose for prewaypoint (choose within x of _spawnMarker wich is centered of the map)
    _ray = 180;											//ray of bombing//radius
	

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////
    //                                                                                                       //
	//  End of Setup - dont change anything below this line until you exactly know what you are doing :-)    //
    //                                                                                                       //
	///////////////////////////////////////////////////////////////////////////////////////////////////////////

 

Step 2

Pack the folder into a pbo. Upload the ACME_TNT.pbo into @ExileServer\addons

Step 3a

add the following code to your discription.ext / class CfgRemoteExec to improve an error in rpt while bomber is deleted by the script:

Spoiler

class BIS_fnc_effectKilledAirDestruction { allowedTargets=2; };

 

So it should look like this

Spoiler

class CfgRemoteExec
{
    class Functions
    {
        mode = 1;
        jip = 0;

        class ExileServer_system_network_dispatchIncomingMessage
        {
            allowedTargets = 2;
        };
        class BIS_fnc_effectKilledAirDestruction { allowedTargets=2; };
    };

    class Commands
    {
		mode = 0;
		jip = 0;
    };
};

 

If you are using infiSTAR you need to add this line to your CfgRemoteExec.hpp instead of discription.ext

Step 3b

If you like to have sounds of hooting sirens, put the Folder Sounds to your mission.pbo (for example Exile.Altis.pbo) Otherwise skip Step 4 and go to ACME_TNT.pbo\server\ACME_TNT.sqf ,at line 70 set "_ambientSound" to false.

Step 4

Open your discription.ext and add the following lines to it. If you already have an existing CfgSound, merge it to that one...

Spoiler

            class CfgSounds
            {
                sounds[] = {drop,siren1,siren2,siren3};
                class drop
                {
                  name="drop";
                  sound[]={\Sounds\drop.ogg,db+10,1};
                  titles[] = {};
                };
                class siren1
                {
                  name="siren1";
                  sound[]={\Sounds\siren1.ogg,db+6,1};
                  titles[] = {};
                };
                class siren2
                {
                  name="siren2";
                  sound[]={\Sounds\siren2.ogg,db+6,1};
                  titles[] = {};
                };
                class siren3
                {
                  name="siren3";
                  sound[]={\Sounds\siren3.ogg,db+6,1};
                  titles[] = {};
                };
            };

 

 

The script was original made for Chernarus, but you can use it on every map with random locations without any changes. Only thing, if you want to have a static location, you need to set it up. You will see what you need to change by looking to ACME_TNT.sqf....

 

You have constructive criticism or some suggestions? Please post them here.

Last but not least, please stay fair, cause this is my first bigger project and I'm still a student in scripting things. Also excuse my bad english...B|

 

Edited by CH!LL3R
  • Like 8

Share this post


Link to post
Share on other sites

Nice!

Also, you can probably work around the DMS freezing by adding this variable to the pilot/jet?

_group setVariable ["DMS_AllowFreezing",true];

  • Like 1

Share this post


Link to post
Share on other sites
Advertisement

* Update --> little changes for installing this, first post updatet too....

add the following code to your discription.ext / class CfgRemoteExec to improve an error in rpt while bomber is deleted by the script:

Spoiler

class BIS_fnc_effectKilledAirDestruction { allowedTargets=2; };

 

So it should look like this

Spoiler

class CfgRemoteExec
{
    class Functions
    {
        mode = 1;
        jip = 0;

        class ExileServer_system_network_dispatchIncomingMessage
        {
            allowedTargets = 2;
        };
        class BIS_fnc_effectKilledAirDestruction { allowedTargets=2; };
    };

    class Commands
    {
		mode = 0;
		jip = 0;
    };
};

 

If you are using infiSTAR you need to add this line to your CfgRemoteExec.hpp instead of discription.ext

 

Also uploaded a new version of the ACME_TNT.sqf

*added Blackfish armed as possible bomber

*added systemchat notifications because toasts are sometimes too fast

Edited by CH!LL3R

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.