#mod_development

1 messages ยท Page 289 of 1

vast pier
#

I can download stuff still

#

just can't connect to steam servers

#

It's weird

cosmic ermine
#

Owh.

vast pier
#

uses my phone data instead of my hotspot

#

I have unlimited data so

cosmic ermine
#

What? I thought I had to offset it myself lol

elfin cradle
#

Question; Does the name on my object matter? like, does having the file name start with the word "Bag_" matter?

cosmic ermine
#

Uhh, how do you guys find the screen coordinates of the item part description for hovering?

elfin cradle
#

Okay. Figured out the issue. THANK YOU! First time I read through the article you posted I missed one of the spoilered sections (Ironically the most important one that had the exact answer to my question) I'll get on that later but I'm now out 16 hours of smashing my face against a brick wall lol

hybrid tiger
#

I might be going crazy but, wondering if someone can help figure out my issue
I am trying to add items to a distrubution (zombie generic) with sandbox vars during the OnInitGlobalModData event
However the items appear in LootZed but arent spawning in at all (and I am calling ItemPickerJava.Parse() at the end)
Can post code if needed

#

no zombie has has the carton on them

silent zealot
#

Did you start a new game to get new zombies generated?

hybrid tiger
#

yup

#

full new save each time I make changes

silent zealot
#

Well that's all the help I can offer for this. Good luck.

hybrid tiger
#

lol yeah its been driving me crazy

#

at one point I had it working (i think?)

#

then I changed something and it doesnt

silent zealot
hybrid tiger
#

I told myself Ill put it on git once I got it working

silent zealot
#

So when I say "it used to work!" I can look at what I changed.

hybrid tiger
#

I made a fool of myself

#

maybe im just extremly unlucky and the mod works perfectly

#

surely thats it

faint jewel
#

i need ibrus to update tsarslib

ornate sand
#

Hope ibrus also fixes true music. I appreciate the folks who have tried to port it to B42 but it's buggier than Starship Troopers ๐Ÿ˜„

crisp fossil
#

Hi so I was tinkering with the overall weight reduction for a while and found out that fish and liquids have different logic for weight. I have solved the fish issue, I handled the weight on fish creation, but I can't solve the liquid. Anyone have idea?

cosmic ermine
#

Hey, I guess this is how people get the coordinates of the vehicle part overlays.

#

Hehe, it works.

ebon dagger
#

Anyone played around with the code in Onbreak.lua?

I'm trying to get a new item to stick in zombies lol.

The code seems to be working, and if I change the item that I'm creating into "Base.LetterOpener" it seems to work correctly.

But my custom item is not showing up. Is there something I have to set up in models? I'm not finding anything specifically.

I'm playing around with adding my models to AttachedWeaponDefinitions. But so far, no dice.

ebon dagger
#

Oh, NM. I figured it out.

ornate sand
ebon dagger
#

Yup

#

Well, Bolt I guess.

ornate sand
#

Crossbow incoming

ebon dagger
#

I'm actually thinking about making a shared "Archery" Library to let other modders add bows in a much easier fashion.

silent zealot
#

I've seen a few crossbow mods, no idea if any fire actual bolt and have the bolts stick in targets.

ebon dagger
#

Not that I can find lol

#

So I figured I would do it ๐Ÿ˜„

ornate sand
silent zealot
#

Just me modding away thing that annoy me ๐Ÿ˜‚

cosmic ermine
#

I don't like how you also have to add the base image's offset to the coordinates of each part's tooltip.

ISCarMechanicsOverlay.CarList["Base.isg85countach"] = {imgPrefix = "isg85countach_", x=10,y=-20}
```So if your base image's offset is `x=10` and `y=-20`, you literally have to:
```lua
ISCarMechanicsOverlay.PartList["Battery"].vehicles["isg85countach_"] = {x=121,y=50,x2=163,y2=80};
````{x=111+10,y=70-20,x2=153+10,y2=100-20}`
#

Although you could just find the coordinates first and then tell ChatGPT to add 10 to each x/x2 and subtract 20 from each y/y2.

faint jewel
#

there's an ingame ui editor. just saying.

ebon dagger
#

A what...

#

Omg, how am I just now learning that.

cosmic ermine
faint jewel
#

cuz i tried... you quit listening.

cosmic ermine
#

Tried?

faint jewel
#

i told oyu i made a tool and everything.

cosmic ermine
#

You didn't even send any messages 2.5 hours ago.

cosmic ermine
undone elbow
#

I vote for an atmosphere that would correspond to 1993 and earlier.

tulip valve
#

Is there a mod that lets me sharpen katana? Searched the workshop but couldnt find, but I could have sworn that I saw a mod like that before hmm

wooden falcon
#

I made a mod for PZ a few years ago when I played. I'd like to have that mod work in the unstable build 42, but I'm not sure what I have to do in order to make the mod show up in my mod list at the main menu. Any tips or can someone point me at a resource that explains it? I tried looking it up myself, but didn't find anything.

faint jewel
#

yup

elfin cradle
#

Anyone able to help me with a possible GUID issue? I'm going through the guide i was given and have no errors, but the item is invisible when held. I got it properly rigged to the skeleton and have followed everything to the letter. On possible issues the guide says:

ornate sand
#

Do bags held in hands need their own entire GUID?

elfin cradle
#

They have them; do they not need their own?

#
<fileGuidTable>
    <files>
        <path>media/clothing/clothingItems/Dynn_MakeshiftBodyBag_Plastic</path>
        <guid>dynn31b9-1818-4c7d-80e4-6f1d9768e059</guid>
    </files>
    <files>
        <path>media/clothing/clothingItems/Dynn_MakeshiftBodyBag_Plastic_LHand</path>
        <guid>dynn0759-8196-44b5-9c2f-e0d58197ae88</guid>
    </files>
    <files>
        <path>media/clothing/clothingItems/Dynn_MakeshiftBodyBag_Plastic_RHand</path>
        <guid>dynn14c6-d239-4f01-8391-7e7cdc2dcdf4</guid>
    </files>
</fileGuidTable>
random finch
#

I want to get another players inventory in MP. However, the item inventory table is empty. This works fine on your own player. I see no restriction in the Java code such as an authority or 'is own player' check.

Any idea what's going on?

player:getInventory():getItems()

prints: inventory:getItems(): []

elfin cradle
#

20 hours in on this and once again hitting the wall.

ornate sand
#

And you have an entire xml file for both bodybag_RHand and LHand?

elfin cradle
#

Correct

ornate sand
#

Eurgh

elfin cradle
#

Left

<clothingItem>
    <m_MaleModel>Skinned/BackPacks/Dynn_MakeshiftBodyBag_LHand.fbx</m_MaleModel>
    <m_FemaleModel>Skinned/BackPacks/Dynn_MakeshiftBodyBag_LHand.fbx</m_FemaleModel>
    <m_GUID>dynn0759-8196-44b5-9c2f-e0d58197ae88</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomHue>false</m_AllowRandomHue>
    <m_AllowRandomTint>false</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <textureChoices>Dynn_BodyBagGarbageBag</textureChoices>
</clothingItem>

Right

<clothingItem>
    <m_MaleModel>media/models_X/Skinned/BackPacks/Dynn_MakeshiftBodyBag_RHand.fbx</m_MaleModel>
    <m_FemaleModel>media/models_X/Skinned/BackPacks/Dynn_MakeshiftBodyBag_RHand.fbx</m_FemaleModel>
    <m_GUID>dynn14c6-d239-4f01-8391-7e7cdc2dcdf4</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomHue>false</m_AllowRandomHue>
    <m_AllowRandomTint>false</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <textureChoices>Dynn_BodyBagGarbageBag</textureChoices>
</clothingItem>
ornate sand
#

Maybe the .fbx needs to be re-attached to a different bone?

elfin cradle
#

I'll try that

#

I believe it was Bip01_Spine1 I used when rigging. I guess I can denote that here

#

nope, nadda

silent zealot
elfin cradle
#

OH MY GOD. I think I figured it out.

#

My xml files are generic text files for some reason.

ornate sand
#

Oh dayumn yeah that'll do it ๐Ÿ˜„

elfin cradle
#

let me check some stuff and I'll let you know if that was the only issue

silent zealot
#

mything.xml.txt ?

elfin cradle
#

generic file with no extension

ornate sand
#

Kinda like my first attempts at mod.info.txt ๐Ÿ˜„

silent zealot
#

Better than totallynotavirus.pdf.exe

elfin cradle
#

Still no dice. I wanna scream

#

Anyone able to identify an issue with my Moduel base?

{
    item Dynn_MakeshiftBodyBag_Plastic
    {
        Type                =    Container,
        
        WeightReduction        =    90,
        Weight                =    0,
        Capacity            =    65,    
        RunSpeedModifier     =     2.5,
        
        DisplayName            =    Makeshift Bodybag (Full),
        DisplayCategory            =     Corpse,
        Icon                =    Dynn_BodyBag_Plastic_Full,
        WorldStaticModel         =     Dynn_MakeshiftBodyBag_PlasticFull,
        
        OpenSound    =       OpenBag,
        CloseSound    =       CloseBag,
        PutInSound    =       PutItemInBag,
        
        ReplaceInSecondHand = Dynn_MakeshiftBodyBag_Plastic_LHand holdingumbrellaleft,
        ReplaceInPrimaryHand = Dynn_MakeshiftBodyBag_Plastic_RHand holdingumbrellaright,
    }
}
#

I'm just at a loss going back and forth over what boils down to a simple handbag

ornate sand
#

Where's your ClothingItem entry?

elfin cradle
#

I pulled it out to more closely follow the layout of the base game cooler since it made no sense to equip a bodybag on your back

faint jewel
#

is it possible to add crafting experience via lua?

elfin cradle
#

oh?

ornate sand
#

100%

#

The game can't find the ClothingItem xml if the item script doesn't have a ClothingItem = entry

elfin cradle
#

Gotcha

#

I'll re-intigrate it

#

Still not working =/

ornate sand
#

The ClothingItem entry should be the exact name of the xml file without the .xml part

elfin cradle
#

Still not working even with it...

{
    item Dynn_MakeshiftBodyBag_Plastic
    {
        Type                =    Container,
        ClothingItem         =    Dynn_MakeshiftBodyBag_Plastic,
        
        WeightReduction        =    90,
        Weight                =    0,
        Capacity            =    65,    
        RunSpeedModifier     =     2.5,
        
        DisplayName            =    Makeshift Bodybag (Full),
        DisplayCategory            =     Corpse,
        Icon                =    Dynn_BodyBag_Plastic_Full,
        WorldStaticModel         =     Dynn_MakeshiftBodyBag_PlasticFull,
        
        OpenSound    =       OpenBag,
        CloseSound    =       CloseBag,
        PutInSound    =       PutItemInBag,
        
        ReplaceInSecondHand = Dynn_MakeshiftBodyBag_Plastic_LHand holdingumbrellaleft,
        ReplaceInPrimaryHand = Dynn_MakeshiftBodyBag_Plastic_RHand holdingumbrellaright,
    }
}```
#

okay

#

lets try again

#

still nothing'

#

So my script that has the Mesh&Texture listed. do I need to denote the Left and Right hands there too? I'm presuming not from looking at other mods

severe jay
#

bro making a body bag mod. u gunna have them spawn in hospitals? my dude u gotta ads mortuaries XD

elfin cradle
severe jay
#

rollen with the squad in a hearse XD

ornate sand
#

I wonder if AttachmentReplacement is something you need too?

#

All the vanilla bags seem to have it

elfin cradle
#

Except for the items that can only be held in your hand like coolers and pistol cases

    {
        DisplayName = Cooler,
        DisplayCategory = Container,
        Type = Container,
        Weight = 1.5,
        Icon = Cooler,
        Capacity = 12,
        CloseSound = CloseCooler,
        MetalValue = 15,
        OpenSound = OpenCooler,
        PutInSound = StoreItemCooler,
        ReplaceInPrimaryHand = Bag_Cooler_RHand holdingbagright,
        ReplaceInSecondHand = Bag_Cooler_LHand holdingbagleft,
        RunSpeedModifier = 0.9,
        WeightReduction = 50,
        WorldStaticModel = Cooler_Ground,
    }
    
#

speaking of- I'm gonna reformat my spaghetti mess to look more like the vanilla format here

ornate sand
#

You shoulda seen my face when I opened up the B42 gun scripts and noticed they were all neat and alphabetical, instead of the absolute horrifying mess they were in B41 that I had gotten used to. I was shocked, SHOCKED I say.

elfin cradle
#

So here's a way to test this out. I'm going to change what it calls for in the Primary/Secondary to see if that works.

#

Okay. so we can narrow this issue down to the specific xml files for the LHand and RHand bodybags or the model (although I'm like 90% I did the model right)

iron grove
#

not sure if its anything but your guid file had 2 attach bones instead of just one

severe jay
#

anyone got a Suburbs Distributions template handy for items?

elfin cradle
iron grove
#

did you choose umbrella for a reason

elfin cradle
#

yup

ornate sand
#

A fellow Resident Evil fan

elfin cradle
#

For the animation

ornate sand
#

Oh

iron grove
#

is the scale of your texture correct

elfin cradle
#

I can get it to spawn any other prop in the holding umbrella animation, meaning the issue is likely the model or .xml
As for the texture, yes. I have it mapped correct and the on-ground version of the bag is properly textured

tranquil reef
#

If a mod changes the name ID of an item, will the save break or will the items with that now broken ID just cease to exist

iron grove
#

Sorry if I'm asking bad questions I'm new as well :/

elfin cradle
#

nah nah you're good man

tranquil reef
#

My goal right now is to have those items disappear, not to prevent it from happening lol

elfin cradle
#

best we can do is brainstorm and troubleshoot

elfin cradle
#

Trying to get this fireman-carry when held in left hand to work has been a nightmare. It's rigged to the proper bones/vertex groups and scaled properly.

ornate sand
#

Try the equip on back option, see if even that works

faint jewel
#

oh noooo....

#

you'll have SO much fun with that.

#

my carrying mod taught me that hatred of non comforming bones is legit.

elfin cradle
faint jewel
#

the issue you are going to have.... that body hast o e attached to the attachment bone, more so than the hand or shoulder bone.

#

it will always attach to the attachment bone.

#

and depending on the animation, that little bastard could be ANYWHERE

elfin cradle
#

Hand or Shoulder. Cool so Spine is a no go then?

iron grove
#

Skizot is on the case!

faint jewel
#

nope the hand attachment bone for the arm you are attaching it to.

elfin cradle
#

Thank god I'm saved haha. Okay. I can work with a bit of jank

faint jewel
#

that's the ONLY thing it will actually attach to.

elfin cradle
#

Hand or Shoulder

faint jewel
#

oh it's a LOT of jank lol.

#

nope.

#

attachment.

elfin cradle
#

Oh? so Equip Secondary will? not work>?

#

If I re-rig it to the left shoulder for "Equip Secondary" will that work?

faint jewel
#

most probably not, but you can try

elfin cradle
#

XD

#

I'll give it a go for the sake of trying then embrace the hand jank

tranquil reef
#

I normally refuse to play my own mods, but I'm gonna have to start. I playtest things as surface level as possible and then just hope the players figure it out lol

faint jewel
#

embrace the jank. release your hatred.

#

the dark side of the jank calls you.

tranquil reef
#

absolutely realistically proportioned cash register

elfin cradle
#

Yeeesssssss

#

I shall embrace the jank!

faint jewel
#

it's the 90s, they were huge.

elfin cradle
#

Damn. nope, rigging to left hand didn't work

ornate sand
wispy haven
#

Any mod creators willing to chat about a potential project??

bright fog
wispy haven
#

Ya

elfin cradle
#

I'm about ready to give up on modding.

wispy haven
#

Ty

elfin cradle
#

It's been 22 hours of the blind leading the blind

bright fog
#

What are you trying to achieve ?

faint jewel
#

still causing issues?

elfin cradle
#

I can't get a bag to show up in the player's hands

#

noone knows how to help

faint jewel
#

a bag? or the fireman carry?

elfin cradle
#

It's a bag. held in the left hand. The plan is to just flip it about and use the umbrella animation to get it into the firerman carry position.

#

That's all i've been trying to do

faint jewel
#

you are more than welcome to tear apart my mod and see how i did the corpse bag

elfin cradle
#

look I just want to figure out how to get it to work this way because I have functionality features in mind. if we ignore the fact it's a corpse bag and look at it from a technical standpoint all this boils down to is I can't visually hold a bag in my hand.

faint jewel
#

does it show the bag just in a weird spot? or is it invisible all together?

elfin cradle
#

invisible all together but in the inventory it's equip and it shows up as a prop on the ground when I drop it

faint jewel
#

okay you are doing it as an ACTUAL bag then?

elfin cradle
#

Correct.

faint jewel
#

did you base it on an existing bag?

elfin cradle
#

As in the script?

faint jewel
#

yes

#

because the handheld bag needs it's own model.

elfin cradle
#

I understand that

faint jewel
#

there's the prop bag and then the handheld one.

#

and i will admit, handheld bags are SO stupid to make work.

elfin cradle
#

yes

#

I feel like I'm starting to sound like a broken record explaining this, but if I change the [ReplaceInPrimaryHand = .XML] to anything else it shows a different prop in the proper place, but not when I use my own model's .xml

#

The XML is near identical to all the other ones I've looked at, has it's own GUID separate from the other hand and unused backpack/clothing slot, the pathing moves to the proper folders, my guide table reflects this, all my files cross reference, there's no spelling mistakes. I followed the guide on how to import clothing parts sent to me by someone that made a set of bags the other day and it's still not working

#

Not even pulling another prop out of the game files and replacing the prop with my own works.

faint jewel
#

okay so that makes me think that there might be a model scale issue.

#

as world models and held models for some dumb reason have varying scales.

#

there was a button you couls press that would turn on wireframes....

#

trying to remember what is was.

#

i think i did it in the vehicle editor and it reflected in the world.

#

i am also out of modding for like a year.

#

so lemme get back into the swing.

#

i'm hopping ingame to figure that ou.

#

one sec

ancient grail
#

anyone messed with wind intensity yet?

print(getClimateManager():getWindIntensity())

this works but setting it throws error

elfin cradle
#

if it was a scaling issue the animation would play but the prop would be unseen woundl't it? The animation doesn't even play

faint jewel
#

okay try this!

#

press f7 ingame.

#

then f12

#

then back in the bottom left.

#

you should get that.

#

it will show your model if it's too big or small.

#

wait... nothing?

elfin cradle
#

it opens vehicle editor and screenshot

faint jewel
#

yeah vehicle editor then f12 then back

#

the car in the editor should go wireframe.

#

DOH it's w.

#

not f12

#

stupid hands are all over the place.

#

f7, w, f7

elfin cradle
faint jewel
#

and you dont see anything weird when you move around?

elfin cradle
#

nope.

faint jewel
#

hmmm....

#

would it be okay with you if i took a look?

elfin cradle
#

At?

faint jewel
#

your mod so far?

elfin cradle
#

oh sure.

faint jewel
#

i mean i will tell you what to fix not fix it if you want.

elfin cradle
#

lets see here

#

How you want me to get it to you?

faint jewel
#

jusdt a zip of the folder from mods is fine.

#

can send here if you want.

#

sent you a message, you can drop it there actually.

elfin cradle
#

We'll continue this over DMs

#

Thanks m8

placid crown
#

mod for have cat?

ornate sand
#

By now someone is surely making a cat mod

charred carbon
#

guys,if i want to change the house alarm to my own music on B42,which document should i edit?spiffo

bright fog
charred carbon
#

which txt can i use?

crisp fossil
#

I am currently looping through my inventory if item:getCategory() == "Container" I want to get all the items inside that container. Is that possible?

faint jewel
bright fog
#

So no I stand my point, no one has made a proper custom animal, with custom animations and shit

#

You can probably make a cat rn, but it won't have cat animations and behavior

ornate sand
bright fog
silent zealot
#

Zombie T-Rex plz.

bright fog
ornate sand
#

I wanna see an Umber Hulk bust through a wall

#

Have a pet umber hulk, that'd be rad as hell

charred carbon
#

omg,that means I have to check in the vanilla lua for some clue

bright fog
hollow ore
#

I'm trying to add animations to my car doors. All the modeling and animation part is done, I need help with the script part, I have defined the models in the main file and also the doors, with the corresponding animations. I think the part that fails is the items, I have created them in a separate file but when I reload the mod, it gives me errors related to the items. Can someone help me?

ornate sand
#

Another thing someone will be able to dev in with the new projectile system is Mjolnir

silent zealot
#

And a Captain America shield.

faint jewel
#

and my axe!

hollow ore
#

guys, do you know how to fix this?, the doors moves when my chracter moves, and they are not in they correct position as you can see

faint jewel
#

make sure you have them attached to the right bopne in the script.

hollow ore
#

how i do it?

faint jewel
#
    model Vehicle_USPSTruck_Hood
    {
        mesh = vehicles/Vehicle_USPSTruck_anim|Hood,
        shader = vehicle,
        static = FALSE,
        scale = 0.01,
------->    boneWeight = hood 1.0,
    }
hollow ore
#

oh ok

#

thanks I will try

hollow ore
faint jewel
#

did you weight each one to it's specific bone?

#

or just copy and paste my line?

#

the hood bone in mine is named hood.

hollow ore
ornate sand
#

Is the shader line the ones that makes custom cars' textures spasm and go all epilepsymode btw?

faint jewel
#

usually.

hollow ore
#

any idea @faint jewel ?

faint jewel
#

not sure. but that's usually the issue.

hollow ore
silent zealot
hollow ore
dreamy tusk
#

Hey guys. I want to make mods. What do I need to know? I guess basic programming and modeling, right? I heard b42 is now written in C# or something like that, do I need to learn that as well as Lua?

ornate sand
silent zealot
#

And a lot of text files holding data for things

#

Do you have a particular idea for something you want to make? Even something really simple just for personal use, like "I want the M9 pistol to do more damage" or "I want a trait that makes me start the game with two katanas"

dreamy tusk
#

Thank you! I actually have a lot of ideas, rebalancing traits and adding new stuff

dreamy tusk
hollow ore
restive lodge
green notch
#

They should add a religious trait where the person is less likely to be hit by sadeness and stress as religious people tend to put the state of the world around them as being a test from god.

#

Therefor, managing to bounce back from alot of tragic or otherwise, catastrophic situation.

#

Just look at the Palestinians who manage to bounce back from massive amounts of death through their faith in god.

ornate sand
#

Proooooobably not a topic you wanna be bringing up here

green notch
#

its scientifically proven that religion helps alot to cope with extremely catastrophic situations.

ornate sand
#

But yeah moodle mods like that are entirely possible. There's boredom mods, panic mods, one of the cool folks here just released a discomfort mod, etc

green notch
#

I just hope someone adds the cigarette whitdrawal and subsequent cure mod.

silent zealot
#

Make a mod that adds a "pray" action.

green notch
#

Makes no sense that someone who has gone cold turkey on cigarettes for weeks on end should still feel stressed without them.

silent zealot
#

Spend an hour praying, reduce stress and unhappiness.

green notch
ornate sand
silent zealot
#

Add mod options for different forms of worship from different religions.

ornate sand
#

Start popping off some sick yoga poses and get Fitness & Strength at the same time.

green notch
#

or the coran, or whatev.

#

With certain broadcasts even giving out certain buffs like brave.

ornate sand
#

Ooooooh temporary Brave/Desensitized from going full Jim Jones

silent zealot
#

Real 1993 Kentucky is probably close to 100% Christianity & variants, but a mod made in 2024 can be more inclusive.

ornate sand
#

Yeah isn't Kentucky literally in the Bible Belt?

silent zealot
#

There's no formal definition, but pretty sure Kentucky is in there.

green notch
#

Evangelical protestant

#

But there are degrees to religion.

#

Some are religious but not all that included in it.
While others are fully immersed within it.

#

Some may not be able to cope with their situation using religion while fully devoted religious may.

ornate sand
#

Yeah like Desmond Doss

cosmic ermine
bronze yoke
#

if you cache the object it is not going to stay in its current state, it is a reference not a copy

cosmic ermine
#

The ones in vehicleParts?

bronze yoke
#
for _, oldPart in pairs(vehicleParts) do
    local hood = vehicle:getPartById("EngineDoor")
    if oldPart == hood then
        local oldCondition = oldPart:getCondition()
        local newCondition = hood:getCondition()
        local partDamaged = oldCondition < newCondition
```if ``oldPart == hood`` then ``oldPart:getCondition() == hood:getCondition()``
#

they're the same object

cosmic ermine
#

Huh?

cosmic ermine
bronze yoke
#

how would they be different? they're the same object and nothing happens between the two checks

cosmic ermine
#

When the vehicle crashes.

bright fog
cosmic ermine
#

Every 10 tick.

bright fog
#

Yea indeed, tho I still think that's too much

cosmic ermine
#

30?

bright fog
#

The question is, do you need to check that often ?

bronze yoke
#

there is no difference between oldPart:getCondition() and hood:getCondition(), the two variables have the exact same value

bright fog
#

Imo 1 second is plenty enough at least

bronze yoke
#

i think 10 is good

#

this affects visuals, it will look bad if you check too infrequently

red tiger
#

If you think in terms of optimization, use base-16 numbers. :D

red tiger
#

0xF ticks brother

bronze yoke
#

anything above 1 is probably going to be noticeable though

cosmic ermine
#

So its condition could change while there is still parts in the table.

bright fog
bronze yoke
cosmic ermine
red tiger
#

Is this an issue with misleading fields / API?

bronze yoke
#

you'd have to cache the actual condition value

bronze yoke
red tiger
#

Oh ok

cosmic ermine
bronze yoke
#

just caching condition by part id should be fine

#

lua never copies objects, when you cache an object you're just saving a pointer to it, so it will change when the 'real' one does (it is the real one, there is no separation)

red tiger
#

it you print them together and they have the same numbers next to the name using @ then they're the same object in JVM memory space.

red tiger
#

All strings and objects / arrays are pass by reference. They don't deep-clone when reassigned to another variable.

bronze yoke
#

strings aren't

cosmic ermine
# bronze yoke lua never copies objects, when you cache an object you're just saving a pointer ...
for _, oldPart in pairs(vehicleParts) do
        local hood = vehicle:getPartById("EngineDoor")
        if oldPart == hood then
            local oldCondition = oldPart:getCondition()
            local newCondition = hood:getCondition()
            local partDamaged = oldCondition < newCondition
            if partDamaged then
                -- Transfer damage to the front trunk
                local frontTrunk = vehicle:getPartById("CountachFrontTrunk")
                frontTrunk:setCondition(newCondition)
                hood:setCondition(oldCondition)
            end
        end
    end
```This part will not just check the hood though? It'll also check other parts.
red tiger
#

Oh yeah scripts treat strings like values right?

#

Some do.

#

It's a weird world.

bronze yoke
#

yeah, lua pretends strings are values even though they're universally implemented as objects

red tiger
#

I don't like that decision, coming from a compiler-based world.

cosmic ermine
bronze yoke
#

yeah, you're just checking the condition on the same object twice, it's not going to be different

cosmic ermine
#

.

bronze yoke
#

the way objects work in lua, where a variable might contain a value like 5 or "my string", an object (java object, table, and a couple other weird things that aren't very important) is just a pointer in memory to the actual value

#

so it doesn't matter when you cached it, all object variables will actively update when the object does (because they just 'point' to the actual value, which is what is actually being changed)

bright fog
cosmic ermine
bright fog
#

So that could also be used an optimization trick

bronze yoke
#

it's why caching works

cosmic ermine
bronze yoke
#

some objects do get replaced in certain circumstances but generally you can cache any object and expect it to stay active

bright fog
#

Wondering if I can utilize that for my zombies since I cache their data when they get loaded in

#

Perhaps I can cache some few bits I use later and a lot of times

#

So even if it gives back a simple value it can act like that ?

bronze yoke
#

only objects

bright fog
#

Right yea

cosmic ermine
#

Hmm, I may only need to loop through CountachFrontTrunk, Engine, and EngineDoor.

bronze yoke
#

i don't remember who i suggested this to but a way to track a zombie somewhat cheaper could be to cache the object and check the persistent id hasn't changed (in case they were recycled) every time you access it on a new tick

bright fog
#

That's really good to know

#

I might see some use for that in the future

cosmic ermine
bronze yoke
#

ooh actually

#

their online id becomes -1 immediately when recycled so you should check that instead

#

saves storing the persistent id

cosmic ermine
#

What?

bronze yoke
#

-1

#

for doggy's thing, sorry

bright fog
cosmic ermine
#

Will this work in lua? "`{variable} hey`" instead of variable.."hey"

bright fog
#

oh "hasn't changed" ok I see lol

bronze yoke
cosmic ermine
bronze yoke
#
-- there's a lot of different % codes, i usually use this cheat sheet i googled
-- https://cheatography.com/ambigious/cheat-sheets/lua-string-format/
string.format("%s hey", variable)
cosmic ermine
#

Unnecessarily long now xD

#

I'll just use concatenation for now.

undone elbow
red tiger
bronze yoke
#

it can be cheaper than multiple concatenations when that matters

red tiger
#

You don't know the true depths of crazy in programming until you write syntax highlighting in 100% Regex.

ornate sand
#

You people being all technically proficient with all this coding stuff and here I am, accidentally discovering how to unwrap a texture

undone elbow
#

I prefer not to use regex

red tiger
undone elbow
#

In Lua there is str:find(substr,1,true)

red tiger
#

Regex isn't natively supported in Lua.

undone elbow
#

Not a regex

red tiger
#

It's too heavy.

#

Lua is supposed to be as light as possible.

frank elbow
#

Kahlua has some string function that actually just uses regex, but idr which it is

red tiger
#

It's probably supplimented by Kahlua or TIS by proxy.

frank elbow
#

Yeah, it's Kahlua-specific. I think it might be split

red tiger
#

split might be coming from Java but fed through Kahlua.

#

I'm so used to using things like indexOf() !== 1

frank elbow
#

That's how most of the Lua builtins work in Kahlua, with the very strange exception of math.max and math.min

undone elbow
red tiger
undone elbow
#

e.g. for 100 concatenations

red tiger
#

I was thinking about writing an x86 emulator for PCs in PZ.

#

Would be fun to code inside of PZ back in 1993

#

Lua is slow as heck so it'd naturally be as slow as 1993 ASM

undone elbow
#

wake up neo, get access to the host system....

red tiger
#

We usin punch cards

bronze yoke
ivory bramble
#

Hi everyone! quick question- I'm new to modding, though I'm a programmer for my career, and am just poking around the PZ decompiled files hoping to put together a tiny mod in b42-but am having trouble finding fields for items lol

#

in the java files specifically

red tiger
ivory bramble
#

Ah awesome! thank you

undone elbow
red tiger
ivory bramble
#

Quick followup- after decompiling the code in VSCode is there a way to check referneces and implementations of various classes and objects? Or is my environment just cooked lmao

red tiger
#

IntelliJ IDEA has a plugin for vineflower and a default one for the older version fernflower.

#

I'm sure vscode might have one.

ivory bramble
#

Fantastic, thank you!

red tiger
#

vscode is not ideal for compiled languages. IntelliJ IDEA Community Edition is free and provides more support for Java works.

#

Zip up the code in PZ as a zip and renamed it to a .jar file. Import it as a dependency in maven and double-click on references and classes to decompile.

#

=)

#

If you want to write java mods, this is the easiest method. You can compile against the game this way.

ivory bramble
#

Ah ok! That's great to know- another quick question (and thanks again for your help) I was under the impression that mods and their scripting logic had to all be written in Lua? If they can be written in java that would be lifesaving since I don't know Lua at all lol

red tiger
#

I personally don't give a f--- but most do.

frank elbow
ivory bramble
frank elbow
# red tiger Bro.

Sometimes we have to feed the beast (bad ideas that pop into our heads)

red tiger
red tiger
#

I solved the problem by string-splitting and rejoining.

#

Bad thoughts.

rotund wyvern
#

hello brothers steamworkshop dosent work with weekone mod can anyone send it to me via file

red tiger
#

But @frank elbow I can encrypt LuaNet packets now.

frank elbow
rotund wyvern
frank elbow
#

We forgive you Rick

red tiger
red tiger
#

@frank elbow Encryption of lua network packets is possible now and public.

#

There's a framework I wrote for this.

#

And it supports massive strings, split into string arrays when sent.

grizzled fable
#

i'm making a recipe in 42, i need to use only part of the hunger amount of an OilVegetable, how to do that?
item 1 [Base.OilVegetable],

item 1 [Base.OilVegetable:2], ??
item 1 [Base.OilVegetable;2], ??

bronze yoke
#

iirc this feature is not implemented yet

frank elbow
#

I've had an irrational fear of hitting the arbitrary limit since you mentioned it forever ago

red tiger
#

Hahaha

frank elbow
#

Even though I know that's likely unrealistic because I don't find myself needing to send large strings anyway lol

red tiger
#

When you're sending entire files of Lua code as encypted text, you'll get there in no time.

#

What's funnier is that the framework uses async-callback design.

#

Thank God Kahlua had enough work to support coroutines.

#

If PZ allowed spawning up Kahlua environments for async calculations this would be a game changer.

ivory bramble
#

Sorry for all the questions, but another (hopefully) quick one- does the decompiled code have the actual files where they define fields of the various in game objects? I'm looking for the properties for the Beer Bottle, and I see it referenced with "Base.BeerBottle" in the code, but have no clue where to find those properties

#

i'm specifically trying to figure out the logic for checking if a bottle is opened or not when a player goes to drink but I've been spinning in circles for a bit

bronze yoke
#

no, they're defined in 'script' files in media/scripts/

ivory bramble
#

Ahh bummer okay! time to go find a mod that adds a new bottle item and snoop around

bronze yoke
#

you can just look in your game directory, i mean no because it's not in the code and you don't need to decompile it, it's separate

old ginkgo
#

As Albion said, no need to decompile to find the references to it.

#

media/scripts/items_food_drink.txt B42 version.

    item BeerBottle
    {
        DisplayName = Beer Bottle,
        DisplayCategory = Food,
        Type = Normal,
        Weight = 0.4,
        Icon = BeerBottle,
        EatType = Bourbon,
        StaticModel = BeerBottle,
        WorldStaticModel = BeerBottle,
        FillFromDispenserSound = GetWaterFromDispenserGlass,
        FillFromLakeSound = GetWaterFromLakeBottle,
        FillFromTapSound = GetWaterFromTapGlass,
        FillFromToiletSound = GetWaterFromToilet,
        Tags = Glass;GlassBottle,

            component FluidContainer
            {
                ContainerName   = BottleBeer,
                capacity        = 0.3,
        Opened    = false,
        CustomDrinkSound = DrinkingFromBottleGlass,

                Fluids
                    {
                    fluid           = Beer:1.0,
                    }
            }

    }
ivory bramble
#

Whoops- I was looking in my media/script folder in the decompiled code and was seeing nothing, of course. Thank you both!!

bright fog
#

Did you just decompile from ProjectZomboid and not zombie ?

ivory bramble
#

uh oh

#

That's probably what i get for not wanting to use a tutorial

cosmic ermine
ivory bramble
bronze yoke
#

i mean it's fine to do that, especially if you want to look inside the dependencies

#

the main reason i don't do that is it recursively scans every workshop item i'm subscribed to lol

bright fog
#

If you do that, just decompile the dependencies alongside zombie

bright fog
bronze yoke
bright fog
#

what the hell

#

What even is that folder

bronze yoke
#

this is where the server downloads mods to

#

if you host in-game

bright fog
#

Oh

cosmic ermine
bronze yoke
#

i just symlinked it to my actual mods folder

bright fog
#

I didn't even knew the game was redownloading mods when hosting

bronze yoke
cosmic ermine
#

lol nice

bright fog
bronze yoke
#

and why you can get checksum differences with yourself

bright fog
#

Amazing lol

mellow frigate
#

interesting

bronze yoke
#

one of the benefits of limited disk space i suppose is that you never miss something like this

#

i can't afford to double my workshop size ๐Ÿ˜ญ

severe maple
#

Does anyone here know how generators work in the game's files? I've been trying to make a small mod that just prevents specifically the premiumtech generator from ever losing condition. I assumed that I just had to change ConditionLowerChanceOneIn to 0, since the different types of generators had their own values here, based on how high quality they are, but it doesn't seem to work.

#

(for build 42)

grizzled fable
#

hi all, i'm making a recipe in 42, i need to use only part of the hunger amount of an OilVegetable, how to do that?
item 1 [Base.OilVegetable],

item 1 [Base.OilVegetable:2], ??
item 1 [Base.OilVegetable;2], ??

lilac schooner
#

Skinwalker mod when

We can make zomboid run at night maybe we can make deer go feral at night

vast pier
cosmic ermine
#

Can your vehicle's gas tank get damaged from crashing?

bronze yoke
#

i think it can be damaged by driving offroad

cosmic ermine
#

I wonder why they have a function that damages it when you hit a character?

#

It's only 1-3 but still.

elfin cradle
#

Took way longer than I'm willing to admit, but I got ONE of the two hands working with the bag so far.

cosmic ermine
#

How do I get a vehicle's overall condition?

weary matrix
#

Hello, so I take it we have to duplicate all the media folder for B42 or is there some way around this?

main pasture
# cosmic ermine How do I get a vehicle's overall condition?

The one shown in the mechanics menu it is calculated like this: ```lua
function ISVehicleMechanics:recalculGeneralCondition()
if not self.vehicle then return; end
local generalCondition = 0;
local totalPart = 0;
for i=1,self.vehicle:getPartCount() do
local part = self.vehicle:getPartByIndex(i-1)
local cond = part:getCondition();
-- if we removed the item, condition should be 0
if part:getItemType() and not part:getItemType():isEmpty() and not part:getInventoryItem() then
cond = 0;
end
generalCondition = generalCondition + cond;
totalPart = totalPart + 1;
end
self.generalCondition = round(generalCondition / totalPart, 2);
self.generalCondRGB = self:getConditionRGB(self.generalCondition);
end

cosmic ermine
#

Is there no public function?

main pasture
#

It is saved as generalCondition in ISVehicleMechanics, but has no getter

cosmic ermine
#

Buh.

weary matrix
hybrid tiger
#

Asking here again if someone is able to help with my issue
I am using sandbox vars to edit loot distrubtion tables for zombie loot however added loot isnt appearing on the zombies at all (but is appearing in lootzed)
Function is being called during OnInitGlobalModData event and ItemPickerJava.Parse() is being called at end of function

#

can show code if needed, but going slightly crazy

bright fog
hybrid tiger
#

disaster

#

ive been looking but havent found anything yet

bright fog
#

I remember it being a very simple reason

#

@tranquil kindle was it you who had this issue ?

tranquil kindle
#

You tried add something , i belive scanner to tables, it was in lootzed, but hasn't spawned actually

#

I don't really mess with loot on zombies, i only add clothing to them.

bright fog
#

Hmm maybe it was me yea

#

lmao

tranquil kindle
#

Simple table insert works for single items, you can try loops for more items.

#

I think it should be manageable with sandboxvar as its same as you'd just put higher loot in sandbox options when you start vanila game.

#

Unless?

bronze yoke
#

show the code

#

it sounds like you're doing everything right though

hybrid tiger
# bronze yoke show the code
  local lootString = SandboxVars.customizableZedLoot.LootString
  --Checking if sandbox vars exist
  if string.len(lootString) > 0 then
    print("Sandbox Var String has value")
    local lootTable = {}
    --Splits sandbox var string into array separated by commas
    lootTable = split_with_comma(lootString)
    local prevItem = false

    --Runs through array and adds in loot
    for i = 1, #lootTable do
      local currentParse = lootTable[i]
      print("PARSING", currentParse)
      if prevItem == false and type(tonumber(currentParse)) == "nil" then
        table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, currentParse);
        table.insert(SuburbsDistributions["all"]["inventorymale"].items, currentParse);
        print("added to first condition")
        prevItem = true
      elseif prevItem == true and type(tonumber(currentParse)) == "number" then 
        table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, currentParse); --Setting value for previous entry
        table.insert(SuburbsDistributions["all"]["inventorymale"].items, currentParse);
        print("added to second condition")
        prevItem = false
      elseif prevItem == true and type(tonumber(currentParse)) == "nil" then
        table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 1); --Setting default value for previous
        table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, currentParse); --Adding our new value
        table.insert(SuburbsDistributions["all"]["inventorymale"].items, 1); --Setting default value for previous
        table.insert(SuburbsDistributions["all"]["inventorymale"].items, currentParse); --Adding our new value
        print("added third condition")
      end
    end
    ItemPickerJava.Parse()

    print("Items parsed")
  else
    print("No Sandbox Vars found")
  end
end
Events.OnInitGlobalModData.Add(addSandboxDistributions)```
#

most of the code is just a for loop adding items based an input array in sandboxvars

bronze yoke
#

hmmmm, looks fine...?

hybrid tiger
#

and input into my sandbox var is
Base.CigaretteCarton,150

#

and its here so idek

#

its something with the for loop, simply adding in a item to the zombie pool with itemparse works

#

hmm

#

will look into it more

bronze yoke
#

oh it's because you add the chances as strings

hybrid tiger
#

OHHHHH

#

oh wow

#

quite a skill issue

bronze yoke
#

i'm shocked lootzed still works, that's weird and annoying

hybrid tiger
#

yeah

cosmic ermine
cosmic ermine
#

Oh, cool.

#

Thanks.

icy night
#

When replacing the death SFX, can you add multiple audio options? ik you can with level-up sounds

cosmic ermine
#

Anyone know how to put a vehicle image here? Similar to the _base image in mechanic overlay.

silent zealot
cosmic ermine
cosmic ermine
empty frost
#

I agree, it's so cool watching people do this stuff. I work with game engines but mods still feel kinda tricky to make to me, cus everything is so specific to the one game, it's not like building your own stuff and just knowing how to work with it by default cus of that

#

I wanna try myself one day when the info is all up to date

silent zealot
#

For a proper Italian Sports car feeling make repairs take 10x as long and cost 10x as much.

mellow frigate
#

For a vehicle, is there a way to limit backward power or speed independently from forward ?

silent zealot
#

I used to have a boss that collected old (i,e: 1990-ish) Ferraris. He'd joke that they liked the burst into flame spontaneously. Later he said the joke stopped being funny after one of his cars actually burst into flame spontaneously when he was out on a group drive.

cosmic ermine
silent zealot
cosmic ermine
#

I've tried setting them to 999 but I think the game caps them.

silent zealot
#

(I think it also ignores the gear ratios set in the vehicle script, because a lot of vehicles don't have those the ones that do have terrible gear ratios.)

#

When I did the "toggle speed demon" mod I first looked for a way to boost vehicle power somehow but gave up, and just turn the speed demon trait on and off.

icy night
#

Error I get when I try testing whether or not my recipe script will work

bronze yoke
#

the actual error should be lower down, idk exactly what causes that message but it's non-critical

#

should be within the last 30 or so lines

old ginkgo
icy night
#

Seems like the problem is the games attempting to interpret a key code (283)?

old ginkgo
# icy night

Go a bit further up, it's going to be something related to one of your recipe .txts above that error. That's the error that closes out the game.

icy night
#

It pointed out that I did get the base code for peaches wrong. Base.Peaches instead of Base.Peach.

#

oof. Was it really that simple

#

im so stupid. Ty for directing me to the error

old ginkgo
#

No problem! And now you know how to debug for the future ๐Ÿ˜Ž

ancient grail
#

i do this for workshop and mods folders so i guess it might work too..

bronze yoke
#

i don't think symlinks work like that

icy night
#

One more question, maybe yall already know. Can you have multiple death songs? You can have multiple lvl up sounds so I thought it might work.

ancient grail
ancient grail
split prairie
#

what allows a mod to show up in the b42 modloader, and allow you to select it?

bronze yoke
#

look at the pinned messages

split prairie
#

just put it in a folder labeled 42?

tranquil reef
#

Thirst and hunger values go from 0 to 1, is thirst reversed?

#

hunger from 0 (not hungry) to 1 (starving)
thirst from 0 (dehydrated) to 1 (not thirsty)?

silent zealot
#

I would not be suprised.

ancient grail
split prairie
#

nnnnnnope

#

i forgot to add a "common" folder

#

lets try that now

silent zealot
#

How's this as a name for a mod to let yo pick up multiple animals? Too much?

split prairie
#

ah there we go

#

excellent

tranquil reef
#

Keep it

silent zealot
#

Good, just wanted to doublecheck!

split prairie
split prairie
#

aaaaaaaaaand it didn't work

#

damnit

#

trying to update the invisible patches mod

#

no code, just changes textures

#

ah blast it

#

i'll just make em invisible manually

faint jewel
#

what are yuou trying to do?

cosmic ermine
mellow frigate
mellow frigate
random finch
#

Can someone familiar with server/client commands please help me figure out whats going on here? Are commands async or non-blocking? I havent had this issue before.

CrossHair.isMatchingKey = false
    
--isMatchingKey BEFORE: false
print("isMatchingKey BEFORE: " .. tostring(CrossHair.isMatchingKey) )
    
-- I know 100% isMatchingKey set to true before the AFTER print statement on the next line.
sendClientCommand("remoteInventory", "requestServerItems", { otherPlayerID, keyID })
    
--isMatchingKey AFTER: false - Should be True
print("isMatchingKey AFTER: " .. tostring(CrossHair.isMatchingKey) )
bronze yoke
#

they're async, if they had to wait for the server to respond they would take an insane amount of time

random finch
#

Bruh, what. I'll have to figure out another way to write my code.

#

It does seem pretty damn quick for this though, but its crazy i never had this issue

bronze yoke
#

if they were blocking they'd take your ping + the time for the server to process it + your ping again + whatever overhead time to complete

#

when you keep in mind that it's not unusual for ping to be in the hundreds of milliseconds, and is almost certainly more than one single frame even when good, they would cause insane lag

random finch
#

totally understandable

winter bolt
red tiger
#

I only expect this to be in build 43

wanton axle
#

Spongie, what kind of witchcraft did you do to get clothing to distribute on zombies?

faint jewel
#

clocking back in to update mods.

faint jewel
winter bolt
wanton axle
#

Ah, I see

#

Thank you

winter bolt
#

making outfits is a total nightmare though because you have to use guids for the clothing items instead of the names

#

so you need to add comments to everything so you know what youre looking at

wanton axle
#

I was using outfits prior lol

winter bolt
#

oh

wanton axle
#

oh, no i misunderstood

#

This is what I was using before

winter bolt
#

that should work i think?

#

maybe try seeing the chance to like 9999 so you can see if theyre spawning

wanton axle
#

Right

silent zealot
#

I'm putting the mod together now.

wanton axle
#

Something else must be broken since none of the rockers are spawning with them. I'll have to do some more digging. Thanks Spongie

faint jewel
#

does each outfit have to have it's own guiid?

silent zealot
#

Note to self: when starting a new game to test a mod, disable Bandits: Day One.

#

NPCs scared my chickens away!

#

Then I got shot.

ornate sand
faint jewel
#

okay gotta add a hat and a satchel as a possibility, though i want the hat to guaranteed.

#

lol postal zombies!

ornate sand
faint jewel
#

oh snap. that means i needs to set the satchels to have mail as a default spawn in them.

#

no clue how to do that

#

damn. they have no SHOES either.

elfin cradle
#

Didn't B42 add mail zombies?

faint jewel
#

this is using my mail outfit.

ornate sand
#

A buncha hippies lol

faint jewel
#

and no hats either.

#

hats satchels and coats work... BUT STILL NO SHOES!

cosmic ermine
#

Anyone know what this error means?

faint jewel
#

welp. they just do NOT want to have shoes it seems

sly monolith
#

is it safe for a save file to change names of the .xml files of clothes? and like everywhere else, i had something called "red" but i added more colors so it doesn't make any sense now ๐Ÿ˜‚

silent zealot
#

I still want to figure out how to allow animals to moved into bags/containers, but I'm starting to think it's hardcodded in java in one of the conainer functions.

faint jewel
#

๐Ÿ˜›

sly monolith
#

ha! after only like a whole day I managed to make the other ankle holster and align them to my modded shoes, and align a gun to those ๐Ÿคฃ ๐Ÿ˜ต๐Ÿ‘ป

viral vale
#

Yo, how do i update my mod so it can be searched up with Build 42?

#

In the workshop

viral vale
#

I understand none of it ๐Ÿ˜ Damnit

#

Been too long lol

ornate sand
#

Lemme try to type out how it goes

#

Go to your zomboid/workshop/yourmodname/Contents/mods/yourmodname
Create a new folder, and name it 42
Create another new folder, and name it common
You can leave your media folder in this one

Copy and paste your media folder, your mod.info and poster.png into 42
In 42 edit the mod.info to have the following line
versionMin=42.0.0

You should be all set

viral vale
ornate sand
#

That's if you want to port your mod to B42 but still keep it available for B41

viral vale
#

Ah right

ornate sand
#

If you want to just make it for B42 then you only need the 42 and the common folder, and the mod.info in both the yourmodname folder and 42

viral vale
#

So if they make updates, say like 42.9.5 or whatever, it should still be fine?

#

I don't have to keep updating?

ornate sand
#

yep

viral vale
#

Sweet

#

Thank yaaa

ornate sand
#

PZ will look for the most compatible one and if you're set just for 42 and minversion 42.0.0 then PZ will always pick that

viral vale
#

Oh god, how do I update my mod on the workshop now?

#

With those files

#

Been too damn long lmao

ornate sand
#

ingame, main menu, workshop.
But don't just do that lol. Your scripts and lua will be broken if you don't check 'em first ๐Ÿ˜„

vast pier
viral vale
ornate sand
viral vale
#

๐Ÿคฆโ€โ™‚๏ธ

#

I am not

#

What a dumbass

alpine timber
#

Good evening, zomboid modding people; I have been thinking about doing two things in the modding department:

  1. A moodle mod where I would doodle some moodles and have them replace the existing ones just for fun; been inpsired to do it after seeing a few do it on their own
  2. Maybe some sort of magazine, or a custom edit to the catalogues so that they can display a random date like they do with magazines (Month, Year) but as I am searching the soruce code I can't seem to find a part in the game that does this, along with any recorded media in the game's files to do this with the catalogues. A reason why I want to do this is to add a bit of realism to the catalogues, as they have releases in certain months of a season like in real life.
    I know I can basically start by doing some work here are there, but I may need some help with 2; I might make it as a first-time modder sort of thing, where I would test it out in the game's environment.
ebon dagger
#

#2 is in Lua/Server/Items/SpecialLootSpawns.lua

#

#1 is as simple as making the images, naming them the same as the other moodle files

elfin cradle
#

Having issues with an Animation XML. I'm trying to get it to play Bob_IdleAngleTorch in both hands, but can't even get it to do it in 1 hand when simply using a renamed copy of the vanilla holdingAngleTorchRight.xml

ornate sand
elfin cradle
#

soyLeft panic soyPoint .......Yes

cosmic ermine
#

What is clip { event = ""} for? Are they just used to play vanilla sounds?

ornate sand
#

Yeah B42 can't get custom AnimSets yet. Apparently some folks have been able to make their custom animations work by putting their AnimSets in the old B41 media folder, but I wasted almost two weeks trying and failing to set up one single custom AnimSet, even using that B41 workaround.

bronze yoke
#

FMOD event reference, events cannot be added by mods

cosmic ermine
#

OK, thanks.

elfin cradle
ornate sand
elfin cradle
#

I'll just half ass it with one hand and fix it later when it goes stable

cosmic ermine
# bronze yoke yeah

Do you know how to increase the pitch of my engine sound when accelerating?

bronze yoke
#

if there is a way, i don't know it

#

modded engine sounds just inherently being a lot less dynamic than vanilla ones is a known issue unfortunately

cosmic ermine
#

sad.

outer crypt
#

is it possible to make an entity with the new building menu thing that has multiple sprites on a single square?

#

I see the row and column options

cosmic ermine
cosmic ermine
#

I guess I'll just use vanilla sounds unhappy

strong jasper
#

Hello everyone. I need some help. I'm writing a modification and I need to start raining. Does anyone know what method or call I can use to do this?

turbid gale
#

VFE update peek ๐Ÿ‘€

#

B42 is making me redo all the models anyways, so might as well roll out a feature I've been cooking for a while...

ornate sand
#

What a cool freaking detail!

hidden compass
# cosmic ermine Damn it, I was excited to work on the sounds.

How about look for answers in other vehicle mods? I have a feeling that many of the questions you are asking here have been solved by other vehicle mods. For example, reverse trunk issue have been solved at Delorean mod. I think there was a mod that focused on engine sound, was it NISSAN SKYLINE? So many of Zomboid's vehicle mods are great creations, and I look forward to seeing your great vehicle released as well. spiffo

turbid gale
cosmic ermine
ornate sand
elfin cradle
#

Oh yeah, it's coming together nicely~ The across-carry when in primary, and fireman carry when in secondary so you can run&gun with your dead buddy (25% movement slowdown from holding the body on top of the inventory weight so it's not too OP)

faint jewel
#

you got them working?

ebon dagger
#

That is excellent

elfin cradle
#

Yes- well mostly. I ended up using the default RAngled torch animation and I'll update it later, but for now it looks okish

past radish
#

Are we cooking with b42 modding

silent zealot
#

Instructions unclear, modding B42 cooking.

elfin cradle
#

XD

ornate sand
bronze yoke
turbid gale
#

The lua relating to that is actually unchanged from the B41 version. It's just me using it more.

ornate sand
#

Rad. Good stuff as always ๐Ÿ™‚

crisp fossil
#

is possible to programmatically play the level up sound?

long breach
#

how hard would it be to make a mod that allows attaching a toolbox to the backpack bottom slot of hiking / large backpack?

ornate sand
silent zealot
#

Not hard

#

There's a b41 backpack upgrade mod that lets you attack a container to a backpack

#

If you want it to show on the inventory screen you'll probably need to adjust InventoryPane or InventoryPage

hidden compass
ornate sand
#

I had to go check the old sound and holy moley it sucks compared to the current one. No banjo at all, smh

long breach
#

i just want it to hang off the back

crisp fossil
#

how about the level up text? is there an easy way to cast it? or do I need to manually drawText

old ginkgo
ornate sand
hidden compass
old ginkgo
faint jewel
#

i might need to rip your stuff apart.

#

to get the carry mod operational.

old ginkgo
# faint jewel to get the carry mod operational.

Just a lotta' AnimMasks, isn't it? I might be able to give some moderate help there too since I've been using AnimMasks to add carry animations to some of my custom fluid containers for my upcoming mod.

faint jewel
#

a LOT of them.

old ginkgo
#

Yeah KEK

faint jewel
#

a little bit od code to make it work.

elfin cradle
#

models and textures for; Garbage Bag, Burlap, and Tarp Craftable Body Bags. Soon to come is Body Under Sheet, Medical Body Bag, Biohazard Body Bag

ornate sand
old ginkgo
# faint jewel a little bit od code to make it work.

Biggest sticking point you might not be aware of; is currently the AnimSet's folder is busted. You need to keep a media folder and AnimSets folder in the format of B41 for any defined xmls you have; then also have it in the B42 file structure.

umbral raptor
silent zealot
#

What is it doing incorrectly/not doing?

winter bolt
#

like this

umbral raptor
devout bison
umbral raptor
winter bolt
charred ferry
#

So with animal skeleton rigging and AI, is it possible to make monsters now? Things like uhh

#

Creatures from the mist?

umbral raptor
#

I got the errors to stop working.

#

Did alot of work too like doing the Translate file

#

but now the items I added aren't appearing

winter bolt
bright fog
umbral raptor
charred ferry
ornate sand
ancient grail
#

for those who are waiting for the animsets patch
slayer discovered something

old ginkgo
ornate sand
ornate sand
umbral raptor
ornate sand
umbral raptor
#

bro, each mod I try to make does this shit with me

ornate sand
#

Instead of

module AlcoholEmpire
    imports {
        Base}
Should be

module AlcoholEmpire
{
    imports
    {
    Base,
    }
bright fog
#

@torn igloo why do you need a function every real life seconds ?

umbral raptor
#

they cant work without a shit ton of bugs that i end up fixing for more hours than i coded that shit lol (i didn't i stole most of the code)

bright fog
umbral raptor
ancient grail
ornate sand
umbral raptor
#

maybe im missing a file and the problem is not in the item one

#

like i didn't add any loot distribution

#

maybe smthin else is missing/broken

ancient grail
ornate sand
umbral raptor
#

ahh

ornate sand
umbral raptor
#

did it add the items in?

#

awesome

#

lemme try it

ornate sand
#

do the { fix too

elfin cradle
#

Body under a sheet

#

if I can, I want to make it so you have to hold the Sheet version in both hands. That way there's pros and cons to actually crafting the other bodybags

bright fog
ornate sand
silent zealot
#

Leave him to rest.

bright fog
ornate sand
dusty aspen
#

ํ€ต์œผ๋กœ๊ฐ‘๋‹ˆ๋‹ค?

silent zealot
#

I don't think anyone here will defend the Zomboid mod structure as being a good example of how to setup modding for a game, and it also inherits all the jank from the game itself.

#

Still better than working with Unreal engine where the only option (if they don't provide proper modding tools) is to replace entire assets, most of which are "cooked" into a format that is near impossible to make sense of/edit.

potent loom
#

This is not a huge problem once you know this of course

ornate sand
potent loom
#

oh

bright fog
#

Anim_X should not need it

#

Also I saw a screenshot from someone of giant zombies @potent loom
I thought I had told you about it but was most likely someone else but this is because you didn't scale down the animations when exporting and when a zombie is partially loaded it will show the actual scale

#

So when exporting you need to set to 0.01 the scale

potent loom
#

yea, my friend is fixing it for me

umbral raptor
#

but now I got a new problem

#

Giant bottles

ornate sand
umbral raptor
#

i don't have a model entry I think lol

grizzled fable
#

hi all, i'm making a recipe in 42, i need to use only part of the hunger amount of an OilVegetable, how to do that?
item 1 [Base.OilVegetable],

item 1 [Base.OilVegetable:2], ??
item 1 [Base.OilVegetable;2], ??

ornate sand
ancient grail
torn igloo
low shell
#

I have quick question

#

so to add new version to

#

a mod

#

i need to made b "42" folder

#

fold previous content there

#

and its all working?

ornate sand
#

No, you also need the common folder

low shell
#

"lua"

#

etc?

faint jewel
#

no.

ornate sand
#

In the same folder you make 42 at

faint jewel
#

go into the mod folder where you see tyhe media folder.

#

make a 42 folder and a common folder.

#

copy everything that WAS in that folder to the 42 folder.

#

tada a b42 mod.

low shell
#

ay thanks

#

and can I make it compatebile for 2 versions?

#

like they do it in rimworld

faint jewel
#

yeah by copying it it should work for both 41 and 42

#

move it and it only works for 42

low shell
#

so for typical user, I need to create new workshop item as a fork to b41?

faint jewel
#

if it already exists, then no.

#

just do an update.

#

you can make it work for both.

low shell
#

I see it now

#

okay, im didn't understood but now I do

faint jewel
#

๐Ÿ™‚

ornate sand
low shell
#

last time I promised to not let my mod rot

#

It rots

#

for now

#

::P

umbral raptor
#

I have a question. I want to make a new state for an item like cookability called Fermentation which has three states; Fermenting, Fermented and Ruined.

#

Is this possible? I want it to apply to certain items that are brewing

#

and it becomes fermented over time (1-2 weeks) and gets ruined if it's stored in the fridge or oven.

low shell
#

also last thing

#

crafting changed?

ornate sand
elfin cradle
#

Body under sheet held in both hands and preventing you from sprinting... CHECK!

umbral raptor
#

finally someone has respect for the zomboid dead

elfin cradle
#

So question. Anyone know how to get nested inventories to show in a bag?

low shell
#

also can I get my old version dowlanded?

ornate sand
tulip valve
undone elbow
#

Can clothes be a container for sweat?

faint jewel
#

socks can be a container... just ask my teenager

faint jewel
#

he sweats like a longtailed cat in a room full of rocking chairs.

low shell
elfin cradle
umbral raptor
#

Can somebody tell me why my new container has Fluid_Container written next to it?

#

module AlcoholEmpire
{
imports
{
Base,
}

item AlcoholBottle
{
    DisplayName = Alcohol Bottle,
    DisplayCategory = WaterContainer,
    Type = Normal,
    Weight = 1,
    Icon = EAlcoholBottle,
    IconFluidMask     = EAlcoholBottle,
    StaticModel = AlcoholBottle,
    WorldStaticModel = BottleCrafted_Ground,
    FillFromDispenserSound = GetWaterFromDispenserGlass,
    FillFromLakeSound = GetWaterFromLakeBottle,
    FillFromTapSound = GetWaterFromTapGlass,
    FillFromToiletSound = GetWaterFromToilet,
    Tags = Glass,

    component FluidContainer
    {
        ContainerName   = AlcoholBottle,
        capacity        = 1.0,
        CustomDrinkSound = DrinkingFromBottleGlass,
    }
}
umbral raptor
#

Ahhh

#

I forgot to translate

#

lol

#

what about the model?

ornate sand
#

So WorldStaticModel = AlcoholBottle,

umbral raptor
#

Did all the fixes lemme see if it'll help

bright fog
bright fog
umbral raptor
ornate sand
umbral raptor
#

And it still has Fluid_Container

#

I renamed it in the translate file

ornate sand
random finch
#

Can you pass a bool in a net command?

#

Like sendServerCommand or sendClientCommand

patent olive
#

What is the cause of this problem? I clarify that I have it set up on a dedicated server. The mods are loaded, but I think that those that appear [not found] do not work.

random finch
patent olive
random finch
umbral raptor
#

Is there a current B42 mod tool that tracks timed events and such?

#

Also

#

Would this script work? If not, how can I get it to work? This is ChatGPT's try at my system. It doesn't even look like the code used by the game

vast pier
torn igloo
# bright fog Ticks%60 (or 50 I never know) and you got your every real life second event

Game tick is subjective to how powerful your machine is, there is no absolute number here. To get an average 1s, we simply grab the time and do arithmetic on it. Anyway, that isn't the point. In the java, a similiar time and arithmetic already being done, no reason why we have to do additional time and arithmetic on top of that, that just add extra time complexity.

light cliff
#

in my game the icon for my item shows up as aquestion mark what did i do wrong?

tulip valve
#

Anyone know how I can exclude traits from other mods such as MoreTraits with ProfessionFramework?

ornate sand
light cliff
#

ohhhh so the item_ doesnt get typed into icon = ??? oh my gosh thank you so much

#

first time someones replied i really apprieciate it ,this is my first time modding

ornate sand
light cliff
#

dude i ended up deleteing everything but one item to debug why it wont load in at all

#

been stuck on a loading loop

#

so now im just adding everything one by one ๐Ÿ˜ญ

low shell
light cliff
#

yes the icon actually shows up now!

#

so i guess when youre refrencing items in your items.txt you need to put item_ in front of the texture name

low shell
#

Ah so you can copy many

light cliff
#

i never knew that i thought people in their other mods i been refrencing to just did that

low shell
#

do it as "placeholer"

silent zealot
low shell
#

and slowly chnage all

silent zealot
#

Only in lua.

light cliff
#

thats what im gonna try, it seems i might've had a problem with my scripts

#

i was stuck on a literal loading loop after "this is how you die"

low shell
ornate sand
silent zealot
#

I made ticksBetweenCheck a sandbox option in Slower Discomfort, because if you have a discomfort bar visible it jerks around a lot if you don't check every tick but making it every tick for everyone was excessive.

light cliff
#

hell the way you said works so i aint changing any time soon lol

low shell
#

I think it won't even work any diffrent way

light cliff
#

my mod is really simple all it adds is a couple items and something that just requires water and another item to be able to use

low shell
#

is plastic bottle one of required items?

light cliff
#

any water source, the item just needs to be filled to atleast 250ml

#

and then requires another one of my custom items

#

this has got me real fired up something i did actually works

ancient grail
low shell
light cliff
#

sdiiieett yup

#

idk if cussing is allowed here

#

sure it is but yes

#

thats what im trying to do LMAO

#

some mods havent been updated to build 42 and i see theres a demand for this category soooooo....

low shell
#

lit the hope up