Excellent mod, exactly what I've been looking for. Thank you, ptmc2112
Pair this mod with Affinity Gains, which reduces the gain you receive from companions liking or loving your actions, and you have a realistic setup. Now it will take in-game months/hundreds of hours IRL before your companions idolize you. I edited the Affinity Gains mod to be around 90% slower because I found half/50% to still be very fast:
Like = 2
Loved = 4
Disliked = -3
Hate = -7
I figured that by having the negatives higher than the positives, I would have to be careful what I do in front of certain companions.
this mod does not affect normal affinity changes from doing stuff they like or hate, only removes the passive affinity gain that you get simply by traveling with that companion.
So you still gotta do stuff they like if you want the companion to like you.
cool. i think them liking me picking locks constantly is weirder than building familiarity but i like to be able to feel like my decisions are more important for building affinity
You could have Piper wandering around with you for a day, not really do anything of import, and get through several of her affinity scenes where she tells you about her life easily.
I can confirm this mod works with the next-gen update. I had to use the loose file version. The BA2 one didnt work. Same spot in load order, nothing else changed, except the alternate version :)
Thanks a lot, this is a godsend mod <3 I was so annoyed by the passive affinity bump. From strangers to lovers in 2 days... Yeah, i get why Bethesda implemented this feature, but its a real immersion killer (at least for me) Much appreciated, thanks again for your work :)
In the source file the two variables mentioned in the description still have their old values. In my game there is still passive affinity gain. Are you sure you compiled the correct script?
Thanks for that but it's still not working and I'm fresh out of ideas why. Vortex doesn't show the overwritten files symbol. However I do have other mods affecting the companions system but I don't see how they could interfere with this. Do you have any ideas?
Might be that because it's a base game script, it doesn't work on an on-going game, so you have to start a new game with it. I've only ever tested it with a new game and it works for me.
One other reason I just remembered, is it requires archive invalidation to work, as it doesn't use a BA2 archive. If you don't have archive invalidation (just search "Fallout 4 archive invalidation" in any web search to search how), it just won't work.
So I thought about this once more: The two lines in the script only initialise the float values. They are stored in my save now and won't be changed unless this very script decides to do so.
Solution A (not preferred): Add the line WithPlayerCurrentAffinityMult = 0.0as the first line in the Function GetWithPlayerAffinityGain().
Solution B (preferred): Create an .esl that introduces the constant global value "No_Passive_Affinity_Gain" and set its value to 1.0. Have the function GetWithPlayerAffinityGain() check for this value and set the local variable affinityMod to 0.0 like this: Globalvariable No_Passive_Affinity_Gain
float Function GetWithPlayerAffinityGain() float affinityMod
;just incase the affinity curve formula would ever make it a negative number if affinityMod < 0 affinityMod = 1 endif
;*Make sure you don't add anything if the player would be crossing a threshold ;unless 50 hours have passed and main quest is done if TestValueForAffinityBump(affinityMod) && MQComplete.GetValue() == 0 && Game.GetRealHoursPassed() < 50 debug.trace(self + "GetWithPlayerAffinityGain() return 0 because it would cause a bump in affinity threshold and we aren't done with MQ & 50 hours of play time yet.") affinityMod = 0 endif
If you want to try it, I used a Papyrus plugin for Notepad++ to compile it. (once you have successfully installed the plugin to notepad++, you do need to run the compiler on the file in the Data\Scripts\Source\User folder to get it to compile)
I learned not to modify files mid-game, but I can post it as an update, if you wanna try compiling it.
EDIT: sorry I didn't read it before, but that global would require finding the record that uses the script, and making your own override to add that extra global variable. Especially since that variable doesn't have a defined variable outside the script. If you do make your own, just remember I used the version from the unofficial patch, and suggest you do the same, for the fixes already present and remember to follow the permissions it gives.
Alternatively, I can make a check to see if either value is greater than 0 and if so, set both to 0.
I didn't use your suggestion, but I did modify it to work on an existing save.
I simply changed the lines: ;IF POSTIVE if currentAffinity >= 0 affinityMod = WithPlayerBaseAffinityGainPerTick - (currentAffinity * WithPlayerCurrentAffinityMult) to ;will always be true, rendering the rest of the else ones impossible, can be modified if the modder wants to make it toggleable if true affinityMod = 0 ;IF POSTIVE elseif currentAffinity >= 0 affinityMod = WithPlayerBaseAffinityGainPerTick - (currentAffinity * WithPlayerCurrentAffinityMult)
That's great, thanks! I didn't know about records having to require globals. I'll have to dig into that now. And thanks for the link to the notepad plugin. No need to start up the CK for this anymore.
I did find the record, and it's built into the baseID of every vanilla and DLC companion, and likely in all modded companions that use the actor value CA_Affinity
EDIT: I just remembered it's possible to use the function GetFormFromFile - Game (alternate link) to use the global inside the script without having to edit the esp records and avoid conflicts that way (just remember to cast it as the correct type when assigning it to another variable, or when using it in the if condition directly) (you may also want to make sure the form actually exists, on the off chance the esp is deactivated but the script stays the same, optionally via the IsPluginInstalled - Game (alternate link) function)
That way you can define a global inside your own ESP without having to make conflicting edits to the baseID of the companions, and allow it to be changed via other means (like a terminal attached to a holotape, or via messagebox spawned by other means)
Just what I'll need if I ever play FO4 again. I usually set timescale to 6 which meant that affinity would max within 2-3 days. Tracking for now. Kudos
24 comments
Pair this mod with Affinity Gains, which reduces the gain you receive from companions liking or loving your actions, and you have a realistic setup. Now it will take in-game months/hundreds of hours IRL before your companions idolize you.
I edited the Affinity Gains mod to be around 90% slower because I found half/50% to still be very fast:
I figured that by having the negatives higher than the positives, I would have to be careful what I do in front of certain companions.
not sure what this mod does
So you still gotta do stuff they like if you want the companion to like you.
You could have Piper wandering around with you for a day, not really do anything of import, and get through several of her affinity scenes where she tells you about her life easily.
I had to use the loose file version. The BA2 one didnt work. Same spot in load order, nothing else changed, except the alternate version :)
I was so annoyed by the passive affinity bump. From strangers to lovers in 2 days...
Yeah, i get why Bethesda implemented this feature, but its a real immersion killer (at least for me)
Much appreciated, thanks again for your work :)
Thanks anyways for the mod and the replies!
Solution A (not preferred): Add the line
WithPlayerCurrentAffinityMult = 0.0
as the first line in the Function GetWithPlayerAffinityGain().Solution B (preferred): Create an .esl that introduces the constant global value "No_Passive_Affinity_Gain" and set its value to 1.0. Have the function GetWithPlayerAffinityGain() check for this value and set the local variable affinityMod to 0.0 like this:
Globalvariable No_Passive_Affinity_Gain
float Function GetWithPlayerAffinityGain()
float affinityMod
float currentAffinity = GetValue(Followers.CA_Affinity)
;NO PASSIVE AFFINITY GAIN
if No_Passive_Affinity_Gain == 1
affinityMod = 0.0
elseif currentAffinity >= 0;if positive
affinityMod = WithPlayerBaseAffinityGainPerTick - (currentAffinity * WithPlayerCurrentAffinityMult)
else ;IF NEGATIVE
affinityMod = WithPlayerBaseAffinityGainPerTick + (currentAffinity * WithPlayerCurrentAffinityMult)
endif
;just incase the affinity curve formula would ever make it a negative number
if affinityMod < 0
affinityMod = 1
endif
;*Make sure you don't add anything if the player would be crossing a threshold
;unless 50 hours have passed and main quest is done
if TestValueForAffinityBump(affinityMod) && MQComplete.GetValue() == 0 && Game.GetRealHoursPassed() < 50
debug.trace(self + "GetWithPlayerAffinityGain() return 0 because it would cause a bump in affinity threshold and we aren't done with MQ & 50 hours of play time yet.")
affinityMod = 0
endif
return affinityMod
EndFunction
What do you say?
I learned not to modify files mid-game, but I can post it as an update, if you wanna try compiling it.
EDIT: sorry I didn't read it before, but that global would require finding the record that uses the script, and making your own override to add that extra global variable. Especially since that variable doesn't have a defined variable outside the script. If you do make your own, just remember I used the version from the unofficial patch, and suggest you do the same, for the fixes already present and remember to follow the permissions it gives.
Alternatively, I can make a check to see if either value is greater than 0 and if so, set both to 0.
I simply changed the lines:
;IF POSTIVE
to if currentAffinity >= 0
affinityMod = WithPlayerBaseAffinityGainPerTick - (currentAffinity * WithPlayerCurrentAffinityMult)
;will always be true, rendering the rest of the else ones impossible, can be modified if the modder wants to make it toggleable
if true
affinityMod = 0
;IF POSTIVE
elseif currentAffinity >= 0
affinityMod = WithPlayerBaseAffinityGainPerTick - (currentAffinity * WithPlayerCurrentAffinityMult)
I didn't know about records having to require globals. I'll have to dig into that now.
And thanks for the link to the notepad plugin. No need to start up the CK for this anymore.
EDIT: I just remembered it's possible to use the function GetFormFromFile - Game (alternate link) to use the global inside the script without having to edit the esp records and avoid conflicts that way (just remember to cast it as the correct type when assigning it to another variable, or when using it in the if condition directly) (you may also want to make sure the form actually exists, on the off chance the esp is deactivated but the script stays the same, optionally via the IsPluginInstalled - Game (alternate link) function)
That way you can define a global inside your own ESP without having to make conflicting edits to the baseID of the companions, and allow it to be changed via other means (like a terminal attached to a holotape, or via messagebox spawned by other means)