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
1 year, 25 days ago
1.0 - 1.1
43.4K
Combat

g [Implemented] nuke fix?

3 years ago

hello, you mods fixe the pollution emision of nuke too ?

3 years ago

Thanks for the question.
Depends what you mean.
I don't specifically release pollution on a nuclear detonation, however the fires caused release a lot of pollution, and the biter nests killed make them evolve a lot (pollution release seemed unnecessary).

3 years ago

thanks you, but the forets's fire are negligable.
have a good day

3 years ago

I have now added pollution to nukes

3 years ago

nice !
can i use part of your code fore pollution emition value ?

and why MIT licnence ? x) beerware or gnu_gpl are better bro

3 years ago
(updated 3 years ago)

MIT because I don't really mind people using my code - GPL is much more restrictive and I'm only doing this for fun.
Thanks to the MIT, you can always use part of my code(giving attribution, etc.), but (just out of curiosity), what do you want to use?
If you want the pollution values I give, I generally used the algorithm:

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

If you want specific values, they are as follows:
- 0.1t: 300.1
- 0.5t: 700.5
- 2t: 1302
- 4t: 4004
- 8t: 9008
- 20t: 30020
- 500t: 75500
- 1kt: 101000
- 15kt : 315000
- 100kt : 450000
- 1Mt : 1800000

If you want to use True-Nukes' detonations as part of another mod, when creating a prototype, simply add:

local nuke_explosions = require("True-Nukes.prototypes.nukes.data-nuke-explosions")

which returns a table:
{
N0_1t_detonation = N0_1t_detonation,
N0_5t_detonation = N0_5t_detonation,
N2t_detonation = N2t_detonation,
N4t_detonation = N4t_detonation,
N8t_detonation = N8t_detonation,
N20t_detonation = N20t_detonation,
N500t_detonation = N500t_detonation,
N1kt_detonation = N1kt_detonation,
N15kt_detonation = N15kt_detonation,
N100kt_detonation = N100kt_detonation,
N1Mt_detonation = N1Mt_detonation
}
where each entry in the table is the entire TriggerEffect required to cause the nuke to detonate (including graphics, etc.), so if you have a projectile which you want to cause a (for example) 20t detonation from, simply set:

projectile.action =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects = nuke_explosions.N20t_detonation
}
}

and you get a 20t nuclear detonation.

If you want to cause pollution from a lua script, see:

https://lua-api.factorio.com/latest/LuaSurface.html#LuaSurface.pollute

for any information.

Hope this helps!!!

3 years ago

Beerware if you do that only fir the fun
Mit = it's mine, and only mine
gnu_gpl, = evryone can use, just credit me to my contribution.

3 years ago

tiberium dawn, mushroomcloud
and maybe solve my problem with ks power

3 years ago

Beerware if you do that only fir the fun
Mit = it's mine, and only mine
gnu_gpl, = evryone can use, just credit me to my contribution.

OK, that isn't my understanding of those licenses having looked at them myself.
The relevant Wikipedia pages seem to give a good summary:
https://en.wikipedia.org/wiki/MIT_License
https://en.wikipedia.org/wiki/GNU_General_Public_License
https://en.wikipedia.org/wiki/Copyleft
I am not a lawyer, so I'm not all that comfortable giving advice on this topic, but the MIT license is very permissive.

tiberium dawn, mushroomcloud
and maybe solve my problem with ks power

If you want an intelligent way of adding pollution, I don't have that, True-Nukes is mostly scripting based anyway, so I just added the surface.pollute to the script, and called it a day. If you want to pollute after a atomic weapon impact, then I don't think you have much of an option other than to add a script trigger effect. The Factorio wiki prototypes page is very helpful on this kind of thing:
https://wiki.factorio.com/Prototype_definitions
and looking into TriggerEffects can also be very helpful, as that's most of how the game processes weapon impacts, etc.
https://wiki.factorio.com/Types/TriggerEffect

I still don't really know what you are aiming to do. I'm guessing you want to make the mods you were talking about pollute in a better way, maybe have weapons which drop pollution on impact? Or for KS power aiming to make the pollution work better?
Either way I don't really have much I can do, again, I just add a script trigger effect into the weapons and do it all in lua, that won't help for KS power, as you'd have to run the script every frame for every generator, which would slow the game down too much, and I'm not sure what you want to do to tiberium dawn.
MushroomCloud I can see, and would be relatively simple to add, considering that the mod already has a script running to make the pretty graphics work - I have used large parts of its code base, so I know how it works.

New response