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, Starfield, or Oblivion Remastered. 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: Papyrus
Assigned To: Sclerocephalus
Platform: All
Severity: Normal
Votes: 0
Watching: N/A
Opened By BlackPete on Jan 20, 2019 2:40 am
Last Edited By Sclerocephalus on Aug 18, 2019 12:46 pm
Closed By Sclerocephalus on Sep 21, 2019 5:35 am
Resolution: Fixed
Comment: Fixed for UFO4P 2.0.9

Issue #25819: Unable to complete "Ghoul Problem" at College Square Station

 
I received the quest "Ghoul Problem" (MinRecruit07) from listening to the Minutemen Radio broadcast. It sent me to Oberland Station where a settler sent me to College Square Station to clear out ghouls. The quest failed to update once I killed the boss ghoul (marked with a red quest marker) in the location. I entered getstage MinRecruit07 in the console and it returned a value of 150.

There's a save attached to this ticket in case it's needed for diagnosing the issue.



Attached Files:

Save_25819.7z

Related Issues: 25818  35771  

Comments

3 comment(s) [Closed]
Sclerocephalus said:
 
There is no stage 150 on MinRecrut07.

BlackPete said:
 
That's not a typo unless the game is lying to me. Both the "GetStage" and "sqs" commands indicate that the quest is at stage 150. You can take a look at the save for yourself if you'd like.

Comment #2 Feb 14, 2019 1:21 pm  Edited by BlackPete on Feb 14, 2019 1:23 pm
Sclerocephalus said:
 
Happened to me when I had to clear out the ghouls at Bedford Station for the settlers at Tenpines Bluff. And I also got this on the log:

[08/18/2019 - 03:10:44AM] error: Array index 0 is out of range (0-0)
stack:
[alias GhoulBosses on quest MinRecruit07 (00186642)].DefaultCollectionAliasOnDeath.UFO4P_AddRefToTriggeredRefArray() - "C:\Users\Dr. Peter Haas\AppData\Local\Temp\PapyrusTemp\DefaultCollectionAlias.psc" Line 131
[alias GhoulBosses on quest MinRecruit07 (00186642)].DefaultCollectionAliasOnDeath.TryToSetStage() - "C:\Users\Dr. Peter Haas\AppData\Local\Temp\PapyrusTemp\DefaultCollectionAlias.psc" Line 69
[alias GhoulBosses on quest MinRecruit07 (00186642)].DefaultCollectionAliasOnDeath.OnDeath() - "g:\_F4\Art\Raw\Scripts\DefaultCollectionAliasOnDeath.psc" Line 11

This was somewhat puzzling because the UFO4P fix should actually avoid zero-length arrays on this script. As it turned out however, the UFO4P modification could not handle cases where the script creates a zero-length array on purpose, and that's was happening here. All this is a result of a script lag issue: the enemy alias collection on MinRecruit07 has two scripts running that track death counts for various purposes:
(1) ScriptA is to check whether all enemies are dead and to advance the quest
(2) ScriptB only checks whether the enemy count drops below a certain threshhold value and then sets stage 150. Once this stage is set, target markers will appear on the remaining enemies.

ScriptB also removes dead actors from the alias collection. ScriptA however creates an array and fills it with the references of the dead actors; once the number of entries in that array is equal to the number of actors in the enemy alias, it will advance the quest.
ScriptA is slower than scriptB (because it calls functions on external scripts and these are limied to one per frame). Thus, if the player kills an enemy, scriptB will have removed him from the alias already by the time scriptA starts running its array checks. Now, if the enemy alias contained only one actor (and that's what College Square and Bedford Station have in common: they only have one actor that is flagged with a boss LocRefType), the alias is empty when scriptA runs for the first time and then it sets up a zero-length array. on which all further operations fail.

To fix this, I added a GetCount() check to the start of the code on DefaultCollectionAlias. If this returns zero, all enemies must be dead (because scriptB is the only instance that removes actors from the alias and it only does this if an actor is dead). In that case therefore, the script can skip the array setup and proceed with advancing the quest.

Comment #3 Aug 18, 2019 9:20 am  Edited by Sclerocephalus on Aug 18, 2019 12:45 pm
Showing Comments 1 - 3 of 3