Automated Builders + Archaeologists

Automated Builders + Archaeologists BETA 0.98.2

MadManCam

Chieftain
Joined
May 5, 2017
Messages
66
Location
Minnesota, United States
MadManCam submitted a new resource:

Automated Builders + Archaeologists - Rewritten Builder + Archaeologist automation code for human players

Tired of wasting time scanning the map for artifacts? Playing a late game and have had your fill of micro-managing your dozen or more Builders? Builders and Archaeologists have a new action button that will turn on/off automation for all of their actions. Can be used with both new games and single player saved games.

Will it work with my other mod?
- It should load all resources from mods like Resourceful and should obey all rules from the database (including from mods). For example,...

Read more about this resource...
 
How to Change the Mod Settings

In Game Mod Settings are finally here! Just click "Settings" button after selecting a Builder to bring up the game 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 the main mod folder.

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

6FV3NM0.jpg


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

fQoecGl.jpg



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

wcqqOv2.jpg




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:
How to Report a Bug

You are NOT experiencing a bug if:
- The game kicks you back to main menu when you try to start/load a game. This is caused by another one of your mods that is having an error updating the database. This mod only adds some settings to the database and should not cause any issues.


You are experiencing a bug if:
- You've tried the "Troubleshooting" discussion and still don't see a button to automate Builders or Archaeologists.
- You press the automate/stop automation button and nothing happens (the action doesn't switch to the opposite from what you just pressed, i.e. automate --> stop automation)
- The game is making you select an action for a Builder/Archaeologist that is currently automated.
- An automated Builder is sitting around doing nothing, but there is clearly something to do anywhere in your borders AND you have checked the action scores in the mod settings.
- Automated Builders are trying to target a plot that is not in your territory.
- Anything else that is different from what I have described should be happening.


Please follow these steps to report a bug:
- If you aren't able to go through some of the work below, please at least let me know and provide some screenshots if possible and info about your game. Thanks!


1. Once you get to where the bug occurs, stop and take any screenshots if it will help others understand the issue you had.
2. Close the game. This is so that the log files are saved and the last bit of information will be from when you saw the bug.
- Go to C:\Users\<User Name>\Documents\My Games\Sid Meier's Civilization VI\Logs\ (the file path is different on Mac, I think it is /Library/Application Support/Sid Meier's Civilization VI/Logs/)
3. Open the Lua.log with any text editor (Notepad or Wordpad on Windows). Copy all of the contents to clipboard.
4. Go to www.pastebin.com, and paste the Lua.log contents you copied into the "New Paste" box. Make sure the exposure is "Public" then click "Create New Paste".
- Now that you've created the paste, you can copy the url that was generated for it and share that link for anyone to view.
5. Make a post describing the bug you found. Please also describe your game setup (Which leader? Single/Multi player? Standard ruleset? Number of players?) and your PC setup (Windows? Mac?)
6. Make sure to include in your post any relevant mods you were using that include resources or improvements.
7. As a final part of the bug report, add the pastebin url you made for the Lua.log contents. Don't paste the Lua.log contents directly into your discussion post.
8. If you have a screenshot post that as well.

- Thanks for going through all that work to help make the mod better!

Please remember that it is VERY difficult for me to fix bugs that I haven't been able to produce on my own computer without the Lua.log contents from your game! Posting them is very helpful to me!
 
Last edited:
MadManCam updated Automated Builders + Archaeologists with a new update entry:

More Mac/Linux Compatibility

- Updated actual automation code for compatibility with games without the Fall 2017 patch: If the Fall 2017 patch is not installed, Automated units will no longer try to target plots that have religious units since they did not have their own layer until this patch.

- Enemy spies should no longer block Automated units targeting the plot. This didn't really affect automated Builders or Archaeologists since they never targeted plots with districts anyways, but it will be important for future...

Read the rest of this update entry...
 
MadManCam updated Automated Builders + Archaeologists with a new update entry:

Some bug fixes.

- Fixed a bug where the mod would only ever recognize one leader/civilization with a unique improvement. This would have caused issues if you were playing with a mod that gives a trait for a unique improvement to multiple default/modded leaders.

- Fixed a "ghost unit" issue where newly created units had a small chance of becoming automated right away and bugging out, taking on the automation from a previously destroyed/spent unit if the game assigned them the old unit's ID.

- Tried to fix...

Read the rest of this update entry...
 
By the way, WE HAVE THE FALL PATCH NOW!! Yay!!!

-Signed Mac Users


p.s. may I put in a request next time you are working on this? I accidentally set a builder on automate when I was trying to get it to do something else. Is there any way to put in a confirm (just for builders)? If not, it's okay. I'm trying to be more careful.
 
By the way, WE HAVE THE FALL PATCH NOW!! Yay!!!

-Signed Mac Users


p.s. may I put in a request next time you are working on this? I accidentally set a builder on automate when I was trying to get it to do something else. Is there any way to put in a confirm (just for builders)? If not, it's okay. I'm trying to be more careful.

Great, glad you finally got that patch because it was a nice one!

I'm not planning on adding anything like that currently. It could possibly be another mod, though, adding a confirm yes or no button before actually pressing some options, possibly with settings for which actions to double check.
 
Troubleshooting

Follow these steps if you cannot see the automate button in game.

This can happen some times with mods that are marked as "not affecting save games". What that means is the mod can be loaded with your saved games since it doesn't change anything in the database. However, there seems to a bug where the game doesn't load these types of mods sometimes. The solution I have found is:

1. Starting a new game with all the mods you want enabled (or working with a game you've already started and saved), and save that game.

2. Once that game is saved, go into Additional Content and disable all community mods.

3. Enable the mods you have that are marked as not affecting saved games (such as the Free Camera mod). Game saves that were already started with mods marked as affecting saved games will automatically load that mod, even if they are disabled in Additional Content.

4. Now try to load your saved game.
 
MadManCam updated Automated Builders + Archaeologists with a new update entry:

Rise and Fall + UI Summer Update

General Fixes and Changes
- Enforce sea/land domain rule for improvements. This fixes issues with improving resources that have both land and sea improvements (such as Amber).
- Updated selection algorithm to address undesired action switching.
- Enforce new improvement rules added by Rise and Fall expansion.
- Indonesia Kampung (and any modded improvements with same requirements): Properly check if the plot is next to a sea resource as required.
- Fishery, City Park: Properly check...

Read the rest of this update entry...
 
By the way, WE HAVE THE FALL PATCH NOW!! Yay!!!

-Signed Mac Users


p.s. may I put in a request next time you are working on this? I accidentally set a builder on automate when I was trying to get it to do something else. Is there any way to put in a confirm (just for builders)? If not, it's okay. I'm trying to be more careful.

Hey, sorry for following up so late. In the last update, I added a new UI for the automation, so the button is no longer on the main action bar. This should help with accidental clicks.

I am planning on adding another window (that can be minimized) with a list of units, and you can select them, then click an "Automate all" button. I definitely will have a confirm button for something like that.
 
Back
Top Bottom