#mod_development

1 messages · Page 389 of 1

blissful seal
#

Oh neat yeah that wouldn’t be so bad

quaint wyvern
#

also it'd be nice if Java modding were easier. decompiling isn't too bad, but recompiling is such a pain. I had a mod idea for making corpse items freezable to pause decay, but the necessary data isn't exposed to Lua, and there's no more reflection

bronze yoke
#

zombie buddy should be easier than raw recompilation

strange delta
#

what kind of shader did you make?

#

(i only worked on frag shaders and it doesnt look like a good idea to make that on a frag)

blissful seal
#

yeah its a frag shader, but the wisps are being drawn cpu side computed in java

#

the shader on the weapon itself is turned down pretty low in the vid but its doing some FBM stuff

blissful seal
#

sorry i learned that from one of my buddies who is really into shaders, its a noise algorithm -- fractal brownian motion from what i understand its used all over the place in shaders

#

I am not an expert haha but was using some tricks he showed me from another project

robust briar
#

I leanred about Zombie Buddy 2 days ago lol. I have been working on Necroid for about a month :-(

Timing is a bish sometimes

bright fog
shrewd silo
#

Does anyone else sometimes spend hours reading project zomboid source code just because?

#

I think I've lost count of how many times I got curious over something and spended like 3 hours just reading java code that I can somewhat understand.

bright fog
#

I kind of did that recently to document parameters used for item scripts 😅

shrewd silo
#

LMAO

#

I currently am again analyzing how the animation system works, because I forgor, and now I am once again trying to remember how it works.

#

It's useful learning these things, because I can properly steal it for other projects

#

AND NO ONE CAN STOP ME

shrewd silo
#

Wait a minute, reflection has been purged?!? And for a good while now??

#

Wow, I am really late for the party.

#

Bummed a little, but I can undestand why it was hidden in debug. I hope we can eventually get a safer alternative.

modest oak
#

is it possible to attach a 3d model to the body as part of the damage overlay or is it strictly texture based

shrewd silo
#

You can create an 3D item that attaches to a specific location to imitate what you are trying to achieve.

upbeat turtle
#

clothing items ++ specific body locations

modest oak
modest oak
modest oak
upbeat turtle
#

i think those furry body mods use a similar premise

shrewd silo
modest oak
#

this is good news

modest oak
shrewd silo
#

You can do sick things with clothing Items if you know what you are doing

modest oak
#

what about having like, an alpha mask on the body? for dismemberment and whatnot

shrewd silo
#

Since they can have vertex weight to any bone of the body

upbeat turtle
#

basically what youd do is run code which detects what bodylocation takes damage, then have it add/remove the clothing items as needed

shrewd silo
modest oak
#

what about damage actually replacing the model? like you hit em in the head and it changes the rig to a specific no head rig

upbeat turtle
#

doing it for zombies is a little more tricky, since they run off the outfits xml system

bronze yoke
#

you can mask away parts of the body

upbeat turtle
#

still do-able without java tho 🙂

shrewd silo
bronze yoke
#

you just need to change their itemvisuals, i think sim has done it before

shrewd silo
#

I never really tested but maybe you can modify their HumanVisual when they spawn and then update their models. Should work.

modest oak
#

for the model replacement or just the like object spawning

shrewd silo
#

Don't try to use wornItems tho. That is player exclusive.

shrewd silo
#

Or maybe Animal can do that too

#

since they are children of the IsoPlayer class, but who knows

bronze yoke
#

animals can't wear clothing, but they can wear attachments

upbeat turtle
#

animals are a bit more janky in my experience

#

they technically can wear clothing

shrewd silo
bronze yoke
#

so the limitations are no masking and nothing skeletal (you can only attach statically to a single bone)

modest oak
#

if i ever go through with my mod idea i might leave animals off the table although it leaves interesting possibilities

modest oak
#
  • dismemberment and stuff is planned for later anyways so no need to complicate things for a temporary implement
bronze yoke
upbeat turtle
#

bulletproof cat xd

shrewd silo
#

As Frey said, they are a bit troublesome to modify. God I don't even want to know what people did to make the horse mod possible.

bronze yoke
#

i wouldn't be surprised if they were made just for the heck of it though and not something they plan to actually put in the game

upbeat turtle
#

it took us studying the animals api for like 2,000 hours to make the cat mod

#

😆

shrewd silo
modest oak
#

i have faith he will figure it out but i cant imagine it will be easy

upbeat turtle
#

oh hell yeah! I heard about that project

#

yeah using tis system really isn’t easy

bronze yoke
upbeat turtle
#

for the dog mod im working on, i decided to just say “fck it i’ll do it myself” so i wrote an api which lets any model/anim work in zomboid 🤣

bronze yoke
#

it slipped my mind, but the big thing with animal attachments is only attachments added after the animal last went onscreen render -- so if you add an attachment while they're offscreen, or they walk offscreen after you added it, it stops rendering

upbeat turtle
#

only caveat is it’s modding class files

bronze yoke
#

so we had to work out a system to detect when the animal comes onscreen and reapply its attachments

bronze yoke
#

it's probably why TIS never ended up doing anything with it

upbeat turtle
#

i’m cooking up a system which will give animals legit inventories like players spiffo

bronze yoke
#

i'm not sure how hard it would actually be for them to fix, but from the lua side it's really annoying

upbeat turtle
#

it will streamline attachment stuff later on

upbeat turtle
#

another thing which is more experimental rn.. i also am building an off-screen rendering api for them steamhappy

bright fog
upbeat turtle
#

hella excited for the dog mod

modest oak
shrewd silo
#

One thing I can apreciate, is the abillity for TIS to create one of the most interisting and fun systems in game design, and make it really annoying to mod it somehow.

modest oak
#

excited aswell to see how it turns out 🫡

shrewd silo
#

God damn my grammar is horrible today, so many typos -.-

bronze yoke
#

from what i understand there was a desire to make it more moddable than it ended up being but they ran out of time

shrewd silo
modest oak
bronze yoke
#

contrary to what some people say the animal system is definitely designed for modders, it's very easy to add a new kind of animal, but if you want it to do literally anything vanilla animals don't do it gets complicated fast

bright fog
#

Extremely easy to add animals yea

modest oak
#

which is unfortunate because i feel like the only reason youd add animals would be because you want an animal that does something different

bright fog
#

The only reason the horse mod took so long is:

  • the need for animations (which really with a good animator can got decently fast, which was our case)
  • a riding system
  • attachment system
shrewd silo
bright fog
bronze yoke
#

most of the animals people actually want are pets, not farm animals, and the vanilla behaviour is only designed for the latter

bright fog
#

Animals can already attack the player too

modest oak
#

but smarter than a normal animal i guess

shrewd silo
modest oak
#

like a zombie

upbeat turtle
bronze yoke
#

yeah hostile animals are the other big one, they're tricky too

upbeat turtle
#

custom behaviors are fairly straightforward to make in lua

bright fog
#

The main problem is that you have to manage the animal aggressivity and player detection

bronze yoke
#

i think they want hostile animals in like b43 or something but tbh i've gotten the impression the devs are fed up with animals so i'd wait a bit longer than that

modest oak
#

im not sure how indepth their ai will go but in the comic they are able to operate machinery and weaponry 😬

#

said weaponry is.. very large so they might not even get that feature

upbeat turtle
#

dogs with guns kek

shrewd silo
bright fog
#

Weaponry ? At that point I'd probably use zombies instead then, but those are way harder to make custom behavior for

#

Zombies can already use guns. I mean maybe you can set primary hand a gun for an animal idk

modest oak
upbeat turtle
modest oak
#

its more of like... a turret

#

that they can use

shrewd silo
upbeat turtle
#

*gal, but yee

upbeat turtle
#

the wolf mod was my very first project

shrewd silo
#

freakin aweosm

modest oak
#

xamn

bright fog
#

Technically kind of our project drunk

upbeat turtle
#

i’ve been wanting to do a redux of it for ages now haha

#

the biggest issue circles back to zomboid model/skeleton api being contingent on having blender skills

#

😆

#

but yah, i’m planning on using the new model tech to make not only woofos but cat mod v2

bright fog
#

Which there really isn't any need for since you can use any rig you want for animals

upbeat turtle
#

tested the model tech with a dragon 🤣

shrewd silo
upbeat turtle
shrewd silo
upbeat turtle
#

he’s transcended to another plane of reality 😂

shrewd silo
#

.<

strange delta
#

but blender is far easier to learn so im not exactly expecting you to know to use one of these instead

#

what are you struggling doing on blender btw?

#

maybe i can give you a tip or two

vivid imp
#

You can absolutely use other software than Blender for rigging tasks for PZ

#

<@&671452400221159444> got another one

strange delta
#

thx

upbeat turtle
strange delta
#

its basically coding :D

upbeat turtle
#

ive thought about learning live2d, been already learning digital art on the side. though im not sure if live2d is usable for zomboid modding purposes xD

strange delta
#

no lol

#

or at least id be highly surprised

upbeat turtle
#

i could see live2d models being converted to blender or something, maybe from there it could work in zomboid lol

vivid imp
#

That wouldnt work at all

upbeat turtle
#

i got the animal inventory system working cathappy

#

eliminates the need to run heavy ontick stuff like spawning a bag at the its feet & updating the position with lua

bronze yoke
#

you'd actually be surprised how cheap that is

upbeat turtle
#

in theory this system does support "clothing" items. but they need to be defined separately spiffo

bright fog
#

You can also find links to JavaDocs and LuaDocs on the same website (tho those docs have their own website)

buoyant violet
mental yoke
#

Hullough. Trying to fire up a MP server with some mods I've made to test them in multiplayer, but I'm getting 'Staging library folder not found' and 'Install library folder not found' errors.

I assume this has something to do with me having local copies of them in my Workshop folder, or something? Or perhaps because some of the mods are set to friends only?

sonic needle
mental yoke
#

Hah gotta keep things fresh

quaint wyvern
#

just noticed Turbo Game has it too

sonic needle
#

good ol, bejewled in pz. nice

quaint wyvern
#

it was named Candy Crush so I missed it in the list ggssLOL

paper ibex
quaint wyvern
blissful seal
#

Looking good to me

#

I think I've convinced myself I will release a ZombieBuddy based addon for my weapon mod

#

The animations in your clip @quaint wyvern its too much for me, i love it honestly

lavish gull
#

are there good mod collections ?

blissful seal
vivid imp
bright fog
#

Lmao

quaint wyvern
#

easter egg

simple coral
#

configuring sounds for weapons, is it better to use .wav or .ogg ? is there performance difference?

pale rapids
#

is there any confirmed working b42.17 cure mods in MP?

strange delta
#

ever

#

its basically uncompressed audio waves

shrewd silo
#

I agree, WAV is too FAT

strange delta
#

flac is lossless compressed (= better in EVERY way than wav)

upbeat turtle
#

metalbar.wav spiffo

strange delta
#

meanwhile ogg is decent

#

by ogg i assume you mean vorbis

#

since ogg is just a container not a format

#

its old af but its okay

#

barely better than mp3 lets be honest

simple coral
#

fire, ty for info

strange delta
#

i kinda prefer aac but it can have licensing fees depending on what youre doing

quaint wyvern
#

the bomb and colour specials have a placeholder texture, which is just the O map marker

#

everything else is just drawRect

mighty sonnet
#

Is there any documentation how to create car mods? I have come pretty far with mine, but for whatever reason, my damage and blood textures don't render correctly on the car. It's as if there's Z-fighting. The damage and blood textures have transparent backgrounds, and I do have a correct mask texture.

bright fog
#

As the problem you are having is fairly common if I'm not mistaken

mighty sonnet
mental yoke
#

Speaking of documentation - is there any on hosting a server for friends as a mod developer lol. Having my mods in my local Workshop folder seems to be causing some wonky issues, and I think steam is subbing me to my own mods which kind of makes sense, but idk what I'm doing here lmao

mental yoke
#

found the wiki section for this. So it's mods > workshop > steam workshop folder - and it uses the mod ID to determine which copy of the mod to go with? So, if I have a mod in Zomboid/Workshop and the same mod in the steam workshop, it'll prefer my local one and not load ANY of the steam one - and this applies to multiplayer too?

icy night
#

Anyone know how to drain a battery via Lua?

#

I'm having a very hard time draining a custom device. The only thing I could manage without errors was to drain the entire thing all at once lol

quaint wyvern
#

something like battery:setUsedDelta(battery:getUsedDelta() - drainPerSecond * dt)

torn igloo
#

Is there an api in b42 where I can delete client's Zomboid\Saves\Multiplayer\WorldDictionaryReadable.lua? That thing doesn't get updated when server has changes in its mod list.

silent zealot
#

Like Kitty mentioned, if you use dt for deltatime since last charge update and multiple by the drain per sec, that accounts for tick length changing

deft mauve
#

AddItem in the shared folder seems to be only adding items in the client what should I be using to get it to be on the server and the client?

deft mauve
#

What is the difference between self.character and player in mp

silent zealot
#

"self.character" is 100% context dependant

#

What is self? And what does it have in the variable "character"?

#

You'll see a lot of lua stuff that kinda fakes object oriented programming, and the self variable gets passed between function when called via object:someFunc(var2,var2.)

#

Behind the scenes "object:someFunc(var2,var2.)" is just "object.someFunc(self, var2,var2.)" with a fancy disguise on

#

likewise, "player" will set to different things at different places.

#

(I feel I'm about to be corrected by Albion 😛 )

sonic needle
bronze yoke
#

just nitpicking that it's not really 'faked', it's pretty much what all OOP languages are doing under the hood

silent zealot
#

It still feels so much more fake in LUA to me.

#

probably because it doesn't enforce a lot of stuff.

#

So to me it feels like you have to actually make sure you build it properly if you want it to be OO, or it will all fall apart. Meanwhile more stuctured languages will have the compiler look at your mess, glare at you and say "that's stupid and I refuse to do it unless you find the overrides that tell me you really mean to do that."

deft mauve
#

Did I type this wrong or something?

#

sendAddItemToContainer(player:getInventory(), "Base.MagicalCore");

quaint wyvern
#

what does the error message say

upbeat turtle
#

helmet dawg

quaint wyvern
#

d'awww

deft mauve
silent zealot
deft mauve
#

that is straight from the code for the mod

silent zealot
#

ok, so is there any error in console.txt?

#

And what did you set player to?

#

Also, is this single or multiplayer, and are you certain your function was actually run? (add print statement or similar to be sure)

silent zealot
deft mauve
#

ERROR: General f:4218, t:1777964686753, st:1,222,091,299> KahluaThread.flushErrorMessage > expected argument of type InventoryItem, got String
It might be this then

deft mauve
#

I'll add a print

#

I am trying to make a fix for a mod for a private server for me and my friends

#

and all of the code comments are in chinese

deft mauve
#

I dont know where player would've been set

#

would it not use the player invoking it?

silent zealot
#

We have no context for that line.

#

The sensible thing to do is set player to the player object of the player you are doing stuff to.

#

But sometimes a vanilla function uses "player" as the numeric index of the player, not the player object

#

Or other wierdness... and a mod author could have done anything.

silent zealot
#

To a computer, "player" is no more special than "sghjkr" when it comes to naming variables.

#

Context matters a lot

#

this code - what triggers it?

#

If it's an event that passes the player object as an argument, then you use that.

#

if it's part of the UI running on the client getPlayer() will do.

#

If a bomb explodes then the server would check for players near the explosion and do explosion stuff to them one-by-one.

#

If you trigger a teleportation machine, it will check for all players on a tile.

deft mauve
silent zealot
#

Is the goal to add an item to the players inventory?

deft mauve
#

yes

quaint wyvern
#

you can do inventory:AddItem("Base.MagicalCore")

#

since that actually takes a string

silent zealot
#

For multiplayer the server needs to add items, so you need to send a message to the server and have the server add the item, then call the function to sync teh container contents back with clients

quaint wyvern
#

oh right, multiplayer

silent zealot
#

Unless I mixing up MP/SP changes... but I'm pretty sure that's how it works.

#

Did this mod ever work in multiplayer, or was it a single-player only mod you're converting?

deft mauve
silent zealot
#

Good, that should mean the mod design is OK and you just need to fix up whatever small things are broken... if it had never been working in MP they might have been a lot of work to do.

deft mauve
#

Items are removed properly

#

but if I rejoin it gives them back

#

and it never gives the items its supposed to in return for the removal

quaint wyvern
#

how common are desktop computers in game?

#

I'm attaching a Play Games menu option to any desktop computer on a powered square, wonder if that's too much to ask for

#

also there's gotta be a neater way of checking than this monstrosity

if luautils.stringStarts(texName, "appliances_com_01_7") and texName ~= "appliances_com_01_7" and texName ~= "appliances_com_01_70" and texName ~= "appliances_com_01_71" then

mellow frigate
silent zealot
#

Also,a gotcha: to check for power it used to be something like ((isIndoors and globalpowerOn) or (inGeneratorRange and (isIndoors or sandbox.aloowGeneratorOutside))

#

But they redid a bunch of power related function so hopefully there's an easier way no instead of every bit of code that calculates power duplicating that.

blissful seal
#

hey folks who have custom animations in their mod -- has anyone else dealt with the invalidPrefix error that causes your animations to stop loading correctly?

#

every so often someone reports animations being broken on one of my mods, and unsubbing/resubbing fixes it

shrewd silo
#

I suggest you getting the error log from that and report to #mod_portal

#

There's a huge chance you're not at fault here

sonic needle
#

i just finished another Skin Mashup

pearl sundial
sonic needle
pearl sundial
#

aw okay, enjoy it

sonic needle
#

itll be in my discord, and other places around the net

blissful seal
silent zealot
silent zealot
# sonic needle

I know it's the apocalypse and there's no-one left alive to appreciate the effort, but I still like makeup.

silent zealot
# sonic needle Who doesnt 😛

I'm guessing the people who actually have to put in the effort to wear it... it's very easy for me to say "just go with a no-makeup look" since I'm not the person who has to actually do it.

sonic needle
#

its rough making it work, trying to keep it similar, but remake it prettier

silent zealot
#

And in Zomboid you have approximately 8 pixels to crate your texture with

sonic needle
sand perch
#

I'm attempting to update a mod I manage from 42.15 to 42.17 after a bit of an absence. However when I attempt to publish the update I get "error requesting Steam to update the item" and nothing further, even in console.txt. I've tried reinstalling the game and even unsubscribing from all mods on the workshop. Anything I might be missing that's changed between those builds?

torn igloo
#

How you assign getModData() to square on MP b42?

bright fog
#

You need to store in global mod data with the coordinates of the square

sand perch
frank lintel
#

Is XP rewards defined in a single place or they located like by the specific stat its for. looking at maybe updating the exercising page and need to look up the XP gains each one does.

bronze yoke
#

you'll just have to search around for addXp calls

frank lintel
#

ouch

bronze yoke
#

usually it's just a magic number as an argument, there aren't like constants for XP from specific things

#

exercise specifically might be more systematic than that but generally it isn't

frank lintel
#

okies yeah the current page (based on v41) has outright values saying do x you get y... figured it needs a update

bronze yoke
#

i think exercises are defined by lua tables or something? so presumably the xp reward for them comes from that

frank lintel
#

okies I'll dig around was just hoping maybe someone knew offhand.

pale rapids
#

anyone know if zombrand() on serverside

#

im curious as to why my custom item that drops from zombies works in singleplayer but not on multiplayer

upbeat turtle
bright fog
#

You need to sync item creation

pale rapids
#

which is okay i guess

pale rapids
#

and i pass the zombies coords when it dies

hexed stirrup
#

hi

#

im looking to create a small mod that just adds a few new tiles and their recipes for b41

#

some doors some wall types etc

#

mainly expanding the metalwork part of building

#

however i am an artist not a developer so while i can create the assets for this mod, i cant develope and publish it

#

im wondering if anyone would be willing to collab on this

#

dm if interested

upbeat turtle
bright fog
#

Look into the mod Building Menu

#

That's your best solution to adding your own buildables

quaint wyvern
#

this is the Tetris from the Turbo Game mod, based on NES Tetris. I've been tinkering with it on and off and adding modern Tetris features like CCW rotation, hard drop, piece holding, fast DAS, SRS kicks, and T spins

#

also I ported it to b41 for myself spiffo but I'm not planning on releasing it since it's their mod

peak nymph
#

does anyone have an examples of code that "adds an item from an action", as I have an action on the client, but not 100% sure how to send a message to the server in order to add the item to the players inventory from there

shy mantle
peak nymph
# shy mantle Need more context than that because there are several ways to do it. What is the...

I have a mod that replicates the b41 fishing mechanic as a "dredging" mechanic
I updated that for b42 singleplayer ages ago, stripping doen the code to get it to work
Now i'm trying to update it to b42 multiplayer and I can't remember how I did it ages ago on the b41 version

The issue not working is when adding "loot" from the dredging action, when on sp it works fine, but on mp it adds a "ghost item" that can't be interacted with and is removed on server re-log

currently just using the AddItem method
here on line 167
https://pastebin.com/iNapa1m4

shy mantle
# peak nymph I have a mod that replicates the b41 fishing mechanic as a "dredging" mechanic I...

There was a change to timed actions, adding a Complete function and a few others for the server; Perform is client side only. I'll try to find the pdf somewhere... but it was nicely documented and easy to understand. Also, you'll neeed to add something like, sendAddItemToContainer(playerObj:getInventory(), item) on the server after adding it, same for removing an item. Fishing in B42 is very desynced, you can literally fish with the same bait forever, so I wouldn't look at that for refrence in case you were lol

peak nymph
shy mantle
#

Here's the remove for easy access: sendRemoveItemFromContainer(playerObj:getInventory(), item)

#

That's what I get for trying to copy from a PDF with ctrl + c, doesn't work lol

peak nymph
bronze yoke
#

<@&671452400221159444>

lost slate
bronze yoke
#

<@&671452400221159444> 😭

left plank
#

Just saw it as you were typing lol

#

Thanks

bronze yoke
#

thank you!

dull geyser
#

anyone knows how to read kill count from players.db, im also using killcount mod but on server doesnt save any readable log?

mellow frigate
#

in MP, KillCount mod sends from clients to server regularly. it is stored in global mod data server side.

paper ibex
blissful seal
#

complicated bug report idk what to tell ya 🤷 do you read that channel for fun or something 😄

paper ibex
#

sometimes 😂

frank lintel
#

Anyone happen to know where all the Debug UI's are at. Looking for the one specifically for the Attachment Editor. I found it once but now again lost it.

upbeat turtle
#

<@&671452400221159444>

peak nymph
#

hi all,
would anyone be able to help me update an action
i'm struggling to update the "perform" function into the "perform" and "complete" functions with the update
#mod_development message

In my attempts i've had desyncs between the loot gathering or the zone updating between client and server, or the UI not updating properly

here is the current perform function prior to my failed updates
https://pastebin.com/KTwBtSZs

dull geyser
manic forum
#

is there a event i can hook that triggers if an action with a world Furniture was performed. I mean in like if a player stores or takes anything and if a "cook" event is triggered.

sterile scarab
#

I’m currently working on a custom clothing mod for Project Zomboid Build 42.17 and I’m having a weird multiplayer issue that only happens on a hosted server.

The mod works perfectly in:

  • Singleplayer
  • My own dedicated local server

The hoodie can be:

  • equipped
  • unequipped
  • repaired
  • ripped
  • synced correctly

But on our rented hosted server:

  • the equip animation stops halfway
  • after relogging, I can see the hoodie on myself
  • other players cannot see it at all
  • sometimes the item behaves partially broken

The weird thing is:
the item itself exists and loads correctly. Stats, icon, spawning etc. all work.

I already checked:

  • ClothingItem names
  • XML naming
  • texture paths
  • workshop upload
  • body location
  • slash formatting
  • cache clearing

This is the error I get when equipping the item:

java.lang.NullPointerException: Cannot invoke "zombie.core.skinnedmodel.visual.ItemVisual.getTint()" because the return value of "zombie.inventory.InventoryItem.getVisual()" is null

zombie.network.packets.SyncClothingPacket$ItemDescription.<init>(SyncClothingPacket.java:62)
zombie.network.packets.SyncClothingPacket.lambda$set$0(SyncClothingPacket.java:115)
zombie.characters.WornItems.WornItems.forEach(WornItems.java:146)
zombie.network.packets.SyncClothingPacket.set(SyncClothingPacket.java:113)
zombie.characters.IsoGameCharacter.setWornItem(IsoGameCharacter.java:3353)
Lua(Vanilla).complete(ISWearClothing.lua:121)
#

Current clothing XML:

<?xml version="1.0" encoding="utf-8"?>
<clothingItem> 
    <m_MaleModel>Skinned\Clothes\hoodie_male.fbx</m_MaleModel> 
    <m_FemaleModel>Skinned\Clothes\hoodie_female.fbx</m_FemaleModel> 
    <m_GUID>440e8069-c4ba-44d1-876e-ef10746b7889</m_GUID> 
    <m_Static>false</m_Static> 
    <m_AllowCorrectiveDiffuse>true</m_AllowCorrectiveDiffuse> 
    <textureChoices>clothes/hoodie</textureChoices> 
</clothingItem>

Since it works on my own dedicated server but not on the hosted server, I’m wondering if this could be:

  • Linux case sensitivity
  • workshop caching/version mismatch
  • missing models_x assets on hosted servers
  • or some Build 42 hosted server sync issue

If anyone has experience with B42 clothing mods, I’d appreciate any help.

knotty stone
#

you could try and add <m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomTint>false</m_AllowRandomTint> in the xml since it was a tint issue

frank lintel
#

yeah actually it works fine with just an occasional error but I was hoping to resize it a bit wider. sadly as you said spaghetti... didnt see anything obvious defining the size of the UI on the left side. by using that I was able to fix angle-headed flashlights mounting on the alice webbing chest straps. sadly havent heard nothing from QA about it yet.
https://theindiestone.com/forums/index.php?/topic/94975-4117x-flashlight_anglehead-flashlight_anglehead_army-attachment-webbing-floating-mid-air-and-fixsolution-given/

#

I was looking at <installdir>\ProjectZomboid\media\lua\client\DebugUIs\AttachmentEditorUI.lua

deft mauve
#
       rem.inventory:Remove(rem.item) 
end```
I am not familiar with for loops in lua would this remove item work in mp from the shared folder?
worldly condor
worldly condor
#

been getting this for the past hour

#

if anybody has any idea how to fix this, please reply

knotty stone
#

It goes into 42 or common folder

neat mesa
summer wren
frank lintel
#

Wonder who maintains Spiffo its saying Im not in the server again...

frank elbow
#

The spiffo bot, presumably

frank lintel
#

I dm'n them basically spiffo when trying to open a ticket tells me 'oh you arent part of this server ... fuck off'

sonic needle
#

maybe the one usecase i can see of @ ing a mod. but be careful who, and why you do that to.

frank lintel
#

oh I know better when to or not @ a mod...poke.

mental yoke
#

Is there an event that my mod can subscribe to that's triggered when the items around the player changes in any way, like if they get close to a container, or the items in a nearby container change?

#

lemme rephrase - which event should I be subscribing to. In my case I'm drawing some UI elements on the inventory window and loot window for each item

bright fog
mental yoke
#

I think I am, but if you walk around with the inventory or loot windows open and the items/containers change then I'll still need to keep updating them

#

I could just do a timed check, but I'd prefer not to if I can

bright fog
mental yoke
#

I'll have a looksie, thanks

#

My mod's technically working, I'm just in that optimization phase. Found out Zed has a lua script profiler so that's been super handy

#

Final question for now - when you host a PZ server, it forces the people connecting to subscribe to all the workshop items you have enabled? Do those subscriptions persist after they leave?

mental yoke
#

Interesting. Alright I'll add a simple on/off switch for my mods in case people don't wanna use them hah.

mental yoke
#

Man I wish they'd add in a way to reload lua while in-game, backing out to main menu and loading back into a game to test a change eats a lot of time

bright fog
#

Forgot to share it, but here's the modding wiki summary

frank lintel
#

is it normal to have to in VSC "emmylua.inlayHints.tableComma": false so it stops spamming red underlines for missing commas?

bronze yoke
#

are you sure your code works? a missing comma should be a compilation error, i don't see why you'd turn it off

bright fog
frank lintel
#

this is stock code from the game crying that Im missing commas...

#

kinda makes it hard to look thru stuff when all the files are flagged like this

bright fog
#

That cannot be Lua

frank lintel
#

thats right from the game files its why Im confused

bright fog
#

No I mean

#

Your VSCode is not making these Lua files

#

Bottom right, the bottom panel bar, check the language set for that file

frank lintel
#

okies

bright fog
#

But that's either the wrong language or you have multiple extensions handling your Lua here

frank lintel
#

says Zedscripts

bright fog
#

What version of ZedScripts are you on

frank lintel
#

should be latest... lemme look

#

1.10.6 updated 3 days ago

bright fog
#

When did you first start using ZedScripts

#

I had problems with files being incorrectly marked as scripts back then but that's fixed

frank lintel
#

I just set all this up like yesterdayt

#

yank all my extensions out and put'm back in maybe?

bright fog
#

do ctrl + shift + P > change language (or whatever that is called) and select Lua

frank lintel
#

k

bright fog
frank lintel
#

that did it

bright fog
#

But I don't get why the extension would do that, this was fixed ages ago now and doesn't mark my lua files as scripts

frank lintel
#

okay so atleast I know the cause. thanks Sim. MUCH appreciated...

#

also figured out if I click on it bottom right I can stop it form 'autoconfigure language' and define Lua as EmmyLua so should have that problem fixed as well

shrewd tide
#

Alright, i am announcing

#

my Mod series that i am working on rn

#

Rice Shower Weird Firearms

#

Wich would have IRL Firearms that are really cool and weird (in my opinion)

#

For now planned: T2 and ZK-383 SMGs

dull moss
#

Do you have any work done though PepeLaugh

worldly condor
shrewd tide
frank lintel
#

Sycholic 1 - Spaghetti Code 0

delicate coral
#

Anyone know how to cheat in multiplayer? I wanna troll my friend who is new to the game. I’m in Build 41.

frank lintel
#

I dont even wanna know why they in here asking this...

lyric musk
#

I was inspired by a random Youtuber that maybe invented a weird thing called a "Maratron" and I've figured out a process based off that to translate treadmill movement to movement in PZ. Does anyone have:
1.) A spare optical mouse.
2.) A treadmill - walking pad, manual treadmill or normal treadmill, just needs to have a belt that moves that you walk on.
3.) 30-60 minutes of spare time.

It involves using a PZ mod that a friend of mine made as well as some custom input software needed to emulate key presses.

I'm going to be setting up some detailed instructions tomorrow I'll later turn into a youtube video and wanted to have someone else test out my instructions to make sure they work without committing it to video. you too could get muscle strain in real life when you get muscle strain in kentucky.

bright fog
#

This sounds very funny lol

shy narwhal
#

Not sure if this is the right place, but I noticed this block in TimedActions\ISReadABook.lua

if self.character:isSitOnGround() or self.character:isSittingOnFurniture() then
    time = time * 0.9;
end``` and tried to test it in the game with a stopwatch running, but sitting on a sofa/on the ground didn't seem to affect the time required to read one page (I set the DayLength to 27/real-time to make this easier). Does anybody know whether this file is being used by the game at all?
mighty needle
#

Hello everyone.
I'm working on a mod that connects PZ to a NodeJS backend.
Is it possible to establish an HTTP connection in Lua?
If not, are there any ways to send the game chat to a Discord channel? With the default configuration, it only sends "/all" messages to a channel.
Thanks in advance!

silent zealot
#

I don't think there is any way to open an arbitary HTTP connection. And if there is, that's a pretty big security issue.

#

I know people have done stuff with writing to/reading from files and an external application, you might find some info on that if you search.

#

What's the goal behind connecting to the backend web service?

silent zealot
#

And if you want to see if something is actually being executed, your best friend is the humble print() statement.

#

Then look in console.txt

bright fog
bright fog
silent zealot
#

I thought everyone had needed to find workarounds... know any mods that do HTTP calls to have a look at?

shy narwhal
bright fog
#

Or Java mod

buoyant violet
#

goddies in the factory

silent zealot
# bright fog Or Java mod

Using a java mod makes anything possible, other than those tricky "computers can't do this at all" problems

#

...but think about how hilarious it would be if someone published a Zomboid mod that solved the halting problem or proved P=NP Complete

dull moss
#

Go away

#

Nobody is going to help you

peak nymph
# delicate coral Please.

are you the person running the server? if so you can just use admin mode to "cheat", it's not relevant to this channel though

dull moss
#

It's like saying "Guys someone teach me how to hack bank account, it's for my friend prank, I wanna prank him so it says he has 0 bank balance, trust me bro it's for a friend"

peak nymph
delicate coral
delicate coral
dull moss
#

Both are a crime u dumpling

delicate coral
dull moss
#

Regardless, nobody is going to discuss cheating here with you, neither in this or any other channel. Read the rules.

#

Actually there's nothing about it in the rules which is weird but my statement stays

grizzled fulcrum
dull moss
#

Oh u propose that he meant "hacking bank account" vs "cheating in a game"

#

yea no that's true

grizzled fulcrum
#

but dw I saw the actual comparison you were trying to make, im not trying to get at you!

frank lintel
#

fact they trying to get a work around to make HTTP calls and NodeJS smells like and AI trying to get info on making a zero-day hack 'again'

reef aspen
#

Hey guys 👋
I tried to get into modding and created a little mod for additional spawnpoints. When I try to start the server, it states that it is initalizing and afterwards "0 of 1 Downloading" and then it terminates (NormalTermination).

The log states:

LOG : General f:0> SERVER: info@coop mode enabled
LOG : General f:0> SERVER: status@UI_ServerStatus_Initialising
LOG : General f:0> SERVER: status@WorkshopItemsCount 1
LOG : General f:0> SERVER: status@UI_ServerStatus_Downloading_Workshop_Items
LOG : General f:0> SERVER: status@UI_ServerStatus_Requesting_Workshop_Item_Details
LOG : General f:0> SERVER: status@Downloaded 0 of 1
LOG : General f:0> SERVER: src\clientdll\contentupdatecontext.cpp (2036) : Staging library folder not found
LOG : Network f:0> [CoopMaster] Unknown message incoming from the slave server: src\clientdll\contentupdatecontext.cpp (2036) : Staging library folder not found
LOG : General f:0> SERVER: status@null
LOG : General f:0> SERVER: status@Reinstalling 0 of 1
LOG : General f:0> SERVER: status@UI_ServerStatus_Terminated
LOG : General f:0> SERVER: src\clientdll\contentupdatecontext.cpp (2037) : Install library folder not found
LOG : Network f:0> [CoopMaster] Unknown message incoming from the slave server: src\clientdll\contentupdatecontext.cpp (2037) : Install library folder not found
LOG : General f:0> SERVER: process-status@terminated

Could somebody help me with that issue?

dreamy quail
#

i finally got around to finishing half my soundtrack mix mod finally

frank elbow
tight hatch
#

Is there a mod that replaces the walkers voices with the runners voices, but still keeps the walkers as walkers? If not, I'd really love to see something like that

mighty needle
upbeat turtle
#

in response to that one security issue which happened a few weeks back, they added code where all non-TIS websites get blocked. i’m not sure if discord bots are feasible any more 😭

bright fog
upbeat turtle
#

well, with limits i should say

bright fog
#

That's absolutely not new

swift stream
bright fog
#

Discord bots are still possible to do

swift stream
#

idk how to use FMOD tools to extract .bank files

bright fog
#

That might not be necessary to do is what I mean

#

Back then I used to set the zombie vocals

#

It could be that the vocals for sprinters and walkers are separate and as such you could at random set a new vocal on a zombie

bright fog
#

That one plays manual zombie sounds

#

That one

#

I think it's still the same in B42

upbeat turtle
tight hatch
#

oh, i understand i guess

dull moss
#

Maybe someone can save me some time here, are timed actions all client side or it varies?

sour hemlock
#

Is there a b42 mod to have your spawn barricaded that works?

sharp ibex
#

Hey everyone

I'm putting together a multiplayer mod, does anyone know how I can start 2 Zomboids on the same computer to test the MP?

knotty stone
sharp ibex
sharp ibex
knotty stone
#

no clue, i only answered you question on the 2nd client 😄 @buoyant violet z should know how

main pasture
buoyant violet
#

what tunes said

#

just launch two instnaces

queen oasis
#

also, don't be a Jim and forget that you need getDuration() also so the server can calc the duration

dull moss
#

Yep, figured its both already but ty

queen oasis
#

ya I was late to the party

sharp ibex
abstract iron
#

Any one wanna help me figure out how to create 2D isometric graphics like in games like tides of numera or planescape torment, fallout 1-2? Im really intersted in puting together a group to learn this

#

Lol day 10 of scouring discord for help in this

upbeat turtle
#

the easiest way to go about those types of games is simply using 3D models but rendering them from an isometric perspective. otherwise “true” 2d can be a headache to make. it means every character — every animation; etc — needs to be remade multiple times to cover every angle/direction 😭

#

zomboid for example does the 3d to 2d trick in some regards

abstract iron
#

😁 yeah that's why i asked here. In the blender chat i got basically told to f off

upbeat turtle
#

if the reason you’re doing this is to make a game, i suggest checking out unity engine cathappy

#

depending on your tech skills, making a custom engine is the best way to go, but can delay development a bit

#

getting the isometric perspective in unity is pretty straightforward

bronze yoke
#

definitely don't make your own engine, you are wasting years of development time to catch up to where everyone else starts

upbeat turtle
#

godot is another awesome platform to check out

#

it does have some limitations vs unity, but is totally free and licensable

bronze yoke
#

godot is really good, i would stay away from unity as they've shown literally no restraint in fucking over their customers completely

#

the engine is fine from my experience but you just don't want them to hold any influence over your project

abstract iron
#

Yeah im a godot dev

#

I have an idea for a space sim ive been working on for 5 years

#

I tryed psx style graphics but i scrapped the whole project because i thought that isometric graphics like pz and the older games would alow people to play my game on low end pcs

bronze yoke
#

actually ironically isometric is really rough on performance

abstract iron
#

I studyied the graphics from games like never winter nights and morrowind and had alot of the game done it was almost in demo fase but my computer went and i lost everything so... I bought 2 more computers just incase lol. My 3 yo accidentally spilled his juce on my tower

#

My consept was what if they made x4 foundations, star citizen and starfield back in the early 2000s

#

It was huge and now its gon 😂

#

But now that i have all the experience and the vision i think it will take less than 5 years to replicate

silent zealot
silent zealot
bronze yoke
#

nearly every corporation will try their best to screw over their customers, what you really have to be afraid of is a corporation that would approve a policy even though it would so obviously cause major backlash like that

silent zealot
#

And too many focusing on short term profits over long term, because they gets execs a big fat bonus and then they can leave and who cares?

abstract iron
#

Also English is my second language so it was much harder to comunicate but i live in America now so i can speak like a native

silent zealot
abstract iron
#

Yeah something like that

silent zealot
#

Checkout Godot as a starting point; if it meets you needs you can be confidenty it will not screw you over like Unity

#

(since it's an open source project)

upbeat turtle
#

yeah, unity are pretty scummy as a company 😭

abstract iron
#

Ive already been developing in godot actually for five years

silent zealot
#

You could go the PZ way and code an engine from scratch but... don't do that. (Unless you enjoy game engine development for fun)

abstract iron
#

But i never broke into the 2D space

#

No i dont like that idea anyway

#

I did in py games do something like this once

silent zealot
#

Most godot example I know of are 2d (side view/top view) or 3d, but looks like it can do isometric (or at least that demo gives a startingg point for isometric)

abstract iron
#

Actually its easy to set up godot for isometric games its just a few options in the ui

#

But from my experience its very tile base like the game underrail

silent zealot
#

I don't think you;ll get away from tile-based if you want to use 2d images for the world, instead of making it 3D with a fixed isometic camera.

#

Unless you draw the entire map as an image like old infinity engine RPGs

#

That's easy from a technical viewpoint; you just make a huge image that is the map, and then have a way to control which sections are walkable. But it also has limitations and obviously drawing those maps is not quick.

abstract iron
#

Yeah well i mean i could do that and use some cinda paralax system

#

And some of the placeable items in game i could use the grid base system

#

Or just the tile system

silent zealot
#

3D with fixed isometric camera no good for you idea?

#

Has the big advantage of letting you use existing animations/lighting/etc.

abstract iron
#

Well it would be more convenient

bronze yoke
#

often runs better too

abstract iron
#

But what about performance on low end pcs

silent zealot
#

Unreal Engine is also worth considering if you're going 3D... but I don't know how many of it's fancy time-saving tools would apply. I think it's freee to develop and you only pay once you have a certain amount of sales, but if the advantages were big enough that woudl be worthwhile.

bronze yoke
#

simple 2d runs worse than simple 3d, graphics cards are designed to be good at 3d, especially tile-based is challenging

silent zealot
#

I agree, a simpel 3D style would be better for performance than stacking lots of sprites

abstract iron
#

Yeah i think its like the tiles have there own space that it takes up on the system

#

Also it would be better for space flight

silent zealot
#

And would use a lot less texture memory if you're not using high res textures (which you don't need since you can't shove your face right up against things like in an FPS)

abstract iron
#

Atleast from my experience

bronze yoke
#

lots of tiles means lots of draw calls and since the axes aren't aligned with the screen's there's lots of overdraw too

silent zealot
#

Space flight is super easy on 3D needs because there is no terrain, nothing to render but teh ships (and anything else you add in space)

abstract iron
#

Yeah

#

Idk i guess i will start this whole jurney again 😂

silent zealot
#

Nah, it's still teh same journey. You're in the "what do I want to core design to be" phase.

abstract iron
#

Well like i said my game was almost in demo fase😭

abstract iron
#

I had 10 planets done and alot of stuff in space and it was beautiful

silent zealot
#

How did you do it previously?

#

Also, do you have off-site backups of some sort now? There are plenty of cheap cloud services for this.

abstract iron
#

No i didnt understand American internet when i first came here

#

Maby i will look into it

torn igloo
#

Is there a new doc for TimeActions? I used to be able to send IsoObject of the chair or whatever but now I can't.

upbeat turtle
#

finished his attack logic framework spiffo

#

working on the pathfinding logic next DanceDog

shy narwhal
#

Does "Add fluid" debug command work at all? Whenever I try (MP), it seems to do nothing

#

Guess not..

        java.lang.RuntimeException: No implementation found for function: addFluid(class zombie.entity.components.fluids.FluidContainer [component: FluidContainer], class java.lang.String Water)) at MultiLuaJavaInvoker.call(MultiLuaJavaInvoker.java:113).
        Stack trace:
                se.krka.kahlua.integration.expose.MultiLuaJavaInvoker.call(MultiLuaJavaInvoker.java:113)
                se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:177)
                Lua(Vanilla).addFluidDebug(ClientCommands.lua:304)
                Lua(Vanilla).OnClientCommand(ClientCommands.lua:1218)
                se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:794)
                se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:161)
                se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1749)
                se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1581)
                se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:60)
                se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:131)
                zombie.Lua.Event.trigger(Event.java:55)
                zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:386)
                zombie.network.GameServer.receiveClientCommand(GameServer.java:2428)
                zombie.network.PacketTypes$PacketType.onServerPacket(PacketTypes.java:969)
                zombie.network.GameServer.mainLoopDealWithNetData(GameServer.java:1600)
                zombie.network.GameServer.main(GameServer.java:900)
ERROR: General      f:130572 st:1,884,418,845 at KahluaThread.flushErrorMessage      > dumping Lua stack trace
-----------------------------------------
STACK TRACE
-----------------------------------------
        Lua(Vanilla).addFluidDebug(ClientCommands.lua:304)
        Lua(Vanilla).OnClientCommand(ClientCommands.lua:1218)```
silent zealot
#

How exactly did you call it?

shy narwhal
#

I was just testing something via debug mode and this happens if you try to add any fluid to a Water Collector Crate (tile)

silent zealot
#

But, how did you add the fluid?

shy narwhal
#

Surprisingly it works if you do that with the water collector in your inventory

silent zealot
#

Did you get the object and call addFluid()via lua?

shy narwhal
#

It's a built-in function. Like I said, I was just testing something

silent zealot
#

My point is there are multiple things you could have been refering to, so finding out which was being used matters so we don't give useless/confusing advicec

shy narwhal
#

I understand, apologies

silent zealot
#

I'm not sure if adding fluid to world objects via debug menu works, I don't think I've tested since early days of B42 when I used it to fill up water collectors.

#

My suspicion is the debug thingy is calling addFluid("water") which will not work, it shoudl be passed a FluidType and an amount.

shy narwhal
#

I guess it is just implemented for one class but not the other

silent zealot
#

So probably broken when they did that update to move a bunch of stuff to types instead of strings, made us register tags etc. via registries.lua

#

Go post "B42.12 update plz!" on the Game's mod page. 😂

shy narwhal
silent zealot
#

that's what should be getting called, so it has been updated to use fluid types

lofty frigate
old prism
#

If I want commission someone to make a clothing mod, how much would it usually cost pz_thinking

bright fog
#

I suggest joining the modding Discord for commissions

#

Don't answer DMs you'll receive preferably as bots will target people that sent specific messages related to asking for commissions

old prism
#

Ooo

#

Thanki!

tight hatch
swift stream
dull moss
#
local function sendTraitLevelUpEventToServer(player, perk, level, increased)
    local perkName = PerkFactory:getPerkName(perk)
    sendClientCommand(player, "ETW", "fireLevelPerkEventOnServer", { perkName = perkName })
end

Events.LevelPerk.Remove(sendTraitLevelUpEventToServer)
Events.LevelPerk.Add(sendTraitLevelUpEventToServer)

yea ok bro

java.lang.RuntimeException: expected argument of type Perk, got KahluaTableImpl at MethodArguments.assertValid(MethodArguments.java:128).
#

dafuq that's supposed to mean, perk is not a table? And if it is then why the fuck is it KekW

bright fog
#

But who knows

dull moss
#

i mean if LevelPerk event passes string instead of actual perk object that's just stupid weird programming decision KekW

dull moss
#

Ye u prob misread the snippet

#
local perkName = PerkFactory:getPerkName(perk)

this falls through

bright fog
bright fog
dull moss
#

if LevelPerk event would pass PerkFactory.Perk then it wouldnt crash

bright fog
dull moss
#

ah I see

bright fog
#

But there could be some quirks

dull moss
#

It's literally PerkFactory.Perk idk what this game is smoking KekW

bright fog
dull moss
#

you mean tostring()?

bright fog
#

basically

dull moss
#

just outputs the perk, for example "Fishing"

#

wait

#

WAAAIT

#

it passes Perks.Something

#

not PerkFactory.Perk

#

if i remember correctly

#

wait no but those are just static PerkFactory.Perk

#

yea idk

#

Where's albion when you need them waaaa PepeLaugh

dull moss
#

bro this game is fucking trippin

local function sendTraitLevelUpEventToServer(player, perk, level, increased)
    print("tostring:" .. tostring(perk))
    print("Full Java Class: " .. tostring(perk:getClass():getName()))
    print("Simple Java Class: " .. tostring(perk:getClass():getSimpleName()))
    print("perk:getName(): " .. tostring(perk:getName()))
    print("PerkFactory:getPerkName(perk): " .. tostring(PerkFactory:getPerkName(perk)))
end

Events.LevelPerk.Remove(sendTraitLevelUpEventToServer)
Events.LevelPerk.Add(sendTraitLevelUpEventToServer)
LOG  : Lua          f:31948> tostring:Cooking
LOG  : Lua          f:31948> Full Java Class: zombie.characters.skills.PerkFactory$Perk
LOG  : Lua          f:31948> Simple Java Class: Perk
LOG  : Lua          f:31948> perk:getName(): Cooking
ERROR: General      f:31948 at KahluaThread.flushErrorMessage      > expected argument of type Perk, got KahluaTableImpl
ERROR: General      f:31948 at KahluaThread.flushErrorMessage      > dumping Lua stack trace
-----------------------------------------
STACK TRACE
-----------------------------------------
    Lua((MOD:Evolving Traits World (ETW))).sendTraitLevelUpEventToServer(ETW_test.lua:11)
    Lua(Vanilla).onOptionMouseDown(ISPlayerStatsUI.lua:525)
    Lua(Vanilla).onMouseUp(ISButton.lua:47)
ERROR: General      f:31948> Lua((MOD:Evolving Traits World (ETW))).sendTraitLevelUpEventToServer> Exception thrown
    java.lang.RuntimeException: expected argument of type Perk, got KahluaTableImpl at MethodArguments.assertValid(MethodArguments.java:128).
#

is it a bug or am I not getting something?

#

nevermind I guess I'm just mentally challenged

#

using PerkFactory:function() instead of PerkFactory.function()

#

I hate my life

#

It's ok, only took me 1 hour to figure it out

blissful seal
#

you only have to touch a hot stove one time

blissful seal
tough hill
#

Sorry I realise I may originally have posted this in the wrong place!

bright fog
tough hill
#

I can certainly check - I may need a file sending over though

#

If not, I can add support 🙂

bright fog
#

Don't you have the game ?

#

Oh just someone saw that addon and mentioned PZ so you came to share it here ?

tough hill
#

I want to make sure that I support all .x versions fully

bright fog
tough hill
#

Sick, I'll give it a whirl now!

bright fog
#

What version of Blender is it for ?

tough hill
#

The latest

#

Should be backwards compatible too

bright fog
#

Alright

#

This is a wiki page about how we import assets

tough hill
#

Does that look right to you?

bright fog
#

Seems to look good

tough hill
#

I'll take a look at the wiki now

#

Perfect

bright fog
tough hill
#

It's not picking up any anims from the model - I'll check it over now to see what's cracking

bright fog
strange delta
#

unless you started making your own extension because you didnt like features in the default one?

bright fog
#

And most importers will work okay-ish usually for models, and won't ever work for animations

strange delta
#

mhhh

#

am i stupid

bright fog
#

Wait you idiot that's literally his extension lmao ?

strange delta
#

anyone can add extensions to the blender official repo?

#

what

#

wtf

bright fog
#

Not native to Blender

#

Anyone can upload an extension

strange delta
#

i thought those were getting added to "blender community extensions" or something not the official repository

tough hill
strange delta
#

well nevermind

tough hill
#

You have to get it approved by the devs

strange delta
#

i can vouch for your extension

#

its good

#

i literally thought it was a semi official thing all along

#

🤣

tough hill
#

Haha nah, I mainly built it for Bugsnax but I realise there's a wider need for it so I've been trying to track down any other uses cases and officially support them 😄

strange delta
#

also random question

#

now youre here

#

why are .x files from PZ getting way way smaller when converted to .fbx using your extension?

#

is .x just that bad?

strange delta
#

or are you dropping some info when converting?

tough hill
strange delta
#

old games usually

bright fog
strange delta
#

it was a popular format back in the 2000 / early 2010s

bright fog
# strange delta like 300kb -> 150kb

For example for animations, it holds the whole model and and has keyframes at every single frames (which is why importing DirectX animations kind of sucks)

tough hill
bright fog
#

We found that using GLB is supported in PZ now and provides way lighter animation file size

strange delta
#

🤣

bronze yoke
#

much better

tough hill
bronze yoke
#

we shaved like 100mb off the horse mod by converting animations to glb

bright fog
# strange delta better than fbx?

For models it was basically the same file size tho. Another good thing with glb is that it's not proprietary if I understood correctly ?

bronze yoke
#

yes glb is an open source format

#

fbx importers/exporters are notoriously inconsistent and buggy due to not being able to actually access a specification for the format

tough hill
#

I've always found it to be a pain in the arse too when there's no backwards compatability between fbx versions

strange delta
#

glb sounds nice but like.... not many softwares support it

#

even maya and stuff need extensions

tough hill
bright fog
tough hill
bright fog
#

I assume just a million keyframes lol ?

tough hill
#

It converts them down on import so I'll be creatiing an export option for project zomboid that converts keyframes and ticks back to the game's settings

bright fog
#

Also please do not provide an export option

#

Unless that's something really needed, no one should ever use DirectX ever and we specifically tell users that they shouldn't even try to do that for animations in PZ or even models, because it's an old ass format that nothing can read but old ass softwares where you need to literally type a fucking bible verse

tough hill
bright fog
#

Yea but what about the keyframes

#

These dots I'm talking about

tough hill
# bright fog Unless that's something really needed, no one should ever use DirectX ever and w...

The importer runs a merge rotation + scale + translation into one combined matrix track optimisation that assumes all channels have the same number of keyframes, but Project Zomboid bones often have 21 rotation keys alongside just 2 scale/translation keys, so the merger took min(21, 2, 2) = 2 and threw away 19 rotation keys per bone, leaving every animated bone with only two keyframes at frames 0 and 1

#

I'll send a screenshot

#

As for the export option, I'll still add it as my job is to ensure maximum compatability and this may be a requirement for other games, but it won't be labelled as "Project Zomboid" export

tough hill
#

Hi all, the .x Importer Exporter should now fully support Project Zomboid (export untested):

Changelog:

  • PZ / 3DS Max biped support: high-precision ticks option, DeclData decoder, default template emission
  • Round-trip preservation: templates, aux frames, DeclData, -XSkinMeshHeader, non-bone animations, sparse keyframe density
    https://github.com/SaintBaron/io_directx_x
GitHub

A plugin for Blender to support importing and exporting .X files - SaintBaron/io_directx_x

dull moss
#

Just for reference you probably wanna use #modeling

#

This is a more common place for code-related stuff

#

Good stuff though (I assume, no idea, haven't worked with modeling at all KekW )

tough hill
shrewd silo
#

Don't do it tho. It is easier to separate files into single animations for browsing them in the files. Unless you have 20 animations and want to save space, it's not really worth it.

#

The script on the zomboid rigs already do a lot for us.

sonic needle
sonic needle
#

Glb has this as well, quite good.

shrewd silo
#

Glb my precious...

neon saffron
#

can someone give me a guide on how to add custom interactions to already existing world props?

torn igloo
#

How to add tags programmatically in b42 to some items?

clear wraith
#

Hey guys. I’ve been thinking about creating a massive mod for Project Zomboid. The core concept is essentially this: a colony simulator where you manage not just a single survivor, but an entire group at once. Based on their individual perks, they would exhibit unique behaviors and distinct personalities, and would interact with one another. I was inspired to pursue this idea by Dwarf Fortress. I actually already have a concept drafted, but since I lack coding skills, I haven't fleshed it out in great detail yet. Do you think it would be possible to create something like this—perhaps with the help of AI tools and community forums—given that my only skills are drawing and designing game mechanics? And more generally speaking, is something like this even technically feasible within the Project Zomboid engine?

silk stag
bright fog
silent zealot
bright fog
#

I suggest using Bandits

silent zealot
# clear wraith Hey guys. I’ve been thinking about creating a massive mod for Project Zomboid. T...

Short answer: No. Longer Answer: What you describe is an utterly massive undertaking - pretty much everything that will be in the first few NPC updates. AI cannot write Zomboid mods; it can assist you, but you still need to know what you're doing and figure out the high level design... which will be an utter nightmare since you have to fight the game which is builtt for player controlled survivors and zombies only.

#

Start with an idea that is much smaller and more achievable in scope.

#

You might be able to write an addon for Bandits that does soem of what you want, that's one potential place to get some modding experience.

#

Also, if Dwarf fortress was you inspiration... what about making it as a Rimworld mod? That's already got the core structure you need for a base with unique survivors, sending your guys out on adventures, etc.

#

(And it's a lot easier to mod!)

clear wraith
silent zealot
#

If you start modding zomboid, then after a while you'll have zomboid modding expertise.

#

I'd make a note of your ideas, because they are probably going to be a lot more viable once we have official NPC support.

#

Just... don't hold your breathe.

neon saffron
silent zealot
#

The short version: when you right click on a tile the game builds the vanilla context menu, then fires the OnFillWorldObjectContextMenu event.

#

So you stick some code on that which is basically "is ThingICareAbout on this tile? If so, add some context menu options"

#

Very similar to adding to the inventory item context menu, but that is a bit neater.

glass hollow
#

Has anyone thought about a train mod?
It would be so funny if you can drive a pumpwagon along the tracks.

silent zealot
#

Might be doable. If you can disable vanilla steering, constantly scan the tiles ahead for the angle of the tracks, and use physics shoves to push the vehicle around.

shy mantle
#

Can't push vehicles around in MP unfortunately (with just lua at least). And messing with tire inflations to tilt the car only works if the vehicle is in cruise control at top speed or reversing (don't ask why tire inflation doesn't matter when driving normally). I'd say it's doable, maybe? Requires a dedicated team like the horse mod though imo if it were to come out nice.

#

You would have to make your own control scheme as well for sure

silent zealot
#

42.18 is out.

#

Some modding related stuff:

Added new Weapon Reload animations for lever action rifles and shotguns

MODDING

  • Non-base Module Recipes now work in MP
  • Fixed "Game Crash with Missing Recipe Items"
  • Improved Craft History (added cleanup)
  • Added "getModTags()", "setTags()" for CraftRecipe. Added "getItems()" for InputScript
  • Fixed File writers bug. Now it return null, when initialized incorrectly.
  • Returned Tag "FITS_CLOTHING_RACK" for items for clothing rack.
  • Added Event "SyncFactionServer(factionName, isRemove)).
    -- It triggers on any change in faction.
  • Added Texture field for Trait Script.
    -- Now you can set path to texture for Trait.
  • Fixed Mod Foraging Icon bug.
    -- Now it possible to collect mod items by Foraging.
  • Added public methods for zombie: "doCrawlerSpeed(zombieSpeed)", "doSprinter()", "doFastShambler()", "doFakeShambler()", "doShambler()", "getSpeedType()"
upbeat turtle
#

day 131 of asking for animzed 😔

dull moss
#

What can be sent over commands between client and server?

#

Like i cant send instances right?

#

Like if i got HaloTextHelper.ColorRGB can I send it over the network? xd

#

like as example

---Shows notification for delayed trait gain/loss. If it's SP client, it's displayed trait gain/loss notification to client. If it's called on a server, it sends a command to the client to display the notification. Then the client checks if notification should be displayed based on per-client mod settings.
---@param player IsoPlayer|IsoGameCharacter player to show notification for
---@param text string text to show in notification
---@param arrowIsUp boolean whether the arrow in notification should be up or down, True for up, False for down
---@param color HaloTextHelper.ColorRGB color of the text in notification
function ETW_CommonFunctions.displayDelayedTraitNotification(player, text, arrowIsUp, color)
    ---@cast player IsoPlayer
    if gameMode == ETW_CommonFunctions.GameMode.MP_SERVER then
        sendServerCommand(
            player,
            "ETW",
            "displayDelayedTraitNotification",
            { text = text, arrowIsUp = arrowIsUp, color = color }
        )
    elseif delayedNotification() then
        HaloTextHelper.addTextWithArrow(player, text, arrowIsUp, color)
    end
end
idle isle
#

there is a new bug in 42.18 where if you press ctrl+v while in debug mode it spawns a car

dull moss
#

sounds good to me

dull moss
#

rare case where meme gif applies without changing any of the words of original context

peak nymph
#

is there a way to forceStop the current player action from the server?

Basically because I’m doing my item adding on the server,l so I’m also doing the item picking logic there, and I want to stop my looping timed action if certain items are picked and given to the player

dull moss
#

you could send command to the client

#

how the command would need to look on client side idk cuz idk how to stop current action

#

but that would be a general idea

peak nymph
dull moss
#

ye then jsut send a command ezpz

robust briar
#

Just a little demo of the experience I am working towards.

Mods Used:

  • (Java) - Off-map chunk loading - allows server to force load a chunk off-map
  • (Java) - Vehicle Teleport - allows server to teleport a vehicle any distance given both src and dest are loaded
  • (Java) - admin x-ray - disable fov
  • (Java) - fly camera - move camera separate from character
  • (Java) - particle-fx - adds various particle effects
  • (Lua) - Zones - define zones with plugins
  • (Lua) - Garages - store vehicles in off-world "garage". Can retrieve with tickets.
bright fog
#

I'm sure many people will have fun with that

#

The other stuff are still very interesting tho ! I think the offset camera was kind of possible ? Jab did it a while ago fully in Lua, tho that might require reflection idk

#

The off-map chunk loading is very interesting too

robust briar
#

but I have not used ZombieBuddy for anything. I always worked from full decompiled sources an patched directly. Trying to learn this agent-based attribute based system

bright fog
#

You'll get the hang of it I'm sure 😄

robust briar
#

Did you see the cig smoking yet? With particles?

bright fog
#

I have yes of course !

#

Extremely fucking cool

robust briar
#

My fav feature so far

#

cars and campfires are cool

bright fog
#

That's why I'm excited to see this in the hands of modders, because that just looks so fucking good

#

Cars ? I don't remember that, but the campfire one I have seen it

robust briar
#

oh, if you check the vid I posted above, you can see exhaust smoke

bright fog
#

The reaction to the wing is the most impressive

bright fog
#

Oh shit I hadn't noticed the car exhaust !

robust briar
#

oh yes, in the other server yes

bright fog
#

It was so subtle lol

#

How do you generate these particles ? I mean API wise, not technical wise. Like how would us modders use it ?

robust briar
#

it leaves those weird artifacts on the floor. Not sure where those come from yet

robust briar
#

Well.. right now its all java

#

I haven't made any lua api to them yet

#

(its coming though)

#

but...

#

I register a shader
then register an emitter
then when needed, I add the emitter to world

#

I am hoping I can make it so I can dynamically load shaders in (I think I should be able to)

bright fog
#

That'd be perfect for mods

robust briar
#

so you could in a mod from lua say "create an emitter with this shader at this point"

#

then the java mod would handle the rest

#

the hard part for lua will be managing the emitters. Like if they are tied to a moving object.. it might get weird

#

For the cig, I actually look at the bone locations to find where the cig is being held

bright fog
#

I guess I could make that a project of my own to provide this kind of ability, tho I'd need a motivation of where to use it myself I guess

#

I've been meaning to try Java modding and just needed to find something to get into it

dull moss
#

127 files changed, 6851 insertions(+), 25174 deletions(-) sweaty sweaty sweaty sweaty sweaty sweaty

#

to be fair its 20k deletions cuz i deleted 2 outdated inaccessible pz versions but still

#

I'mma update it tomorrow evening and to to sleep to gather "Hello mod is broken" while sleeping and at work KekW

bright fog
#

Modding news in Modding Wiki navbar

Enjoy all the latest modding news directly in the Wiki in the top modding navbar

bright fog
#

PZ API Doc

Now shows the version of the game it is for. And updated it with the 42.18 distributions and the new Texture parameter of character_trait_definition script blocks

delicate coral
#

Does anyone know if cheat engine works in the game?

frank lintel
delicate coral
frank elbow
#

This has gotta just be a humiliation ritual at this point

delicate coral
#

First person to answer my question with a decent answer gets a 🧀.

#

🧀

frank lintel
#

No, why would it. its a sandbox game you can change just about everything why use some hack program.

frank lintel
#

I'd rather get a donation to my paypal :P Im on a diet

idle isle
delicate coral
languid dock
#

what language is this game programmed in?

quaint wyvern
#

Java with Lua scripting

#

most modding is done in Lua

unreal pewter
#

Did they remove some loot tables or change something? i thought i broke something with my distribution so i commented out my entire distribution script and its still doing this. is it just a .18 bug or something?

austere forge
#

Hi guys, my music replacement mod broke, and because of the new game version 42.18 I’ve lost ALL in-game sounds. As soon as I switch back to the original file, everything works fine. Does anyone know what could be causing this? (For context, I was replacing the music in the ZomboidMusic.bank file)

paper ibex
buoyant violet
#

kinda fun seen how bandit works so I can patch my weapons

bright fog
bright fog
silent zealot
silent zealot
austere forge
#

@bright fog @silent zealot I checked, and nothing new seems to have been added — both the original and my mod still have 317 sounds. The weird part is that even if I replace just one track, that’s enough for ALL sounds to disappear.
And this is specifically happening in version 42.18, because in 42.16 and 42.17 the mod still worked perfectly without changing anything.

#

Also theres nothing in the changelog about any new tracks being added either.

silent zealot
#

Doing a diff from 42.17 to 42.18... There's a bunch of new stuff related to vehicle sound, new entries, in Soundkey.java... no idea if those impact your sound bank at all though

#

CharacterGender is now a class. So we're just one java mod away from bringing modern concepts of gender to 1990s kentucky.

bright fog
delicate coral
silent zealot
#

Tell us how you want to cheat and we can point you to the appropriate debug feature/how to mod that in.

#

Being in java doesn't make it impossible to use cheat engine though. But a lot of things may not be stored the way you think.

odd stag
#

I have essentially no experience making mods, but how hard would it be to update BetterSorting for 42.18?

silent zealot
#

What version of the game was it last working in?

#

And what does it actually do? Does it just set the Display Category for items, or does it do fancier stuff?

#

You can set display categories for items easily; I have a personal tweaks file that does this for a lot of stuff to make it easier to sort.

#
local function NepItemParam(item, newparam)
    local x = ScriptManager.instance:getItem(item)
    if x then
        x:DoParam(newparam)
        print("NepTweaks: item updated: "..item.." "..newparam)
    else
        print("NepTweaks: unable to find item "..item)
    end    
end

local function NepChangeSomeDisplayCats()

    print("NepTweaks: one mans junk is another mans drug")
    local drugs = {
        "Base.Cigarillo",
        "Base.TobaccoChewing",
...
        "Base.SmokingPipe",
        "Base.SuspiciousPackage",
    }
    for _,drug in ipairs(drugs) do
        NepItemParam(drug,"DisplayCategory = Drugs")
    end


    print("NepTweaks: Checking identity documents")
    local IDs = {
        "Base.Badge",
        "Base.CreditCard",
...
        "Base.Necklace_DogTag_Pet",
        "Base.Necklace_DogTag_Pet_Blank"
    }

    for _,ID in ipairs(IDs) do
        NepItemParam(ID,"DisplayCategory = ID")
    end

    print("NepTweaks: taking a well earned drink")
    local alcohols = {
        "Base.BeerBottle",
        "Base.BeerCan",
...
        "Base.BeerCanPack",
        "Base.WineWhite_Boxed",
        "Base.WineRed_Boxed",
    }

    for _, alcohol in ipairs(alcohols) do
        NepItemParam(alcohol,"DisplayCategory = Booze")
    end

Events.OnGameBoot.Add(NepChangeSomeDisplayCats) 
#

So now all the Alcohol is "Booze" instead of "Food" so it's easy to shove it all into the booze cupboard. And so on.

silent zealot
#

(also, don't print every successful item change in a published mod... it's needless log spam if you're not debugging.)

#

(I kinda like seeing it in my personal tweaks though, but that's just for me)

#

you can use regexs too:

    local undies = {
        "^Trunks",
        "^Bra ",
        "^Underwear",
        "^Sports Bra",
        "^Straps Bra",
        "Piece Bottoms", -- no ^ for "white...."
        "^Briefs",
        "^Underpants",
        "^Boxers",
        "^Leia Brazzier",
        "Thong",    
    }
    local allItem = getScriptManager():getAllItems()
    for i=1,allItem:size() do
        for _,undie in ipairs(undies) do
            if string.match(item:getDisplayName(), undie) ~= nil then
                NepItemParam(item:getFullName(),"DisplayCategory = Underwear")
            end
        end
    end
#

So if that's what better Sorting does, the real work is making up the lists of what to change and presumably the mod already has that.

shrewd tide
#

Here's a question

#

How to make custom ammunition?

silent zealot
#

First: In vanilla, gun -> one type of magazine -> one type of bullet, or gun -> one type of bullet

#

So if you want variations of ammo like Hollow Point/Armor Piercing rounds... you'll need a bunch of work to make to it happen.

#

And then you'll have made a firearm framework that isn;t compatible with other firearm frameworks, so probably best to first look for what already exists.

shrewd tide
#

Nah, i need to make 9×25mm Mauser for a gun

silent zealot
#

If you want a whole new type of ammo for a new gun (e.g: KS-23 and 4 gauge shotgun shells) you just make the items, add the ammo type in registries.txt so it can be used as an ammo, and that's it.

shrewd tide
#

Anyway, it's for one Hungarian SMG (That dosen't make sense to see in 1993 Kentucky, but who cares?)

silent zealot
#

I'd consider if it's worth adding a whole new ammo type, instead of just using existing 9mm ammo

#

Zomboid is rather abstracted, and that extends to ammo.

#

Adding a new ammo pool dilutes existing loot tables, and it's just for one gun.

silent zealot
shrewd tide
#

Now, it's time for loot tables

delicate coral
delicate coral
#

So I don't have debug.

frank lintel
#

how manyt times you going to ask this?

delicate coral
frank lintel
#

so you just keep asking something off topic cuz it got noting to do with mod_development and you repeatedly aka spaming the same question over again. okay thanks.

delicate coral
#

Where do you want me to ask it?

frank lintel
bright fog
frank lintel
#

I only refered them to there Sim cuz I thought it was a mod of sorts, my bad.

delicate coral
bright fog
# delicate coral I asked for a cheat table.

You don't even need cheat engine to cheat in PZ. A cheat table is to map the memory or smthg like that right ? You seriously think the devs will give you the means to cheat in servers lol ?

delicate coral
tranquil kindle
#

Thats exacly what you are asking for

delicate coral
bright fog
delicate coral
bright fog
#

You said you want to cheat to troll your friends

frank lintel
#

this actually been going on since yesterday... I was gonna report it as spam at this point

bright fog
tranquil kindle
#

Because if you were admin and it was your server, you'd use debug, because it provides all of your stuff... You want to TROLL a server where someone else is Host/admin and you have no Admin right.

upbeat turtle
#

real

bright fog
#

@delicate coral

  • this is not the place for that
  • we are literally not going to tell you how to cheat
  • you have plenty of tools to do things you want to do, be it a mod or being admin
frank lintel
#

done

left plank
frank lintel
#

sorry had to drag ya into this but it was getting old.

sonic needle
#

that is every heart i could find

shy mantle
shy mantle
#

I too will keep adding to the list

#

OOP hit too many

sonic needle
#

HERESY

shy mantle
#

Another discord L

sonic needle
#

i cannot beleive i paid for nitro once

buoyant violet
#

hello how to cheatmod

#

spiffo noo

sonic needle
#

them anti depressant's might actually make me a nicer person. how about that

shrewd tide
#

Linking sounds in PZ

#

I feel like i should add custom sprites

#

But i am lazy

#

And plus i legit cannot draw

#

OH no

#

I put wrong tag

strange delta
#

im bored

#

anyone wanna make a mod?

shrewd tide
#

Uh, how a folder should look at B42?

rotund hazel
#

hi, I have a (hopefully) simple question about custom recipe names - I have a structure like this for my recipes.txt file (from the wiki):

module MyModule { craftRecipe <RecipeID> { ... } }

The wiki mentions that this RecipeID should have a matching translation file, Recipes_EN.txt - however some other mods I've seen use json for their translations - does that apply to recipes as well? my understanding is that the shift to json is semi recent?

shrewd tide
#

There's no contents

#

NVM i fixed it

shrewd tide
#

Hmm

#

Why does mod dosen't showing up?

#

Mod tells it's in

bright fog
rotund hazel
#

awesome thank you very much!

shrewd tide
#

NVM, it was a typo