mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-03-21 17:34:13 -05:00
Page:
Overworld Scripting ‐ Map Header Scripts
Pages
Basic Tutorial 01: Pokemon Editing
Basic Tutorial 02: Pokedex Editing
Basic Tutorial 04: Editing Shiny Odds
Basic Tutorial 10: Starter Pokemon Editing
Basic Tutorials (Miscellaneous)
Decapitalization Explained
Developer Guide
Editing the World Map ⁄ Town Map
Entrance Abilities
Everything You Need for Event Scripting in HexManiacAdvance
Evolution Editing
Expanding Starters in Emerald
Formats
Getting HexManiacAdvance to recognize extra pokemon added with PGE
Glossary
HUBOL ‐ Adding New Sprites & Particles
HUBOL ‐ Daily Log‐In Rewards
HUBOL ‐ Extending the Day ⁄ Night System for All Outdoor Maps
HUBOL ‐ Level Caps
HUBOL ‐ Motley of Changes
HUBOL ‐ Resetting Pedometers
HUBOL ‐ Trainer Sliding Messages & In‐Battle Music Changes
Haven's Unofficial Build Of Leon's Dynamic Pokemon Expansion Complete FireRed Upgrade Rombase
Hex Maniac Advance ‐ Frequently Asked Questions
HexManiac Automation Scripts
Home
Legendary Pokémon Encounters
List of Auto Anchors
List of Utilities and Scripts
Making Scripts Callable from Items
Move Expansion Explained
Overview of the Interface
Overworld Scripting ‐ A Complete Example
Overworld Scripting ‐ Flags
Overworld Scripting ‐ Getting Started
Overworld Scripting ‐ Map Header Scripts
Overworld Scripting ‐ Script Events
Overworld Scripting ‐ Scripting Basics
Overworld Scripting ‐ Specials
Overworld Scripting ‐ Using Templates
Overworld Scripting ‐ Variables
Pixilate Style Abilities
Pointers and Anchors
Pokedex Conversion Explained
Pokemon Expansion Explained
Pokemon Moves
Rom Expansion Explained
Rom Overview Explained
Scripts Expand Overworld Sprites
Scripts Fairy Type
Scripts ‐ Combat Items
Scripts ‐ Item Effect to Change Secondary Type
Scripts ‐ Physical Special Split
Scripts ‐ Tutor Items
Silent Pokémon Evolutions Tutorial
Sorting Level Up Moves Explained
TOML and You: How Metadata works
Tileset Animations Explained
Trainer Encounters
Tutor Expansion Explained
Tutorials
Understanding the User Interface
User Guide
What are HMA Scripts?
Аnimation Scripting Tutorials
0
Overworld Scripting ‐ Map Header Scripts
ShinyTillDawn edited this page 2025-11-26 14:40:46 -05:00
Table of Contents
Click to return to the main scripting page
At the bottom of the map header panel, you can see a special set of scripts called "Map Header Scripts."
These are special scripts that are associated with an entire map, rather than being assigned to a specific event. This lets you run code any time you enter a map, unpause the game in a map, or even just every time-step that your character spends in that map.
Below is an explanation of all of the types of header scripts, as well as examples of where they're used in the vanilla games.
| Script Type | Description | Examples |
|---|---|---|
| Load | Before Layout is Drawn. Almost exclusively used to set metatiles on the map before it's first drawn. | Seafoam Island (1-87) |
| Per-Frame | Table of scripts that run every frame. Only the first script whose condition is satisfied is run. Used to trigger events. | Cinnabar Island (3-8) Bill Event |
| Transition | Run when switching maps. Used to set map-specific flags/vars, update object positions/movement types, set weather, etc | Power Plant (1-95) Reset Zapdos encounter (See Legendary Pokémon Encounters) |
| Warp into Map | Table of scripts to run after objects are loaded. Only the first script whose condition is satisfied is run. Used to update facing / visibility or to add objects to the scene. | Route 16 (3-34) (Bicycle Road) Force player onto bike |
| Resume | Run after loading the map, or exiting the bag, or finishing a battle, etc. Used to hide defeated static pokemon, or maintain some map state. | Route 12 (3-30) Hide the Snorlax |
| Dive Warp | Run after the player dives or emerges | Only used to determine whether the player should emerge in the sealed chamber |
| Return to Field | Run after exiting bag or finishing battle, but not when entering a map. Used rarely, when something must only happen on reload. | Trainer Town (2-10) to show sprites |
Making Your Own Map Scripts
King Cradi has a more in-depth video guide on map scripting for ROM hackers to watch: It also covers some examples and use cases.
