Dungeon generator (WIP)

This chart uses input variables
Result

{% Currentrooms = 0%}

{% Roomnumber = 1%}

{% Corridornumber = 1%}

{% KC1 = {2d6} %}

{% Faction1 = {CHART(114250)} %}

{% Faction2 ={CHART(114250)} %}

{% Faction3 ={CHART(114250)} %}

{% Creature1 = {CHART(114250)} %}

{% Creature2 = {CHART(114250)} %}

{% Creature3 = {CHART(114250)} %}

{% Creature4 = {CHART(114250)} %}

{% Creature5 = {CHART(114250)} %}

{% Creature6 = {CHART(114250)} %}

{% Rel1 = {CHART(114266) } %}

{% Rel2 = {CHART(114266)} %}

{% Rel3 = {CHART(114266)} %}

{%if RNR == "Yes"%}

{% Rooms = {3d20} %}

Random number of rooms: {$Rooms}

{%end%}

ORIGIN:

Roll on "Dungeon origin"

FACTIONS:

Faction 1: {$Faction1}s, Motive: Roll on "Faction motive"

Relationships: Faction 2: {$Rel1}, Faction 3: {$Rel3}

Faction 2: {$Faction2}s, Motive: Roll on "Faction motive"

Relationships: Faction 1: {$Rel1}, Faction 3: {$Rel2}

Faction 3: {$Faction3}s, Motive: Roll on "Faction motive"

Relationships: Faction 1: {$Rel3}, Faction 2: {$Rel2}

Wandering creatures (d10)

1: Roll on "Number" x {$Creature1}
2: Roll on "Number" x {$Creature2}
3: Roll on "Number" x {$Creature3}
4: Roll on "Number" x {$Creature4}
5: Roll on "Number" x {$Creature5}
6: Roll on "Number" x {$Creature6}
7: Roll on "Number" x {$Faction1} (Faction 1)
8: Roll on "Number" x {$Faction2} (Faction 2)
9: Roll on "Number" x {$Faction3} (Faction 3)
10: Roll twice and combine

ENTRANCES:

Entrance 1 (Connects to Room 1): Roll on "Dungeon entrance"
{%if {d6} <= 4%}
Entrance 2 (Connects to Room Roll d{$Rooms}): Roll on "Dungeon entrance"
{%if {d6} <= 2%}
Entrance 3 (Connects to Room Roll d{$Rooms}): Roll on "Dungeon entrance"
{%end%}
{%end%}

Keys:

Key #1: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #2: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #3: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #4: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #5: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #6: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #7: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #8: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #9: Roll on "Untitled - Sun 19 Oct 04:25:59" Key #10: Roll on "Untitled - Sun 19 Oct 04:25:59"

FEATURES:

{%while Currentrooms < Rooms%}

{% Currentrooms = {{$Currentrooms}+1}%}

{% Leadsto = {CHART(114245)} %}

{%if Leadsto == "Room"%}

{%if {d100}  <= {$KC1}%}

{% Key = "1" %}

{% KC1 = 0%}

{%else%}

{% Key = "0" %}

{% KC1 = {{$KC1}+d12} %}

{%end%}

Room # {$Roomnumber}:

{% Creature = {CHART(114263) }%}

Roll on "Room generator"

{% Roomnumber = {{$Roomnumber}+1}%}

{%end%}

{%if Leadsto == "Corridor"%}

Corridor # A-{$Corridornumber}:

Roll on "Hallway generator"

{% Currentrooms = {{$Currentrooms}-1}%}

{% Corridornumber = {{$Corridornumber}+1}%}

{%end%}

{%end%}

Subcharts

Next room (d6)

d6 Result

1-4

Room

5-6

Corridor

Creatures (d12)

d12 Result

1

{$Creature1}

2

{$Creature2}

3

{$Creature3}

4

{$Creature5}

5

{$Creature6}

6

{$Creature4}

7-8

{$Faction2} (Faction 2)

9-10

{$Faction1} (Faction 1)

11-12

{$Faction3} (Faction 3)

Faction relations (2d6)

2d6 Result

2

War

3-5

Hostile

6-8

Neutral or indifferent

9-11

Friendly

12

Allied

Number (d12)

d12 Result

1-2

1

3-4

d3

5-6

d4

7-8

2d3

9-10

d6

11

2d4

12

2d6

Faction motive (d10)

d10 Result

1

Hiding from stronger creature

2

Waiting for wounded members to recover

3

Hoarding a resource

4

Protecting young

5

Expanding their territory

6

Scavenging for food or resources

7

Exploring

8

Got trapped/lost in the dungeon and can't leave

9

Following or hunting another creature

10

Guarding passage from intruders