øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=2179.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index9842.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=17.40e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index9842.html.zxR9h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈà•¤�»OKtext/htmlISO-8859-1gzip@øÕ�»ÿÿÿÿÿÿÿÿWed, 11 Mar 2020 01:21:46 GMT0ó°° ®0®P®€§²ð®Q9h^ÿÿÿÿÿÿÿÿµ�» Back to FFV

Author Topic: Back to FFV  (Read 2855 times)

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Back to FFV
« Reply #15 on: May 17, 2016, 09:49:01 AM »
We ended up using my formula, but there is no reason why there shouldn't be multiple choices.
Noisecross, if you are reading this, please consider making an alternative patch with (Strength*Level)/256 + (Agility*Level)256 + 2.
I have been missed for a long time. I'll try to save time to check this alternative.
Do you want this patch mixed with the "Fractional M" one?

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Back to FFV
« Reply #16 on: May 17, 2016, 03:29:47 PM »
Yes, that is what I meant.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Back to FFV
« Reply #17 on: May 19, 2016, 02:24:52 PM »
Ok. I am attaching here a patch which includes the [Fractional M] patch plus the additions included in the [H - Delta to Fractional M 1.2] but having a knives "M" factor of:
(Strength * Level) / 256 + (Agility * Level) / 256 + 2

Chicken Knife still have a "M" factor of (Strength * Level) / 128 + (Agility * Level) / 128 + 2

I really hope everything is ok because I have been months without coding ASM. Anyway, the readme file explains how to implement the formula so it should be very easy to any romhacker to manually replicate the formula in another ROM.

Code: [Select]
Knives fix (Jorgur + noisecross):
M = (Strength * Level) / 256 + (Agility * Level) / 256 + 2

C2/80E0: __ __ __ __ __ __ __ __ __ AD E5 7B 85 24 AD E1
C2/80F0: 7B 85 25 20 F1 00 A6 26 86 0E AD E5 7B 85 24 AD
C2/8100: E2 7B 85 25 20 F1 00 C2 20 A5 26 20 C1 01 85 10
C2/8110: A5 0E 20 C1 01 18 65 10 69 00 01 85 52 7B E2 20
C2/8120: A6 49 BD 2D 20 AA 86 54 EA EA 60 __ __ __ __ __

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Back to FFV
« Reply #18 on: May 20, 2016, 03:18:54 AM »
Tested and working. Added to the wiki.

noisecross

  • FF5 Hacker
  • *
  • Posts: 146
    • View Profile
Re: Back to FFV
« Reply #19 on: May 23, 2016, 06:44:50 AM »
Tested and working. Added to the wiki.

Thanks for the feedback!

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Back to FFV
« Reply #20 on: June 09, 2016, 12:47:40 PM »
Since I said I will freeze the Viewer, today I worked a little bit on it adding more filters for Weapons/Armor :D
While doing it I stumbled again on something interesting:

Every weapon/armor has a type that is a 6-bit number (0..63). The game uses only (0..31) and their values-meaning are well documented. The type number is an index in a table, that contain the same 4 bytes that describe gear compatibility of Jobs/Ability. Although we have 32 bits, almost all entries use only one bit. There is only one exception: so called 'Exotic Weapons'.

There are 3 weapons that fits there: Moorning Blade, Rising Sun & Twin Lance.
Can you guess, why only Thief, Ninja & Mime may use them? :D

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Back to FFV
« Reply #21 on: June 11, 2016, 02:45:11 PM »
My guess is that they wanted to create a Thief/Ninja weapon type, but were running out of usable bits in the "Equipment Type" byte list. Instead of making a new entry called "Exotic weapons", they made equipment type value 1E into a "hybrid" type, belonging to both Ninja Sword and Thief Gear categories.

I just thought of something. The developers meant for Mimics to be able to use any kind of armor including Thief Glove, so they set the bit for Thief Gear. Doing this, however, enabled Mimics to use Exotic weapons. I speculate that Mimics were not supposed to be able to equip Exotic Weapons, don't you guys agree?

In hindsight, they should have probably just made a new entry for exotic weapons. The current system is confusing and unneccessary, unless somebody plans on adding tons of new equipment types.
What if we make a patch that adds a new entry for Exotic weapons and remove the index system? We could free up quite a bit of ROM space.  :happy:

Squall

  • Dark Dragon
  • *
  • Posts: 486
    • View Profile
Re: Back to FFV
« Reply #22 on: June 11, 2016, 04:48:05 PM »
Quote
they made equipment type value 1E into a "hybrid" type, belonging to both Ninja Sword and Thief Gear categories.
Haha, thats the key why only 3 Jobs:
- Thief because he has Thief Gear flag ... nothing to do with weapons :D
- Ninja - obviously Ninja Sword flag
- Mime - same as Thief, but you might be right that's not intended

Quote
What if we make a patch that adds a new entry for Exotic weapons and remove the index system? We could free up quite a bit of ROM space
Adding a new type of weapon is possible, since there is 1 unused bit and Flail is not used too.
I'm not sure about ROM space ... you will save 64x4 bytes, but you will need 224*4 bytes to remove the index. You can optimize a little bit by using only 2 bytes instead of currently 4, so you will end up with 224 *2. We already have 1 byte for the index, so you will end up with 224 extra bytes. Compared that with 256 currently used ...  not worth the efforts :D

Jorgur

  • Moderator
  • *
  • Posts: 437
  • Gender: Male
    • View Profile
Re: Back to FFV
« Reply #23 on: June 12, 2016, 05:03:40 AM »
Quote
you will need 224*4 bytes to remove the index
You mean that each item would need 32 bits of flags to define its type. That is unneccessary since no item belongs to more than one type. Each Equipment type value could refer to a certain Equipment type bit.

I was thinking of a system like this:
Code: [Select]
Bit   Value
80    07        80    0F        80    17        80    1F
40    06        40    0E        40    16        40    1E
20    05        20    0D        20    15        20    1D
10    04        10    0C        10    14        10    1C
08    03        08    0B        08    13        08    1B
04    02        04    0A        04    12        04    1A
02    01        02    09        02    11        02    19
01    00        01    08        01    10        01    18
All that is needed is a little bit of ASM to convert between value and bit.

The rewards for doing this are as follows:
- 256 bytes of ROM space freed up
- You get a system that is much simpler and easier to work with

Downsides:
- You cannot have more than 32 Equipment type values - currently you can have up to 32 plus 32 "hybrids" such as Full Moon
« Last Edit: June 12, 2016, 07:23:27 AM by Jorgur »