Nuclear Science


Adds nuclear science as Nauvis's science pack.

Content
6 months ago
2.0
4.97K
Manufacturing

b Cant't handcraft science when using !skins mod

5 months ago
(updated 5 months ago)

After switching to a skin using the !skins (Skins Factored) changer with any skin, like Gear Girl 2.0 You lose the ability to handcraft Nauvis science packs.

You can find the save with Nuclear Science, and some !skins skins enabled with the material required to handcraft science I used for testing here

Its an issue with the character being swapped, not gonna act like I'm an expert here but when you aren't switched you're fine, but most of the other recipes still work, so I'd have to assume this is some error. Im just posting this to Nuclear Science because I've rarely seen this happen before, only once with Military Crafting on Castra so they're dealing with the same thing too, but I don't think the error is on !skins' end because I don't see it pop up often. (to my extremely limited knowledge)

5 months ago
(updated 5 months ago)

Ignore this reply~ I misclicked edit and quoted my own reply and submitted it instead of editing

2 months ago

I have created an external mod to fix this error.

Nuclear Science Crafting Fix

I was able to get a hacky fix going, I found this command, which displays all of the crafting categories the current player prototype has.

/c
if game.player.character and game.player.character.prototype then
  game.print("Crafting categories for: " .. game.player.character.prototype.name)
  for cat, enabled in pairs(game.player.character.prototype.crafting_categories or {}) do
    if enabled then
      game.print("- " .. cat)
    end
  end
else
  game.print("No valid character prototype found.")
end

I noticed that 2 were missing between Engineer and Gear Girl, (centrifuging-or-crafting + advanced-centrifuging-or-crafting) so I was able to hardcode those missing categories to apply to all characters prototypes as well. I'm honestly not entirely sure why this works, as I don't even know what the problem originally was since !skins seems to be compatible with 99% of other mods already, I have no idea why this would need to work like this, but the external fix is here for now and that's what I found. I've never uploaded a mod before, so the portal might be scuffed, but it functions exactly how it needs to.

Also yes this "fix" is just an exact replica of the Castra bug I mentioned earlier, I just changed "Castra" to "Nuclear Science" and the recipes respectively, almost everything including this comment was copy pasted lol.

Super excited to finally try these mods out after 2 months :) thanks for creating it in the first place!

2 months ago

My guess is !skins creates a new player in the world with different graphics whenever you switch skin. It will likely initialize the new player with a bunch of defaults, including hard coded crafting categories (which controls what you can hand craft). What skins! should be doing instead is copying the player crafting categories to the new player when its created (so it picks up any changes made by other mods).

I'm not great with the control.lua stage where !skins does most of its work, so I'm not sure if I can fix it from this mod. Ideally, !skins would update to include the fix.

2 months ago

I've fixed this in !skins version 1.3.5. The issue was actually in the data stage; !skins deepcopies the engineer character prototype in data-updates.lua, assuming mods would add their crafting categories to the engineer as early as possible (in data.lua), but i changed it so it also inserts any extra crafting categories added later to the created character prototypes. atanvarno, you don't need to change anything in Nuclear Science.

Notably, the characters' graphics, crafting categories, etc. must all be defined in the data stage, and !skins copies the existing engineer prototype instead of hard-coding the data (this is actually the whole reason i wrote !skins in the first place :) It just so happened that i was copying the data before you added it, and not double-checking if any changes were made afterwards.

2 months ago

Fantastic. Thank you

New response