It looks like you're new here. If you want to get involved, click one of these buttons!
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]
etc
I say 'easy', it has me completely stumped. 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.
Comments
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.
Here's the basics for assigning a number value to the prompt:
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:
Now, two things that I would also do...
Have only 1 + 1 tables, not 5 + 5. The Items Table might look like:
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:
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.