#mod_development
1 messages · Page 238 of 1
did a quick check, items (scripts?)* have combatSpeedModifier
Its not for clothing, it was an attempt to get the game to change the CombatSpeed in this file to be changed and thus change the speedscale of 2handed animations.
Under the condition that the weapon the player also has SwingAnim = Kat
I eventually tried changing player:setVariable to:
self.character:setVariable("CombatSpeed", AttacSpeed)
and was rewarded with stack trace error spam.
Hi there! Could you please advise on how to deactivate the Character Profession menu? I've successfully bypassed the menu using this code. However, it's causing an issue where the back button doesn't function on the subsequent menu. How can I address this
if visible == true then
self:onOptionMouseDown({internal = 'NEXT'}, 0,0)
end
end```
i think ive managed to figure out my issue with my invisable texture, the logs are showing that the model is not loading for some reason
is anyone able to help me out with this? im not sure exactly what i need to do for this
posted in the modeling channel before but i feel like this is more a mod dev issue at this point
Can you post the xml file for the item?
You might have a syntax error in it or put in the wrong file directory from where it should load the model from
ill have a look for it
@vestal gyro what should the xml file look like? im having a tough time finding it
Is it possible to trigger an item distribution only after a give number of days. Just like the current implementation of machete and samurai. I have a custom item that I like to start appearing at the same time with machete
Clothing for example in the zomboid media folder should be in media/clothing/ClothingItems
You can look at that for examples
ok got it
You'd also need to put the items (if its clothing) into a fileGuidtable which is also an xml file
what do i need to do if its a weapon?
also would it help if i send you my test mod?
I'm not on my pc right now but you can look at how other mods do it
ok
ive been looking at bush craft weapons and i dont see them use an XML file
is that beacuse they are only weapons?
Then I think xml files are for clothing mostly? Sorry havent really worked with weapons
Well how do they reference the model/texture?
this is theirs compared to mine
im very new to modding and making models so its a bit tough to get my head around
Yeah it was the same for me when doing clothing, so it seems like for the mesh thingies you forgot to put the models_X folder infront of the file directory
Ahhhh!
If you had problems with only the crowbar and Gbat that could be it
ive had issues with them all
the sawbat also failed sadly
they work ingame but the model itself is invisable
Hm, what if you copied a mod and replaced their texture with yours, that could help in figuring out if its because of the model or the scripting
Model I mean
thats not a bad idea
ill try that
mind if i dm you? ill send over the test version of the mod for you to have a look at
for later
I'll have to leave for work in 20 minutes, someone else can probably help you though
No worries
Saw bat? Like from dead island? Oh I love that!
tbh ive never played dead island haha
but i should probably draw insparation from those games!
that is if my models would work XD
good stuff!
they were giant tho so i need to scale them down correctly
and also apply my own textures to them
ill do that in two different tests
whats the code to scale an item?
I would assume that you just have to make the model smaller
looking good?
made some improvements in terms of pictures and description
If anyone needs bitwise operations for their mods, I've created a GitHub Gist of how to do it in Lua and provided an exposer class for Java if you want Java support.
Feel free to use.
Hopefully we'll get support in b42 since I've heard more bitwise is used there.
=)
Just released the upgraded framework for custom Lua commands, which supports RCON in single-player.
https://steamcommunity.com/sharedfiles/filedetails/?id=3243738892
https://steamcommunity.com/sharedfiles/filedetails/?id=3243741273
Hello! I popped by because I'm interested in making some custom additions to the available items to sell/buy in the vending machines provided by the "ATM Economy" mod, but I have run into a bit of a snag. Any time I make any changes to the files, the game freaks out and doesn't load a lot of the mod assets properly any more. For any of the mods I use. For instance, if I even have the Anthro Survivors mod enabled after I make changes, the main menu doesn't render any buttons, just the background and music. If I disable that mod, I can load into a world but a LOT of the items from other mods (see; 99% of them) are no longer loaded or even available to be seen with debug. I really have no clue what I'm doing wrong, as I am copying the layout of the already existing recipes provided in the mod's files, could anybody with some experience with modding help me out with this? I've already tried and re-tried the edits with different mods enabled/disabled and nothing seems to work. :c
If it helps at all, I am trying to edit the files provided by what is already an edit of the original mod, since the original mod's files are in Spanish and I can only understand English.
I'm trying to add the guns from Vanilla Firearm Expansion (as well as the associated magazines/attachments/ammo), and the additions to VFE Gunrunner's, and the Stalker expansion.
I'm also trying to expand the list of items the ATM converter will accept for money to include some other junk items like cameras and empty cans (of which I am trying to figure out how to make the recipe require multiple of the item to 'craft' the money). I really feel like I did everything right with the edits I made, but the game says otherwise.
Also unfortunately I already had cleared my edits from the mod's directory before coming here, so I would have to re-make the edits again in order to provide any examples.
I'd check to see if there was any better luck doing it with Arsenal 2.0/Brita's Weapons but 1) there's way more stuff in those mods that I would have to add, and 2) there are no ATM mods I can find on the workshop that do it already, so I'm assuming it's too difficult to do in the first place...
hi all, i was wondering if you all could explain why parts of my model dont show up when in PZ? i made a baseball bat with a sawblade attached to it and for some reason the bat part is not visable
is there any guide or already mentioned topic on how to delete items from a mod? I tried manually deleting the lines from the fileguid.xml and script/clothing.txt but these items still show up in character selection screen
what mod are you trying to change?
Hey all, 2 questions:
- How would I go about running a very simple function every IRL second? Run it onTick with a modulo? If so, is there a set amount of ticks per second that isn't variable?
- How would I send a chat message only the client sees? Not anyone else?
ticks are framerate dependent, if you want to do something based on real time you need to use a counter/compare timestamps
i wrote an example of this a few days ago actually
boots expanded mod
simplest way is to rewrite the script module and set the items you want removed as obsolete. atleast thats how i've done it
yeah but they still show in the game as blank
is there an order on how to do it? i deleted everything all at once, so
only deleting the lines in the script?
thats weird. looking at it i have actually modified this mod but have not removed anything just edited their stats. when setting it as obsolete does it spawn in blank items or the old items are still there as blank or is it that in the creation they show up still?
no, I also deleted it from lua files, although they only appear in debug mode and character creation screen
you can select it, the option goes to "none"
and if you equip it in debug, the game bugs all the player model
I basically erased any trace of those item in all the mod folder, and yet they show up in the game, at least their names
honestly not sure at that point. the only thing i could think is the xmls but i don't do clothing so don't know all the functions behind that. one thing i would keep in mind is the Boots and Clothes Expanded mod, which i assume is the mod you are trying to edit, mostly modifies vanilla clothing so it may be something in the vanilla game, but i don't know what you are editing
Fair enough, I figured. What's the best way to do timestamps performantly? os.time()?
nothing big, just removing the jackets and editing the weird speed modifiers
Also curious if anyone knows an answer to the sending of a chat message so only the client sees it.
Hm
Would something like this work?
local message = ChatMessage.clone()
message.setAuthor("System")
message.setText("Some message")
message.setLocal(true)
message.setShouldAttractZombies(false)
ISChat.instance.addLineInChat(message, ISChat.tabs[1])
Update: it did not. ChatMessage.clone() failed.
how do i remove an item from the distributions (other than overwriting it)? is it just table.remove(ItemPickerJava.ProceduralDistributions.list, k) or similar?
also does OnPreDistributionMerge really fire after the tables have been merged? that seems counterintuitive
Just proceduraldistributions.list[container]
But you need to delete the key and value and you need to know what index number they are
And the index will change once you delete
i was thinking something like this:
local result = 0
local allDistributions = ProceduralDistributions.list
if allDistributions and #allDistributions > 0 then
for _, containerDistribution in pairs(allDistributions) do
if containerDistribution and #containerDistribution > 0 then
for i, containerItem in pairs(containerDistribution.items) do
if containerItem then
if containerItem == item then
result = result + 1
table.remove(containerDistribution.items, i)
end
end
end
for i, containerItem in pairs(containerDistribution.junk) do
if containerItem then
if containerItem == item then
result = result + 1
table.remove(containerDistribution.junk, i)
end
end
end
end
end
end
return result
end```
would that work potentially?
Did you ever figure out how to do this, by any chance?
I don't recall - but you can use AddChatLine or Say as needed to add something for that player specifically.
How would you use AddChatLine?
I'm struggling to use the ChatMessage object 
player:addLineChatElement(text, return_color.r, return_color.g, return_color.b, UIFont.Dialogue, vol, "default", true, true, true, true, true, true)
This will make the player say the line though
Not really a system message
You can try processGeneralMessage()
Where is that found in?
Ah, root namespace
Hm
It just takes a string?
Let's see
is it possible to group my clothingItems xml into a folder?
Works, thanks!
Why is OnMouseMove constantly triggered? 
I'm also curious, does it matter that an event hook has no arguments? I really only need to trigger something on the event, not do anything with the args.
Gotcha, good to know
Then my question becomes:
- Why is OnMouseMove triggered constantly, regardless of mouse movement
- Why is OnMouseDown seemingly not triggered?
on mouse down can get eaten by ui and stuff
Fair enough
Also, has anyone figured out a GitHub workflow for easy pushing to the workshop?
https://github.com/Project-Zomboid-Community-Modding/pz-community-modding
Community Modding Projects has that
Ah, splendid, thanks!
Finished my latest mod. Adds a highly configurable AFK system.
https://steamcommunity.com/sharedfiles/filedetails/?id=3244053233
Gonna push this here once again, 'cos I really do wanna figure out why making any changes completely breaks my ability to use the mod at all. #mod_development message
anyone knows how to add AttachedWeaponDefinitions?
I want to insert this
AttachedWeaponDefinitions.katanaStomach = {
chance = 1,
weaponLocation = {"Stomach"},
bloodLocations = {"Torso_Lower","Back"},
addHoles = true,
daySurvived = 60,
weapons = {
"Base.Katana",
},
}```
but I have different katanas and they should differ in chances, daysSurvied, etc.
I saw a mod that did it like this `table.insert(AttachedWeaponDefinitions["katanaStomach"].weapons, "CustomKatana")` but in my case I need to change the other options too and not just the `weapons`
It might but if you have a ton of entries you are modifying it will be horribly inefficient
After doing my edits and even injecting them as a completely separate mod locally through c:/users/Zomboid/Workshop, it showed up in-game but when I activated it now my game hangs on Loading Scripts every time I try to launch. :/
Can somebody look at this and tell me what I did wrong?
The last thing the log shows is "ERROR: module "Base" imports itself" but that shows up multiple times before and doesn't get stuck there.
I'm going to nuke my mod list and load basically only the edited mod I made to see if that fixes the issue.
Nope. It just hard locks trying to load if I enable the mod. :/
I have zero clue why. There's no error being thrown in the log that shows what's causing an issue with loading the mod, and so far I have recieved zero help with the issue in the first place so I am literally flying blind.
Well, I gave up on it for now. I suppose at some point I might get lucky enough that somebody with knowledge on how this works will reply to my pleas for help. I'll just have to settle for using NecroForge and manually removing money/giving items whenever I'm near the vendors. Basically the same thing, just with like 40 extra steps. :^)
local function addLineInChat(message)
local _Chat = ISChat.instance;
local _TabID = 0;
local _Tab;
for i, tab in ipairs(_Chat.tabs) do
if tab and tab.tabID == _TabID then
_Tab = tab;
break;
end
end
local _FoundMessage = nil;
for i, msg in ipairs(_Tab.chatMessages) do
if (msg and not _FoundMessage) then
_FoundMessage = msg;
end;
end
local _NewMsg = _FoundMessage:clone();
_NewMsg:setText(message);
_NewMsg:setServerAlert(false);
_NewMsg:setServerAuthor(false);
_NewMsg:setLocal(true);
ISChat.instance.addLineInChat(_NewMsg, 0);
end;```
then call the function to add a client-sided message to chat
how do I print logs?
You can just do print()
thanks
Edge case: a message has not been sent yet, so there's nothing to clone. Null reference error on initialization of _NewMsg
Unlikely, since it'd require the server welcome message to have been unset. But possible. A safer method is creating a "dummy" message object that has at least the minimum methods that the chat code expects
Attack it with a weapon. Thanks, thanks, I'll be here indefinitely.
I know I'm sorry I couldn't help myself and unfortunately also cannot help you. đ
If I knew I'd tell you
đ đ
any suggestions as to what would be more efficient for letting a user define stuff to be removed and removing it?
instead of removing it, set the value to zero
so its effectively not going to roll
how do i modify the entry? adding and removing seems easy enough, not sure how to change it
Are modders allowed to do commissions?
if you look at the modding policy, they can as long as access to the mod isn't pay to play https://projectzomboid.com/blog/modding-policy/ check out 2.3 and 2.4
Heh, sure don't plan on doing that anytime soon
Was wanting to have a mod made, I mean I want it to fix a need I have but for anyone else to use of course, a mod that allows the user to disable certain ingame soundtracks, allowing others to take priority, so I can do combat with it only playing a select few, and have a select few idle songs play too
Only cause I can't find anythign like that and nobody else seems to know
how can i edit what items a zombie corpse has when they die?
-- where player is an IsoPlayer (e.g., player = getSpecificPlayer(0))
local visual = player:getVisual()
visual:setBlood(BloodyBodyPartType.ForeArm_L, 1) -- second argument is in [0.0, 1.0]
player:resetModelNextFrame()
triggerEvent('OnClothingUpdated', player)
What do you mean by "what times"?
mb i meant items
Is there an event that it's fired after the LoadGridsquare? Cause I need to run code after it has loaded
is there a way to add an additional damage after a successful swing? im currently using OnPlayerAttackFinished but I cant figure out the way to do it
Haven't really considered this since this snippet was shared on the discord before and didn't really give it much thought, but it makes sense. Guess will have to modify it a little bit
While we're at it, any idea how do you change the styling of the message in terms of color and other possibilities if present, like font and size
I have a question about altering someone's else mod
Consider I did download their mod, but want to change something inside of it, like a specific function to work differently
If I make another mod, make it so it loads after the original one, and on my mod I add the original as a require, and create a function with the same name, will it override the original function and do as I want?
Is anyone here familiar with sound code?
Sound as make something to make players actually hear or sound like generate a noise inside zomboid so it attracts zombies?
Pretty much. I want to fetch the time a sound emitter is at, but the question is, what the fuck do the variables setTimelinePositionâ(long long1, java.lang.String string) even mean
A string??? Why?
If it's global, yes
If it's local, you're outta luck
I'm pretty sure the Expanded Helicopter Events can create a sound and then kill it after a while
Maybe the code has something you can read about
I usually just generate the noise that attract zombies
So there is nothing to hear actually
Nah stopping it is easy, the problem here is find out at what time it's playing
And... set the time too
I want to manipulate sound in a more complex way
I think Jab had a mod that create eerie feelings or something like that
Using sounds
Its the most complex one I can think about
Oh, it wasnt a code thing, it was something else
dont suppose someone can help me? for some reason parts of my model are not visavle (the crowbar doesnt have the "hook" part on either end and the sawblade doesnt have the baseball bat part its attached to (the part the character needs to hold)
for the life of me i dont understand whats causing this issue
the models are custom made by myself
ChatMessage.getTextWithPrefix includes rich text tags for both color and font size (<RGB:R,G,B> and <SIZE:fontSizeIdentifier>, respectively). You can define these after the prefix ones, but I've just rebuilt messages entirely; see https://github.com/omarkmu/pz-omichat/blob/849e46736b4263917a7168bddb4d2f1b038f5841/Contents/mods/OmiChat/media/lua/client/OmiChat/API/ClientFormat.lua#L374
If you do a "dummy" implementation all you'd need to do is use those rich text tags in the string you return
I think someone sent a reference for rich text tags here, but you can also check ISRichTextPanel.processCommand
That's intriguing, thanks so much!
See sounds_vehicle.txt from vanilla. It has a comment at the top that explains it. The example in use is idle, which would be the string passed there
Unsure whether there's a way to dynamically seek, since I'm assuming that's what you're after
Yeah that's what I want
Thanks I didn't know the word for it in English is seek
Oh that function is worthless
i got a long vacation ahead anyone got a good modlist for a looong solo gameplay?
This channel is more geared towards creation of modsâI'm sure plenty of people over in #pz_b42_chat have mod lists to share, though
thank u il check it out
I discovered that JetBrains Rider's default UTF-8 behavior is UTF-8-BOM for windows users. But .lua files written with UTF-8-BOM encoding will not be read in Zomboid - you must use UTF-8 without BOM
it took me ages to figure out why the functions in my .lua scripts weren't being read in.
I noticed this isn't listed anywhere easy to find, so I thought I'd post it here, might be helpful for beginners/noobs like me who switched from Notepad++ to a "fancier" IDE that does extra things they don't know about. Wasn't sure if it should also go into the #pzwiki_editing
I'd plus you to add a note if you find a right place in the wiki.
Weird question: Every time I try to update one of my mods on steam, it gives an error 16, but if I try again it works. Any idea why the first try gets bugged?
Where can I find a lua api doc?
Hello everyone. Do you know if there is a mod for blind zombies? Couldn't find it(
Not much, but this is what we got: https://www.projectzomboid.com/modding/index.html
And a VSCode extension:
#mod_development message
package index
unfortunately, this mod is incomplete/incomplete and I do not have access to patreon(
Wait, that's selling access to a mod, which is against TC
I'm looking for other mods.
heh
V1 in steam
V2 in patreon
hmmmm
Hello everybody
Can we create a custom item Category into PZ ?
I want to create my own medical category : EFK_Medical for my items to use the OnlyAcceptCategory script with its
oh that's just a blatant breach of tos huh
Wait, can you have a mod that is not on the workshop?
I always assumed you had to upload to the workshop to mod anything
no reason you couldn't put it somewhere else, as long as there isn't a paywall. some people prefer to put it on github for instance
What I mean is that I have some mods that I use in a local server. I always assumed that I needed to upload them to steam, add them as workshopid and then put on the mod variable for it to load
I could have everything just work locally instead of depending on the steam, considering they are server side only?
sure, no reason you'd have to upload it to the workshop if it's just for personal use
Huh
Btw, not sure if it was any of you guys, but the blind zombies mod already got all links removed
that happens automatically when a mod gets reported, and i assume it was someone here who reported it
certainly, you can't mod pz if you are putting stuff behind a paywall, it's explicitly laid out in the modding policy
Does anyone know where I can see all "OnEvent" that I can associate a function? I want to make a toggle that every zombie that spawns are crawling or not
so loot on zombies is handled differently than loot in containers right?
How so ?
The zombie body is a container
But you can access it only on death
idk mike maybe it's just in a different file? i don't see it in the list on procedural distributions but let me search rq
Oh
That
Yeah it's handled elsewhere
Idk how however, I've never looked into it
ik where to find the answer however give me a sec
okay word, i'll dig around
Events.OnZombieDead.Add(<function gos here>);
nvm I don't know
Yes but is that how the base game handles it ?
if not zombie:getOutfitName() then return false end
local outfit = tostring(zombie:getOutfitName());
local inv = zombie:getInventory();
if outfit == "BananaTrama" then
inv:AddItems("Base.Banana", 1);
inv:AddItems("Base.Egg", 2);
if 50 >= ZombRand(1, 100) then
inv:AddItems("Base.Spiffo", 1);
end
if 50 >= ZombRand(1, 100) then
inv:AddItems("Base.Hat_FurryEars", 1);
inv:AddItems("Base.SpiffoTail", 1);
else
inv:AddItems("Base.Hat_Beret", 1);
end
end
end
Events.OnZombieDead.Add(CheckDropsNana);```
This is how I handle to make a specific outfit drop specific items
what do you want to do ? Add your own loot to zombies ?
remove loot from zombies' loot tables
Yeah so you need to get access to the base stuff then OR you can make an OnDeath function that checks within the inventory of a zombie if there are the items you want to remove
@crystal oar Get the code I just pasted, replace Inv:AddItems with inv:RemoveItems
Won't that throw an error if there isn't the item in the inventory ?
RemoveOneOf
public void RemoveOneOf(String String)
Or ```
DoRemoveItem
public void DoRemoveItem(InventoryItem item)
Actually, I thnk the RemoveAll would be best
RemoveAll
public void RemoveAll(String itemType)
Remove all the item of the type in parameter inside the container Ex of itemType : Broccoli (no need the module like Base.Broccoli)
Parameters:
itemType -
I think this avoids a need for a check
Since it checks for any matches to remove it
Does anyone here know when a zombie is updated? Like when the OnZombieUpdate is being triggered?
https://steamcommunity.com/sharedfiles/filedetails/?id=3243585156
The V1 of our silly ahh mod is here
} else if (var18 != null) {
VehiclePart var60 = var18.getNearestBodyworkPart(var1);
if (var60 != null) {
VehicleWindow var61 = var60.getWindow();
for(var43 = 0; var43 < var60.getChildCount(); ++var43) {
VehiclePart var62 = var60.getChild(var43);
if (var62.getWindow() != null) {
var61 = var62.getWindow();
break;
}
}
if (var61 != null && var61.isHittable()) {
var43 = this.calcDamageToVehicle((int)var34 * 10, var2.getDoorDamage(), true);
var61.damage(var43);
var1.playSound("HitVehicleWindowWithWeapon");
} else {
var43 = this.calcDamageToVehicle((int)var34 * 10, var2.getDoorDamage(), false);
var60.setCondition(var60.getCondition() - var43);
var5.setVehicleHitLocation(var18);
var1.playSound("HitVehiclePartWithWeapon");
}
}
}
Trying to mess around with hitting vehicles and noticed the conditions for window or part being hit is drastically different. vehicleParts.setCondition doesn't seem to have any type of transmit going on. Ironically, if one calls damage() on the VehiclePart it would also call setCondition and transmit. I'd still need to confirm this though - unless someone else is more familiar with this already.
To test: smack a car door with a bat - it can't have an intact window.
setVehicleHitLocation seems to be related to FMOD sounds - and I'm curious why it's not used for the window.
TL;DR: I don't think car parts getting hit is updating in MP (outside of windows)
Iâve never modded or touched the PZ Lua API. I want something really simple:
For a list of vehicle IDs, I want to set the trunk capacity to 0 or, ideally, completely remove the trunk.
And what exactly are you looking for? Someone that does comissions so you can negotiate the price with them or want to show your work so it can be troubleshot?
VocĂȘ Ă© br, serĂĄ que pode portuguĂȘs aqui?
English only
Damn. Actually, I don't have any work. Was thinking about this feature (remove trunk or capacity) to balance a bit the RV interiors mod
Iâm not familiar with modding Project Zomboid and was searching for information today. Unfortunately, I couldnât find a comprehensive Lua API documentation. Iâm unsure if I should refer to the Java API instead.
While examining the RV interiors code, I noticed it maintains a table of all vehicles with interiors. If a more experienced modder could guide me, Iâm looking for a function similar to:
Lua
vehicle.fromId(id):removeStorage()
Iâm not certain if the API supports such a straightforward method, or if itâs even feasible. However, my research suggested that I should join this Discord server and seek guidance from the community.
How do i know if the player is inside a specific building? (like police station, church, ....)
local player = getPlayer()
local currentCell = player:getCell()
local x, y, z = player:getX(), player:getY(), player:getZ()
local currentGridSquare = currentCell:getGridSquare(x, y, z)
local currentRoom = currentGridSquare:getRoom()
if not currentRoom then
print("Player is not in a room\n")
return
end
local currentBuilding = currentRoom:getBuilding()
if not currentBuilding then
print("Player is not in a building\n")
return
end
--How to know if player is inside a certain building, like police, church, ....
end
Events.EveryOneMinute.Add(EveryOneMinutes)```
(remember to remove your prints when you upload your mod)
But besides that idk, perhaps there's a method to get the type of building
got another inv?
We have a channel here Burryaga to invite ._.
looks like the links are already back to those mods locked behind a paywall on this page https://steamcommunity.com/sharedfiles/filedetails/?id=3236920978
He deactivated comments
big surprise there lol
hi guys is there an easy way to incorporate the bonuses from a custom perk? or do I need to do it manually by adding the bonuses on zombie hit
I'm rewriting my SCHTASK script so that it should run at set times of the day, this is for restarting the server. Does this look like it'll run fine?
It will just be saved as a batch file.
I have no /sd set because I assume that when it runs "goto start" it'll just create new instances of tasks to run at the set times anyway.
seems like you rewrote alot of the same for no reason. other than that it's mostly good. i'm assuming you are using some task scheduler on the pc to do this?
i do something similar for my palworld dedicated box for auto restarts and hourly backups
Nah I'm just using the server launch batch file itself.
basically, this is a rewritten StartServer64, no task scheduler needed. just run as admin.
this isn't setting a task scheduler to run this file at this time of the day?
SCHTASKS /Create /SC ONCE /ST 05:50 /TN "PZ\10m" /F /TR C:\SteamCMD\rcon\10m.bat
i mean it is setting a task schedule, but i didn't use task scheduler if you get what i mean
i guess i dont đ maybe i'm a dumb dumb
i do have this setup on a server successfully though
i just wrote it out in batch instead of using that
so your goal is to run that file one time. it will set all those tasks to be scheduled
i dont get why having this over and over matters
::============================================
::start server
::============================================
@setlocal enableextensions
@cd /d "%~dp0"
SET PZ_CLASSPATH=java/istack-commons-runtime.jar;java/jassimp.jar;java/javacord-2.0.17-shaded.jar;java/javax.activation-api.jar;java/jaxb-api.jar;java/jaxb-runtime.jar;java/lwjgl.jar;java/lwjgl-natives-windows.jar;java/lwjgl-glfw.jar;java/lwjgl-glfw-natives-windows.jar;java/lwjgl-jemalloc.jar;java/lwjgl-jemalloc-natives-windows.jar;java/lwjgl-opengl.jar;java/lwjgl-opengl-natives-windows.jar;java/lwjgl_util.jar;java/sqlite-jdbc-3.27.2.1.jar;java/trove-3.0.3.jar;java/uncommons-maths-1.2.3.jar;java/commons-compress-1.18.jar;java/
".\jre64\bin\java.exe" -Djava.awt.headless=true -Dzomboid.steam=1 -Dzomboid.znetlog=1 -XX:+UseZGC -XX:-CreateCoredumpOnCrash -XX:-OmitStackTraceInFastThrow -Xms1g -Xmx18g -Djava.library.path=natives/;natives/win64/;. -cp %PZ_CLASSPATH% zombie.network.GameServer -servername Corner -statistic 0 %1 %2
The idea is I run this batch as administrator on my other user profile, leave that console essentially alone forever.
It runs from 6 AM and runs the last task at midnight, at which point it goes to start, so I don't have to set dates for the schedules, it will just schedule them because its going to run down the list from START.
The reason those exist is because the server is running /quit, after each schedule, so if I don't run that start server segment, the server won't restart until the next time the line comes up.
If it only existed once, it means the server would only be on for 6 hours a day I think.
Because it only starts the server once and then after 6 hours it will run quit. It won't run the start line again until like, 18 hours later?
Every time quit is run, it must then start the server.
All of its basically just ran sequentially.
After the server has started, it then sets a scheduled task for the next time it will shut down.
The only other thing I have to consider is how it will interact with udderly updater, which I believe it will:
- Udderly will run /quit
- The batch file will just go to its next line, which will either be "goto start", or it will set the next restart schedule, then run the server.
Guess I'll try.
that specific script was (written a bit differently) created to work with that mod specifically
yours has a bit extra from the original but i remember seeing it around somewhere
i mean it should work and the udderly mod shouldn't cause an issue methinks
Alright, problem is that it will create the tasks for 6AM because they're at the start, but then it will run the server. Because the tasks are only set when their line runs, and the server never runs /quit, it'll never set the tasks for later points in the day.
Maybe if I just put all tasks at the start it will work.
Just report again. Links removed once more
Remove all works
Will delete all items from zombie corpse
I think you selected the wrong message to respond to haha
But yea, remove all would remove if you pass a string to remove a specific item
and how to set them up, they see me
Hi. Can you tell me why my clothes look like this? Jeans are layered on a raincoat. I use masks and models from developers. The script is identical, except for the names and xml files. I even tried to take their texture - the result is the same. At the same time, this does not happen on vanilla items. What is my mistake?
Maybe use the xml file of the lab coat or a coat that goes below waistline, they might have a different one from the jacket (which are not supposed to go much lower than the waist)
I can try, but I'm still worried about why this happens to my clothes, but it doesn't happen to the clothes of the developers, provided I use their same masks and their same models, and even if I use their same textures đ„Č
My/Developers
And this often happens with other clothes. Usually on a female character, as it is narrower than a male one
from my observations: the developers' clothes seem to cut off the clothes underneath (if you look very closely, you can even see a small strip with a void). My clothes are just layered on top of the other one. I tried to find some script for this or something from the developers, but I didn't find it
I couldnt tell you how many times the female model gave me problems with textures it's insane
how to check if a player is wearing a specific clothing piece?
I'm looking through the files for the Common Sense mod.
For the door prying mechanic this mod adds, the prying fail chance adds something called "failBoost".
What is this "failBoost"? I don't see it defined anywhere.
I feel like it's something to do with the crowbar or door. So It might be something in the base game, not the mod. But I don't know anything about modding.
I'm just trying to understand.
so at the moment we don't have any script responsible for overlapping clothes?
You might wanna mess with Body locations for top piece? From my experience i noticed that some stuff will be hidden by other items. For example i wanted to make a pocket watch that behaves like normal watch, but is visible on your pocket. Ive set body location to wrists which vanila watches use but model was showing on pocket. Problem occured when i wear something that covers said wrist and in return makes watches invisible (Jacket for example because it covered whole arm so it kinda makes sense). After some trial and error i found out that if you have body location on item that is covered by other clothing it wont show (I belive those would be belly button, watches and maybe even fingers for rings if you were to wear gloves yet im unsure about that one). Could you give your waist coat body location same as Jacket to see if it helps?
Also is that coat you made 3d model, or is it texture drawn on player model?
This is a Jacket that has a BodyLocation in the script = Jacket. Regarding the model: My xml file refers to the developer models that are used for Jacket. And the texture is identical. This, in fact, is the problem: I use everything that developers use, while getting a completely different result
Maybe I'm making some kind of mistake, I do not know. But visually, as if, I applied everything as usual
drop xml
My/Developers
hmm... vanilla looks ugly...
But at least his pants aren't layered on him
And they don't stick out through it xD
you do something with clothes slots?
I can't figure out why the pants go beyond the raincoat. At the same time, this does not happen for developers, all other things being equal
If I put the developers texture in my mod: She's starting to act crooked too. In this regard, I have a question: maybe they have a script somewhere separately that is responsible for the correct layering of clothes. But today I rummaged through folders and searched through PowerShell - I didn't find anything similar.
exist render priority
mask copy too?
Yes, the path is specified to the developer masks
Only jacket is your item, right?
Yes
Could you send that texture here?
what did you do?
To be fair i could not find anything wrong with it from screenshots you've send so i made a quick one myself with your texture
Jeans look strange but they do not clip like on your screenshot
Now ill compare it to zipfile you;ve send
I can't figure out where I made a mistake 
Yours is top one
<m_UnderlayMasksFolder>media/textures/Clothes/JacketLong/Masks</m_UnderlayMasksFolder> is all youre missing i belive
as your line is incomplete
Wait a second, I'm going to try it now
Oh yes, it worked... I do not know why this was an error, because he found the way to the models without these lines. Thank you very much for your help â€ïž
Thank you too, kERHUS!
how do i get from a OnContainerUpdate(object) to said object's inventory? i know it's not object:getInventory(), but not sure what it is
declaration: package: zombie.iso, class: IsoObject
thanks
is there something like OnZombieDead that fires once all the loot is populated in a corpse? OnZombieDead says the inventory is not filled when it fires
oh weird, this said "OnZombieDead: Fires when a zombie dies. The zombie's inventory is not filled with loot when this event fires, but their clothing and attached items are added. The corpse does not exist until a few seconds later." https://github.com/demiurgeQuantified/PZEventDoc/blob/develop/docs/Events.md
@bronze yoke is that true ?
yes
there is no event for this
zombie loot is generated when a player first comes into looting range of the corpse
it does not fire any event, even OnFillContainer, despite using the same code that does fire that event
well poopy
this creates a frustrating situation where it is very easy to add loot to a zombie corpse (using this event) but hugely tedious to remove items
yikes
is it possible to remove a part from a vehicle script using lua?
Can you be more specific with what you are trying to do?
Remove trunk from vehicle script using lua. Given a vehicle id (i.e. Base.Van), I want to remove its trunk using lua.
I can get to the part:
local part = getScriptManager():getVehicle(vehicleName):getPartById("TruckBed")
But now what? How do I remove it? Or set it to nil?
You might be able to use this Library to do what you are trying to do in a simpler way. Not certain. I haven't done a ton of work with vehicles.
https://steamcommunity.com/sharedfiles/filedetails/?id=1430463738
i don't recommend this library
it pretty much just does what you're doing already, seems pointless to tack on a dependency to save like, three lines of code
I see. I have not used it, only seen it around. I would be unable make a recommendation for or against it either way. But to be fair... that is also the reason I don't use Item Tweaker, because I can do whatever I need without an extra library.
I don't know enough about vehicle modding to be useful I suppose. â€ïž
it's exactly the same thing as item tweaker
Ahhhh...
the base syntax for editing vehicles is a little uglier than it is for items but it's still the same level of 'replaces a function call with a different function call'
Well... then maybe it would still prove useful for @halcyon fable to pull it down and dig through the Lua, as it may show him how to do what he needs with the base Lua vehicle functions.
i do know how to mess with vehicles but i'm not really sure there's any way to remove a part
you basically just pass new script lines to process, there isn't really a line for 'don't have a part'
Iâm leaning towards a solution that involves overriding the function
function VehicleUtils.createPartInventoryItem(part)
But I wish I could just remove a part from the vehicleâs parts list.
You could probably just set the trunk space to 0... I guess? đ
Yeah, that is my plan B, if i'm not able to remove the trunk completely
is the base map background an image or is the background made by the game? i'm curious if you could either color areas by if they area no-pvp zone or not, or if you could edit the base image to hardcode it for a particular server if not
what ?
wdym the base map background ?
like the background for unexplored areas https://steamcommunity.com/sharedfiles/filedetails/?id=2939187818
so like red but if it's a no-pvp zone then green or something
I've noticed for some mods they include 2 options to enable in the mod menu for 1 mod
As an example with the Project fungi mod
There an option for
All Zombies
And
Some Zombies
Does anyone know how to do this
So if I were to put
Say 2 different versions of my mod with 2 different names
They would show up as different options
why are the icons not showing up
I have the icon textures in media/textures
and Item_ written before the icon name
are they pngs?
yep
im just as confused as you guys trust me
In every mod.info, have different mod ID and they will be unique mods
Good to know
I can finally release the emaciation update for my human zeds mod
Emaciation ?
Making the zeds look starved and rotten
It's something that I've wanted to do but didn't have the skill to
Until Goblin Conscript (another zombie texture modder)
Taught me how
Now I have to go though every one of my mods
And updated them with this new level of detail
First was Human Zeds
i can't figure out how to remove an item after OnFillContainer, can anyone give me an example?
--local containerInventory = container:getInventory()
--containerInventory:RemoveAll("Money")
container:RemoveAll("Money")
end
Events.OnFillContainer.Add(LootRemoverOnFillContainer)```
not 100% but this should work
function LootRemoverOnFillContainer(roomType, containerType, container)
if container:getItemFromType("Money") then
container:RemoveAll("Money")
end
end
Events.OnFillContainer.Add(LootRemoverOnFillContainer)
idk, i'm still finding mad money in cash registers
I dunno. maybe you need to use Base.Money? can't think off the top of my head what needs to go there
so i know this is a bit ambitious since i have basically no coding knowledge but i want to make a personnel mod with some clothes and i think i can fumble my way to make them work but one is causing issues which is a jacket that i want it to have a hoodie up and hoodie down and jacket open kind of thing but no matter what i do i cant get it to work but i can get it working without all that fancy stuff
anyways sorry for the massive amount of text and no punctuation
verify whether the issue stems from your PNG files by testing with a renamed vanilla icon
I encountered an issue with a PNG file saved from Photoshop that caused the game to crash 
no idea why, but it's because of a faulty PNG
hi all. i am in the middle of making my first mod that lets you refrigerate/heat drinks which give you seasonal buffs. for example, drinking a hot drink in winter will give you happiness and vice versa. the problem is i want to apply this to water sources like water bottles but it seems that water containers are a completely different class of its own when compared to normal food. any suggestions of how i might go around this? thanks.
so i feel like i'm trying everything here, nothing seems to be working
local containerInventory = container:getInventory()
containerInventory:RemoveAll("Money")
container:RemoveAll("Money")
containerInventory:RemoveAll("Base.Money")
container:RemoveAll("Base.Money")
end
Events.OnFillContainer.Add(LootRemoverOnFillContainer)```
anyone know why? i'm not getting any error or anything
I have looked and looked without any avail.
Does anyone know how to create an item that will full restore/repair an item/weapon aswell as reset repairs to 0.
This is the only information I've found on the Fixer line.
https://theindiestone.com/forums/index.php?/topic/3735-the-fixing-system/
Hello, here is how the fixing system for you item and weapon works, it'll be in the upcoming version. It may need to be balanced in the couple of days, after some testing, please use this thread to talk about this, ask question, suggest... And not to talk about my horrible english skillz (use PM ...
While idk how the system works, I know a mod which touches on it
I'm fairly certain these should help understand how the game handles repairs
I will look at those. There is one that affects it I had dug into, but has mod options along with it. I will peak at these.
Essentially I want something like a "axe handle" and it repairs an axe to 100%, and no repair count degradation.
Then I'm sure reading those will help :)
Cheers
Can somebody say me pls where in vanilla uses this occupation table?:
Professions =
{
PoliceOfficer = {
rare = 1,
},
ParkRanger = {
rare = 2,
},
ConstructionWorker = {
},
-- other occupations
}
it might be related to profession vehicles/houses? not sure what a rarity would mean otherwise
maybe, this table located in media\lua\server\Professions\Professions.lua and may mean spawns
Are you just trying to remove money from the game?
Well not really I'm trying to make a mod that lets you remove whatever
I think there are vanilla functions to remove loot, it might be in distributions.lua iirc
Maybe this is a stupid idea, but it seems to me that you can just replace the vanilla item with your own if you create a new item in the script: Base.Money and give them your characteristics/textures and the like. I'm not sure if this can work, but I think I did it a long time ago
Correct me if this is not the case
Is there any documentation on modding PZ?
Yes and no
If you want documentation to explain how modding works uh there isn't much but if you want the java doc yeah
In theory, the game should replace the base item with a mod item, but since loot appears in the files, it still has a Base.Money, then the mod currency should appear. I think maybe this is one of the solutions to your question 
You can also watch this mod. There is a folder where a lua script is written to remove items from the spawn pool, again, if I'm not mistaken
https://steamcommunity.com/workshop/filedetails/?id=2919445152
Where do I find thew java doc? And there is no list of the syntax available?
Cant access instance field?
local container = ScriptManager.instance:getVehicle(vehicleName):getPartById(part).container
container is nil. Am I doing something wrong?
Given that part is a TrunkBed
You can't access fields that way, if you want to access those that way you have to use Accessible Fields alongside your mod
Give me a minute
Javadoc Project Zomboid Modding API package index
Big thanks!
Hi guys! I made a mod for a T-shirt today and would like it to spawn on zombies. I searched the Internet for how to do this, but found nothing. Can you help me please?
Media > clothing > clothing.xml in Project Zomboid directory. They create costumes for zombies there
@bronze yoke found the error, never happened to me before when I made icons with gimp but guess this is also a thing you have to keep track of
ERROR: General , 1715615889022> ExceptionLogger.logException> Exception thrown java.util.concurrent.ExecutionException: java.io.IOException: Unsupported bit depth: 16 at FutureTask.report. Message: C:\Zomboid\mods\Goose's Canadian dollar mod\media\textures\Item_10CADollarIcon.png
it was 16 bit instead of the 8 bit that's supported by zomboid
ok it works now
oh man, i knew that could happen but i didn't think it would come up with icons, i should've mentioned it đ
so i was some what right about fumbling but i have no idea how to do multiple options
this is what i have
ClothingItemExtra = Zooyork_jacket_Open,
ClothingItemExtraOption = OpenJacket,
clothingExtraSubmenu = CloseJacket,
ClothingItemExtraOption = UpHoodie,
ClothingItemExtraOption = Wear_1;Wear_2;Wear_3,
clothingExtraSubmenu = Wear,```
include all the items you want available separated by ;
"clothingExtraSubmenu" is the one for the current item when you right click to equip it
Thanks
just got it working you have no idea how happy i am that it finally works
yeah literally every other png I made in gimp was 8 bit no idea how it got to 16 bit lol
I see, you are on topic right now: How many colors (bits?) should I use for custom tiles to make them blend into vanilla?
it seems like zomboid (for pngs) uses 8bit RGB
honestly can tell no difference between 8bit RGB and 16bit RGB
so its whatever
Thanks, I will give it a shot
if handWeapon = handWeapon:getSwingAnim():contains("CustomSwing") is this a valid line? for example, will the game actually check if the condition is true?
so one of the problems i have rn is hair going through the hood
and with the shorts it makes a long version and when i click it, it throws an error if the error is needed i can get it
found a new problem when i put on a hat when the hood is up it deletes the jacket
i guess another minor issue is that the ground items are weirdly shiny
put <m_HatCategory>nohair</m_HatCategory> in the xml file of the item where the hood is up
you beat me to it đ
just had my mod files open so I had it on quickdraw lol
screenshot?
might just be the gray texture and WorldStaticModels sometimes are just like that
on another note, why doesn't the recipe show up ingame
also how to make so you need both items
because "moduel"
Sugar,``` as separate things if you want to need both
Thats why I try to copy paste as much as I can đ Reduces such silly mistakes a lot
btw, if you use vanilla sugar, you probably want to use [Recipe.GetItemTypes.Sugar];10, instead of just sugar (10 is the amount of sugar units used, I guess a grapefruit could deal with 1 or 2)
ight sure
I'll also add sugar packets as an optional sugar item since that could also be used
as in Sugar/Sugarpackets,
its just a stupid mod I made for a friend so it's whatever really
Anyone know why this doesn't work? I set 2Handed.xml in my anim sets to use WeaponSpeedScale as a variable.
I noticed that when the game is launched, that the variable is not set at all, whereas in other mods, variables show up in the anim viewer in debug.
maybe its just me but it just looks wrong. i plan to make the jacket not a t-pose
yeah
might be because of the model then
but imo it's not a turn off
also look at this guys I majorly fucked up
lol đ love it
wait, wondering why it doesn't work as written?
I see a function and a statement and 3 ends. so the easiest reason is you have too many ends? đ
Ok.
also does the moddata exist prior to this running?
maybe intialize a default value for WeaponSpeedScale and see how it behaves
oh nm i somehow missed that line. forget that last comment
So there is no variable being added at all when the mod is run. Even though it is defined in the animation xmls and in Lua.
The mod data is added to the weapon script, yes.
that makes sense since it's not used in the code. i assumed you were making up an arbitrary number to use for your specific case
so is the goal to use the base combat speed value and multiply by your moddata?
No.
Base speed is not used ever.
Its trying to change the animation speed scale by using set variable.
The game doesn't recognize the variable's existence though.
In this mod, the variables are added at game start, you can tell because in anim monitor it says such.
The game never says it adds "WeaponSpeedScale", it doesn't recognize it as a variable. Combat speed is still created and set to 1.2, even though in the xml for 2HDefault, it does not even exist.
Sry what's the issue here exactly ?
The rewritten xml.
og message
@bright fog
My guess so far is that since it is never making or using the variable "WeaponSpeedScale", then it never gets changed, and then it defaults to using combatspeed which is defined elsewhere.
yeah that's not any variable used in zomboid code that i see
Sadly I can't look at any of these files. If you can't figure out your problem I invite you in the modding channel and ask in the animation channel so I can look at it better when I can
I don't do xml stuff with anims so doggy might help you more there. but you can try something like this should work assuming no issues with that xml (no idea what is even changed)
function WeaponOverride(handWeapon)
if handWeapon == nil or not instanceof(handWeapon, "HandWeapon") then
return
end
local baseWeaponSpeedScale = 1.2
local modData = handWeapon:getModData()
local weaponSpeedScale = modData.CSC and baseWeaponSpeedScale * modData.CSC or baseWeaponSpeedScale
local player = getPlayer()
player:setVariable("WeaponSpeedScale", weaponSpeedScale)
end
local function OnPlayerUpdate(player)
local handWeapon = player:getPrimaryHandItem()
WeaponOverride(handWeapon)
end
Events.OnGameStart.Add(WeaponOverride)
Events.OnPlayerUpdate.Add(OnPlayerUpdate)
i think this should work almost no matter what assuming the moddata is there.
why not using handWeapon:setBaseSpeed() ?
That was my choice, the reason being that base speed is capped by anim scales.
Even if you set your weapon speed to 300 your weapon is never going to get past the limit of weapon animations that's been set by, presumably, "CombatSpeed".
yes, but it handles all variations depending on injuries, body temperature, perks..
My mod needs to get past it.
Yeah I don't mind that for now. Even if I just set the speed scale to some number like 1.2 that overrides all conditions, it won't matter to me, because its on a fairly casual server anyway.
But what does matter is the speed cap.
Another way to solve my problem would be to figure out how to just make it so CombatSpeed doesn't "cap" somehow.
What does interest me is that if you just set speed scales in the xml to something like 2.5 it works fine and animations go pretty fast. But if you try to put it as a custom variable so you can write a number into it that depends on say, weapon base speed, or the anim type, or anything like that, it just won't override that file's values.
But yeah unless you want to use base speed on weapons to nerf people, its useless :p you can make people attack slow, but if you want to make them attack faster its basically useless and caps out at a low value.
now that I think of it, I did some speed uncap by overriding the whole combat in AFight Mechanism mod
is that what your "animfix" is?
oh here you go. This is the fine sir that wrote the animation guide on steam. i'm sure they know wayyy more haha
I'm working with Apex by the way he sent you a message earlier, I'm working on the issue myself and hosting the server that the mod will hopefully end up on if figured out.
my own issue I'm trying to overcome at the moment is reinitializing tile properties without having to restart server
there has to be a way
I just re-uploaded it. the author is Dislaik, not me.
ahhh kudos for giving credit so quickly
Yeah this appears in your lua in the moodle mod:
if useAnimSpeedFix then
combatSpeed = combatSpeed * 0.8;
combatSpeedMin = combatSpeedMin * 0.8;
combatSpeedMax = combatSpeedMax * 0.8;
end
--critical hits not taken into account as they are random
--if player:isCriticalHit()then
-- combatSpeed = combatSpeed * 1.1;
-- combatSpeedMin = combatSpeedMin * 1.1;
-- combatSpeedMax = combatSpeedMax * 1.1;
--end
return combatSpeed,combatSpeedMin,combatSpeedMax;```
I do not think so. animfix is vanilla magic coef if I remember well
Is combatSpeedMin / Max actually defined somewhere else in the game or something?
how would I get the IsoZombie from an IsoCharacter
Either way the guy who did the run speed mod fix seems to have managed to do what I want to do for run speeds but I have no idea why the game's accepting his variables in those xml files and not mine.
yes those are vanilla way of handling random variation of damage
Interesting
goose you see nothing
also goose do you know how I'd get the isozombie instance from an isocharacter instance
No idea lol I didn't meddle with that yet
i understand how id verify if it exists hypothetically I just dont know how to get it from the IsoCharacter
I usually keep to clothing and items right now
what are you trying to do?
nvm albion is clutch as always
very cool things
you misspelled "mvp" đ
true they are mvp
Im excited to see lol you've been working on this for a while now
ive taken breaks dw its not that cool dont get your hopes up smh
(He's trying to downplay the greatness so it looks even better when it comes out)
Classical chopie bait and switch
amen
@mellow frigateDo you know if it is possible to change the values of CombatSpeed min and max?
The solution that dhert had with brutal handwork, I think, was that he just recreated vanilla attacks and turned it into a custom attack animation with a keypress.
by making it a timed action.
Does anyone know why some items will throw tooltip errors at you and have blank tooltips?
Hello amigos, Im curious why a very simple mod i wrote doesnt function. Its a mod that makes your sickness go up slowly after not sleeping and getting high fatigue (my friend groups server has an issue with not sleeping but we want sleep on). I can post the code here if thats okay
you dont have to ask for permission. feel free to share anything you want help with and someone may just pop in to see and reply
Alright cool, just wanted to make sure before i just show up and dump code everywhere lol
I'm kinda new to lua so im not entirely sure exactly what im doing but heres what I have so far:
function CheckFatigue()
for playerNumber = 0, getNumActivePlayers() -1 do
local player = getSpecificPlayer(playerNumber)
local stat = player:getStats()
local fatigue = stat:getFatigue()
if fatigue >= 0.8 then
local sickness = stat:getSickness()
if fatigue >= 0.9 then
stat:setSickness(sickness + .05)
else
stat:setSickness(sickness + .03)
end
end
end
end
Events.EveryTenMinutes.Add(CheckFatigue);
i know setSickness is the issue. using moodles is also a good way to set levels of sickness per moodle level
you want person to get more sick or to get infected?
Just more sick, similar to corpse sickness
i got you. one sec
At a progressive rate but not instantly kinda deal
Alright thanks I appreciate it
And also just because im curious, is there a reason setSickness doesnt work? I saw it in the official documentation that I read
albion said it in here before. search is really good in this discord
said something about it being tied to fps and cause some issue with updating too fast to set it reasonably
but i think sickness is infected level maybe
Ah I see yeah I just read it, It seems that setSickness is only for zombie infection which is updated every frame. Every other instance of sickness is actually food sickness says albion
I guess these are just the quirks you only find by having experience modding lol
---@public
---@param arg0 float
---@return void
function BodyDamage:setFoodSicknessLevel(arg0) end
there won't be any framerate interference with your function because it happens on EveryTenMinutes which is a fixed rate regardless of framerate
sickness is sickness, but sickness is the 'final' value the game recalculates every frame based on your food sickness and infection
so if you change sickness directly it'll just get recalculated next frame and discarded anyway
for that reason if you want to 'add' sickness you do it through food sickness
I tried to incorporate this but now it seems to have an issue at line 8 but im not sure why:
function CheckFatigue()
for playerNumber = 0, getNumActivePlayers() -1 do
local player = getSpecificPlayer(playerNumber)
local stat = player:getStats()
local fatigue = stat:getFatigue()
if fatigue >= 0.8 then
local foodSickness = BodyDamage:getFoodSicknessLevel()
if fatigue >= 0.9 then
BodyDamage:setFoodSicknessLevel(foodSickness + .5)
else
BodyDamage:setFoodSicknessLevel(foodSickness + .3)
end
end
end
end
Events.EveryTenMinutes.Add(CheckFatigue);
the .5 and .3 are just extremes for testing fyi
You aren't getting the players bodydamage that i see? or im blind
i would assume this is showing nil for that line
Ohhh i completely forgot, yeah its working now thanks guys
if you wanna base it from the moodle level 1-4 you can do something like
local moodles = playerObj:getMoodles()
local tiredLevel = moodles:getMoodleLevel(MoodleType.Tired)
if tiredLevel > 0 then
local sicknessIncreaseRate
if tiredLevel >= 1 then
sicknessIncreaseRate = 0.01
elseif tiredLevel >= 2 then
sicknessIncreaseRate = 0.02
elseif tiredLevel >= 3 then
sicknessIncreaseRate = 0.03
elseif tiredLevel >= 4 then
sicknessIncreaseRate = 0.5
end
Okay gotcha, I might do that just for the last two tiers of fatigue.
I got one last question, is there a way to pause and wait until loading is done? It seems to throw an error when trying to run local stat = player:getStats() while loading in. It does this every time I create a new character or load the world
I mean it makes sense I guess, its trying to get stats of something that doesnt exist yet so if i could have a way to wait until everything is done loading before calling getStats I think that would fix it
I'm working on a mod that adds a repair item that will function like tape or glue. If I wanted to add this new item to repair recipes, it would probably be better practice to create new repair recipes that include the new repair item instead of overwriting vanilla repair recipes, but how do I do that? Should I create a new file that imitates the structure of the fixing file or would it be better to somehow append the new item to fixer recipes?
Events.OnInitWorld.Add(OnInitWorld) seemed to fix it
Oh god no
You can most definitely add new repair items
What about OnGameStart
@autumn pumice Well, you wrote a function, but you have to call it from somewhere. A function needs to be activated and provided with the data in its parentheses - writing it is not enough. You have to figure out how you expect to activate that function.
And then correctly do so.
there is a file called ISEatFoodAction with functions that are called when a player eats any food item
where that file
D:\Steam\steamapps\common\ProjectZomboid\media\lua\client\TimedActions
Is there a way to check if a player is wearing a certain clothing piece?
what you want to do is extend the ISEatFoodAction:perform() function in this module in your own file to add extra functionality to it
essentially triggers your code after the playing is done eating
also ISDrinkFromBottle is the corresponding file for drinking from any drainable water source
so how my code should look? just idk, im newbie in this
haha all good i literally started coding pz mods like 2 days ago
Yo that cool
?
pls if you know how just dm me
local base_perform_eat = ISEatFoodAction.perform
function ISEatFoodAction:perform()
base_perform_eat(self)
-- do stuff here
end
yoooo tysm
no need for that
wait a sec, how to get a food what players eating, and player?
you can try find the instance of the food being eaten by calling the self.item object
item has some methods that you can find on the pz javadoc
try self.item:getName()
self - its a player or food? sorry for my stupid
im not sure myself entirely
but i think self is referencing the class that handles the inventory
ok, then how to get player?
getPlayer()
wish the javadocs had documentation
uhh
cant understand
there nothing about it
or im blind
do i need use:
local plr = getPlayer()
or what
?
yes getPlayer() gets the instance of your character
and nothing else?
yep
again im new to this so i cant explain why things are the way they are
im too
zombie.characters.IsoGameCharacter is the class that getPlayer() comes from
lemme check
sorry let me rephrase that: getPlayer() returns an object of class zombie.characters.IsoGameCharacter
you mean its dont gonna work or what?:
local base_perform_eat = ISEatFoodAction.perform
function ISEatFoodAction:perform()
local plr = GetPlayer()
base_perform_eat(self)
end
ideally base_perform_eat should be the first thing to be called in this function
yes i fixed it
local base_perform_eat = ISEatFoodAction.perform
function ISEatFoodAction:perform()
base_perform_eat(self)
local plr = GetPlayer()
plr:Say(".")
end
what now?
oh
dw about what i just wrote
so its gonna work now?
yeah
lemme check
wait
ye?
its getPlayer() not GetPlayer()
ok
other than that i think it should work
lemme check
no its doesnt working
let's go to private messages?
and restart your world
I think we'll talk a lot
alright
ok
Does anyone have the distribution script for food ready?
You mean cooked?
You mean "ProceduralDistributions.lua"? Thats in lua/server/Items
Yeah
Everything is in there
Just have to do Ctrl+F to find the food you're looking for
Theres also the following wiki resource: https://pzwiki.net/wiki/Room_definitions_and_item_spawns
Canned
If you mean the random spawns of canned food in containers (kitchen cabinets, etc), check for the file I hinted you at and ctrl+f as goose said đ
Ok, TKS
self is an instance of ISEatFoodAction
In that case
It refers to the instance of the type of object on which you're currently operating
Just fyi talking a lot about finishing a mod is welcome here. That is the whole purpose of this channel.
DMing instead is fine but having the convo in public may be better
In that people can chime in when the other person helping you doesn't know something
@autumn pumice @versed crane self is effectively just a reference to the object that is currently being called. It's similar to this in C++ if you've ever done any work in that.
Anyway, at the end of the day it's simply a variable (of the table type) that is local to the current method. It automatically gets passed as the first argument to any functions you call in that method. Since it is a table, you can tack on additional variables via keys that get propagated the entire way through the method.
In essence it's just a handy way of managing variable data that defines the current state of an instance of an object in your code.
hi, is there a way to programmatically trigger the Place Item from the context menu?
this one
I am sure there is. If you can find where that menu item is being created in Lua it's probably calling a function that you can simply call yourself instead.
@crisp fossil you can find the addOption call in lua\client\ISUI\ISInventoryPaneContextMenu.lua on line 3729 it looks like.
local placeOption = context:addOption(getText("ContextMenu_PlaceItemOnGround"), items, ISInventoryPaneContextMenu.onPlaceItemOnGround, player);
ISInventoryPaneContextMenu.onPlaceItemOnGround is what is getting called there.
That function gets defined in the same file on line 3750
ISInventoryPaneContextMenu.onPlaceItemOnGround = function(items, playerObj)
local playerNum = playerObj:getPlayerNum()
local inventoryUI = getPlayerInventory(playerNum)
local lootUI = getPlayerLoot(playerNum)
if playerObj:getJoypadBind() ~= -1 and inventoryUI:isVisible() then
updateJoypadFocus(JoypadState.players[playerNum+1])
setJoypadFocus(playerNum, nil)
end
if inventoryUI:isVisible() and not inventoryUI.isCollapsed and not inventoryUI.pin then
inventoryUI.isCollapsed = true
inventoryUI:setMaxDrawHeight(inventoryUI:titleBarHeight())
end
if lootUI:isVisible() and not lootUI.isCollapsed and not lootUI.pin then
lootUI.isCollapsed = true
lootUI:setMaxDrawHeight(lootUI:titleBarHeight())
end
ISInventoryPaneContextMenu.placeItemCursor = ISPlace3DItemCursor:new(playerObj, items)
getCell():setDrag(ISInventoryPaneContextMenu.placeItemCursor, playerNum)
end
thank you for the reply. yeah this is my dead end because i dont know what to pass on items
i was looking where the addOption is defined for sometime now
Is is possible to list every furniture in a building?
The only place items gets called in that function is on line 3766:
ISInventoryPaneContextMenu.placeItemCursor = ISPlace3DItemCursor:new(playerObj, items) so let's go back to where the addOption for Place Item gets called and see what items is...
You can probably use Events.LoadGridsquare to check that square for an isoObject and then get it's name or at least the tile name I would imagine?
I also find this one https://pzwiki.net/wiki/Lua_Events/OnFillWorldObjectContextMenu, there is a code I saw somewhere where the worldObjects is passed as the items but I forgot how I got here
Long shot but i had to try
Any modders here interested becoming admin staff of a server?
So the function where the addOption call is nested in is called ISInventoryPaneContextMenu.doPlace3DItemOption and is defined on line 3707 and also requires an items argument... so let's work our way back from there.
That gets called on line 732 of the same file we've been looking at in the main createMenu function, which also requires items as an argument. đ
All the way back up on line 21:
-- MAIN METHOD FOR CREATING RIGHT CLICK CONTEXT MENU FOR INVENTORY ITEMS
ISInventoryPaneContextMenu.createMenu = function(player, isInPlayerInventory, items, x, y, origin)
@crisp fossil That function gets called in a lot of different places... so I guess at this point it depends on what you are looking to do?
What server? What is it's purpose?
thank you so much for the help, i think i have a progress now. it does not place the item but just drop, but i think i can solve this now
hello fiends đ
does anyone by chance know if there's a good way of fetching a module from a different environment without having to add a table to the global namespace? i'm new to zomboid modding but familiar with lua so when i tried to store the result of a require as i'd usually do i ran into an error since the kahlua implementation doesn't return anything. these modules aren't meant to be public hence why i avoided putting them in the global namespace but is that usually the best option with zomboid modding? thanks
The lua implementation is close, but definitely not 1:1. Can you give us more details on what you are trying to do exactly?
for sure! i'm using a second file to add support for ModOptions to my mod and i assumed i'd be able to require that file and store it in a local variable (since other mods dont need access to it) but didnt realize that doesnt work
i've seen other mods use a global table for that so i know i can do that if i need to but ideally i'd like to be able to have that module run in the same environment as the main one for the sake of keeping things clean for myself and other modders
So it's a scope problem, is what I think you are saying? I haven't messed around with ModOptions at all, I probably should get around to it here one of these days. I assume, however, that there are probably things that can't be local for the ModOptions methods to interact with inside your mod? That could be the issue?
dont worry, we did it
ah scope is the word is was looking for, thanks lol
id like for all of my files to run in the same scope without reaching out into the global scope but i'm unsure of how to get both of them running in the same scope without using a global table
its works
This does work but you may be requiring a file that isn't visible from the place you're requiring it, OR you may be using wrong path to the file.
I'll provide a pseudocode example below
oh awesome, here's my current require path if anything stands out immediately
media/lua/client/A.lua:
local A = {}
-- blah blah blah
return A
-- end of file
media/lua/client/B.lua:
local A = require("A")
Don't write client in the path
i'll try that out, thanks
You can see this done a lot in True Music Jukebox for diverse examples
Welcome to refactor any code you find in any of my mods on the Workshop. My name on Steam is the same as it is here
i appreciate that, it seems like this is mostly a process of learning by example so i'm glad to have as many as possible
Indeed it is
You can also globalize a local module for testing from the debug console this way. @hearty estuary
So if you're testing a local module and want to temporarily make it global for testing, just type A = require("A") in console
Where A is the module / filename
Okay, I'm able to loop through every iso object in a building, but I can't understand how to get those objects properties. I'm mean, if I have a square with a pallet, how do I get the weight of this pallet?
My final goal is to get the sum of the weight of everything inside a building (items inside containers, object etc.)
Ooooh... that's a good question... and I'm not exactly certain of the answer. So, the isoObjects themselves don't have a weight. They have a weight when picked up and existing as an item in your inventory, though! So you would have to figure out how to get a reference to the inventory item version of that isoObject and add that to your calculation. đ
Only moveables have weight (those you can pick up), they have a property: "PickUpWeight"
Okay, bit is it possible to get a reference to this moveable from an IsoObject?
the IsoObject is moveable, you need to check its sprite properties
local isoObject = yourIsoObject
local spriteProps = isoObject:getSprite():getProperties();
if spriteProps:Is("IsMoveAble") and spriteProps:Is("PickUpWeight") then
local objectWeight = tonumber(props:Val("PickUpWeight"));
end
Elyon with the save!
What would be a good way to do that? Shall I create a new file that imports the base module and just make new repair recipes to incorporate the new repair item?
I have no idea, but I know some mods did it
And I don't think it's a recipe
Not sure tho
Hmm. Any chance you remember what any of those mods were, for reference?
Negative but still a good reference. I'll look around and see if I can find a solution or some inspiration
đ
Look within crafting mods that add custom glue or some shit like that perhaps idk
What for in timedactions uses setJobDelta and setJobType? Like in fishing
function ISFishingAction:update()
self.rod:setJobDelta(self:getJobDelta());
end
function ISFishingAction:start()
self.rod:setJobType(getText("ContextMenu_Fishing"));
self.rod:setJobDelta(0.0);
end
You mean using the fixer or just the oncreate recipe thing?
It depends on what you want
If you want to add an item on top of the old one you would have to remove the old vanilla
I thing theres a recipe manager
I havent done this before
Another possible method
You could try and hide the old recipes
But if your recipe can co exist with vanilla then you dont have a problem
Just add your recipe
it seems like the context menu calls FixingManager.getFixes(brokenObject) so you could follow that back to find where you can add valid fix items
What I'd like to do is add new fixer recipes for the new repair item for every item/weapon that can be fixed with like repair items like duct tape or glue. I understand now that I could simply define new fixer recipes and call it a day but I'd like to explore doing so without having duplicate repair recipe entries, if possible.
However, my limited knowledge of coding provides that overwriting vanilla entries is not a good practice
Yeah dont overwrite
It will break stuff
you can get repair scripts using the script manager or fixing manager but the fixers (items used to fix) are stored as a linked list which i'm unsure you'll be able to interact with
Unfortunately I'm not very familiar with lua or with PZ specific modules yet, so I haven't the faintest clue of how to manipulate or interact with that
i've never encountered pz actually use a linked list anywhere so it may not be exposed
nah, looks like it is exposed, so you might be able to do this?
seems like it would be kind of complex
ah thats all good, it seems like the Fixing module loads all the recipes into a table which then serves as the source of truth for other modules when grabbing fixing data
so if you want to make a blanket repair item that can repair any repairable item it might be a lot more involved than adding onto existing recipes
I see.
In that case, I may just make a script file to house new fixing recipes to incorporate the new repair item, then check that out and see if I can achieve the same results in a more clever and/or seamless way
it seems like Fixing has a method called getFixers which returns a LinkedList of all the items that can be repaired along with their repair items
so you might be able to add repair items to each entry using the same method originally used
if you arent already looking through the decomplied zomboid code it might be pretty rough though
this isn't toooo crazy but it's sort of the deep end of lua script editing
basically anything else you'd want to do this way would be far more streamlined
fixer and fixerskill have public constructors so you should be able to just create them and add them to the fixing's list
negative. Haven't even considered doing that, let alone how to decompile the code to look at it lol
the main way i know of is through PZ-Libraries but i just browse the files through VSCode rather than IntelliJ IDEA as is suggested
i wouldn't follow this guide, it's very old and the method it uses doesn't even work anymore
oh crap i didnt even realize, is there a more up to date guide?
perhaps I shouldn't be trying to do this after having been awake 24hrs
i like using https://github.com/quarantin/beautiful-java its setup is a little complex but it has a cleaner output than most java decompilers, otherwise you can just use any generic java decompiler
there isn't anything special you need to do to decompile zomboid specifically
if you just want to browse the files there's also Candle
I feel like the neuron activation meme right now, not gonna lie
i'm fairly new to zomboid modding so these are just what i've been able to figure out so far
that guide is mostly for generating libraries and setting up capsid, which isn't something anybody uses anymore, it's very old and umbrella is better (as one of the creators of umbrella đ )
omg thank you for that, umbrella has been a massive help in my early stages so far
its been pretty difficult to figure out what is and isnt relevant to zomboid modding at the moment
i can't blame you, i see that guide linked every fifteen minutes here, but i think it really pushes people away
that makes a lot of sense, it definitely did not make me very excited to start modding either
now that i know i'll make sure to point people toward umbrella
What is umbrella and how does it work?
never watched resident evil?
Mi hermano en Cristo. I was assuming it wasn't THAT Umbrella 
it's a library for vscode for zomboid modding
you can install it with the lua extension's addon manager (NOT vscode's extension manager, there is another umbrella on there that's nothing to do with zomboid đ), it'll give you some type checking and intellisense for zomboid functions
Gotcha. I added it to my vscode environment
What of those buttons do I have to click to find said umbrella extension? Tested several now, but hat no luck
(sorry, all of this programming stuff is still very new to me)
with the lua extension enabled, press ctrl-shift-p and a menu should open at the top, type Lua Addon Manager and it should come up, and then it'll take you to a page where you can search for lua addons
thats what I get when trying to open it đź
do you have git installed?
i forgot it doesn't work when you don't have git and doesn't tell you you need it or give you a helpful error about it U_U
is that a vscode extension?
that feels like my zomboid debugging experience atm
not exactly but it can integrate into VSCode to help with version control
its used often for downloading software packages through the command line as well as maintaining your own
you might need to restart your computer after installing it for it to work
(i think we all usually ignore those warnings LOL but it did actually come up for someone here)
normally i dont restart either but i agree for Git i'd definitely play it safe and restart
I just have to have it installed?
Oh, it worked đ Thanks a lot!
Trying to learn coding it sometimes feels like the guys that invented all the stuff tried to make it extra hard, lol
lol, i know what you mean
scripting languages are usually pretty friendly but as soon as i open up Java or C++ i feel like my mind is going to explode
i feel like its a lot of fumbling in the dark at first but as soon as you find the light switch it feels awesome
I am already super thankful I discovered unity. I am one of those persons that actually need to see what is happening to understand what is happening. Tried learning java some years back, joined online forums and asked the guys there "how can I make visible what I wrote, so I can see it?". They did not even understand, what I meant, lol
to me, Dhert's way is the best way. most of it is constants inside java code: IsoGameCharacter.calculateCombatSpeed () //protected method
Yeah but it does seem like a lot of work to have to recreate attacks when all you really want was for "base speed" to work uncapped.
Maybe IS will look at that in the future?
agreed. moreover the best way according to other's pov does not mean you have to follow it. if you find a better way, please keep me informed !
Has someone tried to make third person or first person mod?
Not possible
Pz tile assets are 2d
Found another method you can also do this via anim xmls
But idk if its a better
You can do this by adding another xml of whatever action you want to speed up
Add a boolean to trigger this instead of vanilla
a float var you can adjust and put it on the speed
What for in timedactions uses setJobDelta and setJobType? Like in fishing
function ISFishingAction:update()
self.rod:setJobDelta(self:getJobDelta());
end
function ISFishingAction:start()
self.rod:setJobType(getText("ContextMenu_Fishing"));
self.rod:setJobDelta(0.0);
end
Instead of having it static
Ive done this for goose zed mod
Im not sure but i think that determines how much you used the item
For condition or drainable purposes perhaps
thanks
does anyone know a reliable way to detect which mod was removed from workshop
0 MB mods are getting on my nerve
Unrelated but it was so funny that multiple people I know pinged me with that mod
Had that same problem where in the middle of an event a mod got deleted from the workshop breaking the modlist, you just habe to manually re-add every mod from the modlist
We just found out from context which mods where deleted but yeah
No you don't really have to do I think
You just have to find the mod, which is uh easier said than done
Yeah thats the hard part
Also a tool could easily be made to check every mods workshop ID if it can be accessed
Thats a neat idea
There is less painful way in case you use any sort of text editor like Sublime
- Copy all
Mods=from your server, split the list by;character and sort alphabetically - Grab your collection https://pzidgrabber.com/ IDs, split by
;character and sort alphabetically - Diff the two files/snippets with some plugin you like
Still fucking manual labor but at least you will have idea faster.
It writes in the console.txt what workshop item it gives error on download.
Smthg like Chuck's tool to check reuploads but instead check the workshop ID
https://docs.google.com/spreadsheets/d/1JDO_jELKNQqpNVU_IbzgJ-gprxEU9Pn3kFsCLu_L1YE
RESULTS
Enter Original Mod ID to the right:
Copy this worksheet for your own use.
Maximum lookup for this page is 182 mods.
If you for some reason need more you can
edit the hidden sheet named 'ModScrape'.,Game Night
Workshop ID,Title,Workshop Page
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,,
,
B42 better be having some QoL to this seriously.
Basically check if workshop item is even existing, don't load it and report to log or something.
Really an excel is enough for that
Using this same system
Would also allow you to check if copies exist online
yeah cool, thats when you know which mod was present in the first place 
You have pair of Mods= and WorkshopItems= and one of them might not be an actual workshop item anymore. You can only bubble sort this out reliably by having a collection
But your server still has the workshop ID
Right ?
In it's config
So just take that
yep
lets check
not sure how to get results of anything, should be they comma separated? I see ModScrape page does some magic but no results
nevermind it just broke up when i copied it for some reason
not viable for the matter
Uh
It works
Bcs workshop IDs are just the link page
So just check if you can access the link
entering mod id 1-by-1 just to figure out which one is a goner when you have 200+ mods on a server is not how you solve the problem with missing mods.
Of course reupload tracker isn't adapted for this here, but the concept is here
Which is why I said you can use the concept
this is just maddening i wanna read steam API now to know which page doesn't exist anymore
some JSON would be good
found it
If your mod doesn't exist anymore (for example 1234567890) you will get this
{"response":{"publishedfiledetails":[{"result":9,"publishedfileid":"1234567890","language":0}]}}
If its published you will get something like
{"response":{"publishedfiledetails":[{"result":1,"publishedfileid":"3066276504","creator":"76561198063078194","creator_appid":108600,"consumer_appid":108600,"consumer_shortcutid":0,"filename":"","file_size":"338850","preview_file_size":"73804","preview_url":"https://steamuserimages-a.akamaihd.net/ugc/2110558879653840982/54BA9C9C5BD57F318F43130BBC5DD9EA735D24DE/","url":"","hcontent_file":"2367266303455595942","hcontent_preview":"2110558879653840982","title":"Container Tags","file_description":"[h2]More time to play, less time to sort![/h2]\r\nAdds an ability to add text tags to any containers in the game with simple context menu and UI.\r\n\r\n[h1]FAQ[/h1]\r\n[list]\r\n\t[*][h2]Yes it is safe to add or remove this mod mid-game.[/h2]\r\n [*][h2]Yes it does support multiplayer (with factions)[/h2]\r\n [*][h2]You can switch modes between: personal tags, faction tags and disabled using panel button (example below)[/h2]\r\n[/list]\r\n[img]https://steamuserimages-a.akamaihd.net/ugc/2276070691923591956/3526F7C6821BD6BB78FE66B48375E50DD09C767F/?imw=637&imh=358&ima=fit[/img]\r\n[h1]How to Use?[/h1]\r\n[list]\r\n\t[*] Subscribe to the mod.\r\n\t[*] Right click on any container in the game.\r\n[/list]\r\n\r\n[h1]Interface preview[/h1]\r\n[list]\r\n\t[*][img]https://steamuserimages-a.akamaihd.net/ugc/2110558879653865249/89B96DE23379B622F524122006FE0CDA110C7617/?imw=5000&imh=5000&ima=fit[/img]\r\n[/list]\r\n\r\n[h1]Contribute[/h1]\r\n[url=https://patreon.com/dismellion][img]https://steamuserimages-a.akamaihd.net/ugc/2274944075017679576/12820D94B3F7FAD52932A4E4A3C37DC670E5E43F/?imw=256&imh=256&ima=fit[/img][/url]\r\n[url=https://bitbucket.org/demellion/pzmods/src/master/][img]https://steamuserimages-a.akamaihd.net/ugc/2274944075017676323/F052909A8484950B2C582F88DE7497BD6BBE7317/?imw=256&imh=256&ima=fit[/img][/url]\r\n\r\nWorkshop ID: 3066276504\r\nMod ID: containertags","time_created":1698665558,"time_updated":1701280800,"visibility":0,"flags":134223360,"workshop_file":false,"workshop_accepted":false,"show_subscribe_all":false,"num_comments_developer":0,"num_comments_public":134,"banned":false,"ban_reason":"","banner":"76561197960265728","can_be_deleted":true,"app_name":"Project Zomboid","file_type":0,"can_subscribe":true,"subscriptions":82652,"favorited":2222,"followers":0,"lifetime_subscriptions":102894,"lifetime_favorited":2446,"lifetime_followers":0,"lifetime_playtime":"0","lifetime_playtime_sessions":"0","views":55600,"num_children":0,"num_reports":0,"tags":[{"tag":"Build 41","display_name":"Build 41"},{"tag":"Interface","display_name":"Interface"},{"tag":"Misc","display_name":"Misc"},{"tag":"Multiplayer","display_name":"Multiplayer"}],"language":0,"maybe_inappropriate_sex":false,"maybe_inappropriate_violence":false,"revision_change_number":"10","revision":1,"ban_text_check_result":5}]}}
so if result field in array of publishedfiledetails is 9 its not there anymore
bash/JS can solve that quite easily
Nice
time_updated is a nice thing too
$ node workshop_checker.js
[ERROR] 1234567890 doesnt exist on Steam Workshop
[OK] Cant Grab This [B41+ MP] [2927605405] was lastly updated on Mon, 06 Feb 2023 01:49:10 GMT
[OK] Immersive Currency [2929712315] was lastly updated on Wed, 13 Dec 2023 21:57:02 GMT
[OK] Immersive Shops [Vehicles Update] [3040894629] was lastly updated on Sat, 06 Jan 2024 22:40:01 GMT
[OK] '82 Jeep J10 [2886832257] was lastly updated on Tue, 11 Apr 2023 18:49:04 GMT
[OK] Barbed Wire + [3095911903] was lastly updated on Mon, 04 Dec 2023 20:22:36 GMT
[OK] Gunsmith [3105394500] was lastly updated on Wed, 28 Feb 2024 20:23:57 GMT
So far so good
So you made a thing to check workshop IDs ?
almost done
ill push it to my mods repo soon and link it
Nice
$ node workshop_checker.js
---
[OK] Immersive Currency [2929712315] was lastly updated on Wed, 13 Dec 2023 21:57:02 GMT
[OK] Immersive Shops [Vehicles Update] [3040894629] was lastly updated on Sat, 06 Jan 2024 22:40:01 GMT
[OK] Container Tags [3066276504] was lastly updated on Wed, 29 Nov 2023 18:00:00 GMT
[OK] Gunsmith [3105394500] was lastly updated on Wed, 28 Feb 2024 20:23:57 GMT
---
[ERROR] 1234567890 doesnt exist on Steam Workshop!
[FATAL] thisshouldbenumber is not a valid Steam Workshop id, should be a number!
Looks something like this
Nice
Looks clean
You think you could have something to give the mod ID too if it gives out an error ?
Not sure how much complexity that would add however, that's already pretty good as it allows players to check their localy downloaded workshop mods and find the mod with the workshop ID anyway
Just a neat feature I thought about
Not sure what you meant, you put mod ids into the script like this
const modlist = 'WorkshopItems=2929712315;3040894629;3066276504;3105394500;1234567890;thisshouldbenumber';
You can find those in your server settings.ini
Yeah no nvm you can't access the mod ID if the page doesn't exist
My idea was it would give the mod ID linked to the workshop ID but you can't access that info if the workshop page doesn't exist anymore
no you cant
{"response":{"publishedfiledetails":[{"result":9,"publishedfileid":"1234567890","language":0}]}}
You only get this much
Nothing can do that
My point wasn't that you have to do it with the info it gives back
But it's okay it was an idea I thought about when thinking about using the reupload tracker
Like I said, getting the workshop ID which doesn't exist anymore is already very good
Do you think some easier to use would be doable to run the script ?
regarding "tracking" you have to to have some history of them because once the Steam Workshop item is deleted by author or Steam service, they send a push notification to every subscriber online to remotely delete the mod folder related to it too, so its not even kept on your PC once you are online.
I'm personally not familiar with json and how to actually run these. And I'm sure having something easier to use for server owners would be great
You can re-wrap this into HTML with <script> format
No that's not true, I've had local versions of mods deleted even when online
That's really not better LMAO
I mean there is no better user-friendly format, this is just one single .js snippet
You can haul and host web page for that of course if you wanna share
I mean I know you wrote something that explains how to run it, but my idea was to have something like Chuck's reupload tracker, like an excel sheet online for people to use is very easy for anyone to use, anyone and on any device basically
It's already fairly good tbf
im not a big fan of excel as database
I'll share it on the modding Discord
I mean, that's not the point to do a database here
I also probably posted it before not sure but there is also a linux script for automatic server restarts when mods are updated based on bash and crontabs
https://bitbucket.org/demellion/pzmods/src/master/.snippets/Linux/checkmods.sh
Kinda always thought this is the place

Also somebody should fix the startup unit settings for linux in Dedicated Server section because
ExecStart=/bin/sh -c "exec /opt/pzserver/start-server.sh </opt/pzserver/zomboid.control"
Works very poorly when something bad happens and /opt/pzserver/zomboid.control is left behind as a plaintext file.
Why? Because last message stored in it is quit and server starts... and shuts down itself again because of < directive feeding it a said quit command right after
some rm is in order there
maybe even better to just :> /opt/pzserver/zomboid.control instead
Welp I personally don't know shit about servers
But perhaps your talents in it could be useful to the Discord and we could make a section about servers where you can share specific guides on the subject as well as shared your work there
That way whenever someone joins they can easily have a section on the subject idk
Anyone here knows if the Weird Expanded Helicopter event should create the weird zombies on a server? Because as I was checking the /lua/server folder, the first line in the code has a if isServer() then return end, so technically its either on the wrong folder or it wouldnt run
isServer() means it won't run server side
But it will run client side
It's just a block to stop the server in MP to run the file
Got it
I was doing something wrong
But now I managed to make it so, depending on how much hp you spawn the zombie (I am mainly using createhorde2) it gets a specific characteristic, like become a crawler, its a runner, etc. and then it resets its hp to 1
Yes, createhorde2 has a -crawler tag, however the zombie doesnt get set with a canWalk(false) , so it spawns lying down and then gets up
Interesting
@wraith hemlock FYI
Don't I still have to write out the attack on keypress for that?
What is it youre trying to do?
When a weapon is equipped, the character should use a custom animation to avoid the weapon animation speed cap.
The attack damage calculations and everything else don't need to change.
I'm not sure I would specify the only difference to the game being that I want it to use the custom anim node. For spears and stuff, that's determined by SwingAnim =
Oh
You can refer to my katana stance mod
You can create xmls
You don't need to overwrite anything
Just need to tell it that this player is going to do a different animation with different stuff
Just add a boolean
You can also refer to my bayonet mod
It changes the way player would do shove so you can still shoot while being able to stab and slash
The stab is from a different xml but it uses the spear anims
Where and from which folder do we start making mods? ı watch some videos bu ı cant find starter docs
You can customize the speed there too
Even how zeds will react if you want to
The animset xml part of pz is powerful
But theres no documentation
So its really hard to manipulate
oh, is this the speed of attacks, or the idle animations?
I see in your melee 2handed there is just KatanaCharge.
I need to specify. Its the weapons actual swing animations and not its idle stances that I'm trying to change.
I'll try this out anyway.
I solved this on my own servers by just properly implementing the socket file systemd service.
Is there a code that checks if there is a dead body in front of or behind the door?
Probably not ?
In windows go to the %USERPROFILE%\Zomboid\Workshop directory and create a directory inside there. You want to place Contents, preview.png (the steam preview image) and workshop.txt inside that directory. All of this is to set you up for pushing your mod to steam.
Inside the Contents directory you place your mods directory. Inside here, you place any mods that you want to have included in your workshop download. Any mods inside this mods directory will be pulled down and installed when a user subscribes. There are plenty of Workshop items that simply contain one single mod.
For instance, if I wanted to create a mod called My Awesome Mod I would do the following:
- Create a directory called
MyAwesomeModlocated at%USERPROFILE%\Zomboid\Workshop. - Create the
preview.pngandworkshop.txtfile insed theMyAwesomeModdirectory. - Create another directory inside the
MyAwesomeModdirectory calledContents. - Create another directory inside the
Contentsdirectory calledmods. - Create yet another directory inside the
modsdirectory calledMyAwesomeMod
You can use this reference for creating the directory structure from inside your mod folder (the final one, now located at %USERPROFILE%\Zomboid\Workshop\<mod name>\Contents\mods\<mod name>): https://pzwiki.net/wiki/Mod_structure
Please note that the wiki isn't exactly great for explaining how to mod from that point. There is some good stuff on it. It's just not really thorough.
Feel free to ask questions. â€ïž
If my lua isn't in folder media>lua>client, it won't work, right?
i had my lua files in lua itself and i just realized that this might have been the reason they didn't work.
Correct
Yeah, I tried the boolean method, it doesn't seem to be working for the custom xml.
Wait, it does! I just had to unsub from my workshop mod to get it to use the updated version đ
YES!
Thatâs awesome
now i can make suits of armour to augment players to run and attack faster
as well
There are still some things to iron out like dealing with the randomness of the animation that can cause some noticeable pauses/delays between some attacks and not others. But this is a lot of progress.
Hmm i think you have same issue like
@bright fog
What's the issue ?
That doesn't sound like the same issue than at all
Not at all
The delay is most likely the hitting delay
The attack delay
This is doable
Just need to fetch the sqyare then check for deadbody iso
Hello to anyone who can help. I am trying to make my first mod and when I go to test it nothing is added, nothing happens. I only have this 1 mod load I have also included some print string for example, print("DynamicSupplyDrops script is loading..."), although when attempting to test I get no debugs in my output log. If anyone can help me figure out how to print debugs into the output log that would be great!
Does anyone know if its possible to combine all of these onto one line in the localization file? It feels redundant to have these as separate entries when they will be translated the same, but the parts are unique. I tried to use a * character but it didn't work.
To answer my own question for anyone who comes across this in the future through searching, it seems the answer is no. The devs did something similar in their own localization file and it would seem each has to be its own entry. Oh well.
Anyone with experience know if its actually feasible to make a mod that lowers the quality of a wall if it take enough damage to be at the same level as said level?
For example level 3 takes 50 damage it becomes a level 2.
Im fairly sure it should be possible but i dont have enough experience to know if its possible to do so without it being a huge lag fest.
almost anything is possible with enough restless nights of reading java documentation and enough testing
You probably made mistakes in either mod.info or the repositories
Project Zomboid's logs have a log filter category like DEBUG, LOG, WARN, ERROR. In lua, you can make it LOG by using print() and ERROR by using error() but not the other two. Any possible way? It's not that serious because I am already appending [WARN] prefix to msg

