Skip to Content
The Alchemy Project

include/field/script_commands.h

What the script commands share with the field and the scenes: the field Psynergy's casts and their states, the Djinn's join effects, the map screen's state, and the encounter zones of the story's battles.

Included by battle_background_rules.c, battle_music.c, script_commands_scripts.c, script_commands_tables.c, world_map_cursor_angles.c, world_map_encounter_rules.c and field.h.

Structures

NameDescription
structMIND_READ_STATEMind Read's wave (heap slot HEAP_SLOT_MIND_READ): each scanline's BG0 scroll on two pages, the hue it tints the screen with, its caster and target, and its delay and particle cycle.
structTOUCH_METATILEA metatile a Psynergy touched, in metatiles, as FIELD_STATE.psynergyMetatiles lists them (x of -1 ends the list).
structTOUCH_COPYA metatile's tiles that Cyclone copied (fdTileCopiesCopyTouchedMetatiles): where it went, where it came from and the touched metatile it opened, each in metatiles.
structTOUCH_COPIESThe scene's own state (SceneLocalState) as far as the copies of metatiles Cyclone blew away, kept there so that fdTileCopiesRestore makes them again.
structBURST_PARTICLEA particle of the particle burst (fdParticleBurstStart): its place, heading, speed, spin and the ticks before it starts.
structPARTICLE_BURST_STATEThe particle burst's state (fdParticleBurstStart): its tiles, 96 sprites and particles, its VRAM cache entry, a flash on tick 30 and its tick count.
structBURST_METATILEA metatile the particle burst covers, in metatiles.
structSPARKLE_PICTUREOne step of a sparkle's rise (FieldEffectSparklePictures): its height above its spot in screen pixels, and its tile.
structBURST_PARTICLE_VECTORThree coordinates of a burst piece's place, x, y and z, filled in turn as syVectorAddPolarOffset reads them.
structBURST_PARTICLE_VISUALOne part of a sprite (ANIMATION_SPR_PART) as Mind Read's burst copies its image's attributes to its shadow: a byte at a time, under the OAM attributes' names.
structBURST_PARTICLE_VISUAL_GROUPA sprite (SPR) as Mind Read's burst reads it: its image, and its shadow 28 bytes in.
structEFFECT_CHILDThe lifted actor as Lift on a target reads it: ACTOR's y, motionFlags (flag) and update (callback); read through ACTOR, the flag store moves after the anchor's load.

Macros

NameDescription
#defineHUE_DEGREES 360A hue's degrees, a full turn of the colour wheel.
#defineMIND_READ_QUIET 99MIND_READ_STATE.count held still: the wave sends no particles and plays no sound, as while Lonesome George carries the party.
#defineTouchCopiesWork (*(TOUCH_COPIES *)SceneLocalState)The metatiles Psynergy moved, kept in the scene's own state (SceneLocalState).
#definePARTICLE_BURST_COUNT 96The particles of the particle burst.
#defineDJINN_NO_HOP 0x800fdRequestDjinnBattle's flag: the Djinni does not hop first.
#defineENCOUNTER_ZONE_MAD_PLANTS 106The encounter zone of the hidden Mad Plants' battles, one slot each, in FLAG_MAD_PLANT's order.
#defineENCOUNTER_ZONE_SCRIPTED_EARLY_STORY 9The encounter zone of the early story battles: the Ruffian waiting for backup on Venus Lighthouse's plaza (slot 0), the Ruffian on the Suhalla road (1), the three Ruffians at the crevice (2) and the Punch Ant (3) at Suhalla Gate, the Chestbeaters in the Kandorean Temple (4) and Echo's lesson battle on the World Map (5).
#defineENCOUNTER_ZONE_SCRIPTED_YAMPI_DESERT_ALHAFRA 10The encounter zone of two story battles: the King Scorpion's in the Yampi Desert (slot 0), then Briggs and his crew's on his ship at Alhafra (slot 1).
#defineENCOUNTER_ZONE_AQUA_JELLIES 11The encounter zone of the battles below deck of the Lemurian Ship: slot 0 an Aqua Jelly, slot 1 the Aqua Hydra.
#defineENCOUNTER_ZONE_SERPENT 12The encounter zone of three story battles: the Serpent's in Gaia Rock, one slot for each beam of sunlight let into its lair (ENEMY_SERPENT to ENEMY_SERPENT_FOUR_BEAMS, slots 0 to 4), then Avimander's in Champa (slot 5) and Poseidon's at the Sea of Time (slot 6).
#defineENCOUNTER_ZONE_MOAPA 13The encounter zone of Moapa and his two Knights at the Trial Road's peak, one slot per stage door the party reached first (slots 0 to 4), then Karst and Agatio's three battles on Jupiter Lighthouse's aerie (slots 5 to 7).
#defineENCOUNTER_ZONE_WORLD_MAP_BEACH_AND_GRASSLAND 14The World Map's encounter zone of region 1's beach, shallows and grassland, which the Psynergy test room's battles also take (slot 0, one or two Giant Bats).
#defineENCOUNTER_ZONE_SCRIPTED 102The script battles: the Flame Dragons in Mars Lighthouse (slot 0), the Doom Dragon on its aerie (1), the gladiators in the Shaman Village Cave (2), the World Map's bandits (3) and Agatio and Karst's fight with Isaac in Jupiter Lighthouse (4).
#defineENCOUNTER_ZONE_HIDDEN_BOSSES 103The encounter zone of the battles with four guardians of hidden places, one slot each (HIDDEN_BOSS).
#defineLAYER_COLOR_CYCLING 0fdActorSetLayersColorMode's value that cycles the actor's colours (MindReadCasterColorCycle); any other is a colour mode plus one.
#defineLEDGE_JUMP_NO_LANDING_WAIT (1 << 12)fdActorJumpDownLedge's mode bit that skips the wait for the landing.
#defineDPAD_ANGLE_NONE 65535What fdInputGetDpadAngleEightWay returns when no direction is held, or right and left or up and down together: the blank entries of InputDpadAnglesEightWay.

Enumerations

NameDescription
enumBURST_STAGE { BURST_STAGE_QUIET, BURST_STAGE_DYING_DOWN, BURST_STAGE_SMALL … }The stage Burst passes its target's script each tick (BURST_STATE.shake).
enumCASTER_LOOK { CASTER_LOOK_NORMAL, CASTER_LOOK_FLASHING_WHITE, CASTER_LOOK_ … }The caster's look while it casts, fdBattleEffectSetObjectUpdateMode's mode.
enumDJINN_ENCOUNTER_ZONE { ENCOUNTER_ZONE_VENUS_DJINN, ENCOUNTER_ZONE_VENUS_DJINN_LAST, … }The Djinn's encounter zones (rows of EncounterZones), two to an element: the first holds the battles of its first fifteen Djinn, who share its eight slots, and the second those of its last three and its two spares.
enumHIDDEN_BOSS { HIDDEN_BOSS_TREASURE_ISLE, HIDDEN_BOSS_VALUKAR, HIDDEN_BOSS_ … }The slots of ENCOUNTER_ZONE_HIDDEN_BOSSES.

Functions

NameDescription
Sint32gmPartyInventoryFindRoomStub (Sint32 item)gmPartyInventoryFindRoom through its stub call: the first party member with room for item, or -1.
Sint32mnItemPickerRunToDropStub (Sint32 *member, Sint32 *slot)mnItemPickerRunToDrop through its stub call: the item picker for an item to drop, which sets the member and slot chosen.
Sint32fdActorScriptCheckOverlapStub (ACTOR *actor, VECTOR3 *pos)fdActorScriptCheckOverlap through its stub call: -1 when the actor at position would overlap a solid actor, otherwise 0.
Sint32fdActorGetSpriteIdStub (ACTOR *actor)fdActorGetSpriteId through its stub call: the sprite id the actor is drawn with, or 0 for none.
voidfdMapGridCopyDrawnPicturesRectStub (Sint32 toX, Sint32 toZ, Sint32 width, Sint32 height, Sint32 fromX, Sint32 fromZ)fdMapGridCopyDrawnPicturesRect through its stub call: copies width by height metatiles as they are from (fromX, fromZ) to (toX, toZ).
ACTOR *fdActorScriptFindOverlappingActorStub (ACTOR *actor, VECTOR3 *pos)fdActorScriptFindOverlappingActor through its stub call: the first solid actor the actor at position would overlap, or NULL.
voidfdPsynergyMove (void)When Move is cast with no target, the hand appears beside the caster for 30 ticks and then turns into particles.
voidfdPsynergyCarry (void)Carry cast with no target: two hands appear 32 pixels to either side of the spot, close 24 pixels in and meet with a crash that scatters ITEM_BREAK_SHARD_MAX sparkles, then vanish.
voidfdPsynergySteerLiftedTarget (Sint32 targetId)When Carry is cast on a target, two hands lift it to 24 pixels above the ground; the d-pad moves it 16 pixels at a time and A, B, L or R drops it where it is.
voidfdPsynergyForce (void)Force: a ring of particles round the caster, then a fist (SPRITE_MOVE_HAND) grows in front of them and strikes 56 pixels ahead, or at the target, with three afterimages; the target is pushed 16 pixels the way the fist flew (and thrown up when its option asks), and the scene's Force script runs.
voidfdPsynergyLash (void)Lash: a hand forms over the spot and comes down on it.
voidfdPsynergyLashOnTarget (Sint32 value)Lash cast on a rope: finds the rope's two ends (fdRopeFindById); with none, Lash runs as if cast on nothing, else the field state keeps the rope and its ends.
voidfdPsynergyPound (void)Pound ("Drive objects into the ground."): a giant fist forms over the spot 32 pixels before the caster, or over the target, and comes down on it.
voidfdPsynergyTremor (void)Sways the view from side to side, with a sound every 16 ticks: the swing grows from SWAY_START to SWAY_PEAK, holds, shrinks back and stops.
voidfdPsynergyScoop (void)Scoop ("Dig in soft ground."): a giant hand rises before the caster and digs the metatile 16 pixels ahead.
voidfdPsynergyGrowth (void)When Growth is cast with no target, particles fly out from in front of the caster, and then five vine leaves drop 4 to 10 pixels round the Psynergy's position.
voidfdPsynergyGrowthOnTarget (Sint32 unused)Growth cast on a target: the burst of particles, then the target takes its grown animation and the underfoot priority, with SE_RECOVERY.
voidfdPsynergyWhirlwind (void)Whirlwind: a whirlwind orb flies from the caster to the spot over ten ticks, growing from a quarter size.
voidfdPsynergyParch (void)Parch ("Evaporate standing water."): a glowing disc spreads 32 pixels before the caster and white puffs rise from it.
voidfdPsynergySand (void)Sand: the leader spins and sinks into the ground in a spray of grains, then moves on as a mound of sand (LEADER_MOVEMENT_SAND, or LEADER_MOVEMENT_WORLD_SAND on the World Map) until fdPsynergyWatchSandGround ends it.
voidfdPsynergyEndSand (void)Ends Sand: the leader rises out of the ground in a spray of grains and takes its own sprite back; on sand, the place's Sand script then runs.
voidfdPsynergyBurst (void)Burst: a glow disc swells in front of the caster as sparks fly into it, then explosions burst round the target, shaking the screen, the last and largest at 12 pixels; the target's script runs each tick with the stage (shake).
voidfdPsynergyBlaze (void)Blaze: a jet of flame sprays from the caster, with smoke, until B is pressed or for BLAZE_SPRAY_TICKS at most: red, or violet, yellow or blue to match the torch (SPRITE_MARS_TORCH_LIT) it is cast at.
voidfdPsynergyPly (void)Ply: eight winged figures spiral in on the Psynergy's position, one a tick; then one in the centre flashes for 60 ticks, sheds sparks and flies off.
voidfdPsynergyHalt (void)Halt: throws a stopwatch (SPRITE_STOPWATCH) from the caster to the Psynergy's position over CAST_THROW_STEPS ticks, ticks three low tones and a high one, and scatters it into HALT_PARTICLES particles.
Sint32fdPsynergyFilterHaltTarget (Sint32 id)Returns no target (-1) when Halt passes actor id over (its sprite has no halted lines, SPEAKER_HALTED_LINES_NONE), else id.
voidfdPsynergyCatch (void)Catch: carries the hand (SPRITE_MOVE_HAND) from 16 pixels above the caster to the goal in 10 steps, growing from a quarter to full size, presses down 20 pixels and puts what it caught away off the map, at (-9, -9), then rises 19.5 pixels and shrinks back to the caster.
voidfdPsynergyArrow (void)The Arrow: a bow grows in front of the caster and draws, throwing off glints, and looses a flaming arrow that flies up to 80 pixels; an actor it strikes becomes the field state's psynergyHitObject.
voidfdPsynergyRetreat (void)Retreat ("Return to the dungeon's entrance."): the caster turns to face the player, raises their arms, spins faster and faster and shrinks away while sparks fly up the screen, one a tick.
voidfdPsynergyAvoid (void)Avoid: the caster spins and flashes, then blinks, and encounters are kept away until Avoid wears off.
voidfdPsynergyShowAvoidWoreOff (void)Avoid (or the Sacred Feather) has worn off, and the game says so.
voidfdPsynergyEndCloak (void)Show the Cloaked caster again: stop checking the ground under it, then flicker it back into view over twenty ticks and clear the cloak (fdPsynergyRunEnd).
voidfdPsynergyResumeCloakCheck (void)Starts the Cloak metatile check if the leader is hidden.
voidfdPsynergyReveal (void)Reveal: open a circle of the transition on the caster, wash the screen plain, run the Reveal script that matches, then show the markers nearby and watch how far the leader walks.
voidfdPsynergyEndReveal (void)Ends Reveal if it is running: stops its watch, brings the colours back from black over 30 ticks and runs the scene's PSYNERGY_PHASE_FADES script.
voidfdPsynergyHover (void)Hover: a glowing ring grows under the leader, who rises and floats (LEADER_MOVEMENT_HOVER) while fdHoverGlowUpdate holds the glow up.
voidfdPsynergyEndHover (void)Ends Hover: the leader drops back to the ground with a splash and the ring is freed.
voidfdPsynergyGrind (void)Sways the view up and down the screen: the swing grows from SWAY_START to SWAY_PEAK, holds for SWAY_HOLD_TICKS, shrinks back and stops; then the map's view bounds come back.
voidfdPsynergyTeleport (void)Teleport: raises FIELD_RAISED_CUE_TELEPORT, which shows the picture of the whole world for the player to choose where to go.
voidfdPsynergyRing (void)The Ring: a ring of light is drawn round the caster among rising sparkles, then motes twinkle on it as it sways.
voidfdPsynergyEndRing (void)Ends the Ring, if one is up: the ring gives way to a burst of 64 sparkles from round the leader, four more setting off each tick, that fly out and fall for 40 ticks, and the window graphics come back to BG0.
voidfdPsynergyWatchLeaderDistance (void)As The Broken Seal's, with this game's offsets: counts the timer down and, once the leader is REVEAL_RADIUS from the centre or the timer has run out, requests the effect's end.
voidfdPsynergyUpdateMindReadWave (void)Mind Read's wave, its tint and the palette it greys.
voidfdMindReadAdvanceTint (void)Turns Mind Read's tint four degrees round the colour wheel, and takes the tint's colour, each channel dimmed to 4 to 11, from the hue before.
voidfdMindReadUpdateCrescent (ACTOR *actor)A Mind Read crescent's update: once it has reached the caster, it goes.
voidfdMindReadStartRipple (void)Sets Mind Read's ripple going at each VBlank: HBlank DMA 0 gives BG0 the page of line offsets last written, a line at a time.
ACTOR *fdEffectSpawnCarryHand (Sint32 x, Sint32 y, Sint32 z, Sint32 angle)Spawns a hand (SPRITE_MOVE_HAND) with the item break sound and grows it, spinning 1/8 turn a tick, from a quarter to full size over 24 ticks; angle is the way it faces once grown.
ACTOR *fdEffectSpawnLiftHand (Sint32 x, Sint32 y, Sint32 z, Sint32 angle)Spawns one of Lift's hands (SPRITE_MOVE_HAND) and grows it from a quarter to full size, an eighth of a turn a tick, then faces it to angle.
Sint32fdEffectSpawnHeavyImpact (ACTOR *src)A heavy impact, as The Broken Seal's: an actor placed below the source for a moment, scattering IMPACT_SHARDS shards from it.
voidfdEffectSpawnBurstParticleField (void)Sends BURST_FIELD_PARTICLES particles, one every 2 ticks, from in front of the caster to points round the Psynergy's position.
voidfdEffectUpdateRandomTargetParticle (FIELD_PARTICLE *effect)Field effect sprite callback of a Mercury Djinni's droplets: each falls from 100 pixels above (on screen) to a random point 2 to 8 pixels round a spot 15 to 20 pixels over the leader, at 3 to 6 pixels a tick, and where it lands splashes 12 pixels in a random direction, at half size, with SE_CRACK.
voidfdEffectCheckCloakTile (void)An event of Cloak: when the controlled character does not stand on a tile Cloak can hide on, requests CLOAK_END (Cloak, packed).
voidfdParticleBurstUpdate (void)Each tick of Cyclone's 96 leaves (fdParticleBurstStart): once its delay has run out a leaf shows for 64 ticks, 48 pixels out along its heading, whirling round ever faster as it rises.
voidfdWhirlwindUpdateTarget (ACTOR *actor)Per-tick update of Whirlwind's target: it shrinks a 512th a tick and, below half its size, is put away at the map's origin.
voidfdRetreatUpdateSpark (FIELD_PARTICLE *slot)Field effect sprite callback: a spark flies 120 pixels from the caster's place on screen (8 pixels lower) in a direction within 1/8 turn of up the screen, at up to 5 pixels a tick, and starts again from the caster on arrival until it takes its last flight.
voidfdTeleportPlayWhirl (void)The arriving half of a teleport: a whirl of sparks, the coloured orbs of RESOURCE_COLOURED_ORBS, falls in round the hidden leader with SE_SPARKLE_FALL, the leader spins and grows back to full size inside it, and the whirl dies away.
voidfdTileCopiesRestore (void)Makes again each copy fdTileCopiesCopyTouchedMetatiles recorded: copies the metatile picture back and opens the metatile on layer 2.
voidfdBattleEffectDrawCanvasBlock ( const Uint8 *src, Sint32 x, Sint32 y, Sint32 width, Sint32 height)Copies a width by height block of colour indices onto the half canvas at x, y, skipping zeros (clear pixels).
voidfdDjinnRunVenusJoinEffect (Sint32 actorId)The Djinn: what each element's join effect shows, and settling a Djinni after its battle.
voidfdDjinnRunMercuryJoinEffect (Sint32 actorId)A Mercury Djinni joins the party: the screen is tinted blue, the Djinni bounces twice and hops three times ever higher, then rises 120 pixels out of sight trailing eight afterimages; the leader turns to the camera and raises its arms, and droplets fall about it.
voidfdDjinnRunMarsJoinEffect (Sint32 actorId)A Mars Djinni joins the party: it turns to the camera, bounces three times, spins ever faster and shrinks away in a fountain of sparks (fdEffectUpdateMarsSpark).
voidfdDjinnRunJupiterJoinEffect (Sint32 actorId)A Jupiter Djinni joins the party: it bounces three times, spins, leaps out of sight and bursts into PSYNERGY_EFFECT_SLOT_COUNT lights, which circle and close in on the leader, who turns to the camera and raises its arms (ANIM_LEADER_ARMS_RAISED).
voidfdDjinnResolvePending (Sint32 shown)Settles a pending Djinni battle as a scene loads, from the battle's result in engineResult (the enemies defeated, BATTLE_OUTCOME_FLED when the party fled, -1 when it lost), as The Broken Seal's; a mimic chest's script (CONDITION_FLAG_SET) falls through to the clear.
voidfdDjinnRestoreActorAfterBattle (void)Puts a Djinni's actor back where its battle started from: for a pending Djinni battle (pendingDjinni from DJINNI_BATTLE_SCRIPT_FIRST, one for each Djinni, FLAG_KEEP_PARTY_POSITION set, the battle over) the scene's actor placed for that Djinni (condition = its flag) goes back to its placement's position, or 32 pixels north of the leader when the script has DJINN_NO_HOP set, and stands.
voidfdMapScreenGetLeaderPoint (Sint32 *screenX, Sint32 *screenY)The map screen, which the World Map's Select shows: the leader's point on it and the tiles a cast has used.
voidfdPsynergyMarkWorldMapTilesUsed (void)On the World Map, notes that the field Psynergy has used the second half of the BG tile buffer, so the next still image decodes it again.
voidfdStartEncounterTransition (Sint32 unused)The battles the scripts start: the encounter zones of the story's battles, the Mad Plants' leap and the transition into a battle.
voidfdActorSetLayersColorMode (void *actor, Sint32 value)Gives an actor's sprite colour mode value - 1 (SPR_COL_MODE), or for LAYER_COLOR_CYCLING the next of MindReadCasterColorCycle's swapped colours, a step every 2 ticks, as Mind Read's wave does to its caster.
voidfdActorSetOthersPaused (ACTOR *excludedObject, Sint32 groupMode, Sint32 action)Pauses or resumes every actor but the Halted one and excluded, and sets their animation speed, as Sand stills the field around the leader.
voidfdWeatherUpdateLightning (void)The storm each tick: lightning flashes the BG colours three times, 5 ticks apart, with thunder; while lightning is on, the next burst comes 51 to 549 ticks later.

Variables

NameDescription
extern const Sint32DustPuffLongScript []
extern const Sint32DustPuffShortScript []
extern const Sint32FieldEffectSourceHoldScript []Faces the watched actor every tick, forever: the caster holding its target while Move, Carry or Lift has it (each gives the caster its target first).
extern const Sint32ForceFistScript []Force's fist: waits to arrive, sets off fdEffectSpawnHeavyImpact and releases the actor.
extern const Uint8MindReadCasterColorCycle []The colour modes Mind Read's caster cycles through, two ticks each (fdActorSetLayersColorMode): its colour channels swapped one way after another and back to its own; The Broken Seal's MindReadCasterPaletteCycle.
extern const Uint8MoveHandPushPoses []Move's hand pose by the quarter turns from its side of the target to the push (fdPsynergySteerPushedTarget): pulling the target toward its side, it grips; pushing it away, it shows its palm; pushing it across, it is open.
extern const Uint8WorldMapMarkerBlendCycle []The places' markers' blend, a level for every two ticks of a 64-tick cycle.
extern const Uint16WorldMapCursorDirectionAngles []The cursor's heading for each way the +Control Pad is held.

Description

What the script commands share with the field and the scenes: the field Psynergy's casts and their states, the Djinn's join effects, the map screen's state, and the encounter zones of the story's battles.

Macros in detail

HUE_DEGREES

#define HUE_DEGREES 360

A hue's degrees, a full turn of the colour wheel.

Referenced by fdEffectHueChannelRamp(), fdMindReadAdvanceTint() and fdPsynergyStartMindReadWave().

Definition at line 23 of file script_commands.h.

MIND_READ_QUIET

#define MIND_READ_QUIET 99

MIND_READ_STATE.count held still: the wave sends no particles and plays no sound, as while Lonesome George carries the party.

Referenced by fdPsynergyUpdateMindReadWave(), scIsletsGiveTurtle(), scIsletsLonesomeGeorgeThanks() and scIsletsRideBackToIsland().

Definition at line 45 of file script_commands.h.

TouchCopiesWork

#define TouchCopiesWork (*(TOUCH_COPIES *)SceneLocalState)

The metatiles Psynergy moved, kept in the scene's own state (SceneLocalState).

Referenced by fdCycloneCopyTouchedMetatiles(), fdEngineRun(), fdTileCopiesCopyTouchedMetatiles() and fdTileCopiesRestore().

Definition at line 91 of file script_commands.h.

PARTICLE_BURST_COUNT

#define PARTICLE_BURST_COUNT 96

The particles of the particle burst.

Referenced by fdParticleBurstStart() and fdParticleBurstUpdate().

Definition at line 107 of file script_commands.h.

DJINN_NO_HOP

#define DJINN_NO_HOP 0x800

fdRequestDjinnBattle's flag: the Djinni does not hop first.

Referenced by fdDjinnRestoreActorAfterBattle(), fdRequestDjinnBattle(), scWorldMapMeetChill(), scWorldMapMeetCore(), scWorldMapMeetIron(), scWorldMapMeetPetra(), scWorldMapMeetSour() and scWorldMapMeetWheeze().

Definition at line 327 of file script_commands.h.

ENCOUNTER_ZONE_MAD_PLANTS

#define ENCOUNTER_ZONE_MAD_PLANTS 106

The encounter zone of the hidden Mad Plants' battles, one slot each, in FLAG_MAD_PLANT's order.

Referenced by scGabombaCatacombsUncoverMadPlant(), scGaiaRockInsideCycloneMadPlant(), scJupiterLighthouseUncoverMadPlant(), scTaopoSwampStartMadPlantBattle() and scTrialRoadScatterWeedsHidingMadPlant().

Definition at line 331 of file script_commands.h.

ENCOUNTER_ZONE_SCRIPTED_EARLY_STORY

#define ENCOUNTER_ZONE_SCRIPTED_EARLY_STORY 9

The encounter zone of the early story battles: the Ruffian waiting for backup on Venus Lighthouse's plaza (slot 0), the Ruffian on the Suhalla road (1), the three Ruffians at the crevice (2) and the Punch Ant (3) at Suhalla Gate, the Chestbeaters in the Kandorean Temple (4) and Echo's lesson battle on the World Map (5).

Referenced by EncounterBattleMusic, scKandoreanTempleFightChestbeaters(), scSuhallaGateFightPunchAnt(), scSuhallaGateRuffiansAmbushParty(), scSuhallaGateRuffianSpotsParty(), scVenusLighthouseEntranceRuffianWaitsForBackup() and scWorldMapExplainGivingDjinn().

Definition at line 353 of file script_commands.h.

ENCOUNTER_ZONE_SCRIPTED_YAMPI_DESERT_ALHAFRA

#define ENCOUNTER_ZONE_SCRIPTED_YAMPI_DESERT_ALHAFRA 10

The encounter zone of two story battles: the King Scorpion's in the Yampi Desert (slot 0), then Briggs and his crew's on his ship at Alhafra (slot 1).

Referenced by EncounterBattleMusic, scEasternAlhafraShipMayorArrives() and scYampiDesertLandAndFightKingScorpion().

Definition at line 356 of file script_commands.h.

ENCOUNTER_ZONE_AQUA_JELLIES

#define ENCOUNTER_ZONE_AQUA_JELLIES 11

The encounter zone of the battles below deck of the Lemurian Ship: slot 0 an Aqua Jelly, slot 1 the Aqua Hydra.

Referenced by EncounterBattleMusic and scLemurianShipFightAquaHydra().

Definition at line 359 of file script_commands.h.

ENCOUNTER_ZONE_SERPENT

#define ENCOUNTER_ZONE_SERPENT 12

The encounter zone of three story battles: the Serpent's in Gaia Rock, one slot for each beam of sunlight let into its lair (ENEMY_SERPENT to ENEMY_SERPENT_FOUR_BEAMS, slots 0 to 4), then Avimander's in Champa (slot 5) and Poseidon's at the Sea of Time (slot 6).

Referenced by EncounterBattleMusic, scChampaCliffCavesFightAvimander(), scGaiaRockInsideChallengeSerpent() and scSeaOfTimeFacePoseidon().

Definition at line 364 of file script_commands.h.

ENCOUNTER_ZONE_MOAPA

#define ENCOUNTER_ZONE_MOAPA 13

The encounter zone of Moapa and his two Knights at the Trial Road's peak, one slot per stage door the party reached first (slots 0 to 4), then Karst and Agatio's three battles on Jupiter Lighthouse's aerie (slots 5 to 7).

Referenced by EncounterBattleMusic, scJupiterLighthouseBeaconIsLit(), scJupiterLighthouseJennaJoinsTheFight(), scJupiterLighthouseShebaJoinsTheFight() and scTrialRoadChallengeMoapa().

Definition at line 368 of file script_commands.h.

ENCOUNTER_ZONE_WORLD_MAP_BEACH_AND_GRASSLAND

#define ENCOUNTER_ZONE_WORLD_MAP_BEACH_AND_GRASSLAND 14

The World Map's encounter zone of region 1's beach, shallows and grassland, which the Psynergy test room's battles also take (slot 0, one or two Giant Bats).

Referenced by dbPsynergyTest2StepIntoBattle(), dbPsynergyTestDigUpStatue(), dbPsynergyTestFightMadPlant() and WorldMapEncounterRules.

Definition at line 372 of file script_commands.h.

ENCOUNTER_ZONE_SCRIPTED

#define ENCOUNTER_ZONE_SCRIPTED 102

The script battles: the Flame Dragons in Mars Lighthouse (slot 0), the Doom Dragon on its aerie (1), the gladiators in the Shaman Village Cave (2), the World Map's bandits (3) and Agatio and Karst's fight with Isaac in Jupiter Lighthouse (4).

Referenced by EncounterBattleMusic, scJupiterLighthouseIsaacAndIvanAreHurt(), scMarsLighthouseAerieFaceDoomDragon(), scMarsLighthouseStarRoomWakeFlameDragons(), scShamanVillageCaveFightGladiators(), scShamanVillageCaveMeetGladiators() and scWorldMapFightBanditAndThieves().

Definition at line 378 of file script_commands.h.

ENCOUNTER_ZONE_HIDDEN_BOSSES

#define ENCOUNTER_ZONE_HIDDEN_BOSSES 103

The encounter zone of the battles with four guardians of hidden places, one slot each (HIDDEN_BOSS).

Referenced by EncounterBattleMusic, scAnemosInnerSanctumDullahanShadowChallenges(), scIsletCaveSentinelAwaits(), scTreasureIsleMeetStarMagician() and scYampiDesertCaveMeetGuardianOfFire().

Definition at line 382 of file script_commands.h.

LAYER_COLOR_CYCLING

#define LAYER_COLOR_CYCLING 0

fdActorSetLayersColorMode's value that cycles the actor's colours (MindReadCasterColorCycle); any other is a colour mode plus one.

Referenced by fdActorSetLayersColorMode() and fdPsynergyUpdateMindReadWave().

Definition at line 396 of file script_commands.h.

LEDGE_JUMP_NO_LANDING_WAIT

#define LEDGE_JUMP_NO_LANDING_WAIT (1 << 12)

fdActorJumpDownLedge's mode bit that skips the wait for the landing.

Referenced by fdActorJumpDownLedge(), scAnkohlRuinsJumpDownPit() and scTaopoSwampDropToLowerFloor().

Definition at line 404 of file script_commands.h.

DPAD_ANGLE_NONE

#define DPAD_ANGLE_NONE 65535

What fdInputGetDpadAngleEightWay returns when no direction is held, or right and left or up and down together: the blank entries of InputDpadAnglesEightWay.

Referenced by fdLeaderSlideOnIce(), fdLeaderStepOffRope(), fdLeaderStepOffTightrope(), fdPsynergySteerLiftedTarget(), fdPsynergySteerPushedTarget(), InputDpadAngles, InputDpadAnglesEightWay, RopeKeyHeadings, scLeaderSlideOnIceFromEdge() and WorldMapCursorDirectionAngles.

Definition at line 409 of file script_commands.h.

Enumerations in detail

BURST_STAGE

enum BURST_STAGE

The stage Burst passes its target's script each tick (BURST_STATE.shake).

EnumeratorValueDescription
BURST_STAGE_QUIETno explosion this tick
BURST_STAGE_DYING_DOWNthe great blast dying down
BURST_STAGE_SMALL_BLASTa small explosion shakes the ground
BURST_STAGE_GREAT_BLASTthe last and largest blast

Definition at line 200 of file script_commands.h.

CASTER_LOOK

enum CASTER_LOOK

The caster's look while it casts, fdBattleEffectSetObjectUpdateMode's mode.

EnumeratorValueDescription
CASTER_LOOK_NORMAL0its own colours
CASTER_LOOK_FLASHING_WHITE1Flashing white, with swelling arcs (fdEffectFlickerActorAndSpawnArcs).
CASTER_LOOK_CYCLING_COLORS2Cycling colours, with swelling arcs (fdEffectCycleActorAndSpawnArcs).

Definition at line 227 of file script_commands.h.

DJINN_ENCOUNTER_ZONE

enum DJINN_ENCOUNTER_ZONE

The Djinn's encounter zones (rows of EncounterZones), two to an element: the first holds the battles of its first fifteen Djinn, who share its eight slots, and the second those of its last three and its two spares.

EnumeratorValueDescription
ENCOUNTER_ZONE_VENUS_DJINN1
ENCOUNTER_ZONE_VENUS_DJINN_LAST
ENCOUNTER_ZONE_MERCURY_DJINN
ENCOUNTER_ZONE_MERCURY_DJINN_LAST
ENCOUNTER_ZONE_MARS_DJINN
ENCOUNTER_ZONE_MARS_DJINN_LAST
ENCOUNTER_ZONE_JUPITER_DJINN
ENCOUNTER_ZONE_JUPITER_DJINN_LAST

Definition at line 336 of file script_commands.h.

HIDDEN_BOSS

enum HIDDEN_BOSS

The slots of ENCOUNTER_ZONE_HIDDEN_BOSSES.

EnumeratorValueDescription
HIDDEN_BOSS_TREASURE_ISLEthe Star Magician, at the end of Treasure Isle
HIDDEN_BOSS_VALUKARValukar, in the Yampi Desert Cave
HIDDEN_BOSS_SENTINELthe Sentinel, at the end of the Islet Cave
HIDDEN_BOSS_ANEMOSthe shadow at the entrance of the Anemos Inner Sanctum

Definition at line 385 of file script_commands.h.

Functions in detail

gmPartyInventoryFindRoomStub

Sint32 gmPartyInventoryFindRoomStub(Sint32 item)

gmPartyInventoryFindRoom through its stub call: the first party member with room for item, or -1.

Referenced by fdPartyCheckItemLimit(), fdScoopDigUpItem() and fdScriptPickUpItem().

Definition at line 140 of file script_commands.h.

mnItemPickerRunToDropStub

Sint32 mnItemPickerRunToDropStub(Sint32 *member, Sint32 *slot)

mnItemPickerRunToDrop through its stub call: the item picker for an item to drop, which sets the member and slot chosen.

Referenced by fdPartyInventoryGiveItem().

Definition at line 143 of file script_commands.h.

fdActorScriptCheckOverlapStub

Sint32 fdActorScriptCheckOverlapStub(ACTOR *actor, VECTOR3 *pos)

fdActorScriptCheckOverlap through its stub call: -1 when the actor at position would overlap a solid actor, otherwise 0.

Referenced by fdPsynergyForce() and fdPsynergySteerLiftedTarget().

Definition at line 146 of file script_commands.h.

fdActorGetSpriteIdStub

Sint32 fdActorGetSpriteIdStub(ACTOR *actor)

fdActorGetSpriteId through its stub call: the sprite id the actor is drawn with, or 0 for none.

Referenced by fdPsynergyBlaze(), fdPsynergyDouse(), fdPsynergyGrindOnTarget(), fdPsynergyGrowthOnTarget() and fdPsynergyScoop().

Definition at line 149 of file script_commands.h.

fdMapGridCopyDrawnPicturesRectStub

void fdMapGridCopyDrawnPicturesRectStub(Sint32 toX, Sint32 toZ, Sint32 width, Sint32 height, Sint32 fromX, Sint32 fromZ)

fdMapGridCopyDrawnPicturesRect through its stub call: copies width by height metatiles as they are from (fromX, fromZ) to (toX, toZ).

Referenced by fdCycloneCopyTouchedMetatiles(), fdTileCopiesCopyTouchedMetatiles() and fdTileCopiesRestore().

Definition at line 152 of file script_commands.h.

fdActorScriptFindOverlappingActorStub

ACTOR *fdActorScriptFindOverlappingActorStub(ACTOR *actor, VECTOR3 *pos)

fdActorScriptFindOverlappingActor through its stub call: the first solid actor the actor at position would overlap, or NULL.

Referenced by fdPsynergySteerPushedTarget().

Definition at line 160 of file script_commands.h.

Variables in detail

DustPuffLongScript

extern const Sint32 DustPuffLongScript[]

Referenced by fdEffectSpawnDustPuff().

Definition at line 238 of file script_commands.h.

DustPuffShortScript

extern const Sint32 DustPuffShortScript[]

Referenced by fdEffectSpawnDustPuff().

Definition at line 239 of file script_commands.h.