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

● ARCHIVED · READ-ONLY
Started by KingKraken 7 posts View original ↗
  1. 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
  2. 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.
  3. Zarsla said:
    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!
  4. Try:
    $gameActors.actor(x).subclass().id === y where y is the subclass id.
  5. Hey, I don't know if anyone will ever read this but I need some help with this.

    The scriptcall above works wonders but when its trying to check if actor has no subclass at all, it just opens developers tool and read that theres no null value. Any way to check if actor has no subclass without it resulting in error?

  6. Try:

    JavaScript:
    $gameActors.actor(x).subclass() == null
  7. [necro]@SierraEjokki [/necro]

    If the above doesn't help you, please start your own thread and post a screenshot of the error log as your description of the message could mean two different things.