Yami's YED Skill Shop

This is the plugin I'm currently using https://raw.githubusercontent.com/s...delta/master/build/SkillShop/YED_SkillShop.js

How do you restrict certain skills to certain players in the shop? I've tried many different script calls but none are readable by Yami's engine.
its very easy actually. each actor has a javascript function called actorId() which returns the number you see next to their name in the data base. the game uses it extensively for managing them.

also Yami does say that you kinda need some JS knowledge to work the Custom Requirements. this means you need to follow the JS syntax. this means "=" will set a value, and "==" will Compare the value. each line in the custom requirements needs to evalute to 'True' before the skill can be bought.

e.g
Code:
var foo = 2; //foo is now 2, we will use this as an example
foo == 31 // false, foo is not 31
foo == 2 //true, foo is indeed equal to 2
foo = 40; // foo is now 40, which will loosley still evaluate to true, we do not want this

so what you want is to Comapre ActorId to the one you know you want. should look something like this, I've tested this code and it does intact appear t work. this skill can only be learnt by actor 3.

Code:
<Buy Cost Gold: 10000>
<Buy Custom Require>
actor.actorId() == 3
</Buy Custom Require>

However, although only that character can buy it, it does still show up as disabled for the other characters. the other character cannot buy it at all but there is no way to hide this skill form other characters without modifying Yamis work
its very easy actually. each actor has a javascript function called actorId() which returns the number you see next to their name in the data base. the game uses it extensively for managing them.

also Yami does say that you kinda need some JS knowledge to work the Custom Requirements. this means you need to follow the JS syntax. this means "=" will set a value, and "==" will Compare the value. each line in the custom requirements needs to evalute to 'True' before the skill can be bought.

e.g
Code:
var foo = 2; //foo is now 2, we will use this as an example
foo == 31 // false, foo is not 31
foo == 2 //true, foo is indeed equal to 2
foo = 40; // foo is now 40, which will loosley still evaluate to true, we do not want this

so what you want is to Comapre ActorId to the one you know you want. should look something like this, I've tested this code and it does intact appear t work. this skill can only be learnt by actor 3.

Code:
<Buy Cost Gold: 10000>
<Buy Custom Require>
actor.actorId() == 3
</Buy Custom Require>

However, although only that character can buy it, it does still show up as disabled for the other characters. the other character cannot buy it at all but there is no way to hide this skill form other characters without modifying Yamis work
So I tried using that syntax you said and now I'm getting an error. None of the skills are even showing up. I've also tried replacing actorID with the actual actor number but that didn't work either
RPGMV_2018-12-21_09-06-52.png
Game_2018-12-21_09-02-24.png
you have a capital D on on actorId() All JS code is Case sensitive. but you should treat the whole game as such. less headaches that way
here is the code again

Code:
actor.actorId() == 3

see how its a lower case d? I used to hit this all the time when i was first learning to code more times I can count.
but like i said, i tried this and it does work. the only problem it does have is the skill still shows up for other characters, only that it cannot be bought.
you have a capital D on on actorId() All JS code is Case sensitive. but you should treat the whole game as such. less headaches that way
here is the code again

Code:
actor.actorId() == 3

see how its a lower case d? I used to hit this all the time when i was first learning to code more times I can count.
but like i said, i tried this and it does work. the only problem it does have is the skill still shows up for other characters, only that it cannot be bought.
Works like a charm dude thanks a lot. I was subconsciously capping ID not sure why. It's alright if the skills show up for undesired characters, as long as I'm not able to purchase that will be good enough

Original thread: https://forums.rpgmakerweb.com/threads/yamis-yed-skill-shop.103495/