The Codex

Wiki - Mechanics & Calculations

Exactly how Ashveil works under the hood - every formula, curve and roll. This wiki tracks the live game and is kept current with each release. Last updated for Alpha v0.1.13.

XP & Levels

Every skill - and your character level - runs on one shared RuneScape-style XP curve, extended to a level cap of 130. The XP needed for a level rises smoothly:

xp(L) = floor( ¼ · Σ_{i=1}^{L-1} floor( i + 300 · 2^(i/7) ) )
LevelTotal XPNotes
283the first level is the cheapest
50~101,000
99~13.03Mthe classic milestone
120~104.27M
130~270Mthe cap (the Thieving capstone)

Practising a discipline grows two things at once: that skill's level, and your overall character level (a fraction of every XP gain feeds it) along with the stats that discipline trains. Doing the thing makes you better at it - there is no separate "training grounds".

Skill levels are decoupled from character level. A dedicated skiller can have a low character level but high skills - which matters for combat difficulty (see Skulls).

Stats & Resources

Seven stats - Strength, Vitality, Agility, Dexterity, Intellect, Spirit, Luck: grow as you train skills (each skill feeds specific stats). They set your resources and combat numbers.

Max Health = 80 + 12·(level−1) + 5·Vitality + class bonus Max Stamina = 100 + 5·(level−1) + Agility-skill bonus Max Mana = 20 + 1·(level−1) + 1.2·Intellect + class bonus

Resources regenerate over real time. Mana, for example, restores:

Mana regen = 1 + floor(Spirit / 25) per 5 minutes

Stamina gates skilling and combat (each action/kill costs a little); Health gates fighting (you can't fight while wounded or dead); Mana fuels spells.

Regions & Travel

The world is six regions in a fixed order - Embergate → The Thornwood → The Fenmarch → Ashreach Wilds → The Sunless Reach → The Voidmaw. You can only act where you stand: quests, monsters, thieving, agility courses, dig sites and bosses are all gated to your current region. Travelling takes real time (longer the deeper you go), and Agility shortens it. A region unlocks the next once you clear its quests and meet the level requirement.

Combat Power

Combat Power (CP) is a single number summarising your might - it gates content (bosses, areas) and sets your quest odds. It is the sum of your gear's power and a weighted sum of your stats:

CP = weaponPower + armorPower + Σ ( stat · weight ) weights: Str 1.0 · Vit 0.8 · Dex 0.8 · Int 0.9 · Agi 0.7 · Spi 0.6 · Luck 0.4 (× talent combat-power multiplier, if any)

The Fight Resolver

Combat is resolved server-side, round by round: no reaction time, pure build depth. Your style (set by your equipped weapon) and stats produce four combat numbers:

maxHit = 1 + (style stat)·0.5 + gear accuracy = 5 + base + gear base = Str·0.8 + Dex·0.6 (melee) | Dex·1.2 (ranged) | Int·1.2 (magic) evasion = 5 + Agi·0.8 + Vit·0.3 + gear DR = min(0.75, gear + Vit·0.002) (style stat = Str melee / Dex ranged / Int magic)

Each round, the attacker rolls to hit, then for damage:

hitChance(acc, eva) = clamp( 0.5 + 0.5·(acc − eva)/(acc + eva), 0.05, 0.99 ) damage = floor( rand·(maxHit+1) ) · triangle · (1 − targetDR) crit = ×1.5 (chance from Dexterity + Luck, + gear)

Damage Reduction (DR) caps at 75% from stats/gear; the curve guarantees you always have at least a 5% chance to hit and at most 99%.

The Combat Triangle

Three styles, each strong against one and weak to another:

Melee beats Magic Magic beats Ranged Ranged beats Melee

A favourable matchup multiplies your accuracy and damage by 1.1; an unfavourable one by 0.9 / 0.95. Monsters and bosses each have a style - bring the one that beats them.

Out-levelling & Skulls

Fighting a monster above your character level is meant to be brutal - this is what stops an over-statted but under-levelled hero from waltzing through foes far beyond them. For each level the monster is above you (diff), a penalty applies:

your accuracy ×= 1 − min(0.88, diff·0.075) your damage ×= 1 − min(0.62, diff·0.06) monster acc/maxHit ×= 1 + min(0.85, diff·0.06)
Level gapFeel
+1 to +4noticeably harder, still winnable
+5 (a "skull")a wash - roughly a coin-flip
+8 to +10a likely death
+11 or morenear-hopeless
There is no bonus for fighting below your level - that's just easy. The penalty only bites when the monster out-levels you.

Abilities

You slot up to 3 combat abilities (at most one a sustain heal). They unlock by combat level - a new one every few levels early, then one at every 10-level tier up to the cap - and auto-fire by trigger + cooldown each round (e.g. "every 3 rounds", "when HP ≤ 35%"). Effects are multipliers of your own numbers, so they scale across the whole level range. In the idle loop, sustain abilities are rationed by a real ~8-minute cooldown, so they can't replace food.

Bosses

Two bosses per region (twelve in all), behind real requirements - minimum combat power, skill levels, offering items (some consumed) and sometimes a prior boss. A boss is a locked-in 5–15 minute fight using the same combat maths, with mechanics:

  • Weakness: bring the style that beats it.
  • Heal: it regenerates each round; you must out-DPS the heal.
  • Enrage: after N rounds it hits harder every round, so dragging the fight out is fatal.

Town & Raids

Your Town is the Construction skill - build and upgrade buildings to train it (XP scales with the tier you raise). You can also Labour the town for a passive idle trickle of Construction XP. Defence buildings (Palisade Wall, Watchtower, Gatehouse, Barracks) each add a flat Town Defence rating per level, which protects you in PvP raids.

Town Defence = Σ ( defenceBuilding.level · defencePerLevel ) defencePerLevel: Wall 8 · Watchtower 7 · Gatehouse 11 · Barracks 9

Raid attack and defence powers are then (Ramparts amplify your hero + companions; your walls add flat on top, so Town Defence reads as literal defence points):

attackPower = (CombatPower + offensive companions) · (1 + raid-attack buffs) defencePower = (CombatPower·0.9 + defensive companions) · Ramparts + Town Defence winChance = clamp( 0.5 + 0.9·(atk − def)/(atk + def), 0.10, 0.90 )

When you scout the raid board you see each rival's built defences (e.g. "Wall Lv5 · Watchtower Lv3") and their Town Defence, so you can pick soft targets. A win plunders capped gold (Rogues steal more) and maybe an item; the loser is wounded. Every assault returns a building-aware battle report. New heroes get a protection window, and being raided grants brief re-raid immunity. Beat someone who recently raided you for bonus renown (revenge), and climb the weekly raid ladder (top raiders by wins + plunder, reset each week).

Action Success

Every gather and craft attempt rolls for success. At exactly the required level it's a coin-flip-ish ~60%; it climbs as you out-level the action, reaching certainty at about a 12-level margin:

success = clamp( 0.60 + 0.035·(level − req) + 0.004·mastery, 0.55, 1.0 )

A failed attempt yields no item - but still grants a little XP (about 30% of the action's XP), because you learn from the attempt. Cooking calls its failures "burns".

The Idle Loop

Set one action; it repeats. Yield is purely a function of elapsed real time:

actions = floor( elapsed / actionTime )

Action time is shortened by better tools, mastery and Construction. Progress accrues while you're away up to a 24-hour offline cap; beyond that, older progress is forfeit (you're told how much). Skilling is stamina-gated - once stamina runs dry the loop pauses and resumes as you recover.

Stacking Bonuses

Many systems boost the same numbers, and they stack multiplicatively:

gather yield = base × WorldEvent × Stone × Ley-line × Archaeology all XP = base × Stone × Ley-line × Spell-buff × Archaeology combat gold = base × WorldEvent × Stone × Ley-line × Talents
  • Standing Stones (Stargazing) - attune to one for a permanent boon that grows with your Stargazing level.
  • Ley-lines: a seasonal, monthly meta-bonus that favours certain builds/skills.
  • World Events: short, server-wide events on a ~3-hour rotation (Gem Rush, Blood Moon…).
  • Construction: Stronghold rooms grant permanent craft-speed / gather-yield / combat-XP bonuses.
  • Archaeology collections: permanent gather-yield / skilling-XP boons (below).
Per-source ceilings keep the stacked product sane - a fully-buffed gather yield, for instance, is capped well under 3×.

Archaeology

A regional skill in three stages:

  1. Dig regional sites for artifact fragments (uses the idle loop - success, XP and all).
  2. Restore fragments into named artifacts (consumes them, awards Archaeology XP - permanent once done).
  3. Collect: completing a collection grants a permanent boon (+gather yield or +skilling XP) and reveals a piece of the realm's buried lore, from humble Embergate antiquities up to the Origin of the First Flame.

Quests

Quests are timed, locked-in runs (1–10 minutes by tier). The outcome is sealed the moment you accept, using your live odds:

success = clamp( 0.55 + (CP − questPower)·0.0025 + masteryBonus, 0.05, 0.95 ) + spell buffs + guild bonus (+ raid bonus for raids) masteryBonus = +4% per mastery level, capped at +30%

The displayed chance is the true chance. While the timer runs, a pre-rolled narrative plays out in the banner - found loot and bonus skill-XP on the road, foreshadowing if it's doomed, and your Health draining as you're hurt or flee (a failed run costs 15–45% of max HP, but never kills). Rewards scale with the run's length and your mastery; mastering a quest needs roughly max(5, power/14) completions for the first level, doubling each level after, and grants +20% rewards per level.

Spells

Learn a spell once (gold; cheaper for Mages), then cast it for Mana to gain a timed buff. Mana is deliberately tight - you keep one or two buffs up, not all of them. Each spell can be upgraded through 3 tiers (gold + Stardust): stronger and longer, but a heavier mana cost:

per tier: effect ×(1 + 0.25·tier) · duration ×(1 + 0.20·tier) · mana ×(1 + 0.50·tier)

Buffs feed quest success, raid attack power, loot find and (for the arcane Mage/Warlock spells) gathering & combat XP. Temple blessings work the same way.

Ranks

Your character level carries a social rank: shown on your profile, the leaderboards and your level-up celebration. It climbs with level: Novice → Apprentice → Journeyman → Adept → Veteran → Champion → Master → Grandmaster → Ascendant → Mythic → Eternal (Lv 125+).

Play Ashveil free

Ashveil is a free dark-fantasy idle RPG that runs in your browser on desktop and mobile, with no download. Now that you know how the numbers work, put them to use: start playing Ashveil and your hero keeps training even while you are away. New here? The overview on the home page covers what makes it tick, and the dev updates track every change.