øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1940.msg22657e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index55f1.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1940.120e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index55f1.html.zx` g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ ,/ó0OKtext/htmlISO-8859-1gzip0|Öó0ÿÿÿÿÿÿÿÿTue, 10 Mar 2020 03:49:11 GMT0ó°° ®0®P®€§²ð®_ g^ÿÿÿÿÿÿÿÿO-ó0 Chillyfeez's Mods, hacks, research notes, etc.

Author Topic: Chillyfeez's Mods, hacks, research notes, etc.  (Read 17637 times)

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #120 on: March 05, 2015, 08:56:12 PM »
While I'd love to see it happen, how feasible it it really?

Near as I can figure, monster HP can't be expanded to 24 bits unless party HP is as well, since damage routines are the same for both. There's plenty of unused bytes in monster stat records, but not so many in party stat records. Then there's rewriting all of the monster data in ROM (ugh).
It just seems like such a massive undertaking.

I mean, don't let me discourage you if it's something you want to tackle... I'll help if I can, but the thought of trying to make it all work makes my head spin a little bit.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #121 on: March 05, 2015, 09:29:11 PM »
That is some fantastic proof-of-concept JCE! It looks so clean, and if we forget about including max HP values in battle as you show there it looks perfectly fine. I'm sure you're aware though that stats only reach up to 255 normally, but as a proof of concept it is a wonderful idea.

Now increasing monster's HP past 65,535 will not be easy, every byte of a monster's ROM data is used when fully optimized (as in when the Evades are properly reconfigured) if the evades are taken out of the picture there are four more bytes to use for the enemy's data, now this is possible, and it could work this way...

(Using Magic Evasion byte)

Write custom code into the "Is HP 0?" check that then looks at the ID "Is it an enemy?" then finally "Does Magic Evade = 0?" If so, move on to the rest of routine. If not, "Add FFFF HP to enemy" and finally "Subtract 1 from Magic Evade".

Is it clean? No, not really, past 65,535 HP value you only have x2, x3, x4, etc. But it will work for those big enemies. Granted any damage done after HP reaches 00 will reset to 65,535. Now you could utilize more of those unused evade bytes to set more variety, like "IF Magic Evade Multiplier = 3 divide 65,535 by 3 for next life bar"

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,429
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #122 on: March 05, 2015, 10:08:30 PM »
While I'd love to see it happen, how feasible it it really?

Near as I can figure, monster HP can't be expanded to 24 bits unless party HP is as well, since damage routines are the same for both. There's plenty of unused bytes in monster stat records, but not so many in party stat records. Then there's rewriting all of the monster data in ROM (ugh).
It just seems like such a massive undertaking.

I mean, don't let me discourage you if it's something you want to tackle... I'll help if I can, but the thought of trying to make it all work makes my head spin a little bit.

In regards to the monster HP it would be an undertaking.  The result if achieved would be an outstanding one as seen with Final Fantasy 3us.  I'm still on the fence on this one.  Higher defense for monsters and lower physical attack for characters would probably be much less work. 

That is some fantastic proof-of-concept JCE! It looks so clean, and if we forget about including max HP values in battle as you show there it looks perfectly fine. I'm sure you're aware though that stats only reach up to 255 normally, but as a proof of concept it is a wonderful idea.

Now increasing monster's HP past 65,535 will not be easy, every byte of a monster's ROM data is used when fully optimized (as in when the Evades are properly reconfigured) if the evades are taken out of the picture there are four more bytes to use for the enemy's data, now this is possible, and it could work this way...

(Using Magic Evasion byte)

Write custom code into the "Is HP 0?" check that then looks at the ID "Is it an enemy?" then finally "Does Magic Evade = 0?" If so, move on to the rest of routine. If not, "Add FFFF HP to enemy" and finally "Subtract 1 from Magic Evade".

Is it clean? No, not really, past 65,535 HP value you only have x2, x3, x4, etc. But it will work for those big enemies. Granted any damage done after HP reaches 00 will reset to 65,535. Now you could utilize more of those unused evade bytes to set more variety, like "IF Magic Evade Multiplier = 3 divide 65,535 by 3 for next life bar"

That is a very interesting take on the monster HP subject.  I'd be interested to see if this is something that could be done.  Maybe relocating the entirety of the monster data in an expanded ROM data block would give more space to then allow all monsters the same byte length.  I tried and failed at that last bit...

On the example images I posted I only used 9's just to fill up the 8x8 space. :)  I do know you could probably increase the stat cap display length too.  I made only partial progress on it but lost that ROM and document in a HDD crash. 

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #123 on: March 05, 2015, 11:52:32 PM »
Hmm, inklings of an idea are starting to appear, something I should be able to use in Combat Boost as well, down the line...

Here's the line of thought.


Here's an example...

Zeromus

Level 65.

Item Drop Byte 01

That's all that has to be done with the ROM data.

Now here's what the plan would be...

HP Drops to 00.

Is it a monster? (Yes)

Is its Item byte below 40? (Yes) (What this does will make it look to see if the enemy has the no drops set to not drop an item. If it does it will go to the next bit of data.)

Is it 00? (If so, jump out of this routine)

Subtract 1 from the Drop Table.

Load Enemy's Level into X. (65 in this case)

Add 1000 into Accumulator

Place Level into X.

Add 1000 into Enemy's HP.

Subtract 1 from X

Loop until X reads 00.



Through just configuring two bytes in Zeromus' ROM data (Level and Item Drop) he would gain 65,000 more HP.

The increments of 1000 lets it to be used fairly openly (just don't go over Level 65 for obvious reason!) and you can set how many "life bars" you want by utilizing the amount in the Item Drop table.


chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #124 on: March 06, 2015, 08:51:34 AM »
OK, I had a thought about the feasibility of the five-digit party HP display. It's related to something that's been on my mind for a while.

Whereas there wouldn't be enough room in the battle window to display [current HP]/[max HP], there is enough room to display [current HP][space][something three characters wide].
Meaning you could do [current HP][space][percentage of full HP].
I could also rework User Options to accommodate the change, so the percentage would display %max HP or %ready depending on the selected option.

... Now here's where the brainstorm really gets good... Instead of [current HP][space][three space wide percentage], we could do [current HP][four space wide meter].
Using the wealth of empty space for numbers and letters leftover from the Japanese editions, we could make 8 new "letters" - a single, right-aligned vertical line (one pixel wide), two pixels wide... All the way up to an 8-pixel full box. Stack four of those side by side, then create an algorithm that tells the game:
1) calculate the appropriate percentage (either Max HP or Readiness). you'd only need a one-byte value, but two bytes would yield more accuracy, of course. User Options is already doing this for readiness.
2) If the percentage is FF (100%, FFFF if using two bytes), then display [full box][full box][full box][full box]
3) for every 0x06 the percentage decreases (or 0x0666 for two bytes), decrease the meter, so if the percentage (one byte) is F9, then display [7-box][full box][full box][full box]

There's probably a more numerically efficient way to make those meter bars decrease (similar to how the game displays numbers, I'd imagine), but this would certainly work.

I'm not sure I could fully get behind a five digit HP value without a way to display max HP, and this could be the answer.

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #125 on: March 06, 2015, 09:09:58 AM »
... Now here's where the brainstorm really gets good... Instead of [current HP][space][three space wide percentage], we could do [current HP][four space wide meter].
Using the wealth of empty space for numbers and letters leftover from the Japanese editions, we could make 8 new "letters" - a single, right-aligned vertical line (one pixel wide), two pixels wide... All the way up to an 8-pixel full box.

I was just going to suggest an ATB bar too!  Would this use the 2nd control timer .. what I call the "master control timer"?  That value technically decreases to zero over time starting from a varying value; how would you calculate an increasing percentage from it?

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #126 on: March 06, 2015, 09:23:43 AM »
Oh ho! An HP bar, eh? I really like that idea, as it still gives a numerical amount of how much HP one has and it would work with the X9999 HP display quite well, I would imagine.

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,429
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #127 on: March 06, 2015, 09:45:55 AM »
Now those are some brilliant ideas! 

One thing that may need to be tweaked is the HP per level for the characters so after say level 69 when the lovely 70-99 level ups happen the melee characters have the ability to go over 9999 at some point.  Or would you add another Apple item that raises more than 50/100 HP?  If it were me I would raise the EXP requirement for levels 50-69 to be about double the default amount, but, as a reward for leveling up get a substantially larger amount of HP per level up. If memory serves me I believe the only character than could legitimately get over 9999 is Yang without the use of Silver/Golden Apples.  Cecil statistically can get close (~9800?) if you manage to roll the lucky number every time. 

What do you all think?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #128 on: March 06, 2015, 10:35:01 AM »
I was just going to suggest an ATB bar too!  Would this use the 2nd control timer .. what I call the "master control timer"?  That value technically decreases to zero over time starting from a varying value; how would you calculate an increasing percentage from it?

Are you talking about the timers at 7E2A07?
If so, then yes.
The current version of my User Options patch makes use of some normally unused character stat byte... like 2043,x or something.
When the timer resets (is at its highest point), the value is stored into that character stat byte
then it keeps checking the timer and uses this formula (where M is the max timer value and C is the current timer value):
(M-C)/M
The result is a 16 bit value (without looking at it again... I don't remember exactly how the calculations work) that then goes through the normal decimal conversion routine to be displayed as a percentage in the Party HP window.

Now those are some brilliant ideas! 

One thing that may need to be tweaked is the HP per level for the characters so after say level 69 when the lovely 70-99 level ups happen the melee characters have the ability to go over 9999 at some point.  Or would you add another Apple item that raises more than 50/100 HP?  If it were me I would raise the EXP requirement for levels 50-69 to be about double the default amount, but, as a reward for leveling up get a substantially larger amount of HP per level up. If memory serves me I believe the only character than could legitimately get over 9999 is Yang without the use of Silver/Golden Apples.  Cecil statistically can get close (~9800?) if you manage to roll the lucky number every time. 

What do you all think?

If you're increasing HP and damage all around and making the higher values generally available, then I don't think you need to make it harder to get to the levels that will exceed 9999 HP.
I mean, anybody who gets their characters up to Lv. 99 in FFIV is doing a lot of grinding anyway...

If you want to make above 9999 values "special," like they are in FFX, then I wouldn't build them naturally into the level-up system.
Apples would be one possibility...
Then there's the possibility of creating equipment that increases the wearer's max HP by a percentage (though I don't know exactly how this would work... FFIV doesn't seem to have a place to store base vs. adjusted Max HP like later FF games)
You could also make equipment that gives HP bonuses at level up (make the level up routine say, "check for bonus armor, if equipped, add 200 to the level up HP award")

Or... what about simply increasing the max level? Again, I don't know exactly how difficult this would be without doing some research... the sticking point in my estimation would be whether the "current Exp" and "Exp needed for next level" have enough room for many more levels.
But if characters could level up to, say 150, then Cecil and Kain would have no problem exceeding 9999 HP eventually.

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,429
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #129 on: March 06, 2015, 11:10:33 AM »
The increasing the level beyond 99 would pretty much fix it.  The level up table can easily be done by allowing 3 digit level # displays, adding more levels after the 70-99 to do 70-150 or whatever, and add the extra experience needed.  Though I cannot remember on that last one how the 70-99 experience requirements for level up are done.  *edit* Ok I remember how the EXP is done so nevermind that last sentence.  :)

Sucks I am at work and cannot work on this!
« Last Edit: March 06, 2015, 04:00:54 PM by JCE3000GT »

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #130 on: March 06, 2015, 01:54:42 PM »
Are you talking about the timers at 7E2A07?
Sure am.

The current version of my User Options patch makes use of some normally unused character stat byte... like 2043,x or something.
Well, that'd do it.  I wonder how many hacks use the same unused stat byte.  Are unused RAM areas known, assuming there are any?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #131 on: March 06, 2015, 03:37:49 PM »
There's a huge block... I wanna say 7E4800-7E7000 (that's far from exact) that as far as I know is completely unused. But I haven't watched it through the whole game, so I cannot confirm.

I'm not aware of any FFIV hacking projects before my own that actually make use of unused stat bytes (but I don't have the "historian" cred that, say, Grimoire has, so I could be mistaken). It should be noted that those bytes only exist during battle. The out of battle character record is only 0x40 bytes long and all are used.

avalanche

  • Mom Bomb
  • *
  • Posts: 122
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #132 on: March 06, 2015, 07:52:34 PM »
I feel like I have heard mention of using unused char/monster record bytes a few times from you and/or Grimoire, though I could be wrong.  But perhaps one could use that area for quite a lot of additional battle-only values per slot if one was to run out of space in the $80-long areas. 

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #133 on: March 06, 2015, 10:08:29 PM »
That's a good point - all of those battle-only things could be easily relocated, and could use the same indexing as the normal battle stat locations (separated by 80 bytes per character).

Grimoire and I have certainly talked about using unused stat bytes a bunch before, but to my knowledge, only User Options (for the ATB percentage) and my long-term project (for the limit breaks) actually do it.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Chillyfeez's Mods, hacks, research notes, etc.
« Reply #134 on: March 06, 2015, 10:15:07 PM »
My Protect/Shell Status Mod also uses one unused stat byte. (x74) since I never saw any part of it being used.

We don't often use those unused bytes in our routines as we don't often need to. They do make good spaces for new status spots though.