# Loop Odyssey: Mechanics & Formulas Guide (How Mechanic Works)

This guide aims to explore how every single mechanic in the game works, and how they interact with each other.

As we are discussing all of the mechanics, this guide will have some early spoilers on how the mechanics themselves work at the beginning, and an info dump with spoilers for the full game at the end.

### Familiarity

Familiarity reduces the mana cost to repeat actions.
Each tile on the game has a familiarity level for each of the allowed actions on that tile (move, interact, speak, attack). Movement depend on the cost and familiarity of the tile you are leaving, andEach time an action is completed, familiarity xp is awarded. The amount of familiarity xp awarded each time is random between 14 and 26, which is tripled if this is the first time the action was completed this loop, and is multiplied by 7 if the player has a certain late game buff.

Technically, the random range is calculated by round(20 * random_range(0.7, 1.3)), which makes the two outside values slightly less common. This rounding effect is negligible.

The familiarity xp cost per level is calculated by:

150 * ( 1 + (currentlLevel * 0.1 ) )

So the overall xp requirement for a particular level is:

(15/2) * currentLevel * (currentLevel + 21)

And the level for a particular xp amount is:

floor(-(21/2)+(sqrt(8*xp+6615))/(2*sqrt(15)))

Once we have the familiarity level for a tile, the cost reduction is calculated by:

pow(1+familiarityLvl/20,0.8)

### Ticks and speed

Ticks are the smallest amount of time that the game calculates. Each tic, the game will try to advance by how many mana points the “Mana spent per tick” indicates, at the absolute top right of the screen.

How to increase “Mana spent per tick” (from now on simply speed):

There are two main ways that it is possible to increase speed:
Hearth levels. Hearth levels give 0.3 speed each, added to the base 1 speed.
Bonus time. Bonus time simply multiplies speed by 3 while it is on.

So, for example:
For an action that takes 10 mana, and a speed of 1, the action will take 10 ticks, and consume 10 mana
For an action that takes 10 mana, and a speed of 4, the action will take 3 ticks, and consume 10 mana (the 2 overflowing mana that were spent on tick 3 are refunded)

This means that having extra hearth levels will simply make the loops go faster, without affecting any other costs (although adding points into hearth means less points into spirit or body).

### Combat

(All stats taken from critters)
Each combat has a base mana cost, damage and attack speed
The cost gets reduced by familiarity and by the attack of the player.For example, if a combat has 1000 base cost, familiarity of 10, and you have an attack of 5:

```Cost = baseCost / (  (1+(familiarity/20))^0.8 * attack )
Cost = 1000 / ( 1.38 * 5 ) = 145```

So the combat will cost 145 mana to complete

The enemy has an attack of 1 and a attack speed of 75, which means that it will attack every 75/1.5=50 mana (it is just divided as a balance tweak, literally).
So the player will take damage once, and would take damage again at 150 mana, but avoid next attack. As the damage is 1, the player takes 1 point of damage (half a hearth).
Defense would reduce this damage.

In practice, the combat calculations are also calculated with ticks.
With a speed of 4 (10 hearth) the combat would look like this:

```tick  1: EAT =  4, RC = 141 //EAT = EnemyAttackTimer
tick  2: EAT =  8, RC = 137 //RC = RemainingCost
...
tick  9: EAT = 52, RC = 93 //EAT -> 0, take damage
tick 10: EAT = 4, RC = 89
...
tick 26: EAT = 52, RC = 45 //EAT -> 0, take damage
tick 27: EAT = 4, RC = 41
...
tick 31: EAT = 44, RC = -1 //Combat complete```

As the enemy attack timer gets reset to 0 each time, some speeds end up with lower attacks received depending on the rounding involved. This is probably a bug and should get fixed in the future.

Defense

Defense consists of three parameters:
Amount (directly from shield)
Efficiency (a combination of body levels and the defense efficiency skill)
Parry (from the defense parrying skill)

Each time the player would take damage, if there is some defense remaining:
Convert part of that damage, depending on defense efficiency, into defense damage, the rest gets through as normal damage.
For the defense damage taken, reduce that damage by the parry.
Finally, reduce the remaining defense by the defense damage.

As an example, with 2 defense, 75% efficiency and 50% parry, and enemy dealing 1 damage:

```take 0.25 damage, take 0.375 defense damage, 1.625 defense remaining
take 0.25 damage, take 0.375 defense damage, 1.250 defense remaining
take 0.25 damage, take 0.375 defense damage, 0.875 defense remaining
take 0.25 damage, take 0.375 defense damage, 0.500 defense remaining
take 0.25 damage, take 0.375 defense damage, 0.125 defense remaining
take 0.25 damage, take 0.375 defense damage, no defense remaining
take 1 damage
take 1 damage
...```

In practice, for a fight that consumes all of the player’s defense, the effect of defense is a plain reduction in total damage taken.

Defense / ( 1 – parry )

### Unlocks for speaking

Speaking unlocks show in the storybook, and are simply based on the familiarity of the speaking action. The storybook will show the number of interactions the player did to obtain the unlock, but the exact number will vary from player to player, as familiarity gain varies randomly and whether it is the first time the action was done in the loop.

The familiarity level required for each unlock is listed at the end.

### Permanent progress tiles

Some tiles have permanent progression. This progression can be one of two ways:

By familiarity. The sewers simply require a familiarity level of 20 to explore completely.

By repeat count. The maps require 100 interactions to be completely read.

### Game stats (spoilers)

Unlocks (from speaking)

Numbers in bold mean a buff is received here
Old man: 0, 1, 8, 16, 20, 25, 32, 35, 41, 47, 52, 56
Fisherman: 0, 2, 6, 11, 15, 20, 24, 32, 36, 41, 47, 52
Samurai: 0, 1, 6, 10, 12, 19, 25, 31, 36, 42, 48, 54
Drunk Guards: 0, 1, 10, 15, 20, 26, 30, 3442, 47, 53
Priest: 0, 2, 7, 12, 17, 24, 28, 32, 37, 43, 46, 50, 55
Blacksmith: 0, 3, 10, 15, 21, 25, 32, 37, 43, 48, 55
Caporal: 0, 3, 10, 16, 21, 25, 31, 36, 41, 46, 52
Necromancer: 0, 4, 10, 16, 21, 27, 32, 38, 43, 48, 53
Firefly queen: 0, 3, 11, 16, 21, 26, 31, 36, 4151
Chancellor: 0, 4, 11, 15, 21, 26, 31, 36, 4250

Shops: 1020304050 (shops simply reduce their cost in 1 each time)
Sewer: 20 (this one is by interacting, not speaking)

Combat stats
Name
Attack
AttackSpeed
ManaCost
Exp
Affinity
Drop
Drop price
Rat
1
75
100
150
Rat
Rat
0.2
Critter
1
75
1000
1000
Critter
Critter tail
1
Beast
2
70
7500
7000
Beast
Tooth
15
Were-critter
1.5
75
4000
3000
Critter
Critter tail
1
Hydra
2
75
20000
7000
Villager
1.5
75
3000
3500
Villager
Hat
15
Fire Bat
2
75
3000
2000 + 50 spirit
Old man
3
80
4000
5000 + 20 Body
15 coins
Fisherman
3
75
6000
50 Body
20 coins
Samurai
3
75
10000
100 Body
Samurai blood
Drunk guards
4
75
20000
120 Body
20 coins
Priest
4
70
3000
4000 + 50 Body
2 small mana potion
Blacksmith
10
120
35000
200 Body
2 health potions
Caporal 1
0.5
70
7000
200 + 5 Parry
Caporal 2
1
70
13000
400 + 20 Parry
Caporal 3
1.5
70
30000
800 + 80 Parry
Caporal 4
2
70
45000
1600 + 400 Parry
Caporal blood
Necromancer
3
75
35000
120 Body
Necromancer blood
Firefly Queen
2
75
30000
400 Spirit
Firefly queen blood
Chancellor
3
75
20000
120 Body
Chancellor’s Assasin
1.3
75
15000
0
10 coins
Demon
3
90
100000
30000
Altar
0.01
12000
75
0
Fence
0.01
12000
400
200
Bat
0.01
12000
300
150
Bat
Firefly
0.01
12000
250
1 spirit
Crystal
1
3000000
600000
0

Thanks to daniferrito for his great guide, all credit to his effort. you can also read the original guide from Steam Community. enjoy the game.