You are not logged in.
Pages: 1
I've been running into an odd problem today while working with Pokered. All new attacks I've added after $C3 load HM01, HM02, etc for their name instead of the name that is in the list. Everything else about the attack works properly though. Is there some limiter on the amount of attack names that can be read? I'm currently looking for it myself, but I thought I would go ahead and ask while I'm looking into it in case someone already knows.
EDIT: After looking into it, I am even more confused.
GetMoveName:: ; 3058 (0:3058)
push hl
ld a,MOVE_NAME
ld [W_LISTTYPE],a
ld a,[wd11e]
ld [wd0b5],a
ld a,BANK(MoveNames)
ld [wPredefBank],a
call GetName
ld de,wcd6d ; pointer to where move name is stored in RAM
pop hl
ret
This seems to be the function called to show a move's name, and I see nothing resembling a limiter. I also haven't been getting any errors on compile to indicate that the list of names is overflowing the bank or anything.
Last edited by Luna (2014-10-15 02:39:48)
I am not very active on this forum. I only pop in from time to time.
Offline
Take a look at the GetName function. It has a check for the id being greater than or equal to $C4.
GetName:: ; 376b (0:376b)
; arguments:
; [$D0B5] = which name
; [$D0B6] = which list (W_LISTTYPE)
; [$D0B7] = bank of list
;
; returns pointer to name in de
ld a,[$d0b5]
ld [$d11e],a
cp a,$C4 ;it's TM/HM
jp nc,GetMachineName
You want something like this:
GetName:: ; 376b (0:376b)
; arguments:
; [$D0B5] = which name
; [$D0B6] = which list (W_LISTTYPE)
; [$D0B7] = bank of list
;
; returns pointer to name in de
ld a, [W_LISTTYPE]
cp MOVE_NAME
ld a,[$d0b5]
ld [$d11e],a
jr z, .nonMachine
cp a,$C4 ;it's TM/HM
jp nc,GetMachineName
Last edited by ShantyTown (2014-10-15 02:56:52)
My hacks: Pokémon Maize, Pokémon Red: Battle Factory
Offline
Awesome, thanks man. That fixed it right up.
I am not very active on this forum. I only pop in from time to time.
Offline
Use ITEM_NAME/nz so this doesn't happen with monster names either.
Offline
Good call. Thanks comet.
I am not very active on this forum. I only pop in from time to time.
Offline
hmm i want you to use hex editor and repoint the name to change it without limit like i change to pokedex that i learn from piacarrot
the offsets of tm/hm technique in rom is 0x011A66-0x011AA2
try itmy hack:
http://pokemonhackersonline.com/attachm … 1413321120
I'm honestly not sure what you were trying to say here. I can't tell if you were telling me I should use a hex editor, or if you were asking how you could do it in a hex editor. If you were telling me to, thanks but I already have it sorted out. If you were asking how to do it, I'm honestly not sure where the routines are in an already compiled rom, and you would have to edit the ASM routine we were talking about in addition to repointing the table.
I am not very active on this forum. I only pop in from time to time.
Offline
Bumping this old thread to point out that apparently the fix we came up with causes its own set of problems, where TMs will sometimes just crash the game when you click on them, before the Use/Toss menu even comes up. It seems that TM/HMs manage to load this routine without actually having a meaningful value loaded as the list type, which is why the TM/HM check is the very first thing it does. Been looking into potential workarounds with Crystal_, but I wanted to bring this up since it seems like an issue that could have an impact on other people as well.
Last edited by Luna (2016-01-07 05:15:44)
I am not very active on this forum. I only pop in from time to time.
Offline
Pages: 1