Sid Meier's Civilization VI

Sid Meier's Civilization VI

Automated Builders + Archaeologists (2018) [DEPRECATED]
 This topic has been pinned, so it's probably important
Kyl  [developer] 25 Dec, 2017 @ 1:02am
How to Change the Mod Settings
In Game Mod Settings are now available. Just click "Settings" button after selecting a Builder to bring up the mod settings.


NOTE: While you can change the settings in the game, defaults are reloaded every time you load the game. In order to change the default settings, you must do some simple file editing.

IMPORTANT: Editing game files, including those from mods, may cause de-syncs in multiplayer games. In multiplayer games, you may just have to make the changes on game load in the in game mod settings menu.


1. Civ VI must be closed in order to make changes. Go to C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\1243167006\

2. Make a copy of AutoBuilders_Settings.sql, put it in the same location and rename it to AutoBuilders_LocalSettings.sql

3. Open AutoBuilders_LocalSettings.sql with any text editor, this is the file where you can make changes

4. If you are familiar with the in game settings, all of the values in the file should make sense. Change what you want and then save the file. A score for an action less than -100 will disable that type. Now you can start Civ VI and your custom settings will load by default whenever you load a game!

5. Finally, remember that you can add your own settings for specific improvements! Just add a value to the table with your desired improvement variable.


Automated Builders Settings

Let's start with more information about how the code processes Builder decisions.

- Automated Builders will not choose the same plot. They will also not choose a plot that they cannot move to, if it is occupied by an enemy or another civilian.
- If an enemy unit or another civilian moves into the plot a Builder is targeting, the Builder's action will be refreshed and they will target something else.

- For any given plot, the default priority for selecting an action is Repair > Repair road > Improve Resource > Build unique improvement > Build improvement

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1439604204

- If a Builder has to choose between multiple non-unique improvements on a plot, it will go by some numbers in the settings. By default it is Mine > Beach Resort > Farm for normal improvements. If there are multiple unique improvements possible, by default Colossal Head (from La Venta suzerain), Fishery, or City Park will not be chosen.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1439604221


- When a Builder is deciding what to do, each plot in your territory is given a base score based on the action determined for that plot. You can check out the mod settings to see the numbers. Repairing stuff and improving resources is given very high scoring, they have to be very far away before a Builder will ignore them.

- The base score for each plot is reduced based on how far away the plot is from the Builder. You can control how much distance matters by changing the Builder Distance setting.The plot with the highest score is chosen.



Automated Builders only perform certain actions such as repairing improvements and roads
- Move the slider for that action all the way to the left. You will notice that action is now disabled.

Change how important distance from Builder is when they are deciding what to do
- Change the value for Builder Distance. This value will be taken from the plot score for every tile away the Builder is.

If there are multiple improvements to choose from for one plot, what will be chosen?
- This is controlled by Improvement Priorities. The default value for an improvement is 0 (if it is not defined here). If something has a higher value than anything else on the list, it will be chosen over other improvements. You can see by default that a mine will always be chosen over a farm if a Builder has to choose.
Last edited by Kyl; 31 Jul, 2018 @ 10:22pm
< >
Showing 1-12 of 12 comments
Align 27 Feb, 2018 @ 1:31pm 
If I want to prioritize building forests with lumber mills over mines and farms, would that just be adding these two lines under local m_Improvement_Scoring?
m_Improvement_Scoring["IMPROVEMENT_LUMBER_MILL"] = 70;
m_Improvement_Scoring["IMPROVEMENT_FOREST"] = 60;
I'm just guessing at the internal name for the builder actions.
Kyl  [developer] 27 Feb, 2018 @ 3:24pm 
Originally posted by Align:
If I want to prioritize building forests with lumber mills over mines and farms, would that just be adding these two lines under local m_Improvement_Scoring?
m_Improvement_Scoring["IMPROVEMENT_LUMBER_MILL"] = 70;
m_Improvement_Scoring["IMPROVEMENT_FOREST"] = 60;
I'm just guessing at the internal name for the builder actions.

Good question. Keep in mind the m_Improvement_Scoring table is priorities for one plot, so if there are multiple options for one plot the values there determine which one they will build.

That being said, with b_RemoveFeatures set to false, Builders will actually never remove a forest unless they need to in order to improve a resource. Even if you set b_RemoveFeatures to true, Builders will always build an improvement over the feature rather than remove it (with default m_Scoring numbers).

Basically, you should not have to make those changes as by default the Builders will always put a lumber mill rather than removing and making a mine.

The m_Improvement_Scoring table has mines higher than farms, so on a hill tile with no feature, Builders will build mines there rather than farms.


Are you looking to do something else? It sounds like you might mean that you want them to make lumber mills in your borders first, and only after lumber mills are made then they can start making farms and mines?
Align 28 Feb, 2018 @ 1:23am 
I was thinking of late-game, when you can plant forests.
Kyl  [developer] 28 Feb, 2018 @ 8:35am 
Originally posted by Align:
I was thinking of late-game, when you can plant forests.

Ah! Currently, I have not implemented automated Builders building forests. Definitely something I will try to do in the future.
Jay 6 Mar, 2018 @ 10:31pm 
what do m_priorities mean?
racbio 19 May, 2018 @ 4:31am 
I'd like to make them clean the fallouts, how can I add this?
Kyl  [developer] 8 Jul, 2018 @ 2:41pm 
I updated the main post since In Game Mod Settings are now available.

Originally posted by Jay:
what do m_priorities mean?
That table is for deciding which action to choose for each individual plot. You shouldn't need to worry about it as much now as you can change the settings in game.

Originally posted by rodrigoagrellos:
I'd like to make them clean the fallouts, how can I add this?
Even without automation, I've had no luck getting Builders to clean fallouts in Civ 6 without dying quickly. I haven't implemented it here, and in the future I will write a custom pathing function so that automated units don't walk through contaminated areas.
Last edited by Kyl; 8 Jul, 2018 @ 2:54pm
Flynn 12 Oct, 2018 @ 10:32am 
If you put a value of '0' for the max number of unique improvements, and other settings like this, does that set it to unlimited?

Also is there a way to make it so they'll improve things more than 3 tiles away?
Kyl  [developer] 12 Oct, 2018 @ 5:45pm 
Originally posted by Flynn:
If you put a value of '0' for the max number of unique improvements, and other settings like this, does that set it to unlimited?

Also is there a way to make it so they'll improve things more than 3 tiles away?

Great questions. No, if you put in a value of 0 for max improvements they will not build those. I could recode the logic so that if it's negative, that will make it infinite. You can just set it really high for now.

Builders will improve strategic and luxury resources anywhere in your borders. There's also a setting to build farms within 4 tiles if the plot is next to another farm in the 3 tile range for adjacency. I could add a setting that has builders just improve any tile in your borders, then people could turn that on late game if they just want the tiles improved for visual satisfaction.
Flynn 13 Oct, 2018 @ 1:35pm 
Originally posted by MadManCam:
Originally posted by Flynn:
If you put a value of '0' for the max number of unique improvements, and other settings like this, does that set it to unlimited?

Also is there a way to make it so they'll improve things more than 3 tiles away?

Great questions. No, if you put in a value of 0 for max improvements they will not build those. I could recode the logic so that if it's negative, that will make it infinite. You can just set it really high for now.

Builders will improve strategic and luxury resources anywhere in your borders. There's also a setting to build farms within 4 tiles if the plot is next to another farm in the 3 tile range for adjacency. I could add a setting that has builders just improve any tile in your borders, then people could turn that on late game if they just want the tiles improved for visual satisfaction.


Those are some features I'd really love to see if you're up for it! Thanks for the reply and the info! :)

EDIT: Are you able to push the numbers higher than the sliders allow by changing it in the file itself?
Last edited by Flynn; 13 Oct, 2018 @ 1:58pm
saddog 1 May, 2019 @ 6:24am 
I really love this mod. One of the best and most important tools out there. Unfortunately though I'm missing the GS update. Is it on it's way?
Kyl  [developer] 21 Nov, 2020 @ 9:23am 
Okay, now I'm actually committing to making a new version of this mod with a new page in the near future. I'll post links once those are created.
< >
Showing 1-12 of 12 comments
Per page: 1530 50