Survivalist: Invisible Strain

Survivalist: Invisible Strain

61 ratings
SIS Livestock Control
   
Award
Favorite
Favorited
Unfavorite
Tags: IsMod
File Size
Posted
Updated
2.892 MB
27 Aug, 2024 @ 2:20am
3 Nov, 2024 @ 2:26pm
5 Change Notes ( view )

Subscribe to download
SIS Livestock Control

Description
What is this?
This mod adds livestock population control to the game. Characters with the Animal Feeder Role will now control the population of chickens in your community, slaughtering them when their numbers exceed a threshold and bringing them near campfires. They will need a hunting knife.

You can set whether roosters (male) or hens (female) can be slaughtered, and whether to avoid fertilized chickens. You can also set the thresholds for how many chickens you can have in your community before starting the livestock control, and whether to ignore chickens with personalized names (if you have grown attached to any).

Can be added to current saves.

Settings
The settings file can be found in the mod folder under "Settings_LivestockControl.xml"
  • CanSlaughterRoosters. Whether roosters (male chickens9 can be slaughtered to control livestock population. (default true)
  • CanSlaughterHens. Whether hens (female chickens) can be slaughtered to control livestock population. (default true)
  • CanSlaughterFertilizedChickens. Whether fertilized chickens can be slaughtered to control livestock population. (default false)
  • BringNearCampfire. Whether to bring slaughtered chickens near campfires. (default true)
  • IgnoreNamedChickens. Ignore chickens with personalized names. (default true)
  • MaxAmountHens. Maximum number of hens in community before starting to murder them. (default 5)
  • MaxAmountRoosters. Maximum number of roosters in community before starting to murder them. (default 5)

Compatibility
Shouldn't have any incompatibilities. Report any issues in the comments section!
20 Comments
SweetCaptn  [author] 29 May @ 8:02am 
Haha that message was meant for another user, but they deleted their message. I would avoid playing with it until I fix the crash Bob reported
A Tutorial Boss 29 May @ 7:34am 
lol are you responding to Bob from January, haha, what a gap, and completely unrelated. Also does this mod still work with the current beta version?
Bob  [developer] 20 Jan @ 6:26pm 
Heya, I've had a crash report for this mod with the same callstack as below. I think I know what's happening - it runs my GetNextSubGoal code and doesn't find any animal feeder or drinker props that need filling. So it calls OnFailed and returns null. Your Postfix code then takes over and decides to return new FindGoal to go looking for a knife.

The problem is that OnFailed has called SetRoleFailedRecently and also set LastAttemptedTime, both of these would cause IsPossible to return false. Hence the assert that the subgoal is "Not Possible".

You need to find a way of ensuring that OnFailed is only called when GetNextSubGoal will actually return null. Maybe you just use Prefix to override the whole function and duplicate my code?
SweetCaptn  [author] 11 Nov, 2024 @ 10:32am 
I'll take a look tonight, thank you
Looni 11 Nov, 2024 @ 9:24am 
Maybe limited to public version 217 and not affecting the beta 219. Dunno. I assume it's from this mod anyway.
Looni 11 Nov, 2024 @ 9:19am 
Error (v217): Lydia Russo (SurvivorGoal : AnimalFeederGoal : FindGoal (HuntingKnife)) activating a SubGoal that is Not Possible (old = SatisfyHunger, new = AnimalFeederGoal : FindGoal (HuntingKnife)) UnityEngine.Debug:LogError (object)
StateMachineGoal:CheckForSubGoalFinished (Character,Goal,bool) (at C:/Survivalist2/Assets/Scripts/Goal/Goal.cs:1036)
PrioritiserGoal:Update (Character,Goal) (at C:/Survivalist2/Assets/Scripts/Goal/Goal.cs:1310)
SurvivorGoal:Update (Character,Goal) (at C:/Survivalist2/Assets/Scripts/Goal/SurvivorGoal.cs:177)
Character:Think () (at C:/Survivalist2/Assets/Scripts/Character/Character.cs:22991)
SweetCaptn  [author] 11 Nov, 2024 @ 8:41am 
Awesome! thanks
Looni 11 Nov, 2024 @ 7:26am 
Could've been the game being the game. So far it's working fine even right before the earlier crash. Disregard for now =D
Looni 11 Nov, 2024 @ 7:23am 
I'll try to replicate it again with the same save.
SweetCaptn  [author] 11 Nov, 2024 @ 7:18am 
Is it the exact same error? I remember not having any crashes after posting the fix. Try ubsubscribing / subscribing to the mod again, perhaps it's not updated. Otherwise send me the log and I'll look into it