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

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #420 on: August 15, 2013, 05:28:33 AM »
I thought that maybe it's because Dark Wave is a Dark Elemental attack[...]
It's actually non-elemental damage with a special check for undead enemies. (And on a less important note, it's Dark/Darkness, the "Wave" part was one of J2e's many "improvements" to their translation.)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #421 on: August 15, 2013, 07:29:06 AM »
(And on a less important note, it's Dark/Darkness, the "Wave" part was one of J2e's many "improvements" to their translation.)

And a welcome one IMO. Makes it less confusing with the stauts and the element. I'm a fan of different things having different names, which is why I tend to prefer "Dark" for the element name and "Blind" for the status (and "Dark Wave" for the ability).

Anyway, I'll get to tackling those bugs (I seem to be particularly prone to off-by-one errors in general, but this time a lot of them have to do with the fact that I had to change some things about the list structure in the process of attempting to rectify the horrible memory leak), then resume working on the encounter editor, then start on AUTO BATTLE SCRIPTS!!  :childish: With of course a break to update the monster reaction descriptions once that list is ready.

 :edit: Ok bugs fixed.
« Last Edit: August 15, 2013, 08:20:24 AM by Pinkpuff »
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #422 on: August 15, 2013, 10:38:08 AM »
Looks like all of the bugs have been fixed! I had thought the Stat one would be a little more complicated but it seems like you quashed it with all of the rest, good work! So Auto-Battle scripts are next, hmm? I did not expect to see those worked on so soon, but I guess they are the natural point of progression, hehe. Looking forward to the results!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,266
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #423 on: August 15, 2013, 11:49:11 AM »
Done!

OK, the good news is that all menu commands that target one or all enemies can trigger a reaction, the (not so) bad news is that sometimes they act a bit differently than we might want.
Apparently, "Item" counts as magic, but "Call" is separate. Also, any item that can be used on an enemy (including cure potions, etc.) will trigger the reaction, but only white magic that causes damage will trigger the reaction. Also, a few commands trigger the reaction when they are executed, that is, during the "charge" instead of when they hit (as indicated within the table).

After doing this, I thought it might be possible to choose a particular spell to trigger a reaction, but I tested the theory and determined that it's incorrect. As far as I can see, these are the only actions that will trigger reactions.

Also, bear in mind that for these tests, I kept the conditions at "any character" and "any element." I don't know how successful this data would be with particular characters or elements.
Code: [Select]
Monster Reaction Triggers

If FF4kster Says Reacts To
---------------- ---------
193 Fight
195 Black, Item, Ninja, White*
197 Call
198 Dummy (Dark Wave)
200 Dummy (Recall)
201 Sing
205 Aim
206 Dummy (Store)**
207 Kick
209 Twin**
211 Dummy (Cry)
213 Peep
215 Dart
216 Sneak
223 Jump

*Only triggers reaction if the immediate results include a depletion of HP or MP
**Reacts during "charge" time, not after the actual hit

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #424 on: August 15, 2013, 01:18:31 PM »
Alright folks, encounter editor is ready for testing!
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #425 on: August 15, 2013, 01:57:33 PM »
Looks like the Encounter Table switching works as does the Formation switching. Great work!


Incidentally is the final formation really a 1% chance? I run into a group of Six Imps many, many times while outside of Baron it seems.

Also Great work, Chillyfeez in figuring all of that AI business out! I can confirm though that elementals work at least for magic (plainly) and the Fight command (as in Elemental Weapons)

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Developing a comprehensive editor for FF4
« Reply #426 on: August 15, 2013, 02:46:31 PM »
The mystery byte in formations is the targeting layout to use. (Zyrthofar's editor can view and modify these, so if you want to add support for them, reverse engineering them from that's probably a good idea. I've never tweaked them much, since I never saw a need to make large-scale changes to battle layouts. I don't think any of our documentation covers them, although I may be wrong.)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #427 on: August 15, 2013, 02:59:02 PM »
Targeting layout and hopefully arrangements are both ideally coming in the future.

In the meantime, I added chillyfeez's info to the AI editor and also now the program automatically detects which monsters are lunar based on which monsters are in the appropriate maps' encounters.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #428 on: August 15, 2013, 03:09:49 PM »
An interesting work around with the Lunar-Underground monsters, and while you get all of the normal enemies in that regards you don't get the bosses though, I expect that's forthcoming though.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #429 on: August 15, 2013, 03:19:20 PM »
Oh wow, yeah, I never even thought of that... bosses... dang... I guess I'll have to add a toggle key after all.

Anyway I just made it so the event editor will now also preview formation details.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #430 on: August 15, 2013, 03:31:38 PM »
That is a very neat addition. It's always good to see some of the previous utilities get a bit of an upgrade and the more previews in other parts of the editor to keep the modder on track, the better.

 :edit: If I may make a suggestion, I've been looking into free space in the Encounter section, but at first did not realize that separate play areas had a separate encounter list. Could this be made clearer with something like "Overworld Encounter: X" "Dungeon Encounter: X" that sort of thing? It would keep the mind on track.

Speaking of such, what decides whether one or the other is used?

« Last Edit: August 15, 2013, 05:29:25 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 #431 on: August 15, 2013, 05:21:28 PM »
:edit: If I may make a suggestion, I've been looking into free space in the Encounter section, but at first did not realize that separate play areas had a separate encounter list. Could this be made clearer with something like "Overworld Encounter: X" "Dungeon Encounter: X" that sort of thing? It would keep the mind on track.

That should be doable.

Speaking of such, what decides whether one or the other is used?

Well as far as I understand it, if you're on an overworld map, it uses the overworld domains. If you're on an inner map, it uses the inner map domains. If you're on the "upper world", it uses the upper world versions of the encounters and if you're underground or on the moon it uses the underground/moon versions of the encounters. Is that what you were asking?

Anyway, I added the Cover discoveries into the command editor.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #432 on: August 15, 2013, 05:33:37 PM »
Yep, that's what I was asking. It is interesting how they programmed this game with the clear idea to use the Dual-World theme slightly brought up in FF3. Yet in the end the Overworld is so much larger than both the Underworld and Moon.

Oh, the Cover stuff made it in? Good to see. I guess the other command stuff in the thread is just whenever you get around to it as well?



 Hmm, while the Overworld/Underworld differentiation was an interesting system for Encounters, they are not very much used... at all. Both the Underworld Dungeons and the Overworld Dungeons both have 80 Encounter Lists, but the game never uses much before, or after, the lists "branch".

Underworld Dungeons don't have a listing before 28 meaning that 0-27 in the Underworld Dungeon index goes unused and the Overworld Dungeons have large chunks missing out of its Encounters past 27...

Alright, so I took a much closer look and the Only Time these two intersect is a single formation, that being 63.

Code: [Select]
Overworld Dungeon Encounters. Underworld Dungeon Encounter Sharing
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10|
11|
12|
13|
14|
15|
16|
17|
18|
19|
20|
21|
22|
23|
24|
25|
26|
27|
  |28
  |29
  |30
  |31
  |32
  |33
  |34
  |35
36|
37|
38|
39|
40|
41|
42|
  |43
  |44
  |45
  |46
  |47
  |48
  |49
  |50
  |51
  |52
  |53
  |(54 was likely intended for a cut portion of the Cave of Summons)
  |55
  |56
  |57
58|
59|
60|
61|
62|
63|63
  |64
  |65
  |66
  |67
  |68
  |69
  |70
  |71
  |72
  |73
  |74
  |75
  |76
  |
  |
  |
  |
----------------------------------

This means that 43/80 Spots are unused in the Underworld Dungeons and 40/80  Spots are unused in the Overworld Dungeons. The question of course becomes, was there really enough to fill them in the first place?

We know that by looking at the formations directly that these unused Encounters were not just dummied Goblin space, but formations that seemed intelligent for that level (for the most part). I guess it goes to show how much Square had to cut out that over half of their allocated space went unused, despite data clearly being put into them.

 :edit: Chillyfeez, your work has made useless commands such as Peep a very open ended tool. With your discoveries in the AI you can make a quasi-Piercing Sight from FFIVTAY. As observed...









Setting Peep alone is rather dangerous. It might work better as a Reaction, but I haven't tested it in that capacity, so I changed the Imp's Charm (along with many other Charms, I'm sure) into that, a message and a set weakness which worked quite well. Unfortunately (Or fortunately?) there's no way I can see to randomize a weakness like Piercing Sight, and every monster you want to be effected by this would need a specialized AI for it (at least for each elemental weakness.)
« Last Edit: August 15, 2013, 06:18:41 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 #433 on: August 15, 2013, 05:59:37 PM »
Well, I guess everything at this point is "when I get around to it". I think I'm done for today though, having done almost nothing but slog away at code. I'll probably be a bit more social this weekend.

Anyway what do you guys think? Should I throw it onto RHDN as is, or should I wait a bit longer for more possible bug reports?
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing a comprehensive editor for FF4
« Reply #434 on: August 15, 2013, 06:17:36 PM »
I have noticed one slightly troubling thing, but I can't say what's causing it. For a test I set my Encounter in Overworld 19 (in front of Baron) saw that it worked, switched it back, but some of the encounters are still as if they are in the Kaipo Desert, but this doesn't seem to be a "one off" error or anything. The first Formation, the Goblin still works fine and appears as frequently as ever and I have seen the six Goblin Formation after I set this, so it's not somehow pushing it down or anything like that. It's difficult to say what Formations have been replaced by the Kaipo Desert one.

You have made Tremendous progress in just today alone, fixed several bugs, added several new features and additions, you deserve a rest, haha.

 :edit: Actually I have found another error. When you go to switch any of the Items in the Drop Charts, though the editor will show them as changed, even as you go through other menus and do other things, the changes are only superficial and don't carry over to the game and when you exit FF4kster and reopen it the data will be initialized.


 :edit: 2 I updated the Cover data, including the method to have the requirements read Class rather than Character giving it more versatility over all.

I've also found another error. If you press "end" while viewing the AI Index, it will show 256, but no descriptions, just a black spot where a box normally would be and pressing down breaks the program.
« Last Edit: August 15, 2013, 07:24:06 PM by Grimoire LD »