Item that gives EXP to the selected Actor

I was wondering if anyone knows how I could make an item that gives a specified amount of experience to the selected actor that you pick after choosing the item.
I know I've found some explanations on how to do it in VX Ace, however none of those methods seemed to work in MV.

Thank you for helping me out! ^^
I don't have MV with me at the moment, so I can't test it for accuracy/syntax.

But you should be able to put something like this into the damage formula:
Code:
b.exp += n

where n is how much EXP you want to give them.

Or it might be
Code:
b.gainExp(n)

Actually this would be the better one, as this method (whatever it's called) would also do the check for levelling up and anything else that goes with an EXP change, while the top example probably won't.

Just can't check which is correct, if either. Give them a go and see if they do what you want.
@SmashArt is the item available for use both in battle and on the map, or just one of the two?
Shaz is correct, on her second formula. It works great.
I don't have MV with me at the moment, so I can't test it for accuracy/syntax.

But you should be able to put something like this into the damage formula:
Code:
b.exp += n

where n is how much EXP you want to give them.

Or it might be
Code:
b.gainExp(n)

Actually this would be the better one, as this method (whatever it's called) would also do the check for levelling up and anything else that goes with an EXP change, while the top example probably won't.

Just can't check which is correct, if either. Give them a go and see if they do what you want.

Thank you, but I tested this out and it does nothing and just plays the 'you can't do this action' sound effect. 😔

Maybe I did something wrong in my item settings?

@SmashArt is the item available for use both in battle and on the map, or just one of the two?

Just on the map.
@Thomas Smith @Shaz these will not work in MV. the formula box is only available if you specify a parameter to be modified. fundamentally, this poses a problem; if you choose HP Recover as the condition so that the formula box is enabled, then the only way you can use the item is if the actor is not at max health, i.e. if the player wanted to apply this item to an actor after resting at an inn, he would be surprised to find that the actor is not available for targeting.

moreover, experience is not a parameter included in the available params for modification; just to be sure though, i did try both of your methods @Shaz, but unfortunately neither of them worked.

@SmashArt if you only intend for this item to be used on the map, utilize the common event effect and then use Shaz's gainExp method within a new common event, applying it to the active menuActor:
Code:
$gameParty.menuActor().gainExp(value)
let me know if that works for you.
Thank you, but I tested this out and it does nothing and just plays the 'you can't do this action' sound effect. 😔



Just on the map.
If it affects everybody, or if you only have one actor in the game, then make a common event and put into it "Change EXP " for the entire party. Check "Show level up". Have the item's effects run this common event.

EDIT: dbchest, I saw what you said. I was using Ace by mistake :oops:

EDIT 2: SmashArt, did this help you?
@SmashArt i took a closer look at this because i need to do this for "Rare Candies" in Beast Masters. use the common event item effect and setup a common event with this single script call and you should be in business:
Code:
$gameParty.targetActor().gainExp(value);
@Thomas Smith all of the makers have their unique differences. @Shaz has corrected me many a time, Lol.
@SmashArt i took a closer look at this because i need to do this for "Rare Candies" in Beast Masters. use the common event item effect and setup a common event with this single script call and you should be in business:
Code:
$gameParty.targetActor().gainExp(value);
@Thomas Smith all of the makers have their unique differences. @Shaz has corrected me many a time, Lol.
Hey, I put that script call into my game and it worked. Better than my solution, at least in most cases
@SmashArt i took a closer look at this because i need to do this for "Rare Candies" in Beast Masters. use the common event item effect and setup a common event with this single script call and you should be in business:
Code:
$gameParty.targetActor().gainExp(value);
@Thomas Smith all of the makers have their unique differences. @Shaz has corrected me many a time, Lol.

Thank you so much! This worked great, I also tested with another actor in the party just to make sure that it only affected the one chosen, and it works amazingly, thank you!


And thank you everyone else for the help! 😂
Can this thread be closed now? 🙂
sugar tastes so sweet, but i got nooo candyyy for you.
Can this thread be closed now? 🙂

I've reported the post to having been solved, pretty sure that's how you close it but I'm still pretty new to the forums. 😅
I've reported the post to having been solved, pretty sure that's how you close it but I'm still pretty new to the forums. 😅
That's it 🙂
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/item-that-gives-exp-to-the-selected-actor.88333/