Project Zomboid

Project Zomboid

[B41] Knox Event Expanded MP NPC mod [alpha v0.2.1]
 This topic has been pinned, so it's probably important
Snejk  [developer] Oct 11, 2024 @ 6:19am
Bug reports
Please report bugs here.

I will try to keep a list of known issues below in order to keep track of everything.
Major known issues
  • There is a semi-rare deadlock that happens if you attack an NPC at the same time as it is attacking. The server is patched for this, and the mod includes a patch for the client as well. See the Player guide for instructions.
  • Equipping weapons doesn't work properly. If you order a NPC to go and dump corpses, they might end up in a situation where they have no weapon on the server, but on your screen they have a weapon. My recommendation is to have a pacifist NPC that e.g. barricades and dumps corpses until this is fixed.
  • Sometimes npcs (not 100% determine, but most likely) put a random barricade somewhere in the world. If this happens, please report this in this thread. I need to track down the source of this issue.
  • Npcs can become stuck when trying to climb over walls in certain directions (N -> S and E -> W specifically)
  • Npcs can sometimes get dragged down client side, but on server side they are alive, so you will see a corpse on the ground that makes swinging sounds, but looks dead. If they are in your group, you can reconnect to the server to fix it.

Minor known issues
  • No drinking sounds when npcs drink (disabled because once it starts, it doesn't stop).
  • No car sounds when the npcs enter a car.
  • Npcs can become stuck when trying to enter a building.
  • Zombies don't bite npcs when they get close to them (npcs will take damage if at least 3 zombies are very close to them though). This requires zombie simulation to work and that is still being investigated, since it may cost a lot of performance.
Last edited by Snejk; Oct 14, 2024 @ 4:29pm
< >
Showing 1-15 of 64 comments
Gasoline Drinker Nov 4, 2024 @ 1:36pm 
According to what i have seen, after barricading their house/base, npcs only use their hammer and never switch to any other weapon they have. This is the case with survivors who are with the player and wild survivors. If it helps, this is in singleplayer.
Snejk  [developer] Nov 7, 2024 @ 1:12am 
@Gasoline Drinker I have code for equipping weapons after tasks are completed, but it is currently used. I need to figure out how it should interact with e.g. player directives to use only melee or if you tell them explicitly to equip something. This is however high on my list, so I am hoping to get this fixed in the next patch.
Ashum Nov 8, 2024 @ 1:36am 
after each reboot, NPCs change gender, hairstyle and skin color, sometimes disappear completely. In the mode of following the player, when they are far away, they start running and begin to twitch, as if they are being pushed every second. The security zone is assigned only to the first floor. When ordered to rest, the NPC does not attack anyone, even if a zombie bites him at that moment. NPCs don't close doors. NPCs endlessly try to open the locked door.
Ashum Nov 8, 2024 @ 1:41am 
NPCs copy the player's attack mode (holding down the ALT key) and because of this they miss in the fight. NCPs rest against the player’s buildings and move endlessly in them. Sometimes NPCs in battle start running around zombies lying on the ground instead of attacking them.
Ashum Nov 8, 2024 @ 1:45am 
I also noticed that when loading the game for some time, the character, NPCs and some zombies begin to “blink” one or two cells from their position.
I tested this both in my mod pack and in a new game with only this mod enabled. Therefore, it is unlikely that these bugs are related to a mod conflict.
Snejk  [developer] Nov 8, 2024 @ 3:05am 
@Ashum Thank you for your bug reports! It's a lot at once, so I will try to break it down with follow-up questions.

Is this in SP?

Not all npc data is saved yet, which is why they look different every save. I haven't figured out how saving of this should work yet (to ensure compatibility, I want to avoid saves becoming corrupted), but I have some ideas I will try relatively soon.

Can you clarify what you mean with "Disappear completely"? Do you mean npcs are in the world and then all of a sudden disappear or that npcs in your group disappear between sessions?

I initially thought that running was only bugged in MP, but it is the same in SP. I still haven't figured out why. I think I am setting all variables correctly, but they still act strange. I am still investigating this.

I haven't seen the issue you describe with resting. I will test it myself to see if I can reproduce.

What do you mean with "security zone"?

The hit on ground with ALT bug will be fixed in the next patch. Same with the weird "spinning dance" you describe (I think, need to test some more).

Which npcs are blinking? Do you mean on the world map view with debug mode? I had to implement a system where I offload the npcs in the metaverse (running in background) to multiple threads and it is still a bit janky sometimes. It's kind of difficult to debug, but I am staying on top of it since I think it is very important for the mod to work well.
Ashum Nov 8, 2024 @ 3:31am 
I apologize for the inaccuracies in the description - I use a translator from Russian to English, I will try to explain it more clearly.

1. The mod was used only in SP

2.3. The appearance of the characters changes when you reload without exit the game, but a couple of times I discovered that when I restarted the game, the NPCs on my team (and, as it seemed to me, all the NPCs around the player) disappeared. They were not on the map or in the group menu, and new reloads did not return them.

4. I thought that running is affected by too fast updating of the route of the NPC who is moving behind the player. Thus, each new “cycle” of setting the direction of movement makes the NPC seem to start running again, but this is only an assumption.

5. when I gave the order to the NPC to rest, he headed to the house that was chosen as the base, began to go around the rooms with the goal of sitting in one of them and resting, but there were zombies in the house who attacked him, and he did not fight back .

6. guard zone

7. ok =)

8. From time to time, the player or NPC or zombie instantly moves a short distance from their current position (usually one cell). This is most noticeable with the player character, but it is also visible during battle with zombies that can teleport behind the player or when moving towards me or NPCs.
Ashum Nov 8, 2024 @ 3:36am 
I also wanted to say that I admire your enthusiasm and desire to make a good mod with NPCs, unlike all the previous ones that I have seen. Thank you for your work, for not abandoning the project and continuing to improve it! The mod has great potential.
Snejk  [developer] Nov 8, 2024 @ 6:35am 
2. I have gotten multiple reports of this and I have seen it myself a couple of times, but I'm having a really hard time narrowing down what causes it. I'm staying on top of this though, since I prioritize anything related to data loss or performance. Bugs of that kind are really, really game breaking, hence why I prioritize them.

4. I think you're right. I tried doing essentially the same thing that I do for the follow task and I see my character doing the same thing as the npcs. However, even if I change how often it updates the destination to walk to, I still get the same behavior, so I think the issue is two-fold (probably some animation variable not set correctly, because the movement speed seems correct). Thank you for pointing this out though!

5. I've tried this a couple of times and I can't really reproduce this. Did the npc just try to sit down while the zombies were attacking him?

6. I'm not sure exactly how you would like this to work, but since you are assigning a square, I think it will be difficult to make it work the way you describe. I am however considering implementing a waypoint system where you can set a patrol path that they will follow instead of a square. I think this would work better for what (I think) you are looking for.

8. Yeah, is a big headache because it comes and goes for me, so it is very hard to debug. What I know right now is that if I reduce the number of threads, I get lower frame rate, but this issue disappears. My theory is that there is some class static variable that is used for some kind of calculation and are not compatible with multi-threading, but I have yet to find any more clues. I also have a theory that it is an issue caused by npcs going to/form metaverse, since it seems to be correlated with day time where npcs move more overall.
Snejk  [developer] Nov 8, 2024 @ 6:43am 
Thank you, I have been working on this for a very long time (approx. 10 - 11 months) and I have all intentions to keep going, since this is one of the most fun projects I have worked on. Right now I am trying to focus on getting the core elements, e.g. movement and combat, working really well and as bug-free as possible, while also adding some fun, but smaller, features here and there to keep my sanity (bug fixing easily becomes boring, so some variation is needed).

If you find more bugs or have suggestions for features, feel free to post them here on Steam Workshop or in the Discord. Although some features may take a long time to implement, I will always listen to suggestions and note them down.
AG Reaper 26 Nov 8, 2024 @ 1:33pm 
First off, I just wanted to say that I really appreciate your mod and the work you have put into it. It is definitely an amazing NPC mod, probably the best so far.

I too had a follower disappear on me between sessions in Single Player specifically. That same reload of the game that she disappeared, 3 new NPC spawned in my boarded up and claimed safehouse so I'm not sure if it is related to the spawning of new NPCs or not or just the way the session loads data when you log in. I also had to reclaim the safehouse. I logged out and back in to test if it would happen again. That time those three NPCs that spawned disappeared and no new ones spawned in, I also did not have to reclaim my safehouse.

It's a great mod that I will keep using, just want to help provide data and hopefully allow you to narrow down the potential issue.
Ashum Nov 8, 2024 @ 7:13pm 
Originally posted by Snejk:
2. I have gotten multiple reports of this and I have seen it myself a couple of times, but I'm having a really hard time narrowing down what causes it. I'm staying on top of this though, since I prioritize anything related to data loss or performance. Bugs of that kind are really, really game breaking, hence why I prioritize them.

4. I think you're right. I tried doing essentially the same thing that I do for the follow task and I see my character doing the same thing as the npcs. However, even if I change how often it updates the destination to walk to, I still get the same behavior, so I think the issue is two-fold (probably some animation variable not set correctly, because the movement speed seems correct). Thank you for pointing this out though!

5. I've tried this a couple of times and I can't really reproduce this. Did the npc just try to sit down while the zombies were attacking him?

6. I'm not sure exactly how you would like this to work, but since you are assigning a square, I think it will be difficult to make it work the way you describe. I am however considering implementing a waypoint system where you can set a patrol path that they will follow instead of a square. I think this would work better for what (I think) you are looking for.

8. Yeah, is a big headache because it comes and goes for me, so it is very hard to debug. What I know right now is that if I reduce the number of threads, I get lower frame rate, but this issue disappears. My theory is that there is some class static variable that is used for some kind of calculation and are not compatible with multi-threading, but I have yet to find any more clues. I also have a theory that it is an issue caused by npcs going to/form metaverse, since it seems to be correlated with day time where npcs move more overall.

5. The NPC was completely focused on finding a place to rest and ignored the zombies even when they attacked him. At the time of the attack, he was still moving, but at some point he chose a resting place and began to try to sit up. All this time, the zombies continued to bite the poor fellow.

6. I have been looking for a similar feature in other mods for a long time, but for some reason no one has implemented it in their mods - the NPCs in your mod can shoot at enemies while being on different floors. I tried to create fortifications with watchtowers and place NPCs there. This could only be done by “luring” through the follow mode, and then ordering the NPC to stand. I tried to do this through the guard zone, but the NPCs returned to guard the first floor leaving their positions on the towers.
This is not a bug, but rather a request to introduce a more flexible order system for guards. Perhaps there is an option to add an order for a specific NPC to occupy a specified cell. I remember that this function was in one of the clones of the Superb Survival mod, but there NPCs only shot at those who were on the same floor with them.

8. I can’t advise anything here, since I’m not a programmer at all =) I will continue to test the mod and report any bugs found, so I will contribute to the development of this wonderful mod!
Snejk  [developer] Nov 9, 2024 @ 4:42am 
@Ashum

5. I will try to reproduce it some more tonight and see if I can fix it. I want to get a patch out tonight, because I already have some very nice fixes and some nice features for the combat on the way, so I'm not sure if I can figure this one out until then.

6. I have some ideas that can improve this that is also quite straight-forward for me to implement. A first step is to extend targeting to be between npc floor and ground level. This should allow npcs to target zombies below them e.g. with guns. I think this should be relatively simple to do, so I will try it today.
Make the stay command targetable i.e. you select a square for them to stand on. Might be a bit tricky to figure out the UI, but I will try to use something similar to the "Move To"-command. I think I can figure that out.
Guarding I am not sure... If the area selector can identify which floor level is targeted, it will work, but I can't guarantee this. I need to test it before I can say.
Down the line, I will rewrite guarding to use a waypoint system to make it more dynamic.

8. I might have fixed this last night, but it is very hard to test. It went from happening kind of a lot to not happening at all as far as I can tell, but similar things have happened to me before, so it's hard to say. I will include it in next patch and if people see the same thing as me, I think the conclusion is that it is fixed.
Snejk  [developer] Nov 9, 2024 @ 5:43am 
@AG Reaper 26 The observation that your safehouse also disappears does actually help a bit. It might indicate that the entire player group data is not saved and not only the npcs. I've had a theory that it is related to the ModData being written to disk before the player group is put into the ModData table, and with your recent observation, everything seems to point in that direction.

And thank you for your kind words! I am happy that a lot of people are having fun with the mod and it really makes me more motivated to continue improving it.
Диcтoрий Nov 9, 2024 @ 6:36am 
@Ashum у меня нет кнопок взаимодействия с нпс по типу открыть инвентарь или пригласить в пати, пока я не нажму правой кнопкой мыши на панель с приказами которая добавлена модом, после нажатия правой кнопки мыши по панели, появляется 2 ошибки:

`Callframe at: get
function: onRightMouseUp -- file: NpcOverlayUI.lua line # 162 | MOD: Knox Event Expanded
`
И вторая ошибка:

`java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:62)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:198)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:188)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1458)
at zombie.ui.UIManager.update(UIManager.java:910)
at zombie.GameWindow.logic(GameWindow.java:262)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:765)
at zombie.GameWindow.run_ez(GameWindow.java:681)
at zombie.GameWindow.mainThread(GameWindow.java:495)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index 5 out of bounds for length 4

at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
at java.base/java.util.Objects.checkIndex(Unknown Source)
at java.base/java.util.ArrayList.get(Unknown Source)
... 20 more
`

После их появления, нажимая на нпс появляется раздел пригласить их в пати и всё работает нормально.
< >
Showing 1-15 of 64 comments
Per page: 1530 50