Noxys Waterfill

by _Noxy_

Various placeable waters. Very configurable.

Utilities
a day ago
0.15 - 2.0
28.0K

b Crash on Disable Green Setting

3 years ago

It appears the game crashes, if I try to disable green water. Here's the settings I have each time its crashed thus far, and the error message;

Error; data-updates.lua:24: attempt to index field '?' (a nil value)

Deep Enabled
Green Disabled
Green Uranium Disabled (causes error if enabled with custom recipes)
Research Required
Normal difficulty
20 craft 20 time
Normal Water: fluid:water=1500,item:explosives=2
Deep Water: fluid:water=3000,item:explosives=6
Green Water: fluid:water=1500,item:explosives=2,item:uranium-238=1
Deep Green: fluid:water=3000,item:explosives=6,item:uranium-238=3
Shallow Water: fluid:water=500
Muddy Water: fluid:water=750,item:explosives=1

If I might offer a suggestion for these settings,
Put the water items in order of walking speed default settings from your other mod. Shallow, Muddy, Water, Green Water, Deep Water, Deep Green Water.

You might also remove the boolean values for enabling green water, and instead allow each recipe to be disabled by typing "Disabled" into its crafting recipe slot. An if else statement first checks if that item contains "disabled" or an invalid value in it before it executes the recipe stuff. This way if someone types in something wrong, the checker will disable it if its invalid, and allow people to disable the shallower waters, which is what I'd like to do. After that, you can default it to the default crafting settings for "normal" difficulty and then people can alter it themselves freely.

I didn't end up liking the shallow water, its just grey water by the looks of it.

--
Through testing, it appears that this crash only happens, if you have a custom recipe for green water filled in, if you disable green water. Which means you cannot save your entered recipe for it for enabling later on with ease, going back around to my suggestion of just having the field allow you to type in "Disabled" into it.

3 years ago
(updated 3 years ago)

It crashes because you are using a recipe override for green water. The override is, as the setting implies, an override and if set will always apply regardless of any other settings. Make sure if you disable the green water to also clear the related overrides.

The setting tooltips for the overrides warn you about the dangers. The overrides are there for advanced users or mod pack makers that want to be able to tweak the recipe beyond the normal boolean settings. Therefore I will not makes these dangerous settings the only way to alter the mod behavior. There is also no easy and reliable way to determine if whichever you input into the overrides is actually valid. This is the reasons why they have a big warning.

New response