#mod_development
1 messages · Page 534 of 1
alright, i'll start looking into it
thank you
you're literally the first and only one in days that was able to point me atleast somewhere
its ISInventoryPane and ISInventoryPage which are derived from ISPanel
one is player inventory the other is loot inventory
ISInventoryPage for loot inv got it
they are both an ISPane doesnt really matter which you look into
probably look into both for a better overall idea
My goal project is a inventory organization tool so I been looking for something to manually create a inventory display.
iss there an addLineChatElement for yelling?
Would anybody be willing to give me some guidance with .lua stuff? I am trying to do something for my mod which is otherwise finished, but i've never coded in this language before, so i can't quite get it right. I don't think I'll figure it out without assistance
hey I want to make a mod to add bicycles, I have limited experience coding using JavaScript, a subscription to Codecademy, and a desire to do this shit. I realize this is going to be a 6 month+ project and my limited knowledge will be a hinderance but is anyone here willing to help me get up and running?
DM me and I can help to set you up
I just sent you a message
vision
Why does OnServerCommand() never get called?
/media/lua/server/server.lua
local function SendCommand(playerObj, message)
local args = { message = message }
sendServerCommand(playerObj, "MyModule", "MyCommand", args);
end
/media/lua/client/client.lua
local function OnServerCommand(module, command, args)
-- THIS LINE IS NEVER EXECUTED
print ("Server command received")
if module == "MyModule" and command == "MyCommand" then
print ("Success!")
end
end
Events.OnServerCommand.Add(OnServerCommand)
This was in a self-hosted server. The game client was both the server and the client.
It should work, shouldn't it? Everything is correct.
and is that all the code?
I have a menu command that calls the SendCommand function, but that's about it. I confirmed SendCommand function is being called
what do you mean a menu command
And I confirmed the arguments passed to it are PlayerObj, string
In-game right-click menu
Just an event to trigger this test code
and that executes that server function?
Yes
but... it's in the server folder, how is that possible?
from that menu youd have to sendClientCommand and server side handle onClientCommand to execute that
Ohh.. okay
clients still load server files
So the folders enforce nothing. Client and server are separated by logic only
a server doesnt load client
Oh
its because a client can be a server
if you want to prevent it entirely from loading on a client you can add this to the very top of the file
And it still loads and runs the server code when you connect to a remote server?
if isClient() then return end
Will that break the mod when run in single player or self-hosted?
single player is neither considered a client nor a server
so not isClient() and not isServer() == true means its singleplayer
So is this true:
Remote Server
- Client loads client code, shared code, and server code
- Server loads shared code and server code
Local Server
- Client loads client code, shared code, and server code
- Server loads shared code and server code
Single Player
- Loads client code, shared code, and server code in the same instance
think so yeah
Thanks. It's confusing
it shouldnt matter if the clients loads server code anyway because youre only going to run server side code there
You mean you're only going to run client side code there?
in your case you called sendServerCommand from a client and that does nothing because its not a server
That makes sense
and events you register inside server files are usually only called by a server
so never get triggered on a client
Riiight
also note sendClientCommand does not work in singleplayer because it is not a client
How do you keep it from breaking in single player then?
what do you need to do server side?
Suppose anything... Do you just duplicate the code to server side?
Like, that system message I asked about earlier
Server sends a message to client to display in chat window (though single player has not chat window)
if youre accessing globalmoddata which is on the server then in singleplayer its already local so can access from client code
tbh in that case its a bonus code isnt ran and wont cause issues with a missing chat window
So if you need to send a command to a client, sendServerCommand won't trigger OnServerCommand
You would need an if (singlePlayer) somewhere to ensure client side code gets run
i dont recall if sendServerCommand works in singleplayer
but yeah you can have a check
Cool, thanks, @drifting stump
The code doesn't work from client-side either:
/media/lua/client/client.lua
-- This function is called when the player clicks a command on the right-click menu
local function SendSomeCommandToServer()
sendClientCommand("MyModule", "MyCommand", {});
print ("Command sent") -- This text DOES print
end
/media/lua/server/server.lua
local function OnClientCommand(module, command, player, args)
print ("Server command received") -- This text does NOT print to the command console
end
Events.OnClientCommand.Add(OnClientCommand)
Again, this is self-hosted locally (not single player or remote).
Does that print in the Zomboid root folder because I don't see it printed there
@#$%#$^
Wrong file
check User/Zomboid for server-console.txt
It's not writing to that at all
Ah, it uses coop-console.txt now
AAHHH IT WORKS .....PARTIALLY!
Thanks again, @drifting stump!
np
I must be getting sleepy
I once had probelm debugging too.
It got easier when I made a custom log file and then I could see if stuff is happening
function Custom_DEBUG (message)
if (type(message) ~= "string") then
message = tostring(message);
end;
local file = getFileWriter("MyCustomLogFile.log", true, true);
if (isClient()) then
message = "Client:" .. message;
else
message = "Server:" .. message;
end;
file:write(message .."\r\n");
file:close();
end;
Something like that
Cool, thanks
I just realized EveryHours doesn't get called server-side. I need some sort of timer event.
iirc text settings are byte buffered and therefore currently not able to be changed via lua
if they ever expose it to lua, we can change it

hmmm maybe you could use the processPM function but get the players standing on nearby tiles and have it send a pm to all of them
Does the server setting VoiceMaxDistance not affect /say range?
i had this exact thought but wiser minds than mine laughed when i brought it up
make it
it would make me happy
@sour island hello friend with your uhhhhhhhhhhh moodles yelling mod thingy where the player goes 'brr' when its cold and stuff. does that broadcast to other players?
Is brackets good enough for modding?
there is an option for that
to change the text that appears above your head? to other players? 
think he uses Say()
which i think? is client side?
you may be correct
it currently just has a selector for zombies hearing it
take that as you will
say() is rather useless in MP unfortunately
would love that selector to affect things like the global processaymessage
but alas
Im looking for someone with modding expirence
Because I want to edit one mod
But i don't have any expirence
But i know what i want to achieve
So please if anyone is willing to help
Then please dm or ping me
What are some mods to make my game more scary.. not in the way to make it harder or a horror game.. just like a sadder world... Or small changes to zombies and or models?
Well my mod would be great for something like that
IF SOMEONE COULD HELP ME
But seriously
Check this video
i can help you with script but not in LUA
In prep for october! I thought Id cover a new modlist, but this time it focuses on the more horror-themed mods out there! Anyways, I hope you all enjoy and stay tuned for the actual series coming up real soon!!!
0:00 Intro
0:29 Afraid of Monsters Zed animations/Skins:
https://steamcommunity.com/sharedfiles/filedetails/?id=2590814089
https://st...
Oh
i currently making a mod. i want to bring Rust to Project zomboid.
I don't know the difference but I'll need any help
Oh nice
I always thought that Zomboid would be great for something like Rust or Escape from Tarkov
I'm trying to edit one mod
what mod you want to make?
I've seen that one.. and I'd say the scariest thing in that one is the animations for the zombies.. but thats not scary enough
what was this mod?
I want to give zombies even worse sight than poor sight in sandbox options
Zombie Camouflage
It makes you more or less visible
depending on various factors
And
I want to edit that mod
So it'll give me permanent Camouflage
But
From what i understand
It works in a way
aw cannot help you in that, im not expert of changing zombie codes.
i only good at making items and weapons.
That there's a value how much you're visible to zombies
Oh okay
But thank you for your willingness to help
maybe you can ask soul ficher or whatever his name is, he's good when it comes to zombie modifications
can you give me the link in that
Steam?
To that mod?
discord
yes
Imagine a mod that makes * and players have a chance to fall over dropped items.. and that u can use small furniture as a weapon on push zombies over them so they trip.. idea from "all of us are dead".. I have a small feeling that this game is missing that kinda of realistic combat
there was a mod that makes players drop items randomly. i think it was the more traits mod.
And I want to change that mod
So the camouflage won't expire
But be permanent
And set at some certain value
I mean that's cool.. and would work perfectly with that and the clumsy trait.. but having the option to use Ur environment as Ur weapon would be so cool
So zombies won't be too blind
Also I'm not sure if if affects their hearing
But i want them to have pinpoint hearing
Workshop ID: 2335368829
Mod ID: AuthenticZBackpacks+
Mod ID: Authentic Z - Current
Map Folder: AZSpawn
Should I write AuthenticZ instead of Authentic Z?
If im modifying a base item, does my file in scripts need to be a full replacement of the item or does it only need to append?
example, if i wanted to double the usage rate of thread, would i do it like this:
item Thread
{
DisplayCategory = Material,
Weight = 0.1,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.2,
DisplayName = Thread,
Icon = Thread,
ConsolidateOption = ContextMenu_Merge,
SurvivalGear = TRUE,
WorldStaticModel = Thread,
}
or like this:
item Thread
{
UseDelta = 0.2,
}
all my prior interactions with game modding were done by appending and not just clobbering so im just a lil confused here on the conventions
I need some small assistance when it comes to adding maps to the world. Can someone aid me through it? 😄
So I want to make zombies normal during the day and absolutely ridiculous at night. How would I go about that in sandbox settings?
Or is there any mods for that
I think the #mapping channel is closer for this sort of question
Blair Algol hangs out here and has a "Night Zeds" mod which amps up zombies
I.... don't get Brita's Weapon Pack
Other firearm mods like AR-15 specifies the gun model and various attachment points
Brita's has.... nothing
it only specifies the model of the parts like the magazines but none of the gun itself
I'm trying to extract MG42 out of Brita's weapon pack (I'm not interested in anything else really, especially not the gunplay changes) but for the life of me I can't figure it out. I don't see MG42 game data described anywhere beyond the model
When I do a grep of the whole brita weapon pack folder, this is all I get
I'm super confused
what the actual fuck, it's fucking split between Brita providing the models and Arsenal(26) providing the gun data
why would.... why would you do that? 
does anyone know how to get brita to work i cant get to work on hosted servers or my single player games?
Because why would anyone want there to be consistency
Who doesn't like bloated libraries
brita moment
bumping this cause still need help
Is it possible to create a new slash command and capture it in a lua script?
How to I make it so a crafting recipe requires a certain skill? Like a recipe requiring X metalworking or such
I made a mod that re-textures all the base game hair 😄🎉 Hope people will like it https://steamcommunity.com/sharedfiles/filedetails/?id=2787539183&searchtext=
i dream about a mod that replace zombies by velociraptors X)
i think i need more sleep
Hi guys, what's the point of setting local variables like this at the top of files?
local getPlayer = getPlayer;
local isOutside = isOutside;
local getStats = getStats
isn't this redundant in lua?
I understand global scope but I don't seeeeee where that is
ah
Can be used in other files?
eh local at the top of files provides everything in the file access to the variable (all functions and blocks of code) but keeps it contained to that file only, where global provides access to all files. Ideally you want to keep variables in the smallest scope possible (ie: local instead of global)
in that instance above, its taking global variables (getPlayer) and assigning them to local, theres several reasons for doing this
- performance. its faster to lookup local variables over global (thus faster to call a local function)
- consistency. if something were to replace the global function
getPlayer, then the local still has access to the original, instead of calling the replacement
likely they've done that for performance reasons, i do this as well, and pull all globals into local namespace at the top
Just realized why they used lua language to mod
lua is pretty easy to code compared to Java
Is it possible to capture a command from the chat window?
I didn't think about the lookup, that's a good point, makes total sense.
I think it's better to make all the functions in your files global so other mods can overwrite or copy them.
And also add a custom PREFIX for every mod so other people using same function names won't overlap
So I was thinking of getting into making a car mod, is there any tutorials on this particular process? I have searched but come up with nothing so far. Would perhaps the best approach perhaps be to study others car mods to see how they work?
Why would you make them global when your "class" file can be overwritten? Making things global pollutes the scope and decreases performance-- not a good idea.
What do you mean by your class file can be overwritten?
If you create a file "HCThingDoer.lua" and write a function "HCThingDoer:makeMagicHappen" then another mod can come along and write a replacement for just HCThingDoer:makeMagicHappen.
Ohh so making like a thing like this:
HCThingDoer = {}
???
Sure, or derivation
require "TimedActions/ISBaseTimedAction"
SearchRoomAction = ISBaseTimedAction:derive("SearchRoomAction");
Ahha, yes that makes sense.
Definitely that's the best way
I'm not saying to never use globals btw, just to avoid
There are other ways to make your code configurable/overwritable
So the class should be global, all functions shoulld be local to that class
That's how I do it, and seems to match what I see in the vanilla code/other mods
I haven't done it like that, so I just make function myclass.myfunction () ???
myclass = {};
function myclass.myfunction ()
end;
I'll keep this in mind from now, it does make sense and also organizes way better, so I don't have to have prefix on every function, but only on my class
Thanks
np
Here's a small example for you, notice in this case I don't make the class globally available, I export it
local collectionUtils = {};
local Set = {};
function Set:add(key)
self[key] = true;
end
function Set:contains(key)
return self[key] ~= nil;
end
function Set:merge(otherSet)
for k, _ in pairs(otherSet) do
self:add(k);
end
end
function Set:count()
local count = 0;
for _ in pairs(self) do
count = count + 1;
end
return count;
end
function Set:new(list)
list = list or {};
local set = {};
setmetatable(set, self);
self.__index = self;
for _, v in ipairs(list) do
set[v] = true;
end
return set;
end
collectionUtils.Set = Set;
return collectionUtils;
Then in another file I can use it like so:
local collectionUtil = require("PZISCollectionUtils");
local Set = collectionUtil.Set;
local collectionUtil = require("PZISCollectionUtils");
I didn't know about this one.
Ahhhhh. I tried just using require and couldn't edit local stuff
hey guys, anyone know the character max health value? is it 2000?
PZISCollectionUtils is the name of the file where I embedded that big block of code
Would be cool if zomboid wiki had something like CODING BEST PRACTICES or/and guidelines for modding lua
Have you checked out FWolfe's Zomboid Modding Guide that's linked on the Wiki? https://github.com/FWolfe/Zomboid-Modding-Guide
Pretty darn helpful
Ahh I didn't even know about this
I kinda only skimmed the modding page on the wiki and saw no code blocks so I never found that
I can't read much, it makes me tired and bored
Between that and the Lua fundamentals you can go pretty far
plus MrBounty's tutorials are very straight to the point
released my first mod today 😎
https://steamcommunity.com/sharedfiles/filedetails/?id=2787748269
Does anyone know how long it takes to quit smoking with Dynamic Traits mod?
does anybody do clothing mod commissions?
How hard would it be to make a mod like Improved Hair Menu but for clothing? I've been using Fashionista for more clothing customization in the character creator without the OP stuff but I going through the dropdown menues is miserable.
hey guys
-----------------------------------------
function: prerender -- file: ISEquippedItem.lua line # 127.
[01-04-22 22:17:59.287] LOG : General , 1648865879287> 339,177,717> -----------------------------------------
STACK TRACE
-----------------------------------------
function: prerender -- file: ISEquippedItem.lua line # 127.
[01-04-22 22:17:59.287] ERROR: General , 1648865879287> 339,177,717> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in prerender at KahluaUtil.fail line:82..
[01-04-22 22:17:59.287] ERROR: General , 1648865879287> 339,177,717> DebugLogStream.printException> Stack trace:.
[01-04-22 22:17:59.290] LOG : General , 1648865879290> 339,177,721> -----------------------------------------
STACK TRACE
-----------------------------------------
function: prerender -- file: ISEquippedItem.lua line # 127.
[01-04-22 22:17:59.312] LOG : General , 1648865879312> 339,177,743> -----------------------------------------
STACK TRACE
-----------------------------------------
function: prerender -- file: ISEquippedItem.lua line # 127.
[01-04-22 22:17:59.312] ERROR: General , 1648865879312> 339,177,743> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in prerender at KahluaUtil.fail line:82..
[01-04-22 22:17:59.313] ERROR: General , 1648865879313> 339,177,744> DebugLogStream.printException> Stack trace:.
[01-04-22 22:17:59.315] LOG : General , 1648865879315> 339,177,746> -----------------------------------------
STACK TRACE```
so i am getting a crap ton of these on my client of a server that my guys are trying to start up
what is it actually complaining about?
what mods do you have
Are there any mods that allow more...I guess realistic...ways of maintaining weight? Like, by just keeping oneself fed through the day should be enough to keep one's weight stable, rather than gorging on 100 potatoes a day?
theres a few advanced settings mod might be in some of those rather then that idk
Does anyone know a mod to raise max height?
180ish of them
i am already turning them off as i go to check lol
what is hinting that?
ISEquippedItem.lua?
The line in that file, yes.
Though.
Ugh. What PZ version are you on @stray kestrel
This file was changed recently
41.68
if "Tutorial" == getCore():getGameMode() then
self.movableBtn:setVisible(false);
self.invBtn:setVisible(false);
self.craftingBtn:setVisible(false);
self.searchBtn:setVisible(false);
self.healthBtn:setY(self.invBtn:getY());
end
This shouldn't be running. I think one of your mods might be outdated and just replaces this file entirely?
With, presumably, an older version
local versionInfo = getGameVersionInfo() Makes me think this function was removed.
Yep.
It no longer exists.

well i'm slowly running out of mods to turn off
so for the most part
what's happening is
Are you sure you're on 41.68?
yes
Whatever mod causes this is badly-written.
one of my server hoster isn't able to pay for his server anymore
Replacing entire vanilla files is VERY bad.
so another player is hosting for the crew
and you're certain they're hosting on 41.68?
yes
and you're playing on 41.68?
yes
and you've double-checked both
we pretty much picked out 180ish out of 240 mods that was running on the original server
that's still quite a bit
but for some reason the new server is just spewing a crap ton of errors
maybe search in the mods folder for files named that
and figure out which mods have those files

this is stupid if this works
cause the only one with it is disable admin ui
but that's the thing
that is in fact it
was the previous server on 41.68
Reason: Bad word usage
huh
rtar is censored
then don't say it :v
but yeah that was it
Can anyone create me a mod that bascially when you die all you do is respawn, (your stats saves, everything in your key ring would save) but you’d loose all your items.
It would have to be mp compatible, and obviously I’d pay need it as soon as possible
Hmmmm this may work though
Hmmm I like it it’ll work I think send me your steam thing on disc and What game you want lmao I gotchu cause I been needing that
Will it save your skills though? if so that’ll be nice.
it does and doesn't.
if you are level 8 and 500xp.
when you respawn you will be lvl 8 and 0xp.
Ohh ok lmao bet 😂
https://store.steampowered.com/app/916840/The_Walking_Dead_Saints__Sinners/ wanted to play this for a while lol.
I’m at work now I’ll get back with you later
aight
Is there any tutorials out there on making vehicle mods? So far i cannot find any
@faint jewel has done a bunch of vehicle modding, maybe he can point you in the right direction
I could use some help, perhaps @quasi geode you know what might be going wrong here. I'm trying to get my character to progressively walk to cells and search containers. I appear to be able to queue the walk and my search action (SearchRoomContainerAction) initially (from my ItemSearchPanel), but my intention is for each search to then queue the next walk + search if the item isn't found. It seems ISTimedActionQueue:add borks out, by attempting to call the begin function and erroring that the new instance of the action doesn't have one My expectation was that it would inherit begin due to deriving from ISBaseTimedAction
line 197. you've used : instead of .
for the ISTimedActionQueue.add
thats why it triggers fine the first time in that top snippit at line 340 but fails after...the arguments get thrown out of whack
They got a zombie clean up script or mod?
Does anyone know how to add exercise fatigue to the legs?
damn, but thank you!
Core behavior achieved! Need to clean a few things up, then ItemSearcher will be released on the workshop 🙂
These are nearing completion.
what's the way to run lua when a player uses an item
like after they use it to run a function
Someone needs to create a mod that zombies who have guns can shoot you. Like resident evil. I’m not sure if that’s even possible but would be scary
would authentic Z work with AOM animations and zombie skin?
There a way to clean up zombie bodys with admin or script?
there a more affective way of transporting bodies? one by one is so tedious
the things I have to do to get around radio code not making two simple calls to parseStringForChatLog and parseStringForChatBubble:
authorPlayer:addLineChatElement(luaParseStringForChatBubble(message:getText()), textColor:getRedFloat(), textColor:getGreenFloat(), textColor:getBlueFloat(), UIFont.Medium, chatRange, chatType, true, true, true, false, false, true)
this is just one single line
i had to manually reimplement the parsing as well
If errors were cash, I'd be a billionaire. Alas,
This is what happens when you mess around with metatable hacking too much.
oldGTWP = oldGTWP or __classmetatables[ChatMessage.class].__index.getTextWithPrefix
__classmetatables[ChatMessage.class].__index.getTextWithPrefix = function(self)
local oldTWP = oldGTWP(self)
local _, _, prefix, msg = oldTWP:find("(^.-:)(.+)$")
print(oldTWP)
print(prefix)
print(msg)
local msg = luaBubbleToLog(msg)
local textColor = self:getTextColor() or Color.new(1, 1, 1)
if textColor then
msg = string.format("<RGB:%.2f,%.2f,%.2f>%s<RGB:1.0,1.0,1.0>", textColor:getRedFloat(),textColor:getGreenFloat(),textColor:getBlueFloat(), msg)
end
return prefix .. msg
end
In MP, to what extent is the following ModData shared?
Perhaps all players share the same data?
local modData = ModData.getOrCreate("xxxxxx")
by 80s american standards, they really are little!
had to generate allowedChatIcons and allowedChatIconsFull by hand
well, a subset anyway
Put them in a cars trunk
Nice!
I have missed some cool vans 😄
LOL @trail lotus ran off
Can someone help with finding the compatibility problem of mods? When building walls on the server, there is a crash with spam errors.
I just moved into my house yesterday so I haven’t even set my pc up, I promise if it gets added to my server I’ll make sure I get you that game. You can ask soulfilcher, coach, or browser8. I always pay haha or donate if I use a mod 🙂
The Funeral Zs are finally getting their bouquet of flowers I always intended for them.
Anyone know any guides on how to make / port vehicles into the game ?
There's an addon that lets you throw corpses over the windows
@hollow shadow you here? i got some freaking questions.
Wot
Why me
Oh no
why the hell can i not make my own scrap sheild that has the sheild options.. examine etc.
The way I made the mod is very not good
really?
I don’t recommend you learn from me
Who, what?
the people man, the people.
I stopped modding a few weeks ago since I don’t have that much free time anymore so I don’t remember
for real?
They can just use scrap armor mod xd
they want a custom scrap sheild.
What’s wrong with the original >~<?
le sigh. they want a CUSTOM TEXTURE on a scrap sheild.
Ik but I’m talking about transportation from A to B. From where I killed them to the burn pile so to say
making a new one, it does not load as a scrap sheild. it loads as just another item.
where are the bottom two configured at?
Is there a program that's used for creating custom car mechanics overlays?
@faint jewel hey man, have you done animations on vehicles?
How do you export fbx???
do you have the fbx import export plugin?
Yeaaah
ewww paid addons
eww?
When you just have to find that summer wear item
so all the scrap mods are discontinued? :(
le sad
i use them in all my worlds
guys it is possible to damage the man made walls with guns, like in doors?
Does anyone know of a better way to get a friendly name for an object which has a container? Once I have the container, I can call container:getParent(), but the IsoObject returned appears to store nil/null for its name (at least that's what I receive from parent:getName())
As you can see in the above, I can grab the container type, but it's not friendly reading
Is it possible to create a new piece of mod data for a specific player by just doing this
player:getModData()["poison"] = poisonDose
I think there's a setModData function you'd need to call
Also, ItemSearcher now lives! https://steamcommunity.com/workshop/filedetails/?id=2789003239
any weapon modder here can help me out? I saw some weapon has critchance and critdmgmultiplier stat and some weapon has only critchance. What does critchance do if the weapon doesnt have a critdmgmultiplier stat?
Great job!
So they don't put it in their inventory when it's found, right?
They don't, it's purely a search
Nice! Works perfect, just gave it a 👍 up!
Thank you very much!
Makes sense especially if the item is too heavy, and the person left their character to search through a bunch of containers
I do not remember ever using SetModData. Editing the kahlua table returned by getModData works.
Would you like some help with spanish translation?
Absolutely, I'd love to get translations in place
Just show me all the stuff i must translate (In dms)
So i can give accuarate ones
Btw imma use the mod rn in a new play trough
Awesome!
I will get the strings compiled for you. I believe even for the English I should be using a file rather than hardcoding, so I need to get it done anyhow.
Sure
All we need is https://youtu.be/buslVek_LsM
🎵 Coffin Dance (Official Music Video HD)
✔️Subscribe and Listen New Song evryday
◉ Follow GRAND MUSIC
► Iinstagram: http://bit.do/e2Hsc
► Soundcloud :https://bit.ly/2NWPqMy
► Facebook: https://goo.gl/3E16WP
#Coffindance
Coffin Dance (Official Music Video HD) MEME
Coffin Dance (Official Music Video HD) MEME
Coffin Dance (Official Music Vid...
No
I will continue when I get more time
Is there any document I can read to figure out how to give the player any effect?
I need to do things like add nausea and tiredness, also lowering health over time
Is there a mod out there that allows you to base the activation of mods on the amount of days passed? Say I want Sunburn to activate on Day 3, Project Monolith to activate on Day 5, and Cryogenic Winter to activate on Day 15. Would that be possible, or would the game be unable to process that without returning to the main menu?
I doubt you could activate an inactive mod without reloading lua. Instead, your best bet is to modify the mods in order to have their effects activate after a certain point.
is there any way to add the destroy option to any item other than sledgehammers?
Yeah, that's what I'm looking for. I know a few mods like Evolution and Expanded Heli do something like that, where they allow you to trigger the mod's mechanics after a set time has passed. I'm curious if something similar can be done with Cryogenic Winter and Sunburn. No harm if they can't, since I can still at least manually activate them.
Yo guys, is there any beginner guide for making mods around here?
I was looking forward to making a mod that'd let you sleep when offline a server, you think that'd be doable?
What I'm thinking is saving the time of your pc somewhere, and upon rejoining doing some math and giving you back sleep time
This is in the pinned posts, but start at the PZ Wiki section for modding: https://pzwiki.net/wiki/Modding
Hey guys. I'm trying to fix a bug in one of the mods I made. It has a GP5 gas mask (Sunrise Suit mod). Having issues with the beard been seen through the mask when it grows longer. Now I've been testing and apparently the same thing happens with the full balaclava. I believe it is a game thing but I'm not sure if there is any way to fix it.
I have used the HatCategory on the clothingItem of nohairnobeard, but it only hides the hair. I have also tried having two hat categories, nohair and nobeard, but the beard is always visible.
Any ways to fix this? Since the balaclava also has it, it feels like it is a game issue, but I am not sure.
Very cool!
Thanks!
i want man controlled mounted turrests
like there not automatic
you use them
but you cant move
can someone send the health bar mod for zeds? for some reason i cant seem to find it
And what happens then?
Wait, when making a fixing recipe, it has to follow a specific syntax?
fixing fix itemName{ requires:itemName?
I thought the fix itemName is just localized string
Let's say explosive diarrhea (clothes get dirty for 1.5 day every irl 5 minutes) combined with losing health but only to 25% and exhaustement
And it will cycle between diarrhea and explosive diarrhea (that's 100% random) if i could i'd code this but i don't have the skills
Whyever would anyone eat soap if it's nothing but negative? xD
Dude i literally drank bleach 4 times with my friend for pure fun XD
You got that chaos energy
Is there a mod that has a corpse vechicle that I can move large amounts of the undead to graves
Already slapped it into mapping, but I'll risk the spam xD Anyone got some pointers for me? Placed all kinds of foraging zones, followed Dirkies guide, sitting ingame. My parking lot works fine, cars there and it counts as Road to forage. Anything else I've set (deep, forest, farmland etc.) do not - the famous 4 ? ingame 😦 Anyone run into that and can tell me what I've overlooked or messed up?
Guys how often does helicopters happen from expanded helicopter mods? It’s day 8 and not a single one has yet to spawn is that normal
Is there a way to prevent a clothing item (such as a jacket or pants) from spawning damaged on a zombie?
Love this idea, especially for a real time server type scenario. I havent worked on my sleep mod, let alone any mod, in a while, but I am 1000% certain there is a way to pull this off
You would want to capture server time though, not the users time
Ye, exactly what I was planning, server running 24/7 synced up with our timezone, and mandatory 8 hours sleep so that everyone doesn't stay on until too late xD
And true!
I like that idea, only thing is I doubt anyone would ever reach that point of playing that long time wise. They woukd instead have their characters fatigued
I've seen that there are some "on join" and "on disconnect" event triggers to look into, I just gotta understand how to structure a mod...
So maybe setting a timer for how long a player must be logged off to reduce X fatigue
Ye that's the plannnn
My brain cannot remember the other stat that you need to also chanve when playing with sleeping in PZ
I'd have to have people get tired wayyyyyyy slower though x)
I admittedly have been very busy with IRL stuff and other projects, not even playing PZ too often 😭
I'm a bit of a new player so I'll look into this, thanks for letting me knoww
I believe fatigue and stamina should scale with day length, but I could be 100% wrong
Hold on let me look at my code so I can stop being a dingbat trying to go off memory
Fyi if you wanna look at what code I wrote for the mod Sleep With Friends here is the github
Yup fatigue and endurance.
So basically, you will need to figure out how to:
•Capture server time and save it as a variable (hopefully as a string of numbers that can have math easily applied to it)
•Calculate the sum of the difference between the log off and log on "server time" variables
•Determine how much Stamina and Endurance is recovered based on that sum
•Apply said recovered amount. For recovery of these stats, you actually reduce Fatigue from 1.0 down to 0.0, but raise Endurance from 0.0 to 1.0. (Also note: these stats do not recover at the same speed in vanilla PZ!)
Hi everyone, I hope you are having a lovely day. I just updated my mod. I've added some customization options, it might be useful for you or your server. Check it out, cheers 🙂 https://steamcommunity.com/sharedfiles/filedetails/?id=2781963981
anyone here who has experience with horde night mod and here they come ?
Does anyoine know where I can find all the text inline commands like <line> and such?
I hate discord and it suck that the normal forum is so slow
Why does this not wokr?
While on the modding wiki
How is mine different?
What are you trying to do with it?
I wouldn't try to wrap the table property names in quotes
If you're not getting enough feedback from your editor, I highly commend you try to run short code snippets like this in replit.com
remove the " quotes as DecentTech suggests, or if you need to use them (in case your key name starts with a digit or contains spaces etc) then you need to wrap them in square brackets ["key"]
AOBJ.MyTable = {
["getWeight"] = 1,
["getEquippedWeight"] = 2,
}
What?
I didn't want to write the same thing multiple times so I tried to create a list of commands to run.
It's just very annyoing to search asomething like that
Ooh okay, thanks
I have another thing I've been seraching for but cannot find any thing for
MyClothingItem:setWeight(111); -- does not work
on the javadoc thing it says that setweighjt is inherited from InventoryObject into clothing
https://zomboid-javadoc.com/41.65/zombie/inventory/types/Clothing.html
Javadoc Project Zomboid Modding API declaration: package: zombie.inventory.types, class: Clothing
Why does setWeight not work?
The SEO for anything zomboid related sucks and I blame their slow forum 😡
Sometimes took me over 10 seconds to load a page
Anyway, isn't the entire point of Clothing being inherited from inventoryitem to use the same functions?
it will inherit the method, cant say whats going wrong "doesnt work" is entirely too vague to even guess.
whats the bug report? "doesnt work"
what did you expect to happen? "for it to work"
what actually happened? "didnt work"
It errors
... can you not crop the error please
you'd need to show the whole callstack
but i can tell your issue now
you used . not :
that is all it says, when you screenshot only one word out of the whole error, yes.
ohh yes that's true my bad :DDD
But that doesn't change the fact that setWeight is the only command that does not work
When I run it like this
Everything except setWeight works
I was just doing .setWeight (meant to be :setWeight) as a test to see why is the command broken
How come setWeight does not execute from this?
All the other stats have changed, except the weight
if (not instanceof(t_Item, "Clothing")) then
print("Not clothing");
return;
end;
t_Item:setWeight(6.9);
Still not functioning
😕
It's annoying me so much, sorry 😭
again though, need to see the actual stacktrace to actually debug the error
this one does not error, it silently fails
no error, no stacktrace?
Yes I can demonstrate
Try item:setActualWeight(6.9)
If i wanted to tweak the item of another mod, in the form of an addon to that mod, do have to reimplement the entire item or can I somehow reference the original and only change what I need to?
Ohh my god thanks
Yeah that was it. But how is anyone supposed to find out about this.
example: a modded weapon is cool but its a bit overpowered, and i wanted to tone it down a bit
and maybe need use getActualWeight
or a mod has a broken recipe and I'd like to fix it
I really wish there was a wiki for all the commands like arma has so we could write comments for setWeight now so when anyoen else has the same problem they could find a solution faster
Thanks a lot, I have been pulling my hair out so hard
getScriptManager():getItem("Module.ItemName"):DoParam("SomeKey = value")
this basically overwrites a script item's value in a .txt (technically, it reparses as a extra line, generally overwriting the original key/value pair)
ah awesome!
thanks 😄
that makes life a lot easier
does that same system work to add in a different texture or model for example?
should, cant say i've tested though.
fair enough
just make sure to put it in the shared folder (not client)
perfect, thanks
yoo Snuggles, I didn't realise you were the actual guy behind sleep with friends! XD I feel honoured, your mod is a lifesaver haha
I've started coding on the offline sleeping mod, so far so good, your code has helped me a lot, I'll keep you updated
Im gunna blush 😊 haha! Im glad I and my mod could help! Very excited if you make it happen, cause I think many people would love to never load into a server needing to sleep already again
my ex wife loved that mod, too bad she doesn't play zomboid.
Any chance you'd be on anytime soon for some help? I'm having some issues with understanding some things about the whole thing x_x
but juuuust if you don't got anything better to do!
Question: I'm trying to add a container to the game. It's more complicated than just that, but I can't even figure how to make something like Crate. What files handle world containers? And where is the build menu for things like Crates?
thank you in advanced.
I think the #mapping people would know how to help u
Really? I'm trying to add a totally new container.
I mean, I'll go ask, thank you. I'm just double checking
you see ivan, if you have have your hatches float on your right
you will not be distracted from the things on your right and will always make perfect left turns
Sorry just got home from the day job. Im usually at my pc every night around 10pm the latest, which is a little less than 5 hours from now 😬🤣
oo okii, no problem!! xP
anyone know how to change the loadup screen? like where it says this is where you died. can that be changed to a custom image. if so and you know how maybe i could pay someone to create a simple mod that does it? for me and you could set this image as it
cant without modifying the java
So is there a mod for using a gun to suicide with?
Just started playing on blood+saliva and been getting wrecked.
"Gun Suicide"
How can I decrease weight over time using an if statement
Which part are you struggling with? Decreasing weight, making something happen over time, or doing so conditionally?
Kind of all of it lol
Isn't there a built in method for doing something once every 10 minutes? or was that exclusively made by multiple modders
Yeah okay, that's what I thought, but I'm not still sure how to decrease the weight by a degree every time though
Usually you want to look at existing code which does something you want and see how that is accomplished.
Either vanilla functionality, or if you know of a mod that does what you want.
Are we talking item/equipment weight, character weight?
I've been doing that, but I haven't found anything in relation to getting and decreasing the weight value
Character weight
Also is there an easier way to search through vanilla game code? At one point I spent like 30 minutes putting every lua file from the game into one visual studio project, so I could use Ctrl+F lol
I just open the media directory in VS Code
it's usually fast enough although the text files can slow things down
local function onPlayerUpdate(self.character)
FunnyEffects();
end```
would this be right when using onPlayerUpdate
there's an error around here and I'm not sure what it is, but I might have tried to call the FunnyEffects function weirdly
too used to C# lol
Parasites.lua:28: ')' expected near '.' is the error
self.character thats your error. cant use a table.key as a argument name
just use character or something
will it know what I'm referring to lol?
eh your defining a function + arguments.
character will become a local variable in the scope of that function
Okay, just putting character fixed it, thank you
I try to play a sound but nothing append, someone did it ?
I don't get an error but I hear nothing.
I tried that in lua : getPlayer():playSound("PagerSound") and getPlayer():getEmitter():playSound("PagerSound")
And my script look like that:
module Base {
imports
{
Base
}
sound PagerSound {
category = Pager,
loop = false,
is3D = true,
clip {
file = sound/BeepSound.ogg,
distanceMax = 20,
}
}
}
Also I try to add a 3d model for an item, I made it work one month ago but forgot.
With that script, when I add the item on the ground, it's his icon but not his model
This is my script:
module PagerMod
{
imports
{
Base
}
item Pager
{
Type = Normal,
Weight = 0.1,
DisplayName = Pager,
DisplayCategory = Item,
Icon = Pager,
Tooltip = Tooltip_Pager,
WorldStaticModel = PagerGround,
}
}
module Base
{
imports
{
Base
}
model PagerGround
{
mesh = WorldItems/Pager,
texture = WorldItems/PagerTexture,
scale = 0.0003,
}
}
function OnEat_FunnyWorm(food, character, percent)
local chance = ZombRand(0,100);
if chance > 50 then
print("GOT FUNNY WORM VIRUS HAHA FREAKING IDIOT!");
character:getTraits():add("funnywormInfection");
end
end
This all works, except for the adding of the funnywormInfection trait lol
The print message is listed randomly, so I know the randomizer & the print screen both work fine, however, it just doesn't add the trait
Incredible
The EveryOneMinute event is called every 27 seconds right?
or is EveryTenMinute event not called every 1 out of game minute?
that means if I wanted something to affect the player every second I'd have to compensate for those 27 seconds
or am I out of wack
-snip- mixed up some of the math i was doing
hi if i want to change distribution values do i need to do a world wipe or will it spawn as valued after next loot respawn?
is making your own music pack for TrueMusic easy if you're like basically only starting coding let alone lua
Does anyone know how these stats, such as getBiteDefense are evaluated for combat?
Does damage evaluation still get the values correctly as long as it displays like that on my client?
Hello all! I heard this was the place to discuss mod ideas and requests. Any best way to go about it?
Had that thing recently, its terrible in anything other than roads
Is there any documentation on the order of Lua event calls and what events are called by whom (server, client or both)?
hehe
you can only change the text, not put an image
Can anyone provide me with a blank-non solid clothing item source please? something like the belt or keychain
Nothing too formal, go for it!
So anyone here playing with this mod.
Question I have on it is if it is red outside is it doom town? Haven't figured out exactly what it does but from hints I have gotten the raid burns you to death.
i think it simulates STALKER emissions, In there they are random events that cause a storm to go through the whole map and anything caught on it dies
Taken from my ambience video (going to follow soon).
More recordings on my channel!
Feel free to request another one by sending a message or just adding a comment.
The games are copyright by GSC Game World.
I went out in it fir a split second and only did a little damage.
i think that is how the mod simulates it more like a "acid rain" with damage overtime
rather than a big storm of radiation/magic that goes through the map and if you get caught at that point you die
So works as I hoped. Some comments made me believe as soon as one drop of the rain touched you you dropped dead.
It would ruin the point of the game if it did that. Almost all zombies are outside after a while (as noises get them out and about), so one storm could effectively clear the map, and all you'd have to do is hide at the right time.
no problem, one of the effect of the STALKER emission is if any unlucky NPC is caught not in a shelter they get zombified
How complex is it to have a recipe give you multiple results for the same thing? I know how to make a recipe that gives different quantities of one thing, but if I want a recipe to give 2 different objects how would I do that?
can someone make a mod that lets you sleep all night in mp
i got a modding question
so i made a recipe that has multiple valid material as one of the ingredient
for example banana or apples are valid
so the problem i am having is
when i am bulk crafting this recipe
it would take all the apples in my inventory first, and then bananas
even though bananas are in the main inventory and apples are in a bag
it would still move the apples to my main inventory
so i'd like to know if it's possible to make it only take from main inventory
or make it take from the stack that was right clicked to craft with instead of going from 1 banana to all apples
dumbo BRDM
It grew wings!
if i were to edit the files of a mod and then try to use the edited files on a server i host, how would i go about that? I am using Brita's weapon pack if that helps. i want to reduce the spawns of the weapons from the mod.
i edited the base files with the spawn info but when i added the mod to the server it gave me an error about the scripts being different than the ones on the server
What does error code 6 mean?
howdy fellas. I uhhh, I've got a longstanding issue with a feature in my mod. It's an issue I've still yet to find a fix for...
So in essence, I want to dynamically replace specific cars and zombies within an XYZ range, say A police car and a police zombie in Rosewood, with a respective version from my mod. It works perfectly fine in singleplayer, right? Well, on Multiplayer it refuses to save the change. But only once. In a nutshell the car will replace twice, then be fine. Though the second time occurs when it's unloaded.
Help with this would be greatly appreciated.
Code snippets:
lua/server folder:
function stzo_stevvpl_override()
-- Coord Stuff
-- Rosewood
local GetRWXMin = 7865;
local GetRWXMax = 9350;
local GetRWYMin = 11250;
local GetRWYMax = 13500;
local GetVehicleScript = GetVehicles:get(i):getScriptName();
local GetVehicles = getWorld():getCell():getVehicles();
if GetVehicles ~= nil then
for i=0, GetVehicles:size()-1 do
local GetVehicleX = GetVehicles:get(i):getX();
local GetVehicleY = GetVehicles:get(i):getY();
local GetVehicle = GetVehicles:get(i);
-- RosewoodSD
if GetVehicleX >= GetRWXMin and GetVehicleX <= GetRWXMax and GetVehicleY >= GetRWYMin and GetVehicleY <= GetRWYMax then
if GetVehicleScript == "Base.CarLightsPolice" or GetVehicleScript == "Base.PickUpVanLightsPolice" or GetVehicleScript == "Base.85vicsheriff" or GetVehicleScript == "Base.87capricePD" or GetVehicleScript == "Base.91blazerpd" or GetVehicleScript == "Base.92crownvicPD" then
GetVehicle:setScriptName("Base.CarLightsPolice_rosewoodpolice");
GetVehicle:scriptReloaded();
GetVehicle:updatePartStats();
end
shouldn't smalltownresponder mod be a great reference for that?
That's the mod in question
I'm the coauthor of SmallTownResponders. Lol
Here's a snippet from my above post. The part that's giving me trouble
It works perfectly fine in singleplayer, right? Well, on Multiplayer it refuses to save the change. But only once. In a nutshell the car will replace twice, then be fine. Though the second time occurs when it's unloaded.
some of those lines of code looks seriously out of order. your 6th line (not including the blanks/comments) specifically:
local GetVehicleScript = GetVehicles:get(i):getScriptName();
that looks like it should be inside your for loop, your using both GetVehicles and i before defining them
Nice! I had a couple of mods that I’d love to have to compliment my particular play style, if they sound interesting to anyone here.
sorry if it was wack, literally ripped code out of the full file
here's the full file.
One would to build spawn-points in game. I enjoy starting out in the towns but I never like having to trek out to the base I built after I move towns. I think a great compromise would be to construct something like a diegetic radio tower that would “broadcast coordinates for other survivors” with high Electric/Metalworking skill and like a ham radio or something. That way, the new character could respawn within like 50 units of distance from the radio tower or something. (And if spawn points must be predetermined to work, then maybe one could scatter radio towers in other popular towns that would need to be “reactivated” or something)
The other idea I had would be to create your own radio station using the CDs you find scattered in the world. You no longer need to carry a CD player to lower your boredom, just swap to your personal channel. Would also give a reason to search for a new supply of CDs, to increase the effectiveness
(Finally, just a personal request— if someone could somehow do a quick fix to the “Buy Skyrim” mod so that the Todd Howard mask can be worn with helmets as well, that’d just be awesome. Thanks!)
define "quick fix"? What's broken about it?
oh!
DERP
Change the code so that the Todd Howard mask only occupies the “mask/Glasses” slot, basically (I can’t code a lick but I imagine that’s what it involves)
yeah, I'd say I could do that for ya
As is, it’s like the Welder’s mask
Understandable, it is someone else’s mod
for the zomboid/mods folder
Thanks! The mod author promised to update it but I haven’t heard a peep from him for a few months
ah
noice!
gunfighter's ammo crafting is too hard, especially on top of the fact you can't make primers brass and projectiles
and kitsune's ammo crafting is too easy, missing a few recipes, and exchange rate is unbalanced
less go. Will this work? @queen leaf
Beautiful!!! Thanks so much!!
You're watching the official music video for Fleetwood Mac - "Little Lies" from the 1987 album "Tango In The Night". The new Fleetwood Mac collection '50 Years – Don’t Stop' is available now. Get your copy here https://lnk.to/FM50 and check out North American tour dates below to see if the band is coming to a town near you.
Subscribe to the cha...
i forgot that mod existed
amazing
local function EveryTenMinutes(character) --error in this, fix tomorrow
GainThing(character);
end
Events.EveryTenMinutes.Add(EveryTenMinutes);```
why does this have an error at the "GainThing(character);" part lol
function GainThing(character)
local clothing = nil
local bodyLocations = {"Shoes", "Socks"}
for i = 1, #bodyLocations do
clothing = character:getWornItem(bodyLocations[i]) --if player has clothing on one of the bodyLocations categories
if (clothing ~= nil) then
break
end
end
if clothing == nil then --if you're not wearing shoes or socks
local chance = ZombRand(0,100);
if chance < 50 then --5% chance every 10 minutes
character:getTraits():add("traitNameOne");
print("This worked haha")
end
end
end
It worked when I had it in onPlayerUpdate so I think it's an issue with EveryTenMinutes, but why
EveryTenMinutes event doesnt pass any arguments (ie: character will always be nil)
What can I do as an alternative then
if your running it client side use getPlayer()
if its serverside, then you'd have to parse the list of active players and trigger for each one
Thank you, I just put GainThing(self.character); and removed the "character" argument from the function
One other issue I'm having is "character:getTraits():add("traitNameOne");" does nothing, no error, just doesn't give the trait lol, is there a reason for this? "character:getTraits():remove("traitNameOne");" works perfectly fine though
hmm. Wait.. That's very informative! What's the difference between "getWorld" and "getPlayer"???
also how on earth does one parse the list of active players?
cant see how thats going to work, probably error since its unlikely self is defined at all there
I did that, and it worked when I reloaded the lua, then I changed some print text, reloaded again, and then it broke lol
getWorld gets the IsoWorld instance, getPlayer returns the active IsoPlayer instance, and you use getOnlinePlayers() and loop through the returned ArrayList
I see
so, in a nutshell. getWorld = more lag?
also. I'm pretty new to lua in general. Literally started around last summer.
what does "loop through the array list" look like?
oh, and a quick search through this channel shows everyone using getSpecificPlayer(0)
local players = getOnlinePlayers()
for i=0, players:size()-1 do
local player = players:get(i)
--- do something
end
I see
ya that works too if you know the player index already
sry had to edit that example. only half here atm lol
it's fine
oh, btw
is "i" just an example thing? Like, am I able to change it to "p"?
sure
awesome
i is just a common used variable in for loops (often short for index)
I see
Having some trouble with the game crashing and wondering if anyone can help. We were playing on Cherbourg and got annoyed with the map so switched back to normal map. We are playing with mods but only thing we changed was removed Cherbourg and added Raven creak now the game is crashing no matter what I do. I checked the log and it's giving me an error saying it can't find recipe for rotten canned food.
any other mods?
Playing with 90 mods it ran fine before but now it's not
Only thing we changed was the map mod
I see
Sorry it's not crashing it's saying connection to server was lost
heres one of the lines
LuaManager.getFunctionObject> no such function "RottenCannedFood".
I tried removing the mods that do stuff with food and it hasn't helped
Anyone have a mod that makes sound from lua? That I can take as an example
anyone have any idea about my modding question earlier?
or am i going to have to make a recipe to use each individual fruit
so that it doesn't just use up whatever is lined up first in the code?
Quick question for in case anyone knows: There's no way to split ItemName strings across multiple files, is there? Since it basically just looks for "ItemName_EN.txt" and doesn't load from anything else?
I stole this from ISInventoryTransferAction https://github.com/TheCrimsonKing92/pz-item-searcher/blob/master/media/lua/client/TimedActions/SearchRoomContainerAction.lua#L202-L205
Now that I've placed my mod in its Workshop folder, singleplayer only seems to load that version of my mod code. Is the only way to circumvent this removing the Workshop folder or updating that location while testing locally?
Thx but that not a custom sound like I want to do
try using the following startup parameters for devloping: -nosteam -debug
nosteam allows using the mods in the <user>\Zomboid\mods folder
I see
So does the Steam version, but the Workshop mod versions seem to take priority
Appreciate the tip!
Ahh. I mostly play on the nosteam version, didn't even know that's a thing 😄
Interesting. I assumed nosteam is the minority, could be wrong on that.
Probably 😄 I just use it because I can make copies of the mods and then I don't ahve to worry about mod updates on my playthrough
its mostly a minority except with GoG users and people with pirated copies, but its handy for testing and playing without dealing with mods auto-updating (good for servers sometimes)
i do the same, play on nosteam always so nothing updates during my playthroughs
How do I decide how much a fixing recipe would repair?
Passing fancy?
what?
I have the recipe up and running but IDK how to make that recipe specifically repair a certain amount
I just mean it's your system, you would be choosing whether it's a minimally or fully effective repair
ah I see
I've seen multiple car repair mods repairing different amounts even with the exact same materials used
Have you tracked down a client command where the work is truly being done? For example with engine repair:
Those args gotta go somewhere and be interpreted
Hey guys, this might be a dumb question, but I can't think of a mod that already does this. Is there a way to check for a loaded map mod? For example: if (IsRavenCreekLoaded) then end
Or is this not possible to begin with?
getActivatedMods():contains("SomeModID")
Aha that should do the trick. Thanks.
Apparently there exists ConditionModifier. Normal repair (1.0) seems to provide 35%, 2.0 provides 70%, etc
Good find!
Hey, I know where Zomboid keeps the chat log of all your multiplayer sessions, but any kind of radio (text) communications I can't find a log for. Does anyone know where the game puts that?
Try
%UserProfile%/zomboid/Logs
did, that has the standard chat logs, but i annot find the stuff that another player would /say that would make it to me over radio
ooh, then I cannot help
DAmn, thanks mate
Hey Zomboid moddin' folk, I was wondering what ways are best for making items more rare regarding distribution.
In my mod (Pomp's Items), it adds in a bunch of different stuff, mostly food and plushies. The issue I've encountered is that the pony plushies still seem to spawn extremely often, even after setting the amount to numbers real low such as "0.005." I'm assuming that because there are 50+ that would be the reasoning, but even so it still seems way too common.
Posting a pic of the distribution layout, each item has the distribution stuff listed out for it, I'm not sure if this is a proper way or is causing issues. I wouldn't imagine it to be so, but do let me know if it would be causing issues!
Is there a way to make a recipe that requires certain temperature ingredients? Like needing frozen fruit specifically or hot water?
If I want to make something happen if you eat any type of raw food, do I need to make a list and actually specify every item that's raw in the game, or is there another way?
getPlayer():getTraits():add("traitName"); this doesn't work for some reason, no error or anything but it actually just doesn't add the trait, I've tried looking into it but I have no clue why lol. Other mods use this line and it seems like it works
anyone know if theres a mod that brings the 0.2.0f music into the game? itching for some nostalgia
Published Item Searcher v2: https://steamcommunity.com/sharedfiles/filedetails/?id=2789003239
Also I have some demo screenshots now
that looks sick
matters needing attention:
-
Firing requires shells, which can be found in various gun stores and gun cabinets. The machine gun uses 5.56 bullets. Shells and bullets need to be put on the body and deducted when used.
-
The King Tiger Tank refreshes naturally in the area of car trafficjam and military area.
-
Most parts of King Tiger tank w...
Hans get ze Tiger
What's the technical feasibility of making rechargeable normal batteries for flashlights and other devices?
Thank you!
If it was realistic, it would be breaking down every 2 km
lul 2km more like 500m
now that we know its possible to make turrets, cant wait for era appropriate AFV's
jesus they need to animate that turret
lol yeah. ~~hows the reefer trailer going
~~
reefer is done.
just dont wanna release it.
also working on another trailer.
but you aint allowed to see it!
You tease

capacity? 👀
all of it.
Hi, I would like to get into modding PZ but don't know where to start for a lot of the tutorials related to this seem quite old.
Is there a reliable and up-to-date source where I can learn to do it?
I know how to code but at an amateur level and have not modded anything yet.
Thanks in advance.
You are welcome in advance.
Thx
ugh
huh?
that shit is just a pain to get working
specifically just getting it working right
it works just fine lol.
got a video?
the onyl thing i MIGHT want to do is have levels of logs, and make it so it ONLY holds logs.
is it just those wheels and the physics boxes at the front?
size and trailers ends up being annoying for me
i'm just making some trailers for the ata truck mod.
nice, i look forward to using them block stuff
too bad those bounders prevent just cutting the lines
if only this game had REAL physics.
having some trouble getting an inventory icon to show. making sure that it isn't anything in the code that might be mussing it up somewhere.
what is your icon named?
is it Item_HomemadeWine ?
Item_HomemadeWine
best i could find was the file itself needed the _items suffix as well
the above s/s file i mean. its 32-bit and everything. seems like its something really stupid somewhere that's not having it show
Anyone know how or difficult it is to make a vehicle mod?
depends on your experience
if you wanna make a simple car its going do be easy
if you want to make a high fidelity vehicle with animations thats going to be more of a process
Ah,I remember seeing that thread and did search for it a bit ago, but couldn't find it. Thanks for the link!
👍
I only want to do simple vehicles. No special animations or interiors, to fit better with vanilla. Animated vehicles with interiors are nice, but that feel oddly out of place when vanilla vehicles don't have that.
for now, thats true
the vanilla cars have limited support for it so its only a matter of time
This is not right tutorial
Hello and welcome to my tutorial. It covers full workflow of vehicle creation for PZ. If you are a complete beginner in 3D modelling, you'll have to watch/read additional tutorials, I won't cover every aspect of model creation and 'where this button is located'. I divide vehicle creation in these...
Does anybody have a 'container distributions' list? Thanks!
okay, didnt know that existed
nice to know now
ringo's guide still has some important info like the actual color numbers for each part of the damage mask
ive only conferred with that specifically for the hex codes
There's the project zomboid modding wiki page that has links, like the github thing that says things about the specifics of Lua as a coding language. There are also the different classes and their functions https://zomboid-javadoc.com/41.65/. You would also need to look at the base game files to see how the game works. If you are looking for a specific thing you can use media\lua\shared\translate, and notepad++'s function to search all files in a hierarchy.
Javadoc Project Zomboid Modding API package index
Thank you @undone crag
so i've installed a bunch of mods this morning and I'm trying to figure out what mod is causing this to show on the top right. Any ideas?
nice stuff man
#mod_support, also listing what mods you have active might help
thank you, been a while since i used the pz discord. turns out it was the here they come mod, the horde icon, was able to turn it off in the options
Anyone working on a mod to invite player to your safe house, even if the already have one?
Hello, I forgot the location of the clothes generation file in the zomboid folder, does anyone remember me?
any way to disable the ability to destroy doors, or does anyone have a mod for it.
jetstream sam mod when? 👀
Gonna' go ahead and post again here real quick, been trying to get items in my mod to spawn much more rarely. Even with fairly low chances they still seem to pop up a little too much. Would there be any reason why? I can supply a pic 'er whatnot of the distribution stuff if need be
Hey, I know this is quite late but was searching back for stuff and accidentally went to my message and yours was right under it, then I checked further and saw you got no replies to this AFAIK
When I fixed a tourettes syndrome mod for our server (porting it to MP) I have this bit involved for saying the phrases:
if isClient() then
processShoutMessage(phrase)
elseif not isClient() and not isServer() then
player:Say(phrase)
end
With the processShoutMessage coming from ISChat.lua (in lua\client), from line 506 at if not commandProcessed then onwards where I noticed how the chat UI is handling sending messages, not sure if there's a better way but this works just fine for us with no downsides as far as I noticed - I'm using the one for shout but the other channels are right there too in that section
LADS
I have a proposition
I mean my warhammer 40,000 LADS
WE REPLACE the zombies with skinflayers/necrons
and we add in the dawn of war model bits for armor pieces
THEN we make custom sprites and vehicle models for 40k junk
Low programming effort necessary, just figuring out the modding tools tonight and this is probably what I want to do as a bigger project
but I think I should like chop this into small pieces first rather than a large conversion scale thing
I'm going to mess around quite a bit this month and see what is possible with mods and figure out what scale this idea could be in
alot of vehicles fly in 40k but it's so doable lmfao -- going to get to checking this out more tomorrow
not a bad idea
A custom map and scenario could be possible with this. Basically a Tau crashes on earth -- but it's after entering a worp storm, so it's not exactly the same earth, the Tau time traveled and all of their crew is dead. Or it's like, a defecting gue'vesa flew through and time traveled back and crashed
That could squeeze into zomboid's world easily lmao. And not to mention most of it is just cosmetic junk, so the game updating likely won't break anything
when i think of that, it reminds me of a diorama this dude is making with a tau manta
I think I know the guy you're talking about
Squidmar?
Yup
yep
I was just looking through my 8th edition codex and was thinking "damn necrons are fucking horrifying to the Tau" and happened to be playing Zomboid at the time.
It sort of works out because I can legit just make a set of cosmetic mods people can download separately if that's what they want.
true
Another idea is a custom starter class that spawns you with the Tau Gue'vesa armor and other junk could just be something to be found.
Idk something to chew on tbh. I'm totally going to figure out making custom Tau tiles though jc. A total conversion scenario could be doable but like again, time is a major nemesis lmao
indeed
Idk I'm messing around tomorrow with some custom clothing junk and seeing how it functions to kick the project off. First step is likely getting T'au armor going.
Oh no I'm a plunger
I need to play Warhammer 40k
I atleast wanna know what the death korps of krieg is
Mod that makes it so you can claim safe houses at spawn zones
Does anyone have any pointers on creating a new server option for a mod?
If this is possible, it would remove that area as a possible spawn location
That would be fine it’s just a cool construction site that I wanted to base in
Also suggestion on how this could work it could be a spawn zone and then when you claim it as a safe house it removes it as a spawn point making to do you don’t need to have a specific mod for each spawn
i love that
possibly, depends on what your trying to do. I have a module for it you can browse through, based on some old stuff i did but its entirely untested since the refactor and rewrite... its also completely overkill. https://github.com/FWolfe/Zmulib/blob/master/media/lua/shared/Zmu/Config.lua
theres some components in the client and shared folder too for handling syncing
(note its also semi-incomplete, no GUI aspects)
I've had a feature request to limit Item Searcher capabilities-- a server option which would allow searching to be restricted to safehouses
I was hoping for a life cycle of creating the custom server option, initializing it with a default, updating it.
atm its more geared towards dedicated servers since it loads and saves its options via .ini settings instead of using GUI elements, but thats on my todo list (i still have to rewrite that part of the code)
it does the ini parsing, data validation (to protect vs bad ini values), and syncing the options to clients, would be easy enough to have it resync on value changing (i should actually add that) since it triggers a custom event on changes
i wouldnt really recommend using it atm since its unfinished & untested still might beable to pull some helpful stuff from it
Alright, thanks! Will take a look.
Sandbox options can be used for that
ya that could work for your use case too lol
Can pickup codexes and models - sometimes painted - on ebay for alot cheaper I'd highly recommend
Worst case you can pickup dawn of war 1
wait I thought it was a video game
what
any modders who can remove the ability to create a new character after dying. (simply only allowing respawn) and making it where when they respawn they only have their clothes they were wearing, their skills, and the keys they had on their key ring? it will be used on a custom server. willing to pay a solid amount of money for it just name your price.
It's a tabletop miniature wargame lol. You build models for the units, paint them and jazz it up and then play games against other people's armies. Orks, Tau, Necrons, Tyranids, Gene stealer cult, Space marines, there's alot of factions lol. Doing a total conversion scenario can be hard to do and make sense, however just doing Tau or space marine stuff couldn't be hard to mod in.
hi, anyone knows if it's possible to check with OnTest if a certain recipe is known to do the "pass" test to show another one? for example, I want to show recipe A only if recipe B is unknown
I know how to check if a recipe is known or unknown, but it doesn't work with OnTest for some reason
Hey any native Chinese speakers wanna help me with a few translations for I don't butcher this stuff through google?
is there a way to make keys like a virtual item for server use, that way when a player dies others cant pick their key up and use it to access the deceased players safehouse.
Is there a mod which overhauls the soundtrack of the game cant seem to find any
The mod won’t exactly work in my case, plus I’d like to remove options to actually create a new character. Once you commit to a character it will be required you stay with that character. I’d be 100% willing to pay for a mod like that or to get it commissioned.
Kind of a cool MP concept.
Paired with Dynamic traits, even your actions would mold your character as you play.
Yeah I just need to find a modder to commission something like that haha
There's a silent hill 1-3 one but you actually have to move some files yourself to do any sound changing unfortunately.
If an article of clothing is set to not have holes and also has 100 protection am I correct to assume it makes that body part unable to be damaged?
Does anyone know how to add custom items as bait/lures for fishing? I wanted to be able to give players the ability to use a trash item from one of my mods as fish bait/lure, but I can't get the game to recognize it. I tried adding it using the same method asm in fishing_properties.lua, via tables for each fish, but that isn't working. Any advice?
hi, anyone knows if it's possible to check with OnTest if a certain recipe is known to do the "pass" test to show another one? for example, I want to show recipe A only if recipe B is unknown
I know how to check if a recipe is known or unknown, but it doesn't work with OnTest for some reason
theres no reason it wouldnt work OnTest (but work elsewhere), except the player doing the testing is not specifically passed as a argument to the function if i remember right...you'd have to fetch it manually with getPlayer()
ahhh, I see.... I was missing that since in oncreate was done automatically
thank you very much mate
ya OnCreate passes the player arg, but OnTest doesnt
There's also OnCanPerform which is basically OnTest but is passed the player object 🤪
function Recipe.OnCanPerform.GetMuffin(recipe, playerObj, item)
return item and item:isCooked();
end
so, it should be something like
local p = getPlayer();
local r = p.getKnownReipes();
if not r:contains("Recipe B") then
return true
end
end```
I saw oncanperform and Ithought it wouldn't work lmao
thanks to both of you ❤️
you could shorten that quite a bit, since :contains is going to return a bool anyways (also, incorrect args for the test function there)
function recipeA(sourceItem, result)
return getPlayer():getKnownRecipes():contains("Recipe B")
end
but that would be true of Recipe B is known, right?
and I need to pass the true if recipe B is unknown
ya, sorry you'd want to negate that
not works there too?
function recipeA(sourceItem, result)
return not getPlayer():getKnownRecipes():contains("Recipe B")
end
fantastic
thanks again
so many days wondering what the hell I was doing wrong x.x
well, after testing that function doesn't work, sadly, it keeps showing the Recipe A even if Recipe B is known :/
I'll keep trying, at least the game doesn't send errors now
Oh, OnTest/OnCanPerform only determines whether a recipe can be performed, not whether it's displayed.
You can use the IsHidden parameter to "hide" a recipe from the crafting interface, so it only shows up on right-click, like so
recipe Open Package
{
pa_CokeBrick2,
Time:25,
Result:pa_CokeBrick2,
RemoveResultItem: true,
OnCreate:Recipe.PA_CokeBrick_OnCreate,
Prop2:Source=1,
IsHidden:true,
Sound:MapOpen,
}
thanks, but I wanted to hide it from right click too, my idea was: show recipe A if recipe B is not known, perform recipe A to learn recipeB and then "replace" recipe A with recipeB
they basically do the same but the title of the recipe A plus the tooltip doesn't make sense after one use
IsHidden is such a blessing tho, a lot of utility recipes aren't bloating the craft window now thanks to that
it would be possible to remove that recipeA?
I know you can add them with :add
You should be able dynamically modify recipe scripts themselves as such
recipe:setNeedToBeLearn(true) -- will make a recipe dissappear if the player doesn't "know" it
recipe:setNeedToBeLearn(false) -- will remove the need to know a recipe for it to be visible
recipe:setIsHidden(true) -- makes a recipe IsHidden
recipe:setIsHidden(false) -- makes a recipe not IsHidden
But I've never fucked around with doing any of that, and implementing what's you're proposing would entail an fancy little ballet of coding to implement.
Is there a way to make the game load in/generate cells in the distance? I've been trying to make a mod that would kindof work like a library system. So like from one library in game, you would be able to check what books are available in another library like the mall. So far I just have a table defining the library locations so I can check the shelves, but it wont work for cells that haven't been generated yet by a player going there, which kind of defeats the purpose.
Aside from some stuff like abstract handling of stuff like off-screen zombie movement and such, Cells just straight up don't "exist" without a player being present in them, and I don't believe there is any way to instance Cells without a player being present in them.
hmm. I wonder if it is possible to create a fake player that would teleport there
would it maybe be possible to create an Isoplayer object and move it there? Not really sure how the loading of cells works
I'd be surprised if it was possible/feasible, but hey, who knows?
yeah I just took a look online at the java docs and I can see there is a load function for the isocells. maybe I can try to see what happens with that
I guess worst case I could also just teleport the player there and gather whatever info I need when it is loaded, then teleport them back. Seems like a really bad solution though XD
Teleportation is problematic in MP FYI.
It really puts the server through the wringer.
hmm ok good to know
I've not used sandbox options before, are they by default restricted to update by the admin?
Or do you know of a reference on implementing sandbox options I can follow?
yes
^
Ok, I see sort of initial creation here, and accessing that values through the client. I don't see any events that imply being able to catch when the values change, so is the expectation more like checking the value each time my code runs on the client?
And can I simply set the values directly when an admin takes the appropriate action?
this mod works perfect, how ever it when you save your character it respawns you at the location that you saved the character at.. how do i fix this? i want to keep the options just make it where it doesnt save the respawn location
So how would a Scorching Summer (Opposite of Cryogenic Winter) mod work? CW utilizes the cold mechanic and forces you to find shelter and warm up or risk freezing to death, but I imagine the opposite doesn't have much opportunity in this game, at least with how the game works right now.
hey folks, i'm trying to privately upload a fork of a mod for use in a server and i'm struggling with something
