How action sequence works - theoallen/TSBS GitHub Wiki

Ok guys, by this page I will tell you how exactly the action sequences in TSBS are executed. It's important because if you understand the basic execution manner of TSBS, you surely could make a good or even awesome action sequences. Here you go!

1. TSBS Adapt RPG Maker Eventing

Let me explain the basic idea. If you're eventing master, or at least know how to do event, you should understand quicker. As you know, all event commands will be executed until there's any wait commands. Event commands wait are included in :

  1. Wait command
  2. Show Message
  3. Move route (if you check the wait for completion box)
  4. Show animation (if you check the wait for completion box)
  5. Show balloon icon (if you check the wait for completion box)
  6. Tint screen / Shake screen / Flash screen /Show weather (if you check the wait for completion box)
  7. Move picture (if you check the wait for completion box)

If you put any of those commands, the event command will be halted until it's done, right? If you want to add items, you just need to put change item command together and it will be executed at same time. And If you want to make a simultaneous movement, you just need to make a two different move routes. And don't check the wait for completion box. Then, two or more characters will have their movement routes. Yet, it still updates the surrounding sprites like autonomous movement.

Same goes to my TSBS. I adapt how default eventing handles those multitask execution. Meanwhile the skill action sequence is being executed, it still update other updates such as idle stance animation for another battler. My TSBS is execute all sequence commands until you explicitly set the wait command. In my TSBS, those wait commands are included in these two methods :

  1. [:pose,],
  2. [:wait],

Wihtout those two commands, all command will be executed at same time. It's up to you actually how do you gonna set them up.

2. Triggers and Timing

Almost of all TSBS sequence commands are just "triggers". What is that means? Triggers aren't really do anything until you give them a time duration for execution. For example, you want to move your actor to target by using [:move_to_target, 50, 0, 15, 0]. It means that you move the actor with additional X coordinate 50 from the target (i.e, if the target coordinate X is 150, your actor will be placed in 200) and the travel duration needs 15 frames to complete its task.

The action sequence would be like this :

[:move_to_target, 50, 0, 15, 0],
[:wait, 30], # <-- give the time for movement. It could be 15 frames or more

And the example gif would be like this

Move to target

Or alternative way, you could set the wait by using [:pose]. Let say that the character would like to jump to target. Then you need to change the wait method. Take a look at the battler graphics

Battler

For jumping pose, you need to take 5 for half beginning of movement and take 3 for the ending. And then, actor need a "rest" for a while after taking movement. Then the sequence would be like this

[:move_to_target, 50, 0, 46, 3], # <-- move trigger
[:pose, 2, 5, 23], # jump pose (half beginning)
[:pose, 2, 3, 23], # jump pose (half ending)
[:pose, 2, 1, 45], # "Rest" after perform move

Example Gif

Jumping

Take note that "move trigger" need 46 frames to complete its task. So I put 23 x 2 frames wait using [:pose] command. The first 23 frames I used 5th grid / pose index. And the last one I used 3rd index. The total frame wait is equal as 46. But that isn't enough. I put additional wait so that the sequence isn't look so fast. I made the actor "rest for a while" by adding [:pose, 2, 1, 45],. As you can see, the actor stand by for a moment after it moved. So, the total wait frame would be 46 + 45 = 81 frames

3. Damage and Animation timing

Same goes to damage apply and animation. You could apply damage and play animation at the same time. Or, show animation at first, then take damage. Take a look at this sample sequence.

[:move_to_target, 50, 0, 46, 3], # <-- move trigger
[:pose, 2, 5, 23], # jump pose (half beginning)
[:pose, 2, 3, 23], # jump pose (half ending)
[:pose, 2, 1, 45], # Rest for a while
[:show_anim],      # Show animation
[:target_damage],  # Apply damage
[:wait, 45],       # Wait for completion

The result of that sequence is the skill animation will be played and damage applied at the same time. Example gif

Damage

It would be different if you put additional wait between [:show_anim] and [:target_damage] like this

[:move_to_target, 50, 0, 46, 3], # <-- move trigger
[:pose, 2, 5, 23], # jump pose (half beginning)
[:pose, 2, 3, 23], # jump pose (half ending)
[:pose, 2, 1, 45], # Rest for a while
[:show_anim],      # Show animation
[:wait, 30],       # Wait for completion
[:target_damage],  # Apply damage
[:wait, 45],       # Wait for completion

The example gif for the result.

Damage

Notice the difference? Yeah, the damage apply will be execute after animation. It's because I put [:wait, 30] before the [:target_damage]. If you creative enough, you could make a right timming based on the animation. So before the animation ends, call the [:target_damage]. Let me take a sample from the sample game (ED: Skyward Temple)

This is the whole darkness portal animation skill

darkness portal

The damage will be applied in middle of animation. Like this

Damage timing

Well, that's all of basic understanding of TSBS action sequences guys :smiley: