I'm currently working on fixing a few bugs in feeder service in RaR (just one left) and I intend to copy the fixes to M:C once I'm done. While working on it I came up with a new idea.
Construction feeder service
I came up with the idea to have two thresholds. One is the current one, which remain unchanged. The other one is the one used by fully automated transports. The auto threshold is set to the same as the normal one with one exception. If the building currently under construction demands the yield in question and it demands more than the threshold, then the auto threshold is set to the building demand.
Example:
A city sets export and feeder for tools and the threshold to 0. No tools will be imported as the city has at least 0 tools (naturally). The city starts building a building, which needs 50 tools. The automated transports will then automatically supply the city with 50 tools and once those tools are used on the building, the demand will go back to 0.
In other words automated transports will automatically supply all cities which has feeder service enabled without supply the cities with too much because you forgot to reduce the threshold once the building is done.
AI building buildings
Next logical step is to make the AI use this. After all the AI use nothing but fully automated transports. If the AI enables feeder service for all yields needed by current building under construction, then the AI will be able to supply the construction sites with minimal code and without cheating.
Which yields to transport
Currently the fully automated transports picks the transport with the highest value (investigating details) meaning it's something like amount transported multiplied with price of each. It is optimized for selling the yields in Europe, but that is not precisely what we want it to do all the time. What we want is something like this:
- Supply buildings under construction
- Supply domestic industry
- Sell to home country (cities with import, but no local need for yield)
This mean some modifications to the traderoute value calculation will be needed. The current calculation is the vanilla one, which is the same as in RaR and I noticed that the wagon trains prefers to move 24 tobacco to the colony with the cigar factory rather than 8 stones to the colony having 92, but needs 100 for a building. Stones have such a low value that they are rarely moved around, which stalls construction if it relies on automated moves.
Plotgroup supplies
A long term plan would be to make the AI aware of produced, possible production, stored and demand yields in its own plotgroup. This can be used for some more advanced setups like a city starting to build a building without having the required yields as the AI is aware that they can be imported from other cities in the same plotgroup. Lack of a certain yield can in turn encourage production of that yield in whatever city able to produce it in the plotgroup. This is far into the future, but it will provide an AI city management, which can figure out fairly complex supply chains spread across several cities in a plotgroup and be well functioning without having to do something the human players can't do.
I still haven't looked into the stuff I mentioned earlier in this thread. I haven't forgotten it, but I ended up with other things to do first and I ended up spending the little coding time I do have on fixing bugs in RaR (mainly transport related ones, but also a few network related ones). Bugfixes for RaR takes priority right now as I would really like those bugfixes to be in the next release.