Trying to Make a codex

Ive been making a calculator that will take certain armies from warhammer 40k and let the user build an army. Currently i have been trying to use a text file for each army such as this.

[code]
Eldar CostMinMax
Addons
Warlock 25 3 10 ~ Conceal 15 Destructor 10 Embolden 5 Enhance 15 | # Spiritseer 6 Singing_Spear 3 Jetbike 20 |
Dire_Avenger_Exarch 12 1 1 ~ Two_Shuriken_Catapults 5 Diresword_and_Shuriken_Pistol 10 Power_Weapon_and_Shimmershield 15 | # Defend 15 Bladestorm 15 |
Warlock_Jetbike 45 1 1 ~ Conceal 15 Destructor 10 Embolden 5 Enhance 15 | # Spiritseer 6 Singing_Spear 3 |
Troops
Guardians 8 10 20 ~ Bright_Lance 30 Missile_Launcher 20 Scatter_Laser 15 Shuriken_Cannon 5 ~ Starcannon 25 | # Warlock 25 |
Dire_Avengers 12 5 10 # Dire_Avenger_Exarch 12 |
Rangers 19 5 10 | //Pathfinders 5 per model
Storm_Guardians 8 10 20 ~ 1_Flamer,_1_Fusion_Gun 12 2_Flamers 12 1_Flamer 6 2_Fusion_Gun 12 1_Fusion_Gun 6 | # Warlock 25 | //0 - 2 Flamers and/or Fusion Guns
Guardian_Jetbike 22 3 12 # Warlock_Jetbike 45 |// 0 to 1/3 of the Jetbikes can have shuriken cannons
HQ
Autarch 70 1 1 ~ Swooping_Hawk_Wings 20 Warp_Jump_Generator 25 Eldar_Jetbike 30 | ~ Banshee_Mask 3 MandiBlasters 10 | ~ Power_Weapon 10 Scorpion_Chainsword 5 Laser_Lance 20 | ~ Avenger_Shuriken_Catapult 2 Death_Spinner 5 Fusion_Gun 10 Lasblaster 1 Reaper_Launcher 25 |
Farseer 55 1 1 |
Fast_Attack
Swooping_Hawks 21 5 10 |
Shining_Spears 35 3 5 |
Warp_Spiders 22 5 10 |
Vypers 45 1 3 |
Heavy_Support
Dark_Reapers 35 3 5 |
War_Walkers 30 1 3 |
Fire_Prism 115 1 1 |
Wave_Serpent 90 1 1 |
Support_Weapons 90 1 3 |
Wraithlord 90 1 1 |
Falcon 115 1 1 |
Elites
Striking_Scorpions 16 5 10 |
Fire_Dragons 16 5 10 |
Howling_Banshees 16 5 10 |
Wraithguard 16 3 10 # Warlock 25 |
Harlequin 16 5 10 |
[/code]

In my program I take this txt file and use a scanner to create sorted map, sets and other things that i use to create radio buttons and check boxes for the different options/addons for a squad. Such as:

[img=http://i935.photobucket.com/albums/ad200/ShottySnipez/EldarOptions.jpg?t=1277930302]
In the text file the ~ ... | creates a radio button group and a #....| creates a checkbox group which all works fine. The problem I am having is with the more complicated options/addons such as having a choice between 0-n number of object 1 and/or object 2, having 0-4 powers out of a 7 checkbox power group, or having 0-n special units added to the squad that all are the same but all can have different powers/addons.

My question is, is there a better way to stroe this codex information instead of the textfile or any other way i should go about doing this to make it work. Any advice would be awesome thank you.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories