Conditional constant?

Hi all (again),

I may not be using the right terms here, but I'm looking for a conditional constant (i.e. a value that's based on the result of another table). I have a table to determine kingdom type:

Table: PoliticalEntity
Type: Lookup
Roll: 2d6
2:Free City (1 hex)
3-4:City State ({1d6+1} hexes)
5-9: Dominion ({2d6} hexes)
10-11: Kingdom ({3d6} hexes)
12: Realm ({4d6} hexes)

Now, each entity has a specific number of major settlements. For instance, a Free City or City State has 1 major settlement, a Dominion has 2, a Kingdom has 3, and a Realm has 4.

I'd like to assign the number of major settlements to a constant, but (through trial and error), I'm not using IPP's conditional logic properly.

First off, are conditionals the way to go or is there an easier way? Can anyone point me in the right direction?

Cheers,

Comments

  • What you can do is assign a variable in each table entry for the number of settlements

    I think something like this would work:
    Table: PoliticalEntity
    Type: Lookup
    Roll: 2d6
    2:[numcities==1]Free City (1 hex)
    3-4:[numcities==1]City State ({1d6+1} hexes)
    5-9:[numcities==2] Dominion ({2d6} hexes)
    10-11:[numcities==3] Kingdom ({3d6} hexes)
    12:[numcities==4] Realm ({4d6} hexes)
    

    Then, in subsequent table calls, use the {$numcities} variable to generate the cities. ie, [{$numcities} RandomCity]

    You can also do a lot of work 'up front' in Set commands, so you could generate the political entity type via a table call in a Set command for the first table, and assign it to a variable.
    Table: MakeKingdom
    Set:kingdomtype=[@PoliticalEntity&;#93;
    
  • Hi Ed,

    This worked perfectly - thanks!

    I was toying with inline declarations, but wasn't putting them in the right place. Thanks very much for the helpful nudge in the right direction.

    Cheers,

Leave a Comment