#mod_development
1 messages Β· Page 517 of 1
its doing great i got more than 100 outfits, dozens of weapons and such
also the reason for the id name is that some mod might have the same name why it have an id
it sucks man, no other plataform does that
curseforge is great; there is the mod, a download button, u do all manually
americans are so much lazy really... everything automatic and fast... in the end more glitch chances, mor confusion, more complains
i stick to good old manual settings, thank you
i want to download it, SEE where it goes, SEE the name, u know?
i want to put the mod there myself
we have a saying at my work if you have to do a thing more then 3 times make a script or generator to do it for you.
so im use to do that kind of stuff as a software developer o.o
soo i do not really agree to it ^^
if i have to download and manuel install 30 mods or be able to sub to a mod so it download and install it automatic for me ?
anyone know how to access the zombie models or textures?
They are all in the workshop folder
Steam obviously has flaws but I'm all for the ease of use. What's the point of making a mod if only 50% of players know how to install it? You know what I mean
lol you guys cant be sirious... manually install a mod is just COPY & PASTE lol
And then make a powershell script to convert them into correct folders and then use that for your server if yo uwant to avoid constant updates and restarts
steam 'subscribe' system is a disgrace imo, idc if that makes me unpopular here
I DONT CARE, I DONT LIKE IT
Do you ever talk to people who don't know anything about computers? Find where the game is installed on steam is already complicated for them
I'm used to tedious complicated shit from learning COBOL
Quick and easy installs are a god send
Of course it's not complicated, but some people don't want to take the time
you just type zomboid in windows start and it open ${home}/zomboid folder where you then have to add it into mod folder is quite easy
For you yes, I know people for who it's not
i dont understand this 'cattle' mentality of some people, its like when they find someone that dont agree with them, they HAVE to argue until the other agree with them 
like those Karens busting people balls over mask lol
Leave the argument...
I'm rude ? Lol
i think its that your complaining and not giving any useful criticism that can be helpful
you're feeding a troll. block him and move on
WOW
other than that who cares
now im a troll? wtf ol
I told you to stop arguing if you don't like conversations...
who said i dont like conversations?
did i curse u or something? wtf really
why i am a troll now??
i just cursed steam here
sounds like people get butt-hurt for Steam now... lmao
people talk and i respond what is the problem here, and plz explain me why this Kaldo SNOWFLAKE called me a troll?
Not even the modding channel is safe from arguments, huh
i just told nothing can change my opinion
so i have the night sprinters mod in my server but i dont see any options for it. will it just work or do i also need it also enabled on my end too?
yeah sorry about that, but that idiot called me troll just because i made critics for steam
So I told you to leave the conversation, that it
It should prompt you to install it when you start, is it a dedicated server? You might be looking for #mod_support btw
yes ok bounty, im not mad with u
oh there is a mod support thank you
Oh my god
I was losing my mind
Jesus christ
Why is Events.OnClientCommand for events recieved from clients on the server
this Kaldo person calls me a Troll then Block me so i cant even defend myself, what a coward snowflake little fruity
weakling
Could you stop lol
Like I know you're upset but it's over, continuing it is doing no good
ok im done now, sorry
But it makes sense in another way, sendServerCommand sends from server to client and the client fires OnServerCommand because the server command fires
also i asked yesterday but there are alot of people, any mod suggestions that make the game not just more challenging but more survival horror. i have danger zone fog horde, and scent of blood, with night sprinters, and pitch black nights that last 3 irl hours
any suggestions helps to scare the life out of my friends
Totally agree, the client/server name of functions/events is a mess xD
Client=server and server=client, wtf ?
sendClientCommand CLIENT -> SERVER
sendServerCommand SERVER -> CLIENT(s)
OnClientCommand Runs on server when a command is received from a client
OnServerCommand Runs on client when a command is received from the server
its not really confusing, just slightly ambiguous. it should be read as
sendClientCommand = send command from client
OnClientCommand = on receiving command from client
lengthing it out to spell out the full thing becomes kinda excessive for naming schemes
Anyone have a good idea what kind of perks, debufss and buffs to give players for taking a break after they die and giving them a boost after lets say 1 hour after they died
Hello everyone, I tried to make a test mod for clothes, threw everything into a folder, but the mod is not displayed when choosing mods. Someone knows how to fix this? Where can you read about it? Did according to the guide https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/ . And I even tried to throw the mod from the tutorial into the folder - the game does not see it either.
Hello and Welcome! Here you will find a concise and comprehensive guide and tutorial of making 3D models for Project Zomboid. Currently, this will mainly pertain to custom Clothing creation but may include weapon creation in the future. This will present how to create models from scratch with Ble...
check the id= line in your mod.info
And also folder name
I just took the mod from the archive that is attached to the tutorial, in theory this is a ready-made mod according to the tutorial, but the game does not see it, but it sees the standard ModTemplate.
i literally JUST had this problem with the mod i'm trying to test. make sure you're NOT putting it in the program files but in Users\[username]\Zomboid\mods
i have no idea if that'll be the cause of your problem, but i was struggling trying to duplicate and move around stuff in the program files and it was just not showing up at all, which sounds exactly like what you're describing
I spent a lot of time on this, thanks for the help. Who can suggest a good tutorial article / video on creating a mod for pz?
what you need ? maybe we can help
I'm just starting my journey and just looking for instructions on how to make my model from scratch.
Pinned message to get to the wiki, then look at the modding part
cool man, welcome !
you ever used blender before?
Yes, but I'm afraid most of my skills are lost
you will start trying to do what; weapon, clothing? or something else
I start making clothes
anyone know what "AcceptMediaType = 0," does?
Do you know any good guides for making low poly clothes?
yeah im doing clothings atm π
atm?
like, copy the parts of the avatar you want to make, press Shift+D to duplicate, scale it a bit (press S then 105) then press P and separate the mesh
you can make all sorts of cloths like that
At This Moment (currently)
What mod are you working on? What will he add?
lots of stuff, its like 40Mb now lol
mostly outfits now
im doing robocop atm, its very random stuff
from old movies, cartoons, etc
that pic is old thou i changed some of those
but eveything on my mod you wont find spawning around the world; you need to buy them on the craft menu, with a simple trading system i did
can someone help me debug this?
not sure why it has a problem with DoZombieStats
its also in the Base game's VirtualZombieManager
is there any immediately obvious reason why this recipe wouldn't show up in game?
Syringe,
keep InsulinVial,
Result:InsulinSyringe,
Category: General,
NeedToBeLearn: false,
}```
not sure if the last line should have a ,?
prob not
how do you even get to this screen lol (I am very new to modding PZ)
it is the debug menu
this is the only debug menu I am aware of just yet
oh yes well I am testing a mod and there was an error so this comes up. I think its F11?
Hello, I wonder if there is not a mod that applies the action of lying down on the ground apart from crouching?
F11 did the trick π
if that was the problem there's another one because it's still not working
check the other recipes and try to spot the difference
probably add the comma back in then
alright i'm having a much bigger problem. none of my new mod items & exactly 0 of my recipes are showing up
did u put the , back in that you removed?
can someone tell me about DoZombieStats
alright so i divided my recipes and items into two separate files like i saw some other modders do and i don't know HOW but most things are showing up now! one of my recipes still isn't showing up but im troubleshooting that
Are your recipes under a custom module that imports base or is the file adding on to base? In my experience if somethings not working in a module move it to Base
Haven't done any modding in Project Zomboid as of yet. Only some pointers:
- I believe this is a JSON file. If so, you can always validate the syntax yourself by checking sources like https://jsonformatter.curiousconcept.com/#
- check if you can find any documentation about what properties are required
i moved it out of the custom module and that's what got one of the recipes working! no luck with the other one, though, even though it's being added to base just like the working recipe now
okay, this is going to sound stupid but try putting an extra blank line in between the recipe that isn't working and the ones that are working. put one on top and one on bottom.
i dont know enough about modding for ANYTHING to sound stupid, haha. i tried this; it didn't work, unfortunately
got the recipe to work anger
i got the original recipe to work, but not the new one
is there a original recipe xD
recipe Fill Sterile Syringe with Insulin {
EmptySyringe,
keep InsulinVial,
Result:InsulinSyringe,
Category: General,
Time: 50.0
NeedToBeLearn: false
}
recipe Fill Used Syringe with Insulin {
UsedSyringe,
keep InsulinVial,
Result:USEDInsulinSyringe,
Category: General,
Time: 50.0
NeedToBeLearn: false
}
}```
the first recipe shows up just fine, the second one is nowhere to be found
the first recipe is what i was referring to as the original
also why do you use base?
i figured out ONE of the problems - i'm getting the items from another txt file in the script folder of my mod. that txt file has two variations of used syringe - i don't know if that's the problem but i'm figuring it out now
Ohh
is the mod your own and if so you could add both to same file or have the same module
i know it SHOULDN'T be base but it wasn't working when i was importing base
yes it's my Very First Mod i'm baby. it wasn't working at all when i had everything in the same txt file. i split it into two and now i've got all my items but only one of my recipes
can i see your item script ?
item InsulinVial {
Type = Drainable,
DisplayName = Vial of Insulin,
Icon = InsulinVial,
Weight = 0.1,
UseDelta = 0.02
}
item UsedSyringe {
Type = Normal,
DisplayName = Used Syringe,
Icon = UsedSyringe,
Weight = 0.05
}
item EmptySyringe {
Type = Normal,
DisplayName = Syringe,
Icon = EmptySyringe,
Weight = 0.05
}
item InsulinSyringe {
Type = Normal,
DisplayName = Insulin-Filled Syringe,
Icon = InsulinSyringe,
Weight = 0.15,
ReplaceOnUse = UsedSyringe
}
item USEDInsulinSyringe {
Type = Normal,
DisplayName = Insulin-Filled Syringe,
Icon = InsulinSyringe,
Weight = 0.15,
ReplaceOnUse = UsedSyringe
}
}```
that script work right now ?
ive been able to get everything to show up except USEDInsulinSyringe
I think you can't use dashes
Because lua
Try underscore
I'm not sure though I am also a beginner π
Can you not get the Recipe to work or the Item itself?
module MYFirstMod {
imports {
Base
}
item InsulinVial {
Type = Drainable,
DisplayName = Vial of Insulin,
Icon = InsulinVial,
Weight = 0.1,
UseDelta = 0.02
}
item UsedSyringe {
Type = Normal,
DisplayName = Used Syringe,
Icon = UsedSyringe,
Weight = 0.05
}
item EmptySyringe {
Type = Normal,
DisplayName = Syringe,
Icon = EmptySyringe,
Weight = 0.05
}
item InsulinSyringe {
Type = Normal,
DisplayName = Insulin-Filled Syringe,
Icon = InsulinSyringe,
Weight = 0.15,
ReplaceOnUse = UsedSyringe
}
item USEDInsulinSyringe {
Type = Normal,
DisplayName = Insulin-Filled Syringe,
Icon = InsulinSyringe,
Weight = 0.15,
ReplaceOnUse = UsedSyringe
}
}
but you have the same name for insulinsring and usedinsulisyringe o.o
look how i "importet the base
yea yea when i had the base importing it wasn't working! i'm scared to add it back in
I know the dash thing might sound stupid but it's worth a try
So the Item is busted or the recipe? This looks like we're messing with items
nah it doesn't sound stupid at all! i'm just hesitant to get rid of the dashes because the alternative is en or em dashes and im worried those characters will upset the code even more than the - already does
i mean i could just do a space
The used syringe works or
i'm double checking on USEDInsulinSyringe and UsedSyringe right now to see if they're busted and busting the recipe or if theyre maybe both borked
Also I don't think you need imports base
Because you are not referring to any items from the base game
Like if you were to use Base.Needle for example you'd need the imports
i found all the items with my script hmm
okay all the items work!
the recipe does NOT show up
but a recipe from the same file does???
This is
The recipes
exactly what jesus just quoted!
alrighty try to put the recipes below the items in the same script. I can post my Sleeping Bag script if that would help you
Is this for a diabetic trait mod
yup! i'm a type 1 diabetic and i think it would be a real challenge to try and manage insulin-dependent diabetes in the apocalypse. AND with the tools available to me in zomboid (moodles, namely) it's possible to mimic both hypo and hyperglycemia AS WELL AS ketoacidosis!
Haha that's awesome, I was just talking to my friends about it the other day because one of em is diabetic, he's actually never taken care of it and now risks his vision completely gone
Are you planning to release the full mod to the workshop?
EVENTUALLY yes, but there's a whole lot i have to learn before i'm anywhere near a release. i still have to learn how to create a blood sugar variable - that's my biggest hurdle right now. ive looked a lot at the "waste management" mods in the workshop since they essentially add a new need to the game and thats roughly what i'm trying to do with blood sugar!
I think the urination mod or the pooping one will help too
those are the ones i'm referencing, haha
cant see the problem it work on mine
Try disabling every mod except yours @bitter frigate
what i tried when i did it inside my own mod
and they working
the only mod i have enabled on my debug server is the No Violins mod, so i don't think anything is conflicting
i tried using your code my friend and everything of mine disappeared
did you replace what you had ?
also i dont know if you notice i change where the tap was for your recipe just to see they spawned in
i did replace what i had. i was able to find all the items!! but i wasn't able to see either crafting recipe
the recipe was in the tab called "Mymod"
oooh!!! okay okay i found them i found them!!
you should be able to change it back to general
i did it just to see if the tap would pop up ^^
but im off to bed so have fun with you modding anger π
have a good sleep my friend!! thank u for all your help!
thank ALL of you for all your help i'd've given up without yall
might be worth looking into making a program to create items
something with drop downs and spaces to type that would automatically output the file
π
that would be SICK
how would i write a recipe that requires [x] units of a drainable? i know usually you'd just add it to the ingredients line, but i worry doing [drainable]=12 will require 12 full drainables
Sooo. Will try to ask again.
How i could query all items with specific Type and SubCategory? Probably all guns.
And also. Do i get it right, to add one more context button to item i need to create a function with args - player, context, items.
Then get player, query items and create context inside function and in the end just pass to Event (i forget it name) like OnCreateContextForItem (i will find right name somewhere in mods)?
so cool
still not sure why the character is falling from the ladder sometime though
but I guess that can be a funny challenge
sometimes you just get a case of the cracked skullsies only throwing yourself bodily from a ladder can satisfy
Turned a bug to feature. :)
yeah π
hehe
was fun texturing these, pulled details from both the tile & item sprites for each ones new WorldItem texture. They all use the same new 3D model though
they're VERY pretty! are they just for aesthetics or will they function differently?
they're like the vanilla radios now
it's the same vanilla walkies, just with added ability to not only tile place them, but WorldItem place as well
but just like the vanilla radios, they only function as a tile or held
I may end up restoring them appearing in the hand when held down the road
which should also open them up to being seen on belts as well
but all in time, this is mainly just for fun atm. A break from regular Gamedev
makes sense! they're really nice looking in the meanwhile
thx! I do take pride in my texture work π , these are a lot different than my usual style. I enjoyed being able to paint more simply and then scale it down versus my usual PSX model Technique (which takes up just way too much time tbh lol)
eventually I'd love to make some guns for PZ
since I already do lowpoly weapons anyhow, just need to practice this simpler painting style
like my last model, made a M2 Carbine
probably could already fit right in to PZ with a small texture tweak
would there be a way to disable fair loot with a Mod? me and my bf see completly diffrent loot in the same house in MP and its kinda annoying
SO as it is each syringe costs 1 unit of insulin to make, and makes one unit. this is wonderful. HOWEVER. a typical dose of insulin (for me) is about 8 units. i know i can create an 8 unit syringe; do i have to make an individual recipe for every amount i'd want?
Do anyone know how to make a mod that makes so you can sleep whenever? Calling the mechanic βpower napβ. It is very annoying needing to wait for buddies in MP to get tired.
Are you going to add a feature to open a window that would be closed?
what do you mean?
If you attach the ladder to a building with a closed window, can you try to open it from below? It would be interesting to add something like that I think
I don't think I will π
I'm not creating any animation, just using the one from the game
You don't need to, just use the animation when you open the windows, but from the ground
Like that
Hey guys
I'm trying to configure my Brita's weapons pack
But there's always far too much ammo
Anyone have a good config that they could share for a hardcore pve survival setting?
In which file I can find the event for when you smash a zombie's head?
found it!
Make the syringe similar to a water bottle
A full syringe is 8 units or however many
Then when you craft an insulin syringe it just fills the syringe more
how would i do that with insulin instead of water? because i wanted to do that but thought there was no way to duplicate the behavior of water and, idk, call it something else
halp?
zomb: means its calling a java function right? Since its also in the Base game's VirtualZombieManager. I don't know what the actual error is, help plz?
Is there a mod where I can admin build with more than the standard metal and wood stuff?
like using some vanilla tiles and such
If NecroForge works in mp, you could use it to copy-paste any tile.
awsome thank you
Does anyone know how to search https://projectzomboid.com/modding/ to see which class a particular function belongs to? For example a mod I'm looking at seems to be using zomb:DoZombieStats() but I don't know where its defined? π’
Where can i learn more about attachments?
so i did a bit of googling and i think this will be relevant to you? i think it describes what the function does https://www.pseudonymouscodeviews.com/2021/08/do-zombies-get-slower-and-weaker-as.html
Ok yes from that article I can see from the line "In the IsoZombie class there is a method called "DoZombieStats". It is called by both the constructor and the load method." that it belongs to the IsoZombie class. Did you just google DoZombieStats() or something?
that'd be it :)
i specifically searched ":DoZombieStats()" - quotes are SUPER useful for this stuff. i'd be dead without them
I'm trying to work out why this is causing issues
function Horde:moveTo(x,y)
if x then self.posX = x end
if y then self.posY = y end
self.modData.posX = self.posX
self.modData.posY = self.posY
if self.isVirtual == true or self.leader == nil then return end
for _,zomb in ipairs(self.zombieList) do
if zomb:getModData().offsetX then
zomb:changeSpeed(2)
zomb:DoZombieStats()
zomb:pathToLocation(self.posX+zomb:getModData().offsetX, self.posY+zomb:getModData().offsetY, 0)
end
end
end
zomb should already be a non-virtual IsoZombie so I have no idea why the mod is crashing at zomb:DoZombieStats()
where can i see all the AttachedWeaponDefinitions?
That would assume I have control over what's happening between the climbing and the hopping part
but I don't really, I'm merly adding the proper flags to the square at the top of the ladder to make it work out of the box when you press E
anyone know how to change character hair color in debug?
I still don't see DoZombieStats even when I search IsoZombie for it in https://projectzomboid.com/modding/
your callstack there is showing line 232 zomb:changeSpeed(), not line 233
i'm not seeing a changeSpeed method for IsoZombie
Good 'ole changeSpeed() got pulled, this is how I give zombies custom speeds; this is how I currently do custom speeds.
local oldSpeed = getSandboxOptions():getOptionByName("ZombieLore.Speed")
oldSpeed = oldSpeed:getValue()
getSandboxOptions():set("ZombieLore.Speed", 1)
zombie:makeInactive(true)
zombie:makeInactive(false)
zombie:DoZombieStats()
getSandboxOptions():set("ZombieLore.Speed",oldSpeed)
Not sure why the makeInactive business is needed, I had to copy someone's homework to get it work with the latest updates and that was in it and was the magic missing ingredient.
question.
I'm trying to get this sound to play randomly and not all the time when you smash a zombie's head.
I'm pretty new so I'm looking at the javadocs and it seems like SoundManager is the way to go?
The zombie handling functions have shifted a fair amount over the past year+, so it's made custom zombie stuff a fair bother.
[1] = "smash2",
[2] = "smash3",
[3] = "smash4",
[4] = "PZ_HeadSmash_01",
[5] = "PZ_HeadSmash_02",
}
local function SmashHead ( , hit)```
this is what i have so far lol...
Wow that is the ticket, good to know thank you.
π
So one thing to be aware of is that PZ cheats and "re uses" zombies? So when you make one zombie a sprinter, when that zombie gets "re used" you migt have a surprise sprinter pop up elsewhere, you follow?
PZ keeps tracks of individual zombie appearances/outfits, and individual zombie statistics, but the statistics are like a deck of cards that PZ will shuffle thru and re-use.
It shouldn't be a huge deal breaker issue, but like I said it can result in surprise sprinters, and doing stuff like teleporting in debug can have weird effects with custom zombies, you'll drag some of the zombie statistics with you to your new location when the zombie stats are reused.
Hope this makes some sense? π
calling :DoZombieStats manually seems to be redundant after calling makeInactive twice there
When I'm not sure, I spam π€ͺ
public void makeInactive(boolean var1) {
if (var1 != this.inactive) {
if (var1) {
this.walkType = Integer.toString(Rand.Next(3) + 1);
this.walkType = "slow" + this.walkType;
this.bRunning = false;
this.inactive = true;
this.speedType = 3;
} else {
this.speedType = -1;
this.inactive = false;
this.DoZombieStats();
}
}
}```
as you can see, when you call it with that `false` arg after calling it with `true` it automatically calls `DoZombieStats`
I mean. good to know, I'll test it, I'm just.... .....so exhausted with testing special zombie stuff every time a new update breaks how to make them work. π¬
how did you find that, for example, fenris?
looked in the decompiled java files
Yea I've wondered about how exactly the "reusable" zombie work. I thought they were "reused" when unloaded basically.
I have those but how do you search through all the files for a specific function?
eh depends on your editor. its probably got a "find in files" function
As far as I understand it, it's like a deck of cards? And when a zombie is taken out of play, it goes back into the deck? And the outfits aren't tied to the zombie stats?
Now, I think when a zombie is killed it's redfined and not resued?
if they get reused when loaded and unloaded though, then they are being shuffled around all the time anyway
But also the details of this shit can change with every update ahahahahahahahaah π€ͺ π€ͺ π€ͺ
of course lol
The new optimization zombie handling stuff for MP already complicates all this and I'm not sure of how stuff even works as is with that π€ͺ π€ͺ π€ͺ
But yeah, what I did one time is assigned individual "serial numbers" to zombies, and had that output to console and visible onscreen to evaluate the phenomenon, but that was also a year+ ago?
Where i should start to make my own melee custom weapon ?
I'm just trying to make a mod that I found work that I didn't even write because it already does 90% of what I wanted to do but I don't even know how to navigate to the functions I want to look at π€ͺ π€ͺ
For me... ....modding to me is like sudoku for my mom? It's just a series of mind puzzles to defeat, so bring on the π€ͺ π€ͺ π€ͺ
But custom zombie stuff has been especially wiggly at times over the build 41 updates, and with how it intersects heavily with MP optimization etc, I'm sure that will continue?
True but this mod essentially just spawn and despawns zombies, while moving them "virtually" across the map
-- this is how I format code to demonstrate lua text
local SmashSounds ={
[1] = "smash2",
[2] = "smash3",
[3] = "smash4",
[4] = "PZ_HeadSmash_01",
[5] = "PZ_HeadSmash_02",
}
local function SmashedHead (Request, Type)
if Request:isSmashed() == true then
local randNum = ZombRand(5)+1
getSoundManager():PlaySound(SmashSounds[randNum], false, 0):setVolume(1);
end
end
omg ty
Jesus christ, fast reflexes there π
Lol, two monitors
Will that work... ?
Sorry I'm not trying to be annoying, just really wanna mod things. I am being very ambitious right now lol...
I mean.... ....it's always a case of if you set everything up properly, it should work?
But I'm a gigantic fucking idiot and can't actually process code by eyeballing it, I just play with the lego pieces until something works and then share that here if it can help someone?
Okay, so, right off the bat, however, vanilla PZ already supports sound randomization
true that
If you want... ...okay, so you know about the sound scripts and all that jazz already?
huh I don't get it? ' ' 'lua? what?
so you're saying that by just having the script with the sounds it should randomly go through them?
you usually send code by typing `` <- three of these at the beginning and at the end
In the screenshot I put the language of the code, lua, there so discord knew that the following code block was lua code, and colored it appropriately. π
' ' ' lua but I can do this and it doesnt do anything? ' ' '
those are not commas
oh
sorry i mean back tick
I'm assuming here that you have some familiarity with the PZ file structure and shit?
Go to media/scipts, open sounds_zombie.txt and peep sound FemaleZombieCombined π
use the key next to the number 1 on your keyboard
oh ok
It's part of the minigame with how insanely fussy formatting can be with modding π
function Horde:moveTo(x,y)
if x then self.posX = x end
if y then self.posY = y end
self.modData.posX = self.posX
self.modData.posY = self.posY
if self.isVirtual == true or self.leader == nil then return end
for _,zomb in ipairs(self.zombieList) do
if zomb:getModData().offsetX then
zomb:changeSpeed(2)
zomb:DoZombieStats()
zomb:pathToLocation(self.posX+zomb:getModData().offsetX, self.posY+zomb:getModData().offsetY, 0)
end
end
end
The Radial Menu is uh... breaking my brain
The sage of secrets is having their brain torn apart? That's odd
Oh, nice how you checked to make sure that the zombie is actually instanced there! I was gonna say something about virtual zombies and the reality bubble, but looks like you've got that figured out.
its not my code
I totally looked at the file but didn't see that FemaleZombieCombined jesus
im just trying to make it work lol
I was on that file like an hour ago lol, thanks a lot
Yeah, to be fair it;s remarkably easy to miss stuff when skimming dry code/script stuff like that?
X_X
I'm learning how to mod just to make this work. I do have some coding experience but modding is new to me
I could just skip doing a radial menu and bind the vocalizer to the numpad keys.
I started learning lua just to start modding on zomboid lol
Okay, so, and I don't understand much about this as it's new, but the new build .65 zombie optimization for mp etc business shuffles around extra zombies when there;s too many in a player's vicinity? It takes them and puts them outside the player's reality bubble.
It's just to keep framerates from bombing etc. I haven't experimented with it, or looked at the code, or have a handle on it.
But I can see how that, if it works, could complicate a mod like Hordes Alpha and may make it unviable if vanilla is grabbing zombies and moving them out of the player's reality bubble?
Anyways, if you're getting bizarre/unworkable results that zombie optimization business might be responsible.
- I'm not sure if that zombie optimization thing is even currently working as intended as well.
Mods that modify zombies and their behavior can be especially update fragile as I mentioned previously.
The Hordes Alpha mod stopped working well over a year ago so it will be quite a challenge to pick it up and update it to .65's Singleplayer standards. Now on the other hand, if you want this to work with Multiplayer.... I wish of you the best of luck. I've had a lot of mixed results seeing how local or dedicated servers handle persistent zombies outfits are handled - which is a feature that this mod uses. It's not going to be a quick fix, long story short.
didn't you just a few days ago argued with me that it wasn't possible (even though i just asked a question for why).
Guys, important question. What program do you use to make 3d models?
maya/blender
blender is free and has everything
Hey, for the translations. If encoding in UTF 16 BE for Russian, Korean, Chinese and Japanese is it good?
maya is paid and does the same thing
did english only idk
any one know if i can write this bit on a better way ?
local function getZomRan(rand1,rand2)
if rand1 and rand2 then
return ZombRand(rand1,rand2)
else
return ZombRand(50,55)
end
end
how to make a simple craft (like dismantling) for item?
dismantling for like item from inventory ?
if it like the recipes for dismantling earmuf and cdplayer and so on and so on its like this
recipe Dismantle Video Game
{
VideoGame,
keep [Recipe.GetItemTypes.Screwdriver],
Result:ElectronicsScrap,
Time:30.0,
OnGiveXP:Recipe.OnGiveXP.DismantleElectronics,
Category:Electrical,
AnimNode:Disassemble,
Prop1:Screwdriver,
Prop2:CDplayer,
}
Question out of curiosity here if anyone has got an opinion to comment on it.
Noticed this mod recently
And I was wondering how feasible would it be to create an addon that plugged in your own music.
Not like an MP3 but perhaps a MIDI file that played out the notes.
The only reason I mention it is because this immediately made me think of the LuteBot mod for Mordhau
thanks
and how to properly name file
need to be in the script media/script/mymod.txt and then
module mymod{
inports{
Base
}
recipe foo{
--code here for the recipe
}
}
ok
so know how it work now or ?
i mess up with lua
you can also add recipes with lua but is way harder and bugs sometimes out so save way is doing it in the txt file and the game will store them before it running
so i tried to make filler item that fits to the timeline of the server but the only use of this thing is to be dismantled into electronic parts
and when i tried as you sayed game just crashes
mb im doin someting wrong
did you get the crash repor t?
also can you come with an example scrip you trying to do right now ? ^^
Ok next problem: item just disappeared
module SMART
{
imports
{
Base
}
item Smartphone
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
}
}
module SMART
{
imports
{
Base
}
recipe Dismantle Smart phone
{
Smartphone,
keep [Recipe.GetItemTypes.Screwdriver],
Result:ElectronicsScrap,
Time:30.0,
OnGiveXP:Recipe.OnGiveXP.DismantleElectronics,
Category:Electrical,
AnimNode:Disassemble,
Prop1:Screwdriver,
Prop2:CDplayer,
}
}
smart phones in 1993 interresting concept also why do you have } to much in your item ?
i'm doing this mod for rp server
count the } { on the first script module SMART { <---- 1 imports { <------2 Base } < ------- 1 item Smartphone { <------2 DisplayCategory = Electronics, Weight = 0.3, Type = Normal, DisplayName = Smart phone, Icon = Smartphone, WorldStaticModel = CordlessPhone, MetalValue = 3, } <------1 } <------0 } <------ -1
see if you remove the last one in this file if it works
also have to eat now
Look just a bit upper
ok how to make it in several colors
so what was you error ?
nothing mod works just fine
now i need to make it in different colors
the phone in different colors ? or
i mean im making 2 more phones that are coloured red and blue
i think you can do it as random ?
its just the texture you going to change rigth ? if so look how schoolbag do it
item Bag_Schoolbag
{
DisplayCategory = Bag,
WeightReduction = 60,
Weight = 1,
Type = Container,
Capacity = 15,
DisplayName = School Bag,
IconsForTexture = Backpack_Black;Backpack_Blue;Backpack_Spiffo, <------ that the place they have the 3 texture for the schoolbag
CanBeEquipped = Back,
OpenSound = OpenBag,
CloseSound = CloseBag,
PutInSound = PutItemInBag,
ClothingItem = Bag_SchoolBag,
BloodLocation = Bag,
RunSpeedModifier = 0.97,
AttachmentReplacement = Bag,
ReplaceInSecondHand = Bag_Schoolbag_LHand holdingbagleft,
ReplaceInPrimaryHand = Bag_Schoolbag_RHand holdingbagright,
WorldStaticModel = SchoolBag_Ground,
}
i saly dont know anymore atm becuase havent work with multiple icon and model texture before.
i mean what i tried to do is
module SMART
{
imports
{
Base
}
item Smartphone
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
item Smartphone1
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
item Smartphone2
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
Icon = Smartphone,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
}
its adding fullness or something to the food product i think it is like you evoling the food product with 15 points
that also a way to do it just make more code to read though all the time.
that that way is the old way ZP also used in the past
ty
dont take it as 100% face value. is only what i think it does. but i think it like only food product there evolve
I don't think i ever said it was impossibe, or did I?
it doesnt work
just do it on your way for the moment the old ways cant really help to see how the other way work. i dont know if @weary matrix know how it work on top of his head
he is way better then me ^^
also does it give you any error ?
no
in works with no texture
i just did like this
module SMART
{
imports
{
Base
}
item Smartphone
{
DisplayCategory = Electronics,
Weight = 0.3,
Type = Normal,
DisplayName = Smart phone,
IconsForTexture =
Smartphone;Smartphone1;Smarphone2,
WorldStaticModel = CordlessPhone,
MetalValue = 3,
}
}
but textures are gone
What is it about?
im trying to make different textures on my item
like white blue red
From script or from code?
from script
i mean i wanted to make like digital watches
i was sending him the school bag how they do the multiple skins as random on the school bag but look like you might need some code in a xml file as well
i said he might be able to do like this one #mod_development message
i might be able to look at a bit when im home
ok
Oh I had no clue
does you script look like this. like on the same line module SMART { imports { Base } item Smartphone { DisplayCategory = Electronics, Weight = 0.3, Type = Normal, DisplayName = Smart phone, IconsForTexture = Smartphone;Smartphone1;Smarphone2, WorldStaticModel = CordlessPhone, MetalValue = 3, } } because i see the thing you copy pase is on another line
no i did both ways
the it might be because the cordlessphone dont have multiple chose somewhere in the files sry that i cant help more atm
@bitter frigate everything work fine so far with you insulin mod ^^
i dont have the modification on my working laptop to be able to look into the code sadly also i think the iconfortexture is fairly new aswell so dont know how many have used them before either
i can send this mod to you
anyone know how to get zombie textures or export them?
They're located in the gamefolder.
ProjectZomboid\media\textures\Body
thanks
the emote radial menu code is a mess
makes me want to recode the whole thing but would probably not be as nice for compatibility with mods not using the api
emote radial menu is that default zp zode?
yes hold q
working on making it mod friendly with my api but debating if its beyond salvation
anybody know how lightblubs work/ where their scripts are
you can always make a hook in over it or rewrite it just need atleast do the same think 100% for mod compatibility
hooking is working against the goal of the api
which is making it mod friendly and more performant
that chain of calling old ui elements and asking the game to render it each time is garbage
and breaks very easily by reloading a lua file in that chain
for example with the vehicle menu which ive done the api for already
i made a framework which doing a hook in and v 2 of the framework or api not sure what to call it anymore ^^
before each mod had to:
-save the previously loaded function
-replace with its own
-call the old
-resetup controller
-do your thing
-ask the game to render
i eliminated all that you simply do your thing and the game only ever does controller and render once
Does anyone know how to make brita's weapon pack guns a bit louder? The game becomes way too easy without drawing all zeds to you after a few shots.
Should be a sandbox option but wrong place you asking and also don't know when the game last update was but if it be for 20 Jan loader sound won't work on multiplayer agains zombies Last time we tried
Oh okay, thanks for answering tho!
New stats like in New skills? Like carpentry metal worker? I'd that the new stats then yes new mood might be able to do it?
I didn't read through the whole thing but IconsForTextures is for clothing items, and your item doesn't seem to be a clothing item linked to a xml file
the icon is picked based on the textures set in the xml file
Okay interesting it's only on cloth item ^^ but nice to know
So there is 3 screwdriver? Because there is different kind of color of that object?
what methods are there for moving zombies around, is it just addsound
actually nevermind, alternatively can you cut an area out of a zombies pathfinding
Anyone know how to change area of the spawn of the vehicles and zombies
everything is still showing up and so are the recipes! i've moved on to trying to make syringes that have more than 1 unit of insulin in them. i posted this earlier, if you have any thoughts!
SO as it is each syringe costs 1 unit of insulin to make, and makes one unit. this is wonderful. HOWEVER. a typical dose of insulin (for me) is about 8 units. i know i can create an 8 unit syringe; do i have to make an individual recipe for every amount i'd want?
another user suggested making the syringes like water bottles - capable of holding up to x amount of units, but i don't know how i'd begin to steal the water bottle logic for insulin instead of water
welp. at least its finally showing up in game now. wonder if the game will allow me to remove/move joints π€ π€
does anyone know where i can find WaterSource-WaterBottleFull in the base game files? i've peeled through lots of folders and files but i can't find it
STEVE MINECRAFT!!!!
You might be able to use them as drainsable and with deltause?
Just like when you eat the pills
is there any way to use more than one part of a drainable at once? it would be SUPER annoying to have to use the syringe 10 times instead of making a 10 unit syringe
Hello, I new to zomboid modding but I know how to code. I wanted to make one mod that triggers a sound when you do damage your car while driving. Any recommendation of tutorials or demo mods to help me learn?
ive only started as of yesterday so im not the most well versed but these have been my holy grail
Thanks I found the event I want to edit
But haven't found how to play a sound yet, any exemple here?
ive been looking at light sources and pathfinding so im not totally sure but my guess would be something to do with the audiomanager
AudioManager.AudioInstance LoadAndPlayAudio(java.lang.String filename) ?
might be an easier way but idk
oh this might be more what you're after
yeh I also saw that, but I have no ideia how to structure the file of the mod. How to organize my mod folder
yeah thats the bit im trying to figure atm
take a look at the stuff on the modding section of the wiki
theres most of the tutorials there
i just downloaded a few mods and have been looking at how they did it because loads of the tutorials seem to be out of date
there are some good guides for basics in the pinned messages here, for anything more advanced its often best to just dig through existing mods and reverse engineer
player:getEmitter():playSound("SoundName")
if you dont have the player object already can just do GetPlayer()
@bitter frigate heres the code for water bottles
item WaterBottleFull
{
DisplayCategory = Water,
IsWaterSource = TRUE,
Weight = 0.8,
CanStoreWater = TRUE,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.1,
DisplayName = Water Bottle,
ReplaceOnDeplete = WaterBottleEmpty,
ReplaceOnUseOn = WaterSource-WaterBottleFull,
Icon = WaterBottle_Full,
StaticModel = WaterBottle,
WorldStaticModel = WaterBottleFull,
CustomEatSound = DrinkingFromBottlePlastic,
}
Hey does anyone know how I can add the occasional the sprinter to Multiplayer without making it the dominant Zombie type
would that be the same as WaterSource-WaterBottleFull? is WaterSource just it's own thing?
Any idea when OnClientCommand is exatly triggered?
dont know ^^ but would you have it autoinjection system on it aswell ?
Got it. Sorry, got the wrong channel.
Isn't there a OnYell hook?
afaik for russian should be Windows-1251
Also feel free to ping/dm me if you need to translate something to russian. At least i could do something for you in return for all your help.
Hello, does anyone know if there is a mod that reduces the damage vehicles receive from hitting zombies? Thanks in advance, please @ me or "reply" if you respond!
pog
lets go fellas!
steveeeee
this is literally gonna become like unturned at this point
does this still work?
someone should make a mod called was just a dream when you die you spawn in the last bed you slept
with loot or no loot or with some loot
or just decide to end it there
"You may not rest now, there are monsters nearby"
play it on the hardest possible difficulty and its just a time loop
12 minutes but you gotta not get mauled to death before you leave
My first time modding this game
Almost broke my headsets when it didn't had a limit to times playing and it was triggering a overlap every step I gave
The music clip is something I had at hand
Thanks for the help @drifting stump and @fleet adder... but it turned out to be a monster
inventoryfemale = {
rolls = 1,
items = {
"SMART.Smartphone", 50,
"SMART.Smartphone1", 50,
"SMART.Smartphone2", 50,
}
},
inventorymale = {
rolls = 1,
items = {
"SMART.Smartphone", 50,
"SMART.Smartphone1", 50,
"SMART.Smartphone2", 50,
}
},
guys how to prevent double or triple spawn of same item with different colour
Looking for modders/someone that is able to make a modpack for a server.
If you can make a quote/give your budget, msg me. 
guys. how to see mod code you need to update it but there are no sources
can mods affect the vehicle_car_modern.txt file under media/scripts?
Friend cant join a server because this file is mismatching, and the server has no mods on it
Yes I managed to find that it was 1251, now that work. Otherwise I used Google translate, to translate head, hand or that kind of thing, it should do it. But thanks !
So even though Ive turned off the mods, its still affecting someones ability to join a server?
If you disable mods they will no longer affect
i cant find any of the games light sources such as lamps in the script files with the rest of the objects, anyone know where i can find them
Is possible make spawn vehicles in a certain area like if i want a military truck in the base in louisville?
How do I edit mods?
you make an hook in or overwrite the method with your own mod?
what im just trying to edit the hore night mode
horde night ?
yuh
by default it only have one setting ?
but yea to make a mod there just overwrite what you want to change i guess ^^ or if it for singleplayer you can just edit the mod file and hope for not the mod to update.
hello do you guys know which files do i need to create a language pack?
yea have done
got it working by copying my .txt document to him and replacing it
The server had no mods on it
you mean like having it inject insulin every so often like the player drinks their water? that's a really interesting proposition! there's a device that can do that now called an insulin pump; the technology was really in its infancy until the late 90s. so it's POSSIBLE i could create a pump in game, but that would involve a whole new set of items (more syringes, needles, cartridges, insets, and linesets) and really manipulating the injury system to include inset sites to really have the depth i'd want
i was wondering, is there any mod out there that lets you read while driving in cruise control? it'd be real nice for those long country drives but i couldn't find anything on steam workshop
oh that's great, thanks!
When playing multi without a dedicated server, does both the server and me share the mod in C:\Users\username\Zomboid\Workshop. Basically if I want to test a mod with another player can I put my mod in there and he does the same thing and were good. Or is it more complex than that.
what's a good example to learn how to make recipes that yield movable items?
Huting mod very good
Is there a way to force spawn magazines full in containers/bags?
would it be technically possible to create a mod that allows you to set a default character before starting the game?
so you don't have to go into the saved characters menu and pick the same one everytime
if so i'll appreciate resources to help me get started creating this mod, i'm able to code decently in js
britas mod pack casue issues with loot respawn in DS?
I hope someone can provide some insight here: I'm creating a mod that edits an already existing item, but upon loading the mod, it creates another instance of the item instead. What's the proper way to modify a base game item?
I don't want to edit newitems.txt as I think that would cause incompatibility issues with other mods, and generally editing the original file is frowned upon in modding communities
i'm having a hard time debugging my code. i can't get a value to print to the console, no matter which key i bind it to. is it because i'm calling for a value that doesn't exist?
NewVariableFunctions = {}
-------------------------------------------------------------------------------------------------
-- debug ----------------------------------------------------------------------------------------
local function OnKeyPressed(KEY_COMMA)
if key == KEY_COMMA then
print(SugarValue)
end
end
-- debug ----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- creates blood sugar???? ----------------------------------------------------------------------
local function OnCreateLivingCharacter(playerOrSurvivor)
local function setSugarValue(120)
end
-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------
NewVariableFunctions.CalculateSugarValue = function(specificPlayer)
local sugarIncrease = 0.5 + SugarValue
if (SugarValue >= 400) then
setBodyDamage(specificPlayer:getBodyDamage() + (0.05))
end
if (SugarValue < 40)
setBodyDamage(specificPlayer:getBodyDamage() + (0.08))
end
end
-------------------------------------------------------------------------------------------------
-- i don't actually know what these do but they seem important ----------------------------------
Events.OnKeyPressed.Add(OnKeyPressed)
Events.OnCreateLivingCharacter.Add(OnCreateLivingCharacter)
try this
local function OnKeyPressed(key)
print("Key Pressed " .. tostring(key))
if key == Keyboard.KEY_COMMA then
print("Comma Pressed")
print(SugarValue)
end
end
oh shoot, also, change OnKeyPressed(KEY_COMMA) to OnKeyPressed(key)!
Is there some documentation on how the game loads files? Maybe I can figure out my issue from that - it seems rather simple but maybe it's more complex than I believe?
i tried! nothing seemed to change, unfortunately
Keyboard.KEY_COMMA
also, that file is probably throwing a syntax error (thus not loading at all)
local function setSugarValue(120) -- 120 is not a proper argument name, change it to a string
end
I'm trying go get maps on my g portal dedicated. I've added the mod name and workshop iD to my g portal page and FTP the maps file from my c drive to the servers media/maps folder....what am I missing.....?
Out of curiosity, would local function setSugarValue(["120"]) work?
lol no, i probably should have phrased that differently
i'm very new to coding so please forgive me, but how would i set the value to a number?
when defining a function arguments need proper variable names
thats defining the function, not calling it. theres a huge difference. you set it to a variable when you define it, and a number when you call it
local SugarValue = 120
should be sufficient
its probably best to go find some basic lua tutorials if your going to dive into coding. you'll save yourself a crapload of headaches
(Don't learn C#, its too wordy)
You're definitely getting there, it's just some of the details are jumbled with that code?
local function setSugarValue(value) -- defining a function
--- do stuff with value
end
setSugarValue(120) -- calling the function
that makes so much sense!!! i was trying to articulate exactly what u just did but i was getting hung up on god knows what.
if the module and item name match, it should replace it
thank u guys i've done some tutorials and looked around a lot before trying to fish around in code
This would probably suffice for your purposes?
local SugarValue = {}
local function setSugarValue(value) -- defining a function
SugarValue = value
end
setSugarValue(120)
I'll give you the example here: \Workshop\votex09.moneyispower\Contents\mods\votex09.moneyispower\media\scripts\moneyispower.txt >
{
item Money
{
DisplayCategory = Junk,
Weight = -0.001,
Type = Normal,
DisplayName = Money,
Icon = Money,
WorldStaticModel = Money,
}
}
This creates another instance of "Money"
module base =/= module Base
^^^
The scripts will be really fussy about formatting. Well, code stuff is in general, but script formatting specifically hangs up a lot of people.
Better way to do it, have this in a lua file in the shared or server lua directories and you don't have to mess around with script files + less concerns about conflicts with any other mods that modify the Base.Money object
local item = ScriptManager.instance:getItem("Base.Money")
if item then
item:DoParam("Weight = -0.001")
end
- won't "fall behind" if/when vanilla changes the item scripts, as has regularly happened with item modifying mods TBH.
ya its a much better way of making simple changes
Oh fuck, thank christ I got an A+ from old man Fenris that time.
lmao
So, just to be clear, theoretically I can do all my modding ideas through lua instead of plugging the existing files.
I mean, with modifying existing items, it's really "best practices" and can avoid all sorts of headaches in the future with changes to vanilla + mod conflicts?
But yeah, aside from a few corner case instances, pretty much all changes to existing script items can be done via the above lua method?
Removing parameters instead of changing them is where it can get fussy, for example? But in 99%+ of cases some lua can handle all the script item modifications IMO?
There's been multiple instances where new properties were added to vanilla items, en masse, and a ton of mods, that used scripts to overwrite items instead of using lua to modify the items, caused all sorts of end user headaches?
Does this edit items that have already spawned in the game or does that limitation carry over from the "old method"
aka, pre edited backpacks for example having the original carry weight
In most cases it should modify items that already exist, but there's a few parameters that are "persistent" with items, so it's case-by-case?
Ah, yeah, containers specificly, I don't think they change to the new weight
No problemo! Good luck π
local function OnCreateLivingCharacter(playerOrSurvivor)
local function setSugarValue(120)
end
Your OnCreateLivingCharacter is lacking an end.
woof. thank u so much for pointing that out
What are these sugarIncrease and NewVariableFunctionsSugarValue meant to be? It's hard for me to guess what the code is meant to do to say what's wrong :d
@willow estuary Well I did some lua, and my server didn't start. Figured I did something wrong so I copied your code snippet and maybe there's something incorrect here.
Throws a WorldDictionaryException
I about to install a mod that removed VHS from the loot table. Later when the exploit is fixed, if i removed this mod will VHS begin to spawn in with the loot respawner?
Oh, servers do not like items being removed, so removing "base.Money" caused that WordDictionary exception. Make a dummy item in a script with that module + name.
QUESTION: is is possible to modify the max number of people a vehicle can hold?
Oh, thats unfortunate.
NewVariableFunction is uuuuuuh meant to hold the functionality of the blood sugar increase code? sugarIncrease is meant to take sugarvalue and add 0.5 to it every time it updates. so. it sould probably be sugarvalue instead since i'm not actually calling the function later. at least not yet. the idea is to eventually have sugarvalue interact with carbohydrates. i think i got in my own way with some Assumptions(tm) that i can't articulate now
This is notepad++ with the Lua syntax highlighter plugin.
Oh nvm my qurestion about NewVariableFunctionsSugarValue, I somehow made a mistake after copying your code into notepad++ and had
local sugarIncrease = 0.5 + NewVariableFunctionsSugarValue
instead of
local sugarIncrease = 0.5 + SugarValue
Your functions can be defined like this
local function OnCreateLivingCharacter(playerOrSurvivor)
or like this
local function someFunction(playerOrSurvivor)
The name does not have to match anything like OnCreateLivingCharacter. The exact spelling of OnCreateLivingCharacter is just important when you do
Events.OnCreateLivingCharacter.Add(someFunction)
OH!!!! oh my gosh okay thank you that's all so helpful
:o
(Farewell)
i wonder if a no pixel like server would be fun.
@willow estuary Cannot override existing registry id, item: Base.Money
Disabling the mod nets the same thing obviously. Added back in base.Money still same thing
I hope i didn't brick my server somehow...
Hi, anyone knows how to call the SafeHouse Class? I don't see any function to get a reference of that class
https://zomboid-javadoc.com/41.65/zombie/iso/areas/SafeHouse.html
Javadoc Project Zomboid Modding API declaration: package: zombie.iso.areas, class: SafeHouse
I about to install a mod that removed VHS from the loot table. Later when the exploit is fixed, if i removed this mod will VHS begin to spawn in with the loot respawner?
How to query all items with specific Type and SubCategory? Probably all guns.
why remove the VHS they are so cool π
Probably a good opportunity for someone to make a mod that removes the skill gains from VHS tapes mechanic altogether, if it's feasible?
@craggy furnace make a friggin weekly update schedule day for you extended heli events. every night sucks. read your steam comments. ppl are getting tired of it.
getSafeHouse(square) will return a safehouse object
would it be technically possible to create a mod that allows you to set a default character before starting the game?
i just need to know its possible so that i can start working on it
is there a animation on PZ to hold a pistol with 1 hand? i just cant remember, the last time i play was so long ago lol
Yes there is
@drifting ore you know how to make custom clothing items spawn within a certain zombie type?
i could use some help
I don't know that yet, @late hound is the main man for that
do you know what firearm can be equip with just 1 hand?
look at authenticZ codding kila, he did that
look his lua files you will find what u need there, there is also a file called clothing somewhere there, it have a list of each outfit on each zombie
look the file clothing.xml (on clothing folder), i think thats the one u want
i mean u need the ones in lua folders to make them spawn too, but that file gives you the zombie outfits sets
What encoding do I need to use for chinese, japanese or korean .txt ?
Generally yes. But you also ask your question at the time when there are fewer people. What do you mean by default character? Because mods already do it for me
mods already do what
i mean being able to pick one template character
@drifting ore so instead of having to click New > pick your saved character from the drop down > Start
you just click New > the character you had previously selected will be selected for all games til you change it > all you have to do is press start
after choosing the location
basically all im saying is it would autofill the saved character dropdown to the last one you used
super small QoL
So you just want to dodge choosing something from a drop-down menu one time ?
No it doesn't exist but it's quite easily doable I think. But no idea how
Hello, what articles / videos are worth reading in order to understand the pz modding bases, I myself did not find anything useful (sorry if itβs off topic of the channel)
Check pinned message
Would be insanely OP for megabase construction/looting, as a brick has 1000 units π
Thanks
nah, fuck off
^ Attitude of the kinda developer that if they were good enough to work at a game studio.... Would be pumping out more shit survival games like all the rest. 0 fucks given. Good response to the community that enjoys your mod and is getting frustrated with your inability to schedule your way outta a paper bag.
i am reading a whole lot of entitlement
we are going to continue updating to fix bugs and you are going to continue to vent rage
Says the guy who responded with "fuck off" to the truth.
alright guy i just had my coffee so let me just spill this
you either get to receive updates (for free) or dont
i understand you may have grievances to getting disruptions and that must be pretty difficult that is not up to my control and neither will it stop us from continuing
if you cannot abide then i am sorry youll just need to remove it from MP
i do apologize for telling you to fuck off
More piss poor attitude man. And you're not sorry for saying fuck off. So don't try to placate now. It's not difficult to create a update schedule. You just don't want to. Love the mod. But i don't support ppl who treat others opinions like garbage. So gl to yall.
well okay happy trails
But it's their decision on how they want to update their mod.
If they really didn't give a fuck, their mod would have never received any updates and would've just been left to be broken by a future build update or something
the sheer entitlement goddamn
He posted on steam with snippets of himself excluded - so, just a troll.
A lighter topic, someone made an asset review of the weird heli events: https://www.youtube.com/watch?v=PMBIgcp7hvw&list=LL&t=54s
.... i had a bug for i dont know how long and couldnt find out why i have this bug at all until i found out the lua the game use dont have string.format xD wish i got an error for it instead of they game says nothing ^^
is there a way to see which version of lua zomboid using ?
What is the type for float in sandbox options? is it float or double or something completely different?
have you tried print(_VERSION)?
is there a way to implement scrolling based on simply content height rather than going through the ISScrollingListBox addItem/doDrawItem nonsense?
no lol ^^ might try in some wierd call
is there a mod which allows zombies to tear down non player made walls ?
Is there any way to force the player to equip an item if they are sitting in a specific seat of a vehicle?
Ive seen vehicles where when you aim out a window you enter the standing still and aiming animation (standing up and turning around)
If there is any way to add an item to the player and force them equip it then that could be a way to make an armored vehicle turret that can turn and shoot. Similar to the train in Fallout NV that is actually a hat that a NPC wears as they run along the track.
love that helmet hope it do so zombie cant hit you ^^
also have been thinking about the same sydWad
*3
not NV
Is that so?
You either add them to existing outfits or create new outfits, adding a clothing.xml to your mod
if you add new outfits then you need to give them spawn chances
soul iam not a programmer XD
clothing .xml is all i understand
Any recommendations for traits and jobs mods? It feels like almost all of them have something broken in them..
Then check those for a mod that adds outfits, you will see they work with items' GUID numbers
okay
(player:getBodyDamage():getBodyPart(BodyPartType.Torso_Upper) any way to get this to get the full body
instead of just one part
Is there a way to detect player traits? for example:
if player:HasTrait("Lucky") then```
What wrong with player:HasTrait("lucky") ?
Well, that exist
Neat I guess! lol
Is there a way to check if my item distribution works ? Faster then exploring the map π
is it possible to have a recipe that requires more than one tool?
guess it would require making the recipe with Lua
local random = 0;
local function OnVehicleDamageTexture(player)
random = math.random(1,5)```
function: OnVehicleDamageTexture -- file: BreakingTheCar.lua line # 5
ERROR: General , 1643731396852> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in OnVehicleDamageTexture at KahluaUtil.fail line:82.
line 5 is random = math.random(1,5)
Why is it calling nil?
cause there is no such thing as random numbers.
math.random doesnt exist in pz's kahlua. use ZombRand() instead
I tought math was default in Lua
ZombRand(min, max)
pz's lua isnt pure lua, its kahlua. a lua interpreter written in java. not all functions & modules work
theres no math.random, math.randomseed, os.* and io.* modules
where do I find this function ZombRand?
java function exposed to lua
I was checking here https://projectzomboid.com/modding/overview-summary.html
And didnt found
zombie\Lua\LuaManager.class
Javadoc Project Zomboid Modding API declaration: package: zombie.Lua, class: LuaManager, class: GlobalObject
use the docs Browser8 linked to...the projectzomboid.com/modding ones are extremely out of date
alternatively decompile LuaManager$GlobalObject.class
Still need to figure how to navigate this javadoc still hard to find functions
I know Override:true can work for writing over vanilla recipes... does it work for modded recipes?
too hard to type something in the search field? π€
or is there a better way to over write recipes from other mods with a separate mod? Really trying not to have to reupload Hydrocraft
Is there a documented way of creating player speech bubbles and displaying them?
for everyone to see or only the player?
random = ZombRand(1,5); this will not include 5
Only the player
player:Say("text")
that would attract zombies though
I... didnt even think of that lol
but its used by the game to notify things
Not just too dumb to figure there is one π
oh good then π
No noise is perfect - looting wallets with notifications. Dont need the player to scream "I FOUND 100 DOLLARS GUYS"
youd expect these to not make any noise since theyre just notifications
unless I'm mistaken those are really meant to attract zombies
decompiling the code to check
it does not
private void ProcessSay(String filterString, final float n, final float n2, final float n3, final float n4, final String s) {
if (!this.AllowConversation) {
return;
}
if (TutorialManager.instance.ProfanityFilter) {
filterString = ProfanityFilter.getInstance().filterString(filterString);
}
if (s.equals("default")) {
ChatManager.getInstance().showInfoMessage(((IsoPlayer)this).getUsername(), filterString);
this.lastSpokenLine = filterString;
}
else if (s.equals("whisper")) {
this.lastSpokenLine = filterString;
}
else if (s.equals("shout")) {
ChatManager.getInstance().sendMessageToChat(((IsoPlayer)this).getUsername(), ChatType.shout, filterString);
this.lastSpokenLine = filterString;
}
else if (s.equals("radio")) {
this.chatElement.addChatLine(filterString, n, n2, n3, UIFont.Medium, n4, s, true, true, true, false, false, true);
if (ZomboidRadio.isStaticSound(filterString)) {
ChatManager.getInstance().showStaticRadioSound(filterString);
}
else {
ChatManager.getInstance().showRadioMessage(filterString);
}
}
}
and when you use :Say
public void Say(final String s) {
if (this.isZombie()) {
return;
}
this.ProcessSay(s, this.SpeakColour.r, this.SpeakColour.g, this.SpeakColour.b, 30.0f, "default");
}
ah interesting
I always believed when pressing Q it was simply calling IsoPlayer.Say(), but obviously it's doing something else
player:Say(random) how do I do being random a var?
?
if I want to say whats inside a variable a not a direct string
does it not convert to string automatically? never tried
tostring(variable)?
in the mod.info what should I add to the id and url section?
Assuming I want to add my mod to the steam workshop
Can you show code line 47 and 70?
trying to make
a cropped ver of the hoodie
but it does that when i wear it with the hoodie up
some does the same but when i wear the hoodie down
but when i change the hoodie while equipped it doesn't happen
in line 69 do you need the InventoryItemFactory.?
CreateItem already returns a InventoryItem
its there buy default
I wonder if recipes can have a null result... I want to handle all output with lua since I want the output to vary.
not really, but also yes. it needs a result, but you can add RemoveResultItem:true,
Is there a mod that improves inertia?
Driving a truck and getting slowed to a full stop after hitting 3 zombies in a row gets on my nerves
Oh, so add a dummy item then remove it immediately. Any repercussions to doing this?
not really, its done with a number of vanilla recipes. stuff like ripping clothes etc
recipe Rip Clothing
{
[Recipe.GetItemTypes.RipClothing_Cotton],
Result:RippedSheets,
RemoveResultItem:true,
Sound:ClothesRipping,
Time:100.0,
AnimNode:RipSheets,
OnCreate:Recipe.OnCreate.RipClothing,
}
removes the result, and adds items via lua
I haven't seen a mod like that, but rather than changing something obscure like inertia, I believe the impact of zombies slowing down cars is moddable.
I would hope so
It kind of bothers me that I can drive an 8 ton vehicle but hitting three zombies in a row brings me from 60 MPH to like 5
Me too actually, maybe I'll make this mod for you as my next project
I have to learn how to add user configs though
Might have some detrimental effect to your engine health though... I believe that speed matters on contact for damage
any clue how to know if a timed action was interrupted?
I want to run code only when the action is entirely finished, but not when it was interrupted
That makes sense. If I do donuts in place, which I regularly do with a disposable vehicle to clear out hordes, it takes a lot less damage than if I hit the same amount of zombies going full speed
oh man it feels TERRIFIC when your code starts to work!!! 2/3 of what i've been trying to do is working! that said, the final third is borked. i'm copy/pasting it here. help would very much be appreciated
-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------
function Diabetes.CalculateSugarValue(specificPlayer)
SugarValue = 0.5 + SugarValue
if (SugarValue >= 400) then
setBodyDamage(specificPlayer:getBodyDamage() + (0.05))
end
if (SugarValue < 40)
setBodyDamage(specificPlayer:getBodyDamage() + (0.08))
end
end
Events.EveryTenMinutes.Add(Diabetes.CalculateSugarValue)
Evening all, I was wondering, is there a way to have conditional LootDistribution and Recipes txt files depending on game options, other mods being installed or even game mod chosen?
recipes can be done in Lua IIRC, so I think yes, and loot distribution is only done in Lua AFAIK, so just check your options before calling your code and you're set I guess?
you forgot to mention what was the issue π
SugarValue not set?
also why do you need the parenthesis around the value for the damage you add?
it just isn't working :( it's borking the whole code up. i've tried running the code in discreet parts. lemme get the whole code one sec - because parts 1 & 2 are working and work together, but when part 3 gets thrown in EVERYTHING stops working
that would definitely be part of the problem then wjkehroiwereworh
remove the parameter and replace your specificPlayer with getPlayer()
also not sure how is declared your SugarValue but it's not initialized anywhere I can see
I would just do something like this:
Diabetes.SugarValue = 0 after declaring your Diabetes namespace, and use that value everywhere
alright so i tried replacing the specificPlayer with getPlayer() - do i need to do it everywhere or just when the function is being defined?
Diabetes = {}
-------------------------------------------------------------------------------------------------
-- debug ----------------------------------------------------------------------------------------
function Diabetes.PRESSED(key)
print("Key Pressed " .. tostring(key))
if key == Keyboard.KEY_COMMA then
print("Comma Pressed")
print(SugarValue)
end
end
Events.OnKeyPressed.Add(Diabetes.PRESSED)
-- debug ----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- creates blood sugar --------------------------------------------------------------------------
function Diabetes.EXIST(playerOrSurvivor)
print("Yee the fuck haw.", PlayerOrsurvivor)
end
Events.OnCreateLivingCharacter.Add(Diabetes.EXIST)
function Diabetes.setSugarValue(value)
SugarValue = 120
end
Events.OnCreateLivingCharacter.Add(Diabetes.setSugarValue)
-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------
function Diabetes.CalculateSugarValue(getPlayer())
SugarValue = 0.5 + SugarValue
if (SugarValue >= 400) then
setBodyDamage(getPlayer():getBodyDamage() + (0.05))
end
if (SugarValue < 40)
setBodyDamage(getPlayer():getBodyDamage() + (0.08))
end
end
Events.EveryTenMinutes.Add(Diabetes.CalculateSugarValue)```
@bitter frigate try to read again what I said π
reading comprehension is not my strong suit, so i'm afraid i don't understand. could you rephrase it maybe?
Remove the parameter from Diabetes.CalculateSugarValue and replace the other reference to specificPlayer with getPlayer()
like that?
You should learn about Lua it seems
also the replacing is incomplete
and you should also try to read what I said earlier, cause that global SugarValue will probably not work as is
yeah i'm very new. i've read the beginning of the lua handbook and looked at a bunch of tutorials but it seems like there's a big gap between theoretical understanding and understanding in practice
this might be helpful https://pzwiki.net/wiki/Modding:Lua_Events
i was just doing it to help me visualize what i was doing. i figured the parentheses wouldn't matter because i THOUGHT the function would be the same if it came from completely within them as if they weren't there at all
the problem is i don't ever want it to BE 0 - which is why i define it as 120 when a new character is created. it prints 120 in the console when it's run with the first part of the code, which is exactly what i wanted. but i want it to be able to change. *i'm HOPING it'll change like this, but if it doesn't i'll definitely look into your suggestion
thank you very much for your patience and help. i truly appreciate it!!
YEAH THAT'S MY THINKING EXACTLY!!! i'm so excited to play myself and die within the first week when i cant find any insulin
jsjsjksjksk pov: the pharmacy is full of toilet paper and you're out of insulin
final i think im done with my v2 of my farming framework lol even i dont think im going it my self ^^
going to be fun for trying to make a readme on git
also please take some take to make/find a better poster π
I would try the :perform bit?
like this right xD
have you used the
function foo:stop()
ISBaseTimedAction.stop(self)
end
on your timed actions?
I need a mod that will add something like zone from PUBG
It will go from sides of the map, and centre of the circle would be random each time
Is it hard to make something like this?
that's what I do already but it doesn't tell you if it was interrupted or not
:d
I'm new to modding and have an idea of something I'd wanna implement but not sure how to do it, how easy is it to code custom zombie behavior?
There must be something the game uses to tell if it has finished though...
Not yet, but I was thinking about it, was just not sure if it was the proper way to do it
Well let me put it like this there's this mod making a change to zombies https://steamcommunity.com/sharedfiles/filedetails/?id=2013479771 and it's pretty fancy coding .-.
i can see the mod i made like 1 year ago on a timeaction based time i added that one i think it fixed the problem when i moved the char
i think its an auto get called when you move
Well no π
What does foo mean though?
it's a generic word to talk about programming
:|
^^
foo/bar are just dummy variable names when you're not talking about a specific software implementation
often for pseudo code etc
The code would also work if you did this:
Diabetes = {}
--some code
function Diabetes.setSugarValue()
Diabetes.SugarValue = 120
end
--Maybe somewhere actually calling Diabetes.setSugarValue too.
This will not work in multiplayer though because you are using a single SugarValue for everyone. You could instead store SugarValue in the player's modData like this
function Diabetes.EXIST(playerOrSurvivor)
playerOrSurvivor:getModData().Diabetes = {SugarValue = 120}
end
Events.OnCreateLivingCharacter.Add(Diabetes.EXIST)
And then later like this
local ModData = player:getModData().Diabetes
modData.SugarValue = 0.5 + modData.SugarValue
the scripts will be executed on each client, so it would definitely work IMHO
only problem is if you need to access the SugarValue of another player
Oh yeah if it's using getPlayer() then it may be fine.
think he would be able to hook it in as medical check action would also be easier for people to hit that tab ^^
ah in that case yeah that won't work as is
Does someone know if ByteBuffer can be used in kahlua? When I try Texture:getData() which returns ByteBuffer the game crashes so maybe not.
ByteBuffer is not exposed to Lua
T_T
why would you want a byte
Meant to ask this, do buildings also have moddata?
I wanted to get the texture data and set it to procedurally generate a lot of icons. This was for a mod idea that I later found out would not work because weapons don't show their attachments on the ground. :/
I do not know. If you know what java object it is, you could check on https://zomboid-javadoc.com/41.65/
Javadoc Project Zomboid Modding API package index
you could do that as replace the texture of the model with a model with attachments ?
but a bit more complicated i guess
At first I thought you meant having unused bits of the model invisible from alpha on the texture and having one texture for each model variation but now I think I do not know what you mean.
If there are 5 attachment slots and 5 possible attachments for each then that's a lot of combination of attachments. Maybe it's something like 5^5.
Can the "Override:true," tag for recipes work on modded recipes? if not, is there a way to do something similar to other mod's recipes without outright editing and reuploading them?
Do I have to edit items/newitems.txt as Base or can I insert an item by importing Base? When I do the latter it "works" but shows the module name in front of the item's name.
nm, just meme'd my way into figuring it out. You can just name a script the same as the one you wanna edit, have it in the same location, put it in a new mod, have it load after the mod you wanna edit, and it just works.
hmmm. does anyone know what happened to that modder Zeno?
all of his mods are off the workshop today
i know that feeling xD
hm, this link leads me to 404 page.
oh right, it's just that I don't have a Translate folder yet π
will be created automatically as soon as I add it, then the link will become valid
thanks for noticing π
fixed
Are there any mods that turn lightbulb fuel consumption to 0?
adding that option to the audio menu was something else
i tried this and the SugarValue started returning nil, unfortunately.
Whelp, first mod feature complete. Simple and sweet. Thank you all for the help - especially @willow estuary who helped with the initial stages of confusion.
https://steamcommunity.com/sharedfiles/filedetails/?id=2738690129
Although, that thumbnail .... I'm sorry
why are you sorry it's perfect
Yeah, its pretty good isn't it haha
Which did you try though? The ModData one or the Lua variable one?
Oh wow so simple as that? Great I'll try this out then, I have not manipulated lua in distribution files much so I had no Idea you could do more than just table insert there!
it's just Lua really π
someone should make a working tazer and handcuffs
Handcuffs would be great, yeah.
I think lassoing a zombie and putting a sack over it and having it pull your trailer would be good.
Great great great, and while we are here I know you are one of great knoledge, have you ever created a "if" condition on another mod being loaded?
Could be:
if getActivatedMods():contains("Mod name") then
-- your code
end
But i'm not sure.
the first time i tried them i tried them both, because my reading comprehension has not improved in the last 5 hours. i tried the lua variable and it's returning nil. i also tried just the first part of the ModData version and it's ALSO returning nil. i cannot get the third part of my code to work at all, so i don't know if it's because i'm misformatting the code you offered or because it's not working in the first place
looks good
gib code plz
i'm fairly sure this is pretty badly bungled but it's what i have now. i have it backed up to when it was printing 120 for blood sugar if you'd like that
Diabetes = {}
-------------------------------------------------------------------------------------------------
-- debug ----------------------------------------------------------------------------------------
function Diabetes.PRESSED(key)
print("Key Pressed " .. tostring(key))
if key == Keyboard.KEY_COMMA then
print("Comma Pressed")
print(SugarValue)
end
end
Events.OnKeyPressed.Add(Diabetes.PRESSED)
-- debug ----------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
-- creates blood sugar --------------------------------------------------------------------------
function Diabetes.EXIST(playerOrSurvivor)
playerOrSurvivor:getModData().Diabetes = {SugarValue = 120}
end
Events.OnCreateLivingCharacter.Add(Diabetes.EXIST)
-------------------------------------------------------------------------------------------------
-- raises blood sugar --------------------------------------------------------------------------
local ModData = player:getModData().Diabetes
modData.SugarValue = 0.5 + modData.SugarValue
if (SugarValue >= 400) then
setBodyDamage(getPlayer():getBodyDamage() + (0.05))
end
if (SugarValue < 40)
setBodyDamage(getPlayer():getBodyDamage() + (0.08))
end
end
Events.EveryTenMinutes.Add(Diabetes.CalculateSugarValue)```
forgot to reply to you orz
You deleted the start of the last function?
Also you can reload Lua with restarting the game, in case you did not know.
Thanks for the lead!
What software are you writing the code in?
If you are putting SugarValue in mod data then your Diabetes.PRESSED function is going to need to be different.
getPlayer():getModData().Diabetes.SugarValue
i'm writing it in notepad right now. i have notepad++ but it was overwhelming when i was first starting with creating items. i know notepad++ would help me see syntax i'm just scared of it
:/
If you overcome your fear grasshopper then you will have convenience overcoming the price.
next mod @undone crag doing is bloodpacks and hemoglobin count π
i think it will be so close to each other that you could see if the player needed more blood for healing or if it just wounds his heath is base on


