Jump to content

NPCMod and Addons


xyth

Recommended Posts

9 hours ago, Ryan said:


Sorry for the incredible amounts of questions! one of the final few!
I've changed it so that raiders are friendly and soldiers are hostile yet... I can't remove the pront to 'talk' from the soldiers. And i can't add the prompt to add 'talking' to bandits.
I've figured out how to lower the amount of spawns via the groups file. Changing .1 to .03 making them per town pretty much 'less'.

 

There are different templates for NPC Core characters. The ones that are usually used are "basic" and "advanced." "Basic" characters can't be hired, and thus have less complicated AI. "Advanced" characters can be hired.

 

To switch from one to the other, you can choose what template the NPC extends. This is done in the pack's entityclasses.xml file. For example, if you want to make "npcSoldierGBDAxe" not hirable, change the value of the "extends" attribute from "npcAdvancedAxeTemplate" to "npcAxeTemplate".

 

There are other ways, but that's probably the easiest.

 

Also, if you're changing the spawn numbers anyway, you might as well make them a bit more balanced. For example, if you're in the forest biome, you might have a .03 probability of running across a guy with an axe, but a .01 chance of running across one with a tactical rifle; and if you're in the wasteland, it would be the other way around.

 

EDIT: This double posted for some reason. No idea why. Sorry about that.

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

25 minutes ago, Kogg said:

not sure how to search the topic for this, but how does one change the spawn chance of npc so that are very rare to non existent?

 

 

If you go to the entitygroups.xml file for each NPC pack, you will see the XML that adds that pack's entities to entity groups. The numbers represent probabilities. Lower those numbers and NPCs have a lower probability to spawn.

Link to comment
Share on other sites

13 minutes ago, khzmusik said:

 

If you go to the entitygroups.xml file for each NPC pack, you will see the XML that adds that pack's entities to entity groups. The numbers represent probabilities. Lower those numbers and NPCs have a lower probability to spawn.

Looking in that file there is like 5,800 lines there. Do I have to individually change all of them?

Link to comment
Share on other sites

I don't know exactly which Add On Packs you installed @Kogg but the Darkstardragon ones were uploaded again recently, as their spawning rates were using an old testing file by mistake. The update calms things down a lot but can be further decreased if needed. The file with over 5800 lines is for 0-XNPCCore. This isn't the one you need to be looking at. The ones to check have a 1- in front of them such as 1-NPCXSpiderPack and 1-DarksRaiderz.

Link to comment
Share on other sites

12 hours ago, khzmusik said:

 

There are different templates for NPC Core characters. The ones that are usually used are "basic" and "advanced." "Basic" characters can't be hired, and thus have less complicated AI. "Advanced" characters can be hired.

 

To switch from one to the other, you can choose what template the NPC extends. This is done in the pack's entityclasses.xml file. For example, if you want to make "npcSoldierGBDAxe" not hirable, change the value of the "extends" attribute from "npcAdvancedAxeTemplate" to "npcAxeTemplate".

 

There are other ways, but that's probably the easiest.

 

Also, if you're changing the spawn numbers anyway, you might as well make them a bit more balanced. For example, if you're in the forest biome, you might have a .03 probability of running across a guy with an axe, but a .01 chance of running across one with a tactical rifle; and if you're in the wasteland, it would be the other way around.

 

EDIT: This double posted for some reason. No idea why. Sorry about that.


Once again, sorry for writing so much!
I kind of had the right idea in that case by moving the code from the bandit over to the soldiers like: <property name="AIPackages" value="NPCModCoreNoChat, NPCModHostileMeleeBasic, NPCModHostileRangedBasic"/> In the command line. Sadly that doesn't do much. Although. the loot code line does work! so thats nice.

Although, this explaination actually helps a sh*t ton! Thanks, i haven't really checked the template tutorials, and hoped it was easy. Now the National Guardsmen are entirely 'non-interactable' and the bandits are! Cheers!

Ps: Yeah i was thinking on balancing the spawns because its crazy how often i keep running into rocket dudes and/or m60's. Since i'm going to use this for a server. I might as well pull through all of the code to balance the spawns. (This was a quite nice confidence boost to know that i can somewhat read code after all!)

Thanks!

7 hours ago, Kogg said:

Looking in that file there is like 5,800 lines there. Do I have to individually change all of them?

Check the image, the last number aka ".03" (These are my own values i made.) Are the spawn chances. If you change them to .03 like i did, they'll spawn less. Increase the number such as .05 or .09 will increase it. .1 they're pretty common. But hell. I'm changing them to .02 and .01 to make them awfully rare.

Example.PNG

Link to comment
Share on other sites

the largest difference in the hostile AI packages vs. the basic ones is an added AI task to hostile where the AI will move to your last know position and search for you.  Its not like horde night GPS where they know your current location, rather its the last location they saw or heard you at.   There is also a breakblock task that is commented out as I'm still working on that.

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

15 hours ago, Kogg said:

Looking in that file there is like 5,800 lines there. Do I have to individually change all of them?

 

As Arramus said, you need to change this in whatever NPC Packs you have installed. At this point those are mostly from Darkstar Dragon. His packs use the same probabilities for all biome spawning, so you can just do a search-and-replace using a text editor.

 

The NPC Core characters spawning (Nurse, Baker, and Harley) spawn at much lower rates than Darkstar Dragon's NPCs, so they might not be a problem. But if they are - then you only need to change the probabilities for the biome spawn groups.

 

There are a lot of groups that are used only for sleeper volumes in NPC POIs - those start at line 126 (as of this writing). You don't need to do anything with those. (DD's packs don't spawn into those volumes, for whatever reason, so you don't have to worry about it with his packs.)

Edited by khzmusik
The board doesn't use Markdown, dummy (see edit history)
Link to comment
Share on other sites

15 hours ago, khzmusik said:

 

As Arramus said, you need to change this in whatever NPC Packs you have installed. At this point those are mostly from Darkstar Dragon. His packs use the same probabilities for all biome spawning, so you can just do a search-and-replace using a text editor.

 

The NPC Core characters spawning (Nurse, Baker, and Harley) spawn at much lower rates than Darkstar Dragon's NPCs, so they might not be a problem. But if they are - then you only need to change the probabilities for the biome spawn groups.

 

There are a lot of groups that are used only for sleeper volumes in NPC POIs - those start at line 126 (as of this writing). You don't need to do anything with those. (DD's packs don't spawn into those volumes, for whatever reason, so you don't have to worry about it with his packs.)

Yes, replace all for changing values is the quickest and easiest way to bulk edit the spawning Kogg.

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

On 7/21/2023 at 3:56 PM, 6ShadoW6 said:

hello guys because no one did answered to my question so here you go 
 

 

What question?  Looks like you added tracking tags to NPC bandits.  Not tagging them isnt a bug, just a choice we made.

 

The mod has issues on A21.1 dedi.  Please do not use this mod on dedi unless you are running A21.0 until we can fix the bugs.

 

Link to comment
Share on other sites

13 hours ago, 6ShadoW6 said:

xyth in npc what you made is missing code so i just add own piece of code + navobject lets say i override your code with my own code.

by the way I run NPC on A21.1b6 as single player and i did not see any issue with them like for now.

Overriding the mods code is what we want folks to do.  Well done.   This mod runs fine on experimental 21.1 in single player mode, just not on the dedicated server yet.   That might have to wait for 21.1 stable 

Link to comment
Share on other sites

49 minutes ago, Magnus33john said:

One thing that's always confounded me is why do the npc randomly change the direction they were told to stand when a horde night starts.

 

Anyone have any ideas?

If they're constantly looking at you instead of shooting at zeds, it's because you're too close to them. I learned that the hard way. Stick them outside your base on a ledge or or in a room above or below you where you can't see them or they're far enough away and that'll solve the problem.

 

Maybe there's a way for the modders to program them to prioritize looking at zeds over the player or stay focused in the correct general direction and ignore the player during horde nights.

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

2 hours ago, Fox said:

If they're constantly looking at you instead of shooting at zeds, it's because you're too close to them. I learned that the hard way. Stick them outside your base on a ledge or or in a room above or below you where you can't see them or they're far enough away and that'll solve the problem.

 

Maybe there's a way for the modders to program them to prioritize looking at zeds over the player or stay focused in the correct general direction and ignore the player during horde nights.

I have them in a separate area so my proximity doesn't cause them to turn but the min the clock hits 22:00 on a horde night they shift direction. Something about horde night causes the shift.

 

At first i thought they maybe defaulting to pointing north but this is not the case as i pointed them north before horde night and they still shift.

 

It looks like the horde spawning cause them to random shift.

Link to comment
Share on other sites

2 hours ago, Magnus33john said:

I have them in a separate area so my proximity doesn't cause them to turn but the min the clock hits 22:00 on a horde night they shift direction. Something about horde night causes the shift.

 

At first i thought they maybe defaulting to pointing north but this is not the case as i pointed them north before horde night and they still shift.

 

It looks like the horde spawning cause them to random shift.

Oh, interesting, I never got that issue.

Link to comment
Share on other sites

Hi xyth or any modder. It's been a while since Ive commented, but just a quick question (after this);

 

I'm still playing A-20.7 the latest for A-20, and haven't upgraded yet, because I have a few family members who don't like to change and/or don't play much but when they do they prefer to stay on old version.😂. So I kept the old "Mod file" (this NPC Mod) when I first installed it. Don't get me wrong, I enjoy it so far(except the accuracy of the raiders mod, but that gives me a little challenge).

 

Anyway, sorry if this sounds like a dumb question:

 

Will this current mod version still work with A-20.7, or only compatible with A-21 now? 

waiting on anyones reply.

Link to comment
Share on other sites

1 hour ago, ghostsniper said:

Will this current mod version still work with A-20.7, or only compatible with A-21 now? 

waiting on anyones reply.

 

This version will only work with A21. Too much has changed in TFP code for them to be compatible.

 

But the A20 version is still around, and should work perfectly fine on A20.7:
https://github.com/7D2D/A20Mods

 

If you liked my A20 packs, they're still around too:

https://gitlab.com/karlgiesing/7d2d-a20-modlets

 

If you don't want to update to A21, then sticking with those is your best bet.

Link to comment
Share on other sites

13 hours ago, khzmusik said:

 

This version will only work with A21. Too much has changed in TFP code for them to be compatible.

 

But the A20 version is still around, and should work perfectly fine on A20.7:
https://github.com/7D2D/A20Mods

 

If you liked my A20 packs, they're still around too:

https://gitlab.com/karlgiesing/7d2d-a20-modlets

 

If you don't want to update to A21, then sticking with those is your best bet.

Hey, great! Thanks! Good to know!👍😊

Link to comment
Share on other sites

 

On 7/28/2023 at 8:08 PM, Fox said:

Oh, interesting, I never got that issue.

It appears its a combination of elements.

 

The normal horde change over at 22:00 and the new scaffolding block which causes them to randomly climb in odd directions.

 

Remove the new block and they behave as they should with say a bars block.

Untitled.jpg

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

Been rooting around, is there any plans for survivorz pack to be updated, or no?  I liked the airforce model from that expansion, and have not found anything so far.  Hoping that one already is updated and im just being blind and stupid lol.

Link to comment
Share on other sites

On 7/28/2023 at 6:02 AM, adny said:

Please publish a list of files, after downloading which, there would be only unfriendly NPCs!
Preferably with a firearm!
Saved!

Raiderz, RaiderGurlz and Cleanerz are enemy mobs, there are 2 default friendlies nurse and baker in npccore, you would have to remove them from spawning from the base npc mod.

14 hours ago, floreit said:

Been rooting around, is there any plans for survivorz pack to be updated, or no?  I liked the airforce model from that expansion, and have not found anything so far.  Hoping that one already is updated and im just being blind and stupid lol.

no

 

Link to comment
Share on other sites

Is this mod compatible with District Zero?
I installed the score, xnpccore, darkscleaners, darksraiders, darksSoldiers, and summonfoxfriend but none seem to be spawning. I assume it has to do with DZ removing all zombie spawns. I'm guessing I need to edit some xml files in order to get it to work.
 

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...