Pathfinder Bots: Simulation

@FightBot1 and @FightBot2 are Twitter bots that battle each other with randomly-generated level 1 Pathfinder Fighters.

Pathfinder’s combat rules are very complex, so I knew implementing the whole thing was impractical. I chose to exclude spells and skills, and as many special attacks and activated abilities as possible.  Thus I chose the Fighter class, the simplest class that just uses weapons.

Usually, Pathfinder has a Game Master, who has final say on anything that happened in the simulated world.  Players announce what they intend their characters to do, but the GM can modify, interrupt or ignore those actions when necessary.  When playing over Twitter, there is no GM, just the two players passing messages back and forth.  Thus, any action that interrupts another action, as well as hidden information that can affect the outcome of a player’s action, is no good.  That means anything that provokes attacks of opportunity (casting spells, firing ranged weapons, performing combat maneuvers, managing inventory, drinking potions, or even moving) was excluded.

Position and movement gave me trouble as well.  Pathfinder is based on a grid of 5-foot squares (actually cubes, when the game remembers the third dimension). Level 1 fighters can’t fly, so I could ignore height.  Should I simulate a 2d arena? Should it be a featureless square, or circle, or have terrain? What happens if a fighter runs into a wall? Into a corner?  Maybe a one-dimensional position, just a distance from opponent, would be sufficient to let ranged weapons, reach weapons, and normal weapons seem different.  If the fighters never take actions that provoke attacks of opportunities, they won’t get interrupted.  But knowing when a fighter is threatened requires knowing what the enemy is wielding. So I decided to only use melee weapons, and ignore positioning altogether. If one character has a reach weapon, just pretend that the the fighters are making 5-foot steps each round.

So fighters can only perform melee attacks.  What races are allowed, and what equipment and feats will they use? I used only items from the Core Rulebook, not the innumerable books released since.  The CRB has seven races.  Only feats available at level 1 that affect health, initiative, or melee attacks are relevant.  Fighters are proficient in all armor, shields, and simple & martial weapons, so those are in as well.

In subsequent blog posts, I’ll explain the procedural generation of characters & descriptive text, and how I integrated with Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *