#mod_development
1 messages Β· Page 532 of 1
nop
does the game have female horse urine?

sorry, pregnant mare urine to be exact
LMAO
maybe you can add a distribution table so that zombies drop that drug.
I'd probably make that rare, in the "extensive list of hopes and dreams" the idea is that you grow soy to slowly start building up something called pellets
so you start the game mainly being sustained by looting and stocking up syringe shots and tablets and slowly shift to pellets
but the first update of the mod is probably NOT going to have all that soy fancy stuff
I'll obviously have to shift power when I do add that in, but right now my concern is mostly on how much should this trait give
maybe you can make a new skill set like chemistry to make a drug.
if you level chemistry you can make certain drugs.
blind gives +18 but it doesnt outright try to kill you, schizophrenia is a +7 but a lot less problematic in multiplayer, cause no sleep, and opioid addiction is a +10 but its a much harsher system than the one I'm going for
when looking over at the vanilla traits, deaf gives +12 and smoker, which would be considered similar to this trait, gives +4
maybe 16 trait points
I was thinking of +16 but considering some mechanics it could be considered unbalanced
main one being syringe, a syringe shot lets you live for (realistically) a month, in the game i'm trying to balance to be a week or 2
but thats still huge
is you set the drugs to rare but not extremely rare 18 traits points is right choice.
a single shot makes you not worry about this trait's drawbacks for 14 days? thats big for a +16
if that's the case you should make it 10 traits point
yes since you have time to loot it.
make syringes rare and can be found in hospital. but very rare in medical house and pharmacies
its been hard to design this with all that needs to be kept in mind, specially a multiplayer environment
cause the more people with this trait means scarcity can be a much tougher punishment
I've been trying to balance with loot respawn turned off in mind
hospitals is challenging since there's more zombies, high risk high reward
true
make the pills 1 day maintenance.
that was already the point, but I really wanted to go for realism and accuracy
realistically, you can go up to like, days or even weeks depending on the individual without facing chemical imbalance from lack of hormones
loot respawn is on in multiplayer so make the item rare make sense.
the body needs hormones but it takes its sweet time before it starts requiring it or becoming detrimental to health
it wouldnt match its counterpart
realistically any person above age of 50 might require hormonal supply
u know, menopause and all that
but age doesn;t exist in zomboid
so if every human being needs it, its actually quite a common thing to have in pharmacies, clinics, just about anywhere
I'm talking more about context as to how rare should this resource be
and irl its quite common actually
injections arent common, but tablets are
in 21st century but the game settings is 1990s so these item are rare to find
So just to be clear, there is no way to add a new player sprite that looks like a farm animal, stick it on an NPC, and make an animal mod? That seems like it should be straight forward. Why is that not possible with the current modding tools?
it was common in 1993
its been a common treatment for menopause and other hormonal problems for a good while now
I'll probably stick to +10 and evaluate how detrimental the perk really is
through playtesting
I've been mostly sticking to smoker logic, and smoker shows up quite often, its not quite detrimental but it is something you have to constantly manage
Pregnant mare urine? Menopause treatment? You're trying to add estrogen hormone replacement to the game so you can create transgender characters

Called it
Why would you die without them? You would just detransition
its a lil' more complicated than that
should only have like a 40% chance of that
but with the context I'm going with, this trait has the context of post-operation trans, already long into the transition
haha funny suicide joke, so funny..
cant say I didnt expect this but I'm still disappointed
If you can't laugh, you can't live.
you made a transphobic joke lad, there's nothing funny about it, its in fact 1 of the only 4 jokes that transphobes can come up with, its like the "i hate my wife" jokes
anyways, in that context the body does not supply with hormones naturally anymore, and thus a supply is required
which is actually not different from women in menopause
if it helps understanding
Well, you're fun at parties. I'll just go talk to someone else.
thanks for not contributing anything to the modding feedback
My feedback is that mods that go into too much detail of every aspect of reality aren't fun. You should stick to the slogan of keep it simple.
is loot respawn on by default on server creation?
or is based on difficulty?
been playing for too long on custom settings
Is it possible to stick a sprite that looks like a farm animal on an NPC from something like the Superb Survivors mod, and make an animal mod out of it? That seems like it should be straight forward.
How do I check how many pages a skill book has?
oh wait there's getNumberOfPages() smh
Iβm looking for the file that determines getting ill from being near a dead body, but canβt seem to find it. Any ideas?
Quick question, does anyone remember Golf Carts ever being in apocalypse machines 2?
Its because I remember finding golf carts in my saves, but now the only traces of them I have are from its mod files, but the textures are missing as is the script, so I am not sure if I am remembering the AM2 golf carts or another golf cart
I don't get it. The original IsReadABook.lua has 3 things going on:
- You're too stupid to read it
- You're too smart to read it
- It's right up your alley
Exhiliratingly Organized Skill Book mod hooks to the first and uses setAlreadyReadPage command to read the first page. As far as I understand it, they simply copy the exact same code, but changes the integer at the end from 0 to 1. At the end of it, they specify that for scenarios 2 and 3 refer back to the original script
I added an elseif to it that basically hooks to scenario 2, and uses the exact same setAlreadyReadPage code , only replacing the integer at the end with self.item:getNumberOfPages() but it doesn't work. Somehow the game sets the read page back to 0 so the reading process never progresses
The idea is to skip reading the book entirely if it's obsolete, but I can't seem to get it to work
I tried:
- supplying the getter directly as the second argument
self.character:setAlreadyReadPages(self.item:getFullType(), self.item:getNumberOfPages()) - Using a local variable to store the number of pages, then supplying that variable as second argument
- Using the vanilla code that skips reading if you've already read it before
It simply doesn't work and I'm really frustrated. The console says nothing
Thank you so much
try: self.character:setAlreadyReadPages(self.item:getFullType(), self.item:getNumberOfPages()-1)
No, I'm an idiot, that's not it. The original scenario 2 code has if pageTimer >= 200, I don't know what the pageTimer is, but the pageTimer seems to be under 200. Since I need the action to be instant anyway, I removed it and go directly to pageTimer = 0, it works now
Kinda weird in that if my code fails then the original code should also fail considering they're identical copies but 
Specifically, the values that determine the range from the body, and the rate at which it ticks on the player. The closest thing I seem to be able to find is in the forageSystem.lua, local sickLevel = _character:getStats():getSickness();
Am I in the wrong line of thinking, maybe? That there is no value for how close to the body/how fast the value ticks up or down on the player?
Yes, I'm a novice.
We need a mod for planting grass. I want to have a super nice roof garden
Guys I have a question about which I would like to know your opinions/ideas...
Have you ever take a look at the weights system in PZ? Taking in mind that, for example, 1.0 corresponds to 1 kg, I can't understand why an item equipped becomes lighter of the same one unequipped.
I make an example ( Always considering 1.0 corrisponding to 1kg of weight ):
My fingerless gloves equipped weights 0.06 ( or rather 6 decagrams --> 60 grams ), unequipped they weights 0.2 ( or rather 2 hectograms --> 200 grams )
Wow, 140 grams of difference in weight???
I know that their " weight system " use the weight also as a sort of " volume measure " ( Thing that I consider an error IMHO ) but...
Do you think is there a way to fix this or do you know if there is an editable file that controls the weight behavior in game?
did they ever specify that 1 weight = 1 kg? I've always taken their weight units to represent encumbrance rather than a literal weight.. like a bed frame doesnt normally weigh like 40kg or whatever, but i can believe it being super cumbersome to carry/move regardless of the weight. Any object that is cumbersome is going to "weigh" more in PZ terms
anyway for my items ive based weight around that concept rather than being a literal weight
I think the volume/encumbrance is kinda rolled into the same number
also in that sense, something "weighs" less because if toure holding it directly, its easier to carry than say.. trying to stick a bedframe in my backpack
@crimson spindle I've used the 1kg reference just to have a starting reference parameter ( That somehow seems to correspond pretty well to what a person can carry IRL without getting overtired when making some kindof activities
But if everything was realistic weight some things wouldn't make sense at all, take the barbell for example, the bar alone is ~20kg not to mention with 2 plates on it. But no character would be able to even pick it up otherwise
@weary crypt Exactly...and IMHo this has not a lot of sense...
thats why it makes more sense ot me that it represents how easy something is to carry rather than an actual weight/volume... if you really wanted to separate out weight/volume then they would have to switch to a system shock style inventory system, which admittedly woudl be pretty cool lol
The unfortunate answer in my opinion is to either completely recreate the system as Rokem suggests, or redo the weight of every single item to bring them in line. But at a certain point you have to ask if it's really worth it
@crimson spindle Agreed. I just wanted to test the ground a bit before embarking on a similar project ... who knows if it's feasible ... mmm ...
@weary crypt Yes sure it's not a matter of life and dead but if feasible....why not....
i think the best thing you can do right now as a modder is just look at the weights of the vanilla items, and look at what you are trying to add, and try to match it to something similar
again, i use the weights more as a concept of how portable something is. For example in my mod, my microscope weights 15.. if that kg, thats an insane weight, but i justify it in my mind because a microscope is that is somewhat fragile and not designed to be carried around in a backpack all teh time, so its not very portable
@crimson spindle ...and that's exactly the problem because matching the weight is pretty easy to be done with some maths, the problem comes when you equip it ( as said becomes lighter ) so to match the real weight I have to increase the unequipped weight and this brings the problem that doing so you'll end up with a very limited inventory weight capacity
What I was guessing was if there is a file to edit to increase the max weight a character can carry...
( Maybe not ideal but surely the easiest fix )
I asked a while back about changing the amount weight is reduced when something is equipped and I was told effectively that it's hard coded but still possible with some wizardry that's beyond my level.
there probably is.. tho i dont think it would be max weight a character can carry, but a variable in a formula, since the max carry weight is determined by strength
so its str x carryCap and you want to change that carryCap
something liek that im guessing
@weary crypt You have to use JAVA for that. There's a JAVA unpacker around ( ...but in theory if hardcoded you should be not permitted to edit the code.... )
@weary crypt Thanks mate I'll take a look at it...At least maybe is a starting point...
np, like I said it's beyond my level so I left it there.
@weary crypt Got a quick check at it but it plays only with the weight reduction bonus ( basically it increases it reducing the weight of the item )
does any know if the body parts that are given insulation and and protection can be modified or are they locked to the clothing slot. Ive got a clothing that go into the gloves slot, but I would like them to give protection to also the lower arms because they are very long leather gloves that cover the lower arm. Is it possible to still have them in the gloves slot, but let them give protection and insulation to other body parts?
Maybe it could be achieved doing so ( Just brainstorming a bit ) Current weight --> Weight reduction bonus --> Script that activate an arbitrary weight value when the weight reduction bonus is apllied ( Dedicated parameters for each item of interest )...
now its accurate
Is there anyway to make and mod a backpack to spawn with certain items already in it?
@main surge Sure mate. Take a look in the workshop there are many mods doing exactly that from which you can take inspiration if you want to make your own one
I havent found any that have items already in them though
maybe More Traits has some of that?
some of the traits make you start with inventory
maybe one of them has a backpack with stuff inside
Hello, I want to add a better workshop description to my mod, but I don't know how I can put images and change the text style.
Hello all, I have recently modeled something, I wrote a script for it, made a distribution, but when I wear the item in game its invisible. Can anyone help?
@azure rivet you can edit the description and add more imaged directly in steam after it has been uploaded
Don't see images on there but [img]https://YOURIMAGEURL.png[/img] should work
@main surge Check this one: https://steamcommunity.com/sharedfiles/filedetails/?id=2708115455
( It adds the inmate coverall and a key for example )
Thanks, that's just what I was looking for.
π
Does the server send both steam and local mods to the client?
When iterating over the containers provided by getPlayerLoot(playerNum), is there a good way to get the square/cell of those containers?
For example, when I search the fridge with the "Search Nearby" option as shown in my gif, what is the correct way to get its location?
I attempted accessing .parent as well as calling getParent(), and both avenues seem to result in "attempted index: getSquare of non-table null"
The server only sends the client to steam to download mods from steam.
Where "localInventory" is each of the members of inventory.inventoryPane.inventoryPage.backpacks, the debug/crash window even seems to show that .parent is populated:
@lusty nebula that helps a lot! Now i just have to figure out how to connect it to my action.
Trying to cause the item to enter players inventory when they perform a certain action as oppsed to when they spawn
thanks this worked out, now expanding the function to support many items with the same type but different names!
Is there a way to add more types for item?
I need someone to update NecroForge to make it work in 41.66 :( dev abandoned the project
There are other cheat mods
That allow cloning tiles?
is there an alternative mod for fashion montage?
afaik in sand box settings check the box that unlocks all clothing
@drifting ore you know this one?
Never did something like that but I guess it's container:getParent():getSquare() otherwise no idea
If that don't work, check the type of the container
I swear to god I tried that last night, but this morning it seems to be the magic combination
You could in theory set player:setMaxWeightBase(8 + added bonus)
I think 8 is the base weight
But if other mods edit it you'd probably have to get the maxweightbase instead of using 8, and remember how much you personally added onto ti
would likely cause conflicts either way π
Hello everyone! I've been debugging an issue that apparently only I have when playing with the mod "Soul Filcher's Dressing Time" (https://steamcommunity.com/sharedfiles/filedetails/?id=2296517419), potentially because I'm on Linux?
The biggest problem here is that most of my zombies simply spawn without any clothes, or barely any. Because this only affects me, in multiplayer things become even weirder:
- If I kill a zombie, the zombie on another person's screen suddenly loses all its clothing it previously had.
- If someone else kills a zombie that to me appeared to not wear much, it suddenly gains a bunch of clothing.
Additionally, items from the mod error when on the floor, worn, or when it's trying to display the tooltip. Seems like I managed to get down to getClothingItem() return null, which appears to have to do with asset loading.
I've written down my findings in this Steam Community thread:
https://steamcommunity.com/workshop/filedetails/discussion/2296517419/3191366986200121738/
I haven't yet found another mod that causes this issue. (Or at least not this severely.) Still trying to find something that might point to a platform-dependent issue. (Such as filename case-sensitivity.)
#mod_support? (sorry for being annoying, but pls)
@fleet snow At this point I'm basically modding the mod so are you sure that would be the right place?
true, but you still just trying to create a fix for mod and get it working properly, so i recommend going there and ping Soul himself
Is pinging people directly without their consent allowed on this Discord server? It's usually frowned upon.
well i usually do it anyways and im not getting angry being pinged.
Anyways, even then - isn't it better to ask a person who directly made this mod instead of asking around for people to figure it out for themself
if you dont wanna ping - you can copy this explanation above and put it in comment section of broken mod
so author will get notified
and look into problem
It's been a month without a response, though I created a discussion, not a comment - unsure if there's a difference. I will do as you recommend and ping them, though. I.. think it's reasonable. Thank you.
not sure where to put this question but is it possible to located a stolen vehicle on an MP server, perhaps view a list of vehicles active on the server save or similar? just curious if something exists to assist, thanks!
Is there a way to add more types for item?
Nope, no way. It's Hard-coded.
What does more types for item means? 
Well, in context, I assume they're asking about the "Type" parameter used in item scripts. Normal, Clothing, Weapon, Food, Radio, Movable, Container, etc.
Oh okay thanks
ya that. thats annoying I am trying to use getType to identify a type of items to add a contextmenu option to. Any other ideas how I could do this?
Try getCategory()
only two of those are released.
is there a way to make recipes that only get loaded if another mod is activated. Id like to make some recipes to add functionality with other popular mods, but don't want them to appear if the person doesnt have the other mod, to reduce clutter.
@willow estuary Are you still around mate? If yes I would like to gently request you if I can contact you privately here via PM because there is a thing I would like to ask you privately ( Nothing major just a 2 mins thing I guess. Thanks in advance.
@hearty herald Yesterday evening I have evoked one of the LUA Gurus from his ancient and eternal sleep ( π ) but he says that, even if in theory the way in which the weight system works is modifiable ( ..and even considering it as a feasible thing, it will be a very hard tasks due to the current weight system/Java core code used ) somehow to achieve it , the game JAVA core code must be decompiled so something not feasible respecting the rules imposed by the Devs. The best hope is that the devs in the future will separate the item weight from the equipped weight having them as individual item proprierties or let us adjust the weight reduction for equipped items....Until then we will have to live with the 70% weight reduction the game applies when you equip an item, unfortunatey....
maybe you could modify the actual weight of the time with a function in OnClothingUpdated? so when you equip an item, it would check if you have a certain item equip, and then modify the weight of that item using setWeight. Then also the to check if you have the item in nearby inventories, ground, player inv if the item is there, and reset the weight back to normal. A bit hacky, but it will let you get the behaviour you want
@shadow geyser Basically what we have done yesterday for all the evening but no joy unfortunately...
whatever you'll do one of the 2 values when equipped/unloaded will be always wrong
oh wierd. maybe try using setCustomWeight as well?
oh I see, in the java the get equipped weight is actual weight(which seems to be based on the item definition) plus getContentsWeight. Maybe you could do it by turning the item into a magazine, but you can only directly unload/load the magazine with the OnClothingUpdated function
maybe its possibler to make the ammo give negative weight
We tried pretty much all that is humanly possible ( we even take a look at the core code ) but if you don't touch it no way to achieve the desired result
the big issue is that the item weight and the item equipped weight are linked...You set the correct weight of a clothing item? Soon as you equip it it will apply the 70% weight reduction...and that's hardcoded ( or better said we can't touch it )
plus the same code is used for many other things.....
If it were one of my mods, I would want you to ping or DM me to let me know thereβs an issue.
Yeah I'm in talks with the author to see if we can find the issue.
right but what I mean is that if you want to say get a 90% reduction on an item with 1 weight. When equipping it, you would modify the weight of the item instance to be 0.333. then 0.333*0.7 = 0.1 weight. Maybe you would have to do the thing with making the item a custom magazine to actually modify the weight if setCustomWeight or setWeight doesnt work. Then when you unequip it you would do the reverse. you modify the 0.333 weight item to be 1 weight
@lusty nebula here is a sledge hammer that i've given 90% reduction when equipped. Then all you would need to do it modify the checktooltip function to properly display the "weight: 0.6 (2.0 when unequipted)" to show a different string when hovering over one of your items with custom weight reduction percentage, to show the correct numbers it will behave with since this behavior was kinda hacked in.
@shadow geyser One of the problems is exactly the tooltip.....
( Somehow I've passed your suggestions to the expert )
Hey guys. When I use addZombiesInOutFit() from the server-side, the zombies are created but despawn after 1 second, leaving this message in the log: "removing stale zombie 5000" ...
I've searched here and I found out that @sour island faced the same problem. I'm not sure how he solved that, but it seems to me that the only solution is to "poke" an available client to issue the command as it is done in ISSpawnHordeUI.
does anyone have a better solution?
and how the HELL do i get rid of that.
remove seat? :>
did that. still there
some template still inheriting maybe?
I could help with looking into that later
ibrrus did it with the motoclub π¦
but i dont wanna have to make his required if i dont have to.
Can't you steal the way it was done?
i just went to the horse.
Im trying to create a script that adds an item to players inventory.
Should the function be 'local' as well?
Usually you do want to scope things down and not create things in the global scope
Yeeet it out of screen
item:getType() and item:getFullType() return something other than Normal, Clothing, Weapon, Food, Radio, Movable, Container, etc.
AHHHHHHHHHH why wont you load my o h my god i am a dumbass nevermind me.
Offhand, it should be
item:getCategory() returns the item's type.
item:getType() returns the script item name.
item:getFullType() returns the full module + script item name.
item:getDisplayCategory() returns the item's display category.
item:getDisplayName() returns the item's name.
Yeah, confusing as fuck.
Is there any mod to remove or lower the stunlock from being shot? It makes pvp not fun imo.
Also, I'm looking for a mod that shows faction players only on the map
you can set the show players on map mod to do that.
@willow estuary do you know what the "Java Scripting Guide" modding tutorial is supposed to link to/download? It seems to do nothing when I click on it.
It downloads a rich text file, .rtf, that you need to open with a text editor.
Right, I see the RTF link but it's not downloading, at least through Chrome
That mod doesnt work properly, that configuration doesnt get saved and keeps reseting to default configs
Works on my end with Firefox. Beats me?
It's also 7 years out of date, looking over it I don't think it's very applicable to current PZ.
Some of the information is still valid, but stuff like
Container Item Distribution
These objects are a set of rules governing how items are distributed around the map. An example follows:
containeritemdistribution
{
Room = shopGeneral,
Containers = counter,
Bread = 10-20,
WhiskeyFull = 5-10,
}
is wildly out of date.
With a funky title anyway
I wouldn't bother with it TBH?
Yep, that's where I'm at with it. Is it even worth keeping the link up?
For the most part, I don't make those calls?
There's people who want out of date information for past builds archived, although I believe that does more harm than good in muddying the waters.
I put a notation regarding it being out of date, but also, just like mods on the workshop, people need to be discriminating about evaluating how old some of these resources are?
For sure. It's already got a date on it.
There's a few people who fuck around with those antiquated builds, and they're very into them π
Interesting. I wonder what's the most popular "legacy" build.
Well there's the potato bunch who are stuck with b40 however, dunno how many of them are active/playing the game.
Aside from that, with the older builds, all I've seen is that every now and then someone randomly gets obsessed with them.
Oh, did the minimum system reqs increase for b41? I didn't start until 41.65
Significantly.
There's also the "superior pixel graphics" bunch, but I dunno how much of that is actually "superior pixel graphics" and how much of that is potato computer copium?
As in, b40 graphics are supposed to be "superior"? Hard to believe...
Well, as they say, it takes all kinds?
But yeah, none of those guides, especially the crowdsourced stuff, should be considered "the flawless word of gawd"?
Yeah, no shade from me. People can play what they wanna.
did you remember to upload the settings file to the server? otherwise it will not push it to the players.
What file is it? And how do I upload it?
What is the file location?
is it possible to set a vehicle trunk to be a dumpster?
What do you mean, be a dumpster?
like how, if the server allows it, you can put stuff in a dumpster and just DELETE it all.
i want my trucks trunk to do that.
can corpses go in it too?
technically anything can.
but unless i can get it to delete them it's just another vehicle.
lol
No wasn't able to get a new category to add correctly - went with getDisplayName() and that worked out.
Is there a mod where i can ride choppers?
Improved helicopter adds operational helicopter that you can use
But when i spawn it i cant fly it. :c
Does mod file loading have anything to do with directory/file naming within your mod dir?
Aka if I make a 0_utility folder, will that load before a 1_impl dir?
no.
Is there another way to ensure certain files load before others?
can i ask why?
yes
not folders but files
so a 0_name file will load before a 1_name
likely missing a dependency
I want to refactor my string manipulation functions into a utility from which I can import
Instead of defining them globally or re-defining in each file
if you require a file it will load it so you dont need to mess around with load order
So drop the naming schema and just require it by name
Simple enough, thank you
Didn't you already post this here?
check the dependency by clicking the mod and read on on the right panel
Have you looked at the code for trashbins? since they can delete stuff, even has a button for it in the inventory management
Hmm, guess furniture are tiles
Next guess would be looking at the inventory ui then? since it adds a button to delete for trashbins
Like in same row as "pick all" or "put in all"
nah ui is too much. the refrigerated mod made the trunk a fridge. there has to be a way to make one a garbage bin
part:getItemContainer():setType("fridge")
i need that list of types.
Well you should still look into the code is all I'm saying
that list of types and i can do a ton of fun things lol.
To see how it detects it, or does it
Guys do you Know how to Make a Simple GUI in Project zomboid?
MrBounty's guide has a link for an explainer on making a GUI yourself, as well as a link to his mod which encapsulates GUI handling https://github.com/MrBounty/PZ-Mod---Doc
hey, i'm considering to make some mods for this game, but i have no experience at all (the only mod i made was for total war games with the pfm program, editing something here and there). I want to know... how hard is to make idle animations? I wanna try to make a bunch of sit or lie in ground/couch/chair/bed poses...
i'm sorry i think i didn't understand what do you mean but i am no animator, but i'm prone to learn how to
well the #modeling channel would probably be a better bet. but i warn you. it's rough adding anims.
i see... thanks β€οΈ
is there has mod increase hotbar to use more weapon?
yes, there are some of those around there
one sec
maybe it would be better if you look up for hotbar in the search panel in the workshop
still work now?
becauyse there are a lot
but planetalgol have some and a core that updates frequently
ok i will try
is your can use more wepon at once?
i want to use more weapon at once
lazy to swtich in inventory
i mean switch to hotbar
more belts will depend on the weapon, because it only adds 2 extra slots to carr stuff like a radio or a watter bottle
if a w eapon can be equiped on the belt slot you'll have 2 extra slots to attachthem
with the double holster you get 2 extra for firearmsand is enough imo
I'm not getting what you want, you want extra slots or more info on the slots?
more belts and looking for hotbar will show some mods that adds extra slots
okok thanks so much
np mate
thanks man.
has anyone had success mixing item types together? Im trying to create a piece of clothing that is also drainable. Its meant to be a strapped on canteen that you would have in the ammostraps slot. And from what I can tell, I need the item to be drainable, so it can be drunk from, but also type clothing, so it can be equipped
No, item types are not "mixable" and are very inflexible.
Now you could use custom lua code to make what you want, but it would require time and effort with custom lua code.
This mod, for example, has the night vision goggles that are clothing items, but are also "drainable" in the sense that the battery charge is tracked and such.
But there's no shortcuts for mixing item types.
https://steamcommunity.com/sharedfiles/filedetails/?id=1793461606
hmm ok thanks! maybe I can do a similar thing with water if I can find the function that is triggered when your character takes a sip of water.
reckon its currently possible to make a vehicle shop? trade items for a vehicle spawn
does anyone know of any mods that add medieval weapons? I am specifically looking for a flail
alternatively can anyone speak to a ballpark figure what it would cost to commission a mod like that?
well a mace could be possible.
but a flail would look weird. as it would not animate.
There is a mod with medieval weapons on the workshop
The same for any garbage bin, possibly Bin, I don't know
So I saw in a stream yesterday a guy was wearing some trousers that gave him an extra pocket in his inventory. Does anybody know what mod that is?
or is it a vanilla thing that I might be missing like tailoring?
Does anyone know, if I add a mod that adds new items to the game and the save is already in-progress, will those items not appear in the world?
It depends entirely on how far you go with your implementation. If you define the new items and only add them to the sets available for initial generation, then yeah totally. But you have the freedom to hook into other events/parts of the game to generate some of your items if needed.
^ Very general answer, I'm not someone who's specifically added new items, changed distributions, etc. Just my impression from looking outside-in
Great, thanks π
sadly no, i can';t seem to find it.
I guess you can check container type in their tile definitions
if i edit a base file (to add a new function) will it load over the original file?
i mean it sucks, i just wanna add ONE freaking like to it.
Is there any way in game to set up a trader thing that players can buy items or sell items to for money? Or is there any mods that allow that (store would be owner controlled)
I CALL UPON THE TRASH POWERS OF @hearty herald !
hobobobo!
function GarbageTruckTrunk.Create.GarbageTrunk(vehicle, part) i need do get the sprite of the vehicle. HOW DO
local sprite = vehicle:getSprite() does not work.
has anyone seen this kind of error before?
STACK TRACE
function: @stdlib.lua -- file: null line # 10
function: setVisible -- file: ISCraftingUI.lua line # 30
function: toggleCraftingUI -- file: ISCraftingUI.lua line # 1337
function: onOptionMouseDown -- file: ISEquippedItem.lua line # 473
function: onMouseUp -- file: ISButton.lua line # 56
I have no idea what to make of the null line # 10
The file is null because the function comes from the Lua standard library
If I have the right line, it borked out calling ipairs on self.categories:
for i,v in ipairs(self.categories) do
My guess something further upstream is sending invalid or null data to a function that gets passed through a series of functions before it causes an issue.
do I need to assign loot to a specific zombie "outfit"? I cant just assign to zombies in general?
I wanna make a somewhat rare find that can happen on zombies but if I just add this "rare chance" to 30 different zombie types then its gonna end up a lot less rarer than intended
I'm referring to ZombiesZoneDefinition.lua under NPCs, forgot context
Can you make your rare chance 1/30th as probable?
unpredictable
cause zombie types are assigned to zones, or thats what i took from it
so depending on where players live they might run into 2 or 4 types at best
So it'd need to be specific to the area, which is finicky
is there not a "general" group for zombie loot?
require 'Items/SuburbsDistributions'
table.insert(SuburbsDistributions.all.inventorymale.items, "Base.CokeBaggie")
table.insert(SuburbsDistributions.all.inventorymale.items, 0.001)
table.insert(SuburbsDistributions.all.inventoryfemale.items, "Base.CokeBaggie")
table.insert(SuburbsDistributions.all.inventoryfemale.items, 0.001)
Oh that's not important, that's just where you put the script name of the item.
Yeah, corpses and zombies when they get killed.
Hi, is it possible to create an item that mimics the effect of "multi-part" placed items? By that I mean building items that when picked up put the parts on the ground (e.g. Picnic Bench (1/4), Picnic Bench (2/4), ...)
and if so, please can someone point me to a mod that does this so I can take a look at how it works?
Also @faint jewel have you emptied a regular trash container to see if it logs anything helpful?
It doesnt
How did you build the args for sendClientCommand?
came across your message
https://steamcommunity.com/sharedfiles/filedetails/?id=2779169728
has anybody saw a mod related to temperature inside buildings? like a heater mod or how to raise the temperature
@chrome egret lua Commands.object.emptyTrash = function(player, args) local object = _getTrashCan(args.x, args.y, args.z, args.index) if object then object:getContainer():clear() if object:getOverlaySprite() then ItemPicker.updateOverlaySprite(object) end object:sendObjectChange('emptyTrash'); else print('expected trash can') end end
that;'s the client command.
so i gotta write a whole ass new one.
omfg. i';ll make a model for someone who can make me a duplicate of the empty trash button in it';s own script.
Hello, is there a command that when a clothing is broken it is not sent to inventory?
dang... looked at this and since Commands is a local it'd have to be a dupe of the whole ClientCommands file π’
Can't just add commands?
not into this Commands table that already exists
buuuut
At the end of the file it does call Events.OnClientCommand.Add(ClientCommands.OnClientCommand)
maybe an alternative would be to intercept the command in an event handler you add for OnClientCOmmand
you know it won't work for the base handler, but that's fine, cause you only want to invoke your own code
i had to change so damned much JUST to get the stupid buitton to show up
Can you not just wire in directly the code that the client command is executing?
object:getContainer():clear(); object:sendObjectChange('emptyTrash');?
oh no, you can't
because this has to run on the server, and if you call it on the client then it won't be accepted
Whatβs the proper way to add an override field for a recipe?
@faint jewel something like this in a \server sub-dir would be my guess. This is just off the cuff:
EXTRA_CLIENT_COMMANDS = {};
EXTRA_CLIENT_COMMANDS.GetTrashContainer = function(x, y, z, index)
local square = getCell():getGridSquare(x, y, z);
if square and index >= 0 and and index < square:getObjects():size() then
return square:getObjects():get(index);
end
end
EXTRA_CLIENT_COMMANDS.IsEmptyTrashCommand = function(module, command)
-- However you know it's your command
end
EXTRA_CLIENT_COMMANDS.OnEmptyTrashCommand = function(module, command, player, args)
if self.IsEmptyTrashCommand(module, command) then
local x = args.x;
local y = args.y;
local z = args.z;
local obj = self.GetTrashContainer(x, y, z, index);
if object then
object:getContainer():clear();
object:sendObjectChange('emptyTrash');
else
-- Couldn't get an object with a container to clear
end
else
-- Do nothing, not our command
end
end
Events.OnClientCommand.Add(EXTRA_CLIENT_COMMANDS.OnEmptyTrashCommand);
Would SensorRange = 3 mean something that is up to 3 squares away?
how do i check if a vehicles trunk is empty?
Hello, I would like to slightly increase Adrenaline Junkie's speed bonus, but I can't find the trait code in any lua folder, in MainCreationMethods only adding the trait itself, where is this code hidden or how to change the trait?βΉοΈ
guys how to create a Custom Animation in Project Zomboid. does they use blender to animate?
Lots of people have definitely mentioned blender
this is hardcoded in java. There is no way to increase the speed value because the speed calculation for the junkie is a function of panic level and nothing else.
I accidentally enabled "view thread.something" in the F11 lua debugger and now the game is frozen
stays that way, any ideas on fixing this
can you explain this to me ?
Is there a way to remove/edit the visual bubble effect/mask around the charater otherwise it seems to walk around in one of these LOOOL π
https://sc04.alicdn.com/kf/HTB1n5XKCaSWBuNjSsrbq6y0mVXaR.jpg
How can one choose which bone a item is attached on?
It seems like my attachment of the flashlight just choosed "Bip01_Spine" which makes the flashlight clip into the body when moving.
Is there a way to attach it to lets say "Bip01_Spine1"?
https://i.gyazo.com/a05baec64b6b972c1c7b3e34ee5df7d1.mp4
Is this a place to ask for mod recommendations? I'm looking to see what the most stable trait expansion mod is, my friends just want additional traits to mess around with
Got rid of the bubble thing..You need to edit the png file mask_circledithernew in the media folder...
Nevermind, got it π
You can set the bone in here:
On a scale of βMash shit together in a .txt fileβ to βShould probably get a software engineering degree firstβ How modding friendly is PZ?
Depents on what you plan to do and how your existing knowledge is.
Oh, i never have made vehicles so i am not sure about that. π
What kind of mods do you do?
But i am pretty sure modelling is not everything as well in vehicle modding.
In my current outfit i spend like 30% of the time in modelling, and 70% to make the stuff around it work π
Right now i do outfits
Ah
Next problem to solve:
Why does my character surrender at attaching a gun. π
Happens when i select a animset
its a secret pacifist action that people have never seen before π
Heyo, can you guys point me to good resources/documentation to start modding on project zomboid?
I already have Lua down to an art I just need to find some good tutorials to get my grounds
Already got the modding wiki
Just a question, how often will I be encountering Java data in Lua?
since I noticed in the documentation I can't treat the tables returned from certain functions as normal lua tables
Realized I should be in #mod_support
How do I remove a vanilla recipe for a mod?
I'm looking to make a hopefully simple modification to this mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2287977869
I want to make it so all it's AddWeightOption.lua does is provide a context menu "add weight void" option which gives you the WCWeightVoid item (I have already edited WeightVoid.txt in media\scripts\ to my liking, so it's less of an infinite weight void and more of a 100 weight reducer), here's the base file for reference:
WCWeightVoid.isEnabled = function(player)
return player:getInventory():contains("WCWeightVoid")
end
WCWeightVoid.createMenuEntries = function(playerIndex, context, items)
local player = getSpecificPlayer(playerIndex)
if not WCWeightVoid.isAdmin(player) then
return
end
local isEnabled = WCWeightVoid.isEnabled(player)
local optionText
if isEnabled then
optionText = isEnabled and "Disable" or "Enable"
else
optionText = "Enable"
end
context:addOption(optionText .. " infinite carrying capacity", items, WCWeightVoid.toggleInfiniteCarryWeight, player)
end
WCWeightVoid.toggleInfiniteCarryWeight = function(_items, player)
local isEnabled = WCWeightVoid.isEnabled(player)
if isEnabled then
player:getInventory():RemoveOneOf("WCWeightVoid")
player:setMaxWeightBase(8)
player:Say("Disabled infinite carrying capacity.")
else
player:getInventory():AddItem("Base.WCWeightVoid")
player:setMaxWeightBase(999999)
player:Say("Enabled infinite carrying capacity")
end
end
WCWeightVoid.isAdmin = function(player)
return not isClient() or isAdmin() or isCoopHost()
end
Events.OnPreFillInventoryObjectContextMenu.Add(WCWeightVoid.createMenuEntries)```
Nah, #mod_support is for end-users using mods; this is the correct channel for question related to* making mods*.
Basically mod_support was added because this channel was getting flooded with people with "why does mod not work for my server" when MP dropped.
ooh
If you have the time, could you direct me to any beginner tutorials for Project Zomboid modding so I can get a grasp on how to navigate the game files?
also I have some experience coding other stuff but barely any experience messing with the insides of mods so they do what I want a little closer to how I want it
The Fenris tutorial on the PZ wiki modding page is my gold standard.
But, TBH, IMO it really comes down to a fair amount of time and effort tinkering with stuff and learning from practical experimentation.
Yeah, I'm just figuring out how the mod is organized
There are no shortcuts
well no I'm not looking for shortcuts
the documentation is brief on how the files are organized
It just tells you this goes here and this goes here
without explaining if there were any potential things I would need to know before going into there
I don't know if there are any specific naming schemes I have to follow with folder names etc
anyone got a furniture spawner mod? like necroforge but updated?
that might break zomboid
Make sure your folder names follow the same capitalization scheme that the vanilla files do.
thats the stuff! thanks
is there going to be any confusions if I were to have matching folder names in Client, Shared, and Server?
Possibly? I'm just a stoned idiot caveman that played with the lego pieces until they worked?
I'm not a technical smart coder guy.
ooh
alright
because I have a mod idea that I wanna try
and I'm just getting my grounds first
basically a new item that would act as a central access point for multiple storage containers.
I'm gonna grossly obrez this code and hope it works
it's worth a shot tho
I believe the way inventories are handled in MP might be reworked at some point as well.
as far as i know folders are purely for organization
the game doesnt care about the folders when loading
this is basically my goal
it's the same concept as your regular inventory
but it can be annoying trying to switch between containers
so having a single access point would make life easier
let's hope this works
WCWeightVoid.createMenuEntries = function(playerIndex, context, items)
local player = getSpecificPlayer(playerIndex)
if not WCWeightVoid.isAdmin(player) then
return
end
context:addOption("Add weight void", items, WCWeightVoid.addWeightVoid, player)
end
WCWeightVoid.addWeightVoid = function(_items, player)
player:getInventory():AddItem("Base.WCWeightVoid")
end
WCWeightVoid.isAdmin = function(player)
return not isClient() or isAdmin() or isCoopHost()
end
Events.OnPreFillInventoryObjectContextMenu.Add(WCWeightVoid.createMenuEntries)```
Oh sorry, I thought you mean some sort of case where there was a magic storage box somewhere in the world that you could access in other areas of the world?
So nevermind my "might not be possible", it was in regards to that concept, not yours.
oh i understand now lol
π
for now i'm just gonna have it work "wirelessly" as a prototype
then add items you would need to hook up storage containers to the access point
you could theory have a long distance access point
but it would take alot of materials
and i'll experiment with the AC situation aswell so see if I can make that a possibility
but short range is still very good
I think the best way to get around the AC would be to have a infinite storage space of the access point that players can't access that is solely used for the server to move items from one storage container to another
so when the player grabs the item out of the inventory it's grabbing it from the access point and not the storage container from far away
is the player object already implemented into the client environment of a new script?
I can do this right off the bat?
Is there anything I do to the game itself to setup for creating mods?
how do i check if a vehicles trunk is empty in lua?
Sorry for the ping but there is nothing in documentation telling me this.
Is there any settings/customization I do to my zomboid client to get debug info?
Mainly need to figure out how to get the console opened
Here you go https://pzwiki.net/wiki/Debug_mode
Thank you very much
Also, make sure and check stuff in not-debug mode, as there are corner cases where some stuff behaves inconsistently between the two modes.
is just rejoining the project zomboid world plenty for a update to the mod to pass?
As I recall, the lua files should reload when you quit to main menu and then return to the saves if the mod is only activated in that save, and is not activated in the main menu general mod activation screen.
ie when developing a mod, don't activate it in the main screen mod interface, but instead activate it when creating a new game like so
should print be visible in the debug console?
Yep!
awesome some weird behavior going on where I don't see the print in the console
prob doing it too early for the print to be added
You can also check console.txt in C:\Users\YOUR_USER_NAME\Zomboid or wherever said directory is.
can't find console.txt in the directory
atm just trying to get a sign that any of the stuff I'm writing is loading
not getting anything
is OnContainerUpdate a server only event?
I gotta use the bathroom real quick I'll be back
its in your Users/zomboid folder
should i play modded starting off new?
only info I can find
atm I just want to figure out what I'm doing wrong here for print to not work
I'm following this mod tutorial and what the heck
Do I seriously have to sift through almost 10,000 lines and remove shit for the distribution file?
nevermind the tutorial guy failed to mention you can remove 99% of the stuff
finally, i can pick this masterpiece apart
in what way?
man, if only youtube didn't remove the dislike counter i would of known the tutorial i was following was crap.
better reference for custom static characters
I gotta go eat, if someone knows a good youtube tutorial I can follow that is actually informative and can help me with basics it would be epic. Thanks.
Probably not, only because you most likely will die a lot before you get very far. But you do you!
I know Iβve asked this before, but how do you remove a vanilla recipe?
@faint jewel what did you need
oh... i was working with the radial api, and cannot for the life of me figure out how to get it to open when you are at the trunk only.
soooooo... i just made it a "near the car" thing.
Override it in your mod, Override: true, Obsolete: true
try faceThisObjectAlt
I mean v is disabled when in the trunk zone
Thank you so much!
π€
i can use v near the trunk
It just turns off the ui for me. Like I'm too far from any thing
yeah might have to do with the size of the vehicle
I still can't remove the recipe. Here is the script. What am I doing wrong?
module Base
{
recipe Create Spear
{
Plank/TreeBranch,
keep HuntingKnife/KitchenKnife/SharpedStone/FlintKnife/MeatCleaver/Machete,
Result:SpearCrafted,
Time:100.0,
OnCreate:Recipe.OnCreate.CreateSpear,
Category:Survivalist,
OnGiveXP:Recipe.OnGiveXP.WoodWork5,
Override:true,
Obsolete:true,
}
}
while obviously funny do the mowers actually cut brush and saplings?
Yes
oh sweet what do they cut up to
Anyone know if you need to add all the mod ID names from the slow sprinters/joggers and runners mod? Having issues with it
up to? it cuts long grass and shrubs the hedges saplings and trees are safe.
it also does not do anything to crops (that i know of)
How would I script a simple "add item to player inventory"?
is there a way to make a pistol have weapon attachments on spawn?
Base.Pistol spawns an empty pistol, is there a way to make that have a magazine and weapon attachments on it already?
already does in the vanilla game actually
i found 2 M9's both with magazines and one has a laser on it
how do i check if a vehicles trunk is empty in lua?
well, if you start the player with a pistol under the server settings, it just gives them a m9 with no magazine
ah that's what you wanna do, i think you need to spawn each piece seperately
Base.9mmclip
yeah, thats kinda obnoxious, was hoping there was a work around
don't think there is
cause I was having to spawn them with the pistol, a magazine, and bullets
i mean that's pretty easy
it is, was just hoping there was something simpler
just base.pistol,base.9mmclip,base.9mmbox
Anyone have issues with map mops like rosewood expansion being half okay and the rest looking like this
the buildings are just black spaces until you look at them and then its just empty space with nothing there, just grass
im having this issue with every map mod
#mod_support ask here
I did
then you didn't need to ask in this channel
ah thought it cut down saplings so i could cheese world deterioration and not have to chop down saplings
well that's where i hit a problem. being able to run over saplings turned it into a full on DEFORESTER. trees were no challenge.
How would one go about making a trait mod?
might be prudent to look at one of the existing ones?
Yeah, one of the standard example tutorials on the wiki under Modding is about adding a custom trait + profession
Those look fantastic!
Anyone know the name or can give the link for a vehicle claiming mod for a server?
thanks
What size should item icons be so they don't look enormous on the floor
I wonder iiff photoshop is changing the sizes of these actually
Start here: #mod_development message
Does anyone know any good tutorials just for basics of modding. Literally as simple as adding a single item to project zomboid. The last tutorial I tried to follow was an hour long and apparently didn't work.
Icon = MyItem, seems to be the object that shows up on the ground
this guy ended up making an actual model for it
how would I scale the icon itself, and not a FBX item
If that scale property doesn't do what you want, I'm afraid I don't know the answer.
My mod is concerned with finding items, not adding new ones, so it's not something I've done. Just thought that ref might help ya.
Alright, I need help. I'm trying to make an invisible fanny pack. I could make an invisible bag, but somehow fanny packs throw an error when worn:
Exception thrown java.lang.RuntimeException: attempted index: setTint of non-table: null at KahluaThread.tableget line:1689.
They're literally just the vanilla fannypacks, but with baseTexture of an empty texture. I'm not sure what that setTint is and why it fails
I figured out one issue with my mod, but now I have one more. My mod has support for another mod, and I want to remove a recipe from it. I have tried copying that script file and putting in an obsolete, an override, and both, but none do the trick.
How do I completely overwrite a lua file from another mod, like if i wanted to make a patch for that mod?
Well this is real stupid
I found out I missed </fileGuideTable> but now the error is somewhere else: when I'm right clicking on the fanny pack an error shows up about it trying to get clothing data RuntimeException: attempted index: IsClothing of non-table: null at KahluaThread.tableget
I think this is specific to fanny pack because the custom backpack runs just fine
How do I make a poster for a mod, again?
The little preview images when oen views them in the "Mods" section of the Main Menu?
change the poster.png I assume
Is there a way to get/set extra data (properties not already existing in vanilla) on a player/character? In a way which is saved when the client/server saves?
So, uh... hate to ask for help again, but... I can't seem to get the stuff in this mod to load properly. I'm hoping to create a new pair of scissors but can't.
I have the mod in my mods folder, but when I tried to add it to a save, then open up a the cheat menu to see if I could spawn the special mod scissors, I couldn't find it.
You can use modData
local mData = player:getModData()
mData.MY_VALUE = "MY VALUE"
thank you! had no idea that existed. Was looking around the documentation for IsoPlayer and IsoGameCharacter e.c.t, turns out it was part of the base class for all of em, IsoObject
there isn't anything wrong with this recipe, is there? Maybe there is, but I don't know...
{
Scissors,
Salt,
Result:LowrysScissors,
Time:60.0,
Category:Survivalist,
}```
looks fine to me, only thing to double check is if survivalist is a category ingame, if it is then youre golden
Try having the recipe produce a vanilla item instead to evaluate whether your issue is the recipe, or your item.
Yes.
Result:WHATEVER_YOUR_MODULE_IS.LowrysScissors,
So, if there's only Module_Base, it'd be Base.LowrysScissors?
Then it would be unecessary.
But again
Try having the recipe produce a vanilla item instead to evaluate whether your issue is the recipe, or your item.
Just as a basic troubleshooting measure.
Got it.
Basic, tedious, step-by-step troubleshooting is a wonderful tool for solving such mysteries.
Hey @willow estuary, do you by chance know how to remove a recipe from a separate mod if your mod also uses items from that recipe?
Ugh. Even after removing the recipe entirely, I still can't seem to get the LowrysScissors item to be spawned.
And it isn't showing up in the item spawner either
The code for the items in question.
As far as I recall, when I tried that it just didn't work when I tried using Obsolete/Override. It seems PZ handles mod recipes differently thanit's own vanilla ones.
But that could just be on account of me being a dummy or something?
- Take all the problem scripts, and put them somewheres else temporarily.
- Make a new, good, empty script file.
- Put the vanilla scissor item script in it.
- Then, one step at a time, substitute the values you want from your mod scissors into it, checking that it works as you go, until you have your mod item.
Basic, tedious, step-by-step troubleshooting.
Ugh. At this stage it might be easier to just create something from scratch, add items one by one and then check to see if they work.
Honestly, sometimes that saves plenty of time and headaches.
Starting from scratch?
But yeah, if your having issues with scripts add items one by one and then check to see if they work is absolutely the right way to go about things, with you checking after every item you add.
I'll give that a try, then. Though I might make the same mistake I did last time, or something.
Thanks for the advice.
Nah, you aren't a dummy - and it isn't that big of an issue to not have the recipe, it'd just be that way in my ideal world. Alas, the world is cruel π
It's happening.
where can I find the icons for the weapons?
In a file with a lot of them in a big image and with also another file saying which bits of the image are which icon.
where is that file?
Β Β―_(γ)_/Β―
So, when making distributions for an item
Does replacing the .items thing with .junk mean it spawns as junk?
Also, how do I give a pair of scissors the ability to cut clothing?
Do I just give it the same recipes as regular scissors and make the appropriate substitutions?
Is there documentation for the Tsar's mods? We're on an old world and want to spawn in one of the cars manually since they're not spawning.
I think you want the #mod_support channel
Thanks!
How do I get items to spawn impaled in zombies?
Look in shared/Definitions/AttachedWeaponDefinitions or such.
Throwing together a vehicular explosion system (not blowing up the car right now as I need it to test injuries)
Does anyone here have a good way to edit gui? I'm not a programmer, but want to do an overhaul of windows, radials, and icons. Is there a graphical plugin for something that everyone uses or do I have to learn to read code...
was anyone ever looking to make a train mod?
@willow estuary I was thinking about making a mod that cuts the player when the windshield breaks on cars. But I suppose you're kinda already going a step above that lol
hey where did you find the vhs tapes in the base game?
is there have mod speed up reading book?
Yup, its βCCβs faster readingβ or something like that
Hello!
Does somebody knows what could it be that if I'm printing the item:getWetnes everything is normal and suddenly the value goes to NaN? π€
rate this thumbnail
pretty straight to the point
my bad
stab stab
I keep getting "NormalTermination" when trying to start a server that has a friends only mod
do I HAVE to release the mod to public to be able to playtest it in multiplayer?
I'll try that
https://steamcommunity.com/id/Skizot/myworkshopfiles/?appid=108600 thoughts on the new mod icons? apparently branding them like i had noone was subbing to them.
pretty consistent
yep nothing
I guess I'll have to release a beta... that really sucks
logs just tell me that the server is unable to download the mod
also YOO go karts
improved, definitely
rate mine
nice/10
Anyone know if its possible to add preset map markers/symbols?
I was curious what happens if i attach some hairtips to the backpack bone as it makes stuff wiggle.
its subtile but has potencial: https://i.gyazo.com/8078aebd83ed18cb4c0ea8cfbbbb38c4.mp4
Its really visible when stopping motions quickly
Now the backpack bone is tied to the spine. Would be great to have a wiggle-bone tied to the head for hairs
Or a wiggle bone for long jackets
Ops, was supposed to post it in modelling.
is there a way to force texture reload without exiting the game completely?
It's really annoying having to restart the game just to check a texture update
Hey guys, someone know the name of that mod that the the player say somethings for context?
Conditional Speech
thanks guys
β€οΈ
now do that with boobs.
Yea thats also what i thought. As soon as we have custom bones we will have boob physics, just a question of time. π
no seriouslyt. edit the female model to attach the chest verts to that backpack bone. tada boob physics.
Yep, pretty much π
heyy im trying to host a game with a lot of mods but when i host theres no credits only black screen
is there someone who can help me with this problem
help! Gun is Invisible when equip
if vehicle.inventory:isEmpty() then return false end i need somethiing like this.
Don't quote me and maybe you've already tried, but just glancing around the code it looks like a BaseVehicle has "parts" which has an ItemContainer on it. Could probably get the trunk from that. π€·ββοΈ In Vehicles.lua they have a function to evaluate the chance to drop an item based on a damaged trunk.
lucky you there is a isEmpty() for containers
local cont = part:getItemContainer()
if not cont:isEmpty() then
cont:emptyIt()
end
??
hey boys, can someone help me out. I been asking the past few days and it's absolutely mindbreaking me because it doesn't seem that anything I do works
I'm just trying to get a MINIMUM of a script to make a print just so I know it runs properly but even that won't work
I tried following different mod tutorials
that didn't work
I was able to get pz to load the lua file but the file never ran
I couldn't find any of the prints I put in it in the console.txt
Okay Iβm more than likely going to sound like a big dumby, or very ignorant at the least. However, is it possible to create a mod that sends data: Player Join/Leave info, Playerβs Deaths (maybe to include who killed who), and server commands entered. Into an API that a discord bot could use to send said information into a discord channel? I understand about the default one thatβs available. I would just like something more detailed. Again, me no understand the fancy modding ways. Forgive me if reading this hurts your brain. As Iβm typing this with my last 2 brain cells.
Well most of that rides on the fact if there is a lua file for http stuff or not
I can try to check if there is anything already in pz
there doesn't seem to be an already existing file for it. Not sure if downloading one off github and adding it will work
I can't check because of my current issues.
i just need to get the trunk. i am using a radial menu that supplies the vehicle, i only wan that to show if the trunk is NOT empty.
I mean he just gave you the code to check for it. You just have to replace the cont:emptyIt() with it showing the container UI
but... he didn't. i still don't have the trunk. that checks EVERY part. including seats, glovebox, etc.
I see
man I wish there was an actual API list for functions
and not a extension of a guide called Zomboid API
Vehicles.Use.TrunkDoor(vehicle, part, character)
not sure if it works but worth testing
actual code of the function if you want to look at it
media > lua > server > Vehicles > Vehicles.lua
that opens and closes the trunk it looks like.
and it just gets the trunk lid.
i am "ctrl shift f"ing the lua folder for stuff and coming up with nada.
which folder are you in when you search?
\media and \media\lua
C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\
C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua
those folders
in notepad++ you can "ctril shift f" and do a search in files in those folders.
is this not a well known thing to do?
I knew about it and I'm a fucking idiot.
wait holy shit CONTROL SHIFT F DOES FOLDERS?!
I only knew control f.
@faint jewel did you search for "trunk"?
If you have to iterate over the parts, you can identify which one it is
"self.vehicle:getPartById("TruckBed")"
look what i found.
so THEORHETICALLY this should work
if vehicle:getPartById("TruckBed"):isEmpty() then return false end
I would imagine that won't work.
and why do you say that?
You need to access the ItemContainer on the part. As I said like 30 messages up. π
oh ffs. the container.
getPartById("TruckBed"):getItemContainer():getItems():isEmpty()
hello modders what's your creative mind is giving birth tonight? π
crashing zomboid for NO reason.
VehicleMenuAPI.registerSliceOutside("EmptyTrash", function(menu, player, vehicle)
if vehicle:getScript() and vehicle:getScriptName() == "Base.GarbageTruck" then
if not vehicle:getPartById("TruckBed"):getItemContainer():getItems():isEmpty() then
menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), onDumpTruck, player)
end
end
end)```
this crashes zomboid on launch lol.
you know where the console.txt file is right?
really?
Is there a command i can use in the lua console to set values of a nearby vehicle?
so, can you show me the error?
there's no error.
hmm
that's the fun part.
Do you know where VehicleMenuAPI file is?
WARN : Script , 1647895286715> VehicleScript.Loaded> vehicle "GoKart" extents != physicsChassisShape WARN : Script , 1647895286716> VehicleScript.Loaded> vehicle "MonsterVan" extents != physicsChassisShape last two lines of console.txt
Can't find it in my files to read over
ERROR: General , 1647895667759> GameWindow.uncaughtException> Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General , 1647895667760> ExceptionLogger.logException> Exception thrown java.lang.OutOfMemoryError: Java heap space at Arrays.copyOf. Message: Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General , 1647895667760> DebugLogStream.printException> Stack trace:
java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.Arrays.copyOf(Unknown Source)
at java.base/java.util.ArrayList.grow(Unknown Source)
at java.base/java.util.ArrayList.grow(Unknown Source)
at java.base/java.util.ArrayList.add(Unknown Source)
at java.base/java.util.ArrayList.add(Unknown Source)
at zombie.scripting.ScriptParser.parseTokens(ScriptParser.java:303)
at zombie.scripting.ScriptManager.ParseScript(ScriptManager.java:68)
at zombie.scripting.ScriptManager.LoadFile(ScriptManager.java:144)
at zombie.scripting.ScriptManager.Load(ScriptManager.java:666)
at zombie.GameWindow.initShared(GameWindow.java:147)
at zombie.GameWindow.init(GameWindow.java:1171)
at zombie.GameWindow.mainThreadInit(GameWindow.java:555)
at zombie.GameWindow.mainThread(GameWindow.java:468)
at zombie.GameWindow$$Lambda$80/0x0000000800ca7738.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1647895667761> GameThread exited.
hey it just closed on its own and finally an error
hmm, random shot in the dark maybe because you do :getItems():isEmpty() instead of :getItemContainer():isEmpty()?
because I saw in the example code that didn't do what you want they used getItemContainer then checked for isEmpty
nope i removed the lua and am still getting that.
can you add prints for each stage of the if statement to see if it's even running?
Is there any mod around to have Rick Astley music in game? π
VehicleMenuAPI.registerSliceOutside("EmptyTrash", function(menu, player, vehicle)
print("registerSliceOuside worked!")
if vehicle:getScript() and vehicle:getScriptName() == "Base.GarbageTruck" then
print("has script, it's base.garbagetruck")
if not vehicle:getPartById("TruckBed"):getItemContainer():getItems():isEmpty() then
print("container is empty! we can add a menu slice!")
menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), onDumpTruck, player)
end
end
end)```
kinda like that skizot
if it doesn't print any of them, then it might have to do with the initial VehicleMenuAPI.registerSliceOutside call
because I do have a theory on why it doesn't work but I wanna confirm it first
i can't get there,
i open game the inistal loading stuff page comes up
it freezes there
it ook until my memory was full.
lets wrap it in a game event so you can at a minimum get to your menu
well, sorry my guy. I'm trying to help while I can't do any coding myself
because for some reason everything I try to do to get code to run doesn't work
and no one here has even tried to lend a hand
I know, because the code is running as soon as the script is loading
that's why I'm saying you can wrap that into a game event so it doesn't run until you're loaded into a save
no i removed that whole ass lua.
oh
same thing.
How the hell was I suppose to read your mind that you emptied the lua file
I was still under the impression you had it loaded
maybe because i said so? lol
I misunderstood it as you saying you took out the getItems() part
brb
Kevinn, you wanted a minimal piece of code to run?
local testPrint = function ()
print("I am testing a print at game boot");
end
Events.OnGameBoot.Add(testPrint);
So, is that what I had to do for it to print?
Initially I had a .lua file in client with only this
print("I finally loaded")
gonna try it rn
shit a rebooted didn't fix it either.
So apparently both that and a blank file with a regular print work. But I was having a issue of it not doing that at all for some reason even if I filtered the text in console.txt
It was yesterday I was having the issue
Guess it fixed itself
There could've been some other weirdness. If there's even one syntax issue in the file, it won't be executed
That can lead you to weird errors later-- if you're calling :new on a function from another file, it will act like you called :new on "non-table null" because the file was discarded in the load process
I see, I'll workout all the weirdness down the road. My only issue was that code literally wouldn't execute no matter what I did
At least now you have a start!
it was my mower?!?!
oh well it's fixed, AND the code from seve worked.
now to make it empty that shit out
that would be my api from the workshop
that wouldnt be radial now would it XD
you can make a simple window you display on click
Idk how possible it is
Could you "split" the button?
Like when you click the delete trash button
Split it into 2 other buttons
1 to confim and 1 to cancel?
tru you can make it create a sub menu to confirm
Got an example?
the way it should be, imo
Lol
local function onSubmenu(menu, player)
menu:addSlice("Voice: Basic Commands", getTexture("media/ui/emotes/basics.png"), ISRadialMenu.createSubMenu, menu, onSubmenuBasic)
menu:addSlice("Voice: Status and Alerts", getTexture("media/ui/emotes/status.png"), ISRadialMenu.createSubMenu, menu, onSubmenuStatus)
menu:addSlice("Voice: Extra", getTexture("media/ui/emotes/extra.png"), ISRadialMenu.createSubMenu, menu, onSubmenuExtra)
menu:addSlice("Voice: Loot", getTexture("media/ui/emotes/loot.png"), ISRadialMenu.createSubMenu, menu, onSubmenuLoot)
end
-- Main Voice Emote Menu
local function exampleFunction(menu, player)
menu:addSlice("Voice Emotes", getTexture("media/ui/emotes/voice.png"), ISRadialMenu.createSubMenu, menu, onSubmenu)
end
yoinked from project voice
That works
weeeeee
Im trying to get a lousy helmet imported and im stumped, it shows up in game mods list, shows up in items list, has category errors, player does animation to put helmet on head but its invisable. Can anyone help!
Killer model! I'd love to tool around in one of those
its not entirely done
still needs to be animated later and some stuff may get added later on
We cheesed
do I just do this to add more "rolls"? sometimes an item is repeated multiple times in Distributions, do I just do the same?
I assume its to allow stacks to be spawned in the same container
so how do i close a submenu? (aka click NO)
should do it yep
lol nope.
hmmmmmm
local function onDumpTruck(player, vehicle)
player:Say("This is where i empty the trunk!!", vehicle:getScriptName())
end
local function DumpTruckFunction(menu, player, vehicle)
menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), onDumpTruck, player, vehicle)
end
local function onSubmenu(menu, player, vehicle)
menu:addSlice("Yes", getTexture("media/ui/emotes/thumbup_green.png"), onDumpTruck, player, vehicle)
end
VehicleMenuAPI.registerSliceOutside("EmptyTrash", function(menu, player, vehicle)
if vehicle:getScript() and vehicle:getScriptName() == "Base.GarbageTruck" then
if not vehicle:getPartById("TruckBed"):getItemContainer():getItems():isEmpty() then
menu:addSlice("Destroy Trash", getTexture("media/ui/icons/emptytruck.png"), ISRadialMenu.createSubMenu, menu, onSubmenu, player, vehicle)
end
end
end)```
oh hell... and i need to pass the vehicle the whole ass way.,
FFFFFFF
y7eah it's getting the non-table everytime now. any idea where i goofed?
@drifting stump ?
Make it so it creates trash blocks that you can use as barricades or walls
Aye there folks. I'm running into a same problem that is happening on that guy earlier, where modded weapon models don't appear ingame. But in the attachment editor it does appear properly. Don't know why is this happening, I double checked the script and I don't seem spot anything wrong with it..
Edit: Nvm i fixed it by going back to the 41.65 build
Can I buy someone a coffee for a simple lua script?
Just a FYI the devs are removing the older 41 builds
It was mentioned in one of the latest thursdoids
Yep I saw it
Alright, just didnβt want you to work really hard for everything to break on ya
local pos = player:getPosition() how do i get the players position?
all this stuff is like NO.
the square coordinates?
well that would work i guess? i wanna spawn a tile there.
player:getGridSquare():getX()
player:getGridSquare():getY()
player:getGridSquare():getZ()
local sq = getCell():getGridSquare(player:getGridSquare():getX(), player:getGridSquare():getY(), 0);
sq:AddTileObject(IsoObject.new(sq, "location_business_office_generic_01_57"));```
?
player:getSquare()
YAY!
but i can't pick up what it spawns π¦
sq:AddTileObject(IsoObject.new(sq, "location_business_office_generic_01_57"));
is all buggy lol.
it almost looks like it was spray painted on the ground lol.
ah yeah that i had been reading isogridsquare code and for some reason have it in my mind that its always called gridsquare
@tame mulch do you know of a way to sync IsoObject properties?
Try check how building work or what happen when box placed
local square = YOUR_SQUARE_HERE or getPlayer():getSquare()
local sprite_type ="YOUR SPRITE NAME HERE AS IT APPEARS ON THE TILESHEET"
local newSprite = (IsoObject.new(getCell(), square, sprite_type))
if not newSprite then
print("NO NEW SPRITE!")
return false
end
if newSprite and newSprite:getProperties() then
if newSprite:getProperties():Val("ContainerType") or newSprite:getProperties():Val("container") then
newSprite:createContainersFromSpriteProperties()
end
end
square:getObjects():add(newSprite)
square:RecalcProperties()
Any vehicle modders that would like to make custom vehicles for a life rp server hmu we can discuss pay!
add
can anyone link me to a source where i can learn how to use custom models for my mod?
yes
what kind of models are they? weapons? vehicles?

the wiki is ded!
does anybody know where are the factions and safehouses data is stored?
is it possible to get the weight of all items in a container?
If it's an ItemContainer, there should be a property called getContentsWeight(). I don't know if that would work for you or not. π€·ββοΈ
Assuming that property works anyhow. π
tf is the difference with those two?
public float getCapacityWeight() {
if (this.parent instanceof IsoPlayer) {
if (Core.bDebug && ((IsoPlayer)this.parent).isGhostMode() || !((IsoPlayer)this.parent).getAccessLevel().equals("None") && ((IsoPlayer)this.parent).isUnlimitedCarry()) {
return 0.0F;
}
if (((IsoPlayer)this.parent).isUnlimitedCarry()) {
return 0.0F;
}
}
return this.parent instanceof IsoGameCharacter ? ((IsoGameCharacter)this.parent).getInventoryWeight() : this.getContentsWeight();
}
public float getContentsWeight() {
float var1 = 0.0F;
for(int var2 = 0; var2 < this.Items.size(); ++var2) {
InventoryItem var3 = (InventoryItem)this.Items.get(var2);
var1 += var3.getUnequippedWeight();
}
return var1;
}
how can I add random condition to an item when it spawns in the world?
okay how about this... i want to know if the current amount in a container is more than half, if so return true.
like, instead of spawning a medicine that always has 100% condition it can have 1 use remaining, or half, etc
is it in the Item configuration itself?
@hidden estuary - If you're using AddItem, you can use AddItem(String key, float useDelta)
So if you give a .5 useDelta, it would be half used.
Ah, didn't read your message all the way through. I am not sure, I've never done any dynamic item spawning like that yet. π
Everyday at 7:00 getwoldagehours is calculated lower by a day, is this an old or new issue?
i'll reiterate this. it got lost i guess.
Seemingly, you would want to compare the getCapacityWeight/getContentsWeight()(pending if you want to account for character's or not) to half of the getMaxWeight(). This is assuming getMaxWeight() returns the entire capacity that say a crate/something could hold.
i would only want the containers holding weight.
so if it's 160 , if it's 80.1 or higher then it returns true.
I imagine getMaxWeight()/2 would return you half of the containers holding weight. Then comparing that to the getCapacityWeight()/getContentsWeight() would tell you if what is currently in the container is more than half or not.
does get maxweight count in damage?
local TrashBox = vehicle:getPartById("TruckBed"):getItemContainer()
local hasZed = TrashBox:contains("Base.Corpse")```
would that work?
what's the argument for a tall wall to not be climbable? "wall.isHoppable = false"? something tells me that's only for small fences
Hey peeps, i'm trying to find a way to update car values through functions while in game, specifically the following.
-EngineForce
-EngineRPM / gearRatio
-wheelFriction
-steeringIncrement
-steeringClamp
I've tried using "vehicle:setenginePower = ()," which updates the value in the mechanic screen, but as soon as the ignition is turned the vehicle will revert back to whatever is in the script. Am I missing something obvious? I'm pretty new to LUA and I'm still trying to figure it out, but I do understand the fundamentals of coding. A solution I've been thinking of, but not sure how to implement, is loading a different seperate template all together, without changing the overall condition and installed parts.
local TrashBox = vehicle:getPartById("TruckBed"):getItemContainer()
local hasZed = TrashBox:contains("Corpse")
print(hasZed)
``` this always prints false :/
almost done! just gotta add the weight check.
How do you cancel an event after you've caught it?
Also, where is any API documentation?
@sinful vessel hey man. do you know how to fix the muzzle flash not align to the gun?
I think the items are actually CorpseMale and CorpseFemale
only corpsemale.
π