You are not logged in.
Pages: 1
Would it be possible to load a different version of an overworld map when a certain flag is set? I want to go through the backstory of the cinnabar volcano, with cinnabar looking partially destroyed to begin with and then after defeating blaine in seafoam it switches to it's GSC map to show the procedural damage of the volcano.
Offline
Maybe you could alter the way map connections work to be able to load different map indexes based on whether flags are set. Before you get the Volcanobadge, it loads the old map when you get close to Cinnabar, but after you get it the game loads GSC Cinnabar.
Offline
I would probably start with LoadMapHeader: in home/overworld.asm
LoadMapHeader: reads from MapHeaderPointers: to find the header for the newly loaded map.
Edit that function so that if the newly loaded map is Cinnabar Island and if that flag is set, then replace the fetched address (CinnabarIsland_h:) with a different, hard coded address of a duplicate header.
This duplicate header for Cinnabar Island would be an exact copy of data/mapHeaders/cinnabarisland.asm, but replace the pointer to CinnabarIslandBlocks with a pointer to the alternate blocks data. (and possibly a different pointer to an alternate set of text pointers, scripts and objects, depending on how much you want to change)
Like Mmmmmm says, the way connections work would also have to be modified so that Cinnabar Island would be "previewed" correctly while standing within a connected map.
But getting the right map header loaded would be a good start.
Offline
I would probably start with LoadMapHeader: in home/overworld.asm
LoadMapHeader: reads from MapHeaderPointers: to find the header for the newly loaded map.
Edit that function so that if the newly loaded map is Cinnabar Island and if that flag is set, then replace the fetched address (CinnabarIsland_h:) with a different, hard coded address of a duplicate header.This duplicate header for Cinnabar Island would be an exact copy of data/mapHeaders/cinnabarisland.asm, but replace the pointer to CinnabarIslandBlocks with a pointer to the alternate blocks data. (and possibly a different pointer to an alternate set of text pointers, scripts and objects, depending on how much you want to change)
Like Mmmmmm says, the way connections work would also have to be modified so that Cinnabar Island would be "previewed" correctly while standing within a connected map.
But getting the right map header loaded would be a good start.
Since I'm removing the oak walks up to you script entirely (you get a pokemon a different way) I could use this flag elsewhere. Why does the new mapheader need to be hardcoded? I've already set up map $0B to have the new cinnabar version so I could just route it to that address surely?
Last edited by ~Red (2016-11-30 22:23:40)
Offline
Sure, you could do that too. At the beginning of LoadMapHeader: in home/overworld.asm, if the ID in [wCurMap] is CINNABAR_ISLAND and that flag is set, then replace [wCurMap] with $b.
You should take this kind of approach because you wouldn't have to make additional changes to blacking out or flying or other things that return you to Cinnabar Island that don't use map connections.
Offline
Pages: 1