Help with yanfly skill core plugin

Hi people,

In my project the combatskills are linked with a weapon.
The player can use only skills from the equiped weapon.
so if he uses a sword, he can use only swordskills, if he uses an axe, he can only use axeskills.
Therefor I want to blankout the skills that he can't use.
ea. the player have no swordskills available when an axe is use.
I presume I can use Yanfly's skill core with this notetag in the skill?

<Custom Show Eval>

if (user.equips()[0] = equiped weaponstyle) {

visible = true;

} else {

visible = false;

}

</Custom Show Eval>

Only thing is, I don't know how to work Java 🙁.
Can anyone help me?
I know the "equiped weaopnstyle" have to be replaced by the IDnumber of the style, but if I change that, the skills are still shown.
So, I'm missing something... :/
Thanks in advance!
I know nothing about javascript, but maybe it is because of the space beetween each line ? If I remember well, there is
no spaces.
Thanks for your reply.
The space doesn't matter...it isn't there (it's the layout from the copy paste.
I'm sure, I have to add some things, yet, I don't know what!
Any Javascripters that can help me out? Thanks you!
Hey there I am not a Java guy but I do use that plugin and have a very similar system. Just thought I'd throw this out there in case you hadn't thought of it yet but have you thought about having multiple skill types? So when a sword is equipped you get the "Sword" skill, when you equip an axe the "Sword" skill would change to the "Axe" skill so there's a different skill type for each weapon type rather than a straight Weapon Skill category.
Thank you for thinking along!

Yes, I do use different skilltypes,
yet the unusable skills are grayed out but still visible.

I want them out of my skillist awhole.
ea. When I equip a sword, I would like the axeskills invisible...
Hmm for me the skills don't show as grayed out they are gone. For me the weapon skills, are classes, well sub classes, but either should work. I realize I wasn't clear about that sorry. But all the sword skills, for instance, belong to the sword class. That way each class type would only show the skills listed under it. I don't know if you can set it up to auto switch classes when equipping different weapons types but that is probably doable. But I think this is the only way to keep the skills from showing up outside of useing some specialized plugin.

If this clashes with your current class system you could always use Yanfly's subclass plugin as weapon types and specify what traits carry over.
Ah okay, I see...
I don't use classes for my characters.
It's the skills that make the difference, as they evolve by using.
Ea. a character that gaines exp in swordtype (by using swordskills) gets more and better swordskills available than a characters trained in axestype and visa versa.
But it is possible to train in both (and more) types (and therefore -->blanking out the skills that aren't linked to the weapontype that isn't equiped).
If I use the subclasses plugin from Yanfly, the skills already learned won't be passed on (I think) to another subclass.

I'm sure it can be done with the Yanfly's skill core as I find examples on the internet...only, they don't work 🙁.
And I'm sure, I'm pretty close and missing only a few things in the script.
@Enthar Why not have skill types for each weapon skills, then attach the skill types to the weapon.
This way you only have acess to the skill if you have the skill type, and you only have the skill type if you have the weapon.
ie The swords have the sword skill type, and sword skills have the sword skill type, so only when you have a sword equipped only then can you use sword skills.
I know this, but when i do, the "unusable" skills are gray (and not usable), but I want them out the list.
It's just a visual thing...the skills system works how it should.
Never the less, I found a sollution.
Thanks for thinking along!!!
You're welcome.
Though why not have it where the weapons add the skill types for each one, this way only a sword would have sword skill type and thus you can only have access to those skills when you have a sword skill type?
Also what method did you use?
hmm...okay. I'm do not completely understand what you are trying to tell me :/
--> making events(add skilltype) activated when weapon wielded?

I still use Yanfly's skill core.
With this script on each skill (the bold number depends on skilltype):

<Custom Show Eval>

if (a.isWtypeEquipped(1)) {

visible = true;

} else {

visible = false; }

</Custom Show Eval>
@Enthar
No Script or Plugin needed.
In the database you can make weapons and armors just give skills, and they will just show up when equiped and not equiped.
There are two ways of going about this. You can make it where you can see all the weapon skill types from the get go by giving the actor or class the skill types, or you can make it where you can't see them and are given the skill types along with the skills when you equip.

Along with that just make sure that the the class or actor doesn't have the skills given in the traits, or by levels for the classes.


Version 1 (Where you can see the skill types):

Before Equip:

Screenshot (46).png

Screenshot (59).png

Screenshot (62).png



Equip Sword:
Screenshot (48).png

Screenshot (60).png

Screenshot (59).png

Equipped Axe:

Screenshot (50).png

Screenshot (61).png Screenshot (62).png


In the Database

Types:
Screenshot (52).png


Actor:

Screenshot (56).png

Weapons:

Screenshot (57).png Screenshot (58).png



or

Version 2 (Where you can not see the skill types):

Before Equip:
Screenshot (46).png

Screenshot (47).png

Equiped Sword:
Screenshot (48).png

Screenshot (49).png

Equipped Axe:
Screenshot (50).png


Screenshot (55).png
And in the Database:
Types:Screenshot (52).png


Weapons:
Screenshot (53).png

Screenshot (54).png


You can have other magic types along with the weapon types. So that the character could have heal be under the magic skill type, and then have strike under sword skill type. And that character has heal because of their class and then the weapon skills comes from weapons.
Aha...now I understand!
thanks for the really detailed explanation! You put a whole lot of work in it 🙂.

I'll explain a bit more the skills in my project.
As you start the game you have the basicattack skill / weapontype.
Sword, axe, wand, staff, club.
So the player start with (weapon)5 skills.
Depending on what weapon is wielded, you see only the skill with that weapon.
For that part I can use your demo.

If not...
Every time the player uses a weapon he adds to a variable (one for each weapontype).
When the variable reach a certain point the player can add another skill (he learns by using the weapon).
He can add up to 8 skills (call them moves) / weapon that way.

So he can focus on one weapon type and specialise in it or he can use more weapontypes to get a more balanced range of skills.

If I don't hide the unusable skills, the skill window is spammed with gray and unusable skills.
so I wanted only those skill visable which are usable with that weapon (and only then when they are learned.).
I don't think that would be doable with your idea. Right?
You can still use my idea but you have to skill core.
Make sure that skill core is 1.11a (aka the most recent version).

Basically have the weapon give all the skills.
And then have a notetag like this:
<Custom Show Eval>

if ((user.weaponlevel()) > y) {

visible = true;

} else {

visible = false;

}
</Custom Show Eval>

I don't know what you're using for weapon levels however find the code that can reference the users weapon level (or if it's a variable use $gameVariables.value(x)), and replace the user.weaponlevel() with the code that's need.
So if you were just using the generic in-game levels it be user.level().

Any way the y value should be highest level that can not have that skill. So for example if a skill is acquired at level 2, then make y , 1.

Any starting skills with the weapon, ie level 1 skills, don't put anything in their notetags.
Sorry bout the late response...I was on vacation 🙂.
In your previous example I still need a note tage to every skill...same as mine.
so no difference there...
btw. the skills aren't gained by character lvl, but by weapontype lvl (read x uses of that weapontype).

anyway, the skills work fine now.
Thanks a million for your input and feedback!

Someone should try to put all the knowledge of you guys and relevant answers to posts of this forum in some sort of tutorial.
I'm sure it would be an awesome manual to rpgmakers.(...and several volumes aswell ;D)

Original thread: https://forums.rpgmakerweb.com/threads/help-with-yanfly-skill-core-plugin.79317/