Giter Site home page Giter Site logo

pzns's People

Contributors

chuckleberry-finn avatar cyberbobjr avatar edwordy avatar eyo-07 avatar katupia avatar lanceris avatar nightscale5755 avatar poltergeist-ix avatar shadowhunter100 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pzns's Issues

KNOWN ISSUES THAT WON'T BE FIXED

Immortal Off-screen NPCs

  • Technically, they aren't immortal, their data is saved and then unloaded from the world.
    • Thus said NPCs will resume their last known state when loaded again in the world (most likely turning into zombies if they were bit).
  • Why won't it be fixed?
  • There are no background simulations for NPCs currently as of B41.
    • Aiteron suggested there is a need to write background simulations for NPCs... Which means decompiling PZ's Java base code and ... yeah, writing the simulation code myself.
    • Let's not go there, I am not being paid for doing that and this is a mod, not a full replacer for whatever TIS is planning and implementing.

NPC Shotguns don't hit multiple Targets

  • Well, here is the thing, I do not know of a way to get weapon attack cone reliably.
  • NPCs are also weird in that by default, they can "attack" targets without facing them (look in the code).
    • The current NPC framework specifies an NPC must have a target set, and the said target will be the damage recipient when attacked.
    • There is currently no way to include multiple targets because I have no way of getting an attack cone and finding targets inside said attack cone.
  • Of course, if you or someone know how to do this, please consider contributing to the project.

NPC Melee Attacks are nearly useless or stuck in animation

  • See above, NPCs are capable of attacking without facing the target.
  • Animations vs. Timing
    • From what I can tell, all actions by NPCs are based on timing rather than based on animations and/or user inputs.
    • The implementation issue is, if I set the timing too quick, hostile NPCs will destroy zombies and the player faster than the animation can play.
    • If you or someone knows how to trigger character hit events based on animation, please consider contributing to the project.

Issue Reporting Template

Issue Type: Use a label from the right.

image

Text Summary:

Ex: I was doing this or that when this error came up.

Steps to reproduce the error:

  1. Launched Game.
  2. Sandbox settings configured
  3. Started a new sandbox game
  4. Attacked a zombie, looted a corpse, etc.
  5. Error comes up.

Please include:

Console.txt log (if applicable)

  • Please use sites like pastebin or a public cloud drive).

Picture Link (if applicable)

  • Please use imgur or another reputable site...)

Video Link (if applicable,

  • Please use a reputable site... (youtube or vimeo).
  • You can Record a video with 'windows key + alt + r'

Unloading areas with NPCs errors.

So here's a doozy.
The following occurs when I walk out of the loaded cell with NPCs. They are patrolling the area, as well as a few stationary ones.

STACK TRACE

function: start -- file: WalkToTimedAction.lua line # 44 | Vanilla
Callframe at: StartAction
function: begin -- file: ISBaseTimedAction.lua line # 61 | Vanilla
function: addToQueue -- file: ISTimedActionQueue.lua line # 23 | Vanilla
function: add -- file: ISTimedActionQueue.lua line # 131 | Vanilla
function: PZNS_AddNPCActionToQueue -- file: PZNS_UtilsNPCs.lua line # 366 | MOD: PZNS_Framework
function: PZNS_WalkToSquareXYZ -- file: PZNS_WalkTo.lua line # 21 | MOD: PZNS_Framework
function: PZNS_JobGuard -- file: PZNS_JobGuard.lua line # 46 | MOD: PZNS_Framework
function: PZNS_UpdateNPCJobRoutine -- file: PZNS_ManageJobs.lua line # 68 | MOD: PZNS_Framework
function: PZNS_UpdateAllJobsRoutines -- file: PZNS_ManageJobs.lua line # 84 | MOD: PZNS_Framework.
[27-07-23 18:13:35.764] ERROR: General , 1690499615764> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getX of non-table: null at KahluaThread.tableget line:1689..
[27-07-23 18:13:35.764] ERROR: General , 1690499615764> DebugLogStream.printException> Stack trace:.
[27-07-23 18:13:35.767] LOG : General , 1690499615767> -----------------------------------------
STACK TRACE

How do I translate the debug menu?

I noticed that there is no IG_UI_EN.txt file in the translate folder. If I want to add this file to translate the right-click menu, how should I proceed? What should I add between IGUI and PZNS_Orders?
For example:
IGUI_QNW_DebugMenu_ModeSwitch = "模式切换",
IGUI_QNW_DebugMenu_ModeSwitch_God = "上帝模式",
IGUI_QNW_DebugMenu_ModeSwitch_Ghost = "幽灵模式",
IGUI_QNW_DebugMenu_ModeSwitch_Clip = "穿墙模式",
Using 'QNW' for positioning between 'IGUI' and 'DebugMenu', what should I use to locate this mod?
Thank you for your activity and hard work. I have always believed that NPC mods are a great support for single-player gamers. Once again, thank you for your work!
PS:The above was translated entirely by ChatGPT. My English is very bad :(

Unable to manipulate inventory

Mods:
Mod Manager
Mod Options
PZNS_Framework (latest available on Steam Workshop)

Start a new game, no sandbox setting necessary. From inventory, attempt to drop or move items (such as clothing) to the floor or any container.

Debug log message:
[17-07-23 15:00:08.031] LOG : General , 1689631208031> -------------------------------------------------------------
attempted index: getInventory of non-table: null.
[17-07-23 15:00:08.033] LOG : General , 1689631208033> -----------------------------------------
STACK TRACE

function: dropItem -- file: PZNS_NPCInventory.lua line # 265 | MOD: PZNS_Framework
function: onDropItems -- file: ISInventoryPaneContextMenu.lua line # 3192 | Vanilla
function: onMouseUp -- file: ISContextMenu.lua line # 90 | Vanilla.
[17-07-23 15:00:08.035] ERROR: General , 1689631208035> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getInventory of non-table: null at KahluaThread.tableget line:1689..
[17-07-23 15:00:08.035] ERROR: General , 1689631208035> DebugLogStream.printException> Stack trace:.
[17-07-23 15:00:08.035] LOG : General , 1689631208035> -----------------------------------------
STACK TRACE

function: dropItem -- file: PZNS_NPCInventory.lua line # 265 | MOD: PZNS_Framework
function: onDropItems -- file: ISInventoryPaneContextMenu.lua line # 3192 | Vanilla
function: onMouseUp -- file: ISContextMenu.lua line # 90 | Vanilla

File:
17-07-23_14-55-10_DebugLog.txt

Add named Outfit

Hi,
i think it will be easy to add NamedOutfit for npc created.
Do you want a PR or it's already planned ?

(sorry i can't change the label :'( )

Java Exception Crash by zombie.iso.IsoGridSquare.isInARoom()

Summary

In SSC that crash happens time to time, i believe that is the same problem. If you walk away from npcs in "hard" fighting against zombies or other npc the program will stop responding (java level, i mean the java runtime will catch the exception, not the OS).

Steps to reproduce the error

  1. Let an npc and a horde of zombies fight. (I believe that should be more than 10 zombies at least, not sure)
  2. Walk away from them until the program stop responding.
  3. Wait for the crash and the program will return to main menu.

console.txt

ERROR: General , 1691860982583> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "zombie.iso.IsoGridSquare.isInARoom()" because the return value of "zombie.characters.IsoGameCharacter.getCurrentSquare()" is null at BodyDamage.UpdateBoredom line:1829.
ERROR: General , 1691860982583> DebugLogStream.printException> Stack trace:
java.lang.NullPointerException: Cannot invoke "zombie.iso.IsoGridSquare.isInARoom()" because the return value of "zombie.characters.IsoGameCharacter.getCurrentSquare()" is null
at zombie.characters.BodyDamage.BodyDamage.UpdateBoredom(BodyDamage.java:1829)
at zombie.characters.BodyDamage.BodyDamage.Update(BodyDamage.java:2082)
at zombie.ai.states.AttackState.triggerPlayerReaction(AttackState.java:311)
at zombie.ai.states.AttackState.animEvent(AttackState.java:198)
at zombie.ai.StateMachine.stateAnimEvent(StateMachine.java:259)
at zombie.characters.IsoGameCharacter.OnAnimEvent(IsoGameCharacter.java:4235)
at zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator.OnAnimEvent(AdvancedAnimator.java:264)
at zombie.core.skinnedmodel.advancedanimation.AnimLayer.invokeAnimEvent(AnimLayer.java:211)
at zombie.core.skinnedmodel.advancedanimation.AnimLayer.updateInternal(AnimLayer.java:419)
at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:166)
at zombie.core.skinnedmodel.advancedanimation.AnimLayer.Update(AnimLayer.java:323)
at zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator.updateInternal(AdvancedAnimator.java:397)
at zombie.GameProfiler.invokeAndMeasure(GameProfiler.java:166)
at zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator.update(AdvancedAnimator.java:368)
at zombie.characters.IsoGameCharacter.postUpdateInternal(IsoGameCharacter.java:12087)
at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83)
at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230)
at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26)
at zombie.util.Lambda.capture(Lambda.java:130)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81)
at zombie.characters.IsoGameCharacter.postupdate(IsoGameCharacter.java:12063)
at zombie.characters.IsoZombie.postUpdateInternal(IsoZombie.java:2112)
at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83)
at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230)
at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26)
at zombie.util.Lambda.capture(Lambda.java:130)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81)
at zombie.characters.IsoZombie.postupdate(IsoZombie.java:2104)
at zombie.MovingObjectUpdateSchedulerUpdateBucket.postupdate(MovingObjectUpdateSchedulerUpdateBucket.java:97)
at zombie.MovingObjectUpdateScheduler.postupdate(MovingObjectUpdateScheduler.java:177)
at zombie.CollisionManager.resolveContactsInternal(CollisionManager.java:411)
at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83)
at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230)
at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26)
at zombie.util.Lambda.capture(Lambda.java:130)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81)
at zombie.CollisionManager.ResolveContacts(CollisionManager.java:236)
at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:3502)
at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83)
at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230)
at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26)
at zombie.util.Lambda.capture(Lambda.java:130)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81)
at zombie.iso.IsoWorld.update(IsoWorld.java:3427)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1617)
at zombie.gameStates.IngameState.update(IngameState.java:1333)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
at zombie.GameWindow.logic(GameWindow.java:298)
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)

video

https://youtu.be/MZQ33P8e4Ac
In this video I'm working on mod that will periodically spawn hostile npcs inside the police stations. That police station is in Muldraugh, there is zombies inside where the spawn occurs, but I believe that the crash is not restricted to this particular situation.

The spawnNPCIsoPlayer and PZNS_UtilsNPCs.PZNS_GetIsNPCSquareLoaded

Summary:

The spawnNPCIsoPlayer is a function that control the spawning and despawning process based on PZNS_UtilsNPCs.PZNS_GetIsNPCSquareLoaded function, that check if the npc object has a loaded square.

Every one in-game minute the PZNS_WorldUtils.PZNS_SpawnNPCIfSquareIsLoaded is called and then for each active npc the spawnNPCIsoPlayer is called.

The logic seems that if the player go far enough the PZNS_WorldUtils.PZNS_SpawnNPCIfSquareIsLoaded will return false for some npc, and then the spawnNPCIsoPlayer should despawn the npc from world to prevent jobs issues.

What I see happening is, the PZNS_WorldUtils.PZNS_SpawnNPCIfSquareIsLoaded will return true even if the npc becomes off-screen (off rendered, or not visible even if you pan de camera), when the player returns the npc becomes invisible, the name of npc render fixed in one square (the last rendered square i suppose), but npc can do things like attack.

Steps to reproduce the error:

  1. Spawn the NPC
  2. Go far enough from the NPC (i tested going between Rosewood Police to Fire Department)
  3. Return to NPC

My Bypass Solution

The mod i'm working will spawn hostile npcs prisoners in the Police Stations, i believe that my "solution" is particular for my goal so i will not make a pull request, instead i will share sections of the code.

First i created a custom spawnNPCIsoPlayer, i called oza_spawnNPCIsoPlayer. Then i override the PZNS_WorldUtils.PZNS_SpawnNPCIfSquareIsLoaded to call oza_spawnNPCIsoPlayer instead of spawnNPCIsoPlayer.

In oza_spawnNPCIsoPlayer i used PZNS_WorldUtils.PZNS_IsSquareInPlayerSpawnRange, IsoPlayerObject:setGhostMode and changed the conditional control structure to discriminate 3 scenarios:

  1. Square Loaded and in spawn range of the player
  2. Square Loaded but not in spawn range
  3. Not loaded and not in spawn range

The (2) the oza_spawnNPCIsoPlayer change the npcIsoPlayerObject to ghost mode to prevent zombie fight off-screen and do the same of the (3). The (3) do the same of the else in spawnNPCIsoPlayer and the (1) set the ghost mode to false.

The code is a mess because I'm still working on it XD, just find the oza_spawnNPCIsoPlayer

zWanderfullRosewoodPrisoner_1932_10082023.txt

I am not doing a known job

Issue Type: Bug

  • NPCs are not doing their jobs

Text Summary:

Concatenate more info on line 82 with the below code to get more context.

Steps to reproduce the error:

  1. Launched Game.
  2. Sandbox settings configured.
  3. Loaded an old sandbox game, NPC can't do their job.
  4. Started a new sandbox game, NPCs still can't do their job.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.