1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The April Poetry Contest has opened for voting! For more information, click here.
    Dismiss Notice

GreenyRepublic's (Very Rudimentary) Age of Sigmar BattleSim!

Discussion in 'General Hobby/Tabletop Chat' started by GreenyRepublic, Jun 21, 2017.

  1. GreenyRepublic
    Saurus

    GreenyRepublic Well-Known Member

    Messages:
    79
    Likes Received:
    376
    Trophy Points:
    53
    So, those of you who've been following my profile status updates closely may have picked up on the fact that I've made myself a new toy to play with. Having been wanting to give Age of Sigmar a go for a while (on the sole condition that I can still call my lizzies Lizardmen) and also wanting to know how well my army will stack up against the other races out there, I decided to put my expensive university education to use and write a little text-based application to test things.

    Ladies and Gentleslann, I present...

    The Age of Sigmar Fight-O-Matic 0.5!

    Download/Clone/Fork it on GitHub!


    Okay, let's get the boring stuff out the way first: this is very much in the early stages, the Fight-O-Matic can functionally simulate melee combat (ranged combat to come very soon) between two units to its end (one side entirely eliminated), and run a user-defined number of repetitions in order to crunch out some averages and other interesting numbers (average number of units left after a win, etc.).

    There are currently no special abilities or upgrades (including weapons with weird rules), though I will try and include these at a later date. It also makes some big simplifications with regards to things like unit positioning/front size, as adding things like model positions and actual range checks would also mean having to program things like movement, pile-ins, etc. Basically it would be a nightmare, so I've kind of abstract-ified it so only a maximum number of models from each side can fight at a time.

    I will stress that as a result of the above, the Fight-O-Matic is really only intended as a rough guide - something that gives you a general idea of 'how does unit x stack up against unit y'? I will accept no liability in the event of chronic embarrassment and/or upstaging at tournaments, nor the wetting of the floor at your local Gee-Dubs as a result of the Stormcast Goldfags having a super special wank ability that drowns your models in Holy Sigmajizz(tm), that the Fight-O-Matic didn't include in its calculations.

    Finally (finally) I'll add that the program is, at the moment, a bit of a mess and the output it produces may not be sparklingly formatted, and it'll crash if you do some bad input. I do very much intend to tidy things up soon though.


    'Alright Greeny you cynical bastard, how do I use this thing?'


    To run the simulator, run the .exe, making absolutely sure you've extracted the files from the .zip and placed the 'data' folder and the .exe in the same directory. Simply enter the name of a unit (no prefixes/faction names required), the number of models you want, and repeat for the second side. Enter the number of battles you'd like to run and whack enter. The FOM will do its thing and spit out some tidy statistics at the end. Neat, right?

    As-is, the FOM reads faction/model/weapon data from a series of XML files (stored in the 'data' directory), adding new models, weapons, or entirely new factions can be done yourself if you're familiar with XML. As I sadly don't have the time to add every single model myself, right now there are only a very few models from the Seraphon, Stormcast Eternals, and Skaven factions. I'll add more bit-by-bit as time goes by (at least finish two complete factions), but again I've linked the GitHub repository so we can turn this into a collaborative effort if anybody fancies doing that.

    In the meantime, if you want two units to be tested against one another but don't know how to do XML or any of that wank, then please leave a reply to this thread with your request and I'll sort it all out for you and post the results!


    Here are some features I'm planning to add soon, in rough order of priority.
    1. Ranged combat.
    2. Selector for batch/individual battles. (DONE)
    3. Unit upgrades.
    4. Special weapons and abilities.
    5. Build a GUI-based version off of the current logic.

    Do have fun, and if you have any suggestions or bug reports (besides the obvious) or whatever then please let me know. Again, any contributions of model/weapon XML files would really be appreciated, both by myself, and anybody else who wants to use this thing.
     
    Last edited: Aug 11, 2017
    Boboassa, Nefertem, Ritual and 3 others like this.
  2. Aginor
    Skink Chief

    Aginor Well-Known Member

    Messages:
    1,786
    Likes Received:
    3,510
    Trophy Points:
    113
    Hmmmm..... interesting. Although I fear that some abilities (useful ones to boot) will be VERY hard to simulate halfway accurately, especially those that are either dependent on movement or cause it.

    btw: which version of Visual Studio does it work with best? Any of the free ones?
     
    Ritual likes this.
  3. GreenyRepublic
    Saurus

    GreenyRepublic Well-Known Member

    Messages:
    79
    Likes Received:
    376
    Trophy Points:
    53
    Oh man, doing any of the ones like 'wary fighters' or those things would kind of require me to add actual unit positions and the ability for the user to set them. In fact it would be easier for me just to write a full-fledged graphical AoS tabletop simulator-y thing. I'm keeping the scope of this to straight-up combat, so I'll stick to implementing any upgrades/abilities that directly affect melee combat - re-rolls, rend ignores, etc, since those are still pretty important I think.

    I used Visual Studio Community 2017, haven't tried it with any other versions.
     
    Ritual likes this.
  4. The Red Devil
    Troglodon

    The Red Devil Defender of Hexoatl Staff Member

    Messages:
    678
    Likes Received:
    669
    Trophy Points:
    93
    @GreenyRepublic interesting project! Looks great so far.

    Its a good idea to keep it MVP (minimal viable product) and flesh it out with more features like you plan, this allow for feedback from users, and a faster development cycle between releases.
     
    Ritual likes this.
  5. pendrake
    Skink Chief

    pendrake Well-Known Member

    Messages:
    1,851
    Likes Received:
    1,970
    Trophy Points:
    113
    @GreenyRepublic if you try adding calculations having to do with "unit positions" maybe limit the scope of this to a specific and admittedly rare positional situation:

    A Bridge Fight

    Assume that both units are facing each other on a bridge that is table length long and 1 to 10 inches wide. Maybe the user could set the width (?) That constraint ought to simplify a few things...the numbers that can pile in and such.
     
    Aginor and Ritual like this.
  6. Nefertem
    Cold One

    Nefertem Well-Known Member

    Messages:
    103
    Likes Received:
    265
    Trophy Points:
    63
    Hi there,
    great thing to start programming such a combat simulator. I added some units (ironjawz), run some fights, and thought it would be very useful to implement "ignore rend" in the program. I saw your list of "things yet to do" and think this would be a major point, as actually the outcome of the calculated fights are quiet ... disappointing, as long as enemy's rend is not negated.
    All in all a cool thing, glad you made it!
     
    Ritual and Aginor like this.
  7. GreenyRepublic
    Saurus

    GreenyRepublic Well-Known Member

    Messages:
    79
    Likes Received:
    376
    Trophy Points:
    53
    Yeah, there are some fairly important things that aren't yet in place, however they are definitely on the way. I just can't say exactly when I'll have them done.

    Would you be interested in contributing your Ironjawz XML files to the project? If you don't use GitHub then feel free to just attach them here in a .zip or something.
     
    Ritual likes this.
  8. Nefertem
    Cold One

    Nefertem Well-Known Member

    Messages:
    103
    Likes Received:
    265
    Trophy Points:
    63
    I don't use/have github. I could mail them to you, just pm me. As I'm on a business trip earliest by Saturday this week.

    Another thing I came across :
    In the data files you already implement unit sizes. When running the program you still have to enter the "Number of Models".

    A) is this number n for multiples of the chosen unit's size (n=2, so 2*10 saurus warriors), or
    B) is n the number of models in the unit (n=6, 6 saures warriors)?

    Proposal: hitting return tells the program to use the standard value of the unit size as in the data file, whereas entering a number tells the program to use n models to calculate combat.
     
    Last edited: Jun 29, 2017
    Ritual likes this.
  9. Boboassa
    Saurus

    Boboassa Active Member

    Messages:
    61
    Likes Received:
    133
    Trophy Points:
    33
    Pretty good project!
    Some abilities will be I nightmare to implement though...
     
    Ritual and Aginor like this.
  10. Nefertem
    Cold One

    Nefertem Well-Known Member

    Messages:
    103
    Likes Received:
    265
    Trophy Points:
    63
    @GreenyRepublic : if I can further assist you just let me know. In dem Sinne...
     
    Ritual and GreenyRepublic like this.
  11. GreenyRepublic
    Saurus

    GreenyRepublic Well-Known Member

    Messages:
    79
    Likes Received:
    376
    Trophy Points:
    53
    @Nefertem Vielen Dank! Ich werde Sie mitteile. :)
     
    Nefertem, Aginor and Ritual like this.
  12. GreenyRepublic
    Saurus

    GreenyRepublic Well-Known Member

    Messages:
    79
    Likes Received:
    376
    Trophy Points:
    53
    Big-ass update!
    I rewrote the entire app in C++, made a fancy menu, and did some other shizzle. Still a heavy WIP but give it a look! Batch battle number crunches will now be outputted to a .txt file in a folder in whichever directory you put the program.

    Enjoy!

    EDIT: There's no direct .exe download link for this one, just the GitHub page link. Download it as a .zip and run the .exe if you want to use it.
     
    Last edited: Aug 11, 2017
    Aginor and Ritual like this.

Share This Page