Reduce experience from spell.

SnowHawk90

Warper
Member
Joined
Jul 2, 2018
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hi. Got a question but can't find anything similar, so... (if I missed something, please let me know).

I've got a spell that will kill its user, but does fairly stupid damage. The thing is, I don't want it usable free of charge, so to speak. I set up a separate state for the death caused by this spell - half the job done - now I'm trying to create a rez spell specifically for this state. The basic component (the rez) was easy to do, but I'm trying to find a way to reduce the recipient's EXP by 10% or so.

Can anyone make any suggestions on how best to do this?

Btw, I use some of Yanfly's plugins, so if it can be done with one of those, I'd appreciate it (assuming there isn't a way to do it
in RMMV).

Thanks,
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,562
Reaction score
1,034
First Language
EN
Primarily Uses
RMMV
You should be able to do this using Yanfly's Buffs & States Core plugin, e.g. with a <Custom Remove Effect> notetag on your special death state:
Code:
<Custom Remove Effect>
if (user.isActor()) {
  user.gainExp(-user.currentExp() / 10);
}
</Custom Remove Effect>
This says: "when this state is removed, if the battler is an actor, reduce their exp by 1/10 of their current exp". ^_^

Alternatively I think this code should work in various other types of notetag from Yanfly's plugins, e.g. <After Eval> from Skill Core. Haven't tested that, though. :kaoswt:
 
Last edited:

SnowHawk90

Warper
Member
Joined
Jul 2, 2018
Messages
3
Reaction score
2
First Language
English
Primarily Uses
RMMV
Thank you so much for this, especially the explanation.

It works perfectly. Now I just need to decide if 10% is too generous...

Keep it easy.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
Am I allowed to make a recruitment thread NOT for RPG Maker stuff?

Like for a group project?
(NOT RPG Maker project.)
If the new RPG Maker's character generator produces full busts and can match the art styles of previous RPG Makers, that might be a big incentive to buy it. An easier way to craft custom map tile sheets though would probably be an even bigger game changer.
Note to self: One lemon is enough to flavor my drink.
'I'm not homophobic, I'm not scared of me house.' - Peter Kay xD

Forum statistics

Threads
98,194
Messages
950,254
Members
129,494
Latest member
madoke44
Top