MZ Determine Class Levels, Class Change System VS

Good evening all!

While using the Change Class System VS I am struggling to find the reference/variable that the individual class levels are using.

I have classes set up to maintain separate experience, and as such I'd like to use their levels to inform the EquipmentRequirements plugin Gabe put together to restrict usage of certain armors based on class level

Additionally I want to be able to check and change multiclasses Tier 2+ using the WeaponClassChange plugin, so a way to reference those with a [match[1]] would be key.


A tall order I know, but as with all things VisuStella, the code is a pain to work thru.

Any help would be greatly appreciated.


Thank you
To find the levels of the classes it is the following:
$gameActors._data[id]._classLevel[classId]
or
$gameActors._data[
id].classLevel(classId)
This will return the level of the specified class for the specified actor.

If you want a broad list of class levels, you just don't use classId
$gameActors._data[id]._classLevel

To add it for the EquipmentRequirements plugin, I 'think' you would need to add the following to the plugin:
Code:
case "classLevel":
if (result) result = actor.classLevel(match[1]) >= match[2];
break;

I don't use the plugin nor I have I tested with it, but judging by how it attempts to match variables, you should do the same for the classLevel. In this case, you first pass along the class to check (match[1]) and then you pass along the 'value' you want to check against (match[2]).

It's worth noting that the classId is the same as the ones in the database. So by default classId '1' is Swordsman.

Now as for the weaponclasschange plugin, what you're looking for I think is:
$gameActors._data[id]._multiclasses
This will return an array that has your currently equipped classes. [0] = Main Class and [1] = Subclass.
If you want to change it through a script, since I don't know exactly how the plugin functions, you'd just hard set it:
$gameActors._data[id]._multiclasses[1] = classId

I hope that's what you need, but that's the best I can offer. GL.
case "classLevel": if (result) result = actor.classLevel(match[1]) >= match[2]; break;
Going to continue to test but so far so good for this one!


$gameActors._data[id]._multiclasses
This will return an array that has your currently equipped classes. [0] = Main Class and [1] = Subclass.
If you want to change it through a script, since I don't know exactly how the plugin functions, you'd just hard set it:
$gameActors._data[id]._multiclasses[1] = classId
Where Ive been getting hung up is making sure this is applicable to any actor, would it justbe a matter of leaving Id blank? As in $gameActors._data[]
$gameActors._data would just return an array of each actor currently in the party, and each element of that array would contain the object data in it's entirety, and again without knowing the actorId in question, all that information is kind of useless.

But I'm going to assume, this is all done through the menu yes?
As in you did the following: Opened the Menu -> Clicked Equipment -> Clicked on an actor -> Now trying to equip an item.

If that's the case you can do this:
$gameParty._menuActorId
This would return the actorId of the actor currently using the menu. And you can combine the 2.

$gameActors._data[$gameParty._menuActorId]._multiclasses[1]
Using this you would get the SubClassId of which ever party member is currently using the menu.
*Note* - This only works if you click on an actor within the menu. Anything else and it will give an error.
Gotcha, sorry for delayed response, have had a full house.

With regards to the EquipmentRequirements again, I am trying to incorporate a weapon type requirement there as well/instead.

Currently I am using

case "weapon": if (result) result = actor.isWtypeEquipped()[match[1]]; break;

I have also tried

case "weapon": if (result) result = actor.isWtypeEquipped(match[1]); break;
However this locks out the equipment from being used altogether, no matter which config.

Any ideas on this one?

SOVLED!

case "wType": if (result) result = actor.isWtypeEquipped(parseInt(match[1])); break;


Had to add in the parseInt and boom we're good! (also changed the notetag cause I may use a direct "weapon" require and rather avoid future confusion

Going to spend the time working on the multiclasses bit next. Thanks again for all your help @GmOcean !
Glad it worked out. And yeah, sorry, I wasn't too sure on how the plugins worked, so I just provided my best bit of information looking through the code.
Glad it worked out. And yeah, sorry, I wasn't too sure on how the plugins worked, so I just provided my best bit of information looking through the code.
Nothing to apologize for. You're doing plenty enough. Will let you know how it goes

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.

Original thread: https://forums.rpgmakerweb.com/threads/determine-class-levels-class-change-system-vs.154027/