arx-insanity / ArxLibertatis

Cross-platform port of Arx Fatalis, a first-person role-playing game
https://arx-libertatis.org/
GNU General Public License v3.0
3 stars 0 forks source link

separate script variable for selling price #44

Closed meszaros-lajos-gyorgy closed 11 months ago

meszaros-lajos-gyorgy commented 1 year ago

Is it possible to add a new variable for price? (sell only), for example in scripts we have SET_PRICE for buying and selling, but I would like the sale from shop keepers to be independent of the purchase value, this to better balance the trade in arx, since even with a very low intuition, trade is still very broken, this so that you can get money or buying things more interesting, the player would give more importance to decisions when buying. You could also just reduce sales profit in the source code without adding a new variable to scripts, well it's just a query

meszaros-lajos-gyorgy commented 11 months ago

Small note: this also alters the save format and makes these changes incompatible with vanilla arx: https://github.com/arx-insanity/ArxLibertatis/blob/master/src/scene/SaveFormat.h#L893

meszaros-lajos-gyorgy commented 11 months ago

buying an item from a shop: SecondInventoryHud::dragEntity() -> calls ARX_INTERACTIVE_GetPrice() selling an item to a shop: SecondaryInventoryHud::dropEntity -> calls ARX_INTERACTIVE_GetSellValue()

meszaros-lajos-gyorgy commented 11 months ago

The changes so far that are important:

meszaros-lajos-gyorgy commented 11 months ago

one more todo left: need to look at all the places where ->buyPrice is being set and need to check if ->sellPrice also needs to be set

meszaros-lajos-gyorgy commented 11 months ago

in review

meszaros-lajos-gyorgy commented 11 months ago

merged into insanity branch