Question Custom NPC Enclaves?

Mystyk

Skilled Survivor
Staff member
Joined
Jan 9, 2018
Likes
1,240
Location
Australia
#1
I'd like to pick and choose who spawns in each enclave. Probably not too specific, like particular NPC's, I'd rather include and exclude certain traits. I'm tired of it constantly being two people I want and one I'd rather feed to a horde.
I've been editing enclaves.xml and just went in to test it but it's not working. Is there another file I need to edit as well to make it work? Or is it only enclaves.xml?

These are the sections I've been editing (in blue, if it shows).
Shouldn't have edited it on my phone. It's gone all funny.
I edited Actor Traits at the top.

Code:
Line 982:
<Action ActionFlags="Repeats, WaitForNoMission" ActionId="Note_Discovered" ActionType="Action.Passive" ExecuteTimeStandard="1s" OutputDelayTime="0.0" PauseWhenOffline="">
        <RTSActionIcon Name="" Id="" />
        <NameText Flags="" Notes="" Text="" />
        <Actors>
          <Character ActorFlags="" ActorName="" ActorTask="" ActorTraits="Trait.Meta.Hero" FunctionTags="" HideWarnings="" Optional="" TargetEnclave="" />
          <Character ActorFlags="" ActorName="" ActorTask="" ActorTraits="Trait.Meta.Hero" FunctionTags="" HideWarnings="" Optional="True" TargetEnclave="" />
          <Character ActorFlags="" ActorName="" ActorTask="" ActorTraits="Trait.Meta.Hero" FunctionTags="" HideWarnings="" Optional="True" TargetEnclave="" />
        </Actors>
        <Alts />
        <Effects />
        <Inputs>
          <Enclave_CheckBool EnclaveIndex="" InputFlags="" InputId="Discovered" Invert="" UseMissionEnclave="" />
          <Enclave_CheckBool EnclaveIndex="" InputFlags="" InputId="Note_Discovered" Invert="True" UseMissionEnclave="" />
        </Inputs>
        <Outputs>
          <Enclave_StatSetBool DurationCancellable="" EnclaveIndex="" OutputAmount="true" OutputDuration="" OutputStat="Note_Discovered" PauseWhenOffline="" />
          <ExecuteAction ActionId="Note_Discovered_AddResource" />
          <EventLog DisplayType="EventBanner" EventFlags="General" Icon="Survivors" IconId="60">
            <NameText Flags="" Notes="" Text="DISCOVERED: Mistrustful Survivors" />
            <TutorialText Flags="" Notes="" Text="" />
            <DescArgs>
              <EventDescArg Param="0" Type="PlayerName" />
            </DescArgs>
            <Descriptions>
              <EventLogDesc>
                <DescriptionText Flags="" Notes="" Text="I encountered a new group of survivors. They're pretty guarded. - %1$s" />
                <SummaryText Flags="" Notes="" Text="New neighbors." />
              </EventLogDesc>
            </Descriptions>
            <NpcEffects>
              <EventNpcEffect ActorIndex="0" Value="0">
                <DescriptionText Flags="" Notes="" Text="New neighbor." />
              </EventNpcEffect>
              <EventNpcEffect ActorIndex="1" Value="0">
                <DescriptionText Flags="" Notes="" Text="New neighbor." />
              </EventNpcEffect>
              <EventNpcEffect ActorIndex="2" Value="0">
                <DescriptionText Flags="" Notes="" Text="New neighbor." />
              </EventNpcEffect>
            </NpcEffects>
          </EventLog>
        </Outputs>
      </Action>

I searched by "I encountered a new group of survivors" and found 9 matches. Each section had the Actor blocks at the top. Naturally I thought if I add specifics in there (each different, depending on the type of enclave) I could control what types of people spawn. I started a new game to test and, the very first enclave nearby consisted of 2 non-heroes and 1 hero. Not what I wanted. Unless it only works for later spawns and not ones that are already there when I load a new game? :unsure:
 
Last edited:

Mystyk

Skilled Survivor
Staff member
Joined
Jan 9, 2018
Likes
1,240
Location
Australia
#2
For the moment I found a lazy workaround. I just commented out the NPCs I don't want in characters.xml Works just fine that way 😃
 

QMJS

Alamo Rookie
Joined
Jan 9, 2018
Likes
1,966
Location
Eastern USA
#3
If you were starting Breakdown at level 1, you could change them in <Enclave EnclaveId="Sandbox_StarterEnclave" Flags="">

<Character ActorFlags="Spawn" ActorName="101 HERO Sam Hoffman" ActorTask="" ActorTraits="" FunctionTags="" HideWarnings="" Optional="" TargetEnclave="" />

Doing it that way, you could prepare 5 groups, and three would spawn. The drawback here is that whichever ones you don't join disappear. You could also make them bigger by adding more Characters, but then you need to add the <Actor_JoinEnclave ActorIndex="1" EnclaveIndex="" /> line for each extra one. Or by changing the alt odds in the Alts section you could just set up one with specific people at the site you prefer.

After Breakdown 1, where they are just random locations anywhere, I think those are in <Enclave EnclaveId="Sandbox_Generic" Flags="">.
I think the <Enclave EnclaveId="Generic" Flags=""> you have in the example above is only used in the Story mode. You can check that though by looking at the enclave names.
Generic has the
<NameText Flags="" Notes="" Text="Strangers" />
<NameText Flags="" Notes="" Text="Survivors" />
<NameText Flags="" Notes="" Text="Neighbors" />
and the Sandbox_generic has
<NameText Flags="" Notes="" Text="Squatters" />
<NameText Flags="" Notes="" Text="Newcomers" />
<NameText Flags="" Notes="" Text="Outsiders" />
<NameText Flags="" Notes="" Text="Colony" />
<NameText Flags="" Notes="" Text="Not Zombies" />
 

Mystyk

Skilled Survivor
Staff member
Joined
Jan 9, 2018
Likes
1,240
Location
Australia
#4
Forgot to come back to this, let alone do anything more with it.
I'm quite liking my game only ever spawning Skilled people :D It's not totally boring, though, as I've created a new Trait for a select group of people and am working on some extra things for them.
I probably won't have time to do much modding, (proper research-big-things modding) as we may be moving this month :(
 
Top