Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1975.75e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexbaee.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=17.60e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexbaee.html.zx9h^ V{<OKtext/htmlISO-8859-1gzip8:{<Wed, 11 Mar 2020 01:22:45 GMT0 0P9h^ ,{< FFV patches (and compatibility with each other)

Author Topic: FFV patches (and compatibility with each other)  (Read 31722 times)

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #75 on: December 17, 2014, 01:17:17 PM »
Windhex has an option to compare two files and show the differences.

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: FFV patches (and compatibility with each other)
« Reply #76 on: December 17, 2014, 06:39:19 PM »
as does FC, from the command prompt in Windows or DOS.

----------------

That last check is done in:

Code: [Select]
C2/9419: A6 2E        LDX $2E
C2/941B: E0 0F 27     CPX #$270F
C2/941E: 90 03        BCC $9423
C2/9420: A2 0F 27     LDX #$270F  (Max Damage = 9999)

so if you are going to patch it, that should be a good choice to start in that point.

agreed; i was favoring that spot.


Quote
Let's suppose then a PC in Lv 97 equipped with Ragnarok + Brave Blade and facing Halicarnaso:

Code: [Select]
Attack = 140 + 150          = 290
     M = (97 * 255)/128 + 2 = 195
Damage = ((290 * 8) = 2320) * (197) = 457040 (Which is a 19 bits number)

An overflow is possible but probably nobody is going to notice it ever. It is very probable (1/8) when a number is so high than one of the three highest bits of the 16 bit capped Damage to be 1, and that means a damage of 9999.

thanks for testing.

- where are you getting 255?  is that a hypothetical hack?  from what i've read, Strength maxes out around 50.
- well, a little under 7/8, as 8192 (just bit 13 being set) won't be capped to 9999.  but yes, it is around 85%.

still worth fixing, imho.  and because the spot involved is moved with the Fractional M patch, i think it's worth including in that patch as well.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #77 on: December 17, 2014, 06:57:20 PM »
- where are you getting 255?  is that a hypothetical hack?  from what i've read, Strength maxes out around 50.

Yes, it's hypothetical. As it is a 8 bit value I just put the maximum possible there.

- well, a little under 7/8, as 8192 (just bit 13 being set) won't be capped to 9999.  but yes, it is around 85%.

That's it. Around 85% as the bits 12-10 can increment enough the 8192 value to put it over 9999.

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: FFV patches (and compatibility with each other)
« Reply #78 on: December 17, 2014, 07:03:46 PM »
but it's unlikely Square had Agility in that function by accident.  so imho, the best fix tries to figure out in what capacity Agility would've likely been used, while still retaining balance.
It's not quite that simple, you cannot retain balance if you include Agility. By default, in vanilla (unpatched) FF5, Knife based weapons do the exact same damage as Sword based weapons if they have the same attack power (because of the bug, knives sometimes do a little extra). It's a very simple, understandable way to calculate damage - if the weapons have the same attack power, they do the same damage. If, on the other hand, you patch the ROM to include Agility, it becomes a lot more complicated.

by "retaining balance", i meant have similar capabilities between the weapon types, i.e. similar damage ranges.

Quote
Take as an example a Knight wielding a Mythril Sword. You happen to find a MageMasher knife. Normally the two weapons do the exact same damage, but if half the Strength influence is replaced by Agility, the MageMasher will end up doing less damage (because Knight has low Agility).

so this weapon would favor Thieves..  don't high-Strength jobs already have weapons that favor them (or are outright exclusive to them)?

Quote
Quote
without an extra term in the formula, Knives are more of a poor man's Swords.  they don't really have anything to set them apart.
This is not true. According to instructrtrepe's algorithm guide, all knife based weapons halve the enemy evade stat when used. This alone gives knives an advantage over swords.

oops, i forgot about that.

Quote
Quote
I'm almost persuaded by the argument, but what do the damage numbers look like at each level with either approach?
With (Level*Strength)/128 + 2 (or vanilla FF5), knives do the exact same damage as swords of the same attack power. Every 3-6 levels the attacks become a bit stronger.

well, not the exact same.  Knives get "(0..3)" added to Attack, while Swords get "(0..(Weapon Attack)/8))" added.  the latter is generally higher.

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #79 on: December 17, 2014, 07:38:45 PM »
still worth fixing, imho.  and because the spot involved is moved with the Fractional M patch, i think it's worth including in that patch as well.

Fine by me... where is it in the patch that I can fix it? May as well factor it in. I take it it's separate from a straightup patch without Fractional M.

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: FFV patches (and compatibility with each other)
« Reply #80 on: December 17, 2014, 08:20:57 PM »
another thing regarding Fractional M:

Code: [Select]
C2/8A0D: A6 52        LDX $52
C2/8A0F: D0 15        BNE $8A26
C2/8A11: E6 52        INC $52      (Minimum M = 1)

Code: [Select]
C2/940C: A5 52        LDA $52
C2/940E: D0 01        BNE $9411
C2/9410: 1A           INC         Minimum M = 1
C2/9411: 85 2C        STA $2C

because the patch uses 128M, we should probably be giving it a floor of 128 here in order to behave equivalently to the original game.

i think the first check is there because the second check never saves the updated M in $52, and Square might want to use that updated M value for Healing.  however, that raises the question why C2/881D doesn't enforce Minimum M in a similar manner.  if "Check Target Can't Evade vs. Attack" passes there, M*2 winds up with a floor of 0, brought up to 1 by calling C2/93F8.  in contrast, if that check passes in C2/8A05, M*2 winds up with a floor of 2.  subtle difference, but odd.

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #81 on: December 18, 2014, 04:43:00 AM »
by "retaining balance", i meant have similar capabilities between the weapon types, i.e. similar damage ranges.
so this weapon would favor Thieves..  don't high-Strength jobs already have weapons that favor them (or are outright exclusive to them)?
Sword based weapons and knife based weapons are already quite well balanced. Early in the game, knives and swords do similar damage (Dagger equals Broad Sword, Mythril Sword beats Mythril Knife, but Guardian knife beats both). Swords are generally more powerful, but knives are more reliable (accurate).

Late game, sword based weapons do much more damage than knives, but knives have special traits (instakill, steal while attacking, chance to evade, bonus damage to humans). This reminds me, the ManEater knife is technically a sword based weapon.

Your suggested fix would make knives much less useful for warrior jobs. Thieves would get a damage boost, but I would argue that they don't need it. Thieves are mainly used for stealing or their numerous innate abilities.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #82 on: December 18, 2014, 05:29:42 AM »
Thieves would get a damage boost, but I would argue that they don't need it.

Not really. The STR and AGL / 256 makes knifes based weapons worst also to Thieves (I explain it in Reply #54)

Thieves are mainly used for stealing or their numerous innate abilities.

The Thief job ends becoming obsolete in combat. I am with Digitsie in this class is underpowered compared with the same on FFIV and FFVI. Again, looks like original designers wanted to reward the Agility of the knives users but if we fix the "looks-like-original-formula" that results in unbalancing the game...

So, we have 6 approaches here:
  - Bugged
    M = (STR * Lv)/128 + (0..1) + 2
   Balanced but bugged formula.

  - Chicken Knife (first approach)
    M = (STR * Lv)/128 + (AGL * Lv)/128 + 2
   Broken formula. Overpowered compared with the original in a proportion near to 2x
   
  - Jorgur's
    M = (STR * Lv)/128 + 2
   Balanced formula. A little bit underpowered compared with the original.
   
  - Instructrtrepe's
    if (STR > AGL)
      M = (STR * Lv)/128 + (AGL * Lv)/256 + 2
   else
     M = (STR * Lv)/256 + (AGL * Lv)/128 + 2
   Unbalanced formula. Overpowered in a proportion near to 1.5x
   
  - Assassin's  :edit:
    M = (STR * Lv)/256 + (AGL * Lv)/256 + 2
   Balanced formula. A little bit underpowered compared with the original.
   Little reward to Agility based classes.
   
  - Noisecross's
    if (STR > AGL)
      M = (STR * Lv)/128 + 2
   else
     M = (AGL * Lv)/128 + 2
   Balanced formula. A little bit underpowered compared with the original.
   Rewards agility based classes
« Last Edit: December 18, 2014, 06:27:59 AM by noisecross »

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: FFV patches (and compatibility with each other)
« Reply #83 on: December 18, 2014, 05:54:33 AM »
Thieves would get a damage boost, but I would argue that they don't need it.

Not really. The STR and AGL / 256 makes knifes based weapons worst also to Thieves (I explain it in Reply #54)

Quote from: reply #54
Well... it seems nobody likes my approach of using the average of Strength and Agility.

That's a good thing as the Agility is only higher than Strength in few classes and these classes are in fact the ones which use the knives... performing an average is harmful to these classes as it is to the fighter classes so I better dismiss this approach.

an average might be lower than pure Agility would be, but it still boosts these classes' damage relative to what's in the original game.

Quote
- Assassin's
    M = (STR * Lv)/256 + (AGL * Lv)/256 + 2
   A little bit unbalanced formula. Underpowered and with huge jumps in damage increments.

well, doing ((STR + AGL) * Lv) / 256 could smooth things out.  same deal with any other method in the list that suffers from damage jumps.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #84 on: December 18, 2014, 06:15:58 AM »
an average might be lower than pure Agility would be, but it still boosts these classes' damage relative to what's in the original game.

That's true. Even with that, I don't like the idea of lowering the damage of Fighter classes but I agree is a little bit boost to Agility based classes. We can say then "Balanced formula. A little bit underpowered compared with the original. Little reward to Agility based classes". I am editing it on the post.

well, doing ((STR + AGL) * Lv) / 256 could smooth things out.  same deal with any other method in the list that suffers from damage jumps.

Ok. That is what Fractional M does and I was talking about the vanilla game.
If we talk about Fractional M, I'd still prefer leaving the formula alone for fighter classes (as it is balanced) and giving a little boost to Agility based classes.
« Last Edit: December 18, 2014, 06:29:19 AM by noisecross »

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: FFV patches (and compatibility with each other)
« Reply #85 on: December 18, 2014, 06:32:50 AM »
Code: [Select]
C2/849B: A5 26        LDA $26
C2/849D: 20 BB 01     JSR $01BB    (Level * Magic Power)/128
C2/84A0: 18           CLC
C2/84A1: 65 52        ADC $52
C2/84A3: 85 52        STA $52      (M = M + (Level * Magic Power)/128)

the Fractional M patch doesn't touch this code.  this means that Rune weapons will have essentially no boost to M.  (but test in case i'm wrong.)

solution: NOP out C2/849D.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #86 on: December 18, 2014, 07:08:46 AM »
Right. Good catch there.

You can edit C2/849D to "EA, EA, EA" (which is "nop nop nop") or to "20, C2, 01" (which is "jsr $01C2") to keep coherency with the instructrtrepe's edition.

I'd prefer your edition as it takes 6 cycles to the one followed by instructrtrepe which takes 12 cycles.
 :edit: By the way, "80, 01, EA" which is "bra $84A0 nop" takes 3 cycles.

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #87 on: December 18, 2014, 07:32:58 AM »
you'd prefer C2/849D be edited to 80,01,EA then?

And re: the thief debate.

I still feel like thief is underrated compared to IV and VI, and it seems odd that they get lowered so drastically for V. I wouldn't really want to play it on its own, as when I steal, I then just switch to fight the rest of the way (like with Locke)

However, if I ignore that and look at thief in itself compared to the other job classes, the freelancer job, I think, really encourages you to play it to optimize your stat, so I can see why Jorgur would prefer to leave it be.

How did FFVA or FFVPS handle this one, btw?

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #88 on: December 18, 2014, 08:12:33 AM »
[...] you'd prefer C2/849D be edited to 80,01,EA then?

I don't really mind. Just was noticing that.

[...] like with Locke

Locke is a Thief which can use swords. That's why he is good as fighter all the entire game.

How did FFVA or FFVPS handle this one, btw?

Good question. It would be nice to know.

Digitsie

  • Mom Bomb
  • *
  • Posts: 105
    • View Profile
Re: FFV patches (and compatibility with each other)
« Reply #89 on: December 18, 2014, 08:43:49 AM »
Fixed rune, not posting yet, wanted to see how to fix the floor/overflow thing.