øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1286.msg12972e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index093e.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1286.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index093e.html.zx´qg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈЉ>OKtext/htmlISO-8859-1gzip0|Ö‰>ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 11:10:03 GMT0ó°° ®0®P®€§²ð®³qg^ÿÿÿÿÿÿÿÿ:3‰> Custom Map Making (Courtesy of FF4 Tools v1.1)

Author Topic: Custom Map Making (Courtesy of FF4 Tools v1.1)  (Read 13564 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Custom Map Making (Courtesy of FF4 Tools v1.1)
« on: December 17, 2009, 01:44:17 PM »
As an aside from my main hobby I've been playing around with the map creator in FF4 Tools (fantastically well made, by the way) and I think as a little project, I would think to facelift the dungeons. As much as I love FF4:The After Years, I was a little disappointed they didn't do much with the established maps. Well, I plan on remedying that. Unfortunately I can't move NPC's or Treasure (to my knowledge?) if I could, I would certainly place treasure differently, but alas... for now this is fine, well here's my map.

Now I did do a little event editing (once again thanks to the wonderful FF4 Tools) and despite how it looks there, it's not as simple as walking up to the Mist Dragon, if possible I would love to combine these mini map projects with Deathlike2's hack. I also strongly encourage more people to get into map editing, this tool is fantastic, and if I can create... well anything with my measly skills, then I am sure artists would have an absolute field day with this!




Only one thing with this though... I've tried to edit the text with the tool, and well... it does work, but the problem is that a know nothing such as myself is unaware of the location of the text pointers, if someone could point that out (and where they re supposed to be replaced in ROM) it would be a great help.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #1 on: December 18, 2009, 12:26:45 AM »
Glad you find the tools helpful. I created them in the hope that some quality FF4 hacks might start appearing. I'm looking forward to seeing what you create!

In terms of changing NPC and chest locations, it's easy enough to do, you just have to know where the data is. For chests, it's located at A8500 (FF2us ROM with header). For NPC placement, it's at 98500 (FF2us ROM with header). The byte meanings and all the offsets and data for both of these are listed in the text files in this zip file. Be aware that if you add a chest to a map, you'll need to delete one somewhere else -- the ROM can only keep track of 256 chests in the overworld (and 256 in the underworld/moon).

The text bank pointers and data locations are as follows:

Code: [Select]
77400-77573 Battle Dialogue Pointers (2 bytes each, reverse and add 0x68200)
77574-781FF Battle Dialogue (separated by 0x00s, max of 24 characters, non-DTE)

7B200-7B275 Battle Message Pointers (2 bytes, reverse and add 0x70200)
7B276-7B5FF Battle Message Text (separated by 0x00s, max of 24 characters, non-DTE)

7B600-7B63F Abnormal Status Text Pointers (2 bytes, reverse and add 0x70200)
7B640-7B6FF Abnormal Status Text Data (separated by 0x00s, max of 8 characters, non-DTE)

80200-805FF Dialogue Bank 1 Pointers (2 bytes, reverse and add 0x80600)
80600-881FF Dialogue Bank 1 Data (each window is terminated by 0x00 and is 26 characters wide)

88200-884FF Dialogue Bank 2 Pointers (2 bytes, reverse and add 0x88500)
88500-901FF Dialogue Bank 2 Data (each window is terminated by 0x00 and is 26 characters wide)

9A700-9A8FF Dialogue Bank 3 Pointers (2 bytes, reverse and add 0x9A900)
9A900-9D3FF Dialogue Bank 3 Data (each window is terminated by 0x00 and is 26 characters wide)

I didn't realize I hadn't included that information in the Name/Dialogue editor. I'll do that in the next release.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #2 on: December 18, 2009, 01:23:50 AM »
Fantastic information!  Thank you very much, oh yes, one other thing I came across. I plan on working on another mini dungeon once you leave the Mist Cave (calling it "Illusor") Not really "planned." the layout is already finished, it's going to be replacing Tomra, only...a few problems and questions on the matter. Is it possible to put the Mist from Mist Cave over this map? Also, Tomra seems to use a unique palette then what is shown in the editor (but I take it that's because there's a special underworld palette, if I had to guess). I wouldn't mind it at all, if water didn't appear as lava, haha! (though for the record, Lava Waterfalls are pretty neat to look at) If possible to change just that in it's palette that would be ideal.

Also, I've noticed some very extensive hacking, but nothing on the exit code? I've changed the location of a few doors, yet they all lead to... well places they shouldn't. I didn't touch the location of the Tomra Treasure House (because I plan for a few things there.) But the other two exits both seem to lead to random spots, depended on which NPC I loaded Tomra from (using that method for quick transport). Oh yes, is it possible to place encounters in maps that originally did not have encounters? As using the monicker "mini-dungeon" would apply I'd hope I could put encounters of some sort there, heh. If I could get rid or morph the Dwarves of Tomra, that would be Fantastic! Oh yes, here's a shot of the place, as it currently looks. (What's done with the area to the upper right corner will depend on what actions I can take.)





It's meant to be Slightly mazish... but of course with the map displayed as such, the mystery (when played in the actual game) is sapped out, but eh well. It should still prove interesting.


« Last Edit: December 18, 2009, 01:29:23 AM by Grimoire LD »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #3 on: December 18, 2009, 06:36:37 AM »
Phoenix has done a lot more with map editing than me, so I'll let him answer your exit and NPC questions. The palette is determined in the map's header, which starts at offset 0xA8E84 in a headered FF2us ROM. There's documentation of them in this post:

http://slickproductions.org/forum/index.php?topic=382.msg11290#msg11290

You'll also notice the background index and background movement bytes. Those will let you create the mist effect, but you'll need to add a mist tile to the town tileset, replacing something else, since it isn't loaded there. The background index is pretty cool, it wasn't utilized by the game nearly enough, and can create some pretty cool effects (the parallax effect in the watery cave was always impressive to me, and I couldn't figure out why they never used it anywhere else).

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #4 on: December 18, 2009, 10:06:11 AM »
All the info on NPCs is in the documentation in the file. You'll have to hex edit the data yourself to change which NPCs appear where. For example, the NPC Placement data in Tomra is:

Code: [Select]
Offset: 9918B
1D 8F 15 BA
01 93 0E 7B
02 84 17 F8
03 8C 05 39
04 9B 17 39
05 9C 16 BA
00

This means that it uses NPCs 1D, 01, 02, 03, 04, and 05 of the Underground/Moon set (take a look at the NPCs document to find out which sprites and speech data these NPCs use). Probably the easiest to do is edit the sprite value and speech data of these NPCs.

Exits (like treasure chests) are also triggers. Take a look at that document. You'll have to change the (x,y) coordinates of the exit triggers to line up with the trigger tiles (the ones with the red dots or arrows).

I've gathered a little more information on the map properties (or map headers), so I'll reiterate it here:

Code: [Select]
================================================
Location Properties (A9E84-AB203) 13 bytes each
================================================
00: Battle/Spell Properties
bits 0-3: Battle Background
0: Grass 8: Magnes/Sealed Cave
1: Forest 9: Desert
2: Mountain A: Beach
3: Castle B: Land of Monsters/Sylphs
4: Cave C: Tower of Zot
5: Moon D: Lunar Subterrane
6: Ship E: Crystal Room
7: Water F: Underground
bit 4: Warp can be cast
bit 5: Exit can be cast
bit 6: Use alternate palette if available (backgrounds 0, 4, 7, 8, B, C)
bit 7: Battles have magnetic effect if event flag E1 is set
01: Map Index
02: Tileset Index
00: Airship 08: Big Whale
01: Lunar Core 09: Land of Monsters/Sylphs
02: Magnes/Sealed Cave 0A: Tower
03: Castle Exterior 0B: Giant
04: Town 0C: Lunar Subterrane
05: House 0D: Mountain
06: Castle Interior 0E: Cave
07: Crystal Room 0F: Ship
03: NPC Placement Index
04: Border Tile Index
bits 0-6: Border Tile Index
bit 7: ?
05: Map Palette Index
06: NPC Palette Index
bits 0-3: NPC Palette Indices 1 & 2
0000: Palettes 01 & 02
0001: Palettes 03 & 04
etc.
bits 4-7: NPC Palette Indices 3 & 4
same as above
07: Music Index
08: Background Index
09: Background Movement
bit 0: Background is transparent when walking under (such as lakes)
bit 1: Vertical Background Relative Movement
bit 2: Horizontal Background Relative Movement
bit 3: ?
bits 4-5: Direction
00: Up
01: Right
10: Down
11: Left
bit 6-7: Speed (Absolute Movement / Relative Movement)
00: None / None
01: Slow / Moves slowly in character's direction
10: Medium / Moves in character's direction
11: Fast / Moves opposite to character's direction
0A: Map Set From Which to Load
01: Load map from Underground/Moon set
80: Load NPCs from Underground/Moon set
0B: Map Name Index
0C: Treasure Contents Index

I'm working on adding loading the tilesets from the ROM and being able to choose the palette and some other map properties, so you'll be able to do that in the next release.

One thing you should note: if you're loading this map directly from the Overworld, you won't be able to use Tomra's map, since the index for it is in the Underground/Moon set. You could load it from another location map (because the triggers have the ability to do that) but the Overworld triggers don't. Good luck.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #5 on: December 18, 2009, 11:22:42 AM »
Well on that, I had planned to use it as a direct warp from the Mist Cave to the town. Though yes... because it is an Underworld map, I don't think I can use the Mist Cave background, I could alter the Sylph Cave background and modify that. Though the game does seem to use a normal background of (what would normally be water, but is lava in the Underworld, palette no doubt)...

     Well I did the Sylvan cave background switch and unfortunately, well it does look good, but the problem is that it illuminates the hidden passages, haha! Talk about missing the point with that...

Also the previous information given in this thread has helped immensely, it's using the Land of Summoned Monsters music, the dwarves will be "hooded" and will be enemies. I will take a closer look at exits down the line, though I can't seem to get random encounters to happen there, it might be something basic that I'm missing though. It's not based on Map Index or anything of that sort, is it? Also once again, great research on all this! I can't wait to see some of this in the next editor (for ease of use)

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #6 on: December 19, 2009, 07:44:00 AM »
Sorry, I forgot about the encounters. To edit those, you'll need three bits of information:

Code: [Select]
74500-74741 Probability of Enemy Encounter (byte/FF % chance)
74500-7453F For the Overworld (1 byte per 32x32 tile region)
74540 For the Underground (1 byte for the entire map)
74541 For the Moon (1 byte for the entire map)
74542-74741 For Locations (1 byte per location)
74742-74995 Enemy Encounter Indexes (reference the Enemy Encounter Tables)
74742-74781 For the Overworld (1 byte per 32x32 tile region)
74782-74791 For the Underground (1 byte per 32x32 tile region)
74792-74795 For the Moon (1 byte per 32x32 tile region)
74796-74995 For Locations (1 byte per location)
74996-74A15 Enemy Encounter Table for World Maps (1 byte per enemy set, 8 possible enemy sets per entry)
74A16-74C95 Enemy Encounter Table for Locations (1 byte per enemy set, 8 possible enemy sets per entry)

You can leave the Encounter Tables as is (unless you want to change possible enemy sets up), all you'd need to do is edit the Probability from 00 and change the Encounter Index to whichever enemy sets you wanted.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #7 on: December 19, 2009, 09:40:40 AM »
Phew, so every area can potentially support random battles? That is a rellief... Thank you very much for all the information and I look forward to showing some progress soon.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #8 on: December 19, 2009, 10:10:27 PM »
Hmm, well I hit a slight roadblock... I followed the instructions in your post to the T Phoenix, yet no monsters would appear in Tomra, I thought there was definitely something I was doing wrong, but I checked and rechecked the data, so instead I tried this data on the Mist Cave, and assuredly I could control the encounter rate and the enemy encounters themselves, so in a last ditch effort to see if there was something I was doing wrong, I tried to make Baron compatible with random enconters, and oddly enough it did not work. Is there any step I'm missing here?

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #9 on: December 19, 2009, 11:21:45 PM »
Yes, I didn't think about it, but the town tileset probably isn't set to load encounters by default. You'll need to edit the tile properties. Here's the info:

Code: [Select]
Location Map Tile Properties are located from A1000 to A1FFF.
Tiles are 2 bytes each, using the following format:

Byte 0:
bit 0: Layer 1
bit 1: Layer 2
bit 2: Same layer on opposite side (Transition or Bridge Layer)
bit 3: ?
bit 4: Closed door tile
bits 5-7: ?
Byte 1:
bits 0-2: ?
bit 3: Bottom half is in front of the character
bit 4: Load previous map at previous location (Location Trigger)
bit 5: ?
bit 6: Enemy encounters possible
bit 7: Check tile’s location in [Location Trigger Data]

Change bit 6 of the second byte to 1 to enable enemy encounters. For instance, the town tileset starts at A1400. The first tile there is 0100 (so the second byte in binary is 00000000). If you wanted encounters on this tile, you would change it to 0140 (second byte in binary: 01000000). Hopefully that should be the last piece of information you need.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #10 on: December 19, 2009, 11:46:42 PM »
Ah hah! Fantastic! That did the trick! Thank you very much Phoenix. Now I can truly get started on this little project, hehe.

bond697

  • FF4 Archivist
  • *
  • Posts: 624
  • Gender: Male
  • is NOT a spoony bard!
    • View Profile
    • The FF4 Reference Book
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #11 on: December 20, 2009, 04:05:34 PM »
data

can i steal that info(and the info posted above), phoenix, along with those text documents you posted a few days ago?  i'm going to sit down for a couple hours next weekend and add all the new info i can find to the archive site.  i finally got some decent hosting(read: loads of space and bandwidth), too, so it's at rb.thundaga.com now.
The FF4 Reference Book - Now with new hosting!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #12 on: December 20, 2009, 04:07:47 PM »
Hmm... I noticed in Zyrthofar's beta editor, that in those four bytes there's quite a bit controlled. The location of course, I'm guessing it looks at that other list for Sprite Number, but here it has Walking Event, Event turns when spoken to, Walking Animation, Can Walk Through (1), Can Walk Through (2) and 3 unknown bits. You pointed me towards the NPC Palette, so I don't think that's very important and direction, now I am to guess this is readily available info. if a viewer has it, only problem is, I'm not sure where that info is.


Edit: Great respository of information Bond697, a nice trip down memory lane with the US Manual (heh, it's funny, they still reference Tellah having Recall and say that the Hand Axe exists, but even they don't have its stats...)
« Last Edit: December 20, 2009, 04:58:24 PM by Grimoire LD »

bond697

  • FF4 Archivist
  • *
  • Posts: 624
  • Gender: Male
  • is NOT a spoony bard!
    • View Profile
    • The FF4 Reference Book
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #13 on: December 20, 2009, 04:13:56 PM »
do you have both of his editors?  not that it makes a difference for what you're doing, but it couldn't hurt to have.
The FF4 Reference Book - Now with new hosting!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Custom Map Making (Courtesy of FF4 Tools v1.1)
« Reply #14 on: December 20, 2009, 04:59:53 PM »
Indeed, as has been told to me, both are basically neccessary because of functions not working in the other. They are great tools though. I hope to see the beta one complete one of these days, hehe.