Hi there,
I've been trying to use your mod for the past day or so and I noticed molybdenum/borax/niobium were not spawning infinite ores at all. I checked the patch notes and some time ago you apparently fixed this, but I still couldn't get it to work.
I tried older versions of the mod, and 0.21 and older didn't spawn any patches of these three ores at all. 0.22 fixes patches actually spawning, but no version ever actually spawned infinite patches for me.
Another issue is that these patches that do spawn without infinite ores (borax etc.) have much higher density per patch. On a given setting, I was seeing cronnitium/bobmonium etc. with roughly 400-600k per patch near my spawn. Borax would spawn with about 4M+. It didn't seem like it was following the correct generation rules (this is with RSO).
I looked through the ore files and the noticed a few things:
- For some reason,
Code: Select all
angelsmods.ores.enableinfiniteuraniumpower
is used as a condition for all three ore types to spawn infinite patches, I'm not really sure why. This wasn't effecting me because I had this option toggled on anyway, but I'm not sure why it's connected, maybe it was just copy and pasted to be edited, and accidentally forgotten about?
- Indentation is a bit of a mess - it seems that Angel uses tabs, you use spaces, and therefore the ore files have a mix of spaces and tabs and nothing quite lines up, including brackets. There are also a couple of extra nested if statements that aren't necessary.
- There is a fairly simple but serious error in the overrides section at the top - one of the if statements never closes until the very end of the file as it's missing another "end":
Code: Select all
if settings.startup["pymods-remove-regular-borax"].value then
-- Overriedes: borax ore
if data.raw.item["borax"] and angelsmods.refining then
data.raw.resource["borax"]["autoplace"] = nil
data.raw["autoplace-control"]["borax"] = nil
end
This means that none of the infinite ore code will actually run unless the option is checked to remove regular ore (in this case borax..) which would also prevent any borax from spawning at all.
This is the reason no infinite patches spawn. It could be an easy oversight given the messed up indentation as it's quite hard to follow the brackets and functions if they don't line up.
- There is also this line:
Code: Select all
local OV = angelsmods.functions.OV
It does nothing and is not referenced again in any of these ore files. I see that it's used for overrides in other files such as recipes, but it doesn't get used here.
- There are missing localisations for some of the mod settings. Also I couldn't find anywhere where the settings
and
are actually implemented. I had a look through most of the .lua files and there is no reference to them anywhere.
I thought I'd do my bit to help, so I've gone through and fixed all three ore files from scratch. All the indentation is re-done, excess if statements and checks have been cleaned up and I've fixed all the issues listed above. The only ones that remain an issue are the following:
- Localisation is still missing for a few settings. I wasn't quite sure what the settings do as they don't seem to be ever used, so I didn't want to add descriptions to those if I don't know what they're for.
- Py ores are still generating much larger/denser ore patches than other ores, particularly borax. This might be an issue with RSO. This also may not be a bug, I've never actually used any of the three ores in-game so I'm not sure how valuable or rare they are - it may be intended that they spawn this way.
It seems like at any given distance, the numbers are roughly double any other ore... It's hard to directly compare due to variation in the ore deposits. I've actually disabled all mods except for the barebones pyanodon mods to get their vanilla spawn algorithms, and still Borax appears to spawn larger, so I'm guessing this is intentional.
I've attached the following files for you and anyone who wishes to use them.
/prototypes/Ores/Borax.lua
/prototypes/Ores/Molybdenum.lua
/prototypes/Ores/Niobium.lua
Thanks for your work on this mod
