• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

NPCMod and Addons

Each of the VaultDwellerzPack characters come in two varieties:

1. the "basic" ones, which can't be hired, and whose names start with "survivor"

2. the "advanced" ones, which can be hired, and whose names start with "npc"

Both versions of all characters spawn into biome spawn entity groups. The "npc" (hireable) versions are only spawned into NPC POIs. Or at least that's how it's set up in the pack - if you're using the Wasteland mod, then it might put them in different entity groups.

So the solution is to not spawn in the "survivor" ones, and instead spawn in the "npc" ones. That would be done by modifying the entitygroups.xml file (either by hand or with XPath if you write your own modlet).

As an aside, his SoldierPack is set up the same way, so you can use the same solution if you want to only see hireable soldiers.

But if that weren't true, here's how you would do it.

I think the only thing you have to do, is to make the entity classes extend the equivalent "Advanced" NPC Core template classes. For example, instead of extending "npcAK47Template", it should extend "npcAdvancedAK47Template". (This is in entityclasses.xml.)

They also need the "HireCurrency" and "HireCost" properties, but I think those are already in the non-advanced templates, so you probably don't have to add them. I have not checked all the "non-advanced" templates though, so maybe one or two fell through the cracks.
Thank you, I knew I was missing something obvious.  Yup, looking over the xmls again cause I'm using them with War of the Walkers. I have indeed put in the "survivor" ones to spawn in. Now I just gotta replace them with the "npc" ones. 

 
khzmusik said:
Just follow the link in my post, the code is there. (Or wait until I'm back on a computer and not a tablet so I can write it out.)
Hi there. Im online on the forums and ready to fix my issue that I didn't like. I opened your link. I know I'm not a code freak, but do I replace the current "entityclasses.xml" file of the game with yours? Or certain lines? Any help would be appreciated. 👌

(Or maybe some instructions? I prefer instructions if you can please.)

 
Last edited by a moderator:
Hi there. Im online on the forums and ready to fix my issue that I didn't like. I opened your link. I know I'm not a code freak, but do I replace the current "entityclasses.xml" file of the game with yours? Or certain lines? Any help would be appreciated. 👌

(Or maybe some instructions? I prefer instructions if you can please.)


Apologies, I didn't know how much you knew about XPath and modding.

The code that is in my file would be suitable for putting in your own modlet, if you were making one. You could just paste that code into your modlet's entityclasses.xml file and it should work.

But, if you're modifying the game's entityclasses.xml, then you shouldn't do that. Instead, what you should do is add the code to the existing entityclasses.xml file, and specifically in the entity class named "playerMale".

Here's a general idea of how that would look:

<entity_class name="playerMale">
<!-- ...Lots of <property> and <effect_group> tags omitted for brevity. Don't change those, add this code right before the next </entyty_class>, as shown. -->
<effect_group name="Damage All NPCs">
<triggered_effect trigger="onSelfFirstSpawn" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
<triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
</effect_group>
</entity_class>




(The stuff between "<!--" and "-->" are comments in XML, don't type those in.)

If you're curious, the code in my modlet is using XPath commands to modify the vanilla game XML. That only works for mods and modlets; the vanilla game's XML files aren't parsed for XPath commands.

Here's a good overview of XPath:




 
Apologies, I didn't know how much you knew about XPath and modding.

The code that is in my file would be suitable for putting in your own modlet, if you were making one. You could just paste that code into your modlet's entityclasses.xml file and it should work.

But, if you're modifying the game's entityclasses.xml, then you shouldn't do that. Instead, what you should do is add the code to the existing entityclasses.xml file, and specifically in the entity class named "playerMale".

Here's a general idea of how that would look:

<entity_class name="playerMale">
<!-- ...Lots of <property> and <effect_group> tags omitted for brevity. Don't change those, add this code right before the next </entyty_class>, as shown. -->
<effect_group name="Damage All NPCs">
<triggered_effect trigger="onSelfFirstSpawn" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
<triggered_effect trigger="onSelfEnteredGame" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
<triggered_effect trigger="onSelfRespawn" action="ModifyCVar" cvar="DamageRelationship" operation="set" value="1001" />
</effect_group>
</entity_class>




(The stuff between "<!--" and "-->" are comments in XML, don't type those in.)

If you're curious, the code in my modlet is using XPath commands to modify the vanilla game XML. That only works for mods and modlets; the vanilla game's XML files aren't parsed for XPath commands.

Here's a good overview of XPath:
Thanks, wo that was more info than I hoped. 🤪 Sorry, but I'm more of those minimal concrete step by step kind of learners. I wouldn't know where to start with the replacing/changing cause there's a 7DTD path in "x64--steam--steamapps--common--7DTD--mods" folder and another folder somewhere in the "app data" which is where the game is "saved". 

You don't have to type down anymore if you don't want to. I can probably just deal with my little issue.

However, If your interested in trying to help (don't feel like you have too), maybe just updating the "x-core" file of the npc mod and/or any other mod that might be  involved and reply back with a new mod version and then I could replace the current version I have?

If there has been any new updates with the mods, unfortunately I haven't known about it or installed it yet. So, whatever I typed above might be easier for me.

Sorry for all the info. Coding difficult for me. Lol

Anyway, waiting on your reply.

 
Last edited by a moderator:
Hello all, I have a question re: Is it possible? If ANYONE could give me a simple yes, no, or even we have no idea my curiosity would be sated and I could move on to other thoughts and quit feeling like a pest. Thanking everyone in advance.


 
Last edited by a moderator:
smithsguild said:
Hello all, I have a question re: Is it possible? If ANYONE could give me a simple yes, no, or even we have no idea my curiosity would be sated and I could move on to other thoughts and quit feeling like a pest. Thanking everyone in advance.



Sure, likely very doable.  An early example is the snowmen in WinterWeen, they lob snowballs that explode.  However, those are not hireable NPCs.  The NPCs are setup to support multiple Actions, where Action0 is melee and action1 is ranged weapons,  Action 2 or 3 could be used for throwing.  

 
There a wee bit of a issue with the alpha 21 release.

You start talking to the npc and you can't actually do anything. That's all you get no options no further prompts.test.jpg do anything

 
You seem to be missing the menu.  This can happen if your using a Mod that changes the vanilla UI.  Likely that UI mod will need a compatibility pack.  If you link your log, that would help if your not loading other mods.

Forgot to  add a post about the A21 version of the mod.   Basically if you used the A20 version, the only change is weapon swapping.  Add player weapons (the player version of the A20 NPC weapons) and the NPC can use them.  Many changes under the hood.  UI mods may break the hiring dialog, if they modify the vanilla UI.   

 
You seem to be missing the menu.  This can happen if your using a Mod that changes the vanilla UI.  Likely that UI mod will need a compatibility pack.  If you link your log, that would help if your not loading other mods.
Totally for got i was using AGF UI mod 😱 Which of coursed fixed it.

Switched over to the simple ui mod which doesn't conflict with it.

 
Last edited by a moderator:
I was able to keep most of agf ui by renaming it with a "0-"in front so it loads before score and npcmod, then they were working fine

 
Been beating my head against the wall for hours so, here I am, hoping someone might be able to point me in the right direction. Some friends & I have decided we want to set up a "Throwback" server, & we want to run DMT mods. I have done it before, but I can not seem to find a way to get a download for a A19.1 dedicated server. Does anyone have any suggestions? Thanks so much!

 
Last edited by a moderator:
Sure, likely very doable.  An early example is the snowmen in WinterWeen, they lob snowballs that explode.  However, those are not hireable NPCs.  The NPCs are setup to support multiple Actions, where Action0 is melee and action1 is ranged weapons,  Action 2 or 3 could be used for throwing.  


Thank you Xyth! My original concept was for a -RARE- NPC bandit cackling madly on a loop, wandering the streets of a Fire Mod enabled city engaging zombies via molotov. You hear the cackle better hunt him down before he wanders near a players home/workshop - bases usually get cobbled/concrete/steel but often my players will co-opt a POI like a Mansion for a place to rest and craft leaving them near original (hence flammable) decor.

 
I noticed some of the npc packs available for a20 are no longer listed as coming soon. Does that mean the creators decided not to update them for a21?

 
Back
Top