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

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1020 on: March 22, 2015, 07:47:25 AM »
As for other functionality... Not that I can think of, maybe If they choose "00"(Which in the editor would be  for the flag number of "Opening Complete" (since it's not actually used for that section of the routine) maybe change the name of the Instruction to reflect "If Party is Dead/Petrified jump to next Event". That's all I can think of.

Ah ok so it's the same "Crash Game / Load Graphic / If" instruction, but if the XX = 00 and the party is dead, it skips to the next event? In which case, what would have been the pseudo YY parameter becomes a real instruction? And does it do this on XX = 80 as well?

It is the same yes, and that part of the routine Ignores the Event Instruction XX parameter always. So the 00 is just a "null" base in this case, it doesn't actually use it, but for the editor it would be a good way to differentiate between the two functionalities and indeed the YY parameter would be a real instruction in this case... Or it may be easier just to make it a toggle choice in the options of the instruction itself.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1021 on: March 22, 2015, 08:32:38 AM »
Ok but the actual behaviour of the command is:
  • If XX = 00 or 80 (hex) then skip to the next event, just like if you had selected "no" in a yes/no box, and treat the next byte as a normal instruction.
  • If XX = any other number, treat it as a flag as per the If instruction and interpret the next byte as the number of bytes worth of instructions to skip if the check fails.
Correct?
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1022 on: March 22, 2015, 01:22:29 PM »
Ok but the actual behaviour of the command is:
  • If XX = 00 or 80 (hex) then skip to the next event, just like if you had selected "no" in a yes/no box, and treat the next byte as a normal instruction.
  • If XX = any other number, treat it as a flag as per the If instruction and interpret the next byte as the number of bytes worth of instructions to skip if the check fails.
Correct?

Not really, no. The first thing my routine does is the Dead Party check. Then if that fails it moves into the Skipping routines, it doesn't ever check the XX Portion of the normal command in any way shape or form, it's just bypassed all together. It's a very simple; "IF all characters are Dead or Petrified, Jump to Next Event". Hence why I mentioned that a toggle would likely be cleaner rather than Event Flag 00 as an internal check for the program.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1023 on: March 23, 2015, 09:27:04 AM »
Ok, let's give this another shot:

  • If the party is completely annihilated, instead of game over, ignore XX and skip directly to the next event
    • As a result of this, the pseudo YY parameter, if it had one, would be skipped as a result anyway
  • If someone in the party is still alive, interpret this as an "IF" instruction, using the XX parameter and the pseudo YY parameter in the usual way

Do I have it now?
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1024 on: March 23, 2015, 10:14:07 AM »
Ok, let's give this another shot:

  • If the party is completely annihilated, instead of game over, ignore XX and skip directly to the next event
    • As a result of this, the pseudo YY parameter, if it had one, would be skipped as a result anyway
  • If someone in the party is still alive, interpret this as an "IF" instruction, using the XX parameter and the pseudo YY parameter in the usual way

Do I have it now?

Yep, that's how it goes. Really it's taking advantage of the "Prevent Losing" flag and using it to its maximum potential as possibility for different scenarios.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1025 on: March 24, 2015, 09:48:12 AM »
Ah, PinkPuff, since Chillyfeez is away for a couple of days could you share the location of the Timers, they are technically the very last thing I *should* need to move to get the new 8 commands working in an optimal fashion.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1026 on: March 24, 2015, 10:34:26 AM »
By "Timers" do you mean what FF4kster labels "Delay" in the command editor?
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1027 on: March 24, 2015, 11:12:17 AM »
By "Timers" do you mean what FF4kster labels "Delay" in the command editor?

Ah, yeah that would be the name in the editor.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1028 on: March 25, 2015, 11:04:04 AM »
Sorry, I meant to post it yesterday. I'll post it tonight.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1029 on: March 25, 2015, 03:47:26 PM »
Thank you very much PinkPuff, I'm trying to find as much free space as I can (it seems that relocating data will also give us not just more Command Room,but Spell Subroutines room, which is also of importance!) but I need to know if these swathes of FF's are safe to change or if they are related to Map or Text.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1030 on: March 26, 2015, 04:57:38 AM »
Code: [Select]
delay = ByteAt(&hA0089 + index - 1)

The "index" is 1-based, so for a 0-based index just leave out the "-1" at the end. The address is for a headered rom.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1031 on: March 30, 2015, 11:42:43 AM »
Ah, quick question in the Features part of the program how difficult would it be to program in to say "8 Character Limit Past Spell 72" and an option of "6 Character Limit past Spell 72" I'm putting together an expanded unique spell set for all characters and trying to remember "6 slots, stop. Move onto next spell" looks pretty bizarre in the editor itself.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 923
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1032 on: March 30, 2015, 12:07:24 PM »
Ah yes I remember trying to accomplish something like this in the past...

If it is to only affect the editor and not the ROM, I can have some something like that whipped up relatively quickly. If you want it to affect the way the game loads spells (e.g. getting them to display correctly in the characters' spell menus) I'm going to need to know the addresses that need reading/writing.
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1033 on: March 30, 2015, 02:13:39 PM »
Ah yes I remember trying to accomplish something like this in the past...

If it is to only affect the editor and not the ROM, I can have some something like that whipped up relatively quickly. If you want it to affect the way the game loads spells (e.g. getting them to display correctly in the characters' spell menus) I'm going to need to know the addresses that need reading/writing.

Effecting just the editor would suffice for now since this test ROM already has that done...

Though Dragonsbrethren posted the LoROM offsets a long time ago, here's that post...

Very. From the other thread:

Code: [Select]
$02/CBAF BF B0 8A 0F LDA $0F8AB0,xThis offset (SNES LoROM, of course) is the start point for the eight character names.

Code: [Select]
$02/CB9B C9 48       CMP #$48This is the value of the first eight character spell. Anything below this is six characters.

Code: [Select]
$02/CBA0 E9 48       SBC #$48This is subtracting the value of the first eight character spell, so that the index for eight character names starts at 0 instead of $48 in the loading routine.

So basically, what you want to do is set the two $48 values to whatever the first eight character name is and adjust the offset accordingly. Since you'll be overwriting the start of the eight character names with six, nothing actually needs to move (there's no reason why there can't be blank space between the six and eight character names) so you can leave everything in the same place it is now. (Well, assuming you only allow six character names to be expanded; removing some would require the entire list of eight character names to be shifted.)

In ROM this is at...

0x14B9C - 48 (Change this to where you want eight character spells to start... which would actually be a better option for the editor than what I suggested, heh.
0x14BA1 - 48 (A subtract check, but necessary to change to the same as the above in case someone still wanted to keep Eight character spell names in the list.)

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,234
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Developing FF4kster: a comprehensive editor for FF4
« Reply #1034 on: March 30, 2015, 03:59:39 PM »
Heh... Yeah. Setting aside the fact that I've been using a year-old version of FF4kster because later iterations are no longer compatible with my hack, this has been a thing I have been dealing with for quite some time now. Programming AI takes me a long time because every time I want to make a monster use a monster spell, I have to open the spell editor and scroll through studying the spell routines until I find the Garbled mess of spell names that is actually the spell I want.
I'm not complaining, mind you. I know that I've made more edits to my ROM than are advisable if one wishes to use FF4kster most effectively and I am happy to suffer the consequences. I'm just relating exemplary experiences.