]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Package loot tables part 2: Engineering (#36026)
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Sun, 23 Mar 2025 18:46:58 +0000 (19:46 +0100)
committerGitHub <noreply@github.com>
Sun, 23 Mar 2025 18:46:58 +0000 (19:46 +0100)
* MAIL!!!!

* changes

Resources/Prototypes/Entities/Markers/Spawners/Random/materials.yml
Resources/Prototypes/Entities/Mobs/NPCs/entity_tables.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Deliveries/deliveries_tables.yml
Resources/Prototypes/Entities/Objects/Deliveries/package_rare_tables.yml

index fbbda73ac0d68e8e93faaf38ea98befd31db7bcd..574c0a735c99367b3382c0a7ae4ac936b649e8a8 100644 (file)
         - 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
         - 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?
         - 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
         - 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.
         - 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
         - 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 (file)
index 0000000..d3234c4
--- /dev/null
@@ -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
index 5b30335e206b7487e555a46a3fa486fca52996f3..19613dd494b91f01d82b239859d74130a651d8ba 100644 (file)
   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
index ec62372f136d784af1078fcf477bcc503c837110..561383579f25eec0475d021b9fe297255f2f9c70 100644 (file)
@@ -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
       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