#mod_development

1 messages · Page 332 of 1

bright fog
#

Then you can get a more advanced model, even if not yours, in the game, because you learned with less chaotic variables to make a gun

pliant cypress
#

I've literally been following every instruction trying my best to do this but othing works

terse delta
#

Thanks

rancid tendon
#

yep! so the original item exists and works totally just fine and you can equip it and all, but my copied version, whose only difference is a couple IDs as far as i can tell, instantly crashes the game as soon as the game would have to render the model (right when the progress bar for equipping finishes)

tranquil kindle
#

If the right click menu, then I'd try removing your custom module from clothingextraoption, as you already have it on top and you import Base

pliant cypress
rancid tendon
#

nah the context menu isn't causing the crash, i copied the extraoption stuff directly from the working item and it seems to work just fine--shows up in the menus, you can mouse over it without a crash, etc

bright fog
#

We're not telling you to make a gun !

#

We're telling you to make a block

#

That's it

#

And get that in the game

rancid tendon
#

it really does seem to be something with the model since the crash is on the exact frame that the pants would appear lol

bright fog
#

Learn how to get that in the game

tranquil kindle
pliant cypress
crisp dew
#

That gun reminds me of when I first started using Blender. Exported something only to realize it was HUGE compared to the other assets. That's when I learned it has a scale! 1m literally means 1 meter.

rancid tendon
# tranquil kindle You say that exact mesh works for different item though? Are you sure?

to expound as much as i can:
i am working with two mods, one is Undead Survivor and the other is MFTEOTW. i'm working with the public release of Undead Survivor to copy a couple of its items into MFTEOTW and reskin them as bonuses if you have both mods
right now the Stalker Trousers are a fully implemented, functional item in that mod, and i'm trying to copy the parts i need bit for bit to make a simple recolored (retextured) version into my mod

bright fog
rancid tendon
#

so yeah, right now there is an existing item that is 100% exactly my item as far as i can tell, but with a couple of ID changes and that's it, and for some reason that's the difference between a crash

tranquil kindle
#

In the guide

#

It's file structure is for b41 but model and texture still work

tranquil kindle
rancid tendon
#

thanks for the attempt at helping at least! it's driving me up a wall haha, i'm totally out of stuff to change that makes sense

#

a little more context for anyone who might view this conundrum and try to help:
the custom models for the items i'm copying are not kept in my mod. so far, this has been fine--i copied the stalker hood, which has a custom model, and it seemed to work just fine pointing my mod's stalker hood to the original mod's model, which to me was great because it meant you couldn't render or use the item without having the original mod installed (since the mesh wouldn't be available for it to use) and i only want these items usable if you have the original mod installed

#

so the structure and what i'm doing is:

  • copying the item script, changing the item IDs and and the clothing items to point to new ones
  • copying the clothing item xmls, renaming them to distinguish them, then generating a new guid for each one and putting them in, and then pointing them to the new textures that i'm making
  • putting the new guids and xml files into the fileguidtable
#

with this process i've created a couple of different reskinned items both from this mod and a couple others, and all of them seem to work just fine... except for this one

#

realistically, i'm probably missing something blatantly obvious because i'm picking up a project i stopped working on like a year ago, so i've probably forgotten something stupid

#

but i have strained the bounds of my consciousness searching for this blind spot and i have come up empty so

crisp dew
#

grrr.... anyone have experience with using pickupable furniture in recipes? item 1 [Base.furniture_shelving_01_19;Base.furniture_shelving_01_23;Base.furniture_shelving_01_51;Base.furniture_shelving_01_55], isn't playing nicely and the original developers weren't kind enough to associate that tile with an actual base item. :/

pliant cypress
pliant cypress
silent zealot
# rancid tendon with this process i've created a couple of different reskinned items both from t...

The error made me thing there was something wrong with the model and the way it was attached to bones (vertex weights) or the armiture in teh fbx or something... but if the model works for a different piece of clothing that's just weird. Best troubleshooting I can think of is start with an item definition that changes nothing but the item name (so a perfect copy), confirm that works, then change things one by one to isolate exactly which change causes the problem.

#

And if a perfect copy of the item does not work then we burn some sage and exorcise the evil spirits cursing your mod.

rancid tendon
#

that's literally exactly what's happening it's KILLING me

#

i started out trying to make the full retexture, but when things started breaking i kept reverse engineering it until there was no further to go

crisp dew
#

ok, so that's good to know. The game loads shared and then client LUA scripts when it boots in the main menu, (presuming you have them enabled globally).

Then after it starts it loads shared, client, and then server LUA scripts, in that order.

rancid tendon
#

as far as i can tell, i'm making an exact copy of the functional item with the only changes being in GUID/item ids so that the items don't conflict

#

but when i make that copy, inexplicably mine just doesn't work despite being identical in every possible aspect that i can tell

#

it is driving me up a wall for real

#

it's not only identical to the original item, but it's also identical in the process i used to copy it to other functional items too

#

so this is a working item having a working process applied to it that somehow produces a non-functional result

#

and it's like, everything else about the item is fine--the script seems to work fine, the item's name and stats and everything render normally in game, there doesn't seem to be anything off with it at all

#

except for the fact that putting it on instantly locks the game up and starts spamming a loop of that error :V

#
[09-06-25 13:02:33.758] ERROR: General     , 1749499353758> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..
[09-06-25 13:02:33.758] ERROR: General     , 1749499353758> DebugLogStream.printException> Stack trace:.
[09-06-25 13:02:33.765] ERROR: General     , 1749499353765> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..
[09-06-25 13:02:33.766] ERROR: General     , 1749499353766> DebugLogStream.printException> Stack trace:.
[09-06-25 13:02:33.774] ERROR: General     , 1749499353774> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..
[09-06-25 13:02:33.774] ERROR: General     , 1749499353774> DebugLogStream.printException> Stack trace:.
[09-06-25 13:02:33.784] ERROR: General     , 1749499353784> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null at AnimationPlayer.getSkinningBoneIndex line:340..```
#

here's a slightly longer chunk of the error log taken from the exact moment the error starts in case i missed anything

#

but it seems i did not

silent zealot
#

So the only difference is the item name - it's using the same model and texture and guid and clothing definition etc

#

If that still fails, put your item into the mod that the models etc are from

#

In case some utterly bizzare sequence of events makes the model break when a different mod uses it.

rancid tendon
#

oh i see! i'll give that a swing tomorrow and report back, good idea

silent zealot
#

I want to know the answer too, because everything you've done sounds exactly correct and has worked for other items.

slim swan
#

Finally rebuild that crafting menu(but only for cook)

#

i should make a framework and then go ahead to full crafting overhaul

pliant cypress
#

Does anybody know how to put a photo on a weapon and magazine

#

And switch ammunition types

silent zealot
#

re: photo: do you mean map a texture image (which includes a photo of the weapon) to the model?
re: ammo types; In the weapon script you can set AmmoType = Base.556Bullets, and AmmoBox = 556Box, and if a magazine is in use MagazineType = Base.556Clip,. If you mean how to have a weapon that uses multiple ammo types, that requires custom lua code because the base game does not support that.

pliant cypress
silent zealot
#

UV Mapping is a way of saying "the texture for this face comes from this part of the image"

#

In this Blender tutorial I will show you how to do UV Unwrapping for Beginners.
● Setup Texture Maps Tutorial: https://youtu.be/V8ZRp3J64x8
● Easy Texturing Method Tutorial: https://youtu.be/LtAE3JtCsRA

● Wood Texture link: https://polyhaven.com/a/rough_wood

● Help support the channel:
Patreon: https://www.patreon.com/ryankingart
Gumro...

▶ Play video
#

I'm sure there are much better ways, but I basicly added some seams, used "unwrap" in UV editor, then shoved all the mappings over the relevent parts of the image

#

I make the texture so it had the bits I needed, even if it's a complete hack job. Guns are so tiny in-game you don't need to do a really good job here.

supple briar
#

I did something similar with my old gun mod

#

but I cut out real guns parts and moved them into place

silent zealot
#

You can always do the vanilla weapon texture trick of "everything is either black or really dark grey so you can't tell what the texture looks like anyway"

#

My survival rifle texture looks really fancy until you realize half the faces and just randomly thrown into the flat grey squares

supple briar
#

Still works though

silent zealot
#

yeah, just grab flat areas or gradients where they work

supple briar
#

this is why you never look at the UV map, it's like the man behind the curtain

#

Though I did actually make a good UV map the other day for my new car

silent zealot
#

Then you get peopel like KI5 doing this

supple briar
#

I still don't know how KI5 does that, it's insane

silent zealot
#

and their perfect looking vehicle is all on a 512x512 texture

silent zealot
#

nice and even

supple briar
#

Personally I make all my textures at 1024 and then scale down to 512

#

wouldn't be shocked if KI5 does something similar

silent zealot
#

I'd like to know his workflow. Other than Step 1: Git Gud which they have clearly done.

supple briar
#

Maybe the model is made at a high fidelity, and then simplified once a texture has been made?

silent zealot
#

I wouldn't be suprised if they were doing something fancy to bake in texture detail for a simplified model

#

Or they may just be really good at making textures in a 2D image editor.

haughty bridge
molten cobalt
#

Hi all, I'm trying to identify a zombie corpse on the ground, if its a corpse, and if you have a range of items in your inventory, on right click, show a context menu that allows the user to interact in a specific way.

I'm having errors in relation to identifying the corpse, also an error in relation to identifying the characters inventory.

So my question is, what is the correct way to code a check on the players inventory and is it possible to identify if a zombie is a corpse?

silent zealot
#

The basic idea: you want to affect the context menu when you right click in the world, so you make a function and attach it to the OnFillWorldObjectContextMenu Event

#

We know there is a "grab corpse" options, so lets see how that checks for a corpse: ISWorldObjectContextMenu.createMenu in ISWorldObjectContextMenu.createMenu

#

"fetch" is a caching thing the world context menu does, so it can check for things once and then other functions can just checked the cached values

#

OnFillWorldObjectContextMenu has the player number as a parameter, so from there you can get teh playe robject, then getInventory(), then call whatever functions are needed to see if the items you want are in there.

#

If all that passes, add something to the context menu.

#

I don't know if that warning on the IsoObject[] parameter will be an issue, but if it seems that the context menu never finds bodies worth remembering.

#

But using the same method as "Grab Corpse" should work anywhere that the "Grab Corpse" option works.

regal umbra
#

Hi, is there a way to hook into the Exercise menu, the one in the health panel where you can do push-ups etc.. I assumed it would be a timed action but can't find any

molten cobalt
#

Thank you I'll have a play around with that

regal umbra
thin swan
#

lmao @silent zealot
- Fixed HunkZ not spawning. The world is healing.

silent zealot
#

Glad I could help!

silent zealot
#

Indie Stone stealing all my mods!

silent zealot
#

Check it out! A reason to make use of the new version folder structure!

#

The 42.9 version disables everything and replaces the Mod's options with a message saying it's disabled in 42.9 because it now makes headlights worse than vanilla.

slim swan
#

function ISUIElement:setStencilCircle(x, y, w, h)
if self.javaObject == nil then
self:instantiate();
end

return self.javaObject:setStencilCircle(x, y, w, h);

end

#

holy shit,they finally add StencilCircle

silent zealot
#

No more making squares and rounding down the corners required?

#

No more Java modding needed for high beams!

woven pecan
#

I'm trying to upload a mod to the workshop but it keeps saying the mod.info file is missing even though its right there, any ideas on why that could be happening?

bronze yoke
#

either your mod.info is not in the right place, or you have an extra folder in your mods/ folder that does not have one

woven pecan
#

this is the right file structure right?

bronze yoke
#

if you're in b41 yes

woven pecan
#

oh has it changed with 42

bronze yoke
woven pecan
#

cheers i had no idea it changed

cosmic island
#

if i wanted to test my mod

#

how the hell do i do that

#

nevermind

#

i think im getting the hang of this

#

i think my .info file was in the wrong place

#

lets see now

tranquil reef
#

I hate when people do this

cosmic island
#

okay NOW i think this will work

#

i think i followed everything in the wiki

#

fingers crossed my brown thumb to code wont mess this up somehow

#

last time i tried modding i made a 1 item mod for a game that made the game refuse to open

#

UGHHHH

#

whats wrong with this please tell me

#

i have no idea anymore

frank elbow
# cosmic island whats wrong with this please tell me

Recipes is misspelled, but more generally this file structure looks off. I'd double check what you have against what's described in the wiki—unless things have really changed while I haven't been looking, it should be media/lua (and other subfolders should be within media too)

cosmic island
#

noted

tardy otter
cosmic island
#

ah

crisp dew
#

See, this is why I made that ModTemplate project; so newbies already have the directory stucture in place. (Unfortunately my project is only for newbies on Linux...)

cosmic island
#

if only life was that easy

crisp dew
#

It's for Linux only because I don't have Windows so can't test Powershell scripts.

cosmic island
#

okay ive fixed a couple of things

#

i hope

#

lets see if it even shows up in the modlist

#

im not afraid of the code being wrong because i understand that well enough but

#

localisation

#

oh woe me

#

nope still nothing

crisp dew
#
/Zomboid/Workshop$ tree -d .
├── VNGarage
│   └── Contents
│       └── mods
│           ├── VNGarage
│           │   ├── 42
│           │   │   └── media
│           │   │       └── lua
│           │   │           └── client
│           │   ├── common
│           │   │   └── media
│           │   │       ├── lua
│           │   │       │   ├── client
│           │   │       │   ├── server
│           │   │       │   └── shared
│           │   │       │       └── Translate
│           │   │       │           ├── DE
│           │   │       │           ├── EN
│           │   │       │           └── ES
│           │   │       ├── scripts
│           │   │       ├── texturepacks
│           │   │       └── textures
│           │   └── media
│           │       ├── lua
│           │       │   ├── client
│           │       │   ├── server
│           │       │   └── shared
│           │       │       └── Translate
│           │       │           ├── DE
│           │       │           ├── EN
│           │       │           └── ES
│           │       ├── scripts
│           │       ├── texturepacks
│           │       └── textures
│           └── VNGarage_InventoryTetris
│               ├── 42
│               └── common
│                   └── media
│                       └── lua
│                           └── client

My generated directory structure, if that helps as a reference.

#

Also note, your code should be in C:/Users/YOURUSERNAME/Zomboid/Workshop

cosmic island
#

noted

#

that is probably whats causing the problem

crisp dew
#

Probably

cosmic island
#

okay that seems to have been the problem

#

now to see if the mod works

#

okay the naming sure is wrong

#

wonder whats up with that

#

okay the mod does show up but

#

it sure as hell dont work

#

it doesnt do anything

#

and its name is marked as 42

dusk tiger
#

Hi everyone!
I am a newbie in PZ modding and i'm trying to find guides about PZ modding to just start.
I already have couple of links on PZwiki, FWolfe git repo etc.
But i still have not enough information to just begin.
If you have links to useful technical resources, guides like "how to make simple mods" or any other info usefull to fresh modder, i would glad you to share it a little)

#

Thanks in advance

cosmic island
#

okay so apparently my mod.info file is empty

#

even though i definitely did fill it

#

OKAY

#

IT SHOWS THE RIGHT NAME NOW

#

okay

#

i got the mod to work by itself now

#

time to fix the item

#

or quite possibly remake it from scratch

crisp dew
#

Sometimes I wish I had mod permission so I can block/remove spam content

frank elbow
#

Next best thing is alerting the mods

#

<@&671452400221159444>

dreamy birch
#

ok omar

frank elbow
#

Ew... Not that one...

crisp dew
#

thanks

dreamy birch
cosmic island
#

okay i edited some of the code

#

lets see if it works now

#

okay once again i require assistance because i am very inexperienced

#

is there something wrong here

dusk tiger
# dusk tiger Hi everyone! I am a newbie in PZ modding and i'm trying to find guides about PZ ...

I guess i have to make my question more certain.
I have an idea about mod adds more enemies types. Now i have an working empty mode and couple of modes to see how other people did the same things.
Basically i could copy data from the mods but i want to learn how to write mods step-by-step.
So now i want to write mod that adds smth like gray cube with no animations moving by circle. And i have a problem with getting a minimum code base to mod like this.
If you could share some articles or guides how to make smth like this, i'd very apprciated.

dusk tiger
# cosmic island is there something wrong here

I have no more experience than you, so i can occasionally confuse you even more.
But if suggest that this file have a problem, i would pay some attention to Boolean values. Game parser can be case sensitive.
Also i would ensure that SurvivalGear param is allowed for this item type.

crisp dew
#

That's one of the flags in the tile; forgot exactly which one but I'll look it up after I'm done playing some B41 multiplayer.

manic forum
#

got it

bright fog
tranquil reef
#

Rip, still can't change this

#

still no idea why they did this. hard coded value for how often animals can attack if they're fighting something that's not an animal, makes hostile animals impossible without a java mod

#

or really sketchy loophole code

steady fable
#

out of curiousity, how does adding new buildables to the game work? using existing tiles of course

bright fog
#

wdym by new buildables ? Like to the building menu ?

silent zealot
#

Animal AI is still being worked on (I hope!) but asking for more to be exposed to LUA is a good idea.

bronze yoke
#

in build 41, a whole bunch of hardcoded bullshit

silent zealot
#

Not just for modders, sandbox settings for things like aggression would be good.

bright fog
#

I need to document that entity script

steady fable
#

say like you wanted to build cinnamon tiles using planks paint and some tools

bright fog
#

Waiiiiit

bronze yoke
#

hey, i changed that because it's grammatically incorrect 😅

bright fog
#

Really ?

#

Ah yea maybe

#

Does sound a bit wrong

#

Also the CraftRecipe defined in the entity is defining how to build the buildable ?

bronze yoke
#

yeah i believe so

bright fog
#

component CraftRecipe

#

Wait it has special entries

#

OnAddToMenu

#

Ok new rabbit hole to go deep into, but that's a problem for future me lol

#

This will grow hard lol

#

So did they define an entity file for every buildable ?

bronze yoke
bright fog
#

Easier said than done when there's a fucking thousand script entries 💀 💀 💀 💀 💀

#

Especially when the way they write those craftRecipe doesn't follow the usual writings of craftRecipe, like with component craftRecipe

bronze yoke
#

i mean just read the parser's source code, you'll be able to see every property and what they do rather than having to guess from the script

bright fog
#

And also parsing the craftRecipes scripts gave me most of the unique entries for the different parameters

#

Which gave me lists of what's used in the vanilla crafts

bronze yoke
#

not saying that that isn't useful too, just that it can be more precise to check the parser

bright fog
#

Tho it leads to some missing, but pretty sure looking at the source code wouldn't give me every possibilities in these cases

tranquil reef
#

Hopefully they actually read it consistently

icy night
#

Monologue system for injuries is working. My phrases suck tho lol

silent zealot
#

Check out that syntax highlighting!

bronze yoke
#

vscode loves doing this for some reason

silent zealot
#

Featuring null, null and null.

#

Can't wait for my code to fail because "is null" is all "null is fine"

#

😂

silent zealot
#

I thought it was just the usual "we hardcoded it in java", not "we override where the setting is supposed to be defined" which IMO moves that from request to bug.

silent zealot
#

Took years to create the first version of High Beams, weeks to make the java version, and now it's a simple lua mod. #progress

slim swan
#

real ninepatch came out

silent zealot
#

Either they love modders or they are doing some UI work themselves.

#

Either way, that's a good feature.

slim swan
#

i have to rewrite all my mod now

icy night
slim swan
icy night
#

Ah

slim swan
#

seems pretty good

mortal pebble
#

Hey y'all. Is there a log verbosity level higher than whatever the default is?

bright fog
#

Oooh that's the thing that allows you to extend textures in multiple directions ?

slim swan
#

yep,work like the Android 9-patch

#

in the past,i use 9 picture to make it happen

#

now,only a single one pic can do that,

#

it can save me a lot of time

bright fog
#

Ok ok that's nice

silent zealot
#

But you can add a bunch of print() statemenst to the lua, or use the built in debugger

mortal pebble
silent zealot
#

What are you trying to get more info on?

mortal pebble
#

Trying to figure out the source of that sleep freeze issue I have been running into. Given that it's seemingly happening at random, fairly infrequently, it's challenging to isolate the source.
The game basically freezes, clears out almost all of its allocated memory. No exceptions or warn / error level logs

#

The last log line is

Saving worldgen params
which (i think) should be followed by
Saving GlobalModData
which is what led me to wonder if I could get more log verbosity to figure out what kills it
anyways, all of this is kind of off topic for this channel, I did not mean to bother you with all this

silent zealot
#

Does it happen in a new save?

#

Unfortunately that sounds like stuff that will all be handled in the java.

mortal pebble
bronze yoke
silent zealot
#

Really? I'm going to have to see what other goodies are hidden in those menus

mortal pebble
#

both main / dev tabs

bronze yoke
#

press f11

mortal pebble
#

I see ! So I can configure what goes to which log level using that. Is there a way to set the console log level to TRACE then? Best I can tell is that it defaults to log up to DEBUG

bronze yoke
#

the console should log everything based on the settings you set there

mortal pebble
#

Okay I'll play with it a bit then, thank you!
Worse case I can always remap things to a different log level using what you've shown me

silent zealot
#

Here's my prediction for next mod drama resulting in DMCA takedowns:

#

that guy is re-uploading a bunch of mods with descriptions like "compression, deleted useless mods that serer never uses"

bright fog
#

Yikes

#

They disabled comments

silent zealot
#

lol that's one way to prevent questions you don't want to answer.

sour island
#

My guess is he removed all the optional mods?

#

Yeah, looking at his massive mods list he's repacking mods with options and simply removing the extra stuff. 😅

#

AuthenticZ is less than a gig

bronze yoke
#

it doesn't save any space when users have to install your version *on top of* the normal version

sour island
#

Yeah but they don't care about logic, they care that people stop complaining about how long it takes for people to join

#

Which, to be frank, the install screen does feel like there's something wrong, even if there's nothing that can be done.

#

I did a rough test a while ago, and it does seem like downloading the mods from a steam collection is faster than in-game -- but not by much.

mortal pebble
#

To be frank, "also I need to take a shit, brb!" would be a power move in a different situation

opal abyss
#

Hey everyone! Not sure if this is the right place to ask, but here goes.spiffo
I don't know anything about programming, but I wanted to try making a mod just for fun using ChatGPT. I tried to add a custom food item, but things didn’t work 100%. unhappy
Is there any video or resource that explains how the cooking system works in terms of modding/programming? Maybe that could help me fix it. Thanks in advance!

#

Yeah, that's me stressed

manic forum
#

Yeah but what didnt work?

opal abyss
# manic forum Yeah but what didnt work?

It’s a crafting system (I guess a simple one). The idea was:
New base ingredient + water = Dough → cook it = New food item.
Then, I wanted that food to work like sandwiches, where you can add cheese, avocado, etc.

The game loads the base ingredient, but I couldn’t craft anything.

crisp dew
manic forum
#

so the Crafting Recipe is not working?, can you send the CraftRecipe.

opal abyss
manic forum
#

B41 mod?

opal abyss
#

yes, I wanted to practice with b41 and then practice with b42, do they use different systems?

crisp dew
manic forum
crisp dew
#

Also yes Proux; 41 and 42 use different recipe systems

manic forum
#
craftRecipe CarveWoodHingeFromLog
    {
        Time = 1400,
        SkillRequired = Carving:6,
        tags = AnySurfaceCraft,
        timedAction = SharpenStake,
        xpAward = Carving:60,
        Category = WoodLife,

        inputs
            {
                item 1 [Base.Log],
                item 1 tags[SharpKnife] mode:keep flags[MayDegradeLight;IsNotDull],
            }
        outputs
            {
                item 1 WoodLife.WoodHinge,
            }
    }
#

That is a B42 craft Recipe

crisp dew
#

oh cool, never realized there was a button there! Dunno, clearly I've never used it.

manic forum
#

Discord tip use 3 times ` at the start and end to make a codeblock
extra: at the start Language name to color syntax

crisp dew
#

```lua
(lua code here)
```

opal abyss
#

ooh thanks! So do you recommend starting with B42? Is it easier?
I don’t think my idea is really worth much in PZ, but like I said before, it’s just for fun and maybe to learn something new.
Is there a wiki or guide where I can get an idea of how to build a mod in b42? I don’t want to bother you all with every little question

manic forum
#

1 sec

icy night
#

But yea, B42 is a lot easier

#

Recipes are a lot better imo too

bronze yoke
manic forum
#

Like my mod here:
you see the media folder has an exact copy inside a folder called 42, now my mod is useable in b41 and b42
(only cuz it doesn't use anything that changed)

#

you have to make diffrent recipes for it to work on both versions

crisp dew
bronze yoke
#

ah 😅 at least there's some sense in that

opal abyss
crisp dew
#

Also yeah,

Please do not re-upload my mod without my specific permission. I have the means and motivation to go after such violators.

From Authentic Peach, (creator of the actual mod).

opal abyss
#

Thank you very much, I think that’s what I needed. So, to make a food mod, besides the script, do I need anything else?

manic forum
#

If you implement new items i would say the Item itself and a image

tranquil reef
#

A mod I made for Build 41 has been greatly improved and released for Build 42 exclusively, yet the better one only has 20% of the original's subscribers. I thought it was just people being uninterested, but that might actually just be because of how many people are still on Build 41. Anyone have any idea if that's true?

#

I was assuming basically everyone swapped to Build 42 once unstable came out

manic forum
#

Nah the Multiplayer is just to important

silent zealot
opal abyss
manic forum
#

if they would release multiplayer the numbers would shoot up like a caffeine-fueled intern chasing a promotion.

silent zealot
#

Zomboid modding tip: it's easier without ChatGPT. 😂

opal abyss
tranquil reef
silent zealot
#

You'll spend more time fixing the AI mistakes than just copying a tutorial/looking at an existing mod/copying an existing item

tranquil reef
#

gonna need my family to stage an intervention, all I care about is getting those numbers to rise

silent zealot
manic forum
#

true

opal abyss
silent zealot
#

Plus it makes everything that are working on extra hard since they have deal with coding and testing multiplayer only to do that all over again when something changes

tranquil reef
#

It depends. They're getting things done quicker than they would be, but depending on how much they're actually making sure things work with multiplayer in the future, I'm not looking forward to the sudden 3 month hiatus where they go back through everything to make sure it's multiplayer friendly

silent zealot
icy night
#

AI is great for formatting lua, but sometimes they change part of your script without telling you

opal abyss
#

Thank you very much @manic forum , I will do it on my own and let you know the results

bright fog
bright fog
#

So it will tend to fully nuke stuff bcs for it, what you tried to write is a mistake and needs fixing

silent zealot
#

There are code specific formatting tools

crisp dew
#

I have copilot enabled by default in my IDE, and it's CONSTANTLY trying to screw things up when working with LUA.

silent zealot
#

That understand what they are doing. I'd ask AI how to use those, rather than directly asking it to format code.

#

Looks like I have only one month before I can't do any Zomboid modding for a thousand hours

bright fog
#

Ships

#

Too bad Rimworld burned too many hours for me to put even more hours in it

#

Don't have time these days in my life hahalol

silent zealot
#

Rimworld and Zomboid get me every expansion

#

I'm scared to reinstall factorio for the same reason lol

#

I'm also pretending Dwarf Fortress didn't update anything since the steam launch

#

Open ended sandbox games with mods are my kryptonite

tranquil reef
#

anyone use ZomboidDecompiler and know why this is happening?

crisp dew
#

Not I; IntelliJ can just open the .jar files natively.

tranquil reef
#

Can it also handle the recompiling part easily?

#

That's the only part I'm actually worried about, you can decompile things on a website lol

crisp dew
#

I haven't actually tried; pretty much all my work has always just been decompiling.

#

Ima gonna guess that would be a no.

#

Though it does give you the full code, so you could just copy/paste it to another file...

silent zealot
#

Not too long ago the author made improvements so now you must run the exe and it figures out where the game is installed from steam info

#

(the author is one of the people that hangs out here, but I am terrible with names and forgot who)

bronze yoke
#

it's me 😅 that's a weird ass error and i don't really know what it means

#

it sounds like it's unhappy about a jvm argument but you're not passing any

tranquil reef
silent zealot
#

Try putting quotes around the path

tranquil reef
bronze yoke
#

fwiw if your game is installed through steam, you can just run the bat

#

i think the extensionless file is a linux script

#

it's just part of the build system i use and i'm a windows user so i don't exactly know what it does 😅

#

but the bat should work

crisp dew
#

Linux binaries do usually omit any extension, so that's a distinct possibility.

tranquil reef
#

Very strange though

#

It's installed through Steam, shouldn't be any problem since I verified the integrity of files like 5 minutes ago

bronze yoke
#

there might be something messed up with your java if it's doing that

#

can you run java --version in cmd?

tranquil reef
#
java 17.0.9 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 17.0.9+11-LTS-201)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.9+11-LTS-201, mixed mode, sharing)```

Should be fine, shouldn't it?
crisp dew
#

Since you're the author, it may make sense to include that at the top of the bat file, (for diagnostic purposes like this)

tranquil reef
#

I thought it just needed any version past 17

bronze yoke
#

yeah that looks right

#

hmm that's odd

#

i see in the bat file it does call -classpath, and it does give an empty classpath, which triggers the same error if i do it manually: but the bat somehow runs fine for me 😅

tranquil reef
#

Worked CoolSunglasses

opal abyss
bright fog
#

Yea np, but we had to put out a statement regarding AI modding because we're starting to see way too many people fighting the fact they actually need to learn to be able to mod

#

Currently, AI will never do what you're supposed to do. It can speed up some processes, but it will never do stuff for you for very simple reasons:

  • it lacks data regarding PZ modding
  • giving a proper prompt to guide the AI to make what you want actually requires you to have modding knowledge in the first place
#

The wiki WILL inevitably feed AI models however and due to it growing into a very good reference to get started with modding, AI can already start to give you some results (tho reading the wiki directly sounds like a better idea)

#

In fact, it's already starting to reference the wiki when you ask how to get started with making a mod

tranquil reef
#

Recompiled my java class. Not only do animals seem to still attack on a cooldown, I reloaded my save and 1 cow turned into 3 lmao

bright fog
#

Asked a specific mod idea, it gave me something that in theory should work

I want to make a mod where the player is set on fire when out in the sun

local function burnInSun(player)
    if not player or player:isDead() then return end

    local hour = getGameTime():getHour()
    local square = player:getCurrentSquare()

    -- Only during daytime
    if hour >= 9 and hour <= 18 then
        if square and square:isOutside() then
            if not player:isOnFire() then
                player:setOnFire(true)  -- This sets the player on fire!
                print("You're burning in the sun!")
            end
        end
    end
end

-- Hook the function to player updates
Events.OnPlayerUpdate.Add(burnInSun)
tranquil reef
#

Maybe it's best I just continue waiting for TIS to fix it themselves

bright fog
opal abyss
bright fog
#

So I can try to see if I can prompt it to making the mod

opal abyss
#

Basically, the idea was to craft a new type of food: base ingredient + water (+ maybe a bowl) = dough → cook it → new food.
I wanted that new food to work like a sandwich, so you could add almost any filling.
If I could pull that off, I planned to add similar foods. Like I said, nothing game-changing—just for fun

opal abyss
crisp dew
#

sweet, lighting on tiles is simple to implement

tranquil reef
#

i don't know if this was my fault, but it's definitely a sign i'm in too deep and should work on something else

crisp dew
#

hmmm, my idea is to make a workbench with a pegboard backing that's 2 units wide; contemplating how I want to handle the container; 2-wide items still only have singular containers for each tile, each controlling their own sprites. Need to ponder if that would be meaningful to the player or if it would just be more confusing, (as a screwdriver can only go in the left side for example).

agile socket
#

Is there a walkthrough or guide somewhere about how to add in a new food item? I'd like to add grits and the ability to make grits from corn, by grinding them out with the mortar and pestle and then cooking them. All I've done in the past is modify existing items, so I'm not quite sure where to start.

agile socket
tranquil reef
#

i've seen a few mods export animations as .x, what program do they use

#

Pretty sure it costs money, but still curious

bronze yoke
#

most likely 3ds max

icy night
#

Are there any clothing items that go directly on the ear? I wanna make ear plugs but I'm no good at modelling.

#

Otherwise, I suppose I could make the item invisible on the body

crisp dew
crisp dew
#

OH, export, sorry, I read export as exporting from the game .x to Blender

silent zealot
#

Earplugs, would you even be able to see them if you did model them?

tranquil reef
#

I tried opening someone else's FBX animation, changed it around just to test getting it to work in-game, and it just didn't. So running out of options 😔

bronze yoke
#

are you just trying to learn how to put animations into the game?

tranquil reef
bright fog
#

Read this please

#

There is no point to using .x

tranquil reef
#

Is there anything that shows the exporting requirements? because I've already tried exporting my FBX animation, just doesn't work in game

#

The character does a default stand animation instead

bronze yoke
bright fog
#

Animations are very complex to get a hold off when you start

tranquil reef
#

I'll look into that. One more question though, do they auto update like models without having to leave the game?'

crisp dew
#

Hmmm, I have a feeling that there's some Java trickery going on when dealing with 2-tile items like large tables and large metal storage.

tranquil reef
#

Gonna be tweaking it constantly to make it work with a tile's depth map, so it'll be a pain to close out over and over again

bronze yoke
#

unless you're me for some reason 😅

#

as far as i know they update live for literally everyone else, but they don't for me, never figured out why

bright fog
#

If the animation is running while it updates, it can break it

bronze yoke
#

nah it's just never worked at all for me, i have to restart the game fully to get anything to update

crisp dew
#

LUA, txt, and tile definitions are synced for me when I close to menu and relaunch the game when launched with -debug. Dunno about animations though.

#

Also, why do I hate myself by trying to do complex things? Managed to get 1/2 a workbench when picking up the other half :/

bronze yoke
#

oh yeah i just meant animations, most things reload fully by returning to the menu

crisp dew
#

oh gods...... "Ohio State University has published that they want all students to have experience in using AI in their studies"

silent zealot
bronze yoke
#

lua and scripts aren't safe to reload live so they don't

#

i think specific textures do, like clothing i think does?

#

animnodes do, animations themselves do for everyone but me

silent zealot
#

textures don't even reload when you change your modlist.

#

Or at least, they don't update if a mod overrides them.

#

Thinking on it, I'm not sure I've tried updating a texture while the game is running

bronze yoke
#

from what i know it's not all or even most textures

#

the game probably caches them into sheets or something that are too complex to reload

red tiger
#

Can I load a file from my mod folder through Lua?

#

I forget if I can with the current build.

#

Not sure if different due to mod folder stuff changing.

bronze yoke
#

like a lua file? yeah, should work

red tiger
bronze yoke
#

oh, then yeah, for sure

red tiger
#

Alright. Thanks.

#

Is it in the common folder? Loaded folder?

bronze yoke
#

i forget, but iirc it only likes one of them 😅

red tiger
#

Alright. Thanks again.

bronze yoke
#

i'd bet on common since i recall complaining about it and that'd be more annoying to me

red tiger
#

Working on parsing XML and testing HTML code against WebKit.

#

Been reading the white papers for CSS models for the past few days now. x)

icy night
#

When yall have mods that need tested, do you just do that for hours by yourself or what

crisp dew
#

Or if you run a community, throw it on your private server to let your members break it before you release it to the general public.

icy night
#

Too bad I hate everybody. No community for me lol

red tiger
#

But I'm also insane and work on entire engines for mods sooo

#

Also I think that LuaEvent API got updated in this last update.

#

Reason: Internal errors for me because I modified those classes.

#

I added an async API to queue events to fire on the main thread from the render thread so I can hot-reload shaders in-game while developing my framework.

bronze yoke
#

i don't see any interesting api changes unfortunately

red tiger
#

I wish that I had access to the render thread context from Lua.

#

Always hungry for more power

bronze yoke
red tiger
#

🤔

#

They removed these events and added others.

#

Their MP is definitely being worked on.

bronze yoke
#

like 99% of the code changes this update was multiplayer stuff

#

that's why the changenotes were a lot shorter than usual

red tiger
#

Yeah. Did they blank the packets?

bronze yoke
#

i have to assume they're doing that automatically

red tiger
#

Probably comment #def checks in a script.

#

Their team has some c / cpp programmers so I'd suspect that's how they're doing it.

bronze yoke
#

yeah, emptied

bronze yoke
crisp dew
#

insert homer [pokes out of a bush, only to slowly retreat back in] meme here

red tiger
#

This is what I change in the events manager

#

(Other way around)

#

I public them

#

I then call code from the Shader object in the skinnedmodel package.

#

Invoke render thread, recompile, push queued event.

#

Shaders not present in the game's core files are not watched as assets.

#

They don't reload.

#

Honestly I wish that PZ made their vanilla code a core mod, but treated just like a mod.

#

I think that some things might work better.

#

@bronze yoke Did you ever figure out the issue with your renaming stuff in your decompiler?

#

Working on updating my decompile of LuaManager for 42.9

bronze yoke
#

nah, i have no idea if that's even the cause of the issue

red tiger
#

That's all I saw.

#

Saw some inline package calls in lines in methods that used zombie as a var name.

bronze yoke
#

that does seem like something that could happen

red tiger
#

There might also be instances where identical or compatible calls to objects or primitives could collide due to name similarity.

#

Some collisions to test / work out.

#

Try appending a number to the generated var name.

#

See if that fixes the compile.

#

(Whenever you have the time and want to ofc)

bronze yoke
#

yeah, i already ban certain names from dropping numbers (just primitives since this always results in a name clash with the type anyway) so that shouldn't be much work

red tiger
#

Hope that helps.

#

It's nice to have those numbers not be there when compiling Umbrella & Rosetta data.

#

Might be good to keep as a flag.

#

Alright. Glad I finally unborked my copy of PZ to continue working on shaders.

#

Is this the right syntax??

#
print(getModFileReader('\\shadehammer', 'media/ui/html/test.html', false))
#

Returns nil

#
String var10000 = var4.getCommonDir();
String var3 = var10000 + File.separator + var1;
#

...

#

Don't use media/

#

It already adds that in for some reason.

#

Makes sense for sandboxing but lack of documentation kills.

silent zealot
#

Especially since sometimes you do need to add "media" at the start of a path.

bronze yoke
red tiger
bronze yoke
#

yeah, that's because your file isn't in media to start with

#

shadehammer/common/ui/html/test.html

red tiger
#

Oh wait

#

When I moved it

#

I moved it wrong.

#

Thought it popped under the media folder there.

#

Thanks for pointing that out.

#

Such a silly mistake.

#

I was using VSCode drag+drop on folder movement. Guess it looked like it was in it, not next to it.

candid egret
#

I'm trying to import some .png files into a new .pack file in TileZed, but it wont allow me to. Files don't show up in the directory window, nor work if I attempt to click-and-drag them into the window.

#

I'm new at this program, so if anybody has any tips or support that would be much appreciated

bronze yoke
#

you need to put your images in a folder and select that folder

candid egret
#

tysm

candid egret
#

got it working

#

do the pack files automatically go into your downloads folder or are they located in the program

true nova
candid egret
austere bay
#

Did build 42 change poly limits on models or something? I had a working model in 41, but in 42 the model has missing gaps, and missing faces. This model worked fine in build 41. Normals / Face Orientation and UV's are all fine etc. Using a red texture to better display the weird artifacts:

tranquil kindle
austere bay
#

As far as I'm aware it is triangulated but I'll try it and see if it changes something.

#

Yeah I double checked, the model is triangulated. I did apply a modifer to see but its the same result.

austere bay
#

correct, in the character creation, also appears in the game.

tranquil kindle
#

Can you show it's XML file?

austere bay
#

Sure, its possible something changed between 42 and 41 and im missing something dumb.

#

But it seems like the model itself has something wrong with it, which is why i'm wondering if 42 maybe cant handle high poly clothing items.

tranquil kindle
#

You're missing hat mask folder line that should fix it

#

How it works on B41 I have no idea, but if you add that line, it should work

#

I mean how it works for you in B41 and not in b42 without that line still intrigues me

#

I'm on phone but I do have it

#

As a meme format

austere bay
#

np ty ill try that lol

tranquil kindle
#

Do let me know then I'll delete it

#

Some might not want to see this so I'd rather delete it once you write it, or just go to any vanilla hat XML file and copy it from there

#

<m_MasksFolder>media/textures/Clothes/Hat/Masks</m_MasksFolder>

#

Found actual line

austere bay
#

that does indeed fix it, wonderful.

#

Is there a compiled list of changes for migrating mods to 42 or is everyone just reverse engineering 42 vanilla items. I noticed 42 broke all my recipes, so that'll be fun to go through.

tranquil kindle
#

So masks are the issue then as your shoes UV probably not follow players UV maps.

austere bay
#

The texture was just for testing purposes, the uv is fine. They use a bespoke texture.

tranquil kindle
#

Recipes completely changed, models need to be all quads or Tris or you will have holes as N-gons no longer render.

austere bay
#

all gucci now.

tranquil kindle
#

That mask folder line disables that.

austere bay
#

ah okay, yeah that must be a new thing then.

tranquil kindle
#

I do have it in my guide I believe. It's on my steam.

austere bay
#

Ill have a look, many thanks

tranquil kindle
austere bay
#

yeah thats weird then, never had an issue with it before.

#

ah well I know to include it now atleast

silent zealot
#

Is there any way to programaticly adjust the attachment points one a weapon script? There are multiple WIP B42 versions of Vanilla Firearms Extended, and they are use a different scope orientation & offset to vanilla since everyone seems to want to "fix" the scope attachment point a different way.

#

If there is I'll code up a "if mod X is active then change scope attachment numbers to <new values>"

#

But I don't feel like making multiple compatibility mods to overwrite the model file.

bright fog
#

You can directly rotate attachments on a gun actually

silent zealot
#

Ah, so instead of changing the model script have something trigger after something is attached that rotate/move the attachment.

#

That would work.

#

thanks!

silent zealot
#

Looks like only a single axis of rotation is supportred.

bright fog
#

Bot that fct specifically

#

But ik he modifies the attachment pos and rot

sharp plinth
#

Hey everyone! 👋 https://steamcommunity.com/sharedfiles/filedetails/?id=3422448677

It’s been a while since I last shared an update, but I’ve been hard at work on the next version of Modix Game Panel — a modern server manager built specifically for Project Zomboid.

📦 This update isn’t live just yet, but I wanted to give a quick share what’s coming and in 1.1.2

The panel is an user-friendly server manager made for Linux servers and Project Zomboid admins which is free to use. It’s a serious alternative to legacy tools like TCAdmin, AMP, or GameCP, designed around the needs of modern gaming communities — especially those running modded servers.

dawn sail
#

Anyone working on a mod that allows to attach items to backpacks for B42 (please im beggin 😭 🙏 )

bright fog
#

You can learn modding

mellow frigate
tranquil kindle
#

You can only attach sleeping bags to my knowledge

#

There is no real benefit to "attaching" things to your backpacks beside it looking cool, as it does not really reduce its weight in same value as if it were Inside backpack

opal abyss
#

Hi guys, it's me again. unhappy
Yesterday I was reading the wiki and managed to create the item correctly. The dough is being crafted as expected, but I’ve run into a small issue: the bowl I use gets consumed in the process. 😅

I’m trying to use a water-filled bowl to make the dough, but when crafting with "water + flour + bowl," the result is correct (the dough is created), yet the bowl is lost. drunk

How can I prevent the water bowl from being consumed during crafting? I tried looking at similar in-game recipes, like when making stew, but I can only see the item properties, not the actual crafting recipe. B41 😬

rancid tendon
#

ok i got sidetracked yesterday, time to try and figure out the pants of instant death again

rancid tendon
#

because pointing it to the original def seems to work just fine

#

wondering if it was 'the model breaks when used by something tied to another mod' as you were, i also copied the model in and tried to see if it would work if the model was local to the mod but it did not

#

i still have no idea why it's acting like this or what it is that i change that causes it to arbitrarily start breaking

#

because all i do is copy the original clothing item def, swap the guids, and create a new fileguidtable with an appropriate entry and the new guid

#

which is theoretically what you do to make any clothing item and has worked like 20 previous times

#

i suppose my next step is to stop fretting over this specific item and see if i can make a different item in the same way to test if it's something specific to this model or if my workflow has somehow fucked it up, but as far as i can tell this is like i'm copying someone else's machine atom for atom and somehow my version of it is exploding violently

regal umbra
#

Probably check mods that add more foods

icy night
#

Or maybe just add a bowl to the output

#

This might be somewhat similar to your recipe craftRecipe MakeFriedOnionRings { timedAction = MixingBowl, Time = 80, NeedToBeLearn = True, Tags = AnySurfaceCraft;Cooking, category = Cooking, xpAward = Cooking:3, AutoLearnAny = Cooking:6, inputs { item 1 tags[SharpKnife;MeatCleaver] mode:keep flags[IsNotDull;SharpnessCheck], item 1 tags[MixingUtensil] mode:keep flags[MayDegradeVeryLight], item 1 [Base.Bowl;Base.ClayBowl] mode:keep flags[IsEmpty], item 1 [Base.Onion] flags[InheritFoodAge;ItemCount], item 2 [Base.BakingSoda], item 1 tags[Flour], } outputs { item 2 Base.FriedOnionRingsCraft, } }

opal abyss
icy night
#

Yes.

#

sorry, overlooked your b41 note

opal abyss
# icy night sorry, overlooked your b41 note

The solution was in front of my eyes, I had to read again more carefully, I think this is the solution, but I don't know in which order I should add it.

keep ItemType,
So you can specify an item that will not be spent on a recipe, but that you need to keep in hand for crafting.
Example:
keep Saw,

crisp dew
#

and.... your github is having a distinct lack of any actual code.

sharp plinth
# crisp dew and.... your github is having a distinct lack of any actual code.

127.0.0.1:5000 is just the default dev bind. Modix is meant to be run locally by the user, behind their own web server like Nginx with HTTPS, authentication, and firewall rules. It's not exposed raw or hosted by me it’s a self-hosted game server panel, built for secure deployment on your own machine or server as for GitHub it’s in closed testing while version 1.1.2 is finalized. The older versions are outdated since I took a break from it all. It’s not open source it’s provided as is and intended to be used that way. It might go open source later, but I haven’t made up my mind yet.

crisp dew
#

Doesn't that defeat the purpose of a code repository site like github though?

tranquil reef
solar rover
#

Looking for some help on where to start with a mod type I've not dealt with before.

Problem: Players killing zombies in piles large enough that the server loses track and items begin to dupe.

First thought Solution: Set zombie Container Limit per tile ≥ are either not loaded or deleted on creation.

Ideas?

bright fog
#

What's the dupe ?

#

What does it look like ?

solar rover
#

Items removed from the corpse appear again on the corpse if the player leaves and returns or enters interior and returns. Game seems to forget to remove the items from the contain because of how many it's trying to track.

tranquil reef
#

yooo first time on the front page (I think)

#

I knew I struck gold with the bloody footprints mod

solar rover
#

Duped items are still handed by server if they enter the same container as usual but can't run a stable'ish economy on the honor system

solar rover
#

My quick fix was to set zombie corpse removal to 10 minutes IRL to prevent a player getting a large stack before they start to be removed.

icy night
strange roost
#

How I can make animals mod?

bright fog
#

It also depends what you want to do

strange roost
#

🇵🇪

strange roost
bright fog
#

No

strange roost
#

Damn

strange roost
#

I just want add Guinea pig bored

tranquil reef
# strange roost I just want add Guinea pig <:bored:721361533665542144>

I'm horrible at figuring out how to export animations, so it's really rough for me (which is why that homunculus mod is just a retextured pig), but back when I made that it was also impossible because of a bug I believe. I recently saw a My Little Pony mod (bear with me) that seemingly uses completely custom models

#

So the bug is most likely fixed and I suggest looking into it. I will soon too, because I had like 6 animal mods I was working on and the model thing tripped me up every time lol

candid egret
#

if anyone was wondering what better icons for the gun radial menu would look like... (take 2)

supple briar
silent zealot
#

Maybe a scaled up rat/scaled down raccoon with edited mesh/texture could be a guinea pig, but there isn't a lot of info on this because it's new, unstable and the people working hardest on it are making a horse which is not done yet.

silent zealot
silent zealot
#

Also, good pixel artwork - much better than my "take blender rendering, resize to 32x32" approach.

tranquil reef
#

worms

#

currently very large, but once again, the model exporting was the hardest part. the rest will be easy CoolSunglasses

silent zealot
#

Are those worms making "baaaaa" noises?

#

Or is there a lamb hidden somewhere

tranquil reef
#

we don't talk about it

#

I wish I could remove animations entirely

silent zealot
#

It's so much easier to add animals in rimworld. "Here's a pic of it looking east, a pic of it looking north, a pic of it looking south and some xml."

#

Slightly different game engine though lol

#

#3DWasAMistake #BringBackSprites

tranquil reef
#

Even though that'd obviously be a lot simpler lol, Zomboid really did overcomplicate it. I don't blame them because they were probably trying to rush it out, but there's no need for it to be this complicated

#

Just hoping they'll make it easier eventually

silent zealot
#

Complicated & no inheritence/templating on most things 😦

tranquil reef
#

textures

#

they look very cool moving around even though they're still massive, basically just bob for an animation, and make sheep sounds

silent zealot
#

Keep them big

#

Have them grow out of corpses

tranquil reef
#

planning to extend this mod for every single insect in the game, which will be a lot faster now since I probably won't even really need to make a different model for caterpillars

silent zealot
#

Kentucky super-maggots.

tranquil reef
# silent zealot Keep them big

I first tested with a cube, then a sphere. The sphere particularly felt surreal lol. Definitely gonna be making more alien / crazy mods

#

Gross alien parasites that come out of corpses will be great. Might add biblically accurate angels

silent zealot
#

lol

#

Like Week One, but it's living out the Book Of Revelations

tranquil reef
#

I wish I knew how much I could actually impact animals through normal lua lol. I'm assuming it's really limited, but it'd take so little to do really cool things. If I could tie into feeding animals, boom, you summon God and have to keep him fed to prevent him from exploding and destroying the entire world

slate ravine
#

i havent done modding of this game yet, on a scale of 1 to 10, 10 being almost impossible in comparison, how difficult, generally, is it to mod b42 than b41?

tranquil reef
#

like 2/10 in my opinion

#

maybe 1/10. depends on the mod, some code was changed so little all you have to do is update 2 functions, some mods require tons of reworking

#

for my mods it was very easy

silent zealot
#

That's not even an issue for any tutorial that does things like "copy an existing thing and modify it" since you'll be copying the new B42 thing.

slate ravine
#

fair enough, thank you

ocean gulch
#

"LOG : General f:0, t:*> java.lang.Exception: Sprite 'location_business_office_generic_01_57' is duplicate. entity script: *" zomboid
Asterisks where it doesn't actually matter. This is my error code.
I copied the water dispenser code to my mod files and this is what I'm met with. I've already renamed it, but it seems to be erroring because it's sharing a sprite with the water dispenser? Why would that even matter? It should be a readonly file. I didn't want to prototype the entire entity while experimenting and so now my shortcut has led to a deadend.
Can I get some advice/input/workarounds?

tranquil reef
#

animal sound files are stored as events

#

can't remember how to open those

tranquil reef
#

🤨

broken oasis
#

offRoadEfficiency = 3 What does the variable affect?

icy night
#

Simple mod that allows custom colors for shouts and stuff

#

I havent seen any mods in the workshop that do this

silent zealot
#

So it can affect engine power when offroad, higher is better, but you'd need to track down all the stuff going into that lerp function to get an idea of how much it matters/how high you can go before it doesn't matter.

broken oasis
silent zealot
#

looks like vanilla uses 0.8 for "bad offroad" and 1.1 for "good offroad"

#

Oh it also affects the extra part confition loss from driivng offroad (Vehicles.lua) and again, higher is better.

broken oasis
#

you find that in the game files?

silent zealot
#

yes. I keep a copy of VSCode open with the games media folder (lua. txt, xml) and the decompiled java

#

makes it very easy to quickly search for things - highly recommended if you're into modding

#

ZomboidDecompiler is a one-click tool by Albion that will give you a nice decompiled copy of the java

broken oasis
#

Thanks , I'm just stuck on the fact that I don't understand how methods and variables work.

silent zealot
#

in general, or in a specific situation in zomboid?

#

I'm honestly not sure what the best way is to get started with programming concepts these days; I started with BASIC typed out from a book but that's a terrible way to learn, it just happened to be the easiest way to get started hake in the 80s.

broken oasis
silent zealot
broken oasis
#

...

#

I couldn't do it in that format.

silent zealot
#

There wasn't a lot of choice lol

#

the 1900s were a different era

broken oasis
#

But again, I'm talking about my first time with the API and I'm having a hard time getting my bearings

broken oasis
silent zealot
#

Having the decompiled java can be helpful when the method names are not clear

#

A lot of it is just getting used to the zomboid jank style, and seeing what other modders have done and gradually learning more

broken oasis
#

Yeah, I appreciate it. It'll speed things up.

silent zealot
#

Asking questions in here is good too, even if no-one knows the exact answer we can normally giev at least a starting direction.

#

You can refer to pinned messages in this channel if you want an idea how useful AI is when it comes to Zomboid modding. 😂

broken oasis
#

XD I have already realized its uselessness through personal experience and pictures in the clips.

#

on his advice I created a bicycle as an object and not transport and according to his idea when the character holds in his hand the object bicycle, he accelerates )

silent zealot
broken oasis
#

brilliant cover

silent zealot
#

Thanks to Reddit:

broken oasis
#

Thanks for your help, I'll keep trying.

chilly flint
#
    craftRecipe ImproveRadioRange
    {
        timedAction = Disassemble,
        Time = 100,
        Tags = AnySurfaceCraft,
        eedTobeLearn = false,
        category = Electrical,
        SkillRequired = Electricity:3,
        IsHidden = false,
        inputs
        {
            item 1 Base.HamRadioMakeShift,
            item 5 Base.ElectronicsScrap,
            item 3 Radio.ElectricWire,
            item 3 Base.RadioTransmitter´,
            item 2 Base.Aluminum,
            item 1 Tags[Screwdriver] mode:keep,
        }
        outputs
        {
            item 1 Radio.HamRadioInfBat,
        }
    }

I'm trying to port a mod to b42 but I'm struggling to get it to show up in the crafting menu.
So far the mod works but not the crafting part.

My path looks like this
mods\radio\common\media\scripts\recipes

honest sierra
#

Hey everyone, I want to use another color in the ingame map, e.g., for tunnels, subway lines, etc.

Is there a way to insert the corresponding layers using Lua? If I copy the entire file media\lua\client\ISUI\Maps\ISMapDefinitions.lua and paste my code, everything works in my mod. But I'd like to have just a short Lua file with my layers in the mod, instead of a copy of the entire vanilla file. Is there an insert command that works here?

I'm still a complete beginner with Lua files; I'd like to focus more on mapping.

silent zealot
#

Then check console.txt for any errors related to the recipe

silent zealot
#

I think you ned square brakets around all the item names

bright fog
#

You can modify specific functions easily

#

And even hook to them without overwriting them

silent zealot
#

Sir Doggy is right, copying an entire lua file is the worst way to do things and it will cause a lot of issues. Always use a unique filename for your files so the game doesn't think you're repalcing an existing file.

#

With lua alway try for a non-destructive prefix/postfix patch (aka decoration) and if that is not possible replace just the functions you need to replace.

#

With decoration multiple modders can decorate the same function, and if TIS update it your mod won't be erwriting it with old code.

honest sierra
#

Yes, I know. I took the entire file to test whether adding custom colors would work in general. My question was exactly how I could create my own Lua file from it, containing only my code, and then adding it to the game—together with the vanilla colors. So far, I've only managed to get my color to be used, overwriting the vanilla one.

#

I will look into decoration

silent zealot
#

What do you need to change/add?

honest sierra
#

I want to add own layers for the ingame map, like my screenshot above.

bronze yoke
#

the most basic change you can make is to just copy all the functions you've edited into a new file, so that you only redefine the functions that you actually modify

#

after that you should look into how you might be able to accomplish what you're doing with decoration instead

tranquil reef
#

Took me this long to realize context menu events gave you player numbers and not player objects. I've always wondered why it was "broken" lol

silent zealot
honest sierra
#

yes

ocean gulch
#

I'm only going to repost this one more time, because there are actually people online now;
"LOG : General f:0, t:*> java.lang.Exception: Sprite 'location_business_office_generic_01_57' is duplicate. entity script: *" zomboid
Asterisks where it doesn't actually matter. This is my error code.
I copied the water dispenser code to my mod files and this is what I'm met with. I've already renamed the entity, but it seems to be erroring because it's sharing a sprite with the water dispenser? Why would that even matter? It should be a readonly file. I didn't want to prototype the entire entity while experimenting and so now my shortcut has led to a deadend.
Can I get some advice/input/workarounds?

silent zealot
#

Looks like you can decorate it so you call the original function, then run some code of your own:


MapUtils.BlackshotOG_initDefaultStyleV1 = MapUtils.initDefaultStyleV1
function MapUtils.initDefaultStyleV1(mapUI)
        MapUtils.BlackshotOG_initDefaultStyleV1(mapUI)
        local mapAPI = mapUI.javaObject:getAPIv1()
        local styleAPI = mapAPI:getStyleAPI()
        local layer  = styleAPI:newPolygonLayer("my new layer")
        layer.addfill blah blah blah
end
honest sierra
#

I'll give it a try right away, thanks for the support!

silent zealot
#

and put require "Maps\ISMapDefinitions" at the top

#

To make certain the other file gets loaded first.

bronze yoke
silent zealot
bronze yoke
#

as for workarounds, i guess just make a copy of the sprite? or use a different one if you don't want to go through the hassle of spritesheets

ocean gulch
# bronze yoke entities cannot share sprites because objects with that sprite are automatically...

I still don't follow. What do you mean two candidates? There's only one sprite, I'm confused as to why when an entity wants to be built it doesn't just copy, or reference preferably, the sprite sheet. We can have multiple water dispensers on the screen, after all. What you're saying implies that each sprite can only be used by one object. But then we can make as many of those objects as we want. That just screams "wrong" to me. Like..something was coded incorrectly? IfeellikeImtakingcrazypills.gif

bronze yoke
#

when an object with that sprite loads, it is automatically converted into an instance of the entity that uses that sprite

#

so there can't be two kinds of entities that use the same sprite

mellow frigate
#

In mathematics, a bijection, bijective function, or one-to-one correspondence is a function between two sets such that each element of the second set (the codomain) is the image of exactly one element of the first set (the domain). Equivalently, a bijection is a relation between two sets such that each element of either set is paired with exactl...

honest sierra
tranquil reef
#

Another work of art

#

Side quest complete, back to making actual animals. I just had to know it was possible

bright fog
#

The modding Discord is working on a horse mod in fact

bright fog
bronze yoke
#

all the people who spread misinformation about animal mods being impossible around the time b42 came out didn't even try

#

there's not really anything weird or special you have to do

tranquil reef
#

As good as a freakishly tall Minecraft villager being forced into a zombie survival game can look I mean

ancient grail
#

and great job btw i looks awsome af

tranquil reef
tranquil reef
#

I was in a French one at some point, never heard of any others

dusty flint
#

Attempting to add these recipes into a mod, but whenever i do it basically deletes/disables all of Sapph's cooking items.
Sapphs as well as more smokes are its dependencies, and the mod only has this one script in it. Does anyone know what the issue is?

#

(B41)

bronze yoke
#

it deletes the items from another mod? is there a filepath conflict?

dusty flint
#

I dont think so? Define filepath conflict.

#

If i activate the mod containing my txt, the stuff from Sapphs is basically disabled, despite being enabled.

bronze yoke
#

if two mods have a file with the exact same filepath (e.g. Mod1/media/scripts/myScript.txt and Mod2/media/scripts/myScript.txt) only one of them will load, depending on load order

#

other than that i can't imagine why a script file could have such a dramatic effect on another mod

dusty flint
#

Different filenames, would maybe putting my txt into a folder in scripts theoretically fix a filepath conflict?

bronze yoke
#

if the filenames aren't the same that's not causing it, but it is good practice to use modname folders (or anything else you can reasonably expect to be unique) to avoid unexpected conflicts

dusty flint
#

Understood! Im still clueless to the issue

hidden wren
bright fog
#

Not sure what you mean

hidden wren
#

some mods work for both build 41+ and b42+, im curious if thats possible with this mod in particular

#

if its not possible to make the mod with both file paths for builds 41 and 42, is it at least possible to recreate a mod like this for b41?

as it is a b42 mod only

#

I just needed to confirm this with the PZ community/modders whether its possible or not before I continue looking into it

bronze yoke
#

it doesn't look like it does anything you couldn't do in b41

bright fog
candid egret
#

i just got back into project zomboid modding, and now that this is done, i can finally switch back to B42 and play some Week One, lmao. Click the link above for all the info you need about the mod, and the full showcase of all moodles and statuses

vast palm
#

@elder palm Sorry for the ping, but I saw you disabled the B42 ForageDefinitions stuff in the changelog for More Traits. I posted a potential fix for the line 132 error twice on the mod page. (once in the bug error subdiscussion)

Is this fix not enough, or did they break it even further in the last patch? (sorry if this sounds hostile, was not intended)

elder palm
vast palm
#

good to know, hope it clears up the issue =)

elder palm
# vast palm good to know, hope it clears up the issue =)

Found your comment.


in the lua/shared/Foraging/ToadTraitsforageDefinitions file, I replaced

table.insert(forageSkills, skillDef);

with

table.insert(forageSystem.forageSkillDefinitions, skillDef);

and the error disappeared. I'm not quite sure if that fixes everything related to that error, but it's at least progress```

Really just that simple of a fix. Man now I feel stupid. 
I'll push an update.
vast palm
#

it's okay, it took me a while to figure out what broke. I had to do a lot of looking around too, but that seems to be it, though I didn't do too much indepth testing =)

hidden compass
#

When I create a pack file, I will see “_0” after the image name.
This is an overlay image for tile, but it was not there before.
Is there any way to avoid the “_0” at the end?

bronze yoke
#

the number is the offset in the tilesheet

#

i don't think you can avoid it

hidden compass
#

However, I was able to create it without “_0” before, even though the same tool/procedure should have been used...

#

Sorry, my simple mistake.
I was able to achieve this by turning off this checkbox.

autumn bluff
#

is this where i can ask for help making a mod?

#

my mod is just adding a new hoodie, but i cant get it to show up in the mod list

#

it is intended for B42

ocean gulch
#

What is your file structure and location? That's going to be your first clue.

#

My first huge hurdle was figuring out that the workshop format is different and has a different place to put the files.

autumn bluff
ocean gulch
#

Outdated tutorials and poor "ai overview" responses from google led me astray

autumn bluff
ocean gulch
#

inside contents folder make a folder called "mods" put all that in it

#

Now

autumn bluff
ocean gulch
#

ModName/Contents/Mods/NameOfMod

#

so one more folder

#

I know this sounds stupid, but it works

autumn bluff
#

is that not what i did?

ocean gulch
#

yeah, you did

#

sorry I was typing and checking my format and didn't really take the time to see your last screenshot

autumn bluff
#

ah

ocean gulch
#

I think a common folder is required in b42 in the modname/contents/mods/modname folder

#

so you should have 42 and common in that

#

mine is empty, but it's supposed to be content for "any version" of your mod

#

But I also don't know if that works for b41, cause I haven't actually been modding on that version

autumn bluff
#

its for b42

ocean gulch
#

(Y) You should have everything you need for it to SHOW UP in the mod list now. Actually booting without error is up to you unless you come back for more help. Cheers

autumn bluff
#

it shows up now yus

#

ack

#

yeah it instacrashed

#

any assistance?

ocean gulch
#

I'm not even seeing the error? Maybe windows ate it

#

When did you crash? At worldgen, by chance?

#

The following LogTypes are disabled: Try enabling all of the logtypes again for the crash report. Worldgen is on your ignore list.

#

clothing log is also disabled, and that's what your mod does. so I'd enable that at least too

autumn bluff
#

yeah it was because i overwrote the clothing_jacket file lol.

#

progress made

#

but the item is broken

ocean gulch
#

You're out of my wheelhouse now. I've not done clothing. I'm in the fluids and recipes world right now.

autumn bluff
#

ack

#

this pops up when i click "inspect"

#

this when i try to wear it

autumn bluff
#

OKAY ITS ALL FIXED

#

almost

#

theres a masking issue with the snout

autumn bluff
#

fixed!

#

thanks for the help @ocean gulch

ocean gulch
brave bone
#

Anyone knows what is the pushing the zombie in the java docs,I see two one for a moving object and game character, if my common sense tells me one is for collision(bump) and other is collision(push).

isPushableForSeparate
public boolean isPushableForSeparate()

Overrides:
    isPushableForSeparate in class IsoMovingObject

isPushedByForSeparate 
public boolean isPushedByForSeparate(IsoMovingObject other)

Overrides:
    isPushedByForSeparate in class IsoGameCharacter
silent zealot
#

Looking at the java, the functions exist in IsoMovingObject and get extended by IsoPlayer and IsoZombie... but they are never used anywhere.

ocean gulch
#

probably because nothing is actually checking if something is pushable or not. It just pushes (sends a signal to the object it wants to push) and the entity (the object in question) checks itself if it needs to stop (like if it hits a wall). These 2 specific methods would be best in a scenario for an item that changes from being pushable or not so it can check itself before it wrecks itself after being directed (pushed). That's my take.

brave bone
#

Oooh, thank you. Will check it again later. o7

ocean gulch
#

Now I assume "collideWith(obj)" does something like gathering both objects positions and velocities. But that's like.. movement collision. Not "player pushed the zombie"

#

I'm at a loss with a once over. shrug

bright fog
ocean gulch
#

Gotta love automatic embeds

bright fog
#

That's how I check whenever a zombie was pushed or stomps

bright fog
#

Yea I ctrl A to select all and replace but it embed it haha

#

It's a useful feature, just annoying in this scenario

#

And thank god I'm Workshop mecha or I might have received a block for 10 minutes lol

ocean gulch
#

It's annoying everytime. Should be default off with a checkbox option to enable.
Both of my links had embeds a few minutes ago and I didn't get a block. shrug
But yeah, I see that code and it definitely matches up with the behavior I'd expect. I'm assuming "doshove" is the magic sauce

bright fog
brave bone
bright fog
#

And that's what this code does

frank elbow
#

You can suppress embeds before sending by wrapping a link in angle brackets (i.e., <https://github.com>)

bright fog
#

This is the embed we are talking about

#

👀

frank elbow
#

Yes, that's the embed you can suppress

bright fog
#

No that's different

#

THIS embed

frank elbow
#

There is only one meaning of embed on discord lol

#

It's the same if you do it that way

bright fog
#

Not my fucking failed rick roll

frank elbow
#

Unless you're referring to masked links & not embeds

bright fog
#

???

#

Hyperlinks

frank elbow
#

Yeah embeds are the little content preview that shows up

bright fog
#

Yea ik

frank elbow
#

I fail to see the confusion so I'm just gonna repeat that putting a link in angle brackets makes it not embed & leave it at that lol

bright fog
#

yea but again that wasn't the subject of the discussion

#

If you copy a link, then select text when writing and paste, it will hyperlink it

#

Which is what we were talking about when we said "embed"

#

So while it's the embed of links you were talking about, we used the word because that technically can be used to describe what is done to these links

#

Didn't think it would take a whole convo just to figure out it's what we were talking about

frank elbow
#

Those are called masked links

#

But now I see the confusion, thanks

terse delta
#

Is there any ways to create shortcuts of liquid system?

#

I need to make a few functions, like "Refill <> from <>"

bright fog
#

A context menu option ? Of course you can

terse delta
# bright fog Wdym ?

For example, I have 10 buckets of water and 100 bottles. In order not to pour one liter a hundred times, I want to make a context function for liquid transferring

#

The user interface is horrible if someone needs to apply patches like that

whole bolt
bright fog
#

Just involves making a custom context menu option, and doing the proper checks to move fluid

#

Proper indications

#

There's a lot of things you can do UI wise too

bronze yoke
#

it'd be an annoying amount of ui work

terse delta
#

Thanks, I'll get to it. I'm currently researching lua and zomboid api

bronze yoke
#

context menus aren't sufficient for this kind of thing

bright fog
terse delta
#

I think of using sink function

#

Like fill

bright fog
#

The issue is how flexible you want it to be

bronze yoke
#

you'd need a menu that lets you select both inputs and outputs

terse delta
#

Just click on the item you're going to pull from

bright fog
terse delta
#

and then choose from falling menu where the output goes

bronze yoke
terse delta
#

just like sink does

bright fog
#

Move fluid from <> to <>

#

For both combination

#

Nothing magical, nothing fancy here

#

And then suboptions to that menu, like move 1 l, move half, move a quarter

#

Idk

bronze yoke
#

ok i thought you were doing something way more advanced would this even be faster than vanilla at that point 😭

bright fog
#

Depends what you want to do and how flexible

terse delta
#

Speaking super basically, I want to add this function to water-filled items in context menu

terse delta
bronze yoke
#

i think they want you to right click one item and it gives a drop down of containers you can pour it into

#

like b41 had

bright fog
#

What's the item you right click ?

#

Aaah

terse delta
bright fog
#

So like, right click a container with fluid, and have a transfer option to: list all other empty containers ?

terse delta
bronze yoke
#

yeah when i first played it i thought it was really weird b42 didn't have that anymore

terse delta
bright fog
terse delta
#

Everything about fluids and crafting is harder and tedious to management

bright fog
#

Depends how you want to handle containers with already fluid in them tho

#

Due to mixing

terse delta
bright fog
#

You can easily list every empty containers, or list every fluid containers, ignore full ones

#

Make a transfer function for fluid, tho you might need to take into account how two fluids mix

bronze yoke
terse delta
bright fog
#

So could you pour to a container with another fluid, and if so you need to consider if both can mix

terse delta
#

there's no way you can justify it

#

It is not even IWBUMS

#

to have issues like that

bright fog
#

The fluid UI might already use a bunch of different functions to check for stuff

bronze yoke
#

they stopped using the term IWBUMS, it's still the same level of unfinished

bright fog
#

The fluid section too they had to rewrite almost everything, and even then you can easily see some parts were missing, or not yet replaced and used old systems

bronze yoke
#

i think this is definitely a disappointing lack of QOL but keep in mind that UI is usually the thing you want to finish up last

bright fog
#

Making a UI is sooooo long

#

That if you had to remake it every time because you changed major sections during the dev of the unstable, you'd have to lose all your time again on making the UI

terse delta
#

Thanks for help, i'll get to developing this mod. Won't be able to post it in a while tho, since my steam account is unactivated 😛

bright fog
#

So the crafting system currently has a fairly decent UI but it still receives major changes like the research thing

bronze yoke
#

also, zomboid's ui api sucks and nobody likes writing it LOL

bright fog
#

It can be tedious

#

You basically have to tell it everything regarding the UI

#

And there's not system in place for default values and shit

terse delta
bright fog
#

So you need in the design of your UI to consider every available resolutions of the game players will play on

bronze yoke
#

XUI is a big improvement, i think it's actually pretty nice to use

bright fog
#

Rocco ? Rosco ?

#

I don't remember

crisp dew
#

"Designer": > what do you mean I can't just use Photoshop? I have to actually write code? (/s)

terse delta
#

double c

bright fog
#

The guy that keeps releasing great UI mods these past weeks

terse delta
bright fog
#

That could likely be in the work haha

#

He's been working on the crafting menu rn