DrFetus

EO2U Algorithms (WIP)

Nov 1st, 2025 (edited)
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.40 KB | None | 0 0
  1. Lowercase a in front of a variable means attacker. Lowercase d means defender. Lowercase b means base.
  2.  
  3. Player Physical Damage
  4. ======================
  5. Damage = (Base Damage - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
  6.  
  7. Base Damage = (abSTAT + aWATK + 10) * [(95 + (abSTAT * 0.2)) / 100]
  8. Defense = [250 + (dVIT * 2.5)] * (dVIT * 3.5) / 1000
  9. Ability Multiplier = [((aSTR + 10) / (dVIT + 10)) + 1] * 0.3333
  10. Difficulty Factor is 1 on Expert, 1.5 on Standard, and 5 on Picnic.
  11.  
  12. aSTAT and abSTAT depend on the kind of attack being used. STR-based attacks will use STR and AGI-based attacks will use AGI. If 2 different stats are used to calculate damage, those stats are added together and then divided by 2 for use in this formula.
  13. If no weapon is equipped, then aWATK is equal to (aLVL + aSTR) / 2.
  14. If Medical Rod is used, substitute all instances of aSTAT and abSTAT with aTEC and abTEC.
  15. If Shield Smite or Shield Rush are used, substitute aWATK with the equipped Shield's DEF * 3.
  16. If the attacker has an arm bind, STR is halved and rounded down if applicable.
  17. If the attacker has a leg bind, AGI is halved and rounded down if applicable.
  18. In the case of Medical Rod, if the attacker has a head bind, aTEC is halved and rounded down.
  19. Power Gel and Affection collar only affect aSTAT in the case of AGI-based attacks.
  20.  
  21. If Ecstasy is cast, the damage is multiplied by a certain amount depending on the number of binds:
  22. No binds: Use the skill's base damage values.
  23. 1 bind: Multiply the damage by 2.
  24. 2 binds: Multiply the damage by 3.1.
  25. 3 binds: Multiply the damage by 5.41.
  26.  
  27. Player Magical Damage
  28. =====================
  29. Damage = (Base Damge - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
  30.  
  31. Base Damage = [3.5 + (abTEC / 80)] * abTEC
  32. Defense = [250 + (dTEC * 2.5)] * [dVIT + (dTEC * 2.5)] / 1000
  33. Ability Multiplier = [((aTEC + 5) / (dTEC + 5)) + 1] * 0.3333
  34. Difficulty Factor is 1 on Expert, 1.5 on Standard, and 5 on Picnic.
  35.  
  36. If the attacker has a head bind, aTEC is halved and rounded down.
  37. If the target has a head bind, dTEC is halved and rounded down.
  38.  
  39. However, if the player casts Life Trade, an extra part is attached to this formula.
  40.  
  41. Life Trade Damage = Damage * [1 + ((Party Average HP Missing) * 5 / 10000] * [((Party Average Missing HP%) + (Party Average Missing HP% ^ 2) + 0.02) / 2]
  42.  
  43. Party Average Missing HP% = For each party member: [100 - ((CurHP / MaxHP) * 100)] / 10, add the results from all living party members together, then divide by the number of living party members.
  44.  
  45. Enemy Physical Damage
  46. =====================
  47. Damage = (Base Damage - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
  48.  
  49. Base Damage = [5 + (abSTR / 40)] * abSTR
  50. Defense = [((dVIT + dDEF) * (dDEF + 250)) / 1000)]
  51. Ability Multiplier = [((aSTR + 10) / (dVIT + 10)) + 1] * 0.3333
  52. Difficulty Factor is 1 on Expert, 0.6 on Standard, and 0.1 on Picnic.
  53.  
  54. If the attacker has an arm bind, aSTR is halved and rounded down.
  55.  
  56. If an enemy attacks another enemy, the Defense factor and Difficulty Factor changes to these instead:
  57.  
  58. Defense = [250 + (dVIT * 2.5)) * (dVIT * 3.5] / 1000
  59. Difficulty Factor is to 1 on Expert, 1.5 on Standard, and 5 on Picnic.
  60.  
  61. Enemy Magical Damage
  62. ====================
  63. Damage = (Base Damage - Defense) * Ability Multiplier * Skill Power * Difficulty Factor * Modifiers
  64.  
  65. Base Damage = [3.5 + (abTEC / 80)] * abTEC
  66. Defense = [(((dVIT + dDEF) * 0.28571) + (dTEC * 2.5)) * (250 + (dTEC * 2.5))] / 1000
  67. Ability Multiplier = [((aTEC + 5) / (dTEC + 5)) + 1] * 0.3333
  68. Difficulty Factor is 1 on Expert, 0.6 on Standard, and 0.1 on Picnic.
  69.  
  70. If the attacker has a head bind, aTEC is halved and rounded down.
  71. If the target has a head bind, dTEC is halved and rounded down.
  72.  
  73. Diminishing Returns
  74. ===================
  75. Stacking multiple damage, defense, accuracy, or evasion 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. Debuffs that functionally provide the same effect as a buff in calculations also are factored in.
  76.  
  77. The penalties are as follows:
  78. 25% for passives.
  79. 40% for buffs.
  80.  
  81. For example, A 1.4 multiplier becomes 1.24 for 1 extra damage buff, and 1.08 for 2 extra damage buffs.
  82.  
  83. 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.
  84.  
  85. One turn effects (Such as Front Guard) are not affected by this.
  86.  
  87. Effects that are primarily classified as a different category from these listed effects can fully stack. For example, the Troubadour's Preludes will fully stack with any attack buffs without inducing dimishing returns.
  88.  
  89. Likewise Speed Up and Pre-initiative fully stack, as the former counts as a speed boost rather than an accuracy boost.
  90.  
  91. When using a damaging Force Break, dimishing returns will kick in immediately, meaning the strongest damage buff already takes a 40% penalty. This does not apply to passive skills and those take the normal penalties.
  92.  
  93. Damage Randomization
  94. ====================
  95. 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.
  96.  
  97. Force Skill Damage Scaling
  98. ==========================
  99. Force Breaks that deal damage have their damage scale according to the user's level. A given Force Break skill that falls under this has 3 defined values, a minimum value, a midpoint value, and a maximum value.
  100.  
  101. While Meteor Smash and Illusion Step are not Force Breaks, their damage scales exactly like one.
  102.  
  103. If level < 60:
  104.  
  105. Damage = Minimum * ((Midpoint - Minimum) + ((Level - 1) / 59))
  106.  
  107. If level = 60:
  108.  
  109. Damage = Midpoint
  110.  
  111. If level > 60:
  112.  
  113. Damage = Midpoint * ((Maximum - Midpoint) + ((Level - 1) / 98))
  114.  
  115. In simpler terms, the damage scales linearly from levels 1 to 59, as well as from 60 to 99, though the latter has a flatter slope in comparison to the former.
  116.  
  117. If any charge effects are active, then the effects of charge skills are halved on damaging Force breaks. (i.e. A charge that multiplies damage by 2 would instead multiply it by 1.5.)
  118.  
  119. Enemy Targeting Routine
  120. =======================
  121.  
  122. Critical Hit Rate
  123. =================
  124. Crit Rate = [(aLUC + 10) * 100] / (dLUC + 10)
  125.  
  126. If the result is less than 30, set it to 30.
  127. If the result is greater than 300, set it to 300.
  128. Then roll a number between 0 and 1000.
  129. If that number is lower than the result of the formula, the attack will be a critical hit.
  130.  
  131. Fencer's values are added after the Crit Rate is calculated, allowing it to bypass the cap.
  132.  
  133. Accuracy
  134. ========
  135. A = [((aLUC + (aAGI * 2)) + 30) * 10] / [(dLUC + (dAGI * 2)) + 30]
  136.  
  137. A is not rounded down.
  138.  
  139. If A < 10, B = [1 - ((1 - (A / 10)) ^ 2)] * [(Base Accuracy + Skill Modifier) * 10]
  140. If A >= 10, B = [(87.5 + (((A / 20) * 50) * (A / 20))) * (Base Accuracy + Skill Modifier)] / 10]
  141.  
  142. Base Accuracy Parameters:
  143. If a party member is using a skill that does not require a weapon, Base Accuracy = Skill Accuracy.
  144. If a party member is uing a skill that requires a weapon, Base Accuracy = Weapon Accuracy.
  145. If a party member does not have a weapon equipped, Weapon Accuracy = 95.
  146. If an enemy is using a regular attack, Base Accuracy = 99.
  147. If an enemy is using a skill, Base Accuracy = Skill Accuracy.
  148.  
  149. C = B + Accuracy and Evasion Boosts (Accuracy adds to this value, evasion subtracts)
  150.  
  151. If C > 1500, C = 1500
  152.  
  153. If the attacker is blinded, D = C * 0.33
  154.  
  155. If the attacker is an enemy, blinded, and the Apple Matcha Shaved Ice is in effect, subtract 2000 from D (Functionally makes it so all attacks from blinded enemies miss aside from ones that bypass accuracy checks or if the target cannot evade)
  156.  
  157. If the skill bypasses accuracy checks or the target is petrified, asleep, panicked, blind, or leg bound, D = 1000
  158.  
  159. If the target is paralyzed and the paralysis effect activates, D = 1000
  160.  
  161. Else, D = C.
  162.  
  163. Roll a number between 1 and 1000. If that number is lower than or equal to D, the attack lands.
  164.  
  165. Infliction Rate
  166. ===============
  167. aSCORE = (aSTAT) + aLUC
  168.  
  169. If the skill being cast is a STR-based attack, aSTAT = STR * 2.
  170. If the skill being cast is a AGI-based attack, aSTAT = AGI * 2.
  171. If the skill being cast is a TEC-based attack, aSTAT = TEC * 2.
  172. If the skill being cast involves 2 different stats being used for damage calculations, then both of those stats are added together for aSCORE.
  173. Else, aSTAT = LUC * 2.
  174.  
  175. A = [(aSCORE + 30) / ((dLUC * 3)) + 30)] * 10
  176.  
  177. IR = Skill's infliction rate
  178.  
  179. If A <= 2, B = IR
  180. If A > 2 & A < 50, B = IR * A
  181. If A >= 50, B = IR * 50
  182.  
  183. C = B * Resistance * Difficulty Factor * Modifiers
  184.  
  185. BUG: If C is > 32767, then the value becomes negative instead, starting at -32768 and increasing from there, forcing the infliction attempt to fail in most cases.
  186.  
  187. Resistance = Base Resistance + Accumulative Resistance
  188. Difficulty Factor for enemies is 1 on Expert, 0.6 on Standard, and 0.1 on Picnic. For players, this is 1 on Expert and Standard, and 2 on Picnic.
  189.  
  190. If C is greater than 1500, then set it to 1500.
  191. Then roll a number between 0 and 1000.
  192. If that number is lower than C, the disable will be inflicted.
  193.  
  194. Accumulative Resistance
  195. =======================
  196. 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.
  197.  
  198. 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.
  199.  
  200. The resistance cap is determined by this formula:
  201.  
  202. SA = Total successful applications of the disable.
  203.  
  204. If SA <= 3, then A = (0.85 ^ SA) * Base Resistance
  205. If SA > 3, then A = [0.85 ^ (1 + (SA / 2))] * Base Resistance
  206.  
  207. This part of the formula: (1 + (SA / 2), is rounded up.
  208.  
  209. Resistance Cap = A - Base Resistance
  210.  
  211. The end result is rounded down. Accumulative Resistance cannot be greater than the Resistance Cap at any point.
  212.  
  213. If a player unit dies, then their Accumualative Resistance and Resistance Cap is set back to 0.
  214.  
  215. Ailment Recovery
  216. ================
  217. rLUC = recovering character's LUC
  218. etLUC = average LUC of the opposing team
  219.  
  220. T = Total times ailment recovery has failed.
  221.  
  222. A = sqrt[(rLUC + 20) / (etLUC + 20)] * 10
  223.  
  224. If A <= 5, B = (5 + (T * 7.5))
  225. If A > 5 and <= 20, (B = (10 + (T * 15)) * A / 10)
  226. If A > 20, B = (20 + (T * 30))
  227.  
  228. If T = 0, then B = 0
  229.  
  230. 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.
  231.  
  232. If B < 0, then B = 0
  233. If B > 80, then B = 80
  234.  
  235. If T >= 4, then B = 100
  236.  
  237. Certain flags are set within some enemy AI scripts (mostly bosses) that cap the duration of a specific ailments to a shorter value. If those duration the ailment was active for matches the duration set by those flags, then B = 100.
  238.  
  239. If the Nest and Mushroom Soup is active and the involved units are party units, then if T >= 2, then B = 100.
  240.  
  241. If the Dangerous Flowering Tea is active and the involved units are enemy units, then if T >= 2, then B = 0.
  242.  
  243. Roll a number between 0 and 99. If that number is less or equal to B, recover from the ailment.
  244.  
  245. (During this calculation, a random number between 0 and 10 is generated. This number is never used, but it advances the RNG.)
  246.  
  247. Poison Damage
  248. =============
  249. RNG1 + [(RNG2 + (Base Poison Damage + (Level / 6))) * (1 + (Level / 100))]
  250.  
  251. RNG1: A random number from 0 to 5.
  252. RNG2: A random number from 0 to 5.
  253.  
  254. If the Butterfly Tsukudani is active, enemies will take double the amount of poison damage.
  255.  
  256. Healing
  257. =======
  258. [(Healing Power * (VIT + (2 * TEC)) / 180) + (Healing Power / 6) + (((sqrt(Healing Power) * ((VIT + (2 * TEC)) ^ 2) / 13500)] * Healing Mastery * Difficulty Factor + RNG
  259.  
  260. RNG: A random number from 0 to 5.
  261. Difficulty Factor for players is 1 on Expert and Standard. On Picnic, this increases to 3. For enemies, this is always 1.
  262.  
  263. Speed
  264. =====
  265. [(Equipment Speed Mod + 100) * AGI * Skill Speed Mod * Random number between 90 and 110 / 10000] * Modifiers
  266.  
  267. 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):
  268.  
  269. Weapons:
  270. Swords: 0
  271. Axes: -5
  272. Staves: -5
  273. Katanas: 5
  274. Bows: 0
  275. Whips: 5
  276. Guns: -5
  277. Spears: 0
  278.  
  279. Equipment:
  280. Heavy Armor: -10
  281. Light Armor: 0
  282. Clothes: 5
  283. Helmets: 0
  284. Gloves: 5
  285. Boots: 10
  286. Shields: -5
  287. Accessories: 0
  288.  
  289. When a rare breed acts, their AGI is multiplied by 10.
  290.  
  291. Force Gain
  292. ==========
  293. minF = Minimum force. This is 5 in all cases.
  294. maxF = Maximum force. This is 15 in all cases.
  295. SFU = Skill Force Up
  296. GFU = Gear Force Up
  297.  
  298. minF = minF + (SFU * 0.1)
  299. maxF = maxF + (SFU * 0.05)
  300.  
  301. Then,
  302.  
  303. minF = minF + (GFU * 0.1)
  304. maxF = maxF + (GFU * 0.05)
  305.  
  306. These values are rounded down to the nearest whole number.
  307.  
  308. Party members always start off with their Force Gauges set to 100 when they're in town and they are repaired and set to that every time they leave the Labyrinth.
  309.  
  310. When using a Force Boost, Force cannot be gained during its effects. After a Force Boost ends, 100 is subtracted from the Force Gauge.
  311.  
  312. Roll a random number between minF and maxF. This value is the amount of force you gain this turn.
  313.  
  314. When an ally dies, all remaining allies receive a force roll and the dead ally loses half their current force.
  315.  
  316. Axcelas simply add 10 to your current force.
  317.  
  318. Additionally, at the end of combat, each character rolls for force again.
  319.  
  320. Then, after the end of combat roll, characters get a further amount of force based on ???. It always seems to be within the 5-15 range, though...
  321.  
  322. Absorb and Force Reset add a static amount to your force gauge.
  323.  
  324. If the Autumn Pot-au-feu is active, the party will gain 10 force for every 10 steps they take in the Labyrinth.
  325.  
  326. If the Nozuchi Soup is active and a party member is inflicted with any disable, 20 is added to their force gauge at the end of the turn. Multiple disables do not increase the amount gained.
  327.  
  328. Force Charge applies a multiplier to force gained.
  329.  
  330. Limit Break increases the maximum size of the force gauge up to 200. However if the force meter is at a value above 100 when a battle ends, it is set to 100 instead.
  331.  
  332. When a Force Break is used, the Force Gauge breaks, setting force to 0 and makes force skills completely unusable until you leave the Labyrinth.
  333.  
  334. If the Court Haute Cuisine is active, then any broken Force Gauges have a 10% chance of being repaired after a battle ends.
  335.  
  336. Preemptives
  337. ===========
  338. A = [((Party's Average AGI * 2) + Party's Average LUC + 20) * 10] / [Enemy's Average AGI + (Enemy's Average LUC * 2) + 20]
  339.  
  340. If A <= 2, B = 12
  341. If A >= 50, B = 300
  342. Else, B = A * 6
  343.  
  344. Final Preemptive Chance = B * Difficulty Factor
  345.  
  346. Difficulty Factor is 1 on Expert and Standard, and 2 on Picnic.
  347.  
  348. 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 Sneak Attack's preemptive chance. If that number is lower than Sneak Attack's value, the preemptive is successful. Otherwise, move onto the blindside check.
  349.  
  350. Blindsides
  351. ==========
  352. A = [((Enemy's Average AGI * 2) + Enemy's Average LUC + 20) * 10] / [Party's Average AGI + (Party's Average LUC * 2) + 20]
  353.  
  354. If A <= 2, B = 8
  355. If A >= 50, B = 200
  356. Else, B = A * 4
  357.  
  358. Final Blindside Chance = B * Difficulty Factor
  359.  
  360. Difficulty Factor is 1 on Expert and Standard, and 0.2 on Picnic.
  361.  
  362. Then, check B against the value that was previously rolled to check whether Risk Perception 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.
  363.  
  364. Escape Rate
  365. ===========
  366.  
  367. Gathering (INCOMPLETE)
  368. =========
  369. Rare items can only be obtained during extra gathering attempts enabled by the gathering skills. During those attempts, the rare item's chance is rolled for first. If the skill is not learned or the chance to obtain the rare item fails, the game rolls for the uncommon item chance. If the uncommon item is not obtained, the common item is obtained instead.
  370.  
  371. S = Get the gathering skill level. If Fanged Sandwich is active, this value for Chop, Take, Mine, and Natural Instinct is increased by 1. If the Yggdrasil Bud Tea is active, this value is increased by 3.
  372. R = Roll a random number between 0 and S^2.
  373. C = (S + 0.5) - sqrt(R)
  374. C, rounded down, is the number of extra items you find.
  375.  
  376. For the base item gather chance, run this code:
  377. Roll a number between 0 and 99. If Result <= UncommonChance, get an uncommon item. Otherwise, get a common item.
  378.  
  379. For each extra item found through gathering skills, run this code:
  380. Roll a number between 0 and 99. If Result <= RareChance, get a rare item. If you didn't get a rare item, roll another number between 0 and 99. If Result <= UncommonChance, get an uncommon item. Otherwise, get a common item.
  381.  
  382. Ingredients:
  383.  
  384. R1 = Roll a number between [0x23] and [0x24] of the ingredient table.
  385. R2 = Roll a number between [0x25] and [0x26] of the ingredient table.
  386. A = R1 * UnknownValue1
  387. B = R2 + (A / 100)
  388.  
  389. If (ingredient food) is active, (divide the food value by 100 and then multiply it with B)
  390.  
  391. The number of ingredients you get is B.
  392.  
  393. Grimoire Chances
  394. ================
  395.  
  396. Grimoire Creation
  397. =================
  398.  
  399. Regional Differences
  400. ====================
  401. This is one of the few Etrian Odyssey games where the Japanese and international versions have signficiant gameplay differences in places.
  402.  
  403. Multiple uses of the Sovereign Circles do not stack in the international versions. Only one circle will take effect.
  404.  
  405. The Strawberry Daifuku doubles the damage of attack items in the international versions, instead of tripling them like in the Japanese version. (The food's description incorrectly states the damage is tripled in the international versions.)
Advertisement
Add Comment
Please, Sign In to add comment