1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Automated Builders + Archaeologists BETA 0.98.0

Rewritten Builder + Archaeologist automation code for human players

  1. MadManCam
    Steam Workshop Page

    Recently updated for compatibility with Mac/Linux users. Please let me know if there are more issues (I have a PC and cannot test).

    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, if you have a mod that allows Farms on Tundra Builders should build those.

    I've done lots of testing, but if you run into any issues, please at least let me know or make a bug report (see discussion) if you can. There's plenty of leaders and mods that haven't actually had full play tests. If anything weird is happening, try stopping automation and re-automating the unit to try to refresh the data.

    There is a light version on the Steam Workshop where Automated Builders only perform repairs, but the same result can be achieved with this mod in the settings (see discussion)


    Archaeologists: Notes
    - When automated they will move to and excavate artifacts automatically. If there is nothing to do they will just sleep wherever they are, but will check at the beginning of each turn for something to do.
    - They don't care about nearby enemy units, but if they are captured I believe they just spawn back in one of your cities.
    - By default, archaeologists know where all the artifacts are on the map, even if you haven't explored it. This can be changed in the mod settings (see discussion) so that they can only see plots you have revealed.
    - Archaeologists will go towards the nearest artifact in terms of plot distance away from their location. If they can no longer enter the tile for that artifact (another civilian moves into it) then they will choose somewhere else to go.
    - By default, Archaeologists will not excavate in other player's territory. See mod settings discussion for how to change. If you switch it to true, they will check for open borders and excavate in other player's territory.
    - If excavating in other player's territory is enabled in the settings, building Terracotta Army will let your archaeologists enter foreign lands without open borders. Haven't tested this yet but I've implemented it so that it should work for automated Archaeologists.
    - Archaeologists will NOT target any artifact that has an improvement over it. You have to manually remove that improvement with a Builder if you want to excavate there.



    Builders: Notes
    - Automated Builders will automatically move around and improve your tiles, obeying all relevant rules defined in the game database (including from any mods). If there is nothing to do, they will sleep and check for stuff to do at the beginning of each turn.
    - Automated Builders will improve strategic or luxury resources anywhere, but otherwise will only build improvements within 3 tiles of your cities. If there is nothing to do, Builders will check every plot in your territory to see if any repairs are needed on roads or improvements you have manually built out there.
    - Automated Builders will do stuff when your turn activates or when you press the Automate button. Sorry, right now I haven't found a way to make them do stuff right before your turn ends.
    - After all strategic/luxury resources are improved and everything else within 3 tiles of cities is improved, you can turn on a setting in the mod settings (see discussion) to enable Builders building farms within 4 tiles of your cities as long as it is adjacent to a farm in the 3 tile range for food adjacency bonus.
    - Automated Builders have no care for their own safety. If you are worried, it's best to link them with a military unit and then automate the Builder. Keep in mind, however, that a Builder in formation with a military unit means they cannot move to and improve a plot with another military unit.
    - Harvesting resources is disabled by default. Even if it is enabled, Builders will by default try to improve the bonus resource if they can.
    - Removing features is disabled by default unless removing a feature to improve a resource. Even if it is enabled, Builders will by default put an improvement over the feature if they can.
    - Builders will never replace an improvement, unless they are removing an improvement to replace it with the correct improvement for a newly discovered resource.
    - Any improvement that must be built on the frontier, such as China's Great Wall, is not currently implemented. Automated Builders will not build these improvements.
    - For now, automated Builders will not perform any actions on districts or wonder tiles, such as Aztec district completion or China's Wonder completion.



    How do automated Builders decide what to do?
    - For any given plot, the default priority for selecting an action is Repair > Repair road > Improve Resource > Build unique improvement > Build improvement
    - 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) will not be chosen.
    - 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.
    - The base score for each plot is reduced based on how far away the plot is from the Builder. The plot with the highest score is chosen.
    - You can check out the mod settings (see discussion) to see the numbers, but repairing stuff and improving resources is given very high scoring, they have to be very far away before a Builder will ignore them.
    - 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.


    Mod Compatibility
    - Automated Builders should improve resources added by other mods and build improvements added by other mods.
    - Relevant data from other mods is loaded into this mod, so for example if you have a mod that allows farms on tundra then Builders should do that.
    - This mod replaces the game's UnitPanel.lua file. This mod should also replace the UnitPanel.lua from other mods.
    - This mod's UnitPanel.lua file has the changes from CQUI's UnitPanel replacement (don't worry if you don't use CQUI, not much is changed).


    Special Thanks
    - Gedemon for his spreadsheet of Lua objects and methods
    - Gedemon for his method for sharing data between UI contexts.



    20171229164231_2.jpg


    20171225024633_copy.jpg