It looks like you're new here. If you want to get involved, click one of these buttons!
I'm trying to generate a dungeon/cave so A: Type of cave (rock hollow, rock crevice, talus, limestone, dungeon, mine, mixed dungeon and limestone) leads to B: size (tiny, small, medium, large, huge) with weighted results (hollows and crevices are always tiny; talus caves are tiny or small; etc); then C: the size is used to generate the number of levels, and
the number of levels * size generates the number of rooms. Both type AND size are variables that can get reused.
I've done it once by setting various individual variables (smroom; meroom; laroom; etc), but type couldn't be set as a variable. I did something almost exactly similar with settlements using Size as the start, and it seems to be a more flexible way of doing it, except I don't want to start with Size. But I can't get it to click. It seems like it should.
I'm having severe flashbacks to math class and it Just Not Making Sense, like trying to grasp water. My brain hurts. I apologize if this is only barely coherent; that's how my brain feels. Thanks!
The working versions are below. The hybrid version isn't because it's a mess at this point.
CaveDungeon first version:
Table:CaveDungeonType
Roll:1d14
1-2:a rock crevice [#{1d4} CaveDungeonSize]
3:a talus cave [#{1d6} CaveDungeonSize]
4-8:a limestone cave system [#{1d20+1} CaveDungeonSize]
9-11:a dungeon [#{1d20+1} CaveDungeonSize]
12:a mine [#{1d20} CaveDungeonSize]
13-14:a mixed dungeon and limestone cave [#{1d20+1} CaveDungeonSize]
Table:CaveDungeonSize
Set: smlevels={1d3}
Set: melevels={1d4+1}
Set: lalevels={1d6+3}
Set: hulevels={1d6+6}
Set: smrooms={smlevels * (1d4 + 1)}
Set: merooms={melevels * (2d4 + 2)}
Set: larooms={lalevels * (2d6 + 4)}
Set: hurooms={hulevels * (2d8 + 6)}
Set: smwater={1d4}
Set: mewater= {1d6}
Set: lawater={1d2}
Set: huwater={1d16}
Type: Lookup
1-4:with 1 level and {1d4} rooms. There is [@TinyWater]. //tiny
5-11:with {smlevels} levels and {smrooms} rooms. There is [when] {$smwater}<{$smlevels} [do] water on {$smwater} levels[else] no water[end]. //small
12-17:with {melevels} levels and {merooms} rooms. There is [when] {$mewater}<{$melevels} [do] water on {$mewater} levels[else] no water[end]. //medium
18-19:with {lalevels} levels and {larooms} rooms. There is [when] {$lawater}<{$lalevels} [do] water on {$lawater} levels[else] no water[end]. //large
20-22:with {hulevels} levels and {hurooms} rooms. There is [when] {$huwater}<{$hulevels} [do] water on {$huwater} levels[else] no water[end]. //huge
Table:TinyWater
10:no water
5:water in a [|small|small|carved|large] [|pool|hollow|basin|font]
3:a tiny [|rivulet|trickle|runnel] of water
1:a damp area that can be [|excavated|dug out|cleared] in {1d6*10} minutes to collect enough water for {1d3} people per day
1:a small stream
Settlement generator:
Table:Settlement
Set: Pop=[@SettleSize]
Set: PopNum=[#{Pop} SettlePop]
Set: PopType=[#{Pop} SettleType]
Set: PopNote=[#{Pop} SettleNote]
[@BaseRandWord], a [@SettleStatus] {PopType} with {PopNum} residents. There are {PopNote} notable personalities: blah blah blah
Table:SettleSize
Type: Lookup
Roll:1d20
1-4:other
5-9:tiny
10-14:small
15-17:medium
18-19:large
20:huge
Table:SettleType
Type:dictionary
default:settlement
other:[@OtherSettle]
tiny:thorp
small:hamlet
medium:village
large:town
huge:city
Table:SettlePop
Type:dictionary
other:{(1d410)+1d10}
tiny:{(2d410)+1d10}
small:{(1d3100)+1d100}
medium:{5d100+400}
large:{19d100+900}
huge:{(1d61000)+1d100}
Table:SettleStatus
1:prosperous
1:decaying
1:quiet
1:bustling
1:concerned
1:colorful
1:vibrant
1:tense
1:wary
Table:SettleNote
Type:dictionary
other:{1d3}
tiny:{1d2}
small:{1d3+1}
medium:{1d4+2}
large:{1d6+4}
huge:{1d6+6}
Table:OtherSettle
1:manor hall
1:moat house
1:villa
1:longhouse
2:monastery
4:temple
2:abbey
2:cloister
1:mill
1:inn
1:hostel
1:[|academy|school]
1:chapterhouse
1:encampment
Comments
I think you're trying to use Set statements to define all the choices but that's not always the most efficient way. You can assign the values inline and it will make it easier to link multiple variables to the same trait. E.g., if you replace your first table with:
It will give exactly the same output but now the type and size are assigned to variables.
The double equals sign assigns the value silently, i.e., it doesn't show anything in the output but you can use that value later.
You can then use the type variable when you call a dictionary table, or in many cases what I would do is use it in the table call like this:
[@CaveType{$type}]And then have tables CaveTypecrevice, CaveTypecave, CaveTypelimestone, etc. Then you can have wildly different handling for the different cave types.
(You could assign a numeric value instead of a text value, depends what you want to do with that information later.)
Heck yes, thank you!
I'm working my way through learning this; it's not something I've done outside this; so it's hard for me to see and understand more than whatever I happen to need to learn at the moment.
I think I played around with Inspiration Pad Pro years ago, but ended up using Abulafia instead. That went away and I didn't have good copies of the stuff I created, so now I'm slowly slowly reworking what I had done, and creating the stuff I want now.
Thanks