Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2178.0;prev_next=preve:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexee51.htmldelayedslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2178.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexee51.html.zx g^Ћ&OKtext/htmlISO-8859-1gzip@&HTue, 10 Mar 2020 03:52:09 GMT0 0P g^& Overworld Map Editing Questions

Author Topic: Overworld Map Editing Questions  (Read 751 times)

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Overworld Map Editing Questions
« on: April 07, 2016, 01:47:30 PM »
So on a whim I searched Google for an overworld editor, and stumbled across Yousei's FF4 Editor via reading about it in one of the pages of the FF4kster development thread. It was an enlightening read, for sure!

Since this editor ony works with a headered 1.0 rom, I figure I could do the world map editing on the 1.0 rom, open that rom and my project in HxD, and carry over said changes over to my project after some fun trial and error!

Now, my main concerns with this method are:

* I don't know where the data for the world maps are offset-wise. Are the world maps' data lumped together with the rest of the game's maps?
If so, would my large amount of free map space (over 2000 bytes atm) be of any use in editing the world maps? I assume not, but figure it be wise to ask nonetheless.

* I'm not particularly sure how the data is stored per line of tiles. Right now I'm going with the assumption it's stored in a manner like other maps, reading how many of what tile (probably in a ## ## byte fashon, one byte being the type of tile and the other being the amount of them).

* This one I assume is plausible based on editing other maps - replacing some details on the map to free up space for other details elsewhere on the map. An example: replacing the speckled red tile used for detail on the northern walls of the Underworld with the solid-colored dark tile seen on the southern end of the map.

* Now this one is the big concern - how would FF4kster react to changed Overworld maps? I imagine if I kept their sizes about as close to the originals (or less) it wouldn't hurt anything, but what if I managed to make them bigger than before? Would I end up running into some problems with this method?

I know this is a larger barrage of questions than I usually throw out there, but garnering the info (or some of it, at least) will help me figure just how much alteration to the world maps I can achieve without the game falling apart. Any amount of info, big or small, is highly appreciated!
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Overworld Map Editing Questions
« Reply #1 on: April 07, 2016, 04:33:30 PM »
"Yup" and "should be fine" are the answers to most of your questions.
Yousei's editor comes packaged with his "ffiv.txt" document, which is the most complete ROM map to date for the game. World map data is in the same place in versions 1.0 and 1.1, so after making your edits, you can just copy the data directly from one to the other. ("World map formation pointers" and "world map formation data" or something along those lines is how he refers to the data in question in his document - and bear in mind that Yousei's offsets assume a header, so subtract 200(h) if you are headerless). I've only made edits that, in effect, shrink or maintain the amount of space used, so I can assure you FF4kster will be OK with either of those possibilities. Don't know what will happen if you increase space. It depends on what follows world map formation data in ROM. It's worth noting here, though, that Yousei's utility will resize (expand) your ROM automatically if you expand the formation data beyond its natural limit. The process will, in effect, relocate ALL of the world map formation data to a new bank in ROM. this will a) make it harder to copy into your own project and b) make it incompatible with FF4kster, assuming you keep the expansion. So I'd recommend not using more than the originally allocated space.
Oh, yeah, and the format is one byte for a single tile (say, "19" IIRC for one tile of ocean on its own) and two bytes for more than one of the same tile ("99 03" for four tiles of ocean, where adding 80 indicates the multiple and "two" is signified by 01, etc). The only difference in format between world map data and location map data is that in locations, a row is terminated with an "FF," but it is not in the world map (the next row simply begins where the previous row ended, and the row pointers take care of indicating the terminus). But that last bit is porobably more than you need to know if you're using yousei's editor.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Overworld Map Editing Questions
« Reply #2 on: April 08, 2016, 05:11:45 PM »
Awesome!

Quote
"World map formation pointers" and "world map formation data" or something along those lines is how he refers to the data in question in his document


I think I found what you were talking about:

Code: [Select]
0x007CEC BF 00 80 16 LDA $168000, X Overworld pointers ($168000 == 0xB0200)
0x007CF2 BF 01 80 16 LDA $168001, X
0x007CFA BF 80 84 16 LDA $168480, X Overworld data ($168480 == 0xB0680)
0x007D03 BF 81 84 16 LDA $168481, X [New location:  $208000 == 0x100200]

0x007D7A BF 00 82 16 LDA $168200, X Underground pointers ($168200 == 0xB0400)
0x007D80 BF 01 82 16 LDA $168201, X
0x007D88 BF 80 C4 16 LDA $16C480, X Underground data? ($16C480 == 0xB4680)
0x007D91 BF 81 C4 16 LDA $16C481, X [New location:  $228000 == 0x110200]

0x007DC7 BF 00 84 16 LDA $168400, X Moon pointers ($168400 == 0xB0600)
0x007DCD BF 01 84 16 LDA $168401, X
0x007DD5 BF 80 E1 16 LDA $16E180, X Moon data? ($16E180 == 0xB6380)
0x007DDE BF 81 E1 16 LDA $16E181, X [New location:  $248000 == 0x120200]

Time for the fun part of attempting to insert my edits!



 :edit: It worked! Thank you so much for the help, Chillyfeez!

I now have more locations, more landmass on the main continents, less pointless tiny islands, more free triggers, and plenty of space for more terraforming later. I'm happier than a pig in shit. :D

« Last Edit: April 08, 2016, 05:59:24 PM by Bahamut ZERO »
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!