Fallout 4
0 of 0

File information

Last updated

Original upload

Created by

ptmc2112

Uploaded by

ptmc2112

Virus scan

Safe to use

Tags for this mod

About this mod

Removes the passive affinity gain you can get with your current companion, assuming the companion uses the vanilla companion affinity system in the CompanionActorScript script

Also adds a toggle via holotape that switches between enabled and disabled, so you can choose whether or not to have that passive affinity gain

Permissions and credits
Changelogs
Removes the passive affinity gain you can get with your current companion, assuming the companion uses the vanilla companion affinity system in the CompanionActorScript script.

Does not override any npc record.

Also adds a toggle via holotape that switches between enabled and disabled, so you can choose whether or not to have that passive affinity gain

Holotape can be built at any chemlab in for 1 plastic in the UTILITY section

Needs archive invalidation to work for the loose files version. this article explains it: https://www.nexusmods.com/fallout4/articles/3831

Built from the UFO4P version.

TECHNICAL INFO

Normally it does some math between 2 variables mentioned below to add affinity to any companion in the "CurrentCompanion" Faction, which is pretty much any current companion following you every 10 minutes that you have gained at least 1 XP. This mod just adds a condition to check if a variable exists in a file called Toggle_passive_affinity_gain.esp, if it doesn't exist, assumes you don't want that passive affinity gain, and sets the gain to 0, if it does, and is set to enabled, will allow normal passive affinity gain to occur.

I have included the sources so anyone can use it in their mod if it involves the CompanionActorScript.pex file

Incompatible with any mod that also overwrites the CompanionActorScript.pex file (except UFO4P, as it was built from that version)

Built using the UFO4P v2.0.6 of CompanionActorScript.psc file taken from UFO4P v2.1.5c

Edited the following lines, from:

float Function GetWithPlayerAffinityGain()

    float affinityMod

    float currentAffinity = GetValue(Followers.CA_Affinity)

;IF POSTIVE
if currentAffinity >= 0

to:

float Function GetWithPlayerAffinityGain()

if WithPlayerBaseAffinityGainPerTick == 0.0
WithPlayerBaseAffinityGainPerTick = 40.0
WithPlayerCurrentAffinityMult = 0.033
Endif
float affinityMod

float currentAffinity = GetValue(Followers.CA_Affinity)

bool testAffinityGain = true

if Game.GetFormFromFile(0x00000001,"Toggle_passive_affinity_gain.esp")
if (Game.GetFormFromFile(0x00000001,"Toggle_passive_affinity_gain.esp") as GlobalVariable).GetValue() == 1.0
testAffinityGain = false
EndIf
EndIf
;if Toggle_passive_affinity_gain.esp doesn't exist or is not loaded, will always be true
if (testAffinityGain)
affinityMod = 0
;IF POSTIVE
elseif currentAffinity >= 0