RMMV Yanfly Conditional Prices for Selling?


Aug 31, 2014
Reaction score
First Language
Primarily Uses
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.

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.
Last edited:


Dec 25, 2016
Reaction score
First Language
Primarily Uses
Sorry for the late reply, I only found this answer out because I tried the yanfly's conditional price and the sell price issue pretty much blew the whole deal for me. So I came to this site to see if someone figure it out and saw your post basically saying you had the same problem....

So I'm posting to say if you are still working on this project try the

FELD Item Price Control Plugin

Driftwood has a tutorial on using it

You have to play around with the settings a bit, but once you get the math right you can set the buy and sell prices however you want.

You could have shop owners sell the player apples for 10 dollars and buy it for 20... that's a horrible business model but you could do it.

If you're still working on your project or if someone else is looking at making trade a part of their game, I hope this plugin helps, I'm glad I found it.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Do you have an audio you want me to animate? If so send me the youtube link and I’ll animate it.
Okay, so I'm working on Draft 2 of my game's script.
Will try to keep you guys posted, if you're interested!

This is vid of my new game, Crystalgazers. A demo is available on my Gamejolt

I just thought of the best achievement for my game: "'I Didn't Know You Were a Developer!' Find and enter one or more dev room(s)."
I made this animation to apply to a job, what do you think?

Forum statistics

Latest member