Status
Not open for further replies.

AllosaurusNE

Mixed Attacker
Member
Joined
Aug 28, 2021
Messages
9
Reaction score
5
First Language
English
Primarily Uses
RMMV
Hello! I'm utilizing Yanfly's JP and Skill learning systems to have learnable skills outside of leveling up. I'm a big fan of these mechanics, but there is one thing I'm hoping to accomplish that I'm having some trouble doing with my limited JS knowledge.

Is there any way I can have the same skill cost differing amounts of JP (Job Points) depending on what class is trying to learn it?

Let's say, for example I have a skill called "Big Attack" with an ID of 123 and by default all skill costs are 200 JP. I want the Knight class (ID of 1) to learn "Big Attack" at a cost of 500 JP, but I also want the Warrior class (ID of 2) to learn "Big Attack" at the default cost of 200. How would I go about coding this in the note tags?

Is there any sort of way to accomplish this aside from making multiple instances of the same skill? I would greatly appreciate any assistance from whoever has knowledge in this sort of thing.
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
753
Reaction score
264
First Language
Vietnamese
Primarily Uses
RMMV
Maybe using this for the skill note tag?
Code:
<Custom Learn JP Cost>
if (user.currentClass().id === 1){cost = 500;}
else{
if (user.currentClass().id === 2){cost = 200;}}
</Custom Learn JP Cost>
 

AllosaurusNE

Mixed Attacker
Member
Joined
Aug 28, 2021
Messages
9
Reaction score
5
First Language
English
Primarily Uses
RMMV
It works perfectly!!! Exactly what I was hoping to accomplish. I had a feeling it would be a matter of writing conditions in the coding, I just had no idea how exactly to go about making it myself. Anyways, thanks a lot!
Maybe using this for the skill note tag?
Code:
<Custom Learn JP Cost>
if (user.currentClass().id === 1){cost = 500;}
else{
if (user.currentClass().id === 2){cost = 200;}}
</Custom Learn JP Cost>
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
10,224
Reaction score
6,440
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.

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