Skill Custom Show Javascript

Michael Caiola

The Stone Bull
Veteran
Joined
Sep 14, 2016
Messages
392
Reaction score
76
First Language
English
Primarily Uses
Yanfly's Skill Core lets you use custom notetags to show skills. Here's their sample code:


<Custom Show Eval>
if (user.level > 50) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>




How do I change this to check for a specific class or subclass? Since subclass has to reference another plugin, I can work with just using the class.


I tried this but it didn't work:

Code:
<Custom Show Eval>
if (user.class = 4) {
  visible = true;
} else {
  visible = false;
}
</Custom Show Eval>
 

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
<Custom Show Eval>
if (user.classId = 4) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>


you sure it's not classId? (I haven't looked into it at all, but Yanfly/Kadokawa usually does it that way, also that's how it's listed in the Json file)
 
Last edited by a moderator:

Michael Caiola

The Stone Bull
Veteran
Joined
Sep 14, 2016
Messages
392
Reaction score
76
First Language
English
Primarily Uses
That didn't work.


I tried adding a second =, but now it won't show at all, even with the correct class.
 

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
I'll recreate what you're trying to do and get back to you if I find anything
 

Fugama

Means well, but messes up sometimes.
Veteran
Joined
Jun 7, 2014
Messages
158
Reaction score
90
First Language
Fake English
Primarily Uses
RMMV
And we're in! This worked for me
 

Code:
<Custom Show Eval>
if (this._classId === 4) {
  visible = true;
} else {
  visible = false;
}
</Custom Show Eval>
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top