Nuclear Overhaul

by RedRafe

This mod reshapes the steps of nuclear processing to be more complex and realistic. Introducing 3 new types of nuclear reactors emulating the different power plants in real life, plus new elements of the periodic table to generate nuclear fuel and later, with nuclear wastes, powerful weapons.

Content
6 months ago
1.1
1.50K
Combat Armor Environment Mining Manufacturing Power

g [Solved] K2 Radioactivity

6 months ago

Would it be possible to have the new nuclear entities utilize the K2 radioactivity "feature"?

6 months ago
(updated 6 months ago)

I have submitted a pull request for Krastorio2 to add Nuclear Overhaul compatibility.
https://github.com/raiguard/Krastorio2/pull/429

I think the same or similar can be done in your code, but I have not figured out how to do the remote calls.

Edit: And suddenly my code change above is no longer working for me. I closed the pull request.

6 months ago
(updated 6 months ago)

There is a K2 remote interface for this:

remote.call("kr-radioactivity", "add_entity", "thorium-ore")

remote.call("kr-radioactivity", "add_item", "neptunium-237")
remote.call("kr-radioactivity", "add_item", "plutonium-238")
remote.call("kr-radioactivity", "add_item", "plutonium-239")
remote.call("kr-radioactivity", "add_item", "plutonium-fuel")
remote.call("kr-radioactivity", "add_item", "plutonium-mox")
remote.call("kr-radioactivity", "add_item", "protactinium-233")
remote.call("kr-radioactivity", "add_item", "protactinium-234")
remote.call("kr-radioactivity", "add_item", "thorium-232")
remote.call("kr-radioactivity", "add_item", "thorium-233")
remote.call("kr-radioactivity", "add_item", "thorium-fuel")
remote.call("kr-radioactivity", "add_item", "thorium-mox")
remote.call("kr-radioactivity", "add_item", "thorium-ore")
remote.call("kr-radioactivity", "add_item", "uranium-233")
remote.call("kr-radioactivity", "add_item", "uranium-234")
remote.call("kr-radioactivity", "add_item", "uranium-236")
remote.call("kr-radioactivity", "add_item", "uranium-237")
remote.call("kr-radioactivity", "add_item", "uranium-mox")
remote.call("kr-radioactivity", "add_item", "used-plutonium-mox")
remote.call("kr-radioactivity", "add_item", "used-thorium-mox")
remote.call("kr-radioactivity", "add_item", "used-uranium-mox")

I pretty much gave up trying to get this to work, no doubt it is due to my lack of knowledge.
I just hard coded the these into the K2 constants.lua file... an ugly thing to do, but it works.
So I have it working for me, probably not many others wishing to have radioactivity kill them.
But if interested, here is what I modified in Krastrio2's ./scripts/constants.lua :

constants.radioactivity_defaults = {
  {
    type = "entity",
    tbl = "entities",
    objects = {
      "uranium-ore",
      "thorium-ore"
    }
  },
  {
    type = "item",
    tbl = "items",
    objects = {
      "nuclear-fuel",
      "uranium-235",
      "uranium-238",
      "uranium-fuel-cell",
      "uranium-ore",
      "used-up-uranium-fuel-cell",
      "neptunium-237",
      "plutonium-238",
      "plutonium-239",
      "plutonium-fuel",
      "plutonium-mox",
      "protactinium-233",
      "protactinium-234",
      "thorium-232",
      "thorium-233",
      "thorium-fuel",
      "thorium-mox",
      "thorium-ore",
      "uranium-233",
      "uranium-234",
      "uranium-236",
      "uranium-237",
      "uranium-mox",
      "used-plutonium-mox",
      "used-thorium-mox",
      "used-uranium-mox"
    },
  },
}
6 months ago

I have submitted a pull request to the nuclear-overhaul repo, for the purpose of adding support for K2 radioactivity.

6 months ago

Thanks, I've added it now :)

6 months ago

With my current save, it has stopped working. It did work after the update. This was driving me nuts, get it working and then it just seems to not work upon some future startup. If I start a new game, it seems to work each time (but will it continue?). I was considering a fresh start anyway, guess I will find out.

6 months ago

I started fresh and have seen the issue again after a few saves. I step on the Thorium patch and no radiation damage. I then saved, quit and restarted and it started working again. But a this does not always "fix" the issue. Think it might be an issue with the interface?

6 months ago
(updated 6 months ago)

I cannot reproduce the bug. Every new save and any reload of saves does show the radioactive damage. Are you sure you're in sync with latest version of both mods?
If so, and if the radioactive comes and goes, I may need a copy of the save to sync your modlist and look if there's any mod interfering

6 months ago

Hopefully this works for you:
https://drive.google.com/file/d/1mqPNOaGv9akqnH65UWgxdENA138mZWbn/view?usp=sharing

Load the game, when prompted about mods not in sync, just load it, no syncing.
Run north to the thorium patch, should not have radiation effects.
Move away and save game to a new save, and exit Factorio.
Restart Factorio and load the new save, walk back to the thorium patch, should now have radiation effects.

I have confirmed radiation effects still work for uranium patches. So it seems that somehow, it reverts to the original K2 setting.

6 months ago
(updated 6 months ago)

Oh gosh. I zipped up the entire Factorio folder, so game, mods, everything.
Also a very important point, this is the Mac version. I guess you can just grab the mods and the save, I think it should work.
There are folders in the mods folder... you need those too. I make changes to some mods in those folders. Sloppy but how I do it.

6 months ago

Thank you, now it's actually solved ;)

6 months ago

Nice, thank you!

This thread has been locked.