Yanfly's Subclass Plugin: Possible to script check for subclass?

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
Hey all! I've run into a problem that might be either impossible without tweaking Yanfly's plugin or is fairly simple.

Basically, all the classes in game are tied to items in the inventory. So if you Have Item A, you unlock Class A and so on. I also have it set up so that if the item is removed, so is the class and the character reverts to their default class.

My current issue is that I'm also using Yanfly's Subclass plugin, to give the player a little more variety in skills/stats. But the above method only accounts for primary class. I'm not entirely sure how the plugin works, but it's using subclass in a way that doesn't recognize the built in checks. Is there any possible script that can account for the sub-class, or would there need to be some major tweaking of the plugin to do so?

Here's a link to both the class plugins: Class Plugin and Subclass Plugin
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
228
First Language
English
Primarily Uses
To check for a specfic actor subclass do this:
$dataClasses[$gameActors.actor(x).subclass().id] == y

Where y is the id of the subclass you're looking for and x is the actor id.
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
145
Reaction score
52
First Language
English
Primarily Uses
RMMV
To check for a specfic actor subclass do this:
$dataClasses[$gameActors.actor(x).subclass().id] == y

Where y is the id of the subclass you're looking for and x is the actor id.
Thanks for the suggestion! Sadly that doesn't seem to work.

I tried testing it with a conditional branch and checking to see if actor 1 has the subclass for 3, but it only activates the 'else' statement. Interesting thing about it though, is that if my actor doesn't have a subclass, it opens up a developer tool error. But when they do, no error occurs.

So at-least, I can say the code is recognizing the presence of subclass. It's just not recognizing specific ones!
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
710
Reaction score
228
First Language
English
Primarily Uses
Try:
$gameActors.actor(x).subclass().id === y where y is the subclass id.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top