{"id":105,"date":"2017-07-05T05:51:06","date_gmt":"2017-07-05T05:51:06","guid":{"rendered":"http:\/\/cliffnordman.com\/blog\/?p=105"},"modified":"2019-02-26T11:31:47","modified_gmt":"2019-02-26T11:31:47","slug":"pathfinder-bots-simulation","status":"publish","type":"post","link":"https:\/\/cliffnordman.com\/blog\/2017\/07\/05\/pathfinder-bots-simulation\/","title":{"rendered":"Pathfinder Bots: Simulation"},"content":{"rendered":"<p>@FightBot1 and @FightBot2 are Twitter bots that battle each other with randomly-generated level 1 Pathfinder Fighters.<\/p>\n<p>Pathfinder&#8217;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.\u00a0 Thus I chose the Fighter class, the simplest class that just uses weapons.<\/p>\n<p>Usually, Pathfinder has a Game Master, who has final say on anything that happened in the simulated world.\u00a0 Players announce what they intend their characters to do, but the GM can modify, interrupt or ignore those actions when necessary.\u00a0 When playing over Twitter, there is no GM, just the two players passing messages back and forth.\u00a0 Thus, any action that interrupts another action, as well as hidden information that can affect the outcome of a player&#8217;s action, is no good.\u00a0 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.<\/p>\n<p>Position and movement gave me trouble as well.\u00a0 Pathfinder is based on a grid of 5-foot squares (actually cubes, when the game remembers the third dimension). Level 1 fighters can&#8217;t fly, so I could ignore height.\u00a0 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?\u00a0 Maybe a one-dimensional position, just a distance from opponent, would be sufficient to let ranged weapons, reach weapons, and normal weapons seem different.\u00a0 If the fighters never take actions that provoke attacks of opportunities, they won&#8217;t get interrupted.\u00a0 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.<\/p>\n<p>So fighters can only perform melee attacks.\u00a0 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.\u00a0 The CRB has seven races.\u00a0 Only feats available at level 1 that affect health, initiative, or melee attacks are relevant.\u00a0 Fighters are proficient in all armor, shields, and simple &amp; martial weapons, so those are in as well.<\/p>\n<p>In subsequent blog posts, I&#8217;ll explain the procedural generation of characters &amp; descriptive text, and how I integrated with Twitter.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>@FightBot1 and @FightBot2 are Twitter bots that battle each other with randomly-generated level 1 Pathfinder Fighters. Pathfinder&#8217;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.\u00a0 Thus I chose the Fighter class, the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/cliffnordman.com\/blog\/2017\/07\/05\/pathfinder-bots-simulation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Pathfinder Bots: Simulation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5],"tags":[],"class_list":["post-105","post","type-post","status-publish","format-standard","hentry","category-programming","category-rpg"],"_links":{"self":[{"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/posts\/105"}],"collection":[{"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/comments?post=105"}],"version-history":[{"count":2,"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":107,"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/posts\/105\/revisions\/107"}],"wp:attachment":[{"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/media?parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/categories?post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cliffnordman.com\/blog\/wp-json\/wp\/v2\/tags?post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}