Trouble with Getting Subclassing/Passives to Work Properly

Hey there. I've been working on a game that uses a job and subjob system using the class change core and the subclass core. I've almost finished implementing it, but there's still a hangup that's been causing some issues: I can only get passives to apply to a primary job. Right now, passives are autostates and I've been trying to use this code snippet to get it to work only either the job or subjob has 10 or more jp:
Code:
<Custom Passive Condition>
if (user.currentClass().id == 1) {
  if (user.jp() >= 10) {
    condition = true;
  } else {
    condition = false;
  }
} else if (user.subclass() != null) {
  if (user.subclass().id == 1) {
    if (user.subclass().jp >= 10) {
      condition = true;
    } else {
      condition = false;
    }
  } else {
    condition = false;
  }
} else {
  condition = false;
}
</Custom Passive Condition>

However, it seems that subclasses don't have jp values assigned to them from what I can tell. I ran a little experiment, and an NPC can tell me the id and name of my subclass, but I get error screens when I try to have it tell me its jp. So, I guess what I'm looking for is either a way to display jp values for subjobs OR another way to check whether a passive should be applied

(P.S. I would have it check for the corresponding skill, but the way I have it for learning skills is that jobs learn all their skills at level 1, but they're only visible once a JP threshold is met by using the skills core, so checking to see if they have a skill would always return true, even if the skill wasn't visible. Can you check for skill visibility?)

Any help would be appreciated.
Hey there. I've been working on a game that uses a job and subjob system using the class change core and the subclass core. I've almost finished implementing it, but there's still a hangup that's been causing some issues: I can only get passives to apply to a primary job. Right now, passives are autostates and I've been trying to use this code snippet to get it to work only either the job or subjob has 10 or more jp:
Code:
<Custom Passive Condition>
if (user.currentClass().id == 1) {
  if (user.jp() >= 10) {
    condition = true;
  } else {
    condition = false;
  }
} else if (user.subclass() != null) {
  if (user.subclass().id == 1) {
    if (user.subclass().jp >= 10) {
      condition = true;
    } else {
      condition = false;
    }
  } else {
    condition = false;
  }
} else {
  condition = false;
}
</Custom Passive Condition>

However, it seems that subclasses don't have jp values assigned to them from what I can tell. I ran a little experiment, and an NPC can tell me the id and name of my subclass, but I get error screens when I try to have it tell me its jp. So, I guess what I'm looking for is either a way to display jp values for subjobs OR another way to check whether a passive should be applied

(P.S. I would have it check for the corresponding skill, but the way I have it for learning skills is that jobs learn all their skills at level 1, but they're only visible once a JP threshold is met by using the skills core, so checking to see if they have a skill would always return true, even if the skill wasn't visible. Can you check for skill visibility?)

Any help would be appreciated.

Hey, I'm a dummy, I figured it out. When the parenthesis after jp is blank, it defaults to your current job. If you include a number, that number is the class it draws from. Here's my new code, if you're interested.
Code:
<Custom Passive Condition>
if (user.currentClass().id == 1) {
    if (user.jp() >= 10) {
        condition = true;
    } else {
        condition = false;
    }
} else if (user.subclass() != null) {
    if (user.subclass().id == 1) {
        if (user.jp(user.subclass().id) >= 10) {
            condition = true;
        } else {
            condition = false;
        }
    } else {
        condition = false;
    }
} else {
    condition = false;
}
 </Custom Passive Condition>
Kind of off thread topic, but you could cut the code lines down by half if you condense the code like this:


Code:
<Custom Passive Condition>
if (user.currentClass().id == 1) && (user.jp() >= 10) {
  condition = true;
} else {
  condition = false;
}
if (user.subclass() != null) && (user.subclass().id == 1) && (user.subclass().id >= 10) {
  condition = true;
} else {
  condition = false;
}
 </Custom Passive Condition>

Original thread: https://forums.rpgmakerweb.com/threads/trouble-with-getting-subclassing-passives-to-work-properly.96594/