RimWorld

RimWorld

Treasures
 This topic has been pinned, so it's probably important
Romyashi  [developer] 7 May, 2023 @ 11:31am
How to make any item a treasure
If you want to add any item to the treasure pool, you will need to add some lines to the item's def:
<modExtensions> <li Class="RomyTreasures.TreasureThingDef"> <treasureCommonality>0.01</treasureCommonality> <treasureAmountPerCell>1</treasureAmountPerCell> </li> </modExtensions> <deepCountPerPortion>1</deepCountPerPortion>
treasureCommonality sets the chance of the item to appear as a treasure. The higher the number, the higher the chance.
treasureAmountPerCell sets how many of the item will generete at a treasure spot. If not set it will default to 300.
deepCountPerPortion sets how many of the item will be dug up once deep drill progress is 100%. If not set it will default to -1, meaning the item will never run out, so it is important to set this property.
You can look for more examples in the mod's defs and patches.
Last edited by Romyashi; 23 Jul, 2023 @ 9:37am