Difference between revisions of "User:Mddass/Touhou File Format Specification/ECL/V2.2"

From Touhou Wiki
Jump to navigation Jump to search
(600-series (Bullet Patterns and Special Functions))
(Tags: Mobile edit, Mobile web edit)
m
Line 1: Line 1:
'''ECL V2.2''' (unofficial name) is the fourth major version of ZUN's ECL format. It is used from Th13 (TD) to Th16 (HSiFS). Compared to ECL V2.1, the enemy system has been expanded, and more opcodes have been added.
+
'''ECL V2.2''' (unofficial name) is the fourth major version of ZUN's ECL format. It is used from Th13 (TD) to Th16.5 (VD). Compared to ECL V2.1, the enemy system has been expanded, and more opcodes have been added.
  
 
Note: This is based on [https://thwiki.cc/%E8%84%9A%E6%9C%AC%E5%AF%B9%E7%85%A7%E8%A1%A8/ECL Riri's database].
 
Note: This is based on [https://thwiki.cc/%E8%84%9A%E6%9C%AC%E5%AF%B9%E7%85%A7%E8%A1%A8/ECL Riri's database].

Revision as of 15:09, 18 April 2019

ECL V2.2 (unofficial name) is the fourth major version of ZUN's ECL format. It is used from Th13 (TD) to Th16.5 (VD). Compared to ECL V2.1, the enemy system has been expanded, and more opcodes have been added.

Note: This is based on Riri's database.

Contents

Syntax Differences (from V2.1)[edit]

TBD

Opcode List[edit]

300-series (Enemy and ANM)[edit]

400-series (Enemy Movement)[edit]

500-series (Enemy Misc)[edit]

600-series (Bullet Patterns and Special Functions)[edit]

These instructions are responsible for the behavior of bullets and bullet-shooting.

ins_600 (etSet)[edit]

etSet(int et_id);

Creates a bullet manager and assigns it with ID et_id.

ins_601 (etOn)[edit]

etOn(int et_id);

Shoots bullets according the settings on bullet manager et_id.

ins_602 (etSpr)[edit]

etSpr(int et_id, int sprite, int frame);

Sets the sprite (and consequentially, the hitbox) for the bullets in bullet manager et_id to sprite with frame frame (which changes their color for non-animated bullets). For curvy lasers, sprite must be set to 0. Note that the values of sprite tend to change with every game.

List of bullet sprites for Th16: HSiFS

ins_603 (etOfs)[edit]

etOfs(int et_id, float x, float y);

Sets the offset from which to shoot bullets from for bullet manager et_id. Defaults to (0,0), so the enemy's position.

ins_604 (etR)[edit]

etR(int et_id, float ang1, float ang2);

Sets the angle/direction in which bullets are shot at for bullet manager et_id. Normally, ang1 corresponds to the angle offset relative to the default angle and ang2 is an angular difference between bullets or layers of bullets.

ins_605 (etSpd)[edit]

etSpd(int et_id, float spd1, float spd2);

Sets the speed in which bullets move at when they're shot for bullet manager et_id. Normally, spd1 is the base speed at which the first cnt2o of bullets moves at, while spd2 is the base minimum speed that determines how slow the remaining cnt2os move at.

ins_606 (etAmt)[edit]

etAmt(int et_id, int cnt1, int cnt2);

Sets the amount of bullets that are shot for bullet manager et_id. cnt1 bullets will be shot in cnt2 layers.

ins_607 (etType)[edit]

etType(int et_id, int type);

Sets the type of shooting pattern that is used for bullet manager et_id. TBD. 0 = aimed at player; 1 = aimed at angle; 2 = aimed at player, equally distributed; 3 = aimed at angle, equally distributed; 4-7 = same as 0-3 but mirrored?; 8 = random angle and speeds

ins_608 (etSE)[edit]

etSE(int et_id, int shot_se, int transform_se);

Sets the sound effects that play when the bullets are shot (shot_se) and when their properties change (transform_se). Not always necessary, since the game has defaults. Use -1 as a sound effect to play no sound.

ins_609 (etEx1)[edit]

etEx1(int et_id, int id, int slot, int type, int a, int b, float r, float s);

See table.

ins_610 (etEx2)[edit]

etEx2(int et_id, int id, int slot, int type, int a, int b, int c, int d, float r, float s, float m, float n);

See table.

ins_611 (etExi1)[edit]

etExi1(int et_id, int slot, int type, int a, int b, float r, float s);

See table.

ins_612 (etExi2)[edit]

etExi2(int et_id, int slot, int type, int a, int b, int c, int d, float r, float s, float m, float n);

See table.

ins_613 (etClear_all)[edit]

etClear_all();

Clears all bullets. (???)

ins_614 (etCopy)[edit]

etCopy(int et_id, int src_id);

Copies all previously-defined settings for bullet manager src_id into et_id.

ins_615 (etClear)[edit]

etClear(float r);

Clears all bullets in radius r into the corresponding game-specific item.

ins_616 (etClear_ni)[edit]

etClear_ni(float r);

Clears all bullets in radius r but does not convert them into items.

ins_617 (etSetSpeed_r3)[edit]

etSetSpeed_r3(int et_id, float spd1_low, float spd1_mid, float spd1_high, float spd2_low, float spd2_mid, float spd2_high);

Sets bullet speed for bullet manager et_id according to in-game rank. Unused.

ins_618 (etSetSpeed_r5)[edit]

etSetSpeed_r5(int et_id, float spd1_low, float spd1_midlow, float spd1_mid, float spd1_midhigh, float spd1_high, float spd2_low, float spd2_midlow, float spd2_mid, float spd2_midhigh, float spd2_high);

Sets bullet speed for bullet manager et_id according to in-game rank. Unused.

ins_619 (etSetSpeed_r2)[edit]

etSetSpeed_r2(int et_id, float spd1_low, float spd1_high, float spd2_low, float spd2_high);

Sets bullet speed for bullet manager et_id according to in-game rank. Unused.

ins_620 (etSetCount_r3)[edit]

etSetCount_r3(int et_id, float cnt1_low, float cnt1_mid, float cnt_high, float cnt2_low, float cnt2_mid, float cnt2_high);

Sets bullet count for bullet manager et_id according to in-game rank. Unused.

ins_621 (etSetCount_r5)[edit]

etSetCount_r5(int et_id, float cnt_low, float cnt_midlow, float cnt_mid, float cnt_midhigh, float cnt_high, float cnt2_low, float cnt2_midlow, float cnt2_mid, float cnt2_midhigh, float cnt2_high);

Sets bullet count for bullet manager et_id according to in-game rank. Unused.

ins_622 (etSetCount_r2)[edit]

etSetCount_r2(int et_id, float cnt_low, float cnt_high, float cnt2_low, float cnt2_high);

Sets bullet count for bullet manager et_id according to in-game rank. Unused.

ins_623 (getPlayerAngle)[edit]

getPlayerAngle(float %A, float x, float y);

Calculates the angle to the player with base point (x,y) and stores it in %A.

ins_624 (etSetSpeed_diff)[edit]

etSetSpeed_diff(int et_id, float spd1_e, float spd1_n, float spd1_h, float spd1_l, float spd2_e, float spd2_n, float spd2_h, float spd2_l);

Sets the speed in which bullets move at when they're shot for bullet manager et_id according to difficulty (Easy/Normal/Hard/Lunatic). Higher difficulties than Lunatic may cause overflow problems.

ins_625 (etSetCount_diff)[edit]

etSetCount_diff(int et_id, float cnt_e, float cnt_n, float cnt_h, float cnt_l, float cnt2_e, float cnt2_n, float cnt2_h, float cnt2_l);

Sets the amount of bullets that are shot for bullet manager et_id according to difficulty (Easy/Normal/Hard/Lunatic). Higher difficulties than Lunatic may cause overflow problems.

ins_626 (etSetOffset_r)[edit]

etSetOffset_r(int et_id, float a, float r);

Sets the offset from which bullets for bullet manager et_id are shot from to (cos(a) * r,sin(a) * r). Does not override ins_603.

ins_627 (etSetDistance)[edit]

etSetDistance(int et_id, float dist);

Sets the distance from the final shooting offset from which the bullets for bullet manager et_id are shot from to dist pixels.

ins_628 (etSetOffset_abs)[edit]

etSetOffset_abs(int et_id, float x, float y);

Sets the offset from which bullets for bullet manager et_id are shot from, in absolute coordinates. May override ins_603.

ins_629 (setBossFog)[edit]

setBossFog(float r, int color);

Sets the radius r for the boss's surrounding fog with color color. Calling this again will make the fog play its spawn animation again.

ins_630 (callSTD)[edit]

callSTD(int id);

Calls script id from the stage STD file.

ins_631 (hideLife)[edit]

hifeLife(int time);

Hides the boss lifebar and timer for time frames. Yuugi post-midboss in SA stage 3.

ins_632[edit]

ins_632(int id);

TBD.

ins_633[edit]

ins_633(int);

Used in TD, unknown.

ins_634[edit]

ins_634(int);

Unknown.

ins_635[edit]

ins_635(float);

Unknown.

ins_636[edit]

ins_636(float);

Unknown.

ins_637[edit]

ins_637(int id);

TBD.

ins_638[edit]

ins_638 (int);

Unknown.

ins_639[edit]

ins_639 (int);

Unknown.

ins_640[edit]

ins_640(int et_id, int a, char* sub);

TBD.

ins_641[edit]

ins_641(int et_id);

Unknown.

700-series (Lasers)[edit]

Laser-related instructions. Note: Lasers function similarly to bullets. As such, etCreate, etSetSprite, etSetSpeed, etSetAngle, etSetSE and etSetExtra are essential and still affect the laser.

ins_700 (laserSetSize)[edit]

laserSetSize(int et_id, float start_length, float length, float start_width, float width);

Sets laser sizes for the bullet manager et_id. start_length and start_width correspond to the size of the laser when it is spawned/disabled. length and width correspond to the laser's maximum length and width. Curvy lasers only require width to be properly set and their length is defined in laserSetTime.

ins_701 (laserSetTime)[edit]

laserSetTime(int et_id, int start, int trans1, int duration, int trans2, int end);

Sets the timing for the lasers (in frames) for the bullet manager et_id.

  • start is the amount of time the laser stays disabled when it is spawned.
  • trans1 is the time the laser takes to go from its starting width to final width defined in laserSetSize (note: the laser is dangerous at this point).
  • duration is the time the laser stays enabled, after which it stops being dangerous. trans2 is the time between the laser going from its maximum width to its starting width.
  • end is unknown, although it is related to laser collision.

Curvy lasers only require start to be properly set, and it determines the time the laser takes to fully spawn (and consequentially its length).

ins_702 (laserShoot)[edit]

laserShoot(int et_id);

Shoots a straight laser using the properties defined for the bullet manager et_id.

ins_703 (laserShootStatic)[edit]

laserShootStatic(int et_id, int laser_id);

Shoots a static straight laser using the properties defined for the bullet manager et_id and assigns it ID laser_id (NOT the bullet manager ID) which can be used for later transformations. Think Clownpiece.

ins_704 (laserSetOffset)[edit]

laserSetOffset(int laser_id, float x, float y);

Sets the start offset of laser laser_id to x and y.

ins_705 (laserSetTrajectory)[edit]

laserSetTrajectory(int laser_id, float r, float s);

Gives the laser laser_id a trajectory with angle r and speed s.

ins_706 (laserSetLength)[edit]

laserSetLength(int laser_id, float length);

Changes the maximum length of laser laser_id to length.

ins_707 (laserSetWidth)[edit]

laserSetWidth(int laser_id, float width);

Changes the maximum width of laser laser_id to width.

ins_708 (laserSetAngle)[edit]

laserSetAngle(int laser_id, float ang);

Changes the direction of laser laser_id to ang.

ins_709 (laserSetRotSpeed)[edit]

laserSetRotSpeed(int laser_id, float a);

Makes the laser laser_id rotate by a every frame.

ins_710 (laserBreak)[edit]

laserBreak(int laser_id);

Instantly cancels out the specified laser.

ins_711 (laserCurvyShoot)[edit]

laserCurvyShoot(int et_id);

Shoots a curvy laser using the properties defined for the bullet manager et_id.

800-series (Specific-Enemy)[edit]

ins_800 (sendCall)[edit]

sendCall(int enemy_id, char* sub);

Immediately sends an instruction to the specified enemy (enemy_id) that calls sub.

ins_801 (getEnemyPos)[edit]

getEnemyPos(float %A, float %B, int enemy_id);

Gets the X- and Y-positions of the specified enemy (enemy_id) and stores them in %A and %B respectively.

ins_802[edit]

ins_802(int);

Unknown. Boss-related.

900-series (Debug)[edit]

These are debug functions that do not actually function in the final release of the games. As such, they're the least known functions.

ins_900[edit]

ins_900();

Unknown.

ins_901[edit]

ins_901();

Unknown. Used in default.ecl in the DebugSkipFunc function.

ins_902[edit]

ins_902();

Unknown. Used in default.ecl in the DebugSkipStopFunc function.

1000-series (Game-specific Misc)[edit]

Extra Bullet Attributes[edit]