Jump to content

Get All Settlers in Array


Recommended Posts

After many hours of testing and cross referencing the output of;

 

(a) WorkshopPrentScript.GetWorkshopActors

(b) GetWorkshopResourceObjects(pWorkshopRatingPopulation (which is actually what WorkshopPrentScript.GetWorkshopActors calls)

© GetActorsLinkedToMe(pWorkshopItemKeyword)

 

On loaded and unloaded workshops shows discrepancies on the core human Workshop assigned actors that have WorkshopRatingPopulation > 0. This is exaclty why there are common issues with the pipboy workshop stats as described in the researched article: Workshop Resource Test (why resources are reported wrong)

I know *you* have an issue with my work, but for everyone else: CHECK YOUR RESULTS FOR UNLOADED ACTORS.

Link to comment
Share on other sites

After the OP explained its purpose, that doesn't do the job anyway, because you can get new settlers after initialization, so that'd be safer to apply such spell the settlers at some event that happens when the population is updated, but I can't find any custom events that come from CreateActorPUBLIC or any of the function called by it.

 

So that I'd suggest using the OnWorkshopMode, that would apply the spell to the settlers of the settlement in which you open the workshop menu. That'd run every time you open the menu, which seems a bit "overkill", but would ensure that all your settlers have such spell.

Probably there are more efficient ways of doing that though.

Link to comment
Share on other sites

I know *you* have an issue with my work

 

 

Why are you so aggressive towards me, I think I'm being polite, just sharing my findings, at any moment I'm trying to negate yours. You are being a jerk.

Link to comment
Share on other sites

F4ll0uta, to answer your question about whether or not there being a better way: presumably the spell that has multiple magic effects with different conditions on each effect should be fine. BUT to give them the spell I'd make a quest with a RefColl alias conditioned to detect nearby settlers, and apply that spell to them.

I'd say there's no reason to pre-add your armor functionality to the NPCs at game start because honestly, they won't use it when they're unloaded anyways, and you'll only see it when you're nearby.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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