Page 1 of 1
[MOD 0.17] Configurable Underground Lengths
Posted: Sat Feb 03, 2018 9:47 pm
by Oktokolo
Configurable Underground Lengths (
GitHub) allows to configure the amount of tiles, underground pipes and belts can skip.
To be used with pure vanilla or mods that add or change tiers of underground pipes and/or belts.
Supports setting the skippable tiles (maximum underground distance) of up to 5 tiers of pipes and 8 tiers of belts. Pipes/belts above tier 5/8 will inherit settings for tier 5/8.
Allows to change selected tiers of pipes and/or belts only. Default values of -1 indicate to not change the value set by vanilla or mods.
Tiers are detected by skippable tiles defined before applying configured values.
Does not add any tiers itself and executes no code after the data-final-fixes phase for maximum mod compatibility. Tested with vanilla and bob's logistics, but should work fine with all mods not adding or altering underground pipes or belts in the data-final-fixes phase.
Re: [MOD 0.16.x] Configurable Underground Lengths
Posted: Sun Feb 04, 2018 11:02 pm
by SilentCrim
Excellent mod, already don't know how I lived without it.
A couple of things to note. First is that the actual values of each tier of belt's max distance seems to correspond to the tier above it. E.g., if my settings look like this:
UG belt - tier 1: 10
UG belt - tier 2: 20
UG belt - tier 3: 30
The actual values end up being
Tier 1: 20
Tier 2: 30
Tier 3: unchanged (or whatever tier 4 would have been)
Not a big issue for me, just thought I'd let you know.
Secondly, I wanted to use this alongside the Subterranean mod and I was able to do so by only letting the mod change belts with values lower than the desired new value. It only took 1 line of code:
Code: Select all
if (item.max_distance < skip_dist + 1) then
item.max_distance = skip_dist + 1
end
I understand you may not want to put this into the official mod, as it would mean there would be no reducing the max_distance below default values, but figured I'd point it out anyway.
Re: [MOD 0.16.x] Configurable Underground Lengths
Posted: Mon Feb 05, 2018 1:08 am
by Oktokolo
SilentCrim wrote:
First is that the actual values of each tier of belt's max distance seems to correspond to the tier above it.
SilentCrim wrote:
Secondly, I wanted to use this alongside the Subterranean mod and I was able to do so by only letting the mod change belts with values lower than the desired new value.
Just tested it with Subterranean and it worked as expected: Subterranean underground pipes are tier 2, the underground belts (all three of them, because they are all of the same length) are tier 4 (with vanilla yellow/red/blue beeing tier 1/2/3).
I can reduce Subterranean's maximum length as expected and they keep able to span 254 tiles if i let their tier configured at -1 (the special "don't change this tier" value, that also is the default for all tiers).
I can't increase their (already ridiculous) length of 254 any further because i limited my mod at 100 though (thought "that should be enough for everyone" *g*).
Tiers are determined by maximum length before my mod applies the configured changes. So if you, for example, have a mod that defines lowend underground belts shorter than yellow, they would become tier 1 and yellow/red/blue would become tier 2/3/4 (all subterranean underground belts would then be tier 5 instead of 4).
What other mods do you use?
Re: [MOD 0.16.x] Configurable Underground Lengths
Posted: Mon Feb 05, 2018 1:28 am
by SilentCrim
Tiers are determined by maximum length before my mod applies the configured changes. So if you, for example, have a mod that defines lowend underground belts shorter than yellow, they would become tier 1 and yellow/red/blue would become tier 2/3/4 (all subterranean underground belts would then be tier 5 instead of 4).
Oh I see, my fault then. I assumed tier was determined by belt speed. I set all the tiers before I started and didn't realize the subterranean ones would be affected (since deconstruction planners won't touch them and they generally behave differently from normal undergrounds). Now that I know that everything makes more sense.
What other mods do you use?
I'd give you a list but I don't want to overload the forum servers
. The only one I have that affects undergrounds though is bob's logistics. Either way I think the issue was human error and not compatibility.
I can't increase their (already ridiculous) length of 254 any further because i limited my mod at 100 though (thought "that should be enough for everyone" *g*).
254 IS pretty ridiculous. That's why I went in and changed the mod setting max to 250
Re: [MOD 0.16.x] Configurable Underground Lengths
Posted: Mon Feb 05, 2018 2:27 am
by Oktokolo
SilentCrim wrote:I'd give you a list but I don't want to overload the forum servers
but the only one I have that affects undergrounds is bob's logistics. But either way I think the issue was human error and not compatibility.
If it now all works, there of course is no need to post that insanely huge list of all mods that ever where created for Factorio.
Thank you for testing my mod with as much other mods as humanly possible as i do not use much mods myself.
SilentCrim wrote:254 IS pretty ridiculous. That's why I went in and changed the mod setting max to 500
Just released v0.1.1 with support for the empirically determined maximum distance allowed by the game. That maximum is 254 - leading to an internal value of 255, wich coincidentally is the maximum, an unsigned byte can hold and also the value used by the Subterranean mod in its protype definitions.
I doubt, that you are currently using any higher value.