Combat Simulator Project

Adventure in the world of J.R.R. Tolkien’s The Lord of the Rings. Learn more at our website: http://www.cubicle7.co.uk/our-games/the-one-ring/
Post Reply
Glorelendil
Posts: 5162
Joined: Mon Jan 13, 2014 5:20 pm

Combat Simulator Project

Post by Glorelendil » Sat Feb 22, 2014 9:59 pm

In the thread about "high level" characters I mentioned that it'd be interesting to see some combat simulations.

I've got version 0.0.01 running. All it does is let you define one hero and one monster and then make them fight 1,000 times, taking turns going first, slugging it out until somebody drops then magically restoring to 100% and going at it again. (Sort of like working an office job.) Nobody uses any special abilities.

For my first death matches I ran a starting-level Beorning with Body 6, Wits 4, Heart 4, Spears 3, a Fell Great Spear, and a mail shirt. His opponent is an Orc Chieftain (as per LM Guide) with an Orc-Axe. The Beorning wins approximately 80% of the time.

Notes:
  • At first I forgot to include the Beorning cultural blessing of "Furious" and he only won about 72% of the time.
    I gave our hero a 4th point in spears and his win rate jumped to 90%.
As I said, I'm not yet including any special abilities or attacks, and the Orc isn't spending any hate. And there may very well be bugs in the code.

I'll keep updating this thread as the software evolves. My goal is to eventually give it a web front-end so everybody can play with it.

If anybody has any particular death matches they'd like to see, post here. It would be helpful if you posted stat blocks (of only the relevant stats...don't care about Song skill for instance.) Please include stats for weapons/armor you choose, and compute total fatigue. If your culture/virtues affect combat, please mention that (I don't have all the rules memorized yet.)

2/24/14:
  • * Put all player weapons and armor (plus orc armor and weapons...for my test victim) into tables, so weapons/armor can be assigned by symbol (e.g. ":great_spear") without typing in stats.
    * Fixed bug where piercing blows were happening far too often; curiously had very little effect on outcomes.
    * Refactored parry mechanic and apparently fixed a bug; player win rate jumped by 10%.
2/25/14:
  • * Oh boy, now I'm up to my armpits in it. Started implementing a system to apply qualities to weapons and armor, ended up refactoring everything, and of course broke everything. Got it debugged (as far as a I know...) so back to where I was, but with a more flexible framework in place. Still not exactly sure how I'm going to support cultural rewards with special rules.
2/26/14
  • * Pausing on features and webifying progress to date. Writing it in Ruby, and am using Sinatra/HAML/Heroku for deployment. (No database in version 1.) Once I've got all that figured out (I'm learning most of this from scratch) I'll go back to adding features/cultures/virtues/etc.
2/27/14
  • * Slowly grinding my way through new technologies, but making progress. Taking breaks from getting AJAX working to add rewards, virtues, backgrounds, etc. to the various cultures. (Only including the original 6 cultures for now.)
2/28/14
  • * Breakthrough! Figured how to use AJAX and partials (hey...the only serious development I've done in the last 10 years is on iOS) to update choices based on other choices. E.g., if you pick "Beorning" your choices for backgrounds, rewards, and virtues updates accordingly.
    * Now back to figuring out an elegant way to accommodate all the special abilities. E.g., when rolling protection you have to know what kind of weapon hit you because it may modify your skill (protection) dice. Messy.
3/4/14
  • * Plugging away at javascript forms. Making progress.
    * Added elements for selecting favoured attributes (base attributes set by choosing background) and weapon skill.
    * Taking breaks from javascript & haml to continue adding backgrounds, rewards, armor choices, etc.
3/10/14
  • * If you're loyally checking this thread, version 0.0.01 (Zeta) is live. You can find it at: http://lit-oasis-7482.herokuapp.com/.
    * This is just a slugfest between a hero and an orc chieftan. Neither side uses Hope or Hate, there's no opening volley, the orc doesn't try a called shot on a hero Sauron, etc.
    * I commented out all the cultural rewards/virtues for now, because they're going to be complicated to handle.
    * You can pick how many iterations you want to do, but only the log from the last fight gets printed. So if you want to help debug by studying logs just do 1 iteration.
    * The dice format is the Feat Die followed by Skill dice in parentheses, with no delimiter, followed by the number of bonus successes. So "S|(05)=5|-" is a Sauron, a 0 and a 5 (so must be Weary), and no extra successes. "8|(626)=22|++" is an 8 on the feat die, 6,2,6 on skill dice, a total of 22, and two great successes.
Last edited by Glorelendil on Mon Mar 10, 2014 8:26 pm, edited 11 times in total.
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Glorelendil
Posts: 5162
Joined: Mon Jan 13, 2014 5:20 pm

Re: Combat Simulator

Post by Glorelendil » Sat Feb 22, 2014 10:04 pm

Here's a sample fight from the log output (this is from the Spears: 4 run):
#957
Beorning Spearman attacks Orc Chieftan and rolls |24|+0
Orc Chieftan takes 9 damage (11 left)
Orc Chieftan attacks Beorning Spearman and rolls |21|+2
Beorning Spearman takes 15 damage (12 left)
Beorning Spearman attacks Orc Chieftan and rolls S|28|+0
Orc Chieftan attacks Beorning Spearman and rolls |17|+1
Beorning Spearman takes 10 damage (2 left)
Beorning Spearman attacks Orc Chieftan and rolls |21|+0
Orc Chieftan takes 9 damage (2 left)
Piercing blow!
Orc Chieftan is wounded!
Orc Chieftan dies.
Beorning Spearman wins 7%.
The roll format is: (S/G) | total | tengwar-count
The final 7% is the winner's remaining endurance
Note that the Orc did NOT attempt a called shot after the Beorning rolled a Sauron. I'll implement that eventually.
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Glorelendil
Posts: 5162
Joined: Mon Jan 13, 2014 5:20 pm

Re: Combat Simulator

Post by Glorelendil » Sat Feb 22, 2014 10:31 pm

Another update: I varied Stance, with Spears: 3
  • Defensive: 70% wins
    Open: 80% wins
    Forward: 88% wins
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Jacen
Posts: 13
Joined: Tue Feb 18, 2014 10:17 pm

Re: Combat Simulator

Post by Jacen » Sun Feb 23, 2014 3:07 am

This is an interesting idea as I am intrigued by how the game plays at higher power levels and find it difficult to calculate odds with the "swingyness" that the special symbols on the feat die introduce to dice averages.

Glorelendil
Posts: 5162
Joined: Mon Jan 13, 2014 5:20 pm

Re: Combat Simulator

Post by Glorelendil » Mon Feb 24, 2014 5:07 am

Update (mostly of interest to coders): after the initial test run I refactored the code so that weapons and armor are separate classes, each culture is now a sub-class of hero, and in general more stats are derived rather than hard-coded. (E.g., your damage derives from your weapon, your endurance derives from your body and your culture, etc.).
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Angelalex242
Posts: 1116
Joined: Mon Dec 02, 2013 7:52 pm
Location: Valinor

Re: Combat Simulator

Post by Angelalex242 » Mon Feb 24, 2014 7:04 am

Let's go for the biggest guns.

Elf, probably King's Envoy has the biggest shot here...

Bitter Keen Feel Grievous Great Spear, with a Spearman's shield... (Valor 6!)
Add Wood Elf Magic (top tier), Shadow Bane, Fell Handed, Deadly Archery (Wisdom 6)
Put him chain shirt...3D of armor is probably best (Though experiment with other things like Leather Corslet+Helm to see if it changes the win percentage)

(spears) 6
Bow 6

vs.

The WEREWOLF HIMSELF!

Glorelendil
Posts: 5162
Joined: Mon Jan 13, 2014 5:20 pm

Re: Combat Simulator

Post by Glorelendil » Mon Feb 24, 2014 8:14 am

Angelalex242 wrote:Let's go for the biggest guns.

Elf, probably King's Envoy has the biggest shot here...

Bitter Keen Feel Grievous Great Spear, with a Spearman's shield... (Valor 6!)
Add Wood Elf Magic (top tier), Shadow Bane, Fell Handed, Deadly Archery (Wisdom 6)
Put him chain shirt...3D of armor is probably best (Though experiment with other things like Leather Corslet+Helm to see if it changes the win percentage)

(spears) 6
Bow 6

vs.

The WEREWOLF HIMSELF!
Hmm...I hadn't thought about modeling opening volleys, but that's a good idea. I'll create an option for opening volleys.
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Glorelendil
Posts: 5162
Joined: Mon Jan 13, 2014 5:20 pm

Re: Combat Simulator

Post by Glorelendil » Mon Feb 24, 2014 9:07 pm

This is my last progress bump. I'll start editing the original post with progress updates for those who are interested. Just FYI.
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests