PDA

View Full Version : FF3/6 NPC, Event, Dialogue, Ect... Question


sleepydude
01-20-2007, 12:09 AM
So, I'm working on adding to the my map editor the capability to view, and edit the NPC's, treasure chests, entrances and events on the maps. In addition to that I'm adding an events/ dialogue editor. Right now it's mostly all just viewable (the events are only partially viewable, I'm still working on coding in all the hundreds of commands, and it's really boring), but I'm trying to think ahead to the editing a bit. What I'm wondering is if there's a good way of adding the ability to add additional NPC's and such to a given map. The pointer system used by the game seems to exclude that possibility. With the dialogue as well there seems to be no good way of really editing the text without severe space constraints because expanding one block of text will overwrite another and the two byte pointers don't really allow for much movement of data. Any ideas?
<P ID="signature"></P>

Lenophis
01-20-2007, 12:51 AM
<blockquote><font class="small">In reply to:</font><hr>

(the events are only partially viewable, I'm still working on coding in all the hundreds of commands, and it's really boring),

<hr></blockquote>
Tell me about it.

<blockquote><font class="small">In reply to:</font><hr>

What I'm wondering is if there's a good way of adding the ability to add additional NPC's and such to a given map. The pointer system used by the game seems to exclude that possibility.

<hr></blockquote>
It's possible, but if memory serves there's only room for about another 9 NPC's in that block of data anyway. You'd probably want to move the NPC data somewhere else entirely before trying to expand them. Imzogelmo and Novaila will probably know more about this though.

<blockquote><font class="small">In reply to:</font><hr>

With the dialogue as well there seems to be no good way of really editing the text without severe space constraints because expanding one block of text will overwrite another and the two byte pointers don't
really allow for much movement of data. Any ideas?

<hr></blockquote>
Yes:
1: Expand the rom
2: Move the dialogue (and the pointers)
3: Make the pointers 24-bit.

I can help ya out with steps 2 and 3, PM me if you are interested.
<P ID="signature"><img src=http://dragonsbrethren.elazulspad.net/images/lenorhdnsignature.png></P>

Imzogelmo
02-01-2007, 08:22 AM
For NPCs, chests, and tile triggers (which accounts for many events, but not all), the only way to add to a given map is to change the pointers and relocate the data for all subsequent maps. Since the designers didn't leave much extra room at any of these data blocks, the best bet would be to move them to a larger, free data block, and change the code to load them from the new place.

Since tile triggers come right before NPCs, moving either of those would make for a large space for the non-moved ones.

Another consideration is the event bits to turn on/off NPCs (a group of which can share a single bit, if desired), and the bits to mark chests as open (there are actually several of these unused, so no problem there).

Hope that wasn't too confusing; I try to explain this from time to time, but it's not a standard type of pointer, so it's a bit hard to explain.
<P ID="signature"></P>

sleepydude
02-06-2007, 03:08 AM
I'll probably just change the way the game reads the NPC, and such pointers to just read standard 3 byte pointers, and add a fourth byte to let the game know how many objects there are. That way I can just add more easily and manage the data more simply. I love expanded roms, there's so much more space. One question though, turning on/off NPC's and events is something that can be handeled by editing the event themselves, so that's no problem, but in regards to the chest open/not opened data, that must be stored in the RAM, so there's probably a pretty strict limit to how many more you can add, right? Has anyone ever tried to compress these in any way?
<P ID="signature"></P>

sleepydude
02-08-2007, 04:04 AM
I'm not worried about where the chests data in the ROM, only the RAM. I've given a lot of thought to it and the two best ideas I could come up with to expand the amound of chests allowed by the chest status data in the RAM are either to change things so that once the a player has gotten through the WoB to reset all the chests to closed (except those few that are in both the WoB and WoR) so I could use the status bits twice, effectively allowing for twice the amount of chests, or I could just overwrite something like the "Sword techniques names in japanese game, 6 bytes per name" stored from 1CF8-1D27 since they aren't important in the English game. The only potential drawback I see to option 2 is that space might still be written to by some routine, but it was allow greater creative flexibility and up to 376 more chests than in the original game. I was wondering which people thought was a better idea.
<P ID="signature"></P>