I'm putting a "lady's man" merchant in the game that follows the party everywhere they go. I want him to give a discount bassed on how many girls are in your party, 5% each girl for a max of 15%. How would i do this?
Store disscount
JS Plugin RequestsI've moved this thread to MV Support. Thank you.
Set a variable to 0.
For each girl who COULD be in your party, do a Conditional Branch - Actor X in Party, add 1 to the variable.
At the end, multiply the variable by 5, then do another Conditional Branch - Variable X > 15, then set the variable to 15.
As for the stuff he sells, you would either need a plugin to reduce the price of his wares by that percentage, or use a Show Choices to list the items he sells.
For each girl who COULD be in your party, do a Conditional Branch - Actor X in Party, add 1 to the variable.
At the end, multiply the variable by 5, then do another Conditional Branch - Variable X > 15, then set the variable to 15.
As for the stuff he sells, you would either need a plugin to reduce the price of his wares by that percentage, or use a Show Choices to list the items he sells.
A plugin would definitely be the best and most scalable way to do it, but you could also have 4 different versions of the same shop (one with normal prices, one with 5% discounted prices, and so on), and the version presented to the player is different based on the value of the variable that @Shaz described. 🙂
Thank you both for confirming my thoughts about using variables, I had a feelings thats the route I'd have to take. The part that had me stumped was incorporating the percentages, I was thinking of just deducting the percentage manually making a different shop for each variable. I soon realized, it would be very time consuming especially if his shop grows as the game progresses. If you know of a plugin that can automatically deduce percentages based on variables for shops, I'd be greatful if you could point me in the right direction.
As you now want a plugin
Moderator note: I am moving this to JS Plugin Requests
Moderator note: I am moving this to JS Plugin Requests
Haha I shouldnt be allowed to post early mornings or late in the evening as I just thought as I posted I could easily copy and past his shops over and edit the prices for the new items accordingly (I was literally thinking i'd have to rewrite the shop over and over while redoing the percentage). I'd still be greatful as it'd be less work only requireing me to add said items and I'm sure others stumbling on this thread early morning or late night with the same thought procees would like to have it as well. Sorry for all the jumping around.
Wrote this just now. For your use case you will want to set default_max_discount to 0, give your shopkeeper NPC a notetag of <GiveDiscountMax:15> and give each female party member a notetag of <GiveDiscount:5>
👍🤣👍Thats awesome, thanks for this. I'll be sure to put this to use!
Original thread: https://forums.rpgmakerweb.com/threads/store-disscount.103284/