Showing posts with label battle calculator. Show all posts
Showing posts with label battle calculator. Show all posts

Monday, October 16, 2023

Warmachine Card Creator V3

As we get closer to Warmachine Mk4 having rules for all the legacy models, but with no Mk4 cards available, I started thinking about tweaking my card creator to handle the slight changes in the way model profiles are recorded. I also had some ideas for making it easier to print cards and that sort of thing. And then one weekend I just said "OK, this is happening". And it did:

Warmachine Card Creator V3

It took pretty much two full days of work, but I finished it and wrote a tutorial in a single weekend. Which was not bad considering the changes to the underlying framework that I ended up implementing. I spent another week or so adding tweaks and small improvements, and now I'm pretty happy with where it is.

Oh, and a few months earlier I was trying to remember some probabilities and decided I wanted my own reference, so I quickly wrote up a basic dice probability tabulator that can generate probability tables for an abitrary number of dice. All the dice must have the same number of sides, but you can choose between several common dice. It also includes the numbers for rerolls and "Hand-of-Fate"-type abilities. It does however use a very basic brute-force approach that can take quite a long time when the numbers get too high, potentially timing-out in the browser. Oh well, it's probably fine for typical wargaming use. It does what I need it to anyway.

Tuesday, May 17, 2016

Final MkII Battle Calculator Release

I've finally gotten the MkII Battle Calculator to the point where it basically works for most normal situations. There's still a few special rules that it doesn't deal with (like Convergence force fields and Crit Shred)... that I know of, and probably a whole bunch that I haven't thought of, but it finally handles the five W's: Warcasters, Warlocks, Warriors, Warjacks, Warbeasts.

It also displays more information now, though not quite everything that I was originally thinking of. I initally planned to have it display the chance of both a Warjack's cortex and main weapon surviving, but I decided it wasn't worth the effort at this point, especially since it's a simple multiplication of the two numbers that it does give you.

I can't promise that it doesn't have any bugs (actually, I'd be pretty surprised if it didn't), so it might be a good idea not to put too much faith in it right now. I don't really have any ideas for how I could have made it more robust, but again it doesn't really matter since it'll be obsolete very soon.

Some things I would like to do for the next version:
  • Make it look nicer
  • Make the interface neater and more modular
  • Display the actual damage done by the attacker assuming infinite damage boxes on the defender (currently the simulation stops when the defender dies, so we don't actually know the total damage done; though you can basically figure it out for simple situations by creating a warrior with, like, a million damage boxes).
  • Allow simulation of multiple attackers (right now you can fake it for attackers with a single weapon profile by adding focus for each extra attacker). 
  • Comment the code better so that it's easier for others to read it and give me feedback.
  • Give more structured visual feedback / debug info to make it easier to catch bugs and check that everything is actually working the way it's supposed to.
  • Perhaps add some way of saving out the profiles, so you don't need to enter a model's full profile every time you want to run a simulation with it (not sure if I would be getting into some sticky I.P. territory here).

We'll see how it goes once I've had some time with MkIII.

Tuesday, April 26, 2016

Calculating... please wait...

I started working on a Warmahordes battle simulator a long time ago, but I've been spending less and less time on it as my interest waned (not like I don't have other things to do after all; so many unpainted models...). However, with the announcement for MkIII, I decided to just post it in it's current state, since it'll be outdated soon anyway. I'll try to at least get all the model and weapon special rules working before the new edition comes out. Fingers crossed.

Right now the basic simulation should be functional: just enter the attacker and defender stats and the number of simulations to run and it should pretty much work. I tried to make it as simple as possible while still encapsulating most of the model rules that I am familiar with, but there are some fiddly bits; for example boosting, dropping dice, etc. Hover the mouse over any labels for an explanatory tooltip.

If you're familiar with javascript you can view the page source code to see how it works. Let me know if you catch any bugs or anything.