taryl80 Posted July 15, 2019 Share Posted July 15, 2019 I playing with a idea for a new mod. For this mod it would be necessary to make a new workshop object to that a random settler later can be assign to. Later in the game, the player should be able to take random notes*, out of the inventory of the settler that is assign to this workshop object, or a container on the table (or whatever) of new workshop object I will made (still not sure). *Those notes should only be notes that I have written before and then add in the ck and they should appear random (what I know now... maybe from 160 written notes, just 10 that appears in the inventory of this settler or the container, depending also on the queststages and enviroment circumstances the player character is in his playthrough). I don't know how to let random "items" appear (temporary until the player has fast travel away from the npc) in npc (settler) inventorys. Is it possible to do that and then how? Many thanks to anyone already who can help me with that. Link to comment Share on other sites More sharing options...
SKKmods Posted July 15, 2019 Share Posted July 15, 2019 All of that is doable with a new script attached to your new workshop object if it uses the WorkshopObjectScript: Script fires OnLoad() event when your workshop object is within player uGridsToLoadGet the local WorkshopRef = Self.GetLinkedRef(pWorkshopItemKeyword) Check the workshop is still player owned ((WorkshopRef as WorkshopScript).OwnedByPlayer == TRUE)Check if there is already a settler assigned to your object (Self as WorkshopObjectScript).GetAssignedActor()If not get the local settler population with as (WorkshopRef WorkshopScript).GetWorkshopActors(), pick a settler actor from the array and(Self as WorkshopObjectScript).AssignActor()Then do your thing with the notes & etc on the assigned actor. Assumes knowledge of papyrus script structures and object mode. If this is meaningless, please ignore. Link to comment Share on other sites More sharing options...
hereami Posted July 15, 2019 Share Posted July 15, 2019 (edited) Leveled Item is quite powerful built-in mechanics. Each of them can be assigned a Global var to control the chance at run-time (usually 0/100 to have enable/disable switch), and lists can be nested. To make the final output appear, place a top-level list as an object by regular means (reference, quest alias, script etc.), when come to conclusion "where" : ) For very basic example may look at VL_Vendor_Doctor. Chances (GlobalVars) should be handled by quests, or whatever neccessary way. PS. Hm, or above, i didn't see it... I mostly thought about random. Edited July 15, 2019 by hereami Link to comment Share on other sites More sharing options...
taryl80 Posted July 15, 2019 Author Share Posted July 15, 2019 Currently my mod idea is nothing more as a thought. Before I stick too much effort in it, I would like to know if it is possible to do what I have thought of, or not and you 2 have help me with this question. That means I can actual start to work on the mod and later when it is time to actual make it happen in ck, I can come back to this thread. So thanks you two for your infos. Link to comment Share on other sites More sharing options...
Recommended Posts