Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#26 2015-10-26 03:35:21

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

Re: [Pokered] Adding Gender Selection

Fotomac wrote:

Problem appears to be solved; it would appear the Notepad save changed the font to MS Mincho (which I am guessing Cygwin or rgblink or whatever stumbled across the error didn't recognize), so I changed it back to Courier New and saved; the "Unknown symbol 'PlayMusic'" error didn't appear after that, so it would appear Notepad was the responsible party.

The font shouldn't make a difference since that isn't even saved as part of a text file, but I'm glad it is working for you, even if it still doesn't make sense why it happened.


megamctaco wrote:

Made those changes you suggested and now I'm getting a "Value must be 8-bit" when I changed wd798 to wPlayerGender.

I tried changing that to [wPlayerGender] and got a syntax error.



If you just search/replace wd798 with wPlayerGender (so it is in brackets where I had it in brackets, and not in brackets where I had it not in brackets) then it should work the same as the original routine did. All you are doing is changing the name of the variable it is looking for. The routine itself shouldn't have any issues with that being the only change. Where exactly are you getting this error? If you are trying to do something like:

ld a, wPlayerGender

then that won't work because it is trying to load 2 bytes into a

if it was:

ld a [wPlayerGender]

that might be the syntax error, because it expects a comma between a and the address. so it should be:

ld a, [wPlayerGender]

for example.





Can I see how your code looks while you're trying to fix it? I know I really need to update this tutorial when I get the chance but I could help you out more if I saw what you were trying to do. No sense in making a commit when it isn't working yet, you could just put your changes to that routine on pastebin since the error seems to be localized to oak_speech.asm I'm guessing.

Offline

#27 2015-10-26 03:47:30

Fotomac
Member
Registered: 2015-10-25
Post 10/332

Re: [Pokered] Adding Gender Selection

I too am getting syntax errors. The specific error:

red/main.asm(2) -> main.asm(598) -> engine/oak_speech.asm(94) :
syntax error

Offline

#28 2015-10-26 03:52:49

megamctaco
Member
Registered: 2015-08-23
Post 59/129

Re: [Pokered] Adding Gender Selection

Mateo wrote:

If you just search/replace wd798 with wPlayerGender (so it is in brackets where I had it in brackets, and not in brackets where I had it not in brackets) then it should work the same as the original routine did.

That fixed it. The first wPlayerGender (or wd798) didn't have brackets but the rest did. Cheers!

I can compile Red, but when I try to compile Blue it says "Unknown Symbol 'GetDefaultName'"... Which is strange because it works with Red.

oak_speech2.asm

.namestring ; 6aa3 (1:6aa3)
    db "NAME@"

IF DEF(_RED)
IF _RED
DefaultNamesPlayer: ; 6aa8 (1:6aa8)
    db   "NEW NAME"
    next "RED"
    next "ASH"
    next "JACK"
    db   "@"
    
DefaultNamesGirl:
    db   "NEW NAME"
    next "GREEN"
    next "LAYLA"
    next "NICOLE"
    db   "@"

DefaultNamesRival: ; 6abe (1:6abe)
    db   "NEW NAME"
    next "BLUE"
    next "GARY"
    next "JOHN"
    db   "@"
ENDC

IF DEF(_BLUE)
DefaultNamesPlayer: ; 6aa8 (1:6aa8)
    db   "NEW NAME"
    next "BLUE"
    next "GARY"
    next "JOHN"
    db   "@"

DefaultNamesGirl:
    db   "NEW NAME"
    next "GREEN"
    next "LAYLA"
    next "NICOLE"
    db   "@"    
    
DefaultNamesRival: ; 6abe (1:6abe)
    db   "NEW NAME"
    next "RED"
    next "ASH"
    next "JACK"
    db   "@"
ENDC

IF DEF(_YELLOW)
DefaultNamesPlayer:
    db   "NEW NAME"
    next "YELLOW"
    next "ASH"
    next "JACK"
    db   "@"

DefaultNamesRival:
    db   "NEW NAME"
    next "BLUE"
    next "GARY"
    next "JOHN"
    db   "@"
ENDC

Offline

#29 2015-10-26 04:01:20

megamctaco
Member
Registered: 2015-08-23
Post 60/129

Re: [Pokered] Adding Gender Selection

And adding the fishing tiles to player_animations.asm, I get the ROMX error for BANK $1C. What do you suggest moving out of that bank?

RedFishingTiles: ; 70866 (1c:4866)
    dw RedFishingTilesFront
    db 2, BANK(RedFishingTilesFront)
    dw vNPCSprites + $20

    dw RedFishingTilesBack
    db 2, BANK(RedFishingTilesBack)
    dw vNPCSprites + $60

    dw RedFishingTilesSide
    db 2, BANK(RedFishingTilesSide)
    dw vNPCSprites + $a0

    dw RedFishingRodTiles
    db 3, BANK(RedFishingRodTiles)
    dw vNPCSprites2 + $7d0
    
GreenFishingTiles: ; newly added table of Green's sprites
    dw GreenFishingTilesFront
    db 2, BANK(GreenFishingTilesFront)
    dw vNPCSprites + $20

    dw GreenFishingTilesBack
    db 2, BANK(GreenFishingTilesBack)
    dw vNPCSprites + $60

    dw GreenFishingTilesSide
    db 2, BANK(GreenFishingTilesSide)
    dw vNPCSprites + $a0

    dw RedFishingRodTiles
    db 3, BANK(RedFishingRodTiles)
    dw vNPCSprites2 + $7d0

Offline

#30 2015-10-26 04:13:43

Fotomac
Member
Registered: 2015-10-25
Post 11/332

Re: [Pokered] Adding Gender Selection

I believe I made it through Step 3 this time around, but this time, I got the following errors:

red/main.asm(2) -> main.asm(15) -> home.asm(746) :
'TangelaPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(750) :
'MoltresPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(754) :
'BeedrillPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(758) :
'StarmiePicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(760) :
'VictreebelPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(919) -> home/init.asm(100) :
'SFX_Shooting_Star' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(1385) :
'DisplayBattleMenu' not defined
red/main.asm(2) -> main.asm(598) -> engine/oak_speech.asm(159) :
'Music_PalletTown' not defined

How did they suddenly become "not defined"?

In any case, I can't be sure I've passed Step 3 until this is cleared up.

Offline

#31 2015-10-26 04:19:35

megamctaco
Member
Registered: 2015-08-23
Post 61/129

Re: [Pokered] Adding Gender Selection

Fotomac wrote:

I believe I made it through Step 3 this time around, but this time, I got the following errors:

red/main.asm(2) -> main.asm(15) -> home.asm(746) :
'TangelaPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(750) :
'MoltresPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(754) :
'BeedrillPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(758) :
'StarmiePicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(760) :
'VictreebelPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(919) -> home/init.asm(100) :
'SFX_Shooting_Star' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(1385) :
'DisplayBattleMenu' not defined
red/main.asm(2) -> main.asm(598) -> engine/oak_speech.asm(159) :
'Music_PalletTown' not defined

How did they suddenly become "not defined"?

In any case, I can't be sure I've passed Step 3 until this is cleared up.

I think you moved something out or main.asm or home.asm that you shouldn't have.

Offline

#32 2015-10-26 04:24:26

Fotomac
Member
Registered: 2015-10-25
Post 12/332

Re: [Pokered] Adding Gender Selection

megamctaco wrote:
Fotomac wrote:

I believe I made it through Step 3 this time around, but this time, I got the following errors:

red/main.asm(2) -> main.asm(15) -> home.asm(746) :
'TangelaPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(750) :
'MoltresPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(754) :
'BeedrillPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(758) :
'StarmiePicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(760) :
'VictreebelPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(919) -> home/init.asm(100) :
'SFX_Shooting_Star' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(1385) :
'DisplayBattleMenu' not defined
red/main.asm(2) -> main.asm(598) -> engine/oak_speech.asm(159) :
'Music_PalletTown' not defined

How did they suddenly become "not defined"?

In any case, I can't be sure I've passed Step 3 until this is cleared up.

I think you moved something out or main.asm or home.asm that you shouldn't have.

I'm not sure I did. Anyway, after some investigation, I think I know what Tangela, Moltres, Beedrill, Starmie, and Victreebel all have in common: they're all the last Pokémon in their respective banks.

Offline

#33 2015-10-26 04:43:00

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

Re: [Pokered] Adding Gender Selection

megamctaco wrote:
Mateo wrote:

If you just search/replace wd798 with wPlayerGender (so it is in brackets where I had it in brackets, and not in brackets where I had it not in brackets) then it should work the same as the original routine did.

That fixed it. The first wPlayerGender (or wd798) didn't have brackets but the rest did. Cheers!

I can compile Red, but when I try to compile Blue it says "Unknown Symbol 'GetDefaultName'"... Which is strange because it works with Red.

oak_speech2.asm

.namestring ; 6aa3 (1:6aa3)
    db "NAME@"

IF DEF(_RED)
IF _RED
DefaultNamesPlayer: ; 6aa8 (1:6aa8)
    db   "NEW NAME"
    next "RED"
    next "ASH"
    next "JACK"
    db   "@"
    
DefaultNamesGirl:
    db   "NEW NAME"
    next "GREEN"
    next "LAYLA"
    next "NICOLE"
    db   "@"

DefaultNamesRival: ; 6abe (1:6abe)
    db   "NEW NAME"
    next "BLUE"
    next "GARY"
    next "JOHN"
    db   "@"
ENDC

IF DEF(_BLUE)
DefaultNamesPlayer: ; 6aa8 (1:6aa8)
    db   "NEW NAME"
    next "BLUE"
    next "GARY"
    next "JOHN"
    db   "@"

DefaultNamesGirl:
    db   "NEW NAME"
    next "GREEN"
    next "LAYLA"
    next "NICOLE"
    db   "@"    
    
DefaultNamesRival: ; 6abe (1:6abe)
    db   "NEW NAME"
    next "RED"
    next "ASH"
    next "JACK"
    db   "@"
ENDC

IF DEF(_YELLOW)
DefaultNamesPlayer:
    db   "NEW NAME"
    next "YELLOW"
    next "ASH"
    next "JACK"
    db   "@"

DefaultNamesRival:
    db   "NEW NAME"
    next "BLUE"
    next "GARY"
    next "JOHN"
    db   "@"
ENDC

It looks like you are using two different methods for checking for Red, and only one for Blue. I'm honestly not sure which syntax is the proper one for your version, but I know you have both an older and newer way of defining the Red Version branch, and only one way of defining Blue, which might be where the problems are coming in.

megamctaco wrote:

And adding the fishing tiles to player_animations.asm, I get the ROMX error for BANK $1C. What do you suggest moving out of that bank?

RedFishingTiles: ; 70866 (1c:4866)
    dw RedFishingTilesFront
    db 2, BANK(RedFishingTilesFront)
    dw vNPCSprites + $20

    dw RedFishingTilesBack
    db 2, BANK(RedFishingTilesBack)
    dw vNPCSprites + $60

    dw RedFishingTilesSide
    db 2, BANK(RedFishingTilesSide)
    dw vNPCSprites + $a0

    dw RedFishingRodTiles
    db 3, BANK(RedFishingRodTiles)
    dw vNPCSprites2 + $7d0
    
GreenFishingTiles: ; newly added table of Green's sprites
    dw GreenFishingTilesFront
    db 2, BANK(GreenFishingTilesFront)
    dw vNPCSprites + $20

    dw GreenFishingTilesBack
    db 2, BANK(GreenFishingTilesBack)
    dw vNPCSprites + $60

    dw GreenFishingTilesSide
    db 2, BANK(GreenFishingTilesSide)
    dw vNPCSprites + $a0

    dw RedFishingRodTiles
    db 3, BANK(RedFishingRodTiles)
    dw vNPCSprites2 + $7d0

Hmm, I'm trying to remember what I would have moved out of there. Comparing my main.asm to the master, the only difference in INCLUDE lines is the fact that I still have INCLUDE "engine/battle/1c.asm" whereas the master has that broken up into "engine/battle/ghost_marowak_anim.asm" and "engine/battle/battle_transitions.asm"

Do you have anything extra that you've added to that bank? Like maybe included some sprites or something in there? Also, as for the tiles themselves that the routine loads, I have red's fishing tiles in bank 1E and green's fishing tiles ended up in bank 2F. I didn't put any of them in bank 1C with the routine itself.

Offline

#34 2015-10-26 04:52:45

megamctaco
Member
Registered: 2015-08-23
Post 62/129

Re: [Pokered] Adding Gender Selection

Green's fishing tiles are in:

SECTION "Pics 2", ROMX, BANK[PICS_2]

IF GEN_2_GRAPHICS
HaunterPicFront:    INCBIN "pic/gsmon/haunter.pic"
HaunterPicBack:     INCBIN "pic/gsmonback/haunterb.pic"
AbraPicFront:       INCBIN "pic/gsmon/abra.pic"
AbraPicBack:        INCBIN "pic/gsmonback/abrab.pic"
AlakazamPicFront:   INCBIN "pic/gsmon/alakazam.pic"
AlakazamPicBack:    INCBIN "pic/gsmonback/alakazamb.pic"
PidgeottoPicFront:  INCBIN "pic/gsmon/pidgeotto.pic"
PidgeottoPicBack:   INCBIN "pic/gsmonback/pidgeottob.pic"
PidgeotPicFront:    INCBIN "pic/gsmon/pidgeot.pic"
PidgeotPicBack:     INCBIN "pic/gsmonback/pidgeotb.pic"
StarmiePicFront:    INCBIN "pic/gsmon/starmie.pic"
StarmiePicBack:     INCBIN "pic/gsmonback/starmieb.pic"
RedPicBack:         INCBIN "pic/gstrainer/redb.pic"
GreenPicBack:       INCBIN "pic/trainer/greenb.pic"
OldManPic:          INCBIN "pic/gstrainer/oldman.pic"
GreenFishingTilesFront: INCBIN "gfx/green_fishing_tile_front.2bpp"
GreenFishingTilesBack:  INCBIN "gfx/green_fishing_tile_back.2bpp"
GreenFishingTilesSide:  INCBIN "gfx/green_fishing_tile_side.2bpp"

$1C has:

SECTION "bank1C",ROMX,BANK[$1C]

INCLUDE "engine/gamefreak.asm"
INCLUDE "engine/hall_of_fame.asm"
INCLUDE "engine/overworld/healing_machine.asm"
INCLUDE "engine/overworld/player_animations.asm"
INCLUDE "engine/battle/ghost_marowak_anim.asm"
INCLUDE "engine/battle/battle_transitions.asm"
INCLUDE "engine/town_map.asm"
INCLUDE "engine/mon_party_sprites.asm"
INCLUDE "engine/in_game_trades.asm"
INCLUDE "engine/palettes.asm"
INCLUDE "engine/save.asm"
 
BlackTile:
    REPT 16
    db $ff
    ENDR
BlackTileEnd:

And $1E has:

SECTION "bank1E",ROMX,BANK[$1E]

INCLUDE "engine/battle/animations.asm"

INCLUDE "engine/overworld/cut2.asm"

INCLUDE "engine/overworld/ssanne.asm"

RedFishingTilesFront: INCBIN "gfx/red_fishing_tile_front.2bpp"
RedFishingTilesBack:  INCBIN "gfx/red_fishing_tile_back.2bpp"
RedFishingTilesSide:  INCBIN "gfx/red_fishing_tile_side.2bpp"
RedFishingRodTiles:   INCBIN "gfx/red_fishingrod_tiles.2bpp"

INCLUDE "data/animations.asm"

INCLUDE "engine/evolution.asm"

INCLUDE "engine/overworld/elevator.asm"

INCLUDE "engine/items/tm_prices.asm"

    nop
    nop
 
; Actually this doesn't do everything needed to spriteify
; It copies the tiles and the palette of the player pokemon.
SpriteifyPlayerPokemon:
    ld de,vBackPic
    ld hl,vSprites
    ld bc,7*7
    call CopyVideoData

    ld a,2
    ld [rSVBK],a
    ld hl, W2_BgPaletteData
    ld de, W2_SprPaletteData
    ld bc, 8
    call CopyData

    ld a,1
    ld [W2_LastOBP0],a

    xor a
    ld [rSVBK],a
    ret

; HAX
INCLUDE "color/color.asm"

; Inserted pokemon images go here

I noticed I had:

IF DEF(_RED)
IF _RED

in oak_speech2.asm whereas Blue only has "IF DEF(_BLUE)"

If I take either of the IF RED lines out, it won't compile. I get a "Unterminated IF contruct (-1 levels)!" error.

Offline

#35 2015-10-26 05:02:55

Fotomac
Member
Registered: 2015-10-25
Post 13/332

Re: [Pokered] Adding Gender Selection

I'd like to know: of all 151 Pokémon, why are Tangela, Moltres, Beedrill, Starmie, and Victreebel not defined? Also, what happened to the definitions of SFX_Shooting_Star, DisplayBattleMenu, and Music_PalletTown? Mateo, did you read the error messages from my last compiling attempt, which came from those eight lacking definitions?

Offline

#36 2015-10-26 05:06:09

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

Re: [Pokered] Adding Gender Selection

Well, I have no idea what that

BlackTile:
    REPT 16
    db $ff
    ENDR
BlackTileEnd:

nonsense is about, that isn't in mine or the master pokered. Also, you seem to have some rather interesting stuff added in bank 1E that I'm not familiar with. I'm guesing you must be using some other fork as a base that I'm not familiar with.


Also, it should only be
IF DEF(_RED)

the IF _RED shouldn't be there, looking at the way the master pokered source does things. However, if yours is expecting the IF _RED format instead of  IF DEF(_RED), maybe you should add IF_BLUE in there as well. I'm pretty sure IF _RED and IF _BLUE are the old style that was replaced by IF DEF(_RED). Since it looks like you are using some other fork as a base, I have no idea which one it is and how up-to-date it is, and so I'm just honestly not sure what to say. That also makes it harder for me to tell you what to move around in those banks, since I'm assuming part of the problem you're having is going to be that whatever base you're using might have added some extra stuff in there by expanding some other existing routines and that might be conflicting with what we need to do to get this working.

Last edited by Mateo (2015-10-26 05:08:24)

Offline

#37 2015-10-26 05:11:09

Fotomac
Member
Registered: 2015-10-25
Post 14/332

Re: [Pokered] Adding Gender Selection

Well, do you have any idea what this

red/main.asm(2) -> main.asm(15) -> home.asm(746) :
'TangelaPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(750) :
'MoltresPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(754) :
'BeedrillPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(758) :
'StarmiePicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(760) :
'VictreebelPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(919) -> home/init.asm(100) :
'SFX_Shooting_Star' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(1385) :
'DisplayBattleMenu' not defined
red/main.asm(2) -> main.asm(598) -> engine/oak_speech.asm(159) :
'Music_PalletTown' not defined

nonsense is about?

Offline

#38 2015-10-26 05:12:22

megamctaco
Member
Registered: 2015-08-23
Post 63/129

Re: [Pokered] Adding Gender Selection

Mateo wrote:

Also, it should only be
IF DEF(_RED)

the IF _RED shouldn't be there, looking at the way the master pokered source does things. However, if yours is expecting the IF _RED format instead of  IF DEF(_RED), maybe you should add IF_BLUE in there as well. I'm pretty sure IF _RED and IF _BLUE are the old style that was replaced by IF DEF(_RED). Since it looks like you are using some other fork as a base, I have no idea which one it is and how up-to-date it is, and so I'm just honestly not sure what to say. That also makes it harder for me to tell you what to move around in those banks, since I'm assuming part of the problem you're having is going to be that whatever base you're using might have added some extra stuff in there by expanding some other existing routines and that might be conflicting with what we need to do to get this working.

The fork is Danny-E 33's gen II graphics depository.

I think I may have accidentally pasted IF _RED into it from this tutorial, and now it's messed it up somehow, since it definitely wasn't there before.

Adding IF _BLUE doesn't work either.

Last edited by megamctaco (2015-10-26 05:18:22)

Offline

#39 2015-10-26 05:17:40

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

Re: [Pokered] Adding Gender Selection

megamctaco wrote:
Mateo wrote:

Also, it should only be
IF DEF(_RED)

the IF _RED shouldn't be there, looking at the way the master pokered source does things. However, if yours is expecting the IF _RED format instead of  IF DEF(_RED), maybe you should add IF_BLUE in there as well. I'm pretty sure IF _RED and IF _BLUE are the old style that was replaced by IF DEF(_RED). Since it looks like you are using some other fork as a base, I have no idea which one it is and how up-to-date it is, and so I'm just honestly not sure what to say. That also makes it harder for me to tell you what to move around in those banks, since I'm assuming part of the problem you're having is going to be that whatever base you're using might have added some extra stuff in there by expanding some other existing routines and that might be conflicting with what we need to do to get this working.

The fork is Danny-E 33's gen II graphics depository.

I think I may have accidentally pasted IF _RED into it from this tutorial, and now it's messed it up somehow, since it definitely wasn't there before.

Guess I'll need to work this out after all then. I was actually just talking with him earlier about including Gender Selection in an optional branch of his base. So I guess I would have been working out this problem sooner or later. I'll try to poke around in his source tomorrow after class and see what I can work out that might be causing this.


Fotomac wrote:

Well, do you have any idea what this

red/main.asm(2) -> main.asm(15) -> home.asm(746) :
'TangelaPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(750) :
'MoltresPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(754) :
'BeedrillPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(758) :
'StarmiePicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(760) :
'VictreebelPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(919) -> home/init.asm(100) :
'SFX_Shooting_Star' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(1385) :
'DisplayBattleMenu' not defined
red/main.asm(2) -> main.asm(598) -> engine/oak_speech.asm(159) :
'Music_PalletTown' not defined

nonsense is about?


Well, in this, it's telling you the file and the individual line it had a problem with. I would start by going there and trying to see if anything looked wrong there.

Offline

#40 2015-10-26 05:23:43

Fotomac
Member
Registered: 2015-10-25
Post 15/332

Re: [Pokered] Adding Gender Selection

Mateo wrote:
Fotomac wrote:

Well, do you have any idea what this

red/main.asm(2) -> main.asm(15) -> home.asm(746) :
'TangelaPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(750) :
'MoltresPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(754) :
'BeedrillPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(758) :
'StarmiePicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(760) :
'VictreebelPicFront' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(919) -> home/init.asm(100) :
'SFX_Shooting_Star' not defined
red/main.asm(2) -> main.asm(15) -> home.asm(1385) :
'DisplayBattleMenu' not defined
red/main.asm(2) -> main.asm(598) -> engine/oak_speech.asm(159) :
'Music_PalletTown' not defined

nonsense is about?


Well, in this, it's telling you the file and the individual line it had a problem with. I would start by going there and trying to see if anything looked wrong there.

That's pretty much all it tells me. However, on looking at engine/oak_speech.asm, I noticed that there isn't a bank number next to BANK(Music_PalletTown), whereas there was one next to each of the other visible bank lines. Could that have anything to do with it?

Offline

#41 2015-10-26 05:57:30

megamctaco
Member
Registered: 2015-08-23
Post 64/129

Re: [Pokered] Adding Gender Selection

So I started again from the oak_speech part of the tutorial, and made sure to NOT copy+paste everything in the tutorial to avoid things such as "call OakSpeechSlidePicLeft" being written as " call IntroPredef3B", among other things.

It still wouldn't compile, until I realised I had 2 lines of "ENDC", which is why Blue wasn't compiling. I've fixed that issue now and the intro works perfectly for both versions.

EDIT: Well now that I'm basically back to where I was before (although much, much smoother and cleaner)... ROMX error for $1C is still happening.

player_animations.asm

FishingAnim: ; 707b6 (1c:47b6)
    ld c, 10
    call DelayFrames
    ld hl, wd736
    set 6, [hl] ; reserve the last 4 OAM entries
    ld a, [wPlayerGender] ; added gender check
    bit 2, a      ; added gender check
    jr z, .BoySpriteLoad
    ld de, GreenSprite
    ld hl, vNPCSprites
    ld bc, (BANK(GreenSprite) << 8) + $0c
    jr .KeepLoadingSpriteStuff
.BoySpriteLoad
    ld de, RedSprite ; $4180
    ld hl, vNPCSprites
    ld bc, (BANK(RedSprite) << 8) + $0c
.KeepLoadingSpriteStuff
    call CopyVideoData
    ld a, [wPlayerGender] ; added gender check
    bit 2, a      ; added gender check
    jr z, .BoyTiles ; skip loading Green's stuff if you're Red
    ld a, $4
    ld hl, GreenFishingTiles
    jr .ContinueRoutine ; go back to main routine after loading Green's stuff
.BoyTiles ; alternately, load Red's stuff
    ld a, $4
    ld hl, RedFishingTiles
.ContinueRoutine
    call LoadAnimSpriteGfx

Is the "FishingAnim: ; 707b6 (1c:47b6)" causing problems seeing as Red fishing tiles are in $1E and Green fishing tiles are in SECTION "Pics 2", ROMX, BANK[PICS_2]

PS. I've done the coding for player_animations.asm and overworld.asm (perfectly, I believe). Just in case anyone was wondering where I am up to.

I've tried moving both Red and Green fishing tiles to different banks and nothing seems to work.

Last edited by megamctaco (2015-10-26 06:25:58)

Offline

#42 2015-10-26 09:17:53

Fotomac
Member
Registered: 2015-10-25
Post 16/332

Re: [Pokered] Adding Gender Selection

Now that I was finally able to insert the female player character using Notepad++, I have one other question regarding this subject: how do I alter text files to reflect the player character's gender?

Offline

#43 2015-10-26 15:43:14

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

Re: [Pokered] Adding Gender Selection

megamctaco wrote:

So I started again from the oak_speech part of the tutorial, and made sure to NOT copy+paste everything in the tutorial to avoid things such as "call OakSpeechSlidePicLeft" being written as " call IntroPredef3B", among other things.

It still wouldn't compile, until I realised I had 2 lines of "ENDC", which is why Blue wasn't compiling. I've fixed that issue now and the intro works perfectly for both versions.

EDIT: Well now that I'm basically back to where I was before (although much, much smoother and cleaner)... ROMX error for $1C is still happening.

player_animations.asm

FishingAnim: ; 707b6 (1c:47b6)
    ld c, 10
    call DelayFrames
    ld hl, wd736
    set 6, [hl] ; reserve the last 4 OAM entries
    ld a, [wPlayerGender] ; added gender check
    bit 2, a      ; added gender check
    jr z, .BoySpriteLoad
    ld de, GreenSprite
    ld hl, vNPCSprites
    ld bc, (BANK(GreenSprite) << 8) + $0c
    jr .KeepLoadingSpriteStuff
.BoySpriteLoad
    ld de, RedSprite ; $4180
    ld hl, vNPCSprites
    ld bc, (BANK(RedSprite) << 8) + $0c
.KeepLoadingSpriteStuff
    call CopyVideoData
    ld a, [wPlayerGender] ; added gender check
    bit 2, a      ; added gender check
    jr z, .BoyTiles ; skip loading Green's stuff if you're Red
    ld a, $4
    ld hl, GreenFishingTiles
    jr .ContinueRoutine ; go back to main routine after loading Green's stuff
.BoyTiles ; alternately, load Red's stuff
    ld a, $4
    ld hl, RedFishingTiles
.ContinueRoutine
    call LoadAnimSpriteGfx

Is the "FishingAnim: ; 707b6 (1c:47b6)" causing problems seeing as Red fishing tiles are in $1E and Green fishing tiles are in SECTION "Pics 2", ROMX, BANK[PICS_2]

PS. I've done the coding for player_animations.asm and overworld.asm (perfectly, I believe). Just in case anyone was wondering where I am up to.

I've tried moving both Red and Green fishing tiles to different banks and nothing seems to work.

Now that I'm done with class for the day and everything, I'll take a look and see what I can find out. I'm pretty sure the problem is going to be that something else involved in the graphics patch is going on in some of the other routines in that bank, making there not be room to add these changes. I'll let you know what I find and how to fix it.


Fotomac wrote:

Now that I was finally able to insert the female player character using Notepad++, I have one other question regarding this subject: how do I alter text files to reflect the player character's gender?

To be honest, I only really remember there being one or two instances that refer to the player's gender at all. (MOM: All boys leave home some day. It said so on TV.) where you could easily replace "boys" with "kids" and be ok with it. If you wanted her to say "all boys leave home some day" and "all girls leave home some day" based on the player's gender, it would just involve editing her script and adding the alternate block of text.

So if we take a look in scripts/redshouse1f.asm you can look at line 13 and see where it calls the oddly named "MomWakeUpText" (I say oddly named because nowhere in the text does she say anything about anyone waking up). The script itself looks like this:

RedsHouse1FText1: ; 4816f (12:416f) Mom
    TX_ASM
    ld a, [wd72e]
    bit 3, a
    jr nz, .heal ; if player has received a Pokémon from Oak, heal team
    ld hl, MomWakeUpText
    call PrintText
    jr .done
.heal
    call MomHealPokemon
.done
    jp TextScriptEnd

That's simple enough, we just need to edit it to check the gender. Make it look like this:

RedsHouse1FText1: ; 4816f (12:416f) Mom
    TX_ASM
    ld a, [wd72e]
    bit 3, a
    jr nz, .heal ; if player has received a Pokémon from Oak, heal team
    ld a, [wPlayerGender]
    bit 2, a
    jr nz, .girl
    ld hl, MomWakeUpText
    call PrintText
    jr .done
.girl
    ld hl, MomWakeUpText2
    call PrintText
    jr .done
.heal
    call MomHealPokemon
.done
    jp TextScriptEnd


That just checks the player's gender the way we have been everywhere else, and if you're the girl, it branches to that alternate function to display a second text string.

Now right below the script, we see:

MomWakeUpText: ; 48185 (12:4185)
    TX_FAR _MomWakeUpText
    db "@"

So we just add this right below it:

MomWakeUpText2: ; 48185 (12:4185)
    TX_FAR _MomWakeUpText2
    db "@"


Now we just go to text/maps/reds_house_1f.asm and we can copy/paste the first text entry there (_MomWakeUpText) but name the copy _MomWakeUpText2 to match what we put in the scripts section. Then you just replace the word "boy" with "girl" in the new text and try it out.


Note that isn't what I did in Red++ currently, I just made mom use a gender neutral pronoun and called it a day. But the code I posted should work fine.


If you needed things like trainers to use your gender it might get a little more complicated, but it could be doable. In that case, since we couldn't do a custom check, we'd need to make a new string in RAM that we would initialize to either say "boy" or "girl" and then use TX_RAM commands in the text to disaply that word, which would always match the gender, but that shouldn't be necessary so I'm not going to work out the specifics of it at the moment.

Last edited by Mateo (2015-10-26 15:46:30)

Offline

#44 2015-10-26 20:21:16

Fotomac
Member
Registered: 2015-10-25
Post 18/332

Re: [Pokered] Adding Gender Selection

Thanks. Oh, I decided to take it one step further and base the girl-specific text not just for the mother but also the movie on TV on the equivalent text from FR/LG (i.e. "All girls dream of traveling" and the movie in question being The Wizard of Oz, respectively) since those bits were pretty much the same anyway between the originals and the remakes.

Again, thanks for your assistance!

Offline

#45 2015-10-27 00:58:03

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

Re: [Pokered] Adding Gender Selection

No problem Fotomac, glad you got it sorted out.

=========

I still haven't come up with the best way to fix that issue with bank 1C in Danny's base yet, but I haven't forgotten about it. Also, in preparation for updating this tutorial, I reworked the code in Red++ a bit, and you can see the commit here. Notice that there is a much simpler way to store the gender this way, and I replaced all the "bit 2, a" commands with "and a" and it works fine. Nothing saying you guys have to swap by any means, but I figured I'd post this commit in the meantime until I update the tutorial itself properly.

Commit to TheFakeMateo/RedPlusPlus - Player Gender and Extra Flags pulled out of Cinnabar Trainer Flags

You can of course ignore the parts that don't deal with gender selection, since I was using another bit for something totally unrelated.

Offline

#46 2015-10-27 02:22:27

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

Re: [Pokered] Adding Gender Selection

Ok, I have an idea but I'd need to double check to make sure it actually works properly.


The routine you're editing in bank 1C with the fishing rod animations seems to be self-contained. That is, it is called remotely from another bank and only relies on its accociated tables, not a bunch of other stuff tied to that bank, so we could just move it (and the related tables and text references) into another bank to fix the issues with running out of space in that bank. I haven't tried it yet, BUT it looks like you could start at "FishingAnim:" and move everything from there until right before you get to "_HandleMidJump:" (so you'd just leave the jump routine alone) and copy that fishing routine into another bank. Probably easiest to just put it in its own .asm file and then INCLUDE that somewhere else in main.asm and see if it works as expected.

Last edited by Mateo (2015-10-27 02:23:08)

Offline

#47 2015-10-29 11:03:43

megamctaco
Member
Registered: 2015-08-23
Post 66/129

Re: [Pokered] Adding Gender Selection

Mateo wrote:

Ok, I have an idea but I'd need to double check to make sure it actually works properly.


The routine you're editing in bank 1C with the fishing rod animations seems to be self-contained. That is, it is called remotely from another bank and only relies on its accociated tables, not a bunch of other stuff tied to that bank, so we could just move it (and the related tables and text references) into another bank to fix the issues with running out of space in that bank. I haven't tried it yet, BUT it looks like you could start at "FishingAnim:" and move everything from there until right before you get to "_HandleMidJump:" (so you'd just leave the jump routine alone) and copy that fishing routine into another bank. Probably easiest to just put it in its own .asm file and then INCLUDE that somewhere else in main.asm and see if it works as expected.

I've put that in its own .asm file, and referenced it in main.asm, but it won't compile. Most likely because I haven't gotten around to finding all the related tables and text references.

Offline

#48 2015-11-01 13:29:10

megamctaco
Member
Registered: 2015-08-23
Post 68/129

Re: [Pokered] Adding Gender Selection

Managed to add the girl back sprite and trainer card. All working fine. Haven't bothered with hall of fame yet.

Still need help with bank 1C.

What do I do after making a separate .asm file for "FishingAnim:" to "_HandleMidJump:"?

EDIT:

I INCLUDED "fishing_anim.asm" in main.asm, in bank 3C. It now compiles fine. Haven't tested it yet, however. (EDIT: Tested it. Game crashes).

Now when trying to add:

LoadWalkingPlayerSpriteGraphics:: ; 104d (0:104d)
    ld de,RedSprite ; $4180
    ld a, [wPlayerGender]
   and a
    jr z, .AreGuy1
    ld de,GreenSprite
.AreGuy1
    ld hl,vNPCSprites
    jr LoadPlayerSpriteGraphicsCommon

LoadSurfingPlayerSpriteGraphics:: ; 1055 (0:1055)
    ld de,SeelSprite
    ld hl,vNPCSprites
    jr LoadPlayerSpriteGraphicsCommon

LoadBikePlayerSpriteGraphics:: ; 105d (0:105d)
    ld de,RedCyclingSprite
    ld a, [wPlayerGender]
    and a
    jr z, .AreGuy2
    ld de,GreenCyclingSprite
.AreGuy2
    ld hl,vNPCSprites

I get a "ROM0 section too large" error.

How do I fix that one?

Last edited by megamctaco (2015-11-01 14:32:51)

Offline

#49 2015-11-01 15:44:01

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

Re: [Pokered] Adding Gender Selection

That doesn't surprise me, honestly. Bank 0 fills up pretty quickly when you're making universal changes, so I'm not surprised that it's already filling up with the Gen 2 patch.


A couple of possible solutions come to mind:

1) I seem to recall Danny including a few "ds " lines in there, basically leaving free space in between things to keep from shifting data around when updating routines. You could try removing those. Even if that doesn't fix it, it could come in handy later. Just make sure you don't remove the ones near the top of the file, because those are there to reserve space for the Rom Header which gets written when the rom is compiled. The "ds " lines I'm talking about are near the bottom of home.asm

2) I know there are a couple of places in Bank 0 that are defined to start at a particular address. As such, you can actually free up a bit of space by moving a routine from one part of bank 0 to another. If you'll look in "home/copy2.asm" you should see a routine called "FarCopyData2". If you cut and paste that to move it to the end of "home/copy.asm" it will still work fine, and still be in the bank it needs to be in, but it will free up space in a part of bank 0 you're more likely to use.

3) Another thing you can do is to move Pokemart data out of bank 0. Originally, all Pokemart entries are in Bank 0 so that they can keep them together. And since Bank 0 can be accessed at any time, they could call them from wherever. However, that wastes valuable space in Bank 0, since you could just include each Pokemart's entry with the other scripts on that map. So in Red++, what I did was to:
- Copy each mart entry into a separate file
- Delete the INCLUDE "data/mart_inventories.asm" line in home.asm
- Delete the original "data/mart_inventories.asm" file, since we don't need it anymore
- Make a new folder called "data/martInventories/" and put all the new .asm files in there to keep them organized.
- Add a new INCLUDE line for that mart's inventory data in with the map's scripts.

That might sound a little confusing, so here is a commit where I did that. Note that in that commit, I added a new constant called MART_LIST while the normal Pokered has $FE, and I made the list more readable IMO by not putting all items in the same line. Up to you if you wanna do it that way, or just keep it in a single line like it is by default if you do that.

Last edited by Mateo (2015-11-01 15:45:07)

Offline

#50 2015-11-01 22:52:52

megamctaco
Member
Registered: 2015-08-23
Post 69/129

Re: [Pokered] Adding Gender Selection

I already did the Mart list which you suggested a while back. I'll try those other two options today. Cheers!

Offline

Board footer

Powered by FluxBB