Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pmret/papermario/llms.txt

Use this file to discover all available pages before exploring further.

The visual effects system handles every particle, aura, glow, and animated overlay in Paper Mario — from the dust cloud when Mario lands to the elaborate star-spirit release sequences. Each effect is implemented as a standalone C file under src/effects/ and registered through src/effects.yaml, which the build system uses to generate spawn-function declarations and the effects dispatch table.

How effects are defined

Each effect lives in its own source file in src/effects/. An effect file typically contains:
  1. An FXData struct (declared in include/effects.h) that holds per-instance state — position, velocity, timer, colour, and so on.
  2. An init function that allocates the instance and sets its initial state.
  3. An update function called every frame.
  4. An appendGfx function that writes the RDP display list for rendering.
The effect is registered in src/effects.yaml with a name, its argument signature, and optional shared graphics (gfx). The build system generates a fx_<name>(...) spawn function for each entry.

Example YAML entries

- name: big_smoke_puff
  args: f32, f32, f32      # x, y, z
  void: True               # spawn function returns void

- name: landing_dust
  args: s32, f32, f32, f32, f32
  void: True

- name: flower_splash
  args: f32, f32, f32, f32
  gfx: flower_splash_trail # shares graphics with flower_trail
  void: True

- name: star
  args: s32, f32, f32, f32, f32, f32, f32, f32
  # no void: returns EffectInstance*
When void is True, the spawn function returns nothing. When omitted, it returns a pointer to the live EffectInstance so the caller can track or destroy the effect.

Spawning an effect

From C code, you call the generated spawn function directly. From an EVT script, effects are spawned through wrapper callables or directly via ApiStatus functions defined in the battle and map script APIs.

Example data struct from include/effects.h

// Used by both flower_splash and flower_trail effects
typedef struct FlowerFXData {
    /* 0x00 */ s32 alive;
    /* 0x04 */ u16 triggeredByNpc;
    /* 0x06 */ s16 timeLeft;
    /* 0x08 */ u8 primAlpha;
    /* 0x09 */ s8 useAltColor;
    /* 0x0C */ Vec3f pos;
    /* 0x18 */ Vec3f scale;
    /* 0x24 */ Vec3f rot;
    /* 0x30 */ Mtx transformMtx;
    /* 0x70 */ f32 velScaleA;
    /* 0x74 */ f32 velScaleB;
    /* 0x78 */ f32 visibilityAmt;
    /* 0x90 */ VecXZf vel;
} FlowerFXData; // size = 0x98
Many FX data structs in include/effects.h still contain fields prefixed unk_ — these are part of the ongoing decompilation effort. If you identify a field, add a named declaration and open a pull request.

Effect categories

The 120+ effects in src/effects/ fall into several functional groups.
These fire when characters move, land, or interact with the environment.
FileEffect
landing_dust.cDust puff on landing
walking_dust.cFootstep dust while walking
footprint.cFootprint decal on soft ground
big_smoke_puff.cLarge smoke cloud
cloud_puff.cSmall cloud puff
cloud_trail.cTrailing cloud effect
smoke_burst.cSudden smoke burst
smoke_impact.cSmoke on impact
smoke_ring.cRing-shaped smoke
steam_burst.cSteam burst (lava, etc.)
These accompany attacks, status inflictions, and hit reactions.
FileEffect
damage_indicator.cFloating damage number
damage_stars.cStars that orbit after taking damage
attack_result_text.c”Nice!”, “Good”, “Great!” text
explosion.cGeneral explosion
blast.cDirectional blast
green_impact.cGreen impact flash
red_impact.cRed impact flash
shockwave.cRadial shockwave ring
energy_shockwave.cEnergy-type shockwave
ring_blast.cRing-shaped blast
flashing_box_shockwave.cBox flash on shockwave
lightning_bolt.cLightning bolt strike
lightning.cLightning effect
thunderbolt_ring.cRing from thunderbolt
fire_breath.cFire breath stream
cold_breath.cCold breath stream
huff_puff_breath.cHuff Puff specific breath
ice_pillar.cIce pillar rising
ice_shard.cIce shard shrapnel
throw_spiny.cSpiny thrown projectile
These indicate ongoing status conditions or stat changes.
FileEffect
aura.cGeneral aura glow around actor
spiky_white_aura.cSpiky white aura (spiked)
partner_buff.cPartner power-up aura
debuff.cDebuff indicator
disable_x.cDisable X mark
static_status.cParalysis static crackle
snaking_static.cSnaking static electricity
sleep_bubble.cSleep bubble floating
sweat.cSweat drops
emote.cNPC emote icon (! ? ♥ etc.)
stop_watch.cStop-watch freeze indicator
stat_change.cStat change arrow indicator
recover.cRecovery sparkle
FileEffect
sparkles.cGeneral sparkle burst
star.cSingle star
stars_burst.cStars bursting outward
stars_orbiting.cStars orbiting a point
stars_shimmer.cShimmering stars
stars_spread.cStars spreading outward
star_outline.cStar outline icon
shiny_flare.cShiny lens flare
lens_flare.cCamera lens flare
shimmer_burst.cShimmer burst
shimmer_wave.cShimmer wave
radial_shimmer.cRadial shimmer pulse
pink_sparkles.cPink sparkles
small_gold_sparkle.cSmall gold sparkle
light_rays.cGod-ray light shafts
bulb_glow.cBulb glow
FileEffect
snowfall.cFalling snow field
snowflake.cIndividual snowflake
big_snowflakes.cLarge snowflakes
falling_leaves.cFalling autumn leaves
drop_leaves.cLeaves dropping from a point
windy_leaves.cLeaves blown by wind
butterflies.cButterfly swarm
underwater.cUnderwater bubble ambience
water_splash.cWater splash
water_fountain.cWater fountain arc
waterfall.cWaterfall curtain
water_block.cWater block entity effect
sun.cSun disc
moving_cloud.cScrolling cloud
floating_cloud_puff.cFloating cloud puff
flame.cFlame (candle / torch)
embers.cFloating embers
fire_flower.cFire flower bloom
motion_blur_flame.cMotion-blurred flame
FileEffect
chapter_change.cChapter title card
confetti.cConfetti shower
firework.cFirework burst
firework_rocket.cFirework rocket trail
ending_decals.cDecals used in the ending sequence
spirit_card.cStar spirit card
star_spirits_energy.cStar spirits release energy
peach_star_beam.cPeach’s star beam
got_item_outline.cItem pickup outline glow
tattle_window.cGoombario tattle popup
music_note.cFloating music note
lil_oink.cLi’l Oink piglet effect
merlin_house_stars.cStars in Merlon’s house
balloon.cInflating balloon
shape_spell.cKammy’s shape-spell effect
FileEffect
quizmo_answer.cQuiz answer flash
quizmo_assistant.cQuiz assistant sparkle
quizmo_audience.cAudience member effect
quizmo_stage.cQuiz stage environment
hieroglyphs.cHieroglyph tiles
snowman_doll.cSnowman doll prop
lil_oink.cLi’l Oink farm piglet
FileEffect
gather_energy_pink.cPink energy gather
gather_magic.cMagic energy gather
energy_in_out.cEnergy pulse in/out
energy_orb_wave.cEnergy orb wave
radiating_energy_orb.cRadiating energy orb
purple_ring.cPurple ring pulse
rising_bubble.cRising bubble
floating_rock.cFloating rock fragment
shattering_stones.cShattering stone fragments
bombette_breaking.cBombette explosion debris
breaking_junk.cBreaking junk particles
chomp_drop.cChain Chomp drop impact
whirlwind.cWhirlwind vortex
squirt.cSquirt stream
tubba_heart_attack.cTubba Blubba heart effect
fright_jar.cFright Jar effect

Unidentified effects

A small number of effects are not yet named in the decompilation:
FileNotes
effect_3D.c3D geometry-based effect, type unknown
effect_46.cEffect slot 46, content not yet identified
effect_63.cEffect slot 63
effect_65.cEffect slot 65
effect_75.cEffect slot 75
effect_86.cEffect slot 86
something_rotating.cRotating object effect, purpose unclear
If you identify one of these effects by cross-referencing the decompiled call sites, rename the file, add a proper name to src/effects.yaml, and update include/effects.h with a named FX data struct.

NPCs and entities

NPC decorations use the effects system — see how they attach to the Npc struct.

Audio system

Many effects trigger sound — see the audio API used alongside effect spawning.

Build docs developers (and LLMs) love