dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
156
Reaction score
46
First Language
English
Primarily Uses
RMMV
So I'm trying to create a system where JP can be used to gain experience based on the number input (set to a variable). The issue is I am unable to get the plugin command loseJP to work with a variable. Is there any way this can be done?

http://yanfly.moe/2015/11/13/yep-27-job-points/
 

shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
472
Reaction score
219
First Language
English
Primarily Uses
RMMZ
Assuming that ClassID isn't important, there's a script that may be more ideal for this. Before I can give an exact function, I need to know more about how the system is supposed to work. Is the experience gained through a skill? An event?
 

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
156
Reaction score
46
First Language
English
Primarily Uses
RMMV
The XP gain is via event. I use a number input to set the JP to XP value, check the current JP via script call (which works), but unable to subtract the JP to XP variable from the actor's JP.

upload_2018-3-20_12-26-37.png

upload_2018-3-20_12-29-44.png
 

shockra

Bored Code Guy
Veteran
Joined
Feb 16, 2016
Messages
472
Reaction score
219
First Language
English
Primarily Uses
RMMZ
Two possible reasons that this could be happening.

First, I don't think the plugin command can discern uppercase from lowercase. The loseJP should be loseJp, which a lowercase p. If that doesn't work, try the second option below.

Second, the plugin reader may not be able to read \v[15] in the plugin command. Replace that with $gameVariables.value(15)

If neither of those work, you may need the script call itself. The basic function is $gameActors.actor(actorID).loseJp(value, classID);
 

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
156
Reaction score
46
First Language
English
Primarily Uses
RMMV
$gameActors.actor(1).loseJp($gameVariables.value(15), 1); worked perfectly. Thanks much!

Mods: you may close this thread as it is resolved.
 

Latest Threads

Latest Posts

Latest Profile Posts

Making games is the only thing I'm good at. Real talk.
So, uh... where's the RPG Maker MZ update with the MV animation system? Is there a release date confirmed?
Also I'm kind of brave enough to admit this. I... I have a crush on Sephiroth.
Please don't call me anything offensive. I'm naturally crazy.
thanks to a lot of lunatic coding... my game finally has a stun mechanic that I feel really good about. damage enemy's mental psyche (mp), and once empty, hitting with certain attacks trigger combos that can stack the damage.
Waiting for the 1.40 update before testing out my copy of MZ so that I don't end up adding unnecessary work to my plate. Meanwhile the current fourth draft for my story is taking shape, and I'm fleshing out the lore as I realize how things would make better sense here and there for the world that I'm building.
Sword_of_Dusk wrote on BCj's profile.
Just found out about your complications. I'm so sorry that you're going through this. I wish I could do something substantial for you, but our distance from each other makes that an impossibility. Still, if you ever need to talk or vent, I'm here.

Forum statistics

Threads
117,112
Messages
1,104,680
Members
153,149
Latest member
gabbothedead
Top