øAslickproductions.org/forum/index.php?PHPSESSID=a93jpvqe9jutne9agvqo8ht1r1&topic=2188.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd309.htmlslickproductions.org/forum/index.php?board=17.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexd309.html.zx»8h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ °V4OKtext/htmlISO-8859-1gzip8:Ö4ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 01:19:16 GMT0ó°° ®0®P®€§²ð®»8h^ÿÿÿÿÿÿÿÿ$4 FFV Damage Calculator

Author Topic: FFV Damage Calculator  (Read 9840 times)

x0_000

  • Siren
  • *
  • Posts: 72
    • View Profile
Re: FFV Damage Calculator
« Reply #15 on: April 08, 2016, 02:39:35 PM »
Here is another interesting question that was in my head for long time:

What will happen if a monster has Absorb & Weakness to a specific element and you do dmg with that element?
I was thinking about that when I started coding elements. I hopped there is no such case. Sadly there is ... Byblos, it can absorb and be weak to Holy.

Similar to it is:
if a monster has Absorb to Fire and Weakness to Ice, what will happen when we hit with multi-elemental dmg Fire & Ice :)
If the algorithms guide is correct, if the target can absorb any element of the attack the the attack is automatically healing, and if the monster is weak to any element of the attack then the number is increased accordingingly (so in both cases the monster would be healed by a larger amount than if they didn't have a weakness.)

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FFV Damage Calculator
« Reply #16 on: April 11, 2016, 02:05:13 AM »
It would be nice if you could switch between GBA/SNES/PS names.
That actually easily can be done. In parser application just open SNES rom and export the data in .csv, just save it as GBA_xxx in the dmg calc folder.

x0_000 if I understood you well, the check for Absorb is first and if it triggers no more checks?

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Damage Calculator
« Reply #17 on: April 11, 2016, 09:34:47 AM »
It would be nice if you could switch between GBA/SNES/PS names.
That actually easily can be done. In parser application just open SNES rom and export the data in .csv, just save it as GBA_xxx in the dmg calc folder.
Still, I wish there was an easier way.

x0_000

  • Siren
  • *
  • Posts: 72
    • View Profile
Re: FFV Damage Calculator
« Reply #18 on: April 11, 2016, 02:34:43 PM »
It would be nice if you could switch between GBA/SNES/PS names.
That actually easily can be done. In parser application just open SNES rom and export the data in .csv, just save it as GBA_xxx in the dmg calc folder.

x0_000 if I understood you well, the check for Absorb is first and if it triggers no more checks?
According to the algorithms guide it goes through all the checks, the game only skips checks on immunity (which forces the attack to miss.) The GBA assembly code seems to support that but I haven't looked at the functions in detail.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FFV Damage Calculator
« Reply #19 on: April 18, 2016, 02:36:47 AM »
Hey guys, here is another interesting situation, that I stumble upon playing with my DmgCalc:

What will happen if we hit DevilCrab (weak to ice) with Broadsword after we have used 'Blizzard' (aka Ice1) SpellBlade? Personally I will expect x2 dmg ...
BUT my calculator showed x4 dmg. According to the Algorithm (and I checked that in the asm code, too):
Code: [Select]
ATTACK TYPE (HEX: 31) (Swords)
...
9) Apply Magic Sword modifiers to Attack, Defense and M (6.5.15).
10) Apply Attack Element modifiers to Attack and Defense (6.5.16).
    Note that Magic Sword elements override weapon attack elements.

In step 9 we get x2 and in step 10 we get another x2 for total x4 (def = 0)
So that mean when we use Spell Blade with element that target is weak, we get extra x2 ...
Am I doing something wrong???

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Damage Calculator
« Reply #20 on: April 18, 2016, 12:33:31 PM »
Quote
9) Apply Magic Sword modifiers to Attack, Defense and M (6.5.15).
This is the Magic Sword element.
Quote
10) Apply Attack Element modifiers to Attack and Defense (6.5.16).
    Note that Magic Sword elements override weapon attack elements.
This is the weapon element.
Let's say you are using the Flame Tongue sword. Usually the weapon element is fire, but if a Magic Sword spell is cast, the weapon element should not come into play.
Code: [Select]
Magic Sword Modifiers to Physical
C2/8684: A6 32        LDX $32
C2/8686: BD 50 20     LDA $2050,X 
C2/8689: 1D 51 20     ORA $2051,X
C2/868C: 1D 52 20     ORA $2052,X
C2/868F: 85 4D        STA $4D      ($4D = Magic Sword Element)
C2/8691: 1D 53 20     ORA $2053,X
C2/8694: 1D 54 20     ORA $2054,X
C2/8697: 1D 55 20     ORA $2055,X
C2/869A: F0 02        BEQ $869E
C2/869C: E6 60        INC $60
C2/869E: BD 55 20     LDA $2055,X
C2/86A1: 10 12        BPL $86B5
C2/86A3: C2 20        REP #$20
C2/86A5: 18           CLC
C2/86A6: A5 50        LDA $50
C2/86A8: 69 64 00     ADC #$0064   (Damage = Damage + 100)
C2/86AB: 85 50        STA $50
C2/86AD: 46 54        LSR $54
C2/86AF: 46 54        LSR $54      (Defense = Defense / 4)
C2/86B1: 7B           TDC
C2/86B2: E2 20        SEP #$20
C2/86B4: 60           RTS
Notice this?
C2/869C: E6 60        INC $60
Code: [Select]
Elemental Status Modifiers to Physical
C2/8734: A5 60        LDA $60
C2/8736: D0 35        BNE $876D
C2/8738: A6 49        LDX $49
C2/873A: BD 30 20     LDA $2030,X    (Check for Elemental Absorb)
C2/873D: 25 4D        AND $4D
C2/873F: F0 07        BEQ $8748
C2/8741: E6 62        INC $62
C2/8743: 64 54        STZ $54        (Defense = 0)
C2/8745: 64 55        STZ $55       
C2/8747: 60           RTS
And this:
C2/8734: A5 60        LDA $60
C2/8736: D0 35        BNE $876D

If a magic sword spell is present the weapon element code is skipped entirely.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FFV Damage Calculator
« Reply #21 on: April 18, 2016, 03:18:10 PM »
I knew that it was too good to be true :D

Ahh I see now ... so $60 hold a flag - do we have a SpellBlade.
Yes I missed INC $60 ... not because I didnt see the code, but there are couple of flag variable, some without description, some change the meaning in different subroutines (like '$4D = Base Hit%', but in all subroutines that I've looked it hold the Element of the action/magic)

THANK you Jorgur!!! Mistery solved, no extra x2.
Well thats why I try to check with the asm code (as much as I can understand)... cant trust the description only :D
What is interesting that in my implementation I used only 3 variables, not 6 ($2050-$2055) and much simple logic (no need for 6 ORs) :D

Edit> Currently I play SpaceQuest V. Its an adventure ('point & click) game and if you miss a detail you pretty much will not be able to solve a puzzle. I felt almost as I missed a detail from the puzzle :D
« Last Edit: April 18, 2016, 03:29:45 PM by Squall »

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FFV Damage Calculator
« Reply #22 on: April 28, 2016, 09:39:44 AM »
How to add a document in slick/doc ?

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Damage Calculator
« Reply #23 on: April 28, 2016, 05:38:55 PM »
Type the desired name of the page in the Search field. If the page does not already exist you can click on the "Create the page" link.

To link to it in the FF5 hacking page, click on Edit where you want your link. You can just copy/paste another link and change it to link to your page.

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FFV Damage Calculator
« Reply #24 on: May 03, 2016, 06:34:02 AM »
That thing doesn't work properly ... when I pasted the text in the newly created page my browser start to lag and constant Wait or kill window.

I was thinking to do it as: http://slickproductions.org/docs/FF5/Bank%20C2%20disassembly.txt just different file name, but I cant find a way to upload there

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Damage Calculator
« Reply #25 on: May 03, 2016, 08:42:35 PM »
Everthing seems to be working for me, so it must be problem on your end. Have you tried using a different browser?

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FFV Damage Calculator
« Reply #26 on: May 04, 2016, 02:52:10 AM »
I tried Chrome, Opera - same problem.
Then I tried FireFox it works ... but doesnt put new lines (line breaks) as is in the .txt file. Do you know how to fix it?
You may check I created 'Squall' section in Wiki-FF5

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Damage Calculator
« Reply #27 on: May 04, 2016, 06:02:51 PM »
The text formatting is a bit different in a wiki. You will have to use a text processor of some kind to get the formatting right.
https://www.mediawiki.org/wiki/Help:Formatting

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: FFV Damage Calculator
« Reply #28 on: May 05, 2016, 03:48:02 AM »
o boy it is the HTML sh.t  :(

Is there a way to upload the txt file here: http://slickproductions.org/docs/FF5/

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV Damage Calculator
« Reply #29 on: May 05, 2016, 06:37:31 AM »
It's not HTML. Open another wiki page and click edit and you will see what I mean.
Is there a way to upload the txt file here: http://slickproductions.org/docs/FF5/
Yes, the submissions forum, but the site admin rarely adds new submissions to the site (if ever). He intends for us to use the wiki for these things nowadays.