#mod_development

1 messages · Page 287 of 1

bronze yoke
#

it should be getFullType

misty horizon
#

ok that makes since

#

ok im going to use the smoking sound overhaul as a guide

hidden compass
#

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?

misty horizon
#

im trying to find the smoking sound overhaul mod does anyone know an easier way than just sifting through these

tacit pebble
#

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

misty horizon
devout bison
ornate sand
#

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?

misty horizon
#

thanks man

tacit pebble
#

what debug logger says? if you are lucky you will be able to backtrack with debug logger (F10)

ornate sand
#

getFullType of non table: null

bronze yoke
#

what is calling this function? weapon is not a weapon

devout bison
#

How do I adjust how quickly an item I'm making is consumed / eaten?

ornate sand
#

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.

misty horizon
#

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

misty horizon
devout bison
#

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.

severe jay
misty horizon
#

what the hell am i looking at

severe jay
#

sec

misty horizon
#

can u not search using the basic file exp

severe jay
#

u can but its slower

misty horizon
#

ah

bronze yoke
#

ok so this is a dumb thing zomboid does

#

go to C:/Program Files (x86)/Steam/steamapps/workshop

severe jay
bronze yoke
#

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

misty horizon
#

oh shit

#

so ur telling me ive been in the wrong place

bronze yoke
#

yeah

misty horizon
#

gg i fail step 1 ded

misty horizon
#

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

cosmic ermine
#
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?
misty horizon
#

anyone know if mp3 is supported

#

or does it have to be .wav

ornate sand
#

I use .ogg

misty horizon
#

i can convert it but if mp3 works i wont bother

severe jay
#

They should be

misty horizon
#

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

misty horizon
#

how do i find the "id=" part

ornate sand
#

write one

ornate sand
#

like id=HeavyEatingSound

misty horizon
#

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

ornate sand
#

Yeah, do the workshop stuff but don't upload it yet 😛

misty horizon
#

lmao

#

so ur telling me i gotta make a 32x32 icon just to test this goofy ahh taco bell meme

ornate sand
#

nope

misty horizon
#

oh

ornate sand
#

icon.png can be empty

#

so can poster

misty horizon
#

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

ornate sand
#

copypaste the og .INFO file and edit it

misty horizon
#

like the one im using for reference?

#

Ok good idea

severe jay
misty horizon
#

idk where you found that but im gonna use that as the cover lol

severe jay
#

i made just now,, u want the words changed?

misty horizon
#

nope

#

thats perfect

severe jay
#

ight bet

misty horizon
#

thanks man thats sick

severe jay
#

np

ornate sand
severe jay
#

if u need stuff done in blender, lmk. i just learnd how to do fbx files today XD

ornate sand
severe jay
#

XD

misty horizon
#

is that how it is meant to look

ornate sand
#

I also (and this is absolute top priority) need the Arnold spinrack from Terminator 2. For obvious reasons.

severe jay
misty horizon
#

100%

severe jay
ornate sand
misty horizon
#

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

vast pier
#

any idea why my custom profession mod is breaking the descriptions of all the professions?

ornate sand
vast pier
severe jay
ornate sand
#

They shouldn't, I added a trait and the vanilla stuff is fine

ornate sand
vast pier
#

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

misty horizon
#

@severe jay what do you want me to give credit to? like your discord username or is there another name

tacit pebble
vast pier
ornate sand
tacit pebble
#

go to main menu, there's a "reload Lua" botton at bottom left. click and see if something is counting up.

severe jay
vast pier
#

and what do I do if it does

tacit pebble
#

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"

cosmic ermine
#

How can I add two trunks to my car?

severe jay
#

just added it to the mod pack.. LOOK IT HAS NUTRITION FACTS XD

grizzled fulcrum
#

it's making me hungryyy

tacit pebble
cosmic ermine
#

Yum.

undone elbow
#

@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.

tranquil reef
#

"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?

bronze yoke
bronze yoke
neat herald
#

***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&

undone elbow
# bronze yoke does your mod modify java class metatables at all?

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.
bronze yoke
#

oh i see, i did not account for this

#

i will fix it soon

tranquil reef
bronze yoke
#

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

undone elbow
#

Thanks in advance.

random finch
#

(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?

bronze yoke
#

they may be different in splitscreen

lilac schooner
#

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

bronze yoke
severe jay
bronze yoke
#

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)

undone elbow
#

BTW the name() exists in some classes in vanilla.

bronze yoke
#

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

undone elbow
#

Why didn't you choose _name or __name for your needs?

bronze yoke
#

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:

undone elbow
#

So you make it visible while it shouldn't be...

#

Hm...

#

Okay, I'll fix my mod.
That was a real mod conflict. 🙂

bronze yoke
#

thank you!

random finch
#

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.

undone elbow
#
local name = type(typ.name) == 'function' and typ:name() or typ:getId()
lilac schooner
#

Command and conquer generals

#

Command and conquer: Red alert

bronze yoke
bronze yoke
cosmic ermine
#

Is it possible to randomize vehicle tires?

#

Why is it Russian? 😭

undone elbow
#

Admin could copy it to /ru, then translate the original to English.

undone elbow
bronze yoke
#

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

undone elbow
#

That's why I said "could"

#

I meant the past tense, not politeness. English is not my native language

cosmic ermine
#

Is it possible to have two trunks?

bronze yoke
#

no i understand that's okay! just explaining why i can't change it now

misty horizon
bronze yoke
silent zealot
#

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)

cosmic ermine
bronze yoke
#

i think that's a property of the item rather than the part

tacit pebble
cosmic ermine
#

That's code not script -.-

tacit pebble
#

ah sorry :/ I just saw your last message only

cosmic ermine
quaint warren
#

Yeah, 99% sure it doesn't exist

pearl prism
#
        {
            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?

cosmic ermine
pearl prism
#

u are doing some thing wrong

#

let me c that script

bright fog
#

@sour island is the mod creator

main pasture
cosmic ermine
main pasture
cosmic ermine
#

Like a Seat?

main pasture
#

For the accessing?

cosmic ermine
pearl prism
#

I just want to give a little gift to the helicopter pilot hehehe

tranquil kindle
# pearl prism

Sometimes i say "its not possible to make it in PZ" but then i see someone making this....

#

Great work

ornate sand
#

I wish I knew how you manage to get a rate of fire like that 😄

pearl prism
tranquil kindle
pearl prism
tranquil kindle
#

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"

pearl prism
#

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

ornate sand
#

A humvee with a mounted mg is going to be beyond rad

tranquil kindle
#

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

tranquil kindle
tranquil kindle
pearl prism
cosmic ermine
tranquil kindle
# cosmic ermine I know but if I have two trunks then that might be a problem cause there is only...

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

main pasture
#

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

cursive pilot
#

If the PZ development team adopts this jeans material..

#

I made it myself during the B41 version.

#

B42 Version's jean material 80%

dull moss
#

I yearn for the b42 stable so i can ditch my b41 files into separate mod

random finch
#

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
stiff fiber
#

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

dull moss
#

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

stiff fiber
#

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

pearl prism
random finch
dull moss
#
zombie.entity.GameEntity
zombie.iso.IsoObject
zombie.iso.IsoMovingObject```
random finch
dull moss
#

hm

stiff fiber
pearl prism
dull moss
random finch
#

For real, its like wtf. Maybe this is the way togo:

local plrIndex = localPlayer:getPlayerIndex()
if plrIndex == nil then
  plrIndex = 0
end
stiff fiber
#

Thank you so much!

old ginkgo
#

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.)

runic hare
#

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?

hidden compass
#

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).

hidden compass
dull moss
vast pier
#

hey how do I make it so traits are exclusive from each other?
setMutualExclusive doesn't seem to be working

bronze yoke
hidden compass
# dull moss Each weapon has ground attack animation, right? You could hook your logic to tha...

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.

low yarrow
#

Sounds like an option.
Or actually put all bandana like items as an array inside with the full name. Like the "visor" thing

bronze yoke
dark wedge
crisp fossil
#

is there an equivalent to this in b42?

bronze yoke
#

no

noble shell
#

anyone knows how to bind a function to a set of controller key combination? Something like onKeyPressed event but for controller?

bronze yoke
# bronze yoke no

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

deft wave
#

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.

crisp fossil
bronze yoke
#

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

ornate sand
deft wave
ornate sand
#
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

deft wave
cosmic ermine
#
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`?
bronze yoke
#

the item that should be installed for that part

onyx valve
#

Hi, how can I make an item appear in a backpack or in a pistol case or protective case?

eager imp
#

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

This guide will teach you the basics of how to create a custom trait and profession for Project Zomboid....

ornate sand
bronze yoke
#

the file structure has changed in b42, see the pinned messages

onyx valve
#

What requires do i need? Distributions, Procedural, Suburbs and Item picker? Or vehicles too

ornate sand
#

Well, at least every one you plan on slapping your pack/case into 😄 I've got my guncases in all three

eager imp
#

i wish they didnt put it in a thread

onyx valve
ornate sand
onyx valve
#

Oooh

eager imp
#

i got this

ornate sand
eager imp
#

closest i have is like id=

ornate sand
#

yeah there
id=YourModNameHere

eager imp
#

so change it to modid

ornate sand
#

no it's id

eager imp
#

okay so i have that already then

ornate sand
#

Huh, what is that line?

eager imp
#

id=LFbikes

ornate sand
#

weiiird

eager imp
#

im going to test something to see if it helps

ornate sand
#

oh and yeah the mod.info needs to be in two folders, the main folder in "mods" and the "42" folder

eager imp
#

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

ornate sand
#

Yeah if it's B42 exclusive you'll only need "42" and "common" in there

eager imp
#

alright perfect thatll make life easier

#

thank you for the assist

pine patio
#

Guys is it possible to make a flashlight with a coloured light in B42?

vast pier
#

Thoughts on this -4 point profession?

bronze yoke
#

balance wise? i think -4 is very low

ornate sand
# vast pier Thoughts on this -4 point profession?

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.

finite scroll
#

does zomboid run at a fixed tickrate or does it use deltatime

bronze yoke
#

delta time

tranquil reef
#

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

finite scroll
#

and is that a global i can reference?

bronze yoke
bronze yoke
#

you *could* one time change the value on load save but that will affect people who had it that way on purpose too

tranquil reef
#

Could I just have a "reset sandbox options" button that shows to admins or something though?

#

aka anyone in singleplayer and admins in servers

vast pier
ornate sand
vast pier
#

maybe -3 or -2 starting points

sacred harness
#

Hey all, quick question:
If an item has a "MetalValue" but does not have a "HasMetal" tag, is that by design or a mistake?

vast pier
#

I think metalvalue is for microwaves and hasmetal is for forging

sacred harness
#

Okay, might be the other way around but that makes sense.

vast pier
#

probably

sacred harness
#

Just means I can microwave weldingrods without blowing the microwave up 🙂

twilit pike
#

gah I'm trying to port over a poster mod I had and my crafting coding isn't working bleghh

sacred harness
#

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

vast pier
bronze yoke
#

less, i don't think these skills alone are that powerful

sacred harness
#

Anyone know how to get/set the attribute "MetalValue"? I'm not seeing the function in the zombie_scripting_objects class

deft wave
eager imp
#

anyone know the name of the code file that has traits in it?

vast pier
eager imp
#

thank you!

vast pier
#

💕

icy night
vast pier
#

how do I add the foraging values to the profession without overwriting the vanilla foraging values

eager imp
icy night
#

Nice. GL

eager imp
#

thanks! im gonna need it

vast pier
#

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
finite scroll
#

does zomboid have any sort of builtin raycast function?

bronze yoke
#

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,
},
}

vast pier
#

oh it's formatted different

#

I'm blind

eager imp
#

im slowly starting to understand this stuff and its so cool

finite scroll
#

i think formats fine

bronze yoke
ornate sand
#

Making custom Traits is fun when you get them to work 😄

finite scroll
#

pretty sure the issue is you're requiring Foraging/forageDefinitions instead of Foraging/forageSystem

bronze yoke
#

all require does is load a file if it hasn't loaded yet, and returns whatever the file returned

eager imp
#

ooo look at this

vast pier
#

which is not what I want 🔥

bronze yoke
#

all vanilla files load before all mod files and none of them return anything so requiring them doesn't do anything

finite scroll
#

is your file name the same as the vanilla?

vast pier
#

no

finite scroll
#

it could be overwriting it

#

ah

icy night
#

I like dialogue mods. Always could use more

eager imp
#

burglar gets magazine armor thats sick

vast pier
#

it's data related, when I change values in the file it stops replacing it, I'm gonna try what albion said

finite scroll
#

alr hope it works

vast pier
#

yeah it works, thanks albion

finite scroll
#

OHHH i see my mistake

#

my reference was intending to replace all the originals

#

that would make sense lol

vast pier
#

what file makes it so fireman/security guard have starting % in exercise regularity, and park ranger/lumberjack bonus movement speed through trees?

deep charm
#

Quick question, is it possible to flag an item as globally unique so that it will only appear once per map?

vast pier
ornate sand
#

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?

blissful urchin
#

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

blissful urchin
#

Nope I don’t think so, let me check

#

At least the class is not nil

finite scroll
#

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

bronze yoke
#

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

blissful urchin
#

But cannot use their public field, what is the syntax in lua ?

bronze yoke
#

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

finite scroll
#

there might be a function that lets you alter the field but you can't do it directly

blissful urchin
#

but that's straneg we can access public method but not public field

storm trench
#

Anybody try Chuck's "zombies hear your microphone" mod yet?

blissful urchin
#

Love this comment in the Indie stone lua file: " -- Lua seriously needs a "continue", and yes, i refuse to use goto 😄
"

bronze yoke
#

the park ranger/lumberjack tree movement is hardcoded in the java somewhere

vast pier
#

Is there a way to mimic it in a mod?

teal nacelle
#

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

bronze yoke
#

if you have to replace the sound banks, yes, you need to put all the sounds in there

teal nacelle
#

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

finite scroll
#

is desensitized hardcoded or can i replicate it

cosmic ermine
finite scroll
#

ah

#

unfortunate

twilit pike
#

aaaandd I somehow broke pz as now it's stuck on the script loading screen

finite scroll
#

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

bright fog
cosmic ermine
#

Does centerOfMassOffset affect the vehicle's physics?

hollow ore
#

Could someone explain to me how to make a car armored, or not break easily, I would like to add it to my mod

vivid imp
#

Is the script for zombie behavior a LUA file, and if so where is it stored?

bright fog
#

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

vivid imp
#

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

vivid imp
#

Oh haha

bright fog
#

That's B41 tho

#

And I haven't checked how they do the fix

vivid imp
#

It says its a java mod

mellow frigate
bright fog
regal sail
#

hey guys

#

does anyone have some docs for b42 craft recipe script?

#

the wiki currently only has the docs for the stable version

bright fog
#

Currently no there isn't

winter bolt
regal sail
bright fog
#

I'll try to work on updating it in the next week

#

There's a need for it

regal sail
#

are the recipe scripts files in the game install dir?

bright fog
#

yea

regal sail
#

could you give me the path pls?

bright fog
#

In ProjectZomboid/media/scripts

regal sail
#

thx bro ❤️

young edge
icy night
dawn pagoda
#

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.

finite scroll
#

does anyone know a mod that uses SpriteRenderer's functions i could use as reference?

neat herald
silent zealot
#

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.

neat herald
neat herald
silent zealot
#

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)

neat herald
#

Bingo, it's really mostly a necessity for large complexes or shipping containers

vivid imp
#

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

tacit pebble
#

Is there any events or parameter which is firing when player finished to read book or/and page?

#

I couldn't find any

bronze yoke
#

no, but reading is a timed action so you can hook into it

tacit pebble
#

that's a great Idea thanks!

tacit pebble
# bronze yoke requiring a vanilla file never does anything, it's a misconception in the commun...

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
bronze yoke
#

yeah, the require doesn't do anything

tacit pebble
#

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.

tacit pebble
#

i just try to avoid using OnPlayerUpdate because it fires function every ticks.

undone elbow
# blissful urchin Love this comment in the Indie stone lua file: " -- Lua seriously...

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
undone elbow
# tacit pebble guys, will this better for performance? ```lua function CF_triggerEvent(player) ...

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.

tacit pebble
#

sorry for unclear question before 😬

undone elbow
#

It helps but there is some overhead

tacit pebble
undone elbow
#

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.

bronze yoke
tacit pebble
#

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

tacit pebble
cosmic ermine
#

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
undone elbow
# tacit pebble additional information) why I asked that question, that's because I hate using t...

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.

tacit pebble
undone elbow
#

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.

bronze yoke
#

you may want a flag to prevent adding the event more than once though

undone elbow
#

I've played with Events.XYZ.Remove and reloading the lua file before. It's not as simple as it seems.

finite scroll
#

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

tacit pebble
hidden compass
#

@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)
undone elbow
tacit pebble
bronze yoke
#

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

sacred harness
#

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.

tacit pebble
#

InstanceItem("Base.Something"):getMetalValue() ?

undone elbow
#

Btw, is it even possible to have a console in the main menu?

tacit pebble
#

or finger print window?

undone elbow
#

I mean Lua console where you can type and run something

#

some single line code

#

like print(123)

tacit pebble
#

I don't think it's possible in Vanilla PZ, I mean, there's no function to pop-up the window.

random finch
#

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)
bronze yoke
#

it is possible, but it will only affect lua calls to that function

random finch
#

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?

bronze yoke
#
-- 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
random finch
#

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?

fast galleon
#

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.

bronze yoke
#

java calls don't go through lua so we can't really do anything to affect them

faint jewel
#

is tsarlib updated to 42?

sacred harness
tranquil reef
#

is setVariable on zombie like getModData? If so, does this info stay on them whether or not they're dead?

random finch
bronze yoke
#

no, pipewrench just compiles to lua

#

it lets you write in typescript but it is ultimately lua modding with an extra step

fast galleon
undone elbow
# sacred harness Alright! I need help. I can NOT for the life of me get an instance of InventoryI...
-- 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
tranquil reef
#

I can't imagine this is impossible but I don't know what method works

tacit pebble
fast galleon
#

not an expert on this

sacred harness
sacred harness
undone elbow
faint jewel
#

oh hell, i need someone to update tsarlib for b42 XD

tacit pebble
sacred harness
bronze yoke
#

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

sacred harness
#

PipeWrench is a set of TypeScript definitions for both the Java API and Lua codebase for the game Project Zomboid.

bronze yoke
uneven fractal
#

hello, how do i delete items from spawning in the game? I've deleted some guns from items_weapons but it doesn't work

severe jay
#

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.

faint jewel
#

dem wheels.

ornate sand
ornate sand
severe jay
#

Im on my 6th etempt to do just that actually 💀

ornate sand
severe jay
ornate sand
#

Gimme dat fbx then

sacred harness
#

You might be able to set that to False

tacit pebble
sacred harness
#

Its not a function, its a field

tacit pebble
sacred harness
#

lol

tacit pebble
#

tbh, i don't know how can i call "things" in English..

sacred harness
#

Its all good

tacit pebble
#

but now i knew it's "field" in English lol

sacred harness
#

🙂

ornate sand
sacred harness
#

DUDE! IKR! Someone just posted it here to me.
@bronze yoke is legend!

undone elbow
#

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.

undone elbow
#

btw item:getName() equals to item.getName(item)

tacit pebble
silent zealot
#

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

tacit pebble
#

from lua??? sick

silent zealot
#

Yes, all done from lua. Right now by directly editing LUA files, so I need to convert to a mod that does function replacments

tacit pebble
#

So I can finally install "outside table(1/4) ... (4/4)" now? 🤣

silent zealot
#

I can probably also make it work independently for main player inventory vs. containers so they can be toggled seperately.

silent zealot
tacit pebble
#

anyway that's an awesome finding dude

silent zealot
#

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,

ornate sand
faint jewel
#

i would reccommend maybe a "bag of holding" mod instead. a carryable item (like a backpack) that has infinite carry space

bronze yoke
#

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

silent zealot
#

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

silent zealot
faint jewel
#

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.

silent zealot
#

There are 7 different places in the code that need to change to get around the limits

vast pier
#

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?

silent zealot
#

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.

tacit pebble
#

its for B41 tho so i have no idea if it's still working

faint jewel
#

it do.

silent zealot
#

How about:

  1. mod edits the vanilla functions to call NepCustomDoesItFit().
  2. 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"

sacred harness
#

Does crafting take into consideration your corresponding crafting level? Like if my smithing was super low verser super high. Would I make better weapons?

silent zealot
#

At the moment, no.

sacred harness
#

Hmmm, k

silent zealot
#

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

sacred harness
#

Okay

silent zealot
#

I hope that changes with the full crafting update

sacred harness
#

Yah

#

I'll wait till then, before modding that 🙂

silent zealot
#

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"

silent zealot
#

For a one-line joke mod this has gotten more comments and awards than anything else I've ever done:

tacit pebble
silent zealot
#

hahahahah

tacit pebble
#

dumb and dummer

ornate sand
sacred harness
#

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

silent zealot
#

Agent of Big Milk trying to keep the secret of chocolate milk production from the masses.

vast pier
#

at least until it's changed

ornate sand
#

"Trio 5 Jan @ 12:26am
Strawberry milk from pink cows when?"
^I second this

tacit pebble
vast pier
#

10 seems a bit absurd for a single item, even considering tools/skill

bronze yoke
#

you can just do this in an oncreate function without any weird duplicate recipes

silent zealot
#

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

tacit pebble
#

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?

silent zealot
#

I think those create different world items

tacit pebble
#

so no in craftRecipe? 😢

silent zealot
#

So it's back to the issue of inventory clutter with knife (level1) knife (level2) and knife(level3)

tacit pebble
silent zealot
#

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.

ornate sand
#

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

silent zealot
#

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.

sacred harness
#

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...

silent zealot
#

Relive the glory days of levelling smithing in Skyrim. 😂

ornate sand
#

Iron daggers zomg

silent zealot
#

Another option is add a recipe to convert <thing> to scrap metal with a Tag:metalsaw

sacred harness
#

Yeah, not sure either. There is a MetalValue and HasMetal tag. I think one is for smelting and the other is for microwaves...

silent zealot
#

I was looking at my pile of old car parts and thinking about that before I kinda burned my base down.

sacred harness
#

But it shouldnt be one or the other, it should be both or none... in my book.

silent zealot
#

Spend a day with a hacksaw, get scrap metal to smelt.

tacit pebble
#

yep I'm pretty sure metalValue is only for microwaves

sacred harness
#

Yeah, see that makes no sense to me LOL

vast pier
sacred harness
#

You would think the MetalValue would be the amount of metal you get from the item when you smelt it.

tacit pebble
vast pier
#

what doesn't rule is my water shutting off on 7/13 😡

tranquil reef
#

Can I have the player say something that can only be seen by them?

#

"Say" says it for everyone around

ornate sand
#

Can you whisper to yourself? 😄

tacit pebble
#

HaloTextHelper.addBadText(self.character, getText("ContextMenu_TooDark"));
I saw this before

silent zealot
tacit pebble
#

it plays when player is reading but world turned into too dark

vast pier
#

oml you can rotate in a chair in build 42 if you do the place option while sitting

silent zealot
#

nice

ornate sand
# vast pier

Let's not bug report that and see if it gets patched by 2028

vast pier
#

If they patch it, we add it back in

tacit pebble
#

😢

vast pier
#

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

ornate sand
#

Because realism and balance

faint jewel
#

hard water is why

vast pier
#

wouldn't that just mean the rags are still dirty but with calcium

#

smh

ornate sand
#

Also you can take money out of wallets but you can't put money back in 'em. (I did fix this one though lol)

vast pier
#

is there a mod that changes this very small detail that most people probably haven't noticed?

tranquil reef
#

Making voice mods, can there be any amount of sound clips in one category (like yelling) or is there a set amount?

ornate sand
#

That also reminded me. Where's the Duke Nukem B42 voice mod?

winter bolt
#

one of my sounds has 180 clips so its probably fine lol

silent zealot
#

I did not expect to see my mod on top of the Zomboid subreddit...

winter bolt
#

lmao nice

silent zealot
#

Why do we put so much effort into high quality mods when silly jokes gets all the love? 😆

winter bolt
#

the people need chocolate milk from brown cows

ornate sand
#

Now you really do have to update that mod with a pink cow that gives strawberry milk

silent zealot
#

And boomalopes. Yellow deer you can milk for fuel that explode if they die.

ornate sand
#

And of course the Monty Python rabbit

tranquil reef
#

I'll help with the custom cow breed if needed, but it must happen

silent zealot
#

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.

winter bolt
#

realistic cow overhaul

tranquil reef
#

One cow for every liquid in the game

#

I want it

silent zealot
#

There are so many liquids!

winter bolt
#

lighter fluid cow

silent zealot
#

...but no strawberry milk, that would need to be added.

winter bolt
#

finding a gasoline cow actually sounds really funny

bronze yoke
silent zealot
#

Imagine if the offspring produced a mix of fluids, so your long term goal could be to beed a vodka & redbull cow.

ornate sand
bronze yoke
#

meticulously breeding the 'water with an undetectable amount of bleach' cow in preparation for multiplayer

winter bolt
#

perfume cow is crazy

#

guys i have a crazy idea

silent zealot
undone elbow
#
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

silent zealot
vast pier
winter bolt
#

reminds me of the classic

silent zealot
#

Beware the Aqua cow...

silent zealot
#

Not all items use the new system yet

undone elbow
#

ah

#

Really?

winter bolt
#

can a potent poison bull and a pineapple soda cow really be together

silent zealot
#

Most are still on the old hardcoded weights

#

Or some are

vast pier
silent zealot
#

Or I'm mixing tings up and the fluid system is badly bugged

undone elbow
#

Try Base.GlassTumbler

#

0.2 + petrol = 0.4 😕

silent zealot
#

ah, I see - there's no density property for fluids.

#

Everything is the same as water, 1 encumberance per Litre

undone elbow
#

It must be fixed!

elfin cradle
#

New here; was wondering if this would be the place to discuss a simple mod idea with people far more talented than myself.

elfin cradle
#

Body Bags for B42

silent zealot
#

I'll let you know if I can find anyone talented to help. 😂

ornate sand
silent zealot
#

I like it.

undone elbow
#

I wonder if it is possible to make CUSTOM fluid...

silent zealot
#

Nice way to give downed survivors some respect in their burial.

silent zealot
elfin cradle
#

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

vast pier
#

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

silent zealot
#

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.

undone elbow
ornate sand
#

Add a context menu if the corpse is near? Right click - put body in bag

undone elbow
#

Also I can't find in lua files fluid window. I guess it's not in lua

elfin cradle
silent zealot
#

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.

ornate sand
#

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

silent zealot
#

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

bronze yoke
#

yeah, there's definitely a pretty big regression there

elfin cradle
bronze yoke
#

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

silent zealot
#

Yeah, like "put battery into torch"

#

though I think that one is still on right click

bronze yoke
#

most cooking stuff too

silent zealot
#

cooking is annoying right now - needing a seperate water source etc

ornate sand
#

Slice bread is in the silly new menu and PZ characters are so redacted that they need a surface to do it

silent zealot
#

I'm back to right click -> autocook salad with the autocook mod.

winter bolt
silent zealot
#

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.

ornate sand
#

Mkay, for sure a future mod: Barrel of Monkeys

elfin cradle
#

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.

tacit pebble
elfin cradle
#

I suppose that's fair too- I am admittedly nervous haha

tacit pebble
#

don't need to be worried even it's too basic, like "How to add my item in PZ" things...

cosmic ermine
#

Bagged bodies I'm guessing reduces the corpse sickness effect by 90% or something?

elfin cradle
undone elbow
#

Where is blood🩸 as fluid 🫗 in vanilla?

elfin cradle
ornate sand
# elfin cradle What would be my first step? What is the 3D model file format? Is there somewhe...
  1. 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
  2. .x or .fbx so Blender works fine
  3. 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
  4. Scripting items themselves is pretty straightforward. They're .txt files. Special actions will require lua functions though
ancient grail
#

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

silent zealot
#

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

ornate sand
#

Oh right yeah when B43 drops in 2082 it will need a new folder 😦

silent zealot
#

More likely, you'll have code for B42.0.2 and then one file will need to be changed for 42.0.3

ancient grail
#

i was talking about 42.xx

undone elbow
#

not a mistype in 2082 🙂

ancient grail
#

not 43

silent zealot
ornate sand
#

I've kept my mods just in a folder named 42 and they work great

silent zealot
#

For now, that's fine

ancient grail
silent zealot
#

put everything in 42, and only worry about it if a future patch needs a file to change

ornate sand
ancient grail
ornate sand
#

B42 broke everything. So it wasn't a copy+paste for any of my mods. Way more tedious line-by-line stuff

ancient grail
#

im aware about recipe
but thats all

#

oh and map i believe has problems too

ornate sand
#

Every script.txt, almost all custom lua, some of vanilla lua, and a buttload of other things

undone elbow
#

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.

ornate sand
#

PZ_GPT?

undone elbow
#

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.

round notch
#

You could give a GPT a huge context file with up to date lua and implementation instructions

silent zealot
#

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.

undone elbow
ornate sand
#

Let's direct them to a library. You know, an actual library.

silent zealot
#

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"

undone elbow
#

True

#

IQ is about 85

silent zealot
round notch
bronze yoke
#

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

silent zealot
#

So it picks one folder for all files, not the best folder for each file?

ornate sand
#

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

bronze yoke
#

so for example in b42.1.0 files are loaded from common or 42.1, anything in 42.0 is ignored

mellow frigate
bronze yoke
#

you don't need to duplicate things you keep in the common folder, which should be the bulk of the filesize

eternal fiber
#

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

undone elbow
#

So I need to put in 43 folder one file only:

print('Mod name: work in progress...')
bronze yoke
#

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

silent zealot
#

Except for meta-assets like the poster and icon for the mod selection screen, which only work in the 42 folder.

ancient grail
#

and leave the old item scripts where it was before
then add a version of it for b42 on the 42 folder? i

silent zealot
#

translation can go in common.

round notch
ornate sand
ancient grail
#

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

round notch
#

I think emotes and timed actions work but where you put the animsets I think isn't right

bronze yoke
ornate sand
ancient grail
ornate sand
#

For example before Simple Status showed up as a B42 mod I just repacked it in my workshop and it works almost perfectly.

ancient grail
#

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

bronze yoke
#

if you need compatibility with b41 then you do have to leave everything where it is and that means having two copies of everything

bright fog
bright fog
#

Yup

bronze yoke
#

common is so that things can be better for 42 onwards, they won't do serious updates to 41 at this stage

ancient grail
bright fog
ancient grail
#

right

bronze yoke
bright fog
#

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

ancient grail
#

and i plan to update my zed mods

owell. guess i should wait

bright fog
round notch
#

Anyone know why B42 stops client side cheat commands now?

ornate sand
bright fog
round notch
#

It's annoying cause the ghostmode was useful for a lot of functionality, haven't been able to deaggro the same way 😦

bright fog
bronze yoke
#

i think ghost mode was just removed

#

collapsed into invisible i think

bright fog
#

Bcs both were the same thing

round notch
#

I tried setInvisible but that doesn't work unless your in debug mode

bright fog
#

So there wasn't any point to keeping ghost mode or invisibility together

bright fog
#

@silent zealot you can modify some stuff of craftrecipes

silent zealot
#

Can you? how is that done.

bright fog
#

This specifically

silent zealot
#

Thanks

ornate sand
#

Since I've had the sawn-off Winchester 1887 for almost a year, this animation will be a must lol

silent zealot
#

I was looking for a method, but if just editing fields directly works that is great

round notch
eternal fiber
bright fog
ebon dagger
#

I have created a monster.

ornate sand
#

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).

dense gorge
#

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.
ebon dagger
#

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.

ornate sand
#

Oh, rad. Idle animations convert from x to fbx using imagetostl

bright fog
#

Can you share what you used exactly please ?

#

A lot of people would be very interested to be able to do that

ornate sand
#

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 😄

bright fog
#

Hmm

ornate sand
#

Looking forward to absolutely breaking my gun mod with goofy ahh custom aim animations

hollow ore
#

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?

open meadow
#

Hi breakdance 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?

ornate sand
open meadow
#

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

ornate sand
#

One of the things that causes it is if you favorite your screwdriver. Don't ask me why

dense gorge
severe jay
#

my aMOOzon mod doesnt show up on the mod list in game :'C idk why............

open meadow
severe jay
willow wedge
#

Hello! Newb question. If I wanted to make a simple recolor of an in game object, how would I do that?

ornate sand
willow wedge
#

Would that override the original? I just want to make a tie-dye poncho lol

ornate sand
willow wedge
#

Ok so how would I do that, I've never done anything like this before

ornate sand
#

Are you doing this for B41 or B42?

willow wedge
#

B41

ornate sand
#

Rad, I can type out a how-to, lemme see.

willow wedge
#

Thank you so much ❤️

ornate sand
#

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

willow wedge
ornate sand
obtuse sparrow
#

Did anything change for b42? I have a small personal clothes pack and have to set some time aside to update it

main pasture
#

Is it possible to include template in a script with a different name?

ornate sand
severe jay
#

anyone know how to make container code? for like a cardboard box?

main pasture
#

If it's a 3d model, just make a container item, like a bag

ornate sand
runic hare
#

SLL I CAN SAY IS WHY pz WHY

#

sorry caps

bright fog
runic hare
#

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 🥲

main pasture
# cosmic ermine Anyone know how to make this functional truck door? ``` template = CountachFront...
/* 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,
    }
}
main pasture
#

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

agile socket
#

Mod request: please make a mod wherein hot dog buns come in packages of 6 and hot dogs come in packages of 4.

mellow frigate
sly monolith
#

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

agile socket
runic hare
#

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?

crystal canyon
#

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

runic hare
#

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

runic hare
main pasture
#

I have no idea about world loot spawning, but at least "clothing item" containers will spawn empty by default

runic hare
#

hmmm even clothing item containers that are put in with brush tool?

#

through tiles?

#

rather then item list?

main pasture
#

Don't know about loot spawning. But I'd assume you have to specify what can spawn inside it

old ginkgo
#

Anything played with brush tool and not placed during the creation of the map willl not spawn loot.

old ginkgo
#

You theoretically might be able to use admin “refresh loot?” On it? But it won’t automatically spawn loot.

runic hare
#

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

main pasture
#

How do you spawn the container?

old ginkgo
runic hare
#

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

old ginkgo
#

Yep. You can do that as well.

runic hare
#

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

mellow frigate
#

Is the "cars 1/4 under ground" problem understood by someone ? I got it with Autotsar trailer connected generator trailer.

crystal canyon
#

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

crystal canyon
#

Found a way to run GOG zomboid with Workshop mods!!

#

both say steam but the B41 version is GOG

bronze yoke
crystal canyon
#

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

bronze yoke
#

you can literally just copy the steam version to another folder and it'll run fine

crystal canyon
#

got it twice to support dev

storm patio
#

Did someone manage to find code for anysurfacecraft tag? Is it in classes somewhere or is it lua?

severe jay
#

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?

bright fog
#

Only in the files, not in the script

severe jay
#

got it thnx mate ^-^

eternal fiber
#

i have the pack= line in mod.info
the textures have same name inside the pack file

crystal canyon
#
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

storm patio
crystal canyon
#

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