You are not logged in.
Pages: 1
There are a bunch of things I can't figure out how to do for Pokemon Bronze 2.
They are:
-Changing map music during a rocket raid
-Removing wild Pokemon from a map entirely
-Moving a map from Kanto to Johto and keeping its wild encounters working (And they show up on Johto's town map)
-Removing unused map areas from the town map
I have tried simply commenting out the wild pokemon data, but that just rearranged everything.
Even tried setting the encounter rate to 0. But still that gives the same result.
Removing unused areas from the town map no matter what I tried building it would always give me a "missing whatever" or whatever.
Everything else I have no idea where to even start.
Last edited by Freakorama (2017-11-13 05:48:03)
Offline
Changing map music during an event:
This is already done for Mahogany Mart while Team Rocket runs it. constants/music_constants.asm defines MUSIC_MAHOGANY_MART, and MahoganyMart uses that as its BGM in maps/map_headers.asm. Then home/map.asm:GetMapHeaderMusic checks for it and jumps to a special case for that value, which checks StatusFlags2 to decide whether to play MUSIC_ROCKET_HIDEOUT or MUSIC_CHERRYGROVE_CITY.
(There's a similar case for the Radio Tower during Team Rocket's takeover, but for some reason it uses an overly-complicated method with bit 7 being set.)
(Also the value of MUSIC_MAHOGANY_MART happens to equal MUSIC_SUICUNE_BATTLE, but that would only be an issue if a map needed to actually use MUSIC_SUICUNE_BATTLE as its BGM.)
You probably want to check an event, not a status flag, so your special case would look something like this:
GetMapHeaderMusic:: ; 2cbd
push hl
push bc
ld de, 6 ; music
call GetMapHeaderMember
ld a, c
cp MUSIC_FOR_RAIDED_MAP
jr z, .raidedmap
callba Function8b342
ld e, c
ld d, 0
.done
pop bc
pop hl
ret
.raidedmap
ld hl, EventFlags + (EVENT_TEAM_ROCKET_RAID_HAPPENING >> 3)
bit (EVENT_TEAM_ROCKET_RAID_HAPPENING & $7), [hl]
jr z, .noraid
ld de, MUSIC_ROCKET_OVERTURE
jr .done
.noraid
ld de, MUSIC_CHERRYGROVE_CITY
jr .done
Then you just define MUSIC_FOR_RAIDED_MAP and use it for all the relevant maps.
Removing wild Pokemon from a map entirely:
Just remove the map from its particular region file in data/wild/*.asm: the first line with the map declaration, the second with the encounter probabilities, and the three groups of seven for mon/day/nite Pokémon.
Moving a map from Kanto to Johto:
Move its encounter data from data/wild/kanto*.asm to data/wild/johto*.asm.
Changing a map's location on the Town Map:
Rearrange the location in constants/landmark_constants.asm, and change its coordinates in engine/landmarks.asm.
Removing unused map areas from the Town Map:
Same as changing the map's location, just delete the landmark data instead of rearranging it.
----------------------------------------
Two tips for finding the answers to these sort of questions. One, just browse through the pokecrystal files and get familiar with their names and what sort of data or code is inside them. You can ignore the low-level asm-heavy ones (which is most of home/ and some of engine/), but pay attention to ones with important names. Like, engine/npctrade.asm is probably going to have the NPC trade information.
Two, look backwards. If you didn't know that engine/npctrade.asm existed, but you knew that a guy in Violet City trades Onix for Bellsprout, you could look at his script in maps/VioletOnixTradeHouse.asm and try to find how it's done. (It happens to use the "trade $1" command; you can then check macros/event.asm and engine/scripting.asm to find the definition of Script_trade, which calls NPCTrade, which is defined in engine/npctrade.asm.)
Searching through all the assembly code is doable with GitHub's search, or with the "grep" command in Cygwin. For example, to search for "MUSIC_MAHOGANY_MART" in all files, including recursively down subdirectories, showing line numbers too, with automatic color highlighting of search terms:
Rangi@PC /cygdrive/c/Users/Rangi/pokecrystal
$ grep --color=auto -rn 'MUSIC_MAHOGANY_MART' *
constants/music_constants.asm:107:MUSIC_MAHOGANY_MART EQU $64 ; leftover from gold
home/map.asm:2294: cp MUSIC_MAHOGANY_MART
maps/map_headers.asm:106: map_header MahoganyMart1F, TILESET_KURT_HOUSE, INDOOR, MAHOGANY_TOWN, MUSIC_MAHOGANY_MART, 1, PALETTE_DAY, FISHGROUP_SHORE
My projects on GitHub:
• Polished Map 4.5.4 or 2.5.4++
• Tilemap Studio 3.2.2
• Pokémon Polished Crystal 2.2.0 or 3.0.0 beta
• Pokémon Red★/Blue★: Space World Edition 2020-11-01
Offline
landmark $47, $84, Route26Name ;ROUTE 20
landmark $3C, $84, VictoryRoadName
landmark $3C, $80, Route23Name
landmark $3C, $7C, IndigoPlateauName
; landmark 0, 0, SproutTowerName ;Above Here
; landmark 0, 0, LighthouseName
; landmark 0, 0, RuinsOfAlphName
; landmark 0, 0, SlowpokeWellName
; landmark 0, 0, TinTowerName
; landmark 0, 0, BurnedTowerName
; landmark 0, 0, BattleTowerName
; landmark 0, 0, WhirlIslandsName
; landmark 0, 0, DragonsDenName
; landmark 0, 0, DarkCaveName
; landmark 156, 84, SilverCaveName
landmark $2C, $44, PalletTownName
landmark $3C, $44, Route7Name
landmark $4C, $44, LavenderTownName
I commented out all the unused areas, but that just caused the town map to start displaying Kanto areas in Johto after I had scrolled through all the Johto ones.
Offline
landmark $47, $84, Route26Name ;ROUTE 20 landmark $3C, $84, VictoryRoadName landmark $3C, $80, Route23Name landmark $3C, $7C, IndigoPlateauName ; landmark 0, 0, SproutTowerName ;Above Here ; landmark 0, 0, LighthouseName ; landmark 0, 0, RuinsOfAlphName ; landmark 0, 0, SlowpokeWellName ; landmark 0, 0, TinTowerName ; landmark 0, 0, BurnedTowerName ; landmark 0, 0, BattleTowerName ; landmark 0, 0, WhirlIslandsName ; landmark 0, 0, DragonsDenName ; landmark 0, 0, DarkCaveName ; landmark 156, 84, SilverCaveName landmark $2C, $44, PalletTownName landmark $3C, $44, Route7Name landmark $4C, $44, LavenderTownName
I commented out all the unused areas, but that just caused the town map to start displaying Kanto areas in Johto after I had scrolled through all the Johto ones.
The constants/landmark_constants.asm values need to correspond to the landmark entries, line by line.
My projects on GitHub:
• Polished Map 4.5.4 or 2.5.4++
• Tilemap Studio 3.2.2
• Pokémon Polished Crystal 2.2.0 or 3.0.0 beta
• Pokémon Red★/Blue★: Space World Edition 2020-11-01
Offline
That just gives me this when building:
C:\cygwin64\Freako\bin\rgblink.exe: Unknown symbol 'SILVER_CAVE'
make: *** [Makefile:59: pokebronze2.gbc] Error 1
Offline
Rearranging flight locations in pokegear.asm has completely messed up the fly map menu.
It shows Kanto locations in Johto, and in Kanto everything is just corrupted and I don't know how to fix it.
And I'm still unable to remove unused locations from the map.
It will not build the game when I remove them.
Last edited by Freakorama (2017-11-17 07:04:01)
Offline
Pages: 1