[Guide/Formula] Critical hit rate, cont. attack chance, wars

If you are stuck in the Dunan Unification Wars; or wish for more details on the gameplay systems, this is the place.
Post Reply
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Omnigamer »

I have a feeling that Falcon's crit chance is related to a fixed internal chance, much like the alternate attacks for many Unite attacks work. I haven't specifically looked into it however. If you do test it, Saj, would you mind sharing your methodology and data? Even if Killer has an effect, it likely wouldn't contribute more than 5-8% additional chance, which would take a lot of samples to become statistically relevant.
Saj
Posts: 17
Joined: Wed Aug 19, 2015 4:32 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Saj »

Well i tested it on over 200 fights for Anita and Valeria.
About 50 fights Valeria (33 normal - 17 crit) - Killer Anita - none (46 normal - 3 crit -1 miss)
50 Valeria - Killer (31 normal - 20 crit) , Anita - Killer rune (42 normal - 9 crit)
50 Valeria - none (40 normal - 10 crit) , Anita - Killer rune (37 normal - 11 - crit - 2 miss)
50 Valeria - none (37 normal 13 crit) , Anita - none (45 normal - 4 crit - 1 miss)
Ofc all this is just statistics and i could be simply lucky etc, but from what I tested it's quite obvious.
User avatar
ninjaluc79
Posts: 867
Joined: Tue Sep 13, 2005 10:45 pm
Location: The Island Nations
Contact:

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by ninjaluc79 »

Valeria has a higher critical hit rate than Anita, thus Valeria can crit often with normal attacks.

Valeria has 06 TECH and 05 LUCK. At level 60, she has (160 + 140 / 2) / 16 = 14.37%
Anita has 06 TECH and 03 LUCK. At level 60, she has (160 + 100 / 2) / 16 = 13.12%

Your tests yielded (assuming both are at level 60):

Normal Valeria = 23/100 Falcon crit (23%) = about 1.5x the normal
Killer Valeria = 37/100 Falcon crit (37%) = about 2.2x the normal

Normal Anita = 7/100 Falcon crit (7%) = about half the normal
Killer Anita = 20/100 Falcon crit (20%) = about 1.5x the normal

I'm curious, though, are both Valeria and Anita at the same level? Anita definitely has lower crits than Valeria, but at 7% it's really low.

From your tests, it seems like Valeria's Falcon never misses and has a higher chance of scoring a critical hit, which can be increased with Killer.

Anita's Falcon on the other hand, seems to have a chance to miss, have a lower chance to crit, but can also be increased with Killer.

Of course, those are only based on 50 successful Falcon hits on each character, so the RNG must be more generous to Valeria in this case. That, or it seems Falcon-style swordsmanship has deteriorated throughout the ages in the Suikoden universe.

However, by the Law of Large Numbers, a high enough number of tries should determine the exact critical rates for both normal and Falcon attacks. Nonetheless, these tests prove that the critical hit rates of Falcon attacks can be boosted by the Killer Rune.
It's not all about knowledge, but it helps.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Omnigamer »

I'm listing the stuff below as mechanics that we currently still don't know much about, or at the very least haven't been written out.

-Escape rates. I spent a small bit of time looking into this, but it definitely needs more exploration. There are several sub-divisions to this too:
--Let Go conditions on the World Map. I looked into this one specifically, and it's pretty straightforward. Let Go appears if the sum of your party's levels is greater than the sum of the enemy's party levels, and your highest-level character is greater than the highest enemy level.

--Let Go conditions for dungeons. I checked this out briefly, but it has a few notable differences from the World Map. It may not be true for all areas, but for North Sparrow Pass at least it seems to compare the party's level against a constant rather than the level of enemies. Needs more investigation.
--Escape rate on World Map. If you don't get Let Go to appear, what are your actual escape probabilities? I didn't check into this at all.
--Escape rate in dungeons. I checked the logic for this, and it compares your total party level with the total enemy party level. It has different effects depending on whether your party level is more than twice the enemy's, 1.5x the enemy's, 1x the enemy's, or less than the enemy's. This behavior likely varies by dungeon, but you can think of it as a potential to get a "bonus" to your RNG roll when determining a successful escape or not. That said, some places might give no actual bonus; it's merely a way to give a bonus. Off the top of my head, the value used in North Sparrow is 30 (ie, 30% chance to fail in worst case), and 10 for in Rockaxe. I haven't checked any other specific locations.


-Encounter characteristics. Relatively little has been said about this other than just "it works." This also has a few sub-topics to check out:
--Grace period. Each dungeon (or even World Map?) has a "grace period" after a battle or after entering a room where you can't get another encounter. From my observations this grace period is both a set amount of time or a set number of steps before it ends. For example, the grace period in Rockaxe is relatively small; you can get into encounters very quickly after one another. The grace period in North Window is much longer; you can easily get all the way up to Neclord without a single battle due to the long grace period when entering rooms.
--Encounter boundaries. This is entirely speculation on my part, but from some observations of moving around on the world map it seems that moving around in some regions can almost completely remove the chance of random encounters. This may be due to some grid-like layout of the full map; moving from one tile to another may reset a step counter and thus reduce encounter rate. I haven't looked into how the coordinate system works for either encounters or the world map in general, so that's as far as I can speculate.
--Encounter restrictions. Again, mostly speculation based on mild observations. Doing some things like running into walls can reduce your chance at getting an encounter, I've found. No idea why or how this would work other than possibly resetting some sort of step counter used to determine when an encounter is triggered.

-Other battle effects. Several of these that have yet to be confirmed, although we have some information on a lot of them:
--Multiple-hit rate. We have a formula for this, but as far as I know it was never verified. There's also a minor question of how a third consecutive hit is calculated; does it look at the first target's speed, or the second?
--Specific rune turn order effects. I'm specifically thinking of the second attack of double-beat; it may have some speed or turn order penalty associated with it.
--Unite Attacks turn order. Unite attacks seem to have 100% hit rate and have some kind of speed bonus, but I have no idea how it is calculated. The damage is a bit more straightforward; just subtract the enemy defense from each character's attack power and sum them before applying the multiplier.
--True Hit Rate. I discussed this a bit a while ago, but the answer is stickier than I explained it. The formula I provided was 100% accurate for the Luca battle only. I tried to verify it on other battles, but it turns out the value I initially pointed to as the "Enemy SPD" is fixed per encounter type or possibly per dungeon. I also didn't explore the chance of your characters being hit; the formula may be different.
--Counter rate. This may or may not be the same as hit rate for enemies; in the Luca battle he will only counter. Your characters can either dodge or counter, though. Nailing down the difference should help that understanding a bit.

-Misc War Battle stuff.
--Ability bonuses. Abilities like Melee can help in certain circumstances, but we currently have no idea how much. Critical is also poorly understood.
--Magic stats. All of the information I reported earlier about hit rate or magic spells are correct.
The missing piece is Mazus's hit rate, which is just something I haven't bothered to check.
--Chances of units being wounded/killed. This is reported as a formula based on luck elsewhere, but has not been verified. It also says nothing about units that are not usable in normal battle that can be killed, such as Gilbert.


These are a few of the things that come to mind for things we don't completely understand with the game yet. This is mainly just an enumeration of things for my own purposes. I will be checking into some of them gradually, but any further ideas for them are also appreciated.
Last edited by Omnigamer on Mon Feb 08, 2016 1:11 pm, edited 2 times in total.
User avatar
sporefrog
Posts: 162
Joined: Thu May 09, 2013 9:08 am
Location: Austria
Contact:

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by sporefrog »

Omnigamer wrote: --Chances of units being wounded/killed. This is reported as a formula based on luck elsewhere, but has not been verified. It also says nothing about units that are not usable in normal battle that can be killed, such as Gilbert.
I dont know,if this happens in the us and jap version too but in my german ps1 pal version of the game,a killed unit sometimes DOESNT become permanently killed.
this happened more than once with specific stars like Tuta,Lo Wen,Gijimu and Koyu,especially with Gijimu.
I tried to kill them on purpose in war battles but sometimes they stayed alive even if they were clearly killed.they even had their correct "killed-textbox-speech" but nothing else happended.

this may be an unimportant glitch in the game(and no idea why this happens) but its still worth mentioning because I never saw this in other versions of the game,only in the german pal version.
KFCrispy
Global Admin
Posts: 6174
Joined: Wed Jun 30, 2004 3:29 pm

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by KFCrispy »

i thought Unite Attacks just use the fastest partner's SPD. but i haven't done any research on turn order.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Omnigamer »

Rune Unite attacks work that way, but I think it may be different for standard Unite attacks. I believe I've seem some circumstances where a Unite will go first in a turn despite having somebody else with a higher speed than all participating members.

That said, it should be relatively simple to test. I might spend some time on that tonight. More pressing to me though is figuring out encounter mechanics, as that could be something I can actually use in a speedrun.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Omnigamer »

Some new stuff:

I tried looking into encounters, and sure enough, Sui2 uses a "danger value" system similar to a lot of other RPGs, such as Final Fantasy. Basically it constantly counts your steps, and the higher the step counter goes the more likely you are to get into an encounter. I don't have the specifics of how it uses the RNG for this, but having a max danger value (255) does not guarantee an encounter on the next step. It just makes it pretty likely. However, the game also has a "grace period" system where you have to take a certain number of steps before encounters will "activate" for an area. The amount of steps changes by area, but I think I have logged most of them below:

Code: Select all


Area	Step Grace
World Map 30
GH-Matilda Forest 50
Tenzan 30
North Sparrow 50
Ryube 50
Sindar 90
Muse-Highland 30
Muse 1 30
Cave of the Wind 80
North Window 70
TR Sewers 50
GH Forest 1 50
Banner Pass 60
Tinto Mines 80
GH Forest 2 70
Rockaxe Castle 15
L'Ren 70
Tinto Pass 50
Rakutei 2 70
World Map (Lakewest) 50
Kobold Village 40
Some other things to note:
-Leaving an encounter or changing screens resets the step counter and danger value to 0.
-The danger value remains at 0 until you have taken a number of steps equal to the grace period.
-For whatever reason, the Lakewest region is the only region on the World Map with a grace period that isn't 30.
-Stallion just increases your speed; grace periods last the same distance when using him on the World Map.
-There are some instances where the danger value will freeze (ie, no encounters). In some places this is intentional (door before Double Head) but some others they can't be explained well (some areas of the World Map).
-I didn't get a chance to test Rakutei 1 or Muse 2. As far as I can tell, they should be the same though.
-Greenhill Forest is broken up by region. GH Forest 1 is the region you can visit during the initial escape with Theresa. GH Forest 2 is the region when liberating GH. The rates switch as you change the actual area and are not connected to the storyline.
-A number of individual rooms have encounters turned off for no reason. A lot of these are in Tinto Mines, but there are a few spread throughout other dungeons as well.

EDIT: For the technical folks, the step counter is at RAM address 0x02566E and the danger value is at 0x02566F.
User avatar
ninjaluc79
Posts: 867
Joined: Tue Sep 13, 2005 10:45 pm
Location: The Island Nations
Contact:

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by ninjaluc79 »

Holy cow, no wonder Rockaxe Castle has way too many encounters.
It's not all about knowledge, but it helps.
KFCrispy
Global Admin
Posts: 6174
Joined: Wed Jun 30, 2004 3:29 pm

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by KFCrispy »

nice... i would want codes to change the grace period for other games... i think Suikoden 1-3 were ok for encounter rates
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Omnigamer »

I might try and figure out a few of the other things mentioned in my earlier post. Ideally I'd be able to directly check out how the code operates to determine formulas and probabilities, but the tools I'd like to use for that are still in development and I really don't want to go back to the other debugger if I can help it. So instead I want to look into some of these things empirically.

I'm planning to write up a fairly simple lua script that brute-forces the RNG space, performs an action, and checks the result condition before repeating. This won't solve a lot of what I brought up in the post, but should at least give good insights into possible formula structures. In particular, I want to test these things:

-War Battle ability effects, namely Critical and Melee.
-Hit Rate for enemies, as well as Dodge Rate for player characters.
-Multi-hit rate.
-A couple theories related to encounter rate.

A couple of the other things I can figure out just from careful setup of experiments, namely how the second hit of double beat interacts with enemy speed. I'll report back after I've tested a few of them.
STARWIN
Posts: 29
Joined: Thu Sep 03, 2015 8:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by STARWIN »

wait, which debugger are you using? no$psx works nicely in my experience.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Omnigamer »

In the past I've used pSX 1.13 (aka psxfin) and its debugger, but the debugger itself varies between unstable and unusable. Static disassembly also works, but I don't feel as comfortable with that unless I have a routine or two that I feel is a good place to start. I've used no$psx a little, but for now I feel like this brute-force approach will get me to the answer more efficiently than poring over the disassembly.

Some initial results are in from War Battles! Each event has 4096 samples, so statistically it should be very close to the true average.

Infantry vs Infantry - Matches up with prior known formula: RNG Roll = (ATK+4 - DEF)/20
Melee vs Infantry - Same as above.
Infantry vs Archers - Formula adjusts to this instead: RNG Roll = (ATK+6 - DEF)/20
Melee vs Archers - Formula further adjusts to this: RNG Roll = (ATK+12 - DEF)/20
Critical chance - If you hit the initial attack roll, you have a 30% chance to crit regardless of ATK/DEF values.
Evade chance - I did not explicitly test this, but I imagine it is similar to critical. If the initial damage roll hits, evade has a certain percentage to negate the enemy's roll. I would also assume it is 30%, but again cannot confirm it.
Stacking melee and critical - melee trumps critical every time. You will never get a critical if you are attacking an archer/mage unit while you have melee.

I want to test a few more this weekend; I'll post it as I get to them.

EDIT:

Tested speed ranges in a couple different situations, mainly centering around the use of double-beat.

-First off, when you tie an enemy's speed after the speed adjustment, you will always go first. Ex: if I have 16 speed and I'm fighting a GiantSnail in Ryube Forest (base 15 speed), I will always go before the GiantSnail. If I had 15 speed, I would go first 2/3 of the time. And so on.
-Double-beat's second attack plays out a little differently. If you tie the adjusted speed, you will have 50% chance to either have the enemy go before the adjusted speed or after it. Ex: If I have 15 speed and am fighting a GiantSnail, if the GiantSnail rolls a 15 speed then it will have a 50% chance to attack before the second hit of double beat, or after it.
-CAVEAT: If I instead had 16 speed in the above example, both hits of double beat would always go before the snail. Being at the top boundary of an enemy's speed rolls will guarantee that you always go first in both hits of double-beat. I don't know why this is, but it seems to hold true all the time.

I can also loosely confirm the Multiple Hit formula posted on the site now. This still doesn't say anything about how it acts for third hits, but it's a start.

EDIT2:

Dodge Rate for player characters seems pretty consistent across the few enemies I tested against. Somehow it seems to be only tied to the enemy and player TECH stats, rather than a mix of TECH and SPEED. Formula below.

Character Dodge Rate = Character TECH - Enemy TECH + 40

At least as far as I've seen, the upper bound is 79% (meaning you will dodge 79% of the time), and there is no lower bound. If you hit 0 or below, you have absolutely no chance of dodging. Again, this is probably not the same formula used for your attacks against enemies, but I'm still working on that.

EDIT3:

Enemy dodge rate seems consistent with the formula I reported earlier for Luca, just with some adjustments:

Enemy Dodge Rate = Enemy TECH - Character TECH + 20

=or equivalently=

Character Hit Rate = Character TECH - Enemy TECH + 80

Unlike the formula reported for Luca (which also happened to be for counters rather than plain dodges), this formula has a minimum 1% dodge rate and maximum 65% dodge rate. So it doesn't matter how much you beef up your tech, enemies will always have a chance to dodge. At worst having 35% chance to hit is pretty generous though. On the other side, this does change up some potential strategy for targeting some enemies over others since it is based on TECH and not SPEED.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by Omnigamer »

Tonight I just want to confirm a couple things.

First off, unite attack speed is based off of the fastest unit participating in the unite. This is just as KFCrispy mentioned earlier.

Second, I've looked a bit more into the encounter rate. Specifically, I checked whether or not the probability of getting into an encounter changes based on the danger value. It does not look like the danger has any effect on the rate at which you encounter enemies, but that rate does change by area. I'm still in the process of compiling a full list, but most places have a fixed rate between 1% and 2% chance of an encounter per step.

I tried to check into escape rates in the same way, but I had difficulty finding a good value to use as my conditional check in the brute-forcer. It seems like it checks whether the run was successful the frame after you press the button, whereas most other menu actions take 1-2 frames before responding to your input. The value I found indicating this changes addresses in every battle though, so it's not a good indicator long-term. Escape rates may be something I have to dig back into the code to figure out.
User avatar
ninjaluc79
Posts: 867
Joined: Tue Sep 13, 2005 10:45 pm
Location: The Island Nations
Contact:

Re: [Guide/Formula] Critical hit rate, cont. attack chance, wars

Post by ninjaluc79 »

So that means Evasion and Counter-attack builds rely on TECH. SPD only determines turn order.

Thanks a bunch!~
It's not all about knowledge, but it helps.
Post Reply