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
220
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
220
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

I love editing things .
16b6a8abb5d27bf617d9b802cd5b868a.jpg

* Wall frames made with pencil photo and program photos, * Leaf and Pot, with cliché ideas of flowers
*bear on top of the closet belonging to the art of whtdragon lol.
No better feeling than part of a project just clicking into place without a single issue.
Been playing through Skies of Arcadia again, and it really makes me wanna see someone try to implement how ship battles were done in the game into RPG Maker (or really just in general).
split.png
split view of both versions of the pocket city you traverse through. there's differences like areas only being accessible in one version of Autumn Bay. or events that only happen in one or the other.

Forum statistics

Threads
118,438
Messages
1,115,982
Members
155,402
Latest member
Bansher
Top