Jump to content


  • Content Count

  • Joined

  • Last visited

1 Follower

About ATPHHe

  • Birthday January 16

Contact Methods

  • Website URL

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.

  1. 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.
  2. 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.
  3. ATPHHe

    Help !

    Mods should not be inside "C:\Users\USER_NAME\Zomboid" Mods must be extracted to "C:\Users\USER_NAME\Zomboid\mods" instead.
  4. 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 -
  5. ATPHHe


    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);
  6. ATPHHe


    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.
  7. ATPHHe


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


    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.
  9. ATPHHe


    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")
  10. ATPHHe


    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 ti
  11. One solution is to change "MyClass:OnPlayerUpdate(p)" by removing the colon and replacing it with a period, "MyClass.OnPlayerUpdate(p)". I am not sure why this works, but it has to do with how . and : on "MyClass" both act with Zomboid's Events. local MyClass = {} function MyClass:new(o) setmetatable(o, self) self.__index = self --Events.OnPlayerUpdate.Add(self:OnPlayerUpdate) -- Error: function arguments expected near `)` Events.OnPlayerUpdate.Add(self.OnPlayerUpdate) return o end function MyClass.OnPlayerUpdate(p) print(p) end local o = {} local instance = MyClass:new(o)
  12. ATPHHe

    Get item ID

    Do you need the item ID from lua? If so, then you must call getID() of an "InventoryItem" object. local itemID = someInventoryItem:getID()
  13. You must iterate through the list of items that are participating in the craft from the "items" ArrayList<InventoryItem>. This for loop will iterate through each single item that is participating in the craft. The if statements will make sure to only give the correct DisplayName that you need for the "WorkItemName" varaible. I do not know which name you need so you'll have to play with this until you get a desired outcome. function recipe_WorkExampleCreat(items, result, player) for i=0, items:size()-1 do local item = items:get(i)
  14. Use the function "getPlayer():isFemale()" There's more ways to get some player's gender, but this is one way. "getPlayer()" is a global Project Zomboid function that returns an "IsoPlayer" object that is the client's character. https://projectzomboid.com/modding/zombie/Lua/LuaManager.GlobalObject.html https://projectzomboid.com/modding/zombie/Lua/LuaManager.GlobalObject.html#getPlayer-- "isFemale()" is a function of "IsoPlayer" which is inherited from the "IsoGameCharacter" class. https://projectzomboid.com/modding/zombie/characters/IsoPlayer.h
  • Create New...