Jump to content

NPCMod and Addons


xyth

Recommended Posts

2 hours ago, arramus said:

entitygroups.xml for the Add On modpack to reduce/prevent spawning in the biomes for the entities you chose.

 

As for killing any NPC, that is a core feature and best answered by a primary developer.

I'

'm thinking of putting the wrong file, this time I put each prob has 0 on each entity that I don't want in each entitygroups.xml file (I don't know anything about computer language so sorry if I have any gaps)

for now I don't see any npc spawning I think the problem and fix

 

thank you for your help !

Link to comment
Share on other sites

4 hours ago, potatoman78 said:

I'

'm thinking of putting the wrong file, this time I put each prob has 0 on each entity that I don't want in each entitygroups.xml file (I don't know anything about computer language so sorry if I have any gaps)

for now I don't see any npc spawning I think the problem and fix

 

thank you for your help !

Correct. entitygroups.xml

 

- Using 0 as the probability is acceptable.
- Using a comment out feature <!-- xml code --> is also acceptable and is commonly used in default game xml files.

 

Some players like the rocket launcher or heavier weapon NPCs, and for some it can be a bit too much. It is fortunate we can customise the experience by ourselves. That is exactly what the developers of the 0-Score and 0-XNPCMod provide. A nice set of core mods to be used in the way that matches our own choices.

 

For example, an overhaul like The Wasteland Mod:

 

- Turns off most of the template NPC entities
- Changes block damage rockets to entity damage rockets
- Allows NPCs to be hurt by players. In fact they will attack players who hurt them

Link to comment
Share on other sites

Il y a 9 heures, arramus a dit :

Correct. entitygroups.xml

 

- Utiliser 0 comme probabilité est acceptable.
- L'utilisation d'une fonction de commentaire <!-- xml code --> est également acceptable et est couramment utilisée dans les fichiers xml de jeu par défaut.

 

Certains joueurs aiment le lance-roquettes ou les PNJ d'armes plus lourdes, et pour certains, cela peut être un peu trop. Nous avons de la chance de pouvoir personnaliser l'expérience par nous-mêmes. C'est exactement ce que les développeurs du 0-Score et du 0-XNPCMod fournissent. Un bel ensemble de mods de base à utiliser de la manière qui correspond à nos propres choix.

 

Par exemple, une révision comme The Wasteland Mod :

 

- Désactive la plupart des entités PNJ modèles
- Change les fusées de dommages de bloc en fusées de dommages d'entité
- Permet aux PNJ d'être blessés par les joueurs. En fait, ils attaqueront les joueurs qui leur font du mal

yes and I saw when in the file there are explanations what and really good! its allows people like me who know absolutely nothing about it to be able to modify computer code.
 

I hope that a competent person can tell me how to modify a file to be able to kill npc because there are some who spawn in the water and remain frozen in swimming mode in the water without dying

 

7 days to die and an incredible game I hope other modders will create other mods even more

Link to comment
Share on other sites

On 5/25/2023 at 7:06 AM, potatoman78 said:

I hope that a competent person can tell me how to modify a file to be able to kill npc because there are some who spawn in the water and remain frozen in swimming mode in the water without dying

 

In my "reputation and quests" modlet, I have it so players can damage any NPC, including neutral NPCs. (I always thought it was a mistake to make neutral NPCs immune from damage but the other team members didn't agree.)

 

The code to do it is here, and there are lengthy comments that explain how it works.

https://gitlab.com/karlgiesing/7d2d-a20-modlets/-/blob/main/1-khzmusik_Human_Factions_Reputation_Quests/Config/entityclasses.xml

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

1 hour ago, khzmusik said:

Hi, yeah I was hoping to figure how to do it too! Weirdly enough I get an npc bug where I dismiss him/her first then when I move to the spot where I dismissed it, it follows again. I don't know why. 

 

Also, can you post to me the coding to kill the friendly npcs in case I don't want on please?

Or was the code to do it in your last post?

 

1 hour ago, khzmusik said:

In my "reputation and quests" modlet, I have it so players can damage any NPC, including neutral NPCs. (I always thought it was a mistake to make neutral NPCs immune from damage but the other team members didn't agree.)

 

The code to do it is here, and there are lengthy comments that explain how it works.

https://gitlab.com/karlgiesing/7d2d-a20-modlets/-/blob/main/1-khzmusik_Human_Factions_Reputation_Quests/Config/entityclasses.xml

 

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

2 hours ago, Weazelsun said:

How would I go about making an NPC hirable? I'm trying to figure out how to add that to the Vault Dwellerz pack. 

 

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.

Link to comment
Share on other sites

3 hours ago, khzmusik said:

 

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. 

Link to comment
Share on other sites

  • 2 weeks later...
On 5/26/2023 at 1:11 PM, 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.)

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

3 hours ago, ghostsniper said:

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:

 

Link to comment
Share on other sites

1 hour ago, khzmusik said:

 

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.

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

  • 2 weeks later...
On 6/30/2023 at 11:43 AM, 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.

 

  Hide contents

 

 

 

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.  

Link to comment
Share on other sites

  • xyth changed the title to A21 NPCMod and Addons

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.   

Link to comment
Share on other sites

1 hour ago, xyth said:

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.

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

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!

Edited by MandyCMoore (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...