Unfortunately, I can't seem to get this to work. I'm going to give details here, but let me know if this should be done over PM instead.
I am testing this by modifying a renamed "survivor" POI, using the Prefab Editor, then hitting "playtest" in the editor menu.
The only time the NPCs spawn in moving around, is when the "xuiSleeperVolumeTrigger" value is set to "Attack" in the sleeper volume. But this leads to undesirable behavior - if there are no zombies around, the NPCs wake by attacking the player, and once awoken, often attack other NPCs.
I've tried using both other "xuiSleeperVolumeTrigger" values ("Passive" and "Active") but it does not seem to make a difference.
They do animate, but all they do is look around; I assume this is their idle animation. And that's only for NPCs like Hunter that have idle animations - for instance, it seems the Nurse and Farmer do not.
Also - I was mistaken before; the NPCs don't wake up even after you interact with them (unless they're attacking you in "Attack" mode). They won't "wake up" and start moving around
until they are attacked - even after being hired.
For instance, if you hire one and tell it to follow you, it will just stand there until you're far enough away for it to "teleport" to your location - and it won't even "wake" after being teleported. I only got them to start wandering by spawning in a zombie Boe (using F6) next to one of them; after the NPC was attacked and fought back, it behaved as normal.
I did notice that the Mod Launcher hasn't picked up the SphereII Core changes yet; in the UI it says it was last modified on December 9th. To make sure I have the latest updated version, I downloaded the .zip file directly from GitHub, then uncompressed the "0-SphereIICore" folder directly into the "Mods" folder. I double-checked that the changes from the commit, above, were in the "EntityAliveSDX.cs" file.
I launched the game using the Mod Launcher at that point, and it all seemed to work as expected, there were no compilation errors or anything like that. Though maybe the Mod Launcher compiling from a different folder than "Mods" or something? Don't know.
This is a sample of the XPath I used to put in the "isAlwaysAwake" flag:
Code:
<!-- entityclasses.xml -->
<configs>
<append xpath="/entity_classes/entity_class[starts-with(@name, 'NPC')]">
<!-- Also tried: <property name="SleeperInstantAwake" value="true" /> -->
<property name="isAlwaysAwake" value="true" />
</append>
</configs>
Here's a sample of how I modified the XML so sleeper volumes can spawn NPCs:
Code:
<!-- gamestages.xml -->
<configs>
<insertAfter xpath="/gamestages/group[last()]">
<group name="S_-Group_NPC_Generic" emptyChance="0" decoyChance="0" decoy1hpChance="0">
<spawner name="NPCGenericHorde" count="5,6" />
</group>
</insertAfter>
<insertAfter xpath="/gamestages/spawner[last()]">
<spawner name="NPCGenericHorde">
<gamestage stage="1">
<spawn group="NPCGenericGroup" num="1" maxAlive="1" duration="1" />
</gamestage>
</spawner>
</insertAfter>
</configs>
<!-- entitygroups.xml -->
<configs>
<append xpath="/entitygroups">
<entitygroup name="NPCGenericGroup">
<entity name="NPCBaker" />
<entity name="NPCNurse" />
<entity name="NPCFarmer" />
<entity name="NPCHarleyQuinn" />
<entity name="NPCAmmo" />
<entity name="Hunter" />
<entity name="Pest" />
<entity name="Ghost" />
</entitygroup>
</append>
</configs>
I double-check the XPath by doing a config dump while play testing the POI, and the changes were there and in the expected places.
Can you see anything that I'm doing wrong?