Jump to content

A21 NPCMod and Addons


xyth

Recommended Posts

4 hours ago, magejosh said:

Didn't robeloto do a loud sounds lowered mod replacing the vanilla gun and auger sounds?

Turns out i was wrong, it did some tool sounds. It was focused more on block destroying sounds it seems. That suggestion to set the fire sound to the silenced sound would work though and could be done in xml only.

But if anyone did want that loud sounds lowered mod, https://7daystodiemods.com/loud-sounds-lowered/

Link to comment
Share on other sites

On 8/19/2022 at 9:18 PM, arramus said:

Overall probability to spawn compared to other entities is governed by entitygroups.xml

Overall decrease in respawn time or amount allowed to respawn in the same area is governed by spawning.xml values.

Comparing the default spawning.xml values, which the NPC are governed by unless specifically customised in their Add-On pack, against War3zuk's AIO Overhaul values, may help to find that middle ground for the intensity you are looking for.

Arramus or anyone.

 

With this explanation would I be correct in assuming that if I wanted fewer Friendly NPC's that I would edit the entitygroups.xml in NPCCore/Packs and add the maxcount to each friendly NPC entry like how in spawning.xml maxcount is used for overall zombie count but not the randomness of the zombies as that is decided by entitygroups.xml. Like for an example below:

 

<entity name="npcBakerEmptyHand" prob="0.05" /> and change to <entity name="npcBakerEmptyHand" prob="0.05" maxcount="1"/>

 

I just feel I am flooded with too many friendlies and they kill the zombie more then me. LOL

Link to comment
Share on other sites

37 minutes ago, Galaktus said:

if I wanted fewer Friendly NPC's that I would edit the entitygroups.xml in NPCCore/Packs

Based on where the Friendly NPCs have been added to, typically the same groups as regular zombies, the orthodox method used by TFP to balanced spawning rate is shared as the most appropriate suggestion.

 

Simply reduce the prob value of each entity.

 

For example, the SoldierPack. There are two kinds of 'NPC'; a hireable version such as npcSoldier4TRifle with a probability of 0.1, and a non hireable survivor version such as survivorSoldier4TRifle also at 0.1. Drop these values to 0.065. This will be higher than the Baker and other NPCs bundled into the NPCMod but decrease their chance of appearing related to other entities they are competing with.

 

The default entitygroups.xml values do not use maxcount value. Based on using a custom spawning.xml group, the connected entitygroups.xml spawning appears to be considered based on a distance of about 40 blocks or so. And the maxcount is governed by the overall World spawning such as the one set by Server Admin: <property name="MaxSpawnedZombies" value="64" />.

 

For example, zombie/NPC spawning in the Forest Biome in the day time is governed by an entity group called ZombiesAll.

 

In the default entitygroups.xml, Zombie Boe has no probability added, and for the sake of calculating appearance, we can consider that to be a 100% chance. We have been informed the calculation is based on the combination of all entities added to the list, but sometimes real game play does not totally match due to double spawning or other inconsistencies. But using that base value helps to consider proportional appearances.


Against Zombie Boe, <entity name="npcBakerEmptyHand" prob="0.05" /> at 0.05 will only have a 5% / 1 in 20 chance of spawning in relation to Zombie Boe. In practice, we do not see a great deal of this Baker entity these days. As there are a few types of the Baker, it can give the appearance he appears more than the 5% based as he is in the list a lot more under his various roles.

 

For the friendly NPCs, such as the soldiers, since there are so many types of them and since they double with a Hireable kind and a non hireable Survivor kind, their chance to appear is much more noticeable. See how that 0.065 impacts the Biomes. And if you only wanted the hireable kind, reduce the Survivor kind to only 0.05 or less, or even remove them from the list so they no longer appear.

And yes, the NPCs can gradually wipe out the zombies in their spawn region which further gives the impression there are more. The moment one of those zombies is replaced by the next NPC, their strength can double. Balancing the NPC spawns can be tricky depending on how many packs are added and what their individual prob chance is. It's very delicate out there but going low (0.065) to start seems prudent.

Link to comment
Share on other sites

Arramus,

 

Thank you for the indepth breakdown. Damn you are going to make me go back to my cryptology days in the military with that math. LOL I will definitely look at removing the non-hiring NPC's and try the percentages you stated. I might even look at removing certain variations of the NPC's that I am okay with not seeing. I have downloaded I think just about every pack that is on the front page. Thanks again!

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

hi there @xyth. wanted to let you know i'm making an addon mod that inserts the 0-XNPCCore entities to my custom enZombies biome groups (in entitygroups.xml) so that the nurse, baker and Harley npc's spawn outside in the wilderness for those using the enZombies mod. i see that within entitygroups.xml for 0-XNPCCore only a subset of nurse, baker and Harley variations are defined to spawn within the biome groups (ZombiesAll, ZombiesNight, SnowZombies, etc) and i'll follow that convention too. NPCMod is a great mod platform and thanks for continuing development on it. i just need to find a spot on my page for this 'powered by Score and NPCcore' banner....

Link to comment
Share on other sites

Hey ErrorNull, if you haven't seen the expansion of the progression of spawning groups for the different packs done by khzmuzik I'd recommend looking at that too as it further reorganizes those groups entries. Idk if his implementation will matter for what you're doing but it was helpful for me when getting everything working together in what felt like appropriate variations. Everything being almost all the NPC packs, snufkins, enzombies, mickpewpews, and a few others.

Link to comment
Share on other sites

that's interesting. well i reviewed the gamestage modlets for NPCMod that @khzmusik created and looks like they only impact the code for sleeper POI spawning. my planned NPCMod addon for enZombies only touches the wilderness biome spawning, so there's no overlap or potential conflict. you would continue doing whatever you were doing.

 

however, much like how khzmusik needed to provide a modlet for each NPCMode expansion pack that's out there, i will also need to do the same. my first release will just be for the base NPCCore entities (nurse, baker, and Harley), then as time goes on will create the modlets for expansions made by Xyth, DarkStarDragon, Arramus, GanTheGrey, Khzmusik, and others. the things we do to let everyone play all the mods all at once all the time. 😎

Link to comment
Share on other sites

On 8/23/2022 at 7:59 PM, Galaktus said:

With this explanation would I be correct in assuming that if I wanted fewer Friendly NPC's that I would edit the entitygroups.xml in NPCCore/Packs and add the maxcount to each friendly NPC entry like how in spawning.xml maxcount is used for overall zombie count but not the randomness of the zombies as that is decided by entitygroups.xml. Like for an example below:

 

<entity name="npcBakerEmptyHand" prob="0.05" /> and change to <entity name="npcBakerEmptyHand" prob="0.05" maxcount="1"/>

 

No, you can't do this. Entity tags in entity groups do not support the "maxcount" attribute at all.

 

Instead you should do as Arramus suggested, and reduce the probabilities of all the NPCs in each biome group. (Or at least those that you see more than you like.)

 

23 hours ago, arramus said:

In the default entitygroups.xml, Zombie Boe has no probability added, and for the sake of calculating appearance, we can consider that to be a 100% chance.

 

That's actually not how it works. There is no such thing as a 100% chance unless there is only one entity in the entity group.

 

In fact, if there is no probability added, then it defaults to a probability value of 1. That's not 100%, that's a probability equal to entities that also have a value of 1.

 

Here's how the probabilities are actually calculated.

 

First, the game sums up all the probabilities of all the entities in the entity group (after mods add them, if applicable). Then, it takes each individual probability, and divides it by this sum. Mathematically, this is called normalization - it means the total probability for each entity group will be exactly 1.

 

Now, each time an entity should be spawned from this group, it chooses a random number between 0 and 1. It goes through each entity in the entity group, in order, using the normalized probabilities. For the first entity, if the random number is less than its probability, that is the entity which is used. Otherwise, it adds that entity's probability to a running total, and moves on to the next entity in the entity group. If the random number is less than that entity's probability plus the running total, that entity is used. Otherwise... the process repeats until an entity is used.

 

Also note that there is no "keeping track" of entities. It's all determined by RNG, so the same entity can be chosen multiple times. (Using the terminology of probability theory, choosing an entity is an independent event.)

 

So, if modlets add a lot of NPCs to the zombie groups, then they can overwhelm zombies, so that there is a higher probability to spawn an NPC than a zombie. This can happen no matter how small each individual NPC's probability is.

 

If an entity group has 10 zombies without probabilities (meaning: a probability of 1 per zombie), then this will happen as soon as the combined probability values of all the NPCs reach 10. If you install a lot of NPC modlets, and they all add their own NPCs into the same biome spawn groups (which they do), then this is almost guaranteed to happen.

 

This is why I originally advocated that when NPC authors add their NPCs to a biome spawn group, the combined probabilities of all NPCs in that pack should add up to 1 in that group. This would mean there is an equal chance to spawn one of their NPCs, as there is to spawn a single zombie in that group. It also would mean that NPC packs with lots of NPCs (and/or weapon variations) wouldn't blow out NPC packs that had fewer NPCs. That didn't happen. C'est la vie.

 

4 hours ago, ErrorNull said:

that's interesting. well i reviewed the gamestage modlets for NPCMod that @khzmusik created and looks like they only impact the code for sleeper POI spawning.

 

That's correct. It's because POI spawners are the only ones that are gamestaged, at least in vanilla - biome spawns aren't. (Wandering hordes are too, but you can't spawn most NPCs into wandering hordes, that will throw exceptions because most NPCs don't descend from the C# EntityEnemy class.)

 

It's also easier to figure out POI spawning, since NPCs don't spawn in the same groups as zombies, so I didn't have to worry about zombie-vs.-NPC ratios like I would with biome spawns. I still don't know what most people expect that ratio to be (or even if there is any consensus at all).

Edited by khzmusik
Making sure I am clear about what I mean (see edit history)
Link to comment
Share on other sites

Hy, nice work @all. 7 is a very new game experiance with NPCs and more Zombies. Is there a chance to get a small addon pack wit a T-800 Terminator (one modell will be fine) that uses a Gatling Laser canon like from the wasteland mod? (of course we must ask mod owners permission). Best regards

Link to comment
Share on other sites

10 hours ago, Ru Melin said:

Hy, nice work @all. 7 is a very new game experiance with NPCs and more Zombies. Is there a chance to get a small addon pack wit a T-800 Terminator (one modell will be fine) that uses a Gatling Laser canon like from the wasteland mod? (of course we must ask mod owners permission). Best regards

perhaps in a21

dont think any of us are adding anymore packs this alpha

i know i am not

Link to comment
Share on other sites

I'm experiencing a significant error with the mod that only limits me to melee NPC's.

Summary: I'm only getting melee NPC's to spawn. There are no ranged NPC's spawning in my world at all. Even if I go into the entity spawner menu and select any of the ranged NPC's, for example a rifle baker NPC, I get the error "EXC Exception: Item with name "gunNPCHRfile" not found in class npcBakerHRifle"
Game Version: A20.6 (b9)
Platform: PC
Video Settings: Medium
Game mode: SP
Did you start a new game? Yes
Did you validate your files? (Yes/No)
Are you using any other mods? (Yes/No) Note: Please retest without any mods loaded in a new game.
EAC off? It's off
Bug Description: Any attempts to manually spawn NPC's other than the melee variants result in an error code such as: "EXC Exception: Item with name "gunNPCHRfile" not found in class npcBakerHRifle"
Detailed steps to reproduce the bug: I have attempted to uninstall all mods except for the NPC mods, verify game integrity files, and start multiple new games to no avail.
Actual result: Attempting to spawn any NPC has yielded the same result
Expected result: I expected the NPC's to spawn in with the selected weapon.

Link to comment
Share on other sites

2 hours ago, Doomblade3890 said:

I'm experiencing a significant error with the mod that only limits me to melee NPC's.

Summary: I'm only getting melee NPC's to spawn. There are no ranged NPC's spawning in my world at all. Even if I go into the entity spawner menu and select any of the ranged NPC's, for example a rifle baker NPC, I get the error "EXC Exception: Item with name "gunNPCHRfile" not found in class npcBakerHRifle"
Game Version: A20.6 (b9)
Platform: PC
Video Settings: Medium
Game mode: SP
Did you start a new game? Yes
Did you validate your files? (Yes/No)
Are you using any other mods? (Yes/No) Note: Please retest without any mods loaded in a new game.
EAC off? It's off
Bug Description: Any attempts to manually spawn NPC's other than the melee variants result in an error code such as: "EXC Exception: Item with name "gunNPCHRfile" not found in class npcBakerHRifle"
Detailed steps to reproduce the bug: I have attempted to uninstall all mods except for the NPC mods, verify game integrity files, and start multiple new games to no avail.
Actual result: Attempting to spawn any NPC has yielded the same result
Expected result: I expected the NPC's to spawn in with the selected weapon.

Grab your log and upload it to pastebin and post a link here.

Link to comment
Share on other sites

22 hours ago, bdubyah said:

Grab your log and upload it to pastebin and post a link here.

Unfortunately Pastebin wouldn't let me upload it due to a 512kb limit. I have the log loaded on Google Drives here.

If you do a CTRL + F search for "Exception: Item with name" you should jump straight to the error I'm running into. Anytime I try to spawn a ranged NPC I get this error, only the melee-based NPC's work.

Link to comment
Share on other sites

52 minutes ago, Doomblade3890 said:

Unfortunately Pastebin wouldn't let me upload it due to a 512kb limit. I have the log loaded on Google Drives here.

If you do a CTRL + F search for "Exception: Item with name" you should jump straight to the error I'm running into. Anytime I try to spawn a ranged NPC I get this error, only the melee-based NPC's work.

Need to update your mods. You are running 20.5 versions of SCore and NPCmod.

Link to comment
Share on other sites

4 hours ago, KronGaming said:

I get a server crash every time I enter my linux dedicated server running this mod;  I was originally setting it up to run The Wasteland mod, but I've narrowed it down to SCore/NPCMod that seems to be the issue.

 

Error log: https://pastebin.com/8Q9GA8HE

Troublesome.

 

Caught fatal signal - signo:11 code:2 errno:0 addr:0x7f2a9551cc5e

 

It's been a couple of years since I ran 7D2D using Linux, and Linux specific posts are very rare if at all.

It appears this type of error can range from hardware conflicts, to data overflow going out of bounds, to something in the code which other OSs may allow through but Linux does not.

 

Can you try just Score on its own, without 0-XNPCCore, just to further reduce pinpointing?

Link to comment
Share on other sites

1 hour ago, arramus said:

Troublesome.

 

Caught fatal signal - signo:11 code:2 errno:0 addr:0x7f2a9551cc5e

 

It's been a couple of years since I ran 7D2D using Linux, and Linux specific posts are very rare if at all.

It appears this type of error can range from hardware conflicts, to data overflow going out of bounds, to something in the code which other OSs may allow through but Linux does not.

 

Can you try just Score on its own, without 0-XNPCCore, just to further reduce pinpointing?

Will do!

Link to comment
Share on other sites

First warning:
Caught fatal signal - signo:11 code:2 errno:0 addr:0x7f2a9551cc5e

Current warning:
Caught fatal signal - signo:11 code:1 errno:0 addr:0x4f5c2529
Obtained 4 stack frames.
#0 0x007fb33f907520 in __sigaction
#1 0x0000004f5c2529 in (Unknown)
#2 0x007fb268036dc4 in (wrapper dynamic-method) EntityAlive:DMD<EntityAlive::updateCurrentBlockPosAndValue> (EntityAlive)

#3 0x007fb337f4580b in (wrapper dynamic-method) EntityAlive:DMD<EntityAlive::OnUpdateLive> (EntityAlive)

The general consensus on this type of error relates to stack overflows, coding issues, or irregularities in setup.

Can you confirm that players can join with nothing in the Mods folder at all, just to rule out any typos/mismatches/routing issues related to the serverconfig/set up?

Link to comment
Share on other sites

6 hours ago, arramus said:
First warning:
Caught fatal signal - signo:11 code:2 errno:0 addr:0x7f2a9551cc5e

Current warning:
Caught fatal signal - signo:11 code:1 errno:0 addr:0x4f5c2529
Obtained 4 stack frames.
#0 0x007fb33f907520 in __sigaction
#1 0x0000004f5c2529 in (Unknown)
#2 0x007fb268036dc4 in (wrapper dynamic-method) EntityAlive:DMD<EntityAlive::updateCurrentBlockPosAndValue> (EntityAlive)

#3 0x007fb337f4580b in (wrapper dynamic-method) EntityAlive:DMD<EntityAlive::OnUpdateLive> (EntityAlive)

The general consensus on this type of error relates to stack overflows, coding issues, or irregularities in setup.

Can you confirm that players can join with nothing in the Mods folder at all, just to rule out any typos/mismatches/routing issues related to the serverconfig/set up?

 

Yes, vanilla setup works just fine (I should have mentioned that already, my bad!).  I also wiped all saves to test vanilla, then wiped all saves to test just the NPCMod, and then just SCore.

11 hours ago, arramus said:

It's been a couple of years since I ran 7D2D using Linux, and Linux specific posts are very rare if at all.

 

I've noticed, and that's a bit strange, since I'm pretty sure a large portion of hosted servers are all Linux-based.  Or maybe they no longer are (I haven't gotten a hosted server for... too many years, because I just ended up building my own).

Link to comment
Share on other sites

37 minutes ago, KronGaming said:

 

Yes, vanilla setup works just fine (I should have mentioned that already, my bad!).  I also wiped all saves to test vanilla, then wiped all saves to test just the NPCMod, and then just SCore.

 

I've noticed, and that's a bit strange, since I'm pretty sure a large portion of hosted servers are all Linux-based.  Or maybe they no longer are (I haven't gotten a hosted server for... too many years, because I just ended up building my own).

Thanks for confirming, as it makes pinpointing it down to when you have Score installed as the common/only feature.
I saw your post has already been passed onto the Score creator and it was acknowledged the new fire feature may need a revisit with Linux builds in mind.
And yes, there are plenty of commercially hosted Linux servers out there so it may be that your message was the first to arrive unless slightly different Linux builds are responding differently.

Link to comment
Share on other sites

Hey guys. For anyone out there enjoying NPCMod ... but not able to use enZombies due to incompatibility, i've created some patch mods you can now add so that NPCMod entities and enZombies will spawn properly together. so for now, my patch mods only work for the core entities (Nurse, Baker, and Harely) and Xyth's nice Bird, Spider and Mech expansion packs. I plan to eventually compatible-ize the remaining expansion packs too. enZombies mod page

 

@xyth Feel free to let me know if the way I presented and credited these NPCMod patches on my main page looks okay to you. 👍

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