Jump to content

How I change the happiness penalty for killed settlers?


AtomsChosen

Recommended Posts

In the game there is a penalty for when settlers die of about -20 happiness. This is a problem since I am playing with a mod that makes settlers mortal and am using endless warfare to spawn enemies all over the place. I want my playthrough of Fallout 4 to feel very unforgiving and like all my settlements are in extreme danger at all times. Settlers die often during my playthroughs if you reach a certain amount of low happiness then settlements become unowned. Now I know its possible to make it so that workshops can't become unowned with low happiness but this requires going through each workshop and editing each which could take a while and add more conflicts. So I want to know if anyone knows how to edit the happiness penalty for when a settler dies? And I'd rather not raise the health of settlers as I have already done that and I want to be punished for not protecting the settlers properly and setting up good defenses. 

Link to comment
Share on other sites

It would be cool if the settlers also celebrated and became happier from "successful" defense against attacks, governed by some threshold. Possibly with a group cheering mass-idle. 

Anywho -- this value can be directly set through game setting "sWorkshopRatingHappiness [GMST:00247720]". The values are recalculated upon entering a settlement so there is probably an event, perhaps a custom one, that you can register for in a script to rebalance them directly *after* the game has updated them. I'm not sure whether it will also reupdate any decision they've made regarding ownership though.

If this is only a problem for your personal playthroughs you can create the script and inject it directly into the player character using "PRID 14" and then " APS "PathTo.ScriptName" ". It should be a script extending ObjectReference or Actor.

Link to comment
Share on other sites

You can either: 

(a) hack WorkshopParentScript which is A REALLY BAD IDEA

; happiness modifier when an actor dies
float actorDeathHappinessModifier = -20.0 const

(b) run a regular process to remove the happiness debuffs, I tend to use WorkshopRef.OnUnload which will be after the player has been on site for death inducing combat:


Function UpdateHappiness(Objectreference WorkshopREF)    

If (WorkshopREF.GetValue(pWorkshopRatingBonusHappiness) < 0) 
    WorkshopREF.SetValue(pWorkshopRatingBonusHappiness,0.0) ; usually settler deaths 
EndIf

If (WorkshopREF.GetValue(pWorkshopRatingHappinessModifier) != 0) ; usually settler deaths 
    WorkshopREF.SetValue(pWorkshopRatingHappinessModifier,0.0)
Endif

EndFunction
 

 

Link to comment
Share on other sites

On 12/14/2023 at 3:39 AM, RaidersClamoring said:

It would be cool if the settlers also celebrated and became happier from "successful" defense against attacks, governed by some threshold. Possibly with a group cheering mass-idle. 

Anywho -- this value can be directly set through game setting "sWorkshopRatingHappiness [GMST:00247720]". The values are recalculated upon entering a settlement so there is probably an event, perhaps a custom one, that you can register for in a script to rebalance them directly *after* the game has updated them. I'm not sure whether it will also reupdate any decision they've made regarding ownership though.

If this is only a problem for your personal playthroughs you can create the script and inject it directly into the player character using "PRID 14" and then " APS "PathTo.ScriptName" ". It should be a script extending ObjectReference or Actor.

Can you elaborate what you mean by game settings? 

 

On 12/14/2023 at 3:57 AM, SKK50 said:

You can either: 

(a) hack WorkshopParentScript which is A REALLY BAD IDEA

; happiness modifier when an actor dies
float actorDeathHappinessModifier = -20.0 const

(b) run a regular process to remove the happiness debuffs, I tend to use WorkshopRef.OnUnload which will be after the player has been on site for death inducing combat:


Function UpdateHappiness(Objectreference WorkshopREF)    

If (WorkshopREF.GetValue(pWorkshopRatingBonusHappiness) < 0) 
    WorkshopREF.SetValue(pWorkshopRatingBonusHappiness,0.0) ; usually settler deaths 
EndIf

If (WorkshopREF.GetValue(pWorkshopRatingHappinessModifier) != 0) ; usually settler deaths 
    WorkshopREF.SetValue(pWorkshopRatingHappinessModifier,0.0)
Endif

EndFunction
 

 

I am going to give this a try soon as I can manage to get my script complier working or at least find a script compiler I can use.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...