Has anyone yet found a way to edit this plugin in some way to have the sell prices also adjusted? I have my variables and switches all set up for the price adjustments to work beautifully, but through some oversight it looks like sell prices were completely kept out of this plugin. As of right now it just gives you the default /2 of the database general price. The scene controlling sell price is within The Shop Core:
Yanfly.Shop.Scene_Shop_sellingPrice = Scene_Shop.prototype.sellingPrice;
Scene_Shop.prototype.sellingPrice = function() {
if (this._item && this._item.sellPrice !== undefined) {
return this._item.sellPrice;
}
return Yanfly.Shop.Scene_Shop_sellingPrice.call(this);
};
I know what I need it to do is utilize the new set buy price to then also set the sell price. From what I can tell this is the portion of the Conditional Shop Price that is calling the new buy price:
Yanfly.CnShPr.Window_ShopBuy_price = Window_ShopBuy.prototype.price;
Window_ShopBuy.prototype.price = function(item) {
var price = Yanfly.CnShPr.Window_ShopBuy_price.call(this, item);
price = this.processConditionalShopPrices(item, price);
return price;
};
So while I logically know what needs to happen, my coding language knowledge ends at SQL, which is very unhelpful in a JS engine haha.
Any ideas/has anyone accomplished this before?
(Also my apologies to the moderators if this is a better fit for the JS Request Section.)
Yanfly.Shop.Scene_Shop_sellingPrice = Scene_Shop.prototype.sellingPrice;
Scene_Shop.prototype.sellingPrice = function() {
if (this._item && this._item.sellPrice !== undefined) {
return this._item.sellPrice;
}
return Yanfly.Shop.Scene_Shop_sellingPrice.call(this);
};
I know what I need it to do is utilize the new set buy price to then also set the sell price. From what I can tell this is the portion of the Conditional Shop Price that is calling the new buy price:
Yanfly.CnShPr.Window_ShopBuy_price = Window_ShopBuy.prototype.price;
Window_ShopBuy.prototype.price = function(item) {
var price = Yanfly.CnShPr.Window_ShopBuy_price.call(this, item);
price = this.processConditionalShopPrices(item, price);
return price;
};
So while I logically know what needs to happen, my coding language knowledge ends at SQL, which is very unhelpful in a JS engine haha.
Any ideas/has anyone accomplished this before?
(Also my apologies to the moderators if this is a better fit for the JS Request Section.)