Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#26 2013-07-18 10:05:21

LateNightHacker
Member
From: Ruins of alph
Registered: 2013-07-01
Post 16/153

Re: Creating a working Town Map item!

This dosen't look hard! Thanks mateo for writing this document!


I Support
Pokemon Grape/
Pokemon Gem/Pokemon Dark Energy

▒█░░░ ▀█▀ ▒█░▄▀ ▒█▀▀▀   ░█▀▀█   ▒█▀▀█ ▒█▀▀▀█ ▒█▀▀▀  ▒█▀▀▀
▒█░░░ ▒█░ ▒█▀▄░ ▒█▀▀▀   ▒█▄▄█   ▒█▀▀▄ ▒█░░▒█ ░▀▀▀▄   ░▀▀▀▄
▒█▄▄█ ▄█▄ ▒█░▒█ ▒█▄▄▄   ▒█░▒█   ▒█▄▄█ ▒█▄▄▄█ ▒█▄▄▄█▒█▄▄▄█

Offline

#27 2014-09-16 05:13:31

Skurbert
Member
Registered: 2012-12-16
Post 75/95

Re: Creating a working Town Map item!

It worked to perfection. Thank you, Mateo!

If you succeed in solving the palette-glitch, feel free to let us know.

Offline

#28 2014-09-16 07:38:10

comet
Member
Registered: 2012-04-09
Post 479/679

Re: Creating a working Town Map item!

Mateo wrote:

For ASM Pointer, type in "1844". This should tell it to load the data for the Town Map when you access it. This will make the item function like the Town Map you find on the wall of almost every NPC house in the game.

The only bug with this is that the colours will look a little off when you return to the menu after viewing the map, because it will load the map pallets instead of the menu pallets. I'm working on a fix for this. My plan for fixing this will be to write a small code which will call the Town Map code, then draw the correct pallets to the screen after returning. I'll be taking a look through the thread we've all read a hundred times from Acmlm's board. (HyperHacker vs Tauwasser in Battle Tileset Hack)

The dummy Town Map code calls the core Town Map function without initializing anything. Rather than changing the code pointer to the overworld-only version, leave it and fix the call. The entry point to the complete Town Map is at 24:588a (0x9188a) in Gold (Crystal: Function9191c).

The existing item effect pointer should be 0x6e55. There:

; 0xee55 (3:6e55)
    ld a, $24
    ld hl, $5a4f
    rst $08
    ret

All you need to do is change $5a4f to $588a.


Mateo wrote:

For the Type, we will put "50". This makes it behave the way we want it to when it runs the item's ASM script.

If anyone's curious, the menu type is actually two parts. The top nybble defines the item's context in the overworld. The bottom nybble is for battles.

0: Can't use.
1-3: Unused.
4: Remain in the menu.
5: Return to the menu.
6: Leave the menu (return to overworld).

Checking the Town Map in battle counts as a turn, since you've "used" it, but it may be useful for other items.

Last edited by comet (2014-09-16 08:06:35)

Offline

#29 2014-09-21 07:34:02

Skurbert
Member
Registered: 2012-12-16
Post 81/95

Re: Creating a working Town Map item!

comet wrote:
; 0xee55 (3:6e55)
    ld a, $24
    ld hl, $5a4f
    rst $08
    ret

All you need to do is change $5a4f to $588a.

Good job! I expected it to be some faulty in the ASM-routine. Gotta mess around with it and see if I can get it to work.

It could be useful at the early stages of the game when the Pokegear is incomplete. It could, perhaps, be used as a map for Kanto, when in Johto. Should be able to tweak it around a bit to suite the needs. Sadly, my knowledge is a bit limited at the moment, but I'm still full of ideas.

Last edited by Skurbert (2014-09-21 07:35:05)

Offline

Board footer

Powered by FluxBB