Prompt help

Greetings, I am new to this software and to programming in general. I am trying to add a numeric prompt to a d100 roll and then choose from a list. I'm not able to get it to work properly. Any advice? Below is the code. Thanks for the help.

Table: RoomContents
type: lookup
Prompt: Modifier {}

{1d100+prompt1}

1-2:Level appropriate Deadly Encounter (see Chapter 16). Loot 55%, Clue 75%. Roll DMG Loot table appropriate to encounter.
3-4:Empty. Use Sensory snippets from GMA. Clue 20%
5-8:Level appropriate Easy Encounter (see Chapter 16). Loot 55%, Clue 75%. Roll DMG Loot table appropriate to encounter.
9-10:NPC from GMA cards
11-12:Strong NPC (2d4 levels higher than your PC) has just defeated a Level Appropriate Deadly Encounter. Roll d4 to determine attitude. 1-2: They tell you to begone, they stake claim to this dungeon and all within it. Will fight if challenged. However, also will agree to split up and going separate ways, perhaps 3-4: Will team up with you for the remainder of this dungeon, and split the loot, and then will depart. (CR of all encounters from here on increases by 1d4). Random, SD, Trap all 30% Roll on NPC table, skipping professions and going straight to classes. NPC level is determined above.
13-20:Dungeon Hazard. 1: sinkhole, 2: fungus, 3: trap, 4: collapsing masonry or other natural hazard, 5: wandering monster, medium difficulty, 6: Player’s choice.
21-30:Level appropriate Hard Encounter (see Chapter 16). Clue, Loot, Random, SD all 40%.
31-32:Level appropriate Medium Encounter (see Chapter 16) Loot 40%, SD 20%, Clue 30%
33-36:NPC in room investigating. Roll again to find out what they are investigating.
37-40:A previously triggered trap is in this room, with a level appropriate Hard Encounter enemy caught in it / victim to it. Enemy alive, 30%. Loot 10%.
41-52:Level appropriate Easy Encounter (see Chapter 16) 48 Loot 30%, SD 10%, Clue 30%
53-56:Obstacle of some sort (e.g. rubble, crevasse, sinkhole, underground stream, wild magic field). Athletics or acrobatics check might be required to pass it, or it might be impassable. (Alterntively, roll on Obstacles Table, DMG p.297)
57-67:Level appropriate Medium Encounter (see Chapter 16) Loot 40%, SD 20%, Clue 30%
68-71:NPC (enemy or ally of the PC) near death (1d4 levels less than you, minimum Level 1), unconscious, Level appropriate Hard Encounter. Enemy or enemies reduced to 50% hp. Loot 50%. A battle has obviously gone on here - the NPC has fought a powerful creature, and lost, but has damaged it somewhat.
72-74:Two level appropriate ([d4] 1-2: Easy, 3-4: Medium) creatures are engaged in battle with each other. You stumble in just as battle starts. How do you react? Hide and wait until a victor emerges? What are they fighting over? Since they are otherwise engaged, you have advantage on stealth checks to creep up. (DC is the creature’s passive perception)
75-76:GMA Sensory snippets
77-80:Low level minions of the BBEG in this room. Level appropriate easy encounter.
81-84:Architecture. Snippet. Clue 75% Mission relevant loot chance 40%.
85-88:Remnants / proof of the boss or BBEG. It looks as though they have been up to mischief in this room. Clue! (Either random or Belongings from Fantasy cards)
89-92:Accursed or blessed relic (or other object from GMA), guarded by level appropriate deadly/hard encounter. Q/A rolls to determine nature of relic.
93-100:BOSS / BBEG / Significant NPC Encounter! (Use the details of your story so far, Q/A

Comments

  • You probably want something like:

        Prompt: Modifier {}
    
        Table: GetRoomContents
        [#{1d100+$prompt1} RoomContents]
    
        Table: RoomContents
        type: lookup
        1-2:Level appropriate Deadly Encounter (see Chapter 16). Loot 55%, Clue 75%. Roll DMG Loot table appropriate to encounter.
        3-4:Empty. Use Sensory snippets from GMA. Clue 20%
        5-8:Level appropriate Easy Encounter (see Chapter 16). Loot 55%, Clue 75%. Roll DMG Loot table appropriate to encounter.
        9-10:NPC from GMA cards
    ...
    

    Don't forget to add either a default entry to the table, or make sure the ranges are high enough to account for results > 100

  • Great! Thanks! Works like a charm.

Leave a Comment