How to Setup Skill - theoallen/TSBS GitHub Wiki

There're many options you could use for skill. Such as setup the sequence, targeting, and add some special flags for skill. This page will tell you what are those options, how it works, and when you have to use it. Please take note that this page is somewhat Bandwidth Killer because I put a lot of sample animated gifs. If you don't have sufficient internet connection or quota based internet, I suggest you to find a better connection. Well, let's skip to tutorial then.

1. Action Sequence

This feature is obvious since my battle system is for animated sideview battle. You could setup an action sequence for skill. However, before you set it up, you need to understand how it works. I divide the skill sequences in three parts. They're pre-action, main-action, and post-action.

Action

1.1 Pre Action (Preparation)

Pre-action or preparation is an animation sequence that will be executed on before the main action. It has no target. So you can't use [:target_damage] or [:move_to_target]. The purpose of pre action is to give preparation animation sequence before it deals damage to multiple hits. You could set the pre-action by inputting this tag in skill notebox

\preparation: Sequence_Key

Replace the sequence key with text/string key from your action sequence. Example :

Notetag

The pre-action sequence itself is optional. You can omit the tag if you feel it's uneccessary.

1.2 Main Action

Main action is an animation sequence that will be executed after preparation and also the right place to put the [:target_damage] and any sequence command which related to target. Top put main animation sequence, simply put this tag

\sequence: Sequence_Key

Slightly different with the preparation sequence. If the preparation sequence is exeucted once, the main action will be repeated as many as the skill target. For example, you have a skill which has 4 random enemies. Then the main action also will be repeated 4 times.

Let me give you an example. This is the sample sequence :

"Sample1" => [
[],
[:move_to_target, 45, 0, 20, 3], # <-- move trigger
[:pose, 2, 5, 10], # jump pose (half beginning)
[:pose, 2, 3, 10], # jump pose (half ending)
[:pose, 2, 1, 10], # Rest for a while
[:show_anim],      # Show animation
[:target_damage],  # Apply damage
[:pose, 3, 5, 2, "Swing"],  # Icon Swing
[:pose, 3, 4, 2],
[:pose, 3, 3, 8],
[:icon, "Clear"],  # Clear icon
],

Assume that the skill has the target scope as "All Enemies". The main action sequence will be repeated as many as the targets. Below is the sample animated gif. I put two enemies there.

Repeated action

Let's compare if you put pre-action sequence before the main action. This is the sample sequence for pre-action

"Pre-Sample" => [
[],
[:pose, 3, 6, 15],  # Preparation pose
[:pose, 3, 7, 5],   # Preparation pose
[:pose, 3, 8, 35, "Pointing"],  # Pointing sword
[:cast, 2],       # Casting animation
[:wait, 45],      # Wait for 45 frames
[:icon, "Clear"], # Clear icon
],

Put them together in notetag

Notetag

The example gif would be like this

preaction

1.3 Post Action (Return)

Like its name. Post action will be executed after main action is done. You don't really need to define the post action for each skill. It's because it's already defined by default in Config - 2, the second part, default sequence. This line.

Default_Return    = "RESET"     # Return sequence key

Every skill ending sequence will use that key sequence for general. That is why when you make a new skill, it will automatically going back to its original position. Let's study the default return sequence I made.

"RESET" => [
[false,false,false],
[:visible, true],
[:unfocus, 30],
[:icon, "Clear"],
[:goto_oripost, 17,10],
[:pose,1,11,17],
],

For general post action sequence, I put the [:visible] flag to true in case if you set [:visible] to false in main action, it will be switched back to true. I also clear the [:focus] and the battler icon as well. So, everything will be back to normal. I also put [:goto_oripost] to make it jump back to original position.

Note that even if you don't put any [:goto_oripost] there, it will still automatically move back to original position. It's not a bug, it's feature. So, the battler won't scattered anywhere.

To make an exclusive post action for skill, simply put this tag

\return: Sequence_Key

2. Special Flag

I also added some special flag options to skill to gain more control over the skill database. It was based on my needs. It also written in Instructions

2.1 Area Flag

Notetag : <area>

As you have noticed that main action sequence will be repeated as many as the targets. For some case, you need to deal damage to all enemies at same time. How do you gonna do that? The solution is very simple. Just put <area> tag in skill notebox, and the main action will be executed once. But instead, [:target_damage] will target all the avalaible target at the same time. This is the sample gif for it

Area Damage

Also one thing to note that when area flag is present, [:move_to_target] will always move the active battler (in this case, actor) to the center of targets.

2.2 No Post Action / Return Sequence

Notetag : <no return>

Another special flag is that you could make a skill doesn't execute the post action sequence by adding this tag<no return> in skill notebox. The reason why I named the notetag like that is because in early version 1.0 there is no auto revert back to original position feature. You have to explicitly send the battler back to its position. Then I was mentioned it as "return sequence" instead of "Post Action". For compatibility purpose for those who already use my script, I don't change the notetag name.

2.3 Absolute Targeting

Notetag : <abs-target>

Absolute target is a special flag for random attack enemies. By default, if you choose 2 random enemies, the target could be A-B (different enemy) or A-A (same enemy). So, basically one enemy could be hit twice or more. By adding this tag, you could make each enemy only being hit once. Even though a skill which has 2 random enemies (or more) scope has only one target avalaible. Add <abs-target> to your skill notebox to make it works.

2.4 Magic Reflection Animation

Notetag : <reflect anim: id>

This tag is for magic reflection purpose. If the skill is successfully being reflected, an animation will be played over the attacker / magic caster. By default, a reflect animation is same as the skill animation itself. But you could make it different by adding this tag. Replace the id with an animation id in database. Example gif (It's Lunar from sample game, ED: Skyward Temple)

Magic Reflection

2.5 Parallel Animation

Notetag : <parallel anim>

This tag is used for parallel animation. By default, if the target battler has "Animation Guard" (an animation that will be replace the [:show_anim] to other animation), the skill animation won't be shown. To make it still be shown, put the <parallel anim> into your skill notebox. Then, the "animation guard" will still be shown. But it will be triggered by [:target_damage] instead of [:show_anim]. This is the example gif without <parallel anim> tag.

No parallel

As you know, it will only played the shield blocking animation without attack animation. And this one with parallel animation

Parallel

Notice the difference? Well, I believe you notice.

2.6 Random Reflection

Notetag : <random reflect>

It's another special flag for magical skill. By default, the target reflection is the magic caster itself. By adding this tag, the target magic reflection would be randomized. It could be more like a friendly fire, in other word, it will target friendly units.

2.7 Special Skill Tags

These are special miscellaneous tags. They are :

  • <always hit> = The skill will be always hit. It's different with certain hit. Because the skill will still considered as physical or magical
  • <anti counter> = The skill will not be able to counterattacked (apply for Physical type skill)
  • <anti reflect> = The skill will not be able to reflected (apply for magical type skill)
  • <ignore skill guard> = Apply skill to target won't triggered "Skill guard" (A skill that applied to the attacker)
  • <ignore anim guard> = The animation guard from target won't be played

Well, that's all folks 😀

⚠️ **GitHub.com Fallback** ⚠️