SKKmods Posted October 5, 2018 Share Posted October 5, 2018 I would like to add a 4 option dialogue scene to generic settlers (trade, heal, command, nothing). Settlers are populated in a quest reference collection with scripts and keywords attached, but a dialogue scene needs to be created with a specific actor or reference alias. Challenge is generating a trigger/selection to identify the current targeted settler to force them into a Reference alias to kick the scene. As a brute force concept, when the player changes location to an owned settlement build area it triggers a regular (time/distance) FindClosestReferenceOfTypeFromRef() on WorkshopNPC and forces the result into the alias to enable dialogue. It works, but is hardly elegant and not something I would publish. Any better ideas ? Link to comment Share on other sites More sharing options...
markyrocks Posted October 5, 2018 Share Posted October 5, 2018 OnPlayerDialogueTarget() would be my guess. I've never used it it doesn't have parameters listed but I'd imagine akTarget could be used to pass the ref alias Link to comment Share on other sites More sharing options...
SKKmods Posted October 5, 2018 Author Share Posted October 5, 2018 Unfortunately that only fires when a ref enters a dialogue scene. How to isolate a ref to to force into an alias to then get into the scene to fire that event in the first place is the recursive problem. When a player enters a settlement I could force each of the 1, 10 ... 100 (charisma uncapped) settlers into individual Reference Aliases each with a Scene attached, but that's not only inelegant its also far too much duplication effort. Link to comment Share on other sites More sharing options...
markyrocks Posted October 5, 2018 Share Posted October 5, 2018 I feel you. I kinda faced a similar issue with my mod. I was just forced to find refs of specific type or keyword. Unless you just get all the settlers in the workshop, cycle through the array and just find one that is near player. It's not possible to force one alias to multiple refs ? Maybe use something that has to do with the players angle, like if the settler is near the player and the player is looking at the settler. Link to comment Share on other sites More sharing options...
Reneer Posted October 5, 2018 Share Posted October 5, 2018 Perhaps it is just me but I don't really see your current solution as being inelegant at all. On its face it sounds like a relatively simple solution to the problem. Is there something I'm missing as to why you don't like it? Link to comment Share on other sites More sharing options...
SKKmods Posted October 5, 2018 Author Share Posted October 5, 2018 Its time/speed/distance granularity. In a cramped space like Hangman with 20 settlers milling around the scan/update resolution will need to be down at 128/256 units (1 to 2 seconds walking) to [E] engage. That sort of refresh rate for a script based solution gives me the heebie-jeebies, imagine if 255 mods in a load order were doing that sort of amateur-hour stuff. Oh, holdon ... Link to comment Share on other sites More sharing options...
Reneer Posted October 5, 2018 Share Posted October 5, 2018 (edited) Oh, I think I see what you're talking about. Maybe. I might just need caffeine. Anyway, what about putting something like an OnCellLoad or OnCellAttach event into your RefCollectionAlias script and call ForceRefIfEmpty on your alias from there? Edited October 5, 2018 by Reneer Link to comment Share on other sites More sharing options...
SKKmods Posted October 5, 2018 Author Share Posted October 5, 2018 Good call, collection OnLoad() + ForceRefTo() and OnUnload() + Clear() is running perfect. Using ReferenceCollectionAliases for native script events are fantastic. The pain is just duplicating the scene/action across 20 to 100 (?) individual Reference Aliases to work with uncapped settler counts. Link to comment Share on other sites More sharing options...
Reneer Posted October 5, 2018 Share Posted October 5, 2018 (edited) I guess I just am unclear about what you are trying to accomplish. Is it for each settlement? I'm glad my suggestion helped out, though. Edited October 5, 2018 by Reneer Link to comment Share on other sites More sharing options...
SKKmods Posted October 5, 2018 Author Share Posted October 5, 2018 (edited) "I would like to add a 4 option dialogue scene to generic settlers (trade, heal, command, nothing)." That's for any and all settlers which in the base game 30 settlements with a boosted charisma cap of 30 per settlements so 900 actors in a reference collection. That can take up to 4 minutes to scan the workshop lists, populate the collection and switch all of 'em between protected and essential/bleedout. Only one of the 900 needs to be active with multiple dialogue options at any one time, the issue is picking and activating them. So I have tried options to activate all in the current workshop build area, all that have 3D loaded, the nearest to player ... & etc EDIT: finding them is zero problem. The fact that a multiple option dialogue scene will only work with a single specific ReferenceAlias is the limiting factor. Edited October 5, 2018 by SKK50 Link to comment Share on other sites More sharing options...
Recommended Posts