#mod_development
1 messages · Page 287 of 1
Sorry if I'm missing the point, but is it the not hitting the IF statement that you're having trouble with, or is it the print not working properly?
For if problem, what I was wondering is that you wrote “Base.” even though M60 is your original item. Are you sure “Base” is the correct place that you difined for the additional item?
im trying to find the smoking sound overhaul mod does anyone know an easier way than just sifting through these
so both weapon and weapon:getFullType() returns nil? then it's not problem about getFullType, it's weapon
I'm guessing if you remove "if" then you will get an error
Steam will give you the mod id
where can i find that
On the mod's steam workshop page
Mkay. So "M60" didn't work either, and yeah it just errors a null right there, even though earlier it didn't. That's what's getting to me. Why did this exact thing work earlier and break now?
what debug logger says? if you are lucky you will be able to backtrack with debug logger (F10)
getFullType of non table: null
what is calling this function? weapon is not a weapon
How do I adjust how quickly an item I'm making is consumed / eaten?
I'm trying to use a function to get to the SpeedScale stat and slap a multiplier on it.
So what is a weapon? 😄
Huh, just got an idea. I'll try this exact thing but with a fake weapon attachment. Because at least my suppressors work so if I just create a fake upgrade that's automatically on the M60 then this function cannot possibly fail like that.
The beauty of computer science
ok so i downloded the mod i wanna use as a reference but it's ID isn't in my files
ive restarted the file exp and launched the game
i cant find this damn mod lol
check this out if you will ^
Sometimes the mod doesn't download right away, sometimes it can't because you're running pz, sometimes it needs to be rebooted and shut down again. Check your downloads in steam to make sure you don't have a halted download.
download a program called everything. n use the search funtion at the top to search the steam id code
what the hell am i looking at
what does it do lol
sec
can u not search using the basic file exp
u can but its slower
ah
ok so this is a dumb thing zomboid does
go to C:/Program Files (x86)/Steam/steamapps/workshop
its basiclly this
you are inside the game's workshop folder which is where it downloads mods for when you host a server
the one in your main steam folder is where the mods you actually subscribe to go to
yeah
gg i fail step 1 
ohh ill get that also thats sick
un related but check out this bug that i git while trying to get the id
goofy ahh steam
blacking out the id
thats not even me thats just steam
textureRust = vehicles/EmptyImage,
textureMask = vehicles/EmptyImage,
textureLights = vehicles/EmptyImage,
textureDamage1Overlay = vehicles/EmptyImage,
textureDamage2Overlay = vehicles/EmptyImage,
textureDamage1Shell = vehicles/EmptyImage,
textureDamage2Shell = vehicles/EmptyImage,
```Can I please get an explanation for the `DamageOverlay/Shell` parameters?
I use .ogg
i can convert it but if mp3 works i wont bother
They should be
ok ill try it
first time "modding" im basilcy making it so that when you eat (any type of food) the tacobell meme sound thing plays
just for goofs
and to see if im capable
write one

like id=HeavyEatingSound
yeah thats the mod im essentialy copying
is there a way to test the mod without doing the stuff neccecry for the workshop
bc i have the media
but im wanting to make sure it works before i do the other stuff
Yeah, do the workshop stuff but don't upload it yet 😛
lmao
so ur telling me i gotta make a 32x32 icon just to test this goofy ahh taco bell meme
nope
oh
oh
bet
so i don't need thoes files just to test it
so it says its a "text document" and the mod im using for reference has the file as a "INFO File" is this a problem and how would i change it to an INFO file as i didnt see the option
copypaste the og .INFO file and edit it
like the one im using for reference?
Ok good idea
is that all i need for it to just test
idk where you found that but im gonna use that as the cover lol
i made just now,, u want the words changed?
ight bet
thanks man thats sick
np
pro bono logo work? You're a legend
if u need stuff done in blender, lmk. i just learnd how to do fbx files today XD
Okay! I need a lever action rack animation 😂
XD
I also (and this is absolute top priority) need the Arnold spinrack from Terminator 2. For obvious reasons.
all i ask is that u credit me in the workshop mod description ^-^ moo
100%
thats a good idea. ill learn how to do bone structure on models this week
Yeah, I've thought about it for almost a year, that if I ever get into PZ animating in Blender then the first thing I'll make is the spinrack for the Winchester 1887
check this out
tiny little guy
I think TacoFood is ready for departure/testing where do i move the folder to test it in zomboid before i publish it
any idea why my custom profession mod is breaking the descriptions of all the professions?
Did you set up the translate file for your new profession?
yes, would the break vanilla professions though?
where do i find the Character Models?
They shouldn't, I added a trait and the vanilla stuff is fine
No idea. Use ctrl+f on here maybe?
also it's specifically not showing the stats you get from the professions anymore
see the black line next to construction worker? that's the box that shows up when I mouse over a profession
@severe jay what do you want me to give credit to? like your discord username or is there another name
Well.. any errors when game is initializing or reloading Lua??
idk how to check, I have watched zero tutorials. I'm reverse engineering this stuff.
A red error popping up bottom right
go to main menu, there's a "reload Lua" botton at bottom left. click and see if something is counting up.
all my stuff is the same. just a_cow_says is cool. but if u want to ad links thats cool too\
and what do I do if it does
check console.txt and see what was happening.
mostly, you will be able to find function name, file name, line number and reason by just searching "stack trace"
How can I add two trunks to my car?
just added it to the mod pack.. LOOK IT HAS NUTRITION FACTS XD
it's making me hungryyy
you make me wanna learn Blender... looks cool
Yum.
@bronze yoke
Starlit Library. It doesn't do anything on its own.
But why is it incompatible with the Fix XP View mod?
java.lang.RuntimeException: Object ??????. ???????? did not have __call metatable
No error if I disable your mod.
"The most bad part with steam deck is that you can not use inner mod dependencies. You've to put everything in one super file or create a global object(main table) if it is nil(was not created in other files) on each file and init on any load game event after all lua is loaded. Just keep in mind that on PC lua files are loaded alphabetically but on steamdeck they do not and require calls are ignored"
Is this true? If so, why?
does your mod modify java class metatables at all?
there's literally no way that's true even the vanilla game would fall apart
***If someone has the time and is inclination to solve bugs!; ***
Could you check the loot distribution lua for concrete powder? I have not found it anywhere in the game for build 42.
From what I can see in my files it seems to only spawn in a crates, those crates have a low chance of spawning, and those crates only can spawn in construction zones.
Posted are pictures of file paths, as well as what I have found in my files.
I am posting this in hopes to find out whether it is a build 42 issue or my clients files.
**Thanks to anyone who can assist! ** ❤️🔥
P.s. I have been told by other folks that they have found it in warehouses and basements. I have looked in many of both and found nothing.
https://cdn.discordapp.com/attachments/1318684957526458450/1325708892360937523/E3AF4961-388E-41B9-88A7-AA61FD7844B0.png?ex=677cc61e&is=677b749e&hm=499f3dfffe32d22c34d74e820cedafe17e2a63ee87a6edf465433abb59bef2e5&
No.
local old_updateTooltip = ISSkillProgressBar.updateTooltip
ISSkillProgressBar.updateTooltip = function(self, ...)
skip_this = false
is_combat = false
skill_sprinting = false
if not instanceof(self.perk, "PerkFactory$Perk") then
error_once(self.perk)
return old_updateTooltip(self, ...)
end
local typ = self.perk:getType()
local name = typ.name and typ:name() or typ:getId()
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here is the error.
No idea where the person that said it got that info from lol. Sounded bizarre but wasn't sure
the issue is a name conflict between a field and a method
starlit makes the field take priority so the method is no longer callable
Thanks in advance.
(B41) Would there be a case where these would not be the same?
IsoCamera.frameState.CamCharacter
IsoPlayer.getInstance()
In IsoGameCharacter, these are compared several times. Is there some type of character switching system that I haven't looked into?
they may be different in splitscreen
project zomboid doordash mod
u run through hordes just to drop off a package infront of survivor houses and get money and use that money to buy weapons, better car, etc
actually, what is intended here? i don't see a name() method on PerkFactory.Perk at all
that's possible to build on this idea, if n when the base game NPC's get updated
the error would be happening because your code checks for and tries to call something that does not usually exist, but does exist with my mod (but is not a function)
Not sure, because it's very old code. May be it's a kind of compatibility with some mod or with previous PZ build.
BTW the name() exists in some classes in vanilla.
the issue i was worried about doesn't seem to be the case here, now that i'm thinking about it i'm not sure it's something java would allow anyway
since otherwise the reference this.name would be ambiguous i think?
changing that line to just local name = typ:getId() would most likely fix the issue, unless there is a reason for it being that way i don't know about - i don't think it is something i can fix on my end after all
Why didn't you choose _name or __name for your needs?
i didn't choose the names, they are taken from the java
my mod makes any field on any object readable with object.fieldName, for example with the class in question:
So you make it visible while it shouldn't be...
Hm...
Okay, I'll fix my mod.
That was a real mod conflict. 🙂
thank you!
I forgot to ask, does your mod expose anything more than what is available or does it make getting fields more intuitive? Maybe both. You have getClassFieldVal, getClassField, etc,. to grab those fields, but requires some extra code.
local name = type(typ.name) == 'function' and typ:name() or typ:getId()
it just makes it more intuitive, it's not something you can't do without it (though nothing any library does is technically something you can't do yourself) but it's a real pain to implement, and most implementations i've seen are not as well optimised as mine either
i decided to fix this issue just in case it came up in the future - i was just about to commit when i realised it's not true, they don't take priority anyway 😭
Admin could copy it to /ru, then translate the original to English.
It could be :getField("name") by design.
I don't think there will be a lot of overhead, since there are already calls and checks under the hood.
it's too late to change the design in any case, there's already a bunch of mods relying on it including ones that aren't mine
That's why I said "could"
I meant the past tense, not politeness. English is not my native language
Is it possible to have two trunks?
no i understand that's okay! just explaining why i can't change it now
hell yeh dude. good job ^-^
yessir thanks for the help man its really satisfying seeing it all work
i think you can make any part have a container, take a look at the trunk template
It's probably in a forgotten box with all the sledgehammers I've not found.
More seriously, you can quickly check which lua files mention "concretepowder" and look at those:
lua\server\Items\Distribution_BinJunk.lua:885: "ConcretePowder", 0.05,
lua\server\Items\Distribution_ClosetJunk.lua:212: "ConcretePowder", 0.1,
lua\server\Items\ProceduralDistributions.lua:13144: "ConcretePowder", 50,
lua\server\Items\ProceduralDistributions.lua:13145: "ConcretePowder", 20,
lua\server\Items\ProceduralDistributions.lua:13146: "ConcretePowder", 20,
lua\server\Items\ProceduralDistributions.lua:13147: "ConcretePowder", 10,
lua\server\Items\ProceduralDistributions.lua:13148: "ConcretePowder", 10,
lua\server\Vehicles\VehicleDistributions.lua:2916: "ConcretePowder", 10,
lua\shared\Foraging\Categories\Junk.lua:468: ConcretePowder = "Base.ConcretePowder",```
It does exist in B42 and I found it in the Muldraugh warehouses (the big one to the north and the slightly smaller one to the south)
Can I modify the GasTank capacity? I can't find anything related to it.
i think that's a property of the item rather than the part
setContainerContentAmount()
This is for amount. how much gasTank contains fuel.
so i guess setContainerCapacity()
is for max capacity?
https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/vehicles/VehiclePart.html
declaration: package: zombie.vehicles, class: VehiclePart
That's code not script -.-
I don't understand its structure, I've even tried looking at other vehicle mods. A Countach technically have two trunks, one at the front and one at the back behind the engine compartment and I don't know how to go about it. Do I need to paint both sides for the trunk mask?
I'm getting Object tried to call nil while attempting to call a method listed in the API...
Is it possible the method doesn't actually exist any longer?
https://projectzomboid.com/modding/zombie/inventory/types/Literature.html#setSkillTrained(java.lang.String)
declaration: package: zombie.inventory.types, class: Literature
Yeah, 99% sure it doesn't exist
Yes, just chance it int the GasTank part
{
container
{
conditionAffectsCapacity = false,
capacity = 95,
}
Guys, does anyone know of a mod that makes it possible to destroy the helicopter from the "helecopter event"? Or does anyone know if it's possible to do this?
That doesn't work, it throws me error.
Maybe possible but that's not a thing
@sour island is the mod creator
The mask is just used for the painting of damage/rust/blood and visualizing removed parts. If the another trunk is under the hood, the hood part of the mask covers that
I'm more interested in two trunks 😛
I think you can have them. Just in a different part, like albion said. Then just set the accessing area to the front of the car
Like a Seat?
For the accessing?
Can you show an example script?
I am going take a look
I just want to give a little gift to the helicopter pilot hehehe
Sometimes i say "its not possible to make it in PZ" but then i see someone making this....
Great work
I wish I knew how you manage to get a rate of fire like that 😄
Thanks
Does that mean we can expect a HMMW with working turret for more than 1 player?
The zomboid almost cries when I pull the trigger xD
100%
How does it even work, like every single rotation "tick for turret is separate model or is it animation?
I belive old Tiger mod did use model swap, but it looks too good for it, unless you really went rich with models for even small "rotation"
I'm going to put it in my M113 mod, everything is ready, I just need to finish the icons for the objects and some items, basic things
A humvee with a mounted mg is going to be beyond rad
Is it gonna be costly on resources if player decideds to use it, or more like for arcade type of playthrough?
I'd love to be able to use HMMW with mounted turret, but if its something that is cheap/has no cost to it that i have to work towards, its not really my cup of tea
OH, you're the autor of THAT mod.
Masks are for display of damage/rust as far as i know, you make the trunk locations accesible via vehicle editor.
I want to go for the "realism" side, something that cost , like having to find the machine gun separately from the vehicle in order to install it, and the ammunition being relatively difficult to find, but in a "significant" quantity as the consumption of ammunition is very high and it is not I want to ruin the experience
I know but if I have two trunks then that might be a problem cause there is only one color/mask ID for Trunk Lid.
I think engine and hood are tied together, also im not sure but i remember something about there being issue with enignes being on back, that caused it to take damage when hitting with fron of vehicle, but damage masks were applied where enginde/hood was, so you for example hit something with front bumper, but you get damage displayed on back, since thats what masks cover. Think something of GTA san andreas, where you could hit something with one end, and damage other end of vehicle.
Best practice to might be test out stuff
The two trunks could be something like this ```area TruckBed
{
xywh = 0.0000 -1.6914 1.1235 0.5556,
}
area FrontTrunk
{
xywh = -0.0309 2.0741 1.1235 0.5556,
}
template = Trunk/part/TruckBed,
template = TrunkDoor,
part TruckBed
{
itemType = Base.BigTrunk,
}
part FrontTrunk
{
area = FrontTrunk,
category = bodywork,
itemType = Base.NormalTrunk,
mechanicRequireKey = true,
repairMechanic = true,
container
{
conditionAffectsCapacity = true,
test = Vehicles.ContainerAccess.TruckBedOpen,
}
lua
{
create = Vehicles.Create.Default,
}
}
If you want to make the front trunk require opening, then you have to make custom ContainerAccess check function with lua that checks the door part for that trunk
Got it, thanks.
If the PZ development team adopts this jeans material..
I made it myself during the B41 version.
B42 Version's jean material 80%
Can someone please help me make sense of this. isoMovingObject is an instance of IsoPlayer, then getPlayerIndex() errors out:
[06-01-25 06:47:29.228] ERROR: General , 1736167649228> 480,793,067> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in cuttworenderlast at KahluaUtil.fail line:82..
...
local square = IsoCell.getInstance():getGridSquare(x, y, clickSquare:getZ())
if square then
for i = 0, square:getMovingObjects():size() - 1 do
local isoMovingObject = square:getMovingObjects():get(i)
if instanceof(isoMovingObject, "IsoPlayer") then
local movIndex = isoMovingObject:getPlayerIndex() --Why is this nil?
self:updateUserNameWithPlayer(isoMovingObject) --Why does this work?
end
end
end
...
I pass isoMovingObject to updateUserNameWithPlayer and it works? No error.
function crossHair:updateUserNameWithPlayer(player)
if player then
local clickPlayerIndex = player:getPlayerIndex()
end
end
I've been checking the script files of my car mods but I still don't know why the wheels get f-ed up. Can anyone help me with this?
It looks like the wheel's UV is messed up, but it hasn't been changed at all and it worked perfectly in Build 41
It just refuses to work correctly in build 42 for some reason
I'd suggest #modeling
this is more for coding stuff
(you probably can get answer here too but it'll be faster in other channel as modeling ppl hang out there)
@stiff fiber
I posted it there as well
But I feel like something is wrong with the lua code
Because there's nothing wrong with the model and the texture files
I checked the files of the vanilla cars but so far I didn't find any differences
Have you tried changing the wheel shader?
player:getPlayerIndex() is nil when you arent in Split Screen?
how did you come to conclusion that isoMovingObject is an instance of IsoPlayer?
zombie.entity.GameEntity
zombie.iso.IsoObject
zombie.iso.IsoMovingObject```
if instanceof(isoMovingObject, "IsoPlayer") then
hm
Not yet
try this one
basicEffect
yea fuck knows, you'll have to wait for Albion or someone else to answer that 
For real, its like wtf. Maybe this is the way togo:
local plrIndex = localPlayer:getPlayerIndex()
if plrIndex == nil then
plrIndex = 0
end
What’s your intent with the code and with retrieving the player?
Do you ever need it to not be the client player?
If not you can much more simply use getPlayer which I believe always returns 0. (Or possibly getSpecificPlayer(0), I reserve the right to defer to whatever Albion recommends if my ignorance proves too thick.)
by chance does anyone know if i am to place a container in the map when on debug/dev tool, will it spawn items such as the spawn ratio normally does for said containers?
Hi, I was wondering if you know how to hook the moment a character makes a lower attack to the ground (hold down ALT to attack or attack a zombie that is knocked down).
Half of the problem solved by myself. I was able to hook the lower attack against a knockdown zombie with the following. I am looking for a way to hook the lower attack while holding down the ALT key when there is no zombie.
local function OnWeaponSwing(character, handWeapon)
if character:isAimAtFloor() then
getPlayer():Say("Hit Floor!")
end
end
Events.OnWeaponSwing.Add(OnWeaponSwing)```
Each weapon has ground attack animation, right? You could hook your logic to that animation
hey how do I make it so traits are exclusive from each other?
setMutualExclusive doesn't seem to be working
getPlayerIndex() is a static method, you want either getIndex() or getPlayerNum() (they do the same thing)
Thanks for the reply, AimFloorAnim seemed to work for the decision so I tried the following but had two problems.
The first problem is that the lower attack (ALT + attack key) on the ground where there is no zombie with this Anim is true, so I can make a decision. However, I could not judge whether it was a swing or a stomp because a stomp against a zombie also became True.
The second problem was that for some reason I could not get the value from the AnimationVariableSlotBool object, and although the Java implementation looked like I could get it with “getValueBool()”, I got a “java.lang.RuntimeException: attempted index: getValueBool of non-table: zombie.core.skinnedmodel.advancedanimation.AnimationVariableSlotBool” when I executed it. I was able to reference the valu (m_value field) using Java reflection (=getClassFieldVal), but not sure why I could not call the Public method.
local function OnWeaponSwing(character, handWeapon)
local aimFloorAnim = character:getVariable("AimFloorAnim")
if aimFloorAnim then
if aimFloorAnim:getValueBool() then
getPlayer():Say("Hit Floor")
end
end
end
Events.OnWeaponSwing.Add(OnWeaponSwing)
I'll think about it again tomorrow, as it's almost time for bed, thanks.
Sounds like an option.
Or actually put all bandana like items as an array inside with the full name. Like the "visor" thing
AnimationVariableSlotBool is not exposed to lua, you cannot call its methods
use:
character:getVariableBoolean("AimFloorAnim")
This actually returns the boolean value
is there an equivalent to this in b42?
no
anyone knows how to bind a function to a set of controller key combination? Something like onKeyPressed event but for controller?
you can use tags[TagName] if you just want any item with a certain tag but being able to determine input items with a lua function is gone
Im new to modding/coding. Is anyone willing to help me setting up the Distributions.lua to implement my backpack to the loot table? atm ist only possible to spawn it via debug menu.
is there a way to programmatically change the tag? I'm kinda avoiding to change tags using script
not as of now
you can mess with the inputs directly from lua but i haven't seen exactly how people are doing that in b42
Do you want it to spawn as an empty backpack in some tables where other backpacks spawn, or do you want it also to spawn with some items in it?
Thx for your reply. An empty backpack in some tables where other backpacks spawn would be awesome!
Cool, that's a very simple insert, lemme get an example for ya
require 'Items/ProceduralDistributions'
require "Items/ItemPicker"
-- Gunstore
table.insert(ProceduralDistributions["list"]["GunStoreAmmunition"].items, "Base.556Box");
table.insert(ProceduralDistributions["list"]["GunStoreAmmunition"].items, 15);
-- Gunstore is just a comment, it doesn't do anything. It's just helping me look through the mess 😄
So the first require is something you will need, idk if Items/ItemPicker is totally necessary (I still have it because 'better safe than sorry')
That table.insert line there has GunStoreAmmunition but you can look through ProceduralDistributions for where other backpacks spawn, such as ArmySurplusBackpacks.
That Base in Base.556Box should be either Base, or whatever you named your module. For example in my tools & blades mod an item is not Base.AxeMaul but it's RainsToolsAndBlades.AxeMaul.
The second line with the 15 is a spawn chance. Again, look at the values that other backpacks spawn and tinker around until you get a figure you like.
Oh yeah and put the lua file into media/lua/server
Great! I will try that. And again thanks for your reply ❤️
template vehicle MR2FrontTrunk
{
part MR2FrontTrunk
{
category = bodywork,
area = Front,
itemType = Base.87toyotaMR2FrontTrunk,
mechanicRequireKey = true,
repairMechanic = true,
container
{
conditionAffectsCapacity = false,
test = MR2.ContainerAccess.FrontTrunk,
}
lua
{
create = Vehicles.Create.Default,
}
}
}
```What is `itemType`?
the item that should be installed for that part
Hi, how can I make an item appear in a backpack or in a pistol case or protective case?
https://steamcommunity.com/sharedfiles/filedetails/?id=3022905387 heyo im following this tutorial to try to get a test mod to appear in the mods menu but it doesnt seem to work. ive also tried another method using the mods folder thats in the same area as the workshop folder and ive also tried going into the media folder and putting the test mod there. the goal is to just get it to appear in the mod menu but ive had no luck. am i missing something here? build 42 unstable build
You'll need something like this, and then a table.insert for the pack/case itself
the file structure has changed in b42, see the pinned messages
What requires do i need? Distributions, Procedural, Suburbs and Item picker? Or vehicles too

Well, at least every one you plan on slapping your pack/case into 😄 I've got my guncases in all three
i wish they didnt put it in a thread
But that's to add your own pack or case, right? Or is it so that your own items appear in the vanilla case or backpack?
Ah yeah, correct.
If you want to add items to already spawning containers then that's a different thing.
Oooh
i got this
closest i have is like id=
yeah there
id=YourModNameHere
so change it to modid
no it's id
okay so i have that already then
Huh, what is that line?
id=LFbikes
weiiird
im going to test something to see if it helps
oh and yeah the mod.info needs to be in two folders, the main folder in "mods" and the "42" folder
alright thats probably the issue then let me try that out
nice that seems to be the issue. i got it to appear in the mod menu. question if im not making for build 41 do i just not have anything in the (mod name) folder besides the common and 42
Yeah if it's B42 exclusive you'll only need "42" and "common" in there
Guys is it possible to make a flashlight with a coloured light in B42?
Thoughts on this -4 point profession?
balance wise? i think -4 is very low
I can dig it. Farming being waaaaaay more difficult and time consuming (plus buggier than Starship Troopers) makes Agriculture +1 nice, Foraging +2 is maybe on the heavy side but in total, -4 points seems just fine to me.
Mod professions should be a bit better than vanilla ones. Otherwise no one's going to pick them anyway.
does zomboid run at a fixed tickrate or does it use deltatime
delta time
Changing default values of sandbox settings as a modder doesn't overwrite people's existing saves even if they didn't change the changed settings. Is there any way to bypass this, or do I need to make a guide for the players to go and find a mod that lets them
yeah, there's getters on the GameTime object, there's a few that vary slightly in purpose: https://github.com/demiurgeQuantified/PZModdingGuides/blob/main/guides/GameTime.md#cheat-sheet
there's no way to bypass it, the game doesn't know if an option is left on default or not
you *could* one time change the value on load save but that will affect people who had it that way on purpose too
Could I just have a "reset sandbox options" button that shows to admins or something though?
aka anyone in singleplayer and admins in servers
maybe foraging 1 with the existing foraging buffs?
Why not, yeah. Foraging isn't all that difficult to level up anyway. 🙂
maybe -3 or -2 starting points
Hey all, quick question:
If an item has a "MetalValue" but does not have a "HasMetal" tag, is that by design or a mistake?
I think metalvalue is for microwaves and hasmetal is for forging
Okay, might be the other way around but that makes sense.
probably
Just means I can microwave weldingrods without blowing the microwave up 🙂
gah I'm trying to port over a poster mod I had and my crafting coding isn't working bleghh
Yeah, crafting has been completely overhauled. I think someone did a pretty good job explaining the changes... Not sure who it was though, but its in this thread lol
fireman is neutral, carpenter is positive 1, lumberjack is neutral, burger flipper is positive 2.
Are you saying you think it should take away less or more points?
less, i don't think these skills alone are that powerful
Anyone know how to get/set the attribute "MetalValue"? I'm not seeing the function in the zombie_scripting_objects class
Thank you so much! It finally worked. Now its time to add more items to create an old-school camping gear mod 🚀
anyone know the name of the code file that has traits in it?
MainCreationMethods.lua
thank you!
💕
You making a trait mod?
how do I add the foraging values to the profession without overwriting the vanilla foraging values
yeah just as practice and also learning to read the code
Nice. GL
thanks! im gonna need it
having the file like this
forageSkills = {
botanist = {
name = "botanist",
type = "occupation",
visionBonus = 1.1,
weatherEffect = 33,
darknessEffect = 10,
specialisations = {
["Crops"] = 20,
["Berries"] = 15,
["Mushrooms"] = 15,
["MedicinalPlants"] = 45,
["WildPlants"] = 20,
["WildHerbs"] = 20,
["Fruits"] = 5,
["Vegetables"] = 5,
},
},
};```
makes it overwrite the vanilla foraging values, but if I try to change the forageSkills value it doesn't apply my foraging values
does zomboid have any sort of builtin raycast function?
try ```lua
forageSkills.botanist = {
name = "botanist",
type = "occupation",
visionBonus = 1.1,
weatherEffect = 33,
darknessEffect = 10,
specialisations = {
["Crops"] = 20,
["Berries"] = 15,
["Mushrooms"] = 15,
["MedicinalPlants"] = 45,
["WildPlants"] = 20,
["WildHerbs"] = 20,
["Fruits"] = 5,
["Vegetables"] = 5,
},
}
without the require?
oh it's formatted different
I'm blind
im slowly starting to understand this stuff and its so cool
i think formats fine
requiring a vanilla file never does anything, it's a misconception in the community
Making custom Traits is fun when you get them to work 😄
pretty sure the issue is you're requiring Foraging/forageDefinitions instead of Foraging/forageSystem
oh, really?
all require does is load a file if it hasn't loaded yet, and returns whatever the file returned
ooo look at this
no it's registering the foraging values, it's just replacing the vanilla file essentially
which is not what I want 🔥
all vanilla files load before all mod files and none of them return anything so requiring them doesn't do anything
oh i see
is your file name the same as the vanilla?
no
I like dialogue mods. Always could use more
burglar gets magazine armor thats sick
it's data related, when I change values in the file it stops replacing it, I'm gonna try what albion said
alr hope it works
yeah it works, thanks albion
OHHH i see my mistake
my reference was intending to replace all the originals
that would make sense lol
what file makes it so fireman/security guard have starting % in exercise regularity, and park ranger/lumberjack bonus movement speed through trees?
Quick question, is it possible to flag an item as globally unique so that it will only appear once per map?
check to see what home video vhs tapes do, those only spawn once per map
Speaking of VHS tapes, how does the game determine that COO+1 means Cooking xp in a tv/VHS show?
I'd like to make a VHS tape mod that adds 2-3 tapes per each new skill so they'd be a bit easier to level up, but how would I figure out what the short version of Butchering is for example?
Hello guys I have a small question, how can I access a public java field in lua ?
I can access to public method using the :method(), but how can I access to public field
staticObject.field does not work
is the class exposed to lua?
you can check it against the list in LuaManager$Exposer.class
if it's not exposed to lua you can't access anything from it directly
this warning is even more frustrating because it's just a lie
module A may have forgotten to import module Base actually means module B may have forgotten to import module A - it's the wrong way around *and* it always says base no matter which module it actually is
the class is indeed exposed, and I also have the instance,
But cannot use their public field, what is the syntax in lua ?
there is none, kahlua does not expose fields
you can read them with object.field if you have my Starlit Library installed, but there is no way to write to them
there might be a function that lets you alter the field but you can't do it directly
but that's straneg we can access public method but not public field
Anybody try Chuck's "zombies hear your microphone" mod yet?
👀👀
Love this comment in the Indie stone lua file: " -- Lua seriously needs a "continue", and yes, i refuse to use goto 😄
"
the park ranger/lumberjack tree movement is hardcoded in the java somewhere
Same with exercise regularity?
Is there a way to mimic it in a mod?
Hey, y'all
Do I have to keep all the sounds for sound replacers, including ones I don't change, or can I delete the ones I don't want to change?
I'm completely out of space from extracting all the sound effects
Literally 0 bytes left
I can't even record the sounds to replace with anymore
if you have to replace the sound banks, yes, you need to put all the sounds in there
Well shit
Idk what I can delete
I don't think I even had enough space to extract all of the files to begin with
Alright, turns out shadow copies or something took up 3 GB of space so I have enough to work for now
is desensitized hardcoded or can i replicate it
Traits are all hardcoded I think.
aaaandd I somehow broke pz as now it's stuck on the script loading screen
does anyone have the code for SpriteRenderer.renderClamped with rough variable names? it has like a billion variables and i cant tell what any of them do
Reworked the distribution wiki page, it will have explanations of loot generation as well as better examples to inserting your own loot into and some methods to fixing loot generation due to the addition of too many items by mods
https://pzwiki.net/wiki/Procedural_distributions
Does centerOfMassOffset affect the vehicle's physics?
Could someone explain to me how to make a car armored, or not break easily, I would like to add it to my mod
Is the script for zombie behavior a LUA file, and if so where is it stored?
nop
Full java sided
There's some bits which allow custom behavior but it's not easy
If you want custom behavior I'd suggest checking out Bandits
I want to adjust zombies so when they pathfind around large fences they dont wander to a spot on the other side, thus going on a long journey thats hard to predicr
You may want to check this out
Oh haha
It says its a java mod
if it works maybe we could promote it to TIS.
Ah rip lol
hey guys
does anyone have some docs for b42 craft recipe script?
the wiki currently only has the docs for the stable version
Currently no there isn't
i hope the devs fix this at some point i think its honestly like the biggest problem with zombies right now
alright thx
are the recipe scripts files in the game install dir?
yea
could you give me the path pls?
In ProjectZomboid/media/scripts
thx bro ❤️
.
I do not mod this game but it wouldn't be there if it didn't do anything. And given how interestingly advanced the handling model is, I'd bet on: yes
I'll assume there are XYZ offsets, in which case that acts as a de facto way of assigning weight distribution.
Been working on B42 recipes for the past couple days. I only got a single crafting recipe to work out of a couple dozen. If you figure it out, lmk?
How hard would it be to change the container volume of the shipping containers from KI5?
I got zero modding experience for PZ. Would like a custom nerfed version for a server.
does anyone know a mod that uses SpriteRenderer's functions i could use as reference?
Well, I finally found some concrete powder in the electromax warehouse, as you said it is as rare if not rarer than a sledgehammer!
For me, I've not seen a sledgehammer or four-color pen in hundreds of hours of B42.
But I found skinny leather pants in the first 15 minutes, something that took over a thousand hours before I found them in B41.
Found a sledge in this warehouse, but in the 100 hr I have in my playthrough it is only the second I have found. Haven't seen a four colour pen at all either.
Took me several days to find any sort of decent pants and prescription glasses!
A Sledge is less eesential now you can disassemble securty shutters witha welding torch
(or use the lockpicking mod, but that's not balanced at all)
Bingo, it's really mostly a necessity for large complexes or shipping containers
I feel like a solution would be to just give them a maximum distance they can go per each 'wander'
Like if a zombie decides it wants to wander to a position lightly north, but the pathing distance to that position is unreasonably long, cancel it and try again
Is there any events or parameter which is firing when player finished to read book or/and page?
I couldn't find any
no, but reading is a timed action so you can hook into it
that's a great Idea thanks!
I have a question, in this case, do you mean i don't have to require vanilla function? Sorry if i missed from your point, but you said "never" so i'm worried if I used useless line.
Maybe i can test later when i back to home, but my curiosity is insane right now XD
require "ISUI/ISInventoryPaneContextMenu"
local vanillaPaneContextMenu = ISInventoryPaneContextMenu.createMenu
ISInventoryPaneContextMenu.createMenu = function(player, isInPlayerInventory, items, x, y, origin)
-- My function to edit a part of vanila function
-- Hook for anything else which i didn't edit
vanillaPaneContextMenu(player, isInPlayerInventory, items, x, y)
end
yeah, the require doesn't do anything
guys, will this better for performance?
function CF_triggerEvent(player)
if not player:isAlive() then return end
if player:isAnimal() then return end
if player:getHealth() < 90 then
Events.OnPlayerUpdate.Add(CF_regenSpeed)
end
end
function CF_regenSpeed(player)
if not player:isAlive() then return end
if player:isAnimal() then return end
local health = player:getHealth()
health = health + 0.01
if health > 90 then
Events.OnPlayerUpdate.Remove(CF_regenSpeed)
end
end
Events.OnPlayerGetDamage.Add(CF_triggerEvent)
than below?
function regenSpeed(player)
if not player:isAlive() then return end
if player:isAnimal() then return end
local health = player:getHealth()
if health > 90 then return end
health = health + 0.01
end
Events.OnPlayerUpdate.Add(regenSpeed)
Or it's completely useless? This is short version of my function, so i'm wondering if it's better when using by huge function.
yeah, check dms
i just try to avoid using OnPlayerUpdate because it fires function every ticks.
Better to refuse the code ladder.
if v.type == "Animal" then
handleAnimalZone(file, v)
elseif v.type == "Basement" then
handleBasementSpawnLocation(dirName, v)
elseif v.type == "Mannequin" then
handleMannequinZone(file, v)
elseif v.type == "RoomTone" then
-- handleRoomTone(file, v)
elseif v.type == "SpawnOrigin" then
handleSpawnOrigin(file, v)
elseif v.type == "WaterFlow" then
handleWaterFlow(file, v)
elseif v.type == "WaterZone" then
handleWaterZone(file, v)
elseif v.type == "Region" or v.type == "BuildingName" then
could be
local fn = SOME_FN_TABLE[v.type];
if fn then
fn(v)
end
ChatGPT (it's not tested, I've asked just an idea):
-- External variable that tracks whether regen speed should be updated
local regenNeeded = false
-- Function that will be called when the player takes damage
function CF_triggerEvent(player)
if not player:isAlive() then return end
if player:isAnimal() then return end
-- If the player's health is less than 90, enable regen speed
if player:getHealth() < 90 then
regenNeeded = true
else
regenNeeded = false
end
end
-- Function that will be called on each update
function CF_regenSpeed(player)
if not player:isAlive() then return end
if player:isAnimal() then return end
-- If regen speed needs to be updated
if regenNeeded then
local health = player:getHealth()
health = health + 0.01
-- If health reaches 90, stop the regen speed
if health >= 90 then
regenNeeded = false
end
end
end
-- Add event listeners
Events.OnPlayerGetDamage.Add(CF_triggerEvent)
Events.OnPlayerUpdate.Add(CF_regenSpeed)
The idea is that both events are initialized only once.
Actually I'd add a table with players to avoid checking isAlive and isAnimal in OnPlayerUpdate.
There is something like OnPlayerDeath for sure.
oh yes using flag must be better 🙂 thanks for the pointing.
but what I wanted to ask is about Events, mean:
- if I remove
Event(OnPlayerUpdate)when it's not necessary will it helps for performance? - or it does nothing since we return the function earlier by
if health > 90 then return endeven it fires function every ticks
sorry for unclear question before 😬
It helps but there is some overhead
I see, thanks for sharing your thought 😉
The main thing will be in debug mode if you want to "reload" just one lua file. It's fine if you have simple initialization, PZ will drop old event function and assign new.
yours is better, the chatgpt one is the worst of all three
additional information) why I asked that question, that's because I hate using tick events. I also don't use EveryOneMinute because potato PC player can be experience frameloss by that too as I'm aware.
But there's limitation to EveryTenMinutes. like regeneration speed function should be tick based otherwise player may feel discomfort if I use TenMinutes event.
btw For now, I'm using setHealthFromFood() to control regen speed
So you meant the first one which has OnPlayerGetDamage event, right?
Anyone know how to make this functional truck door?
template = CountachFrontTrunkDoor,
part FrontTrunk
{
area = FrontTrunk,
category = bodywork,
itemType = Base.SmallTrunk,
mechanicRequireKey = true,
repairMechanic = true,
container
{
capacity = 15,
conditionAffectsCapacity = true,
test = Countach.ContainerAccess.FrontTrunk,
}
lua
{
create = Vehicles.Create.Default,
}
}
function Countach.ContainerAccess.FrontTrunk(vehicle, part, character)
if character:getVehicle() then
return false
end
if not vehicle:isInArea(part:getArea(), character) then
return false
end
local FrontTrunk = vehicle:getPartById("Base.CountachFrontTrunkDoor")
if FrontTrunk and FrontTrunk:getDoor() then
if not FrontTrunk:getInventoryItem() then
return true
end
if not FrontTrunk:getDoor():isOpen() then
return false
end
end
return true
end
In the past I was trying to make something like OnEverySecond but not all in one moment.
local OnTickEngine = nil; OnTickEngine = {
version = '1.0',
fn_real = {},
idx_real = 0,
save_now = 0,
hours = 0, --from world creation
EveryRealSecond = function(self,fn)
table.insert(self.fn_real, fn)
end,
main = function()
local self = OnTickEngine
if self.idx_real > 0 then --every tick new function
if self.idx_real > #self.fn_real then
self.idx_real = 0
else
self.fn_real[self.idx_real]();
self.idx_real = self.idx_real + 1
end
return
end
local now = os.time()
if now - self.save_now > 1000 then
self.save_now = now
self.idx_real = 1
self.hours = getGameTime():getWorldAgeHours() --TODO: optimize
end
end,
oninit = function(self, global_var_name)
_G[global_var_name] = self
Events.OnTick.Add(self.main)
self.is_client = isClient()
self.is_server = isServer()
end,
onremove = function(self)
Events.OnTick.Remove(self.main)
end,
Install = function(self,global_var_name)
if not _G[global_var_name] then
return self:oninit(global_var_name)
end
local g_obj = _G[global_var_name]
if g_obj.version >= self.version then
OnTickEngine = g_obj
return --already initialized
end
--Must be replaced
if g_obj.onremove then
g_obj:onremove()
end
self:oninit(global_var_name)
end
}
OnTickEngine:Install('GlobalOnTickEngine')
But I never published it (except now).
.
This is a kind of optimization for OnTick, but there are also many non-obvious shortcomings that will lead to problems in the long run.
Do you mean you tried to make a own event for better OnTick?
currently that's like something I can't understand tho.. 
I'm gonna do some study with your code.

Yes, the usage should have looked like this:
GlobalOnTickEngine.EveryRealSecond(my_function)
I think I'll finish this thing and then publish it.
It's not very good right now.
yes: adding a function to an event is extremely cheap, i wouldn't worry about its cost, especially comparted to doing anything ontick
you may want a flag to prevent adding the event more than once though
I've played with Events.XYZ.Remove and reloading the lua file before. It's not as simple as it seems.
fellas does anyone know how to just draw a sprite to the screen i've been at this for hours and cannot figure it out
I've never experienced any issue from removing event listener, to be honestly method below is what I've usually used.
but it's quite surprise that it could make an unexpected error.
Later when i encounter issue, than i must gotta check that too. 😮
@bronze yoke @dark wedge
Thanks for your all advices. I was able to determine the lower attack with the weapon!
local function OnWeaponSwing(character, handWeapon)
-- getAttackingWeapon always returns not null
if character:getVariableBoolean("AimFloorAnim") and character:getAttackingWeapon():getType() ~= "BareHands" then
getPlayer():Say("Hit Floor using weapon")
else
getPlayer():Say("Not Hit Floor using weapon")
end
end
Events.OnWeaponSwing.Add(OnWeaponSwing)
Only in debug mode and only if you reload a single file. It's fine if you reload entire lua or if a player just uses your mod.
ah i understood. and i can imagine why. thanks for detail 🙂
i noticed b42 has a lot of code intended to avoid the reload events issue
i haven't had a chance to try it but it may not be a concern anymore
Alright! I need help. I can NOT for the life of me get an instance of InventoryItem from an Item.
I'm trying to get the metal value using InventoryItem:getMetalValue() but I cant get an instance of the InventoryItem from the Item class.
I've tried using this:
InstanceItem(arg0: string): zombie.inventory.InventoryItem;
But that just makes the script go boom boom. Also, not sure what argument I should be passing it. I've tried item name, the item object...not sure what else to try.
InstanceItem("Base.Something"):getMetalValue() ?
Btw, is it even possible to have a console in the main menu?
Do you mean F10?
or finger print window?
I mean Lua console where you can type and run something
some single line code
like print(123)
I don't think it's possible in Vanilla PZ, I mean, there's no function to pop-up the window.
So, I am trying to hook a Java method. I do this in LUA all the time hooking functions but never have i tried to hook a Java method. Is this possible? I am trying this but nothing seems to happen - no errors either.
-- Store the original method.
local originalAddWorldSoundUnlessInvisible
-- Override the `addWorldSoundUnlessInvisible` method.
local function overrideAddWorldSoundUnlessInvisible(self, soundRadius, volume, flag)
--if not self:isInvisible() then
WorldSoundManager.instance:addSound(
self,
math.floor(self:getX()),
math.floor(self:getY()),
math.floor(self:getZ()),
soundRadius,
volume,
flag
)
--end
-- Original method to ensure original behavior is preserved.
--if originalAddWorldSoundUnlessInvisible then
-- originalAddWorldSoundUnlessInvisible(self, soundRadius, volume, flag)
--end
end
-- Define the function to execute on game start.
local function onGameStart()
-- Save a reference to the original method.
originalAddWorldSoundUnlessInvisible = IsoGameCharacter.addWorldSoundUnlessInvisible
-- Replace the `addWorldSoundUnlessInvisible` method with our override.
IsoGameCharacter.addWorldSoundUnlessInvisible = overrideAddWorldSoundUnlessInvisible
end
-- Add the game start event handler.
Events.OnGameStart.Add(onGameStart)
it is possible, but it will only affect lua calls to that function
Damn
I guess its very situational. I am trying this method for example, but there is nothign I can do to change the variables or return values of the method or anything to impact the Java side?
-- MUST be the name of the class calling the method, not the class the method is actually defined in
local index = __classmetatables[IsoPlayer.class].__index
local originalAddWorldSoundUnlessInvisible = index.addWorldSoundUnlessInvisible
index.addWorldSoundUnlessInvisible = function(...)
return originalAddWorldSoundUnlessInvisible(...)
end
So, you can impact Java in that you must override for every class the method is used in? Or, In that case - the code you wrote, it is only impacting LUA calls?
Hi, it seems like when transfering items and they change their uses then they can simply disappear. Maybe it happens only when they deplete.
Any ideas what to do about this? Sounds like a game bug.
it only impacts lua calls
java calls don't go through lua so we can't really do anything to affect them
is tsarlib updated to 42?
InstanceItem() is a function of the Item class. You cant call it directly
is setVariable on zombie like getModData? If so, does this info stay on them whether or not they're dead?
When I modded Terreria, we could use reflection for cases like this. Never got to that point since there is so much more you can do with the PZ API.
I am not sure how pipewrench works, but does it allow hooking Java code proper?
no, pipewrench just compiles to lua
it lets you write in typescript but it is ultimately lua modding with an extra step
getModData returns a table, setVariable sets a variable. No the variables are not persistent.
-- at the top level of your lua file
local SM = getScriptManager()
local SM_CACHE = {}
local function GetMetalValue(full_type)
local metal_value = SM_CACHE[full_type]
if metal_value then
return metal_value
end
local item = SM:getItem(full_type)
if not item then
SM_CACHE[full_type] = 0
return 0
end
local str_value = tostring(item:getScriptLines()):match("MetalValue%s*=%s*(%d+)");
metal_value = tonumber(str_value) or 0
SM_CACHE[full_type] = metal_value
return metal_value
end
-- Example
print(GetMetalValue('Base.SheetMetal')) -- 80
print(GetMetalValue('Base.SmallSheetMetal')) -- 20
print(GetMetalValue('asdfgh')) -- 0
Damn, well, is there any way to make persistent data like that? I have an old mod that I stopped working on because I tried using a "Token" item that'd track whether or not the zombie was "tied up".
I can't imagine this is impossible but I don't know what method works
are you in B41? I believe it has turned into global function from the B42
Maybe you can use global modData and doggy's library to track the zombie?
not an expert on this
Interesting...
is there a scripting tutorial or something out there that I'm missing lol
Global, meaning Exports?
https://github.com/asledgehammer/PipeWrench/blob/6641214bafe7e2713ea204d4a9bdb7a10c88500c/PipeWrench.lua#L312
Well, I just invented it, on request. I didn't know the solution beforehand.
oh hell, i need someone to update tsarlib for b42 XD
sorry i don't know what is PipeWrench and what it means, but for me,
function nothing()
print(instanceItem("Base.Something"):getName())
end
is just working.
So i thought getMetalValue() would work too.
PipeWrench is the game files decompiled
that's not what pipewrench is...?
i guess this is the file where pipewrench keeps java api
pipewrench is a typescript modding platform for zomboid
PipeWrench is a set of TypeScript definitions for both the Java API and Lua codebase for the game Project Zomboid.
if you just want to look at the available functions, the javadocs should be far less annoying to browse than this https://demiurgequantified.github.io/ProjectZomboidJavaDocs/
God bless you sir.
hello, how do i delete items from spawning in the game? I've deleted some guns from items_weapons but it doesn't work
I suck at coding. In fact i know little to nothing about coding lua.. Can someone. Help me with this 👉🏻👈🏻 i made a truck and a storage box.
dem wheels.
The brute force way would be to delete those guns from ProceduralDistributions.lua, Distributions.lua, and VehicleDistributions.lua too I guess
I'd like to help you but I know nothing of making custom vehicles spawn in. 😄 Why don't ya subscribe to some other B42 vehicle add-in mod and "study" its lua folders?
Im on my 6th etempt to do just that actually 💀
this wiki may help you.
https://pzwiki.net/wiki/Procedural_distributions
Mkay. Want me to turn that box into a hat? 😄
Lol yeah XD
Gimme dat fbx then
So.... Item:ActivatedItem?
You might be able to set that to False
Oh that function is what i've never heard and seems very useful when i just searched
Its not a function, its a field
declaration: package: zombie.scripting.objects, class: Item
for me, everything is function XD function started with . , function started with : 😆
lol
tbh, i don't know how can i call "things" in English..
Its all good
🙂
The existence of this thing has given light to my life.
DUDE! IKR! Someone just posted it here to me.
@bronze yoke is legend!
After : there is always a function but after . there MAY BE a function.
If it's an object it contains only functions (w/o starlit mod), and if it's a lua table it usually contains strings/numbers/booleans.
i made it 🙇♀️
btw item:getName() equals to item.getName(item)
interesting. thanks to let me know. those additional description always help me to step forward. cheers
I've figured a way past the "it's impossible to carry more than 50 weight" limitation!
It also bypasses the weight restrictions on container capacity too
from lua??? sick
Yes, all done from lua. Right now by directly editing LUA files, so I need to convert to a mod that does function replacments
So I can finally install "outside table(1/4) ... (4/4)" now? 🤣
I can probably also make it work independently for main player inventory vs. containers so they can be toggled seperately.
Along with a dozen antique ovens and a fridge or two.
anyway that's an awesome finding dude
So mod plan: Put Anything in Anything.
Three options:
- No weight limit player inventory
- no weight limit every other inventory (except floor)
- bypass item type limits. (acceptance functions)
...I should probably take a break first because I sat done six hours ago and "surely it can't be that hard to find the hard coded limit, I'll do that then eat" was very incorrect. 😂
It's weird that the java code has these size limits built in when you ask "how much can I put in this?" or "will this fit?" but when you call AddItem() the Java doesn't care what it is or how heavy it is,
So that's why in B41 we could do mechanic work on 100 cars and never drop a goddamn thing 😄
i would reccommend maybe a "bag of holding" mod instead. a carryable item (like a backpack) that has infinite carry space
i would probably recommend against the accept function bypass since that's going to break a lot of mods and the users probably won't think about that
I could just have the option make the vanilla accept function all return true.
That way there is no probelm with any custom accept functions
Harder to implement, but not impossible.
all you have to do is make sure they have the itme in their inventory, adn that they are addingit TO that item.
that's actually really easy.
then you just call your function.
There are 7 different places in the code that need to change to get around the limits
what all is needed to start making armour for the game? Are there any plugins or is it inherently compatible with blender?
Where's the player/zombie skeleton files so that I can weight the models?
And weird cases, like when I first got past the limit it woudl only work if you dragged multiple items and one was small enough to fit.
its for B41 tho so i have no idea if it's still working
it do.
thanks, I'll look into it
How about:
- mod edits the vanilla functions to call NepCustomDoesItFit().
- Based on sandbox options, NepCustomDoesItFit() can:
- always be true (other than floor, which is a special case)
- be true if it's the player's main inventory
- be true if it's an equipped container
- be true if the container object is in a whitelist (Bag_SchoolBag, etc)
Otherwise it passes through to the default java check.
That should give everyone the flexibility to get infinite space where they need it.
And for now I'm ignoring the limits on putting stuff on the floor and the multiplayer-specific world container limits, because they may have performance reasons. They really if that's the case the floor should care about the number of items, not the total weight.
It also avoids having a dedicated "infinite backpack" item so people can use whatever bags they like and I don't get lots of requestes for "make your backpack work with <backpack adjusting mod> plz"
Does crafting take into consideration your corresponding crafting level? Like if my smithing was super low verser super high. Would I make better weapons?
At the moment, no.
Hmmm, k
It also doesn't care if you use a proper tool or a rock tied to a stick, as long at it meets the recipies criteria
Okay
I hope that changes with the full crafting update
Instead of "level 9 smithing to make a machete" it would be "level 3 smithing to make a machete, but until you get to level 9 you're making one with worse stats/lower condition than a proper factory made one"
Definitely, I'd hold off any mods that affect the crafting system unless they are really easy to make so you don't feel like you've wasted effort when the update happens.
For a one-line joke mod this has gotten more comments and awards than anything else I've ever done:
new parameter will be good with your idea. minSkillRequire / maxSkillRequire and We can control details(Sharpness, durability...) with OnCreate.
Needs Realistic tag
dumb and dummer
I-Remembered is a disinformation merchant
Yeah, I was thinking tiers.
If factory is an 8
lvl 1 - 3 gives you a 1 to 2 item
lvl 4 - 6 gives you a 3 to 6 item
lvl 7 - 9 gives you a 6 to 9 item
lvl 10 gives you a 8 to 10 item
Agent of Big Milk trying to keep the secret of chocolate milk production from the masses.
could maybe do a work around by having somewhat duplicate recipes that have better outcomes based off higher requirements
at least until it's changed
"Trio 5 Jan @ 12:26am
Strawberry milk from pink cows when?"
^I second this
but if I'm a player, I'd not use the mod which has 10 recipes for a knife.
10 seems a bit absurd for a single item, even considering tools/skill
you can just do this in an oncreate function without any weird duplicate recipes
Would also be a pain to have ten different knife items, or worse to have ten identical looking knives and try to work out which ones have the better stats.
Setting start condition would be easy to see (that's my 90% dead machete!) but also an issue if you craft a repairable item and just repair it to full condition.
...I'm not even sure if any forged items are repairable, I think blades are "disposable" now
oh I just realized the building menu have different recipes which will be changed by player's level, like level 1 door / level 3 door, We can also use them maybe?
I think those create different world items
so no in craftRecipe? 😢
So it's back to the issue of inventory clutter with knife (level1) knife (level2) and knife(level3)
Oh that's different problem i guess. anyway i got your mean. I was talking about 10 recipes XD
I really like the idea, I just can't think of a way to make it work with current capabilities that won't be aggrevating.
In B41 with the Blacksmithing system enabled, I'd just make crappy and broken forks and stuff to level up, then re-smelt them for more metal, then craft my actual items 😄 It's silly but eh, back then it worked
FYI: 4 chunks of iron -> large knife blade -> smelt -> 4 chunks of iron
Most things give you back less than you put in but you can grind large knives as long as you have fuel.
Something I hope they fix/add is that all metal items have a MetalValue. Even if its equal to 1. It doesnt make sense to me that you cant meltdown and empty propane tank...
Relive the glory days of levelling smithing in Skyrim. 😂
Iron daggers zomg
There's a "Metal" or "IsMetal" tag, not sure how it works with smelting
Another option is add a recipe to convert <thing> to scrap metal with a Tag:metalsaw
Yeah, not sure either. There is a MetalValue and HasMetal tag. I think one is for smelting and the other is for microwaves...
I was looking at my pile of old car parts and thinking about that before I kinda burned my base down.
But it shouldnt be one or the other, it should be both or none... in my book.
Spend a day with a hacksaw, get scrap metal to smelt.
yep I'm pretty sure metalValue is only for microwaves
Yeah, see that makes no sense to me LOL
physical characteristics could work, or descriptors.
Shoddy, Rudimentary, Standard, Good, Excellent
You would think the MetalValue would be the amount of metal you get from the item when you smelt it.
I think devs just forget they had metalValue with their parameter or how?
Tooltips! They rule
what doesn't rule is my water shutting off on 7/13 😡
Can I have the player say something that can only be seen by them?
"Say" says it for everyone around
Can you whisper to yourself? 😄
HaloTextHelper.addBadText(self.character, getText("ContextMenu_TooDark"));
I saw this before
You can rename items with OnCreate; that's how the various schematics get their names.
it plays when player is reading but world turned into too dark
nice
If they patch it, we add it back in
declaration: package: zombie.characters, class: IsoGameCharacter
I thought "not able to rotate your head while sitting" is the bug one...
😢
also after you cancel the action, your character stays facing the direction they stopped at
why do clean rags weigh 0.2 and dirty rags weigh 0.1
shouldn't it be the other way around? why does cleaning them make them heavier
Because realism and balance
hard water is why
Also you can take money out of wallets but you can't put money back in 'em. (I did fix this one though lol)
is there a mod that changes this very small detail that most people probably haven't noticed?
Making voice mods, can there be any amount of sound clips in one category (like yelling) or is there a set amount?
I saw the TLOU Ellie voice mod had a whole buttload of sounds in it. I haven't tested it yet though
That also reminded me. Where's the Duke Nukem B42 voice mod?
if there is a limit then its really high
one of my sounds has 180 clips so its probably fine lol
lmao nice
Why do we put so much effort into high quality mods when silly jokes gets all the love? 😆
the people need chocolate milk from brown cows
Now you really do have to update that mod with a pink cow that gives strawberry milk
And boomalopes. Yellow deer you can milk for fuel that explode if they die.
And of course the Monty Python rabbit
YES
I'll help with the custom cow breed if needed, but it must happen
What about a mod that adds a bunch of colored cows and allows the milking products to be configured for each?
Or just a bunch of colored cows so people can spend time looking for the Strawberry Milk cow in among the coffee cows, cola cows, whiskey cows and tainted water cows.
realistic cow overhaul
There are so many liquids!
lighter fluid cow
...but no strawberry milk, that would need to be added.
finding a gasoline cow actually sounds really funny
be careful with flames around this one!
Imagine if the offspring produced a mix of fluids, so your long term goal could be to beed a vodka & redbull cow.
Gotta wait for Sapph to update the cooking mod. It had strawberry milk
meticulously breeding the 'water with an undetectable amount of bleach' cow in preparation for multiplayer
It will never catch on.
a cup = 0.2 (weight), and capacity = 200 mL;
the cup with water = 0.4
-----------------
correct
a cup = 0.2
the cup with petrol = 0.4
-----------------
incorrect
petrol is lighter than water
New fluid system fixes this - for updated items they weigh mass of item + mass of fluid.
wait until you hear about this game called rimworld
reminds me of the classic
Beware the Aqua cow...
It's about build 42
Not all items use the new system yet
can a potent poison bull and a pineapple soda cow really be together
I think it's great that it's so closely colored to seltzer water
Or I'm mixing tings up and the fluid system is badly bugged
ah, I see - there's no density property for fluids.
Everything is the same as water, 1 encumberance per Litre
It must be fixed!
New here; was wondering if this would be the place to discuss a simple mod idea with people far more talented than myself.
Yes.
Body Bags for B42
I'll let you know if I can find anyone talented to help. 😂
Very cool idea. 🙂
I like it.
I wonder if it is possible to make CUSTOM fluid...
Nice way to give downed survivors some respect in their burial.
Should be, they are just defined in text files like most objects
I was also wanting to go full CDC in a hazmat suit and collect/dispose of all the bodies, but dragging them all is such a pain
Would also be kinda gruesome if you found them sparsly and then find more and more the closer you get to where military are posted up
There's even an IsVanilla() property for fluids, that probably is about telling which fluids were added via mods but it could be a way to identify vanilla flavouring.
First challenge I see with the bodybags is I'm not sure there is anyway to put corpses in a container now, they are special draggable things.
But the game files usually use objects like Fluid.Petrol.
declaration: package: zombie.entity.components.fluids, class: Fluid
Add a context menu if the corpse is near? Right click - put body in bag
Also I can't find in lua files fluid window. I guess it's not in lua
This was my thought too.
But if that can be fixed, I'd say you need to make a bag(easy) with an accept function to only store bodies (easy) and a recipe (easy), add graphics/3D model (probably easy if you can do some modelling/artwork) and adjust the bury-in-grave function
Maybe make the bag draggable like corpses? Not sure how draggable things work, or if they are hardcoded to bodies.
I also know that TIS gets all icky about right click menus but gosh darn it I like them a whole lot more than the new "bury your entire screen" menus
There needs to be some way to decide what shows up in right click menus - like there might be a hundfred recipeis that use a knife, but "sharpen knife" is probably one I want to show?
And right click for non-recipe actions is probably not what they are trying to eliminate
yeah, there's definitely a pretty big regression there
I see bagging them as the way around the time consuming drag cycle. Perhaps an "equip in both hands" to reduce the weight would be the play.
a lot of stuff that technically was a recipe but nobody thought of as one is now in the crafting menu only and nobody can find them
Yeah, like "put battery into torch"
though I think that one is still on right click
most cooking stuff too
cooking is annoying right now - needing a seperate water source etc
Slice bread is in the silly new menu and PZ characters are so redacted that they need a surface to do it
I'm back to right click -> autocook salad with the autocook mod.
i know someone in here the other week was trying to figure out how it works but idk how far they got
I've tried to work out how to stuff animals into bags lol
I shouldn't need a livestock trailer to bring two chickens across town.
Mkay, for sure a future mod: Barrel of Monkeys
Well at any rate, if anyone's willing to work with me on the Body Bag thing, shoot me a DM. If I gotta model things in blender and texture it myself so be it that's fine, but I'm absolutely new to Zomboid modding and have no idea where to begin.
or you can ask something here too.
I suppose that's fair too- I am admittedly nervous haha
don't need to be worried even it's too basic, like "How to add my item in PZ" things...
Bagged bodies I'm guessing reduces the corpse sickness effect by 90% or something?
What would be my first step?
What is the 3D model file format?
Is there somewhere I can nab an example mod to look at how the files are organized? Is it super Plug&Play or do I need to set something up to inject/overwrite files.
What can I expect when it comes to scripting things?
Where is blood🩸 as fluid 🫗 in vanilla?
More of a method of picking them up and transporting them long distance. At this rate it's more likely that bagging a body transforms it into an item/container that holds the corpse's inventory- as said I'm super new to this but even I'm not sure how big a pain in the butt it would be to apply corpse sickness effects to a placed item.
Can someone please help me?
- Set up a mod folder in your users/yourusername/zomboid/workshop (i can link my own attempt at a "guide") https://steamcommunity.com/workshop/discussions/18446744073709551615/595136186401457970/?appid=108600
- .x or .fbx so Blender works fine
- You can use any mod you've subscribed to as a guide too. Just don't re-upload anyone else's stuff. It's your local copy, you're free to do whatever you want to it
- Scripting items themselves is pretty straightforward. They're .txt files. Special actions will require lua functions though
im still confused about the b42 folders
so basically we add folders named version number
and when pz updates we add another folder with a different version name?
so we clone the same files over and over again?
otherwise we delete file and we all know deleting files is bad for servers cuz it causes mismatch
It's to avoid cloning files.
Build 42.1.7 will look in common, then 42, then 42.1, then 42.1.7
And use only the most specific file
Oh right yeah when B43 drops in 2082 it will need a new folder 😦
More likely, you'll have code for B42.0.2 and then one file will need to be changed for 42.0.3
i was talking about 42.xx
not a mistype in 2082 🙂
not 43
Someone is optimistic about B43's release date! 😆
I've kept my mods just in a folder named 42 and they work great
That's me!
For now, that's fine
and thats like cloning the file right?
put everything in 42, and only worry about it if a future patch needs a file to change
Yesno but no but also yes.

B42 broke everything. So it wasn't a copy+paste for any of my mods. Way more tedious line-by-line stuff
damn i havent checked anything so i have no idea what broke tbh
im aware about recipe
but thats all
oh and map i believe has problems too
Every script.txt, almost all custom lua, some of vanilla lua, and a buttload of other things
I think we need a specific GPT for each simple question, so people could talk and ask forever whatever they want in the context of that question.
PZ_GPT?
No, for each SPECIFIC question, e.g. PZ_Folders, PZ_Events etc
If so, it's possible to put all the info in system message, and the GPT will be real guru.
You could give a GPT a huge context file with up to date lua and implementation instructions
Or we could do what we did in the olden days: document those things and direct people to the documentation.
Instead of trying to make large language models hallucinate only valid code.
In this case, there is a risk that GPT will not find the necessary information, because it is not "in front of its eyes". And it searches relatively poorly.
Let's direct them to a library. You know, an actual library.
AI can be a great help, but the current generation is not good for "here's my idea, do all the code work for me"
not exactly
I'm so old I remember when software was distributed in books and you would type the programs in yourself and save them on audio cassettes.
So is mine 
files will only be loaded from the common folder and the best matching version folder
so anything you do keep in version folders needs to be duplicated for each version
So it picks one folder for all files, not the best folder for each file?
So I'm still wondering what exactly is PZ doing to load AnimSets?
Since it won't look for them in 42 or common apparently, but the old media folder instead
so for example in b42.1.0 files are loaded from common or 42.1, anything in 42.0 is ignored
I uploaded 2 mods from iBrRus updated to B42: https://steamcommunity.com/sharedfiles/filedetails/?id=3402495902
so i was right?

you don't need to duplicate things you keep in the common folder, which should be the bulk of the filesize
hi, am trying to make a texture mod that replaces the smokey's sign texture
but it isn't working
i extracted the textures from the vanilla pack file
edited and put the new textures in a new pack file
put the new pack file in my mod's media/texturepacks folder
So I need to put in 43 folder one file only:
print('Mod name: work in progress...')
it is ideal to put all assets in the common folder, as they are very unlikely to need to be different between versions, and are essentially 100% of a mod's size
scripts and lua should be in the version folder as they are likely to change, these will need to be duplicated for future versions but are so small it doesn't really matter
Except for meta-assets like the poster and icon for the mod selection screen, which only work in the 42 folder.
and leave the old item scripts where it was before
then add a version of it for b42 on the 42 folder? i
translation can go in common.
I haven't got them to work yet, don't think they have transitioned properly to B42 like all the other features have.
I'm praying to every god in every heaven that the next hotfix addresses AnimSets.
I want my mgs to fire like mgs, gosh darnit
so all of the old files wont load at all right? so this means all of the mods that havent updated wont work at all ?
damn all this time i thought some mods broke
turns out all of the mods broke
I think emotes and timed actions work but where you put the animsets I think isn't right
yeah, b42 cannot load any 41 files and vice versa
Some mods can be simply re-packed into B42 and they work fine. Others are 100% broken and will give you nothing but errors.
i get it now thnx for confirming
i see

For example before Simple Status showed up as a B42 mod I just repacked it in my workshop and it works almost perfectly.
ok nother question
since common is where we plce assets
then this means we remove those assets from its original folder? (for update only)
cuz im thinking common would only be good for mods that we are about to do but for mods that are already done and we want to upload then we still need to clone the old assets to the common
if you need compatibility with b41 then you do have to leave everything where it is and that means having two copies of everything
Yeah it's broken for now, I think they just forgot to update the loader for AnimSets
thought so.. the pain ...
Yup
common is so that things can be better for 42 onwards, they won't do serious updates to 41 at this stage
AnimSets 
ah shit so theres no point updating mods that involves animsets?
I highly suggest you wait for them to fix it
right
not going into detail about that because it just makes it confusing and isn't going to matter in a week
I'm updating my TLOU Infected mod rn, and my old 41 files are getting picked up, forcing errors, when I haven't even implemented animations back yet
Yea
I hope they quickly fix it
Super rad mod btw.
and i plan to update my zed mods
owell. guess i should wait
Got plans to commission new animations
Anyone know why B42 stops client side cheat commands now?
I got one for ya to do then. I gibs monie
Anti cheat probably for future MP
It's annoying cause the ghostmode was useful for a lot of functionality, haven't been able to deaggro the same way 😦
Whenever things are ready to start implementing animations, I'll post a request on modding Discord
It's invisibility now
Bcs both were the same thing
I tried setInvisible but that doesn't work unless your in debug mode
So there wasn't any point to keeping ghost mode or invisibility together
Hmm
@silent zealot you can modify some stuff of craftrecipes
Can you? how is that done.
Thanks
Since I've had the sawn-off Winchester 1887 for almost a year, this animation will be a must lol
I was looking for a method, but if just editing fields directly works that is great
Add a skill check and on fail it shoots you in the foot 😏
here is the mod link, if someone could help me find why the textures inside the pack file aren't replacing the ones in the game
https://steamcommunity.com/sharedfiles/filedetails/?id=3402478108
Idk if you can edit everything tho
I have created a monster.
Since the PZ .x animations can be opened by Notepad+, is it at all a possibility to use their data to get a "copy" of the animation in Blender?
Looks like it's not. Fine, I'll try to re-create the "aim" stance myself (some day).
i'm making a trait that does funny stuff when surrounded by 3 zombies, at half health or heavily exerted.
if player:HasTrait("ModdedTrait") and not player:getModData().isStateActive then
if player:getSurroundingZombies() >= 3 and (player:getBodyDamage():getHealth() < 51 or player:getStats():getEndurance() < 26) then
activateState(player)
end
end
end```
^this is what i have so far.
i couldn't think of a way to actually make 'getSurroundingZombies' to work. ('surrounding' is 1 tile.)
*because i'm shtupid.*
any help would be greatly appreciated.
You can check the tiles around the player.
function checkAroundYou(player)
local totalZombies = 0
local playerX = player:getX()
local playerY = player:getY()
for xdir = -1, 1 do
for ydir = -1, 1 do repeat
local checkCell = getCell():getGridSquare(playerX + xdir, playerY + ydir, player:getZ())
if checkCell == nil then
break
end
if player:isOutside() ~= checkCell:isOutside() then
break
end
local cellLiveThreats = checkCell:getMovingObjects()
for i = 0, cellLiveThreats:size() - 1 do
if instanceof(cellLiveThreats:get(i), "IsoDeadBody") then
totalZombies = totalZombies + 1
end
end
end
end
end
Code is untested and written in discord, so you might have to troubleshoot it.
And it would need additional checks and balanaces, z-level checks, I think falling hats count as movingObjects etc.
forgot to hit reply
Oh, rad. Idle animations convert from x to fbx using imagetostl
Oh ?
Can you share what you used exactly please ?
A lot of people would be very interested to be able to do that
Probably false alarm on that one now that I look at the thing a bit more. There's no skeleton
Site is imagetostl(dot)com
trying to convert X to BLEND
Well, at least it gives me pointers on where to place the bones on the default skeleton 😄
Hmm
Looking forward to absolutely breaking my gun mod with goofy ahh custom aim animations
I've been trying to fix a problem with my car mod for hours. The mask texture is correct, but within the game, when I open the right window, the left window opens and when I open the left window the right window opens
this is correct?
Hi
I'm trying to create unique recipes for objects with the tags from this script for dismantling electronic items, so I can add unique translations. Instead of having: Recipe_DismantleElectronics = "Dismantle Simple Electronic Item", I want it to be: Recipe_DismantleCamera = "Dismantle Camera", like it used to be.
The problem is that it works for a few minutes, but then, in-game and without reloading the Lua, the dismantle option disappears from the electronic items and I don't know why or how to fix it. Can anyone help me?
I think this is a vanilla issue? It happened to me when I'd just play vanilla, suddenly couldn't dismantle watches anymore.
In the beta build 42?
I thought it was my mod, maybe due to a bad folder distribution or some file I edited that I shouldn't have. Well, I'll wait, thanks
One of the things that causes it is if you favorite your screwdriver. Don't ask me why
works. you a real one.
my aMOOzon mod doesnt show up on the mod list in game :'C idk why............
Maybe by removing OnTest = Recipe.OnTest.DismantleElectronics from the script and the Lua file, I can fix it? That way, it won't check if it's marked as a favorite or not
moo, thankyou to everyone that helped me learn how to code n model. i'm here to announce my first every pz mod
enjoy https://steamcommunity.com/sharedfiles/filedetails/?id=3402604488
Hello! Newb question. If I wanted to make a simple recolor of an in game object, how would I do that?
Super easy way: Recolor its actual texture.
A pretty easy way: Make a mod that uses a recolored texture.
Would that override the original? I just want to make a tie-dye poncho lol
Then you want to make a mod that uses a recolored texture 😄
Ok so how would I do that, I've never done anything like this before
Are you doing this for B41 or B42?
B41
Rad, I can type out a how-to, lemme see.
Thank you so much ❤️
Go to your users/yourusername/zomboid/workshop
This is where your modding journey begins! 😄
Create a new folder. For example purposes I'll call the new folder "Tie Dye Poncho" (obviously without the "")
-In Tie Dye Poncho create a folder called "Contents"
-In Contents create a folder called "mods"
-In mods create a folder called "Tie Dye Poncho"
-In Tie Dye Poncho create a folder called "media"
Since you're going to be adding/editing a clothing item, you'll need a few folders in "media". Add the following folders in media.
-clothing, models_X, scripts, textures
Now that I think about it, I remember there's an actual guide for clothing items on the PZ guides in Steam lol
Thank you so so so much for this!!! I'll give it a go this weekend! ^°^
Clothing mods can be a headache to get working but absolutely, give it a go. 🙂
Did anything change for b42? I have a small personal clothes pack and have to set some time aside to update it
Is it possible to include template in a script with a different name?
Yep you have to at the very least re-write your script txt files and check your proceduraldistributions for B42.
anyone know how to make container code? for like a cardboard box?
If it's a 3d model, just make a container item, like a bag
No you definitely don't have to
For clothing items? I think I had to.
Ahhhh mine were bags though.
My clothings worked fine, tho I don't use every parameters for them, but I didn't have to change anything
so cant modify lua for mod on MP unless reworked, but can add ANY mod item to the vanilla Lua spawntable pre game and mid game, AND IT WORKS
even with MP
could've just added the items in for spawn locations this way 🥲
/* Pretty much just copy of TrunkDoor... */
part CountachFrontTrunkDoor
{
category = bodywork,
area = FrontTrunk,
door
{
}
anim Open
{
sound = VehicleTrunkOpenStandard,
}
anim Close
{
sound = VehicleTrunkCloseStandard,
}
anim Lock
{
sound = LockVehicleDoorStandard,
}
anim Unlock
{
sound = UnlockVehicleDoorStandard,
}
anim IsLocked
{
sound = VehicleDoorIsLockedStandard,
}
anim ActorOpen
{
anim = WindowOpenSuccess,
rate = 0.15,
angle = 0.0 180.0 0.0, /* Angles for turning to right direction when opening */
}
anim ActorClose
{
anim = Attack_Shove,
rate = 0.3,
angle = 0.0 180.0 0.0, /* Angles for turning to right direction when closing */
}
itemType = Base.TrunkDoor, /* <- Maybe change the part to something else */
mechanicRequireKey = true,
repairMechanic = true,
table install
{
items
{
item
{
type = Base.Wrench,
count = 1,
keep = true,
equip = primary,
}
}
time = 300,
skills = Mechanics:3,
recipes = Basic Mechanics,
test = Vehicles.InstallTest.Default,
complete = Vehicles.InstallComplete.Door,
}
table uninstall
{
items
{
item
{
type = Base.Wrench,
count = 1,
keep = true,
equip = primary,
}
}
time = 300,
skills = Mechanics:3,
recipes = Basic Mechanics,
test = Vehicles.UninstallTest.Default,
complete = Vehicles.UninstallComplete.Door,
}
lua
{
create = Vehicles.Create.TrunkDoor,
init = Vehicles.Init.Door,
update = Vehicles.Update.TrunkDoor,
use = Vehicles.Use.TrunkDoor,
}
}
For the trunk door and ```
part FrontTrunk
{
area = FrontTrunk,
category = bodywork,
itemType = Base.SmallTrunk,
mechanicRequireKey = true,
repairMechanic = true,
container
{
capacity = 15,
conditionAffectsCapacity = true,
test = Vehicles.ContainerAccess.FrontTrunk,
}
lua
{
create = Vehicles.Create.Default,
}
}
For the ContainerAccess: ```--In /media/lua/server/Vehicles
function Vehicles.ContainerAccess.FrontTrunk(vehicle, part, chr)
if chr:getVehicle() then return false end
if not vehicle:isInArea(part:getArea(), chr) then return false end
local trunkDoor = vehicle:getPartById("CountachFrontTrunkDoor")
if trunkDoor and trunkDoor:getDoor() then
if not trunkDoor:getInventoryItem() then return true end
if not trunkDoor:getDoor():isOpen() then return false end
end
return true
end
Mod request: please make a mod wherein hot dog buns come in packages of 6 and hot dogs come in packages of 4.
This seems to be the way.
i seem to have a problem with my mod, it works in b42, but supposedly doesn't in 41, i'm downgrading to see why, but i checked the files and everything seems to be fine :x
sir, we do things to not make sense. don't try to correct us 😉
It's an immersion factor. Try buying the same amount of hotdogs and buns at a grocery store and you'll see.
sir i like having more dogs then buns, it makes trying to make it make sense even better 😛
hey @main pasture do you know if a TILE thats placed in which is a container, will spawn items upon loot respawn?
or even if a container will spawn items if placed in through debug/items list?
Anyone knows of a way other than copying mods to the mods folder for me to use steam mods on the GOG version? I wanna have both B42 and B41 ready to play at any moment
figured it wouldn't if placed by character, created by crafting, or if placed through debug within items list, but figured maybe it will respawn loot if its a tile placed which is vanilla
sadly i don't have that knowledge 😦
I have no idea about world loot spawning, but at least "clothing item" containers will spawn empty by default
hmmm even clothing item containers that are put in with brush tool?
through tiles?
rather then item list?
Don't know about loot spawning. But I'd assume you have to specify what can spawn inside it
Anything played with brush tool and not placed during the creation of the map willl not spawn loot.
ty ty
You theoretically might be able to use admin “refresh loot?” On it? But it won’t automatically spawn loot.
figuring its not an easy feat to just add in a vanilla container to spawn a specific mod item on a MP game is it
How do you spawn the container?
You would need to make a custom map mod to specifically spawn items in custom containers. Otherwise you’re going to just have to manually place them.
same aspect as having to spawn mod items to specified locations
rain let me know that yesterday damn
welp guess ill just have to add it to the vanilla lua locations and spawn rates, cause some reason itll allow you to add modded items to the spawn tables in vanilla prodistributions
Yep. You can do that as well.
sucks but guess ill just have to do that and deal with it haha
just made a copy of original prodistri lua so i can change it up with what i wanted for my own host server
Is the "cars 1/4 under ground" problem understood by someone ? I got it with Autotsar trailer connected generator trailer.
@mellow frigate PZK Vanilla car pack and Ivalio (https://steamcommunity.com/profiles/76561198356412893/myworkshopfiles/?appid=108600)
Both have b42 car mods that dont have that issue
not sure what changes are needed because I havent checked but the easiest way would be to compare b41 and b42 versions of the mod. I recommend Ivalio because his cars are individual mods
Found a way to run GOG zomboid with Workshop mods!!
both say steam but the B41 version is GOG
if you just want both versions of the game, you don't have to get the gog version
For future reference in case someone needs to do the same, what I did was copy the B41 steam files minus the executables and pasted them in the GOG install folder, let it overwrite everything. Launch the game with a custom parameter I used "C:\Games\GOG\Project Zomboid\ProjectZomboid64.exe" -cachedir="C:\Users\USERNAME\Zomboid_GOG" -modfolders workshop,steam,mods -Dzomboid.steam=1
you can literally just copy the steam version to another folder and it'll run fine
I already had it, wanted to use workshop mods without having to copy hence why I was looking for a solution
got it twice to support dev
Did someone manage to find code for anysurfacecraft tag? Is it in classes somewhere or is it lua?
item aMOOzonPackage points to the .fbx
Icon = aMOOzonPackageSealed, is whats in your inventory ui
WorldStaticModel = aMOOzonPackageWrap, is whats displayed on the ground
didi i do this right?
Yea. Just make sure your icon file has "Icon_" in front of its name
Only in the files, not in the script
got it thnx mate ^-^
i still need help on getting this to work if anyone knows what am i doing wrong
i have the pack= line in mod.info
the textures have same name inside the pack file
im sure the related functions are here ISEntityUI.lua
if not _handcraftLogic:getRecipe():isAnySurfaceCraft() then
-- The recipe requires a specific crafting station
ISEntityUI.WalkToEntity(_player, _handcraftLogic:getIsoObject());
end
so if the recipe doesnt have that tag (or inhandcraf), then it needs a crafting station
Thanks! Now to find _craftBench definition and onto creating custom crafting tags
eh, you can do those in the scripts
for example, I created this entity as a crafting bench
entity Metalworkbench
{
component UiConfig
{
xuiSkin = default,
entityStyle = ES_Metalworkbench,
uiEnabled = true,
}
component CraftBench
{
Recipes = MetalWorkbench,
}
component SpriteConfig
{
face S
{
layer
{
row = crafted_02_0 crafted_02_1,
}
}
face E
{
layer
{
row = crafted_02_3,
row = crafted_02_2,
}
}
}
it can craft recipes with the MetalWorkbench tag

