Okay, I'll try and be as clear as I possibly can. As you've gathered by now, my script is for a Star Trek RPG.

1) When the user chooses a "Race" from a list of radio buttons, this adds certain "Skills" to their Character Sheet (when they click the "Next" button). This is done in a Dialog Box called new1. Certain "Skills" added also have "Specializations" that go with them. A character receiving the "History" skill might also receive "Modern" and "Ancient" as specializations. So, this is how I intend to store this data. Here is an example, if the race chosen is "Andorian".

[CharSheet]

Skills = Culture:1.History:2 .Primitive Weaponry:2 .World Knowledge:2

HistorySpecs = .Andorian:3
CultureSpecs = .Andorian:3
PrimWeapSpecs = .Chaka:3

Now, I would like the Skills (not the Specializations) to display in a ListBox like so.

ListBox ID:47
"Culture:1"
"History:2"
"Primitive Weaponry:2"
"World Knowledge:2"

2) As you can see, this character has received several basic skills by virtue of being an Andorian. They are also specialised in Andorian History, Andorian Culture and the Chaka, a primitive Andorian weapon.

When "History:2" is selected in ListBox 47, I would like a second ListBox (id 48) to display the HistorySpecs like so:

ListBox ID:48
"Andorian:3"

And if "Primitive Weaponry:2" should be selected in ListBox 47, I want ListBox 48 to be cleared and to display the PrimWeapSpecs:

ListBox ID:48
"Chaka:3"

3) My code:

All data is stored in a Hash Table named CharSheet. Each character has one CharSheet, which contains all of their data.

To ensure that the Hash Table allows me to store multiple items under the same heading, "Skills" are stored like so (else each new skill would overwrite the last in the hash table):

Code:
 
on *:dialog:new1:sclick:13: {

if ($did(new1,5).state == 1) { hadd CharSheet Template Andorian }

{ hadd CharSheet Skills $hget(CharSheet, Skills) .History:2 }

{ hadd CharSheet HistorySpecs $hget(CharSheet, HistorySpecs) .Andorian:3 }

}
 


These "Skills" are then displayed on a Character Sheet - which is another Dialog Box (id sheet) in ListBox ID:47.

Code:
 
on *:dialog:sheet:init:0:{
  didtok sheet 47 46 $hget(CharSheet, Skills) }
 


What I cannot seem to do is find the right code that will show the HistorySpecs in Box 48 when "History" is selected in Box 47, or CultureSpecs when "Culture" is selected - and so on.

There are also other skills to be added later on - an Andorian does not, for example receive the skill "Music" or the specialization "Guitar", nor does a Human become an expert in Andorian Culture, so whatever system you can devise needs to be flexible enough to implement this as well. I am willing to completely overhaul whatever parts of my system you deem necessary to make this work smile

Sorry if I sounded patronising - I just wanted to be as clear as possible. If I've left anything out that you need, let me know and I'll answer as soon as I can. If you could return any answers in an equally clear way, I'll be ecstatic! smile I really need hand-holding through this one, but I'm determined to make this project work cool


A poor life this, if full of care,
We have no time to stand and stare.