After some hours of playing around, and a lot of talking things over with Prophet on IRC, I have pushed
this to github. It is a rough draft that does not actually reduce/restock any items, but logs a lot of what it intends to do to the debug log. It requires the latest version of CommonFunctions.xml from DSF which can also be had on github.
If you feel like playing with it, please do.
It is planned that the mod operates with two "passes". One, the "restock" pass, for adjusting items on stations, ie. adding/removing items, another, the "priceAdjust" pass, for adjusting the prices of items based on different criteria (availability, current stock are some that spring to mind).
For the vanilla game, these passes take rules from a master trade list. Each station that we want to work with has an entry in this master list, containing two sub-lists, a "restock" list, and a "priceAdjust" list. Each of these sub list contain a series of function calls that will be executed on each pass, for each station. This should allow for a very large degree of flexibility. Functions can be created to take special circumstances into account.
For those who want to create new stations, and have the benefit of having them updated, it is possible to add static data to the station, containing these sub-lists. An example would be
Code: Select all
<StaticData>
<Restock>
(....)
</Restock>
<PriceAdjust>
(....)
</PriceAdjust>
</StaticData>
Pretty simple and straight forward.
More to follow as things progress
.]