Welcome to the AFK Mods bug tracker. In order to report an issue, 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.

An account will be required to submit an issue, so if you need one and are unable to register, please contact us via the forums at https://www.afkmods.com/

Issue Data
Status: Closed
Issue Type: Bug Report
Project: Unofficial Skyrim Special Edition Patch
Component: Skyrim SE: Vanilla
Category: Papyrus
Assigned To: Nobody
Platform: All
Severity: Very Low
Votes: 0
Watching: N/A
Opened By EyeDeck on Jun 22, 2019 3:13 pm
Closed By Arthmoor on Aug 8, 2019 7:06 pm
Resolution: Fixed
Comment: Fixed for USSEP 4.2.0.

Issue #26841: FXfakeCritterScript adds to Game.GetPlayer() instead of akActionRef

Here's critter.psc for reference:
EVENT onActivate(objectReference actronaut)
	if (bKilled == false)
		bKilled = true
		disableAndDelete(false) ; Nuke the critter as early as possible so the player knows something happened
		;Player receives loot for direct activation?  Probably need a bool here for other critters in future
		if nonIngredientLootable ; do I have the optional non-ingredient lootable parameter set?
			actronaut.additem(nonIngredientLootable, lootableCount)
			actronaut.addItem(lootable, lootableCount)
		if bIncrementsWingPluckStat == TRUE
			game.IncrementStat("Wings Plucked", lootableCount)
Here, the loot is added to the object that activated the critter. This could be the player, obviously, but it also allows for e.g. a script to force a companion to go loot the object, which properly adds the ingredients to the activating object.

And here's FXfakeCritterScript.psc:
Event OnActivate(ObjectReference akActionRef)
	if myFood 
		game.getplayer().additem(myFood, numberOfIngredientsOnCatch)
	if  myIngredient
		game.getplayer().additem(myIngredient, numberOfIngredientsOnCatch)
;!	utility.waitGameTime(hoursBeforeReset)
;!	readyToReset = TRUE
In this one, the loot is added to game.getplayer() instead of just using akActionRef like it should, which is both slower and less flexible.

(semi-related note, and already fixed, but utility.waitGameTime() to reset the object? Really, Bethesda?)