Switch Theme:

Checkbox grid generator  [RSS] Share on facebook Share on Twitter Submit to Reddit
»
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.




Made in us
On a Canoptek Spyder's Waiting List





I've found that using dice to keep track of how many 'crons I have left before phase out leads to too many
mistakes for me, so I wrote up a perl script to generate a grid of check boxes to use for tracking the same
information. I thought it might prove handy for other people too, so I figured I'd post it. It's pretty simple,
just invoke it as follows:
checkboxes.pl <#of empty boxes> <#of boxes per line><total # of boxes>

So for example, to make the grids that I'll be using for the tournament I'll be playing in this weekend it looked
like this:
(note: it looks much better if you hit "view plain")
 Filename checkboxes [Disk] Download
 Description Check box perl script
 File size 2 Kbytes


Can you read my avatar? 
   
Made in us
Member of the Malleus




Fort Worth, Texas

Checkboxes are a good idea. Thanks for sharing!
   
Made in us
[DCM]
Tilter at Windmills






Manchester, NH

That's a great tip, and I think would make a great article! Any interest in making it one?

http://www.dakkadakka.com/wiki/en/Article_Tutorial

Adepticon 2015: Team Tourney Best Imperial Team- Team Ironguts, Adepticon 2014: Team Tourney 6th/120, Best Imperial Team- Cold Steel Mercs 2, 40k Championship Qualifier ~25/226
More 2010-2014 GT/Major RTT Record (W/L/D) -- CSM: 78-20-9 // SW: 8-1-2 (Golden Ticket with SW), BA: 29-9-4 6th Ed GT & RTT Record (W/L/D) -- CSM: 36-12-2 // BA: 11-4-1 // SW: 1-1-1
DT:70S++++G(FAQ)M++B++I+Pw40k99#+D+++A+++/sWD105R+++T(T)DM+++++
A better way to score Sportsmanship in tournaments
The 40K Rulebook & Codex FAQs. You should have these bookmarked if you play this game.
The Dakka Dakka Forum Rules You agreed to abide by these when you signed up.

Maelstrom's Edge! 
   
Made in us
On a Canoptek Spyder's Waiting List





Here's another version written in java with a friendlier interface. More people are likely to have
java than perl on their machines, and this one can be run with out having to be a console jockey.

You should just have to double click on the downloaded file, and it should go. If not use your
systems preferred method of launching commands and run "java -jar CheckBoxGenerator.jar"

Let me know either here or via PM if you have any feedback. I'll set up an article in the not too
distant future.
 Filename CheckBoxGenerator.jar [Disk] Download
 Description A version that does the same thing in java, with a GUI
 File size 6 Kbytes


Can you read my avatar? 
   
Made in us
[DCM]
Tilter at Windmills






Manchester, NH

Even awesomer!

Yes, that's a word.

Adepticon 2015: Team Tourney Best Imperial Team- Team Ironguts, Adepticon 2014: Team Tourney 6th/120, Best Imperial Team- Cold Steel Mercs 2, 40k Championship Qualifier ~25/226
More 2010-2014 GT/Major RTT Record (W/L/D) -- CSM: 78-20-9 // SW: 8-1-2 (Golden Ticket with SW), BA: 29-9-4 6th Ed GT & RTT Record (W/L/D) -- CSM: 36-12-2 // BA: 11-4-1 // SW: 1-1-1
DT:70S++++G(FAQ)M++B++I+Pw40k99#+D+++A+++/sWD105R+++T(T)DM+++++
A better way to score Sportsmanship in tournaments
The 40K Rulebook & Codex FAQs. You should have these bookmarked if you play this game.
The Dakka Dakka Forum Rules You agreed to abide by these when you signed up.

Maelstrom's Edge! 
   
Made in us
On a Canoptek Spyder's Waiting List





I forgot to mention, I've packed the source code in with the jar, in case anyone is interested in seeing it.

Can you read my avatar? 
   
Made in us
Grovelin' Grot




Philly

I'm dumb. I dont' get it. Can you break it down real quick?

Edit: Wait, before I confirm me being dumb. Is it that simple that you just put down your starting number in the first and each turn just take away? Or, are you checking the the number of deaths each turn?

This message was edited 1 time. Last update was at 2010/03/20 09:35:50


 
   
Made in gb
Dispassionate Imperial Judge






HATE Club, East London

I don't know what any of this means.

   
Made in us
On a Canoptek Spyder's Waiting List





mughzee wrote:I'm dumb. I dont' get it. Can you break it down real quick?

Edit: Wait, before I confirm me being dumb. Is it that simple that you just put down your starting number in the first and each turn just take away? Or, are you checking the the number of deaths each turn?


When you play necrons, you have to keep track of how many dudes you have left. If you get down to <=25%, you phase out and loose the game. In the past I've
kept track using 2d10. I've recently found that I'll make mistakes when I do it that way though. So I figured I'd make checkboxes to mark every time I fail a WBB
roll.

ArbitorIan wrote:I don't know what any of this means.

Since I won't necessarily be playing the same list every time, the number of checkboxes I'll need will change from list to list. Rather than edit my check box
file every time I want a new number of boxes, I wrote a program to make the file for me. The first program was in perl, which is a handy language which ships
by default with most Linux distros, and is on OS X, but is a separate download for Windows. Further, the first program is command-line only. This isn't too
big of a problem for me, but not everyone is comfortable with the command-line. So I decided that given the majority of people here probably don't have
perl on their system, but likely have java, that I would rewrite it using that language. And as long as I was rewriting it, I figured go ahead and build a GUI
for it so that you don't have to be a console jockey to use it.

So both programs produce the same output (almost, the java version has a place for you to put some text that will be written out under the checkboxes), but
the java version is more likely to be useable in more places, and has a more user friendly interface. On most systems you should be able to just double click
on the jar file and it'll run the program. Jar files are like an exe for java, they contain the executable code and some other information that the system needs.
The cool thing is that they're just zip files though, so you can change the extension and decompress them if you want to know what's in one. I almost always
include the source code for my programs in the jar files I make, so if you wanted to read how the program worked (and knew java) you could unzip the jar
and read the Generator.java file. I didn't make the comment about the perl source because perl is different in that the source and the executable are the
same.

Can you read my avatar? 
   
Made in us
[DCM]
Dankhold Troggoth






Shadeglass Maze

Thanks for the explanation... I didn't get it at first, either

And I'm trying to teach myself java right now! So maybe I will have a look at your source code...
   
Made in us
Grovelin' Grot




Philly

so your program just automatically generates the number of boxes you need for each Necron subject to the rule. That's cool

 
   
Made in mt
Stalwart Space Marine





Malta

I don't get it.........



Dreadnoughts: Dying is a thing of the past....... 
   
Made in us
On a Canoptek Spyder's Waiting List





RiTides wrote:
And I'm trying to teach myself java right now! So maybe I will have a look at your source code...


Coding in Eclipse is a big help, it lists class members and methods as you go. If you don't already
have a book that you're working from, I highly recommend the O'Reilly books. I've very rarely had
one from them that wasn't good. Maybe 1-3 in the 25 or so that I own.

Can you read my avatar? 
   
 
Forum Index » Dakka Discussions
Go to: