Drop Menu Choices?

I am wondering exactly how to make there be choices similar to the level choices in the treasure gen. If anyone knows anything, please let me know and I will do my best to learn from you.

I will appreciate the help, even if you are trying to figure out how to do it with me.

Comments

  • I'm not sure which one you are looking at, but choices are done with Prompts. For the document, see under Reference/Prompt or Generator Files/Prompting For Input. Those would be the best places to start. Or, look at how some existing examples are set up.

  • @jdale

    One of the generators that are originally downloaded with IPP is called treasure gen and it looks like this in the code and the results.
    The square of red is what I mean by the options and drop menu.


  • Yes, those are done with Prompts. In Random Treasure you will see the prompts lines in the very top part of the code. The help document gives a good crash course in using prompts and looking at those first few lines of Random Treasure will get you started.

    Note that when you first add prompts to your code then SAVE and RUN, those prompts won't appear. Click to a different generator in your left hand generator list menu, then back to the one you have added prompts into - it takes this "refresh" action to activate that bottom left input area (in red) the first time after adding a prompt to the code.

  • Alright, that makes some sense. However, I don't plan on using numbers as options. I'm making an encounter gen and there is going to be an 'area' choice, like forest, cave, old castle, etc. Would it work the same?

  • Yes, it works the same with text imput. Here's a link to one I posted a while back that uses a text input prompt. The prompt part is right at the top and easy to see how it is used in the first/main table. In this case, all my tables using the user input text prompt (tables "Leader" and "Description") wind up being "Dictionary" type tables - those are lookup tables index on text lookups instead of numerical lookups.

    I'm sure you could also work something where the table that is called is table {$prompt1} as in [#{1d6} {$prompt1}] which would roll a 1d6 on the table named {whatever the user selects in the prompt input}. Such that the user prompt would select which table to roll 1d6 on.

    https://1drv.ms/u/s!Amd5j_tEzLgZqHuT7F2WsWqT6cJU

  • Hey Levendor, I tried editing some of it and it doesn't seem to be working. Can you describe to me what I am doing wrong?

    And I'm not done with the entire series of charts. Though I do plan on continuing the six listed areas and expanding them. If I could I would also prompt it for level as well but I definitely don't know how to do that.

  • Dictionary keys can't have spaces. You could do "ForestPath" but not "Forest Path". Also, the maximum length of a dictionary key is 10 characters, so "SeaCoastRoad" is too long.

    In the Prompt itself, the last word, after the curly brackets, which is currently "Company" is the default value if the user doesn't pick something from the list. So, generally speaking it should be an item on the list. E.g.

    Prompt: Place {ForestPath|OldCastle|Desert|Cave|NormalRoad|SeaCoast} ForestPath

    Aside from that, it looks like you are on the right track, just need to fill in the rest of the tables and assign a value to {Roll} somewhere.

  • What do you mean by {Roll}? I understand the rest but not that. Why would I need it?

  • You're using {Roll} as a variable as if it had a value, for example like this:

    SeaCoast: Die Result is {Roll}\nDaytime is [#{Roll} SeaCoastRoad]\n Wilderness Daytime is [#{{Roll}+2} SeaCoastRoad]\n Nighttime is [#{{Roll}+2} SeaCoastRoad]\n Wilderness Night is [#{{Roll}+4} SeaCoastRoad]

    But {Roll} hasn't been assigned a value anywhere, so it's just blank. And that means the lookups will always yield the same result on the SeaCoastRoad table, which will be:

    Die Result is 
     Daytime is Merchant Caravan
    Wilderness Daytime is Merchant Caravan
    Nighttime is Merchant Caravan
    Wilderness Night is Foot Patrol

    I think that you want a random roll between 1 and 10, which you sometimes modify with +2 or +4 giving you results up to 14. To do that, somewhere you need to tell IPP that {Roll} should have that value.

    You can do that by adding [Roll=={1d10}] to the beginning of the Main table. This gives {Roll} a value of 1-10 but doesn't display anything by itself (it's a "silent" assignment). This looks like this:

    Table: Main
    [Roll=={1d10}][#{$prompt1} Description]\n\n[#{$prompt1} Leader]

    ForestPath and OldCastle aren't lookup tables (I don't know whether that is deliberate) so the value of {Roll} won't affect the outcome of those tables regardless of this.

  • Oh... Well someone earlier on this forum posted questions about a encounter gen they are working on and I got permission to expand it. I didn't really know what that was for. Do you think I should use it?

  • So a couple things...

    The original post, the question was how do I roll once on a table, and use that value for daytime, the same value +2 for nighttime, and the same value +4 for wilderness nighttime (basically). Essentially how do I roll once and modify the same result when I go to a weighted lookup table. The higher the end result, the rarer and more powerful the monster. I.e., a vampire one shows up on a roll of natural 10 plus 4 for wilderness nighttime; weaker daylight creatures show up on a roll of 1 - 3 plus 0, and they occur 3x as often as vampires. So, that's the purpose of starting off with a constant call of Set: Roll ={1d10}

    So, you can go ahead and drop the spaces for the dictionary table call. You either turn all your tables into lookup tables like SeaCoastRoad, with index values from 1 - 14 as you see fit... OR you can just really simplify the results by dropping the {Roll}, eliminating lookup values from SeaCoastRoad (structure that table like ForestPath) and making a simple even weighted table selection only based on which table the user ask for in the input prompt.

    Here's a working version of the first choice (just need to create and populate the remaining three terrain tables, and index/weight the lookups in the manner that you like best). There's way I'd prefer a generator to work for my own purposes... I'll set that up and put it in the next post.

    Prompt: Place {ForestPath|OldCastle|Desert|Cave|NormalRoad|SeaCoastRoad} Company
    
    Set: Roll ={1d10}
    
    Table: Main
    [{$prompt1}]: [#{$prompt1} Place]
    
    Table: Place
    Type: Dictionary
    ForestPath: Die Result is {Roll}\nDaytime is [#{Roll} ForestPath]\n Wilderness Daytime is [#{{Roll}+2} ForestPath]\n Nighttime is [#{{Roll}+2} ForestPath]\n Wilderness Night is [#{{Roll}+4} ForestPath]
    OldCastle: Die Result is {Roll}\nDaytime is [#{Roll} OldCastle]\n Wilderness Daytime is [#{{Roll}+2} OldCastle]\n Nighttime is [#{{Roll}+2} OldCastle]\n Wilderness Night is [#{{Roll}+4} OldCastle]
    Desert: Die Result is {Roll}\nDaytime is [#{Roll} Desert]\n Wilderness Daytime is [#{{Roll}+2} Desert]\n Nighttime is [#{{Roll}+2} Desert]\n Wilderness Night is [#{{Roll}+4} Desert]
    Cave: Die Result is {Roll}\nDaytime is [#{Roll} Cave]\n Wilderness Daytime is [#{{Roll}+2} Cave]\n Nighttime is [#{{Roll}+2} Cave]\n Wilderness Night is [#{{Roll}+4} Cave]
    NormalRoad: Die Result is {Roll}\nDaytime is [#{Roll} NormalRoad]\n Wilderness Daytime is [#{{Roll}+2} NormalRoad]\n Nighttime is [#{{Roll}+2} NormalRoad]\n Wilderness Night is [#{{Roll}+4} NormalRoad]
    SeaCoast Road: Die Result is {Roll}\nDaytime is [#{Roll} SeaCoastRoad]\n Wilderness Daytime is [#{{Roll}+2} SeaCoastRoad]\n Nighttime is [#{{Roll}+2} SeaCoastRoad]\n Wilderness Night is [#{{Roll}+4} SeaCoastRoad]
    
    Table: OldCastle
    Type: Lookup
    1-6:{1d3} Giant Rats
    7-11:{1d3} Giant Rats and {2d6} Rats
    12-14:{1d3} Ghosts and {2d6} Rats with 1 Giant Rat
    
    
    Table:ForestPath
    Type: Lookup
    1:{1d3} [|Black Bear|Brown Bear]
    2-3:{1d8} Deer
    4:{1d3} Elk
    5:{1d3} [|Dryad|Satyr]
    6:{1d3} Fox
    7:{1d3} Giant Elk and {1d6} Elk
    8:{3d6} [|Pixies|Sprites]
    9:Merchants
    10:Brigands
    11:{1d6} Wolves
    12:{1d4} [|Owls|Giant Owls]
    13:{1d3} [|Dire Wolves|Worgs] and {1d12} Wolves
    14:{2d4} Miniature Wyvern
    
    
    Table: SeaCoastRoad
    Type: Lookup
    1-2:Merchant Caravan
    3-5:Foot Patrol
    6-7:Brigands
    8-9:Cavalry Patrol
    10-11:{1d3} worgs and {1d12} wolves
    12:Ogre and {2d4} bugbears
    13:{2d6} shadows (or No Encounter; see description)
    14:Vampire and {2d6} worgs
    
  • edited January 2020

    This is a lot closer to the way I would code the tables for my own personal use. But, I'm always interested to see the end result of how others structure and use their generators. Good luck!

    ; WildAnimalEncounter.ipt
    ; created 1/5/2020
    Prompt: Place {Forest Path|Old Castle|Desert|Cave|Normal Road|SeaCoast Road} Normal Road
    Prompt: Conditions {Daytime|Day-Wild|Nighttime|Night-Wild} Daytime
    
    Table: Main
    [#{$prompt2} DieRoll]
    
    Table: DieRoll
    Type: Dictionary
    Daytime: [Roll=={1d10}] [{$prompt1}], Daytime Populated: [#{Roll} {$prompt1}]
    Day-Wild: [Roll=={{1d10}+2}] [{$prompt1}], Daytime Wilderness: [#{Roll} {$prompt1}]
    Nighttime: [Roll=={{1d10}+2}] [{$prompt1}], Nighttime Populated: [#{Roll} {$prompt1}]
    Night-Wild: [Roll=={{1d10}+4}] [{$prompt1}], Nighttime Wilderness: [#{Roll} {$prompt1}]
    
    Table: Normal Road
    Type: Lookup
    1-7:Merchants
    8-10:Brigands
    11:Merchants
    12-13:Brigands
    14:{1d8} Goblins
    
    Table: Old Castle
    Type: Lookup
    1-6:{1d3} Giant Rats
    7-11:{1d3} Giant Rats and {2d6} Rats
    12-14:{1d3} Ghosts and {2d6} Rats with 1 Giant Rat
    
    
    Table:Forest Path
    Type: Lookup
    1:{1d3} [|Black Bear|Brown Bear]
    2-3:{1d8} Deer
    4:{1d3} Elk
    5:{1d3} [|Dryad|Satyr]
    6:{1d3} Fox
    7:{1d3} Giant Elk and {1d6} Elk
    8:{3d6} [|Pixies|Sprites]
    9:Merchants
    10:Brigands
    11:{1d6} Wolves
    12:{1d4} [|Owls|Giant Owls]
    13:{1d3} [|Dire Wolves|Worgs] and {1d12} Wolves
    14:{2d4} Miniature Wyvern
    
    
    Table: SeaCoast Road
    Type: Lookup
    1-2:Merchant Caravan
    3-5:Foot Patrol
    6-7:Brigands
    8-9:Cavalry Patrol
    10-11:{1d3} worgs and {1d12} wolves
    12:Ogre and {2d4} bugbears
    13:{2d6} shadows (or No Encounter; see description)
    14:Vampire and {2d6} worgs
    
  • I appreciate the help so very much.

  • As for the Castle look up, I already have a few more and I wonder if this is good:

    1-3:{1d3} Giant Rats
    4-6:{1d3} Giant Rats and {2d6} Rats
    7-9:{1d6} Bats
    10-11:1 Giant Bat
    12-13:1 Giant Bat and {2d3} Bats
    14:{1d3} Ghosts and {2d6} Rats with 1 Giant Rat

  • That should work just fine. I like that the bats & ghosts are at the higher end of lookup table - they would be more reasonable to encounter at night when there is 1d10 + 2 or +4.

Leave a Comment