Uh, either I'm misreading them, or some of the descriptions for what the scripts do are missing or mismatched. Fireworks causes the boss to explode? Boss music plays the fireworks animation?
Classic.zh Pre-Compiled Code
Docs for header v1.14
Note: You can copy-paste any of these as FFCs in the blank uest for
the Classic tileset from Map 1, Screen 0x82.
Sign FFC
Create an ffc on the screen, and assign combo 900 to it.
Assign the script SignBost to the FFC.
Place it over any solid obect, then set FFC arg (D0) to a ZQ
String (message) ID. When the player is in front of and
below this combo, facing up, and presses an action button
ZC will show the string.
Permanent Room Secret
Create an ffc on the screen, and assign combo 901 to it.
Assign the script PermBlockSecret to the FFC.
Enable the flag 'Run Script on Screen Init'.
Place this anywhere on the screen.
This will assure that secrets triggered by block puzzles are permanent.
Room Guy
Create an ffc on the screen, and assign combo 902 to it.
Assign the script ChangeRoomGuy to the FFC.
Enable the flag 'Run Script on Screen Init'.
Set (D0) to the tile that you want to use for the custom guy.
Set (D1) to the CSet that you want to use for the custom guy.
Place this anywhere on the screen.
This will change whatever the normal graphics are for the room guy to
your custom graphics.
Note: This does not work if the room guy is type 'Fire'.
Permanent Shutter
Create an ffc on the screen, and assign combo 903 to it.
Assign the script PermBockShutters to the FFC.
Enable the flag 'Run Script on Screen Init'.
Place this anywhere on the screen.
This will ensure that shutters opened by a screen secret remain open
on revisiting the screen.
BOSS EFFECTS
The following are a series of boss death effect scripts.
For each, the value of `int reg` should be identical, as these use Screen->D[reg] to operate,
and they must all operate on the same register.
Fireworks/Boss Explosion
This will create a series of explosions when a boss dies, as in Z3.
It is the first part of a chain of ffcs used for boss victory animations.
This can be used by iteself, but it is required for the scripts DropHEARTCONTAINER and DropTRIFORCE
to work properly without advanced configurations.
Create an ffc on the screen, and assign combo 904 to it.
Assign the script BossExplode to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Set (D1) to the sprite to use for explosions (88 is the Classic tileset firework sprite).
Set (D2) to the sound effect or the explosions.
Set (D3) to a custom delay, or use 0 for default.
Set (D4) and (D5) to a range of rando pixel distances where (D4) is
the minimum and (D5) is the maximum. The script has defaults, so it is
is safe to leave each at '0' unless you want custom randomisation.
If the enemy that you are using is not a Z1 boss, set (D6) to the enemy ID
of the enemy to explode.
Boss Music
This will play custo music during a boss encounter. It is the secod in a chain of
scripts used for bosses, although unlike some of the others, it can be used
alone.
Create an ffc on the screen, and assign combo 905 to it.
Assign the script BossMusic to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Set (D1) to the a custom original tile, if desired. This will automatically
default to the first tile of the Classic tileset firework sprite.
If you are using a MIDI, set (D2) to the MIDI ID.
If you are using Classic.nsf, set (D3) to the track to play.
This will set music for the boss, and, once the boss dies, a victory track will play.
I you are using the Fireworld (BossExplode) script the, victory track plays after
the fireworks animations end.
After the victory, this script writes the Screen->D[reg] with a value to be tracked
by the scripts DropHEARTCONTAINER and DropTRIFORCE.
Drop Heart Container
This will cause a heart container to fall from the ceiling when the boss dies.
Create an ffc on the screen, and assign combo 906 to it.
Assign the script DropHEARTCONTAINER to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Leave (D1) alone uless you need a number other than 0 if there are multiple effects that write to
the register other than this. It defaults to _classic_zh__REG_BOSS_DEAD, so that the script waits until
the boss is dead and all animations from the Fireworks script end, to drop the heart container.
This script relies on the using either (or both) BossMusic or BossExplode scripts.
Drop Triforce Piece
This will cause a Triforce piece to fall from the ceiling when the boss dies.
It is usually used in conunction with the script DropHEARTCONTAINER and if you are
using that script, the value for (D1) is autoassigned by the script.
Create an ffc on the screen, and assign combo 907 to it.
Assign the script DropTRIFORCE to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Set (D1) a value of 2 (_classic_zh__REG_BOSS_DEAD) if you wish to use this without also
using the script DropHEARTCONTAINER.
The Drop Triforce ad Drop Heart Container scripts are intended to be used together,
and in conjunction with the BossExplode script.
This script relies on the using either (or both) BossMusic or BossExplode scripts.
ADDITIONAL FEATURES
global script Active
This is a default/example global active script for 2.53.x.
EagleBugInside
This replicates the Z1 1st.qst Lv1 bug where exiting and re-entering Lv1 unlocks
the first door.
To use, To use, place it on any ffc running script with a combo > 0place this on
the first room (entry room) of your dungeon.
EagleBugOutside
This is a counterpart to EagleBugInside. To use, place it on any ffc running
this script with a combo > 0 outside the dungeon entrance.
EagleBugEast
t/b/a
/* Items */
HalfMagic
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain 1/2 magic. The Classic tileset includes and item
preconfigured to do this.
LearnSlash
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain the Slash ability. The Classic tileset includes and item
preconfigured to do this.
ItemMessage
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will see the message set as fcc script argument (D0).
Note: 2.55 has this as a built-in feature.
MagicBossKey
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain boss keys for every level in the game.
This is pre-set-up i the Classic tileset.
MagicMap
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain the map item for every level in the game.
This is pre-set-up i the Classic tileset.
MagicCompass
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain the compass item for every level in the game.
This is pre-set-up i the Classic tileset.
ItemSound
Assign this as the action script to an item, and set (D0) to a sound effect ID.
Every use of this item will play this sound, even if it has an action sound effect.
THe purpose of this is for items such as the wand (no magic, slash only) where there
is no engine sound effect when using it.
CollectHeartContainer
This script alows you to play a specific message for each heart container piece collected
out of the normal four total needed. The strings must be seuential, with the sting for the
first 1/4 heart set to (D0).
E.g., Assign string 25 to D0.
On the first heart container piece (1/4), the player will see string 25.
On the second (1/2), they will see string 26.
On the third (3/4), they will see string 27.
When assembling the full heart container, they will see string 28.
Daira
Requires ghost.zh for versions < 2.55.
This is the control script for Daira enemies. In 2.53.x, this works via ghost.zh,
but in 2.55+, this is an npc script.
collect_Z2_lantern
Place this as the collect script on an item that you mean to use as an automatic
lantern item. It will automatically light up dark rooms if you call the
function __classic_zh_do_z2_lantern() in a perpetual script.
In 2.53.x, cal this in your global active script.
In 2.55+, you can use hero scripts, dmap scripts, and passive item scripts
with ths function.
/* Functions */
bool _classic_zh__isBoss(npc n)
* Returns true if the enemy 'n' is a Z1 boss, otherwise returns false.
void __classic_zh_do_z2_lantern()
* Used for te Z2 AutoLantern item
void __classic_zh_InitScreenUpdating()
* Initialises screen update aray values on quest startup. Checks if a the
player changes screens.
__classic_zh_UpdateScreenChange1()
* First stage in checking if the screen has changed. Writes new screens
iif the player has changed screens.
__classic_zh_UpdateScreenChange2()
* Second stage in checking if the screen has changed. Used by the provided active script.
/* Internal Storage */
int __classic_zc_internal[128];
* Used to track Classic.zh values.
...and for 2.55
Classic.zh Pre-Compiled Code
Docs for header v2.14
Note: You can copy-paste any of these as FFCs in the blank uest for
the Classic tileset from Map 1, Screen 0x82.
Sign FFC
Create an ffc on the screen, and assign combo 900 to it.
Assign the script SignBost to the FFC.
Place it over any solid obect, then set FFC arg (D0) to a ZQ
String (message) ID. When the player is in front of and
below this combo, facing up, and presses an action button
ZC will show the string.
Permanent Room Secret
Create an ffc on the screen, and assign combo 901 to it.
Assign the script PermBlockSecret to the FFC.
Enable the flag 'Run Script on Screen Init'.
Place this anywhere on the screen.
This will assure that secrets triggered by block puzzles are permanent.
Room Guy
Create an ffc on the screen, and assign combo 902 to it.
Assign the script ChangeRoomGuy to the FFC.
Enable the flag 'Run Script on Screen Init'.
Set (D0) to the tile that you want to use for the custom guy.
Set (D1) to the CSet that you want to use for the custom guy.
Place this anywhere on the screen.
This will change whatever the normal graphics are for the room guy to
your custom graphics.
Note: This does not work if the room guy is type 'Fire'.
Permanent Shutter
Create an ffc on the screen, and assign combo 903 to it.
Assign the script PermBockShutters to the FFC.
Enable the flag 'Run Script on Screen Init'.
Place this anywhere on the screen.
This will ensure that shutters opened by a screen secret remain open
on revisiting the screen.
BOSS EFFECTS
The following are a series of boss death effect scripts.
For each, the value of `int reg` should be identical, as these use Screen->D[reg] to operate,
and they must all operate on the same register.
Fireworks/Boss Explosion
This will create a series of explosions when a boss dies, as in Z3.
It is the first part of a chain of ffcs used for boss victory animations.
This can be used by iteself, but it is required for the scripts DropHEARTCONTAINER and DropTRIFORCE
to work properly without advanced configurations.
Create an ffc on the screen, and assign combo 904 to it.
Assign the script BossExplode to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Set (D1) to the sprite to use for explosions (88 is the Classic tileset firework sprite).
Set (D2) to the sound effect or the explosions.
Set (D3) to a custom delay, or use 0 for default.
Set (D4) and (D5) to a range of rando pixel distances where (D4) is
the minimum and (D5) is the maximum. The script has defaults, so it is
is safe to leave each at '0' unless you want custom randomisation.
If the enemy that you are using is not a Z1 boss, set (D6) to the enemy ID
of the enemy to explode.
Boss Music
This will play custo music during a boss encounter. It is the secod in a chain of
scripts used for bosses, although unlike some of the others, it can be used
alone.
Create an ffc on the screen, and assign combo 905 to it.
Assign the script BossMusic to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Set (D1) to the a custom original tile, if desired. This will automatically
default to the first tile of the Classic tileset firework sprite.
If you are using a MIDI, set (D2) to the MIDI ID.
If you are using Classic.nsf, set (D3) to the track to play.
This will set music for the boss, and, once the boss dies, a victory track will play.
I you are using the Fireworld (BossExplode) script the, victory track plays after
the fireworks animations end.
After the victory, this script writes the Screen->D[reg] with a value to be tracked
by the scripts DropHEARTCONTAINER and DropTRIFORCE.
Drop Heart Container
This will cause a heart container to fall from the ceiling when the boss dies.
Create an ffc on the screen, and assign combo 906 to it.
Assign the script DropHEARTCONTAINER to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Leave (D1) alone uless you need a number other than 0 if there are multiple effects that write to
the register other than this. It defaults to _classic_zh__REG_BOSS_DEAD, so that the script waits until
the boss is dead and all animations from the Fireworks script end, to drop the heart container.
This script relies on the using either (or both) BossMusic or BossExplode scripts.
Drop Triforce Piece
This will cause a Triforce piece to fall from the ceiling when the boss dies.
It is usually used in conunction with the script DropHEARTCONTAINER and if you are
using that script, the value for (D1) is autoassigned by the script.
Create an ffc on the screen, and assign combo 907 to it.
Assign the script DropTRIFORCE to the FFC.
Place this anywhere on the screen.
Set (D0) to a screen register (0 is default).
Set (D1) a value of 2 (_classic_zh__REG_BOSS_DEAD) if you wish to use this without also
using the script DropHEARTCONTAINER.
The Drop Triforce ad Drop Heart Container scripts are intended to be used together,
and in conjunction with the BossExplode script.
This script relies on the using either (or both) BossMusic or BossExplode scripts.
ADDITIONAL FEATURES
global script Active
This is a default/example global active script for 2.53.x.
EagleBugInside
This replicates the Z1 1st.qst Lv1 bug where exiting and re-entering Lv1 unlocks
the first door.
To use, To use, place it on any ffc running script with a combo > 0place this on
the first room (entry room) of your dungeon.
EagleBugOutside
This is a counterpart to EagleBugInside. To use, place it on any ffc running
this script with a combo > 0 outside the dungeon entrance.
EagleBugEast
t/b/a
/* Items */
HalfMagic
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain 1/2 magic. The Classic tileset includes and item
preconfigured to do this.
LearnSlash
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain the Slash ability. The Classic tileset includes and item
preconfigured to do this.
ItemMessage
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will see the message set as fcc script argument (D0).
Note: 2.55 has this as a built-in feature.
MagicBossKey
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain boss keys for every level in the game.
This is pre-set-up i the Classic tileset.
MagicMap
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain the map item for every level in the game.
This is pre-set-up i the Classic tileset.
MagicCompass
Assign this as the Pickup/Collect script to an item, and when the player collects this
item, they will gain the compass item for every level in the game.
This is pre-set-up i the Classic tileset.
ItemSound
Assign this as the action script to an item, and set (D0) to a sound effect ID.
Every use of this item will play this sound, even if it has an action sound effect.
THe purpose of this is for items such as the wand (no magic, slash only) where there
is no engine sound effect when using it.
CollectHeartContainer
This script alows you to play a specific message for each heart container piece collected
out of the normal four total needed. The strings must be seuential, with the sting for the
first 1/4 heart set to (D0).
E.g., Assign string 25 to D0.
On the first heart container piece (1/4), the player will see string 25.
On the second (1/2), they will see string 26.
On the third (3/4), they will see string 27.
When assembling the full heart container, they will see string 28.
toggle_4_8_way_movement
Place on any item as its Pickup/Collect script to cause collecting it to toggle
4-way and 8-way movement (e.g., as an upgrade), or place it as the action script
of an inventory item to allow the player to easily toggle modes using an item.
Z2_Lantern
Place this as the action script on an item that you mean to use as an automatic
lantern item, and enable the flag 'Passive Script for that item.
It will automatically light up dark room as the passive lantern in Z2.
/* Enemy Scripts * /
Daira
This is an example enemy script that creates a daira enemy (from Z2) with a slashing axe
weapon.
Bobomb
Assign this to any walking enemy, then set all defences fr the enemy (every weapon type) to 'Stun'.
When the enemy is struck with a weapon, it will stop moving, then begin flashing counting down
to eventually exploding.
/* Functions */
int classic_zh::getVersion()
* Returns the current version of classic.zh.
int classic_zh::float getDate()
* Returns the datestamp for the current version of classic.zh
int classic_zh::float getTie()
* Returns the timestamp for the current version of classic.zh
bool classic_zh::isBoss(npc n)
* Returns true if the enemy 'n' is a Z1 boss, otherwise returns false.
bool classic_zh::ScreenGuyAlive()
* Returns treue if there are any guy class npcs on the screen.