niston Posted December 18, 2021 Share Posted December 18, 2021 How do I get the engine to populate my RefCol Alias with furniture having a specific keyword? I have a quest that works very similar to the settler bell. But instead of them just gathering around the bell, I want them to go sit in those furnitures.So I thought of having the quest fill a refcol alias with the furnitures, from which the quest stage script fragment can pick and reflink the NPCs to them. For use as Target with the TravelThenSit package. Told it to "Find Matching Reference" "InLoaded Area", closest to "Bell" (where they gather). Also added a condition HasKeyword <furniturekeyword> == 1.00.But the alias does not fill (sqv shows it's empty). Swapped Subject and Target, also tried using a formlist with IsInList condition, rather than the keyword. To no avail. Suggestions? Link to comment Share on other sites More sharing options...
DieFeM Posted December 18, 2021 Share Posted December 18, 2021 (edited) I would try to edit a sleep package for it to find references with furniturekeyword, I've got it working with a custom idle marker on a collection of npc's, so that they use a random idle marker (only of my custom type) at a given quest stage. Edited December 18, 2021 by DieFeM Link to comment Share on other sites More sharing options...
SKKmods Posted December 18, 2021 Share Posted December 18, 2021 Some conditions plain dont work for dynamic quest ref fills. Also it wont find non persistent objects that are unloaded. Start simple with known good like no area restrictions just IsId objecttype or HasKeyword and Debug.Trace the contents then refine the conditions until it stops working. Link to comment Share on other sites More sharing options...
niston Posted December 18, 2021 Author Share Posted December 18, 2021 Only used a single condition, either HasKeyword or IsInList. Target area is loaded. But it's not working. I looked at WorkshopSleep0x8.Looking at that package dropped my IQ level by 25 at least: Wait-Wait-Wait-Wait-Travel/Find-Sandbox/GuardArea-Sleep.WTF. Why do none of Beth packages make any sense and why do they even work. I feel very dumb now and want to eat crayons. Link to comment Share on other sites More sharing options...
DieFeM Posted December 18, 2021 Share Posted December 18, 2021 (edited) You need to make a copy of the Sleep (its named just "Sleep") package, which is a package template, and edit it, there you can change more in-depth parameters.When you work on a package template you have much more things to work with: There you have an entry of how the find procedure works: https://www.creationkit.com/index.php?title=Find_(Procedure) Edited December 18, 2021 by DieFeM Link to comment Share on other sites More sharing options...
niston Posted December 18, 2021 Author Share Posted December 18, 2021 Alright. So I created a stack similar to WorkshopSleep0x8. The problem I'm facing now is, I have a Target Selector for the Find, and a Target for the Sit. I don't see any way to replicate the "Found Bed" (as in WorkshopSleep0x8) input for the Sit procedure. I have no idea where it even comes from, presumably the Target Selector, but I can't see how. Must be an implicit thing... But then, the Sit in my stack insists on a SingleRef type input, which is the wrong kind. It cannot be changed and there exists no option for Input Data other than "Target". So how do I get the Sit to use the furniture found by Find ? Compared with the vanilla package: Just when you thought it couldn't get more ass backwards, it gets more ass backwards. Link to comment Share on other sites More sharing options...
LarannKiar Posted December 18, 2021 Share Posted December 18, 2021 (edited) In loaded area, HasKeyword "furniture keyword" == 1 should defintely work. ("GetValue Bed >= 1" should too). But if it doesn't, you can use the "GetBeds" function from the WorkshopParentScript and fill the RefColl from your script. Are you sure the beds were loaded by the time you started the quest? And if you make a custom Sleep AI package, don't forget to set the package's "UseOwnedOnly" to False (it's a bool in Procedure Sequence >> Stacked >> Simultaneous >> Find) otherwise nonowner Settlers won't use them. EDIT: I don't know why I though you were talking about beds.. Edited December 18, 2021 by LarannKiar Link to comment Share on other sites More sharing options...
LarannKiar Posted December 18, 2021 Share Posted December 18, 2021 So I created a stack similar to WorkshopSleep0x8. The problem I'm facing now is, I have a Target Selector for the Find, and a Target for the Sit. I don't see any way to replicate the "Found Bed" (as in WorkshopSleep0x8) input for the Sit procedure. The Sit in my stack insists on a SingleRef type input, which is the wrong kind. It cannot be changed and there exists no option for Input Data other than "Target". If you link your actor to the target furniture with a script, the TravelThenSit (TravelDestination: Near linked reference 512, Sit target: Linked Reference) is perfect. If you just want your Settlers to sit in those furnitures, no need to create a new AI package. Link to comment Share on other sites More sharing options...
DieFeM Posted December 18, 2021 Share Posted December 18, 2021 Found Bed type is ObjectList, it is declared in the "Public Package Data".ObjectList (ObjectList): This list is ***populated*** when the Find procedure is successful. It is a list of all things that the Find procedure found. This can later be used by another procedure, such as "Acquire" in order to pick up the object that was found in the search location. (Usually this is hooked up to private data and fed to a "target" parameter of another procedure like Acquire, Eat, Sit, etc.) Link to comment Share on other sites More sharing options...
DieFeM Posted December 18, 2021 Share Posted December 18, 2021 (edited) Note that Found Bed is not marked as public in the template package, and workshopsleep0x8 uses workshopsleepandguard as template, and this parameter is only present in the template.For this reason I told you to work on the package template, because you get access to all the package data. Edited December 18, 2021 by DieFeM Link to comment Share on other sites More sharing options...
Recommended Posts