Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2018-08-01 18:33:17

Theohmguy
Member
Registered: 2016-07-06
Post 19/21

(Pokered) Added mons occupying Trainer IDs

I am having problems to add new pokemon in Pokered. After $C9, the added mons are occupying the IDs of the trainers, when I try to find them in the wild, a random trainer battle begin. Can someone help me to fix that?

Offline

#2 2018-08-04 15:05:41

Danny-E 33
Administrator
Registered: 2012-06-09
Post 1,103/1,119

Re: (Pokered) Added mons occupying Trainer IDs

The game assumes that opponent IDs less than 200 ($C8) are Pokemon, and opponent IDs greater than or equal to 200 are trainers.
To remove this, you need a new way to manage opponent IDs. For example, allow both lists of IDs to start at 1, then have a flag somewhere that is set for trainer battles and not set for wild battles, or something similar.
To get an idea of the places of code that you need to edit, look around the disassembly for 'cp 200' and 'sub 200', and look at places where 'wCurOpponent' is written to and read from.
Other memory locations to take a look at are 'wEnemyMonOrTrainerClass', 'wEnemyMonSpecies2', and 'wTrainerClass'

Offline

#3 2018-08-04 20:15:14

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,559/3,578

Re: (Pokered) Added mons occupying Trainer IDs

In Red++, I did this by borrowing the code Sanqui used in his red randomizer. One of these days I'll get around to adapting that to a modern copy of pokered for people to use if they want, since the existing commits are for a copy of pokered that is like 4 years outdated at this point haha. Not sure when I'll get a chance to do that, but I'll try to soon.

Offline

#4 2018-08-11 20:11:24

Camerupt
New member
Registered: 2017-01-03
Post 2/3

Re: (Pokered) Added mons occupying Trainer IDs

I also started working on doing this by trying to port over Mateo's RPP implementation, so far it seems I've hunted down and set up everything required to make the "wIsTrainerBattle" system work including the new files for pic pointers and such, but any time I try to start a battle it leads to a crash making me think there's mabye a problem in the battle initialization at battle_transitions.asm or at battle/core.asm at InitBattleCommon.

Any leads would be great, I can upload my stuff if need be too.

Offline

Board footer

Powered by FluxBB