To increase numbers by %

I'm getting more and more ambitious with my random NPC generator and I was wondering how I could go about adding a third prompt labeled "Difficulty Level" and when selected it would add increments of five or ten percent to the attributes. I'm able to do it with a Class table with an added + [#n {$Class}Bonus])} where n = the number on the table.
Table: Human
Set: Skills =[@{$Class}Skills&;#93;
Set: ST ={! ({1d3+8} + [#1 {$Class}Bonus])}
set: DX ={! ({1d3+8} + [#2 {$Class}Bonus])}
set: IQ ={! ({1d3+8} + [#3 {$Class}Bonus])}
set: HT ={! ({1d3+8} + [#4 {$Class}Bonus])}
set: HP ={! ({$ST} + [#5 {$Class}Bonus])}
set: Speed ={! (({$HT} + {$DX}) /4) + [#6 {$Class}Bonus]}
set: Will ={! ({$IQ} + [#7 {$Class}Bonus])}
set: Move ={! floor(({$HT} + {$DX}) /4) + [#8 {$Class}Bonus]}
set: Per ={! {$IQ} + [#9 {$Class}Bonus]}
set: FP ={! {$HT} + [#10 {$Class}Bonus]}
set: Dodge = {! floor({$Speed})+3}
set: Parry = {! floor({$DX} /2)+3}

I'm just starting to toy with the idea. Would I just do something like this

Set: ST ={! ({1d3+8} + [#1 {$Class}Bonus] + {DifficultyLevel} }

So this also means i need to add something like this

Prompt: Difficulty Level {Random|None|Stunted|Rabid|Irradiated|Glowing|Savage|Albino|Legendary||}Random

Set:DifficultyLevel=[when]{$prompt3}=Random[do][@Difficulty][else][{$prompt3}][end]

But how to do it throughout? So if select "Rabid" and I want Rabid to add 10% rounded up how do I get it to add it to each and every one?

Can % be used as a math expression? I'm not seeing it in the Help file.

Comments

  • On a second thought is there anyway to get the selection of a first prompting to change the options of the second prompting?

    So let us say I have three prompts 1, 2, and 3.

    You select Prompt 1 option E, now Prompt 2 gives the options of a, b, c, d.

    However if you select Prompt 1 option B, now Prompt 2 gives Options 1, 2, 3, 4 instead.

    If the above is not attainable then can the following be done.

    I have say 20 different generators. Each generator has 3 prompts.

    I now make a new Generator that when prompted can now either randomly select from the 20 different generators or you can prompt it to. Would the fact that the generators selected from have prompts make it come up as invalid expression?
  • I can't answer the question about prompts. However, the easy way to add 10% is to multiply by 1.1. I have not tested this, and I'm still learning IPP myself, but I would think something like:
    Set: ST = {{{1d3+8} + [#1 {$Class}Bonus]} * {1 + {{DifficultyLevel}/10}}}

    I think that will add 10% if DifficultyLevel = 1, 20% if it = 2, etc.

Leave a Comment