Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2020-06-15 06:09:14

shasocastris
Member
Registered: 2017-06-16
Post 15/24

Adding a new location in Crystal

Hi all,

As preparation for one day making my own hack (one day ...) I decided to make a map called 'South Bark Town' below New Bark Town, just to see if I could. I followed Rangi's "Add a new map and landmark" tutorial but I'm getting a few errors that I'd like some assistance with.

First, in my SouthBarkTown.asm file, I have the following:

SouthBarkTownEthansHouseSignText:
    text "ETHANS HOUSE"

    para "I'll be the best"
    line "Pokemon trainer"
    cont "in the world!"
    done

SouthBarkTownGrandmasHouseSignText:
    text "GRANDMAS HOUSE"

    para "Fresh cookies"
    cont "on the table."
    done

...

SouthBarkTown_MapEvents:

...

    db 2 ; bg events
    bg_event  4, 12, BGEVENT_READ, SouthBarkTownEthansHouseSign
    bg_event 14, 12, BGEVENT_READ, SouthBarkTownGrandmasHouseSign

These were done to get a handle on making signs. I'm getting an error, however, which reads:
error: data/maps/map_data.asm(13) -> data/maps/scripts.asm(487) -> maps/SouthBarkTown.asm(46) -> macros/scripts/maps.asm::bg_event(46): Unknown symbol "SouthBarkTownGrandmasHouseSign"

I compared this with how the NewBarkTown.asm file does its signs, and I can't see what I did differently that made this happen. It compiles if I comment out the two 'bg_event' lines at set to 'db 0' the bg events section.

The second issue is that when it does compile, the maps are screwy.

https://imgur.com/Y2kB8Fm
https://imgur.com/kPRBbQb

This is what the connections look like in Polished Map:

https://imgur.com/5vCxk3H
https://imgur.com/WaLp5X1

My first thought was that the issue would be in the 'data/maps/attributes.asm' file, but this seemed ok:

map_attributes NewBarkTown, NEW_BARK_TOWN, $05, WEST | EAST | SOUTH
    connection west, Route29, ROUTE_29, 0
    connection east, Route27, ROUTE_27, 0
    connection south, SouthBarkTown, SOUTH_BARK_TOWN, 0

    map_attributes SouthBarkTown, SOUTH_BARK_TOWN, $05, NORTH
    connection north, NewBarkTown, NEW_BARK_TOWN, 0

Hopefully this is enough information to debug what is going on. I can also post the changes from the many other files one has to edit to make a new map, if that is also needed. Many thanks.

Cheers!

Offline

#2 2020-06-15 06:35:14

rbroab
Member
Registered: 2017-06-13
Post 96/101

Re: Adding a new location in Crystal

I can't help with the map errors, but you're compiling issue looks fairly simple. These are your events

db 2 ; bg events
    bg_event  4, 12, BGEVENT_READ, SouthBarkTownEthansHouseSign
    bg_event 14, 12, BGEVENT_READ, SouthBarkTownGrandmasHouseSign

and these are your dialogs for said events

SouthBarkTownEthansHouseSignText:
    text "ETHANS HOUSE"

    para "I'll be the best"
    line "Pokemon trainer"
    cont "in the world!"
    done

SouthBarkTownGrandmasHouseSignText:
    text "GRANDMAS HOUSE"

    para "Fresh cookies"
    cont "on the table."
    done

The names of the events don't match up with the names of your text connections. Change "SouthBarkTownEthansHouseSign" to "SouthBarkTownEthansHouseSignText" and also change "SouthBarkTownGrandmasHouseSign" to "SouthBarkTownGrandmasHouseSignText"

Offline

#3 2020-06-15 15:58:38

shasocastris
Member
Registered: 2017-06-16
Post 16/24

Re: Adding a new location in Crystal

rbroab wrote:

The names of the events don't match up with the names of your text connections. Change "SouthBarkTownEthansHouseSign" to "SouthBarkTownEthansHouseSignText" and also change "SouthBarkTownGrandmasHouseSign" to "SouthBarkTownGrandmasHouseSignText"

That would have been my first guest, but the difference in the names when noting them under 'bg events' and the actual text is repeated everywhere there is a sign. The 'text' word is added for the actual text, and it isn't there for the pointer. It's definitely weird, but how I have it is consistent with the other disassembly maps.

Cheers!

Offline

#4 2020-06-16 01:37:41

Mateo
Member
Registered: 2009-11-25
Post 3,644/3,659

Re: Adding a new location in Crystal

You are overlooking part of the data that needs to be there.

1. The bg events have the pointer to a script, not directly to the text itself.

2. The script (which you did not add) has the same label name as the bg_event references, and displays the text (which you did add)

3. The text for the sign typically has the same label name as the script, but with "Text" added like that.


The standard signpost scripts that you seem to have overlooked and not included look like this:

NewBarkTownSign:
    jumptext NewBarkTownSignText

Last edited by Mateo (2020-06-16 01:38:24)


I am not very active on this forum. I only pop in from time to time.

Offline

#5 2020-06-16 05:27:32

shasocastris
Member
Registered: 2017-06-16
Post 17/24

Re: Adding a new location in Crystal

Mateo wrote:

The standard signpost scripts that you seem to have overlooked and not included look like this:

NewBarkTownSign:
    jumptext NewBarkTownSignText

Oh shoot, I did miss that! Thanks for pointing it out. It compiled now.

Were you able to look at the photos I posted? I still can't figure out what the heck I did to make the map go so haywire.

Cheers!

Offline

#6 2020-06-16 05:51:11

Mateo
Member
Registered: 2009-11-25
Post 3,645/3,659

Re: Adding a new location in Crystal

Sorry, I overlooked that part of your issue. If you look elsewhere in data/maps/attributes.asm (near the top, where the macros are defined) you will see this:

; Connections go in order: north, south, west, east

Notice how your connections for New Bark Town are not defined in the order that the game expects them to be in. Rearrange them to match the expected order and see if that helps. (move the South connection above the West and East ones, instead of below like you have it now).


I am not very active on this forum. I only pop in from time to time.

Offline

#7 2020-06-16 22:43:09

shasocastris
Member
Registered: 2017-06-16
Post 18/24

Re: Adding a new location in Crystal

Mateo wrote:

Notice how your connections for New Bark Town are not defined in the order that the game expects them to be in. Rearrange them to match the expected order and see if that helps. (move the South connection above the West and East ones, instead of below like you have it now).

Well, I got really excited when I realized this mistake and changed it. Then I compiled it and it didn't seem to do anything.

So I'm still at a loss as to what I did to make such an error appear.

Cheers!

Offline

#8 2020-06-16 23:57:40

Mateo
Member
Registered: 2009-11-25
Post 3,646/3,659

Re: Adding a new location in Crystal

Probably a dumb question, but were you saved on the map when you tried to test the changes? or did you start a new game, leave the map and come back, etc?


I am not very active on this forum. I only pop in from time to time.

Offline

#9 2020-06-17 02:12:54

shasocastris
Member
Registered: 2017-06-16
Post 19/24

Re: Adding a new location in Crystal

Mateo wrote:

Probably a dumb question, but were you saved on the map when you tried to test the changes? or did you start a new game, leave the map and come back, etc?

I deleted the .sav file that had been created, recompiled the folder with the make command, and started a new game. And I still had the same result.

I haven't had a chance to go back and make another copy of the pokecrystal-master folder and redo everything (with the correct ordinal ordering) to see if that produces the same result of not. Sadly that's the only thing I can think of right now to check, though I suspect the result will still produce the error.

Cheers!

Offline

Board footer

Powered by FluxBB