[WIP] Workzone

Hambil

Emperor
Joined
Oct 16, 2006
Messages
1,100
This is a companion to Escort, thought it stands alone. I brings back some of the Civ IV automation abilities for workers. "Improve nearest city" and "Build infrastructure" specifically.

I do not yet have an idea of how I will tackle building roads, but here is my basic plan for "Improve nearest city".

Scan all city plots and record the following:
[iPlot][plotType][resourceType][improvementType][recommendedImprovementType][iPriority]

The scan will never need repeating, as long as there are sufficient events to track what happens to plots (pillaged, city expanded, tech gained, iron discovered, etc...) for cases where we can't get the information from events we can just repeat the scan but will avoid if possible. The table will be sorted by priority and workers can just pick off the top of the table. A final check to see if recommendedImprovementType has changed since the last scan, might be needed.

So iPriority will be set as follows:
1. Repair pillage
2. Remove fallout
3. Improve unimproved luxuries for which you have zero
4. Improve strategic resources for which you have zero
5. Improve luxuries by which you have at least one, compare yields on a tie (improvement that yields more goes first)
6. Improve strategic resources by era (newer first)
7. If city has a focus set, build improvements based on focus (farms for food, mines for production, plantations for gold.
8. If city has no focus prioritize food, then production, then gold.

Additional functionality:
Workers will seek cover under combat units.
Workers will not stop working if protected by a combat unit on same tile.
Workers only 'run away' if there is no cover to be found.
A reminder notice will be sent every 20 turns if you have unimproved sea resources.
A reminder notice when a worker set to a specific build (improve city or infrastructure) task has nothing to do.
 
Top Bottom