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

Doing clean-up on tall-ified sprites, filling in pixel by pixel where the stretching warped the image, feels incredibly tedious but also highly rewarding when one zooms out and the sprite looks even better than before.
I found this app on the playstore and I'm loving it, it's very good for organizing project ideas
hmm one of those days where there's a lot to work on with my game... annnnnd I have no idea what I wanna do. most of it tho, involves drawing lol. either enemies or NPCs.
I'm going back to the default RTP, in the interest of getting it done. FSM is lovely but slow to work with and has tall doors. And switching to tall sprites would mean a lot of franking, and also the horses will be small.
I think I developed a stalker trauma (stalkerfobia?) because of my previous work publishing games on Steam. :(

Forum statistics

Threads
118,574
Messages
1,117,067
Members
155,632
Latest member
GhostFrog
Top