You are not logged in.
Pages: 1
So I'm tinkering with Red/Blue and adding my trainers and...the bank for the trainer images is pretty well eaten up. And the code to load the pics is pretty specific. And I wager someone else has done this, but the forums have been a great help to me indeed and if I can help someone else with a snippet so be it ^_^
_LoadTrainerPic: ; 3f04b (f:704b)
; wd033-wd034 contain pointer to pic
ld a, [wd033]
ld e, a
ld a, [wd034]
ld d, a ; de contains pointer to trainer pic
ld a, [W_ISLINKBATTLE]
and a
ld a,[W_TRAINERCLASS]
ld b,a
cp $30 ;LANCE + 1, though using "LANCE + 1" didn't seem to want to work for me...
ld a, Bank(TrainerPics) ; this is where all the trainer pics are (not counting Red's)
jr c, .loadSprite
cp $FF ;END OF POTENTIAL ENTRIES
ld a, Bank(NewTrainerPics)
jr c, .loadSprite
ld a, Bank(RedPicFront)
.loadSprite
This belongs in "engine/battle/core.asm" and just updates the _LoadTrainerPic routine. All it really is is a tweak of the original Pokemon image loading code; it was good enough there for the basic monsters, it works just as nicely here because there shouldn't be that many more trainer classes added.
Whereever you add your new trainer pics, use the tag/title "NewTrainerPics::" or change that line in my code to reflect something appropriate for yours. I made a new bank at $22 for my trainer pics~
Enjoy!!
Last edited by daMoose52 (2014-12-14 07:53:55)
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
What do you mean "LANCE + 1" didn't seem to want to work?
Offline
Exactly that; LANCE + 1 didn't see to work for me. The raw number worked so, yay for that, but for whatever reason LANCE + 1 didn't.
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
There's no reason it wouldn't work.
What error did it give you?
Offline
Murphey's Law of code; when asked for a bug report for code for which a work around was used, the original path will work flawlessly. Updated and it worked great.
Pokemon: Project Neo A Pokemon hack 15 years in the making...
Offline
Please help me! How to switch NPC trainer flag,i wanna change my player with Gary's flag sprite
Yeah! Am I great or what?
By: AF Initial
Offline
Pages: 1