Jump to content

Run a scene on a RefCollection member ?


SKKmods

Recommended Posts

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

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

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

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

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 by Reneer
Link to comment
Share on other sites

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

"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 by SKK50
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...