Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-11-12 22:07:54

Sou1forged
Member
From: Sweden
Registered: 2010-10-30
Post 7/14

G2Map - Pokemon Generation 2 map editor

I found this tool while browsing some german ROM hacking sites, as I'm also dabbling with german Pokémon ROMs. It is a Gen2 map editor capable of doing almost everything GoldMap can do.

Yes, I am aware that MegaMap, JohtoMap and GoldMap are all way ahead in the way of features, but this is not what makes this tool interesting, it is the multitude of supported ROMs. AFAIK all of the other map editors available are language specific, while G2Map supports:

Pokémon Gold & Silver/金・銀 (English, German, French & Japanese v1.0/v1.1)
Pokémon Crystal (English v1.0/v1.1 & Japanese)

Further ROM support is apparently being planned (Italian G/S, European Crystal(whatever that means)).

It is in an early development stage right now (v0.1 was released just a few weeks ago), so there might be some bugs present, but it might be worth keeping an eye on.

G2Map is written by xdaniel.

Edit:
since xdaniel has resurfaced with a new version of G2Map, I thought i'd share the link since so as to make it more accessible.

http://magicstone.de/dzd/random/G2Map_v … o-demo.rar

Last edited by Sou1forged (2014-08-07 14:18:34)

Offline

#2 2012-11-12 22:31:55

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

Re: G2Map - Pokemon Generation 2 map editor

Gonna check this out, looks cool.

Offline

#3 2012-11-12 23:02:50

y0r124
Member
From: Anywhere.
Registered: 2012-09-12
Post 141/331
Website

Re: G2Map - Pokemon Generation 2 map editor

Interesting :D
.But I dont think The PC I use can Install .Net Framework 4.5


my FB

Lurking somewhere here...

Offline

#4 2014-04-24 00:10:46

xdanieldzd
Member
Registered: 2014-04-23
Post 1/10

Re: G2Map - Pokemon Generation 2 map editor

Hey there, this is xdaniel, the author of G2Map. Hope it's alright that I dig this thread out instead of making a new one?

After quite some time of not working on the program (coincidentally, roughly the time since this thread was originally posted, so about 1 1/2 years), I've recently picked it up again, started cleaning up and restructuring the code, fixing some bugs, things like that; not much in the way of additional features. One important feature of the program I did end up improving upon already, tho: it should now be compatible with every official language version of G/S and Crystal, the odd Korean GS included. Unless I missed another European variant or something. But anyway, to quote the source, that's...

- Pocket Monsters Gold/Silver (Japanese v1.0)
- Pocket Monsters Gold/Silver (Japanese v1.1)
- Pokémon Gold/Silver (English)
- Pokémon Gold/Silver (German)
- Pokémon Gold/Silver (French)
- Pokémon Gold/Silver (Italian)
- Pokémon Gold/Silver (Spanish)
- Pocket Monsters Gold/Silver (Korean)
- Pocket Monsters Crystal (Japanese)
- Pokémon Crystal (English v1.0)
- Pokémon Crystal (English v1.1)
- Pokémon Crystal (German)
- Pokémon Crystal (French)
- Pokémon Crystal (Italian)
- Pokémon Crystal (Spanish)

...of course, G2Map is still missing a lot of features. So far, you can edit maps, move events, change certain map properties, and change wild grass Pokemon, pretty much all of which is already in the build I originally released way back when. What I'm so far planning to add is editing of tilesets (i.e. tile makeup of blocks, collision, etc.) and wild water Pokemon, support for alternate roof tiles, as well as to fix certain bugs it has.

And that's about it for now, I guess, so here's a few WIP screenshots to end this post with:

- Goldenrod City in Crystal Japan, featuring the PCC
- The elusive Korean Gold/Silver, complete with Korean text support (multi-byte characters, ugh!)
- Basic map properties in Crystal German
- Basic wild Pokemon editing in Crystal German

(Wait, one more thing: I'd have registered as xdaniel, but the forums told me there's already a user named "XDaniel", who's probably a spambot, what with the link to "South African holidays" in the signature... So here I am, "xdanieldzd")

Offline

#5 2014-04-24 18:25:42

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

Re: G2Map - Pokemon Generation 2 map editor

I remember checking out your tool back then.
It feels pretty handy for especially hacking crystal as a rom file, not sure how the mapping is done with disassembly since I have never really used it. Johtomap works really well for G/S hacking though but you could of course pick up something it doesn't do already and implement more features in this one if you're into it.

Offline

#6 2014-04-24 20:59:42

Chamber_
Member
Registered: 2013-12-31
Post 49/119

Re: G2Map - Pokemon Generation 2 map editor

It is very interesting to finally have an alternative to Crystal.

The tool doesn't open the spanish version of GOLD, think it's possible to repair it, as long looking for a map editor for spanish roms?

Last edited by Chamber_ (2014-04-25 01:08:06)

Offline

#7 2014-04-24 23:20:52

xdanieldzd
Member
Registered: 2014-04-23
Post 2/10

Re: G2Map - Pokemon Generation 2 map editor

Miksy91: It doesn't support the Crystal disassembly yet, but someone else already suggested I should look into supporting it. As for adding features... well, I guess at least getting feature parity with JohtoMap would be nice. Also, is there anything in particular that JohtoMap doesn't do, and wouldn't be too hard to implement, that you'd like to see?

Chamber_: The old version I released back then didn't support Spanish GSC, but I've added support for them recently:

TZdiqWW.png

The Spanish ROMs, as well as all the others in the list I gave in my last post, will work in the next version I'll release. Not sure when that'll be exactly, but hopefully soon-ish.

Offline

#8 2014-04-25 01:12:57

Chamber_
Member
Registered: 2013-12-31
Post 51/119

Re: G2Map - Pokemon Generation 2 map editor

xdanieldzd wrote:

Chamber_: The old version I released back then didn't support Spanish GSC, but I've added support for them recently:

The Spanish ROMs, as well as all the others in the list I gave in my last post, will work in the next version I'll release. Not sure when that'll be exactly, but hopefully soon-ish.

I need it now!!

Just kidding. Thank you very much for turning your project in the first Universal MAP editor.

PS: I'll check this topic every day until the new version comes jaja

Offline

#9 2014-04-27 21:42:03

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

Re: G2Map - Pokemon Generation 2 map editor

I know that Johtomap does not support extended tilesets, or pallet assignments that have been repointed to a new bank. MegaMap/ZeroMap support those things however. I don't know if Gen II map supports these or not, but they would be nice things to have support for.

Last edited by Mateo (2014-04-27 21:42:20)

Offline

#10 2014-04-28 04:35:45

RED
Member
From: Japan
Registered: 2012-09-03
Post 487/521

Re: G2Map - Pokemon Generation 2 map editor

You can also add tileset editor that supports 192 to 256 tiles without changing DPI Setting like TSE.


わたし の なまえ わ レン レン  でづ

Offline

#11 2014-04-30 07:05:44

xdanieldzd
Member
Registered: 2014-04-23
Post 3/10

Re: G2Map - Pokemon Generation 2 map editor

Mateo: Support for extended tilesets - at least for Tau's variety; don't have HyperHacker's to test - is work-in-progress; tested it with Chamber_'s Pokemon XY Naturia hack and that appears to be working fine. Palette assignments are still hard-coded to load from bank 0x02 (GS) or 0x13 (Crystal), tho. Do you know where the bank number is defined in the ROM, i.e. how'd I go about detecting the bank instead of leaving it hard-coded?

RED: The tileset editor is work-in-progress right now as well; I'll make sure that you can use every valid tile in the tileset with it.

Speaking of work-in-progress, here's another, a tiny bit older, screenshot showing off a new feature - not exactly an important one, I guess, but surely nice to have: in addition to supporting ROMs of multiple languages, a multi-language GUI. Translations aren't done yet - the Japanese one in particular is pretty much just some incomplete shenanigans - but I'm getting there. You'll be able to edit and add translations as well, as the text comes from external XML files... and I only speak German and English, and a few shreds of Japanese, anyway :P

i3nO1v5.png

Offline

#12 2014-04-30 08:29:19

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

Re: G2Map - Pokemon Generation 2 map editor

xdanieldzd wrote:

Palette assignments are still hard-coded to load from bank 0x02 (GS) or 0x13 (Crystal), tho. Do you know where the bank number is defined in the ROM, i.e. how'd I go about detecting the bank instead of leaving it hard-coded?

The banks are attached to the palette map functions. This isn't much help since the location of their bank 0 aliases varies between languages.

https://github.com/kanzure/pokecrystal/ … m#L326-346

Functiondb1:: ; db1
    ld a, [hROMBank]
    push af
    ld a, BANK(Function4c000)
    rst Bankswitch
    call Function4c000
    pop af
    rst Bankswitch
    ret
; dbd

Functiondbd:: ; dbd
    ld a, [hROMBank]
    push af
    ld a, BANK(Function4c03f)
    rst Bankswitch
    call Function4c03f
    pop af
    rst Bankswitch
    ret
; dc9

While we're here, the blocksets seem to be laid out so they're easiest to use 4 blocks wide. Maybe this could be customized. Same with the block editor.

Ws1dGLG.png PnJ9ig9.png 0ZVa77Q.png

Offline

#13 2014-04-30 22:58:35

Chamber_
Member
Registered: 2013-12-31
Post 53/119

Re: G2Map - Pokemon Generation 2 map editor

With knowledge of these times and your desire to make things right, this tool easily become the best map editor.

The G2Map will have support with PKSV like JohtoMap?

Is possible, that like palettes, read the Tileset headers from the root?  anticipation a possible expansion of the game.

LoadTilesetHeader:: ; 2d27
    push hl
    push bc

    ld hl, Tilesets
    ld bc, Tileset01 - Tileset00
    ld a, [$d199]
    call AddNTimes

    ld de, TilesetBank
    ld bc, Tileset01 - Tileset00

    ld a, BANK(Tilesets)
    call FarCopyBytes

    pop bc
    pop hl
    ret
; 2d43

Last edited by Chamber_ (2014-04-30 22:59:16)

Offline

#14 2014-05-01 00:30:20

xdanieldzd
Member
Registered: 2014-04-23
Post 4/10

Re: G2Map - Pokemon Generation 2 map editor

comet: Hrm, while the way I'm doing it is kinda hacky and limited, I am auto-detecting the palette assignment bank now. The program now scans ROM bank 0 for the bytes that make up the "rst Bankswitch; call Function4c000;" opcodes, i.e. D7CD0040. If it finds this sequence of bytes, it takes the byte immediately before them and uses it as the palette assignment bank, if it doesn't (which didn't happen with the GSC ROMs I tried, which was most of them), it falls back onto the hard-coded bank numbers 0x02 or 0x13. I realize that's not foolproof, but it's about all I can think of... besides maybe shoving a CPU emulator core in there and actually running the code to some extend :P

Also, the palette assignments aside, the block selector panel can now be resized horizontally, in single-block increments.

Chamber_: PKSV is "Pokemon Script Viewer/Editor", right? I've never actually worked with scripting, so I'll have to take a closer look at this first. I mean, I've read some of Tau's scripting compendium, but the last time I was really working on a hack myself... I'm not sure if that or any other scripting document even existed yet, or if they did, they were still very new... It's been a very long time.

Now, what do you mean by "reading the tileset headers from the root"? I'm not sure if I understand? ^^"  Do you mean moving the table with the tileset headers elsewhere in the ROM? If that's the case, the offset where the tileset headers can be found is currently still hard-coded into the program for each version of GSC. I will probably move all this hard-coded stuff into a separate XML file, like the translations, so that people can add support ex. for their own hacks themselves, where certain data might have been moved (ex. map pointer table, tileset headers, wild Pokemon, etc.).

Offline

#15 2014-05-02 20:39:47

Chamber_
Member
Registered: 2013-12-31
Post 54/119

Re: G2Map - Pokemon Generation 2 map editor

@xdanieldzd: Yes!, the pKSV is the "Pokemon Script Viewer / Editor".

No need  know anything about scripts to give support to your tool, take a look at JohtoMap for you to realize how it works. Basically, JohtoMap read the address of the script pointer and indicates to PKSV to open in the same address.

I want to move the table of  tileset_headers elsewhere in the rom to expand the number of graphics, so I think the BEST idea in the world to give "hand support" using an XML file.

Last edited by Chamber_ (2014-05-03 00:55:05)

Offline

#16 2014-05-03 15:00:11

Armada
New member
Registered: 2014-05-03
Post 1/9

Re: G2Map - Pokemon Generation 2 map editor

Great work on this utility I was already using G2Map v0.1, it's great to hear that there will be a v0.2!

You already have a "Show script" button in the Persons dialog which is always disabled, if you could allow us to set a path to the PKSV utility then you could send the address and rom location to PKSV and then we can easily view the script without having to type the offset every time. I also recommend adding such a button to the Triggers and Signposts dialogs.

This way you won't have to write your own "Show Script" utility and we can work with the utility we already use (and possibly develop new ones that use the same command-line syntax).

Last edited by Armada (2014-05-03 15:00:28)

Offline

#17 2014-05-03 20:45:45

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

Re: G2Map - Pokemon Generation 2 map editor

Nice to see that there will be support for the Tauwasser variety of extended tilesets as well as repointed pallet data. Also, resizing the block window is a really nice idea. This is quickly becoming one of the best map editors for Gen II from the looks of it. I'll try to stop by more often to keep my eye on this.

Offline

#18 2014-05-05 13:40:23

xdanieldzd
Member
Registered: 2014-04-23
Post 5/10

Re: G2Map - Pokemon Generation 2 map editor

A quick status update: I haven't worked on G2Map a whole lot over the last few days, but I did add support for script editing via PKSV earlier today. The "Show Script" button is now labeled "Launch Script Editor" and is available for triggers, signposts and persons. If the path to PKSV hasn't been set yet, you'll be asked to locate the program's executable, otherwise it'll be started with the current ROM's path and the script's location as parameters - pretty much exactly how JohtoMap does it. Here it is in action (and disregard the changed map, this is from my testing ROM). In addition, G2Map will try to detect whether the current ROM file has been modified by another application while it's running, such as PKSV, and ask you if you want to reload the ROM.

That said, I noticed that PKSV doesn't seem to work correctly with, at least, the Japanese version of Crystal and the Korean versions of Gold and Silver. From what I can tell, it seems to misidentify Japanese Crystal as Fire Red/Leaf Green, which obviously results in garbage output when compared to the same script in ex. G/S English or German, and just outright crashes with Korean G/S. I see that you can override the game version in PKSV's decompile dialog, but I'll have to check if you can do so from the command line as well. Of course, PKSV also doesn't support text in either of those languages, so script editing would be a bit limited for those anyway...

Offline

#19 2014-05-05 19:32:58

Armada
New member
Registered: 2014-05-03
Post 2/9

Re: G2Map - Pokemon Generation 2 map editor

xdanieldzd wrote:

A quick status update: I haven't worked on G2Map a whole lot over the last few days, but I did add support for script editing via PKSV earlier today. The "Show Script" button is now labeled "Launch Script Editor" and is available for triggers, signposts and persons. If the path to PKSV hasn't been set yet, you'll be asked to locate the program's executable, otherwise it'll be started with the current ROM's path and the script's location as parameters - pretty much exactly how JohtoMap does it. Here it is in action (and disregard the changed map, this is from my testing ROM). In addition, G2Map will try to detect whether the current ROM file has been modified by another application while it's running, such as PKSV, and ask you if you want to reload the ROM.

Great work! Any chance for a sneak peek? :3

Though I did think it was handy to be able to see the ROM offset of a script without needing to open another utility or calculate them myself.

Also, did you correct the byte order of pointer values in those dialogs? The two bytes for pointers are actually in a reversed order in the ROM and G2Map displayed those values directly which makes things a bit confusing.

xdanieldzd wrote:

That said, I noticed that PKSV doesn't seem to work correctly with, at least, the Japanese version of Crystal and the Korean versions of Gold and Silver. From what I can tell, it seems to misidentify Japanese Crystal as Fire Red/Leaf Green, which obviously results in garbage output when compared to the same script in ex. G/S English or German, and just outright crashes with Korean G/S. I see that you can override the game version in PKSV's decompile dialog, but I'll have to check if you can do so from the command line as well. Of course, PKSV also doesn't support text in either of those languages, so script editing would be a bit limited for those anyway...

It's even worse than that, I noticed that the Japanese version of Crystal often requires you to use the Gold/Silver encoding instead of the Crystal encoding.

Last edited by Armada (2014-05-05 19:34:40)

Offline

#20 2014-05-05 20:43:23

xdanieldzd
Member
Registered: 2014-04-23
Post 6/10

Re: G2Map - Pokemon Generation 2 map editor

Armada:

- A sneak peek in form of a "beta-ish" build for you guys to test out will probably come soon, not least because some feedback from hands-on testing, regarding the newly added features compared to v0.1 in particular, would be quite useful to have.
- I can re-add the ROM offset display, and thinking about it, I'm not sure why I removed it in the first place... Just ignore that it's missing in that screenshot and consider it never gone :)
- I did change the byte order of the script pointers when I reworked the event properties dialog, yeah; I'll likely change it for the other instances where pointers are displayed in the program, too, like ex. in the map properties dialog.
- That sucks to hear about PKSV... Is that program still being worked on? Supporting Japanese and Korean text might be a bit much to ask for, but maybe the author could be poked to try and fix those script parsing errors...

Offline

#21 2014-05-05 22:09:56

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

Re: G2Map - Pokemon Generation 2 map editor

I notice you've kept the Flag Index and Flag Bit fields from other editors. These are actually one 16-bit value.

It looks like Treehouse took some liberties with event scripting in Crystal and added commands of their own (namely 3writetext). JP Crystal already had new commands to begin with, and the Korean version is probably different too.

score_under stopped working on pksv a few years ago. He released the source to pksv-ui, but not the backend. If you bug him he'll probably give it out.

Last edited by comet (2014-05-05 22:10:28)

Offline

#22 2014-05-06 06:23:41

Chamber_
Member
Registered: 2013-12-31
Post 55/119

Re: G2Map - Pokemon Generation 2 map editor

I would like to help test the tool before the official version is releasedt, especially with the Spanish language.

You can add support of overworl graphics? First that is look into the map like a Johotmap, and second,  support the expansión of graphics to look at the new additions without trouble.

Sorry for my bad english.

Offline

#23 2014-05-07 09:15:41

xdanieldzd
Member
Registered: 2014-04-23
Post 7/10

Re: G2Map - Pokemon Generation 2 map editor

comet: I can merge the two Flag fields into one, sure - and it's these flags, right? In fact, what's the most up-to-date document about event properties, so that I can make sure the descriptions in G2Map match up with how each of the options is commonly called? Sorry if I might be sounding a bit n00b-ish here, but this is more or less my reentry into GSC hacking after many years ^^"

Chamber_: An editor for the Johto and Kanto overworld maps? That's a good idea, although it probably won't make it into the next version just yet. Speaking of which, what I do want to finish up before posting a test build is 1) the tileset editor and 2), as mentioned before, putting all the version-specific offsets into a separate XML file. Once those are done, I'll post a build for everyone to test.

Offline

#24 2014-05-08 05:50:50

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

Re: G2Map - Pokemon Generation 2 map editor

Yes. Here's a list of some of the event flags in Crystal.
https://github.com/kanzure/pokecrystal/ … _flags.asm

A significant amount of the missing flags are items. Naming the rest is a matter of looking up where they're used.

Offline

#25 2014-05-08 16:30:09

Armada
New member
Registered: 2014-05-03
Post 3/9

Re: G2Map - Pokemon Generation 2 map editor

comet wrote:

Yes. Here's a list of some of the event flags in Crystal.
https://github.com/kanzure/pokecrystal/ … _flags.asm

A significant amount of the missing flags are items. Naming the rest is a matter of looking up where they're used.

And this also does not cover the event flags in the Japanese version.

Offline

Board footer

Powered by FluxBB