Adding a discount as a Passive Ability

I'm making this quest and want to add a passive ability in the form of a discount in all stores.
How would I go about doing this? ... If it is even possible to do this.

I'm fiddling around with States, but I haven't been able to figure out just where I should look.
theoretically it can be done by eventing, but most likely you'll have to look for an advanced shop plugin.

with eventing, you would make each shop event with branches checking a switch if that ability exists or not - and then in some branches have the shop processing override the defaults with lower prices.
yes, that is extremely tedious to enter all the prices multiple times if you have a lot of items or shops.

if you can find a plugin that adds such an ability to the shop processing, that would be much easier.
theoretically it can be done by eventing, but most likely you'll have to look for an advanced shop plugin.

with eventing, you would make each shop event with branches checking a switch if that ability exists or not - and then in some branches have the shop processing override the defaults with lower prices.
yes, that is extremely tedious to enter all the prices multiple times if you have a lot of items or shops.

if you can find a plugin that adds such an ability to the shop processing, that would be much easier.
I was half-half expecting this.
But I had hope RPGM maybe had a built-in feature for this.
Oh well... Thanks for the answer 🙂
Its doable with this plugin but it's for MV. Maybe it'll work with MZ with or without FOSSIL

This one might sound promising 😴
In case it helps, I wrote this, but haven't tested it:
Spoiler: plugin code
JavaScript:
// Save as "ShopVarPrice.js"
/*:
 * @target MV MZ
 * @plugindesc Shop prices are affected by a game variable.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/160421/
 * @help All buy/sell prices will be (100 + variable)% of the original price.
 *
 * E.g. when the variable is -20, all shop prices are reduced to 80%.
 * So something that normally costs 50 would now cost 40.
 *
 * @param Variable ID
 * @type variable
 * @desc ID of variable to use for price adjustments.
 * @default 0
 */
;void (function() {
'use strict';
  const PLUGIN_NAME = "ShopVarPrice";
  const PARAMS = PluginManager.parameters(PLUGIN_NAME);
  if (!Object.keys(PARAMS || {}).length)
    throw new Error(
      PLUGIN_NAME + " could not find its parameters!" +
      "Check that you have named the plugin correctly then try again."
    );

  const ID = parseInt(PARAMS["Variable ID"], 10) || 0;
  if (ID <= 0)
    return;  // plugin effectively disabled

  /** @returns {number} Current shop price multiplier. */
  const rate = function() {
    return 1 + $gameVariables.value(ID) / 100;
  };

  /**
   * @param {number} price Original price
   * @returns {number} Scaled price.
   */
  const applyRate = function(price) {
    return Math.ceil(price * rate());
  };

  // Apply rate to buy prices (by default sell price is half buy price)
  void (function(alias) {
    Window_ShopBuy.prototype.price = function() {
      return applyRate(alias.apply(this, arguments));
    };
  })(Window_ShopBuy.prototype.price);

})();
Checking if said ability exists before changing the variable using the code above would probably work, yeah. How would one go about tying it directly to a state, though? 😅

Original thread: https://forums.rpgmakerweb.com/threads/adding-a-discount-as-a-passive-ability.160421/