Author Topic: Element Indexes  (Read 1210 times)

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Element Indexes
« on: November 02, 2015, 04:08:04 PM »
Recently got back into editing gear, and there's a few things I've been wondering about the indexes used for Elements:

1: I notice there's seemingly a vast number of blank indexes for Element/Status indexes  (60-122), but I doubt there's enough space to use all them. How much free space is there (if there is any)?

2:I also notice that "immune" and "absorb" are considered elements; does that mean that, say,  Fire + Absorb allows for the absorption of Fire, or does merely make one resistant to Fire and Absorb?

I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Element Indexes
« Reply #1 on: November 02, 2015, 04:33:12 PM »
Each index ff4kster allows you to create is valid. I think it's 32? I could be wrong. Anyway, ff4kster doesn't allow you to edit indexes for which there's no space.

Yes, an element + absorb = absorbing that element. Just setting absorb on a weapon makes it drain HP. There's also weird stuff that other hackers (not me) have researched about combining armors with different elemental properties... I don't remember how it all works, but I know it's not exactly intuitive...

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Element Indexes
« Reply #2 on: November 03, 2015, 12:14:16 AM »
'Kay,  I don't know where I got 32 from, because you're right. There are 123 of them. But anyway, yeah, they are all usable.

Oh! I was thinking of the equip table. There are 32 possible equippable combinations.

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Element Indexes
« Reply #3 on: November 04, 2015, 12:36:03 PM »
'Kay,  I don't know where I got 32 from, because you're right. There are 123 of them. But anyway, yeah, they are all usable.

Oh! I was thinking of the equip table. There are 32 possible equippable combinations.

That being the case, I should have plenty of space for my gearing ideas! Thanks for the insight!
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Element Indexes
« Reply #4 on: November 04, 2015, 01:06:40 PM »
Speaking of such should we look at somehow separating the Absorb Element from a "take-all" approach? It somewhat limits the possibility of having Armors that absorb elemental if they aren't all under the same armor class because the character can then absorb anything that they resist.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Element Indexes
« Reply #5 on: November 04, 2015, 11:07:49 PM »
Nice idea, but I think that might require completely rewriting how the game handles resistance/weakness/absorption, right?

Kea

  • Vargas
  • *
  • Posts: 94
    • View Profile
Re: Element Indexes
« Reply #6 on: November 04, 2015, 11:25:11 PM »
It would indeed; you'd probably also have to find space in character RAM data in-battle for 1-2 extra bytes of data representing Immune and Absorbed elements in addition to rewriting all spell routines that read the resistance byte, the physical damage routines, and routines that handle reassigning resistances when swapping shields.

Finding the extra space in RAM would probably be the trickiest part though, unless there's unused space we already know about. Defining absorb/immune/resist separately in the ROM data for equipment and monsters might be an issue too (just speaking generally here, not having gone into SNES FF4's data structures in depth).

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Element Indexes
« Reply #7 on: November 05, 2015, 08:00:08 AM »
It would likely be a bit of work...

This...

$03/D388   20 FD E0   JSR $E0FD  [$00:E0FD]   A:0001   X:0100   Y:1A35   P:envMxdIzC - Jump to Elemental Determination
$03/D38B   AD FE 38   LDA $38FE  [$00:38FE]   A:0001   X:0100   Y:1A35   P:envMxdIzC - Load Result.
$03/D38E   10 08   BPL $08    [$D398]   A:0001   X:0100   Y:1A35   P:envMxdIzC - If it is positive branch to rest of routine.
$03/D390   29 7F   AND #$7F   A:0001   X:0100   Y:1A35   P:envMxdIzC - Get rid of the negative amounts.
$03/D392   8D FE 38   STA $38FE  [$00:38FE]   A:0001   X:0100   Y:1A35   P:envMxdIzC - Store A in 7E38FE.
$03/D395   4C 26 D4   JMP $D426  [$00:D426]   A:0001   X:0100   Y:1A35   P:envMxdIzC - Jump to Healing Routine

Seems to be used time and time again in a slightly varied manner for each damaging formula.  It would require quite a rehaul due to the way that Absorb is checked... it is rather tricky, admittedly. It may be worth time to look at another means of doing so such as FFV.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Element Indexes
« Reply #8 on: November 05, 2015, 11:17:31 AM »
Don't get me wrong - it would be dreamy to have the ability to have individual affinity for each element, but I don't know that I've got it in me right now to work on something like that.
We'll put it on the list along with "actual confuse" and reworking the entire level up system using LordGarmonde's formulas.