RimWorld

RimWorld

36 ratings
Loot Goblin
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
312.339 KB
15 Jul, 2022 @ 2:26am
20 Jul @ 5:48pm
9 Change Notes ( view )

Subscribe to download
Loot Goblin

Description
Are you a Loot Goblin?

Do you like to hoard troves of human leather for your colonist hat needs?
Do you want to keep copious amounts of silver, just to not give any to those pesky beggars?
Do you prefer to lose humongous amounts of raw meat to a solar flare instead of feeding your prisoners?

Say no more! I bring you the ultimate solution for your stack-size altering needs.




Similar to OgreStack, Stack XXL, and other Stack Size Altering mods.
Except Nothing is hardcoded.
Also won't eat your 10000 meat stack if you change the settings and lower the value before loading the game. :'(

Want to exclude all items of one particular mod from being altered?
You can. Just create a LootRuleDef XML file for it.

Want to create your own category to change stack sizes?
You can. Just create a LootCategoryDef XML.

Want to prevent Loot Goblin users from altering stack sizes?
You can. Just bundle an "Ignore" rule with your mod.

Want to say no to the modder, and alter the stack size anyway?
You can. Just create a higher priority rule to overrule their rule.

Loot Rules are applied on the whole thing category hierarchy, instead of looking just at the topmost category.

  • A Loot Rule can contain: category, name, flags, and mod filters
  • Multiple matches in a single rule are "And"-ed together
  • A Rule can contain a priority number (defaults to zero), lower priority rules are replaced in favor of higher priority ones.
  • Child-category rules are prioritized over their parent ones.
  • DefName based rules are prioritized over category rules.

FAQ

> Safe to Add Mid-Game?
Yes. Don't forget to change the rules to your liking, they default to Vanilla.

> Safe to Remove Mid-Game?
Yes, as long as you reset stack sizes back to 1x AND LOAD YOUR SAVES AND RESAVE THEM ONCE, so the mod can split your giant stacks into vanilla-sized stacks.
Also you'll need to do a whole lot of hauling after that.
Failure to do so will make it so that Tynan will steal your stacks and leave a message in the error log on your next game load.

> Is it 'X' Compatible?
Most Likely. As long as the mod has their items categorized in a vanilla-fashioned way, you at least won't get food mixed with metals, since the whole category hierarchy is considered for sorting.
Tested it on a 350 mod load order and found only like, 10 to 15 uncategorized items.
Some mods may need special treatment for miscategorized items, leave a message, create your own LootRulesDef xml mod and share it, or create your own xml defs and don't share it. Your call.

> Is it Combat Extended Compatible?
Yes.

> What is "Inherit" on the settings
Inherit will apply the same rule as its parent category. Say, setting "Scale" to "2" for Food, items under Food with Inherit will also have a "Scale by 2" stack size.

> Can i check what my stack sizes will be while configuring?
Yes. Press the Preview button, a page with a table consisting of [Thing, mod, old stack, new stack] will show. There's a name filter box up top too.

> Can i change settings with the map loaded?
Yes. Just open the menu and configure it. No need to reload the game after either.

> How do i create my own category?
Check the Built-in categories XML, but it consists of a def in the form of:
<LootGoblin.LootTypeDef> <defName>[Your Category DefName]</defName> <label>[Label in the Settings Menu]</label> <parent>[Parent Category, use LG_Type_Everything if you want a Root Category]</parent> <sort>[Sort order in the Settings menu, ascending, Lower is on top]</sort> </LootGoblin.LootTypeDef>

> How do i create my own Rules?
Check the Built-in rules XML, but it consists of a Rules def, with as many rules in it as you need in the form of:
<LootGoblin.LootRulesDef> <defName>[Your Rule DefName]</defName> <rules> <li> <match> <!-- Use at least one match, multiple options are and-ed together --> <name>[DefName based Rule RegEx, can be empty]</name> <category>[ThingCategoryDef based Rule RegEx, can be empty]</category> <mod>[mod package id, not a RegEx, can be empty]</mod> <flags>[Misc flags, for now only smallVolume, can be empty]</flags> </match> <lootType>[Loot Category Def]</lootType> </li> ... <li> <match> ... </match> <lootType>[Loot Category Def]</lootType> </li> <rules> </LootGoblin.LootRulesDef>
Popular Discussions View All (1)
1
2 May, 2024 @ 5:01pm
[BUG] Empty settings menu
Proof
45 Comments
Wednesday 20 Jul @ 8:18pm 
Thanks :)
Reisen  [author] 20 Jul @ 5:49pm 
Added a Books category, so it can be changed (or left vanilla/default) separately from the parent Items category
Wednesday 20 Jul @ 4:45am 
@Reisen
the issue whith research paper was that loading it with a different stack size caused all research papers to despawn. I’ve sent a fix for the research paper mod using your Loot Goblin’s built-in custom rule system so that it ignores all defs from that mod.

However, I think it would be cleaner to handle this on your side by having Loot Goblin ignore books by default. Books in vanilla have quality, are procedurally generated, and shouldn’t stack (similar to weapons and apparel). Ignoring them would prevent potential issues with other mods in the future.
Reisen  [author] 19 Jul @ 11:59pm 
I'll take a look.

Are books supposed to be unstackable / limited to 1?
Wednesday 19 Jul @ 5:02pm 
@Reisen
would you consider adding Category 'Books' to ignore to avoid compat issues such as the one just fixed in ogrestack / research paper?
Redknight910 13 Jul @ 7:21pm 
I'll try that and report back. Won't have time to play until a bit later, unfortunately.
Reisen  [author] 13 Jul @ 11:17am 
@Redknight910
Can i get more info on the error?

If its working properly, it should show a single message about a hierarchy dump, with a tree of the item categories

If its complaining something about method not found, try unsubscribing and subscribing again because its likely steam didn't update it for you
Redknight910 13 Jul @ 1:44am 
I have it running, but it doesn't seem to be actually working. Keeps throwing an error, and if I load with just this and harmony, it won't even generate a map with the dev test.
Reisen  [author] 12 Jul @ 6:25pm 
Should be running on 1.6 now
Reisen  [author] 12 Jul @ 5:36pm 
I haven't recompiled it to 1.6 yet, so its failing to load.
I'll try to get around it over the weekend