Hi Everyone *Please forgive me the repost ... I sent the first as Html not Text .... Dumb, Doh! I'm new to python and I want to write a rpg program that is able to use the Correct way to code data or parse? I have pages of .PDF file Data tables copied to text files. I check out many python boards & Books with little illumination to my problem. I'm still not sure about what to use for this data listing: Lists?, Tuple? there is some expressions with a variable(WP) in the data! Dictionary? same as Tuple? Text file read? Function?, Module?, Class?
How would a Pro approch this ? What I'v been thinking is like this: ................... Very basic Brakedown of program: (#=Number Variables, $=String Data) ============================================= Which Damage Table? : ... Type .......... $(Cutting, Puncture, Bludgeon. Three(3) Types of weapon inflicted wounds) Zone .......... #(2d6 dice roll or Number generated by players Attack choice. { A General Body Location.}) Which Row? : ............ Location ........... #(1d6 die roll. { A more Specific body location.}) Which Column? : ......... Wound Level .... #(Number generated by Wounds Taken.) == WOUND (#$Blood-Loss, #$Shock, #$Pain, $##Wound Description) ============================================== ........ Sample of One Zones Data ........... ZONE: 14, ARM --------------------------------------------- # My data is like this: # Roll, Location, # Level One: .... BL, Shock, Pain, Wound Description # Level Two: .... BL, Shock, Pain, Wound Description # Level Three:... BL, Shock, Pain, Wound Description # Level Four: .... BL, Shock, Pain, Wound Description # Level Five: ..... BL, Shock, Pain, Wound Description 1, Hand 0, 6-WP, 5-WP, Surface graze. May drop anything held in hand. 0, 3, 4-WP, Some flesh (like the palm) and bruised bone. May drop at -3 2, 9-WP, 6-WP, Pierced hand totally. May drop handheld items (at -4) 5, 7, 9-WP, Hit wrist bones (instantly drop whatever may be held in that hand) 9, 8, 9-WP, As previous, a slashed artery or vein 2-3, Forearm 0 5-WP 4-WP, 1 5 6-WP, 2 5 6-WP, 6 7 8-WP, 7 8 9-WP, Grazed Bone chipped (may drop handheld items) As a level two, plus you automatically drop anything held Totally passes through, causing greater blood loss and forcing any item to be dropped As level four, with more blood and some bone damage 4, Elbow 0 6-WP 5-WP, 0 4 6-WP, 3 6 7-WP, 5 8 9-WP, 7 9 11-WP, Glancing blow Solid blow; funnybone effect. May drop items in that hand Torn ligament or similar wound; instantly drop items in that hand Dislocated or otherwise jacked up elbow. Use of arm temporarily lost Shattered elbow. Arm now useless 5-6, Upper arm 0 4-WP 4-WP, 1 3 5-WP, 3 5 6-WP, 5 6 7-WP, 7 7 8-WP, Light laceration Deeper puncture, including torn muscle Serious flesh wound, including torn tendons More serious damage and bleeding, including some bone damage As level four, but with more serious bleeding (a blood vessel was hit) .............end sample ........... Thanks for any advice or help you can give me! -- Steve Goodman __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor