Combat balance, mob skills, limited group aggro, achievements — BUILT 27.11.2026
Owner: Janari. First a proposal (same day), then built after his answers:
- Number scale: start small, end big (helmet ~3 def at start, ~1200 at level 80; HP 100 -> ~14 000).
- Defense feel: builder's judgment, tune by testing.
- Luck gives crit chance: yes.
- Group aggro: max 3 of one group at once, every other group 1, refill when one dies, never the whole graveyard.
- Achievements: many small stacking bonuses + titles.
Rollback copies: D:/WieldHavenBackups/archive/combat_balance_20261127/original/ (PlayerStats, Player, SkeletonEnemy, OverworldSkeleton, MobLevelRules, NativeAttributeRules, EnemyArrow, PlayerStatsMenu). New files can simply be removed.
Files
| File | What |
|---|---|
Scripts/Services/CombatRules.gd (new) | growth curve, K, DR, level factor, crit, HP table 51-80, mob scaling factors |
Scripts/Services/AchievementRules.gd (new) | 26 achievements, counters, rewards, caps, seeding from old kills |
Scripts/Enemies/MobEngagement.gd (new) | per-player fight registry: 3 main group / 1 other group |
Scripts/Enemies/MobSkillRules.gd (new) | 10 mob skills + which mob uses which |
Scripts/UI/AchievementsMenu.gd (new) | window (J key, Tab ring entry "Achievements"), unlock toast |
SkeletonEnemy.gd | new hit formula, family profile, gated set_aggro, capped ally call, replacement on death, skills |
OverworldSkeleton.gd | sight-aggro gate, wall check for calls |
Player.gd | received damage via CombatRules, achievement damage %, dodge counter |
PlayerStats.gd | attacks start 10, levels 51-80, migration, achievement + percent bonuses |
NativeAttributeRules.gd | +0.25 % per attribute point (percent part) |
MobLevelRules.gd | MAX_MOB_LEVEL 80, scaling via CombatRules, FAMILY_PROFILES |
RewardService.gd, EnemyArrow.gd, SelectMenu.gd, QuickMenuRegistry.gd | small hooks |
Formulas
Growth curve: G(L) = e^(0.07584 x (L-1)) -> 1 at level 1, 400 at level 80. Gear design target (for future gear tiers): armor piece 3 x G(L) (L30 ~27, L60 ~290, L80 ~1200), weapon 8 x G(L).
Player stat (Attack, RangedAttack, MagicAttack, Melee/Ranged/MagicDefense; all start 10):
flat = 10 + gear x quality + set + souls + attribute flat (+1/pt) + achievement flat
total = flat x (1 + attribute % (0.25 %/pt above 10) + achievement % (cap 15 % each))
Old attribute flats unchanged (Endurance +1 melee/ranged def per 2 pts, +2 HP/pt). Endurance % also raises MaxHealth.
Hit (both directions):
raw x level_factor level_factor = clamp(1 + 0.05 x (attacker_lvl - defender_lvl), 0.6, 1.5)
DR = DEF / (DEF + K(attacker_lvl)), K = 16 + 26 x G(L) (42 at L1, ~10 400 at L80), cap 75 %
dmg = max(1, round(raw x (1 - DR)))
then (player side) armor proficiency, guard boosts, achievement reduction (cap 8 %); (player attacking) weapon proficiency + achievement damage (cap 8 %). Crit 12 % + 0.2 %/Luck above 10, max 30 %, x1.6.
Player HP per level: 1-50 as before; 51-59 +250, 60-69 +400, 70-79 +550 -> L60 4 900, L80 14 400 (+ Endurance). Stat points 51-80: +1 per level, +5 at 60 and 70 (was 0 and +1 HP).
Mob scaling (authored scene numbers = level 1):
- HP x
(1 + 0.006(L-1)) x expected_player_attack(L) / 18 - Defense (all three) x
K(L) / K(1) - Attack x
max(1, 0.85 x expected_player_HP(L) / 100) - XP/gold unchanged.
MAX_MOB_LEVEL80 (regions still only go to 16).
Family profile (from authored melee defense): Undead ranged x1.4 / magic x2.5, no magic attack; Goblin 1.0 / 0.85; Orc 0.85 / 0.45 (weak to magic); Demon 1.0 / 1.8 and magic attack 0.8 x damage.
Test table (same-level, gear on the curve; VerifyCombatBalance):
| Lv | Attack | Defense | HP | DR | Mob HP | Hits to kill | Hits to die |
|---|---|---|---|---|---|---|---|
| 1 | 18 | 22 | 100 | 34 % | 145 | 10 | 9.5 |
| 30 | 128 | 183 | 891 | 42 % | 1 051 | 9.2 | 13 |
| 60 | 1 170 | 2 126 | 5 328 | 48 % | 8 410 | 7.4 | 15 |
| 80 | 6 069 | 11 298 | 17 060 | 52 % | 39 049 | 6.6 | 18 |
Group aggro (MobEngagement)
- Per player: the first group to fight is the main group (max 3), other groups max 1 each.
- If the main group stays short for 2.5 s, other groups may fill its places.
- Calls for help: 300 px (leaders x1.4), nearest first (ties random), walls block, a called mob never calls on.
- When a fighter dies, the nearest idle mob of its group may take the place.
- A mob hit directly always fights back (may go over the limit).
- War Cry buffs only allies already fighting.
Mob skills (MobSkillRules)
Used at the heavy wind-up (red pulse; area skills also show a red ground circle, >= 0.8 s): Volley (3 arrows), Twin Shot, Cleave, Whirl, Ground Slam, War Cry, Fire Bolt, Hellfire Arrow, Flame Slash, Infernal Nova. Mapping by authored name, fallback by family + archetype.
Achievements
26 (kills total/family/elite/leader, bosses, levels 10/30/60, rebirths, perfect dodges, backstabs, close call, weapon/armor proficiency, full 7-piece set). Stored Stats.Achievements, Stats.AchievementCounters. Older characters: counters seeded once from EnemyKills by name. Window: J key or Tab ring entry "Achievements" (add it in Options > Quick Menu; the default ring is full).
Save migration (CombatBalanceVersion 1)
Attacks -15/-20/-25 (min 10); characters above level 51 get the new HP and points for their levels. Owner saves are migrated on first load (backup of the scripts above; saves themselves untouched until then).
Evidence
Scripts/Build/VerifyCombatBalance.gd(headless, isolated APPDATA): see reporttest-results/combat_balance_20261127/report.json.- Regression PASS 27.11: VerifyMobLevels 62/62, VerifyTalentsProficiencies 0 failures, VerifyEquipmentSetsQuality 51/51, VerifySkillUnlocks 41/41, VerifyRebirth 44/44, VerifyMobGear 726/0.
- Real MainWorld (
game_check_combat_balance.gd, test profile copy): graveyard 4 Undead + 4 Goblin nearby -> max 3 Undead + 1 Goblin; orc warband max 3; demon rift 3 + 1; skills used (Volley seen).game_check_achievements.gd: window opens, 27 rows, First Blood + King's Fall unlocked. - Not checked: long real play feel, online slice (OnlineCombatService untouched), gear catalog is still on the old small scale (new tiers for levels 17-80 must follow the curve), mob regions 17-80 do not exist yet.