From e37b83a0b9dac651c1d7f9e2399daada5bb92700 Mon Sep 17 00:00:00 2001 From: warriorstar-orion Date: Sun, 24 Nov 2024 09:10:15 -0500 Subject: [PATCH] Enforce ruin cost as factor of ruin size. (#27198) * refactor: Enforce ruin cost as factor of ruin size. * remove cost-related comment * bump up space ruin numbers based on testing * remove old lavaland_ruin_budget setting * one more tiny tweak down * Update config/example/config.toml Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: warriorstar-orion * Update config/example/config.toml Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> --------- Signed-off-by: warriorstar-orion Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> --- .../sections/ruin_configuration.dm | 15 ++- .../subsystem/non_firing/SSmapping.dm | 98 ++-------------- code/datums/ruins.dm | 10 +- code/datums/ruins/lavaland.dm | 21 +--- code/datums/ruins/ruin_placer.dm | 108 ++++++++++++++++++ code/datums/ruins/space_ruins.dm | 26 +---- config/example/config.toml | 26 +++-- paradise.dme | 1 + 8 files changed, 158 insertions(+), 147 deletions(-) create mode 100644 code/datums/ruins/ruin_placer.dm diff --git a/code/controllers/configuration/sections/ruin_configuration.dm b/code/controllers/configuration/sections/ruin_configuration.dm index a4664b61700..cad322a7f52 100644 --- a/code/controllers/configuration/sections/ruin_configuration.dm +++ b/code/controllers/configuration/sections/ruin_configuration.dm @@ -12,8 +12,14 @@ var/list/active_space_ruins = list() /// List of all active lavaland ruins var/list/active_lava_ruins = list() - /// Budget for lavaland ruins - var/lavaland_ruin_budget = 60 + /// Minimum budget for space ruins + var/space_ruin_budget_min = 750 + /// Maximum budget for space ruins + var/space_ruin_budget_max = 1000 + /// Minimum budget for lavaland ruins + var/lavaland_ruin_budget_min = 175 + /// Maximum budget for lavaland ruins + var/lavaland_ruin_budget_max = 325 /datum/configuration_section/ruin_configuration/load_data(list/data) // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line @@ -23,4 +29,7 @@ CONFIG_LOAD_NUM(extra_levels_max, data["maximum_zlevels"]) CONFIG_LOAD_LIST(active_space_ruins, data["active_space_ruins"]) CONFIG_LOAD_LIST(active_lava_ruins, data["active_lava_ruins"]) - CONFIG_LOAD_NUM(lavaland_ruin_budget, data["lavaland_ruin_budget"]) + CONFIG_LOAD_NUM(space_ruin_budget_min, data["space_ruin_budget_min"]) + CONFIG_LOAD_NUM(space_ruin_budget_max, data["space_ruin_budget_max"]) + CONFIG_LOAD_NUM(lavaland_ruin_budget_min, data["lavaland_ruin_budget_min"]) + CONFIG_LOAD_NUM(lavaland_ruin_budget_max, data["lavaland_ruin_budget_max"]) diff --git a/code/controllers/subsystem/non_firing/SSmapping.dm b/code/controllers/subsystem/non_firing/SSmapping.dm index dd9d204298e..4787783e7b6 100644 --- a/code/controllers/subsystem/non_firing/SSmapping.dm +++ b/code/controllers/subsystem/non_firing/SSmapping.dm @@ -26,6 +26,11 @@ SUBSYSTEM_DEF(mapping) /// A mapping of environment names to MILLA environment IDs. var/list/environments + /// Ruin placement manager for space levels. + var/datum/ruin_placer/space/space_ruins_placer + /// Ruin placement manager for lavaland levels. + var/datum/ruin_placer/lavaland/lavaland_ruins_placer + // This has to be here because world/New() uses [station_name()], which looks this datum up /datum/controller/subsystem/mapping/PreInit() . = ..() @@ -108,7 +113,8 @@ SUBSYSTEM_DEF(mapping) // Spawn Lavaland ruins and rivers. log_startup_progress("Populating lavaland...") var/lavaland_setup_timer = start_watch() - seedRuins(list(level_name_to_num(MINING)), GLOB.configuration.ruins.lavaland_ruin_budget, /area/lavaland/surface/outdoors/unexplored, GLOB.lava_ruins_templates) + lavaland_ruins_placer = new() + lavaland_ruins_placer.place_ruins(list(level_name_to_num(MINING))) if(lavaland_theme) lavaland_theme.setup() if(caves_theme) @@ -252,10 +258,10 @@ SUBSYSTEM_DEF(mapping) // Note that this budget is not split evenly accross all zlevels log_startup_progress("Seeding ruins...") var/seed_ruins_timer = start_watch() - var/space_z_levels = levels_by_trait(SPAWN_RUINS) - seedRuins(space_z_levels, rand(20, 30), /area/space, GLOB.space_ruins_templates) + space_ruins_placer = new() + space_ruins_placer.place_ruins(levels_by_trait(SPAWN_RUINS)) log_startup_progress("Successfully seeded ruins in [stop_watch(seed_ruins_timer)]s.") - seed_space_salvage(space_z_levels) + seed_space_salvage(levels_by_trait(SPAWN_RUINS)) // Loads in the station /datum/controller/subsystem/mapping/proc/loadStation() @@ -301,90 +307,6 @@ SUBSYSTEM_DEF(mapping) GLOB.maploader.load_map(file("_maps/map_files/generic/Lavaland.dmm"), z_offset = lavaland_z_level) log_startup_progress("Loaded Lavaland in [stop_watch(watch)]s") -/datum/controller/subsystem/mapping/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins) - if(!z_levels || !length(z_levels)) - WARNING("No Z levels provided - Not generating ruins") - return - - for(var/zl in z_levels) - var/turf/T = locate(1, 1, zl) - if(!T) - WARNING("Z level [zl] does not exist - Not generating ruins") - return - - var/list/ruins = potentialRuins.Copy() - - var/list/forced_ruins = list() //These go first on the z level associated (same random one by default) - var/list/ruins_availible = list() //we can try these in the current pass - var/forced_z //If set we won't pick z level and use this one instead. - - //Set up the starting ruin list - for(var/key in ruins) - var/datum/map_template/ruin/R = ruins[key] - if(R.cost > budget) //Why would you do that - continue - if(R.always_place) - forced_ruins[R] = -1 - if(R.unpickable) - continue - ruins_availible[R] = R.placement_weight - - while(budget > 0 && (length(ruins_availible) || length(forced_ruins))) - var/datum/map_template/ruin/current_pick - var/forced = FALSE - if(length(forced_ruins)) //We have something we need to load right now, so just pick it - for(var/ruin in forced_ruins) - current_pick = ruin - if(forced_ruins[ruin] > 0) //Load into designated z - forced_z = forced_ruins[ruin] - forced = TRUE - break - else //Otherwise just pick random one - current_pick = pickweight(ruins_availible) - - var/placement_tries = PLACEMENT_TRIES - var/failed_to_place = TRUE - var/z_placed = 0 - while(placement_tries > 0) - placement_tries-- - z_placed = pick(z_levels) - if(!current_pick.try_to_place(forced_z ? forced_z : z_placed,whitelist)) - continue - else - failed_to_place = FALSE - break - - //That's done remove from priority even if it failed - if(forced) - //TODO : handle forced ruins with multiple variants - forced_ruins -= current_pick - forced = FALSE - - if(failed_to_place) - for(var/datum/map_template/ruin/R in ruins_availible) - if(R.id == current_pick.id) - ruins_availible -= R - log_world("Failed to place [current_pick.name] ruin.") - else - budget -= current_pick.cost - if(!current_pick.allow_duplicates) - for(var/datum/map_template/ruin/R in ruins_availible) - if(R.id == current_pick.id) - ruins_availible -= R - if(current_pick.never_spawn_with) - for(var/blacklisted_type in current_pick.never_spawn_with) - for(var/possible_exclusion in ruins_availible) - if(istype(possible_exclusion,blacklisted_type)) - ruins_availible -= possible_exclusion - forced_z = 0 - - //Update the availible list - for(var/datum/map_template/ruin/R in ruins_availible) - if(R.cost > budget) - ruins_availible -= R - - log_world("Ruin loader finished with [budget] left to spend.") - /datum/controller/subsystem/mapping/proc/make_maint_all_access() for(var/area/station/maintenance/A in existing_station_areas) for(var/obj/machinery/door/airlock/D in A) diff --git a/code/datums/ruins.dm b/code/datums/ruins.dm index 7cfc24fdd16..76462159b29 100644 --- a/code/datums/ruins.dm +++ b/code/datums/ruins.dm @@ -10,7 +10,6 @@ var/unpickable = FALSE //If TRUE these won't be placed automatically (can still be forced or loaded with another ruin) var/always_place = FALSE //Will skip the whole weighting process and just plop this down, ideally you want the ruins of this kind to have no cost. var/placement_weight = 1 //How often should this ruin appear - var/cost = 0 //Cost in ruin budget placement system var/allow_duplicates = TRUE var/list/never_spawn_with = null //If this ruin is spawned these will not eg list(/datum/map_template/ruin/base_alternate) @@ -23,3 +22,12 @@ mappath = prefix + suffix ..(path = mappath) + +/// The cost of a ruin is the square root of the product of its dimensions. +/// This encodes the size of the ruin relative to each other without the +/// numbers getting ridiculous. +/datum/map_template/ruin/proc/get_cost() + if(!width || !height) + CRASH("cost of [name]/[suffix] requested before loaded size") + + return floor(sqrt(width * height)) diff --git a/code/datums/ruins/lavaland.dm b/code/datums/ruins/lavaland.dm index de957d20cec..e6ffaba8c91 100644 --- a/code/datums/ruins/lavaland.dm +++ b/code/datums/ruins/lavaland.dm @@ -3,7 +3,6 @@ ci_exclude = /datum/map_template/ruin/lavaland /datum/map_template/ruin/lavaland/biodome - cost = 5 allow_duplicates = FALSE ci_exclude = /datum/map_template/ruin/lavaland/biodome // This is a parent holder, not a ruin itself @@ -36,7 +35,6 @@ Probably best to stay clear." suffix = "lavaland_surface_ash_walker1.dmm" allow_duplicates = FALSE - cost = 20 // Not auto due to the nature of walkers /datum/map_template/ruin/lavaland/free_golem name = "Free Golem Ship" @@ -52,7 +50,6 @@ id = "althland-facility" description = "A grim testament to the Althland Mining Company's ambitions, this facility lies in ruin, swallowed by the very planet it sought to exploit. \ Once a beacon of mining promise, it now stands as a stark reminder of the company's catastrophic demise." - cost = 5 suffix = "lavaland_surface_althland_facility.dmm" allow_duplicates = FALSE @@ -61,12 +58,10 @@ id = "althland-excavation" description = "An abandoned mining pit, once operated by the late Althland Mining Corporation, stands as a testament to the extensive efforts of numerous labor groups who endeavored to exploit the ore-rich depths of the planet. \ Now, it lies abandoned, wholly reclaimed by the hostile environment, transforming into yet another relic of a lost company." - cost = 5 suffix = "lavaland_surface_althland_excavation.dmm" allow_duplicates = FALSE /datum/map_template/ruin/lavaland/sin - cost = 10 allow_duplicates = FALSE ci_exclude = /datum/map_template/ruin/lavaland/sin // This is a parent holder, not a ruin itself @@ -99,14 +94,12 @@ id = "sloth" description = "..." suffix = "lavaland_surface_sloth.dmm" - cost = 0 /datum/map_template/ruin/lavaland/ratvar name = "Dead God" id = "ratvar" description = "Ratvars final resting place." suffix = "lavaland_surface_dead_ratvar.dmm" - cost = 0 allow_duplicates = FALSE /datum/map_template/ruin/lavaland/hierophant @@ -122,7 +115,6 @@ id = "blooddrunk" description = "A strange arrangement of stone tiles and an insane, beastly miner contemplating them." suffix = "lavaland_surface_blooddrunk1.dmm" - cost = 0 allow_duplicates = FALSE //will only spawn one variant of the ruin /datum/map_template/ruin/lavaland/blood_drunk_miner/guardian @@ -138,7 +130,6 @@ id = "ufo-crash" description = "Turns out that keeping your abductees unconscious is really important. Who knew?" suffix = "lavaland_surface_ufo_crash.dmm" - cost = 5 /datum/map_template/ruin/lavaland/xeno_nest name = "Xenomorph Nest" @@ -146,21 +137,19 @@ description = "These xenomorphs got bored of horrifically slaughtering people on space stations, and have settled down on a nice lava filled hellscape to focus on what's really important in life. \ Quality memes." suffix = "lavaland_surface_xeno_nest.dmm" - cost = 20 /datum/map_template/ruin/lavaland/fountain name = "Fountain Hall" id = "fountain" description = "The fountain has a warning on the side. DANGER: May have undeclared side effects that only become obvious when implemented." suffix = "lavaland_surface_fountain_hall.dmm" - cost = 5 + /datum/map_template/ruin/lavaland/survivalcapsule name = "Survival Capsule Ruins" id = "survivalcapsule" description = "What was once sanctuary to the common miner, is now their tomb." suffix = "lavaland_surface_survivalpod.dmm" - cost = 5 /datum/map_template/ruin/lavaland/pizza name = "Ruined Pizza Party" @@ -168,7 +157,6 @@ description = "Little Timmy's birthday pizza-bash took a turn for the worse when a bluespace anomaly passed by." suffix = "lavaland_surface_pizzaparty.dmm" allow_duplicates = FALSE - cost = 5 /datum/map_template/ruin/lavaland/cultaltar name = "Summoning Ritual" @@ -176,7 +164,6 @@ description = "A place of vile worship, the scrawling of blood in the middle glowing eerily. A demonic laugh echoes throughout the caverns" suffix = "lavaland_surface_cultaltar.dmm" allow_duplicates = FALSE - cost = 10 /datum/map_template/ruin/lavaland/hermit name = "Makeshift Shelter" @@ -192,21 +179,18 @@ description = "A heavily-damaged mining ripley, property of a very unfortunate miner. You might have to do a bit of work to fix this thing up." suffix = "lavaland_surface_random_ripley.dmm" allow_duplicates = FALSE - cost = 5 /datum/map_template/ruin/lavaland/puzzle name = "Ancient Puzzle" id = "puzzle" description = "Mystery to be solved." suffix = "lavaland_surface_puzzle.dmm" - cost = 5 /datum/map_template/ruin/lavaland/tumor name = "Elite Tumor" id = "tumor" description = "The victor freed, the loser the next fighter. The ghosts, the endless spectators. And thus the cycle loops..." suffix = "lavaland_surface_elite_tumor.dmm" - cost = 5 always_place = TRUE /datum/map_template/ruin/lavaland/monster_nest @@ -215,14 +199,12 @@ description = "A cave of several tunnels, housing the local fauna deep underground." suffix = "lavaland_surface_monster_nest.dmm" allow_duplicates = FALSE - cost = 5 /datum/map_template/ruin/lavaland/watcher_grave name = "Watchers' Grave" id = "watcher-grave" description = "A lonely cave where an orphaned child awaits a new parent." suffix = "lavaland_surface_watcher_grave.dmm" - cost = 5 allow_duplicates = FALSE /datum/map_template/ruin/lavaland/shuttlecrash @@ -230,5 +212,4 @@ id = "shuttlecrash" description = "A passenger shuttle crashsite of indeterminate origin." suffix = "lavaland_surface_shuttlecrash.dmm" - cost = 5 allow_duplicates = FALSE diff --git a/code/datums/ruins/ruin_placer.dm b/code/datums/ruins/ruin_placer.dm new file mode 100644 index 00000000000..3f0d80bb4a6 --- /dev/null +++ b/code/datums/ruins/ruin_placer.dm @@ -0,0 +1,108 @@ +/datum/ruin_placer + var/ruin_budget + var/area_whitelist + var/list/templates + +/datum/ruin_placer/proc/place_ruins(z_levels) + if(!z_levels || !length(z_levels)) + WARNING("No Z levels provided - Not generating ruins") + return + + for(var/zl in z_levels) + var/turf/T = locate(1, 1, zl) + if(!T) + WARNING("Z level [zl] does not exist - Not generating ruins") + return + + var/list/ruins = templates.Copy() + + var/list/forced_ruins = list() //These go first on the z level associated (same random one by default) + var/list/ruins_availible = list() //we can try these in the current pass + var/forced_z //If set we won't pick z level and use this one instead. + + //Set up the starting ruin list + for(var/key in ruins) + var/datum/map_template/ruin/R = ruins[key] + if(R.get_cost() > ruin_budget) //Why would you do that + continue + if(R.always_place) + forced_ruins[R] = -1 + if(R.unpickable) + continue + ruins_availible[R] = R.placement_weight + + while(ruin_budget > 0 && (length(ruins_availible) || length(forced_ruins))) + var/datum/map_template/ruin/current_pick + var/forced = FALSE + if(length(forced_ruins)) //We have something we need to load right now, so just pick it + for(var/ruin in forced_ruins) + current_pick = ruin + if(forced_ruins[ruin] > 0) //Load into designated z + forced_z = forced_ruins[ruin] + forced = TRUE + break + else //Otherwise just pick random one + current_pick = pickweight(ruins_availible) + + var/placement_tries = PLACEMENT_TRIES + var/failed_to_place = TRUE + var/z_placed = 0 + while(placement_tries > 0) + placement_tries-- + z_placed = pick(z_levels) + if(!current_pick.try_to_place(forced_z ? forced_z : z_placed, area_whitelist)) + continue + else + failed_to_place = FALSE + break + + //That's done remove from priority even if it failed + if(forced) + //TODO : handle forced ruins with multiple variants + forced_ruins -= current_pick + forced = FALSE + + if(failed_to_place) + for(var/datum/map_template/ruin/R in ruins_availible) + if(R.id == current_pick.id) + ruins_availible -= R + log_world("Failed to place [current_pick.name] ruin.") + else + ruin_budget -= current_pick.get_cost() + if(!current_pick.allow_duplicates) + for(var/datum/map_template/ruin/R in ruins_availible) + if(R.id == current_pick.id) + ruins_availible -= R + if(current_pick.never_spawn_with) + for(var/blacklisted_type in current_pick.never_spawn_with) + for(var/possible_exclusion in ruins_availible) + if(istype(possible_exclusion,blacklisted_type)) + ruins_availible -= possible_exclusion + forced_z = 0 + + //Update the availible list + for(var/datum/map_template/ruin/R in ruins_availible) + if(R.get_cost() > ruin_budget) + ruins_availible -= R + + log_world("Ruin loader finished with [ruin_budget] left to spend.") + +/datum/ruin_placer/space + area_whitelist = /area/space + +/datum/ruin_placer/space/New() + ruin_budget = rand( + GLOB.configuration.ruins.space_ruin_budget_min, + GLOB.configuration.ruins.space_ruin_budget_max + ) + templates = GLOB.space_ruins_templates + +/datum/ruin_placer/lavaland + area_whitelist = /area/lavaland/surface/outdoors/unexplored + +/datum/ruin_placer/lavaland/New() + ruin_budget = rand( + GLOB.configuration.ruins.lavaland_ruin_budget_min, + GLOB.configuration.ruins.lavaland_ruin_budget_max + ) + templates = GLOB.lava_ruins_templates diff --git a/code/datums/ruins/space_ruins.dm b/code/datums/ruins/space_ruins.dm index abc7652d800..1e22462d1e7 100644 --- a/code/datums/ruins/space_ruins.dm +++ b/code/datums/ruins/space_ruins.dm @@ -1,7 +1,5 @@ -//The bigger ones lag like hell if there is more than one on a z-level, so cost 2 for them /datum/map_template/ruin/space prefix = "_maps/map_files/RandomRuins/SpaceRuins/" - cost = 1 ci_exclude = /datum/map_template/ruin/space /datum/map_template/ruin/space/zoo @@ -12,7 +10,6 @@ zoos to working order with the breeding stock kept in these 100% \ secure and unbreachable storage facilities. At no point has anything \ escaped. That's our story, and we're sticking to it." - cost = 2 /datum/map_template/ruin/space/asteroid1 id = "asteroid1" @@ -58,7 +55,6 @@ a giant unused asteroid. Then make it self sufficient, mask any \ evidence of construction, hook it covertly into the \ telecommunications network and hope for the best." - cost = 2 allow_duplicates = FALSE // this shouldn't be spawning more than once anymore /datum/map_template/ruin/space/derelict1 @@ -138,7 +134,6 @@ gutted asteroids, we suspect that a mining ship using a restricted \ engine is somewhere in the area. We'd like to request a patrol vessel \ to investigate." - cost = 2 /datum/map_template/ruin/space/spacebar id = "spacebar" @@ -149,7 +144,6 @@ Rampant Golem and Yellow Hound. Can I take your order?" allow_duplicates = FALSE //it spawn ship docking, no more than one to avoid duplication in console. always_place = TRUE - cost = 0 /datum/map_template/ruin/space/turreted_outpost id = "turreted-outpost" @@ -170,7 +164,6 @@ name = "Ancient Space Station" description = "The crew of a space station awaken one hundred years after a crisis. Awaking to a derelict space station on the verge of collapse, and a hostile force of invading \ hivebots. Can the surviving crew overcome the odds and survive and rebuild, or will the cold embrace of the stars become their new home?" - cost = 0 always_place = TRUE allow_duplicates = FALSE @@ -179,7 +172,6 @@ suffix = "wizardcrash.dmm" name = "Crashed Wizard Shuttle" description = "A shuttle of the Wizard Federation, sent out to crush some wandless scum. Unfortunately, the pilot suffered a magic-related accident and the shuttle crashed into a nearby asteroid." - cost = 2 /datum/map_template/ruin/space/abandonedtele id = "abandonedtele" @@ -192,7 +184,6 @@ suffix = "blowntcommsat.dmm" name = "Blown-out Telecommunications Satellite" description = "The remains of an old telecommunications satellite once utilised by Nanotrasen. It lays derelict, with quite a few pieces missing." - cost = 5 // This is a chonky boy allow_duplicates = FALSE // Absolutely huge, also has its own APC and the area isnt set to allow many /datum/map_template/ruin/space/malftcommsat @@ -200,7 +191,6 @@ suffix = "telecomns_returns.dmm" name = "D.V.O.R.A.K'S Telecommunications Satellite" description = "Seems the telecomunication satellite that went dark 4 years ago finally re-appeared on scanners? Strange signals are coming from it." - cost = 5 // Huge. Large. In charge allow_duplicates = FALSE // One sadistic malfunctioning AI is enough. Also unique apcs. /datum/map_template/ruin/space/clownmime @@ -214,7 +204,6 @@ suffix = "dj.dmm" name = "Soviet DJ Station" description = "A USSP listening post masquerading as a popular Soviet entertainment broadcaster, keeping tabs on Nanotrasen activity in the system and relaying it back to the Union." - cost = 2 allow_duplicates = FALSE /datum/map_template/ruin/space/druglab @@ -229,7 +218,6 @@ name = "Suspicious Station" description = "A syndicate drug laboratory hidden on an asteroid. It is strangely well-protected." allow_duplicates = FALSE - cost = 3 /datum/map_template/ruin/space/syndiedepot id = "syndiedepot" @@ -238,7 +226,6 @@ description = "A syndicate supply depot, heavily stocked, but heavily guarded with an assortment of shields, sentry bots, armed operatives and more." allow_duplicates = FALSE // One of these is enough always_place = TRUE // This is on the always spawn list because of the shielding chance - cost = 0 // Force spawned so shouldnt have a cost /datum/map_template/ruin/space/ussp_tele id = "ussp_tele" @@ -253,7 +240,6 @@ name = "USSP" description = "A decript station of seemingly Soviet origin. The last contact had with this station was a distress signal, and the rest was dark." allow_duplicates = FALSE // One of these has enough loot - cost = 5 // This ruin is 100x100 tiles, so we dont want it to be treated like a 10x10 meteor /datum/map_template/ruin/space/whiteship id = "whiteship" @@ -262,7 +248,6 @@ description = "A small expeditionary ship for use in local space exploration and salvaging." allow_duplicates = FALSE // I dont even want to think about what happens if you have 2 shuttles with the same ID. Likely scary stuff. always_place = TRUE // Its designed to make exploring other space ruins more accessible - cost = 0 // Force spawned so shouldnt have a cost /datum/map_template/ruin/space/golem_destination id = "golemtarget" @@ -271,14 +256,12 @@ description = "Just a handful of rocks floating in space. Guaranteed space destination for the Golem shuttle in case other destinations don't spawn." allow_duplicates = FALSE always_place = TRUE - cost = 0 /datum/map_template/ruin/space/syndicate_space_base name = "Syndicate Space Base" id = "syndie-space-base" description = "A secret base researching illegal bioweapons, it is closely guarded by an elite team of syndicate agents." suffix = "syndie_space_base.dmm" - cost = 0 always_place = TRUE allow_duplicates = FALSE @@ -288,7 +271,6 @@ name = "Syndicakes Factory" description = "Syndicate used to get funds selling corgi cakes produced here. Was it hit by meteors or by a Nanotrasen comando?" allow_duplicates = FALSE - cost = 2 //telecomms + multiple mobs /datum/map_template/ruin/space/debris1 id = "debris1" @@ -314,7 +296,6 @@ name = "Meat Packers" description = "An old transport ship, possibly with a dubious past. It smells faintly of meat." allow_duplicates = FALSE - cost = 2 // Pretty big /datum/map_template/ruin/space/mo19 id = "mo19" @@ -322,7 +303,6 @@ name = "Moon Outpost 19" description = "A now-defunct outpost, with the last received signal being that of distress." allow_duplicates = FALSE - cost = 2 // Also pretty big /datum/map_template/ruin/space/voyager id = "voyager" @@ -330,7 +310,6 @@ name = "Voyager" description = "A relic of old times, you don't know what it hide inside." allow_duplicates = FALSE - cost = 1 // Gives research levels and it should be hard-to-find /datum/map_template/ruin/space/wreckedcargoship id = "wreckedcargoship" @@ -338,7 +317,6 @@ name = "Wrecked Cargoship" description = "A cargo shuttle in a wrecked condition. There are many unknown horrors in space and looks like its last crew has faced one of them." allow_duplicates = FALSE - cost = 1 // With the loot it contains it shouldn't be found frequently /datum/map_template/ruin/space/abandoned_engi_sat id = "abandoned_engi_sat" @@ -346,7 +324,6 @@ name = "Abandoned NT Engineering Satellite" description = "A derelict operating base for NT engineering crew." allow_duplicates = FALSE - cost = 1 /datum/map_template/ruin/space/rocky_motel id = "rocky_motel" @@ -354,7 +331,6 @@ name = "Rocky Motel" description = "A cozy little home nestled in an asteroid, perfect for one or two people!" allow_duplicates = FALSE - cost = 1 /datum/map_template/ruin/space/casino id = "casino" @@ -375,7 +351,7 @@ suffix = "freighter.dmm" name = "Voidhopper of Nexus" description = "A cargo ship headed to a nearby system." - + /datum/map_template/ruin/space/drakehound_breacher id = "drakehound_breacher" suffix = "unathi_skiff.dmm" diff --git a/config/example/config.toml b/config/example/config.toml index 3fa9d8f0548..ad50949872c 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -270,7 +270,7 @@ gamemode_probabilities = [ { gamemode = "traitor", probability = 2 }, { gamemode = "traitorchan", probability = 3 }, { gamemode = "traitorvamp", probability = 3 }, - { gamemode = "vampchan", probability = 3}, + { gamemode = "vampchan", probability = 3 }, { gamemode = "vampire", probability = 3 }, { gamemode = "wizard", probability = 2 }, { gamemode = "trifecta", probability = 3 }, @@ -653,6 +653,14 @@ enable_space_ruins = false minimum_zlevels = 2 # Maximum number of extra zlevels to generate and fill with ruins maximum_zlevels = 4 +# Minimum space ruin budget. +space_ruin_budget_min = 750 +# Maximum space ruin budget. +space_ruin_budget_max = 1000 +# Minimum lavaland ruin budget. +lavaland_ruin_budget_min = 175 +# Maximum lavaland ruin budget. +lavaland_ruin_budget_max = 325 # List of all space ruins that can generate in the world # Commenting something out in here DISABLES IT FROM SPAWNING active_space_ruins = [ @@ -758,8 +766,6 @@ active_lava_ruins = [ "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_watcher_grave.dmm", "_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_xeno_nest.dmm", ] -# Budget for lavaland ruins. A higher number means more will spawn -lavaland_ruin_budget = 60 ################################################################ @@ -880,13 +886,13 @@ non_repeating_maps = true # - "FPTP" = A vote that excludes the map from the current round, and last round, then uses a weighted pick on the remaining maps, from preferences. # If you dont enter one correctly, it will whine on startup map_vote_day_types = [ - { day_number = 1, rotation_type = "Vote" }, # Monday - { day_number = 2, rotation_type = "Random" }, # Tuesday - { day_number = 3, rotation_type = "FPTP" }, # Wednesday - { day_number = 4, rotation_type = "Random" }, # Thursday - { day_number = 5, rotation_type = "Vote" }, # Friday - { day_number = 6, rotation_type = "FPTP" }, # Saturday - { day_number = 7, rotation_type = "FPTP" }, # Sunday + { day_number = 1, rotation_type = "Vote" }, # Monday + { day_number = 2, rotation_type = "Random" }, # Tuesday + { day_number = 3, rotation_type = "FPTP" }, # Wednesday + { day_number = 4, rotation_type = "Random" }, # Thursday + { day_number = 5, rotation_type = "Vote" }, # Friday + { day_number = 6, rotation_type = "FPTP" }, # Saturday + { day_number = 7, rotation_type = "FPTP" }, # Sunday ] diff --git a/paradise.dme b/paradise.dme index 906a5b2de77..66ecb02762d 100644 --- a/paradise.dme +++ b/paradise.dme @@ -563,6 +563,7 @@ #include "code\datums\outfits\plasmamen_outfits.dm" #include "code\datums\outfits\vv_outfit.dm" #include "code\datums\ruins\lavaland.dm" +#include "code\datums\ruins\ruin_placer.dm" #include "code\datums\ruins\space_ruins.dm" #include "code\datums\ruins\bridges\bridges.dm" #include "code\datums\spell_cooldown\spell_charges.dm"