You are not logged in.
Can someone please help me edit the map connections in pokered
These might be a little tricky to explain, but I'll try. if you look in data/mapHeaders/ you will find .asm files with the headers for each map in the game. Connections are part of that header. Let's take a look at Saffron City for example.
db NORTH | SOUTH | WEST | EAST ; connections NORTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_5, 5, 0, Route5_Blocks SOUTH_MAP_CONNECTION SAFFRON_CITY, ROUTE_6, 5, 0, Route6_Blocks, 1 WEST_MAP_CONNECTION SAFFRON_CITY, ROUTE_7, 4, 0, Route7_Blocks EAST_MAP_CONNECTION SAFFRON_CITY, ROUTE_8, 4, 0, Route8_Blocks
that first line tells which directions the map has a connection in. In this case, all of them. Each of the following lines defines a single map connection. They also have to be defined in this order (North, South, West, East). If a map doesn't have all 4, you still keep the same order, and just leave out any directions that don't have a connection on them. Let's take a look at macros/data_macros.asm to see what each of these things mean. In general, the directions all follow the same basic format:
(NORTH_MAP_CONNECTION) ;\1 (byte) = current map id ;\2 (byte) = connected map id ;\3 (byte) = x movement of connection strip ;\4 (byte) = connection strip offset ;\5 (word) = connected map blocks pointer
Going by this, we can see that the connection going north has SAFFRON_CITY for the current map ID (since Saffron City is the map we are editing). It has ROUTE_5 for the connected map ID, since we want to connect it to Route 5. It has 5 for the x movement of the connection strip, since the connection is shifted over 5 metatiles from the edge of the map. It has 0 for the connection strip offset, which seems to be the default value on most maps. And then it has Route5_Blocks for the connected map blocks pointer, since that is the label name for Route 5's map block data.
And of course, you need to make sure the connection goes both ways. So since Saffron City has a NORTH connection to Route 5, Route 5 has a SOUTH connection to Saffron defined as well. I know this is a little tricky but hopefully that helps you get started. You'll probably just have to play around with it a bit sometimes to make sure you get it lined up the way you want to, and that's ok.
You can also take a look at this thread, too.
Last edited by Luna (2020-04-21 00:09:46)
I am not very active on this forum. I only pop in from time to time.