YEP_Job Points to Variables

LawrenceindaSky

Veteran
Veteran
Joined
Apr 21, 2016
Messages
64
Reaction score
4
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

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,087
Reaction score
1,508
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
64
Reaction score
4
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:

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

Latest Threads

Latest Profile Posts

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'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,017,004
Members
137,562
Latest member
tamedeathman
Top