Arma 3
108 ratings
Realistic Nuke Script
   
Award
Favorite
Favorited
Unfavorite
Data Type: Scenario
Scenario Gameplay: Singleplayer
Scenario Map: Altis
File Size
Posted
Updated
379.436 KB
Dec 12, 2019 @ 11:15am
Aug 5, 2020 @ 8:09am
11 Change Notes ( view )

Subscribe to download
Realistic Nuke Script

Description
A small demo mission for the nuke script I wrote. By using the radio menu, accesible by pressin 0 0, you can choose the yield of the nuke, or use the scroll menu/action menu to choose a yield:
- Aplha is 0.3 kT
- Bravo is 1 kT
- Charlie is 2 kT
- Delta is 7 kT


You can investigate the aftermath of the explosion by teleporting to a vehicle (via the scroll menu on the antenna next to you) and also heal yourselve/repair the vehicle unlimited times.


Mod Version including nuclear bombs and missiles:
https://steamcommunity.com/sharedfiles/filedetails/?id=2001817183


About the script:
I tried to create a nuke script which is more realistic then existing ones, by using data gathered from https://nuclearsecrecy.com/nukemap/ (made by Alex Wellerstein) and modelling functions to calculate the damage for a given explosive yield.

Features:

- selectable yield
- 20 psi, 5 psi and 1 psi blastwaves (heavy, medium and light damage)
- thermal and nuclear radioation (only direct effects, no fallout yet)
- temporary malfunction of aviation instruments (radar, hud etc.)
- mushroom cloud with condensation rings (depending on weather)
- other effects (fireball, shockwave etc.)
- simple fallout/radioactivity at the origin of the blast, you can protect yourself usign CBRN suits
- simple fire mechanic which burns some houses down after the detonation
- crater generation which destroys buildings inside it and creates a blockade
- Air Mode to enable usage of high-altitude explosions (NOT air burst)
- Compatibility with Ace Medical, automatically checks for Ace


Planned features:
- bug fixing and enhancing visual effects

You can download the script here:
https://github.com/FreestyleBuild/A3-realistic-nuke

How to use the script:
To use the script you will have to execute it using the execVM command:

null = [position, yield, marker, damage] execVM "freestyleNuke\iniNuke.sqf";
or since version 0.5.0 (old syntax still works)
null = [position, yield, marker, damage, airMode] execVM "freestyleNuke\iniNuke.sqf";


Parameters:
- position: the postion on which the explosion occurs, given as array with 3 entries, like the ones returned by the getPos function
- yield: the explosive yield in kilotons, can be a floating point value, however due to lag you should only use values from 0.1 to 50 kT (The demo uses 0.3, 1, 2 and 7 kT)
- marker: 'true' or 'false', wether markers will be created on the map to show the size of the blast zones (red = 20psi, yellow = 5psi, gray = 1psi)
- damage: 'true' or 'false', wether the damage effects are used, if 'false' no damage is done, only effects are created
- airMode: '0', '1' or '2', defaults to '2' if not given, wether to use Air Mode('1') or not('0') or let the script decide depending and altitude and yield ('2')

For more information visit: https://github.com/FreestyleBuild/A3-realistic-nuke/wiki

Known Issues:
- extreme lag on hosted multiplayer sessions (not tested on dedicated yet)
- effects start to glitch at large or very small yields (e.g when below 0.3 kT)
- bug when postion argument is called for the postion of a map marker (like "getPos Marker01"), use other objects instead


Feel free to use the script for your missions/mods, but please credit me (e.g. link to this post) and send me a link to your creation, I would love to try it out.


Thanks to everyone who helped me develop the script by giving me suggestions and tips on how to improve it.


License

This work is licensed under the Public License Share Alike:

https://www.bohemia.net/community/licenses/arma-public-license-share-alike
67 Comments
Freestyle_Build  [author] Oct 1, 2023 @ 7:39am 
@xXcarlos117Xx2, I can't remember the exact time but you can diable it when calling the script function. In general I recommend using the newer version which also comes with a mod.
xXcarlos117Xx2 Oct 1, 2023 @ 6:46am 
How much time does the aftermath damage you? Is there a way to turn off the damage after a while?
Assailant ! Mar 10, 2023 @ 12:43am 
Your script i am using works without problems, it is my solution that is the problem, my drone which is attached to projetile dont always get destroyed on impact, it sometimes ends under cover :D

this addEventHandler ["killed",{

null = [getPosASL NTacNuke1, 0.3, false, true,2] execVM "freestyleNuke\iniNuke.sqf" createVehicle (getPos (_this select 0));

(_this select 0)}];
Freestyle_Build  [author] Mar 9, 2023 @ 8:14am 
@Assailant ! Looks goods. One problem why the nuke does not trigger could ne that there is amssing ";" after calling the script (the line with execVM "freestyleNuke\iniNuke.sqf"). Also, I have by now made a rework of the script, which might make this a bit easier: https://github.com/FreestyleBuild/freestylesNuclearBlast
Assailant ! Mar 9, 2023 @ 1:31am 
object name(drone): NTacNuke1

this hideObject true;
this addEventHandler ["killed",{

null = [getPosASL NTacNuke1, 0.3, false, true,2] execVM "freestyleNuke\iniNuke.sqf" createVehicle (getPos (_this select 0));

(_this select 0)}];
----------------

Howitzer

this addEventHandler["Fired",
{
params["_unit","_weapon","_muzzle","_mode","_ammo","_magazine","_projectile","_vehicle"];
NTacNuke1 attachTo [_projectile,[0,0,0]]; }];


When the projectile hits the sea or a tall building, the drone spawns at level 0, under the water, or under the building, also the nuke script doesn't trigger :( but it work :D
Assailant ! Mar 9, 2023 @ 12:56am 
I've found a silly solution on the web, I'm not a scripter, I'm a bit dyslexic, I have a hard time learning the language of code, but I try my best and save everything that works.

I have found a script that attaches an object when it fires, and when the howitzer/cruise missile projectile hits the ground and then explodes : damage 1; and then it triggers the nuke scripted where the object is, I've chosen a drone.
----------------------
Freestyle_Build  [author] Feb 16, 2023 @ 1:22pm 
Thank you! Have fun!
Assailant ! Feb 16, 2023 @ 12:58pm 
I don't think I'll ever manage to do this, but it would have been cool, thanks anyway :) best nuke in ARMA that I've tried, and still use in my missions <3 if i do, i will share it here :D
Freestyle_Build  [author] Feb 16, 2023 @ 4:57am 
@Assailent ! One way would be to use the Fire Event Handler [community.bistudio.com] on the vehicle fireing the shot. This will allow you to access the fired projectile object, which can be used to trigger the explosion on impact (might require some tricks to work, like saving the current position until the projectile is destroyed, then detonating at the last known location).
Assailant ! Feb 16, 2023 @ 3:37am 
How to i add freestyle nukes script to a howitzer round or a cruise missile, like the russian 3VB3 152mm howitzer round?
I can use vehicles as nuke but not rounds :(