Skip to content

Hexatona/TroikaBattleSim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TroikaBattleSim

A rudimentary battle simulator for the Troika! TTRPG, written in Lua.

Why Does This Exist

While individually it's pretty easy to guage the relative strength of a player vs an NPC, it can be a little complicated to do that with large group encounters. I made a quick and dirty battle sim to help understand the general difficulty of a battle. Use this to help understand the survivability of an encounter between your players and a group of NPCs.

How To Use

First, edit the fight.json file to put in the stats of the players and enemies. Treat player skill as base skill + highest weapon advanced skill. Basically, treat them like NPCs.

Example:

[
    {
        "id": "Player 1",
        "team": "Player",
        "skill": 6,
        "stamina": 17,
        "armor": 1,
        "initiative": 2,
        "weapon": "sword"
    },
    {
        "id": "Enemy 1",
        "team": "Enemy",
        "skill": 6,
        "stamina": 5,
        "armor": 0,
        "initiative": 2,
        "weapon": "small"
    }
]

Then, run the program from the command line:

lua54 Troika.lua

And you get the results out of 100 simulated encounters:

Out of 1000 battles, the players won 74% of the time.

Added features

  • Ranged weapons can now be dodged, and do not cause reciprocal damage
  • Magic weapons like firebolt, jolt, and dragonfire now automatically hit.

Future Features

  • Detailing average survivability of players.
  • Detailing average number of rounds.

About

A rudimentary battle simulator for the Troika! TTRPG, written in Lua.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages