hv-unified/simulator
GaboGG 39ad28007c Sim benchmark: full-conservative wins, configurable skill OC
Benchmark results (1000 rounds, Lv64 Nightmare, infinite items):
1. full-conservative: 225.6 rounds, 3141 dmg/rd — BEST
2. conservative-items: 223.6 rounds, 3128 dmg/rd
3. attack-spells: 213.0 rounds, 2974 dmg/rd

Changes:
- Grindfest scaling: monsters +1 per 100 rounds, damage +0.4%/round
- skillOC config option (default: 70) for weapon skill OC threshold
- Spirit gem threshold bumped to 45%
- Simulator uses real monster count/damage scaling from wiki
- Benchmark results saved to simulator/results/benchmark.json
2026-07-20 19:53:03 -04:00
..
configs Add battle simulator and Forgejo repo setup 2026-07-20 19:36:55 -04:00
results Sim benchmark: full-conservative wins, configurable skill OC 2026-07-20 19:53:03 -04:00
src Sim benchmark: full-conservative wins, configurable skill OC 2026-07-20 19:53:03 -04:00
package.json Add battle simulator and Forgejo repo setup 2026-07-20 19:36:55 -04:00
README.md Add battle simulator and Forgejo repo setup 2026-07-20 19:36:55 -04:00

HV Unified Simulator

A headless battle simulator for HentaiVerse. Tests strategy configurations against simulated battles to find optimal settings.

Structure

simulator/
├── src/
│   ├── engine.js        # Battle engine (turns, damage, procs)
│   ├── entities.js      # Player, Monster classes
│   ├── formulas.js      # All wiki-known formulas
│   ├── strategy.js      # Port of the userscript strategy logic
│   ├── grindfest.js     # Grindfest simulation
│   ├── arena.js         # Arena simulation
│   └── runner.js        # Run configs, collect stats
├── configs/
│   └── default.json     # Default strategy config
├── results/             # Simulation output
├── package.json
└── README.md

Usage

node src/runner.js --rounds 1000 --config configs/aggressive.json

Strategy Config Format

{
  "name": "aggressive-items",
  "cureHP": 0.35,
  "cureItemHP": 0.65,
  "manaGemMP": 0.60,
  "spiritPotionSP": 0.40,
  "spiritStanceOC": 60,
  "useAttackSpells": false,
  "skillRendingAt": 5,
  "skillGreatCleaveOnlyBosses": true
}

How It Works

  1. Creates a simulated player at a given level with specified stats/gear
  2. Spawns monsters based on difficulty and battle type
  3. Runs the same strategy logic as the userscript (ported to Node.js)
  4. Tracks every action, proc, damage event
  5. Outputs summary stats + per-round logs