#mod_portal
1 messages · Page 1 of 1 (latest)
Request
Modifying CraftRecipe for modders is too unclear and limited, it needs us to use weird script overrides using Load or field reflection a lot of the time.
Report
Adding a new tag to an item from Lua doesn't add this item to a craftRecipe inputs due to items with the tag being retrieved when loading scripts, which is done before Lua. The proposition would be to retrieve items from tags after loading Lua files which would make it better, or when loading a save.
^ Ideally, after sandbox variables are loaded and OnInitGlobalModData has executed so recipes changed by sandbox options can work properly.
Suggestion
Could the F11 debug menu, or something similar popup when we get a LUA compilation error when the game loads a save? (Maybe just in debug mode?) Even just a msgbox or something with the "Error on line 432 of yourfile.lua" text. Would save having to check the console.txt every time your game loads/watch for that brief 'error' popup as the game loads.
Request
It would be great to have a transparency map for vehicle textures, it will give other modders and me a great scope for creativity.
Request/Suggestion:
Uncap the max capacity of containers and character carry weight. Yes I know when setting it to something extra high it becomes weird with physics (at least, for cars), but adding those constraints just makes modding more annoying for modders. I still can come up with 3 ways to bypass it right now, but it's all weird and inconvenient solutions that don't need to be there.
TLDR: in base game people can't reach the hardcap anyway and modders can bypass it anyway, so it doesn't need to exist. Please remove it, so modders don't have to jump through extra hoops to do so.
Request
Please let the OnZombieUpdate event be called after super.update(). There are variables, such as the forward direction, that are assigned values in the super.update(). Which results into mods not being able to overwrite these values.
In my own mod I have an optional java mod that does this, and I haven't noticed any issues.
But it would be great if it were part of vanilla zomboid.
https://steamcommunity.com/sharedfiles/filedetails/?id=3174295288
Request
module Base
{
fluid SeaWater
{
ColorReference = LightSkyBlue,
DisplayName = Fluid_Name_SeaWater,
Categories
{
Beverage,
Hazardous,
Water,
}
Properties
{
ThirstChange = 30.0,
UnhappyChange = 20,
}
Poison
{
maxEffect = Medium,
minAmount = 0.3,
diluteRatio = 0.15,
}
}
}
I would really love having seawater fluid as a water tile option. That way, maps can have water features without trivializing water as a resource
**Request **
Please add an API to prune or compact player craft history to prevent player save bloat on heavily modded multiplayer servers.
Report
getType is missing for inventorymale in ISCraftAction.lua
function ISCraftAction:update()
--
if self.character and (not self.character:hasTrait(CharacterTrait.DESENSITIZED)) and self.item:getContainer() and self.item:getContainer():getType() and ( self.item:getContainer():getType() == "inventoryfemale" or self.item:getContainer() == "inventorymale" ) then
--
end
Request
Sandbox option to disable culling in multiplayer.
Right now culling makes it impossible to have high zpop server because zombies disappear the moment player turns away.
Spawning a horde also fails half the time just for zombies to appear out of nowhere after returning to the area.
Player can clear the area and relog thinking it is safe just to appear in the middle of the horde.
Thanks!
Report
Some recipes fail to complete the action when tags are used in input.
The crafting starts, gets to the very end of progress bar and nothing happens as if it was cancelled the very last moment.
The issues is hard to pinpoint and reproduce, some items matching tag in input work for recipe while others don't.
I spent hours trying to understand why it happens, it happens on different servers with different mods and with recipes from different mods, maybe it has something to do with the mods which adjust recipes through lua with Load() but then it also affects the recipes which are defined entirely in script file and are identical in syntax to vanilla game recipes, only "solution" I found is to replace i.e. tag[base:metalsaw] in a recipe with [Base.Saw], but recipe still can fail the same way when items are not in the inventory. Sorry for vague report, but issue exists and it is hard to tell what exactly happens.
--
Report
getScriptManager():getAllCraftRecipes() returns empty table on client in multiplayer.
Doing something like this makes it run only on server:
local multiplier = 0.5
Events.OnInitGlobalModData.Add(function()
local scriptManager = getScriptManager()
local recipes = scriptManager:getAllCraftRecipes()
for i = 0, recipes:size() - 1 do
local recipe = recipes:get(i)
if recipe then
local name = recipe:getName()
local time = recipe:getTime()
if name and time then
local newTime = time * multiplier
if newTime < 1 then newTime = 1 end
recipe:Load(name, string.format("{ time = %d, }", newTime))
end
end
end
end)
After that some players see the change in crafting UI while others don't but for those who don't the timed action finishes midway the progress bar which means it still uses the modified time.
Overriding time through script files directly works just fine.
__
Report
Getting SandboxVars during OnInitGlobalModData on client returns default values for options instead of the values set on the server.
The earliest event I managed to find which returns server's values for SandboxVars options is OnGameStart.
Would be good if client received SandboxVars from the server before it starts to load mods.
Thank you,
🐸
Request
Enable the ability for mappers to define custom jumbo trees. It seems it's just out of reach as we can create custom tiles with jumbo tree sizes in TileZed, but not be able to implement them in any way (at least in any workshop-friendly way) due to the larger trees only able to be defined as elements in NatureTrees.class.
We can sort of define new ones using the stuff provided in WorldGen/features/tree, but they don't appear to detect any custom tile from my testing in late 2025.
HUGE mapping potential if this is unlocked. As it stands, we're only able to replace vanilla jumbo trees, but it's not ideal if you want more trees than the initial few available.
Report
writeLog handle collision during simultaneous session startup.
When running a local server and client on same cache folder, both instances can initialize at the exact same second. This causes the PZ runtime to generate identical log filenames (e.g., 2026-03-01_19-01-00_ModLog.txt). The first process locks the file, causing the second process to lose its write handle, resulting in missing debug logs.
Report
.glb animation files are not hot-reloaded when modified like .fbx animations are. This is probably because ModelManager.AnimDirReloader's file extension check doesn't include .glb.
Report
The server does not give Lua a chance to say "yes" or "no" before a container changes.
When a client moves an item, the server's Java code handles it directly. Lua is not asked first. There's no hook like:
"Before moving this item, should we allow it?"
ISInventoryTransferAction is client-side only (unavailable on server). Vanilla code requirement causes a require failed (shared/ISInventoryTransferUtil.lua).
On server-side, ISTransferAction:transferItem is exclusively called by Transactions.dropOnFloor.
Request
A server-side Lua api that runs before the container is modified for container authority
Report/Request
About once a day, some new modder falls victim to the fact that you need a translation tag for an item to have >0 weight. Can this 'feature' please be removed as its confusing? If its required somewhere for items to have no weight (I don't know anywhere in vanilla that uses this and I'm not sure why weight=0 would not suffice, it seems to be a throwback from when items without a translation would not show up at all in inventories, a feature I believe we now completely lack?), some kinda boolean would be better and less confusing.
Report
Tooltips on mod options sliders do not work.
Report (last tested: B42.13)
Keys setting in mod options can use modifiers (alt or ctrl). Those modifiers are lost on game quit & reload. This is due to those settings being stored in java during the game and saved by lua by reading the java memory. Java memory interface for ctrl & alt modifiers getters are missing.
REQUEST
The ability to have clothing items work as radios is a thing, but it only worked with backpacks/back body group items last time I tried it.
Can we please get the option to define working radio clothing items for other body locations?
It's very well possible that this was fixed, so if it was, please ignore me.
REQUEST
Think we could get some built-in methods for region zone based zombie outfit and container overrides, kind of like the professionvehicles lua file?
Ideally it'd be built in to existing lua files.
Examples:
Distributions lua
PoliceLockers = {rolls = 4, Rosewood(RegionZone) = { "Rosewood-Item", 2,}, Generic = {"Generic-Item", 2,}, items = { "Normal-Item", 2,},
This basically defines 3 categories. A region zone. A generic fallback. And the normal items.
Whereas when populating loot, it will add what's in the region zone category if the container's in said region zone. If not, it will fall back to Generic.
The existing "items" category is just added alongside the zone specific stuff.
This should also be able to apply to vehicle trunks and gloveboxes/seats/etc.
We could also take this a step further and apply it to zombie outfits as well.
Say in zombieszonedefinitions lua:
table.insert(ZombiesZoneDefinition.Default,{name = "Generic01", replace={"Generic02"}});
This would replace "Generic02" zombies with "Generic01" zombies in the "Default" definition. (Globally, pretty much.)
Anyhoo, I wish you fellas the absolute best! Good luck with B42.
Report (multiplayer tested)
(Event) OnWeaponHitTree won't fire if player logs in with weapon on hands, requiring swapping at least once. This seems exclusive to OnWeaponHitTree and isn't the case for OnWeaponHitThumpable, OnWeaponSwing and OnHitZombie as far as I can tell.
REQUEST
Can project zomboid please clear its zombie folder on version change? I ask as a java modder.
Reason: Most java mods don't allow the game to load a save or fully launch when loaded by the wrong version of zomboid (Expected behavior). This is now a problem with B42.13/B42.14 because they no longer overwrite files there on validate/update of the game, so people who install the mod and switch versions don't get it automatically uninstalled anymore and can no longer load the game until they manually delete the zombie folder (And many forget it exists after a month of playing with a mod). Validation no longer fixes the issue as of B42.13/14.
Alternatively (I prefer this idea), could the zombie folder be renamed to something like.. 42.14.1\zombie (updated to match version number of course) And this would provide even better compatibility and easier install of java mods across multiple version of zomboid? (While automatically preventing zomboid from trying to load the wrong version java mod when it updates/changes version)
This would result in reduction of java mod related bug reports to TIS and improve overall player experience.
REQUEST
Report
ReplaceOnRotten is not currently functional in multiplayer, the items just become rotten versions of themselves.
Request.
Current:
Caused by: org.json.JSONException: Expected a ':' after a key at 13 [character 11 line 2]
Expected:
Caused by: org.json.JSONException: Expected a ':' after a key at 13 [character 11 line 2] /path/to/file
Request
Can we also have support for .jsonc for translation files? This would allow us to leave comments inside translation files without putting dummy value inside. For example:
UI_ETW_DelayedNotificationsStringAdd = "Qualified for gaining ",
UI_ETW_DelayedNotificationsStringRemove = "Qualified for losing ",
UI_ETW_DelayedNotificationsStringRemove___note_to_translators = "(Don't translate this, this is just info for you guys) UI_ETW_DelayedNotificationsStringAdd and UI_ETW_DelayedNotificationsStringRemove is used in combination with trait names, for example 'Qualified for gaining Hoarder' or 'Qualified for losing Unlucky'. You get the idea.",
instead of adding UI_ETW_DelayedNotificationsStringRemove___note_to_translators it would be very convenient to have a comment.
I assume these were locked under debug for security concerns, but would it be possible to replace these with something more secure?
getNumClassFields, getNumClassFunctions, getClassFunction, getClassField
There's a lot of cases where something is exposed but doesn't have a getter - and it's insanely useful to be able to at least read the value.
Previously only writing was debug.
I think, for modders the best option would be to check mod idea concepts in the debug (with this functions) or with java patches, and then request access to some API (which then will work without debug and java patches) in this channel.
Request
Please expose IsoSpriteManager.namedMap (a read-only copy would be fine).
Water Goes Bad previously used this to find tiles with specific properties and add MapObjects listeners for them spawning. This allowed it to catch valid objects spawning without using massively inefficient methods like scanning every object during LoadGridsquare. This does not seem to be possible anymore: you can get sprites with a specific name but not a list of all sprites.
---@type string[]
local waterObjectSprites = {}
---@type table<string, IsoSprite>
---@diagnostic disable-next-line: undefined-field
local sprites = transformIntoKahluaTable(spriteManager.namedMap --[[@as HashMap<string, IsoSprite>]])
for name, sprite in pairs(sprites) do
if sprite:getProperties():has(IsoFlagType.waterPiped) then
waterObjectSprites[#waterObjectSprites + 1] = name
end
end
MapObjects.OnLoadWithSprite(waterObjectSprites, waterObjectLoaded, 5)
Can we not answer in this channel to keep it clean please ? If everyone answers here to messages it's likely going to become a mess
I asked for threads to be available to us to Nasko for a good reason the other day, use that thank you
Request
I ask for BaseVehicle:Throttle, EvolvedRecipe:addIngredientIfCooked, EvolvedRecipe:canAddSpicesEmpty to have getters.
I think, for modders the best option
I forgot to request this, but parts of the recipe system aren't exposed entirely so once you start drilling into them with Lua you can't get certain objects.
Also, related, ParseScript() which allowed modders to generate a script in real time using only Lua seems to have been blocked unintentionally as now the world dictionary locks once written to.
My particular use case was creating a recipe that could be changed via sandbox option (parsed string on load).
Request
With the decomissioning of reflection could we get a cheeky exposure for CraftRecipe.xp_Award.class
I require getPerk and getAmount access to calculate XP values.
Thank you ❤️
Not sure if this is worth reporting - I personally wouldn't address it but:
If you use getActivatedMods():contains() in .14 you needed to add the slash- which broke now for .15. I know you made an effort to support the slash for the time being so thought you should know, @main rose
(I'm not sure how you'd go about overwriting this to catch it for that specific method but either way it's probably tech-debt to do so. 😅 More of a heads up than anything.
)
Request
Would it be possible to expose a getter inside WornItems.java
public List<WornItem> getItems() {
return this.items;
}
With the removal of reflection I am now unable to do:
local items = getClassFieldVal(wornItems, getClassField(wornItems, 1))
Which breaks the dynamics of my Transmog mod 😭
Request:
Make it possible to attach animals with rope to objects whose sprite has the CanAttachAnimal prop but is not in the specialObjects.
Right now if I do for example:
local HorseHitching = {
Sprites = {
"appliances_com_01_88",
"appliances_com_01_94",
...
}
}
local function addAttachmentFlag()
local sprites = HorseHitching.Sprites
for i = 1, #sprites do
local name = sprites[i]
local spr = getSprite(name)
if spr then spr:getProperties():set("CanAttachAnimal", "true") end
end
end
It will show the context option to attach the animal to the object, but it won't actually work unless the object is in the specialOjbects.
Duplicating an object from the objects to the specialObjects causes world corrupting bugs.
Request:
I would like to ask for exposing of Transform class to lua and implementing a getter for origin of Transform (No setter necessary for a vector).
This would re-enable custom vehicle movement, like flying vehicles, that previously relied on GetClassField
QoL
Sandbox options for vanilla have notes in the settings file for server hosts to have a bit more context when selecting features, for modded sandbox options there's no such comments - it would be nice if the tooltip text from those options appeared there.
QoL
Add some kind of "required mods" validation on server updates. If a mod updates and adds new dependency, server will update the mod, but it won't auto-download and enable new dependency so it ends up just proceeding without the mod (I think?), which in turn can easily nuke characters (and maybe some other consequences)
QoL
The 42.15 update blocks access to reflection, which causes problems for mods that were using reflection to get around a lack of API features. For Wear Anything With Anything, this breaks the mod when not running in debug mode.
I would like to request that the BodyLocation provides a way to clear the exclusion list, as the class allows adding new exclusions but not removing them or getting a full list of exclusions. Alternatively, add a method to get the full exclusive, hideModel and altModel ArrayLists (even as a readonly copy) and I can recreate all the Body locations one-by-one.
Request:
for events "OnZombieDead" & "OnCharacterDeath"
Add killer IsoGameCharacter (or nil) as 2nd parameter. Add kill source HandWeapon (or nil [Option: or Vehicle or ...]) as 3rd parameter.
Request:
Bug: (maybe it is not a bug, but a feature. if so, sorry for the noise)
Since B42.15, OnWeaponHitXp is not called anymore for (most) Range Weapon hits.
Reproduction:
Start a new solo game with a log added on OnWeaponHitXp Event
Get a magnum and 100 .44 bullets. Load the gun and kill zombies.
-> All zombies dead make kills increase.
-> Most zombies dead do not increase aiming perk current xp.
-> Most zombies dead are not associated with an OnWeaponHitXp Event log.
Another "Lack of reflection broke a mod" request: please expose IsoMetaGrid.zones and Zone.points so it is possible for mods to get information on foraging zones.
And my final "Lack of reflection broke a mod" request: give us a way to access the data that defines streets. Previously I did this with reflection on multiple classes (WorldMapStreetsV1, WorldMapStreets, WorldMapStreets...) but ultimately what I want is a way to access an array of streets and for each street the array of points that make up the street and the street width.
WorldMapStreetsV1:getAllStreets() returning an array of WorldMapStreet and WorldMapStreet:getPoints() returning an array of StreetPoints and exposing the various getters in StreetPoints would be perfect.
I can convert streets.xml into a lua table, but that will not work with map mods
REQUEST
The ability to have more than one animated mesh on an entity would open up many possibilities. For example; the current implementation for horse manes in the Horse Mod is just attaching several simple objects onto deformation bones which can look... rudimentary.
If we were able to have additional meshes that deform to the same armature, we could implement a much more rich and detailed system for customizing manes and tails. This would also potentially allow for deforming armor, saddles, and other forms of equipment. And I'm sure that being able to have multiple animated meshes would help many other people as well.
Obviously, it's not a simple request, but I thought that I should put this out there.
Request:
Suggestion
Would be cool if the game can register .ogg files through FMOD during runtime and from other folder inside Zomboid . Players want music without the hassle of mods, and registering them at load time is a bit of a waste.
Request: Shader API Exposure (Reflection-API-Dependent)
Summary: I need ShaderProgram / Shader ID / IsoCamera / Model & FBOTexture / Texture API exposed to have my ShadeHammer framework working again.
API Request: Expose & Add Graphics2D / BufferedImage API to Texture class and expose this to Lua.
I'd like to either pass a raw array of RGBA data or simulate / forward Graphics2D API from Java's Image API to Texture constructors to wrap, render, store, and dynamically process image data.
This would:
- Allow for SVGs (Vector), TrueType Fonts through Java & Lua.
- Caching dynamic images to textures & Files.
- Allow transmission of image data through possible LuaNetwork for Multiplayer Features like Faction banners.
It'd open up a lot of opportunities for better UI drawing.
API Request: Secondary Lua Worker Thread API
- Context: Lua isn't threaded however Java is. What can't happen is the environment for each instance of a Kahlua2 environment is not shared so code cannot talk to each-other.
- What can happen: A sanitized Lua execution can occur in a thread pool that can return primitive data.
- Why is this useful?
- Heavy calculation tasks such as:
- Encryption
- Image / Data processing
- General Computing (that would stall the game thread)
- Heavy calculation tasks such as:
I cannot currently use PZ to encrypt my network traffic effectively so using SHA256 encryption is not possible. (Even with emulated Bitwise Operations in Lua 5.1)
I could render graphics and perform tasks that could return as callback promises through a very simple API that could register worker tasks in a sort-of pooled solution that could offload these tasks to prevent stalling the game's main thread. This would open up more complex mods like advanced anti-cheats written by communities or advanced mods that requires a lot of processing in-game to function and provide cool features.
API Request: Bitwise Operations methods in Global API
-
Context: Kahlua2 is emulating Lua 5.1 which doesn't support primitive integers like 5.3 and 5.4, so we lack integer math operations.
-
Why is this useful?
- Encryption
- Faster math for certain integer-based calculations / operations.
- File-data I/O processing.
-
Implementation: Very simple. Pipe Java functions to the Lua annotations to a class or directly. Here's an old class I wrote that was injected to do just that:
https://gist.github.com/JabDoesThings/1f6406caf5849b49aa528f9e149277ed
API Request: Expose all Vector and Matrix classes provided by LWJGL / Math Library
- Context: The game exposes some of these classes and they are used for general vector / Matrix maths.
- Why is this useful?
- 3D Model transformations.
- General UI transformations.
- You can do a lot in
Quaternion&Vector4fwhich isn't exposed.
Request: better exception handling for .json errors in translation files. As of now, an error will literally send you into purgatory and crash the game. While I understand it is the responsibility of the mod author to check the file for correctness, there should be better exception handling so that servers are not at the mercy of rogue mod updates that brick the game.
Request: better exception handling for .
Request.
Context: I was making accessibility patch which renames Keen Hearing to Keen Perception and allows to take it together with Hard of Hearing or Deaf.
Keen Hearing is a must have trait when playing with sprinters and even with it people who have hearing issues are still at disadvantage. Such change levels the ground a bit and also allows regular players to experience deaf characters without impacting the vision.
The issue is that Hard of Hearing stacked with Keen Hearing reduces the rear visibility by 1 tile (~5 tiles -> ~4 tiles), Deaf doesn't do that.
Without Keen Hearing there is no real difference in distance at which zombies become visible from behind between Hard of Hearing and Deaf (~3 tiles).
It would be nice if neither Hard of Hearing nor Deaf would further reduce the rear visibility, there's no need for that from both gameplay and accessibility standpoint.
(In b41 there was visual indicators mod which was targeting people with hearing issues but it did hurt the experience more than it helped because of the screen pollution it caused when there was too many noise sources around. As a result people with hearing issues didn't use it at all and people who have normal hearing abused it as zombie radar lol)
Thanks.
Request
Events.OnModOptionsChange and Events.OnSandboxOptionsChange would be nice to have :)
Request
Request: additional setters and boolean for custom stat overwrite in IsoZombie so that modders have more granular control over zombie stats (speed, hearing, cognition, sight) without having to resort to Sandbox shenanigans
// Request public flag to protect modded zombies from Sandbox syncs
public boolean hasCustomStats = false;
// Request new custom setters for modifications to zombie stats that do not follow default Sandbox settings
public void setCustomCognition(int cognition) {
this.hasCustomStats = false;
this.cognition = cognition;
this.hasCustomStats = true;
}
public void setCustomHearing(int hearing) {
this.hasCustomStats = false;
this.hearing = hearing;
this.hasCustomStats = true;
}
public void setCustomSight(int sight) {
this.hasCustomStats = false;
this.sight = sight;
this.hasCustomStats = true;
}
public void setCustomZombieSpeed(int zombieSpeed) {
this.hasCustomStats = false;
this.doZombieSpeedInternal(zombieSpeed);
this.hasCustomStats = true;
}
// Update existing methods to respect the protection flag
public void doZombieSpeed(int speed) {
if (this.hasCustomStats) {
return;
}
this.doZombieSpeedInternal(speed);
}
public void DoZombieStats() {
if (this.hasCustomStats) {
return;
}
// ... existing DoZombieStats Sandbox logic ...
}
// Update resetForReuse() in IsoZombie and VirtualZombieManager to reset the flag to default false
public void resetForReuse() {
this.hasCustomStats = false;
// ... existing resetForReuse code ...
}```
Request: public getter setter for nametag / label string in IsoPlayer / IsoGameCharacter
- Why is this useful?
- Twitch integration for zombies using streamer names
- General labeling for possible NPC mods / boss zombies / pet names
REQUEST: Currently if you use getWorkshopID locally (development/testing) it is nil. It can look at the workshop.txt for it's workshopID as a backup -- this would make testing mods a bit easier -- (#mod_development message)
REQUEST Can we get some access to vehicle/room stories in LUA? Ie: can the vanilla calls to create storie items please be routed through LUA (back to the existing java functions) like onCreate and such functions for regular CraftRecipeData do?
Some people want to delete some stories (Easy enough if its a LUA callback to just make a function return without doing anything), others want to modify them (Again easy with a LUA callback).
Creating new stories would require replacing existing ones (Again easy), or the ability to define entirely new stories that could spawn (A little more work but likely worth it when you consider what an entire community of modders creating new building/car stories could accomplish in fleshing out the world)
I second the request for a way to add more random stories via LUA. You've seen what can be done with "random" stories like the new sendos in 42.15, just think of how much depth modders could add to the world if we had access to the ability to make new stories via LUA.
Request: in the VirtualZombieManager class, relocate LuaEventManager.triggerEvent("OnZombieCreate", zombie); in public IsoZombie createRealZombieAlways(IsoDirections dir, boolean bDead, int outfitID) to fire after the onlineID is assigned.
Passing down the online ID as part of the lua event (instead of it being default -1) will allow more granular control for custom zombie logic.
Request: getters for Zombie speed, cognition, and hearing in IsoZombie since java reflection is no longer possible
// Request new getters for speed, cognition, hearing
public void getCognition() {
return this.cognition;
}
public void getHearing() {
return this.hearing;
}
public void getSpeed() {
return this.speedType;
}
API Request: Revise UIFont Enum API calls to allow passing through an AngelCodeFont instance for custom fonts.
This one's pretty straightforward. Many people have asked for custom font support and it is already possible. The issue is that in order to use a lot of the current ISUI library, the font-rendering code needs to be duplicated, extended and modified to support drawing custom fonts.
Possibilities to get setter and getter for all stats on weapons? With the Possibilities to maintain persistence to allow dynamic manipulation via LUA
Possibilities to get setter and getter
Report
Custom Perk indices do not match between server and client. I'm working on an MP mod and wanted it to be able to work with Custom Perks added by other mods, so I grabbed a few B42.15 mods that add perks, and noticed some issues with my mod because it relies on the indices. Did some quick prints over PerkFactory.PerkList and this is what came out for one of the example mods:
name: Scavenging, index: 46.
Server: OnServerStarted
name: IGUI_perks_Scavenging, index: 47.```
Request
Would be nice to have an OnPlayerLeftFaction event or similar. My specific use-case is Client side for the local player only, but could be handy elsewhere.
Currently having to cache the faction from either AcceptedFactionInvite or via grabbing it in the first OnTick (OnGameStart is too early, Faction.getPlayerFaction always returns nil). Then I have to check against that cached value in an Every___ event.
I tried hooking into the SyncFaction event, but I don't recall it being invoked when my local player left the faction.
Report
Something with register after today's update.
Example:
In /scripts/SWGladiatorChallenge_character_prof.txt
module SWGladiatorChallenge
{
character_profession_definition SWGladiatorChallenge:SWGLADIATOR
{
CharacterProfession = SWGladiatorChallenge:SWGLADIATOR,
Cost = 0,
UIName = UI_prof_SWGLADIATOR,
UIDescription = UI_profdesc_SWGLADIATOR,
IconPathName = profession_SWGLADIATOR,
XPBoosts = Fitness=-5;Strength=-5,
}
}
In /media/registries.lua
SWGladiatorChallenge = {}
SWGladiatorChallenge.SWGLADIATOR = CharacterProfession.register("SWGladiatorChallenge:SWGLADIATOR")
In /shared/SWGladiatorChallenge_registries.lua
return SWGladiatorChallenge
In /shared/SWGladiatorChallenge_SetTraits.lua
local SWGC = require("SWGladiatorChallenge_registries")
local gogolTraits = {
"AGORAPHOBIC",
--plus bunch of traits
}
local gladiator = CharacterProfessionDefinition.getCharacterProfessionDefinition(SWGC.SWGLADIATOR)
if gladiator then
for i = 1, #gogolTraits do
gladiator:addGrantedTrait(CharacterTrait[gogolTraits[i]])
end
end
CharacterProfessionDefinition.getCharacterProfessionDefinition(SWGC.SWGLADIATOR) is nil unless SWGladiatorChallenge.SWGLADIATOR = CharacterProfession.register("SWGladiatorChallenge:SWGLADIATOR") is commented out in registries.lua which is opposite of how it should be.
In both cases modded profession exists in profession screen.
CharacterProfessionDefinition.getCharacterProfessionDefinition works fine with vanilla professions.
CharacterTraitDefinition.getCharacterTraitDefinition works fine for both vanilla and modded traits.
Thanks
Meta-request: Please stop releasing updates without changing the version number. I know the git hash changes, but we shouldn't have to use that to find out if 42.15.2 is actually 42.15.2 or if it's 42.15.2: Part II
Meta-request: Please stop releasing
API Request: Allow takeScreenshot() to save to ~/Zomboid/Lua/ directory
Currently takeScreenshot(filename) saves to ~/Zomboid/Screenshots/, but getFileInput() can only read from ~/Zomboid/Lua/. This makes it impossible to read screenshot data from Lua.
Use case: server-side anti-cheat for ESP/wallhack detection. The most common PZ cheats patch the Java jar or inject via javaagent - the ESP rendering happens inside PZ's GL pipeline, so
glReadPixels (used by takeScreenshot) captures it. Screenshots are the hardest thing for cheats to fake - spoofing glReadPixels requires re-rendering a clean frame, which is far more complex than
hooking a simple hash function.
This doesn't expand the Lua sandbox - takeScreenshot() already captures the full game window. It just writes to a directory Lua can't access.
Suggested solutions (any would work):
- takeScreenshotToLua(filename) - new function that saves to ~/Zomboid/Lua/
- Extend getFileInput() to also read from ~/Zomboid/Screenshots/
- readScreenPixels(x, y, w, h) - returns pixel data directly as a byte array without touching the filesystem at all
The cleanest option is probably readScreenPixels() since it avoids filesystem entirely and gives modders exactly what they need - pixel data from the current frame.
Report
Native linux version (wayland), no popup appears regardless of mode and game is just frozen the moment you click upload, no errors in logs or anything at all.
Request
I’m working on a larger Java-side mod that interacts with Project Zomboid’s local SQLite database, and wanted to ask if there are any plans to expose an official API or bridge for modders to access these databases (especially things like the player table).
Right now I’ve implemented my own solution using a Java agent, custom loader, and bridge layer to execute database queries and expose methods back to Lua. It works, but it’s obviously a custom approach, so I’d prefer to align with an official system if something like that is planned.
For context, my current setup is roughly:
• Java agent injects into the PZ JVM
• Loader discovers and initializes backend modules
• Bridge exposes Java methods to Lua
• SQLite is accessed directly via JDBC for reads/writes
My main goal is to reliably access player-related data (IDs, etc.) so I can build additional server-side systems and tables tied to those primary keys.
Totally understand if this isn’t on the roadmap, just wanted to check before going further down this path. Happy to share more details if helpful.
Direction of this has slightly changed to be more encompassing but, relative point/question still remains.
Request
Workshop Upload Bug (MacOS, Tahoe)
Request: Add "Mute Main Menu SFX" settings option for lightning & misc sounds on the main menu.
- Why?
- When debugging mods, this becomes annoying.
Request: Allow downloading mods while Project Zomboid is open; allow updating workshop mod files (on local storage) when in the in-game menu (not in a server or in a save).
Being forced to close Project Zomboid, download a mod, then reopen Project Zomboid is tedious / clunky; similar feedback regarding updating mod files.
The mod files that are downloading will (should) be ready to use / activate once a player exits a save / server (and is in the main menu).
Request
Expose the jniTransform FieldNum in BaseVehicle
Mods that add Airborne vehicles (such as helicopters) use this field to get and set vehicle positions. AFAIK There's no other way to get transform outside of reflection.
If we had a way to get jniTransform, mods like this: (https://steamcommunity.com/sharedfiles/filedetails/?id=3409723807&searchtext=helicopter) would work again.
API Request: Categorical / Grouped API Permission Configuration for PZ Mods
-
Why?
- In situations like Reflection API adding a dimension of attack-surface for malicious actors to exploit, API calls from mods with permission flags for said API categories / groups could be presented as a dialog when enabling mods to prevent users from unknowingly and silently enabling mods to have full access to the game's API for future zero-day exploits.
- This would help with mod API maintenance for situations involving security risk while providing both modders and players with the ability to mod PZ with features considered dangerous to enable for everyone.
- This puts the burden on malicious mods to let the user know that they're needing a certain API to do what they need to do.
- This puts more power in the player's hands without robbing existing features in the game from future security threats from existing API.
-
How does this work?
Making the mod:
- A modder makes a mod project. In this example they need Lua Networking API.
OnClientCommand / OnServerCommand - The modder adds permissions to their root configuration:
- A modder makes a mod project. In this example they need Lua Networking API.
permissions:
- lua-network: true
- The modder makes their mod and publishes to the workshop.
Enabling the mod:
- A player installs the mod through Workshop or through in-game.
- A player either joins a server for the first time since a mod was added, removed, or updated with new permissions.
- A player is asked to accept or reject the mod, showing a dialog window and the permissions requested.
- If a player accepts:
- Great. They can load normally and play the game.
- If a player rejects:
- The mod is not enabled. If joining a server, the player disconnects and goes back to the main menu.
**NOTE: This is not an argument to add Reflection back into the game's non-debug mode. This is a proposal for future features and overall API. **
Bug: (maybe it is not a bug, but a
Update ModTemplate
Request
Could you, if possible, reintroduce the option for ambient sounds in B42? It seems to have been removed in B42 (Not an option anymore under Audio/Sounds) and, if I understand correctly, is now clamped in the Java Core. Sound design and ambient sound suppression for certain mods were a key part of the workflow; whilst this hasn’t completely disappeared, as a modder you now have very few options to suppress the standard ambient sounds and play your own ambient sounds for a specific area instead.
You can still play them, but they blend in with the maximum ambient sounds around you - which is a mixed result, at best.
Request Option for silent main menu. Many modders spend a long time at the main menu while editing their mods and testing. It would be nice to not have periodic 120db thunder crashes while working. (I'm sure various TIS Q/A staff would appreciate it as well).
Request
Completing on the previous requests regarding the sounds on the main menu, there is in general a serious lack of sound volume handling for mods, the current system doesn't allow sounds to be automatically managed by the sound options of the game.
This is absolutely terrible as often modders will either adjust the volume of the sounds they play to their personal settings because they don't realize the game doesn't automatically handles the volume and so they think the problem is their sound file.
Or we end up having to reprogram a whole volume handling system just to play sounds at proper user sound settings, often having to add our own sound bars to a mod option or to hijack the sound options to add an extra volume bar for our own mods.
This is becoming a serious problem, especially considering there's a category parameter for sound scripts which should be handling all of that for us, but right now it doesn't do anything and every modders end up having to add a whole sound system to their mods just to play one or more sounds.
This is notably something we had to do for the Horse mod with a sound system which adjusts the Horse volume based on distance from the player, based on user settings, based on the material the horse walks on etc.
Request: Can you expose zombie.core.physics.CarController?
I see new 4 new public accessors in CarController.java as of B42.15, very cool! (Although isBreak() and isBrakePedalPressed() are duplicates)), but CarController is still not an exposed class to LUA even though there is a public accessor (BaseVehicle:getController()) for CarController instances.
Request
Can you provide a getter for zombie.SoundManager.musicEmitter, so main menu music customisation can be functional again?
Cheers.
Request: Report failed checksum files to the server as reports.
- Why is this useful?
- Seeing failed files could show (if attempted cheating is occurring) what the user has wrong.
- This is useful for inspecting cheating attempts and multiplayer mod debugging.
Report
the OnFillContainer event sometimes passes a ItemPickerContainer instead of an ItemContainer when filling sub-containers spawned inside another container. This is probably not intentional, as it makes the event completely useless: we don't even know what container is being filled.
Report
Request: A way so that a mod's translation files can be all in 1 json file? Sometimes mods have maybe 3-5 things to translate, and due to the organizational requirement vanilla files need this may result in mods having 5 files with 1 line each. Perhaps the translator can have a "special" json file to look out for which has an extra nested layer for translation file IDs?
example: modTranslation.json (
boilerplate name to denote its for mods)
{
"ItemName": {
"Base.SkillRecoveryBoundJournal": "Bound Journal"
},
"Recipes": {
"BindSkillRecoveryJournal": "Bind Skill Recovery Journal"
}
}
Request: A way so that a mod's
Request: provide some way to interact with tooltips. (mainly adding things to tooltips, but removal would be nice too) This used to be possible via reflection (starlit library had a a number of tooltip manipulation functions) but now that is no longer possible in 42.15.
Request
Food item types do not have a getFertilizedTime getter method, only the setter is available. This means it isn't possible to determine how soon an egg will hatch in lua.
Report
Translations for craft categories don't function, both vanilla and modded.
Here is example from vanilla IG_UI.json:
"IGUI_CraftCategory_Farming": "Agriculture",
Report
Report
/maps (i.e. /maps/coolmap/spawnpoints.lua and /maps/coolmap/map.info) only works if located in /common/media/
Game ignores it if placed in let's say /42/media/ (spawn points etc. won't appear in selection list)
Request
setFree(boolean) method for CharacterTraitDefinition
Use case:
- Allows to hide traits without the need to override the script file (server/challenge setting)
- Allows to set traits as unique to professions from lua, useful for mod compatibility (i.e. creating professions/traits add-on/overhaul mod or a separate mod or vanilla game)
Example usage:
local claustrophobic = CharacterTraitDefinition.getCharacterTraitDefinition(CharacterTrait.CLAUSTROPHOBIC)
claustrophobic:setFree{true)
Thanks,
🐸
Request: provide some way to interact
Suggestion: Would really like to have an Event OnPlayerAutoDrink
Suggestion
Mapping stuff too?
A while back, Rocco put together a small tool for himself that displays the room definition, along with the containers assigned to that room and their items.
It would be great to have something similar in the mapping tools/BuildingEd. The upcoming tools already include a new room dropdown list, but it would be even better to have a catalog for quick reference, showing containers/items for rooms like on the Picture. It does not really matter where this is integrated, but having something like that would make mapping much easier for many people, without needing to keep multiple lists open on the side.
Request: For BaseSoundEmitter:SetPitch() to not spam Set pitch for Instance in the debug log, with logging level 'general'/'general' as I set it every frame per vehicle and it creates thousands of lines per minute of debug spam that can not be disabled without disabling all 'general' logging. Sound/Trace would be a better category for that info.
Request: Ignore Lua files that has in the first line:
--- @meta <module>
- Why?
- These are non-executable files used to define API in common Lua annotations services such as LuaLS / LuaCATS & EmmyLua
Wait what? This exists? Can I use this instead of in-game mod management?
This is not the chat for it, please move this out of here
API Request: add http://localhost:<PORT> & https://localhost:<PORT> to the URL whitelist.
- Why?
- This would solve a lot with posting information from Lua for server third-party services like Discord or map location viewers.
This wouldn't allow requesting information from a URL but posting information would work without writing a file-network service which is currently the only way to do such things without modifying the engine.
Request
Would be great if OnPlayerDeath event would work on server the same way OnNewGame does.
Right now there is no way to trigger certain server authoritative actions when player dies in multiplayer.
Thanks.
Request
A setting to disable reflection in a debug environment. Would greatly speed up the process of fixing mods due to the change regarding it.
Request
A lua function in BaseVehicle to check if the vehicle horn is active.
Boolean isHornActive()
Minor Request
Would be nice if someone did a pass on naming consistency in your guys strings. Stuff like "UI_trait_heartyappetite" or "UI_trait_lighteater", while everything else is properly CamelCased, like "UI_trait_SlowHealer". Probably worth putting on TODO list with like lowest possible priority, but still 
Report
When an IsoThumpable object is created from the building menu, it's going to create the thumpable taking from the entity scripts data. One of the things it does is GameEntityFactory.instanceComponents on the new entity with the entity scripts data to properly initialize the different components. This will call CreateComponentFromScript which for FluidContainer components will set the value fillsWithCleanWater to the current script value.
When there's a FluidContainer component on an entity being loaded from a save with load, fillsWithCleanWater does not get set. This means that any time a rain collector gets created with the fillsWithCleanWater to true, it will not be set back to true when reloading the save
Request
Allow to switch between debug and normal mod from a button on the main menu page (bottom right?).
Request: I thought this was a thing already-- but having a FileWriter point to the current save game's folder would be helpful for configs and such.
Currently if you wanted a file written for use with a particular save you have to create your own organization structure within cache/Lua/
The alternative writer points to the mod's own install folder -- which I don't even think is a needed feature tbh. 😅
Edit: there's also a sandbox (presets?) writer but equally not useful I think.
Request:
Remove from "Select Occupation and Traits" presets, the presets that include non-available traits or occupations.
Notes: Occupation and Traits may not be available after game version change and after mod selection change.
[option] Add a tick box to reactivate those (default: false). In case someone wants to adapt an old preset.
Report/Request
Game doesn't flush some data/assets from the memory when player switches between different game modes or saves. This sometimes leads to textures, tiles, animations data, 3d models being broken/incorrect and potentially some other issues (as well as multiplayer exploits which as you might guess not caught by checksum). The issue exists since at least b41. Reset Lua doesn't help with that either. I post this here because people then come to mod pages and report bugs which have nothing to do with the mod itself.
Report/Request
The clothing.xml file requires you to redefine the GUID of clothing items in the FileGuidTable.xml file in your mod to be able to reference vanilla items. This makes the whole thing a bit confusing and annoying to handle as you need to copy every entries from the vanilla FileGuidTable.xml into your mod anytime new clothing items are added, if you ever want to use them in your clothing.xml
Requests
craftrecipe lack the api to programmatically via lua to disable or hide specific recipes. There used to be api for this back in b41.
Programatic adjustment or recipes in general would be nice. And a way to make them rebuild their lists of valid items, so if you use lua to adjust item tags the new tags actually make items valid for recipes that use them.
API Request: Add banuser, banid, banip and kickuser to Lua API
Why?
- Server-side third-party tools or anti-cheats can detect malicious activities and cannot kick the player without editing the Java engine to support these API calls.
Request: Server authoritative teleport calls with out the need of a(n admin or) client triggering the process (useful for events and such)-- seems like teleportTo() and teleportto/ are finnicky and has security checks wrapped in making it only really work for admins (unless I'm missing something). Alternatively, setting XYZ works client-side which it probably shouldn't(?)
Request: OnSave or similar event for MP cases.
Feedback
I am not a fan of registries.lua as that file literally is lua thus one can just run any lua codes in it. Given that many modders in the community hate OSS aka strong sense of ownerships to the codes and assets aka will dcma anyone for forking. Thus to mod the mod (like how modder mod the base game), you will have to use those mods as dependency. However, registries.lua cannot be overriden thus modders literally can do all kind of bs in it including bs that break the game thus you can never ever write patch to such a mod without forking a complete standalone.
Security Request: run Zomboid in Low Integrity mode; the mode intended to sandbox low-security applications and limit their filesystem access. Patching up every function call that writes to disk one-by-one is good, but if the game's executable could not write to anywhere outside specific low-security folders that would be even better. Especially with the increasing prevalence of java mods, which can bypass any security the relies on java code restricting what can be written.
Report:
The player position is not correctly taken into account for masking while inside a vehicle.
See exemple video: https://www.youtube.com/watch?v=dLDJIGFUX38.
Note: this problem is present since first B42 publicly released version.
Note 2: People with more knowledge than me say it is a Vanilla shader problem.
Note 3: This occured with all vehicle mods that do not hide entirely the player. Not only motor "bike" mods and quads. even if it is more obvious on those.
This started with first version of B42 afaik.
Suggestion: rework 0-100% condition-based DrainableComboItems like gas mask/respirator filters to store their condition in a normalized state, independent of its specific value of "useDelta"
I tried to make a simple mod to provide a sandbox option to scale filter durability, but found that the obvious methods for changing "useDelta" don't affect the durability of filters already in-world. if you spawn a gasmask filter (at 100% condition), reduce its useDelta from 0.01 to 0.005 in an OnInitGlobalModData event, and reenter the game, you'll find that same filter now at 50% condition. that 50% is consumed at the new useDelta rate, but its total lifespan is the same as it was before. new items are correct
despite references to "usedDelta" in the java that can report the condition as a fraction between zero and one, my guess is that the actual stored quantity is effectively "remaining number of integer uses" (in effect, initialized at item creation to 1/useDelta and integrally decremented, rather than initializing to 1 and reducing by useDelta). because the original useDelta is baked into the item's state, it means that we don't have an easy way to affect the capacity of items already in the world, and that the obvious parameter has not-obvious caveats
Feedback
I noticed recently security has been a major concern for modding thus I would like to inform you the greatest security flaw with your writer is the allowance to write any file extensions like exe, bat, sh, html, reg, cmd, ps1 etc etc. If you find this feedback helpful, please give me a like.
Feedback
The issue is back. And this time it also apparently breaks the steam itself (can't open any new steam related UI elements). Had to actually killall -9 steam to be able to restart it.
Added: -cachedir= stopped to work for proton version of the game (i use proton version of the game to upload when native is borked)
The issue is back. And this time it also
Request
Unlock /say and /shout on single-player mode.
We have some mods, such as https://steamcommunity.com/sharedfiles/filedetails/?id=3697471948, that would benefit from the ability of having a /say in single-player mode. Even if there are no other players around, this can be nice for roleplay, and/or interaction with custom mods.
BUG REPORT
inventoryItem:getColor():getR() returns a different value (this.col.getR()) than inventoryItem:getColorRed() (this.colorred)
setColor() only sets this.col, some code does setColorRed+setColorGreen+setColorBlue+setColor, other only calls setColor
Seems prone to bugs (I found vanilla spawned socks to have 1 for getColorRed() but other random values for getColor():getR()
Seems like there should really only be one set of color values in an object.
Request
Color:GetA() doesn't exist. No way to get alpha from a Color via LUA.
Broken Mods Due To Change: WeaponReloadType have been changed to an enum, but there no way to add extra values. This means mods that add custom reload types (lever action animations, bows, sawed off rifles with a fancy twirl) no longer work.
Please provide a way to register additional WeaponReloadTypes, in the same way we can register new body locations/traits/tags/etc via registries.lua
Request
The game has a shadow system under cars, you can change shadowExtents, shadowOffset and textureShadow, but there is no main setting such as shadow intensity, I would like to control this too, so it would be wonderful to have such a feature.
BUG REPORT
Request
zombie/characters/WornItems/PersistentOutfits.java
Change Rand.Next(500) to Rand.Next(32767)
Reason: allow persistent outfit id to be as close to unique as possible. Currently in a sample pool of 1000 randomly spawned zombies, 150 zombies will have duplicate ids. Increasing Rand.Next range from 500 to 2^15 will effectively make persistent outfit id statistically unique. This can be very useful for custom modded zombies that do not rely on a specific outfit. A maximum range to 2^15 respects the limits of the 32-bit integer of the persistent outfit id.
public int pickOutfit(String outfitName, boolean bFemale) {
// ...
//int variant = data.useSeed ? (int)Rand.Next(500) : 0;
int variant = data.useSeed ? (int)Rand.Next(32767) : 0;
// ...
Request: can we please have some way to set an animation variable to override the aiming/firing animations used by weapons. Right now all ranged firearms are a pistol or a rifle held at eye level; there's no way to properly add bows or firearms held in any other pose (such as hip-firing a heavy weapon or even just adjusting where the hands are so they line up better/use a vertical foregrip.) There were some workarounds used pre-42.16 but those no longer work (and to be honest I have no idea why they worked, just that they did)
It would make sense to extend this capability to melee weapons as well, though there is less need there because of the number of vanilla options.
Request: can we please have some
Request
Change 1000.0f to 100.0f for health packet and health setters in NetworkZombieAI, NetworkZombiePacker, and NetworkZombieSimulator classes.
This will reduce to 2 decimal points of precision (down from 3) but allow a maximum health of 327.67 instead of 32.767 which will be a huge improvement for "boss zombie" style mods.
NetworkZombieAI
public void set(ZombiePacket packet) {
// packet.health = (short)(this.zombie.health * 1000.0f);
packet.health = (short)(this.zombie.health * 100.0f);
}
NetworkZombiePacker
private void applyZombie(IsoZombie zombie) {
//zombie.setHealth((float)this.packet.health / 1000.0f);
zombie.setHealth((float)this.packet.health / 100.0f);
}
NetworkZombieSimulator
private void parseZombie(ByteBufferReader b, IConnection connection) {
//zombie.setHealth((float)packet.health / 1000.0f);
zombie.setHealth((float)packet.health / 100.0f);
}
BUG REPORT
foodSicknessChange property defined in fluids is not working properly:
- drinking any amount of a liquid with any (positive)
foodSicknessChangevalue doesn't do anything - The value logic seems inverted compared to foods, where a negative value decreases sickness and a positive increases it. Maybe this is intentional now, if
Poisonis supposed to handle the bad part instead? - The property is defined as an
int, while the rest arefloat - The ig debug tooltip also doesn't show any info about it, only the fluid script debug window
note: no vanilla fluids currently use this property, so it's more of a mod problem for now
Request: Add additional ammo type definitions, even if they are not used in any vanilla weapons or loot tables. Doesn't need to cover every cartridge in existence, but at least a good selection of different sizes so modders can pick the closest one instead of every firearm mod adding it's own bullet items. .22LR, .50BMG, 5.7x28, 10 gauge shotgun, 4 gauge shotgun, .410 shotshell, some anachronistic stuff like .300 Blackout and 6.8mm, probably a few more I'm not thinking of right now.
The goal is to improve compatibility between firearm mods. There's no need for unique models/textures to be added, just having the item definitions be consistent would be enough meaning the only work needed would be the script (and the associated planning/testing/documenting/etc time that every programming task ends up needing)
Report
The parameter frontEndHealth is never parsed in the vehicle scripts because the VehicleScript parser for parameter does not parse the key frontEndHealth but frontEndDurability instead
} else if ("frontEndDurability".equals(k)) {
this.frontEndHealth = Integer.parseInt(v);
It is the exact same problem with readEndHealth which is not parsed by rearEndDurability instead
} else if ("rearEndDurability".equals(k)) {
this.rearEndHealth = Integer.parseInt(v);
Request:
Expose zombie.entity.components.fluids.FluidInstance please. Thank you.
Request:
Cars to use vehicleObject.getEnginePower() and not vehicleObject.getScript().getEngineForce() for determining HP in 'ForwardNew()' in carController.java. (Reported as a bug for B42.11, still not fixed). Currently cars induvial HP only sets acceleration in reverse. Vanilla code AND mods both set the value vehicleObject.getEnginePower() uses.
Request:
IsoZombie.java
? (thisToOther.getLength() < 1.5F ? 0.5F : 0.0F)
: 1.0F;```
this will crash if otherPlayer does not exist.
This should be safeguarded by extra null check:
```float carObstacleMod = intersectVision && otherPlayer != null && otherPlayer.getVehicle() == null
? (thisToOther.getLength() < 1.5F ? 0.5F : 0.0F)
: 1.0F;```
The otherPlayer != null is a constantly used in SpottedNew function as clearly the intention was to make it work universally for IsoMovingObject, not just IsoPlayer. This is a minor yet clear oversight that does not manifest in vanilla, but if this function is used with a non IsoPlayer moving object it will break.
Why is this important for the community? In my Bandit based mods I am unable to use this function so that zombie sets target on other bandit(also IsoZombie). I have a workaround that is far from good. All is needed is this one extra null check and all my mods will get a significant quality boost.
Report
Zomboid doesn't load ActionGroups from mods, even thought it is supposed to. The main problem of it is because the game only looks for the files inside the game's canon path and ignore mods. Even though mods have listeners that trigger actiongroups reloading when messing around with the files, and a path for the folder.
zombie.characters.action.ActionGroup
private void load() {
String name = this.name;
DebugType.ActionSystem.debugln("Loading ActionGroup: %s", name);
File actionGroupFile = ZomboidFileSystem.instance.getMediaFile("actiongroups/" + name + "/actionGroup.xml");
if (actionGroupFile.exists() && actionGroupFile.canRead()) {
this.loadGroupData(actionGroupFile);
}
File folder = ZomboidFileSystem.instance.getMediaFile("actiongroups/" + name);
File[] listOfFiles = folder.listFiles();
if (listOfFiles != null) {
for (File stateFolder : listOfFiles) {
if (stateFolder.isDirectory()) {
ActionState state = this.getOrCreate(stateFolder.getName());
String statepath = stateFolder.getPath();
state.load(statepath);
}
}
}
}
The main culprit is the method of ZomboidFileSystem.instance.getMediaFile() that only checks the path of the game main folder, but not mods. An alternative would be ZomboidFileSystem.instance.resolveAllDirectories() that takes mods into account (Be ware that it returns an array of strings instead of a File).
If you wishf for a proper proof that this was actually supposed to happen. You can look at the info that mods store at zombie.gameStates.ChooseGameInfo, and look at the Mod class.
public static final class Mod {
..
public final ZomboidFileSystem.PZModFolder actionGroupsFile = new ZomboidFileSystem.PZModFolder();
..
This was overlooked ever since B41...
Fixing this would allow modders to add their own custom states and alliviate some of the workarounds needed for animations. Maybe it would make it easier to add animals. Or even a swimming mod would actually be possible to create.
Report
Duplicate definitions of Base.NecklaceLongSilverSapphire_Ground model inside media/scripts/generated/models_clothes.txt
Report
I don't think that is used anyway but there's a missing comma in Base.ES_Hydraulic_Press entity script.
-# Unless those are parsed differently ?
Report
Okay, this is a funny one. Aiming at skeletons with a gun crashes the game. 
This video shows the crash, by spawning some skeletons through modding.
And well, after spending way too much time trying to debug it, I've found the issue. Turns out, it mainly happens at zombie.core.physics.BallisticsTarget, more specifically at:
private void updateSkeleton() {
this.getBoneTransforms();
Bullet.updateBallisticsTargetSkeleton(this.getID(), this.numberOfBones, boneTransformData);
}
However, why does it crash? BECAUSE THE SKELETONS HAVE A DIFFERENT SKELETON ARMATURE!!! Turns out, the models Female_Skeleton and Male_Skeleton have these pesky leaf bones called Nub on them, while the main models of the game misses them. And that makes the call for Bullet.updateBallisticsTargetSkeleton() try to handle bone structure of the skeleton with the normal humans THAT DON'T HAVE Nub BONES! Winch results in the game dereferecing a NULL pointer at PZBullet64.dll (At least that's what I assume).
Which leaves us with two way of fixing this.
-
Add a guardrail on
PZBullet64.dllatupdateBallisticsTargetSkeleton()to verify ifboneTransformData[i](I presume) is a NULL pointer, and prevent the crash. -
Just remove the
Nubfrom skeletons. WHICH I DID! Here's another video of the crash being fixed!
This bug probably happens with mods too if the modmaker doesn't know the ideal bone structure for the models. The same thing might occur if any model have a different in the bones comparing to other. Might be useful to add this Info to the wiki as a desclaimer for modders.
My god, so many BONES. Kinda fitting for skeletons >.<
Just Bret Hart doing some code review.
Skeleton crash
REPORT
All three of the zombie intensity textures for male type 3 are identical. I checked with someone else to confirm this wasn't a local issue.
Also, a smaller issue; the underwear on the last intensity of zombification for Male 4 has different underwear than the prior tiers
Report
Mod AnimSets XMLs can't dynamically be added while in game. (I can't believe I forgot to report this issue, but here we are.)
This is more of a missing QOL feature for creating on animstate XMLs for mods, while once the XML file is created, we can edit it in real time, the same thing can't be said for creating them, because often we need to keep restarting the game, over and over again to load new files.
ERROR: General f:1971> AnimNode.Parse> Exception thrown zombie.util.PZXmlParserException: Exception thrown while parsing XML file "media/AnimSets/player/actions/CoolerBuilds.xml"
Caused by:
java.io.FileNotFoundException: media\AnimSets\player\actions\CoolerBuilds.xml (O sistema não pode encontrar o arquivo especificado) at PZXmlUtil.parseXml(PZXmlUtil.java:56).
Stack trace:
Caused by: java.io.FileNotFoundException: media\AnimSets\player\actions\CoolerBuilds.xml (O sistema não pode encontrar o arquivo especificado)
java.base/java.io.FileInputStream.open0(Native Method)
java.base/java.io.FileInputStream.open(Unknown Source)
java.base/java.io.FileInputStream.<init>(Unknown Source)
java.base/java.io.FileInputStream.<init>(Unknown Source)
zombie.util.PZXmlUtil.parseXmlInternal(PZXmlUtil.java:294)
zombie.util.PZXmlUtil.parseXml(PZXmlUtil.java:54)
zombie.util.PZXmlUtil.parseXml(PZXmlUtil.java:56)
zombie.util.PZXmlUtil.parse(PZXmlUtil.java:385)
zombie.core.skinnedmodel.advancedanimation.AnimNode.Parse(AnimNode.java:225) zombie.core.skinnedmodel.advancedanimation.AnimNodeAssetManager.startLoading(AnimNodeAssetManager.java:14)
zombie.asset.AssetManager.doLoad(AssetManager.java:150)
zombie.asset.AssetManager.load(AssetManager.java:71)
zombie.asset.AssetManager.load(AssetManager.java:55)
zombie.core.skinnedmodel.advancedanimation.AnimState.Parse(AnimState.java:90)
zombie.core.skinnedmodel.advancedanimation.AnimationSet.Load(AnimationSet.java:65)
I've done some diggin and (maybe) found the culprit, and its on zombie.core.skinnedmodel.advancedanimation.AnimationSet.Load as the error stack suggests. It starts at resolveAllDirectories() on the Load() function:
public boolean Load(String name) {
DebugType.Animation.debugln("Loading AnimSet: %s", name);
this.name = name;
//The issue happens here. listOfDirs gets only relative paths.
String[] listOfDirs = ZomboidFileSystem.instance.resolveAllDirectories("media/AnimSets/" + name, dir -> true, false);
for (String stateDir : listOfDirs) {
String stateName = new File(stateDir).getName();
AnimState newState = AnimState.Parse(stateName, stateDir);
newState.set = this;
this.states.put(stateName.toLowerCase(Locale.ENGLISH), newState);
}
return true;
}
The main problem here is that listOfDirs only receives relative paths of every file, including the paths for mods. The issue is that the function has no idea if a relative path is from a mod or not, so it scans only the game's directory, and not the mod's directory.
If you go to the ZomboidFileSystem.instance.resolveAllDirectories() and follow its path, you will notice that the main culprit is actually walkGameAndModFiles() and its closure, the function never includes the actual absolute path of the mod file and always uses their relative path.
public String[] resolveAllDirectories(String relPath, FileFilter filter, boolean recursive) {
ArrayList<String> result = new ArrayList<>();
//The closure its used at (file, relPath2) doesn't have any context of the real path.
this.walkGameAndModFiles(relPath, recursive, (file, relPath2) -> {
if (file.isDirectory() && filter.accept(file)) {
String relPath3 = relPath2 + "/" + file.getName();
if (!result.contains(relPath3)) {
result.add(relPath3);
}
}
});
return result.toArray(new String[0]);
}
Following the path you will spot that the closure finally receives its file and path at walkGameAndModFilesInternal()
public void walkGameAndModFiles(String relPath, boolean recursive, ZomboidFileSystem.IWalkFilesVisitor consumer) {
this.walkGameAndModFilesInternal(this.base.canonicalFile, relPath, recursive, consumer);
ArrayList<String> modIDs = this.getModIDs();
for (int n = 0; n < modIDs.size(); n++) {
String modID = modIDs.get(n);
ChooseGameInfo.Mod mod = ChooseGameInfo.getAvailableModDetails(modID);
if (mod != null) {
this.walkGameAndModFilesInternal(new File(mod.getCommonDir()), relPath, recursive, consumer);
this.walkGameAndModFilesInternal(new File(mod.getVersionDir()), relPath, recursive, consumer);
}
}
}
private void walkGameAndModFilesInternal(File rootFile, String relPath, boolean recursive, ZomboidFileSystem.IWalkFilesVisitor consumer) {
File fo = new File(rootFile, relPath);
if (fo.isDirectory()) {
File[] list = fo.listFiles();
if (list != null) {
for (File listedFile : list) {
consumer.visit(listedFile, relPath); //<-- The closure finally gets its values here.
if (recursive && listedFile.isDirectory()) {
this.walkGameAndModFilesInternal(rootFile, relPath + "/" + listedFile.getName(), true, consumer);
}
}
}
}
}
The only way I can think of solving this issue right now, is simply transforming the relative path into an absolute one when we are dealing with mods. I've made a silly fix for this that I am not really sure if it can fix it, but it was my way to solve it.
All it essentially does is add one more parameter to the function so it prepends the rootfile along with the relative to get its absolute path. (Only now I am seeing I could just keep pasting text files in here instead of making a mess, MY BAD!)
There's probably a better way to do this... oh well, it is what it is.
This would also kinda fix resolveAllDirectories() to be used for other ocassions instead of just AnimationSet
ZomboidFileSystem.validatePrefix rejects valid Workshop mod paths intermittently at boot. Build 42.
Symptom: Workshop mods that load FBX animations (or any asset that goes through validatePrefix) sometimes fail to load on launch. Once it manifests, the affected content stays broken for the entire session — players have to relaunch or resub one or more times to land on a "good" boot.
Repro: subscribe to a Workshop mod that ships custom anim FBXs (e.g. SaucedCarts, Workshop ID 3651954650), launch PZ. Bug rate is small per launch but reproducible across sessions.
Stack trace:
WARN : General > AnimationAssetManager.loadCallback > Failed to load asset: AssetPath{ "bob/_bob_cart_walk" }
ERROR: General > ExceptionLogger.logException> Exception thrown
java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Invalid prefix found for:
C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\3651954650\mods\SaucedCarts\42.0\media\anims_X\Bob\_Bob_Cart_WalkToRun.fbx
Caused by: java.lang.IllegalArgumentException: Invalid prefix found for:
C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\3651954650\mods\SaucedCarts\42.0\media\anims_X\Bob\_Bob_Cart_WalkToRun.fbx
at zombie.ZomboidFileSystem.validatePrefix(ZomboidFileSystem.java:1658)
at zombie.core.skinnedmodel.model.FileTask_LoadAnimation.loadFBX(FileTask_LoadAnimation.java:79)
Path is genuinely a subscribed Workshop content folder. Should pass validation.
Diagnosis: validatePrefix checks inputPath.startsWith against a lazily-built List<Path> allowedPrefixes. The supplier calls getAllModFolders, which memoizes a List<String> modFolders field populated ONCE from three sources: SteamWorkshop.GetInstalledItemFolders (subscribed Workshop), SteamWorkshop.getStageFolders + /Contents/mods (staged Workshop), and <myDocs>/Zomboid/mods/.
When SteamWorkshop.GetInstalledItemFolders returns an incomplete array on its first poll (Steam client cache state at PZ startup), modFolders is permanently cached missing one or more legit mods. allowedPrefixes derives from that partial list. Every subsequent validatePrefix call for an asset under the missing mod throws — neither modFolders nor allowedPrefixes is refreshed under the throw path, so the failure persists for the session.
Suggested fix: on validatePrefix rejection, retry once after calling the existing public resetModFolders() (line ~428) — which nulls modFolders and resets the allowedPrefixes lazy. If the path is still invalid after a fresh re-enumeration, throw as before. No security boundary change; uses an already-existing method.
Code refs (line numbers from a recent decompile; live build's validatePrefix is at line 1658 with identical logic):
- zombie.ZomboidFileSystem.validatePrefix(String) — throw site
- zombie.ZomboidFileSystem.allowedPrefixes — the lazy cache field
- zombie.ZomboidFileSystem.getAllModFolders(List) — line ~518, memoizes modFolders from one poll
- zombie.ZomboidFileSystem.resetModFolders() — line ~428, already does the right thing
- zombie.core.skinnedmodel.model.FileTask_LoadAnimation.loadFBX — line 79, one consumer
Most likely not very important and just remnants of old code but noticed this in logs while working on my stuff
WARN : Lua f:0 st:31,204,653 at Lua(Vanilla).corpseStorageCheck > require("ISUI/ISInventoryPaneContextMenu") failed
WARN : Lua f:0 st:31,204,654 at Lua(Vanilla).corpseStorageCheck > require("ISUI/ISVehicleMenu") failed
WARN : Lua f:0 st:31,204,654 at Lua(Vanilla).corpseStorageCheck > require("ISUI/ISContextMenu") failed
WARN : Lua f:0 st:31,204,668 at Lua(Vanilla).ISCampingMenu > require("Camping/CCampfireSystem") failed
WARN : Lua f:0 st:31,205,010 at Lua(Vanilla).ISInventoryTransferUtil> require("TimedActions/ISInventoryTransferAction") failed
WARN : Lua f:0 st:31,205,011 at Lua(Vanilla).ISInventoryTransferUtil> require("ISUI/PlayerData/ISPlayerData") failed
when launching server from main menu
Improved Craft History (added cleanup) 42.18
Request: release AnimZed
"Why?"
y'all have expressed wanting to release it in the past.
having access to this tool would be revolutionary for the modding community.
accessing this tool would limit the need for extensive java modding: eg. rewriting zomboid's api to work with non-zomboid assets.
currently, the only alternative to AnimZed involves folks making their own custom tools. this entails significant time investment. not everyone has the coding experience/knowledge to pull this off.
there are no community tools which achieve anything similar to AnimZed.
Request: SoapList
- I would like to request a way to register modded items as Soap for the function "getSoapList()"
- that would make it easier to mod different Soaps that can be used.
- Right now it only registers "Soap2" and "CleaningLiquid"
Request: Expose a way to link callbacks to AnimEvents on specific action states to allow better use of custom events.
This initially was supposed to be request to make occurredAnimEvents from ActionContext readable through IsoGameCharacter since reflection is dead, and so it could ease the workarounds needed for custom animations event on other states, and create a quick check in Lua to see if it was triggered. But then I realized that there could be a better option for this problem, which is to create a proper way to link callbacks to events when on a specific action state.
Because right now the main way to do such a thing is to use SetVariable on XMLs, check them in Lua, and then call ClearVariable() to clear them. But that's adds a lot of overhead, and clutters the variables of the character (as they don't delete the variable just empties them). Not to mention that it isn't really precise enough, which adds ever more jankiness to mods.
And, even though TimedActions can be used to have such functionality on the go, they can't be used on all places (ESPECIALLY FOR ZOMBIES AND ANIMALS), and aren't the best alternative when it comes to fluid animations. Essentially TimedActions has a luxury that every state could have, but doesn't...
This might be a hefty request, but it would great QOL for mods in general.
request:
A way to "attach" multiple models visually to an item (similar to weapon attachments but without the need for parts and such - this is a request for a purely visual system)- could be useful for a number of reasons, and I'm not familiar with a way to do it outside of weapon attachments - or toggling parts of a model (Vehicles allow this, not sure if items do).
Use case: I want to eliminate the need of having dozens of objects in my game-night mod but I also want to prioritize the game-in-progress being visible in the world. But I can also imagine this would be useful for a number of things.
Request:
Limit animal reproduction via IsoAnimal.addBaby and fertilize methods. Example below is for 30 for the cell, but this is probably better linked to a sandbox var that the server admin can set.
public IsoAnimal addBaby() {
if (this.getCell() != null && this.getCell().getAnimals() != null && this.getCell().getAnimals().size() >= 30) {
this.getData().setFertilized(false);
this.getData().pregnant = false;
return null;
}
\\rest of the code
}
public void fertilize(IsoAnimal male, boolean force) {
if (this.getCell() != null && this.getCell().getAnimals() != null && this.getCell().getAnimals().size() >= 30) {
return;
}
\\rest of the code
}
Request
Both LosUtil.getFirstBlockingIsoGridSquare and IsoGridSquare.getFirstBlocking return isoGridSquareCollisionData
Without reflection, we can't access any fields(hitPosition, isoGridSquare or testResults) from isoGridSquareCollisionData
It would be nice to be able to get that information directly and avoid walking squares in lua
#request
can we get a setter for ManuallyRemoveSpentRounds? currently we have a getter that is isManuallyRemoveSpentRounds, but we dont have a setter that could be setManuallyRemoveSpentRounds
Update to Request
By default every sound scripts should use the Primary master volume but it turns out that the methods we use to play sounds (IsoGameCharacter.playSound) end up calling the function in the linked file (which is a snippet from FMODSoundEmitter) by passing var2 as equal to 1.0F, which is the reason why volume settings don't impact modded sounds being manually played.
declaration: package: zombie.characters, class: IsoGameCharacter
Request/suggestion 1
A button similar to the “reload vehicle textures” button but for worlditems and icons, it can be externally time consuming to re-launch the game over and over when trying to get items textures down
Request/suggestion 2
support for different items installed on vehicle parts to have different models, similar to what modders have done using LUA.
example: if you want "brake old" and "brake performance" to have two different models attached to them they currently will just both show at the same time (again, unless youve written your own code) i think that i would be quite beneficial for it to, not be that way
request/suggestion 3
similarly to number 1, i would LOVE to see the ability to reload item positioning in hands or even, being able to do it in a menu similar to the vehicle editing menu
this one, admittedly would just be, reloading scripts
Request/Suggestion
Indie Stone: I have been working on something I fell would REALLY be a benefit to the game.
#HEADLESS CLIENT.
Having code that allows a connection from another dedicated server to connect as a virtual client and then take over computations of Zombies and Loot. This would free up many bottle necks, and make 32+ players servers more common. Look into Headless Clients from Arma 3. I coded many mission that had a server tick rate of 5 to 45 [50 Max at the time] and AI reacted better, could be modded to do behaviors only a headless client can achieve. I have been looking through Java for a year with little progress. I love optimizing, this would be an easy instant optimization. Sure it requires a bit of setup, but its worth it.
Representing the 305 btw 😄
||https://community.bistudio.com/wiki/Arma_3:_Headless_Client|| Spoiler Alert <--The technology and how its implemented. I was the only person who understood it enough to code it into missions with tremendous game changing effects,,, overnight.
I AM NOT PROMOTING OR MARKETING ANYTHING FOR BI. THIS IS SOLELY FOR REREFENCE.
my age is showing 😢
Request/Suggestion
Request
Please add to OnZombieDead arg IsoGameCharacter of character that killed it
Related Request
It would also be super nice to have a getter for ObjectRenderInfo.targetAlpha since it appears this is one of the big indicators for if an object, ie a floor/roof above, is "cutaway" to expose what is behind it when the player is close enough.
There is already IsoObject.getRenderInfo but there isn't any way to check the values outside of debug.
Report
IsoPlayer:getSteamID() returns a Java long that loses precision when accessed from Lua in Build 42. Steam ID 76561198042221333 becomes 76561198042221328 or 76561198042221330 depending on the formatting method used, because Kahlua converts the 64-bit long to a Lua number before the script can access it.
Tested approaches (all produce incorrect values):
- tostring(player:getSteamID()) → scientific notation 7.656119804222133E16
- string.format("%.0f", player:getSteamID()) → 76561198042221328
- string.format("%d", player:getSteamID()) → 76561198042221330
- "" .. player:getSteamID() → scientific notation
- Long.toString(player:getSteamID()) → same precision loss
Also tested:
- getSteamIDFromUsername(player:getUsername()) → returns nil on both server and client
- Client-side player:getSteamID() → returns 0
Expected: A way to get the full-precision Steam ID as a string from server-side Lua. The correct value (76561198042221333) exists in the server's SQLite database (db/KLICKALACK.db, whitelist table, steamid column), confirming the data is available internally.
Request:
Expose a getSteamIDAsString() method on IsoPlayer, or fix getSteamIDFromUsername() to work on the server side, so mods can reliably identify players by their Steam ID.
Environment: Build 42.18.0, dedicated multiplayer server, server-side Lua mod.
Report
Report
LearnableRecipes parameter for literature items does not allow recipes inside custom modules
item Magazine_SaddleUp {
DisplayCategory = RecipeResource,
Weight = 0.5,
ItemType = base:literature,
Icon = literature/Magazine_Horse1,
BoredomChange = -20,
StressChange = -15,
LearnedRecipes = HorseMod.HorseSaddle;HorseMod.HorseSaddlebags;HorseMod.HorseReins,
StaticModel = Magazine,
WorldStaticModel = HorseMod.Magazine_SaddleUp,
Tags = base:magazine,
OnCreate = ItemCodeOnCreate.onCreateRecipeMagazine,
}
Error in console:
LOG : General f:0> Learnable CraftRecipe HorseMod.HorseSaddle does not exist
LOG : General f:0> Learnable CraftRecipe HorseMod.HorseSaddlebags does not exist
LOG : General f:0> Learnable CraftRecipe HorseMod.HorseReins does not exist
The screenshot also shows that the translation for the recipes can't be found while the second screenshot of the crafting menu shows those recipes do work as well as their translation
Report
FixingManager.getFixes needs to check for getRequiredItem() to be valid before calling contains
Any mod that adds an invalid fixing recipe will provoke an error on right clicking the Hood part (and many other parts) of any vehicle.
The error will not point towards the failed FixingRecipe nor the associated mod.
There are many un-updated mods in B42 provoking that bug, including the famous CommonSense. The number of unaware players complaining on mod_support in huge. Most of them never get the right explanation because the error is obscure.
Report? Request?
Recipes that use a varied # in the input line only use 1 hunger value of each item consumed in the recipe unless itemcount is present, then it uses the full item.
item 1 [72:Base.Tomato;24:Base.CannedTomato_Open;48:Base.CannedTomatoOpen] flags[IsExclusive],
I have also tried:
item 72 [Base.Tomato;24:Base.CannedTomato_Open;48:Base.CannedTomatoOpen] flags[IsExclusive],
So the 6 tomatoes used in this recipe, all came back to me with only one hunger value taken from each.
It would be nice to specify the amount of hunger used rather than whole items, and have that varied in the input. Not sure if it's a bug or a request.
Report? Request?
Request
Hello, could you provide a getter and setter for IsoZombie.cognition? My mod Random Zombies (700k subscribers, id 2818577583) cannot function as it did before without it.
Report clarification
You simply can't refer to the recipes by their full ID but it does find recipes in different modules. This is a bit inconsistent with everything else in scripts where if they are in the Base module then they are found easily bcs it checks in Base then imports (sometimes?), and if the module is provided in the script reference then it finds it. Here providing any module (be it Base or a custom module), the recipe will not be recognized