Jump to content

A21 NPCMod and Addons


xyth

Recommended Posts

Hello, I seem to be having the same issue as Khlorbolt.  Whenever I speak to a hireable npc the UI for dialogue options is not in frame. When I edit the UI margin in setting the dialogue box seems to enter the frame but its completely chopped in half at the bottom of the screen. I have no other UI mod installed. Is there a fix for this or nay? I tried changing my resolution and other UI options but margin is the only one that seems to move the dialogue box up

Link to comment
Share on other sites

 

First, this NPC Mod is incredible, thank you to all the creators. You are amazing.  This has made the game more fun and interesting for so many, myself included.

I’m trying to do my little part with a nearly completed storyline chain of quests (https://community.7daystodie.com/topic/31075-new-storyline-quest-mod-looking-for-feedback/https://community.7daystodie.com/topic/31075-new-storyline-quest-mod-looking-for-feedback/) , and the NPC Mod is perfect to incorporate.  I did have a few questions that are probably simple and easy to those who know, but remain difficult for those like me who are still trying to figure the code out:

 

1.        How do I spawn a friendly NPC that can be hired near the player?  As perhaps, say a quest Reward?  Like, you kill 25 zombies, and afterwards two hiding survivors emerge from the woods to join you and are suddenly standing a few feet away, ready to be hired. 

 

Something like <reward type="Item" id="SurvivorSoldier1TRifle" value="2"/>  ?

Or at the beginning of the next quest something like

<action type="SpawnNPC" id="Bob,Brian" value="2" phase="1"/>?

 

2.       Can you spawn a friendly, hireable NPC into a nearby POI?  Kind of similar coding to the various White River trader “Fetch” quests except instead you are to rescue the NPC (and not a satchel of goods) in the nearby POI?  One could easily see the Final Version of the game having White River Traders dole out “rescue” missions of stranded civilians in POI’s, but I’d like to try and do it myself now.  Has someone already done this?

3.        Is there a way to check that the player has hired an NPC, like an “objective type” that would also fit into quests.xml?  That might be impossible but worth an ask and relates to question #2.

4.       Is there a max number of NPC’s under player control you recommend?  Like under 10 or something?

5.       Is there a way for the game to check how many NPC’s are in an area?  As an “objective type” again?  Let’s say one of the storyline quests is “Find and bring back 10 NPC’s to your base and put them on Stay.”  Once you have rescued 10 NPC’s and put them in your base, you have completed the mission etc.  Or have each NPC disappear as they cross into your base to reduce lag (if having that many NPC’s is a problem). 

6.       Lastly, is there a way (didn't see any in Localization) to change a line of the NPC’s dialogue.  Like, obviously there is a need for the dialogue options to be “Guard” and “Stay” etc, but one that is just “Hi, I’m a survivor like you.  I’m desperate, please take me back to your base.” 

 

Please if you can help in anyway or steer me in the right direction, thank you!

Link to comment
Share on other sites

15 hours ago, work22 said:

 

First, this NPC Mod is incredible, thank you to all the creators. You are amazing.  This has made the game more fun and interesting for so many, myself included.

I’m trying to do my little part with a nearly completed storyline chain of quests (https://community.7daystodie.com/topic/31075-new-storyline-quest-mod-looking-for-feedback/https://community.7daystodie.com/topic/31075-new-storyline-quest-mod-looking-for-feedback/) , and the NPC Mod is perfect to incorporate.  I did have a few questions that are probably simple and easy to those who know, but remain difficult for those like me who are still trying to figure the code out:

 

1.        How do I spawn a friendly NPC that can be hired near the player?  As perhaps, say a quest Reward?  Like, you kill 25 zombies, and afterwards two hiding survivors emerge from the woods to join you and are suddenly standing a few feet away, ready to be hired. 

 

Something like <reward type="Item" id="SurvivorSoldier1TRifle" value="2"/>  ?

Or at the beginning of the next quest something like

<action type="SpawnNPC" id="Bob,Brian" value="2" phase="1"/>?

 

2.       Can you spawn a friendly, hireable NPC into a nearby POI?  Kind of similar coding to the various White River trader “Fetch” quests except instead you are to rescue the NPC (and not a satchel of goods) in the nearby POI?  One could easily see the Final Version of the game having White River Traders dole out “rescue” missions of stranded civilians in POI’s, but I’d like to try and do it myself now.  Has someone already done this?

3.        Is there a way to check that the player has hired an NPC, like an “objective type” that would also fit into quests.xml?  That might be impossible but worth an ask and relates to question #2.

4.       Is there a max number of NPC’s under player control you recommend?  Like under 10 or something?

5.       Is there a way for the game to check how many NPC’s are in an area?  As an “objective type” again?  Let’s say one of the storyline quests is “Find and bring back 10 NPC’s to your base and put them on Stay.”  Once you have rescued 10 NPC’s and put them in your base, you have completed the mission etc.  Or have each NPC disappear as they cross into your base to reduce lag (if having that many NPC’s is a problem). 

6.       Lastly, is there a way (didn't see any in Localization) to change a line of the NPC’s dialogue.  Like, obviously there is a need for the dialogue options to be “Guard” and “Stay” etc, but one that is just “Hi, I’m a survivor like you.  I’m desperate, please take me back to your base.” 

 

Please if you can help in anyway or steer me in the right direction, thank you!

1. can be done, good mod to look at is rebirth by furious ramsay

2. yes, the npcs can be added to sleeper volumes

3. yes, theres a way

4. rebirth mod limits it to 4 depending on your charismatic nature perk

5. you can "pick up" npcs and they are then items

6. yes, you would have to edit their npc and dialog xmls

if it sounds like a lot of xml work, well, thats because it would be, if you want to try and do some of these things but get stumped you can always ask for some assistance on guppys unofficial modding discord

 

Edited by drkstardragon (see edit history)
Link to comment
Share on other sites

On 1/29/2023 at 4:15 PM, work22 said:

 

First, this NPC Mod is incredible, thank you to all the creators. You are amazing.  This has made the game more fun and interesting for so many, myself included.

I’m trying to do my little part with a nearly completed storyline chain of quests (https://community.7daystodie.com/topic/31075-new-storyline-quest-mod-looking-for-feedback/https://community.7daystodie.com/topic/31075-new-storyline-quest-mod-looking-for-feedback/) , and the NPC Mod is perfect to incorporate.  I did have a few questions that are probably simple and easy to those who know, but remain difficult for those like me who are still trying to figure the code out:

 

1.        How do I spawn a friendly NPC that can be hired near the player?  As perhaps, say a quest Reward?  Like, you kill 25 zombies, and afterwards two hiding survivors emerge from the woods to join you and are suddenly standing a few feet away, ready to be hired. 

 

Something like <reward type="Item" id="SurvivorSoldier1TRifle" value="2"/>  ?

Or at the beginning of the next quest something like

<action type="SpawnNPC" id="Bob,Brian" value="2" phase="1"/>?

 

2.       Can you spawn a friendly, hireable NPC into a nearby POI?  Kind of similar coding to the various White River trader “Fetch” quests except instead you are to rescue the NPC (and not a satchel of goods) in the nearby POI?  One could easily see the Final Version of the game having White River Traders dole out “rescue” missions of stranded civilians in POI’s, but I’d like to try and do it myself now.  Has someone already done this?

3.        Is there a way to check that the player has hired an NPC, like an “objective type” that would also fit into quests.xml?  That might be impossible but worth an ask and relates to question #2.

4.       Is there a max number of NPC’s under player control you recommend?  Like under 10 or something?

5.       Is there a way for the game to check how many NPC’s are in an area?  As an “objective type” again?  Let’s say one of the storyline quests is “Find and bring back 10 NPC’s to your base and put them on Stay.”  Once you have rescued 10 NPC’s and put them in your base, you have completed the mission etc.  Or have each NPC disappear as they cross into your base to reduce lag (if having that many NPC’s is a problem). 

6.       Lastly, is there a way (didn't see any in Localization) to change a line of the NPC’s dialogue.  Like, obviously there is a need for the dialogue options to be “Guard” and “Stay” etc, but one that is just “Hi, I’m a survivor like you.  I’m desperate, please take me back to your base.” 

 

Please if you can help in anyway or steer me in the right direction, thank you!

 

1. There is a quest reward in SCore called "GiveNPCSDX" which should do the trick:
 

<reward type="GiveNPCSDX, SCore" id="entityGroup" /> <!-- Spawns in an entity from the group to be your NPC -->
<reward type="GiveNPCSDX, SCore" /> <!-- Hires the current NPC -->

 

2. I don't know if this is possible. I created a very similar quest ("defend Whiteriver") in my "Human faction reputation and quests" modlet, but it is not enabled, because it requires POIs that spawn in Whiteriver NPCs (and have the "whiteriver" tag). That is here:
https://gitlab.com/karlgiesing/7d2d-a20-modlets/-/blob/main/1-khzmusik_Human_Factions_Reputation_Quests/Config/quests.xml#L2338

 

3. I'm not sure about this one. There is a "HiredSDX" dialog requirement in SCore, but it shows/hides dialog options according to whether the NPC you're talking with is hired by you or not, so I don't think it would work for traders. But here it is if you want to experiment:

<!-- True if the NPC is currently hired by the player -->
<requirement type="HiredSDX, SCore" requirementtype="Hide" /> 

 

When you hire an NPC, you also get a cvar that represents that NPC, but you have to know the NPC's entity ID in order to check it. I don't think there's any way to get an NPC's entity ID via XML, so it's probably not useful in this case.

 

4. Incredibly subjective. :) I personally go for less than 5, but I know players that want to wage wars and have 20 hired NPCs. Basically, whatever your computer can handle is the upper limit.

 

5. I suppose you could find some way to keep a cvar of hired NPCs (I haven't researched how but it should be possible). Having them disappear as they enter your base is not currently possible.

 

6. Look in dialogs.xml in the 0-XNPCCore modlet. You can change the phrases there. But I do agree that they should be translated.

Link to comment
Share on other sites

29 minutes ago, work22 said:

thanks too khzmusik, you've given me some serious homework for the week :).   

 

Welcome to the world of modding.  Be careful as it tends to be addictive.  I started out just wanting to make a small modlet to make some minor changes.  I am now adding custom icons, new items to the game, and overhauling several of the mechanics (at least through xml only right now) to tailor it more to my liking

Link to comment
Share on other sites

On 1/22/2023 at 9:36 PM, smithsguild said:

Hello all, I once tripped over a thread showcasing three "Wandering Merchant" NPC's that were made using NPCMod/SCore.

 

 

Was this idea abandoned, or is there any news on its progress for A20 with this ideas development?

 

I would love to have access to a functional wandering merchant mod.

Shamelessly bumping this in the hopes of getting @xyth 's response seeing as it was his project.

Link to comment
Share on other sites

Is the SmarterEntities property in SCore what allows (both hired & unhired) NPC's to open unlocked Base doors? I was playing solo before I had the tokens to hire anyone and was rather shocked/spooked when a random Joe opened my base door and took an unsanctioned tour. Is this a function Raiders, Whisperers, & Psychos also share?!?

 

I'd also like to ask if SCore supports 'leadership', IE where you make a 'Boss' and it's minions are tethered to follow the Boss around? Small squads of Soldiers, & groups of Marauders lead by a (slightly) tougher leader would be amazing if possible.

Link to comment
Share on other sites

Yes @BFT2020, its definitely a fun challenge to mod this game.   Thanks to the community response, like you I've already expanded the mod beyond my original intentions.  

 

My last big modding project was years ago with Arma 1 (https://www.ofpec.com/missions_depot/index.php?action=details&id=133), a great tactical FPS but not as wide open  world as 7 Days to Die.  However the Mission Editor for the Arma series is arguably easier to learn.  Seems like with 7 Days you need to know a lot more than simple XML (Notepad editing was enough to do tons with Arma).  Like you may need to know some Unity to get more advanced features completed?  For example, I see that the source of audio clips for khzmusik's 1-SoldierPack comes from these types of files pasted below.  Anyway, its obvious a ton of work and TLC went into this NPC Mod, thanks again everyone!!!

 

image.png.afe811daf96e89b93ebea014d388acd9.png

 

 

Link to comment
Share on other sites

6 hours ago, smithsguild said:

Is the SmarterEntities property in SCore what allows (both hired & unhired) NPC's to open unlocked Base doors? I was playing solo before I had the tokens to hire anyone and was rather shocked/spooked when a random Joe opened my base door and took an unsanctioned tour. Is this a function Raiders, Whisperers, & Psychos also share?!?

 

I'd also like to ask if SCore supports 'leadership', IE where you make a 'Boss' and it's minions are tethered to follow the Boss around? Small squads of Soldiers, & groups of Marauders lead by a (slightly) tougher leader would be amazing if possible.

 

I'm pretty sure the "SmarterEntities" property is an attempt to have NPCs avoid traps. I don't think SphereII ever got that to work.

 

I'm fairly certain the thing that allows them to open doors is the "HumanTags" property, under "AdvancedNPCFeatures". If an entity has any one of the tags listed there, then it's considered "human" and (I believe) can open doors. But being "human" allows a lot of other behavior too, so I don't think that should be messed with.

 

It should apply to any NPCs, as far as I know, since all of them have the "npc" tag (at least) and that's always been a "human" tag.

 

If you don't like it, then you can always lock your doors. :) 

 

The notion of "leadership" has been talked about for quite a while (since at least A18, probably earlier). But there are a lot of technical challenges, for example with spawning "squads" from entity groups, and I don't think anyone got it even close to working.

Link to comment
Share on other sites

We did wandering traders and they worked great in a17 but there was something causing them not to work properly so it hasnt been updated. Yes, keep your doors locked with npc mod installed and watch your back at the traders lol. Leadership was attempted in a17 didnt really work properly, although you could designate one the leader and the others would follow them around, and defend them if they were attacked.

Link to comment
Share on other sites

Cool, Thank you both! For the prompt informative responses AND your wonderful NPCMod contributions. They have certainly raised the bar for my wife's and my own gaming experience with 7d2d.

 

On 2/1/2023 at 9:35 PM, khzmusik said:

If you don't like it, then you can always lock your doors. :)

 

Actually I do lock them after the scare, & it has increased my immersion immeasurably!

 

Would it be a workable 'thing' to give a Zed that same human trait and make a "Hawking" (ZL2-dbl tap reference AKA smart zombie) that strolls up opens your unlocked door and begins rooting for your liver?

Edited by smithsguild
(incomplete thought , avoid multiposting) (see edit history)
Link to comment
Share on other sites

8 hours ago, geengaween said:

Are there any progression overhaul mods that are compatible with NPCmod? Something similar to Undead Legacy? I want the best of both worlds, (extra enemies + extra items/weapons + better progression) but all these mods seem to be incompatible with each other

Im playing "the wasteland" overhaul with the npc mod and npc modpacks (listed on the npc page) and its working so far. I DID have to go into all the npc modpacks and drop the spawn rates of everything by about 1/10 of what they were as i had way too many survivors running around and killing all the zeds, and fewer zed spawns it seemed. Now i have more wandering zeds. Oh, i also added a 4x zed spawning mod, so that might be why its more balanced.

 

im not sure if that's what you mean by "progression", but the wastelands mod has extra enemies, and guns, and items/vehicles in it. Im not sure about workstations and such yet.

 

i played the ravenhearst mod, which i think might be more of what youre going for , progression wise, and i added the enNull zeds and it ran fine. I cant remember if i added the noc pack as it was awhile ago, but i usually add it in all games and try to get it to work.

 

also: the Sorcery mod seems to work (or have compatibility packs/tweaks) on almost everything i have tried it on, and it has more zeds/enemies/pois and more and is like a "big add on that feels like an overhaul". 

Edited by doughphunghus (see edit history)
Link to comment
Share on other sites

10 hours ago, geengaween said:

Are there any progression overhaul mods that are compatible with NPCmod? Something similar to Undead Legacy? I want the best of both worlds, (extra enemies + extra items/weapons + better progression) but all these mods seem to be incompatible with each other

 

I don't know what you mean by "progression overhaul mod." If what you want is to adjust NPC spawning according to difficulty, then you can use my "Progression" series of modlets:

 

https://community.7daystodie.com/topic/27333-a20-khzmusiks-modlets/

 

I have one for each of the NPC packs listed on the front page here, since I can't know which packs users install.

 

What they do is spawn more "difficult" NPCs (higher health, better weapons) in "harder" biome spawns. Biome spawning isn't gamestaged, so I chose difficulty according to biome (forest < desert < snow < wasteland), day vs. night, and cities vs. everywhere else. Also, in general, fewer NPCs spawn than they would without my modlets installed.

 

Those packs also (re)introduce difficulty progression for the entity groups used by NPC sleeper volumes in POIs. But there aren't very many of those POIs (yet), so that probably won't affect you.

Link to comment
Share on other sites

Bumped for lack of an answer.

 

On 1/22/2023 at 10:09 PM, smithsguild said:

I have another question, has anyone experimented with making a 'grenadier' style NPC?

 

By Grenadier I mean a NPC character who uses a Thrown weapon? (IE Molotov, Pipe Bomb, Grenade, etc...) or is this an ability NOT available to NPCMod NPC's?

Link to comment
Share on other sites

17 hours ago, doughphunghus said:

Im playing "the wasteland" overhaul with the npc mod and npc modpacks (listed on the npc page) and its working so far. I DID have to go into all the npc modpacks and drop the spawn rates of everything by about 1/10 of what they were as i had way too many survivors running around and killing all the zeds, and fewer zed spawns it seemed. Now i have more wandering zeds. Oh, i also added a 4x zed spawning mod, so that might be why its more balanced.

 

im not sure if that's what you mean by "progression", but the wastelands mod has extra enemies, and guns, and items/vehicles in it. Im not sure about workstations and such yet.

 

i played the ravenhearst mod, which i think might be more of what youre going for , progression wise, and i added the enNull zeds and it ran fine. I cant remember if i added the noc pack as it was awhile ago, but i usually add it in all games and try to get it to work.

 

also: the Sorcery mod seems to work (or have compatibility packs/tweaks) on almost everything i have tried it on, and it has more zeds/enemies/pois and more and is like a "big add on that feels like an overhaul". 

 

@doughphunghus

 

Hi, If you are recording and posting, kindly share the link. 

Thanks.

Link to comment
Share on other sites

Guys, just a random thought. Please dont mind, saying sorry in advance.

 

In line with the Zombie screamers, we can also have one for whisperers, rogues and psychos, screaming or blowing a horn of their own like there used to be in earlier days. Can we  have them ? It will be a lot of fun. 

Link to comment
Share on other sites

On 2/9/2023 at 8:26 AM, geengaween said:

Are there any progression overhaul mods that are compatible with NPCmod? Something similar to Undead Legacy? I want the best of both worlds, (extra enemies + extra items/weapons + better progression) but all these mods seem to be incompatible with each other

Maybe try out Rebirth.

Custom events and progressions, together with NPCs (bandits mellee and ranged, survivors,animal companions, custom traders).

Take a look

 

If you are interested grab the latest version at

https://discord.gg/cXHsmnFf 

from #rebirth-changelog

 

Edited by Canute (see edit history)
Link to comment
Share on other sites

I can recommend Rebirth as well, it has worked well with NPC Mod for me.  (Its also given me a lot of modding insight under the hood)

 

On a side note, khzmusik had mentioned a way to summon an NPC for a quest reward, as shown further below.  But if anyone's interested, there's another way to do it that kind of surprised me but works well, by using "SpawnEnemy."   The good news is these civilians and soldiers spawn, but not as actual enemies to the player.  They ARE hostile to zombies, and I'm guessing raider/ bandits as well:

 

 

Here's an example of spawning 5 NPC civilians into the middle of a quest:

 

        <action type="SpawnEnemy" id="npcTestFemaleKhzAxe" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcFemaleScrubsKhzAShotgun" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcMaleCowboyKhzDPistol" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcMaleYoung1KhzMachete" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcMaleJKhzClub" value="1" phase="3"/>

 

 

And how to summon a non-recruitable survivor soldier (that is friendly to you, but hostile to Zombies as far as i can tell).  This could be a fun way to setup a battle between the army and zombies nearby that the player can join etc.

 

<action type="SpawnEnemy" id="survivorSoldier1TRifle" value="1" phase="3"/>

 

and the way to quest reward one of the NPC's per khzmusik's helpful comments earlier in the thread:

 

image.thumb.png.12d13a71ae0d2e49f23db024bef4b094.png

 

And lastly, a sample of a "Rescue some civilian survivors nearby" type quest:

 

<quest id="quest_Rescue">
 
        <property name="name_key" value="quest_Rescue"/>
        <property name="subtitle_key" value="quest_Rescue_subtitle"/>
        <property name="description_key" value="quest_Rescue_offer"/>
        <property name="icon" value="ui_game_symbol_zombie"/>
        <property name="repeatable" value="false"/>
        <property name="category_key" value="quest"/>
        <property name="offer_key" value="quest_Rescue_offer"/>
        <property name="difficulty" value="medium"/>
       
 
        <objective type="RandomGoto" value="100-200" phase="1">
            <property name="completion_distance" value="50"/>
            <property name="nav_object" value="quest" />
        </objective>
 
        <objective type="RallyPoint">
            <property name="start_mode" value="Create"/>
            <property name="phase" value="2"/>
            <property name="nav_object" value="rally" />
        </objective>
 
        <action type="SpawnEnemy" id="zombieFatHawaiian" value="15" phase="3"/>
        <objective type="ZombieKill" id="zombieFatHawaiian" value="15" phase="3"/>
 
        <action type="SpawnEnemy" id="npcTestFemaleKhzAxe" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcFemaleScrubsKhzAShotgun" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcMaleCowboyKhzDPistol" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcMaleYoung1KhzMachete" value="1" phase="3"/>
        <action type="SpawnEnemy" id="npcMaleJKhzClub" value="1" phase="3"/>
 
        <action type="ShowTip" value="You rescued the civilian survivors!" phase="3"/>
 
        <property name="chainquest" value="false"/>
 
        <reward type="Exp" value="500"/>
       
    </quest>

 

 

 

Edited by work22 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...