Competent Auto Expand

If you liked this item, please rate it up on Steam Workshop page.

Author: knogleknuser

Last revision: 28 Sep, 2024 at 15:22 UTC (5)

File size: 7.8 MB

On Steam Workshop

Description:

Makes auto expand something that helps with the running of the country, rather than actively sabotage it, especially if buildings are subsidized.
NOTE: Does not touch the autonomous construction AI, or any AI.

——————————-

Features

1. An idiot author, whom used way too much time on this, and therefor lost their patience

2. Raw code as the description. Removed, check images.

3. In game tool tip mistakes due to missing localisation files. Fixed, even made some vanilla tooltips better.

4. Much better and nicer auto build. Reduced micro by a lot, even more if you up the amount of construction that can be used on a single building. (Download some other mod for that)

5. An author with a fragile ego.

6. Feel free to steal anything you like or re upload.

7. Feel free to test better requirements for the auto build.

8. I know nothing about coding, apart from what I learned in order to do basic PDX modding. Which at this level isn’t even coding imho.
So if you are someone competent, feel free to give me better code or something idk.

9. I hate bugs, so please give me reports or call a exterminator.

New Default Auto Expand Rules

Basically 3 different rule sets depending on how profitable the building is.

Rule 1A:
Needs to have almost full cash reserves, available labour in the state, and unused construction

Strictest requirements due to low, yet barely profitable productivity

Rule 2A:
Needs to have almost full cash reserves, available labour in the state, and unused construction or less than 31 weeks of government construction queued up

A bit stricter requirements due to just being productive

Rule 3A:
Needs to have almost full cash reserves, available labour in the state, and unused construction or less than 62 weeks of government construction queued up

Extremely productive, no additional requirements.

New Railroad Auto Expand Rules

Rule 1B:
Basically expand when infrastructure is low, otherwise use the new default rules.

Ultra New Government Auto Expand Rules

Rule 1C:
Basically expand when tax capacity is lacking, otherwise use the new default rules. (Which will never apply in vanilla due to a complete lack of profit)

PDX Auto Expand Default (Vanilla values)

Check the image

PDX Auto Expand Railroad (Vanilla values)

Check the image

PDX Auto Expand Government (Vanilla values)

N/A

Not a feature in vanilla

Get rolled PDX >.< Welp, it is now, took ya a while!
You even expand when lacking bureaucracy, good on ya! Though, pretty sure most players would prefer to stack the government buildings in the same state, for throughput, if they want more bureaucracy, so I am not including that feature.

End of features

——————————-

Compatibility – And why this mods is almost guaranteed to work even without updates

This mod overwrites only the following vanilla objects:

1} Default Auto Expand Rule (Duh)
(Should work fine regardless of mods)
(the devs sometimes change things in modding code that means it can be broken by a major update)

2} Administration Building
(Might be broken by other mods)
(Probably a bit weird, balance wise, after a major updates)

3} Railroad Building
(Might be broken by other mods)
(Probably a bit weird, balance wise, after a major updates)

NOTE: In Victoria 3, building files only define:
1) Production groups (IE. the groups of production methods this building has, but not what they actually contain or do).
2) The build cost (In construction)
3) AI value informing the AI of the building’s priority
4) Its non-default auto expand rule, including if default is disabled. (Counts as not being the default rule) (The fact auto expand rule is defined here is why I am overwriting these files in the first place, could be a separate mod though…)

—————————

Known Bugs

-Some of the requirements aren’t listed in the tool tip, they still work but lack a correct localisation file. Dunno how to fix this yet, its due to PDX never expecting the player to see some of the requirements in a tool tip. FIXED!

——————————–

To Do

Last Updated – 15/11/2023
1. Play more Vicky 3
2. Make this page suck less, use words dammit! -(Make me!) Done
3. Add some images, make it nice! -(Kinda done, now I just need to fix localisation before they are very nice) Done

4. Fix the ♥♥♥♥♥♥♥♥ localisation bug, why PDX? WHY DO YOU MAKE ME DO THIS? (Maybe I should move this to pipe dreams…) Done
5. Only auto expand railroads for profit reasons when they are NOT set to cargo prioritization DONE! No longer a good idea with transportation being a local only good

5.1. Update the description and pictures, but eh, its a very minor discrepancy so who cares.

6. Add a requirement to default auto expand that the building is above the national average in productivity
7. Add more (Currenly: Value) in the tooltip
8. Add a check that if the building is subsidised, then don’t auto expand due to profit if the government is paying it more than the building is profitable.
9. Add a check that the state construction efficiency is above or equal to the natural minimum (Don’t build in states with like -50 construction efficiency)

Pipe Dreams
-Make some gamerules that decide how it all works, allows you, the user, to fine tune it yourself.


-If there are multiple valid auto expands, pick the most productive or profitable one.
-The ability for auto expand to queue the same building in the same state multiple times.
hardcoded, I can’t as a modder 🙁
Unless I can create my own ‘AI’ and overwrite the whole auto-expand system with my own? (IE the buttons use my system instead of vanilla)
hmmm…..

-Add a button that forced all current and future buildings to have auto-expand on(Apart from player selected exceptions)

-Add a way to create presets for the country and for states, the preset sets all buildings of the same type in that country/state to have auto-expand on/off, think a spreadsheet where you decide which buildings types you would like to always have auto-expand on, on either a country or state level.

-A new map UI element that allows the player to turn on/off auto construct for all buildings in a state, the same kinda style you use to incorporate states or enact degrees.