MV Plugin for Buy/Sell price being mapped to a variable?

I can't remember the name of the plugin that did this for Ace, but basically it set the in-game buy/sell values to two different variables that it then read as a percentage. So if the Buy variable was say, variable 25, if it was set to 150 everything you bought in the game would be 150% the price. Variable 25 set to 50? ...buying prices are now halved. The Selling Variable worked exactly the same way.

Is there a plugin that does this for MV? I'm trying to set up a karma system that determines prices in the game and am trying to avoid running like a dozen conditional events 👋
Moved to: Plugin Requests
This seemed pretty straightforward, so I wrote a plugin for you. Copy the code below, paste in a new file, and save as PriceAdjustment.js.

JavaScript:
/*:
 * PriceAdjustment.js
 *
 * @plugindesc Adjust the buy and sell prices by specific percentages set in variables.
 * @author SeaPhoenix
 *
 * @help Use variables to adjust the buy and sell prices by specific percentages.
 * For example, in the plugin parameters, you use variable 10 for the buy price
 * adjustment. During the game, you set variable 10 equal to 50. Shops will then
 * sell all items at 50% (half) of the price listed in the database or in the
 * shop processing event command. The price is rounded to the nearest whole
 * number (so 8.4 will be 8, 8.5 will be 9).
 *
 * Notes:
 * 1) Remember to set the price adjustment variables at the start of the game,
 * otherwise the prices will be multiplied by 0.
 * 2) In the original MV code, the sell price is always half of the database
 * price. So the adjustment will be applied to that.
 *
 * @param Buy Price Variable
 * @desc Variable for the buy price's adjustment.
 * @default 10
 *
 * @param Sell Price Variable
 * @desc Variable for the sell price's adjustment.
 * @default 11
 *
 */

(function() {
    var parameters = PluginManager.parameters("PriceAdjustment");
    var buyVar = Number(parameters["Buy Price Variable"]) || 10;
    var sellVar = Number(parameters["Sell Price Variable"]) || 11;

    var SPX_Window_ShopBuy_price = Window_ShopBuy.prototype.price;
    Window_ShopBuy.prototype.price = function(item) {
        var origPrice = SPX_Window_ShopBuy_price.call(this, item);
        var newPrice = Math.round(origPrice * $gameVariables.value(buyVar) / 100);
        return newPrice;
    };

    var SPX_Scene_Shop_prototype_sellingPrice = Scene_Shop.prototype.sellingPrice;
    Scene_Shop.prototype.sellingPrice = function() {
        var origPrice = SPX_Scene_Shop_prototype_sellingPrice.call(this);
        var newPrice = Math.round(origPrice * $gameVariables.value(sellVar) / 100);
        return newPrice;
    };
})();
This seemed pretty straightforward, so I wrote a plugin for you. Copy the code below, paste in a new file, and save as PriceAdjustment.js.

JavaScript:
/*:
 * PriceAdjustment.js
 *
 * @plugindesc Adjust the buy and sell prices by specific percentages set in variables.
 * @author SeaPhoenix
 *
 * @help Use variables to adjust the buy and sell prices by specific percentages.
 * For example, in the plugin parameters, you use variable 10 for the buy price
 * adjustment. During the game, you set variable 10 equal to 50. Shops will then
 * sell all items at 50% (half) of the price listed in the database or in the
 * shop processing event command. The price is rounded to the nearest whole
 * number (so 8.4 will be 8, 8.5 will be 9).
 *
 * Notes:
 * 1) Remember to set the price adjustment variables at the start of the game,
 * otherwise the prices will be multiplied by 0.
 * 2) In the original MV code, the sell price is always half of the database
 * price. So the adjustment will be applied to that.
 *
 * @param Buy Price Variable
 * @desc Variable for the buy price's adjustment.
 * @default 10
 *
 * @param Sell Price Variable
 * @desc Variable for the sell price's adjustment.
 * @default 11
 *
 */

(function() {
    var parameters = PluginManager.parameters("PriceAdjustment");
    var buyVar = Number(parameters["Buy Price Variable"]) || 10;
    var sellVar = Number(parameters["Sell Price Variable"]) || 11;

    var SPX_Window_ShopBuy_price = Window_ShopBuy.prototype.price;
    Window_ShopBuy.prototype.price = function(item) {
        var origPrice = SPX_Window_ShopBuy_price.call(this, item);
        var newPrice = Math.round(origPrice * $gameVariables.value(buyVar) / 100);
        return newPrice;
    };

    var SPX_Scene_Shop_prototype_sellingPrice = Scene_Shop.prototype.sellingPrice;
    Scene_Shop.prototype.sellingPrice = function() {
        var origPrice = SPX_Scene_Shop_prototype_sellingPrice.call(this);
        var newPrice = Math.round(origPrice * $gameVariables.value(sellVar) / 100);
        return newPrice;
    };
})();
HOLY COW THANKS SO MUCH I'LL USE THIS!
I was expecting someone to link me to something similar, not literally write the code to do it exactly XD

thank you so much!
You're welcome!
@SeaPhoenix just a question as the price is /100

if the buy variable = 70, it will be 70% off the price?
but if the sell price = 150, will that that be 150% less or increase it by 50
to gain more gold?
@SeaPhoenix just a question as the price is /100

if the buy variable = 70, it will be 70% off the price?
but if the sell price = 150, will that that be 150% less or increase it by 50
to gain more gold?
If the buy variable is 70, it'll be 70% *of* the price, not off. So something that normally costs 100 will now cost 70.

Likewise with sell price. If the variable is 150, it'll be 150% of the usual sell price. So an item that you could usually sell for 100 would sell for 150.
@ShadowDragon, Trihan is right - the price is just multiplied by the value of the variable as a percentage (i.e., if the value of the variable is 70, then we get price*70/100), as the OP requested.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-for-buy-sell-price-being-mapped-to-a-variable.153686/