PDA

View Full Version : MathHammer/turn calculator/dice roller!



CommDante
23-11-2009, 05:33
I guess I was hijacking another topic, or at least it felt like I did. So I made my own topic. Not only because of that, but I need some more input myself.

I'm working on a program (didn't knew about the other project untill the day before yesterday). It started out to be a personal mathhammer, but it kinda turned out to be a turn diceroller. Only shootingphase (no multiple wounds in calculations yet, on the list though) atm. It wasn't much of an addition to go from a mathhammer to one, so I reckoned: why roll ~50 dice orso (I lately realised it's sometimes more than 100 dice) and do all the manual checkings, when a program can do it for you?

EG: 20 kroot rapid firing with 3 oxes too is 46 dice. With 12 hounds extra, in CC it will be even more: Kroot: (20*(2+1))=60, Oxe: (3*(3+1))=12, Hounds: 12*(2+1)=36) with a total of 108 dice. I think either 'nids or Orks have the biggest groups though. And that's just 1 squad. I've seen people complaining about other people only rolling 10 dice at most and having to remember themselves (not the one actually rolling) as to what hit/wound or what not.
This program could help a lot in those situations. Granted, needs a laptop or netbook as I've no idea how to compile for PDA/MDA's. A release for the PSP should be doable in the longrun though.

It's a terminal-program (layout optimized for it) that runs under Linux (cygwin1.dll helps with running under Windows ... No idea about Mac (any windows or linux emu should be able to run it though)). It'll be some sort of freeware (don't crack/use my coding/sell etc ..), imo: too much time goes into rolling and checking.

I don't know if "Sepharine" is making an actual program, or some sort of script or an excell-sheet orso, but it seems our goals are somewhat different anyway.

I was wondering if people would find it too troublesome to adjust stats and roll sepperate (with the abbility for less rolling done the first and sequential times to compensate). I'm also wondering what the max on different stats per squad can be (it can be done dynamic I guess, but atm that would be a little troublesome to make for me). Seems 6 different stats is about the max in 1 squad. Currently it's just 1 with the ability to adjust all of them (without changing the actual stats themselves).
Also: will just 2 lists work, or would you rather be able to choose out of more? And if so, how many max? Or should it be dynamic altogether so one doesn't need to rename lists?

My simple dice roller is maxed at 500 dice atm (simple to improve to 32k dice). I still need to add total/avg per 1-6 rolled, but it has no hurry I guess, it gives a total of all dice rolled (need a 2d6? use 2 dice, 3? same ... 450? same!). Anyone care for more dice rolled btw? :?).

I'd like some more input on what people would like to see in such a program, maybe tank stats (imo hardly any rolls/not very interesting) or X different stats (WpnS/S/T) etc per squad (Would be nice if a max could be specified)?

If anyone fancies to make a multi-platform-GUI, PM me plz (examples will help), otherwise it will most likely stay being a termnial program.

If anyone would like to BETA-test: send me a MP why you think you can help me, prefferable with a MSN-address at which I could talk to you. I'm at GMT+1 btw!

Otherwise, everyone is welcomed to give ideas. Especially since it'll be free: credit will be given where credit is due!

Imperius
23-11-2009, 05:36
Well, you can go check out the iTouch dice roller application for inspiration...Which I already use...

It has everything from D4-D100, with custom amounts of dice rolled at a time. Basically all it is, you select a dice type (e.g. D20) select how many dice (50) and it will roll that many D20s.

CommDante
23-11-2009, 05:56
That's just a simple dice roller though. Mine will actually do an entire shooting phase for a squad atm, only wound assignment is a little tricky. But one could just say "1st wound goes on that, second on there" etc and see what the save-rolls do on those assigned. Besides the entire phase rolling, it also gives the percentage actually done per subphase and the calulated percentage of that subphase and total of both.

I'm still not entirely sattisfied about it atm, so assaultphase will have to wait a bit. Eg: multiple wounds in a squad are ignored atm.

Lord Solar Plexus
23-11-2009, 11:19
I'm playing 40k in order to roll buckets of dice, so I'm afraid such a program sounds very much like non-alcoholic beer.

Fideru
23-11-2009, 13:06
I'm playing 40k in order to roll buckets of dice, so I'm afraid such a program sounds very much like non-alcoholic beer.

I never knew such a thing existed.

My reality is shattered.

Bunnahabhain
23-11-2009, 17:12
I'm playing 40k in order to roll buckets of dice, so I'm afraid such a program sounds very much like non-alcoholic beer.

Seconded. I really can't see the point of this for most things. Maybe when you've got full 30 boys mobs charging, and don't have 120 dice, but how hard is it to do 30 dice 4 times?

There is very good lower alcohol beer available( ~2%) from some brewers, which is good if you want a beer, but circumstances don't allow stronger stuff. Combat patrol is much the same, good in its own right, but it doesn't have the same potential as the full version...

CommDante
25-11-2009, 01:17
My point/purpose wasn't really about how hard rolling some 200 dice for a squad per turn was, just that it was time consuming, especially in big battles. Imo most time is spent on dice rolling and checking, but if you/most people preffer that to actual strategy/playing the game: I guess there isn't much point in releasing it/making it f00l-proof! It's not as I've seen anyone posting here he/she'd fancy it, to me it seems a waste of time perfecting it, if it works fine for me! I thought some other people would like to cut their playing time so they could field larger armies, but I guess for most people it's more of a cheap way to "play the dice" instead of a strategy game with "the more, the better"-idea on the field.

Oh well, can't blame one for trying. I guess no one really cares and I might as well keep it private.

Arakanis
25-11-2009, 01:43
In before the "Mathhammer doesn't work, wah wah" crowd :)

That's pretty cool there though, could be useful to working out optimum situations.

gwarsh41
25-11-2009, 01:49
I'm playing 40k in order to roll buckets of dice, so I'm afraid such a program sounds very much like non-alcoholic beer.

Buckets of dice + Alcoholic beer = fun

Take out either... its doing a bunch of basic math and rulers lol

Bunnahabhain
25-11-2009, 02:05
I can't see how it would speed things up though, for more than a handful of extreme cases. A handfull of dice, vs having to input assorted variables into a programme.

Any reasonable player can tell you the basic stats of what they commonly use, and so what they need to hit wound, etc common opponets, so you don't spend time looking up stuff.

CommDante
25-11-2009, 12:39
I can't see how it would speed things up though, for more than a handful of extreme cases. A handfull of dice, vs having to input assorted variables into a programme. (...)
I guess you're right, it soo much faster rolling a dozen dice and checking them 3 times orso instead of "input assorted variables" 5 times, especially in assaultphases.
--> ( (army)(squad) against (army)(squad) do (shooting//assault-phase) = 5 variables )


And what has alcoholic beer have to do with "doing a bunch of basic math and rulers"? :confused:

DeadlySquirrel
25-11-2009, 21:55
alchoholic beer has EVERYTHING to do with maths =p


back on topic, this sounds quite complicated, i would rather roll dice

jlmb_123
25-11-2009, 22:03
I think the clear answer is that you need to offer some kind of beer with your programme.

CommDante
26-11-2009, 23:03
Meh, only 1 person seemed to be interested. So I PM-ed him an Alpha release.

The rest of you guys/peeps hardly make any sense at all anyways, contradicting yourselves and all. :P

Tves
27-11-2009, 03:47
hoping for coherant arguments and insightfull commentary on an online forum...

But on topic, the only "problem" with something like this, is the need for transparancy. For example if your opponent picks up a bathtub full of dice rolls them and picks out the ones that scored high enough, there is no question/doubt about authenticity (except in the case of those who use special rolling techniques, aka scum of the earth).
But when the guy opposed you presses a button on the screen of his iPhone then looks up and says 11 wounds, you're going to some trust issues.

Dark_Templar
27-11-2009, 03:56
Honestly, I love the fact that you are going to the effort to do something like this, but if you are not able to bring it to the iPhone or WM6, it is not going to be massively helpful, and as others have noted, it probably wont be much faster (if any) once you have to bung in stats and combinations.

CommDante
27-11-2009, 15:04
iPhone has a SDK for which has to be paid afaik. I also don't have one myself. PSP is rather easy (only need to change input and "menus"), as I already have some experience with it. I'll have to look into WinMob.

As for the rolls, they're all done on screen for various reasons. (eg wound allocation or some models have invulnerable save or whatever, just verification/interest eg).

CrownAxe
27-11-2009, 20:49
I'm playing 40k in order to roll buckets of dice, so I'm afraid such a program sounds very much like non-alcoholic beer.

This man speaks the truth

and my 300+ d6 agree

sucramreverse
27-11-2009, 21:26
This is actually quite interesting, and if done right can save some time for larger games. BUT, as someone said, it'd end up being a trust issue with your opponent. Especially for me, since I am also a programmer, I could edit the "randomness" and put it in my favour. whereas that is also possible with loaded dice, it would be a lot easier virtually. Besides, most players that I know seem to have the imperial mindset when it comes to technology in their games...

That being said, it would be nice for play testing. And maybe finding optimums, but there are better ways of doing that than trial and error :P

Dark_Templar
27-11-2009, 22:12
iPhone has a SDK for which has to be paid afaik. I also don't have one myself. PSP is rather easy (only need to change input and "menus"), as I already have some experience with it. I'll have to look into WinMob.



I understand this is wanting to be done as cost effectively as possible, but I would have thought more people would have iPhones / Smart Phones / PDAs than PSPs.

Unless of course you are building it solely based on your own gaming group, which I obviously cannot comment on.

kongnico
27-11-2009, 22:23
how do you handle that dices are random, and random functions of computers aren't :)? (i suggest just ignoring it, but it's an issue nonetheless.).

CommDante
27-11-2009, 23:12
Why opponent's trust? Just check the numbers yourself. ;)

For me it will be easier to port to PSP (though I realise it would hardly be worth it, not many peeps have one, let alone on CFW), since I know it'd only need minor adjustments.
I think the idea of WinMobile is a very good one (since I've got a MDA myself too), but I'll need to look into it to see if it even has something like a terminal and/or which how to compile for (MIPS/)WinMob.

There is a randomized loop with 7+(0 to 19) to more randomize, seeing as random is done on the clock, else it might show the same number at certain clock speeds. I've also added a simple dice roller for the purpose of checking (I just made it 1000 max rolls and added which numbers are rolled in the total).

I think the shooting phase isn't that interesting for it (although the rolled and calculated math-hammer should still be interesting), but the assault phase should be quite interesting imo. I also would like to add different stats and/or weapons per squad, since I only have white and red dice and, since rolling for a devastator squad can be a little annoying.

Edit: Hmm, just noticed the "seed"/base number is 1970-'till now in seconds counting. It seems it doesn't like 3 much though, just did 12 times a 1000 roll, and was 3rd at best. All the others had a first or close second at least.

CommDante
01-12-2009, 00:29
A sample of an output:
75861
(stretched to show more, depends on resolution 'cause it's just a terminal window).

The "Currently Selected" part is the beginning of the actual menu, the part before it is just for confirming what has been read from the 2 army files (it isn't f00l proof yet, so it's to easier see where the mistake is atm).
The part with stuff between brackets are the input-keys that will be read (in this case "s" is entered, for shooting phase). After that comes the execution of the "shooting phase" with a repeat of the menu again, waiting for input.

Mattyt84
18-03-2011, 09:56
Does anyone have a copy of this program that i can get? Checked CommDante status and he hasn't been on this sight for about 3 months. And i really want 2 give it a try.

Gingerwerewolf
18-03-2011, 10:33
I'm playing 40k in order to roll buckets of dice, so I'm afraid such a program sounds very much like non-alcoholic beer.

Summed it up in one.

Dice are part of the game and I just cant get worked up about a program that does the rolling for me.

fluffymcfluff
18-03-2011, 12:08
I'm playing 40k in order to roll buckets of dice, so I'm afraid such a program sounds very much like non-alcoholic beer.

This +1

96 dice at once is my personal best, no bucket but lots of beer.

Windir83
18-03-2011, 13:00
the actual rolling is half the fun of the game...the other half is the look on your opponents face when you roll a bunch of hits for your power klaws :D