RimWorld

RimWorld

55 ratings
Apparel Ownership
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.4, 1.5
File Size
Posted
Updated
216.978 KB
25 Jun @ 11:20am
12 Jul @ 5:06am
7 Change Notes ( view )

Subscribe to download
Apparel Ownership

Description
Intro
I created this mod to give apparel an ownership property since I was too frustrated by pawns stealing each others' stuff.

Description
With this mod pawns who are not the owner won't be allowed to wear that specific apparel (forcing is still possible, the ownership is retained but bypassed).
This is particularly useful if you are utilizing a repair/mending mod, so your pawns' apparel won't get shuffled every time it gets repaired (it can come in handy also for other reasons).

How to
To assign ownership, select a pawn and right-click on the apparel you want to assign. Select "Assign Ownership".
Ownership can be swapped to another colonist (click "Reassign Ownership") or reset so anyone can wear it again (click "Reset Ownership").

Apparel's ownership can be checked both in the quick panel (bottom left) when is selected and in the detailed info under the category "Apparel".

For 1.5 quick search function, you can search the owner's name and the apparel will be listed in the results.

The ownership doesn't override the policies, so if, for example, a duster is assigned to the pawn "Djinn," he won't wear it if his policies don't allow dusters.

One thing is sure, no one else will since it's his duster!

F.A.Q.
I'm not new to programming in C#, but I'm new to Rimworld modding, so be kind and feel free to leave comments and feedback. I'll try to address any issue and keep the mod smooth.

Where should I put the mod?
I suggest at the end of the list, since it attaches a property to all apparel.

Can I add/remove it mid-save?
Yes, in my tests it didn't cause any problem.

Does it have multilingual support?
Yes now it has. I added some languages, but feel free to add more.

Is it compatible with XXX?
I don't know, you can try and tell me. I have tested with 150+ mods that are currently on my mods list and there was no conflict. But you never know ~

Can you do this/that to make it better?
I don't know. I published it just cause it was a very frustrating problem for me and I didn't find any other mod that would address this in a simple way (without complex bio-coding or apparel management). The comment area is open for suggestions and I might do improvements if I have time and I like the ideas.

Why did you attach the function to the right-click of a pawn?
I found it convenient, like simulating that pawn attaching a tag on the apparel.

Final remarks
I hope that someone will find it useful and will improve their game experience.

Enjoy!
Popular Discussions View All (1)
1
17 Jul @ 2:04am
Bug with a few mods
Kor
30 Comments
Sekh 16 Jul @ 5:28am 
Thanks for the fix Djinn! I'll readd this to my mod list!
Djinn  [author] 12 Jul @ 5:07am 
In the end it was not a simple null check that fixed it, but it should work normally now.
Djinn  [author] 11 Jul @ 2:59am 
@Sekh Thanks for the thorough analysis! I'll look into it in the next few days and release a patch.
TheClinicallyInsane 10 Jul @ 9:09pm 
Got the same issue as Sekh, figured out that it was this mod as well. Unfortunately I don't know how to do that fix so just gotta uninstall for now ://
Sekh 7 Jul @ 10:36am 
Hi @Djinn

Thanks for the mod, I love the concept. Unfortunately I think it causes a problem with the mechanitor quests.

I've just done a test with running only with harmony and this mod, and upon trying to generate a dead mechanitor pawn (in either the crashing ship quest or ancient mechanitor complex) it throws a null reference exception:
Exception running QuestNode_Root_MechanitorShip: System.NullReferenceException: Object reference not set to an instance of an object

To replicate:
* Run with all DLCs + Harmony + Apparel Ownership.
* Enable Dev Mode
* Start a "Dev Quicktest" colony from the main menu
* Destroy the ancient strider mech on the map to have it drop the mech transponder
* Build a research bench
* Right click the mech transponder to decode it

Disassembling the DLL it looks like this may be a relatively simple fix by adding a null check to the PREFIX patch in Pawn_ApparelTracker_Wear_Patch.

Hope this feedback helps as I really like the idea of the mod!
fester_21 1 Jul @ 9:52am 
:VBCOOL: :VBCOOL: :VBCOOL:
biowreck 29 Jun @ 9:18pm 
:cozyspaceengineersc:
Djinn  [author] 29 Jun @ 9:12pm 
@biowreck Fixed it, it was an unused method I needed for some tests, wasn't supposed to be pushed :P
biowreck 29 Jun @ 8:51pm 
Hey, just want to report an error [pastebin.com] I'm getting on launch. Happens with only your mod + harmony and dlcs running.
Rob Bobbert 29 Jun @ 11:18am 
Love it