Dangime

Villager
Member
Joined
Aug 31, 2014
Messages
23
Reaction score
2
First Language
English
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.

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

hmnut

Villager
Member
Joined
Dec 25, 2016
Messages
14
Reaction score
4
First Language
English
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.
 

Latest Threads

Latest Profile Posts

Mcniner wrote on Umbriel's profile.
Hello! It seems the Zelda sprites you sent me were removed by a moderator. Could you gmail them to me here: steinjaltman@gmail.com? Thanks!
Remember to do your 0,01% progress on your game today!
Went to see Jujutsu Kaisen 0 yesterday, it was cool. The movie wasnt really a masterpiece, it had some pacing and characterization problems, but overall I enjoyed it, maybe because it was the first anime film I have ever been to in the cinema lol. The battle animation & music were top-notch. I havent seen much of the anime so people who watched the entire season would probably like it more.
MainMenu.PNG
Finally satisfied with the main menu xD

The plan was to have battle sprites in the menu...But these faces from Ocean's Nostalgia look pretty damn good imo. (Will have to adjust for them ofc and maybe recolor to match the overworld/battle sprites more)

Forum statistics

Threads
121,995
Messages
1,145,768
Members
160,263
Latest member
brosiest
Top