Help with Define and Set for a Pulp table

I'm making small inroads on a table I started off many years ago using a different program and after deciding to use IPP to take over I've hit a small stumbling block.

I have a table that is meant to create a pulp adventure using the Pulp Adventure tables inspired by Lester Dent's Master Formula.

At the moment I'm using a list of names to define the villain of the piece but there are a couple of entries which can only have male or female names; for example the Clergyman or Femme Fatale. Is there a way to redefine the name entry if a male or female only entry is randomly selected by the program?

Comments

  • I would set a variable to indicate male/female (which could also be used when picking pronouns he/she, his/her, etc). You could either randomly pick the gender first and then have two lists of names (or maybe three lists if you want some ambiguous ones), or in your list of names specify the gender after each one of them, e.g.

    Bob[Gender==Male]
    Sarah[Gender==Female]
    The Shadow[Gender==[|Male|Female]]
    

    I'm not sure one way is better than the other, really just depends what order you want to do things.

    Once you have that variable you can check it with when/do checks, or use it to pick which table to read from, e.g. have two different tables (like Name_Male and Name_Female) and call them with

    [@Name_{$Gender}]
    
  • Thank you for the advise, I am sort of making headway now using the following as an example:

    use:nbos\names\USNames.ipt
    Set:Gender==[|USFullNameMale|USFullNameFemale]

    And using [@Name_{$Gender}] to call the result, I am a little stuck when I try to have it redefine the variable to Set:Gender==[USFullNameMale] when the Cleregyman entry is randomly rolled, it appears to output the text string instead of the variable.

  • If you want to change the value of a variable in the middle of your table, it would be:

    [Gender==whatever]

    Use square brackets and a double equals sign for a silent assignment (use a single equals sign if you also want the value to be displayed). Only use Set if it can be calculated before you launch into the table itself.

    If that's not the issue, maybe post some code?

  • edited August 2019

    Hello again, it has been a little while.

    I have the following in my code:P

    Name {$VillianName}

    01-04: Gangster {$Gangsternickname} Set:VillianName=[@EELPulpMaleFirst] [@YZGPulpLast]
    46-49: Femme Fatale Set:VillianName=[@EELPulpFemaleFirst] [@YZGPulpLast]

    Which just seems to display the Set part of the command not the output.

    I know I am doing something wrong a fresh pair of eyes is what I'm looking for to assist me,

  • Yep, that's not a place you can use Set. Instead use:

    Name {$VillianName}
    01-04: Gangster {$Gangsternickname} [VillianName=[@EELPulpMaleFirst] [@YZGPulpLast]]
    46-49: Femme Fatale [VillianName=[@EELPulpFemaleFirst] [@YZGPulpLast]]
    
  • That works, many thanks!

Leave a Comment