Author Topic: Helpful Charts by DynamixDJ  (Read 6088 times)

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Helpful Charts by DynamixDJ
« on: 2016-04-11 18:55:28 »
Helpful Charts by DynamixDJ

Welcome to the first in a series of charts that I intend to create for the benefit of the FFVII community. You can also find a list of available charts via my Pastebin Homepage, just remember to view the "raw" version!

Charts 001 - Enemy Formations: V1.1.1
View HERE
Download HERE (894 KB)

Example:
Code: [Select]
Enemy Formation Section:

\============================================================================/
 \                                                                          /
  \                 [011E] Cromwell                                        /
   |  Scene 205:    [011F] Manhole                                        | 
  /                 [0120] Manhole(Lid)                                    \
 /                                                                 (S CD)   \
/============================================================================\
|   USED | 1 Cromwell x2      | AT 00  | Sector 4/ | md8_b1   14 | EXP:  1600|
|R1 #820 |                    | Normal | 8 Gantries|             |  AP:   160|
|ED 0334 |                    | Attack | B 1A PGDA |             | GIL:  3000|
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Cromwell         | AT 00  | Sector 4/ | md8_b2   14 | EXP:  2400|
|R1 #821 | 2 Cromwell x2      | Normal | 8 Gantries|             |  AP:   240|
|ED 0335 |                    | Attack | B 1A PGDA |             | GIL:  4500|
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Manhole          | AT 00  | Sector 4/ | md8_b1   12 | EXP:   900|
|R1 #822 |   Manhole(Lid)     | Normal | 8 Gantries| md8_b2   12 |  AP:    80|
|ED 0336 | 2 Manhole x2       | Attack | B 1A PGDA |             | GIL:  3000|
|        |   Manhole(Lid) x2  |        |           |             |           |
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|         • Battle Flag FFF6 set for Manhole(Lid); Invisible & non-          |
|           targetable                                                       |
|         • Battle Flag FFF7 set for Manhole(Lid) x2; non-targetable         |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Manhole          | AT 00  | Sector 4/ | md8_b1   11 | EXP:   900|
|R1 #823 |   Manhole(Lid) x2  | Normal | 8 Gantries| md8_b2   11 |  AP:    80|
|ED 0337 | 2 Manhole          | Attack | B 1A PGDA |             | GIL:  3000|
|        |   Manhole(Lid) x2  |        |           |             |           |
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|         • Battle Flag FFF6 set for Manhole(Lid); Invisible & non-          |
|           targetable                                                       |
|         • Battle Flag FFF7 set for Manhole(Lid) x2; non-targetable         |
\============================================================================/
 \                                                                          /
  \                 [011D] Behemoth                                       /
   |  Scene 206:    [011E] Cromwell                                       | 
  /                 [0121] Crazy Saw                                       \
 /                                                                 (S CE)   \
/============================================================================\
|   USED | 1 Behemoth         | AT 00  | Sector 4/ | md8_b1   10 | EXP:  1500|
|R1 #824 |                    | Normal | 8 Gantries| md8_b2   10 |  AP:   100|
|ED 0338 |                    | Attack | B 1A PGDA |             | GIL:  2200|
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|** USED | 1 Crazy Saw        | AT 00  | Sector 4/ | md8_b1    9 | EXP:  1600|
|R1 #825 | 2 Crazy Saw        | Normal | 8 Gantries| md8_b2    9 |  AP:   160|
|FD 0339 |                    | Attack | B 1A PGDA |             | GIL:  2600|
|————————o————————————————————o————————o———————————o—————————————o———————————|
|** USED | 1 Crazy Saw        | AT 00  | Sector 4/ | md8_b1    8 | EXP:  1600|
|R1 #826 |   Cromwell         | Normal | 8 Gantries| md8_b2    8 |  AP:   160|
|FD 033A |                    | Attack | B 1A PGDA |             | GIL:  2800|
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Cromwell         | AT 02  | Sector 4/ | md8_b1    2 | EXP:   800|
|R2 #827 |                    | Back   | 8 Gantries| md8_b2    2 |  AP:    80|
|FD 033B |                    | Attack | B 1A PGDA |             | GIL:  1500|
\============================================================================/

Enemy Encounters Section:

•————————————————————————————————————————————————————————————————————————————•
| ~ 733  "md8_b1"   - Sector 8 Upper Catwalk Area                  : Enc 48  |
|------------------------------------------------------------------+---------|
|  #820 : 2x Cromwell                               : NA : R1 : ED : Enc 14  |
|  #822 : 3x Manhole                                : NA : R1 : ED : Enc 12  |
|  #823 : 3x Manhole                                : NA : R1 : ED : Enc 11  |
|  #824 : 1x Behemoth                               : NA : R1 : ED : Enc 10  |
|  #825 : 2x Crazy Saw                              : NA : R1 : FD : Enc 9   |
|  #826 : 1x Crazy Saw, 1x Cromwell                 : NA : R1 : FD : Enc 8   |
|S #827 : 1x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #828 : 2x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #829 : 2x Cromwell                               : PA : R1 : FD : Enc 4   |
| - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -|
| Background 1A - Sector 4 / Sector 8 Gantries      : Training Rating:    ** |
•————————————————————————————————————————————————————————————————————————————•

•————————————————————————————————————————————————————————————————————————————•
| ~ 734  "md8_b2"   - Sector 8 Lower Catwalk Area                  : Enc 48  |
|------------------------------------------------------------------+---------|
|  #821 : 3x Cromwell                               : NA : R1 : ED : Enc 14  |
|  #822 : 3x Manhole                                : NA : R1 : ED : Enc 12  |
|  #823 : 3x Manhole                                : NA : R1 : ED : Enc 11  |
|  #824 : 1x Behemoth                               : NA : R1 : ED : Enc 10  |
|  #825 : 2x Crazy Saw                              : NA : R1 : FD : Enc 9   |
|  #826 : 1x Crazy Saw, 1x Cromwell                 : NA : R1 : FD : Enc 8   |
|S #827 : 1x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #828 : 2x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #829 : 2x Cromwell                               : PA : R1 : FD : Enc 4   |
| - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -|
| Background 1A - Sector 4 / Sector 8 Gantries      : Training Rating:    ** |
•————————————————————————————————————————————————————————————————————————————•

Stay tuned for more charts to come! It is worth mentioning however that my walkthrough is my main focus and drive for the time being, and until it is complete I'm not going to be working too heavily on my charts. I have over a dozen in mind to make, and you'll all have to be patient, as they won't be dropping any time soon!  ;)
« Last Edit: 2016-06-16 20:40:22 by DynamixDJ »

Sega Chief

  • No life
  • *
  • Posts: 2534
  • Karma: 151
  • These guys is sick
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #1 on: 2016-04-11 20:20:56 »
So there's a flag to disable pre-emptives; that's interesting. Having info on formations will also help with planning to save space.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #2 on: 2016-04-11 21:24:57 »
It's also quite helpful to see how much EXP etc is available for each formation, as you can monitor the progression rate of the rewards, area by area.

I'm trying to think of a formula to find the EXP average of an area (and AP and GIL). I don't see why this wouldn't work:

Encounter 1 = 800   Exp, enc 22 (Normal Battle)
Encounter 2 = 1000 Exp, enc 21 (Normal Battle)
Encounter 3 = 1700 Exp, enc 21 (Normal Battle)
Encounter 4 = 650   Exp, enc 8   (Special Battle)
Encounter 5 = 4000 Exp, enc 2   (Special Battle)

[(800 * 22) + (1000*21) + (1700 * 21) + (650 * 8 ) + (4000 * 2)] / (sum of all encounter rates, 74) = 1507 EXP Average

I don't see any reason why this formula wouldn't work, but then again I'm not a mathematician! There is a factor that I'm not accounting for, and that is that the special battle check occurs prior to the normal battle check. 'm not sure if that makes a difference or not.... Actually, it does, seeing as the encounter rate of a normal battle is actually slightly less given the fact that you may not encounter one in the first place... in this instance, a 10/64 chance.

Do I just settle with 1507 EXP average, or can we work the compounding initial formula into the equation??

10 / 64 = 15.625

[(800 * 22) + (1000*21) + (1700 * 21)] * (1 - 0.15625) = 62,690.625
62,690.625 + (650 * 8 ) + (4000 * 2)] / 74 = 1025 EXP Average

Nearly 500 difference.
The other possibility:

[(800 * 22) + (1000*21) + (1700 * 21)] / 64 = 1,161
[(650 * 8 ) + (4000 * 2)] / 64 = 206
1161 + 206 = 1367 EXP Average

The last one feels right to me.
Thoughts??

Sega Chief

  • No life
  • *
  • Posts: 2534
  • Karma: 151
  • These guys is sick
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #3 on: 2016-04-12 09:41:34 »
I'm not a mathematician either, but as far as the encounter rate goes I'd expect the second value to be more accurate.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #4 on: 2016-04-12 10:45:21 »
I'm actually inclined to think the third formula is the one that fits, but I'm just not 100% sure....

I summon thee, NFITC1!!!!

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #5 on: 2016-04-12 16:36:17 »
Ooh, MATH! THIS I can do.

Based on my analysis of the code, it will first calculate whether or not a "special battle" will occur out of a chance of 64. Failing this it will pick from the remaining groups out of a new 64 chance.

Code: [Select]
ENC_VALUE = [0..63]
For x = 0 to 3
   if (special_battle(x).chance < ENC_VALUE )
      return special_battle(x)
   endif
Next x
ENC_VALUE = [0...63]
For x = 0 to 5
   if ( battle(x).chance < ENC_VALUE )
      return battle(x)
   endif
Next x
(If nothing gets returned it does the calculation again)

Let's take your base formation group as the example:
Quote
Encounter 1 = 800   Exp, enc 22 (Normal Battle)
Encounter 2 = 1000 Exp, enc 21 (Normal Battle)
Encounter 3 = 1700 Exp, enc 21 (Normal Battle)
Encounter 4 = 650   Exp, enc 8   (Special Battle)
Encounter 5 = 4000 Exp, enc 2   (Special Battle)

Then what we have is this:

( (650 * ( 8 / 10) ) + (4000 * ( 2 / 10 ) ) ) * (10 / 64) + ( (800 * (22 / 64) ) + (1000 * (21 / 64) ) + (1700 * (21 / 64 ) ) * ( 54 / 64 )
( 650 * .8 + 4000 * .2 ) * .15625 + ( ( 800 * 0.34375 ) + ( 1000 * 0.328125 ) + ( 1700 * 0.328125 ) ) * 0.84375
( 520 + 800 ) * .15625 + ( 275 + 328.125 + 557.8125 ) * 0.84375
1320 * .15625 + 1160.9375 * 0.84375
206.25 + 979.541015625 = 1185.791015625

Rationale:
Since we have two groups of battles (blue are considered first) then we can calculate the average of them individually based on their weights. These are the bolded values on line 4. Since there is an unequal chance of these occurring we can't just add them and divide by two. We have to treat them as weighted values as well. This will become:

(weighted average of each special battle encounter) * (total special encounter rate / 64) + ( weighted average of each regular battle encounter ) * ( [ 64 - total special encounter rate] / 64 )

HOWEVER! This is not entirely the correct answer. It's CLOSE and ideal, but randomly generated numbers do not have a uniform distribution. Based on a few simulations I ran (10000 encounters with this encounter rate) the average was a little off (I'll get to that momentarily). This, of course, assumes the world map and the field share identical scene choosing methods: choose special encounters first then normal. Using the same RNLUT that the field uses I got an entirely different result. Go figure. Here's what I got:

Calculated average: 1185
World Map simulated average: ~1171
Field simulated average: ~1160

So why are the simulations and calculation so different?
Calculations: This is based on the assumption that all values have a likely chance of being used. The first value that is selected is the special battle encounter chance. This may or may not do anything to the average so a new value gets chosen. This happens roughly 54 out of 64 times for the above example. We then have a NEW percentage of chances for the remaining normal battles.
World Map: The world map has no RNLUT so it uses system RNG calls. This has the effect of the Normal Distribution mentioned above. This is just the way computers work. So, the middle percentages of each step have a slightly higher probability of being chosen. This takes some statistics explaining to account for, but I won't bore you all with the details. Suffice to say, this is pretty accurate to our calculation when considering this effect of randomly generated numbers.
Field: This uses the infamous RNLUT which attempts to prevent the normal distribution problem. Assuming there are no random values flying around outside of battle choosing, this will be the effect. We'll get an even distribution of 0s to 32s which we don't typically find in straight system RNG calls. But we're not calling them at the same rate. Since we sometimes get one and sometimes get two, the results get skewed a bit. Within 10000 runs, the formations each got called the following number of times:
Code: [Select]
special 1: 1497
special 2: 214
normal 1: 2570
normal 2: 2858
normal 3: 2862
From this we can see that the special 1 : special 2 ratio is not the 8 : 2 that our example table uses. Nor is the normal1 : normal 2 : normal 3 close to 22:21:21. If anything it's more like 20:22:22. Basically, the RNLUT doesn't solve the Normal Distribution issue either.

So it's up to you how you want to report it. The World Map average is about 98.8% of the calculated value and the Field is 97.9%. You can express the calculated as the "ideal, yet impossible average per battle" which will scale properly per area and still give a good indication of how good an area is on giving exp per formation. i.e. One area might have a calculated average per battle of 1580 and the world map equivalent would be 1564, but another area calculated at 1600 won't actually be 1550 or so.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #6 on: 2016-04-13 03:09:10 »
Hahaha that was a powerful Summon! You may now return to wherever it is that Summons go when their animations have finished playing, somewhere in the battle folder I assume!

I just about understand the maths behind all of this, and I'm thinking damn! That's a lot of maths to do for each area! I might have a fiddle with Microsoft Excel to input the formula's in that way. There is one small discrepancy with your calculations however:

( (650 * ( 8 / 10) ) + (4000 * ( 2 / 10 ) ) ) * (10 / 64) + ( (800 * (22 / 64) ) + (1000 * (21 / 64) ) + (1700 * (21 / 64 ) ) * ( 54 / 64 )

See the bit in bold? This bit I'm not getting. The sum of all the normal battle encounter rates is 64, not 54... Have you made a mistake, or am I not seeing it right?

Also, in regards to the World Maps, i know that the encounter chance doesn't work in the same way for the World Map as it does for the Field Map; the field map will do one check for the special battles, considering the encounter values for all of the Special battles, combined, and then move onto the normal battles. However, on the World Map, a check is performed for each individual battle slot, of which there are 4. So in the example used, the first check will be an 8/64 for spcl battle 1, then the 2nd check occurs which is 2/64, and then the normal battle check. All of this occurs after the Mystery Ninja check, and then the Chocobo Battle chance, which I'm not even considering into the equation, for obvious reasons.

Anyway, do you suspect that the variation in the way in which special battles are treated are the cause of the differentiation between World and Field Maps in the projected averages?

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #7 on: 2016-04-13 15:16:23 »
Hahaha that was a powerful Summon! You may now return to wherever it is that Summons go when their animations have finished playing, somewhere in the battle folder I assume!
You can't contain me!!!

Quote
Have you made a mistake,
How dare you! I never usually get something correct on the first pass of a problem; But I'm actually good at math and don't often make mistakes.

Quote
or am I not seeing it right?
This. And I figured as much, but I thought I'd let you mull it over for a while and decide whether or not you wanted to know WHY that's the case. Aren't I nice? :)
See, at the beginning a random number capped at 63 ([0..63]) will be generated and, in this case, the special formations have a 10 in 64 chance of appearing as you did notice is the total of their encounter rates. If no special formations are selected another [0..63] will be "rolled" and the normal battles will be chosen from that. Since this leaves only 10 values in the first role for the special formations, then that must mean the remaining 54 values will yield normal battles. OF THOSE normal battles, 22 will yield the first formation, 21 will yield the second, and 21 will yield the third. That's a separate 64 chance selection as indicated by multiplying the actual experience values by ( x / 64 ). Even if they don't total up to 64 the chance is still x / 64 for that formation and a ( 64 - x ) / 64 chance for it to NOT be chosen.


Quote
Also, in regards to the World Maps, i know that the encounter chance doesn't work in the same way for the World Map as it does for the Field Map; the field map will do one check for the special battles, considering the encounter values for all of the Special battles, combined, and then move onto the normal battles. However, on the World Map, a check is performed for each individual battle slot, of which there are 4. So in the example used, the first check will be an 8/64 for spcl battle 1, then the 2nd check occurs which is 2/64, and then the normal battle check. All of this occurs after the Mystery Ninja check, and then the Chocobo Battle chance, which I'm not even considering into the equation, for obvious reasons.

Anyway, do you suspect that the variation in the way in which special battles are treated are the cause of the differentiation between World and Field Maps in the projected averages?
Well, there's a pickle, to be sure. It looks to me like the WM has the same formation choosing power that the field has. The WM doesn't use the system's RNG like I suspected for formation selection (however, it does when determining if a battle should occur). It uses a pre-computed table of "random" values that changes after so many calls (520, to be exact) and not specifically to formation selection. The Mystery Ninja uses two of these calls right off before checking where you are or even your terrain type. The special battles call this a little less predictably.

The real issue is between calculation and simulation. The calculation I gave you is correct whether on the map or in the field. The simulation for WM calls is wrong, but it's more complicated than I expected and I probably won't redo it. We can relabel this "Truly random simulation average" and the WM would probably be somewhere between the calculated and field values.

Either way, it's 98.3±.5% of the calculated value so that's statistically spot on.
« Last Edit: 2016-04-13 15:19:57 by NFITC1 »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #8 on: 2016-04-13 15:58:09 »
NFITC1, as a person, statistically you are spot on! Thank you for clearing this up, I understand it all now!!!
The only "hard" bit will be inputting all of these formulas into a spreadsheet which I haven't done since the days of school, but I 'm fairly confident that it can't be that hard, I'll fiddle around tonight!

Even if I can't contain you, I can still try, but first I need to obtain the Contain Materia.... Spare some Mimett Greens, anyone??? (I ran out of gil playing Super Dunk  :D)

NICE 1!!!!

-EDIT- I've just realised, seeing as we're taking an average, can 1185.791015625 be rounded up? Also, in an example where there are no special battles, can I assume that [(800 * (22/64)) + (1000*(21/64)) + (1700 * (21/64))] / 64 is a correct formula?

-Edit again- HAHAHAHAHAHAHAHA!!!!!!! I've just read the super-small print:
Quote
How dare you! I never usually get something correct on the first pass of a problem; But I'm actually good at math and don't often make mistakes.
« Last Edit: 2016-04-13 21:24:45 by DynamixDJ »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #9 on: 2016-04-13 23:32:41 »
I've just finished making a Reward Average Calculator. Thanks a bunch, NFITC1!!!!
« Last Edit: 2016-04-16 21:32:21 by DynamixDJ »

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #10 on: 2016-04-14 01:56:28 »
in an example where there are no special battles, can I assume that [(800 * (22/64)) + (1000*(21/64)) + (1700 * (21/64))] / 64 is a correct formula?

Nope. Then you've got too many divide-by-64s in there. Drop that last one and it's correct.

I've just finished making a Reward Average Calculator. Thanks a bunch, NFITC1!!!!
That's great! I was going to suggest adding AP and Gil columns to that and you already did. I approve. :)

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #11 on: 2016-04-14 03:01:52 »
Quote
Nope. Then you've got too many divide-by-64s in there. Drop that last one and it's correct.
Yeah I realised this as I was making the spreadsheet  :)

I've just updated it, I've now added a master formula to it! ;)

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #12 on: 2016-04-14 14:14:32 »
If you want to go one step further, you should include the total HP of the enemy party. It would use the same averaging formula as the others and it would give a good representation of how fast they could be won.
Perhaps one strong enemy has 1500 HP and gives 500 EXP, but four weaker enemies have a total of 1500 HP and give 400 EXP. I'd rather go after the stronger battle.
BUT, if I can do 10 weaker battles in the same time I can do 8 stronger ones for the same EXP then it's more advantageous to do the weaker ones.

Also, the encounter rate should be a factor as well. If an area's average EXP is 2500, it won't be better if it has a third the encounter rate of an area with an average of 1500.


DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #13 on: 2016-04-14 15:57:15 »
On a quick break, so this'll have to be brief

You're correct, adding the HP average wold be benificial. I shall do just that when I get home tonight.

I am taking the area's encounter rate into consideration when I reevaluate the * rating I have given for each area, but not mathematically; I'm not fitting it into the equasion, I'm not exactly sure how.

Anyway, I was trying to figure out exactly how the World Map averages differ from the field map averages; I concluded that if there is a difference, that it was probably minute, but I couldn't quite work out how the formula differs from the current formula; by my reckoning, the functions were different, but the end result was the same. Then someone sent an email this morning offering a World Map formula:

(650*(8/64)) + (4000*(2/64)*(56/64)) + ((800*(22/64)) + (1000*(21/64)) + (1700*(21/64)))*(1 - (8/64) - (2/64)*(56/64))
equals = 1174.7009

Red = shouldn't the first part of the formula be (650*(8/64)) + (4000*(2/64))*(10/64)?
Blue = This seems to make sense, given the fact that 2 checks are taking place. Can you confirm/deny?

-Edit- Goddamn it Nameless Face, you know I'm slightly obsessive compulsive, right? If I'm going to include HP averages, then my brain DEMANDS that I also include Lv, MP, Strength, Defence, Magic, MDefence etc. OCD DICTATES!!!! It's all good, I'm already planning on how I'm going to continue to map out my calculator when I get home. Thanks also to Gurthawoe for helping me with my spreadsheet! Also, he has clarified my question in red, it makes sense now! :)
« Last Edit: 2016-04-14 18:10:18 by DynamixDJ »

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #14 on: 2016-04-14 19:30:37 »
I am taking the encounter rate into consideration when I reevaluate the * rating I have given for each area, but not mathematically; I'm not fitting it into the equasion, I'm not exactly sure how.
Since the higher the encounter rate the longer between encounters, it could just be divided by the total: ( [equation] / (formation_encounter_rate / lowest_encounter_rate) ). Then it's relative to the most frequent encounter rate. 12 seems to be lowest on the WM and 24 in the fields.

Anyway, I was trying to figure out exactly how the World Map averages differ from the field map averages; I concluded that if there is a difference, that it was probably minute, but I couldn't quite work out how the formula differs from the current formula; by my reckoning, the functions were different, but the end result was the same. Then someone sent an email this morning offering a World Map formula:

(650*(8/64)) + (4000*(2/64)*(56/64)) + ((800*(22/64)) + (1000*(21/64)) + (1700*(21/64)))*(1 - (8/64) - (2/64)*(56/64))
equals = 1174.7009

Red = shouldn't the first part of the formula be (650*(8/64)) + (4000*(2/64))*(10/64)?
Blue = This seems to make sense, given the fact that 2 checks are taking place. Can you confirm/deny?
Those are all wrong. The World Map does use moderately different calculations, but none of those are right. This is what happens:

Pre-Emptive materia (PEM) grants, at most, 85 / 256 to the pre-emp rate. It also prevents back attacks and side attacks. We'll call its rate PEMr which has a minimum of 16.
If PEMr is greater than 16, we double it.
If the PEMr is greater than or equal to [0..255] then we skip special formation battles entirely.
Special battles:
    A: [0..63] is used to determine if either back-attack formation1 or formation2 are used. Somehow, having a mastered Pre-Emp materia affects this rate (either halves or doubles)
    B: If those fail and we have more than 1 character in our party, a new [0..63] is used to determine if we get a side attack
    C: If the above fail, there is a new [0..63] to determine if we get pincered
Normal Battles:
    D: We use one [0..63] to determine if we get formation 0 - 5

So:

( 1 - (PEMr / 256) ) *   //special formation check
    (( (back1 / 64) + (back2 / 64) ) //back attack formation selection chance
    +
    ( ( 1 - ( (back1 + back2) / 64 ) ) * //back attack formation fail
        ( ( side / 64 )  //side attack formation chance
        +
        ( 1 - ( side / 64 ) )  *//side attack formation fail
            ( pince / 64 ) ) ) ) //pincer formation chance
+
( PEMr / 256 +  //special formation fail
    ( (1 - (PEMr / 256) ) * ( 1 - ( (back1 + back2) / 64 ) ) * ( 1 - ( side / 64 ) ) * (1 - (pince / 64) ) ) * //special formation pass, but formation selection fail
    ( ( form0 / 64 ) + ( form1 / 64 ) + ( form2 / 64 ) + ( form3 / 64 ) + ( form4 / 64 ) + ( form5 / 64 ) ) //normal battle selection

This is particularly ugly for several reasons. First off, the percentage chance trickles down into the next checks sometimes. Not all the time, but I'm going to assume that it will. If we only have one party member then the formula changes. Secondly, the chances that a normal battle occurring are greater than just the inverse of the chances a special formation is CHECKED for. We also have a variable that we have control over. The PEMr can make a drastic difference.
Pincer attacks are pretty rare being a success of "special battle check" and failing both pre-emp and side attack battle checks.

Let's apply this to a full formation entry with no mastered Pre-Emp and more than one party character (from TFergusson's guide):

Quote
Cosmo Area - Canyon
  Normal Battle #1:  11/64 Chance       Back Attack #1:     2/64 Chance
     Row 1: 2x Skeeskee
     Row 2: 1x Skeeskee                    Row 1: 2x Desert Sahagin
  Normal Battle #2:  11/64 Chance       Back Attack #2:     2/64 Chance
     Row 1: 1x Griffin
  Normal Battle #3:  11/64 Chance          Row 1: 3x Skeeskee
     Row 1: 1x Golem                    Side Attack:       10/64 Chance
  Normal Battle #4:  11/64 Chance          Row 1: 3x Skeeskee
     Row 1: 2x Skeeskee                 Ambush:             4/64 Chance
     Row 2: 1x Griffin                     Grp 1: 1x Desert Sahagin
  Normal Battle #5:  10/64 Chance          Grp 2: 1x Desert Sahagin
     Row 1: 1x Desert Sahagin
     Row 2: 2x Desert Sahagin
  Normal Battle #6:  10/64 Chance
     Row 1: 2x Desert Sahagin

Skeeskees = 222
Griffins = 260
golems = 300
desert sahagins = 230

Normal 1: 666
Normal 2: 260
Normal 3: 300
Normal 4: 660
Normal 5: 690
Normal 6: 460
Back Attack 1: 460
Back Attack 2: 666
Side: 666
Pincer: 460

Do it:

( 1 - (PEMr / 256) ) *   //special formation check
    (( (460 * 2 / 64) + (666 * 2 / 64) ) //back attack formation selection chance
    +
    ( ( 1 - ( (2 + 2) / 64 ) ) * //back attack formation fail
        ( ( 666 * 10 / 64 )  //side attack formation chance
        +
        ( 1 - ( 10 / 64 ) )  *//side attack formation fail
            ( 460 * 4 / 64 ) ) ) ) //pincer formation chance
+
( PEMr / 256 +  //special formation fail
     ( ( 1 - (PEMr / 256) ) * ( 1 - ( (2 + 2) / 64 ) ) * ( 1 - ( 10 / 64 ) ) * (1 - (4 / 64) ) ) * //pincer attack formation selection fail
    ( ( 666 * 11 / 64 ) + ( 260 * 11 / 64 ) + ( 300 * 11 / 64 ) + ( 660 * 11 / 64 ) + ( 690 * 10 / 64 ) + ( 460 * 10 / 64 ) ) //normal battle selection

With no Pre-Emp materia:

0.9375 * ( ( 14.375 + 20.8125 ) + 0.9375 * (104.0625 + 0.84375 * 28.75) ) + ( 0.0625 + (0.9375 * 0.9375 * 0.84375 * 0.9375 ) ) * ( 114.46875 + 44.6875 + 51.5625 + 113.4375 + 107.8125 + 71.875 )

Put it all together and you get 527.5466135 per battle.

With maxed Pre-Emp:

0.3359375 * ( ( 14.375 + 20.8125 ) + 0.9375 * (104.0625 + 0.84375 * 28.75) ) + ( 0.6640625 + (0.3359375 * 0.9375 * 0.84375 * 0.9375 ) ) * ( 114.46875 + 44.6875 + 51.5625 + 113.4375 + 107.8125 + 71.875 )

Put it all together and you get 512.3372760713 per battle.

Please note: These only apply to the World Map formation selections. The field functions exactly like I calculated before.
« Last Edit: 2016-04-15 14:25:40 by NFITC1 »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #15 on: 2016-04-14 19:53:07 »
OK, I'll try to digest all of this when I get home, but I just want to say that at no point during the calculations am I going to account for the Mystery ninja encounters, Chocobo Encounters or the effect of equipping a Mastered Pre-empt.

So, I appreciate you going through all of the trouble to explain the affect that pre-emp has, but it's not going to affect my calculator. I've just noticed, you've taken the 2 Back attacks together as one chance. Is this exactly how it works? So after the Myst Ninja and Chocobos, there are three (not four) special battle checks before moving onto the Normal Battles?

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #16 on: 2016-04-14 19:59:39 »
OK, I'll try to digest all of this when I get home, but I just want to say that at no point during the calculations am I going to account for the Mystery ninja encounters, Chocobo Encounters or the effect of equipping a Mastered Pre-empt.
Nor should you because these are not part of normal grinding. In some cases, Pre-Emp might work against you.

So, I appreciate you going through all of the trouble to explain the affect that pre-emp has, but it's not going to affect my calculator. I've just noticed, you've taken the 2 Back attacks together as one chance. Is this exactly how it works? So after the Myst Ninja and Chocobos, there are three (not four) special battle checks before moving onto the Normal Battles?
You don't want to know how many hours I spent staring at the code and making absolute certain that's how everything worked. The Math behind it took just as long.

EDIT:
I just realized that FFIX was released today and I spent all my time on THIS rather than bingeing FFIX. Just consider that when acknowledging my contribution. :P
« Last Edit: 2016-04-14 21:08:20 by NFITC1 »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #17 on: 2016-04-14 21:29:54 »
Quote
You don't want to know how many hours I spent staring at the code and making absolute certain that's how everything worked. The Math behind it took just as long.
Hang on a minute, when I skimmed over your post whilst having quick 5 min break, I didn't read it correctly. I thought that this formula was for pre-emps only, but I've just studied it, and it's starting to make more sense now. You've already answered my q regarding both back attacks being considered in one check.

I'd formulated half a dozen questions on my journey home, but I keep re-reading your post to find you've already answered them. I was genuinely perplexed earlier, but now I think I have enough to go to add this to my calculator. Thanks a bunch NFITC1!

As is the nature of everything I set myself, this quick 5-minute calculator is becoming a big project. Gurthawoe has helped me out by included a "VLookUp" function which pulls the data as it has been entered on plan 2, so in theory I could turn this into a complete database, as well as a calculator! A modder could input the total statistics for each formation in an area within plan 2, let's say "gonjun2", then within plan 1 simply search gonjun2, or even just #515, and you'll be able to see an average for every stat! At this rate, I'm never going to finish my walkthrough that I started a year ago and am still a long, long way away from completion!  :cry: The release of the remake is my deadline! I may leave the database for now..... added to my "to-do" list

-edit after reading edit-
Quote
EDIT:
I just realized that FFIX was released today and I spent all my time on THIS rather than bingeing FFIX. Just consider that when acknowledging my contribution. :P
And your help and consistent contributions to my many projects is valued more than anything! You've helped me the most Mr NFITC1, best belie' dat!!!

You can blame my hurried work breaks for the unintentional misreading of your workings! Thanks for the help, i really do appreciate it!
« Last Edit: 2016-04-14 21:40:54 by DynamixDJ »

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #18 on: 2016-04-14 22:13:11 »
What you should be asking is how can any kind of average weighted or otherwise be greater than any individual element.
I think I miscalculated the max pre-emptive rate average and left out a number. The nonpreemptive rate should still be correct.
« Last Edit: 2016-04-14 22:30:28 by NFITC1 »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #19 on: 2016-04-14 22:20:26 »
Lol, I hadn't clocked onto that.

NFITC1, how can any kind of average weighted or otherwise be greater than any individual element???

-edit- errrr, (1 - (85/64)) = 0.33203125 (not 0.3125)
I still need to spend more time with it before I understand it fully...
« Last Edit: 2016-04-14 22:29:00 by DynamixDJ »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #20 on: 2016-04-15 03:56:25 »
I've just finished making a Reward Average Calculator. Thanks a bunch, NFITC1!!!!

OK, i've been busy with this. I haven't entered the world map formulas yet, but I have enabled it so you can simply type the name of the enemy into the battle slots along with their quantity, then assign an encounter rate and it'll work the rest out for you! This is turning into something quite cool actually!!!
« Last Edit: 2016-04-16 21:32:47 by DynamixDJ »

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #21 on: 2016-04-15 14:31:26 »
Lol, I hadn't clocked onto that.

NFITC1, how can any kind of average weighted or otherwise be greater than any individual element???
Because I don't always get things right the first time and sometimes make mistakes. The formula is correct, but I left out a  number when calculating. I've corrected it all on that post and you can see how max preemping rates can hurt you.

-edit- errrr, (1 - (85/64)) = 0.33203125 (not 0.3125)
I still need to spend more time with it before I understand it fully...
No it's not. (1 - (85 /64 ) ) is -0.328125. What we're looking for in that slot is ( 1 - ( 170 / 256 ) ). The PEMr is doubled when considering if there will be a special battle like this. Normally there would be a 1/16th chance that it won't even be considered. With a higher PEMr there's a greater chance (as high as 170 / 256 or 66.4%) they will be skipped. The chance for getting an actual preemp battle (making one of the normal battles preemptive) is still 85 / 256.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #22 on: 2016-04-15 16:01:39 »
Yes, I'm not sure why I typed 85/64, I meant (1-((256-85)/256)). I've been working out of 64 for so long that I keep typing that by default.

2 questions..... usual case of fast typing (I have 17 mins to eat my lunch and type my questions).

1) Does a mastered pre-emp also halve chances of the special battle enc ratings on the field maps? If so, I believe it won't be too difficult to work it into the calculator.

2)I've been thinking about your suggestion to also account for the enc rate for the area. I could change the */***** training rating for a "training value". Would this formula work, where a is enc value for area, x is EXP, y is AP and z is GIL:

Training Value = (x/a)+(y/a)+(z/a)

Also, I've been thinking about working HP into the training value. It won;t work. With your example of 1 enemy with 1500HP and 4 enemies totaling 1500HP, Def and MDef would need to be taken into account, as the four "weaker "enemies could actually be harder to kill. The LOWER the value of the HP/Def/Mdef average, the higher the rating, whereas the HIGHER the EXP/AP/GIL rating the higher the rating, so I would need to work out a modifying formula, perhaps the same as the one used in Damage calculation - [Def = 512-Def] [MDef = 512-MDef], I'm not sure how to work out HP...

There is another reason why i shouldn;t account for HP/Def/MDef into the training value. Let's talk about the Mythril Mines. It's common knowledge that the N western cave is better than the N eastern cave, iirc this is because of the appearance of 5x Crawler. Now, Speaking hypothetically, let's say that the NW enemies are notably stronger in terms of average HP/Def/MDef, and vice-versa for the NE cave. This could bring the training value of the NW cave low enough to match the NE cave. Let;s say your party is slightly OP, or you enjoy spamming Beta and you're able to 1 hit kill all enemies in both caves, in which case the HP/Def/Def would be unjustifiably bringing the Training Value down, when the NW cave is blatantly better than the NE cave.

With this in mind, I think the best thing to do is to just settle with taking Enc, av EXP, av AP and av Gil into consideration for the "training value" rating.

With not time to re-read, I hope all this makes sense!!!!

-edit- have you checked the latest version of my calculator?

NFITC1

  • No life
  • *
  • Posts: 2764
  • Karma: 61
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Helpful Charts by DynamixDJ
« Reply #23 on: 2016-04-15 16:35:02 »
1) Does a mastered pre-emp also halve chances of the special battle enc ratings on the field maps? If so, I believe it won't be too difficult to work it into the calculator.
Not as directly as the WM does. It will halve the chance of a back attack or pincer attack, but they will still be considered regardless of the PEMr.

2)I've been thinking about your suggestion to also account for the enc rate for the area. I could change the */***** training rating for a "training value". Would this formula work, where a is enc value for area, x is EXP, y is AP and z is GIL:

Training Value = (x/a)+(y/a)+(z/a)
That might work, but that's a good average training location. It'd probably be better to say, per reward, which each zone is better at. eg. Region1 has better AP than Region2, but Region2 has better Gil.

Also, I've been thinking about working HP into the training value. It won;t work. With your example of 1 enemy with 1500HP and 4 enemies totaling 1500HP, Def and MDef would need to be taken into account, as the four "weaker "enemies could actually be harder to kill. The LOWER the value of the HP/Def/Mdef average, the higher the rating, whereas the HIGHER the EXP/AP/GIL rating the higher the rating, so I would need to work out a modifying formula, perhaps the same as the one used in Damage calculation - [Def = 512-Def] [MDef = 512-MDef], I'm not sure how to work out HP...
Let's not get into my plan to calculate it using DPS. :)

There is another reason why i shouldn;t account for HP/Def/MDef into the training value. Let's talk about the Mythril Mines. It's common knowledge that the N western cave is better than the N eastern cave, iirc this is because of the appearance of 5x Crawler. Now, Speaking hypothetically, let's say that the NW enemies are notably stronger in terms of average HP/Def/MDef, and vice-versa for the NE cave. This could bring the training value of the NW cave low enough to match the NE cave. Let;s say your party is slightly OP, or you enjoy spamming Beta and you're able to 1 hit kill all enemies in both caves, in which case the HP/Def/Def would be unjustifiably bringing the Training Value down, when the NW cave is blatantly better than the NE cave.

With this in mind, I think the best thing to do is to just settle with taking Enc, av EXP, av AP and av Gil into consideration for the "training value" rating.
It's certainly the most sensible thing to do. :)

-edit- have you checked the latest version of my calculator?
Not yet. I tried dl-ing it once and Mega threw an exception at me. I'll try again soon.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 158
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: Helpful Charts by DynamixDJ
« Reply #24 on: 2016-04-15 17:12:43 »
Quote
That might work, but that's a good average training location. It'd probably be better to say, per reward, which each zone is better at. eg. Region1 has better AP than Region2, but Region2 has better Gil.
TBH, I'll probably add the individual Av values, the * rating, AND the rating value!!!

Quote
Not yet. I tried dl-ing it once and Mega threw an exception at me. I'll try again soon.
I said I wasn't going to work on building a database just yet. I lied  :D
Try typing in an enemy's name into the relevant field. Only 6 enemies can be searched for at present, check Sheet 2 labelled "beast"

-Edit- AVERAGE ENEMIES PER BATTLE!!! That's definitely getting worked into the calc :D
« Last Edit: 2016-04-16 00:07:35 by DynamixDJ »