Combat Simulator


Pathfinder First Edition General Discussion


As a beginning DM and role-player in general I found myself wondering how to make a fun combat encounter. One of the base requirements I could think of is making a brute force solution -just hit things with your biggest stick - unfavorable. To design an encounter with this in mind, one of course needs to know the odds of winning when using the brute force solution.

Here's the thing, I'm kind of a nerd. Just placing a random CR-appropriate encounter for the players to fight and hope they'll lose if they play stupid doesn't do it for me. So, I wrote a script to calculate the actual odds of winning such a battle.

Of course this is useless. No player is ever going to mindlessly bash things 'till they die, but it's more of a hobby project for me than anything of practical use. Still, I'd like to share my code with you guys. The layout and code itself are horrible, I just picked up javaScript and HTML a week ago, but here it is:

https://dl.dropboxusercontent.com/u/.../mainPage.html

The already filled-in stats are the ones of the battle of my foolish fighter-player and the BBEG(http://www.giantitp.com/forums/showthread.php?t=277612), but you can add creatures and edit stats yourself. Just press the 'Go!' button and it will calculate the odds. A negative horizontal axis value means team 2 wins and a positive means team 1 wins. The number is how many turns it takes. The height of the bar is proportional to the chance of winning (100% all bars total)

The rules used are those of the Pathfinder Beginner Box. There is no AI, movement or any advanced tactics. A battle of ethereal, infinite movement mindless zombies or something of the like will be a good in-game representation of this battle ;)

I'm now working on expanding my code with the following things:
- Initiative (Right now, team 1 always goes first)
- A battlegrid (which means being able to implement movement, range, AoE etc. My definition of vision is still a bit wonky, and calculating distances is hard. Currently using a variation of Dijkstra's Algorithm.)
- AI (so I can implement multiple kind of attacks)


Dude this is an awesome idea. Any updates since, um, last year? xD

Community / Forums / Pathfinder / Pathfinder First Edition / General Discussion / Combat Simulator All Messageboards

Want to post a reply? Sign in.
Recent threads in General Discussion