Nuclear Science


Adds nuclear science as Nauvis's science pack.

Content
a month ago
2.0
1.90K
Manufacturing

i Science Integration Automation

3 months ago

Hi! First off, great mod! I'm enjoying it.

I'm wondering how feasible it would be to programmatically walk the science tree and add the science to relevant recipes. It might be easier then adding hard integrations with other mods (or cause more problems).

Some example ideas:
- If something requires all 3 other planet sciences (electro, magnetic, agri) then go ahead and automatically add nuclear
- If something has "nuclear" or "Uranium" in the title go ahead and add nuclear science.
- Maybe there is a tree walk you could do to see if Uranium processing or other "Nauvis-associated" techs are needed for something to go ahead and just add Nuclear.

Just spit-balling ideas. Thanks again for the great mod!

3 months ago

Thank you for the comment and ideas, they're always welcome.

Programmatically walking the technology prototypes is something that is possible. I have various helper functions that take a technology prototype and modify them. Currently, the mod iterates over all technologies, detects a dependency on Uranium processing, removes it, replacing it with a dependency on Nuclear science pack and adding the Nuclear science pack to the cost. Other operations are done on hard coded lists of technologies -- if you want to see the code, it's in prototypes/technology.lua.

The reason it's done like this at the moment is there are a lot of edge cases that need special handling -- Atomic bomb, Kovarex and the trigger tech chain are the big ones. Then further special handling is required, depending on the starting planet (the mod really is designed to be used with Any Planet Start).

I could certainly do more programmatically than I am currently, and will be looking into how to implement that, as part of overall code clean up and restructure.

However, it's not a silver bullet for mod compatibility. This mod does all it's work in the data.lua stage, and without dependency declarations it will load before most other mods (because the internal name begins with a), so it will miss those mods. Even for mods before this one in the load order may do work in the data-updates.lua or data-final-fixes.lua stages, which this mod will miss. I could (and probably should) move technology manipulations to data-updates, but data-final-fixes really should be reserved for very intentional targetted fixes rather than general compatibility, to deal with inevitable weird edge cases.

Short version: I'm going to do what I can to programmatically add compatibility, but proper support for other mods will often need manual intervention, sadly. If there are mods you specifically want, please let me know.

3 months ago

Thanks for the detailed and insightful reply!

New response