Jump to content

ATPHHe

Member
  • Posts

    43
  • Joined

  • Last visited

1 Follower

About ATPHHe

  • Birthday January 16

Contact Methods

  • Website URL
    https://steamcommunity.com/id/ATPHHe/

Profile Information

  • Interests
    Game Developer, Programmer, AI/Machine Learning

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ATPHHe's Achievements

  1. Ah thanks! That a really nice find. I'll credit you for the this workaround.
  2. Hello, I am currently fixing a mod for Build 41.60+ Multiplayer. The function zombie:changeSpeed(3) does not work anymore as it throws exceptions now. I saw that changedSpeed() does not exist in 41.60+ looking in the Java Decompiler. Will it be added back? function setSpeedCZ(zombie) local zModData = zombie:getModData(); if zModData.done ~= "done" then zombie:changeSpeed(3); zombie:DoZombieStats(); zModData.done = "done"; end end Events.OnZombieUpdate.Add(setSpeed)
  3. Someone using one of my mods tells me they are getting a Java error in Build 41.53. The mod being used is Customizable Zombies. After about 10-15 minutes of them playing the game in West Point, a crash occurs and kicks them back to the main menu. Testing the mod on my own PC and the mod runs fine for me. No crashes have occurred in my game which makes it very confusing for me. My mod changes zombie speeds and toggles on or off crawlers based on the settings. The error seems related to Broken Fences. Here is the Java error. Also, with permission they allowed me to upload their console.txt file. It will be attached to the very bottom. The error occurs on Line 7294. ERROR: General , 1628108154417> DebugLogStream.printException> Stack trace: java.lang.IllegalArgumentException: invalid direction at zombie.iso.BrokenFences.addDebrisObject(BrokenFences.java:414) at zombie.iso.BrokenFences.destroyFence(BrokenFences.java:262) at zombie.iso.IsoObject.Thump(IsoObject.java:5377) at zombie.ai.states.ThumpState.execute(ThumpState.java:76) at zombie.ai.StateMachine.update(StateMachine.java:200) at zombie.characters.IsoGameCharacter.updateInternal(IsoGameCharacter.java:9710) 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.update(IsoGameCharacter.java:9355) at zombie.characters.IsoZombie.updateInternal(IsoZombie.java:2289) 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.update(IsoZombie.java:2001) at zombie.MovingObjectUpdateSchedulerUpdateBucket.update(MovingObjectUpdateSchedulerUpdateBucket.java:69) at zombie.MovingObjectUpdateScheduler.update(MovingObjectUpdateScheduler.java:149) at zombie.iso.IsoCell.ProcessObjects(IsoCell.java:2862) at zombie.iso.IsoCell.updateInternal(IsoCell.java:5626) 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.IsoCell.update(IsoCell.java:5572) at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:3175) 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:3113) at zombie.gameStates.IngameState.updateInternal(IngameState.java:1612) at zombie.gameStates.IngameState.update(IngameState.java:1319) at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101) at zombie.GameWindow.logic(GameWindow.java:285) at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71) at zombie.GameWindow.frameStep(GameWindow.java:726) at zombie.GameWindow.run_ez(GameWindow.java:642) at zombie.GameWindow.mainThread(GameWindow.java:471) at java.base/java.lang.Thread.run(Unknown Source) console.txt
  4. Sorry for the late reply. Zombies were usually reupdated every 8128 tick since they sometimes defaulted back to the Zombie Lore settings. I lowered the value to 2000 now which should allow zombies to update faster when you drive across town. If 2000 is not enough, I'll lower the tick value even more. Thanks for letting me know about the issue.
  5. When jogging, you burn calories normally very fast. When sprinting, you burn calories slower than jogging.
  6. The function "setFakeDead(boolean)" for the IsoZombie object doesn't work properly in this update. If they are Crawlers, they die and have their clothes removed sometimes when setFakeDead(true) is called. If they are not Crawlers, nothing occurs to the zombie.
  7. The sirens and light bars on all vehicles don't save their enabled or disabled states it seems. If you turn on a vehicle's siren or light bar, then immediately reload the same save file, the vehicle loads back in with a disabled siren and light bar. Same thing happens when you leave the area and unload the chunk that the vehicle is in, then come back to the vehicle. The vehicle loads in and their sirens and light bars are disabled.
  8. ATPHHe

    Help !

    Mods should not be inside "C:\Users\USER_NAME\Zomboid" Mods must be extracted to "C:\Users\USER_NAME\Zomboid\mods" instead.
  9. ATPHHe

    Load files order

    Hmm. Not sure if one guide exists yet as I haven't found one. From what I've seen in the CMD/Debug Console, the game loads PZ Lua files, then Mod Lua files from the "lua" folder based on what's happening below. Build 40 Lua files in these folders are loaded when you are booting up Project Zomboid, reloading lua mods, or returning to the main menu: Loaded 1st: "../media/lua/shared" ( folders/files loaded alphabetically - PZ Lua files, then Mod Lua files ) Loaded 2nd: "../media/lua/client" ( folders/files loaded alphabetically - PZ Lua files, then Mod Lua files ) Lua files in these folders are loaded only when you are starting up a Singleplayer game/save, or a Multiplayer Server: "../media/lua/server" ( folders/files loaded alphabetically - PZ Lua files, then Mod Lua files ) Build 41 seems to keep the same load order for Lua files from Build 40. --------------------------------------------------------------------------------------------------------------------- For other files like 3d models, scripts, textures, texturepacks, etc., I cannot confirm yet how they are loaded exactly. Hope this helps a little bit though.
  10. ATPHHe

    getMusicPosition()

    Here you go, you can stop all music that is forced to play by muting like this. -- Mute Music getSoundManager():setMusicVolume(0.0); -- Unmute Music getSoundManager():setMusicVolume(getCore().getOptionMusicVolume() / 10.0);
  11. ATPHHe

    getMusicPosition()

    Ah, getPosition() doesn't work now that I have tested it. It's only mean't for "Music" objects and doesn't work with the "SoundManager" object.
  12. ATPHHe

    getMusicPosition()

    You're welcome. Glad to try and help out. Hopefully this function will be added sometime in an update.
  13. ATPHHe

    getMusicPosition()

    I looked all over the SoundManager class and could not find a way to get the timeline position of Sounds. The devs may have to add the function or feature for sounds, or the function "PlayAsMusic" would need to be finished.
  14. ATPHHe

    getMusicPosition()

    Ah, I took a closer look at "PlayAsMusic()" and I guess the function "getSoundManager():PlayAsMusic("1", obj, false, 1)" has not been implemented/finished yet. There's no getSoundPosition for sounds that I could find in the Decompiler yet. You can stop music with "getSoundManager():StopMusic()" You can try calling "playMusic()", then printing out the time. I used the parameter String "1". getSoundManager():playMusic("1")
  15. ATPHHe

    getMusicPosition()

    You can use "getSoundManager():getMusicPosition()". You can also test and play around with "getSoundManager():getPosition()". Both functions "getMusicPosition()" and "getPosition()" return only floats. To be exact, they both return Time Elapsed in milliseconds (ms). To get seconds, you need to divide the music position by 1000. local sound_position = getSoundManager():getMusicPosition() local totalSeconds = sound_position / 1000 I created a function that prints the time of the music being played in many various forms. You can choose which time formats you'd like from this, or you can edit or reference this code. -- Prints in various forms, the current elapsed time of the music that is currently playing. function printCurrentMusicTime(isoPlayer) local sound_position = getSoundManager():getMusicPosition() print(string.format("Current Music Time Elapsed (ms): %.2f", sound_position)) local totalHours = sound_position / 1000 / 60 / 60 local totalMinutes = sound_position / 1000 / 60 local totalSeconds = sound_position / 1000 print(string.format("Current Music Time Elapsed (hours): %.1f", totalHours)) print(string.format("Current Music Time Elapsed (minutes): %.1f", totalMinutes)) print(string.format("Current Music Time Elapsed (seconds): %.1f", totalSeconds)) local totalHoursRounded = math.floor(sound_position / 1000 / 60 / 60) local totalMinutesRounded = math.floor(sound_position / 1000 / 60) local totalSecondsRounded = math.floor(sound_position / 1000) print(string.format("Current Music Time Elapsed (hoursRounded): %.1f", totalHoursRounded)) print(string.format("Current Music Time Elapsed (minutesRounded): %.1f", totalMinutesRounded)) print(string.format("Current Music Time Elapsed (secondsRounded): %.1f", totalSecondsRounded)) local music_clock = millisecondsToClock(sound_position) print(string.format("Music Clock: %s", music_clock)) end -- Returns a clock as a String in "hh:mm:ss" format. function millisecondsToClock(ms) local sec = tonumber(ms)/1000 if sec <= 0 then return "00:00:00"; else local hours = string.format("%02.f", math.floor(sec/3600)); local minutes = string.format("%02.f", math.floor(sec/60 - (hours*60))); local seconds = string.format("%02.f", math.floor(sec - hours*3600 - minutes*60)); return string.format("%s:%s:%s", hours, minutes, seconds) end end Events.OnRenderTick.Add(printCurrentMusicTime) When this function "printCurrentMusicTime" is called, it prints the various time formats on console. Here's the actual SoundManager functions. I hope this all helps. Enjoy MusicTimePrinter.lua
×
×
  • Create New...