How to Show Icon - theoallen/TSBS GitHub Wiki
Like other battle system. Showing weapon icon is one of vital features for this kind of battle system. Of cource TSBS also allow you to do so. The setting is similar as Tankentai VX (as I remember). Let's skip to tutorial then.
##1. Basic Understanding Setup an icon show is somewhat troublesome. It's because you need to define icon x-y position, where is the center point, the angle, and the rotation. I hope I could explain to you well. Icon setup is located on Config - 2 sequence (first part)

As you can see the icon setup format is like this
"IconKey" => [origin, x, y, z, start, end, duration, index]
There're about eight parameters and its "IconKey". Let me explain to you what are these
1.1 Icon key
Icon key is a text/string used as key and must be put inside quotation "". It's up to you to name your icon setup. But each setup must be unique or it there will be any conflict.
1.2 Icon origin.
The first parameter is icon origin. It is a center point of icon. The avalaible options are 0-1-2-3-4. As you notice in script description, center icon is represented as number. There're :
- 0: Center icon
- 1: Top-left
- 2: Top-Right
- 3: Bottom-Left
- 4: Bottom-Right
This image will explain what I mean

Setup the icon center origin is very important. It's affect rotation center point if you're going to rotate it. Also it's for center point reference for icon positioning related to battler. Explained below.
1.3 Icon Position (X-Y-Z)
The second until the fourth parameters are for icon positioning relative to battler. Before you put any value for X-Y and Z, you have to understand how they works. Let me explain. Here is the battler sprite for actor. And its center point

Battler center point by default is at the bottom center. So, you need to place the icon relative on that position. As the common case, battler graphics for actor is facing left. The weapon should be shown in left-side of the battler. Then you need to put X value in negative. And also Y value to negative (since it's a bit over the center point).
For Z position. You only need to put the value to true if you want to show icon over the battler / close to player. And false if not.
This is the example case.

If you going to show icon like that, you have to put X and Y value in minus. Then set Z value to true
1.4 Icon Rotation (start, target, duration)
You could rotate the icon as well. But you have to define the starting angle, target angle and the rotate duration (in frame) as well. The rotate options are handled in fifth until seventh options. Fifth option is for starting angle, sixth is for target angle, and seventh is for duration.
This is the brief explanation regarding the rotation. Please take note that rotation center point is depends on the icon origin that you have set in the first option.

1.5 Icon Index
The last parameter is icon index. It's index of icon as you could see in database when you choose icon for skill/weapon/armor/state. You could specify icon you wanna use. But you could also set icon depends on the actor's weapon by inputting -1. If you have dual wield character, to show the second weapon, you could use -2. If the second weapon isn't present, it will be use the first weapon instead.
2. Icon Call
Before you call icon the icon, you need to understand the basic triggers and timing. Like any others sequence commands. Showing an icon is just a "triggers". It doesn't really do anything except a trigger. There're two ways to shown an icon. By calling them in using [:icon] or put them in [:pose]. Let's study my sample swing icon
"Swing" => [4, -5, -12, true, -60, 70, 6, -1],
As you notice, it's already been there by default. The icon using bottom-left as center point. It is shown in (-5,-12), above player, and it will rotate from -60 degree until 70 for 6 frames, using weapon icon. You need to make a pose timing to get the right animation.

Let's say that you're going to take sequence pose 5 - 4 - 3. Icon rotation needs 6 frames to complete it task. Then, each pose will be take at least 2 frames. Here is the sample sequence
[:pose, 3, 5, 2, "Swing"], # <-- call icon
[:pose, 3, 4, 2],
[:pose, 3, 3, 45], # <-- Ending + longer wait
Example gif :

Sorry for the crappy quality. I couldn't record it in better FPS. For advance user, you even could make sequence like this. Taken from Soleil's Slicing Wave
