I was interested in creating a mod that added some different types of drills, one that mines slower, but gives more overall resources, one that mines faster, but gives less overall resources and one that helps clear a mining patch by mining ores quickly with high resource drain and mining speed that deletes ores (probably recipe would require a recycler, tbd), but when I set the resource_drain_rate_percent to 1000 on the big miner to try it, the game failed to load and said 0-255. When I set it to 255, it said must be between 0 and 100. If possible, I'd love to be able to set it higher than 100!
Thanks!
Allow for higher resource_drain_rate_percent on miners
-
demonicpigg
- Burner Inserter

- Posts: 5
- Joined: Wed Nov 20, 2024 3:31 am
- Contact:
Re: Allow for higher resource_drain_rate_percent on miners
Seconded on this one. Would be very nice to have for a potential ClaustOrephobic space age planet.
Re: Allow for higher resource_drain_rate_percent on miners
At the very least, the error should say the correct range from the start.
Re: Allow for higher resource_drain_rate_percent on miners
There are 2 stages to validating any numbers the engine needs from Lua:curiosity wrote: Wed Nov 20, 2024 7:30 pm At the very least, the error should say the correct range from the start.
1. Validate the double-value is within range of the C++ data type (double -> uint8 is valid) - this is where "0-255" comes from
2. Any prototype-specific limitations something wants to enforce (uint8 within 0-100 range) - this is where the second error comes from.
This is not likely to ever change as it would add a *ton* of boilerplate to the engine logic for something that realistically doesn't happen in the grand scheme of mod development (it happens once, you fix it, and it stays fixed for the lifetime of the mod version in the hundreds to thousands of times players install and use it).
If you want to get ahold of me I'm almost always on Discord.


