Scriptname ArtifactTrackerPlayer extends ReferenceAlias FormList Property ETR_ItemsNew Auto FormList Property ETR_ItemsFound Auto FormList Property ETR_ItemsStored Auto int iArtifactCount = 0 event OnInit() Utility.wait(3.0) ; wait for quickstart scripts to finish OnPlayerLoadGame() endevent Event OnPlayerLoadGame() if ! Load() ETR_ItemsNew.Revert() ETR_ItemsFound.Revert() ETR_ItemsStored.Revert() UnregisterForUpdate() Debug.Notification("Failed to initialize ArtifactTracker.dll") return endif if skse.GetPluginVersion("Ahzaab's moreHUD Plugin") >= 30800 ahzmorehud.RegisterIconFormList("dbmNew", ETR_ItemsNew) ahzmorehud.RegisterIconFormList("dbmFound", ETR_ItemsFound) ahzmorehud.RegisterIconFormList("dbmDisp", ETR_ItemsStored) endif if skse.GetPluginVersion("Ahzaab's moreHUD Inventory Plugin") >= 10017 ahzmorehudie.RegisterIconFormList("dbmNew", ETR_ItemsNew) ahzmorehudie.RegisterIconFormList("dbmFound", ETR_ItemsFound) ahzmorehudie.RegisterIconFormList("dbmDisp", ETR_ItemsStored) endif if SKSE.GetPluginVersion("QuickLootEE") >= 0 QuickLootEE.RegisterNewItemsList(ETR_ItemsNew) QuickLootEE.RegisterDisplayedItemsList(ETR_ItemsStored) QuickLootEE.RegisterFoundItemsList(ETR_ItemsFound) endif int iNewArtifactCount = GetArtifactCount() if iNewArtifactCount != iArtifactCount iArtifactCount = iNewArtifactCount Debug.Notification("Artifact list changed, rebuilding the list") ETR_ItemsNew.Revert() ; rebuild the list endif ; Rebuild all lists to avoid discrepancies, stale data, and broken records RescanStoredArtifacts() RescanFoundArtifacts() RescanNewArtifacts() EndEvent ; NATIVE FUNCTIONS bool function Load() native global int function GetArtifactCount() native global function RescanStoredArtifacts() native global function RescanFoundArtifacts() native global function RescanNewArtifacts() native global ObjectReference function GetCellStorage() native global ObjectReference function GetCurrentContainer() native global function SyncCellStorage() native global Actor[] function GetPlayerFollowers() native global function RegisterPersistentStorage(ObjectReference ref) native global