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.85.

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 its combat-power requirement (there's no character-level gate - CP is the measure of readiness, and the deeper regions demand a lot of it).

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.

Gear & Affixes

Dropped and crafted gear has a base stat block (accuracy, max hit, evasion, damage reduction, HP) and a set of affixes that grow with rarity. Affixes are deterministic per item ID - the same item will always carry the same affixes, so you can plan around what a piece gives you.

Affix count by rarity

Common 0 · Uncommon 1 · Rare 2 · Epic 3 · Legendary 4 · Mythic 5

Affixes alternate pools: the first affix is always a prefix (prepended to the item name), the second a suffix (appended), then prefix again, and so on. A Rare item therefore has one prefix and one suffix; a Legendary has two of each.

Prefixes

PrefixBonus
Keen+4 Accuracy
Brutal+3 Max Hit
Guardian+4 Evasion
Stalwart+2% Damage Reduction
Vital+8 HP

Suffixes

SuffixBonus
of the Bear+12 HP
of Fury+5 Max Hit
of Precision+6 Accuracy
of Warding+3% Damage Reduction
of the Fox+6 Evasion

Calculating effective stats

An item's combat stats are its base block plus every affix summed flat:

effective stat = base stat + Σ affix bonuses

Example - a Rare sword with Brutal … of Fury and a base max hit of 10: affixes add +3 + +5 = +8, so the sword hits for up to 18. Stacking a second Brutal on via enchanting (see below) pushes it to 21.

Enchanting

The Enchanting skill lets you bolt extra affixes onto any piece of gear using runes. Enchanted affixes stack on top of the item's natural roll - they are not limited by rarity. Three rune tiers gate what you can apply:

  • Minor rune - adds one affix from the prefix pool (same five as above).
  • Major rune - adds one affix from the suffix pool, which includes five ability-synergy enchants that never roll naturally on drops.
  • Grand rune (high Enchanting level required) - adds one of five apex-tier enchants: the heaviest raw stats in the game, combined with the strongest ability synergies. A real end-game chase and a build-defining choice.

Ability-synergy enchants (major runes - enchant only)

EnchantStatAbility bonus
of Ruin+4 Max Hit+25% power to DoT abilities
of Alacrity+4 Evasion−30% ability cooldown
of Dominion+4 Accuracy+12% ability power (all types)
of the Reaver+10 HP+30% power to Sustain abilities
of the Comet+5 Max Hit+25% power to Burst abilities

Grand enchants (grand runes - enchant only)

EnchantStatsAbility bonus
of Cataclysm+8 Max Hit, +6 Accuracy+18% ability power (all types)
of Immortality+24 HP, +3% DR+40% power to Sustain
of the Tempest+7 Max Hit, +6 Evasion−40% ability cooldown
of Annihilation+10 Max Hit, +4 Accuracy+40% power to Burst
of the Void+8 Accuracy, +6 Max Hit+40% power to DoT
Ability-synergy bonuses only affect abilities with the matching tag (DoT, Burst, Sustain). of Dominion and the grand of Cataclysm are the exceptions - they buff all ability types.

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 4–10 minute fight (dungeons run 14–25) 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.

Construction, Stronghold & Raids

The Construction skill is trained by making planks: cut logs (birch up to voidwood) into planks with smithed nails (iron / steel / voidsteel). Each plank costs a chunk of stamina and a log + nails, and the higher tiers need a higher Construction level. You can also Labour for a passive idle XP trickle.

Your Stronghold is where you spend those planks: the keep tracks (Granary, Hearth, Ramparts) and the Defences (Palisade Wall, Watchtower, Gatehouse, Barracks) and Works (Workshop, Lodge, Training Hall). Every upgrade needs gold, planks/nails, and a rising Construction level - which also gates buying and upgrading Holdings. Defence buildings 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.

Stamina cost per action

Each gather attempt drains stamina. The base cost is tied to the node's required level, so high-tier resources drain you faster:

baseCost = max( 0.4, reqLevel × 0.1 )

As your skill level rises above a node's requirement, the cost drops by 0.1 per level above, capped at a 50% reduction:

cost = baseCost − min( baseCost × 0.5, (playerLevel − reqLevel) × 0.1 )

Example - Anglerfish requires Fishing 65, giving a base cost of 6.5 stamina. At level 80 (+15 above req) it's 5.0; at level 97+ it hits the 50% floor of 3.25 and stays there. You never pay less than half the base, so high-tier nodes always cost something meaningful.

The reduced cost shows on the action card so you can see exactly what you're spending before you start.

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). When you embark you first pick an approach - Cautious (better odds, leaner spoils, slower, safer), Steady (neutral) or Reckless (worse odds but richer spoils, quicker, a harder fall). The outcome is sealed the moment you accept, using your live odds:

success = clamp( 0.55 + (CP − questPower)·0.0025 + masteryBonus, 0.05, 0.90 ) + approach + 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, a mid-run decision (play it safe or take the bold path, which re-rolls the spoils and risk), and your Health draining over the run. Every quest draws blood now: even a clean win costs HP (≈10–40% of max, scaled by tier and risk), a loss far more (≈30–78%) plus a chance to wound you - never lethal (HP floors at 1), but you'll need to heal between runs. 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+).

Quick answers

How is combat power calculated in Ashveil?

Combat Power (CP) is your gear's power plus a weighted sum of your stats (Strength, Dexterity, Intellect and the rest). It's a single number that gates content - regions, areas and bosses - and sets your quest success odds.

What is the level cap?

Every skill, including Combat, caps at level 130. There are 21 skills across combat, gathering, crafting and support.

How long does offline (idle) progress last?

Your active gathering, crafting or combat keeps banking rewards for up to 24 hours after you close the game, then pauses until you return.

How do quests work?

Quests are timed, locked-in runs. You pick an approach (Cautious, Steady or Reckless) that shifts the odds and spoils, the outcome is sealed when you embark, and a mid-run decision can re-roll the result. Every quest costs some HP - more on a failure.

How do you unlock new regions?

Regions unlock in order once you clear the previous region's quests and meet its combat-power requirement. There's no character-level gate; combat power is the measure of readiness.

Is there an XP curve formula?

Yes - each skill follows a smooth, escalating XP table from level 1 to the cap of 130, so early levels come quickly and late levels are a long-haul grind.

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.