How do I do this #1

the following is my attempt at a Zekira Abilities and Mutations generator. The psionic abilities will first roll 1d100 before switching to either the major, minor or special menu. The powerranka and powerrankb are done better, but I honestly don't know if I can do the psionic powers like that too.
Can anyone help me with this? Or do you have another idea?

; Zekira Abilities and Mutations.ipt
; created 9/9/2020 1:12:01 AM
Prompt: Breeding level {0|1|2|3|4|5|6} 1

Table: Main1

Table: main 2
0: [{1d4+6} Psionic Powers >> Implode] [{3} powerranka >> implode]
1: [{1d6+4} Psionic Powers >> Implode] [{3} powerranka >> implode]
2: [{1d6+2} Psionic Powers >> Implode] [{3} powerranka >> implode]
3: [{1d6+1} Psionic Powers >> Implode] [{3} powerranka >> implode]
4: [{1d6+1} Psionic Powers >> Implode] [{3} powerranka >> implode]
5: [{1d4+1} Psionic Powers >> Implode]
6: [{3} powerrankb >> implode]

[@none][when]{dice}<;10[do][@minor dis][end][when]{dice}<30[do][@major dis][end][when]{dice}<70[do][@special dis][end]

Table: Psionic Powers

table: powerranka
[@none][when]{dice}<;10[do][@minor adv][end][when]{dice}<30[do][@major dis][end][when]{dice}<70[do][@special adv][end]

the pages I use as prompts are


  • So, first off: You just have a space between main and 2 for Table: main2. Remove that space and you do get output:

    So maybe next would be to create tables none, minor, major, special and (maybe) write the calls to those tables more like [! minor] and [! major] to prevent picking duplicate powers.

    You're going to get a good bit of output once you have those tables in place, so maybe a line up top for maxreps: 1. Not sure you'd be rolling 25 characters at once.

    Another couple issues I see coming after that:
    1. Define:roll={1d100} Are you sure you want this? You are defining a variable "roll", and redefining it everytime this table is called, and redefining it everytime the other table is called. Very complicated, maybe for a good reason I don't understand yet.

    Are you sure that you don't want to just simply silently set a dice value each time you enter a table, like {@dice=={1d100}}. Then, go to your when statement. And this way, if you hit a table 1d6+1 times, you can get a mix of minor, major, and special draws for the 2 - 7 times you hit the table.

    Now, if that 1d100 roll is to see which table you use to pick that power, then maybe reverse the order of the when statement. There are some syntax problems with the when statement right now, but if it did run, I think you might get a power from each of the 3 to 4 tables on a single "good" roll.

    So, the when statement...

    You define "roll", but then use the variable "dice". Shouldn't these be the same name, whatever that name is? And, I'd suggest staying away from the word "roll", it can have some special reserved code function, I think.

    I think you have your < the wrong direction... a high roll gets a good power, yes? Then you want to use a > in the call. Like when dice > 70 do this. Will do this on a 71 to 100.

    Now then, without getting too deep into the [when] syntax (yet... you have some bits to work on first before we dive into that), I like to reverse the order from the way you have it. Let's assume that a good (high) roll gets one great power, and a low roll gets on weak power, each time you hit the table (you might hit it 1d6+2 times, depending on pick in table:main2). I like to do it like this (in english):

    [when] DICE > 90 [do] SPECIAL [else] [when] DICE >60 [do] MAJOR [else] MINOR [end] [end]

    This checks the most restrictive first and does it if applicable, and only checks the next lower level of "goodness" if the best level is not met. So, you only get one result and it is the best table that the roll qualifies for. Can do the same thing with nested IF statements, just different syntax.

    And not sure what the semicolon is doing in the [when] statement >;60 if you mean for it to be >=60 (greater than or equal to 60), I'd just make it simple since there is no decimal values here and make it >59 (greater than 59) to mean execute on a 60 - 100.

    I suggest start the very simplest correction first (get rid of that space between main and 2 and once it executes something, you can go from there

  • Hey there, thanks for responding. Where do I put this: {@dice=={1d100}}?

  • Sorry for delay. I forgot to check back for a couple days.

    I'd say replace Define:roll={1d100} with {@dice=={1d100}} and see what happens.

  • Is this what you are looking for?

Leave a Comment