RimWorld

RimWorld

47 ratings
Prized Companions
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4
File Size
Posted
Updated
1.217 MB
Dec 28, 2021 @ 6:28am
Nov 21, 2022 @ 2:14pm
8 Change Notes ( view )

Subscribe to download
Prized Companions

Description
Overview
Do you want to RP having a "stud" farm animal? Do you just want to raise a bunch of war dogs without Autoslaughter disposing of your most well trained beasts? You need to start prizing your companions accordingly! Named animals are now Friends, not Food.

Base Functionality
This mod prevents any named animals from being slaughtered by the AutoSlaughterer system. By default, the AutoSlaughter population display will not include these animals in any way, so you will have more animals than it shows. Example: You have 2 named foxes, and you set AutoSlaughter to allow for 5 foxes for fur trade, you will be living with 7 foxes.

Optionally, you may include your Prized Companions in the Autoslaughterer's population count in the mod menu. When you change this option, please be mindful of your slaughterer's quotas! In this mode, it should be easier to manage to total population, so that if you tell the autoslaughterer to limit population to 5, it will be 5. If, however, the number of Prized Companions is larger than this setting, they will not be slaughtered- but all unnamed animals of that species will be.

Designation as a "Prized Companion" happens autonomously when the animal is named, and currently it is not possible to "unname" an animal. Named animals can still be manually slaughtered for tough seasons and are still included in sales listings, but your prized animals and beloved pets will be spared from voracious butchers.

Expanded Autoslaughter GUI
Now includes additional fixes and expansion to the Autoslaughter system:

A new column is added to the autoslaughter dialog box- Youngest First. This option allows you to prefer killing younger members before older. If you plan on training large amounts of trainable or producing animals, you may find this more useful than naming each animal.

Compatability Option: Lite Mode
While I would like to hear about any compability errors, there are emergency options to reduce all functions save those listed as Base Functions above. Additionally, the additional GUI can separately be toggled. Please try these in the event of incompability.

Vanilla Bugfixes
Many bugfixes are included in the full version. The list of animals to slaughter are more consistently updated, and some things work as actually described (e.g. pregnant animals will now always be last to be added to the slaughter lists, whereas vanilla accidentally has them at the front of the line). These are listed in the change notes.

Save Game Compatibility
Prized Companions can be activated and deactivated midgame, however expect to need to update your Autoslaughter numbers! Upon disabling the mod (or changing the counting setting), you are likely to have butchers chasing down your pets.

Requirements
This mod is reliant on Harmony, and, as ever, must be loaded after.

Warnings
  • If you accidentally open the naming gizmo on a creature you don't want named, remember to click outside the box to cancel the naming process.

    If you accidentally "name" a creature something like "Megasloth 1", you can identify that they are named in the Animals tab, where they will appear as "Megasloth 1, megasloth" (before naming, it will be "Megasloth 1" only). Such a case requires manual marking for slaughter until there is a way to "unname" animals. Animals previously "named" in this way before installing the mod as still considered "named"!

  • Genderless creatures added by mods are not well tested.
  • Non-female pregnancies (for example, in the above case) may result in problems. Please let me know if any mods are attempting this.


Source Files
For those interested in the source, enter at your own peril! Also, if you feel there needs to be a translation for the menus, leave a pull request if you can:

https://github.com/ZenthWolf/PrizedCompanions
28 Comments
The Blind One Apr 1 @ 5:07pm 
This was such a good mod. Hope it returns.
urbangremlin101 May 17, 2024 @ 9:34pm 
this mod is great! Will it be updated to 1.5?
Pos 4/5 Apr 11, 2024 @ 3:36pm 
1.5 please?
sidfu1 Dec 7, 2023 @ 5:41pm 
looks like the mod is causing issues with quests if a animal corpse is part of it.

Exception test running QuestNode_TradeRequest_GetRequestedThing: System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.PCSpecialThingFilterWorker_CorpsesAnimal.Matches (Verse.Thing t) [0x0002c] in <e2cd26ccc5264eba9f03a5974f6f4325>:0
at Verse.ThingFilter.Allows (Verse.Thing t) [0x000a1] in <cd7169108ea74757aa50c5b33d275c15>:0
at Verse.RecipeDef+<PotentiallyMissingIngredients>d__95.MoveNext () [0x0009f] in <cd7169108ea74757aa50c5b33d275c15>:0
at System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00015] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at RimWorld.PlayerItemAccessibilityUtility.CacheAccessibleThings (System.Int32 nearTile) [0x0063e] in <cd7169108ea74757aa50c5b33d275c15>:0
ELLIOTTCABLE on Discord Aug 7, 2023 @ 10:53am 
I'm getting errors when pawns (not animals!) are pregnant - in the dev quicktest, right after spawn-in, when pregnancy attempts to tick:

Exception in Verse.Pawn_HealthTracker.HealthTick: System.NullReferenceException: Object reference not set to an instance of an object
at Prized_Companions.PCPregnancyNotifications.NotifyPregnant (Verse.HediffComp_MessageAfterTicks that) [0x00020] in <e2cd26ccc5264eba9f03a5974f6f4325>:0
at Verse.HediffComp_MessageAfterTicks.CompPostTick (System.Single& severityAdjustment) [0x00012] in <95de19971c5d40878d8742747904cdcd>:0
- transpiler ZenthWolf.PrizedCompanions: IEnumerable`1 Prized_Companions.PCPregnancyNotifications:Transpiler(IEnumerable`1 instructions, ILGenerator generator)

https://gist.github.com/ELLIOTTCABLE/a826e2f61f8efd87e0c7200419e574ba
emineminem Mar 8, 2023 @ 1:14pm 
I'm having errors when pawns are putting away animal corpses; seems to be related to this. Any ideas?

https://gist.github.com/534e1740bba04a5dfe466b755f51f767
Kaedys Dec 25, 2022 @ 4:07pm 
Seems the new filters added by this mod aren't playing nicely with the Advanced Animal Prosthetics Table added by Alpha Animals when playing with A Dog Said. Specifically, as far as I can tell, the `PCAllowAnimalCorpses` filter is disabled by default, and the bills in that prosthetics table don't have an ingredient selector (because `fixedIngredientFilter`), so there's no way to turn that filter *on*. As a result, even wild animal corpses aren't counted as valid options for those bills. I solved this by forcing both `PCAllowAnimalCorpses` and `PCAllowCompanionCorpses` to default to "true" in the XML instead (the latter so I could also use named corpses for the bills), though I feel like a more proper solution may be for those bills to have an ingredient selector for options like this.

Do you think this is more properly solved on this mod's end, or on Alpha Animal's side (via changing the bill settings)?
BruhRaptor123 Nov 27, 2022 @ 7:42pm 
It was me, I was still using the old branch before the update push last week. Once I updated, the stuff works fine.
ZenthWolf  [author] Nov 22, 2022 @ 9:37pm 
@BruhRaptor123

Did you enable the GUI option in the mod options (Options->Mod Options->Prized Companions->"Enable GUI add-on...")? I was somewhat reserved in making it default appear to minimize impacting the screen real estate.

Also note that "Lite Mode" is not enabled, and to allow the game to restart when you change either of these options.
BruhRaptor123 Nov 22, 2022 @ 3:57pm 
not seeing the gui option in my game for the youngest first, is that currently broken? anyone else having that issue?