Identified Instructions

0

Takes no parameters.

Unknown. Used at the very beginning.



1 (return)

Takes no parameters.

Big Return.



10 (small_return)

Takes no parameters.

Small Return.



11 (callSub)

Type Description
Textroutine
Argumentsarg

Calls a Subroutine and passes it a number of parameters. Parameters have a the identification expressions _ff, _SS, _fS, _Sf.



12 (jump)

Type Description
Labellabel
Inta

Jumps to a label. a unknown. (also represented by goto label @ a)



13 (jumpIf)

Type Description
Labellabel
Inta

Jumps to a label if [-1] = 0. a unknown. (also represented by if 0 goto label @ a)



14 (jumpIfNot)

Type Description
Labellabel
Inta

Jumps to a label l if [-1] != 0. a unknown. (also represented by if 1 goto label @ a)



15 (callSub_b)

Type Description
Textroutine
Argumentsarg

Calls a Subroutine and passes it a number of parameters, the routine will work in background. Parameters have a the identification expressions _ff, _SS, _fS, _Sf.



22 (callSub_d)

Type Description
Inta
Textroutine

Used by Zun for debugging.



23 (wait)

Type Description
Intframes

Wait a number of frames.



42

Type Description
Int$A

Write the value of A into the top of the stack. (also represented by $A)



43

Type Description
Int$A

Store the result to variable A (also represented by $A = [-1])



44

Type Description
Float%A

Write the value of A into the top of the stack. (also represented by %A)



45

Type Description
Float%A

Store the result to variable A (also represented by %A = [-1.0f])



50

Takes no parameters.

+



51

Takes no parameters.

+ for float



52

Takes no parameters.

-



53

Takes no parameters.

- for float



54

Takes no parameters.

*



55

Takes no parameters.

* for float



56

Takes no parameters.

/



57

Takes no parameters.

/ for float



58

Takes no parameters.

mod



59

Takes no parameters.

==



60

Takes no parameters.

== for float



61

Takes no parameters.

!=



62

Takes no parameters.

!= for float



63

Takes no parameters.

<



64

Takes no parameters.

< for float



65

Takes no parameters.

<=



66

Takes no parameters.

<= for float



67

Takes no parameters.

>



68

Takes no parameters.

> for float



69

Takes no parameters.

>=



70

Takes no parameters.

>= for float



73

Takes no parameters.

or



74

Takes no parameters.

and



78

Type Description
Int$A

return 1 when run A times. Used to set a loop.



81

Type Description
FloatA
FloatB
Floatx
Floaty

A=ycosx, B=ysinx



83

Takes no parameters.

minus sign (inverse)



84

Takes no parameters.

minus sign (inverse) for floats



86

Type Description
FloatA
Floatx
Floaty

A=sqrt(x*x+y*y) [Calculate the distance from point(x, y) to zero and store the result in A]



87

Type Description
FloatA
Floatx1
Floaty1
Floatx2
Floaty2

A=arctan((y1-y2)/(x1-x2)) [Calculate the angle from point x1,y2 to x2,y2]



88

Takes no parameters.

sqrt



89

Type Description
FloatA
Floatx
Floaty

A=y-x



93

Type Description
FloatA
FloatB
Floatx
Floaty

Gives A and B a random value determined by x and y
if x=0 then -y if y=0 then -2x if x=y then -xB is the same.



300 (createUnit)

Type Description
Textroutine
Floatx
Floaty
Intlife
Intbonus
Intitem

Base zero point at the position of the parent unit, create a unit r at x, y, set live, bonus and basic item.



301 (createEnemy)

Type Description
Textroutine
Floatx
Floaty
Intlife
Intbonus
Intitem

Create a unit r at x, y, set life, bonus and basic item



302 (anmFile)

Type Description
IntANM

select ANM file for latter instructions



303 (setSprite)

Type Description
Intslot
Intsprite

Set a sprite to a unit on a certain slot. Sprite index is related to the ANM file that 302 has selected.



304 (createUnit_a)

Type Description
Textroutine
Floatx
Floaty
Intlife
Intbonus
Intitem

Create a unit r based on the parent unit at x, y, set life, bonus and basic item. [-9906] is different. Used to make mirror creeps of 300.



306 (setSprite_i)

Type Description
Intslot
Intsprite

Set a sprite to a unit on a certain slot. Sprite index is related to the ANM file that 302 has selected. If the slot is set to zero, the sprite will change if the unit moves left or right and won't be affected by sprite change instructions like 325 or 329.



307 (setEffect)

Type Description
Inta
Intb

Play an animation around a unit.
Example:
307(1, 74) will make the unit absorb flowers,
307(1, 85) is sending out flowers.



308 (setEffect_a)

Type Description
Inta
Intb

Play an animation around a unit.
307(1, 74) will make the unit absorb flowers,
307(1, 85) is sending out flowers.
A little bit different from 307.



309 (createUnit_b)

Type Description
Textroutine
Floatx
Floaty
Intlife
Intbonus
Intitem

Similar to 300, but only used for "MarpleEnemy"



311 (createUnit_c)

Type Description
Textroutine
Floatx
Floaty
Intlife
Intbonus
Intitem

Similar to 300



328 (spriteChangeTransparency)

Type Description
Intslot
IntR
IntG
IntB

Set the trancparency of each color on a sprite on a certain slot. 255 means full.



329 (spriteChangeSize)

Type Description
Intslot
Floatlength_rate
Floatwidth_rate

Set the size rate of a sprite on a certain slot. 1.0f is normal size.



330 (spriteChangeSize_t)

Type Description
Intslot
Inttime
Inttype
Floatlength_rate
Floatwidth_rate

Change the size rate of a sprite on a certain slot in a certain time to a certain rate.



334 (playEffect)

Type Description
Inteffect

Play animation effect around a unit



400 (moveImmediately)

Type Description
Floatx
Floaty

Move the unit to x,y immediately



401 (moveImmediately_t)

Type Description
Inttime
Intmode
Floatx
Floaty

Move the unit to x,y in time a. There are several move modes.



404

Type Description
Floatdirection
Floatspeed

Immediately change move speed and direction



405 (moveDirSpeed)

Type Description
Inttime
Intmode
Floatdirection
Floatspeed

Change move speed and direction in time a. There are several move modes.



412 (moveRandom)

Type Description
Inttime
Intmode
Floatspeed

Let the unit move to a random position once with speed.



500 (setHitbox)

Type Description
Floatwidth
Floatheigth

Set unit Hitbox.



501 (setKillbox)

Type Description
Floatwidth
Floatheigth

Set unit Killbox.



502 (setFlag)

Type Description
Intflag

Set several flags of a unit.
This is a 2 byte binary number 000 000 000 000
You can set several flags at once. Like ins_502(2817)
]2817=2048+512+256+1 Means the unit has no hitbox and can be grazed and will be killed by a bomb.
modes are:
Index flag function

01No hitbox
12No killbox
24unit is allowed to go out of the left and right bounds.
38unit is allowed to go out of the top and bottom bounds
416Hide life bar and invunerable
532Hide the unit
664Every boss has it at the beginning, But the effect is unknown
7128Function can't be cancelled (by canceling functions like 525)
8256Unknown
9512Can be grazed (like laser)
101024Unknown
112048On hit kill by bomb
124096Unknown. Used only on Taiko of DDC extra
138192Don't effect by time stop
1416384Unused
1532768Unused



503 (unsetFlag)

Type Description
Intflag

Reset the flag that 502 has set.



504 (setRandomMovementArea)

Type Description
'?'x
Floaty
Floatm
Floatn

Set the movement area of a unit. x,y is base point and m,n is the area.



505

Takes no parameters.

Might relate to drops



506 (clearDrop)

Takes no parameters.

Clear loaded items



507 (addDrop)

Type Description
Intitem
Intamount

Add more items to a unit.
Item Table (for DDC):
Id Item
0 Null
1 Power
2 Point
3 Big power
4 Live piece
5 1up
6 Bomb piece
7 Bomb
8 Full power
9 Small MpV no SE when get. 2mpv
10 Middle MpV 2mpv when get.
11 Big MpV 20mpv when get
12 Bomb piece affected by DDC system.



508 (setDropArea)

Type Description
Floatwidth
Floatheigth

Set drop area



509 (dropItems)

Takes no parameters.

Drop all loaded items



510 (setBasicItem)

Type Description
Inttype

Set basic item.



511 (setLife)

Type Description
Intlife

Set life of a unit.



512 (setBossMode)

Type Description
Inta

Set boss fight mode (live bar and name) 0 is boss fight mode, -1 is end



513 (initBoss)

Takes no parameters.

Used in every boss attack once (boss1, boss2, bosscard1, bosscard2...)



514 (addAttack)

Type Description
Inta
Intlife
Inttime
Textroutine

When boss life less than [life], or time greater than [time], got to next attack



515 (setInvulnerableTime)

Type Description
Inttime

Set invulnerable time



516 (playSE)

Type Description
IntSE

play a SE



517

Type Description
Inta
Intb
Intc

When boss is dead it's used like ins_517(30,12,0) Dunno about the funtion



518 (startMSG)

Type Description
Intentry

Starts a dialog, the parameter relates to the MSG file



519 (waitMSGHalt)

Takes no parameters.

Wait until the dialog ends / the dialog waits



520 (waitBossEnd)

Takes no parameters.

Wait until boss is dead or escapes



521 (timeoutSub)

Type Description
Inta
Textroutine

When time is up run r. Dunno about a



522 (declareSpell)

Type Description
Inta
Inttime
Intscore
'x'SpellCardName

Set spell card attack time, bonus and spell card name. Parameter is related to spell card index. For extra stage.



523 (endSpell)

Takes no parameters.

End Spell card mode



524 (setCheckpoint)

Type Description
Floatchackpoint

Set checkpoint of LOLK, but is used scince MOF



525 (clearMySubs)

Takes no parameters.

Clear the units that the boss has created



526 (setLifebarMarker)

Type Description
Inta
Floatl
Floatc

Set marks on the life bar. 1 is for the position judge by life, a is mark index. c is a strange number like -24448 or -8355585, Dunno the effect of c



535

Type Description
Int$M
Inta
Intb
Intc
Intd

Give int variable M value judged by difficulty (On lunatic M=d)



536

Type Description
Int%N
Inta
Intb
Intc
Intd

Give the float variable N value judged by difficulty (On lunatic N=d)



537

Type Description
Inta
Inttime
Intscore
'x'SpellCardName

same as 522, but is used for the normal stage boss



539

Type Description
Inta
Inttime
Intscore
'x'SpellCardName

same as 522, but is used for the normal stage Midboss



540 (setBossStars)

Type Description
Intlife

Set how many lives a boss has left (Stars under the boss name)



542 (setSurvival)

Takes no parameters.

change the Spell card to a survival card.



543

Takes no parameters.

Unknown. Some survival cards (in th13) have it, some not (since th14)



545

Takes no parameters.

Reset something of a boss. Used in every attack except boss1, even Bossdead and Bossescape use it.
PS: 523, 525, 545, 632(0) will always appear together.



547 (setTimeRate)

Type Description
Floatrate

Set time rate. 1.0f is normal time, 0.0f means time stop. The units with flag 8192 will not be affected by this.



548 (wait_d)

Type Description
Inta
Intb
Intc
Intd

Wait a set time Judged by difficulty.



552

Type Description
Inta

Only used in SA stage 4, then abadonned by Zun. (372 in th11)



554

Takes no parameters.

Show Logoenemy



555

Type Description
Inta
Intb

Unknown. Used by TD Stage 4 and Stage 6



556 (setRevengeSub)

Type Description
TextDeadAttack1

Set DeadAttack.



557

Type Description
Inta
Intb
Floatr
Floats

Unknown. Used when some midbosses die.



558

Type Description
Inta

Unknown. Used by TD Stage 2



559

Type Description
Inta

Only used in Th12.5 DS. Related to Photo (459 in Th12.5)



561

Type Description
Inta

Only used in Th12.5 DS. Related to Photo (461 in Th12.5)



562

Type Description
Inta

Only used in Th12.5 DS. Related to Photo (462 in Th12.5)



600 (bulletCreate)

Type Description
Intbullet_num

Create a Bullet.



601 (bulletFire)

Type Description
Intbullet_num

Fire a Bullet.



602 (bulletSetSprite)

Type Description
Intbullet_num
Inta
Intb

Set bullet type and color.



603 (bulletSetPos)

Type Description
Intbullet_num
Floatx
Floaty

Set fire point. Rectangular coordinate x and y from base point (unit position)



604 (bulletSetDirection)

Type Description
Intbullet_num
Floatdirection
Floatroutine

Set bullet direction and set direction offset of each way to r.



605 (bulletSetSpeed)

Type Description
Intbullet_num
Floatspeed
Floats

Set bullet speed and set Speed offset of each stack to s.



606 (bulletSetCount)

Type Description
Intbullet_num
Intway
Intstack

Set bullet ways and stacks



607 (bulletSetWaveType)

Type Description
Intbullet_num
Intstyle

Set a bullet spreading style. This part needs more tests
Style Effect
0 Normal aiming
2 Normal
2 Aiming Right deviation (stack) and circle (way)
3 Right deviation (stack) and circle (way)
4 Aiming left deviation (stack) and circle (way)
5 Left deviation (stack) and circle (way)
6 Random
9 Aiming Pyramid (stack) Circle (way)
10 Pyramid (stack) circle (way)
11 Up and down?
12 ???



608 (bulletSetSE)

Type Description
Intbullet_num
Inta
Intb

Sett bullet fire SE and transform SE. -1 means no SE.



609 (bulletComplexTransform_s)

Type Description
Intbullet_num
Inttrans_num
Intslot
Intmode
Inta
Intb
Floatr
Floats

Used for complex transformations of bullets. See special part for explanations.



610 (bulletComplexTransform)

Type Description
Intbullet_num
Inttrans_num
Intslot
Intmode
Inta
Intb
Intc
Intd
Floatr
Floats
Floatm
Floatn

Used for complex transformations of bullets. See special part for explanations.



611 (bulletComplexTransform_s_ht)

Type Description
Intbullet_num
Intslot
Intmode
Inta
Intb
Floatr
Floats

Used for complex transformations of bullets. See special part for explanations.



612 (bulletComplexTransform_ht)

Type Description
Intbullet_num
Intslot
Intmode
Inta
Intb
Intc
Intd
Floatr
Floats
Floatm
Floatn

Used for complex transformations of bullets. See special part for explanations.



613 (clearBullets_a)

Takes no parameters.

Cancel all bullets



614 (bulletCopy)

Type Description
Inta
Intb
'?'bullet

Only copies settings before the instruction.



615 (clearBulletsToPoints)

Type Description
Floatradius

Cancel all bullets in a circle and transform them into MpV.



616 (clearBullets)

Type Description
Floatradius

Cancel all bullets in a circle.



624 (bulletSetSpeed_d)

Type Description
Intbullet_num
Floata
Floatb
Floatc
Floatd
Floate
Floatf
Floatg
Floath

Difficulty-related version of 605. Easy is equal to 605(bullet_num, a, e)



625 (bulletSetCount_d)

Type Description
Intbullet_num
Floata
Floatb
Floatc
Floatd
Floate
Floatf
Floatg
Floath

Difficulty-related version of 606. Easy is equal to 606(bullet_num, a, e)



626 (bulletSetPos_bp)

Type Description
Intbullet_num
Floato
Floatr

Set fire point. Polar coordinate o and r from base point.



627 (bulletSetCirclePointRadius)

Type Description
Intbullet_num
Floatroutine

Set fire point to a circle with radius r



628 (bulletSetBasePoint)

Type Description
Intbullet_num
Floatx
Floaty

Set the base fire point



629 (addEffectColor)

Type Description
Floatr
Intcolor

Set the special effect around the boss. Effect area is a circle with radius r, color is from RGB table.



632 (bulletTransformSetSwitch)

Type Description
Intswitch

Set a switch to enable transform mode. 32768 works. More Detail in special part to 609-612



637 (setEnemySkill)

Type Description
Intskill

Set special skill of a boss. Different from every boss.



640

Type Description
Intbullet_num
Inta
Textroutine

Used when a bullet summons a unit. A is the trans_num of mode 16777216.



700 (laserCreate)

Type Description
Intbullet_num
Floata
Floatlength
Floatb
Floatwidth

Make a bullet become a laser. Set length and width, a and b is start point of a laser.
If you want a curvey laser, then a, length, and b is useless. Just set them to -1.0f



701 (laserSetStartParam)

Type Description
Intbullet_num
Inta
Intb
Intc
Intd
Inte

Set warning line of a laser. a is warning line lasting time, b is the transforming time and d is laser disappearing time. if you want a curvey laser, then b, c and d is useless. a is time that the laser fires (determines the length) Dunno about e... always 0



702 (laserFire)

Type Description
Intbullet_num

Fire normal laser.



703

Type Description
Intbullet_num
Intlaser_num

Fires a laser with warning line and give this laser a certain laser_num. This laser_num is different form bullet_num. 704-710 will use it.



704 (laserJump)

Type Description
Intlaser_num
Floatx
Floaty

Move the laser head to a certain point immediately.



705 (laserSetSpeedDir)

Type Description
Intlaser_num
Floatspeed
Floatdirection

Gives the laser head a certain speed and direction.



707 (laserWidth)

Type Description
Intlaser_num
Floatwidth

Set the width of the laser.



708 (laserAngle)

Type Description
Intlaser_num
Floatangle

Set the angle of the laser.



709 (laserAngleRot)

Type Description
Intlaser_num
Floatangle_speed

Gives the laser an angle speed (rotation)



710 (laserCancel)

Type Description
Intlaser_num

Cancel the laser



711 (laserSetCurvy)

Type Description
Intlaser_num

fire curvy laser



712 (changeLaserMode)

Type Description
Floatwidth
Floatlength

Make a unit feel like a laser



800

Type Description
Inta
Textroutine

Unknown. Discovered in ISC 4-2



801

Type Description
Floatr
Floats
Inta

Unknwon. Discovered in TD Stage 6



900

Takes no parameters.

Only discovered in st01.ecl, sub Girltest, used by Zun testing.



1001

Type Description
Inta

Unknown.



1002

Type Description
Inta

Unknown.



1003

Type Description
Inta

Unknown.



Unidentified Instructions

21

Takes no parameters.

Not Identified.



40

Type Description
Intarg0

Not Identified.



82

Takes no parameters.

Not Identified.



91

Type Description
Intarg0
Floatarg1
Intarg2
Intarg3
Floatarg4
Floatarg5

Not Identified.



92

Type Description
Intarg0
Floatarg1
Intarg2
Intarg3
Floatarg4
Floatarg5

Not Identified.



94

Type Description
Floatarg0
Floatarg1
Floatarg2
Floatarg3

Not Identified.



313

Type Description
Intarg0

Not Identified.



316

Type Description
Intarg0
Intarg1

Not Identified.



317

Type Description
Intarg0
Intarg1

Not Identified.



318

Type Description
Intarg0
Intarg1

Not Identified.



320

Type Description
Intarg0
Floatarg1
Floatarg2

Not Identified.



321

Type Description
Textarg0
Intarg1
Intarg2
Intarg3
Intarg4
Intarg5

Not Identified.



322

Type Description
Intarg0
Floatarg1
Floatarg2

Not Identified.



323

Type Description
Textarg0
Intarg1
Intarg2
Intarg3
Intarg4
Intarg5

Not Identified.



331

Type Description
Intarg0
Floatarg1
Floatarg2

Not Identified.



332

Type Description
Intarg0
Intarg1
Intarg2
Intarg3

Not Identified.



333

Type Description
Intarg0
Intarg1
Intarg2
Floatarg3
Floatarg4

Not Identified.



335

Type Description
Intarg0
Intarg1
Intarg2

Not Identified.



406 (moveDirSpeed_t)

Type Description
Intarg0
Intarg1

Not Identified.



407

Type Description
Intarg0
Intarg1
Intarg2
Intarg3

Not Identified.



408

Type Description
Floatarg0
Floatarg1
Intarg2
Intarg3

Not Identified.



409

Type Description
Intarg0
Intarg1
Floatarg2
Floatarg3
Intarg4

Not Identified.



411

Type Description
Intarg0
Intarg1
Floatarg2
Floatarg3
Intarg4

Not Identified.



420

Type Description
Floatarg0
Floatarg1
Floatarg2
Intarg3
Floatarg4
Floatarg5

Not Identified.



422

Type Description
Floatarg0
Floatarg1
Floatarg2
Intarg3
Floatarg4
Floatarg5

Not Identified.



425

Type Description
Intarg0
Floatarg1
Floatarg2
Floatarg3
Floatarg4
Floatarg5
Floatarg6

Not Identified.



427

Takes no parameters.

Not Identified.



429

Type Description
Intarg0
Intarg1
Floatarg2
Floatarg3

Not Identified.



433

Type Description
Intarg0

Not Identified.



434

Type Description
Intarg0
Intarg1
Intarg2
Floatarg3
Floatarg4

Not Identified.



436

Type Description
Intarg0
Intarg1
Floatarg2
Floatarg3

Not Identified.



438

Type Description
Intarg0
Intarg1
Intarg2
Floatarg3
Floatarg4

Not Identified.



527

Type Description
Intarg0
Floatarg1
Intarg2

Not Identified.



538

Type Description
Intarg0
Intarg1
Intarg2
'x'arg3

Not Identified.



630

Type Description
Intarg0

Not Identified.



633

Type Description
Intarg0

Not Identified.



706

Type Description
Intarg0
Floatarg1

Not Identified.