Problem with Dictionary-Table


I try to understand IPP3Pro, but the Program don't like me. :wink:

I want to do the following: take an option from a prompt and depending of this option give a special modifier.
I tried it so:

` ; pflanzen.ipt
; created 25.08.2017 11:24:13

Prompt: Umgebung {Dschungel|Eiswüste|Flussauen|Gebirge|Kulturland|Steppe|Sumpf|Wald|Waldrand|Wüste|Wüstenrandgebiet} Wald

Formatting: html
Header: <strong>Pflanzensuche</strong>
Footer: <b>copyright: WarFred 2017</b>

Table: flora
Define: location = {prompt1}
set: mod = [#{location} modLocation]

1:Du suchst in folgender Umgebung: {location}.\nModifikator für die Pflanzensuche: {mod}.
MaxReps: 1

Table: modLocation
Type: dictionary
Dschungel: -2
Eiswüste: -5
Flussauen: -1
Gebirge: -1
Kulturland: 1
Steppe: 0
Sumpf: -1
Wald: 2
Waldrand: 1
Wüste: -5
Wüstenrandgebiet: -3`

The result shows this:

` Pflanzensuche

    Du suchst in folgender Umgebung: Wald.
     Modifikator für die Pflanzensuche: (missing).`

Expression log shows "Missing Table: Wald modLocation"

I do not understand, why IPP tries to combine #{location} modlocation to one table-name despite of getting the modification.
Has someone any idea?


  • Try without spaces in the Define:

    Define: location={prompt1}

  • Probably just the spaces, as Ed said.

    Here is a sample of a large script that I have been working on to accomplish a similar purpose. It uses a user input to call a dictionary table. I used the SET command instead of the DEFINE, but either should work to call the dictionary table.

    Important bits are in bold text.

    ; Horses.ipt
    ; created 4/14/2017 4:43:34 PM
    Header: Horses

    Prompt: Settlement Size {hamlet|village|town|city|metropolis} town

    Set: Size={$prompt1}

    Table: Main
    ;A variable set [number] to be used in the essential command line of this table.
    Set: number=[#{$prompt1} Count]
    ;A variable set to determine the specialty training modifier for a given Settlement Size.
    Set: TrainMod=[#{$prompt1} Train]

    ;This is the main executable call for the generator.
    ;It includes a header-type line indicating the number of horses available, and the user value of Settlement Size.
    ;It then calls the GENDER table for output, repeating the call for the count of horses available.
    There are {number} horses for sale in this {$prompt1}.\n\n[@{number}
    Gender >> implode]

    ;This table rolls the number of horses available for sale, per the user entered Settlement Size data.
    ;It is used in the MAIN table above to call the GENDER table once for each count of horses available.
    Table: Count
    Type: dictionary
    Default: 117 //debug value
    hamlet: {1d4} //1-4
    village: {1d6 +1} //2-7
    town: {1d10 +6} //7-16
    city: {10d8} //8-80
    metropolis: {20d8} //16-160

    Table: Train
    Type: dictionary
    Default: 117 //debug value
    hamlet: 1.25
    village: 1.05
    town: 0.95
    city: 0.8
    metropolis: 0.6

    Same thing is done with the TRAIN table. Hope the example helps.

Leave a Comment