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

b Script Raised Destroy

2 years ago

Hello again my friend!

This one is pretty short: the nuke scripts should use {raise_destroy = true} in order to avoid problems with certain mods which will crash when they don't know their entities were removed. i.e. Space Exploration and it's compound entities.

The lag shouldn't be too much higher with raise_destroy, but it will remove the chances of crashes from scripts expecting entities that don't exist anymore.

(you can easily leave out trees, though. nobody's tracking trees with scripts)

2 years ago

I'll do that asap (might be a day or 2, as I'm quite busy IRL right now) - thanks for the heads up!
I never saw the option, so that's entirely my fault, oops!

2 years ago

OK, I think the new version should do it - I also didn't raise_destroy on any entity in the corpse_map - which just includes the enemy - or any resources. Actually I only used destroy after calling die, so there shouldn't have been an easy to encounter problem anyway.

2 years ago

I got bamboozled. It turns out that even if script_raised_destroy is true, the crash still happens. The SE mod guys told me it was because the script wasn't raised in the explosion, but I later found the issue actually had to do with the order in which the entities were destroyed, which was an easy fix on their end after I brought it up to them. Still a good idea to raise the event regardless, though.

Also congrats on passing 30k downloads!

2 years ago

OK, no problem, thought it was odd that that might be a problem, though I couldn't remember why until I looked. To actually trigger a destroy, your entity would have to survive a die() call, then crash on a destroy() call, which would be some pretty weird code - still can't hurt to be sure.

Thanks!!! Woohoo!!

2 years ago

Hi, my mod Treeees is tracking trees via script and i got another mod in the making which does the same trick.

Can you please add script_raise_destroy for trees as well?

2 years ago

OK, fine I guess - this might have substantial performance issues, so I will have an option to disable it - if it causes performance problems even without your mod, the option might end up off by default.
I destroy a lot of trees, so I can't tell how bad the effects might be - some of my largest improvements in performance were through things like using destroy on trees, as otherwise the particle system itself could crash the game.
I am really busy at the minute, so I can't guarantee that I'll be able to do it anytime soon, particularly as I don't have a decent PC to test things on.

2 years ago

I've still not done this, but I'm just replying here to remind myself I should do (and I should test the performance as well).

2 years ago

OK, I've looked at this (and had bug reports relating to raise_destroy), why can't your mod check validity before handling tree related stuff?
I'm sure there are edge cases on this, but most of the time that's sufficient (and will avoid a big nuke raising 100,000 script handlers in a frame)...

New response