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

vivify93

  • Liquid Flame
  • *
  • Posts: 302
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #255 on: February 01, 2013, 10:37:38 PM »
Hello again. I'm here with some info and two minor improvement suggestions.

I noticed some of the shop names were unlisted in the shops menu, so here they are.

Shop 21: Mysidia Items
Shop 25: Eblan Items
Shop 31: Tomra Items
Shop 26: Dwarven Castle Items #2 (Dummied in FFII US)

Furthermore, I've been at it for an hour trying to add back in shop 26 in the NPC editor, and while I've managed to figure out how to put that NPC in its designated spot, there doesn't seem to be a "Bring up shop 19" selection under what speech to assign the NPC, so it's totally impossible to add back in that shop for now.

Secondly, instead of listing the shops in hex under the speech selections, why not just put down "Bring up Baron Shop" and the like? It would make things tons easier and friendlier for newbies.

Thank you for your time, have a nice day.
« Last Edit: February 04, 2013, 07:14:46 AM by vivify93 »
Hacking is hard. :sad:

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #256 on: February 02, 2013, 06:14:24 AM »
Hello again. I'm here with some info and two minor improvement suggestion.

I noticed some of the shop names were unlisted in the shops menu, so here they are.

Shop 21: Mysidia
Shop 25: Eblan
Shop 31: Tomra
Shop 26: Dwarven Castle #2 (Dummied in FFII US)

Thanks! I added them to the config file. And if you don't want to wait for the next update you can easily add these yourself too! Just go to your ff4kster folder, and in the config folder there should be a file called "shop.dat"; just go in and type in the numbers and names.

Furthermore, I've been at it for an hour trying to add back in shop 26 in the NPC editor, and while I've managed to figure out how to put that NPC in its designated spot, there doesn't seem to be a "Bring up shop 19" selection under what speech to assign the NPC, so it's totally impossible to add back in that shop for now.

Secondly, instead of listing the shops in hex under the speech selections, why not just put down "Bring up Baron Shop" and the like? It would make things tons easier and friendlier for newbies.

Thank you for your time, have a nice day.

That's because you can't reference shops directly with NPC speeches. NPC speeches are actually just triggers for events. If you want to make an NPC open a shop, there has to be an event for opening that shop, then you can make an NPC that triggers that event when you speak to it. So here's what to do, step by step:

* Go to the Event Editor and find an event that you are comfortable erasing/overwriting
* Hit Enter to edit it
* Hit backspace to clear its script completely (say yes you're sure)
* Hit insert to add a new item to the script
* Cycle to the event script item that says "Shop"
* An input should appear where you can select the shop you want
* Exit out of the Event Editor and go to the NPC editor
* Select the map & placement you want to trigger the shop
* Select "NPC", then "speech", then the event (or hit insert to create a new one and select it)
* Cycle to the event you replaced with your new shop and hit enter
* Exit out of the NPC Editor and save

(You can also go into the ./config/events.dat config file and change the name of the changed event to suit your hack if it makes it more convenient to remember.)

The reason I can't just have a shop option in the NPC speech menu is because the instruction to bring up a shop is handled at the event level, not the NPC level. The only ways I can think of to accomplish what you're asking for would all involve something terrible: 1. Assume that there already exists an event for each possible shop and that these events have not been changed or moved around; or, 2. Create a new shop event each time, replacing some existing event.

Thus, as nice as it would be to have something like that, I just don't see it as being very realistic. The user is free to edit the events however he or she wishes and thus it's not safe to make any kind of assumptions about them.

 :edit: The version on the timecave has now been updated to include the new config file, as well as access to the map properties editor, though the data cannot yet be edited, only viewed. If someone has any idea of what in the world might be happening with the underground maps please let me know.

 :edit: Upon second reading I think I may have misinterpreted your original question. Those are in hex mainly because they were just copied and pasted from an existing list of event labels for the original game's events. Changing these is once again simply a matter of changing the config file. So if you don't like "Bring up shop 26" you can go into ./config/events.dat and type in whatever you want to call it. That said, I think I will change the defaults to have something more meaningful there ^_^;
« Last Edit: February 02, 2013, 06:34:04 AM by Pinkpuff »
Let's dance!

kveldolf

  • Ymir
  • *
  • Posts: 11
  • Uwaooo!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #257 on: February 02, 2013, 02:26:31 PM »
Can dialog script events use arguments? I don't know enough about FF4 internals.

If so, some enterprising hacker could make things far easier for you.

In that vein, how are random encounters stored for a map?

If the map structure stores a spot for encounters unused in non-encounter maps, well, that's something we could reuse. You could make events that use the map encounter formations to set the selection. If this works, it could open up event space as well as make shop dialog options portable without changes, as the map would define what SHOP1 means. (You'd need multiple events (I'm thinking four) but you could get rid of most of the 'call specific shop' events.)
SCIML or slave-crown-induced memory-loss, is a serious ailment. If you or a loved one has SCIML, you need to seek medical attention immediately. Call 1-800-GESTAHL for more information and a list of qualified experts in your area today.

(Still must remember "Ma Chao...")

vivify93

  • Liquid Flame
  • *
  • Posts: 302
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #258 on: February 02, 2013, 04:04:33 PM »
...Wow, thank you, PinkPuff. I feel so dumb now. I should've realized it was calling on events.

...Though this now makes me kind of peeved that it looks like the FFII US team totally removed the event for the shop, which at once baffles me and makes me think I'm wrong.

 :edit:  I am so, so sorry to spread misinformation like that. Shop 31 is not Dwarven Castle Items. I just found out that Cave Eblana and the Dwarven Castle #2 share the same items. It's just that Cave Eblana's "niche" status healing items were changed to regular shop items, like Cure1, Cure2, Tent, etc. so they removed the second Dwarven Castle vendor, since the other one sold the exact same items.

I am so, so, so sorry. Shop 31 is just some dummied shop.

 :edit: Is there a way to outright remove entries from a shop list? The best I can seem to find is a blank space that costs 0 GP.

 :edit: I feel even dumber, but I meant shop 26 is the dummied shop. Hope you got that.
« Last Edit: February 04, 2013, 07:13:28 AM by vivify93 »
Hacking is hard. :sad:

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #259 on: February 03, 2013, 08:06:03 AM »
...Wow, thank you, PinkPuff. I feel so dumb now. I should've realized it was calling on events.

Don't feel dumb, that's how we learn!

...Though this now makes me kind of peeved that it looks like the FFII US team totally removed the event for the shop, which at once baffles me and makes me think I'm wrong.

The rom is full of all sorts of strange stuff, ripe for speculation. That's part of the fun!

:edit:  I am so, so sorry to spread misinformation like that. Shop 31 is not Dwarven Castle Items. I just found out that Cave Eblana and the Dwarven Castle #2 share the same items. It's just that Cave Eblana's "niche" status healing items were changed to regular shop items, like Cure1, Cure2, Tent, etc. so they removed the second Dwarven Castle vendor, since the other one sold the exact same items.

I am so, so, so sorry. Shop 31 is just some dummied shop.

Not a problem. I fixed the config file on my local copy, and next time I update it will be fixed in that as well. To fix it on your own local copy you can simply go into ./config/shop.dat and remove the line corresponding to shop 31.

:edit: Is there a way to outright remove entries from a shop list? The best I can seem to find is a blank space that costs 0 GP.

Hm, upon checking it seems I somehow failed to put a "blank" in the menu to make that more convenient. Anyway setting the entry to "Trashcan" will do what you need. Trashcan is always the last item in the list so you can hit Enter on the slot to bring up the item list, hit End to take you to the Trashcan and hit Enter.

I will probably add a blank in there soon for that purpose (although it is hilarious and somewhat fitting that you "trash" the shop item...)
Let's dance!

vivify93

  • Liquid Flame
  • *
  • Posts: 302
  • Gender: Male
  • White Wizard
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #260 on: February 03, 2013, 12:07:27 PM »
I have another question! It's super important!!!

...What people were involved in the creation of ff4kster? I want to credit you all in the readme of my patch!
Hacking is hard. :sad:

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #261 on: February 03, 2013, 02:40:31 PM »
Hmm, there are some oddities. For one the Astro Tower Observatory "Underground?" is marked as YES, when it's clearly not considered underground.

Troia Castle Hospital is the same case.

It is interesting to see that the name of two of the glitch maps are "Fabul' and "Mt. Hobs East" . I wonder if maybe Fabul and Mt Hobs were supposed to originally be larger or if those labels are just placeholders?

Baron Chocobo Forest is randomly noted for having the Underground byte enabled as well.

Tower of Wishes - Final Battle has it marked, but there it makes sense since you cut to it from the Underworld/Moon.

All of the Ending maps are predictably considered underground (but now that I think on it, isn't the Astro-Observatory part of the ending?

Hmm... in the normal game is there a place called "Cave of the Lunarians"? Is that the name of the caves you enter? I don't recall that if such is the case.

Yes, it does appear that the Underground Maps are all kinds of a skewed...

It honestly seems as if it's reading the Overworld map data again. There's nothing in there that is about the Underworld.  Could you give me the offsets? I'll take a look in ROM to see if the issue is with the program or the information given.

 :edit: It's very clear by looking at the actual data that it does seem like the Underworld map indexes should have a special index or some such, since the labels reset back to 00/01/02, etc. Like everything else, it seems there are location labels specially for the Underworld.

 :edit: 2 No, that's not plausible in this case. I am a little bit certain that the editor might be misreading the proper map number? I noticed, with my own experiments that map labels are sequential... For instance... going off of Phoenix's old notes...


Tomra - 23 01 04 01 36 13 10 09 35 71 00 58 00 33

23 - Battle properties
01 - Map Index
04 - Tileset Index
01 - (Underworld) NPC Index
36 - Border Tile
13 - Map Palette Index
10 - NPC Palette Index
09 - Music Index
35 - Background Index
71 - Background Movement
00 - Appears to be load from Moon/Underworld, but that's clearly not the case since this is Tomra, an underworld map. Changing this to 80 in Tomra did absolutely nothing. None of the actual Underworld maps seem to have this byte as 80.

58 - Map Label Index (which as far as I can see the editor currently reads the Map Index for the name to display rather than the Label Index)
00 - Treasure Chest Index

I'll keep on looking to see how the game defines an Underworld Map.

 :edit: 3 Taking a further look into the editor's data of Village Mist and Tomra, is the editor reading the Map Index and just rereading the original data again, looking purely at the map index number to load the data? Since the data for Village Mist and Tomra are exactly the same in the editor but in ROM are...

 20 01 04 01 15 04 90 09 22 71 00 28 07 - Mist
 23 01 04 01 36 13 10 09 35 71 00 58 00 - Tomra

As can be seen the two are Very different in ROM.
« Last Edit: February 03, 2013, 03:54:54 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 #262 on: February 04, 2013, 08:06:13 AM »
I have another question! It's super important!!!

...What people were involved in the creation of ff4kster? I want to credit you all in the readme of my patch!

I'm the only one doing any programming, but the information which it is based on is of course founded in a lot of groundwork done by many others. I couldn't even begin to compile a list, but feel free to try! You'll notice in the readme I just acknowledge a general "everyone who did research and posted it" type of thing without naming names.

Anyway I'm not looking for fame or credit here; as far as I'm concerned you can feel free to just say "FF4kster and the people who made it happen" or something.

:edit: 3 Taking a further look into the editor's data of Village Mist and Tomra, is the editor reading the Map Index and just rereading the original data again, looking purely at the map index number to load the data? Since the data for Village Mist and Tomra are exactly the same in the editor but in ROM are...

 20 01 04 01 15 04 90 09 22 71 00 28 07 - Mist
 23 01 04 01 36 13 10 09 35 71 00 58 00 - Tomra

As can be seen the two are Very different in ROM.

Wow, good eyes! I did a major facepalm when I checked this out and found that the loop index for this particular routine was being stored in a Byte variable rather than an Integer... doh...

Anyway it's fixed now and as far as I can tell working correctly, thanks!
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #263 on: February 04, 2013, 08:56:21 AM »
Aside from some odd background data, it looks to be in form (is that also looking at the old indexes rather than the new ones, maybe?) and as far as I can tell looks like it could be ready for release. Can't wait to try it out!

Also it is interesting to see that "Cave of the Lunarians" is a completely unused map name. Since FFII only ever refers to the race as "Lunars".

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #264 on: February 04, 2013, 09:56:57 AM »
Also it is interesting to see that "Cave of the Lunarians" is a completely unused map name. Since FFII only ever refers to the race as "Lunars".
Maybe they originally had planned to give some significance to the Mars Face on the moon... I always wished they had.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #265 on: February 04, 2013, 12:03:47 PM »
Also it is interesting to see that "Cave of the Lunarians" is a completely unused map name. Since FFII only ever refers to the race as "Lunars".
Maybe they originally had planned to give some significance to the Mars Face on the moon... I always wished they had.

Well the name label appears in the Overworld Maps. It's a possibility that it may have dealt something with their legacy rather than being info dumped by FuSoYa when you reach the moon.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #266 on: February 04, 2013, 12:50:16 PM »
Guess they were in fact just "being cute" with the face. Hmph... maybe you were originally supposed to be able to reenter KluYa's tomb? That also would have been fun.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,676
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #267 on: February 04, 2013, 12:59:40 PM »
Ah slight glitch I noticed PinkPuff. In the Characters Tab you cannot give a character above 65,536 Exp, but FuSoYa starts with a Lot more than that and you can change that, but if you go down in his 100000-esque Exp, you cannot go back up.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #268 on: February 07, 2013, 01:28:35 PM »
For any who might be interested, I think I figured out exactly what it was that I had altered without the use of FF4kster that caused my ROM to be incompatible with FF4kster. As I was re-doing my hack, I tried one piece at a time, to see when the ROM finally started disagreeing with FF4kster. It looks like it was changing the NPC speech pointers (99A00-99DFF) that did it.

Here now is a list of alterations that WILL cause compatibility issues, and those that will NOT (the latter, thankfully, is a much longer list)

WILL cause compatibility issues:
Changing NPC speech pointers (99A00-99DFF)

WILL NOT cause compatibility issues:
Changing character graphics (map, battle, portrait)
Changing character pallettes (map, battle, portrait)
Changing event data pointers (90200-903FF)
Changing event data (90400-96882)
Changing location map data (B8500-CFEF8)
Changing location trigger pointers (A8200-A84FF)
Changing location trigger data (A8500-A981F)
Changing NPC placement pointers (98200-984FF)
Changing NPC placement data (98500-998FF)
Changing NPC sprite pointers (97200-973FF)
Changing NPC default visibility (97400-9745F)
Changing NPC speech data (but not the pointers) (99E00-9A4FF)
Using Yousei's Overworld/Underworld/Moon map editor
Using Zythrofar's Editor
Using JCE3000GT's multi-editor

This is not an exhaustive list, just what I've found will and won't cause conflicts.  If I discover more, I will add to this list, but as FF4kster becomes more and more of a powerful tool, I imagine I'll have less and less reasons to use other tools in the future.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #269 on: February 16, 2013, 08:57:38 AM »
Does anybody know... Is it impossible to completely extricate the name of the character in Paladin Cecil's slot from that of the character in DK Cecil's slot?
When I change the name assignment for the Paladin slot, the Dark Knight name still appears in battle, thus making it impossible for these to be two separate characters...

 :edit: I was able to work around this by using Golbez's Slot, but this leads me to a request about FF4kster:
Pinkpuff - would it be possible to add in the ability to manipulate Golbez's actor? As it stands, I have to use a hex editor to do so. This includes adding/removing the actor in the event editor, in addition to editing starting name and battle commands.
« Last Edit: February 16, 2013, 11:23:28 AM by chillyfeez »