Author |
Message |
 |
|
 |
Advert
|
Forum adverts like this one are shown to any user who is not logged in. Join us by filling out a tiny 3 field form and you will get your own, free, dakka user account which gives a good range of benefits to you:
- No adverts like this in the forums anymore.
- Times and dates in your local timezone.
- Full tracking of what you have read so you can skip to your first unread post, easily see what has changed since you last logged in, and easily see what is new at a glance.
- Email notifications for threads you want to watch closely.
- Being a part of the oldest wargaming community on the net.
If you are already a member then feel free to login now. |
|
 |
![[Post New]](/s/i/i.gif) 2013/11/12 21:00:56
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Fresh-Faced New User
|
Hey guys, long-time lurker but first-time poster. I would like to start working on a project for a mathhammer or warhammer battle simulation program, but feel like I need to explain what I mean first. This is a bit of a long post, so bear with me; I promise there's a point to all this.
I'm a self-taught programmer. I've spent the past several years creating a college football simulation program and have been successful at it (successful = it makes money and works really well). That simulation program uses football teams' stats to predict the outcome of a match-up, including predicted statistics for their yards, points, chances of 'x' occurring, etc.
Since I've been working on that simulation program for several years, it's finally become stable, to the point where I hit a button each week and it does its thing. I'm looking for my next challenge and figured Warhammer would be a great place to look for a new project. I'm normally not big into mathhammer, but love the idea of possibly being able to input opposing units' statistics and equipment into a program and see, on average (maybe out of 100 or 1000 or 10000 battles) who would come out on top and what would be left on the table.
I've looked through the forum and found some similar sites, but the most common sites I see are where you just enter in a stat-line (3S vs 4T and 2A) and that's it. I can do that on a piece of paper if I really wanted. I want it to be as if I were playing my friend and out of 10,000 battles, how many times would my unit beat his? I'm thinking almost like a "Deadliest Warrior" for Warhammer (if you've ever seen the show.)
I know it would be a large project to take on, but I'm ready for a new challenge and am pretty sure I could handle it. This is where you come into play: I'm sure I'm going to miss something important, like Impact Hits or Stomps, that will need to be calculated. I know I will need to account for flank battles, rear battles, who is charging, Fear tests, possibly Break tests (if I take it that far), exploding Squigs, and the list goes on. What can you think of that I would need to incorporate, and what would you like to see in a battle simulator like this? I know the beauty is in the details, so help me out a bit with the details.
So far, I know I need to account for: (updated with The Shadow's info)
Charges (who charges, front/rear/flank, weapon differences on charges)
Multiple units vs. single unit
Horde modifiers
Weapons
Armor
Impact hits
Mounts
Poison
Characters
Challenges
Re-rolls (hits, wounds, armor saves, ward saves)
Specific army hatreds
Specific army fears
Automatic hits
Automatic wounds
Multiple wounds
Stomps
Armor saves
Armor piercing
Ward saves
Steadfast
BSBs
Banners
ASL/ASF
Regeneration
Flaming Attacks
Flammable
Ethereal
Killing Blow
Breath Weapons
Fight In Extra Ranks (spears, HE, etc)
Beastmen's Bestial Fury
OnG Choppas
Unstable
What else am I missing, and what else would you like to have in a program like this?
|
This message was edited 1 time. Last update was at 2013/11/12 22:36:15
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 21:27:37
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Bloodthirsty Chaos Knight
|
Click here, 5:10 in Definitely not exhaustive by any means, but it was a fun start. What language are you coding in? Do you want a UI? Do you want to make it web-based? I'm a programmer by profession, wouldn't mind talking about this more in depth and offering help. It's definitely a fun sort of project.
|
This message was edited 1 time. Last update was at 2013/11/12 21:30:49
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 21:45:33
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Agile Revenant Titan
In the Casualty section of a Blood Bowl dugout
|
Parry (not quite a Ward Save) ASL/ ASF Regen Flaming Attacks Flammable Ethereal Killing Blow Breath Weapons Fight In Extra Ranks (spears, HE etc) Beastmen's Bestial Fury (or whatever it's called) OnG's Choppa Rule And Unstable might come into it too. I think you're setting yourself up for a lot of work here, but it'd be awesome - and very useful - if you pulled it off! Good luck!
|
This message was edited 2 times. Last update was at 2013/11/12 21:47:09
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 21:47:36
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Fresh-Faced New User
|
Evertras,
I'd love some help if we wanted to get serious about it. I primarily code in Python, but have the knowledge to code in PHP if we decided to put it online instead of packaging it into an .exe program. Web-based makes the most sense to me because it will be able to reach the largest audience if it is web-based.
What came to mind when you were saying it wasn't exhaustive? I haven't played in about a year (just started a new job and took on the large side project of the college football simulation program) so I'm just now getting back into Warhammer and finding my memory to be pretty bad.
But yes, I would love to talk more details and if we decided on actually doing this, I think it would be a nice project. Automatically Appended Next Post: The Shadow,
Noted all of those, thank you! I think it's a large project, but I have no deadline and a chunk of free time each day to work on it. I also feel like I need to contribute something to the Warhammer community, so I think this would be a good start.
|
This message was edited 1 time. Last update was at 2013/11/12 21:49:34
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 21:51:20
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Bloodthirsty Chaos Knight
|
I'm saying the thing I did in that link wasn't exhaustive. You've listed way more stuff than I had put into it at the time, but that was only one night. I had basic WS/Strength/Toughness/Armor and some modifiers like Armor Piercing. Sadly I mostly use C++/C#. I've briefly dabbled in Python, and I've used PHP ages ago. I wouldn't have much trouble at least looking over your code and offering advice on that front. If you'd like I'd be happy to help out with some of the actual coding and design, but it seems like a valuable opportunity for you to learn more so I don't want to get in the way on that. It's always been a secret dream of mine to create an actual program that would allow two people to play a game online. I know there's Vassal, but I'm talking about a game that actually strictly adheres to all the rules specifically and automates everything correctly. Of course, this would be illegal as #$(%, but it'd be fun!
|
This message was edited 1 time. Last update was at 2013/11/12 21:53:04
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 21:55:59
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Fresh-Faced New User
|
Oh, that was you in the video! That makes more sense now.
I think I am ultimately going to have to code it in PHP. It will reach a larger audience and removes UI design, and that is good because I'm terrible at UI design.
The thing that worries me about PHP is I know I can do WAY more in Python that would accommodate a much larger array of scenarios and would be a lot more detailed. I just don't know how I could get it from Python to web-based without redoing the whole damn thing in PHP. That's probably from my unprofessional knowledge of coding. Ideas?
|
This message was edited 1 time. Last update was at 2013/11/12 21:58:37
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 22:09:15
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Bloodthirsty Chaos Knight
|
Check out this link. Ideally you want to create a library of functionality that you can call from PHP. For example, if you have a Python function called IsHit that takes in a number of stat and spits out a boolean. Then in PHP, you'd run the script with parameters that ask whether something hit or not. Or maybe you could create a file with all the data for both sides in it, then run the python script that then looks for that file and produces some sort of output that gets fed back into PHP.
Or you could learn C# and .NET and it's super easy to make a web based program that can pull in a library you've created so that you could use it in an executable later or run it against unit tests super easily. >.>
I love C#. <.<
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 22:14:18
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Fresh-Faced New User
|
Ok, that makes sense. I'm going to start PMing you instead, because I'm still hoping some people will dump more ideas into this thread once everyone gets off work or it gets later in the evening.
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 23:12:55
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Longtime Dakkanaut
|
This could just be simple Javascript all in the client-side on a web page. The calculations are all addition/subtraction/multiplication/division. I don't believe there is much value in running theoretical battles over thousands of instances, because that's not how the game works. You want to see if unit X gets the charge, they have these abilities, how many wounds they do, when they break (or break other unit) etc etc.
You could make up an AI where every unit lines up nice and proper and smashes into each other blindly, but I don't think that is of value. Players want to know how much better adding a shield is against certain enemies or buying a Mark of Khorne or whatever.
There was an old web site I used to use like that. It had most of the buffs like poison and kb and ASF and and you could add ranks.
You really want to know efficiency. Wounds per point per round vs. a target. That tells you nearly everything you need to know. You want to give info to the players, not hide it under a mound of statistics. Saying there is a 32% chance 12 ironguts will beat 18 ogre bulls doesn't help that much. Because it's way more granular than that and you often aren't letting units just fight it out until they die.
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/12 23:29:47
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Bloodthirsty Chaos Knight
|
Could certainly be done in Javascript, but that's less reusable, messier, and way less fun.
Good point on the points-per-wounds thing. Definitely a good output. And I don't think going through a bazillion battles is necessarily the way to go either. Should just be able to run pure chance and probability based on parameters.
|
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/13 00:56:39
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Fresh-Faced New User
|
I agree on the wounds per point comment. I think you're right about knowing what each item will add and how much value it offers vs. showing someone that their unit stands a 32% chance against another unit. Thanks for the input.
|
|
 |
 |
![[Post New]](/s/i/i.gif) 2013/11/13 05:44:13
Subject: Mathhammer/Warhammer Simulation Program
|
 |
Longtime Dakkanaut
|
I was going to do something similar ages ago but just lamed out.
In most cases, unit upgrades are worthwhile at SOME point. But there are so many variables it's hard to know off the top of your head. Like, ogres can get ironfists, AHW, they can also be buffed to have regen, +1S, +1T. That's an awful lot of variation. You may want to know what will it take for them to come out ahead of trolls. How about Chaos warriors? If you know you're likely to survive one round but the next round you'll need +1S or T, that's very helpful.
So you could do something like just have checkboxes for all the special rules. Don't really care how you get them. Then have generic fields for WS/S/T/I/A. And then how many ranks. And the TOTAL cost. That way you can amortize the cost of banners and other magic items.
You may get trickier and have a separate section for characters. Basically exactly the same as the first one. And you could choose where the enemies wounds get allocated, a or b. Or simply ignore the hero(es) in terms of wounds. But they still will take up frontage, so you have to reduce that. Though I think most people can either put in heroes vs. heroes or units and you probably don't have to mix them.
|
|
|
 |
 |
|