• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Fixed Trade Screen Shift/Alt modifiers broken

PS a question for helping me explore this

can I put something like

SetStoreGoods(refStore,i,GetStoreGoodsQuantity(refStore,i) - tQuantity

into console with the parameters altered to be for the store, goodstype and quantity I am looking at to alter the store quantity as a way of de-stocking the store to check autobuy against?
 
I'm quite willing to believe that Auto Buy doesn't entirely work like it is intended to.
It was worse before, but I think changing some ints and floats around has made it behave itself at least a bit better.
I do tend to use that feature a lot though, because I can't be bothered doing all purchases if the game is willing to do most of it for me.

Perhaps you should ignore the Auto Buy functionality for starters though.
If anything further is done with that, it might be worth creating an actual Auto Buy function that can be used in multiple scenarios.
At the moment there are three copies of the Auto Buy code, but each modified for a different purpose:
1 - Actual Auto Buy at the Store
2 - SupplyShip function that is generally called from GiveShip2Character in NK.c
3 - Function to calculate the weight that an Auto Bur purchase should take up;
this is at the moment mostly unused, but is a part of this (temporarily abandoned) WIP feature:
http://www.piratesahoy.net/threads/include-cannon-weight-and-number-in-cargo-capacity.24953/
 
PS a question for helping me explore this

can I put something like

SetStoreGoods(refStore,i,GetStoreGoodsQuantity(refStore,i) - tQuantity

into console with the parameters altered to be for the store, goodstype and quantity I am looking at to alter the store quantity as a way of de-stocking the store to check autobuy against?
Probably something like that is indeed possible. Not entirely sure of the functions available and I can't check until I get home. :facepalm
 
I'm quite willing to believe that Auto Buy doesn't entirely work like it is intended to.
Perhaps you should ignore the Auto Buy functionality for starters though.

Fine I can do "If it ain't broke don't fix it" or in this case "if it ain't seen to be broke". I just didn't want it to be thought I had looked at the function and not seen any problems, or worse still been associated with creating them.

On that note looking a bit further at your suggested amendment it has a problem. It works fine on buying if you have low or no stock on board but by decreasing the needQty to what the store has if you have more than that already it looks to me that goods will get sold off down to that less than required level. So in retrospect I think it's best just to block the deal entirely - or we are in to Autobuy functionality (that may be why too little money just stops it too).
 
Back
Top