Game mechanics - ampersand55/cddamisc GitHub Wiki

Reality bubble

Most things happening on map only occurs within that's often kalled the reality bubble. It's 132x132 squares centered around the player, or 2.75 overmap squares in either direction.

This includes:

  • Monster movement and actions, such as fungaloids.
  • Fire and environmental effects

Some things that do update outside the reality bubble:

  • Food spoilage
  • Battery chargers

Encumbrance and character modifiers

Encumbrance affects almost every aspect of the game. Each encumbrace on a body part reduces its body part score by 2.5, rounded down, and each body part score reduces one or more limb scores.

Some limb scores have direct impact on the game, such as move speed and night vision, and some are used to calculate charater modifiers, such as dodge or dispersion.

Keeping encumbrace on a body part below 5 usually doesn't reduce its limb score.

Limb scores

By limb score

$$ \begin{aligned} \text{balance} &= 0.7 \times \text{torso} + 0.15 \times \text{left arm} + 0.15 \times \text{right arm} \\ \text{reaction} &= 0.3 \times \text{head} + 0.7 \times \text{eyes} \\ \text{vision} &= \text{eyes} \\ \text{night vis} &= \text{eyes} \\ \text{breathing} &= \text{mouth} \\ \text{manip} &= 0.05 \times \text{mouth} + 0.1 \times \text{left arm} + 0.1 \times \text{right arm} + 0.5 \times \text{left hand} + 0.5 \times \text{right hand} + 0.1 \times \text{left leg} + 0.1 \times \text{right leg} + 0.1 \times \text{left foot} + 0.1 \times \text{right foot} \\ \text{consume liquid} &= \text{mouth} \\ \text{consume solid} &= \text{mouth} \\ \text{lift} &= 0.5 \times \text{left arm} + 0.5 \times \text{right arm} \\ \text{block} &= \text{left arm} + \text{right arm} + \text{left leg} + \text{right leg} \\ \text{swim} &= 0.1 \times \text{left arm} + 0.1 \times \text{right arm} + 0.15 \times \text{left hand} + 0.15 \times \text{right hand} + 0.15 \times \text{left leg} + 0.15 \times \text{right leg} + 0.1 \times \text{left foot} + 0.1 \times \text{right foot} \\ \text{crawl} &= 0.3 \times \text{left arm} + 0.3 \times \text{right arm} + 0.2 \times \text{left leg} + 0.2 \times \text{right leg} \\ \text{grip} &= 0.5 \times \text{left hand} + 0.5 \times \text{right hand} \\ \text{move speed} &= 0.5 \times \text{left leg} + 0.5 \times \text{right leg} \\ \text{footing} &= 0.5 \times \text{left foot} + 0.5 \times \text{right foot} \\ \end{aligned} $$

By body part score

$$ \begin{aligned} \text{torso limb scores } &0.7 \times \text{balance} \\ \text{big head limb scores } &0.3 \times \text{reaction} \\ \text{head limb scores } &0.3 \times \text{reaction} \\ \text{eyes limb scores } &\text{vision} \\ &\text{night vis} \\ &0.7 \times \text{reaction} \\ \text{mouth limb scores } &\text{breathing} \\ &0.05 \times \text{manip} \\ &\text{consume liquid} \\ &\text{consume solid} \\ \text{left arm limb scores } &0.1 \times \text{manip} \\ &0.5 \times \text{lift} \\ &0.15 \times \text{balance} \\ &\text{block} \\ &0.1 \times \text{swim} \\ &0.3 \times \text{crawl} \\ \text{right arm limb scores } &0.1 \times \text{manip} \\ &0.5 \times \text{lift} \\ &0.15 \times \text{balance} \\ &\text{block} \\ &0.1 \times \text{swim} \\ &0.3 \times \text{crawl} \\ \text{left hand limb scores } &0.5 \times \text{grip} \\ &0.5 \times \text{manip} \\ &0.15 \times \text{swim} \\ \text{right hand limb scores } &0.5 \times \text{grip} \\ &0.5 \times \text{manip} \\ &0.15 \times \text{swim} \\ \text{left leg limb scores } &0.1 \times \text{manip} \\ &0.5 \times \text{move speed} \\ &0.15 \times \text{swim} \\ &\text{block} \\ &0.2 \times \text{crawl} \\ \text{right leg limb scores } &0.1 \times \text{manip} \\ &0.5 \times \text{move speed} \\ &0.15 \times \text{swim} \\ &\text{block} \\ &0.2 \times \text{crawl} \\ \text{left foot limb scores } &0.1 \times \text{manip} \\ &0.5 \times \text{footing} \\ &0.1 \times \text{swim} \\ \text{right foot limb scores } &0.1 \times \text{manip} \\ &0.5 \times \text{footing} \\ &0.1 \times \text{swim} \\ \text{debug tail limb scores } &0.5 \times \text{manip} \\ &\text{balance} \\ &0.15 \times \text{swim} \\ &2 \times \text{lift} \\ &5 \times \text{block} \\ &10 \times \text{consume solid} \\ \end{aligned} $$

Character modifiers

$$ \begin{aligned} \text{Aim speed skill modifier} &= (built in) \\ \text{Aim speed dexterity modifier} &= (built in) \\ \text{Gun aim speed modifier} &=0.2 \times \text{grip} + 0.2 \times \text{manip} + 0.6 \times \text{lift} \\ \text{Consume time multiplier for solid foods} &={ 1 \over \text{consume solid} } \\ \text{Consume time multiplier for drinks} &={ 1 \over \text{consume liquid} } \\ \text{Melee and thrown attack movement point modifier} &={ 1 \over \text{lift} } \\ \text{Melee and thrown attack movement point modifier} &={ 1 \over \text{balance} } \\ \text{Melee stamina cost} &={ 1 \over \text{lift} } \\ \text{Reloading movement point cost} &={ 1 \over \text{manip} } \\ \text{Dexterity when throwing items} &=\text{manip} \\ \text{Hand dispersion when using ranged attacks} &={ 22.8 \over \text{manip} } \\ \text{Sight dispersion when using ranged attacks} &={ 30 \over \text{vision} } \\ \text{Move mode move cost modifier} &= (built in) \\ \text{Grab break success modifier} &=\text{balance} \times 2 \times \text{lift} \times \text{move speed} \times \text{grip} \\ \text{Stamina move cost modifier} &= (built in) \\ \text{Stamina Regeneration} &=\text{breathing} \\ \text{Crawl speed move cost modifier} &={ 1.2 \over \text{crawl} } \\ \text{Limb speed move cost modifier} &={ 1 \over \text{move speed} } \\ \text{Footing move cost modifier} &={ 1 \over \text{footing} } \\ \text{Fall damage modifier} &=\text{move speed} \times \text{footing} \times \text{reaction} \\ \text{Slip prevention modifier} &={ 3 \times \text{grip} + 2 \times \text{lift} + \text{footing} \over 6 } \\ \text{Obstacle climb modifier} &={ 3 \times \text{crawl} + 2 \times \text{grip} + \text{lift} \over 6 } \\ \text{Maximum bleed intensity staunchable by hand} &=\text{grip} \times \text{manip} \\ \text{Strength modifier} &=\text{lift} \\ \text{Limb run cost modifier} &= (built in) \\ \text{Swimming movement point cost} &={ 1 \over \text{swim} } \\ \text{Melee attack rolls} &=\text{balance} \\ \text{Dodge chance modifier} &=1.5 \times \text{balance} \times \text{move speed} \times \text{footing} \\ \end{aligned} $$

Damage and DPS

Attack speed

Weapon move cost

$$65 + {\text{volume} \over 62.5} + {\text{weight} \over 60}$$

With volume in mililiters and weight in gram.

Base move cost

$$\text{base move cost}={\text{weapon movecost} \over 2}$$

Total movecost

$$ \begin{aligned} \text{total movecost} = &\\ \text{base move cost} & \times \text{ }(1 + ({1 \over 4} - \text{stamina ratio} \times 4)) \\ &+ \text{ base move cost} \times {(15 - \text{melee skill}) \over 15} \\ &-{\text{dexterity} \over 2} \end{aligned} $$

(more to be updated)

Dogdge and hit chance

Dodge is the absolut best defensive stat for melee combat. It's almost never worth it to get above 5-10 encumbrance in the start of the game, the extra dodge is better than most armors.

The dodge chance follows a cumulative normal distribution with the mean being $\text{dodge}-\text{attack}$ and the standard deviation being $2.5$. So if a regular zombie with 4 attack attacks you and you have 6 dodge skill you have a 78.81% chance to dodge the attack, barring any other modifiers.

Dodge chance table

Dodge \ Attack 0 1 2 3 4 5 6 7 8 9 10
0 50.00% 34.46% 21.19% 11.51% 5.48% 2.28% 0.82% 0.26% 0.07% 0.02% 0.00%
0.5 57.93% 42.07% 27.43% 15.87% 8.08% 3.59% 1.39% 0.47% 0.13% 0.03% 0.01%
1 65.54% 50.00% 34.46% 21.19% 11.51% 5.48% 2.28% 0.82% 0.26% 0.07% 0.02%
1.5 72.57% 57.93% 42.07% 27.43% 15.87% 8.08% 3.59% 1.39% 0.47% 0.13% 0.03%
2 78.81% 65.54% 50.00% 34.46% 21.19% 11.51% 5.48% 2.28% 0.82% 0.26% 0.07%
2.5 84.13% 72.57% 57.93% 42.07% 27.43% 15.87% 8.08% 3.59% 1.39% 0.47% 0.13%
3 88.49% 78.81% 65.54% 50.00% 34.46% 21.19% 11.51% 5.48% 2.28% 0.82% 0.26%
3.5 91.92% 84.13% 72.57% 57.93% 42.07% 27.43% 15.87% 8.08% 3.59% 1.39% 0.47%
4 94.52% 88.49% 78.81% 65.54% 50.00% 34.46% 21.19% 11.51% 5.48% 2.28% 0.82%
4.5 96.41% 91.92% 84.13% 72.57% 57.93% 42.07% 27.43% 15.87% 8.08% 3.59% 1.39%
5 97.72% 94.52% 88.49% 78.81% 65.54% 50.00% 34.46% 21.19% 11.51% 5.48% 2.28%
5.5 98.61% 96.41% 91.92% 84.13% 72.57% 57.93% 42.07% 27.43% 15.87% 8.08% 3.59%
6 99.18% 97.72% 94.52% 88.49% 78.81% 65.54% 50.00% 34.46% 21.19% 11.51% 5.48%
6.5 99.53% 98.61% 96.41% 91.92% 84.13% 72.57% 57.93% 42.07% 27.43% 15.87% 8.08%
7 99.74% 99.18% 97.72% 94.52% 88.49% 78.81% 65.54% 50.00% 34.46% 21.19% 11.51%
7.5 99.87% 99.53% 98.61% 96.41% 91.92% 84.13% 72.57% 57.93% 42.07% 27.43% 15.87%
8 99.93% 99.74% 99.18% 97.72% 94.52% 88.49% 78.81% 65.54% 50.00% 34.46% 21.19%
8.5 99.97% 99.87% 99.53% 98.61% 96.41% 91.92% 84.13% 72.57% 57.93% 42.07% 27.43%
9 99.98% 99.93% 99.74% 99.18% 97.72% 94.52% 88.49% 78.81% 65.54% 50.00% 34.46%
9.5 99.99% 99.97% 99.87% 99.53% 98.61% 96.41% 91.92% 84.13% 72.57% 57.93% 42.07%
10 100.00% 99.98% 99.93% 99.74% 99.18% 97.72% 94.52% 88.49% 78.81% 65.54% 50.00%
10.5 100.00% 99.99% 99.97% 99.87% 99.53% 98.61% 96.41% 91.92% 84.13% 72.57% 57.93%
11 100.00% 100.00% 99.98% 99.93% 99.74% 99.18% 97.72% 94.52% 88.49% 78.81% 65.54%
11.5 100.00% 100.00% 99.99% 99.97% 99.87% 99.53% 98.61% 96.41% 91.92% 84.13% 72.57%
12 100.00% 100.00% 100.00% 99.98% 99.93% 99.74% 99.18% 97.72% 94.52% 88.49% 78.81%
12.5 100.00% 100.00% 100.00% 99.99% 99.97% 99.87% 99.53% 98.61% 96.41% 91.92% 84.13%
13 100.00% 100.00% 100.00% 100.00% 99.98% 99.93% 99.74% 99.18% 97.72% 94.52% 88.49%
13.5 100.00% 100.00% 100.00% 100.00% 99.99% 99.97% 99.87% 99.53% 98.61% 96.41% 91.92%
14 100.00% 100.00% 100.00% 100.00% 100.00% 99.98% 99.93% 99.74% 99.18% 97.72% 94.52%
14.5 100.00% 100.00% 100.00% 100.00% 100.00% 99.99% 99.97% 99.87% 99.53% 98.61% 96.41%
15 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 99.98% 99.93% 99.74% 99.18% 97.72%
15.5 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 99.99% 99.97% 99.87% 99.53% 98.61%
16 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 100.00% 99.98% 99.93% 99.74% 99.18%

Modifiers

Some positive dodge modifiers:

  • Dexterity / 2
  • Fast reflexes (+3)
  • Mutations that make you smaller
  • Positive status effects, for example:
    • Happy
    • Stimulants

Some negative dodge modifiers:

  • Not having 100% stamina
  • Being trapped
  • Being on roller skates
  • Mutations that make you larger
  • Negative status effects, for example:
    • Grabbed (-10)
    • Pain
    • Tired
    • Hungry
    • Sad
    • Depressants
  • Encumbrance:
    • Arm (minimal impact)
    • Head (small impact)
    • Torso encumbrance (medium impact)
    • Leg encumbrance (medium impact)
    • Foot encumbrance (high impact)
    • Eye encumbrance (highest impact)
    • Also see Dodge chance modifier undner Character modifiers

Bionic installation chance

Your adjusted_skill (bionic install skill) is calculated as:

With autodoc:

$$4 \times \text{intelligence} + 4 \times \text{healthcare} + 3 \times \text{computer} + \text{electronics}$$

Without autodoc

$$4 \times \text{Intelligence} + 4 \times \text{electronics} + 3 \times \text{healthcare} + \text{mechanics}$$

Your adjusted_skill is:

$$\begin{aligned} & +3 \text{ if you have medical professional background} \\ & +7 \text{ if you have autodoc background} \\ & +30 \text{ if you have a nurse bot} \\ & -40 \% \text{ if you are using a salvaged autodoc} \\ \end{aligned} $$

The skill_difficulty_parameter (operation difficulty) is:

$$\text{Adjusted skill} \over 4 \times \text{CBM difficulty}$$

Your chance_of_success of operation is:

$$\text{Skill difficulty parameter} \over \text{Skill difficulty parameter} + \sqrt{1 \over \text{skill difficulty parameter}}$$

Example

Lets say you have 8 intelligence, 3 healthcare, 3 computer, 4 electronics and want to install a finger lighter at an autodoc with a nursebot:

Your adjusted_skill is:

$$4 \times 8 + 4 \times 3 + 3 \times 3 + 4 + 30 = 87$$

The skill_difficulty_parameter is:

$${87 \over 4 \times 4} = 5.4375$$

The finger lighter CBM has 4 difficulty.

Your total chance_of_success is:

$$100 \times {5.4375 \over 5.4375+ 1 \div \sqrt{5.4375}} = 92.89 \%$$

Which is the same as

$$1 - 92.89 \% = 7.31 \% \text{ risk of failiure}$$

External

⚠️ **GitHub.com Fallback** ⚠️