As some of you may already be aware, we have begun construction of a new forum as a rebirth of PHO and continuing on into future projects.
This forum is called Silph Co., and can be found by clicking the banner below. We are in the process of transferring some of our old resources, and the forum is open for posting. It will be sad to see PHO go, but we look forward to a bright future with Silph.
The forums here will be moved to an archive, and the url will redirect to the new site in the coming days/weeks.

Generation 3 (Traditional)Traditionally, Generation 3 is hacked using tools, hex editors and patches. This is for you if you do that.

The "setmaptile" command, as you could probably guess, allows you to change a map's tiles. This is commonly used in the canon games for puzzles - such as Cinnabar's mansion where you interact with statues to open doors - but it can be used for anything, really.

Your map editor should show the X and Y co-ordinates of the tile you want to change when you hover over it, same with the block number when selecting from the block palette. If you're using AdvanceMap, this data is shown at the bottom of the screen.
In this example, I'm just going to make some flowers appear when you talk to someone in an unedited Emerald ROM. Nothing too fancy!

These X and Y co-ordinates are for the tiles between Brendan & May's homes in Littleroot Town. In vanilla Emerald, block number 0x04 is the one containing default flowers. I used 0x0 for the last bit, so that the flowers don't block the player's path. What's the special 0x91 for? This refreshes the map so that we can see the changes we've made. If you're hacking FR, you'll need special 0x8E to refresh the map instead of 0x91. I've also setflag 0x250 so that the script doesn't repeat itself - although you could use a var instead if you wanted.

Yay, it works! But what about when we exit the map? The flowers are gone! We used a flag, so the player can't talk to the NPC to make the flowers grow again. How do we make this a permanent change? We need a second script for the map header.

All this does is call @pointer which shows our flower tiles if flag 0x250 is set. We want to add this to the map's header so that the script runs immediately upon entering the map.
To do this, first compile a similar script to the one above and take a note of its offset. Add a "setmaptile" script as shown then paste your offset in the "Script Offset" box if you're using AdvanceMap:

Test again, and this time when you talk to the NPC to make the flowers grow, the map will be changed permanently.