For any of you familiar with Yanfly's Conditional Price script,
I am designing a game where commodities are traded on narrow margins for profit. I've made massive conditional changes to all sorts of buying conditions.
I just got around to addressing the selling prices, I wrongly assumed the plugin would check the various changes for the selling price as well, and I'd just need to change the bit of default code...
Scene_Shop.prototype.sellingPrice = function() {
return Math.floor(this._item.price / 2);
To something that would reflect a small difference in the bid/ask spread for an item.
Nope! It seems like this sell price is ignoring all the script work on the other side.
For example if say, good weather conditions in a town knocks the grain price from 100 to 50, the game starts with the item price at 100 before applying the bit of code above...which isn't the goal. Someone in this town would only buy your grain at 45 or 48 or something like that.
Do any of you know how I might get Yanfly's Conditional Price script to talk to the sell price function as well?
Thank you in advance.
Update:
There is a <Sell Price: x> tag in the core shop plugin, but it sets it to a flat value not a variable. If I could use a variable here it would solve my problem.
Update 2:
I sort of solved my problem. I added Exhydra's shop options which allows setting the sell price a variable. I still have to manually calculate all the other variables which Yanfly's plug in does for the buy side automatically. Clunky, but better than nothing.
I am designing a game where commodities are traded on narrow margins for profit. I've made massive conditional changes to all sorts of buying conditions.
I just got around to addressing the selling prices, I wrongly assumed the plugin would check the various changes for the selling price as well, and I'd just need to change the bit of default code...
Scene_Shop.prototype.sellingPrice = function() {
return Math.floor(this._item.price / 2);
To something that would reflect a small difference in the bid/ask spread for an item.
Nope! It seems like this sell price is ignoring all the script work on the other side.
For example if say, good weather conditions in a town knocks the grain price from 100 to 50, the game starts with the item price at 100 before applying the bit of code above...which isn't the goal. Someone in this town would only buy your grain at 45 or 48 or something like that.
Do any of you know how I might get Yanfly's Conditional Price script to talk to the sell price function as well?
Thank you in advance.
Update:
There is a <Sell Price: x> tag in the core shop plugin, but it sets it to a flat value not a variable. If I could use a variable here it would solve my problem.
Update 2:
I sort of solved my problem. I added Exhydra's shop options which allows setting the sell price a variable. I still have to manually calculate all the other variables which Yanfly's plug in does for the buy side automatically. Clunky, but better than nothing.