From c8f5b480cb3f6f4505eb6d222f7c8247fb779835 Mon Sep 17 00:00:00 2001 From: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> Date: Sun, 23 Mar 2025 19:46:58 +0100 Subject: [PATCH] Package loot tables part 2: Engineering (#36026) * MAIL!!!! * changes --- .../Markers/Spawners/Random/materials.yml | 258 +++++++++++++----- .../Entities/Mobs/NPCs/entity_tables.yml | 18 ++ .../Objects/Deliveries/deliveries_tables.yml | 7 +- .../Deliveries/package_rare_tables.yml | 84 ++++++ 4 files changed, 291 insertions(+), 76 deletions(-) create mode 100644 Resources/Prototypes/Entities/Mobs/NPCs/entity_tables.yml diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/materials.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/materials.yml index fbbda73ac0..574c0a735c 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/materials.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/materials.yml @@ -10,19 +10,10 @@ - state: red - sprite: Objects/Materials/Sheets/metal.rsi state: steel_3 - - type: RandomSpawner - rarePrototypes: - - SheetPlasteel10 - rareChance: 0.2 - prototypes: - - SheetSteel - - SheetGlass - - SheetPlastic - - CableApcStack - - CableMVStack - - CableHVStack - chance: 0.8 - offset: 0.0 + - type: EntityTableSpawner + table: !type:NestedSelector + tableId: RandomAllConstructionMaterialsTable + prob: 0.8 - type: entity name: materials spawner @@ -35,13 +26,10 @@ - state: red - sprite: Objects/Materials/materials.rsi state: wood_2 - - type: RandomSpawner - prototypes: - - MaterialWoodPlank10 - - MaterialCardboard10 - - PartRodMetal10 - chance: 0.8 - offset: 0.0 + - type: EntityTableSpawner + table: !type:NestedSelector + tableId: RandomAllSupplementaryMaterialsTable + prob: 0.8 # High-value materials spawners # Maybe these should use the 10-in-stack variants? @@ -56,15 +44,10 @@ - state: red - sprite: Objects/Materials/Sheets/metal.rsi state: plasteel_2 - - type: RandomSpawner - rarePrototypes: - - SheetRPGlass - rareChance: 0.2 - prototypes: - - SheetPlasteel - - SheetRGlass - chance: 0.8 - offset: 0.0 + - type: EntityTableSpawner + table: !type:NestedSelector + tableId: RandomAllHighValueConstructionMaterialsTable + prob: 0.8 - type: entity name: high-value materials spawner @@ -76,16 +59,10 @@ - state: red - sprite: Objects/Materials/Sheets/other.rsi state: plasma_2 - - type: RandomSpawner - rarePrototypes: - - SheetUranium - rareChance: 0.2 - prototypes: - - SheetPlasma - - IngotGold - - IngotSilver - chance: 0.8 - offset: 0.0 + - type: EntityTableSpawner + table: !type:NestedSelector + tableId: RandomAllHighValueMaterialsTable + prob: 0.8 # Surplus materials spawner. # Intended use case: randomly place in maintenance or in storage areas. @@ -100,27 +77,10 @@ - state: red - sprite: Objects/Materials/Sheets/metal.rsi state: steel_3 - - type: RandomSpawner - rarePrototypes: - - SheetUranium1 - - IngotGold1 - - IngotSilver1 - rareChance: 0.1 - prototypes: - - SheetPlasteel10 - - SheetPlasma1 - - MaterialWoodPlank10 - - PartRodMetal10 - - SheetSteel10 - - SheetGlass10 - - MaterialCloth10 - - MaterialCardboard10 - - SheetPlastic10 - - CableApcStack10 - - CableMVStack10 - - CableHVStack10 - chance: 0.9 - offset: 0.0 + - type: EntityTableSpawner + table: !type:NestedSelector + tableId: RandomAllSurplusMaterialTable + prob: 0.9 # Cable coil spawner - type: entity @@ -133,15 +93,169 @@ - state: red - sprite: Objects/Tools/cable-coils.rsi state: coilall-30 - - type: RandomSpawner - rarePrototypes: - - CableApcStack10 - - CableMVStack10 - - CableHVStack10 - rareChance: 0.1 - prototypes: - - CableApcStack - - CableMVStack - - CableHVStack - chance: 0.9 - offset: 0.0 \ No newline at end of file + - type: EntityTableSpawner + table: !type:NestedSelector + tableId: RandomAllCableCoilTable + prob: 0.9 + +# Entity tables +## Construction Materials +- type: entityTable + id: RandomAllConstructionMaterialsTable + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: RandomCommonConstructionMaterialsTable + weight: 0.80 + - !type:NestedSelector + tableId: RandomRareConstructionMaterialsTable + weight: 0.20 + +- type: entityTable + id: RandomCommonConstructionMaterialsTable + table: !type:GroupSelector + children: + - id: SheetSteel + - id: SheetGlass + - id: SheetPlastic + - id: CableApcStack + - id: CableMVStack + - id: CableHVStack + +- type: entityTable + id: RandomRareConstructionMaterialsTable + table: !type:GroupSelector + children: + - id: SheetPlasteel10 + +## High value construction materials +- type: entityTable + id: RandomAllHighValueConstructionMaterialsTable + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: RandomCommonHighValueConstructionMaterialsTable + weight: 0.80 + - !type:NestedSelector + tableId: RandomRareHighValueConstructionMaterialsTable + weight: 0.20 + +- type: entityTable + id: RandomCommonHighValueConstructionMaterialsTable + table: !type:GroupSelector + children: + - id: SheetPlasteel + - id: SheetRGlass + +- type: entityTable + id: RandomRareHighValueConstructionMaterialsTable + table: !type:GroupSelector + children: + - id: SheetRPGlass + +## High value materials +- type: entityTable + id: RandomAllHighValueMaterialsTable + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: RandomCommonHighValueMaterialsTable + weight: 0.80 + - !type:NestedSelector + tableId: RandomRareHighValueMaterialsTable + weight: 0.20 + +- type: entityTable + id: RandomCommonHighValueMaterialsTable + table: !type:GroupSelector + children: + - id: SheetPlasma + - id: IngotGold + - id: IngotSilver + +- type: entityTable + id: RandomRareHighValueMaterialsTable + table: !type:GroupSelector + children: + - id: SheetUranium + +## Supplementary Materials +- type: entityTable + id: RandomAllSupplementaryMaterialsTable + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: RandomCommonSupplementaryMaterialsTable + +- type: entityTable + id: RandomCommonSupplementaryMaterialsTable + table: !type:GroupSelector + children: + - id: MaterialWoodPlank10 + - id: MaterialCardboard10 + - id: PartRodMetal10 + +## Surplus Materials +- type: entityTable + id: RandomAllSurplusMaterialTable + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: RandomCommonSurplusMaterialTable + weight: 0.90 + - !type:NestedSelector + tableId: RandomRareSurplusMaterialTable + weight: 0.10 + +- type: entityTable + id: RandomCommonSurplusMaterialTable + table: !type:GroupSelector + children: + - id: SheetPlasteel10 + - id: SheetPlasma1 + - id: MaterialWoodPlank10 + - id: PartRodMetal10 + - id: SheetSteel10 + - id: SheetGlass10 + - id: MaterialCloth10 + - id: MaterialCardboard10 + - id: SheetPlastic10 + - id: CableApcStack10 + - id: CableMVStack10 + - id: CableHVStack10 + +- type: entityTable + id: RandomRareSurplusMaterialTable + table: !type:GroupSelector + children: + - id: SheetUranium1 + - id: IngotGold1 + - id: IngotSilver1 + +## Cables +- type: entityTable + id: RandomAllCableCoilTable + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: RandomCommonCableCoilTable + weight: 0.90 + - !type:NestedSelector + tableId: RandomRareCableCoilTable + weight: 0.10 + +- type: entityTable + id: RandomCommonCableCoilTable + table: !type:GroupSelector + children: + - id: CableApcStack + - id: CableMVStack + - id: CableHVStack + +- type: entityTable + id: RandomRareCableCoilTable + table: !type:GroupSelector + children: + - id: CableApcStack10 + - id: CableMVStack10 + - id: CableHVStack10 diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/entity_tables.yml b/Resources/Prototypes/Entities/Mobs/NPCs/entity_tables.yml new file mode 100644 index 0000000000..d3234c42e2 --- /dev/null +++ b/Resources/Prototypes/Entities/Mobs/NPCs/entity_tables.yml @@ -0,0 +1,18 @@ +- type: entityTable + id: SmallCritterEntityTable + table: !type:GroupSelector + children: + - id: MobMothroach + - id: MobCockroach + - !type:GroupSelector + children: + - id: MobMouse + - id: MobMouse1 + - id: MobMouse2 + - id: MobMouseCancer + weight: 0.05 + - !type:GroupSelector + children: + - id: MobSnail + - id: MobSnailSpeed + - id: MobSnailMoth diff --git a/Resources/Prototypes/Entities/Objects/Deliveries/deliveries_tables.yml b/Resources/Prototypes/Entities/Objects/Deliveries/deliveries_tables.yml index 5b30335e20..19613dd494 100644 --- a/Resources/Prototypes/Entities/Objects/Deliveries/deliveries_tables.yml +++ b/Resources/Prototypes/Entities/Objects/Deliveries/deliveries_tables.yml @@ -144,17 +144,16 @@ table: !type:GroupSelector children: - id: MedkitAdvancedFilled # TODO: Replace with PackageRareGeneralBundlesTable for when something doesn't fit with a department. (Like a bundle of bed sheets, dunno) - - id: MobMothroach # TODO: Replace with SmallCritterTable so you can get mice and snails and similiar - id: PipeBomb # TODO: PackageRarePunishmentTable, including things like pipebombs and other potentially harmful things (the pipebomb should also get primed when unpacked) - #- !type:NestedSelector TODO: Uncomment after all the rare department bundles are done (medical, security, etc...) + - !type:NestedSelector + tableId: SmallCritterEntityTable + #- !type:NestedSelector # TODO: Uncomment after all the rare department bundles are done (medical, security, etc...) # tableId: PackageRareDepartmentBundlesTable - !type:NestedSelector tableId: AnimalMaskTable - # Weapons - !type:NestedSelector tableId: MaintWeaponTable weight: 0.5 - # Syndie Loot - !type:NestedSelector tableId: SyndieMaintLoot weight: 0.5 diff --git a/Resources/Prototypes/Entities/Objects/Deliveries/package_rare_tables.yml b/Resources/Prototypes/Entities/Objects/Deliveries/package_rare_tables.yml index ec62372f13..561383579f 100644 --- a/Resources/Prototypes/Entities/Objects/Deliveries/package_rare_tables.yml +++ b/Resources/Prototypes/Entities/Objects/Deliveries/package_rare_tables.yml @@ -7,11 +7,14 @@ children: - !type:NestedSelector tableId: PackageRareMedicalBundlesTable + - !type:NestedSelector + tableId: PackageRareEngineeringBundlesTable # Package Bundles ## Basically items that should always spawn together, specific to packages ### Medical +# General table that contains all medical packages - type: entityTable id: PackageRareMedicalBundlesTable table: !type:GroupSelector @@ -25,6 +28,7 @@ - !type:NestedSelector tableId: PackageMedicalReagentBottleBundle +# Topicals - type: entityTable id: PackageMedicalTopicalBundle table: !type:AllSelector @@ -42,6 +46,7 @@ amount: !type:RangeNumberSelector range: 1, 4 +# Beakers, vials, etc - type: entityTable id: PackageMedicalChemicalBundle table: !type:AllSelector @@ -59,6 +64,7 @@ amount: !type:RangeNumberSelector range: 0, 2 +# Medical clothing - type: entityTable id: PackageMedicalClothingBundle table: !type:AllSelector @@ -88,6 +94,7 @@ - id: ClothingBeltMedical - id: ClothingShoesColorWhite +# Random reagents - type: entityTable id: PackageMedicalReagentBottleBundle table: !type:AllSelector @@ -96,3 +103,80 @@ tableId: BasicReagentBottlesTable rolls: !type:RangeNumberSelector range: 3, 4 + +### Engineering + +# General table that contains all engineering packages +- type: entityTable + id: PackageRareEngineeringBundlesTable + table: !type:GroupSelector + children: + - !type:NestedSelector + tableId: PackageEngineeringMaterialBundle + - !type:NestedSelector + tableId: PackageEngineeringRCDBundle + - !type:NestedSelector + tableId: PackageEngineeringClothingBundle + +# Random building materials +- type: entityTable + id: PackageEngineeringMaterialBundle + table: !type:AllSelector + children: + - !type:NestedSelector + tableId: RandomAllConstructionMaterialsTable + rolls: !type:RangeNumberSelector + range: 2, 3 + - !type:NestedSelector + tableId: RandomAllSupplementaryMaterialsTable + rolls: !type:RangeNumberSelector + range: 2, 3 + +# RCD, very high value but I feel like the rarity justifies it +- type: entityTable + id: PackageEngineeringRCDBundle + table: !type:AllSelector + children: + - !type:GroupSelector + children: + - id: RCD + - id: RCDEmpty + - id: RCDAmmo + amount: !type:RangeNumberSelector + range: 1, 2 + +# Engineer clothing +- type: entityTable + id: PackageEngineeringClothingBundle + table: !type:AllSelector + children: + - !type:GroupSelector + children: + - id: ClothingUniformJumpskirtEngineering + - id: ClothingUniformJumpsuitEngineering + - id: ClothingUniformJumpsuitAtmos + - id: ClothingUniformJumpskirtAtmos + - !type:GroupSelector + children: + - id: ClothingBackpackAtmospherics + - id: ClothingBackpackEngineering + - id: ClothingBackpackDuffelAtmospherics + - id: ClothingBackpackDuffelEngineering + - id: ClothingBackpackSatchelAtmospherics + - id: ClothingBackpackSatchelEngineering + - !type:AllSelector + prob: 0.5 + children: + - id: ClothingShoesBootsWinterEngi + - !type:GroupSelector + children: + - id: ClothingOuterWinterEngi + - id: ClothingOuterWinterAtmos + - !type:GroupSelector + children: + - id: ClothingBeltUtility + - id: ClothingBeltUtilityEngineering + - id: ClothingShoesBootsMag + prob: 0.5 + - id: ClothingHandsGlovesColorYellow + - id: ClothingShoesColorYellow -- 2.51.2