Link Skill name with code.

Trying out an alternative battle screen UI for a monster capture game. Every action can be accessed by a hotkey.

Spoiler: Battle UI Concept Mockup
SASFD.png

I can do everything with Ultra Hud Maker, but I am unsure about how to link the skill names. There are two options in the program to show the skills, either by code like this.

Spoiler: Script Option
sdf.png

Or show them via a variable (which seems to also require code xD)

Been looking around and found some similar threads but its either for MV or not quite the same

Been doing some trial and error but its difficult when I dont know what Im doing 😛

I basically need a bit of script to show actor 1's skills (Preferably showing all because they will only have 4 but im going to use an equip skills plugin so I think showing all instead of showing skill 1,2,3 and 4 might work better but idk)

Halp plx!
Preferably showing all because they will only have 4 but im going to use an equip skills plugin so I think showing all instead of showing skill 1,2,3 and 4 might work better
I'm a little confused by this - you say "do this but do this," when both things seem to be the same.

Regardless, I don't believe you actually want a way to show all an actor's skills, because HUD Maker requires you to create an element on the screen in a specific place and determine what it says there.

Then the next line says its own thing, etc. So those four skill names would be (as far as I know) four separate HUD Maker elements.

The first reply in the first thread you linked to gives you the solution, although there's a more efficient way to access it:
Code:
$gameActors.actor(1).skills()[0].name;

The first parenthetical number (1) is the actor ID you're looking at, and the second number in brackets [0] is the index of the skill. If your actor only has four skills, you'd use 0, 1, 2, and 3 as the indices.

If you're using a plugin that changes how skills work, such that they actually know more than 4 skills but you're only equipping a few at a time, you may need a different script call. But
A - this should allow you to create your interface, at which point it's trivial to just change the line of code in each element once you have it
and
B - you'd need to tell us which plugin you're using to do that.
I'm a little confused by this - you say "do this but do this," when both things seem to be the same.

I just wasn't sure how the equip skills plugins work, if you equip 4 skills and those equipped skills counts as your four first skills then it doesn't matter.

Regardless, I don't believe you actually want a way to show all an actor's skills, because HUD Maker requires you to create an element on the screen in a specific place and determine what it says there.

Then the next line says its own thing, etc. So those four skill names would be (as far as I know) four separate HUD Maker elements.

Yeah, it would be easier to make it look good too. I have a lot of space to work with because my sprites are so small (even enlarged by a lot xD)

The first reply in the first thread you linked to gives you the solution, although there's a more efficient way to access it:
Code:
$gameActors.actor(1).skills()[0].name;

That worked, thanks!

The first parenthetical number (1) is the actor ID you're looking at, and the second number in brackets [0] is the index of the skill. If your actor only has four skills, you'd use 0, 1, 2, and 3 as the indices.

If you're using a plugin that changes how skills work, such that they actually know more than 4 skills but you're only equipping a few at a time, you may need a different script call. But
A - this should allow you to create your interface, at which point it's trivial to just change the line of code in each element once you have it
and
B - you'd need to tell us which plugin you're using to do that.

B: Will do.


@ATT_Turan One small thing, when I have less then 4 skills it just says 0. Its not a huge deal but is there a simple way to change it to either nothing or like ''---''? The Hud Maker only allowed condition by specific skills, not skill slots.
23.png
If I recall correctly from other people's screenshots, you should have a field for a JavaScript conditional that determines whether an element is displayed.

If you see that, then you'd use the same code for the condition and for the display.

If you don't see that (or if you prefer --- to empty space) you can do this for your code:
Code:
$gameActors.actor(1).skills()[3] ? $gameActors.actor(1).skills()[3].name : "---"

I just wasn't sure how the equip skills plugins work, if you equip 4 skills and those equipped skills counts as your four first skills then it doesn't matter.
They don't. You would use battleSkills() instead of skills() (presuming you're using Yanfly's Equip Battle Skills, you still didn't actually say. Another plugin might work differently)

Original thread: https://forums.rpgmakerweb.com/threads/link-skill-name-with-code.167577/