LawrenceindaSky

Veteran
Veteran
Joined
Apr 21, 2016
Messages
69
Reaction score
8
First Language
English
Primarily Uses
N/A
So I was looking at the video by Yanfly and looking at the plugin description, there was no script calls or any examples to store it as a variable. What my goal is, is im trying to store it into a variable, and convert it to Gold. I have a number slider and stuff that works fine (Tested with variables, its a banking system), and im wondering what I can do to achieve this?
I did happen to find online this:
$gameParty.leader().jp();
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
4,626
Reaction score
3,741
First Language
EN
Primarily Uses
RMMZ
$gameParty.leader().jp();
Try putting that in Control Variables > Script. I think that'll get the JP for the party leader's current class. :)

For a different actor you could try one of these:
Code:
$gameActors.actor(1).jp()
$gameParty.members()[0].jp()
Replace the 1 with the actor's ID, or the 0 with their position in the party (0 = leader, 1 = next member, etc).

To reference a class other than the current class, put the class ID (as defined in the database) inside the brackets, e.g. JP of class 1 for actor 3:
Code:
$gameActors.actor(3).jp(1)
 

LawrenceindaSky

Veteran
Veteran
Joined
Apr 21, 2016
Messages
69
Reaction score
8
First Language
English
Primarily Uses
N/A
Try putting that in Control Variables > Script. I think that'll get the JP for the party leader's current class. :)

For a different actor you could try one of these:
Code:
$gameActors.actor(1).jp()
$gameParty.members()[0].jp()
Replace the 1 with the actor's ID, or the 0 with their position in the party (0 = leader, 1 = next member, etc).

To reference a class other than the current class, put the class ID (as defined in the database) inside the brackets, e.g. JP of class 1 for actor 3:
Code:
$gameActors.actor(3).jp(1)
That works perfectly, I was able to display it with \v[x] and get those JP as Gold, issue is now, how do I use that same variable to subtract from JP?

EDIT: Nevermind about the variables part, I figured a work around, which is a LOT more easier than what I was gonna do, but issue is now, the setJp doesn't seem to work? It says: setJp actorId jp , so I did: setJp 1 0 but it didn't seem to work at all doing that. Maybe im doing something wrong? Maybe there is a way to script it like the $gameActors.actor(1).jp()?

EDIT2: Solved my own problem xD apparently the plugin hates the number 0, and I was looking at the js file and decided to try learning a bit of JavaScripting and well, the code of $gameActors.actor(1).setJp(0) actually works! All I really needed to do was add 'setjp' instead of 'jp'. But still thanks to your help of what to do with the code! Thank you! Mods can close this post.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Someone please post some beginner problems so I can act like I'm a veteran and know what I'm doing? (Also someone please stop @Andar and @ATT_Turan from posting on them because they are way too fast?!)
Random reminder to work on yo games! Good day.
A preview of the second of five hidden arcade machines you can find in The Brothers, an upcoming JRPG from System Masters. They are fully playable, each with multiple levels, tracked hi-scores and related challenges / achievements / trophies!

Forum statistics

Threads
131,576
Messages
1,221,200
Members
173,274
Latest member
Luna109
Top