Jump to content

A19 NPCs DMT Mod


xyth

Recommended Posts

If its that out of whack let me look at the entity distribution of NPCs.

 

Well, I can't figure out if it's just in my scenario, I have a long list of mods that may or may not interfere with this. I certainly do hope the other mods don't interfere, but who knows? I wouldn't really want the base mod to get messed up just because the distribution of NPCs is bad for me when it's clear to me that it could be due to some mods that I have installed. That's why I was trying to adjust it on my end and I would like to know how to set the prob numbers properly. I don't really get those numbers, could you explain it to me, please? ?

Link to comment
Share on other sites

I think it works this way: . The spawner selects zombies from a group, say zombiesall When the spawner wants to spawn a zombie, it roll the dice and picks one out of the group based on probability. So if the final group composition totals 100 possible zeds, and each one has a probablility of 1.0, then any zombies has a 1/100 chance of being selected. So you need to balance the relative numbers of vanilla zeds and creaturepack characters in the total group. I have tried to keep the spawn chance of a vanilla zed and a creaturepack zed about even. I have not done all groups though. And if another zombie modlet is used then you need to add any group changes by them into the equation.

Link to comment
Share on other sites

It's a rolling probability.

 

First in the list gets a roll. If it hits, if goes in.

Second in the list gets a roll. If it misses, goes to 3rd.

Third in the list goes in, if it hits, it goes in.

 

...so if you have a hundred zombies you'll almost never get to the bottom of the list.

 

So what you do is give low probability for the early ones in the list and high probability for the ones later in the list.

Link to comment
Share on other sites

Thank you guys, so I guess it won't be that easy for me to change the distribution. I thought I could just use one set tag to change the whole group. I guess that's not a good idea, because the numbers I was trying are giving me either too few of other NPCs or too many NPCs in general, but still doesn't seem to lower the amount of whisperers lol. I was trying to increase the amount of other NPC types in the world and lower whisperers to make it more balanced, but the more combinations I'm trying the crazier results I get lol

Link to comment
Share on other sites

not sure whats goin on with your build but i have plenty of mods in and im getting a good distribution of npcs and creaturepack npcs with the latest builds, just played 3 hours worth

major mods i have in are snufkins/robelotos zombies, dusts vehicle mod, compo pack, bdubs wasteland weapons and nuka colas, vanilla firearms expanded

and those are other than the npc mod/creaturepack and dependencies

plus another half dozen small mods

 

Link to comment
Share on other sites

not sure whats goin on with your build but i have plenty of mods in and im getting a good distribution of npcs and creaturepack npcs with the latest builds, just played 3 hours worth

major mods i have in are snufkins/robelotos zombies, dusts vehicle mod, compo pack, bdubs wasteland weapons and nuka colas, vanilla firearms expanded

and those are other than the npc mod/creaturepack and dependencies

plus another half dozen small mods

 

Could it be this one? JaxTeller718_IncreasedWildernessZombiesX5 - 5 timess Wilderness Zombie Spawns.

Link to comment
Share on other sites

The total spawn chance of a whisperer spawning is 1.5, as compared to any one vanilla zombie being 1.0. so all the whispers total up to if we added 1.5 new zombies.

 

The total spawn chance of the custom zombies is 9, as compared to the total vanilla zombie spawn rate which is 13. So custom zeds and vanilla zeds spawn at near the same rate.

 

So whispers should spawn about 5% of the time when the game wants to roll for a zed.

 

This assumes no other zombie mods.

Link to comment
Share on other sites

I've been testing the NPCs, and I found some probable bugs.

 

If the NPC has any kind of ranged weapon, they don't use it when attacked by a zombie at any sort of "close" range. This includes zombies that are outside of the range of the zombie's melee attack. So basically ranged weapon NPCs are useless - if they're lucky they get one shot off before attacking with their melee weapon, which is just the "hand" weapon.

 

Another possible bug is that NPCs have a consistent rate of fire, and it is very low. It is on the order of five seconds, and doesn't kick in until the NPC actually sees a zombie. So the workflow is: see zombie -> wait 5 secs -> fire weapon. By the time the "fire weapon" state is active, the zombie is probably too close to fire. See also the above bug.

 

On a different subject, there is one more thing that is not a bug, but a feature improvement. NPCs teleport to your location if you get to a point where they can't get to you otherwise. This is fine.

 

The problem is that NPCs don't move as fast as the player, even when the player is on foot (and unencumbered). So, if you're a naked player character with hired NPCs, you could be running along, outdistance the NPCs, and they will teleport to you.

 

This breaks immersion. It would probably be simple to set the NPC run rate to match the player character's, so there would be no necessity for the NPCs to teleport if the player is running on foot.

Link to comment
Share on other sites

I've been testing the NPCs, and I found some probable bugs.

 

If the NPC has any kind of ranged weapon, they don't use it when attacked by a zombie at any sort of "close" range. This includes zombies that are outside of the range of the zombie's melee attack. So basically ranged weapon NPCs are useless - if they're lucky they get one shot off before attacking with their melee weapon, which is just the "hand" weapon.

 

Another possible bug is that NPCs have a consistent rate of fire, and it is very low. It is on the order of five seconds, and doesn't kick in until the NPC actually sees a zombie. So the workflow is: see zombie -> wait 5 secs -> fire weapon. By the time the "fire weapon" state is active, the zombie is probably too close to fire. See also the above bug.

 

On a different subject, there is one more thing that is not a bug, but a feature improvement. NPCs teleport to your location if you get to a point where they can't get to you otherwise. This is fine.

 

The problem is that NPCs don't move as fast as the player, even when the player is on foot (and unencumbered). So, if you're a naked player character with hired NPCs, you could be running along, outdistance the NPCs, and they will teleport to you.

 

This breaks immersion. It would probably be simple to set the NPC run rate to match the player character's, so there would be no necessity for the NPCs to teleport if the player is running on foot.

 

The first comment regarding melee is working (almost) as intended. Ranged will try to keep a short distance from their target and continue to use ranged until the target manages to get close then the ranged will swap to a melee weapon. A fast or raging zed will be able to close that distance faster than the NPC can backup though. Right now we are trying to make the melee weapon visible, but we are busy so have not gotten back to sorting that.

 

The characters waiting a few seconds until firing is likely a consequence of where that character is in its AITask loop. If its doing something else then that might need to finish before it does the ranged firing attack. Might be able to tweak that a little, but consider those 5 seconds a blessing when its a bandit starting an attack on you. Do you want no chance to dodge that attack? They are very accurate so you need to start that dodge early. It seems hard enough to me that making them insta-firing would lead to a lot of player rage.

 

The NPCs follow at their max speed, which is also their agro speed. Changing 1 changes the other, so if we make them run as fast as payers then they will be much tougher opponents. I will play with that setting a bit though, thanks.

 

Link to comment
Share on other sites

Xyth are you aware of the NPC walk changes mid game?

 

Not sure if you noticed it,but in so far as what i tested,NPCs who attack other NPCs(melee range) sometimes inherit a zombie walk animation/standing still flinching animation.

reloading the save doesn't appear to fix it either.

 

Also ranged NPCs seemingly back up very aggresively sometimes away from Z's,the end result is an endless loop of teleporting NPCs back to player position.Are they supposed to put distance between themeselves and Z's? Because i have noticed they also sometimes run to within a few meters of a Z and shoot.This causes all sorts of issues when entering a POI and NPCs wont assist the player.

 

Lastly,is there any chance you could consider adding back in NPC map markers,or tell me where to edit the xml file to do so?It just makes testing alot easier.

Link to comment
Share on other sites

Xyth are you aware of the NPC walk changes mid game?

 

Not sure if you noticed it,but in so far as what i tested,NPCs who attack other NPCs(melee range) sometimes inherit a zombie walk animation/standing still flinching animation.

reloading the save doesn't appear to fix it either.

 

Also ranged NPCs seemingly back up very aggresively sometimes away from Z's,the end result is an endless loop of teleporting NPCs back to player position.Are they supposed to put distance between themeselves and Z's? Because i have noticed they also sometimes run to within a few meters of a Z and shoot.This causes all sorts of issues when entering a POI and NPCs wont assist the player.

 

Lastly,is there any chance you could consider adding back in NPC map markers,or tell me where to edit the xml file to do so?It just makes testing alot easier.

 

If they are getting the zombie crippled animation it is because they were wounded somehow. I thought i prevented that on ranged but left it active on melee. I can allow the limp on ranged as it changes the walktype. Perhaps I should turn it off for melee until I get time to add humanoid limp anims for melee types.

 

The ranged approach/retreat code is something that needs some polishing. Frankly I forgot where Sphereii left off with that. It was based on the weapons max range, but I think that got changed. As far as teleporting in general, I think thats a bad idea as it seems to cause more issues than the one it tries to solve, that of keeping up with player vehicles.

Link to comment
Share on other sites

Lastly,is there any chance you could consider adding back in NPC map markers,or tell me where to edit the xml file to do so?It just makes testing alot easier.

 

I re-enabled them for my own testing purposes too. The code is actually still there in entityclasses.xml, it's just not enabled by default - it's commented out. So you either have to uncomment the code to enable it, or if you want to avoid changing the original code, you can re-enable it by adding the code through a new mod which is the way I prefer.

Link to comment
Share on other sites

 

It was based on the weapons max range,

 

Ah ok that helps.I had noticed that shotgun NPCs were proving to be the most reliable recruits at putting down zombies,i guess its because they were closing the range,then attacking.This led to these NPCs never teleporting all over the place like SMG/Rifle NPCs.

 

 

Link to comment
Share on other sites

 

I re-enabled them for my own testing purposes too. The code is actually still there in entityclasses.xml, it's just not enabled by default - it's commented out. So you either have to uncomment the code to enable it, or if you want to avoid changing the original code, you can re-enable it by adding the code through a new mod which is the way I prefer.

 

Didnt know that, cheers mate.

Link to comment
Share on other sites

 

The first comment regarding melee is working (almost) as intended. Ranged will try to keep a short distance from their target and continue to use ranged until the target manages to get close then the ranged will swap to a melee weapon. A fast or raging zed will be able to close that distance faster than the NPC can backup though. Right now we are trying to make the melee weapon visible, but we are busy so have not gotten back to sorting that.

 

The characters waiting a few seconds until firing is likely a consequence of where that character is in its AITask loop. If it's doing something else then that might need to finish before it does the ranged firing attack. Might be able to tweak that a little, but consider those 5 seconds a blessing when its a bandit starting an attack on you. Do you want no chance to dodge that attack? They are very accurate so you need to start that dodge early. It seems hard enough to me that making them insta-firing would lead to a lot of player rage.

 

The NPCs follow at their max speed, which is also their agro speed. Changing 1 changes the other, so if we make them run as fast as payers then they will be much tougher opponents. I will play with that setting a bit though, thanks.

 

Regarding swapping to melee: It doesn't seem like this is working as intended. If you put e.g. a standard biker zombie and an NPC with a pistol about twenty feet apart in a closed room, the NPC won't get a shot off. They might be starting their pistol attack animation, but when the zombie is about ten feet away or so, they run up to the zombie and melee attack.

 

Another related issue I just noticed today: if the weapon's range is long enough, then when the NPC tries to go to that distance to attack a zombie, the NPC will end up being out of range of even noticing the zombie. It will then stop attacking, and wander around. At least that's what it looked like to me, when I was testing in a closed room. (It's also possible that the NPCs were constantly trying to run away from the zombie instead of attack it, and its animations make it appear as if it's just wandering around.)

 

Regarding the delay in attacking: I probably wasn't clear, but it's five seconds between attacks - not five seconds before they start attacking. So: attack/five seconds/attack/five seconds/attack...

 

So even if the zombie is temporarily stunned/halted by the first ranged attack, by the time the second attack comes around, the zombie is already on them and the NPC will do nothing but melee from then on out.

 

There are several possible fixes, all of which are IMHO better than what exists now:

  • Change the distance at which the NPC switches to melee, to something much shorter than what is there now
  • Only switch to melee once the enemy actually hits them
  • Never switch to melee - always used the ranged weapon no matter what the distance (which is what most players do)
  • Try to run away after the first melee hit, don't continue attacking

There might be other/better fixes that I can't think of.

 

Also, point taken about bandit NPCs being overpowered with respect to the player if some of these changes are made. But as it stands right now, NPCs are vastly underpowered with respect to zombies. Take a zombie biker and an NPC with an SMG, put them in the Thunderdome,and it's the zombie that will walk out. (EDIT: OK, that's an exaggeration... the NPC will win maybe half the time.)

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

 

Regarding swapping to melee: It doesn't seem like this is working as intended. If you put e.g. a standard biker zombie and an NPC with a pistol about twenty feet apart in a closed room, the NPC won't get a shot off. They might be starting their pistol attack animation, but when the zombie is about ten feet away or so, they run up to the zombie and melee attack.

 

Another related issue I just noticed today: if the weapon's range is long enough, then when the NPC tries to go to that distance to attack a zombie, the NPC will end up being out of range of even noticing the zombie. It will then stop attacking, and wander around. At least that's what it looked like to me, when I was testing in a closed room. (It's also possible that the NPCs were constantly trying to run away from the zombie instead of attack it, and its animations make it appear as if it's just wandering around.)

 

Regarding the delay in attacking: I probably wasn't clear, but it's five seconds between attacks - not five seconds before they start attacking. So: attack/five seconds/attack/five seconds/attack...

 

So even if the zombie is temporarily stunned/halted by the first ranged attack, by the time the second attack comes around, the zombie is already on them and the NPC will do nothing but melee from then on out.

 

There are several possible fixes, all of which are IMHO better than what exists now:

  • Change the distance at which the NPC switches to melee, to something much shorter than what is there now
  • Only switch to melee once the enemy actually hits them
  • Never switch to melee - always used the ranged weapon no matter what the distance (which is what most players do)
  • Try to run away after the first melee hit, don't continue attacking

There might be other/better fixes that I can't think of.

 

Also, point taken about bandit NPCs being overpowered with respect to the player if some of these changes are made. But as it stands right now, NPCs are vastly underpowered with respect to zombies. Take a zombie biker and an NPC with an SMG, put them in the Thunderdome,and it's the zombie that will walk out. (EDIT: OK, that's an exaggeration... the NPC will win maybe half the time.)

 

Great feedback. Your observations mirror mine, that where Sphereii and I let things when we both got super busy relative to pre-pandemic standards. Definitely needs improvement. In room when i have a gun out I usually switch to melee after 1 shot. I think the issue is balancing the melee damage, which is probably way too low. Likely still in the test configuration. I can bump that up so the npcs win most of the time 1 on 1, or 2 on 1, with 3 on 1 meaning the NPC likely will die.

 

The 5 second delay between shots is TFP code. We might be able to speed that up but it uses several ugly formulas to calculate the time of next shot and it hurt my head looking at it last time.

 

Never switch to melee is what we had before trying to add melee. Just backing up as able, and I liked that but folks asked for melee so we tried.

Link to comment
Share on other sites

The 5 second delay between shots is TFP code. We might be able to speed that up but it uses several ugly formulas to calculate the time of next shot and it hurt my head looking at it last time.

 

Aren't there any fellow bonobos willing to help with that problem? :monkey:

Link to comment
Share on other sites

 

Great feedback. Your observations mirror mine, that where Sphereii and I let things when we both got super busy relative to pre-pandemic standards. Definitely needs improvement. In room when i have a gun out I usually switch to melee after 1 shot. I think the issue is balancing the melee damage, which is probably way too low. Likely still in the test configuration. I can bump that up so the npcs win most of the time 1 on 1, or 2 on 1, with 3 on 1 meaning the NPC likely will die.

 

The 5 second delay between shots is TFP code. We might be able to speed that up but it uses several ugly formulas to calculate the time of next shot and it hurt my head looking at it last time.

 

Never switch to melee is what we had before trying to add melee. Just backing up as able, and I liked that but folks asked for melee so we tried.

 

OK, if people want melee, then switching it off is not an option.

 

It seems like the easiest thing to change is the distance at which the NPC switches from ranged to melee attacks.

 

Could this be possible to change in XML? I see several tags that might be appropriate in utilityai.xml but I don't know if that is even used by NPCs.

 

EDIT: Also, regarding the NPCs vs. zombies (or other enemies) - I think it makes sense that an NPC with a better weapon would have a better chance against enemies, so that e.g. a nurse with a knife could only take out 1 or 2 normal zombies but a soldier with an AK might stand a chance against a radiated. But that only works if NPCs can actually use those weapons consistently.

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

Thank you for looking into that issue, Xyth. ??

I wish I could help more, but I just found this out randomly while trying to find what's causing a different issue I had which so far seems to be unrelated to NPC mods. I could be wrong, but this could have something to do with the latest update, I don't remember seeing this before that update, but then again I wasn't focused too much on hunting animals, I was busy with testing different things, so it's quite possible it's been there for a while and I just didn't notice.

Link to comment
Share on other sites

  • xyth locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...