Variable issues

I am trying to make my own npc generator.

I have this to set {$lvl}

Prompt: Level {Random|Dungeon Level I|Dungeon Level II|Dungeon Level III|Dungeon Level IV|Dungeon Level V to XII|Dungeon Level XIII and Above|Wilderness|Astral and Ethereal|Castle}Random
Set: lvl=[@lvl]
Maxreps: 1
Table: NPCCleric
[when]{$prompt1}=Random[do]A lvl {$lvl} [else]A lvl [@{$prompt1}][end][@NPCRace]

Table: lvl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

Table: Dungeon Level I

{$lvl=1}

Table: Dungeon Level II

{$lvl=2}

Table: Dungeon Level III

{$lvl=3}

Table: Dungeon Level IV

{$lvl=4}

Table: Dungeon Level V to XII

{$lvl={1d6+6}}

Table: Dungeon Level XIII and Above

{$lvl={1d6+10}}

Table: Wilderness

{$lvl={1d4+6}}

Table: Astral and Ethereal

{$lvl={1d10+8}}

Table: Castle

{$lvl={1d4+8}}

Which seems to set it just fine for using as an output but when I try to use it to set {$Hp} with either [When] statements or otherwise I keep getting odd results.

the [when]{$lvl} < 9[do]{{$lvl}d8}[else]{{9d8}+(2 * {$lvl})}[end]

Will return values like 48 for lvl 1 which should be just 1d8

If I try to [when]{$lvl}=1[do]{1d8}[end][when]{$lvl}=2[do} etc...

It just doesn't seem to output a value at all in the table it put it in to try to use to set hp. I can't seem to figure this one out... anyone able to help?

Comments

  • Even tried adding
    Set: Hp=[#{$lvl} Health]

    And the health table below and still getting values in the 40's for level 1 which should be only 1d8 x.x

    Table: Health

    {1d8}
    {2d8}
    {3d8}
    {4d8}
    {5d8}
    {6d8}
    {7d8}
    {8d8}
    {9d8}
    {{9d8} + 2}
    {{9d8} + 4}
    {{9d8} + 6}
    {{9d8} + 8}
    {{9d8} + 10}
    {{9d8} + 12}
    {{9d8} + 14}
    {{9d8} + 16}
    {{9d8} + 18}
    {{9d8} + 20}
    {{9d8} + 22}
    {{9d8} + 24}
    {{9d8} + 26}
    {{9d8} + 28}
    {{9d8} + 30}
    {{9d8} + 32}
    {{9d8} + 34}
    {{9d8} + 36}
    {{9d8} + 38}
    {{9d8} + 40}

  • Okay think I solved it with:

    Prompt: Level {Random|Dungeon Level I|Dungeon Level II|Dungeon Level III|Dungeon Level IV|Dungeon Level V to XII|Dungeon Level XIII and Above|Wilderness|Astral and Ethereal|Castle}Random
    Set: lvl=[@lvl]
    Maxreps: 1
    Table: NPCCleric

    [when]{$prompt1}=Random[do]A lvl {Level={$lvl}} [else]A lvl [@{$prompt1}][end][@NPCRace]

    A lvl {$lvl} [@NPCRace]

    Table: lvl

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29

    Table: Dungeon Level I
    Set: Level=1

    1

    Table: Dungeon Level II
    Set: Level=2

    2

    Table: Dungeon Level III
    Set: Level=3

    3

    Table: Dungeon Level IV
    Set: Level=4

    4

    Table: Dungeon Level V to XII
    Set: Level={1d6+6}

    {$Level}

    Table: Dungeon Level XIII and Above
    Set: Level={1d6+10}

    {$Level}

    Table: Wilderness
    Set: Level={1d4+6}

    {$Level}

    Table: Astral and Ethereal
    Set: Level={1d10+8}

    {$Level}

    Table: Castle
    Set: Level={1d4+8}

    {$Level}

    Table: Health

    {1d8}
    {2d8}
    {3d8}
    {4d8}
    {5d8}
    {6d8}
    {7d8}
    {8d8}
    {9d8}
    {{9d8} + 2}
    {{9d8} + 4}
    {{9d8} + 6}
    {{9d8} + 8}
    {{9d8} + 10}
    {{9d8} + 12}
    {{9d8} + 14}
    {{9d8} + 16}
    {{9d8} + 18}
    {{9d8} + 20}
    {{9d8} + 22}
    {{9d8} + 24}
    {{9d8} + 26}
    {{9d8} + 28}
    {{9d8} + 30}
    {{9d8} + 32}
    {{9d8} + 34}
    {{9d8} + 36}
    {{9d8} + 38}
    {{9d8} + 40}

    And in each of the stat figures I pick health with
    Set: Hp= [#{$Level} Health]

    If anyone ends up with similar trouble

Leave a Comment