-
Posts
2851 -
Joined
-
Last visited
Nexus Mods Profile
About SKKmods
Profile Fields
-
Website URL
https://skkmods.com
-
Discord ID
SKK50#0625
-
Country
United Kingdom
-
Currently Playing
Creation Kit
-
Favourite Game
Fallout 4
Recent Profile Visitors
SKKmods's Achievements
Grand Master (14/14)
36
Reputation
-
Persistence question
SKKmods replied to dizietemblesssma's topic in Fallout 4's Creation Kit and Modders
If there are multiple matches on any condition fill whether its LocRefType, Keyword, GetisID or whatever a ReferenceAlias will just fill the first one. If you cant guarantee one result, redesign to use a RefCollectionAlias and set Initial fill to 0 to collect 'em all. If you totally want to avoid persistence redesign to start/stop a finder quest with a dynamic search/fill every Player.OnLocationChange or Player.OnDistanceGreaterThan a moveable datum object and put the found results in the persistent owning quest to mark. -
MQ101 is hard coded into Fallout4.exe. You could decompile Fallout4.exe to find the offset and inject your own code, or just hack MQ101 quest/script to do what you want.
-
Persistence question
SKKmods replied to dizietemblesssma's topic in Fallout 4's Creation Kit and Modders
The quest will only be able to fill aliases with ObjectReferences if they are either: (a) Non persistent but in the active uGridsToLoad around the player when the quest alias tries to fill, or (b) Has a LocationRefType keyword associated with a Location and the Alias is configured to use it, or (c) Is persistent. If (a) is not guaranteed, you have not used (b) and you remove the persistent flag from the ObjectReference the alias will fail to fil. If its not an optional alias the quest will fail to start. -
Monitoring a vanilla quest
SKKmods replied to dizietemblesssma's topic in Fallout 4's Creation Kit and Modders
Every one of my > 60 solutions does this at start-up, check out the standard multi-purpose template in this article https://www.nexusmods.com/fallout4/articles/1038 (4) Robust new game start script The things you want are "OnStageSet" If your main quest pops UI messages on startup that you want to delay, attach the launch script to a silent start game enabled quest that monitors QuestOfInterest.OnStageSet and then trigger myQuest.StartQuest() or myQuest.SetStage() at the right condition. -
You cant add an inventory event filter to an OBJECT script, it needs to be on the CONTAINER (actor) e.g. PlayerRef If you want an Object attached script to trigger on any container/actor then use OnContainerChanged() something like this: OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) If(akNewContainer is Actor) ; do stuff EndIf EvenEvent
-
Define and manage the array on a central quest attached script and get the alias scripts to access it via: ReferenceAlias[] myArray = (Self.GetOwningQuest() as myQuestScriptName).myArray OR even more elegant is to put all the logic in the central quest attached script function and call it from the alias scripts: (Self.GetOwningQuest() as myQuestScriptName).myFunction(thisReferenceAlias = Self)
-
How to use scripts to make items move together?
SKKmods replied to halrixx's topic in Starfield's Creation Kit and Modders
What sort of move ... what is initiating or triggering it for a script to detect ? e.g. for a workshop object there is Event OnWorkshopObjectMoved() for other objects there is ... nothing. -
SetPosition() not moving an object reference
SKKmods replied to 15gudasc's topic in Fallout 4's Creation Kit and Modders
Lock a script with long Utility.Wait() or While loops that use framerate bound functions and it will miss events which seem to queue for a while and are then cleared or lost. Or the world state has moved on and the event is no longer relevant. Best practice is to never mix latent functions and long running loops with events, put them in seperate scripts and never have a problem. Read up on LATENT and FRAME BOUND script functions to learn more. -
SetPosition() not moving an object reference
SKKmods replied to 15gudasc's topic in Fallout 4's Creation Kit and Modders
Putting Utility.Wait into event driven scripts it really bad, the script can miss events whilst frozen. You need to read up on long running latent functions locking scipts. Before getting all clever with arrays it looks like you need to get your basic functions and events working with a single object. -
SetPosition() not moving an object reference
SKKmods replied to 15gudasc's topic in Fallout 4's Creation Kit and Modders
Of course the script will not receive the event because you changed: Self.RegisterForRemoteEvent(thisTree, "OnTranslationComplete") to TreesArray.RegisterForRemoteEvent(TreesArray, "OnTranslationComplete") Be interesting to understand WHY you changed Self to the ObjectReferences which receive the native events anyway, but probably dont have a script attached to process them. Also there is no need for two seperate loops through the array, just do it once; Function GetSh1tDone() Int i = 0 While i < TreesArray.Length ObjectReference thisTree = TreesArray [ i ] ; spaces added for the nexus editor which thinks its markup Self.RegisterForRemoteEvent(thisTree, "OnTranslationComplete") thisTree.TranslateTo(TreeEndPosition.GetPositionX(), TreeEndPosition.GetPositionY(), TreeEndPosition.GetPositionZ(), 0.0, 0.0, 0.0, moveSpeed) i += 1 EndWhile EndFunction -
SetPosition() not moving an object reference
SKKmods replied to 15gudasc's topic in Fallout 4's Creation Kit and Modders
How does the (While True) loop ever get broken/stop ? That looks like a guaranteed stackdump bfore worrying about anything else. You should be using events like OnTranslationComplete() to reset, not nasty while loops. If your new to this, the format for a non object attached script would be; Self.RegisterForRemoteEvent(thisTree, "OnTranslationComplete") and Event ObjectReference.OnTranslationComplete(ObjectReference akSender)