Dekiro Dev Blog

Part 15 of 28

Balancing a 40-Hour Grind Before Anyone Plays It

A Monte Carlo model of a character's whole career, a headless combat simulation with bots that dodge, and what they found: the game was 15 hours long and nothing in it could hurt you.

The target #

By day six the game had nine maps, 20 dungeons, 177 monster types and a story from level 1 to 88. It had never been balanced as a whole. Every system had sensible numbers on its own, picked when it was built. Before playtesting, the AI asked whether to do a balancing pass first, and the human answered with a target:

I would like to have about 40 hours of actual gameplay minimum potential. You don't need to test for that amount of time but estimate if level, gear and so on progression fits that timeline.

— the developer

Forty hours to level 90 and the end of the main story, with level, gear and upgrades moving along the whole way. The endgame (the Fullmoon weapons' awakening, a 1000-fragment forge, the weekly Demon Tower) may run longer.

Nobody can playtest 40 hours in an afternoon, so two agents worked in parallel on two halves of the question, and a third did the follow-ups:

  • The progression model: how long does a level take, where do the hours go, and does gear keep up?
  • The combat simulation: how long does a fight take, and how much does it hurt?

The two depend on each other (fight times feed the model), which is why the numbers below moved more than once.

Half one: a career in five-minute steps #

tools/balance/progression.py is plain Python. It reads the game's own data files and the constants of the GDScript rules (damage formulas, the combo chain, weapon types, skill multipliers and cooldowns, upgrade scaling, drop tables) and plays a character from level 1 to 90 in five-minute steps, sixty times over with different random rolls:

  • A hunting loop per zone: walk to the next Shadow (spacing from the zone's real area and Shadow count), kill the packs met on the way, break the Shadow while its waves come, move on. Mana limits skill use; incoming damage turns into potions and, if a fight outlasts what HP and potions hold, deaths.
  • Zone choice: the zone with the most XP per hour net of deaths, at most two levels below its monsters, with a small bonus for the zone the story points you to.
  • Dungeons once each at their entry level, quests with realistic overhead ("kill quests cost 35% of their grind time on top, talk quests 4-6 minutes"), daily bounties, world events.
  • Loot and upgrades: every drop rolled, gear worn if better, the rest sold; every blacksmith attempt rolled, failures and downgrades included, while gold and materials last.

The behaviour assumptions sit in one block at the top, each documented: efficiency 78% (time actually fighting), 4 seconds to engage a pack, 45% of enemy hits landing. They're the knobs a playtest should calibrate, so the model also prints how sensitive the result is to them:

Change Hours to 30 to 60 to 90
as tuned 7.4 22.0 39.7
efficiency 65% (more downtime) 8.0 24.4 44.7
efficiency 90% (a focused grinder) 7.0 20.6 36.8
30% of hits land (better dodging) 7.4 21.8 39.9
6 s per pack to engage 7.6 22.6 41.4
dungeons slower (150 s rooms, boss 3x) 8.6 24.8 43.7

So "40 hours" really means "about 37 to 45 hours for reasonable play styles". That's the honest version of the number.

Half two: bots that fight #

tests/sim_combat.gd runs the real game code headless at about 70 times real time.1 The testing post has the setup. Bot players of a given level and school, wearing the gear a player of that level would have, fight every hunting zone, every boss and mini-boss in its own dungeon room, and every dungeon's trash rooms: solo per school, with two AI companions, and as a party of four. They step out of every telegraph after a 0.3 second reaction time, so what still hits them is what a careful player can't avoid.

The first run was sobering. From the report:

Nothing could hurt you, and nothing lived. Packs died in 0.5-1.5 s (the opening skill burst), normal monsters in 0.8-2 basic hits, Elites as fast as packs, a pack cost 0-5% HP. Player power grows ~x45 from level 1 to 90 [...], monster HP only x20, and the level 76-90 monsters were early-game stat lines.

Bosses died in 1 to 15 seconds solo. A party killed "Your Shadow" in 0.4 seconds and the First Shadow, the final raid boss, in 3.4. Iron Fist was about 1.5 times slower than the other schools. Some ranged attacks gave half a second of warning, which in a crowd meant about half the dodges failed. And every Shadow from level 50 on killed a careful solo bot about once, because the only healing potion past level 15 healed a flat 250 HP against health bars of 2,000 to 4,000.

What changed #

Monsters got their HP and damage fitted per level and band, boss HP sized for a fight of about one minute in a party and one to two minutes with companions, ranged telegraphs got minimum warning times,2 A shot's line at least 0.65 s, a burst's circle at least 1.1 s; a test now checks every ranged monster. and Iron Fist and Sanctum got skill buffs. After:

Before After
A pack, from aggro 0.5-1.5 s 4-7 s (plus walking and looting: 8-15 s a pack)
An Elite as fast as a pack 6-8 s
A Shadow, solo 9-22 s 29-45 s
A boss, solo + 2 companions 1-23 s 78-136 s
A boss, party of four under 1-33 s 44-61 s
The biggest single hit up to 82% of max HP (on companions) 5-15% of max HP
Schools, pack kill time up to 1.5x apart 0.9-1.15x of the mean up to level 60

One target from the brief had to give. "A normal monster dies in 2-4 hits" and "a pack dies in 8-15 seconds" can't both hold once skills scale: at level 40 a Blade's first second of skills is worth about 14 basic hits on everything in it. The sim kept the pack time and the time to kill a lone monster, so basic hits per monster now grow with level (4, then 7, 9, 11).

XP was the other half. With tougher monsters the old curve gave 25 hours to 90, not 40. The model's --fit mode searches for the data that hits a target curve, and the result was simpler than expected:

  • The XP curve became one power law, 80 x level^2.58 (from 80 x level^1.6 x (1 + 0.05 (level - 10))). The first level still costs 80, so the opening stays quick.
  • Monster XP follows monster HP: 0.1 x base HP for pack monsters, 0.11 x for Shadows. The combat pass had raised HP between 2x (early beasts) and 15x (the last map's shades) while XP stayed, so a Shade paid 12 XP for 831 HP. Tying XP to HP means XP per hour follows your damage everywhere, and no zone is a trap or a jackpot.
  • Quest XP is a share of the level bar at the quest's level: task quests 70%, travel and talk quests 25%, the final boss 150%.
Hours to reach each level: before (dashed), after the combat retune only (dotted), and after (solid, with the spread of 60 runs), against the target points

The economy, which the model caught #

Once the hours were right, the model's gold and gear charts showed problems no single fight would.

Gold piled up. Gold was "the monster's XP reward times a table factor", and XP now grew much faster with level than prices did. The median character ended the run with about 16 million unspent gold out of 18.5 million earned. The fix moved gold onto the monster's level (1.2 x (level + 2) times the table's factor), the same shape as item prices. Now the median character earns about 4.9 million, spends about 3.5 million (potions 2.25M, upgrades 1.1M), and reaches 90 with about 1.3 million: roughly the price of the first two Fullmoon awakenings, which became the late game's gold sinks. Income stays ahead of spending in every band; the tightest is the desert at 40-50, where Sunstone upgrades and stronger potions cost the most.

Gold over time for the median character: earned, spent and held

A 56-level armor gap. Body armor stopped at level 30, helmets at 26, shields at 20, until the level 86 raid set. The model's deaths clustered in the 66-85 zones, where under-armoured characters met the new monster damage. 41 new pieces in six sets (with models and icons from the Blender pipeline) now give every slot a tier at least every ten levels, and a test checks that.

Too many potions. With flat potions, the model drank 1,000 to 1,300 an hour from level 15 on, one every three seconds. Affordable, but "a lot of clicking". Red potions now come in four tiers that track max HP (80, 250, 700, 1,300 HP), monsters drop the tier of your level, and the model drinks 175 to 430 an hour: about one per pack.

Sunstone dried up. The top three upgrade steps need Sunstone from the desert, and the level-gap rule stops drops from monsters seven levels below you, so from level 57 the caravan was the only source and weapons stalled at +6/+7. The human's call: Sunstone "should also drop from Shadows after 55+". At 18% per Shadow, characters who stay on a normal weapon reach +9 at a median of level 69.

Gear over time for one median character: the weapon jumps to the Fullmoon weapon (a level 30 item that outclasses later drops) and back to new tiers, armor follows the level

The result #

Sixty simulated Blade characters reach level 90 in a median of 39.5 hours (the middle 80% between 37.9 and 40.9). The other schools land at 38.7 (Iron Fist), 40.6 (Shadowstep) and 39.0 (Sanctum). The shape is the one the human wanted from a popular Korean MMO: the first ten levels in about an hour and a half (quests carry the first five), then 15 to 30 minutes a level through the 20s, 25 to 35 minutes through the middle, and 35 to 55 minutes from 60 to 90. Every level from 1 to 90 has a hunting zone in its band, and each map is used for the levels it was built for.

Where the hours go, for the median character: about 26 hours of grinding, about 6 hours in dungeons (one clear each), about 5.5 hours of quests and 1.5 hours of daily bounties.

Where each level is spent: map by map, with dungeon runs in orange

Some numbers from the rare-item table, because a grind game is also a waiting game:

Item Time to get (median)
Your own school's Fullmoon weapon (0.3% per Shadow, 2% per boss) about 13 hours of play; 98% of characters by 90
1000 Moonsteel Fragments for the forge about 57 hours of Shadow hunting: the slow, certain road
A +9 Fullmoon weapon on its own track 100+ hours: endgame

What a model can't tell you #

The report ends with its own list of risks, and the last one is the most important: "The model is a model." Efficiency, engage time, hit rate and potion use are guesses until a human plays. Party play, trading and other schools' Fullmoon weapons aren't modelled at all. Dungeon times are fighting time only, because the bots can't solve puzzles or walk mazes. And no simulation can say whether a 45-second Shadow feels like 45 seconds well spent.

What the model and the sim do give is a calibrated starting point. After the human's first playtest, the PLAY block gets their real numbers (how much of their time they actually fight, how many hits they take), the model reruns in a minute, and the data moves with it.

Takeaways #

  • Simulate the whole career, not a fight. The worst problems (16 million spare gold, a 56-level armor gap, Sunstone running out) only show up over 90 levels.
  • Tie rewards to the thing that costs time. XP from monster HP and gold from monster level keep zones honest when the combat numbers change.
  • Use the real code for combat. Bots that drive the same commands as players find the one-shots and the invincible phases that a spreadsheet can't.
  • Publish your sensitivity, not just your number. "40 hours" is really "37 to 45, depending on how you play".
  • The model is a model. Plan the playtest that calibrates it.

What's next #

Forty hours is a long time to spend in a world, so it should feel alive. Next: clutter, buildings, animals you can pet, and townsfolk who keep their own schedules.