MV SRD's Skill Extender Hide Skills?

So I recently took in SomeRandomDude's Skill Extender to do some fancy submenu stuff in my game.

Only problem is that I don't have the ability to hide skills beyond a function that lets you hide skills the character doesn't know.

You see, I have skills in place that are meant to represent the items in the character's inventory (eg. a "Blue Salve" skill that uses a blue salve from your inventory, since I have a complete overhaul of the in-battle inventory planned with this)

I tried to make it so the skills don't show up if you don't have at least one of the item in question when using the submenu (via Yanfly's Show Custom Eval), but all it does is darken the skill's name and doesn't actually remove it from the skill list.
EXAMPLE:

bandicam 2023-10-07 21-13-41-577.png


Instead of Blue Salve just being darkened and unusable...

bandicam 2023-10-07 21-14-52-530.png


I want it to simply not be there at all if the player doesn't have at least one Blue Salve (and vice versa for other items, or even skills)

This screencap was done with the <Extend Skills Must Be Learned> notetag, but I'd rather not have it be tied to this. Instead if the skill is sealed, it just doesn't show up at all.

TLDR;

I want a function that hides skills in the submenu if they're sealed.
What's the Yanfly notetag that doesn't work?

This might be the bug I fixed a while back - check my signature thread under Skill Core. I think that's what it was, that Custom Show was functioning as Custom Requirement.
@ATT_Turan It's everything that hides skills in SkillCore.

<Custom Show Eval>
if (user.level > 50) {
visible = true;
} else {
visible = false;
}
</Custom Show Eval>

This is the example I used to hide the "Blue Salve" in the screenshot. I dunno, they just seem to seal the skill instead of hide it in the SRD submenu.
And did you apply the fix in my thread?
@ATT_Turan Changing line 765 of YEP_SkillCore to have visible=eval(code); ? Yep, did that. Didn't change anything about the Blue Salve skill's visibility.

Probably because it's something in SRD's skill submenus plugin itself that needs to be changed.
It's because the skill extender is its own type of window and the custom show eval is a method of the skill list window.

Try this. Change line 375 of the skill extender to read:
Code:
        if((!this._displayLearned || this._actor.hasSkill(id)) && this.includes($dataSkills[id])) {
It's because the skill extender is its own type of window and the custom show eval is a method of the skill list window.

Try this. Change line 375 of the skill extender to read:
Code:
        if((!this._displayLearned || this._actor.hasSkill(id)) && this.includes($dataSkills[id])) {

This just hides all the commands in the submenu regardless of the conditions. 🙁
OKAY THEN TRY
Code:
        if(!this._displayLearned || (this._actor.hasSkill(id) && this._actor.noHiddenSkillConditionsMet($dataSkills[id]))) {
OKAY THEN TRY
Code:
        if(!this._displayLearned || (this._actor.hasSkill(id) && this._actor.noHiddenSkillConditionsMet($dataSkills[id]))) {

Doesn't change anything, unfortunately. Skill is still visible but unusable.😅
I fixed this a while ago for my project.

Replace the last function with this, or save it as it's own JS file and add it just below the main one:

JavaScript:
Window_SkillExtend.prototype.makeItemList = function() {
    this._data = [];
    this._skillList.forEach(function(id) {
        if(!this._displayLearned || this._actor.hasSkill(id)) {
            if ($gameParty.canUse($dataSkills[id])) this._data.push($dataSkills[id]);
        }
    }, this);
};
Replace the last function with this
That doesn't seem like it would do the trick. $gameParty.canUse() is going to return true if anyone can use the skill.

So if two actors know the same skill and one meets the requirements but the other doesn't, this would cause it to show for both in their skill selections.

In RCX's usage scenario, it doesn't matter because when the party is out of the item, the party is out of the item - I just thought it was worth mentioning.

Changing that to this._actor.canUse() might work more universally.
That doesn't seem like it would do the trick. $gameParty.canUse() is going to return true if anyone can use the skill.

So if two actors know the same skill and one meets the requirements but the other doesn't, this would cause it to show for both in their skill selections.

In RCX's usage scenario, it doesn't matter because when the party is out of the item, the party is out of the item - I just thought it was worth mentioning.

Changing that to this._actor.canUse() might work more universally.
Good point.

I use it for checking items too, so it didn't cause any issues.

EDIT: Quick note about this._actor: when using this, it will not show skills at all if you cannot use it under ANY circumstances, including not having enough MP.

A comfortable medium should be in there somewhere, but I need the skills to be grey-able sometimes.
Thanks @Maliki79 and @ATT_Turan , this worked perfectly! Now the Blue Salve (and other such skills) will get hidden if they're not valid to be used.

(specifically I used the this._actor suggestion over the $GameParty suggestion)

As for not being able to see skills at all regarding any circumstances... why not add in an extra condition where if the skill isn't under [skill type for the items], it just grays it out?

Only reason I'm asking is 'cause I don't know what the "skill type" script command in MV is. (stype?) :LZSlol:
Glad it worked for you.
Extra conditions could be added to make ATT's code work in my game, but as mine does what I need it to do, I can live with it.
If needed, I can test the code more to see if I do in fact need to change my code, but for now, it's fine.
A comfortable medium should be in there somewhere, but I need the skills to be grey-able sometimes.
That's what I thought I was doing in my initial responses with using includes() and the hidden skill conditions, but RCX said it didn't work correctly. 😛
If the need is there, I'm sure we can figure something out, but I'll consider this mystery solved.
This thread is being closed due to being solved. If you need it reopened report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/srds-skill-extender-hide-skills.161829/