Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2011-06-10 05:49:17

Miksy91
Member
Registered: 2010-10-16
Post 387/2,339

Editing flying map properly

I, almost, know how this thing works.

In 0x91BCC, there is a list of bytes in this form:
[Which pointer to take to show the name & (x,y) location of the map flown to][Which flying map leads to]


The "pointers to take" are located in another list of bytes that begins in offset 0x92382.
It's form: [X-location in Town Map][Y-location in Town Map][Pointer to the name shown in Town & Flying Map]

Now after this "simple" explanation you probably wonder what's the problem I'm having :D
Anyways, as you can see, I'm able to change the (x,y) location of all the places in Town Map but only the (x,y) location of the places that belong to the maps that can be flown to in Flying Map. Basically, if I use Fly in a place that doesn't have flying data, its location in Flying Map won't be the same as its location in Town Map.

It's not any major bug but would be nice to be fixed :)

Offline

#2 2011-06-11 15:32:31

Tauwasser
Member
Registered: 2010-10-16
Post 142/452

Re: Editing flying map properly

Sorry, I don't really get what you mean in your last sentence.

I just tried it. The table at 24:5BCC has the indices of which town map pointer to use as XY for the flying pokemon sprite in the Flying Map. However, since it indexes into the Town Map pointer data, it will always adhere to where the places in the town map are, so the maps are never different.

When you use Fly in a location that itself cannot be flown to, like a route etc., the Hero sprite will be shown in that location and the Fly Pokemon sprite will just never be at your location since it cannot be flown to. I just tried this with Goldenrod and it is as I expected.

Maybe you're confused because you use a safe where not all places that can be flown to are actually made available? For instance, if you never reach Goldenrod by foot, you will not be able to fly to it.

EDIT: Ah!!! Maybe I just understood the problem. You want to change the assignment which map you will actually reach when you fly to a location in the Fly Map? If so, then you will have to edit the table at 05:5319. It's format is [Map Bank][Map No][X][Y] IIRC.

Index 0x00 is the location you start in after the intro. Index 0x01 is some beta map probably (you will actually land inside a person in Viridian City's Pokemon Center). The actual map locations start after that as mapped out in 24:5BCC [Town Map Id][Flying Map Id].

cYa,

Tauwasser

Last edited by Tauwasser (2011-06-11 16:02:07)

Offline

#3 2011-06-11 17:26:27

Miksy91
Member
Registered: 2010-10-16
Post 395/2,339

Re: Editing flying map properly

Actually, I had figured out all this before but after making a script in which I get Town Map and used it in Area 100, I noticed what's wrong.
Heck, this is extremely complicated to be explained but I'll try to anyways :D

Now, the pointer that originally leads to "Route 29" in the table in 24:6382, leads to "Route 36" instead which has been renamed into Area 100 (as the first route you get in the game is Route 36). The pointer that leads to "Route 30" has been made to point to "Route 37" which is now Area 101.
The original pointers to "Area 100 (Route 36)" and "Area 101 (Route 37)" haven't been changed.

"Route 29"'s location in Town Map has been changed to be in the place where I'd like Area 100 to be and "Route 30"'s location to the place where I'd like Area 101 to be. Route 36 and Route 37 point to the original locations in town map.

Now, I found out that in the Primary map header of Area 100, the map belongs to "Area 100" but not to Route 29, instead to Route 36.
Same thing with Area 101 (Primary header tells that the map belongs to Route 37).

That's why, when I open Town Map in a city (for example starting town), I'll see straight that the town map location of Area 100 (Route 29 based) is in the place where I wanted it to be, same thing with Area 101 (Route 30 based). However, after "National Park" Area 100 and Area 101 are shown again in their original locations.


69061844.png  66266106.png    86443051.png  63262735.png

Last edited by Miksy91 (2011-06-11 17:30:15)

Offline

#4 2011-06-11 20:58:14

Tauwasser
Member
Registered: 2010-10-16
Post 143/452

Re: Editing flying map properly

So you need to assign the new Area 100 and Area 101 which replace Route 29 and Route 36 to your maps, then it will work. Or is there something specific in you having to duplicate the Areas in the first place?

cYa,

Tauwasser

Offline

#5 2011-06-12 04:45:31

Miksy91
Member
Registered: 2010-10-16
Post 397/2,339

Re: Editing flying map properly

I've fixed it already, had only to go to the secondary header and change the sixth byte in there.

Offline

#6 2011-06-12 16:43:05

Tauwasser
Member
Registered: 2010-10-16
Post 145/452

Re: Editing flying map properly

You mean the primary map header, I think. Anyway, that's what I thought.

cYa,

Tauwasser

Offline

#7 2011-06-17 16:04:48

Miksy91
Member
Registered: 2010-10-16
Post 406/2,339

Re: Editing flying map properly

yeah, primary header of course...

Offline

#8 2011-11-13 09:09:27

Miksy91
Member
Registered: 2010-10-16
Post 600/2,339

Re: Editing flying map properly

I noticed earlier that I had bugs with the flying map again and by being able to fix them, I figured out how this works properly.
I thought that I could post a proper tutorial about editing flying map so expect to have one up soon !

Offline

Board footer

Powered by FluxBB