VGRoid support (#27659)

* Dungeon spawn support for grid spawns

* Recursive dungeons working

* Mask approach working

* zack

* More work

* Fix recursive dungeons

* Heap of work

* weh

* the cud

* rar

* Job

* weh

* weh

* weh

* Master merges

* orch

* weh

* vgroid most of the work

* Tweaks

* Tweaks

* weh

* do do do do do do

* Basic layout

* Ore spawning working

* Big breaking changes

* Mob gen working

* weh

* Finalising

* emo

* More finalising

* reverty

* Reduce distance
This commit is contained in:
metalgearsloth
2024-07-03 22:23:11 +10:00
committed by GitHub
parent 1faa1b5df6
commit a2f99cc69e
103 changed files with 4928 additions and 2627 deletions

View File

@@ -15,7 +15,8 @@
- type: dungeonConfig
id: BlobAsteroid
# Floor generation
generator: !type:NoiseDunGen
layers:
- !type:NoiseDunGen
tileCap: 1500
capStd: 32
iterations: 3
@@ -28,22 +29,22 @@
fractalType: FBm
octaves: 2
lacunarity: 2
# Everything else
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre
# Generate biome
- !type:BiomeDunGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:BiomeMarkerLayerDunGen
markerTemplate: AsteroidOre
# Multiple smaller asteroids
# This is a pain so we generate fewer tiles
- type: dungeonConfig
id: ClusterAsteroid
# Floor generation
generator: !type:NoiseDunGen
layers:
- !type:NoiseDunGen
tileCap: 1000
capStd: 32
layers:
@@ -55,21 +56,21 @@
fractalType: FBm
octaves: 2
lacunarity: 2
# Everything else
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre
# Generate biome
- !type:BiomeDunGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:BiomeMarkerLayerDunGen
markerTemplate: AsteroidOre
# Long and spindly, less smooth than blob
- type: dungeonConfig
id: SpindlyAsteroid
# Floor generation
generator: !type:NoiseDunGen
layers:
- !type:NoiseDunGen
tileCap: 1500
capStd: 32
layers:
@@ -82,20 +83,21 @@
octaves: 3
lacunarity: 2
cellularDistanceFunction: Euclidean
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre
# Generate biome
- !type:BiomeDunGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:BiomeMarkerLayerDunGen
markerTemplate: AsteroidOre
# Lots of holes in it
- type: dungeonConfig
id: SwissCheeseAsteroid
# Floor generation
generator: !type:NoiseDunGen
layers:
- !type:NoiseDunGen
tileCap: 1500
capStd: 32
layers:
@@ -107,12 +109,11 @@
fractalType: FBm
octaves: 2
lacunarity: 2
# Everything else
postGeneration:
# Generate biome
- !type:BiomePostGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:MarkerLayerPostGen
markerTemplate: AsteroidOre
# Generate biome
- !type:BiomeDunGen
biomeTemplate: Asteroid
# Generate ore veins
- !type:BiomeMarkerLayerDunGen
markerTemplate: AsteroidOre

View File

@@ -1,361 +1,284 @@
# Base configs
- type: dungeonConfig
id: Experiment
generator: !type:PrefabDunGen
roomWhitelist:
- SalvageExperiment
presets:
- Bucket
- Wow
- SpaceShip
- Tall
postGeneration:
- !type:CorridorPostGen
width: 3
- !type:DungeonEntrancePostGen
count: 2
- !type:RoomEntrancePostGen
entities:
- CableApcExtension
- AirlockGlass
- !type:EntranceFlankPostGen
entities:
- Grille
- Window
- !type:ExternalWindowPostGen
entities:
- Grille
- Window
- !type:WallMountPostGen
spawns:
# Posters
- id: RandomPosterLegit
orGroup: content
- id: ExtinguisherCabinetFilled
prob: 0.2
orGroup: content
- id: RandomPainting
prob: 0.05
orGroup: content
- id: IntercomCommon
prob: 0.1
orGroup: content
- !type:BoundaryWallPostGen
tile: FloorSteel
wall: WallSolid
cornerWall: WallReinforced
- !type:JunctionPostGen
width: 1
- !type:JunctionPostGen
- !type:AutoCablingPostGen
- !type:CornerClutterPostGen
contents:
- id: PottedPlantRandom
amount: 1
- !type:CorridorDecalSkirtingPostGen
color: "#D381C996"
cardinalDecals:
South: BrickTileWhiteLineS
East: BrickTileWhiteLineE
North: BrickTileWhiteLineN
West: BrickTileWhiteLineW
cornerDecals:
SouthEast: BrickTileWhiteCornerSe
SouthWest: BrickTileWhiteCornerSw
NorthEast: BrickTileWhiteCornerNe
NorthWest: BrickTileWhiteCornerNw
pocketDecals:
SouthWest: BrickTileWhiteInnerSw
SouthEast: BrickTileWhiteInnerSe
NorthWest: BrickTileWhiteInnerNw
NorthEast: BrickTileWhiteInnerNe
- type: dungeonConfig
id: LavaBrig
generator: !type:PrefabDunGen
roomWhitelist:
- LavaBrig
presets:
- Bucket
- Wow
- SpaceShip
- Tall
postGeneration:
- !type:CorridorPostGen
width: 3
- !type:DungeonEntrancePostGen
count: 2
- !type:RoomEntrancePostGen
entities:
- CableApcExtension
- AirlockSecurityGlassLocked
- !type:EntranceFlankPostGen
entities:
- Grille
- Window
- !type:ExternalWindowPostGen
entities:
- Grille
- Window
- !type:WallMountPostGen
spawns:
# Posters
- id: RandomPosterLegit
orGroup: content
- id: ExtinguisherCabinetFilled
prob: 0.2
orGroup: content
- id: RandomPainting
prob: 0.05
orGroup: content
- id: IntercomCommon
prob: 0.1
orGroup: content
- !type:BoundaryWallPostGen
tile: FloorSteel
wall: WallSolid
cornerWall: WallReinforced
- !type:JunctionPostGen
width: 1
- !type:JunctionPostGen
- !type:AutoCablingPostGen
- !type:CornerClutterPostGen
contents:
- id: PottedPlantRandom
amount: 1
- !type:CorridorDecalSkirtingPostGen
color: "#DE3A3A96"
cardinalDecals:
South: BrickTileWhiteLineS
East: BrickTileWhiteLineE
North: BrickTileWhiteLineN
West: BrickTileWhiteLineW
cornerDecals:
SouthEast: BrickTileWhiteCornerSe
SouthWest: BrickTileWhiteCornerSw
NorthEast: BrickTileWhiteCornerNe
NorthWest: BrickTileWhiteCornerNw
pocketDecals:
SouthWest: BrickTileWhiteInnerSw
SouthEast: BrickTileWhiteInnerSe
NorthWest: BrickTileWhiteInnerNw
NorthEast: BrickTileWhiteInnerNe
- type: dungeonConfig
id: Mineshaft
generator: !type:PrefabDunGen
tile: FloorCaveDrought
roomWhitelist:
- Mineshaft
presets:
- Bucket
- Wow
- SpaceShip
- Tall
postGeneration:
- !type:CorridorPostGen
tile: FloorCaveDrought
width: 3
- !type:DungeonEntrancePostGen
count: 5
tile: FloorCaveDrought
entities:
- RandomWoodenWall
- !type:RoomEntrancePostGen
tile: FloorCaveDrought
entities:
- RandomWoodenWall
- !type:EntranceFlankPostGen
tile: FloorCaveDrought
entities:
- RandomWoodenWall
- !type:ExternalWindowPostGen
tile: FloorCaveDrought
entities:
- RandomWoodenWall
- !type:WallMountPostGen
tile: FloorCaveDrought
spawns:
# Ore
- id: WallRockSalt
prob: 0.6
orGroup: content
- id: WallRockCoal
prob: 0.6
orGroup: content
- id: WallRockTin
prob: 0.4
orGroup: content
- id: WallMining
prob: 0.8
orGroup: content
- !type:BoundaryWallPostGen
tile: FloorCaveDrought
wall: WallRock
cornerWall: WallRock
- !type:AutoCablingPostGen
entity: Catwalk
- !type:JunctionPostGen
tile: FloorCaveDrought
width: 3
entities:
- RandomWoodenSupport
- !type:CornerClutterPostGen
contents:
- id: RandomStalagmiteOrCrystal
amount: 1
- type: dungeonConfig
id: SnowyLabs
generator: !type:PrefabDunGen
roomWhitelist:
- SnowyLabs
presets:
- Bucket
- Wow
- SpaceShip
- Tall
postGeneration:
- !type:CorridorPostGen
width: 3
- !type:DungeonEntrancePostGen
count: 2
- !type:RoomEntrancePostGen
entities:
- CableApcExtension
- AirlockFreezerHydroponicsLocked
- !type:EntranceFlankPostGen
entities:
- Grille
- Window
- !type:ExternalWindowPostGen
entities:
- Grille
- Window
- !type:WallMountPostGen
spawns:
# Posters
- id: RandomPosterLegit
orGroup: content
- id: ExtinguisherCabinetFilled
prob: 0.2
orGroup: content
- id: RandomPainting
prob: 0.05
orGroup: content
- id: IntercomScience
prob: 0.1
orGroup: content
- !type:BoundaryWallPostGen
tile: FloorSteel
wall: WallSilver
cornerWall: WallSilver
- !type:JunctionPostGen
width: 1
entities:
- AirlockGlass
- !type:JunctionPostGen
entities:
- AirlockGlass
- !type:AutoCablingPostGen
- !type:CornerClutterPostGen
contents:
- id: PottedPlantRandom
amount: 1
- !type:CorridorDecalSkirtingPostGen
color: "#4cc7aa96"
cardinalDecals:
South: BrickTileWhiteLineS
East: BrickTileWhiteLineE
North: BrickTileWhiteLineN
West: BrickTileWhiteLineW
cornerDecals:
SouthEast: BrickTileWhiteCornerSe
SouthWest: BrickTileWhiteCornerSw
NorthEast: BrickTileWhiteCornerNe
NorthWest: BrickTileWhiteCornerNw
pocketDecals:
SouthWest: BrickTileWhiteInnerSw
SouthEast: BrickTileWhiteInnerSe
NorthWest: BrickTileWhiteInnerNw
NorthEast: BrickTileWhiteInnerNe
# todo: Add a biome dungeon generator
# Add corridor first gens that place rooms on top
# Add a worm corridor gen (place subsequent corridors somewhere randomly along the path)
# Place room entrances on ends of corridors touching a tile
# Remove all room tiles from corridors
# Fix paths up and try to reconnect all corridor tiles
# Add a postgen step to spread rooms out, though it shouldn't spread into corridor exteriors
- type: dungeonConfig
id: Haunted
generator: !type:PrefabDunGen
tile: FloorCaveDrought
roomWhitelist:
- Mineshaft
id: PlanetBase
layers:
- !type:PrefabDunGen
presets:
- Bucket
- Wow
- SpaceShip
- Tall
postGeneration:
- !type:WormCorridorPostGen
width: 3
tile: FloorCaveDrought
- !type:CorridorClutterPostGen
contents:
- id: FloraStalagmite1
- id: FloraStalagmite2
- id: FloraStalagmite3
- id: FloraStalagmite4
- id: FloraStalagmite5
- id: FloraStalagmite6
- !type:CorridorDunGen
width: 3
- !type:BoundaryWallPostGen
tile: FloorCaveDrought
wall: WallRock
- !type:DungeonEntranceDunGen
count: 2
- !type:RoomEntranceDunGen
- !type:EntranceFlankDunGen
- !type:ExternalWindowDunGen
- !type:WallMountDunGen
- !type:BoundaryWallDunGen
- !type:JunctionDunGen
width: 1
- !type:JunctionDunGen
- !type:AutoCablingDunGen
- !type:CornerClutterDunGen
- !type:CorridorDecalSkirtingDunGen
cardinalDecals:
South: BrickTileWhiteLineS
East: BrickTileWhiteLineE
North: BrickTileWhiteLineN
West: BrickTileWhiteLineW
cornerDecals:
SouthEast: BrickTileWhiteCornerSe
SouthWest: BrickTileWhiteCornerSw
NorthEast: BrickTileWhiteCornerNe
NorthWest: BrickTileWhiteCornerNw
pocketDecals:
SouthWest: BrickTileWhiteInnerSw
SouthEast: BrickTileWhiteInnerSe
NorthWest: BrickTileWhiteInnerNw
NorthEast: BrickTileWhiteInnerNe
# Setups
- type: dungeonConfig
id: Experiment
data:
colors:
Decals: "#D381C996"
entities:
Cabling: CableApcExtension
CornerWalls: WallReinforced
Walls: WallSolid
spawnGroups:
CornerClutter: BaseClutter
Entrance: BaseAirlock
EntranceFlank: BaseWindow
Junction: BaseAirlock
WallMounts: ScienceLabsWalls
Window: BaseWindow
tiles:
FallbackTile: FloorSteel
whitelists:
Rooms:
tags:
- SalvageExperiment
layers:
- !type:PrototypeDunGen
proto: PlanetBase
- type: dungeonConfig
id: Haunted
data:
entities:
Walls: WallRock
tiles:
FallbackTile: FloorCaveDrought
whitelists:
Rooms:
tags:
- Mineshaft
layers:
- !type:PrefabDunGen
presets:
- Bucket
- Wow
- SpaceShip
- Tall
- !type:WormCorridorDunGen
width: 3
- !type:CorridorClutterDunGen
contents:
- id: FloraStalagmite1
- id: FloraStalagmite2
- id: FloraStalagmite3
- id: FloraStalagmite4
- id: FloraStalagmite5
- id: FloraStalagmite6
- !type:BoundaryWallDunGen
- type: dungeonConfig
id: LavaBrig
data:
colors:
Decals: "#DE3A3A96"
entities:
Cabling: CableApcExtension
CornerWalls: WallReinforced
Walls: WallSolid
spawnGroups:
CornerClutter: BaseClutter
Entrance: LavaBrigEntrance
EntranceFlank: BaseWindow
Junction: BaseAirlock
WallMounts: ScienceLabsWalls
Window: BaseWindow
whitelists:
Rooms:
tags:
- LavaBrig
layers:
- !type:PrototypeDunGen
proto: PlanetBase
- type: dungeonConfig
id: Mineshaft
data:
entities:
Cabling: Catwalk
spawnGroups:
CornerClutter: MineshaftClutter
Entrance: BaseWoodWall
EntranceFlank: BaseWoodWall
Junction: BaseWoodSupport
Window: BaseWoodWall
tiles:
FallbackTile: FloorCaveDrought
whitelists:
Rooms:
tags:
- Mineshaft
layers:
- !type:PrototypeDunGen
proto: PlanetBase
- type: dungeonConfig
id: SnowyLabs
data:
colors:
Decals: "#4cc7aa96"
entities:
Cabling: CableApcExtension
CornerWalls: WallSilver
Walls: WallSilver
spawnGroups:
CornerClutter: BaseClutter
Entrance: SnowyLabsEntrance
EntranceFlank: BaseWindow
Junction: BaseAirlock
WallMounts: SnowyLabsWalls
Window: BaseWindow
tiles:
FallbackTile: FloorSteel
whitelists:
Rooms:
tags:
- SnowyLabs
layers:
- !type:PrototypeDunGen
proto: PlanetBase
# Spawn groups
# Basic
- type: entitySpawnEntry
id: BaseClutter
entries:
- id: PottedPlantRandom
amount: 1
- type: entitySpawnEntry
id: BaseAirlock
entries:
- id: CableApcExtension
- id: AirlockGlass
- type: entitySpawnEntry
id: BaseWindow
entries:
- id: Grille
- id: Window
# Lava brig
- type: entitySpawnEntry
id: LavaBrigEntrance
entries:
- id: CableApcExtension
- id: AirlockSecurityGlassLocked
# Mineshaft
- type: entitySpawnEntry
id: BaseWoodWall
entries:
- id: RandomWoodenWall
- type: entitySpawnEntry
id: BaseWoodSupport
entries:
- id: RandomWoodenSupport
- type: entitySpawnEntry
id: MineshaftClutter
entries:
- id: RandomStalagmiteOrCrystal
amount: 1
- type: entitySpawnEntry
id: MineshaftWalls
entries:
# Ore
- id: WallRockSalt
prob: 0.6
orGroup: content
- id: WallRockCoal
prob: 0.6
orGroup: content
- id: WallRockTin
prob: 0.4
orGroup: content
- id: WallMining
prob: 0.8
orGroup: content
# Science lab
- type: entitySpawnEntry
id: ScienceLabsWalls
entries:
# Posters
- id: RandomPosterLegit
orGroup: content
- id: ExtinguisherCabinetFilled
prob: 0.2
orGroup: content
- id: RandomPainting
prob: 0.05
orGroup: content
- id: IntercomCommon
prob: 0.1
orGroup: content
# Snowy labs
- type: entitySpawnEntry
id: SnowyLabsEntrance
entries:
- id: CableApcExtension
- id: AirlockFreezerHydroponicsLocked
- type: entitySpawnEntry
id: SnowyLabsWalls
entries:
# Posters
- id: RandomPosterLegit
orGroup: content
- id: ExtinguisherCabinetFilled
prob: 0.2
orGroup: content
- id: RandomPainting
prob: 0.05
orGroup: content
- id: IntercomScience
prob: 0.1
orGroup: content

View File

@@ -0,0 +1,191 @@
# Okay so my general thought is this:
# 1. Generate the large mass
# 2. Generate smaller masses offset
# 3. Generate N normal dungeons around the larger mass, preferably near the border
# 4. Generate large paths / small paths around the place
# 5. Spawn ores + fill the rest and the normal stuff
# If you want mobs they needed to be added at specific steps due to how dungeons work at the moment.
- type: dungeonConfig
id: VGRoid
layers:
- !type:PrototypeDunGen
proto: VGRoidBlob
- !type:PrototypeDunGen
proto: VGRoidExterior
- !type:PrototypeDunGen
proto: VGRoidSmaller
- !type:PrototypeDunGen
proto: VGRoidSmallPaths
# Fill
- !type:PrototypeDunGen
proto: VGRoidFill
# Ores
- !type:OreDunGen
replacement: IronRock
entity: IronRockIron
count: 50
minGroupSize: 20
maxGroupSize: 30
- !type:OreDunGen
replacement: IronRock
entity: IronRockCoal
count: 50
minGroupSize: 20
maxGroupSize: 30
- !type:OreDunGen
replacement: IronRock
entity: IronRockQuartz
count: 50
minGroupSize: 20
maxGroupSize: 30
- !type:OreDunGen
replacement: IronRock
entity: IronRockSalt
count: 50
minGroupSize: 20
maxGroupSize: 30
- !type:OreDunGen
replacement: IronRock
entity: IronRockGold
count: 50
minGroupSize: 10
maxGroupSize: 20
- !type:OreDunGen
replacement: IronRock
entity: IronRockSilver
count: 50
minGroupSize: 10
maxGroupSize: 20
- !type:OreDunGen
replacement: IronRock
entity: IronRockPlasma
count: 50
minGroupSize: 10
maxGroupSize: 20
- !type:OreDunGen
replacement: IronRock
entity: IronRockUranium
count: 50
minGroupSize: 10
maxGroupSize: 20
- !type:OreDunGen
replacement: IronRock
entity: IronRockBananium
count: 50
minGroupSize: 10
maxGroupSize: 20
- !type:OreDunGen
replacement: IronRock
entity: IronRockArtifactFragment
count: 50
minGroupSize: 2
maxGroupSize: 4
# Configs
- type: dungeonConfig
id: VGRoidBlob
layers:
- !type:NoiseDistanceDunGen
size: 272, 272
distanceConfig: !type:DunGenEuclideanSquaredDistance
blendWeight: 0.80
layers:
- tile: FloorAsteroidSand
threshold: 0.50
noise:
frequency: 0.010
noiseType: OpenSimplex2
fractalType: FBm
octaves: 5
lacunarity: 2
gain: 0.5
- type: dungeonConfig
id: VGRoidSmaller
minOffset: 40
maxOffset: 60
layers:
- !type:NoiseDistanceDunGen
size: 150, 150
distanceConfig: !type:DunGenEuclideanSquaredDistance
layers:
- tile: FloorAsteroidSand
threshold: 0.50
noise:
frequency: 0.080
noiseType: OpenSimplex2
fractalType: FBm
octaves: 5
lacunarity: 1.5
gain: 0.5
- type: dungeonConfig
id: VGRoidExterior
reserveTiles: true
data:
tiles:
FallbackTile: PlatingAsteroid
WidenTile: FloorAsteroidSand
layers:
- !type:PrototypeDunGen
proto: VGRoidExteriorDungeons
- !type:SplineDungeonConnectorDunGen
- type: dungeonConfig
id: VGRoidExteriorDungeons
reserveTiles: true
minCount: 2
maxCount: 3
layers:
- !type:ExteriorDunGen
proto: Experiment
- !type:MobsDunGen
minCount: 5
maxCount: 8
groups:
- id: MobXeno
amount: 1
#- type: dungeonConfig
# id: VGRoidInteriorDungeons
# minCount: 3
# maxCount: 5
# # Just randomly spawn these in bounds, doesn't really matter if they go out.
- type: dungeonConfig
id: VGRoidSmallPaths
reserveTiles: true
layers:
- !type:ReplaceTileDunGen
layers:
- tile: FloorAsteroidSand
threshold: 0.75
noise:
frequency: 0.040
noiseType: OpenSimplex2
fractalType: Ridged
lacunarity: 1.5
octaves: 2
gain: 2.0
# Mobs
# If you want exterior dungeon mobs add them under the prototype.
- !type:MobsDunGen
minCount: 20
maxCount: 30
groups:
- id: MobXeno
amount: 1
#- type: dungeonConfig
# id: VGRoidOres
# Fill with rocks.
- type: dungeonConfig
id: VGRoidFill
data:
entities:
Fill: IronRock
layers:
- !type:FillGridDunGen