Conditionals with Yanfly Job Points

Status
Not open for further replies.

Aryn

Veteran
Veteran
Joined
Jun 24, 2017
Messages
33
Reaction score
10
First Language
English
Primarily Uses
RMMV
Dear Makers,

I need help, and I'm not 100% sure if this is the proper place, since I'm not sure what the solution is. But the problem I'm having is that I can use Yanfly's plugin command to reduce Job Points because there is no way to check conditionally if the JP < 0. I'm using the JP in a slightly nontraditional manner, so they do not always directly translate to skills the way it's set up. So I'm wondering if there's an easy way to create a script command or an addition to the plugin that will allow you to use conditionals to check the state of the JP? Please help! Thank you in advance.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,089
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Plugin link for convenience: http://yanfly.moe/2015/11/13/yep-27-job-points/

I haven't tested, but maybe try something like this in Conditional Branch > Script:
Code:
$gameActors.actor(1).jp() < 100
I think this says "is the JP of actor 1's current class less than 100?". :kaopride:

By default JP can't have a negative value, but you could always check the value before using the loseJp plugin command. :)
 

Aryn

Veteran
Veteran
Joined
Jun 24, 2017
Messages
33
Reaction score
10
First Language
English
Primarily Uses
RMMV
Thank you for the help! That makes a lot of sense, but I'm afraid that I got an "is not a function" error with that script, though. The reason I want a conditional is to make sure that when I subtract JP manually, they actually have the required JP, so I'm pretty sure I do need the conditional to make it work. Any other thoughts? Does the function need to be added to the plugin itself?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
797
Reaction score
350
First Language
English
Primarily Uses
N/A
Try it without the () on the end of jp.
 

Aryn

Veteran
Veteran
Joined
Jun 24, 2017
Messages
33
Reaction score
10
First Language
English
Primarily Uses
RMMV
Oh god. This is embarrassing. :kaodes: Thank you Maliki and Caethyril. You were totally right, Caethyril. The problem was that I was trying to test this quickly before I went to work this morning and I...somehow forgot to add the JP plugin to my test environment.

Case closed, awesome help, thank you so much.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,089
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
All good, happy RPG Making! ^_^
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top