Prototype
Prototype copied to clipboard
Settler AI - Refactor so weights are not constants
Right now, the weights given by the AI to where to settle are hard-coded - food yield, shields, commerce, and distance, as well as bonuses based on hills and coastline. But it would be nice to make this configurable and available to mods.
I'd suggest making them configurable, but with default values that will be used in lieu of any being set. There should also be some sort of a setup for AIWeights, which will be mod-configurable (in the JSON file?).
Longer-term, I'd like for it to be possible for different AIs to have different weights; maybe a Commercial AI puts extra weight on commerce yield, and an Industrious one on industrial output. Whether this is changing the direct weight (+1 for shield output for industrious civs), or a percent bonus (+20% weight to shield yield) is to be determined. Optionally, think about and add something to make it variable by civ.