øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=426.msg4582e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexf053.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=426.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexf053.html.zxèwg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ…¬3OKtext/htmlISO-8859-1gzip0|Ö3ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 11:36:32 GMT0ó°° ®0®P®€§²ð®èwg^ÿÿÿÿÿÿÿÿÓ$3 Elemental Reference Guide

Author Topic: Elemental Reference Guide  (Read 11640 times)

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Elemental Reference Guide
« Reply #15 on: May 21, 2008, 11:05:49 PM »
Quote
Nice discovery with the Crystal, I never bothered testing dark-elemental magic against Zeromus and just assumed it would hit him. That means I can give dark elemental spells to the final party. Happy

I really want to get back to work on that hack...

I was disappointed to find that spells won't hit him.  :sad: I wanted a dark-elemental spell to be the trigger for my hack, not the Crystal. Oh well, such is life.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Elemental Reference Guide
« Reply #16 on: May 21, 2008, 11:26:04 PM »
Quote
Nice discovery with the Crystal, I never bothered testing dark-elemental magic against Zeromus and just assumed it would hit him. That means I can give dark elemental spells to the final party. Happy

I really want to get back to work on that hack...

I was disappointed to find that spells won't hit him.  :sad: I wanted a dark-elemental spell to be the trigger for my hack, not the Crystal. Oh well, such is life.

The only thing I can think of is that item based spells tend to work 100% of the time, barring (status based) resistance. Then again, it may have something to do with the "invulernability counter".. which probably needs to be looked into futher. Remember the attack itself doesn't cause damage, and may be acceptable for that reason alone.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Elemental Reference Guide
« Reply #17 on: May 21, 2008, 11:33:15 PM »
The spell I used had a 100% hit rate, so I don't think it was that. I'm guessing it deals with the invincibility counter. Your comment about the attack not causing damage gave me an idea, so I relooked at the hex data for the Crystal and noticed that the spell routine is calls is the one used for Heal.   :hmm:  My last test used a dark-elemental Cure potion, but I haven't tried a Heal yet. I'll check that when I have time.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Elemental Reference Guide
« Reply #18 on: May 22, 2008, 12:18:59 AM »
The spell I used had a 100% hit rate, so I don't think it was that. I'm guessing it deals with the invincibility counter. Your comment about the attack not causing damage gave me an idea, so I relooked at the hex data for the Crystal and noticed that the spell routine is calls is the one used for Heal.   :hmm:  My last test used a dark-elemental Cure potion, but I haven't tried a Heal yet. I'll check that when I have time.

Dark Elemental Heal?.. Hmm.. what you should be checking is the item's spell multiplier.. given that all items normally have a default spell multiplier of 8. It is possible it could be higher than 99 (decimal).

As an aside, it is actually amusing that the auto battle-script calls for Meteo and the Crystal.. that the spell used in place of the Crystal is Dispel.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Elemental Reference Guide
« Reply #19 on: May 22, 2008, 01:48:04 AM »
The spell multiplier for the Crystal is 0, so that's not it. The Heal part of it turns out to be not relevant -- I removed it and the Crystal still worked to change Zeromus. Also, changing a different item to a dark-element Heal doesn't work. So, the final verdict is: the code checks for the Crystal item number (C8) and that it is dark-elemental. If these two conditions are satisfied, then Zeromus will change.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Elemental Reference Guide
« Reply #20 on: May 23, 2008, 08:55:42 PM »
Returning from the slightly  :offtopic:  posts, I want to give props to Deathlike2 for compiling the elemental data at the beginning of this thread. It's pretty thorough and everything he said is spot on, from the tests I've done. The one downside is that it took me a while to go through all the text and understand what he was saying, so to help my own visualization I made two small tables of the elemental data. Given that the immune/susceptible bit works as a normal elemental, I decided to title it "Force" so we'd have a name to work with. I like "Aerial" or "Wind" elemental for the spear/arrow elemental, but I've left it as "Spears/Arrows" for now. I confirmed that all 8 elements work properly in terms of attack, resistance/absorption/immunity, and weakness. The first table is for character weapons/spells and armor:

Code: [Select]
weapons/spells armors
-------------- ------
bit 0: fire resist fire, weak to ice
bit 1: ice resist ice, weak to fire
bit 2: lightning resist lightning
bit 3: dark resist dark, weak to holy
bit 4: holy resist holy, weak to dark
bit 5: spears/arrows resists spears/arrows
bit 6: drain absorb (also resists drain)
bit 7: force immune (including to force)

Weapons are pretty simple. The armors are more complex, so here are three examples:
1. If an armor has bits 0 and 6 set, it will absorb fire, be resistant to drain, and be weak to ice. 
2. If an armor has bits 2, 3, and 7 set, it will be immune to lightning/dark/force and weak to holy.
3. If an armor has bits 0, 1, 6, and 7 set, it will be immune to fire/ice/drain/force.

The second table is for enemy attack, resistance, and weakness:

Code: [Select]
attack resistance weakness
------ ---------- --------
bit 0: fire fire fire
bit 1: ice ice ice
bit 2: lightning lightning lightning
bit 3: dark dark dark
bit 4: holy holy holy
bit 5: spears/arrows spears/arrows spears/arrows (adds immunity to quake)
bit 6: drain absorb (also resists drain) drain
bit 7: force immune (including to force) susceptible (damage x4, including from force)

These work pretty much the same as weapons and armor, with the more versatile weakness byte determining the weakness and susceptibility.

These tables aren't meant to replace the data Deathlike2 wrote, since his is more complete, but to supplement it with an easy visual. Hopefully everything readily makes sense; if not, let me know and I can provide more examples.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Elemental Reference Guide
« Reply #21 on: May 24, 2008, 08:36:37 PM »
I'm not sure if "force" is a good term for anti-immune. I like "pierce" better.

For a thought, the way the game may be checking immunity has an order (which should be obvious), and the comparison is most likely made by a bitwise AND operation and if the result is 0, then it goes onto the next check...
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Elemental Reference Guide
« Reply #22 on: May 24, 2008, 08:50:18 PM »
Quote
For a thought, the way the game may be checking immunity has an order (which should be obvious), and the comparison is most likely made by a bitwise AND operation and if the result is 0, then it goes onto the next check...

I came to the same conclusion when I saw the priority ordering you wrote in the first post.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Elemental Reference Guide
« Reply #23 on: May 24, 2008, 09:01:02 PM »
What sucks is that the battle engine has been barely tapped.. so its potential has yet to be realized... FF4A seems to limit the potential of the engine, but I could be wrong.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Elemental Reference Guide
« Reply #24 on: October 02, 2009, 09:55:40 AM »
Sorry for the  :bump:

I re-read through all this info, but I couldn't find the answer to this: can elemental physical attacks be absorbed by enemies? I'm testing battle scripts in my hack, and setting the elemental defense to absorb is only working for magic, not physical attacks. Immunity works fine, it's just absorb that's magic-specific. Can anyone confirm this? I'd really like for elemental physical attacks to be absorbed...

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Elemental Reference Guide
« Reply #25 on: October 02, 2009, 10:19:58 AM »
I don't think there's any way to do it without code modification. They probably purposely disabled the absorb behavior for physicals; just think of how evil Blue Dragons would be if they could absorb your Excalibur, Ragnarok, Fire Whip (heh, yeah right), Lance, and Bow strikes.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Elemental Reference Guide
« Reply #26 on: October 02, 2009, 11:26:51 AM »
This isn't FF5 where elemental absorption is available for physical attacks.

A way of working around this is setting the immune bit so that damage is limited to 1 (unless there's a critical hit). This is most notable for Zombies and DK's Cecil weaponry.

I don't think you've ever used the Fire Sword or Flame Spear against a FlameDog eh?
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Elemental Reference Guide
« Reply #27 on: October 02, 2009, 11:34:09 AM »
I don't think you've ever used the Fire Sword or Flame Spear against a FlameDog eh?

I don't think I ever have, either. Common sense says it's a pretty dumb thing to do, unless you were purposely testing the absorb behavior.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Elemental Reference Guide
« Reply #28 on: October 02, 2009, 07:04:41 PM »
Yeah, I thought that was the case. I did end up setting the immunity bit instead. It's not what I had imagined, but at least it's still the same general concept.