#mod_development
1 messages · Page 525 of 1
I cant wait tilll NPCs come out
Idea for a mod for eventual release of NPCs,
If you smoke a lot or drink a lot
Your character smells like shit
And therefor none of the NPCs want to be arounf you
hello ! is any mod making zombie blind ?
you got made invisible.
you can make zombies blind in vanilla
or was it customized zombies?
because i have not played with configs on vanilla zomboid
Okay so i want to learn how to mod to add some spice to my server with a couple of friends but i dont know where to go
Like a new town
Have you checked the Steam workshop?
I don't know how to add mods to multiplayer, but I think looking there might be a good start.
server setting→mods
Can anyone here help me use ItemZed? I want to make a joke version of the base scissors, but I can't figure out how to copy the Base scissor's values.
I just edit the original scripts, never used something like ItemZed before
ProjectZomboid\media\scripts
I see. Thanks.
Ok, I've made the joke scissors. Now how do I make sure they spawn in the world?
As in, during gameplay, without cheats or recipes or something?
you need to insert the item and spawn chance to the ProceduralDistributions table. I suggest look into other mod's ProceduralDistributions.lua
Understood. I'll see if I can do this part on my own, but, if I can't... I'll ask for help again.
It's easy really, lots of mods have done the same things, you could just figure out yourself by look into how other mods did it.
Huh. Should I be making a server and shared folder, or...?
Well, you should know where the original ProceduralDistributions.lua is in
I'm afraid I don't...
Just do search in the game directory
Got it. Thanks.
There anythign I need to do to make sure the joke scissors have the same functionality as the regular scissors?
I just copied and pasted the code from the regular scissors.
How do I spawn in items? Do I use the debug menu, or...?
nvm, cheat menu works just as well.
Uh... preview files.
How do I do them?
I've placed a preview file in the media folder, and in the folder with the mod.info file.
It's 447x338 or so, but it's a png file. That should be fine, right?
Oh, never mind. Hold on.
Okay. FMod Bank Tools does not work at all -.- I was able to extract the bank-file ... BUT ... it does not repack the bank file ... HOW i can fix this?
anything about tile identifiers code and its list of tiles?
trying to modify a short portion of code in a mod to add in the metal roofing as part of something that wont burn the player on ground floor
here is the code of the floor is lava mod
Ok, I'm confused.
I'm trying to upload a mod to the workshop.
I've got the folder, a contents folder in that, and in that folder, I've got a 256x256 png image labeled "preview.png".
Never mind.
nice
why the f' can't anybody help me solving my issue?!?
I don't know anything about Fmod, sorry.
i just want to replace some zombie sounds ... that can't be that difficult or complex, or? ... <_<
Do you have the preview.png in the top-most layer of your mod folder structure as such?
I think that only a relative handful of people have actually used FMOD for PZ modding, and from what I gather it's a fussy, tedious process and has some limitations?
I would try googling it, "zomboid Fmod modding" or somesuch.
Also, I'd suggest looking at the files for other sound replacement mods and see if there's anything in there that could point you in the right direction.
But yeah, googling got results: https://steamcommunity.com/sharedfiles/filedetails/?id=2474838710 although I have no idea if the guide works or anything?
Iv'e got it worked out now, yeah.
Oh cool! Was that the issue, or something else?
i did'nt wanted to use fmod for modding. i searched for replacing sounds in project zomboid. and regardless, what i found. all say, i have to use this fmod thing ... what i don't like ...
right now im trying to like, figure out how to modify a code for a mod and im not sure what to do

im not even sure what definition or term i should use
I'm just guessing here, but if it was possible to replace sounds w/o using FMOD, then looking at the files for some sound replacement mods might reveal how?
I always look at the code/files myself before taking people's word for things. People say all sorts of things on the internet?
Yeah, I didn't know how to properly set up a workshop file.
actually lemme show the code again for the mod im trying to modify
this is the entire code for the floor is lava mod, and im trying to figure out what can i do so that the metal roof that is possible to be build through metal working skill wont burn me when i step on it on the ground level or something
i already checked the whole interieur of Project Zomboids Folders. There are a few sounds already inside the folders ... but they don't get used by PZ ... But after a few researches and checking other mods, that replacing sounds, they use a bank-file. And all i found about bank-files to unpack them is FMod ... (and yes. the original bank-file from PZ is such a FMod-Bank-File with all the sounds in it. ALL ... over 5000 single files.)
for someone that never really code this is way too confusing to me
i'll try to decompile the Fmod Bank Tools Exe and recode it by myself to maybe work a bit better with bank files and MAYBE figure out, why this bank file not works by the opposite way.
Hey any pointers in how I can make it so that firearms spawn on police officers way less frequently?
require "Definitions/AttachedWeaponDefinitions"
AttachedWeaponDefinitions.attachedWeaponCustomOutfit.Police.chance = 50 -- change this to a lower number + test
Very much appreciated! I will give this a go right now :)
👍
I would try to modify the sandbox setting via editing the sandbox settings file itself versus doing it with code?
Can someone tell me how the file structure should look like when you place all mods for our own server in one pack?
C:\Users\TwentyFree\Zomboid\Workshop\Nirvana Server Mods\Contents\mods\Nirvana Server Mods\media
currently this is how i have it, the media map contains every single mod inside its own map: BetterUI,Killcount,etc
Does anyone know where and how the tooltips for unequipped clothing add the (+10) next to the resistances? I've been looking for a while but I couldn't find it
When I use ISToolTipInv:new(item), I get a tooltip but without (+10)
It can't be possible that NOBODY is in any way able to tell, how to work with the soundfiles of pz and how to "replace" them ... some other mods have done this already AND they have modified bank-files ... <_<
Are there mods that add other survivors in singleplayer?
AKA zombies with guns? Is that a possibility?
@drifting ore I believe you're looking for ISInventoryPaneContextMenu.doWearClothingTooltip
It iterates over the worn clothing of the player, compares the previous defenses to those on the new item, feeds that info into the tooltip for the new item. The actual tooltip is created as a local returned by ISInventoryPaneContextMenu.addTooltip()
I've created an object that's spawned as an instance of IsoThumpable but its sprite is nil if I try to access it from getIsoObject():getSprite():getName() - despite this, it is rendering correctly in the game
thing is, I have multiple sprites and it needs to change depending on whatever the current sprite is - why the heck would it be nil?
Folks. I'm trying to create an indestructible container mod. Biscally, the container needs to be both: not thumpable and fire proof
I've managed to set it not thumpable so that players can't destroy it
as it comes to fireproof, I got no clue on how to set it
My suggestion is to look at the code for setting corpses on fire and see if that leads you to anything relevant about items that can or can't burn, or whether fire should spread to a nearby item that is or isn't burnable
good idea. Do you know where the code actually is? java or lua?
At the very least you should be able to look at the lua code which fills the context menu including the burn option
I have to ask again
any coders?
anyone know what value getBloodLevel() and getDirtyness() returns?
because its surely not returning the values I want
and Weapons are supposed to also have blood thats why you wash it but... I cant find anything related to blood in its table... unless ive missed something?
which values do you expect?
they both return a float value
when checking an item's table in the locals tab of debugger bloodLevel is like 75
but the local i set
bloodAmount = bloodAmount + getBloodLevel()
bloodAmount shows a decimal
ofc if it was a percentage you'd expect the decimal to be 0.75
I have this map bug where it's fixed on this position so I can't properly use the map
Is there a fix for this?
oh wait
sorry wrong channel
what does player:getTotalBlood() return to you?
which items exactly? because the general class InventoryItem has no such methods
specialized classes like Cloth do have such methods defined
so there is absolutely no way to get a nonclothing blood?
no. I'm not saying that. Maybe some items are not intended to have bloodlevel
i have a function
function bloodclothes(item)
if instanceof(item, "clothing") then
return item:getBloodLevel()
else
return i want to get blood level here of item
end
You can't get bloodlevel from items which were not coded for it
Look like what I was looking for, thx !
It seems to me that only Cloth, HandWeapons and InventoryContainer have bloodlevels associated
public boolean hasBlood() {
if (this instanceof Clothing) {
if (this.getBloodClothingType() == null || this.getBloodClothingType().isEmpty()) {
return false;
}
ArrayList var1 = BloodClothingType.getCoveredParts(this.getBloodClothingType());
if (var1 == null) {
return false;
}
for(int var2 = 0; var2 < var1.size(); ++var2) {
if (this.getBlood((BloodBodyPartType)var1.get(var2)) > 0.0F) {
return true;
}
}
} else {
if (this instanceof HandWeapon) {
return ((HandWeapon)this).getBloodLevel() > 0.0F;
}
if (this instanceof InventoryContainer) {
return ((InventoryContainer)this).getBloodLevel() > 0.0F;
}
}
return false;
}
from InventoryItem
HandWeapon
and
InventoryContainer
right?
so i can have
function functionname(item)
if instanceof(item, "Clothing") or instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer");
return item.getBloodLevel()
end
thanks
will get to testing this
thanks so much, where did you find this?
decompiling java
oh probably something i couldnt have done
because I couldnt know what items had bloodlevels
yep. Java code is useful to inspect things
you can "make sense" of things much faster than the trial and error method
dont they mean the same thing?
or yeah if the method returns nil
local function CalculateItemFilth(item)
local bloodAmount = 0;
local dirtAmount = 0;
local waterUsage = 0;
if instanceof(item, "Clothing") or instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer") then
bloodAmount = bloodAmount + item:getBloodLevel();
dirtAmount = dirtAmount + item:getDirtyness();
else
bloodAmount = bloodAmount + 1
end
waterUsage = bloodAmount+dirtAmount
return waterUsage
end```
current code
ISWashClothing.GetRequiredWater
returns 10
i overrided that to return waterUsage
i didnt send that part of code here
Hello!
Hello
if value ~= nil then ...
you're testing if the method exist
if you want to know the returning value, then you must call the method with ()
ok
does this count as the method existing
are you sure the method returns nil? I think it returns 0
getBloodLevel() returns a float value. I assume 0 indicates no blood at all
Anyone here can make a simple mod where during starting a new game a modded vehicle of my choice is already spawned outside of the house/spawn point?
am confused
local function CalculateItemFilth(item)
local bloodAmount = 0;
local dirtAmount = 0;
local waterUsage = 0;
if instanceof(item, "Clothing") or instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer") then
if item:getBloodLevel() ~= nil then
bloodAmount = bloodAmount + item:getBloodLevel();
end
if item:getDirtyness() ~= nil then
dirtAmount = dirtAmount + item:getDirtyness();
end
else
bloodAmount = bloodAmount + 1
end
waterUsage = bloodAmount+dirtAmount
return waterUsage
end```
java.lang.RuntimeException: Object tried to call nil in CalculateItemFilth
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:82)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:973)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:169)
at zombie.ui.UIManager.update(UIManager.java:930)
at zombie.GameWindow.logic(GameWindow.java:253)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:745)
at zombie.GameWindow.run_ez(GameWindow.java:661)
at zombie.GameWindow.mainThread(GameWindow.java:475)
at java.base/java.lang.Thread.run(Unknown Source)
yea if the method doesnt exist
even if i do method ~= nil
still does it
try this
so new code
local function CalculateItemFilth(item)
local bloodAmount = 0;
local dirtAmount = 0;
local waterUsage = 0;
if item.getBloodLevel then
bloodAmount = bloodAmount + item:getBloodLevel();
end
if item.getDirtyness then
dirtAmount = dirtAmount + item:getDirtyness();
end
waterUsage = bloodAmount + dirtAmount
return waterUsage
end
local function CalculateItemFilth(item)
local bloodAmount = 0;
local dirtAmount = 0;
local waterUsage = 0;
if instanceof(item, "Clothing") then
if item:getBloodLevel() ~= nil then
bloodAmount = bloodAmount + item:getBloodLevel()/10
end
if item:getDirtyness() ~= nil then
dirtAmount = dirtAmount + item:getDirtyness()/10
end
elseif instanceof(item, "HandWeapon") or instanceof(item, "InventoryContainer") then
if item:getBloodLevel() ~= nil then
bloodAmount = bloodAmount + item:getBloodLevel()/10
end
else
bloodAmount = bloodAmount + 2
end
waterUsage = bloodAmount+dirtAmount
return waterUsage
end```
oh?
instead of testing the item's class, try testing if it responds to a method
yeah i say that because it looks like it could work
Your example JosEffigy is only doing a value comparison
But the problem is in the call itself. hotdog's method should reference the method as a handle without invoking it to test
i have this other part of code
local ISWashClothing_GetRequiredWater = ISWashClothing.GetRequiredWater;
function ISWashClothing.GetRequiredWater(item)
local vanillaWaterAmount = ISWashClothing_GetRequiredWater(item);
local filth = CalculateItemFilth(item)
if filth < 1 then
return 1
else
return filth
end
end```
that i dont need editing so i didnt send
basically should return what calculated in first
i have this
and from testing this
filth: 0
the code I sent you from CalculateItemFilth does return 0 when the item has neither a bloodlevel nor dirtyness
you can fix that by adding +1 in the final call if you want to
ah wait
that was dumb
should not have /100
its perfect
thank you so much
i was racking my brains because although I wasnt good at lua
I was focused on knowing what items had the methods
yeah ... your logic was correct in fact, but sometimes there is an easier way to do things
btw after I tweak this
this is basically what happens
if 100/100 blood and 100/100 dirt
then water usage = 10
no wait. maybe i should balance this so that
100/100 bloody = water usage 10
and 50 dirt + 50 blood = water usage 10
because dirt stacks slowly and some items dont have dirt
i present
finished code
---@param item InventoryItem
require("ISWashClothing")
local function CalculateItemFilth(item)
local bloodAmount = 0;
local dirtAmount = 0;
local waterUsage = 0;
if item.getBloodLevel then
bloodAmount = bloodAmount + item:getBloodLevel()/10
end
if item.getDirtyness then
dirtAmount = dirtAmount + item:getDirtyness()/10
end
waterUsage = bloodAmount + dirtAmount
return math.floor(waterUsage+0.5)
end
local ISWashClothing_GetRequiredWater = ISWashClothing.GetRequiredWater;
function ISWashClothing.GetRequiredWater(item)
local vanillaWaterAmount = ISWashClothing_GetRequiredWater(item);
local filth = CalculateItemFilth(item)
if filth < 1 then
return 1
elseif filth > 10 then
return 10
else
return filth
end
end
local ISWashClothing_new = ISWashClothing.new;
function ISWashClothing:new(...)
local this = ISWashClothing_new(self, ...);
local waterUnits = ISWashClothing.GetRequiredWater(this.item)
local filth = CalculateItemFilth(this.item)
this.maxTime = waterUnits*20
if this.maxTime > 200 then
this.maxTime = 200
elseif this.maxTime < 1 then
this.maxTime = 1
end
print("Washing Information")
print("filth: ", filth)
print("maxTime: ", this.maxTime)
if this.character:isTimedActionInstant() then
this.maxTime = 1
end
return this;
end```
congrats, man @next glacier
thanks for the help @daring palm
btw
why wash weapons?
its 64/100 blood and water is 1/1
so probably doesnt have bloodlevel
because if filth < 1 then
return 1
but now that I think about it, why wash weapons at all?
Does it contribute to overall unhappiness for survivors who don't like being dirty?
uh no clue
UI in game shows you can wash nightstick
and its 64/100 blood
but doesnt get calculated as bloodLevel
probably doesnt have it
what is the difference between "weaponsprite" and "icon"?
about to push an update to the rain barrel crafting, y'all OK with that?
ah shit, wrong server
Does anybody know if theres a mod that displays map markings on the minimap?
Example: Plop down the house icon on your safehouse, then on the minimap you can see it
Can't you click the "S" button on your mini map to see symbols ?
oh
That's
a thing.
Well, thank you very much, Joe.
I did not actually know that existed, so thank you
No sweat.
Ah ok ill try looking there
Hopefully I can figure out how to apply my profession
wiat wait wait... better towing guy is going to redo fishing? cars will be stuck to your fishing pole XD
i kid i kid.
Is there an easy way to get a new profession in the game i know theres the frame work
I dont think mod support should be posted in tech support right? im having an ingame map issue
My ingame map in zomboid does not show the modded area I am in, but it shows for the host just fine. Example is West Point Expanded wont show for me on the ingame map, but does for the host
Can you taste that? It's degeneracy
so first and foremost I don't like how it looks when placed on the ground. Part of the mod is supposed to be displaying them in your base but you can hardly see the images
anyone got any suggestions?
Is there a way to make campfires infinite?
yeah go outside and touch some grass
maybe try flattening the pillow model a bit ?
That coudl do
Don't worry about it
i got an idea of a cool mod.
basically season 10 of the walking dead the whisperers, could make it occupation and or traits to help blend in with the zombies and stuff.
you'll understand if you watched the walking dead
Pillow stands
not a terrible idea
If you dont make an option
To attach them to cars
Like Atellier
Then I'll be upset
Another idea for base display might be like
Placing them as "wallart" kinda?
Like placing them against a wall specifically
hello everyone! I come with a modding question: How does one dynamically update changes to a zombie??? Specifically the outfit. I have dressInPersistantOutfit("NAME"), but it doesn't show the changes till a world reboot?
No idea the implications of that though
same here. Just getting them in this form has been a ball ache
Making them thinnker didn't seem to help in any way. Sadly I think it is just the perspective
Making stands is a good idea but since I don't know how to code or model that it will have to wait for a later date because I feel ready to upload this beast
is it possible to like... um... disable stun lock?
question... out of sheer curiosity. would it be possible to add a zombie model that has different animations? for instance if someone ported the tank from l4d.
Not possible
100%? or not been tested?
You'd have to edit java files just to try and get it started. So I say not possible from a standard workshop model standpoint
you could animate new ones from scratch, or retarget l4d anims onto the pz skeleton. Copyright issues aside, that would work
well that's what i meant. but with the other model.
making a zombie look like a tank would be a small challenge, but doable.
You just give it clothing that's a tank costume. Done.
That's how Sould Filcher did his nemesis zombie.
Although making it so the costume can't be removed/worn requires some extra care and attention, but is certainly doable.
if you wanted to use custom animation sets, you'd need a way to tell the ai state machine that it's a tank too
Oh yeah, I'm with Soul Filcher on the animation thing TBH.
that's something i'd like to figure out someday (too many plates spinning right now), but how to append to the animSets xml files without touching the originals
With the maskid system and the some not removable clothes/bodyparts you can probably get some good looking custom zombies using the default animation set https://cdn.discordapp.com/attachments/869327724504842330/931152156122292254/Mask.png
Random question out of the blue but by chance anyone know how to output an weapon mag through an recipe crafting to get it be fully loaded?
I heard of OnCreate: but idk if it can be used here
OnCreate is the way you would do it.
Huh as thought but what should it be set if I can ask. Been looking through a bit other mods but can only find people using it for flamethrowers and cause of such, using something like - OnCreate:Fill_LiquidAmmo
Guys. is there an event for an item update when its state changes?
You're gonna need to create a custom lua function that is called when the recipe OnCreate is called.
Something with the equivalent of "result item set ammo count to maximum ammo count" or such.
Look at the recipecode.lua in media/lua/server for how vanilla PZ handles OnCreate functions for recipes.
Ahh got it, need to go a bit deeper than lol. Thanks for the help, pretty much jus trying to create mag that get charged via the crafting tab to be fully loaded rather than inserting bullets.
I was reading PZ wiki about lua event and about the OnTick one it says, I quote " Triggered every tick, try to not use this one, use EveryTenMinutes instead because it can create a lot of frame loss/garbage collection. "
My scripts uses this to not let spawn the default belt applied by the game when a new character is spawned....better switch to the 10 mins one or not?
Events.OnTick.Remove(RMMM_MilitarySpawn.RemoveBelt)
local item = getPlayer():getInventory():getFirstTypeRecurse("Base.Belt2")
getPlayer():getInventory():Remove(item)
end
Events.OnTick.Add(RMMM_MilitarySpawn.RemoveBelt)```
You do realize that using this code means that if a player finds a belt that it will be removed from their inventory when the function is called?
Curse of belt vanishment
yep but in the script I've already fixed it...I was just curious if, fps wise, was better to use the 10 mins one
Well yes, but it would be better just to have this code be called once, when the character has first been created/spawned.
ok so how can I call it just once? ( Sorry I'm not a big expert of scripting ) Can you please edit the part above and paste it here ( if feasible ) thanks
@willow estuary I have to use the OnGameStart trigger I guess...correct?
So I got a suggestion that I should add instructions for people to add their own waifu body pillow addon mods kinda like some weeb version of true music but tbh I don't really know how. Is it just as simple as giving them the Photoshop files I used to make mine and running them through on how to work the config?
So I'm looking into making a simple mod to add one farmable plant to the game. So far I've seen that vanilla plants are hard-coded in farming_vegetableconf.lua and SFarmingSystem.lua, how easy is it exactly to just add a modded type of plant to this same logic? Are there any other lua files I need to be aware of? I want to keep my mod very lightweight.
Additionally, does anyone know of a mod that adds one single plant with vanilla behavior like I'm talking about that I could look over? I know of a few that add a ton of plants with custom recipes and stuff, but I want to stick as close to vanilla as possible.
Working on a custom TV channel and so far so good. I've got it working and it's entertaining to watch. I was hoping to clarify some codes used in the default radiodata.xml - does anyone know the three I have labeled "NOT SURE" can can confirm?
Hello...someone here willing to take a simple request?
hey yall, wonder if you can help me out. I haven't really been playing MP, but users report it doesn't work in MP. It's a tiny thing, and I imagine I just need the right event?
require('NPCs/MainCreationMethods');
local function init300PointsTrait()
TraitFactory.addTrait("300Points", "300 points", -300, "Get 300 points to spend on traits.", false);
--300Points:addXPBoost(Perks.someperkname, 0)
end
Events.OnGameBoot.Add(init300PointsTrait);
directions to any doc that can help me add mod settings for servers and SP would be nice, since making the 300 a dynamic value would probably satisfy some people
Anyone working on a mod to make candles to stay on table and work like real candles?
Hey modders, How do you manage your translations? I'd be curious to know 🙂
https://linkto.run/p/0MSE2V5H
i wanna commission someone for a mod if i can do that. armor mod
local eggItem = InventoryItemFactory.CreateItem("Egg")
specificPlayer:getCurrentSquare():AddWorldInventoryItem(eggItem, 0, 0, 0)```
I'm trying to get this egg to spawn right underneath where the player is standing, but this is randomizing where in the square it goes
I'm confused why it's doing that lol, can anyone explain?
Look at mannequins
Mannequins are technically 3d assets
That act like tiles
I imagine through that you can interpolate a way to just change between textures depending on what pillow/stand combo is used
Aye. Anyone know how to add a Mechanic Interface on a custom vehicle?
Someone make a mod that makes falling off a building less punishing. Especialy since some maps have non collision railings :v
Uh
Like DayZ fall damage?
Where you can fall like 5 stories and only break your legs
Well, old DayZ
Latest DayZ has it so a 2 story fall knocks you uncon
When im combining 2 items how can I make recipe to disregard condition of the second item and keep first items condition without change?
Good call. Man, I really just wish we were able to mod 3D placement. That would be perfection.
Is it possible to add pop up headlights? I’d presume it would have to be a seperate model but no idea how to tell the script to change the models when turning lights on or off
yes, with animations. check workshop, autotsar people recently had a car like that
Oh really? Okay thanks
Hello, does anyone know how in in which files I can change the maximum carry capacity from 50
is it now released?
amazing
big fan
damn. very ambitious mod
project poweroid
what do you think about mine @hot patrol
I like it. Seeing anime resin mods make me wish we had the ability to change eye color.
Or in the case of the anime faces eye shape.
That would be cool
Having to kill dozens of zombified versions of Power would be too much for my heart to take.
i have no idea what to do
maybe at an item that cannot be looted
and make zombie equip them?
so they look like power?
because player and zombie models are the same
Nooooooo
If you are gonna make me have to kill someone make it makima
Fuck Makima
All my homies hate Makima
power
waifu af
then takes off pads
jacks off
flat is justice
doesnt like big badonkers anymore*
Idk man. Id rather see power all the time, even as zombies, rather than no power at all 😭
Them make it so I can play as her. Power eats zombies she does not become one of them

I have thousands
front
that can easily be made into texture
so the art style looks like chainsawman
I have just the one but it will have to wait for me to get home
hard to make UV edits to prevent completely breaking other mods
cant change it drastically
you guys know
about this
mod options documentation says admin can change options before server start
yep
so what would you think
if i changed model again
remove the mouth
does any mod use mouth anymations?
I didn't even know the model had a mouth so I doubt it.
The model is so small you wouldn't see any detail there anyways
I'm working on something myself currently but keep me updated
cant capture her beauty 😢
I feel like that level of detail might be jittery looking on the small model
maybe redice the detail on the eytes to only the most important elements
tru
I do like it though
The mouth might also need to go. You wouldn't be able to see the fangs anyways
but I would test it first
If you really want it high detailed and if you are going to look at it mostly it means you are not going to put a helmet or mask on it why dont you make that head a wearable helmet make custom UV and detail it out as much as you want?
If you are going to wear stuff over it make a custom body location then you can wear other stuff over it if they wont clip much
I mean you could do that but I think the main issue stems just from the fact that high detail is lost on a small scale model. Even if he went that route you still need to make compromises so that the texture doesn't liik like a mess.
In game we will never get a close up view like in that image so whilst it is nice it means very little
I learned that making my mod.
I dont know how
well for one get rid of the eye wrinkles. those lines are too thin you won't see them. Make the eyeborws more pronounced by not outlining them maybe
outlines are likely to only make the textute look choppy
Yeah i dont know how to make a custom body location
what does that even mean
we dont attach them to bones?
oh right
oh I don't know about any of that
so custom body location so that it wouldnt register as
helmet
so you can wear stuff over it
Yeah
you know that is actually a good approach. then in the character creator make a selector for you to pick those heads.
unless I am understanding wrong
just make the full head, hair and all
You could add extra details to the mesh, around eyes, eyebrows and some good ambient occlusion paint it would look great
You cant do these while just painting base character model
it does look a lot better with the extra detail reduced
I wanna see how it looks in game
names of clothes?
a formal shirt suite pants and a tie
did u really make those horns
the horns is from the demonware mod
not really bad it's just you can't really tell what it is supposed to be
kinda figured
yea the hair doesn't fit either
if you had hair to go with it I think it would all fit together and be more understandable
thats why i edited model and textures
the hairline isnt realistic, let alone anime
where foreheads are bigger than real
and the ears are too high
looks better with mikasa hair tho
edited it abit
squished the face more
just looking at the mikasa hair makes it more recognizable
with the bang in her face
I think the smile is odd.
I think it would look better with no mouth so you can interperate the expression yourself
a permanent smile looks off
or something a little more subtle
yea very
I like it. again, the size of the model and the perspective is working against you here but I do think it looks good in the situations where you can really see it. Perspective has been a challenge for me as well. Like when I place my pillows on the ground you can't see the image very well and that was one of the main reasons I made it
yea but that would look offputting having it just stand straight up. I want to be able to lay it on the bad like you would IRl. Maybe have suggested adding stands for them and that is what I will probably do if I can work out how.
Ideally I would like to be able to rotate both axis when placing items in world so you can display it as you wish.
gonna have to nag the devs for this 
@drifting ore 😉
Imagine being able to prop things like guns against the wall rather than just dropping them to the floor
I love small stuff like that
if youre confident on your nagging abilities
can you nag "zoom mod" for us
and personally id want a "60fps UI" mod

lua editable but i sucks at lua so..
this has zoom?
for portrait
@hot patrol i dont like how your mod has a different name in workshop and mod list
almost couldnt find it xD
i thought what? i subscribed to big degen
where is mah big degen
is it zomboidDakimakura or something in the mod list? if so I forgot to change it
what was it in the mod list?
i also keep forgetting to change it
forgot to change it
from modtemplate
lol
the workshop name I gave it is a little long winded so I will probably name it after the mod ID
so WaifuDakis
but idk
uhh
my reorganized info screen not working
or maybe because im in debug
right
dumb dumb
forgot to add it to the save
btw @hot patrol nice poster.png
did you draw it yourself
nice choice then
imagine in an actual zombie apocalypse
your copium
grabbing em dakis
how bout now @hot patrol
much, much better
I had really wanted to push the mod out before MP hit so that in the description I could make it look like I was trying to sell somebody on a MP mod by going on about being lonely and then BOOM body pillows
does anyone know how to create an item in a specific map location?
basically speaking, does anyone know how to get a cell from a specific map location?
I've inspected the java source and got nothing at the moment
I've searched here and it looks like it's still an open issue for most of us
did you add pillows in distribution tables?
and do they spawn near beds?
@hot patrol ?
@lusty nebula not exactly sure but afaik the command Events.OnTick.Remove(...) in your code example should guarantee that the function is only called once on the first game tick. performance should therefore not be an issue.
They spawn on special neckbeard zombies and on double beds kinda like the screenshot on the the workshop page
I made them rare so it's not too overly goofy
plus it's a collectable
I'm using a dick bat mod on my private friend server and I find the damn things in every house
it kinda ruins the meme
yeah i saw your collection
ruins the anime theme
I really need to tweak that back placement. I don't like how it clipps the arm. It is really hard to work with tho.
use rope on the pillow
1 pillow per side
so you can do 1 for the back and front
sadly when equipped on back
bunny girl side
i wanted the hawt side xD
maybe for front
that side is on the front piece.
so the back piece shows the back image and vice versa
made the most sense to me
yep
just like weapons
the front is drooped so you can see
equip on dropdown
you choose to equip front or back
rather than crafting a front and a back
is this the way normals render or
or can it be changed by
shade smooth in blender?
yea idk why it's like that. So I made the weapon model and @hexed arrow made the armor. I tried sdhade smoothing it but it didn't appear to do anything
maybe I just made the weapon a higher poly than he made the armor
yep
zombied survivor ties knots too tight and ruins the rope undoing it

tbh Idk why I choose to do that
yup both armors have square normals

I'm not good at blender but if you are you are welcome to fix it 😉
I had tried shade smoothing it myself
not sure what could be causing that
You are making me realize just how not ready my mod was XD
if its armor its equiped
dont worry
many of my mods werent ready
esp the coding mods
but they are now
check out "Better Washing"
and "Reading is a joke"
yea, it'll get there.
Hey hotdog, check out Robomat's modding tutorials thread: https://theindiestone.com/forums/index.php?/topic/61-robomats-modding-tutorials-updated-12112013/, section d "Customer Spawnpoints". While I realize you're concerned with items, there is a digression about the player's "absolute" coordinates position and translating that.
RoboMat's Modding Tutorials - An introduction to modding for Project Zomboid - I - Introduction I1 - Where to start I2 - What is neededI3 - Lua TutorialsI4 - Other Resources II - The first steps II1 - Getting the connectionII2 - The entry point: Events III - The first mod III1 - Preparations III1...
Maybe
yeah your weapon has quite the polygons
"So if our cheater profession should start in the large warehouse (where else!?) the game will show us a player position of X: 3110 and Y: 1809. Unfortunately we can't use those "absolute" coordinates for the spawning code. We have to calculate the "relative" coordinates instead. Don't worry though - it is pretty easy. Basically you just need to divide the absolute coordinates by 300 to get the cells, but more importantly you have to ignore the remainder. Our coordinates for the big warehouse would be X: 10 and Y: 6 then. Now we have the cell in which the player should spawn. Relative to that position we need the exact coordinates and this is where the remainder comes into play. Still using the above coordinates the remainders of the division would be for X: 110 and for Y: 9."
I think the command Events.OnTick.Remove(...) in the code example makes it so that the function is called only once on the first game tick. this is exactly when the player has spawned for the first time. problem was that the default belt could not be removed easily via events like OnNewGame since it wasn't clear to us when the game adds the belt to the player. what I don't know though is how this behaves if the player re-joins an existing world after player death by using the option "New Character", i.e. not clear for me whether the default belt gets still removed in such a situation.
Oh, I forgot this links to a shorter explainer by The_Real_AI: https://theindiestone.com/forums/index.php?/topic/1631-adding-new-professions-in-29917/&tab=comments#comment-24384
function GiveProfessionItemsBanjo(player,square)I'm not sure how the body of this function looks like but if it's just custom items you want then try the following:CustomProfessions.startItems = function() if getPlayer():getDescriptor():getProfession() == "CustomProfession" then getPlayer():getIn...
That's probably it then
@hot patrol you sir got trolled
every edge is marked sharp
also i think smooth normals work
That code would also reset every time the game is reloaded and such, and thereby delete one belt the player had found every time the game was reloaded.
It's just a very strange way to go about it.
because when i imported your weapon, the normals were smooth
or probably mistake
I don't know what that means.
I have 0 experience in blender
I made my model following a literal pillow making tutorial

if its marked sharp
the line/edge
then it will never be smooth
like tips of swords and stuff are marked sharp
so the edge wont be smooth
its as simple as clear sharp tho
cleared sharp
same amount of faces.
low res
hes right in one part, to decimate the faces to optimize performance of the game
but he marked everything sharp
I will fix that now
wont keep the folds though because the folds exist because your model is high res
hmm
you know what I can make nose sharp
by marking sharp
@chrome egret thank you for your reply. Knowing how to get a cell(x,y) from an absolute position really helps. Now I only need to know how to get the cell
you're right! that's indeed a problem.
Is there a function getCellAt(x,y) or somethign equivalent?
for your mod?
yea
@willow estuary and @lusty nebula to solve the reloading problem, a construction like this could be used in case there are no better ideas. seems to work properly at least in single player for me. in case the player finds a belt during game and adds it to their inventory, it doesnt get removed anymore after reloading if the code below is used.
I'm about to check after i fix these models
shit
i think you edited something
that shouldnt
i dont think you really need that
--- if for whatever reason line
might make it black if you do or {}
because if they are vanilla files no reason why they dont exist as globals
esp if u have require
Ok so I think this was put together because when I tried making neckbeard zombies they would spawn in with no clothes
I will try getting rid of it.
Everything in that screenshot?
ok
just check any global variables that you have
replaced
ah
i think i found it
its not this
This sort of statement variable = variable or {} does not replace or over write global variables.
It only defines them if they don't already exist.
That is normal good practices.
Now that is definitely not the right way to do things and will cause no end of headaches.
Wait so what did I do wrong?
it loads your file instead of vanilla file
ohh
and vanilla file has every recipe
so I should rename the file to something else?
you mean my code example from above or are you referring to JosEffigy's and NalMac's discussion?
gotcha
so in other words recipes.txt already exists
Overwriting the entire vanilla recipe file.
how often is Events.OnPlayerUpdate called? Every frame?
and they contain every recipe in vanilla
you replaced everything with dakis
xD
dakis are life
so something like this then? https://i.imgur.com/bVTVqCt.png
yeah
ok! 😉 then not related to the reloading problem you mentioned with respect to the belt removal.
there is also
fileguidtable
idk what to do with it
but you are replacing it i think
that needs to be renamed to? That has all the vanilla clothin in it because again for some reason without it my zombies were nude
idk what to do with it
No, that is fine. The fileguidtable in a mod will not overwrite the vanilla fileguidtable/
it wont?
what should the contents be like @willow estuary
only the new added items
?
It's how every mod that add clothing does it.
It absolutely works that way.
because i see every vanilla item in his fileGuidTable.xml
It should contain any new clothing items.
And any other clothing items referenced in the mod's zombie outfits,
That's normal for mods that add outfits.
so that is why my zimbies were nude. in any case having all the items seems to make things easier if I ever make a new zed
just asking in case I make a clothing mod as well
can open cans now
anybody know an easy way to change position of attachements on body? The attachment editor is so confusing
I just need to tweak it a little
in the ebug
debug
I just want to fix that clipping
I just know if I touch it tho everything will break
Okay. (Maybe) Solved the issue. After asking here for days ... now i got a tip from a steam-friend ... the sound-files have to be THE SAME LENGTH as the originals ... <_<
what
no the little icon on the left side UI
Less than every frame I think. OnTick should be every frame
Very nice thanks
knock on his door and tell him to draw more power
cool
will upload soon
so do you actually know them?
how did you find that 
me like music
not gonna model her hair and horns?
not tonight at least
right now this is a player replacer
might add hair soon
might add horns as part of hair actually
Honestly doing the full head as it's own thing is something you should look into for the future. That sounds like a really good idea for more character centric ones like this.
Then being able to pick that head in the character creator
that's what I mean. just like the full head and hair as one
just a reminder to keep it family friendly in here
then use a private message?
they are named dakimakura 1-10
and i dont understand shit
i think they use blender for this
I tried blender but I think the way I have my model makes it kind of impossible and idk how to fix it
I would prefer it tho
i think theres some kind of data translation thing
then you convert it
so the origin point remains the same
Yea I know but I couldn't quite seem to get it right
delete all vertex groups except for part you want to attach
dont know what this all means but
yea neither do I. I just moved the model around and checked it in game and simply couldn't get it to work
?
anyone wanna play
Furry version?
I won't be touching that one but you are welcome to once I get it sorted out well enough to open it up to user made addons

Damn maybe it's time for my pitifully small brain to try and learn how to mod pz
It won't go well I can tell
I know that feeling
someone do a BMW mod please 🙄
I'm looking for a way to add loot for a specific zombie. For example, when I kill a policeman zombie, it drops a specific item (in zombie's inventory).
Are there any mods that would be helpful?
require 'Items/Distributions'
SuburbsDistributions.all.Outfit_Police = SuburbsDistributions.all.Outfit_Police or {rolls = 1,items = {},junk= {rolls =1, items={}}}
table.insert(SuburbsDistributions["all"]["Outfit_Police"].items, "Base.BlairsBestItem")
table.insert(SuburbsDistributions["all"]["Outfit_Police"].items, 100)
I see I can set it up with a loot table, just like Locker and other containers, thanks! 🙂
Is it possible to have an Events.EverySecond ?
If yes, did anyone implement it?
Cause I'm making a mod that lowes/increases the endurance, like a passive regen/passive debuff
And using Events.OnPlayerUpdate is making my brain go insane
It worked well, please let me know for reference.
I greped all the sources for "Outfit_Police" and didn't find anything.
So I think it's defined in the or clause (in your code), but why is this string associated with "police officer"?
I want to do same thing to scientist.
How about Event.OnTick ?
https://pzwiki.net/wiki/Modding:Lua_Event/OnTick
it's like on every frame 😕 a bit too overkill
You may want to control it in in-game time, but I've used the OnTick function and Framerate (getPerformance():getFramerate()) to control timing in real time. Just for reference.
Good idea, I'll try
It's just the name of the zombie outfit, "Outfit_[ZOMBIE OUTFIT NAME]", that's all there is to it. If there's a zombie outfit with that name and the distro table is defined properly it will work. That simple.
If I remember it correctly there is a EveryTenSeconds that is basically every time the in game watches update the hour displayed in a standard day lenght
I know there is an EveryTenMinutes but I think we have seconds too
Dosent seem like tbh
Thanks, I was able to check some distro settings using the Outfit Name, so I understand.
Also, how can I fully hotreload my mod?
Cause atm my just turning it off and then on from the mods menu
Can someone also explain me wtf is this error? i'm so confused
function: onPlayerUpdate -- file: BipolarTrait.lua line # 84
LOG : General , 1645219309272> __add not defined for operands in onPlayerUpdate
LOG : General , 1645219309333> creating new sourcewindow: C:/Users/massi/Zomboid/Workshop/pz-mental-illnesses/Contents/mods/MentaIllnesses/media/lua/client/BipolarTrait.lua
You try to make an addition with something that is not a number, like a nil or a table
Yeah but I'm not i'm so confused
local stress = stats:getStress() or 0
local stressChange = isInDepression and 0.001 or -0.002
stats:setStress(stress + stressChange);
sounds like printing out stressChange and isInDepression might reveal the issue
got a question for yall. People say this breaks in MP. am I calling the right event?
require('NPCs/MainCreationMethods');
local function init300PointsTrait()
TraitFactory.addTrait("300Points", "300 points", -300, "Get 300 points to spend on traits.", false);
--300Points:addXPBoost(Perks.someperkname, 0)
end
Events.OnGameBoot.Add(init300PointsTrait);
Weird, I always do stuff like that. Anyway is working now idk how tbf
Ah, okay, just new to me.
I probably fucked up when I wrote it like this
stats:setStress(stress + isInDepression and 0.001 or -0.002);
And forgot the ()
Also where can i find the original PNG for the moodlet of pain? 
in this old forum this guy mentions a ui.png file http://www.theindiestone.com/community/viewtopic.php%3Ff=32&t=2171.html
A fun and friendly game development community!
But I cant find the JAR
Might be in a .pack file under ProjectZomboid\media\texturepacks ("might" bc I haven't personally extracted the ones containing moodles, if they're there, only UI stuff)
Ah okay I see UI and UI2, how do I open them? 7zip is not opening them
There are a few community-made programs to open them, gimme one sec to find the one I've used
Okay thanks
I believe this is the one? https://theindiestone.com/forums/index.php?/topic/12394-pz-pack-file-manager/&tab=comments#comment-156779
I've built a tool to easily unpack and manage all the textures in Zomboid's .pack files. First, I am fully aware of Minic90's program for doing this, and have tried it out. I built my own in part because I really enjoy making small tools like this and in part because I found his had some problems...
Actual download: https://github.com/cdaragorn/ProjectZomboidPackManager/releases
Thanks!
oh oops
how does the mod professions framework help you make new professions
it allows you to add them without the need to override the original function, so multiple mods with new professions can work together
is there any way to force ONLY a starting house to spawn with certain loot in a specific container? eg making a baking tray spawn in the fridge, or a wrench spawn in any bedside table
Anyone know how I can add more protection locations for a certain clothing? Like Hands and Neck protection?
I want to add Neck and hand protection on the Spiffo Suit clothing
just to make sure I'm not a blind prat, there's no method you can call to dynamically set the capacity of a world item, right?
I've resorted to hacking the sprite props, but that only gets me up to 100
Anyway to have a mixed input for a recipe that's more than one? Like 2xItem1 or 2xItem2 or 2xItem3, analogous to Item1/Item2/Item3 ?
Additionally, anyway for result to be anything other than interger?
(specifically, I want to modify Capacity in ItemContainer.java)
@sharp wind if you want to just do "2 of any of the following" then modData["need:x/y/z"] = 2 would work
this is in recipes
yeah, I think you're gonna have to do it in proper lua for that
but then, in Lua, you can do anything
I suppose so, but then you'd need to know the syntax for what's need doing
I've never seen ["need:x/y/x"] used before
I use exactly that syntax for my metal barrel/drum crafting mod
take a look at the code: https://steamcommunity.com/sharedfiles/filedetails/?id=2744974916
see media/lua/client/ISBlacksmithMenuPatch.lua
line 48, I concat a table with / to generate the needed string
if I remember correctly, the implementation that parses it is in ISBuildUtil
so you could also just roll your own, if the built-in isn't granular enough for you
So, it is right, that syntax is something only to this game
what?
it's just regular lua syntax
it's setting a string key on a table
you can walk the table with pairs
table.someValue = 5 is the same as table["someValue"] = 5 - the only thing here is that : and / are not legal characters for using the former notation, so you have to use the latter
I don't get what you're saying
that table[need:x/y/z] is a proper syntax
I've never seen that before
Is what I mean
are you familiar with for k,v in pairs(tbl)
yes
it's not table[need:x/y/z], that would be invalid
it's table["need:x/y/z"]
as in, it's a string key
a lua table can have anything as its key, except nil
I was replying to that
You wrote that and I thought it was odd
as I've never seen such syntax
must be a short-hand
so you've never written say... table[2] - same thing, but an integer key
It's the ["need:x/y/z"] that I've not seen before
it's just an arbitrary string, ISBuildUtil iterates through the table and parses the string
to lua, it's just a string
there's loads of code in the game where they use tbl["stuff"] notation (even though they could just as well have used tbl.stuff
I'm familiar with that
right, so if you want to get/set a key that contains non-alphanumeric characters, you have to use the square brackets notation
I know
or say, you receive a variable in your function from elsewhere, then you would have to use the square brackets notation
not sure what you're confused about then, it's just the syntax of the language
Okay, I looked at that line in your code, it's just a string you constructed as the index for the table barrel.modData
yes, I use table.concat since it's cleaner code - I have a single source of truth for modifying the recipe
better than hardcoding it as a static string
I thought you were doing a recipe where the input is any of Item1=x/Item2=y/Item3=z , where x,y,z > 1 and need not be the same.
oh, in your original example you specified x/y/z all == 2
well, yes, but it can be generalized right?
meaning that if I have at least some of Item1, Item2, or Item3, at least some of which satisfied x,y,z, then the recipe will craft
yes, but it doesn't support X or Y or Z where if X then require 2, or if Y then require 3, or if Z then require 4
but I see now that the selection mechanism for recipe is not so advanced
I'll use OnCreate to write a function to do what's needed for the result then
if you want something more advanced, adapt buildUtil.consumeMaterial in lua/server/BuildingObjects/ISBuildUtil.lua
scaling things down to Item1/Item2/Item3 , where each is at least 1
doesn't have to be 1
👍
it can be any amount, but it will consume that amount from any of X, Y or Z, whichever is available
I tried the syntax Item1=2/Item2=2/Item3=2, it was not happy
yes, that obviously won't work
I pointed you at the function that parses the string, it doesn't handle that
the correct syntax would be modData["need:Item1/Item2/Item3"] = 2
Yes, but would that work in the recipe format ?
no
because this isn't part of the recipe logic
the only way you could do it with recipes is split it up into a multistage build, like they do for wooden walls
(i.e. wall frame -> wall level 1/2/3)
because then you can create multiple paths to stage 1, then stage 2, etc
probably won't provide for the best user experience, better to roll the code yourself, but it's doable
It's sufficient for now to use recipe format of Item1/Item2/Item3/etc and scale with OnCreate to modify the result
I need it anyway since the result is partial unit
It doesn't like result that isn't an integer
weird question, but how would I make zombies always lunging?
another question, how would I replace zombie walk animations with my own fbx?
AFAIK you can't change that without modifying the java code
I've seen people replace the zombies animations
is that what you mean by "lunging"?
no, I mean when they raise their arms
when you move near
walk with their arms reaching?
you can change their walking via IsoZombie.setWalkType from lua
the animation is called lunge
I don't know of anything to make them do the lunge anim
as for the FBX, you should be able to define your own models data that's named the same as the base game and I believe it'll override it
how would I do that in a script format? just place that in a lua file or what?
um, you would need to iterate over the table of IsoZombie instances and call that method
but "lunge" isn't a valid walk type
ok
I can just do plan b
which was replace zombie animationsa
only issue
I mentioned it mainly in response to Fatmice mentioning the mod that makes them sprint at night
I dont know how to retarget animations to another rig, I'll ask in modeling
Hey does anyone have any decent experience with lua. I am needing help with something that i am hoping is really simple. I'd appreciate the help 😄
I have spent way too long working on this image for my mod and not actually working on the mod itself, but I wanted to share because I think only this channel would understand, haha
@silent bloom we've all been there, it's called "yak shaving"
Please tell me.
Is it possible to place items in specific locations at the start of the game?
For example, can I place a gun on the desk at the police station in Muldraugh?
(Not spawn into a container)
It's "possible" but you'll either have to write the code or find existing code that does it.
@hidden compass yes, see media/lua/server/BuildingObjects/ISPlace3DItemCursor.lua


