#mod_development

1 messages ยท Page 285 of 1

blissful urchin
#

Thanks for sharing this doc, did not know about it

#

I want it as a sandbox options because there is no sense for using it in-game, does the doc is also for sandbox options or only for in-game mod options ?

sour island
#

I do wish sandbox options were available in SP by default- I know there's mods, but yeah...

bright fog
#

Albion has a doc for sandbox options I believe

sour island
#

Like modifiable

bright fog
#

Ah yea

#

Like to modify other mods sandbox options

#

That'd be amazing

#

Or just straight up use the same system for sure

blissful urchin
#

Thanks anyway Doggy Jvla

#

@silent zealot Thanks man

#

Maybe saved some work hours

bright fog
sour island
#

Just to put it out in the world but I used to make mod options hosts could lock to a setting using EasyConfig -- it could probably be done using a sandbox option instead.

#

Probably overkill as it being a sandbox option would suffice, but people get weird about downloading more mods.

flint brook
#
            player:getBodyDamage():setSicknessLevel(currentSickness - 1)
            if player:getBodyDamage():getSicknessleve() < 0 then
                player:getBodyDamage():setSicknessLevel(0)

does this work?

#

this will happen when the player is asleep

silent zealot
#

No idea if it will work, but check if the value is less than zero before setting it instead of setting it to something weird and invalid, reading it back and setting it again.

flint brook
#

ok

silent zealot
#

You wouldn't want to set sickness to -1, overflow an unsigned int and suddenly have 4,294,967,296 sickness.

#

...or more likely have the Java API throw an error about invalid input.

flint brook
#

for now i did not had this type of problem, i play with a lot of mods and for some reason my sickness value keeps increasing very slowly, until i die from fever, no matter what i do, in the first few days of the game. I want to do the change in code above so everytime i go to sleep my sickness value goes to 0, so i don't have to deal with that anymore

sour island
#

Alot of people aren't aware of bodies causing sickness and assume it's a mod.

flint brook
#

nope

#

i kill few zombies near where i live, but is never more than 10 zombies. It is a mod thing mostly, probably related to traits, since i don't get the same problem in vanilla.

round notch
#

They definitely cranked up the sickness near bodies in B42

sour island
#

Do you have any mods like susceptible?

blissful urchin
flint brook
#

i don't have susceptible, and honestly i am not sure what mod is causing the issues, since i have a lot of them. If i found out i will tell you guys.

#

it is probably because i have "more traits dynamic" and "Evolving trait worlds dynamic" and they are not compatible, but idk.

#

Also, i am playing in 41 still, not 42.

undone elbow
#

Does rawget really work?

bright fog
#

New section about Zed Script, a VSCode extension to typing scripts which can help in formating those

north raven
#

Is there a suggested fix for zfighting for items on the ground yet?

bright fog
north raven
#

Someone had mentioned that it was a common thing. The item I'm placing is only a single plane model so that may be something that can be modified to fix it.

nimble badger
tranquil kindle
bright fog
#

wtf does zfighting even mean

#

Does that mean like flat textures mixing ?

winter bolt
#

when polygons overlap they fight over which one gets rendered so its flickers between them

bright fog
#

It's because now tiles have actual 3D surfaces in a way, so probably put the model a bit higher on the Z axis ?

winter bolt
bright fog
#

So instead of being Z=0

#

Make it Z=0.01 or idk

pastel thorn
#

Good day all!
Maybe its a bit easy question, but anyway I want to be sure, that this is working as expected.
How does PZ resolve relative paths? I mean, if im trying to add Icon = MyMod/SomethingWithoutExtension
It will lookup inside the path:

Contents/mods/<MyMod_placeholder>/media/textures/.. and I could make whatever folder between .png and /textures folder? The main thing is to prevent duplicated names?

tranquil kindle
#

I'd suggest "world" attachment in Attachment editor

north raven
#

I'd thought I'd tried that, but I was still re-learning how to mod just updating for the first time in a year so I may have updated files in the wrong location. I'll try it again now that I'm more coherant about it.

tranquil kindle
#

"world" attachments allow you to change position of ground models on all 3 axis without any programs but your game

#

Launch game in debug mode, in debug/cheat menu find "attachment editor" top left you should have option to import model, select one you want to change. If it has "world" attachment, you can edit it, if it doesn't, create new attachment, select it and change name for "world" no uppercases*. Then once you hit enter to save name, you should have window pop up on right top corner with model you have chosen

#

There should be option to "disable right hand orientation or something like this", its small checkbox, disable it. Now it shows you model how it will look exacly. Select attachment world and play around this tool to raise it.

bronze yoke
#

before any lua loads so before any events

#

you can just use VehicleScript:Load()

bronze yoke
#

also from my brief checks absolutely nothing has been changed about sandbox options since i wrote this

frank swan
#

thank you so much! this helps tons!!

north raven
#

Thank you, I'll give that a try. Seems like a great solution.

tranquil kindle
#

Thats exacly what attachment editor does, but it can be previewed in that tool

#

And once saved with it, it will work real time so you can instantly see the result, where if you were to modify model script, you need to restart

north raven
#

Gotcha

bronze yoke
#

it is very strict about curly brackets and (at least in b41) it's very strict about every key/value line having a comma at the end, even if it's the last one

flint brook
#

i will try a new thing.
I just need to know where is the folder with the "Zomboid Globals". Then, i will create a new mod, with the defines to be just like vanilla, so the increases/decreases in sickness, fatigue, hunger, stress, etc, will be normal again.

vivid imp
#

Can someone help me figure out the issue with the texture pointer in this xml? The player keeps turning into a checkerman when equipping the item, even though the <textureChoices> line should point towards a correct texture

<clothingItem>
    <m_MaleModel></m_MaleModel>
    <m_FemaleModel></m_FemaleModel>
    <m_GUID>e3e4b0cd-9adb-4b10-8a5a-8da2dcde21f7</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomHue>false</m_AllowRandomHue>
    <m_AllowRandomTint>false</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <textureChoices>clothes\Paddlefruit\Trousers_Yasogami</textureChoices>
</clothingItem>```
#

Pretty much all my mod files and textures are in the 'common' folder, is this the issue?

#

Note that 'Trousers_Yasogami' is the texture file, (but I left out the .png)

blissful urchin
umbral ingot
bronze yoke
#

yeah

#

it's literally just the main script reading function but since it doesn't reset itself or anything you can add with it

#

the name has to be the same just because it sets the name to whatever you pass it since it's not supposed to be used like this anyway

umbral ingot
#

Hmm I'm looping through all the scripts at game start and adding to them but it's not showing up.

part DomeLight
{
    area = engine,
    mechanicRequireKey = false,
    category = lights,
    specificItem = true,
    lua {
        create = Vehicles.Create.DIDomeLight,
        init = Vehicles.Init.DIDomeLight,
        update = Vehicles.Update.DIDomeLight,
    }
}
]]
local function addNewVehiclePart(vehicleName, part)

    local vehicle = ScriptManager.instance:getVehicle(vehicleName)
    if vehicle then
        print(vehicle)
        print(part)
        vehicle:Load(vehicle:getName(), part)
    end

end```
Might just be calling it at the wrong time though
ornate sand
vivid imp
#

I tried that as well, no dice

bronze yoke
#

you need to enclose your entire script in { }

bright fog
umbral ingot
bronze yoke
#

yeah

tulip valve
#

Is there any way to change back so if a watch is in your inventory you still see the time ui on screen? I put armor on both arms where watch is and they replace the watch slot sadly

#

I understand its supposed to be a drawback but its so annoying having too look at the watch in inventory all the time to see exact time lol

vivid imp
#

Is there any documentation on what the <textureChoices> line does when making a clothingItem? I'm stumped

#

Where does it start the file search, media/textures?

ornate sand
#

<textureChoices>clothes\bag\Ammopack2</textureChoices>
<textureChoices>clothes\bag\Ammopack2B</textureChoices>
Those are for my ammo "fannypacks" and one of them is for a military green camo texture and the other for a dark gray neutral texture.

vivid imp
#

Where are your fanny pack textures stored relative to the main mod folder?

ornate sand
#

42/media/textures/clothes/bag

vivid imp
#

This xml file is stored in (main mod directory)/42.0/media/clothing/clothingItems/Tousers_Yasogami.xml

My texture is stored in (main mod directory)/common/media/textures/clothes/Paddlefruit/Legs/Trousers_Yasogami.png

<clothingItem>
    <m_MaleModel></m_MaleModel>
    <m_FemaleModel></m_FemaleModel>
    <m_GUID>3b9a7b39-9587-476e-8474-a38db5aa8c0a</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomTint>false</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <textureChoices>clothes\Paddlefruit\Legs\Trousers_Yasogami</textureChoices>
</clothingItem>```
#

So should I move the texture from common to 42?

ornate sand
#

If you're making a B42 mod you gotta have all your data in 42

vivid imp
#

hmmmmmm ok

ornate sand
#

My common folders are empty on every single one of my B42 mods lol

umbral ingot
# bronze yoke yeah

Thank you! Got it working now just need to reload all of the vehicle scripts the right time and they'll all reset with a dome light added on.

vivid imp
#

Damn, its still not working

#

Not sure what I'm doing wrong honestly. Is it doing something weird since its just a pants texture and not a mesh?

ornate sand
#

You might need the models too. And I remembered the attachbone thing giving me an aneurysm until I just went off and made my bags static instead of skinned so I could get around it.

vivid imp
#

What model tho? I was under the impression that some pants just slap a texture onto the player character without a mesh, which is what I'm trying to emulate

#

Do I need to set static to true?

ornate sand
#

The type of pants you're going for? If you want those skin tight pants then find their model, copypaste it, rename it, and try to link it in your xml with your new texture

vivid imp
#

hmmmm ok

ornate sand
#

If you're just going to use them as the template to wrap your texture around, you ought to try to keep them skinned first. Just to see if it will work.

#

So you'll need a new folder in your mod at:
42/media/models_X/Skinned/Clothes <- and put the copypasted pants model(s) in there

vivid imp
#

Finally

#

The problem is its not that skintight mesh I was looking for... but more experimenting is needed then!

#

Thanks for your help @ornate sand

ornate sand
#

Try the skinny leather pants model ๐Ÿ˜„ That might look pretty rad

vivid imp
#

Hmmm good idea lemme see if I can find it

#

The only leather skinned clothes model is that leather jacket... I feel like a different method is used for those skintight pants you can get at character creation and the like

ornate sand
#

<m_MaleModel>skinned\clothes\bob_trousers</m_MaleModel> <- That's the whiteTINT model isn't it?

vivid imp
#

Thats the one I used in the photo I think

ornate sand
#

heeeey

#

Above allowrandomtint there's also an allowrandomhue entry for the skintight "no model" vanilla pants

#

Your xml doesn't have that entry

#

<clothingItem>
<m_MaleModel></m_MaleModel>
<m_FemaleModel></m_FemaleModel>
<m_GUID>18ccabec-7fcc-4446-94a8-fd94e2fe9637</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<m_BaseTextures>clothes\trousers_mesh\trousers_white</m_BaseTextures>
</clothingItem>

vivid imp
#

Yeah I removed that but I don't really believe that would change much tbh

#

The big kicker about that vanilla XML entry is the lack of anything between the MaleModel and FemaleModel entries

ornate sand
#

well I mean hue is a color setting so maybe the game needs to know it's 'false' to load the texture? Idk, I sure don't miss making clothing items now

vivid imp
#

Ill try it once more

ornate sand
#

Also might be the folder structure again. So maybe try foldering it like:
42/media/textures/Clothes/Trousers_Mesh <- because vanilla does the skintights like that

vivid imp
#

Yeah changing the XML to look more like the vanilla tint pants results in the return of checkerman

<clothingItem>
    <m_MaleModel></m_MaleModel>
    <m_FemaleModel></m_FemaleModel>
    <m_GUID>3b9a7b39-9587-476e-8474-a38db5aa8c0a</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomHue>false</m_AllowRandomHue>
    <m_AllowRandomTint>false</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <textureChoices>clothes\Paddlefruit\Legs\Trousers_Yasogami</textureChoices>
</clothingItem>```
#

Hmmm nope changing the folder structure like that didnt work either

ornate sand
#

Wait a freaking minute-rino

#

It's not <textureChoices>

#

it's <m_BaseTextures>

vivid imp
#

I saw that too and tried that but this time it spat out a bajillion errors... Ill try once more tho

#

WAIT THAT WORKED LMAO

ornate sand
#

๐Ÿฅณ

vivid imp
#

Ok we cracked it, you use <textureChoices> ONLY when adding textures onto a 3D model you wear, but you use <m_BaseTextures> when actually slapping the texture onto the main body

#

yayyy thank you

ornate sand
#

Cool beans man

#

No problem either.
Now you fix the AnimSets so I can customize firing rates between a slow firing heavy caliber battle rifle and a minigun okay?

#

๐Ÿ˜„

vivid imp
#

As a beginning modder I can totally do that for sure

ornate sand
#

Is that Freddie Mercury btw

vivid imp
#

Haha he does look like it lol

winter bolt
ornate sand
winter bolt
#

textureChoices is for items that use a model

#

m_BaseTextures is for items that add a texture to the character

vivid imp
#

Yup we figured that out with blood sweat and tears haha

ornate sand
#

You're like 4 minutes late spongie ๐Ÿ˜„

winter bolt
#

oh rip

#

discord didnt scroll down

leaden pelican
#

is week one out yet

vivid imp
#

I appreciate it tho!

ornate sand
#

Have you cracked the AnimSets problem for guns yet spongie?

winter bolt
#

ive never touched guns in my life ๐Ÿ’€

ornate sand
#

What a waste... (jk)

winter bolt
#

theres like 20 gun mods so not really

ornate sand
#

So tomorrow morning I find out that you must place custom AnimSets in the common folder instead of 42 or they can't work and then I'll have a nervous breakdown and actually model in the M134 Minigun and give it a 200% spawnchance in every Chevalier Dart's glove compartment

flint brook
#
      FoodSicknessDecrease = 0.002,
      FatigueIncrease = 0.0000245,
      UnhappinessIncrease = 0.00005,
}```
Will this decrease the rate of sickness and fatigue, or i need to change something else?  My character is getting extremely tired after 6 in game hours, and is always depressed, since every 2 seconds he loses 1 of happiness.
old ginkgo
#

Already reported it so hopefully the next major update fixes it.

#

Animation FBX files also need to be placed in the Bob folder under anims_x for b42.

bright fog
ebon dagger
#

Anyone working on "developing film" with the new basements and the photo labs etc? I don't want to double up effort lol.

crystal canyon
#

well,

#

and he is now working for TIS

#

I'm sure it has a high chance of either it being added to game, or Soul Filcher updating it. He already has updated 2 of his mods to B42

ebon dagger
#

Good call out!

crystal canyon
ebon dagger
#

the big mod I'm working on adds 100's of lore items in the form of "evidence" for uncovering the dark conspiracy around the outbreak, as an expansion of my mod "They Knew". One item is undeveloped film, and I was thinking, well, what if I made them able to be developed.

crystal canyon
#

kinda in line with what I want to add

ebon dagger
#

I'll maybe try and respectfully message Soulfilcher and ask about using the code.

crystal canyon
#

I want to add a radio station that hosts a talk radio show on par with Coast to Coast AM where citizens call and talk about conspiracy theories. Day one they'll talk about ufos and random conspiracies, and then as days progresss theyll talk about whats goin on in the exclusion zone

ebon dagger
#

So, I just did a mod like that, feel free to use my code!

crystal canyon
#

๐Ÿ˜ฎ

crystal canyon
#

oh nice

ebon dagger
#

It uses the same code base as the AEBS, and dynamically generates broadcasts.

#

It doesn't need the GUIDS and stuff like the other radio tech uses.

crystal canyon
#

I see, I downloaded some old coast to coast shows with art bell and I'm looking for a software to transcribe the audio to text, so I can use real shows

#

and they are all from 1993

ebon dagger
#

That would be a fun mod.

crystal canyon
#

Thanks for giving permission to use your mod as a base

ebon dagger
#

No problem!

icy yarrow
#

I realy need to work on my mod, but I can't be bothered to deal with Tilezed

crystal canyon
#

hahaha I cant wait for official tools to be released so I can use my favorite map mods again. I hope they update since its hard to update without the original files

icy yarrow
#

Unfortunately, I think that a bunch of super popular map mods aren't going to get updated to 41 by their authors

crystal canyon
#

yeah, they really dont need to do much for the initial port. They just wont have basements. all they need to do is (recompile?) using the new tools

icy yarrow
#

depends on the mod. With the new stuff in 42, some will definitely have to move

crystal canyon
#

My top map mods are:
Lake Ivy
Constown
Hartburg
Pineville
Greenport
Muldraugh - West outskirts Shipping Company
SecretZ
Shelters

#

I also love Big Bear Lake but that one needs some fixes and dont like that cuts off the campgrounds

ebon dagger
#

Ok, more random questions to throw at the wall:

Is there a tool for getting screenshots like this from game models?

crystal canyon
#

I think they used some machinima, not sure if loading the models into blender and creating a scene but im interested in knowing as well. Ive seen some youtubers using pz models for animations, maybe they would know

crystal canyon
#

Ooooh! I hadnt seen the city version. I used Shortrest County before. I guess this is an expansion?

crystal canyon
#

Ill give it a go. I liked the county version but found it too small

clear spear
#

Still B41... since B42 is not suitable for proper mapmods (even though there are some)

clear spear
crystal canyon
#

yeah, I got both 41 and 42 installed so I can play it ;p

torn igloo
#

Is the new modding events available on unstable b42 yet?

clear spear
#

nope

bronze yoke
#

like lua events? there's some new ones yeah

flint brook
icy yarrow
#

Is there a tool for merging multiple png into a tilesheet?

tranquil reef
#

Any tutorial on custom animations for the player

crystal canyon
#

any recommendations to make items not sink halfway on the ground on b42?

#

thanks for that!

ebon dagger
#

Does fileGuidTable have an import function? Or do I just need to add lines for every base Item I use?

tacit pebble
#

is there any way to restrict type of the value on custom input box of narrative mod option?

#

type means string, int, float, double, ... and min max if it's number

bronze yoke
ebon dagger
#

Fair, thanks for the reply!

crystal canyon
#

mostly, I used the barrel tiles

#

for example,

#

but I noticed a problem with entities. If I use industry_01_22 in one entity, I cant use it in any other

tacit pebble
bright fog
bright fog
#

apply function > go through your options and access this specific option, force to a min max value

tacit pebble
#

dont worry slider is actually what I wanted but it's slider.. ๐Ÿคฃ

crystal canyon
bright fog
#

For the value

tacit pebble
# bright fog Yea it would appreciate a typing box

yep you know when step of the value is 0.1 then slider is like... pain.. so for now I'm just using function and let them free text box.
okay I'm gonna think about this and maybe post something to request thread. thanks ๐Ÿ™‚

bright fog
#

Made a request yea

#

Also the slider is very small

crystal canyon
#

and lastly this is the last entity I messed with,

    xuiSkin default
    {
        entity ES_Metalworkbench
        {
            LuaWindowClass      = ISEntityWindow,
            DisplayName         = Metal Workbench,
        }
    }

    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,
                }
            }
        }
                                
        component CraftRecipe
        {
            timedAction   = BuildWoodenStructureMedium,
            time          = 150,
            category      = Carpentry,
            ToolTip       = Tooltip_craft_metalWorkbenchDesc,

            inputs
            {
                item 1 [Base.BenchAnvil],
                item 1 [Base.CrudeBenchVise],
                item 1 tags[Hammer] mode:keep flags[MayDegradeLight],
                item 1 tags[Saw] mode:keep flags[MayDegradeLight;Prop1],
                item 6 [Base.Plank] flags[Prop2],
                item 20 [Base.Nails],
            }
        }
    }
#

just a static workbench that is a crafting station for specific recipes that have the tag MetalWorkbench

tacit pebble
#

as a graphic designer irl, slider sucks but I should think about if there any better solution than slider.
because args will be duplicated if we merge the type option and that's another problem.

bright fog
#

Definitely doable

tacit pebble
#

or maybe this input box..?

bright fog
#

An input box I guess is the name

tacit pebble
#

oh you already posted about this what a man

#

i just saw that thread

crystal canyon
#

type = double,
min = 0, max = 100,
default = 1.0,
wouldn't double work? whats wrong with it? you can limit the options

crystal canyon
bright fog
#

But we're talking about mod options

tacit pebble
crystal canyon
#

ah, i see

crystal canyon
tranquil reef
#

This seems impossible but can I have a world item change tint based on code?

#

Or use multiple textures and just swap which one I want it to use on command?

full escarp
#

when i want to add custom moodles and don't want to use the moodle framework
i assume that i would need to handle all the on screen rendering, icon loading, tool tip etc. myself or are there any API calls i could use?

bronze yoke
#

you have to do it all yourself

full escarp
#

weird how little API Calls for some ui stuff is there in PZ

bronze yoke
#

moodles are unfortunately the most hardcoded least moddable system in the entire game

full escarp
#

so basicially im just creating a own ui element which imitates the behavior and look of a moodle
but its not a real moodle in the original sense?

cinder nebula
#

Hi all. I am trying to figure out how to modify the game time for sleep, so that if you had the game time set to real time, sleeping wouldn't take like 15 real-world minutes, and instead be as fast as if you had your game time set to 1 hour.

I put these two class files into intelliJ to decompile them, and copied and pasted the code into Grok to see if it can help locate the code that deals with sleep time speed, but apparently the code in these two class files is not specifically in there, but is tied to time progression else where?

Anyone have any ideas?

winter bolt
#

for some reason its not possible so i might just check if the item name contains "band" lmao

#

i cant think of any items it might cause issues with so itd probably be fine?

crystal canyon
bronze yoke
#

i really don't think ai is going to be able to do this for you

cinder nebula
crystal canyon
#

you would have to create a new gamespeed i believe

#

or you could change the game time multiplier while sleeping

local originalMultiplier = GameTime.getInstance():getMultiplier()
GameTime.getInstance():setMultiplier(10.0) -- Set time to pass 10x faster.

GameTime.getInstance():setMultiplier(originalMultiplier)
cinder nebula
crystal canyon
#

in what file, issleepdialog?

#

thats a base game file, look for ways to hook into them instead of overriding

cinder nebula
#

Thank you very much.

crystal canyon
#

I hope this info can guide you in the correct direction to start messing around and learning :p

cinder nebula
#

Thank you.

I added in the code, but ti didn't work. I put it in the function ISSleepDialog:onClick(button) section.

eternal hound
#

Hi, wondering is there a resource somewhere for all lua functions specific to zomboid? I can't seem to find anything

eternal hound
#

Thanks, appreciated

crystal canyon
bright fog
#

Wdym by that exactly ?

red tiger
hidden compass
# bright fog <@925428965257150534> https://discord.com/channels/136501320340209664/1318920979...

For example, suppose a slider is set up to allow numbers from 0 to 100. The textbox could be populated such as โ€œ-1โ€ or โ€œabcโ€, etc. I would like the core of Mod Options to handle these inputs automatically (= validation check), rather than having the mod developer implement them individually. The slider handles only numbers and sets minimum and maximum values, so I think it is possible to implement this.

bright fog
#

I don't know how they would even let such a possibility of fucking up the text input be released

hidden compass
bright fog
#

I mean you requested something which is already logical to implement if they add the input text box lol

bronze yoke
#

i was a little surprised seeing that request, i hadn't really realised that the current mod options don't support that

bright fog
#

I mean, they don't need it ?

#

Unless you mean the input box

bronze yoke
#

yeah, like there's no int/float input box?

bright fog
#

But for the limiting max min thing, sliders already do that well (tho if you modify the slider max min values, your old choice can go over the values)

bright fog
#

You're forced to using the slider

#

Which can be problematic because the slider is extremely small as is

bronze yoke
#

can it be limited to integers at least?

bright fog
#

Yes

#

It takes a step

tacit pebble
#

and it's hard to select exact value when step is too close. imagine when you try to select 0.974748

bright fog
#

min max step default

bright fog
bronze yoke
#

the only options i've used so far are tickbox and button so i don't know all this stuff ๐Ÿ˜“

bright fog
#

Check the wiki page

#

;)

vast pier
#

Hey, does anyone know why the name is displaying like this?

    item Ladle
    {
        DisplayName = Empty Ladle,
        DisplayCategory = Cooking,
        Type = Normal,
        Weight = 0.6,
        Icon = Ladle,
        MetalValue = 20,
        StaticModel = Ladle,
        WorldStaticModel = Ladle,
        FillFromDispenserSound = GetWaterFromDispenserMetalMedium,
        FillFromLakeSound = GetWaterFromLakeSmall,
        FillFromTapSound = GetWaterFromTapCeramic,
        FillFromToiletSound = GetWaterFromToilet,

        component FluidContainer
        {
            ContainerName   = Ladle,
            capacity        = 0.1,
        }
    }```
#

Build 42

bright fog
vast pier
#

It doesn't do it for other fluid containers, just the custom one

bright fog
#

Hmm

vast pier
bright fog
#

Aaaa

#

I think it's your translation which is not set

vast pier
#

oh, how/where do I do that

ornate sand
old ginkgo
bright fog
vast pier
#

hmm okay, I don't wanna search around so I'm gonna install a mod that adds an item and then use it as a reference ๐Ÿ‘

#

Thanks

#

Also is there a way to modify existing items instead of replacing them? For compatibility reasons it would be best if I could replace/add values instead of replacing the entire item

ornate sand
# old ginkgo Do you see them in animation viewer in debug mode?

No because I wasn't creating/adding a new animation, I was trying to add and then modify an existing AnimSet. This was how we got different rates of fire in B41.
But I think I've got an idea. I'll try using a re-named Bob_AttackRifle animation and link it to my custom AnimSet?

bright fog
ornate sand
#

Still a no. I'm guessing those new GUIDs mean that now animations need 'em too?

outer crypt
#

is there a way to pull a list of all the items in the vanilla game? I had a list from 41 but I need to get or make a list for 42.

tardy mural
#

Anyone has an Idea why this recipe doesn't show up in the craft menu in B42? I read a magazine to unlock it and hit the required skill level. Still I just can't get my test recipe to show up.

craftRecipe MakeTestRecipe
    {
        timedAction = Welding,
        time = 120,
        NeedToBeLearn:True,
        SkillRequired = MetalWelding:2
        tags = AnySurfaceCraft;Welding,
        category = Cooking,
        xpAward = MetalWelding:10,
        Autolearn = MetalWelding:4,
        inputs
        {
            item 1 tags[WeldingMask] mode:keep,
            item 1 tags[Hammer] mode:keep flags[MayDegradeLight],
            item 1 tags[Screwdriver] mode:keep flags[MayDegradeLight],
            item 1 tags[Wrench] mode:keep flags[MayDegradeLight],
            item 8 [Base.BlowTorch],
            
            item 1 [Base.ScrapMetal],
            item 1 [Base.MetalPipe],
            item 1 [Base.SheetMetal],
            item 1 [Base.Screws],
        }
        outputs
        {
            item 4 Base.MetalPipe,
        }
    }
crystal canyon
#

looks good, thats weird

cinder nebula
#

Anyone know where the loading screen images are located and the azombie animation at the bottom-middle? I would like to make a mod to have custom images. ๐Ÿ™‚

tardy mural
crystal canyon
#

Change NeedToBeLearn:True to NeedToBeLearn = true

tardy mural
vast pier
tardy mural
outer crypt
crystal canyon
#

that is how it is in vanilla recipes

    craftRecipe Forge_Steel_Sheet
    {
        time        = 10,
        SkillRequired = Blacksmith:4,
        needTobeLearn = true,
        timedAction = Making,
        xpAward = Blacksmith:45,
        AutoLearn = Blacksmith:6,
        tags = Forge,
        category = Blacksmithing,
        inputs
        {
            item 1 tags[Charcoal],
            item 1 [Base.IronBlock],
            item 1 tags[BallPeenHammer] mode:keep flags[Prop1;MayDegradeLight],
            item 1 tags[Tongs] mode:keep flags[Prop2;MayDegradeLight],
            item 1 tags[MetalworkingChisel] mode:keep flags[MayDegradeLight],
        }
        outputs
        {
            item 1 Base.SheetMetal,
        }
    }
tardy mural
#

I am a little confused with the capitalisation in B42, as I have seen many of these attributes both capitalised and uncapitalised sometimes within the same file of the game

#

So I figured it's not important, but I will try anyway

ornate sand
#

So copying and renaming a Bob_AttackRifle to something else and linking it to my AnimSet ain't working either. Won't even show up ingame.
And what sucks for us Blender poors is that we can't even get the vanilla animations so we could simply edit them ๐Ÿ˜‚

wild canopy
#

Gotta love when you clearly have multiple programmers who each implement camelcase differently

tardy mural
#

Seems like it

tardy mural
wild canopy
#

At least you don't have a rando adding Hungarian into the mix ๐Ÿ˜„

crystal canyon
#

there should be something in the console if theres an error

eternal hound
#

Don't suppose anyone could help me with an un-equipping script? All I'm trying to do is make the player un-equip certain items during an action then re-equip when done, can't seem to figure out the relevant functions

outer crypt
#

2615 total at this moment

vague marsh
#

'SkillRequired = MetalWelding:2'

tardy mural
#

Damn you are right, will retry. Thank you, too.

outer crypt
crystal canyon
# vague marsh you missed a comma

damn recipes... You need like 5 sets of eyes to spot all the errors. can anyone make a vscode or npp addon for this scripting language? lol

ornate sand
undone elbow
crystal canyon
#

might need to do some more digging to see how the constructor parses things

eternal hound
ornate sand
crystal canyon
tacit pebble
#

btw what i was thinking: highbeam and under-glow parts working with AA Battery

bright fog
#

Also you might need to update the format for your message as they asked at the top

fleet bridge
vague marsh
crystal canyon
#

I started with a NPP custom language xml

#

looks like this

drifting ore
#

when wipe

crystal canyon
#

I improved the Notepad++ custom language formatting

#

it now includes all base game timedActions such as Dismantle, all base game crafting tags such as AnySurfaceCraft, all the item input modes such as keep or destroy , all the possible input flags such as AllowDestroyedItem, all the base game perks/skills such as Aiming or Maintenance, and most of the item tags I could find such as Screwdriver or Hammer.

tardy mural
#

Has anyone or the wiki a full list of tags that can be used in recipes like "AnySurfaceCraft" or "Carpentry"?

crystal canyon
#

...

#

would you read the post above yours? XD

tardy mural
#

Well I wasn't able to locate it on the wiki if that is what you are trying to call out

#

I was hoping to maybe find describtions of each action or something

crystal canyon
#

Ah, i see

tardy mural
#

But it will still be helpful

crystal canyon
#

well, the recipe tags are mainly from entity tags

#

for example, the pottery wheel entity

module Base
{
    entity Pottery_Wheel
    {
        component UiConfig
        {
            xuiSkin         = default,
            entityStyle     = ES_Pottery_Wheel,
            uiEnabled       = true,
        }

        component CraftBench
        {
            Recipes         = PotteryWheel,
        }

        component SpriteConfig
        {
            face S
            {
                layer
                {
                    row = crafted_01_65,
                    row = crafted_01_64,
                }
            }
            face E
            {
                layer
                {
                    row = crafted_01_66 crafted_01_67,
                }
            }
        }
                
        component CraftRecipe
        {
            timedAction   = BuildWallHammer,
            time          = 50,
            category      = Pottery,
            ToolTip       = Tooltip_craft_potteryWheelDesc,

            inputs
            {
                item 1 tags[Hammer] mode:keep flags[Prop1],
                item 4 [Base.Plank],
                item 4 [Base.Nails],
            }
        }
    }
}
#

has the component CraftBench with the parameter
Recipes = PotteryWheel,

#

that is the tag that then is used on the recipe for a ceramic crucible for example,

    craftRecipe MakeCeramicCrucible
    {
        timedAction = Craft_PotteryWheel,
        time = 120,
        Tags = PotteryWheel,
        SkillRequired = Pottery:1,
        xpAward = Pottery:25,
        category = Pottery,
        inputs
        {
            item 2 [Base.Clay],
            item 1 [Base.Sandbag],
        }
        outputs
        {
            item 1 Base.CeramicCrucibleUnfired,
        }
    }
tardy mural
#

Interesting, thank you. I will test some tags and see which best fit my needs.

crystal canyon
#

Fixed an issue, reuploaded. Thinking about making a version for VSCode but its more complicated than a simple XML. To use, put the xml file in C:\Users\USERNAME\AppData\Roaming\Notepad++\userDefineLangs or wherever you installed NPP.

tranquil reef
#

Very glad they added these native mod options but, they probably should've updated the sandbox menu lol

#

No headers, no sliders, no color pickers cowboy_sad

crimson ore
#

how can i make a bag spawn within a container and contain items

ornate sand
crimson ore
#

assuming this is some of the code im looking for in distro

ornate sand
#

Depends on what you're looking to do exactly

crimson ore
#

load a briefcase full of money (more than the vanilla ones but i dont want to overwrite them) and have them spawn in a container

ornate sand
#

Oh okay, so make a new script .txt for your moneycashbagerino (<- name it that lol), and don't use that distro because there's an easier way, and then do a tableinsert to whichever loot table you want it in

crimson ore
ornate sand
crimson ore
#

well ty cant wait to start finding completley worthless money cases around lol. loot goblin things

crimson ore
#

maybe i could have an underground diamond market

ornate sand
#

That's how I have one of my gun cases set up. I probably don't even need all those require lines but ehh, better safe than sorry amirite?

crimson ore
#

not sure if those gems were in b41 but i saw them in 42s distro so ima use them

crimson ore
crystal canyon
#

I need some ฬถgฬถuฬถiฬถnฬถeฬถaฬถ ฬถpฬถiฬถgฬถsฬถ beta testers

#

especially someone working on craftRecipe scripts

frank elbow
crimson ore
ornate sand
crystal canyon
#

do you use vscode?

ornate sand
#

I am the living equivalent to ihavenoideawhatimdoing.jpeg

crystal canyon
#

hahaha

#

but seriously, i need someone working on recipe scripts for B42

#

I made a vscode extension to check recipe formatting

random finch
#

We get the top left corner of a square by doing:

local squareX, squareY, squareZ = square:getX(), square:getY(), square:getZ()

How to get the center of a square?

silent zealot
#

I have fixed a major oversight in the new fluid & farming sytstems:

tranquil reef
#

when spawning an item on the ground, it moves to a random position around the player. is it possible to make it just go right where the player is

silent zealot
#

How are you spawning the item?

tranquil reef
#

local toothItem = instanceItem("ToothManager.Tooth")
player:getCurrentSquare():AddWorldInventoryItem(toothItem, 0, 0, 0)

silent zealot
#

What do those three zeros do? I suspect they may be positioning info

#

Looking at some examples from vanilla code:

#

self.player:getCurrentSquare():AddWorldInventoryItem(self.fish.fishItem, dropX, dropY, dropZ);

#

playerObj:getCurrentSquare():AddWorldInventoryItem("AnimalFeedBag", ZombRand(-0.5, 0.5), ZombRand(-0.5, 0.5), 0);

#

_square:AddWorldInventoryItem(item, ZombRandFloat(0.1,0.9), ZombRandFloat(0.1,0.9), 0);

#

At a guess, you need to get the players position within the tile and then use that to work out the X/Y parameters to pass to getCurrentSquare():AddWorldInventoryItem(toothItem, Xoffset, Yoffset, 0)

tranquil reef
#

Not sure. I know it used to work fine, until they added the thing that makes items go to a random place when dropped. If that's the problem then I don't know if I'd be able to get an accurate offset no matter what

silent zealot
#

Might be "if 0 then random, otherwise use number"

crystal canyon
#

I need to adjust the colors but dont know what colors to use

#

some of the error detection I have so far

round notch
ornate sand
ancient grail
ornate sand
crystal canyon
#

there's Umbrella for lua

ornate sand
ornate sand
#

I was wondering why my multitool broke in 2 ingame weeks. I found out why. Its chance to lose condition is one in two.
So I'll be adding my swiss army knife back and it's gonna be harder to break than a crowbar.

pastel thorn
crystal canyon
#

I'm working on the javascript for error detection now

#

https://github.com/KuroNeko87/zomboid-Scripting

WIP VSCode extension to assist with Project Zomboid Scripts. First implementation focuses on craftRecipe utility. All base game timedActions (i.e. RipClothing), perks (i.e. Maintenance), recipe tags (i.e. InHandCraft), tool/item tags tag[Hammer], item flags (flags[AllowDestroyedItem]), item modes (mode:keep) are supported.

GitHub

VSCode extension for Project Zomboid scripts (Build 42) - KuroNeko87/zomboid-Scripting

#

download the .vsix extension and install it in the extension tags

#

it detects almost every error, but Im not good with javascript

silent zealot
ornate sand
tacit pebble
#

uh uhm.. i remembered there's player mod data button with vanilla debug, but it seems to be moved somewhere. anyone knows?

pastel thorn
crystal canyon
#

more than welcome!

old ginkgo
ornate sand
#

So I'm still racking my brain about the AnimSets thing for custom firing rates, and one of the (many) things that has me wondering is that now, for some reason - the AnimSet for AssaultRifleDefault has GUIDs in it. This wasn't the case in B41.

Does that mean that when the AssaultRifleDefault.xml has <m_Conditions x_name="b8063f52-d400-425d-a792-6ac689f2cf28"> over the FireMode/STRING/Auto entry that there needs to be something somewhere else where that particular GUID links to?
Also do the vanilla anims_X animations have data like those GUIDs in them, and is that why simply copypasting and re-naming Bob_AttackRifle or Bob_AttackRifleSmall isn't enough for the game to recognize them as "new" animations?

I wish I had more than just Blender so I could dig in to these, but online .x to .fbx converters don't work for PZ animations. Anyone wanna take a look?

old ginkgo
#

I sincerely doubt that the FBX or x files themselves would contain any sort of fire rate data in them in anyway. The guids are likely what youโ€™ll need to find; and theyโ€™re likely an XML file.

#

Have you tried searching for the guids?

ornate sand
#

I did search those exact GUIDs and they're unique only to those AnimSets they're mentioned in

crystal canyon
old ginkgo
ornate sand
#

It is so weird that if you edit the first SpeedScale of AssaultRifleDefault.xml from "autoShootSpeed" to a number like "8" or "10", it does exactly what it used to do in our custom AnimSets in B41.
But the second you edit anything else in that xml, it just breaks. ๐Ÿ˜„

old ginkgo
#

Thereโ€™s certainly a couple backend things going on. For example; idle animations arenโ€™t as easily overridden anymore even when using priority tags. I have to utilize emotes in my mod now Iโ€™m fairly certain; just about everything I tried to make my mod function like it did in b41 hasnโ€™t worked.

#

So I wouldnโ€™t be surprised if a few things are different elsewhere as well.

sonic needle
pastel thorn
# crystal canyon more than welcome!

Tried first small test forked PR, just sent. If all is OK, I ll make some fix with merge color theme (to make possible to work with the existing lua theme (and rest lang files) Coz now, if you are pushing the theme button - main theme is being override

crystal canyon
pastel thorn
ornate sand
#

Another thought on my AnimSet problem lol sorry:
Since there is a lua script in base PZ that refers to an entry within an AnimSet (ChangeWeaponSprite for the double barrel shotgun during reloading), shouldn't it be entirely possible to write up a lua function that adds a multiplier to the "autoshootspeed" entry in the AssaultRifleDefault.xml?
My thought is like, leave the autoshootspeed as is for most automatic weapons, but multiply it by x0.95 for a heavy battle rifle switched to full auto, and multiply it by like maybe x1.2 for something like a belt-fed machine gun.
Is there any reason that wouldn't be possible?

wheat kraken
#

when the current player dies, and choose to respawn on same map, how to get the new player reference?

getPlayer seems to get the dead one

vast pier
ancient grail
ornate sand
ancient grail
#

i see havent really touched b42
so youre probably right

sonic needle
#

Still the case actually, but it depends.

there is a routing Bug affecting FBX and XML for anim files.
they must be stored as if the mod were still in B41

ornate sand
#

Yeah, I've tried that too ๐Ÿ˜„ I guess I'm hoping that TIS throws a hotfix our way that addresses the whole anim file issue, because that might be the key to our custom animsets

sonic needle
#

store the files for xml / anims_x etc in the old 41 location. even though it is a b42 mod

blissful urchin
#

Hello everyone, is there a cheat sheet to write steam workshop description with better formatting directly in the txt file ? Additionally, how can I add several photos to my steam workshop page details ? Also can it be done locally like the poster.png or should it be done in steam ?

#
  • My poster.png is good in the steam workshop mods list but then it's too small in my mod details, how can I change it ?
#

Thank you

sonic needle
#

i pre type all my WS txt,
there is a BB code steam guide, in the guides section, on the Workshop

#

โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €โ €
This is a guide

steep vortex
#

Can you use DoParam to set a value to nil to remove the param? Trying to remove DaysFresh and DaysTotallyRotten from some food.

#

Using nil seems like it's throwing up errors

blissful urchin
#

And how about images ?

blissful urchin
sonic needle
#

time traveling a doParam, ill be damned lol

steep vortex
#

Ah, thanks. Guess setting it to 5000 will amount to the same result.

bronze yoke
#

i think the default is just a really big number lol

#
public int DaysFresh = 1000000000;
public int DaysTotallyRotten = 1000000000;
bright fog
#

lol

blissful urchin
#

Idk when I add images from my workshop item page, it does nothing :/

#

Not talking about images in description btw, but the item images

#

I think better thing is to see how other modders do ๐Ÿ˜„

wheat kraken
ancient grail
worthy copper
#

stupid question, how do I get a b41 mod to show up in the mod list? I can't find a version # in the code.

bronze yoke
#

check the pinned messages

worthy copper
#

Thank you very much

sour island
bronze yoke
#

id definitely won't increase

sour island
#

If what he says is accurate, I wouldn't know how one would get the new player.

mellow frigate
dark wedge
#

From testing in just the console, the getPlayer(0) function is working as intended. Here's a snippet of my log:

#

Am just calling:
print("isDead" .. getPlayer(0):isDead())

sour island
#

He's saying get player() gets the body even after making a new character- your log shows otherwise, so I guess he is mistaken or just not waiting long enough?

dark wedge
#

Yea, it works after making a new character and such on the same game. (literally just died and hit new character). Possibly they have it cached OnGameStart or something? Or yea, it's being used too early before the reference is overwritten.

bronze yoke
#

if this limitation existed we would know, half of the mods on the workshop would be non-functional

teal nacelle
#

Hey y'all, just wondering, how would I go about making a sound replacer?

bright fog
teal nacelle
#

Zombie sounds

#

I was gonna make a zombie sound replacer to go with my retexture

bright fog
#

In B41, there was 2 ways:

  • either you define some custom sounds, and you make zombies use them
  • you replace the .bank file which has the zombie sounds (manual installation)

There's one problem with the first solution is that zombies have reactive sounds, so if it's agro to you, it uses agro sounds for example. This is handled by FMOD and you had to manually install the bank files

#

In B42, I don't know yet, I suppose it's the same system

teal nacelle
#

How do I make new .bank files?

#

I'm probably gonna try the second solution

blissful urchin
#

Guys, I need again some help ๐Ÿ˜ฆ ๐Ÿ˜ฆ my mods files worked fine until I depoy it to steam

#

Seems that my file cannot use function from another file, but locally it was working fine when running the mods

nimble badger
#

do not click it

noble shell
#

do you happen to know where the render coroutine for IsoPlayer would be in the source code? Using the constructor IsoPlayer(IsoCell cell, SurvivorDesc survivorDesc, int int1, int int2, int int3) does seem to render 3D model on client side on B41, but not on B42 and I'm trying to figure out why

bronze yoke
#

if that has changed i don't know anything about it, sorry

noble shell
#

no worries ๐Ÿ‘

bronze yoke
#

animals are for some reason a subclass of isoplayer so theoretically it is much easier to get an isoplayer rendering than it was before

noble shell
#

ikr, I was scratching my head trying to figure out why IsoAnimal seems to render just fine too

hallow anvil
crystal canyon
# hallow anvil What values can I put into mod.info?
name=Ultimate Survival Mod
id=ultimateSurvival
poster=poster.png
icon=icon.png
description=Enhance your Project Zomboid experience with new survival mechanics, items, and challenges.
url=https://example.com/ultimate-survival-mod
require=Base,SomeOtherMod
incompatible=OldSurvivalMod,AnotherMod
loadAfter=SomeOtherMod
loadBefore=AnotherMod
pack=UltimateTextures
tiledef=UltimateTiles 200
tags=Vehicles
modversion=1.0
author=MyName
versionMin=42.0.0
crystal canyon
#

for b42 mod ids in required, incompatible, load before and load after need to have a \

#

for example \SomeOtherMod

#

not sure if they will fix that in the future but for now that is the way

hallow anvil
#

many, many thanks!

astral wind
#

someone please make a mod that disables trunk capacity being affected by condition. there was one in b41 now i need one in b42 but no one has made such a thing yet

#

It's making me crazy

crystal canyon
#

not to be a jerk, just encouraging learning new skills but you should try to do it yourself! ๐Ÿ˜„ its actually not that hard

astral wind
#

If someone is willing to show me I'd be more than glad to do it myself

#

But by myself I don't have the brain power for thst stuff

crystal canyon
#

inside the game files where zomboid is installed, you will find a media folder. navigate to it then enter the scripts and then the vehicles folder

#

you will find a file called template_trunk.txt

#

to edit these files I recommend using Visual Studio Code or Notepad++

astral wind
#

well that was easy. thanks

crystal canyon
#

if you just edit the game file, it will get overridden on every update, so I recommend making it a mod. the pinned messages have good starting information

#

but at least now you know the file that contains what you need to change

bright fog
#

To get started

old ginkgo
#

Doggy beat me to it.

#

Weโ€™ve been overhauling the wiki for modding so itโ€™s easier than ever to get started.

crystal canyon
#

๐Ÿ˜„

#

we have a great community here

astral wind
#

so if i wantedd to make it a mod i just upload my changed file and anyone who enables such mod will override the vanilla file with my changed file?

crystal canyon
#

not exactly

astral wind
#

well i changed the file so it no longer reduces capacity but im not sure how to make it a mod like you said

crystal canyon
#

one of the options is to create a new script file. Follow the modding wiki guide on how to set up your mod folder

restive lodge
#

quick question. Am i correct in assuming that commands work in this way

Client calls: SendServerCommand
Server handles: OnServerCommand

Server calls: SendClientCommand
Client handles: OnClientCommand

astral wind
crystal canyon
#

Im sure the mod will get updated eventually

bronze yoke
dull moss
#

I misunderstood the question waaaa

restive lodge
#

Server calls: SendServerCommand
Server handles: OnServerCommand

Client calls: SendClientCommand
Client handles: OnClientCommand

so like this then

#

Server calls: SendServerCommand
Client handles: OnServerCommand

Client calls: SendClientCommand
Server handles: OnClientCommand

or like this lol

dull moss
#

SendServerCommand sends command to client from server
OnClientCommand is ran when server gets command

#

OnServerCommand is ran when client gets command from server
sendClientCommand sends command from client to server

restive lodge
#

Thanks that helps

dull moss
#

thats b41 code, fck knows if it works in b42 PepeLaugh

#

we'll have to wait for MP to arrive or dig in code to see if stuff changed

bronze yoke
#

at the very least in singleplayer b42 networking stuff still works

#

it seems like most of the changes are directed around what is authoritative over what, i wouldn't expect commands to stop working

#

i'm doing my best to ignore what timed actions look like now

dull moss
#

i know they moved car repairs to separate file had to fuck with that to make my stuff work again PepeLaugh

dull moss
#

I'm still confused why petting animal doesn't do perform() while being a timed action

bronze yoke
#

yeah i don't get that one

dull moss
#

so I tied my logic to animation PepeLaugh

#

at least that one is consistent

#

now I wait until someone makes a mod that uses pet animation for some shit like motorcycle cuz why wouldn't you want to pet a motorcycle and my whole thing crumbles

bronze yoke
#

TIS tend to like having things controlled by animations so maybe they just use an anim event to terminate the action

dull moss
#

uuuh stupid queston but i'm not sure how scopes work when it's decorating existing function, eg:

if not getActivatedMods():contains("EvolvingTraitsWorldDisablePetTherapy") then
    local original_ISPetAnimal_animEvent = ISPetAnimal.animEvent
    ---Decorating animEvent on petting animal to boost player mood through petting if they have the perk.
    ---Can't use ISPetAnimal.perform() because fuck knows why we can't, it just doesn't execute.
    ---@param event any
    ---@param parameter any
    function ISPetAnimal:animEvent(event, parameter)
        --- code here
        original_ISPetAnimal_animEvent(self)
    end
end

like will this decorate base game function correctly if mod is not enabled?

bronze yoke
#

yes (but keep in mind that mod ids start with \ now so this will never detect the mod)

dull moss
#

ye it's a placeholder, ty

bronze yoke
#

scope doesn't matter when you're assigning/reading globals

grim fern
#

I'm having trouble updating my zomboid mod. no matter what I do, it claims there is no mod.info file despite the fact that I've quadruple checked that there is one in the correct locations

ebon dagger
#

Anyone had any luck with adding pre-filled custom bags to the distrobution system yet?

I defined the Bag_BagNameHere

I defined the Outfit

And I merged them into BagsAndContainers and Distrobutions.all. Game crashes with no errors, so I am kinda stuck with no clues to follow.

#

I'm likely missing an important step.,

crystal canyon
#

mind if I see your code?

#

or at least the console

grand cloak
#

do you guys know where inside the game files the traits definitions are located?

crystal canyon
#

creationmethods?

#

MainCreationMethods.lua

grand cloak
#

yeah but

#

it adds the traits to the game but it doesnt define their effects

#

i think

bronze yoke
#

what you're looking for doesn't exist

crystal canyon
#

ahh thats what you mean

grand cloak
#

but how is it done then

bronze yoke
#

the game doesn't define trait effects anywhere, just whatever system uses that trait will have hardcoded checks for that trait and apply an effect based on that

ebon dagger
#
require 'Items/ProceduralDistributions'
require 'Items/Distribution_BagsAndContainers'

BagsAndContainers["Bag_AgentSatchel"] = {
        rolls = 1,
        items = {
            "TKE.LoreAudioLogs", 1,
            "TKE.LoreVHS", 1,
            "TKE.LorePrintedDocuments", 1,
            "TKE.LoreDisc", 1,
            "TKE.LoreTranscribedCommunications", 1,
            "TKE.LoreDisturbingPhoto", 1,
            "TKE.LoreUndevelopedFilm", 1,
        },
        junk = {
            rolls = 1,
            items = {

            }
        }
    }

Outfit_TKE_Hazmat = {
        rolls = 1,
        items = {
            "TKE.AgencySatchel", 1,
        },
        bags = BagsAndContainers.Bag_AgentSatchel,
        junk = {
            rolls = 1,
            items = {

            }
        }
    }

local function preDistributionMerge()
    table.insert(Distributions.all, Outfit_TKE_Hazmat)
end


Events.OnPreDistributionMerge.Add(preDistributionMerge)```
bronze yoke
#

e.g. the driving system checks for slow driver and caps your speed

grand cloak
#

oh

#

interesting

ebon dagger
#

oops forgot the reply @crystal canyon

grand cloak
#

that's quite impratical tbh

#

but thanks

bronze yoke
#

yeah for modding purposes it often means you just can't do something a vanilla trait does

grand cloak
#

yeah

ebon dagger
# crystal canyon or at least the console

and the colsole:

    java.lang.NullPointerException: Cannot invoke "se.krka.kahlua.vm.KahluaTable.len()" because "<local2>" is null at TableLib.insert(TableLib.java:217).
    Stack trace:
        se.krka.kahlua.stdlib.TableLib.insert(TableLib.java:217)
        se.krka.kahlua.stdlib.TableLib.call(TableLib.java:89)
        se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:192)
        se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:988)
        se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
        se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
        se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
        se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
        se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
        zombie.Lua.Event.trigger(Event.java:81)
        zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:281)
        zombie.iso.IsoWorld.init(IsoWorld.java:2437)
        zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:301)
        zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:251)
        java.base/java.lang.Thread.run(Unknown Source)
LOG  : General      f:0, t:1735953439333> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: table.insert
function: preDistributionMerge -- file: TKE_Distrobutions.lua line # 38 | MOD: They Knew Expanded```
crystal canyon
#

hmm you're using proceduraldistributions, but are trying to insert into Distributions.all which is not in procedural, it is in Distributions.lua

#

either change it or require 'Items/Distributions'

#

Distributions = Distributions or {};

ebon dagger
#

I'll change that and give it a few swings! Ty.

crystal canyon
#

you could perhaps add your bag and contents to this table instead

bronze yoke
crystal canyon
#

then is he calling it while the table is not initialized?

bronze yoke
#

i don't see anything defined as Distributions.all

ebon dagger
bronze yoke
#

in the vanilla file

#

you're trying to insert to a table that doesn't exist

ebon dagger
#

Line 79

bronze yoke
#

that's not in Distributions

crystal canyon
#

yeah, alb is right. there is no all in the distribution table

ebon dagger
#

OH

#

Ok

bronze yoke
#

try inserting to SuburbsDistributions.all instead

ebon dagger
#

Will do! I appreciate all the help.

hybrid tiger
#

How do the numbers in the distribtutions relate to the spawn percentages and the rolls amount?
Would:

    rolls = 4,
    items = {
        "LetterHandwritten", 50,
        "Lighter", 20,
        "Locket", 20,
        "Medal_Bronze", 20,
        "Medal_Gold", 10,
        "Medal_Silver", 20,
        "MilitaryMedal", 20,
        "Necklace_DogTag", 10,
        "Necklace_SilverCrucifix", 10,
        "PenFancy", 10,
        "Photo", 20,
        "Photo", 50,
        "Photo_VeryOld", 20,
        "Pocketwatch", 10,
        "Postcard", 50,
        "Ring_Left_RingFinger_Gold", 20,
        "SmokingPipe", 10,
        "StraightRazor", 10,
        "WristWatch_Left_Expensive", 1,
    },```
Using that as an example would that mean that the LetterHandwritten have a 50% of spawning per roll, and all other items have their weight % chance of spawning (several items per roll?)
Or does it add all the weights and spawns one item per roll?
bronze yoke
#

pedantically it's not a weight, just a chance - every 'roll' each item in the list is rolled for against their individual chances, the chances of other items don't affect each other

#

they aren't raw percentages and are honestly quite difficult to predict but technically they should be out of 250 on default loot settings

hybrid tiger
#

so letter handwritten would be 50/250
Lighter a 20/250
...
chance of spawning in roughly?

bronze yoke
#

but they're also affected heavily by zombie population in the area so the chance you put in is never going to be the actual chance

hybrid tiger
#

ah gotcha

#

is there a general rule of thumb?

bronze yoke
#

base it off of vanilla

hybrid tiger
#

so a 250 "weight" would more or less guarantee an item to spawn in on default settings

bronze yoke
#

from what i've heard when people have tried this it's not actually reliable, if you want it to be 100% just set it to a crazy high number

hybrid tiger
#

gotcha

#

ty

ebon dagger
#

Ok, everything is working so far. No more crashes. But in the console, it appears I am missing another step.

LOG  : General      f:1989, t:1735955284365> ItemPickInfo -> unable to set source grid pick info, Caller: FillContainer, for Container: AgencySatchelWithBackpack```
zenith harness
#

Can someone help me with a mod I am making it is a discord logger and i am trying to get the sandbox options to work but I just am having trouble

south ginkgo
#

Someone who makes mods for Project Zomboid, can you help me with something?

random finch
#

When you highlight the ground, you get these side-effects of the squares being outlined without texture. I think you can also get this side-effect when loading snow textures in.

Any idea of how to replicate this outline method?

dull moss
#

1 min read, highly recommend

random finch
south ginkgo
# dull moss https://dontasktoask.com/

Ah, sorry about that, Iโ€™ll try to be more direct. My mod isnโ€™t showing up in the mods tab to be activated in the game. I was wondering if I need to publish it for it to appear, or if it might be some issue with my mod

dull moss
#

Mod issue. Which folder is your mod in?

#

You don't have to publish before mod appears

tardy mural
#

Also, do you have a mod.info file with the correct content?

south ginkgo
#

yes

dull moss
#

So if it doesn't appear it's in wrong location or it has incorrect folder structure or mod.info is screwed

south ginkgo
#

I will send the directory here

dull moss
#

Your 3 options pretty much of why mod is not in the mod list

tardy mural
#

Also keep in mind directory structure changed in B42 compared to previous versions so old guides and even the "mod template" provided by the game are outdated

south ginkgo
#

NoMuscleStrain/
mod.info
media/
lua/
server/
RemoveMuscleStrain.lua
It's a mod where I'm trying to remove muscle strain from the game

tardy mural
#

Yeah this looks like the old directory strcuture

south ginkgo
#

I think because I'm used to B41 mods, Iโ€™m having trouble producing them in B42

tardy mural
#

There is a pinned message explaining the new structure in this channel

ebon dagger
#

Not trying to sound mean or anything, but you don't need that mod I think?

There is a sandbox option to set it. You can just set it to zero.

south ginkgo
#

I donโ€™t want to use Sandbox

dull moss
ebon dagger
#

Sure, you do you. The world is your oyster ๐Ÿ˜„

south ginkgo
#

Iโ€™ll take a look. Iโ€™m learning how to use this confusing app

dull moss
#

Are you like adjusting muscle pain or removing it fully? And why not sandbox, you using this mod idea to learn PZ modding?

old ginkgo
#

Yeah you can entirely disable it via sandbox settings so while you canโ€ฆabsolutely make a mod to remove it itโ€™s a bit pointless.

tardy mural
#

Since we are already talking about modding changes in B42 compared to B41, does anyone know why this translation doesn't work in B42?

Recipe_EN = {
    Recipe_MakeEnginePart_w = "Make Spare Engine Parts",
    Recipe_MakeEnginePart_m = "Make Spare Engine Parts",
    Recipe_MakeEnginePart_e = "Make Spare Engine Parts",
}```
dull moss
#

I bought this car that came with wheels but I'mma make my own wheels for it myself PepeLaugh

south ginkgo
old ginkgo
#

You can find most of the information about the basics of modding; including addendums about b42 updates here

south ginkgo
#

learning, you know

dull moss
#

Fair

#

I'd still recommend something that's not already present but you do you

stoic patrol
#

One question, is it possible to run serverside scripts, without them being received by the client?
I really want to make a couple of custom scripts for my server but I don't want them to be open source, because they are player detections or calculations. Is this possible?

tacit pebble
#

omg.. wrong script files can break your game completely and end-user can't be reconized this is from one of mods.
game just doesn't start, like current AMD player's issues.

tardy mural
#

Can't it be tracked back to a specific mod with the error messages in console.txt?

#

(I accidentally did this to myself and soft locked myself out of the game with an error I introduced, which I was able to find and fix with the log)

cosmic ermine
#

Do you guys still support 41.78 for newer mods?

tacit pebble
#
LOG  : General      f:0, t:1735958155639> Load Scripts: CraftRecipe, loadMode = Init
LOG  : General      f:0, t:1735958155665> [craftRecipe] removing script due to load error = HearingAidUret
ERROR: General      f:0, t:1735958155666> ExceptionLogger.logException> Exception thrown
    java.lang.Exception: CraftRecipe error in HearingAidUret at CraftRecipe.Load(CraftRecipe.java:359).
    Stack trace:
 -- SOME TRACES --
LOG  : General      f:0, t:1735958155672> Load Scripts: StringList, loadMode = Init
LOG  : General      f:0, t:1735958155672> Load Scripts: EnergyDefinition, loadMode = Init
LOG  : General      f:0, t:1735958155672> Load Scripts: FluidDefinition, loadMode = Init
LOG  : General      f:0, t:1735958155674> Load Scripts: TimedAction, loadMode = Init
LOG  : General      f:0, t:1735958155675> Load Scripts: Ragdoll, loadMode = Init
WARN : General      f:0, t:1735958155757> TaggedObjectManager.createTagBits   > manager-> new tag discovered that was not preprocessed, tag: keyduplicator
WARN : General      f:0, t:1735958155759> TaggedObjectManager.createTagBits   > manager-> new tag discovered that was not preprocessed, tag: recipes_stone_anvil
WARN : General      f:0, t:1735958155760> TaggedObjectManager.createTagBits   > manager-> new tag discovered that was not preprocessed, tag: advancedfurnace
ERROR: General      f:0, t:1735958155765> GameWindow.uncaughtException        > Unhandled java.lang.RuntimeException thrown by thread MainThread.
ERROR: General      f:0, t:1735958155766> ExceptionLogger.logException> Exception thrown
    java.lang.RuntimeException: java.io.IOException: Script load errors. at GameWindow.mainThreadInit(GameWindow.java:705). Message: Unhandled java.lang.RuntimeException thrown by thread MainThread.
    Stack trace:
 -- SOME TRACES --
        ... 2 more
LOG  : General      f:0, t:1735958155766> GameThread exited.

Like you saw, game just exited itself without any warning, and nomal player never know what mod is the issue.

#

java.lang.Exception: CraftRecipe error in HearingAidUret at CraftRecipe.Load(CraftRecipe.java:359).
this is the only clue

bronze yoke
#

to be fair my only new mod since b42 dropped entirely hinges around a b42 only mechanic but i wouldn't develop for b41 and b42 simultaneously in general, except maybe if a mod benefitted a lot from multiplayer

cosmic ermine
# bronze yoke i don't

Should my mod contain media then? If it's going to be for 42+ only then it should only contain common and 42, no?

stoic patrol
red tiger
#

To answer your question, yes. Your mod can load a file from the ~/Zomboid/Lua/** folder, making it capable of loadstring()() calls.

#

@stoic patrol

stoic patrol
#

How do you bypass this detection on clientside?

bronze yoke
red tiger
stoic patrol
#

for example said file x doesnt exists

bronze yoke
#

nothing in the Lua/ folder is checksummed to begin with

red tiger
#

You then place the code in the server Lua folder.

#

Call it, read it, then loadstring it

#

I have a framework that does this for anti-cheat and other proprietary works for server-exclusive content.

stoic patrol
#

Let me explain better, let's say I create serveside.lua in that folder and run the server. When another client tries to connect, it says that this file is not in its files and cannot be connected.

cosmic ermine
#
name='85 Lamborghini Countach 5000QV
id=Isaglish_LamborghiniCountach5000QV
authors=Isaglish
description=Adds the Lamborghini Countach 5000QV
poster=poster.png
```The `id` should be fine right?
red tiger
bronze yoke
#

the checksum only covers:
.lua files in media/lua/shared, media/lua/client and media/lua/server
.txt files in media/scripts
nothing else is covered

stoic patrol
bronze yoke
#

you can even put it in the main mod folder so long as you don't put it somewhere it can get checksummed

#

but there's not much point to that

fast laurel
#

For making profession and trait overhauls, is it easier to use the framework on the workshop? Has anyone used it and wouldn't mind fielding some dumb questions?

crystal canyon
#

you can dl it, check it out and see if you think its too complicated. (I went overboard and added a bunch of stuff im not gonna use that I need to remove in next update)

fast laurel
#

I want to edit what traits and professions give first, maybe add some traits and professions if I feel feisty.

#

Do we know what's coming down the chute in the next update for traits and profs?

hidden compass
#

I went ahead and posted this in the Modding Reports/Request thread (sorry, I'll be careful from now on), but is there any way to make empty Drainable items available for processing in a recipe? I would like to implement a โ€œRecipe with empty items as the processing targetโ€.

crystal canyon
#

well if youre gonna modify the vanilla professions first, don use the framework

fast laurel
#

Oh interesting

crystal canyon
hidden compass
crystal canyon
#

can you give an example of what you want to do when you say โ€œRecipe with empty items as the processing targetโ€

tacit pebble
#

I'm asking just because I'm not sure,
should i go to TIS report forum with this instead of modding report thread? or this thread is better? any advices?
#1318920979581501502 message

hidden compass
# crystal canyon can you give an example of what you want to do when you say โ€œRecipe with empty i...

I have added mirrored eye makeup; in B42 cosmetics become consumable (Drainable) and the item is removed when consumed. However, I want to keep the mirror element for my added item, so I set DisappearOnUse to false on the Drainable item. This created a situation where the item remained in the โ€œemptyโ€ state.

For this empty Drainable, I would like to create a recipe to refill the remaining amount from other cosmetics (eye makeup, foundation, lipstick). The same kind of items can be done with the default function of Drainable, but I want to implement refill between different items.

stoic patrol
#

Is there somewhere I can find documentation for functions like these?

#

I don't know if it's some kind of implicit class

stoic patrol
#

ty

ornate sand
crystal canyon
ornate sand
#

I just woke up and I'm not even in my 2nd cup o' joe. Maybe I shouldn't be trying to answer any questions, including "good morning" lol

trim mist
#

Just gonna forward this here. If you think this would be useful, please react to it in the thread!

crystal canyon
#

I hope someone more knowledgeable can chime in on this

hidden compass
crystal canyon
#

gotcha

hidden compass
#

Anyway, I think the essence of this problem is that Drainable items are designed as recipes for consumption. So, when I create such a recipe, I am doing the useless process of โ€œ restoring the consumed remaining amount for UseDeltaโ€ in the OnCreate function. Of course, it is quite possible that I just don't know how to do that!

crystal canyon
#

UsedDelta is deprecated now, no?

#

woops, you said UseDelta, theyre different

hidden compass
#

Yes, and there is a setCurrentUsesFloat method to change current remains.

bronze yoke
#

it's the same thing anyway, i think they just realised that having two things one letter apart isn't a good idea

crystal canyon
#

yeah. I just need to close all code editors and just play

stoic patrol
#

Is there a way to verify the integrity of the clientside classes?

#

I've seen people modifying a specific .class to get "wallhack" meaning they modify the light class. It's possible that the server knows if they have modified any class.

bronze yoke
#

it's not possible without getting all of your players to run a modified version of the game that does that - you can't do it through a regular mod

quiet rain
#

I'm having a silly issue with corpse / tile deletion. I'm deleting a zombie corpse using removeCorpse, and using RemoveFromSquare and RemoveFromWorld just to be sure.
The strange thing is that the corpse does get removed. But when the save is loaded again or the server restarts, the corpse will then become visible. Some kind of sync issue, or am I missing something?

old ginkgo
bronze yoke
#

the server's perspective is the only one that saves so things reappearing after reloading means it wasn't deleted on the server

quiet rain
#

It's a function that's run onZombieDead, which I thought would be good enough to have it pass on the server? But yeah that's fair enough, I should've figured it out myself it was a sync thing ๐Ÿ˜„

tardy mural
# ornate sand They gots to be craftRecipe nowadays

Should it look like this? Because this still doesn't seem to be working

    craftRecipe_MakeEnginePart_w = "Make Spare Engine Parts",
    craftRecipe_MakeEnginePart_m = "Make Spare Engine Parts",
    craftRecipe_MakeEnginePart_e = "Make Spare Engine Parts",
}```
ornate sand
fast laurel
old ginkgo
#

I canโ€™t verify but I believe translations arenโ€™t currently implemented on the new crafting menu? Likely to be added soon. I swear even vanilla crafts have the issue if Iโ€™m not mistaken.

tardy mural
#

Ah I see, thank you

#

So I don't need to bother with thi anymore

old ginkgo
#

Not for now at least no.

hidden compass
# hidden compass I have added mirrored eye makeup; in B42 cosmetics become consumable (Drainable)...

By the way, I was able to solve this problem by โ€œadding a recipe with the IsEmpty flag in addition to the normal recipeโ€ to run in both cases. However, I don't think this is smart because I see two recipes in the recipe menu. I can remove the display from the recipe menu and only execute from the context menu, but I would like to keep the display in the recipe menu where we can check the recipe status. FYI.

I would still like to see a flag like โ€œIgnore consumption on Drainable itemsโ€ (NotConsumption). ๐Ÿ˜ฆ

eager imp
#

๐Ÿ‘€ makeup?

#

I love makeup

hidden compass
eager imp
#

This is so cute i love the compact

old ginkgo
bright fog
#

Yea me too wtf

#

xD

tardy mural
#

Is it also due to that unstable release, that crafting (timed actions) emit no sound?

bright fog
#

Hmm

#

You sure there's 0 sounds ?

tardy mural
#

Atleast nothing I can hear and I tried a few different timed actions

bright fog
#

I haven't played enough lol

old ginkgo
#

Are you in โ€œinvisibleโ€ mode in debug mode?

bright fog
#

yea that too

old ginkgo
#

Because all of mine have had noises.

bright fog
#

Invisible stops noises

eager imp
#

Makes me wanna make more makeup textures

fast galleon
cosmic ermine
#

Has anyone ever had a problem with the vehicle masks? I messed up the UV unwrapping process because it's my first time and the guide isn't exactly perfect which causes some parts of the vehicle to bleed. If it does become a problem then I will have to unwrap and go through the texturing process again.

hidden compass
cosmic ermine
#

Help, I can't find the issue.

ancient grail
cosmic ermine
ancient grail
cosmic ermine
ancient grail
#

this is harder to troubleshoot since its not pointing towards your mods code

it could be a syntax error somewhere

cosmic ermine
#

Does going back to B41 have a chance to corrupt your files?

ancient grail
#

you could narrow it down by determining when its triggered
and what code you have that could have done this

also isolate your mod dont use other mods

ancient grail
cosmic ermine
ancient grail
bronze yoke
ancient grail
#

but this could be something else entirely if its b42 related

bronze yoke
# cosmic ermine

can you scroll up? the actual error is a little higher and it probably indicates what the problem is

#

most likely you've put something in your mod.info that it doesn't like

cosmic ermine
ancient grail
#

you can change your cache directory via startup param

cosmic ermine
bronze yoke
#

if you didn't launch it it's absolutely fine

cosmic ermine
ancient grail
#

i suggest making it b41 compatible first before figuring out b42
if ever this is your first time doing this kind of mod

this is just to reduce issues

cosmic ermine
bronze yoke
#

yeah it definitely failed to load your mod.info, it says id here but it might just be saying that because the entire thing failed

ancient grail
bronze yoke
#

it is at least seeing it though or else there would be no error, it just wouldn't show up

cosmic ermine
#

Mod list is empty.

hidden compass
#

Thanks to all of you, I was able to implement a recipe that uses an empty Drainable item; I'll skip showing for OnTest and OnCreate, but here's a sample craftRecipe.
I would like to thank everyone in this community. I am not fluent in English, but I will try to help this community in a small way.

{
    timedAction = P4PrismPower.P4MakeupEyeshadow,
    time = 50,
    onTest = P4PrismPowerRecipes.OnTest.MakeupEyeshadowRefill,
    onCreate = P4PrismPowerRecipes.OnCreate.MakeupEyeshadowRefill,
    tags = InHandCraft,
    category = Packing,
    inputs
    {
        item 1 [P4PrismPower.P4MakeupEyeshadow] mode:keep itemcount flags[NotFull],
        item 1 [Base.MakeupEyeshadow;Base.MakeupFoundation;Base.Lipstick] mode:keep itemcount flags[NotEmpty],
    }
    outputs
    {
        /* all items are kept */
    }
}```
frosty bridge
#

Hey! Sorry to interrupt. Anyone knows a .lua script that gives a random item OnCreate?
I tried this:

function VeinstoneSmall_OnCreate(items, result, player)
local rand = math.random(1, 100)
if rand <= 65 then
player:getInventory():AddItem("Stone");
elseif rand <= 90 then
player:getInventory():AddItems("Stone", 2);
elseif rand <= 100 then
player:getInventory():AddItems("Stone", 3);
end

But the game enters the debug screen when I use the recipe.

ancient grail
bronze yoke
#

math.random does not exist in zomboid

#

use zombrand or newrandom

cosmic ermine
#
name='85 Lamborghini Countach 5000QV
id=85countach5000qv
author=Isaglish
description=Adds 1985 Lamborghini Countach 5000QV
poster=poster.png
modversion=1.0.0
pzversion=42
versionMin=42
frosty bridge
#

Alright! I'll try. Thank you guys!

ancient grail
#

should be authors not author
but i dont think this is the issue

bronze yoke
#

no, author is the b42 syntax

mellow frigate
#

is ' a valid character for a name ?

bronze yoke
#

i think it must be because a lot of mods have names like '<name>'s Doors' but maybe it doesn't like it at the start?

bronze yoke
#

oh actually

#

try versionMin=42.0.0

#

i think i remember someone saying it hates short versions there

cosmic ermine
#

Why does it show the error at the line where it gets the ID of my mod? I'll try that though.

bronze yoke
#

the error specifically is that the entire mod info object does not exist, so getting the id from it doesn't work

#

so it could be anything in there

cosmic ermine
#

B-Bruh...

#

Thanks.

frosty bridge
ebon dagger
#

Ok, in case anyone else ever uses the search function in this discord for future issues. I figured out how to populate pre-filled bags/backpacks/whatever.

#

Thanks for the help earlier @bronze yoke and @crystal canyon

crystal canyon
#

Glad i was able to help even if at least a little

cosmic ermine
#

Anyone know why this is getting thrown? It was working fine but when I started editing the vehicle's scale in the editor it suddenly starts throwing this error.

#

I can't reload the scripts either.

unkempt epoch
onyx valve
#

Hello, I am making an Attachment Definitions for my weapon mod, at first I tried with 2 weapons, the Thompson and Hellriegel and everything was fine, but when I placed all the weapons as I want, only the VEPR, Lewis Gun, Kriss Vector and MP9 appeared in the zombies, is there something I'm forgetting to place? Or it just can't be done like I'm trying to do.

cosmic ermine
#

What does outside mean?

ebon dagger
#

Anyone else had your mod just... disable itself? No errors, no issues. Just takes itself off of a save game?

ornate sand
ebon dagger
tranquil reef
#

items don't have to be dung to be compostable right?

#

the tag just automatically allows it?

cosmic ermine
grim fern
#

can I get some assistance? I'm trying to update my mod but I'm running into an issue. No matter where I put mod.info, Zomboid tells me that my mod is missing a mod.info file, preventing me from updating my mod

#

I've tried putting mod.info in "Zomboid/Workshop/StygianIkazuchi/Contents/mods/", "Zomboid/Workshop/StygianIkazuchi/Contents/mods/42", AND "Zomboid/Workshop/StygianIkazuchi/Contents/mods/common". The mod is meant to be for b41 and b42.

cosmic ermine
dull moss
grim fern
#

I don't. I'm using (with permission) files FROM a submod but I thought I'd changed it to be correct. one second.

dull moss
#

Bro I'm on phone

#

Can you send a text not a file xd

grim fern
#

ok one second

dull moss
#

If you put it in ```

#

It formats as multipine code

grim fern
#
id=StygianIkazuchi
author=StygianIkazuchi
description=Thunder Ram
url=https://steamcommunity.com/sharedfiles/filedetails/?id=3215926413
poster=preview.png
icon=poster.png
modversion=2
require=\FurryMod
incompatible=
loadModAfter=\FurryMod
loadModBefore=\FurryApocalypse
category=Silly/Fun
versionMin=42.0```
dull moss
#

Shouldn't id start with \

grim fern
#

I'll try that

dull moss
#

Not sure, haven't gotten used to new thing yet but ye try that

grim fern
#

I mean it's something I haven't tried yet

dull moss
#

Also haven't used categories myself so idk if that's correct

grim fern
#

so might as well

cosmic ermine
dull moss
#

I have url but it doesn't work but it won't break the mod

cosmic ermine
#

Can you show how they're displayed in the mod manager?

dull moss
#

As an example

grim fern
#

still says "your mod is missing a mod.info file."

cosmic ermine
dull moss
#

Also id doesn't need \ apparently

grim fern
#

how do I do that without taking multiple images?

dull moss
#

Do you use any IDE or just editing mods in notepad

grim fern
#

not sure what an IDE is so probably not

dull moss
#

How do you make mod? With notepad or something like VSCode

#

How do you edit Lua files or mod.info, etc

grim fern
#

well, someone else ported my mod (an addon for Anthro Survivors) to b42 and gave me permission to use said files for my own update (they didn't fix some clipping issues), so I didn't need to edit any Lua files, but I use Notepad++

dull moss
#

Or something similar

#

There should be some way to display tree of a folder and it's content recursively

grim fern
#

is this for cmd or something else? because it says windows server

dull moss
#

Try cmd

#

Haven't used it myself and on the phone so can't check but should work probably

#

To open cmd in your mod folder just go in it, select filepath on top and type cmd there and press enter, then just do tree

#

It'll open cmd in your current dir

#

Also should work on win10 and 11

#

Says on top to what OS it applies

grim fern
#

yeah I can't get the command to work

dull moss
#

Oh

grim fern
#

for one, what do you mean "select filepath on top and type cmd"?

dull moss
#

Try it in PowerShell

main pasture
dull moss
main pasture
cosmic ermine
#

What setScript? And no the extents only go as far as the shell.

grim fern
#

ok I can't post it in text form because it says the server thinks it's spam

main pasture
#

From the right click context menu "vehicle>set script>(the same vehicle)", to load it again

dull moss
#

Sometimes it chokes when msg is very close to 2000 characters

grim fern
#

it's 3174 characters

dull moss
#

Ye 2000 is limit

#

Break it into 2

#

And send 2 msgs

cosmic ermine
#

Use code block or upload it as file.

main pasture
grim fern
dull moss
#

Just send txt then

grim fern
#

small note, the reason there are 3 mod.info files is because I was just trying to get Zomboid to recognize ANY of them

#

and it doesn't recognize any of them

dull moss
#

This is both for b41 and b42 right?

#

Or b42 only

grim fern
#

both

#

but zomboid b42 is refusing to recognize the mod.info file in any of those locations

dull moss
#

Then for one you're missing mod info in your b41 folder

grim fern
#

no it's just listed at the top for some reason

#

above the 42 folder

dull moss
#

Oh

#

Ah

#

It should be Contents/mods/NameOfTheMod/yourFiles

cosmic ermine
dull moss
#

You missed your name

#

Check file structure here

grim fern
dull moss
#

It should be Contents/mods/stygianwhatever/42

#

That's how they always been

grim fern
#

how did I miss that? my old version was set up that way...

dull moss
#

Oh maybe if you don't have submod you don't need that

grim fern
#

well that's infuriating but thanks

dull moss
#

I never made a mod without submod

#

So maybe without submods structure is different

#

Worth a try

grim fern
#

yeah now it works. that's an annoying oversight

dull moss
#

Heh

cosmic ermine
gloomy quest
# cosmic ermine Stupid thing still won't budge.

That is a really great looking model and I'm looking forward to seeing how you progress with getting your models into the game.

I got the game a few days ago and I'm also looking how I could do the same with my models. Got plenty of cars I've modelled that I want to try ingame, if time allows me.

If you don't mind I'll be observing how it went for you so I can be guided myself.

main pasture
# cosmic ermine I really can't figure it out.

That is weird. Maybe it is floating off the ground? The vanilla vehicles have the chassis bottom at about 0 height in the editor. Maybe it spawned too high? Maybe try to raise and drop it with the "vehicle angles ui" from the context menu

dull moss
cosmic ermine
grim fern
#

so last question. does there need to be a separate mod.info for b41 or does the one for b42 work for b41? and if a separate one is needed, where does it go specifically? I know I don't need 3 mod.info files lol

dull moss
#

I have 3, one in b42, one in common and one in root

#

root is b41

#

Other 2 are b42

grim fern
#

ok

dull moss
#

If I'm not mistaken

#

Check the repo

cosmic ermine
dull moss
grim fern
#

thankfully I only have this one mod, so once it's updated I don't have to update anything until the official anthro survivors updates (to swap requirements from the temporary patch someone made to the official one)

main pasture
# cosmic ermine Doesn't work.

No idea then. I would just copy/compare the extent and wheel configurations of known working config to get it to drive. Then try to adjust them to suit your car little by little to ensure you know what it was if/when it breaks

cosmic ermine
#

Bruh, this is really demoralizing.

elder lake
#

Guys, has anyone tried creating new workshops with custom tiles?

main pasture
ebon dagger
#

If I use :getModData() on a corpse, and that corpse despawns. Does that data get garbage collected and removed? Or am I building an ever growing data leak?

torn igloo
#

1 game tick is 1 ingame second or 0.5 ingame second?

lyric bane
#

oh that message is old

#

I was searching for the phrase "week one" and found it

gloomy quest
ashen ledge
#

hi, I am currently trying to adapt a zombie voice pack mod to build 42
But i have hit a roadblock. while the mod works perfectly fine in 41, i cant get the sounds to replace the vanilla ones in the new version.
i have done the folder restructuring and the game accepts the mod as a compatible one.
did something change about the way i need to declare the file path?

grizzled fulcrum
#

Shouldn't be measuring game time (as in converting ticks to seconds/minutes/hours) via ticks though I don't think since there's already a gametime sorta class

tacit pebble
#

hmm.. can't i use getAmount() and getPerk()? or am i doing something wrong?

    if craftRecipe:getXPAwardCount() > 0 then
        local xplist = craftRecipe:getXPAward(0)
        if xplist:getAmount() then -- Returns non-table error
            print(xplist:getAmount()) -- I expected to be returned "5" for the value
        end
    end

https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/scripting/entity/components/crafting/CraftRecipe.xp_Award.html

vivid imp
#

How hard would it be to add an icon to an inventory item's row? I want to make a mod that gives an indicator to if an item is smeltable, if its packable, etc. I feel it would really help the loot goblins out there

ornate sand
vivid imp
#

A png icon, ideally

ornate sand
#

Then idk

vivid imp
#

Adding more text in parenthesis would just clutter up things imo

#

Like (rotten) or (frozen)

tacit pebble
ornate sand
vivid imp
#

Ah i see, i suppose that would work too!

tacit pebble
#

I mean, if it has type somethign like rottenFood then simply add a line to explain what is the rottenFood
from lua side

vivid imp
#

Sorry for the misunderstanding haha

#

Hmmmm ok thats good food for thought

#

I wonder if i can dynamically get all valid items that can be smelted in a forge and give them a special tag... honestly im just throwing out ideas here

ornate sand
#

I'm sure there's a way to do that. The quick and easy way would be to overwrite 'em but that's also the bad way to do it.
A more challenging but way better way would be to somehow have your mod just pop in that little icon/tooltip without modifying the og item scripts.