(I am using a Google Translate, sorry about that)
I present you the automated trading mod, supported up to 1.0 RC8
Mod using GnomoriaModUI by Faark, thanks a lot!How to install mod launcher
, thanks to majorgetsome
Mod allows you to automate routine trade with merchants. When too many of them, when too many goods produced or just laziness.What has been done
When you open a shop window, an additional button "Auto preferences" will show
which leads to the Preferences window
there are two tabs, the first responsible for the sale, the second is responsible for the purchase, they are identical in functionality. Each tab on the left there is a list of products at the top right of the goods properties are added and at bottom right list with the list of already selected trading rules
there may be both the quality and material. Xml did not have time to fill in the end, I'm sorry, so some items are missing these features. But now everything is working as it should.
After the quality of the material and there is a field "Save count", which allows you to save a given quantity of goods in the kingdom. In other words, allows you to sell the surplus.
After clicking "Add" rule appears in the list of rules. It can be moved up and down and removed.
You can also use any group of products. If there is at least one item with quality, it will be displayed in the info. (Goods without quality is always Average, remember this). Materials are also aggregated and grouped
Thus, only sell all Poor Statuette, Fine Yak Statuette and Wheat straw over 2K.
Buy some metals. In merchant has not yet provided the use Save count
order rules affect the alignment of prices. That is the bottom will be rejected first
Further, when the merchant came into the store, it is possible to use the second button. Maud walk through all the goods, choose the appropriate according to the rules will cut as needed to leave and caught up in the price of both lists. Values with zero cost will not be cutted.
This picture is in-debug mode without filtration, just to show in-rules values (and yep, straw saves 2K)
Next algoritm align cost values to the nearest values down-up direction (we have priority)
This is image with real resultDOWNLOAD from gDrive for indev
[FIX] Bug in sort function in fortress goods
[FIX] Added sort rule-priority to merchant. Occur buy different goods if "Auto trade" button is pressed several times
[FIX] Now no more windows while "Auto trade" is pressed. Now may close trade window with "Back" button
[ADD] Yet another tab in begin of tabs: "Options". Have several checkboxes:
- Show notify - Raise a notify while merchant has sit on a chair
- Pause - Pause game while merchant has sit on a chair
- Center market - Centers market while merchant has sit on a chair
- Show trade UI while merchant has sit on a chair
- Auto trade while merchant has sit on a chair
[ADD] Merchant save count functionality. With adding good to merchant auto trading with setting save count not equal zero this good will buy only if your goods is lesser than this save count value.
[FIX] Options XML is fully filled. Write to this topic if you find any reality differences
[ADD] Adding "Get my goods" and "Get merchant goods" buttons for semi-automatic good-align. This stuff works next way: You add goods for sell to your offered goods list box, click the "Get merchant goods" button and mod lineup merchant goods automatically. Your offered goods not re-aligned, so if merchant does not have enough goods, mod add only what find. I.E. no jew style in this tow buttons. Same way works second button. I use this functionality for one-time trading.
[ADD] "Auto trading while merchant has sit on a chair" functionality. Notifying started with "[TS]" and "[TF]" what means "Trade successfull" and "Trade failed" plus result or reson of trade operation.
[FIX] Several minor fixes and code-reviews.
[ADD] Added "Sell excesses" to market stall form. If you click "Auto trade" button with checked this box, algorithm skip fortress goods alignment.
[ADD] Added "Notify successful trading" and "Notify failed trading" checkboxes in auto trade section. With this options you see notify only if this CBs checked.
[ADD] Add a checkbox option that play sound if trading is success.
[ADD] Added an option checkbox 'Keep "Sell excess" checkbox by default' in Auto trade group. Once checked, its allow sell goods not aligned by kingdom cost in automatic mode.
[FIX] Rare bug with excess, which do not buy some goods in merchant.
[FIX] Now if excess is set, may sell items even if merchant has nothing to sell
[ADD] Two options in group "Show trading window when merchant sit on a chair in market" - "Show only if merchant has goods to sell" and "Show only if your kingdom has goods to sell". Only checked they allow to open trading window only if there has something to trade. It feature added because I sometimes use manual trading for one-time trading. I go to opts, activate "Show trade" and wait merchant, which can buy my stuff (~400 windmils). And I got a tons empy-opens. So here the solution.
[PRF] If saveCount = 0 now string " save 0" not viewed.
[FIX] Support of new mod ingame-liver. No need AutomaticTradingInMarket_Items.xml
now, all fills from internal structures. Theoretically support steam-mod-goods.
Unfortunately, all goods now have a quality (remember what no-quality stuff has quality equals Average) and material types available only if it available in game.
[FIX] Filter by quality and by material not working, add all stuff.
[FIX] After closing options by "Back" button, now may trade with new options, no need reopen market stall.
[PRF] Now each line in options may be enabled or disabled for tiny adjustments
[PRF] You may edit old lines for tiny adjustments
[PRF] Move up, move down and delete now buttons, no more right-clicking spam.
[PRF] Change "save" to "up to" string representation in lines.
[ADD] Cheque from market which contains all buyed goods with. Enables in options first tab.
[PRF] Now market has MyTotalWorth and MerchantTotalWorth labels. This lines exists in cheque.
[FIX] If not sellexcess, no more "first gift" lag