Victoria 3

Victoria 3

Railway Automatic Expansion Fixed [DEPRECATED]
16 Comments
Ferrous  [author] Jun 19 @ 8:09am 
=D
Flounder Jun 19 @ 7:16am 
Nice work, devs noticed!
Ferrous  [author] Jun 17 @ 9:51am 
Basegame now uses the new infrastructure_delta trigger to check if a state needs new railroads instead of the old market access method.
As such I'm deprecating this mod
Ferrous  [author] Jan 7 @ 12:39am 
@udkudk
I like your idea, don't get me wrong, but I don't believe this is needed, or at least it is out of scope for this mod.

at that point it is up to the player to turn off auto construction (high level strategic decisions should be up to the player, not an written into an automatic rule)

the point of auto-construction is literally to get the game to automatically build more levels if it's still profitable to do so

And yes, i know how switch works
udkudk Jan 6 @ 9:05pm 
Here's my modified code for Railways:

xor_railway_auto_expand_rule = {
# Same as pre-modification
building_has_goods_shortage = no
NOT = { is_under_construction = yes }
occupancy >= 0.8

# Modified Sections

OR = {
# If infrastructure is low, Expand no matter what
state = {
relative_infrastructure < 1 # Checks percentage, so can't use number
}
# If infrastructure is enough, check profitability while preventing infinite auto expansion
AND = {
cash_reserves_ratio > 0.5
weekly_profit > 100
state = {
sg:transportation = {
state_goods_pricier > -0.25
}
}
}
}
}
udkudk Jan 6 @ 9:01pm 
Therefore I did a modification to your rules by adding following lines to compare LOCAL good price and only allow Auto Expansion if every other criteria already fits + related local good price is higher than -25%.

An example for Rail Way code addition:
state = {
sg:transportation = {
state_goods_pricier > -0.25
}
}

To not create separate auto building construction build triggers for every building with separate good outputs:
Use SWITCH trigger to check for which building you're scoping from, and then scope to related good outputs. e.g. compare electricity in power plants, clothes in textile buildings etc...
Because of how SWITCH works, if a custom building exists, it will skip this section, allowing their mods to function with other triggers without breaking auto expansion.
udkudk Jan 6 @ 9:01pm 
I found a possible improvement to this mod to fix a problem:

If your buildings becomes too efficient as a result of modifier stacking via various ways (Power Bloc principles + technologies + certain laws + companies + even events and state traits), building in question becomes so profitable that Auto Expansion continuously expands building in question.

This results in very low good prices for those buildings because buildings are too profitable even at those prices, allowing an over-construction of buildings thanks to Auto Expansion rules.

Low Prices are good, but only to a point. They increase GDP much less and SOL increase doesn't matter much because of other good's expenses.
It's generally better to focus your construction capacity to other goods after price of goods falls to below -25%.
Ferrous  [author] Dec 11, 2024 @ 3:53am 
ok for 1.8.6
Ferrous  [author] Dec 5, 2024 @ 3:38am 
ok for 1.8.4
Ferrous  [author] Nov 28, 2024 @ 6:23am 
ok for 1.8.3
Bunkurs Aug 3, 2024 @ 4:21am 
I love you Ferrous
Ferrous  [author] Jul 23, 2024 @ 6:22pm 
=D
Ev Jul 23, 2024 @ 4:50pm 
Good to see you're still around and kicking! Hope you've been doing well!
Ferrous  [author] Jul 19, 2024 @ 12:40am 
Compatched with VTM
Ferrous  [author] Dec 9, 2023 @ 1:08am 
@Starry Inori
Sure, give this mod a shoutout (link it in the description) and you are good.
Starry Inori Dec 9, 2023 @ 12:55am 
I'm doing a railway overhaul Mod, could I use your content?