Author Topic: Developing FF4kster: a comprehensive editor for FF4  (Read 246586 times)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #195 on: January 09, 2013, 06:49:35 AM »
Ok, the message editor is now complete.

This update introduces a new input component -- a multi-line text message input box. This one has a visible cursor and the controls work more or less the way you would expect:

Arrows: Move cursor without changing text.
Home: Move cursor to beginning of the current line.
End: Move cursor to end of the current line of text.
Enter: Move cursor to beginning of next line (note that this does not insert an "end of line" character into the text; more on that to follow)
Backspace: Move the cursor one character back and delete that character (moves the rest of the text back).
Delete: Leave the cursor where it is and delete the current character (moves the rest of the text back).
Insert: Insert a special character or code. A separate menu will appear from which you can pick some common codes or a symbol.
Esc: Done editing / commit changes.

There are some special codes that the multiline text input recognizes and converts to the FF4-text equivalent:
  • Certain letter pairs: The text encoding always uses dual-character encoding whenever possible. Thus if you type "th" it will not result in a 't' followed by an 'h' in the rom but rather the single-byte code for the letter pair 'th'. This shouldn't affect your normal typing in any way; you can just type normal letters the way you expect them to appear and the editor will covert it automatically.

  • End of line: Even if you press enter to go down to the next line in the text input box, that will not create a new line character in the text encoding. To do this, use the slash character '/'.

  • Names: If you simply type out a name like "Cecil" or "Yang" then if the player changes that character's name, the dialogue will not be affected in your message. If you want to refer to a character's name, use "/name##" where the # symbols are replaced with the digits comprising the name index you're looking for (so for "Cecil" you would type "/name00" or for "Yang", "/name06"). In the "insert menu" you can select "Name" to bring up a list of names. Selecting one will also insert the code for that name into the text (though you can still type it out manually if you prefer).

  • Songs: There is a special character reserved in the text ecoding for causing the game to change to a different track of music when it displays the dialogue. To achieve this effect in the multiline text input, type "/song##" with the # symbols replaced with the digits for the index of the song you wish to play. As with names, the "insert menu" contains an option which will bring up a list of the songs in the game that you can choose one from and it will insert the appropriate code into the text for you.

  • Delay: You can cause the game to ignore user input for a certain amount of time to prevent them from prematurely advancing the text (you can see this effect in messages such as "Karate Man Yang joined!" or "Cecil became a Paladin!"). To insert wait time, type "/wait###", replacing the # symbols with a number representing the amount of time you wish to force the user to wait.

  • Unknown codes There are some characters that exist in the font but their use is currently unknown (Hex codes 0A to 20). In the unlikely event that you wish to type one of these characters, type "/chr##", replacing the # symbols with the decimal representation of the index of the symbol you want.

  • Slash: Since many of these codes use the slash symbol '/', if you need the text to have an actual slash character in there, this can be achieved by typing "/slash". So for example if you want your message to say "4/10" then you would type "4/slash10"

In addition, at all times a preview appears of the message you're editing, the way it will (hopefully) look when displayed in the game. This preview is constantly updated as you type.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #196 on: January 09, 2013, 10:57:34 AM »
Wonderful! I will have to test this as soon as I can and write my impressions.

 :edit: While browsing the FFWikia I noticed some reference to a place called the "Zemus Zone" and that there's unused text regarding it. I scoffed, since I thought I had seen all of the unused text in the game, but it seems that no, the Zemus Zone is a real message and could be an unused area name. I wonder what that was going to be used for. I mean, how dare they actually have the main villain of the game say anything before you reach him!

 :edit: 2, hmm. It seems if the message is longer than the original there are unintended circumstances. I changed the first Baron Town message to something a little bit longer and at the end of it, the fellow broke into different events (Clerics Permission in this instance). What's worse is that every NPC had this message. If you keep it within the original limits though, everything works as you would expect it to.

 :edit: 3 Taking a look at some of the unknown characters...

The majority all appear to be parts of various windows with the pointer cursor thrown in there.

 :edit: 4 After editing "Won!" To see what those Codes do in the battle scenarios, I came to the realization after winning a battle that "Won!" never actually seems to appear. How ironic.
« Last Edit: January 09, 2013, 01:13:39 PM by Grimoire LD »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #197 on: January 09, 2013, 01:09:12 PM »
There's more unused dialogue than that. Ignore Wikia and check out the Cutting Room Floor FF4 article. I wrote most of that one. (Which reminds me, I need to do the menu text which is accidentally terminated or not given proper coordinates.)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #198 on: January 09, 2013, 01:16:11 PM »
Oh I'm well aware of (most) of the unused dialogue, things like Dark Knight Cecil reference while fighting Yang to get him to say a couple more lines, something that is only said if Tellah can survive the onslaught from the Dark Elf (fat chance of that), things like that. I recall you had a couple videos of it up a while back. They were pretty informative. I should re-read the article again, as I recall it was really good.

 :edit: Looks like the CODE:0-4 are things dealing with after battle. (Or in CODE:3's case the item that Edge steals from an enemy.)

CODE: 0 - GP Obtained/Lost
CODE: 1 - EXP Obtained
CODE: 2 - Character
CODE: 3 - Item Stolen from Enemy
CODE: 4 - Spell Learned

I'm curious now to know if these work automatically.. Like let's say instead of items you steal GP from enemies, hmm... I'll have to try that out.

 :edit: 2 That would be a "No." While the game will display a different amount (in this case I believe it will show the Decimal Number of the item that would be stolen) (206=Cure1) it will still be a Cure 1 you are stealing. That could shed some light on possibly changing Steal (to make it semi-useful) but we'll see down the line I guess.


 :edit: 3 Actually I'd never read this article. I must have been thinking of something else. There is some really interesting stuff in there. Though I do think that Rydia's text about "living here" and "finding something useful" may have actually been her Mist house, because it Definitely has something useful there, unlike her home in the Land of Summoned Monsters. And that text jumps around so much it's kind of difficult at times to tell where things should be placed (that is unless it's an actual Map Message, then there's no doubt)

« Last Edit: January 09, 2013, 01:44:13 PM by Grimoire LD »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #199 on: January 09, 2013, 01:53:32 PM »
There's actually a kind of order to the dialogue's chaos, and it's pretty easy to tell which lines were added later, after the majority had been written, because they're just thrown into otherwise ordered conversations randomly. So I'm almost certain Rydia's text was for the land of summoned monsters, because all of the text there is consistent with that location.

PinkPuff, I'd suggest padding out character names out to six characters with blank spaces. It'll make the text preview a bit ugly, but it'll stop people from writing dialogue that gets cut off when someone renames a character to have a longer name.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #200 on: January 09, 2013, 05:01:58 PM »
Hmm, I'm still having trouble locating that message, but from the way its written it sounds like it appears in the Land of Summoned Monsters text area, just may have passed it up.

Everything is looking solid. I only have one suggestion and I'm not sure how difficult it would be to implement. Is it possible to have the message be edited from the very NPC option? I noticed you added the Sprite and NPC identifier in which makes identification unnecessary and in the process makes things so much easier to read.

Like say for Mist, there are a lot of Bank 2 message references. Granted all one would need to do is keep a mental record of which line it corresponds to and move on from there, but to cut down on time and accessibility, being able to edit it from there would help things move along at a steadier pace.

But that's merely for later. I think for now you have nearly all text matters done (only thing missing are location names). As for Location Data there is still the Map Data (which JCE3000GT's Map Variables Editor can change) and that should be it as far as maps and events are concerned. I am curious to know what direction you plan from there? You've made a great tool so far and I am looking forward to the future of it!

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #201 on: January 09, 2013, 10:05:42 PM »
Oh I'm well aware of (most) of the unused dialogue, things like Dark Knight Cecil reference while fighting Yang to get him to say a couple more lines, something that is only said if Tellah can survive the onslaught from the Dark Elf (fat chance of that), things like that. I recall you had a couple videos of it up a while back. They were pretty informative. I should re-read the article again, as I recall it was really good.

All you need is a little Reflect... but he's the first one to go when you fail anyways.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #202 on: January 09, 2013, 10:23:48 PM »
I thought of that, yeah. Would Tellah have enough speed though to cast it though? Though I guess by now there's a Mirror Curtain available (at least one, maybe?)

 :edit: http://slickproductions.org/forum/index.php?topic=1769.0 This might be the thread you were looking for PinkPuff in regards to World Map Triggers.
« Last Edit: January 09, 2013, 10:39:07 PM by Grimoire LD »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #203 on: January 10, 2013, 07:53:38 AM »
PinkPuff, I'd suggest padding out character names out to six characters with blank spaces. It'll make the text preview a bit ugly, but it'll stop people from writing dialogue that gets cut off when someone renames a character to have a longer name.

Both have their advantages. What about if it were to look normal when you preview it from the main dialogue select menu, but padded while typing?

Everything is looking solid. I only have one suggestion and I'm not sure how difficult it would be to implement. Is it possible to have the message be edited from the very NPC option? I noticed you added the Sprite and NPC identifier in which makes identification unnecessary and in the process makes things so much easier to read.

Like say for Mist, there are a lot of Bank 2 message references. Granted all one would need to do is keep a mental record of which line it corresponds to and move on from there, but to cut down on time and accessibility, being able to edit it from there would help things move along at a steadier pace.

I thought of this during design but while it's technically possible to do I decided against it due to the potential awkwardness.

To illustrate, the Mist example you used, where the NPCs are not actually speaking messages in their parameter list, but just using those "show message x from bank 2" event calls, you may notice I don't even have a preview of the text there for those. The reason is that, with the message parameters, you know they're always messages, and you know what map they're from (since you know what map the NPC is from). With the event calls like the ones in Mist, at first you might be tempted to think, "well we know this block of events are all just a single line of 'show message x from bank 2' and we know what map the NPC is from, so we can just have any NPC with a trigger that calls one of those events to show it" but there are a couple of problems.

First, suppose you have an NPC's speech set up as follows:
* If Flag 1 on, call event "show message 1 from bank 2"
* If Flag 2 on, call event "show message 2 from bank 2"
* -- always --, call event "show message 3 from bank 2"
How would one expect a preview of all of those to look? At first you might say "well just have it preview one when you cursor over it in the event select component of the menu", but then the problem arises that nothing is stopping the user from going into the actual event editor and changing the event that used to simply consist of a single line "show message x from bank 2" into an entire plot scene, or something completely different altogether. Even though the game defaults to having that section of events devoted to simple bank 2 calls, nothing is forcing it to be that way, especially after using this editor.

So maybe we can just have it search each event when you highlight it for bank 2 references? This is possible but would likely be more time consuming at run-time than it's worth. Plus, what if one event has a whole bunch of bank 2 references? Do we preview all of them? If not, which? The first one?

So I think it's probably ok the way it is. I know it may be a bit of a pain to go back and forth between editors, but if you're doing small changes, then it should be easy to put up with, and if you're doing a large project then chances are you probably have your planned NPCs and dialogues and such already written out in another form anyway (or if not then it's a good idea to do, regardless).

But that's merely for later. I think for now you have nearly all text matters done (only thing missing are location names). As for Location Data there is still the Map Data (which JCE3000GT's Map Variables Editor can change) and that should be it as far as maps and events are concerned. I am curious to know what direction you plan from there? You've made a great tool so far and I am looking forward to the future of it!

Thanks! Glad to hear people are enjoying it and finding it useful. Positive feedback always helps motivate me to keep working on it!  :childish:

Yup, map properties are probably next, and actually I had planned to include the map names with that component (rather than with the dialogues and messages/alerts).

As far as maps and events are concerned there actually are a couple more things on the table. One is obviously overworld triggers. I had a look at the info here:

:edit: http://slickproductions.org/forum/index.php?topic=1769.0 This might be the thread you were looking for PinkPuff in regards to World Map Triggers.

... but as far as I can tell it will probably only be able to edit/create teleporters, not actual event calls. Unless the event call data for the overworld/underground is known and I missed it? Yup, I did *facepalm*. Yeah it shouldn't be any trouble.

Anyway, I would like to at some point also include editing the actual maps themselves, such as FF4Tools is capable of. The differences being that it would actually have a rom to edit rather than manually copying and pasting large chunks of hex code and pointers into the (hopefully) correct spots, it would be able to make maps larger than they were in the original (provided that other maps are made smaller or that there is room, but the point is that it would be able to look at the entire space set aside for maps rather than just the one you're editing), and it would (hopefully) be able to read the tile graphics from the rom you're editing in much the same way as it does with the font and window graphics so that if you change a tile or create your own custom tiles (or heck, why not an entire custom tileset) they will look correct in the editor instead of always using the default graphic tiles.

Try not to get too excited about that though, I'm a long way, and a lot of research away from being able to accomplish that; but I do know the basic gist of how to go about it, it's just a question of the details and how much of the relevant info is documented or I am otherwise able to be decipher.

More than likely, the next "group" of editors after the map/event group will be monsters. I know there's a lot of data documented about those and I think I can make editors for those fairly straightforwardly.
« Last Edit: January 10, 2013, 08:40:25 AM by Pinkpuff »
Let's dance!

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #204 on: January 10, 2013, 08:37:21 AM »
I thought of that, yeah. Would Tellah have enough speed though to cast it though? Though I guess by now there's a Mirror Curtain available (at least one, maybe?)

Sure, but then again I get Tellah at level 30+ and Reflect isn't a very long spell to cast...(I run Active ATB+Battle Speed 1 to compensate for difficulty). I eventually got around to optimizing spell locations... so...  :tongue:
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #205 on: January 10, 2013, 10:43:21 AM »
Very good points you raise PinkPuff, nevermind that idea then, to cut down on awkwardness would likely be for the best.

Though once you get the Overworld Triggers and Map Properties Editor, there aren't too many further things I can think of regarding events. The only thing I can think of are Event Tied Items (like the magazine, tent, dwarves' bread, etc) which I believe I showed how to change in another thread...? (I don't recall if I actually posted those), battle events (in which we know very little about, last I checked), and the "visual effects" which I'm not even sure it's plausible to edit those.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #206 on: January 10, 2013, 12:40:48 PM »
I'm most interested in seeing the monster editors, myself. Those are something nothing does well at the moment. Copying and pasting maps from FF4 Tools can be a bit annoying, but I've got a decent setup for that now. No such luck for monsters, where I'm still doing everything in a hex editor. Overworld stuff would be cool, too.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #207 on: January 10, 2013, 02:03:23 PM »
I am going to feel like an absolute idiot, but I could never get FFIV Tools to load my ROM. Is there some trick to it or some button or menu that I've been missing for years now? I could only ever use his On-site one, personally.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #208 on: January 10, 2013, 03:45:11 PM »
You...don't. It doesn't edit the ROM. It loads everything from included text files; you need to copy your edited data from its fields into a ROM. Also it only works with certain browsers. I can't use the map editor with Chrome (never tried any of the others) and have to use Firefox instead.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #209 on: January 10, 2013, 04:49:35 PM »
Therein lies the problem. Chrome. Heh, looks like I'll have to use a different browser then. Thanks for the heads up.