Allow for higher resource_drain_rate_percent on miners

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
demonicpigg
Burner Inserter
Burner Inserter
Posts: 5
Joined: Wed Nov 20, 2024 3:31 am
Contact:

Allow for higher resource_drain_rate_percent on miners

Post by demonicpigg »

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!
braxbro
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Jan 01, 2023 2:54 am
Contact:

Re: Allow for higher resource_drain_rate_percent on miners

Post by braxbro »

Seconded on this one. Would be very nice to have for a potential ClaustOrephobic space age planet.
curiosity
Filter Inserter
Filter Inserter
Posts: 728
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Allow for higher resource_drain_rate_percent on miners

Post by curiosity »

At the very least, the error should say the correct range from the start.
Pedgux
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Dec 31, 2024 3:57 pm
Contact:

Re: Allow for higher resource_drain_rate_percent on miners

Post by Pedgux »

Bump.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17413
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow for higher resource_drain_rate_percent on miners

Post by Rseding91 »

curiosity wrote: Wed Nov 20, 2024 7:30 pm At the very least, the error should say the correct range from the start.
There are 2 stages to validating any numbers the engine needs from Lua:

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.
Post Reply

Return to “Modding interface requests”