Question about skills

Is there a difference between actor defined skills and class defined skills? If so how can I use a script call to obtain an actors skills?

For example, along the lines of $game_party.battle_members[1]. skills? or something...
Actor defined skills are skills only an individual actor can use while class defined skills can be used by any actor within that class. I don't understand the rest of your question. Are you trying to display skills on a screen?
You can fetch the skills of a class via $data_classes, but when you pick the skills of an actor, it will always show both skills of actor and class since the class skills are already added to the skills of the actor...


so if you wanna know if a skill is on the actor part only, then get the skills of an actor, then get the skills of the class and compare them... anything that doesn't belong on both is an actor skill... + equipment skills and state skills...
So i tried using this: $game_message.add($game_actors[1].skills[1])

as a script call but it doesn't seem to work, know how to fix this?
If that worked, that will show the whole data for the skill... also, what do you mean it doesn't work? does it error or what? Anyway, I'd really expect it won't work since that will return the skill data, which is clearly not a string...


and where did you put that?
oh wow, i cant believe i overlooked that. Had a brain fart there, but yeah I just realized now that it is trying to output all the data. The error was it trying to add + to seperate the data i guess. Anywho, how would I pick out specific stuff from it like name and id of the skill? change skills to skills_id or skills_name respectively?
$game_actors[1].skills[1].accessor


go to help file, find RPG::Skills and see all accessors for the skill data class
Okay i tried using the accessor, stype_id,:

@a = $game_actors[1].skills[1].stype_id$game_message.add(@a)
getting undefined method for stype_id
show the complete error, always...


you can try to print the skills[1] first to the console just to see if it actually exists
o6f9sm.jpg
it means that the $game_actors[1].skills[1] doesn't return anything


maybe try another index (try a skill id that the actor surely has as the index)
Okay actor 2 has fire breath ID #8 so game actors [2] and skills[8] still nothing, same error, saying that it is undefined.
then try printing the skills array to the console... to see what it returns

Code:
p $game_actors[1].skills.to_s
PS: Make sure you have already initialized the actors that ur trying to show the skills of.
Using what you posted above, it printed the exact info of the skill that the actor had. But for some reason it just seems that stype_id is undefined

So the skill exists, I just cant seem to retrieve any data on it.
can you post a screenshot of the result? I can't do it right now since I only have Lite here... so far, it seems that the skills array/hash do exist, but we're using the wrong method of calling the members of the list
xdfrfb.png
oh you only have 1 skill for the actor? how about the other one? if yes, then use 0 for the ID and try it
Yes since Im just testing the script calls to retrieve the skill data, I only gave the actor 1 skill. Right now that above information was retrieved from the 2nd actor who only has skill fire breath. I deleted anything with actor 1 to get rid of confusion. So right now im just basing everything on actor 2 and his skill fire breath. Now i tried to use

@a = $game_actors[2].skills[1].stype_id$game_message.add(@a)
again, but it still says stype_id is undefined. Could this be happening since stype_id is not defined in game_actors? But otherwise how else would I get the data. The console printed the data like I showed you in the above post.
I told you try to use 0 as index... If your actor only has 1 skill and if skills return an array, then it means the skill will be on slot 0 of the array since arrays start at 0
edit nvm now everything is working peachy..

Thank you a lot for the help lol!

Original thread: https://forums.rpgmakerweb.com/threads/question-about-skills.25137/