Making results from one table affect other results

The end goal I am looking for here is a random NPC generator with physical traits that may affect other randomly determined results. For example, if I set a random height for the NPC and it rolls 5 feet tall for a human and then the random physical trait of "Tall" gets thrown in, it's contradictory. Is there a way to code it so that the Tall trait coming up in a different section can modify or just overwrite a result in a previously determined table? Same thing if I want "Strong" to on the traits table to add a +2 bonus to the rolled Strength score, or at least replace the previous Strength roll with a reroll on a different table with higher minimum score?

Any ideas?

Comments

  • Here's a simple set of table to show what I would try. Remember Set variables are Global in scope within the generator. So, in my main table I Set a strength, the line simply calls the simple Trait Dictionary table, which has a bonus value. The output reads "Starting Strength/Trait/Ending Strength"

    Table: Main
    Set: STR ={3d6}
    [{STR}] [Trait=[|Strong|Weak|Normal]] {!{STR}[#{Trait} STrait]}

    Table: STrait
    Type: Dictionary
    Normal:+0
    Strong:+2
    Weak:-2

  • Been thinking on this, my previous example doesn't show that a variable made in one table can be changed by another. So, table main only sets the score and calls Table2.

    Table: Main
    Set: STR ={3d6}
    [@Table2]

    Table: Table2
    [{STR}] [Trait=[|Strong|Weak|Normal]] {!{STR}[#{Trait} STrait]}

    Table: STrait
    Type: Dictionary
    Normal:+0
    Strong:+2
    Weak:-2

Leave a Comment