øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1911.msg21057e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index538e.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1911.90e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index538e.html.zxL*g^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈÐClOKtext/htmlISO-8859-1gzip0|ÖClÿÿÿÿÿÿÿÿTue, 10 Mar 2020 06:05:22 GMT0ó°° ®0®P®€§²ð®K*g^ÿÿÿÿÿÿÿÿ©5Cl The Drawing Board

Author Topic: The Drawing Board  (Read 17976 times)

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #90 on: July 28, 2014, 06:04:13 AM »
Quick Request:

   You may notice in the above the sudden halt in Yang's HP gain: thank you Square, though really this really isn't that bad when considering... well anyway - I know this is a well known bug, but I was wondering if anyone had handy the data that should be referenced. Worst case I'll hit the ROM with the HP Fix Patch that came out a while back and then check it out in FF4kster. I might also pull it out of the GBA ROM also - which now that I said that I think I'll do at some point just to compare notes.

   But if someone happened to have that data at the ready I'd definitely take it. But if you don't now, we all will soon!  :finger:
"Now I know; and knowing makes it even more confusing..."

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: The Drawing Board
« Reply #91 on: July 28, 2014, 11:48:22 AM »
I believe FF4A was used from thereon out according to the topic anyhow.

http://slickproductions.org/forum/index.php?topic=876.0

I could be wrong, I recall that Vivify's Project II (The Base of FFIV:Combat Boost! for me....) used this patch as well and the numbers are just 152 Average from thereon out. in comparison to average 144 for Levels  44-58. So +8 HP Average, basically.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: The Drawing Board
« Reply #92 on: July 28, 2014, 12:50:12 PM »
doesn't Yang tend to reach 9999 around lv 70 anyway? Maybe I'm wrong, but I know I leveled him way up once, and I remember he far surpassed the rest of the party's HP. I thought he reached max, but maybe not.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: The Drawing Board
« Reply #93 on: July 28, 2014, 12:56:21 PM »
In other versions, definitely. In default FFIV, not quite, he basically stops at around 6300-6500 HP.

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #94 on: July 29, 2014, 02:37:00 AM »
I believe FF4A was used from thereon out according to the topic anyhow.

http://slickproductions.org/forum/index.php?topic=876.0

I could be wrong, I recall that Vivify's Project II (The Base of FFIV:Combat Boost! for me....) used this patch as well and the numbers are just 152 Average from thereon out. in comparison to average 144 for Levels  44-58. So +8 HP Average, basically.

Thank you good sir! This will definitely come in handy. Given chillyfeez's triumph over TNL coding  :banonsmash: - I will work on finishing up HP/MP/Stats.

But now for a question:

As we all know FF4 takes a very different approach to later level mechanics. I confess that in the course of any given play through I don't make it into 70+ levels, so really it does matter. But in my trying to work something out for the entire spread should I include that information - or bit and pieces anyway? That speaks to a more general question of randomization: one approach I've considered is along the lines of the following:

Character gains a level
Game loads the statistic in question (S)
(S) is checked against some average set of stats*
S is increased (or decreased) with a probability that scales with the deviation from average **
 
 *   As we were discussing before I think there should be two curves:   Fighter vs  Mage
**  I was also imaging that the class of the character in play would factor into how likely stats change

One other thing on my mind (but this would need some play testing) would be to work in a factor for the calculation that can scale how fast and/or how high any given attribute could go. :hmm:

- Sort of similar to chillyfeez's MLA strategy:
http://slickproductions.org/forum/index.php?topic=1940.msg20858#msg20858

- Thoughts?

:edit:

Another possibility may be to consider age groups. After the discussion about the range of ages present perhaps that can be a split as well:

Young / Aged:      Low gains in Str/Vit,   Average Agl,   High Wis/Wil
            Adult:      High gains in Str/Vit,  Average Agl/Wis/Wil   (Or all average)

- These (in my mind at least) would just be an additional factor to play into each calculation. Given the characters as they are that would more or less line up with class so it may be redundant. When I work out the statistics for the statistics of the game (what a weird sentence) I'll post the results for general discussion.
« Last Edit: July 29, 2014, 02:50:12 AM by LordGarmonde »
"Now I know; and knowing makes it even more confusing..."

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: The Drawing Board
« Reply #95 on: July 29, 2014, 10:28:00 AM »
An early goal of mine which I've still never figured out has been how to make the eight random level up possibilities occur at the starting levels,  unfortunately all of my attempts came up glitched or blank. I would love though for stat boosts based on RNG though, it would add a bit more variety to the game and create different setups whether intentional or not. I do wonder if this would work better from a class perspective than an age perspective though in some respects.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: The Drawing Board
« Reply #96 on: July 29, 2014, 11:27:52 AM »
An early goal of mine which I've still never figured out has been how to make the eight random level up possibilities occur at the starting levels,  unfortunately all of my attempts came up glitched or blank. I would love though for stat boosts based on RNG though, it would add a bit more variety to the game and create different setups whether intentional or not. I do wonder if this would work better from a class perspective than an age perspective though in some respects.
You mean add some randomness to initial stats? That's a fun idea. There was this Dungeons & Dragons game for Sega Genesis that would let you pick four characters for your starting party then gave you unlimited "re-rolls" to determine your initial stats. I used to spend like an hour starting a new game with that option... On second thought, maybe that's a terrible idea ;)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: The Drawing Board
« Reply #97 on: July 29, 2014, 08:48:37 PM »
Haha! No, no, not exactly like that. I meant that they'd have their basic starting stats, and then for each level up the RNG would kick in, rather than have it set.

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #98 on: July 29, 2014, 11:06:12 PM »
Haha! No, no, not exactly like that. I meant that they'd have their basic starting stats, and then for each level up the RNG would kick in, rather than have it set.


I used to spend like an hour starting a new game with that option... On second thought, maybe that's a terrible idea ;)
lol  :laugh: You brought back memories of a lot of games: Eye of the Beholder, (D&D  :tongue:) Swords and Serpents, Wizardry...oh Wizardry you teasing... That was really not fair for me - I'm a bit obsessive when it comes to honing accuracy and I knew - I had seen - that a high bonus roll was possible. Normally you get 5-9 bonus points to spread around - but if you hold out for a bit (really not too long) 15-19 will come your way...or maybe even 25-29...or 34...or 43...or 52...or 60!! (No spread on any of those).

I fell asleep...NES controller in hand...chasing that rainbow; more than once  :wink:

 :offtopic: At least that was good preparation - I ended up going to school for math & chemistry - so now when people want to give me a hard time about chasing perfection I can tell them to shove it.  :wink:
"Now I know; and knowing makes it even more confusing..."

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #99 on: July 30, 2014, 04:33:33 PM »
Further development on Stat Gain. Here's the first part:

http://slickproductions.org/forum/index.php?topic=1911.msg21011#msg21011

After looking at more of the attribute tables I am very much leaning towards the more simple strategy as I had sketched out earlier. Given that the way I can see it working is should be that there will need to be 2 sets of the 5 attributes per character: Initial Value (V) and Rate of Change (C). The formula then would be just the just increase (or decrease) every R levels. So writing a formula for the value of an attribute after level up:

Y = X + FLOOR(Lv % C)   where X is the Stat now, Y is what it is after gaining the Level - Way easier than my TNL formula!

The only thing left is to optimize the C-parameters for each character for each stat. It's really not so bad - given the constraints of dealing with strictly integers between 1 & 100 you end up with a limited set of choices. In fact it actually ends up being more trouble to try and work out linear equations for each parameter: one reason being the odd-balls: like DkC - starts off with a Will of 3 and drops down to 1 by Lv 20; never to raise again. I will say I do get what they were going for over at Square; so I won't fault them there.

But since I plan to just eyeball it guess and check it shouldn't take too long to compile before I have a working set of values.

MP will quickly follow; though HP I might try and be a bit more scientific about it; though with the tabulated values as they are there are likewise limited possibilities; which works for me!  :wink:
"Now I know; and knowing makes it even more confusing..."

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #100 on: July 30, 2014, 09:20:05 PM »
OK - Here we go. I've put together a table of the stats for each character. The Lv Ct is the number of the levels with stats defined in the ROM which given the data available  as 70 - (1st Lv).

Code: [Select]
Char. Name Str Agil Vit Wis Will Lv Ct Str Agil Vit Wis Will
1 Dk. C. 13 10 11 06 03 60 4/5 1/2 1/2 2/7 0/1
2 Kain 09 11 09 06 12 60 1/1 5/8 8/9 0/1 4/9
3 Rydia 03 04 02 08 05 69 1/2 3/7 1/2 4/5 5/7
4 Tellah 05 08 07 16 16 50 0/1 1/3 -1/8 1/6 1/6
5 Edward 06 09 02 07 07 65 5/9 1/2 3/8 1/3 1/3
6 Rosa 08 08 06 10 18 60 2/3 2/5 3/5 1/5 8/9
7 Yang 12 08 15 02 03 60 4/3 1/2 1/1 0/1 0/1
8 Porom 07 08 05 15 10 60 3/7 3/8 3/5 1/1 2/9
9 Palom 08 07 06 10 15 60 1/4 3/7 3/8 1/5 1/1
10 Cecil 10 13 10 05 08 69 1/1 2/5 7/8 4/9 1/2
11 Cid 21 09 24 05 05 50 9/8 2/5 1/1 0/1 0/1
12 Edge 20 23 17 12 12 45 7/8 2/3 2/3 1/2 2/7
13 FuSoYa 10 20 10 40 40 20 0 0 0 0 0


The first set of stats are the starting values (as they exist now) and the second set (X/Y) is the rate of change: read as increase by X after Y level gains. Given that as a 1st pass the next step will be to rewrite everything to avoid fractionals above in favor of the modulio approach shown above. That's it for this round - but I'll be back; but first...  :sleep:
"Now I know; and knowing makes it even more confusing..."

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: The Drawing Board
« Reply #101 on: July 31, 2014, 10:48:33 AM »
I'm having  a little trouble reading this... So 4/5 of the time Dark Knight Cecil with gain a Str, where as Paladin Cecil's 1/1 will Always see him gain a point of strength?  For instance? Sorry, math has never been my strong point.

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #102 on: July 31, 2014, 03:12:57 PM »
Yes - you've got it! 4 out of 5 times DkC will go up in Strength. Going off of the stat tables it translates increase Str by 1 for 4 levels - then skip the next gain, and resume.
"Now I know; and knowing makes it even more confusing..."

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #103 on: July 31, 2014, 07:26:02 PM »
Slight break from attributes to talk about MP:

These are the easiest number sets by far. First off several characters just have zeroes for their entire lives (Dk.C, Kain, Edward, Yang, & Cid) and the rest have very little variance:

Code: [Select]
MP Initial Lv Range MP Gain # of Gains Total (Low - High) at Lv

Rydia 10 1-9 5-5 8 ( 50 -  50)   at Lv 9
10-30 8-9 21 (218 - 239)   at Lv 30
31-99 10-11 68 (908 - 998)   at Lv 99
   
Rosa 150 10-99 8-9 89 (862 - 951)   at Lv 99
   
Twins 50 10-99 8-9 89 (762 - 851)   at Lv 99
   
Cecil 10 1-69 4-4 68 (282 - 282)   at Lv 69
70-99 8-9 30 (522 - 552)   at Lv 99
   
Edge 60 25-99 4-4 74 (356 - 356)   at Lv 99
   
FuSoYa 190 51-69 0-0 18 (190 - 190)   at Lv 69
70-99 8-9 29 (430 - 460)   at Lv 99


Source:   http://rb.thundaga.com/chars/ff4chrlvup.txt

Looking at that I think it's just easiest to just straight reference it - except, of course, much more efficiently then have Rosa sport 89 entries corresponding to MP+(8-9). To condense the data I would think the best scheme would be to specify as few parameters as required for each character: so what I mean by that would be to code Cecil as:

Code: [Select]
If Lv < 70
   MP = MP + 4
Else
   MP = MP + 8 + Rnd(0...1)
EndIf

So for Cecil we would need to store 70 as the 1st jump point, and then 4 & (8-9) for the gains in those regions. In my "coding" I just wrote it as 8 and then randomizing the range - but it may be more efficient to write it as Rnd(8...9) - or they could work out to be equivalent in ASM -  I don't know; but I'm hoping someone will tell me  :wink:

The reason I'm thinking about that aspect specifically is that HP follows much the same pattern - only with many more stops along the way (often in sets of 8-12 levels). But the ranges there are formulaic as well:

Code: [Select]
Level     HP(+)
10 - 19   20 - 22
20 - 29   30 - 33
30 - 39   40 - 45
40 - 49   50 - 56
50 - 59   60 - 67
60 - 99   70 - 78

- This corresponds to Dk.C and it can all be represented by*:

HP(+)  =  10 * (1 + INT(Lv/10)) + 1 + Rnd(0...X)         With X := Lv - INT(Lv/10)     <--- There are probably easier ways to represent this...**

* The allowance here being that I'm fudging to make the earlier ranges 20-23, and 30-34 - to better fit with the later ranges
** ...But I don't know how best to implement random values and modulo so I instead went for what I'd do in Excel off the top of my head - please feel welcomed to share any number of better programming solutions.

The moral of the story is that I can definitely tackle HP as I suggest handling MP; but I'll probably go for a linear formula. Given the complexity of TNL the HP code should be no problem; it definitely shouldn't* be recursive just the old Y = mX + b - whatever they turn out to be for each character.

Now that I have Yang's corrected data (thank again!) I can tackle that issue. After that it will be an overall clean/write-up for everything regarding levels which I will release in Excel as well as a csv for easy data reference.

:edit: *It shouldn't have to be recursive but it might end up so - it all depends: just how strong is the OCD-side of The Force?

:edit: Slight delay...to quote Butter's Stotch: "Oh...I hate my stupid psychotic brain..."  - But still it's coming along

« Last Edit: August 03, 2014, 08:23:42 PM by LordGarmonde »
"Now I know; and knowing makes it even more confusing..."

LordGarmonde

  • Baigan
  • *
  • Posts: 271
  • Gender: Male
  • "Power only breeds war..."
    • View Profile
Re: The Drawing Board
« Reply #104 on: August 02, 2014, 11:56:56 PM »
Good News!

I have HP mostly worked out - I just went through the first pass of error minimization. I ended up settling on a rather strange approach, but it seems to work well. At present two parameters will be stored per character, Slope (m) and Intercept (b). The formula itself is not recursive and is indeed as I hoped just a linear equation:

Y = m*X + b        Where Y will be the new HP value, and X will be dependent on Level

I say dependent because what I ended up deriving (with surprising accuracy) was a linear relationship between the Max HP for a desired character (@ some Level, Lv) and the Max HP at that same level for Rydia. So it will work out along these lines:

1)  Compute Rydia's HP for the current level*
2)  Lookup the two parameters for the character in question
3)  Apply the above linear formula yielding the HP required**

*This is still a little in the air (but I'm pretty sure how it will go). What I mean is how I'm going to compute Rydia's HP: It will likely be conditional as it is now - but her gain is fairly predictable so it shouldn't be too crazy.
**This will require 3-decimal precision - but now we know the secret knock. Fortunately since this formula isn't recursive it only requires one such calculation (from decimals ranging from ~0.4 - 0.9)

More on this tomorrow.  :sleep:

:edit: Accidentally inverted one of multipliers => Actual Range:  0.4250 - 2.4370  (See Next Post)
« Last Edit: August 03, 2014, 08:25:38 AM by LordGarmonde »
"Now I know; and knowing makes it even more confusing..."