Fornax Posted November 5, 2023 Share Posted November 5, 2023 This is probably the most appropriate place for this. Currently the ruins in DST look like this: I would like to explain what's wrong with them based on the code (and BTW, my knowledge of Lua is not impressive; I'm saved only by the ease of interpreting the ruins generation code, lol). Also, I'm providing a link to my mod, thanks to which I restored the ruins known from DS: https://steamcommunity.com/sharedfiles/filedetails/?id=3012767514 The Village biome: AddRoom("RuinedCity", {-- Maze used to define room connectivity colour={r=.25,g=.28,b=.25,a=.50}, value = WORLD_TILES.CAVE, tags = {"Maze", "Nightmare"}, internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeCentroid, contents = { countprefabs= { cave_hole = function() return math.random() < 0.25 and 1 or 0 end, }, distributepercent = 0.09, distributeprefabs= { lichen = .3, cave_fern = 1, pillar_algae = .05, cave_banana_tree = 0.1, monkeybarrel_spawner = 0.06, slurper_spawner = 0.06, pond_cave = 0.07, fissure_lower = 0.04, worm_spawner = 0.04, } } }) The primary issue with the Village biome is that it uses "WORLD_TILES.CAVE" (which is used in the guano biome) instead of "WORLD_TILES.MUD." As a result, this biome has no chance of correctly generating and placing resources listed in the "Vacant" room (monkey barrels, bananas, lichen, and The Village static layouts). In my mod, I modified this biome to use the correct tiles, and I removed "internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeCentroid": AddRoom("RuinedCityRoom", {-- Maze used to define room connectivity colour={r=.25,g=.28,b=.25,a=.50}, value = WORLD_TILES.MUD, tags = {"Maze", "Nightmare"}, contents = { countprefabs= { cave_hole = function() return math.random() < 0.25 and 1 or 0 end, }, distributepercent = 0.09, distributeprefabs= { lichen = .3, cave_fern = 1, pillar_algae = .05, cave_banana_tree = 0.1, monkeybarrel_spawner = 0.06, slurper_spawner = 0.06, pond_cave = 0.07, fissure_lower = 0.04, wormlight_plant = 0.08, worm_spawner = 0.04, } } }) As a result, we get a biome identical to the Village biome known from DS. Military: The Military biome was one of the cooler biomes in DS, however, holy moly, it has been massacred in DST. The fundamental problem with this biome is the lack of a background room. So, I copied it from DS: AddRoom("BGMilitaryRoom", { colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.UNDERROCK, tags = {"Maze","Nightmare"}, contents = { countprefabs= { cave_hole = function() return math.random() < 0.25 and 1 or 0 end, }, distributepercent = 0.1, distributeprefabs= { dropperweb = 1, pillar_ruins = 0.33, nightmarelight = 0.33, rock_flintless = 0.66, } } }) However, this biome has more issues: Military Maze room: AddRoom("MilitaryMaze", { -- layout contents determined by maze colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.IMPASSABLE, tags = {"Maze", "Nightmare"}, internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeCentroid, }) Barracks room: AddRoom("Barracks",{ colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.CAVE, tags = {"Nightmare"}, internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeSite, contents = { countstaticlayouts = { ["Barracks"] = 1, }, distributepercent = 0.03, distributeprefabs= { chessjunk_spawner = .3, nightmarelight = 1, rook_nightmare_spawner = .07, bishop_nightmare_spawner = .07, knight_nightmare_spawner = .07, } } }) For some reason, the Maze uses "WORLD_TILES.IMPASSABLE", Barracks uses "WORLD_TILES.CAVE" when they should use "WORLD_TILES.UNDERROCK" - changing the tiles to the correct ones and removing "internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeCentroid" makes the biome generate correctly! (Oh, I missed you, dangling depth dwellers.): Two Military Tasks: AddTask("MilitaryTask", { locks={LOCKS.HARD, LOCKS.RUINS}, keys_given= {KEYS.TIER4, KEYS.RUINS}, room_tags = {"Nightmare"}, entrance_room = {"MilitaryEntranceRoom"}, room_choices = { ["MilitaryMazeRoom"] = 6, ["BarracksRoom"] = function() return math.random(1,3) end, }, room_bg = WORLD_TILES.TILES, maze_tiles = {rooms = {"room_armoury", "hallway_armoury", "room_armoury_two"}, bosses = {"room_armoury_two"}}, background_room="BGMilitaryRoom", colour={r=0.6,g=0.6,b=0.0,a=1}, }) AddTask("MilitaryPitsTask", { locks={LOCKS.HARD, LOCKS.RUINS}, keys_given= {KEYS.TIER4, KEYS.RUINS}, room_tags = {"Nightmare"}, entrance_room = "MilitaryEntranceRoom", room_choices = { ["MilitaryMazeRoom"] = 6, }, room_bg = WORLD_TILES.TILES, maze_tiles = {rooms = {"pit_room_armoury", "pit_hallway_armoury", "pit_room_armoury_two"}, bosses = {"pit_room_armoury_two"}}, background_room="BGMilitaryRoom", colour={r=0.6,g=0.6,b=0.0,a=1}, }) Sacred: Well, to put it bluntly, this biome doesn't resemble Sacred from DS at all. This biome should be one of the most dangerous in the ruins (alongside the Village biome), yet at times, it turns out to be one of the safest (lol), especially after clearing the ruins. The fundamental problem lies with BGSacred: bgsacred = { colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.BRICK, tags = {"Nightmare"}, contents = { countprefabs= { cave_hole = 1, }, distributepercent = 0.03, distributeprefabs= { chessjunk_spawner = .3, nightmarelight = 1, pillar_ruins = 0.5, ruins_statue_head_spawner = .1, ruins_statue_head_nogem_spawner = .2, ruins_statue_mage_spawner =.1, ruins_statue_mage_nogem_spawner = .2, rook_nightmare_spawner = .07, bishop_nightmare_spawner = .07, knight_nightmare_spawner = .07, } } } AddRoom("BGSacred", bgsacred) AddRoom("BGSacredRoom", Roomify(bgsacred)) Overall, it seems that the game is very reluctant to generate the background room as coded in this way. It should also use WORLD_TILES.TILES instead of WORLD_TILES.BRICK. So, I copied the code from DS: AddRoom("BGSacred", { colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.TILES, tags = {"Nightmare"}, contents = { countprefabs= { cave_hole = 1, }, distributepercent = 0.03, distributeprefabs= { chessjunk_spawner = .3, nightmarelight = 1, pillar_ruins = 0.5, ruins_statue_head_spawner = .1, ruins_statue_head_nogem_spawner = .2, ruins_statue_mage_spawner =.1, ruins_statue_mage_nogem_spawner = .2, rook_nightmare_spawner = .07, bishop_nightmare_spawner = .07, knight_nightmare_spawner = .07, } } }) This restores the expected background room. However, that's not all: --Bridge Entrance AddRoom("BridgeEntrance",{ colour={r=0.0,g=0.2,b=0.2,a=0.3}, value = WORLD_TILES.IMPASSABLE, tags = {"ForceConnected", "RoadPoison", "Nightmare"}, contents = {}, }) --Worship Area AddRoom("Bishops",{ colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.IMPASSABLE, tags = {"Nightmare"}, internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeSite, contents = { countstaticlayouts = { ["Barracks2"] = 1, }, } }) --Sacred Barracks AddRoom("SacredBarracks",{ colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.IMPASSABLE, tags = {"Nightmare"}, internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeSite, contents = { countstaticlayouts = { ["SacredBarracks"] = 1, }, } }) --Living quarters AddRoom("Spiral",{ colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.IMPASSABLE, tags = {"Nightmare"}, internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeSite, contents = { countstaticlayouts = { ["Spiral"] = 1, }, } }) --BrokenAltar AddRoom("BrokenAltar", { colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.IMPASSABLE, tags = {"Nightmare"}, internal_type = NODE_INTERNAL_CONNECTION_TYPE.EdgeSite, contents = { countstaticlayouts = { ["BrokenAltar"] = 1, }, } }) It seems that "value = WORLD_TILES.IMPASSABLE" is responsible for the unappealing appearance of the Sacred Biome. I changed the code as follows: AddRoom("AltarRoom", { colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.TILES, tags = {"Nightmare"}, required_prefabs = {"sacred_chest"}, contents = { countstaticlayouts = { ["AltarRoom"] = 1, }, } }) AddRoom("BishopsRoom",{ colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.TILES, tags = {"Nightmare"}, contents = { countstaticlayouts = { ["Barracks2"] = 1, }, } }) --Sacred Barracks AddRoom("SacredBarracksRoom",{ colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.TILES, tags = {"Nightmare"}, contents = { countstaticlayouts = { ["SacredBarracks"] = 1, }, } }) --Living quarters AddRoom("SpiralRoom",{ colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.TILES, tags = {"Nightmare"}, contents = { countstaticlayouts = { ["Spiral"] = 1, }, } }) --BrokenAltar AddRoom("BrokenAltarRoom", { colour={r=0.3,g=0.2,b=0.1,a=0.3}, value = WORLD_TILES.TILES, tags = {"Nightmare"}, contents = { countstaticlayouts = { ["BrokenAltar"] = 1, }, } }) Changing "value = WORLD_TILES.IMPASSABLE" to "value = WORLD_TILES.TILES" restores balance in the universe, as seen in the screenshot: Additionally, the Sacred biome in DS has a dedicated entrance room! AddRoom("SacredEntranceRoom", { colour={r=0.2,g=0.0,b=0.2,a=0.3}, value = WORLD_TILES.TILES, tags = {"Nightmare", "ForceConnected", "MazeEntrance"}, contents = { distributepercent = 0.1, distributeprefabs= { nightmarelight = 1, }, } }) The Sacred biome is not so safe anymore, is it? Four Sacred Task: AddTask("DSSacredTask", { locks={LOCKS.SACRED,LOCKS.RUINS,LOCKS.TIER5}, keys_given={KEYS.SACRED,KEYS.HARD}, entrance_room = {"SacredEntranceRoom"}, room_tags = {"Nightmare"}, room_choices={ ["SacredBarracksRoom"] = function() return math.random(1,3) end, ["BishopsRoom"] = function() return math.random(1,3) end, ["SpiralRoom"] = function() return math.random(1,2) end, ["BrokenAltarRoom"] = function() return math.random(1,3) end, ["AltarRoom"] = 1, }, background_room="BGSacredRoomify", room_bg=WORLD_TILES.BRICK, colour={r=0.3,g=0.2,b=0.1,a=0.3}, }) AddTask("MoreAltarsTask", { locks={LOCKS.SACRED,LOCKS.RUINS,LOCKS.TIER5}, keys_given={KEYS.SACRED,KEYS.HARD}, room_tags = {"Nightmare"}, room_choices = { ["BrokenAltarRoom"] = function() return math.random(1,3) end, ["SacredBarracksRoom"] = function() return math.random(1,3) end, }, room_bg = WORLD_TILES.BRICK, background_room="BGSacredRoomify", colour={r=1,g=0,b=0.6,a=1}, }) AddTask("SacredDangerTask", { locks={LOCKS.SACRED,LOCKS.RUINS,LOCKS.TIER5}, keys_given={KEYS.SACRED,KEYS.HARD}, room_tags = {"Nightmare"}, room_choices = { ["SacredBarracksRoom"] = function() return math.random(1,3) end, ["BarracksRoom"] = function() return math.random(1,3) end, }, room_bg = WORLD_TILES.BRICK, background_room="BGSacredRoomify", colour={r=1,g=0,b=0.6,a=1}, }) AddTask("MuddySacredTask", { locks={LOCKS.SACRED,LOCKS.RUINS,LOCKS.TIER5}, keys_given={KEYS.SACRED,KEYS.HARD}, room_tags = {"Nightmare"}, room_choices = { ["SacredBarracksRoom"] = function() return math.random(1,3) end, ["BishopsRoom"] = function() return math.random(1,3) end, ["SpiralRoom"] = function() return math.random(1,3) end, ["BrokenAltarRoom"] = function() return math.random(1,3) end, ["WetWilds"] = 1, ["MonkeyMeadow"] = 1, }, room_bg = WORLD_TILES.BRICK, background_room="BGWilds", colour={r=1,g=0,b=0.6,a=1}, }) Another issue is the connection between biomes. In DS, the Village, Military, and Labyrinth biomes are connected to the Wilds biome. The Sacred biome is connected to the Labyrinth (the Ancient Guardian guards the Sacred biomes). In DST, we first have the Wilds biome, then what's left of the poor Village biome, to which the Military and Sacred biomes are attached. The Labyrinth biome is typically at the end of the ruins. Separating the Sacred biome from the Labyrinth often results in ruins having several branches, often VERY far apart, requiring a lot of traveling. At first, I tried to keep the connection between the Mud Biome and Wilds Biome as in DST, but it caused a lot of issues in cave generation. In DS, the entrance to the ruins is in the spilagmite biome. When I tried the same in DST - it worked! In organizing the ruins in DST, I relied on trial and error, which is definitely not the most efficient solution. Oh, I would have forgotten, the ubiquitous PitRoom does more harm than good in generating nicely looking caves. Another problem I noticed after cave genning - it seems that with such ruins, the default caves were too small, causing the biomes to merge. In my mod, I had to limit the number of biomes and reduce the number of rooms per biome to circumvent this issue. It's a long post, but I have a small hope that thanks to this, the developers will consider restoring the ruins known from DS. Link to comment https://forums.kleientertainment.com/forums/topic/152234-the-ruins/ Share on other sites More sharing options...
KvltBear Posted November 5, 2023 Share Posted November 5, 2023 Looks very, very nice. Going to try your mod on my next run. Have to admit I really don't enjoy the stringy spread out state of the ruins right now. Doesn't really feel like an ancient city to me. It's such a mess, I always end up traversing the same exact path back and forth from the ruins and lunar biome to my best sinkhole. Question, would this mod be compatible with the "force biomes" mod? I really have no interest in biomes like the mixed mushtree forest or the extra deciduous surface biome so I just force spawn the ones I want instead of constantly regenerating the world. I could always leave the caves biomes as default but I'd prefer the maximum amount of ruins biomes and not the less useful caves ones. Link to comment https://forums.kleientertainment.com/forums/topic/152234-the-ruins/#findComment-1677782 Share on other sites More sharing options...
Fornax Posted November 6, 2023 Author Share Posted November 6, 2023 This mod doesn't change surface generation in any way, only caves. As for the force biomes mod, I doubt it would work. Caves always have the same set of biomes (for some reason, mixed mushtree is always close to ruins), and biomes in ruins are randomly chosen - having 2-3 Sacred biomes is a quite common sight, so you can have a lot of gems and thulecite, just like in single player. Link to comment https://forums.kleientertainment.com/forums/topic/152234-the-ruins/#findComment-1677885 Share on other sites More sharing options...
Guille6785 Posted November 6, 2023 Share Posted November 6, 2023 What I'm getting from this is that the developers most likely did initially want the ruins in DST to look like the ones in DS, but simple mistakes happened while porting it and due to poor communication within the team some developers might've assumed that that's what the others wanted the ruins to look like, which eventually led to the ruins never getting those bugs fixed to be properly implemented Link to comment https://forums.kleientertainment.com/forums/topic/152234-the-ruins/#findComment-1677887 Share on other sites More sharing options...
Fornax Posted November 7, 2023 Author Share Posted November 7, 2023 yeah I suspect that's the reason. Lately I've been watching a lot of CC speedruns, and I must say the current ruins significantly slow down progress because they are unnecessarily vast. Mega-basers would also benefit from improved ruins - they are more visually pleasing, much more enjoyable to explore, and offer more building possibilities. Link to comment https://forums.kleientertainment.com/forums/topic/152234-the-ruins/#findComment-1678023 Share on other sites More sharing options...
KvltBear Posted November 7, 2023 Share Posted November 7, 2023 Yeah I generated a few worlds the other day and it didn't seem like the biome selection was having an effect. Which is fine because, as you said, the ruins are much more consistently vast and resource rich than before. And honestly the layout is just so, so fantastic. The biomes are meatier and more coherent. It all just looks like a natural formation. It flows so nicely. I can't see myself going back. Link to comment https://forums.kleientertainment.com/forums/topic/152234-the-ruins/#findComment-1678086 Share on other sites More sharing options...
arubaro Posted November 8, 2023 Share Posted November 8, 2023 On 11/6/2023 at 5:47 AM, Guille6785 said: What I'm getting from this is that the developers most likely did initially want the ruins in DST to look like the ones in DS, but simple mistakes happened while porting it and due to poor communication within the team some developers might've assumed that that's what the others wanted the ruins to look like, which eventually led to the ruins never getting those bugs fixed to be properly implemented just see how many years took to fix the room with the complete pseudoscience station... Link to comment https://forums.kleientertainment.com/forums/topic/152234-the-ruins/#findComment-1678222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.