Prompts and Tables.

Hi Guys,

Having a bit of a problem with Prompts, I wonder if you could give me a hand if possible, please.

I'm trying a make a random treasure generator for our Rolemaster Campaign. Each Creature & Monster has it's own 'treasure code' from 'a' to 'z' which sets the how well off it is in terms of 'Items' and 'Money' so you can get the appropriate amount of booty once defeated.

For example:
'a' means it has 'Very Poor' items and 'Very Poor' Money.
'b' means it has 'Very Poor' items and 'Poor' Money
'y' means it has 'Very Rich' items and 'Very Rich' Money
'z' means it has 'Special' items and 'Special' Money

Everything after that is pretty easy and it consists of multiple rolls on 55 different tables .

With my limited knowledge, I can easily set up separate generators, 5 for the 'Very Poor', 'Poor', 'Normal', 'Rich' and 'Very Rich' types for 'Items' and 5 for the 'Money' but I thought that I could try using Prompts.

The first part is easy...

Prompt: Creature Code {a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z} a

Table: Main
Items Found - [@Item Table]. Money Found - [@Money Table]

Table: Creature Code
Type: Dictionary
a: 1
b: 2
c: 3
d: 4
e: 5
f: 6
g: 7 etc

Table: Item Table
Type: Lookup
1-5: [@Very Poor Items]
6-10: [@Poor Items]
11-15: [@Normal Items]
16-20: [@Rich Items]
20-25: [@Very Rich Items]
26: [@Special Items]

Table: Money Table
Type: Lookup
1, 6, 11, 16, 20: [@Very Poor Money]
2, 7, 12, 17, 21: [@Poor Money]

I say 'easy', it has me completely stumped. :neutral: The above is a simplified version of my Generator but it illustrates the bit that I'm stuck on.

I guess I need a dictionary to convert the {$Prompt1} letter to a number that can then be used on the 'Item Table' but how do I get it to work? I also guess I need to have to 'Set: Something' in one of the tables but I'm at a loss I'm afraid.

Everything else is working and I can go back to my previous 5 Generators for Items and 5 for Money - I just wanted to be extra clever. :blush:


  • Oooh, I'm feeling a bit clever now - I've got it sorted (although I still don't understand the logic). Unfortunately, my lookup tables aren't working now for some reason. Time to sift through 55 tables to find the error.

  • edited October 2017

    Here's the basics for assigning a number value to the prompt:

    ; Test Blanks.ipt
    ; created 10/18/2017 3:59:42 PM

    Prompt: Enter a Creature level 1-26 {} 1


    Table: Main
    Items Found - [#{Creature} Item Table] [#{Creature} Money Table]

    Table: Item Table
    Type: Lookup
    1-5: dust
    6-10: clothes
    11-15: dagger
    16-20: ring
    20-25: horse
    26: crown

    Table: Money Table
    Type: Lookup
    1: 1gp
    2: 10gp
    3: 100gp
    4: 1000gp
    5: 10000gp
    6: 1gp
    7: 10gp
    8: 100gp
    9: 1000gp
    10: 10000gp
    11: 1gp
    12: 10gp
    13: 100gp
    14: 1000gp
    15: 10000gp
    16: 1gp
    17: 10gp
    18: 100gp
    19: 1000gp
    20: 10000gp
    21: 1gp
    22: 10gp
    23: 100gp
    24: 1000gp
    25: 10000gp
    26: 100000gp

    Now, you can just call your 5 + 5 tables instead of the simple unique values I used.

    You cannot limit the prompt input to 1-26 in my example... you can only suggest to the user to not enter a number outside the 1-26 range. You can limit the input with something like:

    Prompt: Enter a Creature level {1|2|3|4|5} 1

    Now, two things that I would also do...

    Have only 1 + 1 tables, not 5 + 5. The Items Table might look like:

    Table: Item Table
    Type: Lookup
    1-5: [@{1d10} Items]
    6-10: [@{1d10 +10} Items]
    11-15: [@{1d10 +20} Items]
    16-20: [@{1d10 +30} Items]
    20-25: [@{1d10 +40} Items]
    26: [@{1d10 +60} Items]

    Then, Table: Items is a single table with junk in positions 1-10, better stuff in positions 11 - 20, and the best regal stuff in positions 61-70. I'd even blend it a little by making Creature 1-5 select from items 1-10, Creature 6-10 select from items 8 - 22 (that would be {1d15 +7}, etc, to get some blending on the table. As you grow the generator, just insert new Items where they fit in the ranking order.

    Second, I'd probably ask for 2 prompts, like:

    ; Test Blanks.ipt
    ; created 10/18/2017 3:59:42 PM
    Prompt: Enter Creature's Items Value {Broke|Poor|Modest|Wealthy|Regal} Poor
    Prompt: Enter Creature's Money Value {Broke|Poor|Modest|Wealthy|Regal} Poor
    Table: Main
    Set: Items=[#{$prompt1} Item_Roll]
    Set: Money=[#{$prompt2} Money_Roll]
    The creature has {Items} and {Money}.
    Table: Item_Roll
    Type: dictionary
    Broke: [#{1d10} Items]
    Poor: [#{1d10 +10} Items]
    Modest: [#{1d10 +20} Items]
    Wealthy: [#{1d10 +30} Items]
    Regal: [#{1d10 +40} Items]
    Table: Money_Roll
    Type: dictionary
    Broke: [#{1d10} Money]
    Poor: [#{1d10 +10} Money]
    Modest: [#{1d10 +20} Money]
    Wealthy: [#{1d10 +30} Money]
    Regal: [#{1d10 +40} Money]
    Table: Items
    Type: Lookup
    1-10: dust
    11-20: clothes
    21-30: a ring
    31-40: a horse
    41-50: a crown
    Table: Money
    Type: Lookup
    1-10: 1gp
    11-20: 10gp
    21-30: 100gp
    31-40: 1000gp
    41-50: 10000gp

    That way everything is done except expanding the selections in your Items and Money tables. And, the prompt/dictionary table doesn't really like multi-word selections like "Very Poor", so use "Broke" or "Very_Poor" instead.

    Of course if your 5 + 5 tables are already built, then my 2 dictionary table could just call your 5 + 5 tables - they don't need to be merged into 1 + 1 table unless you want to blend some of the selections between groupings.

    Sorry this post is so long. I just really like the last way best. Good luck!

  • That's awesome, thanks for this! I'll see how closely I can follow it. :smiley:

Leave a Comment