Possible Nuke script / fallout like experience on server?

Yeah I kinda figured it wasn't going to work. Set your file back, I am guessing you are using the color correction script with the ash built in. In that file under the ash section #12 is color... RED, GREEN, BLUE, ALPHA is the color setup so don't mess with the 1 at the end. 0 = invis. Try doing black, 1,1,1 and you can also try and change #00 to cl_basic. Can also change #15 from 1.2 to a higher value and see if it ups the intensity.

I tried using this
Code:
["\Ca\Data\ParticleEffects\Universal\Universal", 16, 12, 8, 1],//"\Ca\Data\cl_basic",

Which didn't do anything. Before I did that however I did make the particles black like you suggested and I believe I could see them a little bit more, so maybe I just need to up the intensity.
 
@FoamysWorld Im interested in this nuke script you have. what do i got to do to get my hands on it and try to integrate it into my server. I would like for Infistar to add it to his admin console for some admin fun. Dont know if that will ever happen.
 
@FoamysWorld Im interested in this nuke script you have. what do i got to do to get my hands on it and try to integrate it into my server. I would like for Infistar to add it to his admin console for some admin fun. Dont know if that will ever happen.

Infistar purposely leaves out the worst bits of code you could have because of admin abuse servers, rouge admins, and hackers getting access to admin tools.
 
@FoamysWorld Im interested in this nuke script you have. what do i got to do to get my hands on it and try to integrate it into my server. I would like for Infistar to add it to his admin console for some admin fun. Dont know if that will ever happen.

As cool as the event is... as Vampire pointed out it could be modified and abused. I have been contacted by a few people that run servers and they have all asked me to not release my nuke for various reasons, some of which I never took into consideration when scripting it. It seems like a bad idea to release it now.
 
So me running my own server, leave it out of the question. I'm not a scripter, I just know how to install mods with a walk through. I've been looking for a script for about a month now, tried a couple. Nothing was worth while to write home about. I rally would enjoy to have it as a event or as a find in game. It's mostly for my friends and I to mess around on our server. But I can't force you, I'm just out of options.
 
why would you want to choose the city and time, wouldnt it be best if it were random and controlled by the server? Thats how i do it.
 
i wouldnt mind at all. I just hope the author wont get mad at me lol i only take credit for the way its ran not the actuall event itself. Also its very similar to the one already in this thread but here goes. I have yet to move all of it out of my mission file into the addon so....

ok so the server first:

nukeLauncher.sqf

Code:
private ["_minTime","_randomTime","_nukeTimer","_coords","_rad","_cnps","_towns","_townnumber","_townName","_townPos","_nukePad","_locNuke"];

while {true} do {

    _minTime = 2800;
    _randomTime = random 800;
    _nukeTimer = ((_minTime) + (_randomTime)); // How long for nuke to sleep before next explosion
   
    //_coords = [[],0,-1,20,0,20,0] call BIS_fnc_findSafePos;
   
    /*
    _nukeMarkerG = createMarker ["nukeMarkerG", _coords];
    _nukeMarkerG setMarkerColor "ColorGreen";
    _nukeMarkerG setMarkerShape "ELLIPSE";
    _nukeMarkerG setMarkerBrush "Grid";
    _nukeMarkerG setMarkerSize [1500,1500];
   
    _nukeMarkerO = createMarker ["nukeMarkerO", _coords];
    _nukeMarkerO setMarkerColor "ColorOrange";
    _nukeMarkerO setMarkerShape "ELLIPSE";
    _nukeMarkerO setMarkerBrush "Grid";
    _nukeMarkerO setMarkerSize [1200,1200];
   
    _nukeMarkerR = createMarker ["nukeMarkerR", _coords];
    _nukeMarkerR setMarkerColor "ColorRed";
    _nukeMarkerR setMarkerShape "ELLIPSE";
    _nukeMarkerR setMarkerBrush "Grid";
    _nukeMarkerR setMarkerSize [800,800];
    */
   
    _rad=20000;
    _cnps = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition");
    townlistserver= nearestLocations [_cnps, ["nameCity","nameVillage"], _rad];
   
    _towns= townlistserver;
    if ((count _towns) != 0) then {
    _townnumber = floor (random (count _towns));
    _townName = _towns select _townnumber;
    _townPos = (position _townName);
    };
    sleep 3;
   
    _nukePad = createVehicle ["Land_HelipadEmpty_F", _townPos,[], 0, "NONE"];
    _locNuke = "nukepos";
    _nukePad setVehicleVarName _locNuke;
    _nukePad call compile format ["%1=_This ; PublicVariable ""%1""",_locNuke];
    sleep 3;
   
    nukeGo = true;
    publicVariable "nukeGo";
   
    diag_log format ["Cyberdyne Systems: Nuke Launcher: Sleeping for %1 seconds",_nukeTimer];
    sleep _nukeTimer;
   
    //deleteMarker "nukeMarkerR";
    sleep 3;
    //deleteMarker "nukeMarkerO";
    sleep 3;
    //deleteMarker "nukeMarkerG";
    //sleep 3;
    deleteVehicle _nukePad;
   
};

serverFunctions.sqf
Code:
waituntil {!isnil "bis_fnc_init"};

server_nukeLauncher = compile preprocessFileLineNumbers "\jDay_server\compile\nukeLauncher.sqf";

serverMonitor.sqf
Code:
waitUntil{initialized}; //means all the functions are now defined

if (isServer) then {

    null = [] spawn server_nukeLauncher;
    //null = [] spawn server_portalSpawner;
    null = [] spawn server_spawnC130CrashSite;
};

Now these are all pretty much dayZ style files, since i started by scripting dayz and i prefer to stay with what i know works lol. However; these can be used in any mod even your own. Now what this does is sets up a position and gives it a name which then becomes a public variable which then can be detected by all clients simultaneously. Once this part is up and running then we have the client stuff.

Within client side this exec

Code:
/* Atomic Explosions */
[] execVM "\jDay_code\system\clientEvents\nukeMonitor.sqf";

this will initiate the client detection.

nukeMonitor.sqf
Code:
while {true} do {

    nukeGo = false;
    sleep 1;
       
    waitUntil {nukeGo};
       
    // COLORCORRECTION
    execVM "system\nuke\jDay_colorcorrection.sqf";
       
    _ticker = 60;
    while {_ticker >= 0} do {
        //titleText [format["Radio: Impact in %1 in seconds.", _ticker], "PLAIN DOWN"];
        _ticker = _ticker - 1;
        sleep 1;
    };
       
    _distancePlayer = player distance nukepos;
       
    if (_distancePlayer <= 2000) then {
        [] execVM "system\nuke\nuke.sqf";
        0 fadeMusic 1;
        playSound "nuke";
        15 fadeMusic 0;
    } else {
        // COLORCORRECTION
        execVM "system\nuke\jDaycolorcorrection.sqf";
    };
};

This will wait until it can see the variable meeting the req to stop waiting. Once that happens it makes a distance check for per player. It then resets the variable to false each cycle and begins to wait for the next public variable update form the server. Sorry if this is confusing i thought about making a tut w the authors permission soon. But thats pretty much it, its been one of the most simple implementations ive done so far.
 
4:35:19 Warning Message: Script day_server\compile\nukeLauncher.sqf not found
4:35:20 "Res3tting B!S effects..."
4:35:20 Error in expression <n server_nukeLauncher;

null = [] spawn server_spawnC130CrashSite;
};

diag_log >
4:35:20 Error position: <server_spawnC130CrashSite;
};


any ideas?
 
4:35:19 Warning Message: Script day_server\compile\nukeLauncher.sqf not found
4:35:20 "Res3tting B!S effects..."
4:35:20 Error in expression <n server_nukeLauncher;

null = [] spawn server_spawnC130CrashSite;
};

diag_log >
4:35:20 Error position: <server_spawnC130CrashSite;
};


any ideas?

lol ya alot actually :p that was just to demonstrate how to implement it. Give me a few mins and ill make a more comprehensive version.
 
ok so here goes....

step 1
in your server pbo you will find your serverFunctions.sqf(note yours may be named slightly diff if its dayz, maybe server_functions.sqf idk)
in this file you want to code this(rem this is only the nuke codes so you may have other code in and around this)
Code:
waituntil {!isnil "bis_fnc_init"};

server_nukeLauncher = compile preprocessFileLineNumbers "\jDay_server\compile\nukeLauncher.sqf";

step 2
same as step 1 but this file will be your serverMonitor.sqf(or w/e yours is server_monitor.sqf idk its your files :p)
so we want to make it look like this
Code:
waitUntil{initialized}; //means all the functions are now defined

if (isServer) then {

    null = [] spawn server_nukeLauncher;
    //null = [] spawn server_portalSpawner;
    null = [] spawn server_spawnC130CrashSite;
};

now rem that this is my mod im developing so anything not nuke related just take as a place identifier for your files. The initialzed comes from the init compiles i load in my mission init.sqf(that should make sense :p) For those of us that over ride the compiles and variables for dayz mods this is understood. If not you may want to come join my very slim dev team so i can train you and you can make some awesome stuffs 8) thats another story tho :p

ok so now we have the server nuke portion setup with a pre compiled varibale right? right....

step 3
now we are going to the actual nukeLauncher.sqf and we copy this into the file( or make a new one idk its your files :p)
Code:
private ["_minTime","_randomTime","_nukeTimer","_coords","_rad","_cnps","_towns","_townnumber","_townName","_townPos","_nukePad","_locNuke"];

while {true} do {

    _minTime = 2800;
    _randomTime = random 800;
    _nukeTimer = ((_minTime) + (_randomTime)); // How long for nuke to sleep before next explosion
  
    //_coords = [[],0,-1,20,0,20,0] call BIS_fnc_findSafePos;
  
    /*
    _nukeMarkerG = createMarker ["nukeMarkerG", _coords];
    _nukeMarkerG setMarkerColor "ColorGreen";
    _nukeMarkerG setMarkerShape "ELLIPSE";
    _nukeMarkerG setMarkerBrush "Grid";
    _nukeMarkerG setMarkerSize [1500,1500];
  
    _nukeMarkerO = createMarker ["nukeMarkerO", _coords];
    _nukeMarkerO setMarkerColor "ColorOrange";
    _nukeMarkerO setMarkerShape "ELLIPSE";
    _nukeMarkerO setMarkerBrush "Grid";
    _nukeMarkerO setMarkerSize [1200,1200];
  
    _nukeMarkerR = createMarker ["nukeMarkerR", _coords];
    _nukeMarkerR setMarkerColor "ColorRed";
    _nukeMarkerR setMarkerShape "ELLIPSE";
    _nukeMarkerR setMarkerBrush "Grid";
    _nukeMarkerR setMarkerSize [800,800];
    */
  
    _rad=20000;
    _cnps = getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition");
    townlistserver= nearestLocations [_cnps, ["nameCity","nameVillage"], _rad];
  
    _towns= townlistserver;
    if ((count _towns) != 0) then {
    _townnumber = floor (random (count _towns));
    _townName = _towns select _townnumber;
    _townPos = (position _townName);
    };
    sleep 3;
  
    _nukePad = createVehicle ["Land_HelipadEmpty_F", _townPos,[], 0, "NONE"];
    _locNuke = "nukepos";
    _nukePad setVehicleVarName _locNuke;
    _nukePad call compile format ["%1=_This ; PublicVariable ""%1""",_locNuke];
    sleep 3;
  
    nukeGo = true;
    publicVariable "nukeGo";
  
    diag_log format ["Cyberdyne Systems: Nuke Launcher: Sleeping for %1 seconds",_nukeTimer];
    sleep _nukeTimer;
  
    //deleteMarker "nukeMarkerR";
    sleep 3;
    //deleteMarker "nukeMarkerO";
    sleep 3;
    //deleteMarker "nukeMarkerG";
    //sleep 3;
    deleteVehicle _nukePad;
  
};

please always double, triple and fanatically check file pathways......must must must do this always o.0
This file will run by the server and it will choose a city randomly. The city is then marked with an invisi heli pad and the pad is then marked with a public variable. This is how the splosion will know where to splode(get it? ;))

Are we done with the server pbo? Yes....i think, i was wrong once before....just once though :p

step 4
in your mission pbo you will now need to place all of your nuke files to be run globally...this **** is exhausting sometimes lol
in your init.sqf code we should all be familiar with the if (!isDedicated then { portion right? Right....

so what i do since i am dev my own mod is i run a clientInit.sqf within the if (!isDedicated) then portion liek this
Code:
/* Run Only on Client */
if(!isDedicated) then {
    [] execVM "\jDay_code\init\clientInit.sqf";
    waitUntil {player == player};
    _EHkilled = player addEventHandler ["killed", {_this spawn jDay_playerDeath_fnc}];
};

all you need is the clientInit.sqf the other lines are from the mod im dev. I really doint care if you use anything i post either. Just plx dont claim somethign that isnt yours even if you dont give credit. I dont and i hope you all wont as well 8)

step 5
the clientInit.sqf i keep in my addon, thats just how i roll. You can put this in the mission too i think, lots of options here...
Code:
if (isDedicated) exitWith {};

/* Load Database */
[] execVM "\jDay_code\system\functions\statSave\loadAccount.sqf";

/* Atomic Explosions */
[] execVM "\jDay_code\system\clientEvents\nukeMonitor.sqf";

notice the path leads to my addon. Like i mentioned before, this can be altered(its all your code anyways 8))

step 6
nukeMonitor.sqf is also in my addon
Code:
while {true} do {

    nukeGo = false;
    sleep 1;
      
    waitUntil {nukeGo};
      
    // COLORCORRECTION
    execVM "system\nuke\jDay_colorcorrection.sqf";
      
    _ticker = 60;
    while {_ticker >= 0} do {
        //titleText [format["Radio: Impact in %1 in seconds.", _ticker], "PLAIN DOWN"];
        _ticker = _ticker - 1;
        sleep 1;
    };
      
    _distancePlayer = player distance nukepos;
      
    if (_distancePlayer <= 2000) then {
        [] execVM "system\nuke\nuke.sqf";
        0 fadeMusic 1;
        playSound "nuke";
        15 fadeMusic 0;
    } else {
        // COLORCORRECTION
        execVM "system\nuke\jDaycolorcorrection.sqf";
    };
};

im a little -.- right now too so sorry if i get something wrong lol
this file is going to run on the client always, however; it will wait till the public variable is set by the server(rem the server files?)
when the cycle is done it will restart and reset...the variable to false to make it wait once more until the server is ready again.

this is now the point where you will use whatever nuke scripts you choose to use, i use someone elses and i cannot rightfully post his work without at least asking first. From here it should be pretty obvious how to path these files out to the desired nuke mod.

I believe thats it, if you see something wrong or w/e please let me know 8)
 
Last edited:
Here is a version that works with infistar's admin menu. To install just add this to your admin menu:
Code:
     if (getPlayerUID player in PV_SuperLevel_List) then {
     adminadd = adminadd + ["  Spawn Nuke Cherno",adminnukedropcherno,"0","0","0","0",[]];
     adminadd = adminadd + ["  Spawn Nuke Elektro",adminnukedropelektro,"0","0","0","0",[]];
     adminadd = adminadd + ["  Spawn Nuke NWAF",adminnukedropnwaf,"0","0","0","0",[]];
     };

Then copy paste these three scripts right above this line:
Code:
if (isNil 'admin_announce') then {admin_announce = true;};

Cherno: http://pastebin.com/gVGKMxcj
Elektro: http://pastebin.com/wyMx9dia
NWAF: http://pastebin.com/xBBaiYky

To use a different location just replace all instances of the coordinates and change the name.

Credits to infistar/hangender. Just edited it to change variable names, prevent BE kicks and a few other things. Included a C130 fly over and crash right as the bomb drops. Also added two sirens near the center of the explosion. At the bottom you can configure what it does in terms of damage. Defaults destroy all objects, zombies and animals in 250m of the blast, sets players within 500m and not in a building unconscious for 15s, bleeding and blood to 9000.

If you guys want EVR sequences regardless of map checkout this thread:
http://epochmod.com/forum/index.php?/topic/6137-howto-evr-blowout-map-independent/

Instead of copying + pasting the code, would it be possible to keep it a bit neater and load .sqf's from the same folder?

i.e:
Code:
[] execVM "\z\addons\dayz_server\init\dropNukeCherno.sqf";

This looks like it would work but isn't for me.
I've probably missed something though.
 
Last edited:
@ebay -
Ahh - gotcha!
I had the global variable braces/brackets code setup correctly.
I just didn't realize/notice the code that needed removing at the start and end of the .sqf's on pastebin as you mentioned.

I'll amend and test when I get home.

Thank you.
 
Any way to get a working nuke script for vanilla dayz that also works with infiSTAR?
Yes, stuff and junk works, you have to add it to infiSTAR. Personally.. it was really laggy and glitch-y. It seemed to go off for some people at random and caused major lag. Not to mention, ground zero was just a shitload of bicycles lol
 
Back
Top