Sorry if I'm in the wrong place for this. I want to have a way for the player to be able to have like an extra 50% of Experience gained if they have a (very expensive) item in their inventory. I've tried to find the options for this but I only see the way to add it to a class, which I don't want to do since the player would just have it from the get-go. Is this possible with or without a plugin?
How to change Ex & Sp-Parameters via event or item?
RPG Maker MV SupportEvery database object except Items has a field for traits. So the default way to do this is to put it on a Weapon or Armor (say, an accessory) which the actor equips.
If you want it to happen just from the party having an item in the inventory, that will require a plugin.
Paste the below into a text editor, save as a *.js file, include as a plugin.
Change 69 to the ID of the item you're checking for.
If you want it to happen just from the party having an item in the inventory, that will require a plugin.
Paste the below into a text editor, save as a *.js file, include as a plugin.
Code:
Game_Actor.prototype.gainExp = function(exp) {
var newExp = this.currentExp() + Math.round(exp * this.finalExpRate());
if ($gameParty.hasItem($dataItems[69])) newExp *= 1.5;
this.changeExp(newExp, this.shouldDisplayLevelUp());
};
Change 69 to the ID of the item you're checking for.
Oh, I see now. I decided to make an extra equipment slot for "Perks" and put it in there. Thank you so much!
How could I limit the amount so the player can only carry one of it? I'd like to prevent them from trying to purchase more and wasting their Cash since you can only equip it in one slot.
It looks as though Yanfly's core engine plugin allows you to limit the amount of an item that the player can acquire. From its documentation:
For reference, I found this out by Googling for "rpg maker mv item limit plugin", which led to this thread, which led to the Core Engine (YEP) plugin. I'm not sure if it would prevent players from buying the item again, but it's worth a shot.
Also, a bit of advice when asking for help: it's best to put all of your thoughts/requirements into your initial post, as that'll increase your chances of getting a more comprehensive solution.
Code:
Change the parameters to reflect the maximum number of items a player can
hold per item. If you wish to make individual items have different max
values, use the following notetag:
Item, Weapon, Armor Notetag:
<Max Item: x>
This changes the maximum amount of the item to x.
For reference, I found this out by Googling for "rpg maker mv item limit plugin", which led to this thread, which led to the Core Engine (YEP) plugin. I'm not sure if it would prevent players from buying the item again, but it's worth a shot.
Also, a bit of advice when asking for help: it's best to put all of your thoughts/requirements into your initial post, as that'll increase your chances of getting a more comprehensive solution.
Theres plugins to limit shop stock like this one, but it would be easier to make the purchase of that item a part of an event outside the shop scene. Youd just flip a switch once the purchase is made and never show the option ever again, or put the purchase within a conditional branch for not having the item
you got specific answers for the item you want, but to give you a more general answer to the title question:
all those parameters are traits, and that means you'll need a plugin for dynamic traits if you want to change them during gameplay.
there are several such plugins because you're not the only one wanting that.
all those parameters are traits, and that means you'll need a plugin for dynamic traits if you want to change them during gameplay.
there are several such plugins because you're not the only one wanting that.
I think what I will do is a Perk Merchant and copy/paste them where I need them and use the conditional branches and self switch. If the player happens to sell their perks, it would turn the switch off. Seems like a simple solution. I don't have more than one party member anyway so this should work great. Thanks!
Thanks for the help and tip. Unfortunately, it seems this site has trouble loading most of the threads for me. It'll just load for minutes before getting an error and when I used search engines to find an answer elsewhere, I couldn't find anything like what I was asking. There's so much simple stuff I never played with before because I've never really done anything in RPGMV related to battles and Lvl/Stats/Traits.
Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-ex-sp-parameters-via-event-or-item.168107/