Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Algorithms discovered by Violently Car.
- Lowercase a in front of a variable means attacker. Lowercase d means defender. Lowercase b means base.
- Player STR Damage
- =================
- Damage = (Base Damage - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
- Base Damage = (abSTR + aWATK + 10) * [(95 + (abSTR * 0.2)) / 100]
- Defense = [250 + (dVIT * 2.5)] * (dVIT * 3.5) / 1000
- Ability Multiplier = [((aSTR + 10) / (dVIT + 10)) + 1] * 0.3333
- Difficulty Factor is 1 on Expert, 1.5 on Standard, and 2 on Picnic.
- If no weapon is equipped, then aWATK is equal to (aLVL + aSTR) / 2.
- If Clear Strike is used, substitute all instances of aSTR and abSTR with aTEC and abTEC.
- If Shield Smite or Shield Rush are used, substitute aWATK with the equipped Shield's DEF * 3.
- If the attacker has an arm bind, aSTR is halved and rounded down.
- In the case of Clear Strike, if the attacker has a head bind, aTEC is halved and rounded down.
- If Ecstasy is cast, the damage is multiplied by a certain amount depending on the number of binds:
- No binds: Multiply the damage by a certain value ranging from 1.2 to 2.55 depending on the skill level.
- 1 bind: Multiply the damage by 2.
- 2 binds: Multiply the damage by 3.15.
- 3 binds: Multiply the damage by 5.6225.
- Player TEC Damage
- =================
- Damage = (Base Damge - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
- Base Damage = [3.5 + (abTEC / 80)] * abTEC
- Defense = [250 + (dTEC * 2.5)] * [dVIT + (dTEC * 2.5)] / 1000
- Ability Multiplier = [((aTEC + 5) / (dTEC + 5)) + 1] * 0.3333
- Difficulty Factor is 1 on Expert, 1.5 on Standard, and 2 on Picnic.
- If the attacker has a head bind, aTEC is halved and rounded down.
- If the target has a head bind, dTEC is halved and rounded down.
- However, if the player casts Revenge Curse, an extra part is attached to this formula.
- Revenge Damage = Damage * [1 + ((MaxHP - CurHP) * Revenge Power) / 10000] * [((Missing HP%) + (Missing HP% ^ 2) + 0.02) / 2]
- Missing HP% = [100 - ((CurHP / MaxHP) * 100)] / 10
- Revenge Power = 20 if casting the Hexer's version. Tlachtga's version is 15 instead.
- Enemy STR Damage
- ================
- Damage = (Base Damage - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
- Base Damage = [5 + (abSTR / 40)] * abSTR
- Defense = [((dVIT + dDEF) * (dDEF + 250)) / 1000)]
- Ability Multiplier = [((aSTR + 10) / (dVIT + 10)) + 1] * 0.3333
- Difficulty Factor is 1 on Expert, 0.6 on Standard, and 0.2 on Picnic.
- If the attacker has an arm bind, aSTR is halved and rounded down.
- If an enemy attacks another enemy, the Defense factor and Difficulty Factor changes to these instead:
- Defense = [250 + (dVIT * 2.5)) * (dVIT * 3.5] / 1000
- Difficulty Factor is to 1 on Expert, 1.5 on Standard, and 2 on Picnic.
- Enemy TEC Damage
- ================
- Damage = (Base Damage - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
- Base Damage = [3.5 + (abTEC / 80)] * abTEC
- Defense = [(((dVIT + dDEF) * 0.28571) + (dTEC * 2.5)) * (250 + (dTEC * 2.5))] / 1000
- Ability Multiplier = [((aTEC + 5) / (dTEC + 5)) + 1] * 0.3333
- Difficulty Factor is 1 on Expert, 0.6 on Standard, and 0.2 on Picnic.
- If the attacker has a head bind, aTEC is halved and rounded down.
- If the target has a head bind, dTEC is halved and rounded down.
- However, if an enemy casts casts Revenge Curse, an extra part is attached to this formula.
- Revenge Damage = Damage * [1 + ((MaxHP - CurHP) * 15 / 10000] * [((Missing HP%) + (Missing HP% ^ 2) + 0.02) / 2]
- Missing HP% = [100 - ((CurHP / MaxHP) * 100)] / 100
- Diminishing Returns
- ===================
- Stacking multiple damage or defense increasing passives and buffs causes any weaker buffs to not have as much an effect. And the effect stacks for each boost from the same category. The game prioritizes the strength of the multipliers, from strongest to weakest when applying diminishing returns, not the order in the case of buffs.
- The penalties are as follows:
- 10% for damage increasing passives.
- 15% for damage increasing buffs.
- 10% for defense increasing passives.
- 20% for defense increasing buffs.
- For example, A 1.4 multiplier becomes 1.34 for 1 extra damage buff, and 1.28 for 2 extra damage buffs.
- However, the multiplier can never go below 1.01 in the case of damage boosts, or above 0.99 in the case of defense boosts.
- One turn effects (Such as Front Guard) are not affected by this.
- Damage Randomization
- ====================
- After all the damage is calculated, the damage is randomized. How this works is that the final result is multiplied by a number ranging from 0.98 to 1.02. After which, a random number ranging from 0 to 4 is added on.
- Enemy Targeting Routine (INCOMPLETE)
- =======================
- When auto-battle is turned on or an enemy attacks, there is a standard targeting routine that is followed. (NOTE: Some enemies won't always follow this targeting method, and will go after a specific target instead.)
- Targeting:
- VV = "Valid Value". Everyone has a VV of 2 by default.
- TC = "Target Chance". Everyone has a TC of 10 by default.
- Here are things that affect PV:
- If you are in the front row, +1 VV
- If you have the most current HP, +1 VV
- If you are asleep, +1 VV
- If you have used Provoke, +1 VV (+2 VV at level 10+)
- If you have used at least level 5 Chain Dance, +1 VV (+2 PV at level 10+)
- If you have the least current HP, -1 VV
- VV cannot go below 1 or exceed 6.
- Here are the things that affect TC:
- If you've used Provoke, TC + Aggro Value.
- TC cannot go below 1 or exceed 255.
- For targeting, let MV be highest VV among potential targets. Roll a number between 1 and 100. If it's less than 49, subtract MV by 1. Continue rolling until the number is greater than or equal to 49, or MV becomes 1. Characters whose PV is lower than MV are disqualified from being targeted this turn. Add the total TC of all remaining valid targets (tTC). To determine who is hit among valid targets, use this formula:
- For each character, starting from upper left slot and moving toward the back right row:
- A = TC * 100 / tTC
- Roll a number between 0 and 101. If that number is less than A, that character is targeted.
- If no one is targeted this way, roll a number between 0 and 100.
- If that number is 75 or lower, target the character with the most HP in the front row.
- If that number is between 76 and 95 inclusive, target the character with the most HP in the back row.
- If that number is 96 or higher, ???
- Critical Hit Rate
- =================
- Crit Rate = [(aLUC + 10) * 100] / (dLUC + 10)
- If the result is less than 30, set it to 30.
- If the result is greater than 300, set it to 300.
- Then roll a number between 0 and 1000.
- If that number is lower than the result of the formula, the attack will be a critical hit.
- Diagnosis and Crit Up's values are added after the Crit Rate is calculated, allowing them to bypass the cap.
- Accuracy (INCOMPLETE)
- ========
- A = [((aLUC + (aAGI * 2)) + 30) * 10] / [(dAGI + (dLUC * 2)) + 30]
- A is rounded down.
- If A < 10, B = [1 - ((1 - (A / 10)) ^ 2)] * [(Base Accuracy + Skill Modifier) * 10]
- If A >= 10, B = [(87.5 + (((A / 20) * 50) * (A / 20))) * (Base Accuracy + Skill Modifier)] / 10]
- Base Accuracy Parameters:
- If a party member is using a skill that does not require a weapon, Base Accuracy = Skill Accuracy.
- If a party member is uing a skill that requires a weapon, Base Accuracy = Weapon Accuracy.
- If a party member does not have a weapon equipped, Weapon Accuracy = 95.
- If an enemy is using a regular attack, Base Accuracy = 99.
- If an enemy is using a skill, Base Accuracy = Skill Accuracy.
- C = B * (all the accuracy and evasion modifiers and shit that need to be figured out later).
- If C > 1500, C = 1500
- If the attacker is blinded, D = C * 0.33
- If the skill bypasses accuracy checks or the target is petrified, asleep, panicked, blind, paralyzed, or leg bound, D = 1000
- Else, D = C.
- Roll a number between 1 and 1000. If that number is lower than or equal to D, the attack lands.
- Infliction Rate
- ===============
- A = [((aLUC + (aTEC * 2)) + 30) / ((dTEC + (dLUC * 2)) + 30)] * 10
- IR = Skill's infliction rate
- If A <= 2, B = IR
- If A > 2 & A < 50, B = IR * A
- If A >= 50, B = IR * 50
- C = B * Resistance * Difficulty Factor * Modifiers
- Resistance = Base Resistance + Accumualtive Resistance
- Difficulty Factor for enemies is 1 on Expert, 0.6 on Standard, and 0.2 on Picnic. For players, this is always 1.
- If C is greater than 1500, then set it to 1500.
- Then roll a number between 0 and 1000.
- If that number is lower than C, then Lethal Resistance is checked for.
- If the target does not have the Lethal Resistance flag, the disable will be inflicted.
- If the target does have the Lethal Resistance flag, then the infliction attempt only has a 10% chance of working.
- Accumulative Resistance
- =======================
- Each time a disable (that isn't stun) is inflicted, a value of 50 is subtracted from the target's current accumulative resistance value for that particular disable, which always starts at 0, and a resistance cap is placed on the target.
- Once the disable wears off, the accumulated resistance will gradually wear off. For each turn the target does not have the specified disable, a value of 7 is added to the accumulative resistance value. This continues until that same disable is inflicted again, at which point it would halt until the disable wears off. Or until they run into the resistance cap, at which point it will halt until the disable is inflicted again.
- The resistance cap is determined by this formula:
- SA = Total successful applications of the disable.
- If SA <= 3, then A = (0.85 ^ SA) * Base Resistance
- If SA > 3, then A = [0.85 ^ (1 + (SA / 2))] * Base Resistance
- This part of the formula: (1 + (SA / 2), is rounded up.
- Resistance Cap = A - Base Resistance
- The end result is rounded down. Accumulative Resistance cannot be greater than the Resistance Cap at any point.
- If a player unit dies, then their Accumualative Resistance and Resistance Cap is set back to 0.
- Ailment Recovery
- ================
- rLUC = recovering character's LUC
- etLUC = average LUC of the opposing team
- T = Total times ailment recovery has failed.
- M = 0 + Recovery Aria - Relapse Curse
- A = sqrt[(rLUC + 20) / (etLUC + 20)] * 10
- If A <= 5, B = (5 + (T * 7.5)) + M
- If A > 5 and <= 20, (B = (10 + (T * 15)) * A / 10) + M
- If A > 20, B = (20 + (T * 30)) + M
- If T = 0, then B = 0
- Check for a flag. If it's found, add to B a value found at [R4 + 0x4E]. This value would allow recovering from ailments on the same turn they are applied.
- If B < 0, then B = 0
- If B > 80, then B = 80
- If T >= 4, then B = 100
- Check for another flag. If it's found, then B = 100.
- Roll a number between 0 and 99. If that number is less or equal to B, recover from the ailment.
- (During this calculation, a random number between 0 and 10 is generated. This number is never used, but it advances the RNG.)
- Severing Slash
- ==============
- AR: Activation rate
- LD: The difference in level between the user and the highest level enemy in the encounter + 20. This value is capped at 35.
- If the level difference is less than or equal to 20:
- A: [(LD ^ 3) / 80] * (AR / 100)
- If the level difference is greater than 20:
- A: [(LD ^ 2) / 4] * (AR / 100)
- B: Random number between 0 and 1000.
- If A > B, activate Severing Slash.
- Poison Damage
- =============
- RNG1 + [(RNG2 + (Base Poison Damage + (TEC / 5))) * (1 + (TEC / 100))]
- RNG1: A random number from 0 to 5.
- RNG2: A random number from 0 to 5.
- Bug: If the target is defending, the damage is halved.
- Healing
- =======
- [(Base Heal + (TEC / 5)) + RNG] * [1 + (TEC / 100)] * Difficulty Factor * Heal Mastery
- RNG: A random number from 0 to 5.
- Difficulty Factor for players is 1 on Expert and Standard. On Picnic, this increases to 1.5. For enemies, this is always 1.
- Speed
- =====
- [(Equipment Speed Mod + 100) * AGI * Skill Speed Mod * Random number between 90 and 110 / 10000] * Modifiers
- Equipment Speed Mods from all pieces of equipment on a party member are added together. For enemies, this is obviously 0. The data for Equipment Speed Mods are as follows (Does not apply to everything, outliers will be noted at the end):
- Weapons:
- Swords: 0
- Axes: -5
- Staves: -5
- Katanas: 5
- Bows: 0
- Whips: 5
- Guns: -5
- Spears: 0
- Equipment:
- Heavy Armor: -10
- Light Armor: 0
- Clothes: 5
- Helmets: 0
- Gloves: 5
- Boots: 10
- Shields: -5
- Accessories: 0
- Outliers:
- Sonic Dagger (Sword): 30
- Cianontedae (Boots): -50
- When a rare breed acts, their AGI is multiplied by 10.
- Boost Gain (INCOMPLETE)
- ==========
- minB = Minimum boost. This is 5 in all cases.
- maxB = Maximum boost. This is 15 in all cases.
- SBU = Skill Boost Up
- GBU = Gear Boost Up
- minB = minB + (SBU * 0.1)
- maxB = maxB + (SBU * 0.05)
- Then,
- minB = minB + (GBU * 0.1)
- maxB = maxB + (GBU * 0.05)
- Roll a random number between minB and maxB. This value is the amount of boost you gain this turn.
- When an ally dies, all remaining allies receive a boost roll and the dead ally loses half their current boost.
- Axcelas simply add 10 to your current boost.
- Additionally, at the end of combat, each character rolls for boost again.
- Then, after the end of combat roll, characters get a further amount of boost based on ???. It always seems to be within the 5-15 range, though...
- Preemptives
- ===========
- A = [((Party's Average AGI * 2) + Party's Average LUC + 20) * 10] / [Enemy's Average AGI + (Enemy's Average LUC * 2) + 20]
- If A <= 2, B = 12
- If A >= 50, B = 300
- Else, B = A * 6
- Roll a number between 1 and 999. If the rolled value is below B, the preemptive is successful. If that fails, roll another number between 1 and 999 and check against Predator's preemptive chance. If that number is lower than Predator's value, the preemptive is successful. Otherwise, move onto the blindside check.
- Blindsides
- ==========
- A = [((Enemy's Average AGI * 2) + Enemy's Average LUC + 20) * 10] / [Party's Average AGI + (Party's Average LUC * 2) + 20]
- If A <= 2, B = 8
- If A >= 50, B = 200
- Else, B = A * 4
- Then, check B against the value that was previously rolled to check whether Predator was successful. If this roll succeeds, the blindside is successful. Otherwise, roll a number between 1 and 100 and check against the value of Awareness. If that number is lower than Awareness' value, the blindside fails. Otherwise, no one gets the advantage.
- Escape Rate
- ===========
- C = 10 * (A / B) ^ 2
- A = Escaper's AGI + Escaper's LUC + 20
- B = Enemy's Average AGI + Enemy's Average LUC + 20
- If C <= 2:
- Escape Rate = (30 * D * 2 / P) + (25 / P + E) / 5
- If C > 2 & C < 40:
- Escape Rate = (30 * D * 2 / P) + ((25 / P + E) * C) / 10
- If C >= 40:
- Escape Rate = (30 * D * 2 / P) + (25 / P + E) * 4
- D = Number of allies who are either sleeping or panicked + (number of allies who are either dead or petrified * 2).
- E = Previously attempted escapes.
- P = Allies in party.
- Then:
- Check for a value in player stats then add that value to Escape Rate. (Unknown)
- Check for a value in player stats then subtract that value from Escape Rate. (Unknown)
- Add the escape bonus from Flee if applicable (Bug: Each attempt to escape with Flee adds Flee's bonus to itself. so, level 1 flee is 50% bonus on attempt 1, 100% bonus on attempt 2, 150% bonus on attempt 3, etc.)
- Multiply the score by 3 if boosted.
- Check if the score is over 100 and set it to 100 if it is.
- Load another value in the escaper's stats. (Unknown)
- Cap it to 90 if Flee isn't being used and cap it to 99 if is.
- Grimoire Chances
- ================
- At the beginning of every turn, roll for a grimoire chance. Allies who are dead, petrified, asleep, panicked, or paralyzed are completely disqualified from a Grimoire Chance. Party members are also disqualified if (value at character data + 0x12BA has bit 1), they do not have a grimoire stone equipped, or have not learned any skills.
- At the beginning of each turn, you have a 0.1% chance to get a "Grimoire Fever" and all qualified party members will have a grimoire chance. This chance is increased to 5% against rare breeds.
- A = [Highest level among enemies] - Character's Level.
- If A < -10, B = 30
- If A < 0, B = 100 + (A * 8)
- If A >= 0, B = 100 + (A * 20)
- If A > 10, B = 300
- B is used in the final formula.
- If A < 0, C = [(20 + (A * 2)) / 10] + 1. This value is rounded down.
- If A >= 0, C = 3 + (A * 2)
- T = Turn count.
- If C >= T, D = 100
- Else, D = 100 * [1 - ((T - C) / C + 3))]. D cannot be lower than 10. This value is rounded down.
- If the enemy is a rare breed, E = 1200. Otherwise,
- eHP = Highest current HP value among all enemies
- eLVL = Highest level value among all enemies
- E = [(1 + sqrt (eHP / (50 + (eLVL * (4 + (((eLVL + 10) ^ 2) / 2000)))))) * 100] / 2. This value is rounded down.
- SP = Total number of skill points spent by the chancing character / 20. This value is rounded down.
- GS = Grimoire stones owned by party (including ones in inventory)
- F = GS - (SP * 15) - 20. F cannot be lower than 20 and cannot be greater than 100.
- Now, for the main formula:
- LB = Living bonus. The number of living party members at the end of each turn is added onto this value. This is capped at 100. When a party member gets a Grimoire Chance, this value will be halved for them.
- VA = Valid allies. The number of allies in your party who are not dead, petrified, panicking, asleep, or paralyzed.
- Score: [((((((((250 / (VA + 1)) * B) / 100) * D) / 100) * E) / 100) * F) / (100 * (0.5 + (T / 4)))] * [1 + ((LB ^ 2) / 2500)]
- Roll a number between 1 and 1000. If that number is lower than Score, you get a Grimoire Chance.
- Grimoire Creation (This is going to be messy...)
- ================================================
Advertisement
Add Comment
Please, Sign In to add comment