Lords of Xulima

Lords of Xulima

Not enough ratings
*UNFINISHED* Game Mechanics Lords of Xulima
By peddroelm
Various formulas : chance to hit, chance to apply effect, damage calculations, spell cast fail calculations, UI lying skills (flaming and frost arrow ), shuriken mechanics etc ..
Turn order (combat initiative and speed ) explanation
   
Award
Favorite
Favorited
Unfavorite
Primary Attributes
Only the playing 'characters' have based attribute stats (STR, CON, AGI, SPD, ENE) boostable via leveling up, equipment and deity blessings, used to calculate the derived stats ( Armor, Attack Rating, Physical Damage, Evasion, Defense, Combat Initiative, Combat Speed. ). Monsters (enemies) can't wear equipment to boost the base attributes, the don't even have base attribute stats .. they only have the derived stats Armor, Attack Rating, Physical Damage, Evasion, Defense, Combat Initiative, Combat Speed, basic and special resists , etc.. I provide the formulas for the derived stats in their particular guide subsection .

Strength STR
- adds bonus damage to physical based attacks (damage + = (STR - 10 ) / 2 + (STR - 8 ) / 2 // STR > 10)
- used as requirement stat for equipping weapons
- added to armor carrying capacity

Constitution CON
- adds hitpoints ( MaxHP += 20 + (Con -10) * 4 // CON > 10 )
- adds party inventory carrying capacity

Agility AGI
- adds attack rating stat for chance to hit with physical attacks, also improtant for calculating the 'attack factor' parameter which dictates damage and special effect application reduction due to INSUFICIENT attack score.
- adds to character's Armor stat
- used as requirement stat for equipping weapons
- reduces chance of spell casting failure when aflicted by a negative action modifer. (from wounds, curses and/or other sources ..)

Speed SPD
- adds to combat initiaive stat (primarly it dictates the combat action queue order on combat start)
- adds to combat speed stat ( dictates time of recovery between combat actions - can reduce their base cost)
- adds to evasion stat (chance to avoid physical attacks when not diabled via spacial effect)

Energy ENE
- adds to the character's Power Point PP total += 10 + ( ENE - 10 ) * 2 . // ENE > 10
- sort of the dump stat of LOX
Character's MaxHP formula
Hardcore progression class table for MaxHP

Barbarian 4.2
Sodier 2.8
Explorer 2.45
Thief 2.45
Arcane Soldier 2.1
Paladin 2.1
Bard 2.1
Cleric 1.4
Mage 1.225
Divine Summoner 0.7

MaxHP = ( 20 + (CON - 10) * 4 + HP_Progression(Class, Difficulty) * Level +[O]BodyBuilding_Skill * 4 + [O] EXTRA' ) * (1 + [O]0.05% Nalaet Disciple)

extra' is from herbs and other 1 time permanent MaxHP boosts.

Health points can be recovered

- out of combat instantly at healer (gold cost but often worth it to save gold for ), via resting not at inn (costs game time and food), via resting at inn (costs game time and gold), via healing spells/scrolls/consumables (costs PPs or consumables and regen spells don't work out of combat)

- during combat, via healing/regen spells/scrolls/consumables (costs PPs or consumables ).
Of Special NOTE cleric/Paladin divine prayer skill can HEAL THE FULL PARTY back to full AS LONG AS ONE CAN keep a weak enemy alive indefinetly ..

Hitpoint maximum is important on high difficulty - there is no combat ressurection ability - ALL CHARATERS MUST BE ABLE TO SURVIVE DAMAGE SPIKE AND BE ABLE TO RECEIVE HEALING AFTER (or leave the battlefield if death is unvoidably imminent)..

Kersket's Blessing is pretty much mandatory for the frailer classes before most fights on the early levels until enough MaxHP buffer is accumulated via CON stacking and character Level ups.
Character's MaxPP Formula
Hardcore progression class table for MaxPP

Divine Summoner 2.8
Mage 2.275
Cleric 2.1
Arcane Soldier 1.4
Paladin 1.4
Bard 1.4
Explorer 1.05
Thief 1.05
Sodier 0.7
Barbarian 0

MaxHP = 10 + (EN - 10) * 2 + PP_Progression(Class, Difficulty) * Level + [O]Meditation_Skill * 2 +
[O]Alanet's Blessing + [O]Sum(+MaxPP from equipment) + [O]EXTRA' ) * (1 + [O]0.05% Alnaet Disciple)

extra* is from herbs and other 1 time permanent MaxPP boosts.

Power points can be recovered

- out of combat instantly at healer (gold cost), via resting not at inn (costs game time and food), via resting at inn (costs game time and gold), via consumables.

- during combat via consumables or cleric/Paladin divine prayer skill can HEAL THE FULL PARTY back to full AS LONG AS ONE CAN keep a weak enemy alive indefinetly .. Mage gets the ability to drain PPs from capable donor enemies (I will test BUT I'm pretty certain a resitance roll is involved)

+MaxPP gear (and Alanet's blessing) is a GREAT way to 'power up' classes that benefit from 'burning' PPs early (fighter, arcane archer, cleric, mage, divine summoner, bard, explorer (camoflage skill)..)
Order of Operations for Physical based Attacks
Attacker rolls D100 to crit fail, threaten hit , or crit fail. In case of non crit fails and not evaded by target it controls the RNG component of the inflicted physical damage.

If Attacker didn't fumble target rolls to evade ( see chance to evade above) . If evade fails we go to damage application (physical and on weapon on strike bleed, wound , stun effects)

Special attacks modify the attack result to add flame damage and burn DOT effect, cold damage and freeze effect , poison damage and poison DOT effect, (extra) bleed/strun/wound effect (depending on the special melee attack used ..)
Character's Attack Rating Formula
This stat is used to calculate the Attack Factor and the chance to hit (actually it is a chance to evade ; the targets roll D100 to evade for physical attacks against Attacker.AttackRating / ( Attacker.AttackRatting + Target.Evasion ) .

AttackRatting = AGI + WeaponSkillAR (max 200 for shurikens and 150 for all other weapon classes) + [O]OnWeaponAttackModifier + [O]SpecialAbility_AttackBonus* + [O]Sum(ActionModifier) + [O]WeaponMasterSkill * 3 + [O]SongOfClumsiness

- most special weapon attacks (powerful, stunning, bleeding, accurate, wounding, envenomed, frost and flaming strikes) provide various amounts of AR .
- action modfier sources : Bard's Song of Courage, Wounds (-5 per wound), Starving Characters, Curses, etc ..

Character's Evasion Formula
Chance to evade ; to evade for physical attacks the targets roll D100 against Attacker.AttackRating / ( Attacker.AttackRatting + Target.Evasion ) .

Evasion = SPD + [O]Raznet's Blessing + [O]Paladin's Defense Aura [O]Bard's Song Of Spirit + [O]DefendAction(adds AR to evasion) + [O] Curses/Diseases + [O] Febret's Disciple + [O] -2 Per WoundStack

Evasion = ZERO when the character is disabled by effects shuch as (stun, frozen,
Character's Defense Formula
This stat provides damage reduction from incoming physical attacks, provided that the Attackers's Attack Ratting < 3.71 * target's.Defense.

Defense = AGI + [O]Sum[defense stat on equipped gear] + [O]Blessing of Raznet + [O]Beeing Frozen + [O]Paladin'sDefensiveAura + [O] Cleric/Paladin's (Mass)Divine Armor Spell + [O] + [O]MageBrittleArmorSpell + [O]Bard'sSongOfClumsiness

Physical attacks chance to hit
CTH = Attacker.Attack / (Attacker.Attack + Target.Evasion) .

Will only get to 100% if the target's evasion is 0 (target is disabled via stun/freeze effect or suffers from too many wounds )

More apply named chance to evade for physical attacks the targets roll D100 against Attacker.AttackRating / ( Attacker.AttackRatting + Target.Evasion ) .
Attack factor
For the damage calculation and potency of effects (stun, bleed, wound, frozen, ) applications the game calculates and AttackFactor AF clamped between [0.1 to 1]

0.5 + (Attacker.Attack/Target.Defence -1 ) * 0.25 // if Attacker.Attack > Target.Defence
or
0.5 - (Target.Defence/Attacker.Attack -1 ) * 0.2 // if Target.Defence > Attacker.Attack


AF = 1 is achieved for Attacker.Attack/Target.Defence > 3.71 !! (almost 4 times more attack than defence is required to completly nullify defence effect)
Physical attacks damage calculation
WeaponDamage = (STR - 8 ) /2 + (STR - 10) /5 + Weapon'sDamage stat + [O] PowerfulStrike

( shuriken's weapon damage is listed as +MaxDamage in its skill description) .

AF * CritMultiplier * (1 + (attacker'sdice_roll/100 - 0.5) * 0.3 ) * WeaponDamage

1 + (attacker's_dice_roll/100 - 0.5) * 0.3 // this goes from 0.85 to 1.15 depending on the attacker's dice roll (two dice rolls per attack - attacker rolls d100 for critical fail or crit damage then the target rolls to evade and can evade critical shots).

CritMultiplier is 1.5 if crit, 1 for non crits.

Non modded the attack preview numbers reprezent this range 0.85 * AF * Weapon Damage - 1.15 * AF * WeaponDamage

The maximum damage AF * 1.15 is clamped at 1.


See frost and flaming strike later for their damage calculation..
Flaming and Frozen weapon strike Mechanics
FlamingStrike flame impact and DOT DamageProgression
3 at lvl 1 and 1.5 per lvl
Ex: LVL 30
3 + 1.5 * ( 30 -1) = 46.5

FrostStrike cold impact DamageProgression
6 at lvl 1 and 2 per lvl
Ex: lvl 30 6 + 2 * (30 -1 ) = 64

duration stat for frost strike is based again on weapon used skill value
4 s. wpn lvl 1.5
5 s wpn lvl 6.15
6s wpn lvl 16.25
7s wpn lvl 26-30

The game rolls (considering targets relevant resist) a dice between a min and max damage:

Min = 0.5 * DamageProgression(WeaponSkillLvl) * ( 1 - T.Rezist )
Max = DamageProgression(WeaponSkillLvl) * ( 1 - T.Rezist )

The cold freeze duration is (1 -T.Rezist) * Min ( rolled(Min, Max), duraton )
Shuriken mechanics
for many years I was curious about how the shuriken mechanics work . Even thow it is purerely a physical attack the UI doesn't provide the physical attack cursor CTH, attack factor and physical damage range for it for some dubious reason (I'll try to give it in my extra combat information mod but I'm not very confident I'll be able to) ..

Shuriken's mechanics are quite simple actually - needlesy obfuscated by lack of combat feedback and misleading (english version) UI texts ..

Shuriken behaves exatly as any equipped weapon with the fallowing stats :

3% chance to crit , 0% chance to crit fail {HIDDEN STATS . WHY ?!?}

regular weapons provide +5 attack per skill level up to +150 at skill level 30. Shuriken gets a bit more per skill level up to +200 at skill lvl 30 . { plus to what ? plus to the accuracy from AGI }
Also 2H weapons typically have a on-weapon ATT penaly up to -20, shuriken doen't.

regular weapons display their weapon damage stat on weapon UI. Also displayed on char sheet when equipped as +X damage from weapon. (hover the heart hitpoint damage icon) . Listed as max damage since as shown in my post about the damage formula it can be lowered by the { hidden} attack factor. So 'max damage' is shown as Strength modifier : Y and a Base {equipped regular} weapon damage +X. Why one is shown with '+' and one without doesn't make much sense since they are the same stat and add the same way ..
The shuriken skill lists a Max damage stat .. {what is the min damage confused players might ask ?} .
That +X to Max damage number is in fact the same stat listed as Base {equipped regular} weapon damage +X for the regular weapons.

So yes!, just like regular weapons, shuriken attacks benefit from AGI for chance to hit and damage and from STR for damage. (the equipped regular weapon's stats don't interfere at all with the shuriken stats, in fact one can make shuriken attacks without having a regular weapon equipped) .

Endgame 2H weapons (axe and flail) have 78 damage with -20 accuracy penalty. Shuriken gets 98 damage with +50 accuracy bonus (200 compared to 150 from the relevant 'weapon' skill). And faster action (base) cost at '10' combat seconds. Regular weapons don't cost consumables and depending on the character's class can close the stats gap uising special weapon attacks (powerful, quick, accurate, envenomed, wounding, bloody, stunning, flaming, frost.. strike ) (EDIT some regular weapons also come in enchanted form providing extra small bonus to some stat)
Spell Damage Formula

spell damage = .... RNG

spell damage * = 1- rez
Character's Weight Capacity
STR + ArmorSkill * 4 . Going over capacity provides incremental % penalties to CI and CS.
Character's Combat Initiative Formula
CI = (SPD + [O]TacticsSkill * 2 + [O]'Vibrant' enchantment on the Weapon) * (1 + [O] 0.15 Disciple Raznet + [O]Encumbrance )
Character's Combat Speed Formula
CS = (10 + 0.5 * ( SPD -10 )) * (1 + [O] 0.05 DiscipleTaliet + [O]Bard's Haste Song + [O]Encumbrance + [O]Web.Effect)
Base action Cost 'table'
Action Cost: Base cost in 'combat seconds' for performing various combat actions.

lvl 10 FastStrike 4 // regardless of speed of equipped weapon !!

lvl 8,9 FastStrike 5

combat movement 5 // CombatMovement 5 (great for doubling health regen at the cost of skiping 'half turns'; terrible when aflicted by DOT effects; also great for bleeding out slow enemies in the arena)

lvl 6,7 FastStrike 6

lvl 4,5 FastStrike 7

lvl 2,3 FastStrike 8
Dagger 8 (1H)

lvl 1 FastStrike 9
Short Sword 9 (1H)

Pretty much 10 'combat seconds' for everything (spells, most(?) enemies basic attacks, special weapon attacks(all but quick strike), shuriken throws)
LongSword 10 (1H)
Sabre 10 (1H)
Axe 10 (1H)
BattleHammer 10 (2H)
Wand 10 (2H)
ShortBow 10 (2H)

BastardSword 11 (1H)
Claymore 11 (2H)
Katana 11 (2H)
Flail 11 (2H)
Spear 11 (2H)
LongBow 11 (2H)

BattleAxe 12 (2H)
Halberd 12 (2H)

Crossbow 14 (2H)

Energy Drain (Mage Spell) 20
Combat action queue calculations
CharacterCombatDelay: A (semi-hidden) Stat that witneses how much combat time (not seconds since this of type float for better precision) each character still has to wait until it gets to act in combat. Gets initialized at combat start (dice rolls based on CI), it decreases by 1 (CCD -- ;) with each passing combat second [for the characters that can advance - SLEEPING CHARS ] and is incremented by the CCD += AC * ( Slowest_CS / CS ) after performing a combat action.
A character gets to act in combat when his CCD gets equal or bellow 0. Limited Crowd control effects on target: stuns, freeze is listed in 'combat seconds' added to the CCD.
The in-game queue shows a rounded value of the CCD / estimated CCD for characters but for fights vs many opponents not all participants fit.

THE GAME ROUNDS the CCD costs to INT second values when sorting characters in the combat queue order of action which is why sometime mutiple characters get to act in the same 'combat second'.

Action Cost Normation to the slowers combat speed in prezent in battle: AC * ( Slowest_CS / CS ) means X 'combat seconds' cost actions will actually cost X 'combat seconds' for the slowest combatant while for the others they will be speed up by how much faster they are than the slowest combatant.

INITIAL COMBAT ORDER QUEUE: num = 0; For each combatant in ( Sort all combatants by RNG[0.8 .. 1.2] * CI DESC) { char.CCD = num * SlowestCS * 0.1; num++; }

WHICH MEANS A char1 with char1.CI * 0.8 > char2.CI * 1.2 WILL ALWAYS GET TO ACT BEFORE char2 in combat REGARDLESS OF RNG !!!
(Example want to have guaranteed clean 'exit' vs cursed hounds ? Have Gaulen (lacks 15% Raznet disciple bonus :(( so will typically act last in full raznet party) reach 37.5 CI (37.5 * 0.8) - (25 * 1.2) = 0 . Cursed Hound has 25 CI )

That's IT ! Nice sorted list of all combatants with constant 'combat seconds' gaps between them. WHAT's MISSING ?
The displayed queue also accounts for CCD at AC = 10 'combat seconds' cost. The first (fast) characters will get to act again before the chars at the bottom of the nicely sorted list and will thus 'polute' the otherwise nice constant time delay gaps between queued characters with their second and third 'estimated' actions.



Some Conclusions:
- A char1 with char1.CI * 0.8 > char2.CI * 1.2 WILL ALWAYS GET TO ACT BEFORE char2 in combat REGARDLESS OF RNG !!!
- The faster your party is compared to the enemies - the more effective limited crowdcontrol becomes (you get to 'act' more in the gained time). On the flip side soft crowd control doesn't help you much (but its crippling against you) when the enemies have significant combat initiative and speed advantage ( those pesky early wasps !!! )
- There is no such thing as too much speed (what can be achieved in the game without cheats ..)
Skill table - link to google docs with all skills progression
LOX editor has all the stats
Resistances (Fire ,Frost, Lightning, Organic, Divine, Mental )
Dice rolls vs resists ( debuff application from Bard Songs, on Wpn strike effects, Spells, etc)
Special Resistances to ( stun, wounds, bleed, physical damage)
Trap and secret passage detection dice rolls
(negative action modifier) Spell Cast Dice rolls mechanics
My Extra Combat Information Mod
https://gtm.steamproxy.vip/app/296570/discussions/0/3276824488712728182/


Features:

On Map mode

- added dice roll feedback for ALL perception checks (trap, hidden passage, hidden gold piles)
- added monster level to the random encounter dialog (right click on monster portrait for lvl info)

On Combat mode:

- added ability to pop up log history window in combat (same N shortcut as the out of combat message history)
- altered the combat speed options. (option 2 combat speed is faster than base game 3 and option 3 combat speed is even faster )
- added chance to fail, chance to crit and attack factor to physical attacks targeting cursor
- added damage range prediction to the direct damage spells factoring the "hidden" relevant target's resistance. ( only the direct impact amount )
( I might make an effort in the future and add predictor for DOT burn, bleed, poison , wounds, stun and freeze amounts for physical attacks and spells .. Some abilities are mostly about DOT or afflictions and not direct impact damage)
- added the physical attack targeting cursor to the shuriken ability (it is a physical attack after all )
- added targeting stage for spells/songs targeting all /random groups of enemies to provide them with OnCursor damage/chance to apply / IMMUNITY preview information
- added accurate Base Level and per level gain for the ChanceBased Offensive bard songs descriptions
- added dice roll feedback for the dice to fail/crit and dice to evade for physical attacks
- added dice roll feedback for ALL Resistance checks
- added various stats to the combat log relevant for the action queue mechanics
- added Level and Remaining Acting Delay to Name Field ; Effective Defense, Effective Evasion, Combat Initiative and Combat Speed to Health field ; to the in combat Monster information panel {limited number of characters to work with}
- dumped ALL () monster stats to combat log for the active combatant
- Added "G" indicator on in combat Monster information panel (Front of Monster's Name) for the enemies with essence transmuted into gold by the Golot Herald (Arquino) // had to use pen and paper in combats with many combatants to keep track of it otherwise ..
- still bug until I ever fix it - on cursor weapon damage preview doesn't account for Weapon *1.5 damage Enchantment vs EnemyType and Witches 50% less physical damage reduction
3 Comments
peddroelm  [author] 25 Jan, 2020 @ 10:15pm 
optional - a factor that might or not be there
philosoraptorgames 25 Jan, 2020 @ 2:28pm 
What do the [O]s in your formulas mean?
peddroelm  [author] 15 Jan, 2019 @ 12:00am 
unfinished .. shame for all the information already in not to be 'visible' . might even finish it later