• Topic Archived
You're browsing the GameFAQs Message Boards as a guest. Sign Up for free (or Log In if you already have an account) to be able to post messages, change how messages are displayed, and view media in posts.
  1. Boards
  2. SaGa Frontier
  3. How various things work, as determined by debugger

User Info: Zaraktheus

Zaraktheus
11 years ago#1
Rather than continue to clutter the board by making another new topic every time I discover something, here's a catch-all topic for future finds.

First up: I found the Enemy Spark Values. I organized them into two charts, available on my page, here:
http://sf.data.project.tripod.com/Zaraktheus.html

It's interesting to see that Chimera, Dullahan, Kraken, Siren, and Zeroworm all have the same Spark Value (36), which is the highest among the main, normal enemies. I wouldn't have considered them all to be equally difficult, but...*shrugs*

Most bosses in the game have relatively low Spark Values (unless you fight them at a low BR), and it's worth noting that a boss's Spark Value does not appear to change with BR. I checked this on the Suzaku boss on Mt. Mosperiburg--its Spark Value was the same (28) at BR 1 and BR 7+.

Surprisingly, the highest Spark Value (37) of any random enemy belongs to the humble CrimeLady. If you just went "huhwut???", I agree with you. I checked again and again. I wouldn't be surprised if many people have never even seen a CrimeLady. They occasionally show up with BR 7-8 Bird enemies, so if you see one, use her to spark some good stuff a little earlier than usual.

Also, MegaTitan, at 39, has the highest Spark Value of anything but a few final bosses. The thing is...I have no idea what a MegaTitan is. I don't remember ever seeing one, and it's not listed in the official strategy guide (not that that means much, necessarily...). Does anybody know what it is and where I can find it? Or is it not actually used in the game?

Alright, here's where it gets really interesting.

User Info: Zaraktheus

Zaraktheus
11 years ago#2
HOW SPARKING WORKS

From what I've found, it appears that the chance to spark is influenced by only the following factors:
1: Base Difficulty to spark the ability (as determined by what ability you use).
2: Enemy Spark Value.
3: Physical Mastery.
4: Talent.

I know a lot of other things are widely believed to affect your chance to spark as well, but I haven't found anything to support that. It's still possible they're well-hidden somewhere entirely different, but they're not in the routines I've found, which are complete.

I'll explain how the game performs a spark check. I've simplified and streamlined the process considerably to make it easier to understand, but I've only omitted things that are completely obvious (like checking whether you already know the ability to determine whether you can still learn it). The game checks every ability that can be sparked from the ability you used until/unless one of the checks succeeds. Unless stated otherwise, numbers are normal decimal numbers, not hex.

Step 1: Subtract the Enemy Spark Value from the Base Difficulty to spark the ability from the ability you chose to use this round.

If you don't have the list of what-sparks-what-at-what-difficulty, SquidHead's site has a nice version of the list, here:
http://globe90.tripod.com/sftech.html

Again, I just recently found the Enemy Spark Values; you can get them here:
http://sf.data.project.tripod.com/Zaraktheus.html

Step 2: Add 10 to get the actual Difficulty to spark.

Step 3: Cap Difficulty between 0 and 20, inclusive. That is, if it's less than 0, set it to 0; if it's more than 20, set it to 20.

Step 4: Use the Difficulty to look up the Chance to spark on one of the Difficulty->Chance Tables. If you currently have Physical Mastery (6+ physical abilities equipped and 0 magical abilities equipped), use Table 1. Otherwise, use Table 2. There's also a Table 3, but I haven't found anything that uses it yet.

----------

Difficulty->Chance Table 1 (With Physical Mastery):
00-01-02-03-04-05-06-07-08-09-10-11-12-13-14-15-16-17-18-19-20-Difficulty
40-39-39-37-36-34-31-29-26-23-30-16-13-10-08-05-03-02-01-01-00-Chance

Difficulty->Chance Table 2 (Without Physical Mastery):
00-01-02-03-04-05-06-07-08-09-10-11-12-13-14-15-16-17-18-19-20-Difficulty
20-19-19-19-18-17-16-15-14-12-25-08-06-05-04-03-02-01-01-01-00-Chance

Difficulty->Chance Table 3 (UNKNOWN):
00-01-02-03-04-05-06-07-08-09-10-11-12-13-14-15-16-17-18-19-20-Difficulty
50-39-39-37-36-34-31-29-26-23-20-16-13-10-08-05-03-02-01-01-01-Chance

----------

The pattern break at Difficulty 10 in Tables 1 and 2 is probably an error. However, it offers the best chance to spark with Table 2, which is worth knowing. You get Difficulty 10 by trying to spark an ability whose Difficulty exactly matches the Spark Value of the enemy.

Table 3 is almost the same as Table 1, but the error at Difficulty 10 is fixed, the Chance at Difficulty 0 is 25% higher, and the minimum Chance is 1.

If Difficulty was 20, then Chance will be 0 (at least on Tables 1 and 2), meaning it's impossible to spark this ability against this enemy.

Notice that the same Difficulty only gets you about 1/2 the Chance on Table 2 compared to Table 1. This means that Physical Mastery doubles your chance to spark!

Step 5: Check the PC Spark Talent Chart to see whether you have Talent for the ability you're trying to spark. If you do, nothing changes, but if you don't have Talent, then your Chance is now reduced to 1 no matter how high it was!

Step 6: The game now pulls up a semi-random number between 0 and 255. If this number is less than Chance, you will spark this ability if you act this round. If not, move on to check the next ability that can be sparked by whatever ability you used.

User Info: Zaraktheus

Zaraktheus
11 years ago#3
Here's all that again, condensed:

A = Base Difficulty to spark ability
E = Enemy Spark Value
D = actual Difficulty
C = Chance to spark ability

(A - E) + 10 = D
If you have Physical Mastery, convert D->C using Table 1.
If you don't have Physical Mastery, convert D->C using Table 2.
If you don't have Talent, reduce C to 1.
If rand(0...255) < C, spark succeeds.

We learn a few very interesting facts from this:

1: The most difficult ability you have any chance to spark from any enemy is Enemy Spark Value + 9 (which still only gives a 1/256 Chance). It is impossible to spark anything 10+ more difficult than the enemy's Spark Value. Don't even bother trying to spark LifeSprinkler from normal enemies before BR 7--you have no chance.

2: Physical Mastery makes a big difference! It gives you 2x the chance to spark any ability for which you have Talent. This may sound like bad news for anyone who, like me, enjoys using hybrid physical/magical PCs, but there's actually a nice, positive way to spin it. You see, we're already accustomed to sparking things at the reduced rate. Now that we know how much of a bonus mastery gives, we can just take any spells off while grinding and our PCs will spark at double the rate we're used to! Every cloud has a silver lining, and all that. Also, if you are going to grind for sparks without Mastery, try to match the Base Difficulty to the Enemy Spark Value. If they're exactly the same, you'll get Difficulty 10, which is where the error on Table 2 gives you the highest chance to spark without Mastery (25/256--about 10%).

3: Talent is hugely important! No matter how easy an ability is supposed to be to spark, if you don't have Talent for it, your maximum Chance to spark it is 1/256 (just 0.4%). We finally know why it's so *&%^ hard for Liza to learn Sliding! This means you may want to really think about how badly you actually need any ability for which you lack Talent. If you can get by without it, it may not be worth your time to try to learn it. You still might get lucky and pick it up on the way to something else, but it's probably better not to focus on anything for which you lack Talent unless you really need it.

Quite the opposite of what I'd expected, the way Talent actually works means that you could make a strong argument that Talent for less Difficult abilities is more valuable than Talent for more Difficult abilities. This is because Talent makes a bigger difference in your Chance to spark easier abilities than it does for the hardest abilities. For example, even with talent, the best chance you will ever have to spark LifeSprinkler against an easy-to-find, normal enemy is 38 (ShadowCounter) - 36 (Kraken/Dullahan/Chimera, etc.) + 10 = 12 Difficulty -> 13/256 (5%) Chance (with Mastery). This is 13x your Chance without Talent. By comparison, Talent gives you a 40/256 (15.6%) Chance to spark StunSlash from the same enemy (or nearly any enemy from BR 4+), which is 40x your Chance without Talent. Talent with StunSlash gives you approximately 3x (40 / 13) the maximum bonus to learn that you get from Talent with LifeSprinkler. Of course, it's still up to you how you choose to value each ability relative to each other--you may consider LifeSprinkler more valuable than StunSlash (or you may not), so you may prefer a smaller boost to learning LifeSprinkler over a larger boost to learning StunSlash.

User Info: Zaraktheus

Zaraktheus
11 years ago#4
So far, I've checked these specific sparks:
-Thrust -> TripleThrust
-Slash -> StunSlash
-Punch -> Kick
-BrightFist -> SparklingRoll

They all used almost entirely the same routine, so it's reasonable to conclude that this routine probably applies to most or all actively-sparked abilities. I haven't yet checked passively-sparked/counter/Dodge abilities (e.g. Deflect, Kasumi, SwayBack, DodgeTail, etc.).

User Info: Zaraktheus

Zaraktheus
11 years ago#5
Technical Info

I used the debugger that comes with the pSX emulator to find the spark check routine. I first set it to break on reading RAM address 0x2d8d5 (the location on the what-sparks-what table that means "Thrust can spark TripleThrust"), then I used Thrust with a PC who didn't already know TripleThrust. The break occurred immediately after entering the final command before starting the round, on address 0x0018634c. From there I just crunched my way through hand-translating all the instructions until the routine looped. I learned the following things along the way:

New In-battle Status Block Address Definitions (see http://sf.data.project.tripod.com/Eroneous_Waylay/in_battle_status.txt):
90-91: Ability to be sparked this round; normally FF FF, but changes after a spark check succeeds. 90 is lower byte, 91 is upper. Normally-sparkable abilities are always upper = 00, though, anyway...
16A: PC Spark Talent List equipped. Corresponds to normal Status Block byte 17.
178: # of Physical abilities currently equipped. Used to check for Mastery.
179: # of Magical abilities currently equipped. Used to check for Mastery.
17A: Enemy Spark Value.

The Difficulty->Chance conversion Tables start at address 0x2dd00. Here's the original hex data for them:

Difficulty->Chance Table 1 (With Physical Mastery):
00-01-02-03-04-05-06-07-08-09-0a-0b-0c-0d-0e-0f-10-11-12-13-14-Byte
28-27-27-25-24-22-1F-1D-1A-17-1E-10-0D-0A-08-05-03-02-01-01-00-Chance (hex)

Difficulty->Chance Table 2 (Without Physical Mastery):
00-01-02-03-04-05-06-07-08-09-0a-0b-0c-0d-0e-0f-10-11-12-13-14-Byte
14-13-13-13-12-11-10-0F-0E-0C-19-08-06-05-04-03-02-01-01-01-00-Chance (hex)

Difficulty->Chance Table 3 (UNKNOWN):
00-01-02-03-04-05-06-07-08-09-0a-0b-0c-0d-0e-0f-10-11-12-13-14-Byte
32-27-27-25-24-22-1F-1D-1A-17-14-10-0D-0A-08-05-03-02-01-01-01-Chance (hex)

There is another ability-related data table in RAM at 28edc - 296db. Offset between abilities is 4 bytes. All 512 abilities appear to be represented. I don't know what any of it means yet. I can post the data dump for it if anybody is interested.

For no apparent reason, the way the game picks a random number for use with sparking is different from its usual clock-based RNG (which allows you to change results by making a save state and changing the amount of time you wait before continuing). For sparking, the game generates a whole table of 0x207 (519) bytes of random numbers (starting at address 0x1fd1cc), followed immediately by an also-random 2-byte number (address 0x1fd3d4) that is used to determine which random number to pick off the table, by adding it to the base address. This table is generated as you initiate each battle. Every time the table is used for a check, the Address-to-check increases by 1, looping back to 0 if it exceeds 0x207. The next time you get into a battle, you get a whole new table and a new starting Address-to-check.

The funny thing about this table is that the result can't be influenced by time. If you make a save state after you're in a battle, you will always get the same results from this table if you make the same choices. Because of this consistency, it took me a while to recognize that this was indeed a random number check.

Also, I would not be at all surprised if this RNTable is what's used to check for Mec Self-Development abilities, since they can't be influenced by time, either. I haven't had time to check that yet, though.

Alright, I think that's about it for now. Phew.

User Info: KazumiAmano

KazumiAmano
11 years ago#6
Does the game do a check from the hardest ability able to learned, down to the easiest? As in, every character who ever uses slash automatically checks for LifeSprinkler, then a new RN is generated for RisingNova, then TurbidCurrent, and so on? Or is one RN used for the entire string?
http://sf.data.project.tripod.com/ - Almost all data hacked from SaGa Frontier so far.

User Info: Zaraktheus

Zaraktheus
11 years ago#7
Neither. It checks the abilities that can be sparked in the order they're listed on the table in the data, which doesn't specifically have anything to do with difficulty. Usually, the abilities that can be sparked are listed (and therefore checked) in increasing ID order, so for Slash, you'd check StunSlash (01), then DoubleSlash (02), then HardSlash (03), etc, though there are errors and inexplicable exceptions here and there. The only way to see the original order right now is to look at the raw data, as the original order hasn't been preserved in SquidHead's list. The check order isn't really that important to know, though, anyway (unless you're debugging).

The random number used changes every time the game checks whether an ability gets sparked. If you Slash with no abilities learned yet, it'll use one number for StunSlash, then a new number for DoubleSlash, then another new number for HardSlash, and so on until you either succeed in sparking something or run out of abilities to check. However, the random number does not change when skipping over abilities you already know, since it doesn't do a full check for them.

User Info: spweasel

spweasel
11 years ago#8
Nothing too surprising, though I really didn't think enemies had an inherent spark difficulty, and the true effect of character spark talent was kinda surprising. I might play with the spreadsheet later to see what comes out, but I have some stuff happening later, so I might not.

The method of choosing sparks, while strange, isn't at all surprising. I already knew that the only method of changing the sparks received was to play with turn order and/or defend and such.

Hold on a sec - if I'm reading your post correctly, does that mean that a character without the talent to spark will learn literally every single ability above it (that sparks from the same ability) first? Because that would make learning LifeSprinkler with Blue (as an example) really, really hard (especially if you use ordinary sword slashes). Experience dictates that, but still...

Now we just need to crack the damage formulas.

User Info: Zaraktheus

Zaraktheus
11 years ago#9
-spweasel said:
does that mean that a character without the talent to spark will learn literally every single ability above it (that sparks from the same ability) first?


No. I'm not sure where you got that from...?

All you have to do to get a shot at sparking the last ability in the line is to fail the checks for all the preceding abilities that you don't already know. The maximum chance for any spark check (for one specific ability out of however many the ability you used is able to spark) to succeed appears to be 40/256. Even if you have the maximum chance for all abilities but the last one, you still have a pretty good chance (216/256) of failing each individual check, so it's not at all unlikely that you could fail all the checks and make it to the last one before having learned all the preceding abilities. If you don't have talent for the last ability, then your chance to spark it is only 1/256 (at best) each time you fail all the preceding checks, but that 1/256 could succeed any time, if you're lucky.

Let's make up a simple example to make this easier to understand. Let's pretend that Slash only leads to StunSlash, DoubleSlash, and LifeSprinkler. Let's pretend you have talent with StunSlash and DoubleSlash, but not LifeSprinkler, and you haven't learned any of them yet. Let's also pretend that you have physical mastery and you're attacking an enemy that allows you the maximum chance to learn StunSlash and DoubleSlash and at least some chance to learn LifeSprinkler.

The check in this example would go:
StunSlash: 40/256. If this fails, go on.
DoubleSlash: 40/256. If this fails, go on.
LifeSprinkler: 1/256.

The probability that you would fail the checks for both StunSlash and DoubleSlash, thereby giving yourself an opportunity (albeit only 1/256) to learn LifeSprinkler is (216/256) * (216/256) = about 71%. The probability that you would then also succeed at learning LifeSprinkler is a mere 0.27%, but it is possible.

Of course, this is a fictional example. In reality, you probably won't have the maximum chance for all (or even most) preceding abilities, so you may actually be more likely to make it to the opportunity to spark the last ability. If you lack talent for that last ability, you'll still won't ever have a good chance at learning it, but it most definitely is possible to learn it before learning all preceding abilities for which you have talent. You only have to get lucky once.

I hoped that cleared it up a little.

User Info: spweasel

spweasel
11 years ago#10
The important bit of information you were rather unclear on was that it updates the random value after checking against each ability rather than using the same random number for the entire attack. If they used the same value for each, what I said would hold true.

This information will prove invaluable if someone ever decides to TAS this.

One question, though: Does sparking a tech cause it to break out of the loop entirely, or does it continue to increment the random number for the later techs?

Using your example, let's pretend the RNG table looks like this:

30
24
18
00

Slash should spark StunSlash. Will the next character's turn use 24 or 00 for their first check? If it continues to increment the counter for the (by this time pointless) tests for Double Slash and LifeSprinkler, the next will be 00. If it breaks the loop entirely, 24 would be used.
  1. Boards
  2. SaGa Frontier
  3. How various things work, as determined by debugger
  • Topic Archived

GameFAQs Q&A