changing Weighted tables based on other tables

I am trying to make a tavern generator that picks a random quality and then describes the rooms. I have a table of inn quality: poor, modest, wealthy, and room descriptions of: common rooms with straw, common rooms, private rooms, and suites. Is there a way to change the table weights of the room descriptions based on the quality of the inn. There are more options for each table but just wanted to provide a small sample.

Comments

  • So check out the first small bit of code from my Gemstones file:

    Header: Gems
    
    Prompt: CR { } 1
    
    Define: CR={{$prompt1}*{1d6}+1d100}
    
    Table: Main
    [#{CR} Size] 
    
    Table: GemType
    Type: Lookup 
    Default: [@Precious]{@BaseValue==(4d6+16)}
    1-50:[@MundaneMineral]{@BaseValue==(1d6)}
    51-80:[@OrnamentalStone]{@BaseValue==(1d6+4)}
    81-90:[@SemiPrecious]{@BaseValue==(2d6+8)}
    91-97:[@Precious]{@BaseValue==(4d6+16)}
    98-100:[@Extraordinary]{@BaseValue==(10d6+40)}
    101-160:[@Precious]{@BaseValue==(4d6+16)}
    161-200:[@Extraordinary]{@BaseValue==(10d6+40)}
    201-240:[@Precious]{@BaseValue==(4d6+16)}
    241-280:[@Extraordinary]{@BaseValue==(10d6+40)}
    

    You see here the lookup table that looks like a (1d280}. It's not really a {1d280}, it's really a fake {1d100}.

    Based on the prompt, I calculate a CR that generates a number from 2 - 101 for a low CR that rolls a 1 and 1 on the d6 and d100, and from 181 - 280 for a level 30 CR that tolls a 6 and 100 on the d6 and d100.

    Now the low CR is massively weighted toward Mundane Minerals (50% of the first 100 slots on the table), but the higher CR (and luckiest rollers on the d6 and d100) are assured Precious and Extraordinary gemstones.

    So by expanding your 1d100 room descriptions beyond 100, you can weight the better quality taverns to have higher rolls on the table. You can also write other types of formulas to skew your rolls to higher positions on the lookup table, based on multiplying or adding by the user input number. And, of course, you can have a user-input text string correlate to a number by use of a Dictionary Table.

    Good luck!

  • Here's a quick one that's more to the point of your original question:

    ; Inn Quality.ipt
    ; created 10/22/2017 5:28:03 PM
    
    Table: Main
    This is a [@Quality] Inn featuring [#{@Room_Roll} Description] accomodations.
    
    Table: Quality
    4: Poor {@Room_Roll==(1d60)}  //1-60
    3: Modest {@Room_Roll==(1d40+30)}  //31-70
    1: Wealthy {@Room_Roll==(1d40)+60} //61-100
    
    Table: Description
    Type: Lookup
    1-15: straw floor 
    16-40: common bunkroom 
    41-80: private room 
    81-100: all-suite
    

    Here's the output:

    This is a Modest Inn featuring common bunkroom accomodations.

    This is a Modest Inn featuring private room accomodations.

    This is a Modest Inn featuring common bunkroom accomodations.

    This is a Modest Inn featuring private room accomodations.

    This is a Wealthy Inn featuring private room accomodations.

    This is a Poor Inn featuring private room accomodations.

    This is a Poor Inn featuring common bunkroom accomodations.

    This is a Poor Inn featuring straw floor accomodations.

    This is a Poor Inn featuring private room accomodations.

    This is a Modest Inn featuring common bunkroom accomodations.

    And, yes, accommodations is misspelled (oh well).

  • so does [#{@Room_Roll} Description] work the same as roll:YdX in the description?

  • It does. And it works with a variable like @Room_Roll, not just a die roll like [#{1d100} Description]. I don't think that Roll:{@Room_Roll} will work in a Table header. So for variables set with a value, it's a cleaner way to do things. I do prefer [#{1d100} Description] over Roll:1d100 also, because i don't always have to roll the same dice on the table. Different table calls can roll different dice, which allows only a portion of the table to be selected by certain table calls. It's just more flexible and dynamic.

Leave a Comment