Long Post Warning:
Now, I spent some time today doing math. Funny, I couldn't run away from math fast enough in college, now I am actually enjoying some of it. . . All for war battles. This, I must admit, I am proud of, as I think the algebra came together very nicely. This is reasonably deep, but programmable on a potato, considering how easy these equations are. First, another horrid MS paint job. I am honestly getting worse at this:
[img]
War%20battles.png
[/img]
So, the sizes of the arrows don't mean anything, that is just me sucking at paint. This is basically a rip-off of Rock, Paper, Scissors, Lizard, Spock. In War battle terms, this then becomes: Infantry, Archer, Magic, Scout, and Cavalry. The pentacle shows the relations between each if: Rook = Inf, Queen = Arc, Bishop = Mag, Pawn = Scout, and Knight = Cav. There isn't too much here, except that if you note the top of the pentacle, the Charge > Archer > Magic > Charge mechanic is left intact from Suikoden I. Remember that any two adjoining units can be removed at any time, and the system will still work perfectly well as Rock, Paper, Scissors. So, in the early game, Infantry, Archer, and Magic units are introduced and set as a cycle, then in the mid-game, the other two unit types are introduced as an expanded cycle. If you take away Magic and Scout, you get the same cycle as Suikoden V. Preserving both original cycles was difficult, but I got it to work.
Now, Magic units will no longer use bows like in SV, other than that, four of the units are familiar. Scouts are my own invention, they have fast movement on the field, and can switch between bows and melee weapons as necessary, but have lower HP and DEF. Also, most should have a "repair self" style skill because they would be expected to act independently at times. So, narratively, they'd be capable of sneaking up on archers or using their short bows to take out cavalry at a distance.
Each unit has three basic stats: HP, ATK, and DEF. Much like SII, nice and simple. Each Unit has three members, Captain, Lieutenant, and Support Officer. Lieutenants are drawn from Stars playable in patty battles, Captains can be either playable or non, and same with support officers. Unit HP is determined by simply adding the levels of Captain and Lieutenant together. If the Captain is non-playable, just double the Lieutenant's HP contribution, or so. Powerful leaders like Kiba or Raja could, say, add 1.2 times the Lieutenant's HP, etc. If a support officer is playable, then just ignore their level, as they do not determine stats, just add special effects and skills. Unit Attack and Defense are a bit more tricky, but still based on level: Each character capable of being a captain has an unseen split that divides their level for ATK and DEF. So, a powerful captain, like the Tenkai, may have a split of 2ATK|2DEF, so at Lv 60, his level is divided by 2 to get 30 ATK and his level is again divided by 2 to get 30 DEF. These splits can be decimal numbers as well, like 4.5 or 4.75, etc. The lower the number, the better, and this would be easy to fine tune or escalate in different difficulty settings. Lieutenants and Support commonly add some pre-determined ATK or DEF, this does not change with level. A Captain Determines unit Type, but combining some characters can lead to special units, like Elven Archers, Ninja Scouts, or Heavy Cavalry. Some support officers can use powerful skills, like a "Battle Anthem" for musicians, which slightly recovers HP after every turn, etc.
When two units have an encounter several things happen. 1) Unit types are compared. 2) the RNG rolls the equivalent of a ten-sided die. 3)ATK and DEF are compared, and DMG is calculated. I hated the random nature of DMG in SII, but thought SV was to controlled and exploitable, so I am going for a middle ground here. Ignoring unit types, or assuming that two units of the same type meet, this is how it is calculated: ATK*1 - (DEF /2) = DMG. Simple enough. Though the "*1" and "/2" will change drastically with type match-ups, RNG rolls, and even in similar unit encounters.
If two units meet, then type mtach-ups come into play. The "winning" type has its DMG, Critical rate, evasion, and other things calculated first. So if our Tenkai's Infantry Unit meets an enemy Archer unit with 1 HP, then it will die without dealing DMG to the Tenkai's unit.
Now for the hard part: I mentioned before Dr. James Grime and his dice, because I had a feeling it would work in this situation. And yes, it does, but it takes some modification of his algebra for the mathematical system to become more stable, and more suitable for a video game. Basically speaking, imagine that every time two units meet, a ten-sided die is rolled by the RNG. The types determine the "winner" and "loser," but the result of the roll has a significant impact on how much one wins and loses in the encounter. As I explained so far, Types do not play a huge role until after the RNG rolls the die. This has ten different outcomes, but they are not simply numbered 1-10. In fact, each die is numbered differently depending on the unit type, and they are non-transitive, just like Grime Dice. Here are my changes and the win percentage in five tables, explaining the dice and their composition. Note that the "Tactics" skill actually changes the numbers present on each die, and allows for near-total domination if used against enemies without the "Tactics" skill. So, you will see 13 numbers for each die, Tactics 1 discards the first and adds the next number, so a Tactics 3 die uses the last ten numbers, from after the first partition to the end:
Die: | Tactics: 1,2,3
Rook, Inf: 4,4,4 | 4,4,4,4,4,4,9 | 9,9,9
Queen, Arc: 2,2,2 | 2,2,7,7,7,7,7 | 7,7,7
Bishop, Mag: 0,0,5 | 5,5,5,5,5,5,5 | 5,10,10
Knight, Cav: 1,1,1 | 1,6,6,6,6,6,6 | 6,6,6
Pawn, Sct: 3,3,3 | 3,3,3,3,8,8,8 | 8,8,8
Just like each unit, these rolls are non-transitive. So on average, the Infantry's "die" will beat both the Archer's die and the Scout's die. All this while the Scout's die on average beats Cavalry and Archer, etc, all the way through the horrid MS Paint diagram above. This establishes a base mathematical foundation for each unit type, independent of and in addition to the Statistics of HP ATK and DEF provided by the unit's members. Note that each type-match up is not 100%, but is still completely non-transitive no matter which level of the Tactics skill the unit possesses. Here are some winning roll percentages without the Tactics skill:
Tactics Level 0 vs 0:
Inf v Arc = 55%
Inf v Sct = 70%
Arc v Mag = 60%
Arc v Cav = 70%
Mag v Sct = 56%
Mag v Inf = 72%
Sct v Cav = 58%
Sct v Arc = 65%
Cav v Inf = 54%
Cav v Mag = 72%
So, around the outside of the pentagram we average a 57% win rate, and the inside averages a 71% win rate. Most enemy units will not have the "tactics" Skill, only named enemy generals and such, while it will be reasonably common for the player's army. If two characters have Tactics 1, then that equals Tactics 2, etc. So more commonly, especially by end game, it would look like this:
Tactics Level 3 v 0:
Inf v Arc = 70%
Inf v Sct = 82%
Arc v Mag = 84%
Arc v Cav = 88%
Mag v Sct = 76%
Mag v Inf = 92%
Sct v Cav = 76%
Sct v Arc = 80%
Cav v Inf = 81%
Cav v Mag = 92%
This is the part of the math I am most proud of, as increasing Tactics significantly and progressively increases win rate, while maintaining full non-transivity. Outside, we average roughly 78% and inside 88% or so. The inside cycle becomes a near-sure bet to defeat the opposing roll, with 80% being the lowest on Scout v Archer, and 92% success for Magic v Infantry and Cavalry v Magic.
Now, the question arises: Why go to all the trouble of "rolling" with the RNG? Why not just plug in the percentages normally? well, that is answered in same unit-type match-ups, and match-ups where the player is at the disadvantage. Units with Tactics skill will have a significant advantage over those without it in the roll, if they are the same unit type. Brains over Brawn is a common narrative in the games, and this feeds into that. So was are again using statistics to communicate narrative and design philosophy to the player.
Now for some more concrete examples with what I've established:
Say the Tenkai's Inf, unit encounters and enemy Inf unit. Let's ignore the die rolls for now. Tenkai has 100HP and 30ATK, 30DEF. Enemy has 100HP, 24ATK and 24DEF. Plugging this into the equation all the way near the top is:
30*1 -(24/2)= 18 DMG to enemy
24*1 -(30/2)= 9 DMG to Tenkai
Stable and progressing nicely, but a bit boring in my opinion. This would be the case if the Tenkai and the enemy had a draw on their roll. Now, let's add rolls to the mix, and assume Tenkai loses, with both units at Tactics lv 0:
30*.9 -(24/1.8 )= 14 DMG to enemy
24*1.1-(30/2.2)= 13 DMG to Tenkai
Now, the ATK and DEF modifiers are increased positively for the winner and negatively for the loser. By a percentage equal to the chance of winning a roll in any given scenario. In this case, there is a 10% chance to win and a 90% chance to draw. So, ATK and DEF are modified by 10%, 0.1 and 0.2 respectively. This makes the encounter basically even. Now, let's assume the Tenkai wins the roll:
30*1.1 -(24/2.2) = 22 DMG to enemy
24*.9 -(30/1.8 ) = 5 DMG to Tenkai
These hopefully show that base ATK / DEF stats are still playing a huge role in the calculation, but can be enhanced by rolls. Now, let's assume Tactics lv3 for tenkai, and Tactics lv0 for the Enemy. This raises win percentage to 36% for the Tenkai, with 58% draw and only a 6% chance of winning. So, it is easy to see that even rarely losing the roll will have virtually no negative consequence for the Tenkai compared to a draw.
30*1.36 -(24/2.72) = 32 DMG to enemy
24*.64 -(30/1.28) = 0 DMG to Tenkai
Almost 1/3rd of the enemy's HP is gone with no damage to the Tenkai. 30 ATK and DEF may be a bit high practically, but it works for this experiment. More likely, a split of 3|3 leading to 20 ATK and DEF would be better. But now let's look at a unit type the Tenkai is potent against, Archers, with 30ATK and 30DEF still in play. Against different enemy types, it is not possible to draw. Someone will win and someone will lose the roll. For Infantry v Archers at Tactics 0, Infantry wins 55% of the time, and loses 45% of the time. Let's assume a loss with enemy ATK/ DEF at 24. If you win the type match-up ATK and DEF can never drop below 1 or above 2 respectively:
30*1 -(24/1.1) = 22 DMG to enemy
24*1.45 -(30/2) = 20 DMG to Tenkai
Because of stats and type, the Tenkai still "wins" the encounter, but just barely. Re-calculating for enemy 30ATK and 30DEF:
30*1 -(30/1.1) = 3 DMG to enemy
30*1.45 -(30/2) = 29 DMG to enemy
This demonstrates that stats are in the end, more important than Types. But overall, Types will greatly help through the Tactics skill. Let's recalculate for 30ATK/30DEF for an enemy archer, this time assuming the tenkai wins the roll:
30*1.55 -(30/3.1) = 37 DMG to enemy
30*.45 -(30/.9) = 0 DMG to Tenkai
The purpose here is to recreate type-match ups from SV and SI, but to make them more chaotic and less predictable, like SII and SIII war battles. For one last example, let's calculate Tenkai at Tactics 3 v Enemy Scout at Tactics 0 with 100HP and 30|30. This Yields an 82% win rate:
30*1.82 -(30/3.64) = 46 DMG
30*.28 -(30/.46) = 0 DMG
With all told, I think this is actually a pretty elegant compromise between the two different flavors of Suikoden War Battles. Of course, Magic units would still have runes to use and Archers and Scouts could Barrage. Perhaps it would be best to slightly nerf their HP in return. But I am tired of doing algebra for now.
You do not have the required permissions to view the files attached to this post.