Nightinggale
Deity
- Joined
- Feb 2, 2009
- Messages
- 5,399
Adding buttons is tricky in DLL based windows. On the other hand a checkbox is easy to add.
Hmm... distribute a yield evenly between all cities... that would be something like enabling feeder service and export everywhere and a dynamic threshold. Something like an awareness of warehouse capacity and storage of that yield in all cities and then each city will request it's own share. This would require some clever caching setup. One thing I can think of is setting a threshold in CvPlayer and then apply it to all cities. We can then have a counter for how many cities are actively importing the yield. When the counter reaches 0, increase the threshold until cities import again. Not sure what to do regarding lowering the threshold though.
One way to set the threshold is to use the yield cost of the most expensive profession. This is currently cached, but not used as I haven't made the AI aware of this cache (the plan is to make... well something like this).
Feeder service:
Auto enable/disable import based on storage only. The player sets a threshold and the computer will import as needed to maintain this level.
Rules are that it will stop importing if storage goes over 100% of the requested level and it will start importing again if the storage drops to below 75% of that level. In between the current import state is kept. In other words it's a system with hysteresis.
The reason why it doesn't just trigger at 100%is that it would toggle on and off way too often. If the city is set to import and export something, it uses 3/turn and has a threshold of 100. It will fill to 100, wait until it drops below 75 (9 turns) and then fill up again.
If it triggered on 100% both ways, it would fill up to 100, next turn it has 97 and it will use a transport to obtain the missing 3 and stop importing. Next turn it uses a transport again to gain the missing 3 and so on. Moving between 75% and 100% is an attempt to use the transport more efficiently and not make them move tiny amount of yields.
Consumption multiplier:
This is an auto threshold setting. It calculates how many yields you need each turn to supply your buildings if they are all full of units with no modifiers. Consumption multiplier will then set a threshold of that number multiplied by the consumption multiplier setting. In other words it is a setting asking for how many turns you want to stockpile for. This number will go automatically up when you construct a new building with more worker slots.
Feeder service also has other sources of auto threshold. It will always try to import to meet the requirements for the buildings you have in the building queue. There is no GUI to modify this behavior. It's just always on if feeder service is on.
EDIT: the forum just informed me that I should read this thread because I haven't read the newest post
Hmm... distribute a yield evenly between all cities... that would be something like enabling feeder service and export everywhere and a dynamic threshold. Something like an awareness of warehouse capacity and storage of that yield in all cities and then each city will request it's own share. This would require some clever caching setup. One thing I can think of is setting a threshold in CvPlayer and then apply it to all cities. We can then have a counter for how many cities are actively importing the yield. When the counter reaches 0, increase the threshold until cities import again. Not sure what to do regarding lowering the threshold though.
One way to set the threshold is to use the yield cost of the most expensive profession. This is currently cached, but not used as I haven't made the AI aware of this cache (the plan is to make... well something like this).
Feeder service:
Auto enable/disable import based on storage only. The player sets a threshold and the computer will import as needed to maintain this level.
Rules are that it will stop importing if storage goes over 100% of the requested level and it will start importing again if the storage drops to below 75% of that level. In between the current import state is kept. In other words it's a system with hysteresis.
The reason why it doesn't just trigger at 100%is that it would toggle on and off way too often. If the city is set to import and export something, it uses 3/turn and has a threshold of 100. It will fill to 100, wait until it drops below 75 (9 turns) and then fill up again.
If it triggered on 100% both ways, it would fill up to 100, next turn it has 97 and it will use a transport to obtain the missing 3 and stop importing. Next turn it uses a transport again to gain the missing 3 and so on. Moving between 75% and 100% is an attempt to use the transport more efficiently and not make them move tiny amount of yields.
Consumption multiplier:
This is an auto threshold setting. It calculates how many yields you need each turn to supply your buildings if they are all full of units with no modifiers. Consumption multiplier will then set a threshold of that number multiplied by the consumption multiplier setting. In other words it is a setting asking for how many turns you want to stockpile for. This number will go automatically up when you construct a new building with more worker slots.
Feeder service also has other sources of auto threshold. It will always try to import to meet the requirements for the buildings you have in the building queue. There is no GUI to modify this behavior. It's just always on if feeder service is on.
EDIT: the forum just informed me that I should read this thread because I haven't read the newest post
