Changing selling price

I'd like it to be divided by 3 instead of 2.

I'm using Yanfly ShopMenuCore but all I've seen there is a <Sell Price: x> specific to each item, not a formula for all of them at the same time. Maybe I'm not looking at the right place?
I am not 100% sure where it is in MV, but in ACE I found a command called selling_price in the code, and the entire code for that command is:

@item.price / 2

I imagine it will be in a similar spot in MV. Check to see if you have a Scene_shop code or something similar.
In which *.js I would find it, any idea?
I found it in rpg_scenes.js. I had to then use notepads search function and it came up with this command near the very end of the code on that .js file:

Scene_Shop.prototype.sellingPrice = function() {
return Math.floor(this._item.price / 2);
};

A switch of 2 to 3 should work. Though I'd recommend making it a small plug-in instead, sadly what I know about doing that is nil for MV. Maybe one of our coders can show how to do it as a small plug-in if desired?
Hello! The function @bgillisp found is the right one!
Just copy-paste it in scene_shop section of YEP_ShopMenuCore and change the function as you like.
I actually made this exact change to Roguelite 2 and can confirm that what @bgillisp suggests works. Like he said, though, put it in a different plugin in case you ever end up updating your base JS files.
Found it, thank you all.
I'd like it to be divided by 3 instead of 2.
Maybe one of our coders can show how to do it as a small plug-in if desired?
Yep Yep sure sure no prob. Done and done 😉
Spoiler: Plugin Parameters
1590420885200.png
Use that plugin to set a variable that will control the amount of division. 😉

Spoiler: Event Screenshot
1590419599666.png

Spoiler: In Use Screenshot
1590420003649.png
Place the plugin at below Yanfly's and any other shop plugins 🙂

Edit v0.20:
Added a new parameter for "Custom Code" which overwrites the function if custom code is used.
Spoiler
1590420631135.png
@ct_bolt awesome as always
@ct_bolt awesome as always

Thanks, I do what I can. 😉
Many updates, also now renamed ShopEx

Much more features:
1590461269355.png


See demo project for more info 🙂

Original thread: https://forums.rpgmakerweb.com/threads/changing-selling-price.122029/