Greetings!
I am trying to write a program for a friend that basically takes away some of the work a DM has to do in D&D. What I need the most help with is XML. I am trying to convert some of the tables in the DMs guide to XML. Having practically no prior experience in doing so, I find myself needing some assistance in not only creating the initial XML files, but also figuring out a good way to parse through the file based upon a randomly generated dice roll. A small example of the table I have chosen to start off with converting to XML is as follows:
Level d% ---Coins--- d% Goods d% Items
1st 01-14 ---- 01-90 ---- 01-71 ----
15-29 1d6X1,000 cp 91-95 1 gem 72-95 1 mundane
30-52 1d8X100 sp 96-100 1 art 96-100 1 minor
53-95 2d8X10 gp
96-100 1d4X10 pp
For those that have never ran a D&D game, you roll 3 times for each level of treasure you want to generate. Once for coins, once for Goods and once for Items. I already have a Roller class that generates random dice rolls based on the number of die you pass it and the die type (d4, d6, d8... etc.). What I want to do is convert the above table to XML so that, once the DM chooses the level he wants from a Dropdownlist, I can have my program generate 3 rolls of a d100 and automatically select the proper treasure for each of the three categories for that level. It would also be very nice if it automatically calculated the total number of treasures (coins, goods and items) for each category. But that may be something I do not implement right away.
I am rambling on too much. I know you all don't need all the details. Basically what I am trying to do is make it so that the DM doesn't need to concentrate so much on rolling dice. That way he/she can concentrate more on the storytelling aspect of the game. And, as an added benefit, I get to learn more about XML and programming in .NET.
Any help with a good way to format the above table into an XML file and then parse through it the way I need to would be greatly appreciated. :)
--coder