Problems with creating a table

I am creating a set of random treasure generators for the HARP fantasy game. In these tables there are references to other tables. I am currently placing the tables I need to reference within the table i am generating off of. But I would like to have the tables in separate (external?) tables. Here is a sample of my tables code: Please note these are shortened tables.
Header: Poor Money Generator

Table: Poor Money
Type: Lookup
Roll: 1d100
1-10: 2cp
11-20: 3cp
21-30: 5cp
51-99: 3gp
100: Special, [@Special&;#93;

Table: Special
Type: Lookup
Roll: 1d100
01-10: Amulet of Steelskin
11-20: Amulet of Tongues
21-30: Amulet of Trap Detection
31-35: Dwarven Beard Rings
36-99: Clasp of Shrinking
100: Earthblood Pendant
I assumed to use [@table_from_Special.ipt] but I get "(missing)" for a result.
What am I doing wrong?

Comments

  • You can reference other files with the Use: command, like

    Use: <file name>

    Where <file name> is a file in the /Common directory (where the generators are stored)

    Then you reference the tables from that file normally (as if they are in the file itself).

    There's a section in the help file abut using external tables. You can also look at some of the examples. The Random Books generator references a lot of different files.
  • Looking at the books example (from what I could understand) the script below should work. I started a new directory called HARP in the generators folder (Documents\Inspiration Pad Pro\Generators)... The files look like this:
    Header: Poor Money Generator
    Use: Generators\HARP\Special.ipt
    Table: Poor Money
    Type: Lookup
    Roll: 1d100
    1-10: 2cp
    11-20: 3cp
    21-30: 5cp
    31-35: 7cp
    36-40: 10cp
    41-45: 12cp
    46-50: 15cp
    51-55: 1sp
    56-60: 2sp
    61-65: 17cp
    66-70: 20cp
    71-75: 4sp
    76-80: 6sp
    81-85: 9sp
    86-90: 12sp
    91-94: 15sp
    95-97: 20sp
    98-99: 3gp
    100: Special,&#91;@Special&;#93;
    
    Table: Special
    Use: Generators\HARP\Special.ipt
    
    
    and the special table starts out like this:
    Header: Special
    Use: Generators\HARP\AmuletSteelskin.ipt
    Table: Special
    Type: Lookup
    Roll: 1d100
    01-10: Amulet of Steelskin
    11-20: Amulet of Tongues
    21-30: Amulet of Trap Detection
    31-35: Dwarven Beard Rings
    
    So should it work? Well, it isn't.. I don't get any kind of error but the result is blank when it indicates a special.
    Example:
    15cp
    17cp
    4sp
    10cp
    Special,
    5cp
    6sp
    Where special is it should be reading the result from the special table but it isn't and I'm a little confused as to why.....
    What am i doing wrong?

    Bruce
  • You want to put the files that are "Used" by your main generator file in the \My Documents\InspirationPadPro\Common directory.

    So if you 'Use' a file like this:
    Use: HARP\DwarfNames.ipt
    

    The file should be located in
    My Documents\InspirationPadPro\Common\HARP\DwarfNames.ipt
    

    That is how IPP differentiates between generator files that are to be available in the interface, and those that are just meant as libraries for other tables.
  • The problem is just about all the tables are referenced by the various tables... So is it possible to place all my tables in the common directory including the primary ones?

    In the meantime I tried your above solution. I moved the "special" table to the common folder and changed the directory reference as you stated.

    And it still doesn't work. I get a result of "Special," when a 100 is rolled no "(missing)" error, just a blank result....
  • Can someone please post an example of two tables where one references the other and they both have a die roll to determine the result? If possible use the two tables I posted above.
    I know there is something I am missing somewhere, but I don't see it.
  • You were pretty close to getting it... just needed to make a couple of changes. (I put the two files in Generators\Test\ rather than Generators\HARP\.)

    PoorMoney.ipt:
    Header: Poor Money Generator
    Use: Generators\Test\Special.ipt
    Table: Poor Money
    Type: Lookup
    1-10: 2cp
    11-20: 3cp
    21-30: 5cp
    31-35: 7cp
    36-40: 10cp
    41-45: 12cp
    46-50: 15cp
    51-55: 1sp
    56-60: 2sp
    61-65: 17cp
    66-70: 20cp
    71-75: 4sp
    76-80: 6sp
    81-85: 9sp
    86-90: 12sp
    91-94: 15sp
    95-97: 20sp
    98-99: 3gp
    100: Special,&#91;@Special&;#93;
    
    Special.ipt:
    Table: Special
    Type: Lookup
    01-10: Amulet of Steelskin
    11-20: Amulet of Tongues
    21-30: Amulet of Trap Detection
    31-35: Dwarven Beard Rings
    36-99: Clasp of Shrinking
    100: Earthblood Pendant
    
    Some points maybe worth making:

    1) Headers can make tables nice-looking, but they're unnecessary, especially for subtables.

    2) If you're "use"-ing a file, you only need the "use" statement once, at the top of the file that refers to it. Also, you don't need to declare the table inside the referring file, so all of this at the bottom of Poor Money in your second example:
    Table: Special
    Use: Generators\HARP\Special.ipt
    
    ...was messing you up.

    3) Personally, I've found "Roll: 100" unhelpful. I guess it doesn't hurt, but InspirationPad can guess the possible roll based on the options available, and including it can cause confusion if you change the range later and forget to change the "Roll:".

    4) To make sure the code works in unusual circumstances (e.g., "Special", which only comes up 1% of the time), change the likelihood when testing. In the above case I changed the relevant row in your Poor Money table to:
    100-1000: Special,&#91;@Special&;#93;
    
    ...to ensure that Special was working correctly, then changed it back when I was satisfied.

    Hope this helps!
  • Yeah, that helped immensely! I could've sworn that I tried that exact setup, but I guess I didn't....
    Thanks!


    Bruce

Leave a Comment