RimWorld

RimWorld

191 ratings
Drop Loot When Destroyed Framework
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5, 1.6
File Size
Posted
Updated
145.460 KB
5 Aug, 2023 @ 7:41am
13 Jul @ 5:48am
17 Change Notes ( view )

Subscribe to download
Drop Loot When Destroyed Framework

Description

This is a framework that allows ThingDefs drop loot when they are destroyed by any means (attacking, deconstruction etc).
As for now it adds two comps and a thingClass for filth. First comp is responsible for the loot drops and can be used on anything that can use comps, so items, buildings, pawns etc. Second comp is responsible for destroying an item if it is used. Filth cannot use comps so loot is implemented with a thingClass.
The instructions are in the discussions and there is a couple of example defs in this mod's files.

Loot from filth will not spawn if there is no free space in a 1 cell radius around the destroyed filth spot.
Currently the framework does not account for stackCount. So if an item has a comp for dropping loot it will roll once for the whole stack, not for the each item individually.
If the loot is dropped outside of the home area and is split into multiple stacks, only one stack will be forbidden. This can happen when the loot amount is set higher than item's max stack count.

SeedsPlease: Plants will not drop any loot added by DLWD Framework.
Popular Discussions View All (1)
25
10 Sep, 2024 @ 9:57am
PINNED: Instructions for implementing
Romyashi
23 Comments
thorman123456789 4 Jul @ 12:45pm 
1.6 please?
Romyashi  [author] 10 May, 2024 @ 11:43am 
@tanyfilina Tested it and can confirm the incompatibility. I don't really know how to fix it though unfortunately. Thank you for the report.
tanyfilina 10 May, 2024 @ 11:06am 
Hello! I've tried this mod along with SeedsPlease: Lite Redux, and (as expected) SeedsPlease blocks the drop of wood by the fruit trees patched to do so via Drop Loot When Destroyed Framework. Is this a strong incompatibility, or there might be some workarounds?
gold_talisman 26 Apr, 2024 @ 10:45am 
Thank you for the update!
thorman123456789 12 Apr, 2024 @ 6:45pm 
1.5?
Romyashi  [author] 8 Apr, 2024 @ 9:16pm 
@owlthemoon Yes, when it releases.
sirduck 8 Apr, 2024 @ 5:05pm 
you will update for 1.5?
Romyashi  [author] 22 Dec, 2023 @ 3:22am 
@Atmey You can patch the bases and it should work fine I think. Otherwise only manually if plants have no base.
Atmey 22 Dec, 2023 @ 1:53am 
I want to make all trees/plants drop hay when destroyed/cut/harvested, is it possible? is there a way to patch them all? or do I have to make a patch for every single item?
Atmey 22 Dec, 2023 @ 1:52am 
@star: I doubt it will work for multiplayer, anything RNG won't work be default, you have to pull the RNG from a pre existing pool shared with all players.