Windom Extreme VS
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Windom Extreme VS


 
HomeHome  Welcome PageWelcome Page  GalleryGallery  SearchSearch  Latest imagesLatest images  RegisterRegister  Log inLog in  

 

 [Tutorial] Script Indexes and More Complicated .ANI Coding

Go down 
4 posters
AuthorMessage
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 2:35 pm

This tutorial is designed to teach you guys the technique to lengthen .ANI scripts without any errors

Before we begin, there are some things that I hope you have a basic foundation in.

Basic Requirements
    1) Basic .ANI editing knowledge. If you lack it, I strongly suggest that you stop reading this topic and learn about it here first: Simple .ANI Tutorial
    2) The basic Hex Editing software
    3) A Hex - Dec Programmer's Calculator. The default Windows Calculator works fine. Just change the settings to "Programmer" under the View tab at the top left hand corner
    [Tutorial] Script Indexes and More Complicated .ANI Coding Cal1
    4) Basic common sense, deductive, and comprehension skllls. This is very important to ensure that you know what I am talking about.
    5) The .ANI that you want to lengthen. Without it, what is the point of this tutorial?


Introduction

When we talk about lengthening Script.ANI, we are talking about lengthening the script indexes. So what are script indexes? They are the each specific part of the script that starts with LONG gibberish and ends before another LONG gibberish/ 0D0A Hex. Sounds gibberish enough? :5623:

To illustrate this, I'm going to copy a part of a script
.........×#<....'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..Move=(0,STOP,0);..Force=(0,STOP,0);..GvEnable=0;..ShotTurnAng = 20;..LockBodyDownTarget(60,60);..Voice(S_Attack);....ChangeWeapon(GUN);......ENDIF;......ÍÌÌ=¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;.......×£;¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;..........¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);....ENDIF;..

The Cyan parts are the start of each script index, while the Yellow parts represents the ends. If you realised, there are ENDIFs at the end of all of the script indexes. This is actually not compulsory to end the script index, but it is mandatory to end a conditional command which I would talk about soon.

Here are more examples of script indexes. Do NOTE that you HAVE to understand where/how a script index starts and end first, how to identify a script index before moving on. This would serve as your basic foundation to advanced .ANI modding.
[Tutorial] Script Indexes and More Complicated .ANI Coding Zaspe
[Tutorial] Script Indexes and More Complicated .ANI Coding N4tJK
[Tutorial] Script Indexes and More Complicated .ANI Coding WtKMA
[Tutorial] Script Indexes and More Complicated .ANI Coding 45TGg

Note: The long gibberish sentence somewhere in the middle in the picture below is actually the original author's own notes. They are not important in defining a script index.
[Tutorial] Script Indexes and More Complicated .ANI Coding 81MMv

Similarly, the gibberish here in the picture below is just the author's notes
[Tutorial] Script Indexes and More Complicated .ANI Coding D9gLn




Understanding Conditional Statements

The "IF(@int[151] ,==, 0);" and "ENDIF;.." statements that you see in each script index is actually part of a command.
More over here: [Tutorial] Script.ani Conditions and Value Reference (Advanced)

This is a conditional command to the game to ask it to play a certain action if a certain condition is fulfilled.
The main point is, as such: A script index NEED NOT have a "IF(@int[151] ,==, 0);" and "ENDIF;.." statement to work.
For instance,
.........×#<....'‰º”¼.g‚Ì‚Ý...............................BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..Move=(0,STOP,0);..Force=(0,STOP,0);..GvEnable=0;..ShotTurnAng = 20;..LockBodyDownTarget(60,60);..Voice(S_Attack);....ChangeWeapon(GUN);..............
Will still work fine.

Another example
....ÍÌL>p...'‰º”¼.g‚Ì‚Ý...............................BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);............
Will also work.

Most values that starts with HEX 27 (') apostrophe and ends with HEX 0D 0A (paragraph) are just comments. You can delete them and replace with your own string, or notes.

And those comments in the middle of if string represent what the RunProc2 value is. You can just open the file in Notepad++, set the encoding to Japanese, copy the line and translate via Google see what the author is talking about.

In case anyone is curious, the ENDIF is simply End-If, to end off the If(.....); statement.

So basically, what I am trying to show is how script indexes are independent ON THEIR OWN, not on any conditional commands.




How do Script Indexes Work?

Before gameplay, the game would always physically check through a script.ani for any mistakes.
If there are errors/mistakes, it gives a warning when it the script is utilised, such as this
[Tutorial] Script Indexes and More Complicated .ANI Coding WCMFy OR this [Tutorial] Script Indexes and More Complicated .ANI Coding II90e
While allowing the game to still continue. However when the attack used contains the error that the game warns, something will go wrong with the game. Either a forced shutdown of the game or a repeated showcase of the error occurs.
The left one would be a general error, where something is horribly wrong with your script, whereas the right one is a precise error, where the program tells you where the error lies in. In this case, it would be action number 131 and script index number 3.

During gameplay, when an attack is executed, the game machine instantly locates the part of the attack in the script that would be used. It then reads the FIRST script index completely before executing that part of the move.
Here is a visual illustration.
[Tutorial] Script Indexes and More Complicated .ANI Coding CWkSG
As you can see, even with an error, I am allowed to play the script. However, look at what happens next.

Pardon me for the lack of quality of my videos.


If you listened carefully, 5 shots were fired before the error popped up. A standard KD-05_3 Windom XP SP-3 subattack 3 has 6 shots. This means that an error occured on the script index containing the 6th shot / before the 6th shot, after the 5th shot (If the error occurs after the 5th RunProc2, then the entire attack would not continue at all). Look at the actual script below. The Orange parts are the commands responsible for the shots, while the Red part shows the error that I deliberately added. Numbers are added by the side for easier reference.


.........×#<....'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..Move=(0,STOP,0);..Force=(0,STOP,0);..GvEnable=0;..ShotTurnAng = 20;..LockBodyDownTarget(60,60);..Voice(S_Attack);....ChangeWeapon(GUN);......ENDIF;......ÍÌÌ=¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;.......×£;¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;..........¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. 1RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);....ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. 2RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. 3RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. 4RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. 5RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>s...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50,50,0.4,0,30);..AttackFlag = 10;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. 6RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;.......×#=Ð...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(999,999);..AttackDelay(4,600);......ENDIF;..........P...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....LockBodyDownTarget(-1,-1);....ENDIF;..


In summary, the main point of this is just to show how script indexes are processed by the game. First they check the entire script for errors, then ingame, when an attack is executed, each portion of the script index is scrutinised one after the other. If they are all checked at the same time, the moment the Subattack 3 key is pressed, I would have gotten an error, which I did not. Therefore, it allows you to zoom in to your mistakes much more easily as well.
Back to top Go down
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 2:36 pm

Additional:
For those lost at what action numbers exactly are, here is a list for your convenience.
Oujar from 3DGundam has posted a list of actions. Credits in the table below goes to him. Translation and the sword basic movements were added by me.

Code:
Action label
0 No action
1 Standing
2 Walking
3 Landing
4 Before Jump
5 Landing
6 Landing
7 Fly Up
8 Stop Flying
9 Left step
10 Right step
11 Front Step
12 Back Step
13 Got Attacked
14 Got Attacked and recoiled away
15 Strucked Down from the sky
16 Lying on floor
17 Rise up
18 Change Sword
19 Defense
20 stand
21 Shield Rush
22 Flight Mode
23

24-98 Sword Mode Basic Movements

99
100 Normal Range Shot
101 Left Shot
102 Right Shot
103 Floating Shot / Back Shot
104 Subattack 1
105 Subattack 2
106 Flight Shot
107 Left Flight Shot
108 Right Flight Shot
109 Subattack 3
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125 Subattack 1
126 Subattack 1
127
128
129
130 Up + C Dash
131 Normal Sword Slash 1
132 Normal Sword Slash 2
133 Normal Sword Slash 3
134 Normal Sword Slash 4
135 Normal Sword Slash 5
136 Up + C Sword Dash Attack 1
137 Up + C Sword Dash Attack 2
138 Up + C Sword Dash Attack 3
139 Up + C Sword Dash Attack 4
140 Up + C Sword Dash Attack 5
141 Left Sword Slash 1
142 Left Sword Slash 2
143 Left Sword Slash 3
144 Left Sword Slash 4
145 Left Sword Slash 5
146 Right Sword Slash 1
147 Right Sword Slash 2
148 Right Sword Slash 3
149 Right Sword Slash 4
150 Right Sword Slash 5
151 Back + C Slash Start
152 X
153 X
154 X
155 X
156 X
157 X
158 X
159 X
160


168
169
170

181

Notice anything? They are extremely similar, arranged according to your tail.dat files and attacks. They can also be used as reference to the SwordCancel command.




The Starting of a Script Index

This is a small but important part about script indexes. Take a look at the script of KD-05_3's subattack 3 below.


0.........×#<....'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..Move=(0,STOP,0);..Force=(0,STOP,0);..GvEnable=0;..ShotTurnAng = 20;..LockBodyDownTarget(60,60);..Voice(S_Attack);....ChangeWeapon(GUN);......ENDIF;..1....ÍÌÌ=¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;..2.....×£;¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;..3........¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 3;..LockBodyDownTarget(60,60);......ENDIF;..4....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);....ENDIF;..5....ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;..6....ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;..7....ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;..8....ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;..9....ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;..10....ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;..11....ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;..12....ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;..13....ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;..14....ÍÌL>s...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.4, 0);..AttackFlag = 10;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;..15.....×#=Ð...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(999,999);..AttackDelay(4,600);......ENDIF;..16........P...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....LockBodyDownTarget(-1,-1);....ENDIF;..


Each change in colour represents a change in Script Index. For the game, ALL SCRIPTS starts from script index 0. Followed by 1,2,3, and so on.
The script above is actually your so-called Tail.dat, but I copied it directly from its script.ani with Hex Editor. Each Tail.dat consists of (n+1) script indexes, where n is the last script index in a tail.dat file.
In this case, 17 script indexes are present. However, when you use the GoScriptIndex(...); Command to direct the game to read off, say the 2nd script index, you need to input GoScriptIndex(1);.
Complicated? Here is another example
Say you want the game to direct the script back to the first shot, after executing the sixth shot (In KD-05_3 context), then input GoScriptIndex(4);, which is the 5th script index, where the first shot was first first shot. Hope you don't get confused with this one.

That aside, if you were to use the examples I gave to script an attack, then good luck to you. The example I gave would cause an infinite loop where the mech would continue to fire beams after beams after beams, even firing nothing when the weapon bar is empty.




Lengthening The .ANI Code Block

With enough basics, let's get down to business. The MAJOR MAJOR problem that I'm sure almost all .ANI modders would agree with would be the problem of insufficient space. But thanks to ritcher (Whose account apparently seems to be deleted), the problem is solved!

Do you remember why I emphasised on learning the ability to recognise a script index at the start of the tutorial? Well here is the reason.
The left part represents the HEX values of the right side of the table below. For easier referencing, I have cut down on the amount of data copied from the referenced script KD-05_3 Subattack 3
05 00 00 00 CD CC 4C 3E 70 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A 05 00 00 00 CD CC 4C 3E B9 00 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A 05 00 00 00 CD CC 4C 3E 72 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A 05 00 00 00 CD CC 4C 3E B9 00 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A 05 00 00 00 CD CC 4C 3E 72 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A 05 00 00 00 CD CC 4C 3E B9 00 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A 05 00 00 00 CD CC 4C 3E 72 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);....ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;......ÍÌL>¹...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);......ENDIF;......ÍÌL>r...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);......ENDIF;..

Oh god.. Do you feel like dying looking at it? :215: :5623: :noway!!: :in the dark: :563:
I certainly felt like vomitting blood :4567351:
Jokes aside, you need to identify the starting parts the script index with its corresponding HEX values. Your Hex Editor should be able to do that for you. For tutorial sake, I would highlight the exact values with the exact HEX values. Due to a lack of visible colours, I would be reusing them in the order, Orange, Cyan, Violet.

I'm taking the first script index to teach you guys.
05 00 00 00 CD CC 4C 3E 70 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A ....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);....ENDIF;..

We only need the parts in orange for now, so lets scrap unnecessary code in the next one
05 00 00 00 CD CC 4C 3E 70 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..

First, IDENTIFY the part of the beginning of the script index that shows 00 00 00, followed by 6 HEX VALUES, and ends with 00 00.
A double digit / double number / mixed value such as 89 / DG / D9 is considered 1 HEX Value
In this case, the highlighted portion in Cyan would be what we are interested in.
05 00 00 00 CD CC 4C 3E 70 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..
In this case, there are 6 HEX values in between a 00 00 00 and 00 00

Second, open a new HEX file with your Hex Editor. You may think, ehh what?? However, it is imperative for you to know what you are going to add FIRST before you even change the code, to avoid making major mistakes when the code is being added into the script index. This will majorly screw up your script, and you have no idea how many bytes you have added in the first place. So let's say I want to add 7 missiles from the gun's output, i'll write
WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);
Something like this.
[Tutorial] Script Indexes and More Complicated .ANI Coding UrP17
Then, count the number of HEX values you have to the left of the column. In this case, I have counted 147 HEX Values.

Third, for the start of the script index, remember the 6 HEX Values?
05 00 00 00 CD CC 4C 3E 70 01 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..
According to ritcher, they represent "A2 A1 B2 B1 C2 C1". You need to identify C2 and convert it into DEC values. In this case, C2 is 70.
Convert it to DEC, add the amount of HEX Values that you are going to add (This amount is defined in DEC, or our standard form of counting). In my case it is 147, so add that number to the converted DEC form of C2, equate and convert it back to hex. What I obtained was 103 OR "01 03".

Conditional Step
This does not always happen. Whenever you obtain 2 HEX Values after adding up the amounts together above, this step MUST be utilised.
Since there are now 2 HEX Values, Add the FIRST HEX Value to the C1 HEX Value. In this case, C1 is 01. Adding HEX 01 and 01 gives 02. Take note that you don't have to convert to DEC for this addition, since the "01" or additional HEX Value obtained is already in HEX, NOT DEC form! This HEX value coincides with the form of the original C1 Value, which is in HEX.
Adding them up, will give the new C1 value. Since, the second byte given in the C2 Value is 03, the new C2 C1 Value thus becomes 03 02.
Note: If C2 gives ONLY 1 HEX value, there is NO NEED to touch the value of C1 at all.

Here are visual illustrations
1. Key in the C2 HEX Values2. Convert to DEC3. Add the amount of HEX Values you are going to be adding
[Tutorial] Script Indexes and More Complicated .ANI Coding VFHQl[Tutorial] Script Indexes and More Complicated .ANI Coding Al21G[Tutorial] Script Indexes and More Complicated .ANI Coding HfJFM
4. Equate to find the total value5. Convert the value to HEX6. Obtain the new C2 Hex Value
[Tutorial] Script Indexes and More Complicated .ANI Coding Qx1zk[Tutorial] Script Indexes and More Complicated .ANI Coding T32rD[Tutorial] Script Indexes and More Complicated .ANI Coding UeXjG

Conditional Step
1. Key in the original C1 HEX Value2. Add in the additional HEX values that you obtained from the spill-over C2 HEX Values.Equate an obtain the new C1 HEX Value
[Tutorial] Script Indexes and More Complicated .ANI Coding KwYkY[Tutorial] Script Indexes and More Complicated .ANI Coding DOAwP[Tutorial] Script Indexes and More Complicated .ANI Coding EyrmH

Third, replace the original C2 C1 values with the new HEX Values obtained. To obtain the values in Violet.
05 00 00 00 CD CC 4C 3E 03 02 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..
Back to top Go down
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 2:36 pm

Lastly, place in the code that you typed ANYWHERE within the script index, making sure that you do not screw up the other codes in the process. Remember to change the C2 C1 Values!

Below are some examples.
You can place it at the end
05 00 00 00 CD CC 4C 3E 03 02 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 0D 0A 45 4E 44 49 46 3B 0D 0A
....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==,
0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..
AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1,0,100,30,100,20,0,0,0,0,0);..
WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);..ENDIF
;..

Or at the beginning
05 00 00 00 CD CC 4C 3E 03 02 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A
....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);..WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);..
BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);....ENDIF;..

Or the middle
05 00 00 00 CD CC 4C 3E 03 02 00 00 27 89 BA 94 BC 90 67 82 CC 82 DD 0D 0A 49 46 28 40 69 6E 74 5B 31 35 31 5D 20 20 2C 3D 3D 2C 20 20 20 20 30 29 3B 0D 0A 0D 0A 42 55 52 4E 45 52 28 30 29 3B 0D 0A 42 55 52 4E 45 52 28 31 29 3B 0D 0A 42 55 52 4E 45 52 28 32 29 3B 0D 0A 42 55 52 4E 45 52 28 33 29 3B 0D 0A 42 55 52 4E 45 52 28 34 29 3B 0D 0A 42 55 52 4E 45 52 28 35 29 3B 0D 0A 47 76 45 6E 61 62 6C 65 3D 30 3B 0D 0A 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 57 65 61 70 6F 6E 41 74 74 61 63 6B 28 2C 33 2C 30 2C 30 29 3B 53 68 6F 74 54 75 72 6E 41 6E 67 20 3D 20 31 3B 0D 0A 4C 6F 63 6B 42 6F 64 79 44 6F 77 6E 54 61 72 67 65 74 28 36 30 2C 36 30 29 3B 0D 0A 0D 0A 41 54 54 41 43 4B 28 35 30 2C 20 35 30 2C 20 30 2E 31 2C 20 30 29 3B 0D 0A 41 74 74 61 63 6B 46 6C 61 67 20 3D 20 33 3B 0D 0A 0D 0A 20 20 27 31 94 D4 83 8C 81 5B 83 55 81 5B 0D 0A 20 20 27 5B 30 5D 57 50 20 5B 31 5D 45 6E 65 20 5B 32 5D 4C 65 6E 20 5B 33 5D 53 70 65 65 64 2A 31 30 30 20 5B 34 5D 95 9D 2A 31 30 30 0D 0A 20 20 27 5B 35 5D 92 C7 89 C1 92 C7 94 F6 97 CD 28 25 29 20 5B 36 5D 54 65 78 4E 6F 0D 0A 20 20 52 75 6E 50 72 6F 63 32 28 30 2C 31 2C 20 20 30 2C 31 30 30 2C 33 30 2C 31 30 30 2C 32 30 2C 30 2C 30 2C 30 2C 30 2C 30 29 3B 0D 0A 0D 0A 45 4E 44 49 46 3B 0D 0A
....ÍÌL>p...'‰º”¼.g‚Ì‚Ý..IF(@int[151] ,==, 0);....BURNER(0);..BURNER(1);..BURNER(2);..BURNER(3);..BURNER(4);..BURNER(5);..GvEnable=0;..WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,
0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);WeaponAttack(,3,0,0);ShotTurnAng = 1;..LockBodyDownTarget(60,60);....ATTACK(50, 50, 0.1, 0);..AttackFlag = 3;.... '1”ÔƒŒ.[ƒU.[.. '[0]WP [1]Ene [2]Len [3]Speed*100 [4]•.*100.. '[5]’ljÁ’Ç”ö—Í(%) [6]TexNo.. RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);....ENDIF;..

You get the idea.

Here is a video to illustrate what would happen if the script above is done correctly.

Once again, pardon me for the lack of quality. My computer is getting old.





Changing the Number of Times An Attack Is Used

So what happens when you want to make sure that a script plays an attack multiple times before it moves on? It is actually very easy. Take a look at the script below, which is a direct copy of KD-05_3's Default Subattack 3.


×#< '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
Move=(0,STOP,0);
Force=(0,STOP,0);
GvEnable=0;
ShotTurnAng = 20;
LockBodyDownTarget(60,60);
Voice(S_Attack);

ChangeWeapon(GUN);


ENDIF;
 ÍÌÌ=¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;

×£;¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>p '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);

ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>s '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.4, 0);
AttackFlag = 10;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;

×#=Ð '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(999,999);
AttackDelay(4,600);


ENDIF;
P '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

LockBodyDownTarget(-1,-1);

ENDIF;
•ÏŒ`ƒVƒ‡ƒbƒg


Take for example you want to have 10 shots in Subattack3 for KD-05_3 instead of 6 shots. The first thing to do is count the number of times the mech fires a beam. In this case, there are 6 shots. Now, what you want to do is to add in this at the very first script index

Code:
@int[1]=0;

And this extra code before the "AttackDelay" commands.

Code:
@int[1]+=1;
IF(@int[1],<,02);
GoPoseIndex(-1,2);
GoScriptIndex(7);
ENDIF;
Back to top Go down
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 2:37 pm

For explanation on how "GoPoseIndex" and "GoScriptIndex" commands works, visit Ethereal's thread here: [Tutorial] Script.ani Conditions and Value Reference (Advanced)

What the above code does is to check references and return the command. In this case, at the very start, int[1] is defined as 0.
Each time the script runs all the way until it hits the script index with the code just directly above this, 1 is added to the value of int[1]. So int[1] becomes 1. If the script is repeated, 1 is added to the new value of int[1] once again, such that it becomes 2. This goes on and on until the script stops.

Now, how does the script knows when to stop? If you look at this "IF(@int[1],<,02);", it means that ONLY IF int[1] is less than 2, THAN the following commands
"GoPoseIndex(-1,2);
GoScriptIndex(7);"
would be read. Otherwise, if int[1] is 2,3,4,..... then the script reader instantly skips this command. The reason why the @int[1] command is placed OUTSIDE the conditional command is also because of this reason. The @int[1] command will never be processed, if it is placed inside the conditional command, since the script reader would always skip that command altogether!

Since we want 10 shots, and the original script only has 6 shots, that means, 4 additional shots are needed.
So, now I'll choose the script indexes that I would place the larger code in, to give me 4 additional shots. In this case, I choose the last 4 shots to be replayed. You can also choose the middle 4 shots, or really any 4 CONSECUTIVE shots. So long as your GoScriptIndex Command directs the script reader to the correct script index with the correct number of times, it is fine.

Do remember that all "tail.dats" starts reading the first script index as Script Index 0. Also, don't forget to add in the "ENDIF;" command to end off the command. Otherwise, when the number of "IF" commands and "ENDIF;" commands does not match, the game gives and error.

If I were to make the script that I have just explained, it would probably be something like this.


×#< '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
Move=(0,STOP,0);
Force=(0,STOP,0);
GvEnable=0;
ShotTurnAng = 20;
LockBodyDownTarget(60,60);
Voice(S_Attack);
@int[1]=0;

ChangeWeapon(GUN);


ENDIF;
 ÍÌÌ=¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;

×£;¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>p '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);

ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>r '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.1, 0);
AttackFlag = 3;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


ENDIF;
 ÍÌL>¹ '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);


ENDIF;
 ÍÌL>s '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(60,60);

ATTACK(50, 50, 0.4, 0);
AttackFlag = 10;

'1”ÔƒŒ[ƒU[
'[0]WP [1]Ene [2]Len [3]Speed*100 [4]•*100
'[5]’ljÁ’Ç”ö—Í(%) [6]TexNo
RunProc2(0,1, 0,100,30,100,20,0,0,0,0,0);


@int[1]+=1;
IF(@int[1],<,02);
GoPoseIndex(-1,2);
GoScriptIndex(7);
ENDIF;


ENDIF;

×#=Ð '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

BURNER(0);
BURNER(1);
BURNER(2);
BURNER(3);
BURNER(4);
BURNER(5);
GvEnable=0;
ShotTurnAng = 3;
LockBodyDownTarget(999,999);
AttackDelay(4,600);


ENDIF;
P '‰º”¼g‚Ì‚Ý
IF(@int[151] ,==, 0);

LockBodyDownTarget(-1,-1);

ENDIF;
•ÏŒ`ƒVƒ‡ƒbƒg


If you have done it correctly, something like this should happen. Ignore how the mech points to other directions at the end. There is a lack of a lock body function to point the gun in the right direction, also it is not the focus of the video.


Notice how there are 10 shots fired off from the mech now? :364:
You can also use this method to replay a subattack multiple times.
Back to top Go down
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 2:37 pm

Reserved X1
Back to top Go down
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 2:37 pm

Reserved X2
Back to top Go down
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 2:38 pm

Reserved X3
Back to top Go down
iamgundam
Active Member
Active Member
iamgundam


文章數 : 82
積分 : 4365
威望 : 1
注冊日期 : 2012-08-06

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 03, 2013 9:08 pm

Thanks for posted the tutorial here,comet..realy help me
Back to top Go down
Pain(GOD)
Admin
Admin
Pain(GOD)


文章數 : 131
積分 : 4612
威望 : 5
注冊日期 : 2012-04-16
年齡 : 40

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyFri Jan 04, 2013 1:45 am

Hello sir, need help here because i still noob in script.But couple code that still not be clear. For my script editor i always delete AttackFlag =_;
What it mean's for that code?

Second about Runproc2/ AttackWeapon/ AttackWeapon2 what the diffrent bettwen those?

Third is about GvEnable=_; ?

Sorry my english was totaly bad
That why get fail in english test Sad
Back to top Go down
https://www.facebook.com/groups/341322755981179/
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptySat Jan 05, 2013 12:12 am

In future, ask me questions in Winz00e, I hardly come to ExVS so I may not reply right away.

1) About AttackFlag, I have already wrote it in my Simple Ani Tutorial. Visit here Pain: http://www.winz00e.com/t379-tutorial-simple-ani-tutorial

It represents how the mech "Feels" when it gets hit. example: Attackflag =1; probably makes the mech think that the beam feels like ants. Attackflag = 40; will cause it to recoil heavily.

2) RunProc2 is commonly used for beams, its a Process. WeaponAttack is usually for basic physical range type weaponry such as vulcan guns as in for weapon type 6/11. WeaponAttack2 is usually for physical throwing type weapons like the shield throw.

3) GvEnable is also already answered in my tutorial: http://www.winz00e.com/t379-tutorial-simple-ani-tutorial

It holds the mech in place wherever it is.
Back to top Go down
Pain(GOD)
Admin
Admin
Pain(GOD)


文章數 : 131
積分 : 4612
威望 : 5
注冊日期 : 2012-04-16
年齡 : 40

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyWed Jan 09, 2013 2:25 am

[Tutorial] Script Indexes and More Complicated .ANI Coding 460070238 thank you
Back to top Go down
https://www.facebook.com/groups/341322755981179/
Aesreal
Newbie
Newbie
Aesreal


文章數 : 13
積分 : 4224
威望 : 0
注冊日期 : 2012-09-18
年齡 : 29
來自 : Singapore

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 17, 2013 8:47 pm

Welcome cheers
Back to top Go down
cjoshua
Admin
Admin
cjoshua


文章數 : 362
積分 : 5529
威望 : 46
注冊日期 : 2011-08-18
年齡 : 38
來自 : Toxic Heaven

[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding EmptyThu Jan 17, 2013 9:16 pm

[Tutorial] Script Indexes and More Complicated .ANI Coding 1067585699 [Tutorial] Script Indexes and More Complicated .ANI Coding 341604026 @
Back to top Go down
https://windom-extremevs.forum.st
Sponsored content





[Tutorial] Script Indexes and More Complicated .ANI Coding Empty
PostSubject: Re: [Tutorial] Script Indexes and More Complicated .ANI Coding   [Tutorial] Script Indexes and More Complicated .ANI Coding Empty

Back to top Go down
 
[Tutorial] Script Indexes and More Complicated .ANI Coding
Back to top 
Page 1 of 1
 Similar topics
-
» [Tutorial] Script.ani Conditions and Value Reference (Advanced)(by Ethereal)
» [Tutorial] Simple .ANI Tutorial (by Aesreal *Cometstrife*)
» [Tutorial] UV Edit (By Xnider)
» Rooting tutorial for Windom XP
» Deep Exploration Tutorial 1

Permissions in this forum:You cannot reply to topics in this forum
Windom Extreme VS :: UKXP Data :: UKXP Tutorial-
Jump to: