Basic filters

CommandTargetParamParamParamActive timeString
FilterToSmallxxxxLengthx
FilterToBigxxxxLengthx
FilterToFirexxxxLengthx
FilterMountxxxxLengthx
FilterReservePowerupxxxxLengthx
FilterPlayerxPlayer IDFilter to IDxLengthx

General effect commands

CommandTargetParamParamParamActive timeString
HeartSystemDisplay XDisplay YMax heartsxLengthx
InfiniteFlyingxxxxLengthx
ForceFacingNPC IDSectionxxLengthx

Text commands

CommandTargetParamParamParamActive timeString
ShowTextxX positionY positionFont typeLengthString
ShowNPCLifeLeftNPC IDX positionY positionSectionLengthBase Health

Control/Event commands

CommandTargetParamParamParamActive timeString
TriggerNew sectionEventxxxx
TimerTargetActionDisplay?Reset?Lengthx
IfNPCNPC IDConditionTrigger sectionEvent to triggerLengthx
BlockTriggerWho can triggerBlock typeCollision typeEvent to triggerLengthOptions

Layer commands

CommandTargetParamParamParamActive timeString
LayerXSpeedLayer #Stop after?xxLengthNew speed
LayerYSpeedLayer #Stop after?xxLengthNew speed
AccelerateLayerXLayer #Max speedxxLengthAccel amt
AccelerateLayerYLayer #Max speedxxLengthAccel amt

Set commands

CommandTargetParamParamParamActive timeString
SetHeartsxHeartsxxLengthx
SetHitsNPC IDSectionDamagexLengthx

Audio commands

CommandTargetParamParamParamActive timeString
SFXxSound IDxxDelayx
PlayMusicxSectionxxDelayx

Advanced commands

CommandTargetParamParamParamActive timeString
DebugPrintxxxxLengthx
NPCMemSetNPC IDOffsetValuexLengthData type


Sections/IDs - Specifies when events will run
Example
#-1

FilterToSmall,0,0,0,0,0,0 = In the "Load level" section, make the player small


Targets - Target of event Actions - Action the event performs on the target


Font type - Built-in font types for text functions Example
ShowText,0,50,50,3,0,Hi = Print "Hi" at 50,50 on the screen using font 3


Player IDs Example
FilterToPlayer,0,5,1,0,0,0 = Player with ID 5 (sheath) becomes player ID 1 (demo)


Conditional Example
IfNPC,31,2,0,1000,0,0 = If an NPC with ID 31 (31 = a key) does not exist, trigger event 1000. (must be at least 1 NPC somewhere though)


Data types - For advanced modification of data Example
NPCMemSet,10,0x98,-3,0,0,double = All npcs of type 10 have their memory at 0x98 set to -3, formatted as an 8 byte double. (0x98 in an NPC object is the X Speed variable which is stored as a double)


- Format -
#n, where n is a Section/ID, mean all following commands will have that specifier

#-1
-- Statements for load level section --

#0
-- Statements for always section --

#5
-- Statements for section 5--

#1005
-- Statements for custom event 1005 --

#END


- FilterToSmall -
x, x, x, x, Length, x
Player loses all powerups.

- FilterToBig -
x, x, x, x, Length, x
Player loses all powerups higher than bigness.

- FilterToFire -
x, x, x, x, Length, x
Player loses all powerups higher than fireballs.

- FilterMount -
x, x, x, x, Length, x
Whatever the player is riding disappears.

- FilterReservePowerup -
x, x, x, x, Length, x
The player's reserve powerup disappears.

- FilterPlayer -
x, Filter ID, To ID, x, Length, x
If the player's character type is "Filter ID", they change to the character set in "To ID".

- SetHearts -
x, Hearts, To ID, x, Length, x
Sets the player's hearts.

- HeartSystem -
X display, Y display, Max hearts, x, Length, x
Activates a heart tracking system for players that use hearts. Allows for more than 3 hearts and displays the current heart count at X / Y on screen.

- InfiniteFlying -
x, x, x, x, Length, x
Player's flight timer never decreases below 50 so long as this event is active.

- ShowText -
x, X pos, Y pos, Font type, Length, String
Shows String on the screen, at coordinates Xpos and Y pos, with specified font type.

- ShowNPCLifeLeft -
NPC ID, X pos, Y pos, Section, Length, Base health
Displays how much life the first match for "NPC ID" in "Section" has. Displays on the screen at coordinates X pos and Y pos. Supply the correct base health for the NPC so it can calculate the correct remaining life.

- Trigger -
New section, Event, x, x, x, x
Activates an event by moving "Event" to "New section". The trigger itself expires afterwards.

- Timer -
Target, Effect, Display?, Reset?, Length, x
Starts a timer that performs Effect on Target. Set "Display?" to 1 to display the timer in the top right. Set "Reset" to 1 and the timer will start over once it completes.

If "Effect" is 1000 or higher, the timer will behave like the Trigger command. It will trigger the corresponding custom event by placing it in the section specified by Target.


- IfNPC -
NPC ID, Condition, To section, Event, Length, x
If "Condition" is true for NPC specified by "NPC ID", then custom event "Event" is triggered in "To section". IfNPC command expires itself after triggering.

- SetHits -
NPC ID, Section, Damage, x, Length, x
The first NPC matching "NPC ID" in "Section" has its "hits taken" set to "Damage". Set to negative values to increase hits beyond normal.

- ForceFacing -
NPC ID, Section, x, x, Length, x
All NPCs of NPC ID in Section always face the player.

- SFX -
x, Sound ID, x, x, x, x
Plays specified sound. Expires itself afterwards.

- DebugPrint -
x, x, x, x, Length, x
Prints event information for the level designer for diagnostic purposes.

- NPCMemSet -
NPC ID, Offset, Value, x, Length, Data type
This is an advanced and dangerous command. It allows one to modify the data of any NPC that is alive in the level.

Any NPC of type NPC ID will have memory inside it at Offset set to Value. Value will be formatted according to "Data type".


Advanced Examples


Heart system power-up

#0
IfNPC,178,2,0,1000,0,once
#1000
HeartSystem,610,35,7,0,0,0
SFX,0,83,0,0,0,0
#END

Activates the special Heart system once the player picks up the Axe (NPC 178), and plays the ZeldaItemGet sound effect.

Infinite looping gimmick

#0
DebugPrint,0,0,0,0,0,0
Trigger,0,1000,0,0,0,0

// All enemies friendly
#1000
Timer,0,1001,1,0,200,0
NPCMemSet,-1,0x46,0xFFFF,0,200,short
ShowText,0,400,550,3,200,YAY!

// All enemies unfriendly
#1001
Timer,0,1000,1,0,200,0
NPCMemSet,-1,0x46,0x0000,0,200,short
ShowText,0,400,550,3,200,GRR!

#END

Starts the friendly enemy event, which calls the unfriendly enemy event when it ends, which calls the friendly enemy event again when that ends. Loops forever. Use DebugPrint when designing your code to be sure you didn't create some horrific infinite memory leak.