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
2,087
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top