Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-02-11 03:40:03

Kuroko Aizawa
Member
Registered: 2011-12-01
Post 303/499

A Proper Map Connection Editor?

So I'm sure many hackers have run into the issue of map connections. Some even resort to using warps and gatehouses just because they are such a pain to get working. The only threads I've seen related to the topic are full of debate and aren't explained well in terms of how to actually make the connection.

So, currently the only tools you can use to even touch these connections are hex editors and Johtomap. I think we need something a lot better than this, and to be precise we need a visual editor.

Otherwise, would anyone educated in the subject be willing to write a proper tutorial, perhaps including screenshots or a video. The only person I personally know of who has dealt with connections heavily is Miksy.

This is the current topic with all of the relevant information: http://hax.iimarck.us/topic/311/
http://wahackforo.com/t-24385/gbc-mappi … apa-region

If anyone with tool creation experience would be willing to tackle this on, or if anyone would be willing to explain this bit of moonspeak to the rest of us, it would really be appreciated.

Last edited by Kuroko Aizawa (2015-02-11 04:21:59)

Offline

#2 2015-02-11 05:33:40

comet
Member
Registered: 2012-04-09
Post 525/679

Re: A Proper Map Connection Editor?

MegaMap and UltraMap both do visuals on connections.

MegaMap will let you edit them, but in a separate tab from the map, and it's very finicky. I remember UltraMap editing them as well but I don't have it on me.

Offline

#3 2015-02-11 13:52:34

Kuroko Aizawa
Member
Registered: 2011-12-01
Post 304/499

Re: A Proper Map Connection Editor?

That's a fair point with MegaMap, although a problem I notice is that Gen II has some additional parameters concerning the connection, unlike Gen III where it's pretty straightforward. In the threads I posted in the OP, there is a bit of debate over the formula for some of these values, and quite frankly it's a headache to look at.

Now, I know not everything can be simple and easy like an RPG Maker game, but I'm sure that there is a better way to do these connections. It just seems so inefficient and frustrating as it stands. I think AdvanceMap does an alright job with Map Connections, and shinyquagsire's Gen III MEH (Map Editor of Happiness) has a visual editor in the works. It just makes sense that something similar should exist for the older games as well.

I don't mean to be one of those noobs who begs people to do things for them, but I personally have been stuck on two different hacks over these silly connections over the last year or so, so I have decided to ask the community for help.

By the by, I did some searching and found an UltraMap link if anyone needs it:
http://crystalfallows.com/archive/index … aMapv1.zip

Last edited by Kuroko Aizawa (2015-02-11 14:09:05)

Offline

#4 2015-02-11 15:49:17

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 241/450
Website

Re: A Proper Map Connection Editor?

I made an extensive mapping tutorial a while ago, but it's in spanish (includes detailed information about map connections): http://wahackforo.com/t-24385/gbc-mappi … apa-region

Any chance you may be able to understand it? I may translate it one day, but heh, I'm so lazy...

Last edited by Crystal_ (2015-02-11 15:54:28)

Offline

#5 2015-02-11 16:24:10

Kuroko Aizawa
Member
Registered: 2011-12-01
Post 307/499

Re: A Proper Map Connection Editor?

Crystal_ wrote:

I made an extensive mapping tutorial a while ago, but it's in spanish (includes detailed information about map connections): http://wahackforo.com/t-24385/gbc-mappi … apa-region

Any chance you may be able to understand it? I may translate it one day, but heh, I'm so lazy...

Ah yes, I've linked that in the first post. Unfortunately when I use a translator with it it jumbles all the text together so I can't understand it very well.

Offline

#6 2015-02-11 16:36:41

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 242/450
Website

Re: A Proper Map Connection Editor?

Oh, I didn't notice you already linked it. I barely noticed the links but my head just assumed they were both from skeetendo.

This looks like the perfect excuse to finally get into translating it. I guess I'll start with map connections. I have some free time now so I might start today.

Offline

#7 2015-02-11 18:36:27

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 244/450
Website

Re: A Proper Map Connection Editor?

Just translated the map connections part. Check it out: http://hax.iimarck.us/post/38354/

Offline

#8 2015-02-11 20:18:06

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

Re: A Proper Map Connection Editor?

The formulas I posted are still correct (barring one typo in the South connection):

http://hax.iimarck.us/post/11048/#p11048

North:  C700                                          | Start of block data
       +   3                                          | h-align to first block of map
       +   x_displacement_in_blocks                   | h-displacement
       ----------------------------------------------
        C703 + x_displacement_in_blocks

West:   C700
       +   3 * (w+6)                                  | v-align to first block of map
       +   y_displacement_in_blocks * (w+6)           | v-displacement
       ----------------------------------------------
        C700 + (w+6) * (y_displacement_in_blocks + 3)

South:  C700
       +   3                                          | h-align to first block of map
       +   3 * (w+6)                                  | v-align to first block of map
       +   (h - 1) * (w+6) + w                        | skip map
       +   3                                          | skip remaining border right of map
       +   3                                          | skip remaining border left of connection strip
       +   x_displacement_in_blocks                   | h-displacement
       ----------------------------------------------
        C700 + 3 * (w+6) + h * (w+6) + x_displacement_in_blocks
      = C703 + (h+3) * (w+6) + x_displacement_in_blocks


East:   C700
       +   3                                          | h-align to first block of map
       +   3 * (w+6)                                  | v-align to first block of map
       +   w                                          | skip first line of map
       +   y_displacement_in_blocks * (w+6)           | v-displacement
       ----------------------------------------------
        C700 + (w+3) + (w+6) * (y_displacement_in_blocks + 3)

      = C700 + (w+6) - 3 + (w+6) * (y_displacement_in_blocks + 3)
      = C6FD + (w+6) * (y_displacement_in_blocks + 4)

       In other words:

        C700
       -   3                                          | h-align to right side of map
       +   4 * (w+6)                                  | v-align to right side of map
       +   y_displacement_in_blocks * (w+6)           | v-displacement
       ----------------------------------------------
        C6FD + (w+6) * (y_displacement_in_blocks + 4)

Miksy's Window connection formulas are correct as well.

North:      C701 + [Height of connected map] * [Width of connected map + 6]
South/East: C707 + [Width of connected map]
West:       C706 + 2 * [Width of connected map]

Add 0x0100 for Crystal, as its block data starts at 0xC800 in RAM.

The X and Y displacements depend on the map connection displacement:

X Alignment:
North/South: (x_displacement_of_connected_map * -2)
West:        (width_of_connected_map * 2) - 1
East:        0

Y Alignment:
North:       (height_of_connected_map * 2) - 1
South:       0
East/West:   (y_displacement_of_connected_map * -2)

Depending on connection type, one alignment value is obviously copied while the other one is used as an offset.

North/South: Copy Y, Add X
East/West  : Copy X, Add Y

This is why East/West share Y alignment, while North/South share X alignment. North/South Y alignments become just max_y, min_y while East/West X alignments become min_x, max_x respectively. min_{x,y} are always 0, max_{x,y} are 2 * dim_{X,Y} - 1.

We (i.e. F-Zero and I) originally decided to measure all dimensions in blocks, because a) connection strips can only be placed in blocks and b) to keep the confusion to a minimum. Thus, all times two (*2) are only necessary, because all dimensions/displacements are defined to be in blocks, not block-halves. I guess we failed on b).

The corresponding code can be found in map loading process 0x06, command 0x18.

cYa,

Tauwasser

EDIT: Less ambiguous wording. Less copy & paste.

Last edited by Tauwasser (2015-02-11 20:57:49)

Offline

#9 2015-02-12 02:05:00

Kuroko Aizawa
Member
Registered: 2011-12-01
Post 308/499

Re: A Proper Map Connection Editor?

Thanks to the both of you, this should help a lot of people, as well as anyone who decides to make a tool for connection editing in the future.

Offline

#10 2015-02-12 08:33:15

comet
Member
Registered: 2012-04-09
Post 526/679

Re: A Proper Map Connection Editor?

Pia Carrot wrote:

That's a fair point with MegaMap, although a problem I notice is that Gen II has some additional parameters concerning the connection, unlike Gen III where it's pretty straightforward.

Most of them are redundant, since the addresses are precalculated so the game doesn't have to do it at runtime. Besides the connected map, the only things you need are the alignment and the strip length.

I think the major point of confusion was when people used existing connections as a frame of reference. A lot of them aren't consistent with the formulas given here.

The reason for this is that Game Freak's in-house map editor allowed the strip destination to be moved, which outwardly is identical (but opposite) to changing the alignment. So for every block forward in the strip destination you could adjust the alignment to compensate. Incrementally changing either value would lead you astray from what the formulas suggest, even though they're correct.

Offline

#11 2015-03-01 07:55:04

comet
Member
Registered: 2012-04-09
Post 533/679

Re: A Proper Map Connection Editor?

comet wrote:

The reason for this is that Game Freak's in-house map editor allowed the strip destination to be moved, which outwardly is identical (but opposite) to changing the alignment.

Oops. There are cases where this is necessary, so that the connection strip can fit within the boundary of the map grid. First one that comes to mind is Azalea's westbound connection to Route 34, who would otherwise be too tall.

The risk of goofing it up by hand is still there, but I guess the result isn't identical (the strip will be getting shorter).

Offline

#12 2017-03-01 16:04:42

Maniac379
Member
Registered: 2015-01-15
Post 39/121

Re: A Proper Map Connection Editor?

comet wrote:

I think the major point of confusion was when people used existing connections as a frame of reference. A lot of them aren't consistent with the formulas given here.
.

Never did figure out myself


---
Pokémon White Crystal
A simple quality of life and gameplay improved hack

Offline

Board footer

Powered by FluxBB