True Nukes


Adds realistic nuclear blasts, and more nuclear options, including various scales of atomic artillery shell, as well as atomic cannon shells. Also adds thermobaric weapons (these are like fuel air bombs), which act as early game nukes. Simulates the blast wave, thermal impact, crater and fireball of nuclear weapons.

Content
3 months ago
1.0 - 1.1
37.8K
Combat
Owner:
BicycleEater
Source:
https://github.com/More-Wrong/Factori...
Homepage:
https://github.com/More-Wrong/Factori...
License:
MIT
Created:
3 years ago
Latest Version:
0.3.33 (3 months ago)
Factorio version:
1.0 - 1.1
Downloaded by:
37.8K users

Factorio-True-Nukes

A Factorio mod adding realistic nuclear blasts, and more nuclear options, as well as Thermobaric weapons.

The Factorio in-built atomic weapons are tiny, and don't really model the destructive side-effects of the blast. Sure, the explosions blast out in a ring, but then they just stop. What about the fire, the blast wave crashing across the world. It just won't do!

And thus I present to you, True-Nukes!!!

Effects

This mod aims to simulate most of the real effects of a nuclear weapon, in a Factorio world. It models the blast wave and the thermal radiation release, as well as the fireball and crater, and does this at realistic scales for the yields of the nuclear weapons. This both makes nuclear weapons more useful, and demonstrates quite how destructive even small nuclear weapons can be.

The effects modelled are:
- The thermal radiation: instantaneous energy release, which burns anything its path, causing instant damage in a wide area.
- The blast wave: a pressure wave, blowing over structures and trees, which ripples out causing damage as it goes.
- The fireball: vaporizes everything within a certain radius.
- The crater: formed of an inner and outer section. The inner section is a depression, which will slowly fill with water (this behaviour can be toggled in the settings), and the outer section is composed of turned-over land (modelled by replacing the tiles with landfill).
- The radiation: modelled as something like the poison effects, but longer lasting, and black.

Also note that the mod adds pollution output for the nukes, calculated roughly by:

 pollution = tonnage + 1000*uranium + 100*californium + 10000*tritium

Honestly this doesn't make that much difference, as any really effective use of the nukes kills so many bases that the evolution goes straight to 1, but its still a nice to have.

Graphics

The graphics and sounds used by this mod are all sourced from MushroomCloud, which is a wonderful mod, which I cannot love enough, however, since Mushroom Cloud does not cope with different sized explosions, all the effects of it are overridden, as such installing will make little to no difference. Using it with this mod may overwrite some changes made internally as well.
- MushroomCloud by Arcitos

The parts of MushroomCloud come from:
- Made for the Uranium Power mod by Fatmice (MIT-License)
- "nuclear-detonation-close-proximity.ogg": Atomic Explosion and Sub Rumble, orginal by GowlerMusic (CC-BY 3.0), slightly modified by Arcitos
- "nuclear-detonation-in-vincinity-1.ogg": Long tail explosion, original by Robinhood76 (CC-BY-NC 3.0), mixed together with another explosion sound by Arcitos (who recognizes the other sound?)
- "nuclear-explosion-distant-boom-1.ogg"; "nuclear-explosion-distant-boom-2.ogg"; "nuclear-explosion-distant-boom-3.ogg"; "nuclear-explosion-far-away.ogg": Booms of Innominatus, original by Innominatus (CC-BY-NC 3.0), split into different explosion sounds by Arcitos
- "nuclear-detonation-in-vincinity-2.ogg": Distant nuke explosion, source: Audioblocks, modified by OwnlyMe

If it bothers you that the larger nuclear detonations are really pixelated, and don't mind the extra VRAM usage, then try True-Nukes-Graphics, which adds a really large version of the explosion, and nothing else. It is only there to make that section of the mod optional.

The crater graphics are just different versions of the Nuclear Ground tile, with some tile-transition magic used to hold it all together. If the crater rim does not rise above the terrain for any reason, please leave it as a bug report, it should look like it is higher than its surroundings.

If the game crashes when running with mods which add lots of new tiles, the game might be running out of tiles - refer to the FAQ for more details.

New weapons

The mod adds many new kinds of nuclear warhead, with yields of 0.1t, 0.5t, 2t, 4t, 8t, 20t, 500t, 1kt, 15kt and 100kt.
The weapons generated include:

Shotgun (single slug) in yields of 0.1t - 4t

Shotgun shell (6 shot) in yields of 0.1t and 0.5t

Machine gun ammo in yields of 0.1t - 2t

Cannon Shells in yields of 0.1t - 10t

Grenades in yields of 0.1t - 1kt

Small (fast firing) rockets in yields of 0.1t - 20t

Big (long range) rockets in yields of 0.5t - 1kt

Artillery shells in yields of 4t - 100kt

A special fixed emplacement for super huge weapons:
- The nuclear weapon building. This can detonate at 15kt, 100kt, 1Mt, 5Mt, 10Mt, 50Mt, 100Mt and 1Gt.

The cannon shell has the effect of making the tank a viable late-game option, as it can realistically defeat behemoth enemies, although the tank will almost always take some damage from the blast.

The larger weapons are all wide-area, and can do massive damage to one or several bases, but draw in enemies from a huge area and start forest fires.
The weapons with yields >100kt are ludicrously large - they tend to do something close to ending the world. for the larger ones it takes some time to escape the crater, and many miles to find the nearest tree.

Nuclear tests

The mod also adds nuclear tests, so to unlock certain technologies there are no research requirements, instead you have to place a nuclear core into a special building and run away, letting it detonate.
This will then automatically unlock the technology (when the technology is selected for research that is - it doesn't have to be selected while the weapon detonates).
Please save before doing this as A) it's a very new feature, and B) its very easy to detonate a nuke way to close by, and end up destroying your whole factory.

Videos, etc.

A list of videos on the mod - most of these are at least a little outdated (i.e. before the big 0.3 update):
- https://www.youtube.com/watch?v=Z-CB6TAXHN0
- https://www.youtube.com/watch?v=WQ8Srm6B6SY
- https://www.youtube.com/watch?v=bcQxfgCLkIQ
- https://www.youtube.com/watch?v=Fh8OGZa1DCI
- Xterminator did a mod spotlight of True-Nukes here enjoy!
- https://www.youtube.com/watch?v=siEFV54fTME
- https://www.youtube.com/watch?v=OdYppHYBtqE
- (in German - mod used at around 11:30) https://www.youtube.com/watch?v=L2F4r5uG7Ik
Includes the mod at the end:
- https://www.youtube.com/watch?v=kWc9YbyJGYo

Californium

To try and justify the ridiculously low yields of the smaller weapons, a new material has been introduced: Californium.

It is very simply refined from U-235, and doesn't change that much, other than making the weapons at least seem realistic, as such, there is an option to cut it out of the production chain (so the weapons just use U-235).

Tritium

To allow the larger nukes (100kt and above), tritium has been added, made by refining the output of special nuclear fuel cells after they have been in a reactor.

The mod also adds Fogbank, a strange material, entirely classified, but used at some point in the US fusion bomb program, to reduce the required size of bomb. It is only needed to make the 100kt artillery shell.

Mod support

Schall tank platoon:
- The Sniper rifle rounds have yields of 0.1t-4t
- The Auto-cannon shells have yields of 0.1t-8t
- The 88mm cannon shells have yields of 0.1t-20t
- The 128mm cannon shells have yields of 0.1t-500t

K2:
- Railgun: 0.1t - 20t
- Heavy rocket replaces the base big rockets.
- Turret rocket: 0.1t - 20t
- Pistol: 0.1t - 0.5t
- Rifle: 0.1t - 2t
- Anti-material: 0.1t - 4t

Space Exploration:
- Orbital weapon cannon: 0.5t - 5Mt

Rampant arsenal:
- Mortar: 0.5t - 1kt

AAI Ironclad:
- Mortar: 0.5t - 1kt

This mod works with MushroomCloud, however the graphics from Mushroom Cloud are now included in this mod.
- MushroomCloud by Arcitos

Mods which change the nuclear cycle (e.g. Nuclear fuel, Plutonium energy, Amator Phasma's Nuclear MadClown01's Nuclear Extension) are supported in the most part, although feel free to request additional support if a mod you want to use is not supported, and is hard to use with True-Nukes.

If Bob's mods are installed, then the costs of the weapons are changed somewhat, to make them more affordable and reasonable. I do not have much experience with Bob's, so these might not be very balanced, but they should be a bit more affordable than they might otherwise be. The mod will also remove the atomic artillery shell from Bob's weapons, as it is replaced by the atomic artillery shells in this mod.

This mod will not play nicely with any other mods which change nuclear weapons. It will either overwrite them, or be over-written, and it will not attempt to change any other nuclear weapons to fit in. However, it should not break mods which do not change atomic bombs. If you have an incompatibility, please report it using the discussion tab, so that I can try to fix any issues.

The chunk loaded detonations don't play nice with mods which change things using scripts as they are loaded. This includes the Ruins mod. This is why the option to disable chunk based nukes is available for the 100kt.

The 100kt and above

These larger bombs are run using a chunk-based system to avoid loading extra map. Instead the relevent damage is applied when that chunk generates.
This can have weird effects, making some damage seem very recent (e.g. fires still burning), but makes the detonation far quicker.
These larger nukes can still be very slow when a very established factory is hit, but even in the worst cases tested, RAM usage doesn't exceed 5GB, and in unexplored map, RAM usage remained at ~2GB.

Note that running the 100kt, with 'Optimise 100kt' set to false, results in huge memory usage, and is very slow - not recommended.

Thermobaric weapons

The mod also adds Thermobaric weapons. These are weapons using lots of fuel which ignites with the air. The most well known example is the fuel air bomb, but other types exist. These are not nukes (by any stretch of the imagination), but they rely on similar systems (the blast wave, etc) and are, with some imagination, like early-game nukes.

There are three types implemented, small, medium and large (and are available for use across a wide range of weapons).
- Small: This has a 40m outer blast radius.
- Medium: This has an 80m outer blast radius.
- Large: This has a 120m outer blast radius.

These weapons have their own research, and can be obtained using chemical and military science packs, however they are relatively expensive. They also do poorly against behemoth biters/spitters, as while they have a large blast radius; they do not do much damage, this leaves a good role for nukes in the late game.

Compared to the nuclear weapons, these have much smaller blast areas, but they do involve a lot of fire, which is very performance intensive; this is not too bad, but firing the cannon shell at full fire-rate can reduce the frame-rate significantly. Due to the lack of extra map loading, they have no noticeable freeze time when they hit.

These weapons are more likely to disrupt game balance, as they are much more early-game than the nukes, hence the option to disable them.

The fire shield

This is a bit of a weird item, it is simply an equipment module which prevents the nuclear weapons and Thermobarics from setting fire to the user. It uses a lot of power to do so however, and doesn't provide much shielding.
This is primarily because for light vehicles, the fire will tend to slowly eat away their shields and then destroy them. It is much less relevant for vehicles like the tank or Spidertron, but makes a huge difference for the jet in the aircraft mod.

Performance

Note: 0.3.0 introduced substantial performance improvements, in some cases well over 50%. The below figures have not been updated to correspond with this.

To make the nukes freeze the game for less time, a map generate is queued when the nuke is first fired/started. This can result in a burst of lag (4ups) for several seconds, but makes the nukes significantly less likely to crash the game.
To allow the game to load in the relevant map areas and apply damage, the larger weapons can freeze the game for some time when they hit (as the initial damage is applied), and cause slow down for a period afterwards while the blast-wave propagates.
- The weapons under 20 tons are reasonably quick, unless you fire loads of them.
- The 20 ton yield weapons cause some slow down, but less than 1s of wait, and little slowness afterwards.
- The 500 ton yield weapons cause ~2s of freeze, less if the area is explored, and ~10s of slowness afterwards.
- The 1kt yield weapons cause ~10s of freeze, less if the area is explored, and ~20s of slowness afterwards.
- The 15kt yield weapons cause ~15s of freeze, less if the area is explored, and ~2 minutes of slowness afterwards.
- The 100kt nukes and above cause some freeze (from ~5s on new map, up to ~10mins on a huge map), and some slowness afterwards. The nuke also causes chunk loading to be slower for a wide area, though not by much.

These numbers get substantially worse in high density areas, such as the inside of a factory, although the freeze time reduces in explored areas.
I had originally implemented entities sheltering one another from the blast, and had debris flying off of destroyed entities, but this made little difference to the outcome, and slowed it down, so the feature was removed.

If after a big nuke detonation, the game runs slowly for ages (like hours), it is very probable that the cause is water flowing back into the craters. To make this speed up use the command:
/c remote.call("True-Nukes Scripts", "clearAllCraters", game.player.surface)
This will fill all the craters in instantly, although may take some time to run.

If the mod runs very slow, or crashes from lack of memory, a few mod settings can be used to help:
- Enable nuclear weapons causing large numbers of short lived fires: un-setting this saves a lot of memory for the small to mid sized weapons (it is regarded as off for the 15kt, 100kt and 1Mt)
- All the Fire reduction settings can be increased, and are applied separately to the 15kt and the 1000 and 500 ton, this reduces memory usage, in exchange for not looking as good. (No fires are created for the 1Mt).
- All the Blast reduction settings can be increased, applied to the 15kt nukes, this stops the blast wave early, making the end more pronounced, but significantly reducing time to run.
- Use more optimised detonation system: this runs a more aggressively optimised algorithm for doing the initial blast, but doesn't record entities damaged/enemies killed, and removes some animations. It may also break other mods which use lots of scripting, however it may be faster/use less memory.

Other than this, I can only recommend reducing other settings in Factorio to free up memory, if out of memory is the issue, or not detonating larger nukes, the 500t is usually enough for most things, and can normally be fired without too many consequences.
Closing other applications which are running at the same time helps as well (particularly web-browsers as these use lots of RAM).

General

The artillery shells should not be used with auto-fire, but there does not seem to be an obvious way to disable it, so would advise using a normal artillery shells first to clear out nearby enemies, and then switch to the nuclear shells for remote targets. Fortunately it takes very few nuclear shells to go a very long way.

The balance of this mod is unlikely to be perfect, but with artillery, late game enemies offer little threat, and the costs of these devices are high. Also these weapons tend be double-edged swords, lighting fires in the factory, and even destroying power poles if detonated too close by.

The craters will slowly fill with water. This creates nice craters in remote areas, but can cause some trouble inside a factory, however the inside can be landfilled at any stage.

The craters use heights from surrounding terrain, which can result in the crater being more naturally integrated into the world. Water is 'boiled away' inside the fireball, and rushes back from surrounding lakes over time. Very slowly, any areas which have no connection to water also fill up.
See Lake Chagan for an example of such a flooded crater.

Achievements

Most of the achievements are references, jokes, or some such - those which aren't just terms for the event which occurred are below:
- I guess it worked - the first words of Oppenheimer after the Trinity test
- Trinity: I am become death - more Oppenheimer quotes relevant to Trinity, which had a 25kt yield (similar-ish to the 15kt)
- How I learned to stop worrying and love the bomb - the other part of the title to Dr. Strangelove
- 0:00:01 - a trope in films where a timed weapon has to be stopped, and is stopped with only 1s left - Galaxy Quest having a notable scene of this.
- Would you mind not shooting at the thermonuclear weapons? - a line from Broken Arrow
- Broken arrow - the official US classification for an accident involving a nuclear weapon which does not risk nuclear war
- Arms race - the term for when two sides are consistently escalating in order to outdo each other.
- That was one spicy meatball! - from The Mask

The CHALLENGE!

In a normal freeplay game, set off a 1Gigaton nuke, and have your base survive with limited damage (i.e. could reasonably repair itself - maybe some losses, but not catastrophic).

This will take 1000 reactors about 3 hours to produce the tritium, and needs to be detonated ~150km away - this is a 30 minute journey by nuclear-fuel train, or about 60 minutes by car (presuming no turning, stopping, etc.).
You also need to get 400 stacks (10 full train carriages) of tritium there... and escape...

Good luck!!!

References

The numbers for the weapons are sourced from NUKEMAP which is excellent for giving a real world view on nukes.
The graphics and sound effects for the weapons are sourced from MushroomCloud, which exists in a modified form in a subfolder of this mod.