Welcome to the AFK Mods bug tracker. In order to report an issue, you need to have a VALIDATED account to post one. Once you have followed the link the registration email sent you, please select a project from the drop down menu below. Select “Open New Issue” and fill out the form with as many details as possible.

Please also consider sending your bug report to Bethesda if you are reporting on an issue with Skyrim Special Edition, Fallout 4, or Starfield. Doing so will help everyone on all platforms.

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Fallout 4 Patch
Component: Fallout 4: Vanilla
Category: Settlements & Workshops
Assigned To: Sclerocephalus
Platform: All
Severity: Very Low
Votes: 0
Watching: N/A
Opened By Sclerocephalus on Oct 5, 2019 10:27 pm
Last Edited By Sclerocephalus on Oct 5, 2019 10:28 pm
Closed By Sclerocephalus on Nov 22, 2019 9:05 am
Resolution: Fixed
Comment: Fixed for UFO4P 2.1.0

Issue #27622: Brahmin creation issue

 
Brahmin creation is handled by a block of code in the DailyUpdateAttractNewSettlers() function of WorkshopScript:

if newWorkshopActor.GetValue(WorkshopParent.WorkshopGuardPreference) == 0
	if GetValue(ratings[WorkshopParent.WorkshopRatingBrahmin].resourceValue) == 0.0 && AllowBrahminRecruitment
		int brahminRoll = utility.RandomInt()
		if brahminRoll <= WorkshopParent.recruitmentBrahminChance
			actor newBrahmin = WorkshopParent.CreateActor_DailyUpdate(self, bBrahmin = true)
		endif
	endif
endif


Any time a settler is created that is not a guard, the script may roll for creating a brahmin IF the brahmin resource rating value for the workshop is zero (i.e. if there is no brahmin at the workshop yet) [NB: we can disregard the AllowBrahminRecruitment bool in this context: this is a const property on WorkshopScript and will not change during the game. For mosts worksops, this is permanently 'true'].

Since a brahmin will increase the respective workshop rating by 1.0, it was clearly not intended to create more than one free brahmin. In practice however, the scripts may create any number of free brahmins: in my current playthrough, I got half a dozen at Hangman's Alley and they severely clogged up the whole workshop. This is because of a flaw in the procedure: to update the workshop ratings, a workshop resource recalculation needs to be carried out but this is not done if a workshop is not loaded (because many resource rating values depend on cell data and these would all turn to zero if the resource recalculation was run on an unloaded workshop). Thus, the brahmin resource rating stays at zero until the workshop loads for the next time, no matter how many brahmins are created in the meantime.

To fix this, the brahmin resource rating needs to be modified 'manually' whenever a brahmin is added to a workshop. This code is in the AddActorToWorkshop() function of WorkshopParentScript.