Skip to content

Instantly share code, notes, and snippets.

@jhkrischel
Last active December 10, 2015 22:48
Show Gist options
  • Save jhkrischel/7780da3b19b7440f7e85 to your computer and use it in GitHub Desktop.
Save jhkrischel/7780da3b19b7440f7e85 to your computer and use it in GitHub Desktop.
Perl script for simulating fate core combat

WE HAVE MOVED

You can find the Fate Core Combat Simulator here:

https://stash.krischel.org:444/projects/PUB/repos/fate-rpg/browse

If you want to git clone, you'll have to skip ssl verification:

git -c http.sslVerify=false clone https://stash.krischel.org:444/scm/pub/fate-rpg.git

After you've cloned, you can permanently skip ssl verification for the repo with this command:

git config http.sslVerify false
@jhkrischel
Copy link
Author

Working on an algorithm for deciding which consequences to use, but finally decided just to hard code the search space.

Coded for a length four string, with the first character MILD, moving up to the last character EXTREME, the proper order in which to use consequences looks like this:

XOOO
OXOO
OOXO
XXOO
XOXO
OXXO
XXXO
OOOX
XOOX
OXOX
OOXX
XXOX
XOXX
OXXX
XXXX

This will use the minimum number of consequences (thereby minimizing the number of free invokes exposed), and only use EXTREME as a last resort.

@jhkrischel
Copy link
Author

Consequences should work properly now, and I fixed a bug where I considered people dead because their stress track was filled (their stress track has to be exceeded, not just filled).

@jhkrischel
Copy link
Author

Massively refactored into packages, with prettier OOP style. Also added in stubs to allow asymmetrical attack/defense, as well as alternate mental parameters.

@jhkrischel
Copy link
Author

Now supporting the simulation of arbitrary teams. Teams both try to bluntly kill each other, in order, but you can customize every parameter of both physical and mental attack, defense, weapon, armor, stress, as well as consequences.

The only rub is that additional consequences (which are usually limited to either mental or physical) aren't handled very well.

@jhkrischel
Copy link
Author

Added multi-threading.

@jhkrischel
Copy link
Author

Multi-mook test run (Clone Team 1 is Player):

Player vs. Multiple Mooks:
Pv2M Guns Skill diff 0:
Clone Team 1 dies: 43.03%
Clone Team 2 dies: 56.97%
Average # of actions before death: 9.8332
Pv3M Guns Skill diff 0:
Clone Team 1 dies: 80.45%
Clone Team 2 dies: 19.55%
Average # of actions before death: 11.2632
Pv3M Guns Skill diff 1:
Clone Team 1 dies: 58.68%
Clone Team 2 dies: 41.32%
Average # of actions before death: 10.8521
Pv3M Guns Skill diff 2:
Clone Team 1 dies: 36.15%
Clone Team 2 dies: 63.85%
Average # of actions before death: 9.892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment