Make Move Addons
Move addons is a trick to split movement sequences in different script slot. The main purpose is to gain more control over the sequences you make. You could split the movement sequence by the category. For example, movement sequence for first actor has its own script slot. And enemies also has one. It's pretty troublesome if you gonna put them in one script slot. Also, another advantage is you could share your move addon to other people.
Here is the sample move addons taken from the sample game (ED: Skyward Temple)
So, how do you gonna do it? Ok so, here are the steps.
1. Make a new slot
I assumed that you create a blank project and already know what is the relation between "key sequence" and "action sequence" which explained in Getting Started. The first step is to make a new slot below all TSBS scripts. Here is the way to do it.
2. Starting
Start to write move addon by write these code in your newly added script slot
module TSBS
endYou need to name the constant you want to use. For example, Let say that you're going to make kaduki default movement. Such as evade sequence, hurt sequence, and critical sequence. Then, name it as Kaduki_Moves (it's up to you actually). The constant name must have capital letter for the first letter. Or it won't works. Then add = {} after the constant name
module TSBS
Kaduki_Moves = {}
endThen, put the action sequences between {}. For example,
module TSBS
Kaduki_Moves = {
"K-idle" => [
[true,false,false], # <-- initial setup
[:pose, 1, 0, 10],
[:pose, 1, 1, 10],
[:pose, 1, 2, 10],
[:pose, 1, 1, 10],
],
}
endYou could put as many as you want there
module TSBS
Kaduki_Moves = {
"K-idle" => [
[true,false,false],
[:icon, "Clear"],
[:pose, 1, 0, 15],
[:pose, 1, 1, 15],
[:pose, 1, 2, 15],
[:pose, 1, 1, 15],
],
"K-hurt" => [
[false,false,false],
[:pose, 1, 3, 10],
[:pose, 1, 4, 10],
[:pose, 1, 5, 10],
],
"K-pinch" => [
[true,false,false],
[:pose, 1, 6, 15],
[:pose, 1, 7, 15],
[:pose, 1, 8, 15],
[:pose, 1, 7, 15],
],
}
end3. Closure
Once you have done making action sequences. Merge it with the main hash by adding AnimLoop.merge!(Kaduki_Moves) at the end of line before end keyword.
module TSBS
Kaduki_Moves = {
"K-idle" => [
[true,false,false],
[:icon, "Clear"],
[:pose, 1, 0, 15],
[:pose, 1, 1, 15],
[:pose, 1, 2, 15],
[:pose, 1, 1, 15],
],
"K-hurt" => [
[false,false,false],
[:pose, 1, 3, 10],
[:pose, 1, 4, 10],
[:pose, 1, 5, 10],
],
"K-pinch" => [
[true,false,false],
[:pose, 1, 6, 15],
[:pose, 1, 7, 15],
[:pose, 1, 8, 15],
[:pose, 1, 7, 15],
],
}
AnimLoop.merge!(Kaduki_Moves) # <-- Add this
endThen it's done. The complete sample of this move addon can be look at This code


