Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#51 2019-02-14 22:48:33

ayxelsid
Member
Registered: 2019-02-14
Post 2/19

Re: A Tutorial for Adding New Pokémon in Pokered

Wow thank you! I'm going to go through this right now

It was 197 for me because I preserved the Fossil and Ghost spaces. Wasn't sure if those could safely be written over without affecting the game

Offline

#52 2019-02-14 23:54:00

ayxelsid
Member
Registered: 2019-02-14
Post 3/19

Re: A Tutorial for Adding New Pokémon in Pokered

I followed everything and got this error

"error: Unable to place 'Main' (ROM0 section) at $150"

Do you think there's something I messed up on?

Offline

#53 2019-02-15 01:22:02

Mateo
Member
Registered: 2009-11-25
Post 3,585/3,631

Re: A Tutorial for Adding New Pokémon in Pokered

sounds like you are gonna have to move stuff around in home. That was what moving the farcopy routines around were for in that commit, but yours might be different. try putting that back how it was


I am no longer active on this forum. I only pop in from time to time.

Offline

#54 2019-02-15 03:02:23

ayxelsid
Member
Registered: 2019-02-14
Post 4/19

Re: A Tutorial for Adding New Pokémon in Pokered

Yup that was it, I moved FarCopyData3 into copy.asm as well and it works perfectly

Thank you so much!

Offline

#55 2019-02-15 05:06:13

Mateo
Member
Registered: 2009-11-25
Post 3,586/3,631

Re: A Tutorial for Adding New Pokémon in Pokered

You're welcome! Glad I could help.


I am no longer active on this forum. I only pop in from time to time.

Offline

#56 2019-03-02 04:10:59

ayxelsid
Member
Registered: 2019-02-14
Post 7/19

Re: A Tutorial for Adding New Pokémon in Pokered

Mateo wrote:

If you look here and copy what I did for Rangi, this should fix the issue of Pokemon above C8 (which is 200 not 197 btw) being treated as trainer classes. It will also fix related issues due to name lists assuming any ID above a certain value is supposed to be a TM or HM, even non-item lists.

https://github.com/Rangi42/redstarblues … 4328e288c6


I was attempting to add many new trainer classes at once but I started to get the error "Expression must be 8-bit" when using OPP_NEWTRAINER.

I realized that Lance is still at $F7 even though it is labeled as $2F in my copy of Pokered, so I was only able to add 8 new trainer classes. Is there a similar solution for trainers?

Offline

#57 2019-03-02 08:21:35

Mateo
Member
Registered: 2009-11-25
Post 3,593/3,631

Re: A Tutorial for Adding New Pokémon in Pokered

After the above fix, trainers still started at 200, but they don't have to. I don't have a commit handy to show what all you would need to do though. There should not be much left that would need changing after that though. There's probably just one or two more instances where it subtracts 200 for the ID from trainers which you'd just need to remove, and then adjust the trainer const macro so that OPP_(trainer name here) doesn't start counting from 200 (or do it the long way and manually change every instance of a trainer class to not use the OPP_ prefix). I'll look into it when I have the chance.


I am no longer active on this forum. I only pop in from time to time.

Offline

#58 2019-03-02 23:09:54

ayxelsid
Member
Registered: 2019-02-14
Post 8/19

Re: A Tutorial for Adding New Pokémon in Pokered

I think I got it to work doing what you said. So far so good anyway. I made these changes. Thanks again for your help!


\engine\battle\core.asm

InitBattleCommon:
ld a, [wMapPalOffset]
push af
ld hl, wLetterPrintingDelayFlags
ld a, [hl]
push af
res 1, [hl]
callab InitBattleVariables
ld a, [wIsTrainerBattle]
and a
jp z, InitWildBattle
ld a, [wEnemyMonSpecies2]
sub 0
ld [wTrainerClass], a
call GetTrainerInformation
callab ReadTrainer
call DoBattleTransitionAndInitBattleVariables
call _LoadTrainerPic
xor a
ld [wEnemyMonSpecies2], a
ld [hStartTileID], a
dec a
ld [wAICount], a
coord hl, 12, 0
predef CopyUncompressedPicToTilemap
ld a, $ff
ld [wEnemyMonPartyPos], a
ld a, $2
ld [wIsInBattle], a
jp _InitBattleCommon


\constants\trainer_constants.asm

trainer_const: MACRO
\1     EQU const_value
OPP_\1 EQU const_value + 0
const_value = const_value + 1
ENDM


\engine\battle\read_trainer_party.asm

; get the pointer to trainer data for this class
ld a, [wCurOpponent]
sub $01 ; convert value from pokemon to trainer
add a
ld hl, TrainerDataPointers
ld c, a
ld b, 0
add hl, bc ; hl points to trainer class
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [wTrainerNo]
ld b, a

; get trainer class number
ld a, [wCurOpponent]
sub 0
ld b, a
ld hl, TeamMoves

Offline

#59 2019-03-02 23:44:34

Mateo
Member
Registered: 2009-11-25
Post 3,594/3,631

Re: A Tutorial for Adding New Pokémon in Pokered

Those "sub 0" lines are pointless, you should just take them out. Also "sub $01" could be replaced with "dec a". Also, the "+ 0" is pointless in the trainer const macro, you could just leave it as saying const_value.


I am no longer active on this forum. I only pop in from time to time.

Offline

#60 2019-03-04 02:06:22

ayxelsid
Member
Registered: 2019-02-14
Post 9/19

Re: A Tutorial for Adding New Pokémon in Pokered

Ahh yeah I was being cautious since I don't exactly know what I'm doing, made those adjustments and its still working fine

Offline

#61 2019-05-14 09:18:34

chef93
New member
Registered: 2019-05-14
Post 1/1

Re: A Tutorial for Adding New Pokémon in Pokered

I've been following this guide to a tee, and I added a 152nd Pokemon just fine.

When I go to add a 153rd though everything works but the front sprite.

I have tried following the Glaceon edit and the Uncompress Sprite edits, but each still give me missingno sprites for my 153rd mon.

Please help me if you can :D

Offline

Board footer

Powered by FluxBB