What Am I Doing Wrong 2

I'm attempting to create a slave generator and have decided to start with their general tasks and the likes. I don't really know if this is a good way to do it but any help will be appreciated.

Prompt: Slave {Green|Fair|Trader|Good|Excellent} Green

Table: Master
[@two]

Table: two
Type: Dictionary
Green: [Roll=={1d5}] [{$prompt1}], [#{Roll} {$Slave}]
Fair: [Roll=={{1d5}+5}] [{$prompt1}], [#{Roll} {$Slave}]
Trader: [Roll=={{1d5}+10}] [{$prompt1}], [#{Roll} {$Slave}]
Good: [Roll=={{1d5}+15}] [{$prompt1}], [#{Roll} {$Slave}]
Excellent: [Roll=={{1d5}+20}] [{$prompt1}], [#{Roll} {$Slave}]

Table: Slave
Type: Lookup
1-2: General Laborer
3-5: Child
6-7: Apprentice to a trader
8-9: Trained Laborer
10: Magic Apprentice
11: Farmer
12: Alchemist
13: Carpenter
14: Fisherman
15: Blacksmith
16-18: Gladiator
19: Butler
20: Maid
21: Accountant
22: Guard
23: Soldier
24: Medic
25: Priest

Comments

  • You were very close. Just a couple syntax errors. Here's your code with slight edits make it work. I'll comment on what I changed in the next post.

    Prompt: Slave {Green|Fair|Trader|Good|Excellent} Green
    
    Table: Master
    [#{$prompt1} two]
    
    Table: two
    Type: Dictionary
    Green: [Roll=={1d5}] [{$prompt1}], [#{Roll} Slave]
    Fair: [Roll=={{1d5}+5}] [{$prompt1}], [#{Roll} Slave]
    Trader: [Roll=={{1d5}+10}] [{$prompt1}], [#{Roll} Slave]
    Good: [Roll=={{1d5}+15}] [{$prompt1}], [#{Roll} Slave]
    Excellent: [Roll=={{1d5}+20}] [{$prompt1}], [#{Roll} Slave]
    
    Table: Slave
    Type: Lookup
    1-2: General Laborer
    3-5: Child
    6-7: Apprentice to a trader
    8-9: Trained Laborer
    10: Magic Apprentice
    11: Farmer
    12: Alchemist
    13: Carpenter
    14: Fisherman
    15: Blacksmith
    16-18: Gladiator
    19: Butler
    20: Maid
    21: Accountant
    22: Guard
    23: Soldier
    24: Medic
    25: Priest
    
  • So, in Table: Master, you need to call table "two" with an index lookup based on the user input. The #{$prompt1} tells it to go lookup the (string) "value" of prompt 1 in (dictionary) lookup table "two".

    After that, in table "two" you were calling a series of lines with [#{Roll} {$Slave}], which just should have been a simple call of [#{Roll} Slave] instead. The called table is simply named "Slave" and the extra {$Slave} makes it sound like it is a variable (which it is not) or there is a table named with brackets and dollar sign (which there is not, and would probably be an invalid table name if you tried to add the brackets and dollar sign).

    That's it. Two small syntax errors and your table is structured well and works. Good luck!

  • Thank you so very much.

Leave a Comment