[RMMV][Yanfly] Issue: Party Member has access to all Class skills

For my current project, I've opted to make use of Yanfly's Class Change Core and Subclass extensions to implement my desired class system.

Relevant plugin versions:
- Yanfly Core v1.31
- Yanfly Class Change v1.13
- Yanfly Subclass Ext. v1.11
- Yanfly Battle Engine Core v1.49
- Yanfly Battle System STB v1.05
- Yanfly Skill Core v1.13

**Note that I am not currently using the Yanfly Skill Learn System plugin.

The issue that I am observing is that the lead party member (the player-controlled character) seems to automatically learn any skill that is included in the "Skills to Learn" section of any primary class (non-subclass). This occurs despite the fact that each skill has a plugin notetag that restricts it to its respective class. Primary class changes are disabled for all party members via notetag. Additionally, an event runs at the start of play and removes each primary class from the global class pool.

Here's a visualization:

Member 1/Class 1
Skill A, Skill B, Skill C, Skill D

Member 2/Class 2
Skill B

Member 3/Class 3
Skill C

Member 4/Class 4
Skill D

This issue does not persist while the Class Change Core and Subclass extension are turned off (but then so is my class implementation).

I searched for solutions online, and I did find mention of a known issue that sounded similar to what I have observed, but I was not able to find a workaround or any confirmation of a fix.

This is not a critical issue at the moment, as it just gives the lead character unrestricted access to class skills, of which there are currently few. I will need to resolve it eventually, though.

Any insight that anyone can provided is appreciated.
I'm Struggling to reproduce this, which is odd because my setup is remarkably similar to yours.
though i did have the main character randomly have ~20000 defense points in the editor which some how carried into the game before i saw this post that im still scratching my head at.:blink: that just randomly disappeared which is a bit of a worry.

I'm assuming Member 1 / Class 1 is only supposed to Learn Skill A, but is instead learning all of them listed in any of the classes.

1. are all 4 members present at the start of the game?
2. this even that removes all primary classes from the global at the start, does that remove it in the class menu (it didn't for me).
3. do these skills have any level requirements
4. do you have any unnamed Classes that may have been added somehow as a subclass.
5. are all these skills included in a class somewhere
6. does this happen instantly or as you level up?

if you press F12 and type in "$gameActors.actor(1).unlockedClasses();"
try "$gameActors.actor(1).currentClass();" to see if the desired class even shows up

here my GUESS on whats happening, is be default that actor has all 4 classes unlocked and the skills learned are at level 1.
if at any point actor.updateUnlockedClassSkills() is called if will quickly iterate through each unlocked class and apply and learn any skills in them.

as to why they still show up when you use restrict class eludes me. I've yet to reproduce this thing.
Thanks for looking into this.

Here are the answers to your questions:

  1. I think technically no. Although I would intend to start with a full party, as far as I can see, you always start with the lead party member and you have to add additional members through an event.
  2. I'm using the RemoveClassAll plugin command from Yanfly's Class Change Core plugin. The documentation states it "removes class X from the global pool."
  3. The class skills themselves do not have implicit level requirements that I am aware of. However, they are all learned at Level 1 in each respective class. This was configured through the "Skills to Learn" widget in the class pages. Note that the party starts at Level 5.
  4. Not that I can see. I have four primary classes defined, and one subclass defined (5 total), but the subclass is currently locked through an event at the start of the playthrough, and it appears to be working as intended.
  5. Each class skill is assigned a Level 1 skill in each respective class. So Class A is configured to learn Skill A at Level 1, etc. There are no primary classes or subclasses that contain multiple of these class skills.
  6. This is occurring instantly at the start of a playthrough. Since I'm starting the player at a different location than the true start of the game (for testing purposes), I have events running on the player's entry to the test starting area to simulate progression up to that point.

I think you might be onto something with your theory.

My current setup has two events running in parallel at the start of the session. The first is set to Autorun and performs all of the story-related actions. The second is a Parallel event that does the class modifications, which currently consists of removing the primary classes from the global pool and locking the subclass feature. It sounds plausible that the class modifications just may not be running ahead of whatever is allowing the lead party member to learn the skills. The only catch is that the lead party member should only have a single primary class, but since the additional party members are added via event in parallel with the class modifications, that might explain why this issue is only happening to the lead party member and not the entire party.
@BlueZircon @Fornoreason1000
Both of you, please read the descriptions yanfly has placed on the website of the class change plugin as well as the help section of the plugin itself more carefully and without skipping parts.

What you describe is a known side-effect of the class change plugin, it is NOT a bug and will not be changed for a lot of reasons.
Instead you have to change the way your skill types are set up, because that is the reason for the sideeffect.

Yanfly wrote some comments on that that you need to follow to keep the effects clear and the classes distinct - that is why I referred you to the texts. I can't tell you what exactly it is you need to change, it has been two years since I last read about it and I don't know what happened with the updates since then.
from: http://yanfly.moe/2015/11/27/yep-32-class-change-core/

If you are using the Class Change Core and are wondering why skills from other classes are appearing in other classes, it is because you are using the same skill type. This is an intended function. The same way if you were to NOT use the Class Change Core plugin and use RPG Maker MV’s default class changing event, any skills acquired from the class you changed from will remain in the character even after changing. That is just how it works and I have no plans on changing that. If you wish to distinguish your skills to certain classes, then make different skill types for those classes and set those skills to those new skill types.



Yep, the reason i missed this because its not in the plugin file, but only on his site. And this is also the reason i couldn't reproduce this is explain via Skill types. This explains why those skills would be added if the skill type is was being shared across the 4 classes. but this should only happen if the 1st player had access to the classes, in fact this doesn't happen for me even if every skill listed in the classes was of the same type.

This only happens when I have said classes unlocked and they all share the same skill type.

if you really don't want to mess with the skill types this can be used
Code:
<Custom Show Eval>
visible = user._classId == 4;
</Custom Show Eval>

This will stop it from showing up if you switch classes.
Thanks for finding this - I'll try to implement a workaround.
from: http://yanfly.moe/2015/11/27/yep-32-class-change-core/





Yep, the reason i missed this because its not in the plugin file, but only on his site. And this is also the reason i couldn't reproduce this is explain via Skill types. This explains why those skills would be added if the skill type is was being shared across the 4 classes. but this should only happen if the 1st player had access to the classes, in fact this doesn't happen for me even if every skill listed in the classes was of the same type.

This only happens when I have said classes unlocked and they all share the same skill type.

if you really don't want to mess with the skill types this can be used
Code:
<Custom Show Eval>
visible = user._classId == 4;
</Custom Show Eval>

This will stop it from showing up if you switch classes.

I just had this issue right now. If you have a similar issue, it might be because this Yanfly plug-in (Class Change Core) automatically sets up the first four classes as global classes. To stop this, just go into your plug-in manager, and change the parameter for "Unlocked Classes". By Default it should be "1 2 3 4". Just delete all those numbers and your problem should be solved.

PS: Thank you ForNoReason1000. You may never read this, but if you do, you helped steer me in the right direction
Necro-post notice: @Michael55

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-yanfly-issue-party-member-has-access-to-all-class-skills.103523/