#mod_development

1 messages · Page 383 of 1

willow tulip
#

I mean you can do that with the other folder too, you just need to stop naming your save data 'modoptions' like everyone else.

sour island
#

I dont think it would trigger checksum though if you are creating new files-- the problem is steam wont delete them either

willow tulip
#

not that I did that once, totally nope, totally didn't cause weird conflicts with another mod, nope....

sour island
#

that's one reason superb survivor was so bad

willow tulip
#

I feel like the checksum would be broken if it allows the client to have/execute .lua files that arnt part of the server -_-;

sour island
#

if you mean the cache/Lua folder- yeah... if you aren't naming your file uniquely you're going to have a bad time

#

I've made a serverside mod that way lol

#

had the lua loadstring from a local file only the host had

willow tulip
sour island
#

oh yeah that too

willow tulip
#

that was.. an interesting learning experience lol.

#

'what do you mean my mod has a conflict with totally unrelated mod? hows that even work?'

dull moss
#

hahaha

#

made me lol irl, thanks

buoyant violet
#

It's normally a low poly model. With more details in the texture

buoyant violet
#

man im falling in love with substance painter. just my second day messing around with it, but just by adding shadows the model already gets much better

#

to think that originally I had it like the first picture in zomboid

#

jajaja

hexed arrow
#

Sorry for the question but where is an items name defined? \scripts\generated\items and media\clothing\clothingItems don't define the item name itself?

bright fog
#

They use translations

hexed arrow
#

thanks a lot

foggy epoch
#

I want to start getting into map modding, where do i start what program should i use?

#

Creating my own tiles, textures etc

worn cloak
#

Is there an event for the vehicle radial menu? I want to disable it for a specific vehicle

bright fog
#

I don't think so

main pasture
#

Might be more optimized to wrap around ISVehicleMenu.showRadialMenu or ISVehicleMenu.showRadialMenuOutside and use ISVehicleMenu.getVehicleToInteractWith or similar to get the vehicle and return early with the specific one

bright fog
#

Agreed

worn cloak
#

This is what worked:

    ISVehicleMenu.showRadialMenuOutside = function(playerObj)
        local vehicle = ISVehicleMenu.getVehicleToInteractWith(playerObj)
        if vehicle and vehicle:getModData().isExtractionHeli then
            return
        end
        origShowRadialMenuOutside(playerObj)
    end```
Thanks!
olive lance
buoyant violet
olive lance
#

fair enough + it's the zombie apocalypse

buoyant violet
#

yeah thats why I exagerated the details haha cuz in game once you lower the resolution you barely see them

frank lintel
#

Where are the settings kept for like windows sizes and stuff. or are they hard coded or in some files somewhere?

cloud marten
#

Good day everyone,

I’ve been working on improving the game’s visual quality by upscaling assets to 2× resolution. After being told it wasn’t possible, I decided to investigate further.

I analyzed the engine, developed a Java agent that enables support for higher-resolution textures at runtime, and reverse-engineered the .pack format. Based on that, I also created a Python packer that allows repacking textures in higher resolution.

Game load with custom .pack file, but there still no scaling so textures are to big but not cut to tile size!

Still work in progress, just wanted to hear what you think about it
texture size for comparison

#

plan is to upscale all assets x2

paper ibex
bright fog
paper ibex
#

One of those documents was even linked in the modding wiki, which I hadn't noticed had AI-generated documentation at first. The person even contributed to the JSON schemas for translations, and yet provided this kind of documentation, which rips directly from the modding wiki, adding some wrong information on top of it.

Be careful what documentation you might find when they are shared around, and please just stop doing that. It's useless, serves no one, and lacks proper knowledge.

LOL . You are kind of write your own standards and serve to the closed community . I now regret spending so much of my three months on this channel and server

bright fog
paper ibex
#

good luck

#
  • extra stuff that were wrong

I don't ever force you to validate those files, you are kind of content eater whos want read any single public related to blame just in this discord server

#

Good. Gonna remove that repo for kind of don't feed and repost, because this is not useless with me anyway.

#

And talking about A.I in this server is kind of useless because no one gonna get anything out of it.

#

Lack of communication

bright fog
#

"But AI is good man, you don't get it, you won't even learn or listen anything regarding it"

A classic, because I never expressed AI is bad, just that I have yet to see any proper demonstration of it when it comes to writing documentation that won't output bullshit. Like I mentioned in that section about AI docs, we didn't just have one case of AI documentation in the past month, but 2 or 3. Sure it can give something good, but all of the people who made AI docs have given us a documentation that is basically what's already on the wiki, but worse and with extra bits of misinformation

So no I'm not going to trust any documentation that is written with AI because every time I've seen such documentations it was bad, and the person who made it is just as bad of a person

sour island
#

Calling Sim of all people a content eater is rich coming from someone who ripped public information to plagarize it.

bronze yoke
#

most of which sim wrote 😅

sour island
#

Honestly this dude has been nothing but combative when he's clearly in the wrong

bright fog
#

I specifically didn't name drop you or anyone who's at fault with the AI documentation in the summary because that is not necessary. But since you kindly asked to be shat on, here you go then, be a clown in front of everyone since that's so much what you desire for

#mod_development message

sour island
#

Of all the reasons to be against AI the sycophantic fans that abuse it are #1

bright fog
paper ibex
#

😂

#

This is the pin point ?

bright fog
#

Like ffs I myself use AI for some stuff but I have the decency of noticing when it outputs crap most of the time. No respect, no decency, selling services to basically steal mods

paper ibex
#

selling services to basically steal mods

This is just your thought

#

With the kind of bla bla bla

bright fog
#

That's not my thought

sour island
#

No reason to continue talking to this guy- honest to goodness goalpost shifter, the more you bring up the more the convo will get derailed.

bright fog
#

That's TIS thought too 💀

sour island
#

Just stick to 'you plagiarized work poorly'

paper ibex
#

😂

sour island
#

It's not easy learning a skill, one day you'll work up the maturity. 👍

#

Imagine bringing up a cursory mention of something you did indignantly and getting roasted tho. technoYikes

bright fog
#

Oh yea I found that back of you ripping off the Procedural distribution page lmao

paper ibex
#

See 😂
You are the one whos don't want to listen the explaining, so why do I need to explains

#

Just to be simple, we can ignore each others in this discord server

sour island
#

Just type into chatgpt how to get out of this conversation

sour island
paper ibex
#

Am i talking to you?

sour island
#

Yes

paper ibex
#

Do we know each others?

sour island
#

regretfully

#

🤏

bright fog
sour island
#

Ego most likely

paper ibex
# bronze yoke most of which sim wrote 😅

The first, I mention the source, let others know that can be wrong
The seconds, I said I can remove the content in case any org author are pissed off.
The 3rd, Ive removed that repo already, because after time, this repo is useless with me.

Good luck.

#

I'll never read pzwiki/Modding again. Thanks for everything lol

bright fog
#

We all know you will if you continue modding. But you do yours man

#

I mean, you can continue to feed the wiki through a LLM, get shitty docs and mod upon that, you'll get success I'm sure of it

sour island
#

plagiarizing*

#

He didn't just keep docs for his own reference, he shared them here - got called out fairly quickly, and began deflecting and acting offended. Now he's trying to play up the victim when he brought up the mention of someone using AI to generate and submit documentation.

Instead of taking it on the chin and growing up he rather whine.

#

Not even mentioning that he's selling commissions using AI, not to mention round-about'ing updating on other's works regardless of license for money.

#

'it doesn't count because I wont publish it' means he knows what he's doing lol

paper ibex
#

For others whos worried about stealing mods

Once you make the mod public, anyone can get the code and mess with it in secret.
Who knows if the guy you talked to is stealing your code without you knowing? 🤨
Even if he hasn't written anything suspicious on his Ko-fi page. 😂

I wasn't
Not me
.. lmao

P/S my ko-fi page can be something not cool to you, but i'll not explain to strangers. Hopefully, TIS can provide me some guidance

sour island
#

Obtuse, deflect, appeal to authority. nice

bright fog
#

You're turning things around again, no one said anything about reading others code, learning from it etc
The problem is proposing people to steal other creators their content to change it without their authorization. Money or not, that's not allowed and that's about it, there's no arguing around it shrugs

sour island
#

Its not a crime if no one knows and its something boring and innocuous.

#

But also let me advertise and share that I did it with out the justified ridicule 😤

hexed arrow
#

How can I save a costum variable that is persistent across one save file? Or point me in the direction of saving/loading stuff

sour island
#

You can use the (global) modData object, or use filewriter to create txt/json

hexed arrow
#

thanks! will look into it

sour island
#

Depends what the variable is needed for-- if it can be tied to an item/player you can save it to their respective modData

hexed arrow
#

you guys are saints

bright fog
hexed arrow
#

is global mod data tied to one savefile or globablly accessable?

bronze yoke
#

it's per save

hexed arrow
#
    local playerData = getPlayer()
    modData = playerData:getModData()
    if modData.myString == nil then
    modData.myString = "Hello World old Data"
    end```
Is this an okayish approach?
#

it works so theres that

dry stone
#

Weekend modding spree... My usable-computers mod now has the full range of parts from 8088 through 586. Working sound cards, SCSI hard drives, MCA expansions, VLB expansions, an early CD ROM drive, mouse support (finally) ... tons of stuff. 176 new items so far.

#

So much polish and bugfixing this weekend. The big new thing, I'm finally at a point to add in games and software to find/install. I've got a bunch of installer disks in game now. Just need to round out the library

vivid imp
#

What the hell, this is awesome

#

Doom in PZ when

hexed arrow
#

this is insane

vivid imp
#

Can it load any era appropriate rom, theoretically?

hexed arrow
#

can you make the zomboid alpha be part of the loot?

vivid imp
#

That would be legendary (but even the tech demo is way more advanced than an old rom)

sour island
#

I was wondering about importing a gba emulator into pz 😅 -- this is awesome

dry stone
# vivid imp Doom in PZ when

I got DOOM working a long time ago. Literally the second game I got working lol... the first was a much simpler old side scroller

#

There's an old video of me playing it somewhere in this channel... If you find it, I've since totally fixed the framerate. Then nerfed the framerate like crazy depending on how crap the PZ computer you made is.

vivid imp
#

This is incredible

#

I'm not sure the legality, but if you were to put era appropriate roms around this mod would be massive

dry stone
#

Oh, it's not ROMs... This mod simulates old DOS computers from the early 90s

#

You can run ancient spreadsheet software on em too

vivid imp
#

Oh my god ive never wanted to run excel inside of PZ more than I do right now

dry stone
#

Back then, people distributed games on dial-up bulletin boards "BBS". You'd download a "shareware" game over a super slow modem

vivid imp
#

Its well before my time but I've heard of BBS

dry stone
#

And.. this mod is born from me being super nostalgic

vivid imp
#

I'll keep watch, this stuff is super cool

dry stone
#

shareware is a dead concept these days. Someone makes a game, releases episode one as totally free - send checks to my address for episodes 2 and 3!

vivid imp
#

I think that shareware has been replaced by open source projects

dry stone
#

Even DOOM was shareware. Episode 1 is totally free to this day. I an distribute it with the mod legally

vivid imp
#

If I may be so bold, I don't think thats necesarially a downgrade

dry stone
#

Kind of ... they are very different, but they're both things meant to be free and shared, so the philosophy does align in a lot of ways

vivid imp
#

I was not really around during the shareware days so you are more of an authority on that than me haha

dry stone
#

There have always been games, though. The PC was never as big as like, the original NES... But it had plenty of good games.

vivid imp
#

I want to run Bryce3D or Windows Movie Maker inside of zomboid now

dry stone
#

Well, keep in mind, it's just DOS emulation. Windows 95 onwards is much later, modern programs won't work at all

vivid imp
#

True, true

dry stone
#

If you're not familiar with DOS, it's "Disk operating system" by Microsoft starting in like the early 80s... Back when Bill Gates pulled a fast one on IBM and started one of hte world's biggest monopolies

#

tons of good history there.. and the mod will touch on whatever it can

#

every part has a description

hexed arrow
#

is it possible to make http calls via lua scripting? like returning json weather data?

dry stone
#

I didn't look that hard, but I didn't find anything myself

#

I had to sync computers with the server, though, not reach outside URLs.. so I ended up doing it through normal server commands.

willow tulip
quasi jewel
#

No clue how i'll make textures for this, I am not a texture guy

#

But i've always wanted one of these sports motorcycles in PZ to fit my character

dry stone
#

Well.. Got this working. One Must Fall 2097

#

Made by the same company that does Unreal Engine today

willow tulip
sour island
willow tulip
#

Wow, there was only 1 change in the files realistic car physics edits in B42.16

#

oddly enough, it was to carController.java too, not itemContainer

dry stone
mellow frigate
#

Civilization was made in 1991. Wink wink.

sonic needle
#

so i converted Warframe 1999 stuff to PZ

quasi jewel
sonic needle
languid saddle
#

Hello, extremely new modder here, just wondering if there was a way for a mod to point at entire groups of clothing such as "dresses" or "pants" without needing to add a tag to every piece of clothing.

vast pier
# languid saddle Hello, extremely new modder here, just wondering if there was a way for a mod to...
--Get the item's BodyLocation
local ClothingType = item:getBodyLocation()
if ClothingType then print(ClothingType) end

--Says Meow if it's the right clothing type
if item:isBodyLocation(InsertClothingType) then
print("meow")
end
    {
        DisplayCategory = Clothing,
        ItemType = base:clothing,
        Icon = DressShortWhite,
        BloodLocation = ShortsShort;Shirt,
        BodyLocation = base:dress,
        ClothingItem = Dress_Knees,
        FabricType = Cotton,
        Insulation = 0.15,
        WindResistance = 0.1,
        WorldStaticModel = Dress_Short_Ground,
        Tags = base:canbedyed;base:ripclothingcotton;base:noragdoll,
    }```
Script's body location should give what you're wanting.
Idk what exactly it would output when doing getBodyLocation() so the code uses a placeholder
#

do know there's more than one body location for dresses

#

depending on the dress type

#

This may pick up items that aren't dresses, but this is probably your best bet without manually tagging items afaik

#

If you're wanting it for recipe purposes, you would need to add an onTest to the recipe function to check the input item since you wouldn't be able to filter without manual tagging

#

something like

function OnlyDresses(item)
--Function cancels if the checked item isn't a piece of clothing. Used to skip stuff like scissors or any other ingredients.
--This always returns true if not a clothing item.
if not item:getItemType() == "clothing" then return true end

--Returns bool
return item:isBodyLocation(DesiredBodyLocation)
end
#

I'm typing all this code off of memory in discord, so take it with a grain of salt

prime haven
#

should i countinue on this?

buoyant violet
vivid imp
#

Absolutely

hexed arrow
#

can modData save float values?

bright fog
dapper wigeon
#

I wanna start modding zomboid,
the first mod I wanna create is a whole martial arts system.

#

where should I start-

brisk falcon
#

Now hear me out a zombie mod that progresses zombies to be stronger overtime is a common and popular idea but nobody figured to just use the vanilla settings as the basis

Zombies start at their weakest slow shambler

a determined amount of time passes between 1day or 1month limit 12months

The zombie upgrades into a fast shambler

You could use this to have zombies evolve over time increasing in intelligence speed strength and defense making the game actually harder later game to make the overwhelming amount of ammo you have.

Could also add a toggle to have them start forming larger groups and traveling further and attacking doors windows etc without any player presence

brisk falcon
#

necroa is NOT the same thing i just said

#

Necroa is a mod that is inspired by plague inc.

#

This would be a vanilla friendly evolving zombies mod

bright fog
#

Yes and it makes zombie stats evolve

brisk falcon
#

Yeah it also replaces most of their visual features with new ones

bright fog
#

it also makes zombies go in groups

bright fog
brisk falcon
#

Id rather stick to the vanilla+ style

bright fog
#

Now that it doesn't do perfectly what you want, that's your problem 😅

bright fog
brisk falcon
#

Necroa and the last of us zombies mod change lots of things and are incompatible with so many mods

#

same thing with the upcoming resident evil mod

#

and cry of fear

brisk falcon
#

Mostly clothing and model mods with some clipping sometimes

#

Because they are all using custom models

bright fog
#

They don't. The way I designed TLOU Infected allowed it to not be incompatible with clothing mods

#

Only clickers and bloaters had custom "models" (it's just a body clothing), and even then, Clickers still could use clothing mods

brisk falcon
#

Maybe its just newer clothing mods are being too different

bright fog
#

Not really no. Only clothing that add body texture clothing can cause problems

#

Those will no appear on the zombies with body clothing (not visually, they will still drop)

#

But that's about it

brisk falcon
#

I still think using the vanilla zombie models for a mod like this would be compatible with more things

#

And also it would have some cool sandbox options

bright fog
#

It will just be visually different, that's about it

brisk falcon
#

Like having a DECREASE in their functionality overtime

#

start as sprinters and get weaker over time

#

Walking dead style

#

Based off the comics specifically

#

where zombies used weapons and ran and climbed and could open doors and windows

#

But later on cant

#

They also had cordination and variants in the comics

#

like lurkers etc

#

Random zombies is becoming outdated slowly

bright fog
#

So anyway, why are you here ? Is it to learn how to do that yourself or just for a mod idea ?
Because I can tell you directly that your mod idea will get lost, no one will implement that unless you pay

brisk falcon
#

So i think we need a new vanilla+ zombie management mod

brisk falcon
#

Im just here to talk about it

bright fog
#

It's definitely possible to do, and wouldn't even be very hard to do

brisk falcon
#

Because it could be played on vanilla style modpacks

brisk falcon
#

That i enjoyed alot

bright fog
#

Random zombies doesn't change zombie behaviors

brisk falcon
#

It lets you change them

bright fog
#

It doesn't, it changes their stats, not their behavior

brisk falcon
#

In a more detailed way then what u can in vanilla

bright fog
#

Necro and TLOU Infected objectively change way more

#

Even CDDA zombies

#

Or you could even put Bandits in there since NPCs from that mod are zombies

brisk falcon
#

Its cool how b42 has screechers in a way

#

In the vanilla

#

They are sort of just sprinters that scream now

brisk falcon
#

I mean it is fun if you do a youtube series

bright fog
#

It's definitely the best NPC mod out there

brisk falcon
#

But long term it causes alot of issues

#

It is the best

bright fog
#

I mean maybe the Knox Expanded mod too is better

brisk falcon
#

Just not the most stable since its basically turning zombie ai into a whole new thing

#

Soon tho it can do some insane things with the new npc api's coming in b43

bright fog
#

There has been zero confirmation that it is still planned

brisk falcon
#

I mean we can hope

#

Npcs probably wont be around until b45

#

But the devs still responded to me when i asked what features they WANT to add in b43

#

Which i actually want to make mods for b42 - b41

#

For

#

They want the basics of npc tools in game

#

and dismemberment

brisk falcon
#

They seem to really love this idea lately

bright fog
#

There's already basic NPC tools

brisk falcon
#

Id love to make a dismemberment mod

brisk falcon
bright fog
#

Spongie had started work on that

languid saddle
brisk falcon
#

They seem to have some pretty crazy ideas for how detailed they want zomboids human npcs to be

#

If i was them id just add fallout style raiders

#

but they want full on factions

#

and stuff

#

And to be able to have npcs group up and use basic tactics to kill zombies or the player

#

Not just shoot at player or zombie

#

or to seek out zombies or players to kill

#

More like do their own thing until you stumble upon them or zombies get too close to them

#

it actually reminds me of the monsters and npcs in zelda

#

Specifically breathe of the wild

#

They have their own little lives even off screen

#

Just to add immersion

brisk falcon
#

i hope that game redoes their npcs soon

brisk falcon
#

So they could be changing how detailed they want them to be

#

But last time i heard anything about how npcs could work it was that way

#

That mod DAY ONE tried to sort of do that

#

it was a fun mod

#

But really crazy

#

I still think the horse mod should just be polished up and added to the base game

bright fog
#

It won't

brisk falcon
#

Maybe the models touched up some to fit the base vanilla a little more like minecraft did horses

bright fog
#

The model and textures already fit the base game

brisk falcon
#

Theres always something a little off

bright fog
#

Feel free to say what then

brisk falcon
#

The saddles look very strange

#

The tails are very tiny and not fluffy at all

#

and just dont look like horse tails

#

The actual gameplay of the mod is very very high quality

#

I just dont like the saddles or tails they use

#

And the textures for them are higher quality then the horses

#

It just looks very

#

Conflicting

brisk falcon
bright fog
#

You're aware there exists different saddles right ?

brisk falcon
#

Im well aware there are different kinds of saddles

#

That basic saddle there just looks very weird

#

the one in these images

#

looks nicer

#

But the tail is still so silly looking

#

And the bag texture is so high quality it doesnt look like any of the bags in the base game

bright fog
#

That's the exact same saddle, just a different color for the saddle

brisk falcon
#

Its probably just the texture i dont like then

#

it doesnt look like leather

#

It just looks very

#

Strange

bright fog
#

Feel free to propose a texture change on our GitHub then

brisk falcon
#

I do think the tails need a change tho

#

They look very tiny

bright fog
#

Same thing, feel free to edit that yourself and do a pull request

brisk falcon
#

Most horses

#

Have much longer tails

#

Down to around their ankles

#

The tail just sort of looks very small

#

Well i guess their knees technically

#

horse anatomy is very weird

#

I actually do like the horse model alot

#

Just the tail gives off a very not horse tail vibe

#

Like

#

One of those dogs with a tiny tail because it was cut off

#

As a puppy

bright fog
#

Again, for the third time, if it bothers you that much, feel free to edit that in the mod itself and do a pull request

#

Contributions are welcome

cunning haven
#

Hello, i need help with a function that i stole from "More Traits", im a bit stuck here, dont know codding at all, no much idea of what im doing:

I used "SecondWind" trait as a base.

The idea is to set endurance back to full everytime it goes below 90%

But its not working:

function stamina()
     local player = getPlayer();
    local stats = player:getStats()
    local endurance = stats:get(CharacterStat.ENDURANCE)
    
        if player:hasTrait(CustomTrait.mugen) then
        if endurance < 0.9 then
            local infi = { endurance = 1.0 }
            
            if isClient() then
                sendClientCommand(player, "CustomTrait", "UpdateStats", infi)
            else
                stats:set(CharacterStat.ENDURANCE, 1)
            end
        end
    end
end

 Events.EveryOneMinute.Add(stamina);

I get the classic:

Tried running on singleplayer, get a error:

    Stack trace:```
willow tulip
cunning haven
#

Yes

#

One sec

#

CustomTraitRegistries.mugen = CharacterTrait.register("CustomTrait:mugen")```
willow tulip
#

is it placed in 'media'?

cunning haven
#

Checks out?

I did a few traits for b41, still confused on the new way

cunning haven
#

"Scripts" goes as follow:

{    
    character_trait_definition CustomTrait:mugen
    {
       IsProfessionTrait = false,
       DisabledInMultiplayer = false,
       CharacterTrait = CustomTrait:mugen,
       Cost = 1,
       UIName = UI_trait_mugen,
       UIDescription = UI_trait_mugendesc,
    }
}```
#

Apparently the problem really starts at checking if the trait exists, but how do i do it then?

willow tulip
#

CustomTraitRegistries.mugen != CustomTrait.mugen

bright fog
#

yea this

#

Also CustomTraitRegistries = {} is way too generic of a registry name

#

You better change that if you don't want to cause problems in the future with your mod

#

I suppose that's the name of your mod tho

willow tulip
#

Yeaaa, thats a good way to bulldoze other mods. Either make it more unique or at least use the less problematic version of CustomTraitRegistries = CustomTraitRegistries or {}

bright fog
#

I suppose that could do it, but that's only if other modders do that too 😅

#

So that's a bit of a fake solution

cunning haven
#

I thought it had to be "CustomTraitRegistries" for it to work

bright fog
willow tulip
#

No, its just some global name you use

cunning haven
#

And i thought that i should refer to the trait as how it is registered "CustomTrait.mugen"

bright fog
#

No, that's the id you gave it

#

You need to refer to the variable that holds the trait registry

cunning haven
#

Ok one sec

bright fog
willow tulip
dull moss
#

^

#

@cunning haven

cunning haven
#

Lets go back a step, im not getting any of that.

If i register it like this then:

#

The module goes like this:

bright fog
#

Yes, that is you

willow tulip
#

Also you don't need to require the registry, ETWRegistry is a global in the above code

cunning haven
#

But how do i refer to the trait on the function then?

    if player:hasTrait(X.Y) then
dull moss
#

ye true

bright fog
#

And you store in a variable in a global table

willow tulip
bright fog
#

HoginsTraitRegistries <-- global table

#

mugen <-- variable in the global table

#

So HoginsTraitRegistries.mugen

cunning haven
#

Like this then?

if player:hasTrait(HoginsTraitRegistries.mugen) then?

bright fog
#

Yes

cunning haven
#

Bruh

#

I dont know how you guys do it.

jesus you people are wizards

#

I was bashing my head against the wall for so long now

bright fog
cunning haven
#

If only did i knew how it worked...

But yeah, looking back, what a huge slip up i made

willow tulip
#

(note the quotes)

#

now we use actual registered objects, so that you can't accidently typo player:hasTrait("CustomTrait.nugen") and then spend hours wondering why it always returns false after you alerted to the bug.

#

Becaause as you have seen, if you typo the object name, java goes kaboom.

cunning haven
#

I dont really get it, but it seems like a good step

#

By the way, on debug, when you get those infinite popping errors

#

Like this

#

Why don they show up?

willow tulip
#

check your console.txt in c:\users\username\zomboid

cunning haven
#
    java.lang.NullPointerException: Cannot invoke "Object.equals(Object)" because "this.id" is null at BodyLocation.isId(BodyLocation.java:69).```
#

It is from a old mod that i had that broke on 42.13

#

You know what, im a fuckin moron, nevermind

#

I was doing some rocket science back then and it broke my mod, only now i noticed:


group:getOrCreateLocation(ItemBodyLocation.get(ResourceLocation.of("leg:penguin")))```
#

This was crashing the game

digital osprey
#

hey guys i cant get local mod data to work for me in MP, should i switch to global mod data or just cut the losses and rewrite the save/load functions using filewriter?

#

or perhaps mysterious 3rd option

willow tulip
digital osprey
#

so i cant bypass the server for a UI mod to save packet limits?

willow tulip
#

nope

digital osprey
#

filewriter it is

willow tulip
#

is this a UI mod that changes nothing gameplay wise?

digital osprey
#

not for other players

willow tulip
#

Use mod options

#

(And maybe sandbox options that restrict what mod options are valid)

digital osprey
#

i will need to update item lists during gameplay, mod options supports that?

willow tulip
#

item lists as in?

digital osprey
#

tables of base names

willow tulip
#

If your updating it during gameplay, do you need to save it? what kinda data are you storing?

digital osprey
#

its a loot filter, i want to track what people add during gameplay

#

and dynamically sort

willow tulip
#

ah, then you prob want it saved per-server differently...

#

Id recommend players mod data or just command packets or something.

digital osprey
#

nah i need it local thanks for the help tho

#

unwanted list setting sends enough packets as is

vast pier
#

Is there an easy way to make it so you can consolidate different drainables into each other

bright fog
#

Isn't there a merge function ?

#

I remember something like that

vast pier
#

Why does the normal pot version not have the pour on ground option

    {
        DisplayCategory = Material,
        ItemType = base:drainable,
        Weight = 2.0,
        Icon = Pot_Water,
        Tooltip = Tooltip_FixItems,
        UseDelta = 0.05,
        ReplaceOnDeplete  = Base.Pot,
        UseWhileEquipped = false,
        StaticModel = CookingPotRice_Ground,
        WorldStaticModel = CookingPotRice_Ground,
        Tags = base:hasmetal;base:glue;SaltysSurvivalAdditions:Adhesive;SaltysSurvivalAdditions:LiquidAdhesive,
        SoundMap = DumpContents EmptyPot,
        ConsolidateOption = ContextMenu_Merge,
        PourType = Pot,
    }
item ForgedPotAdhesive
{
    DisplayCategory = Material,
    ItemType = base:drainable,
    Weight = 2.0,
    Icon = Pot_Forged_Rice,
    Tooltip = Tooltip_FixItems,
    UseDelta = 0.05,
    ReplaceOnDeplete = Base.PotForged,
    UseWhileEquipped = false,
    StaticModel = CookingPotForged_RiceGround,
    WorldStaticModel = CookingPotForged_RiceGround,
    Tags = base:hasmetal;base:glue;SaltysSurvivalAdditions:Adhesive;SaltysSurvivalAdditions:LiquidAdhesive,
    SoundMap = DumpContents EmptyPot,
    ConsolidateOption = ContextMenu_Merge,
    PourType = Pot,
}```
#

wait is it because there's two spaces in ReplaceOnDeplete

#

if so, that's so dumb

#

no because the casein saucepan also has that double space and can be poured

#

It's literally just the Base.Pot ones ?????

#

everything else pours out correctly

#

Oh something is wrong with ReplaceOnDeplete = Base.Pot, ??

#

what ??

#

I’m so confused

vast pier
#

It properly turns into the Pot when I use debug mode to set the Delta to 0

#

but doesn't provide the pour option ????

bright fog
#

Isn't the pour option only for food items ?

lofty frigate
cloud hawk
#

Do you guys think it makes sense to have fictional characters available on radio for in-game communication? If there is engagement, I'll create a quest system + skill learning through this

hexed arrow
cloud hawk
#

In practice, I use AI to have the communication done, so literally anything is possible

#

There is a basic karma system implemented. With enough karma, you could ask the (currently only) character available, that is an electrical engineer, to teach you how to use generators, for example

hexed arrow
#

How did you implement AI?

cloud hawk
#

Well, it was far harder than I expected. Initially I thought of using a java mod, but then I just created a relayer system that delegates the processing to a 3rd party application

#

The radio communication is still a bit flaky. I use a naive broadcast system and replace scripts at every pulse. If there are users, I'll fix/improve it

hexed arrow
#

That is insane I thought network calls Like this are Not possible?

#

Sorry Im very new to zomboid lua modding itself

cloud hawk
#

It's not possible indeed. I had to hack my way through xD

hexed arrow
#

So you fetch the data from an external App?

cloud hawk
#

Yeah, I created a relayer that will do the network stuff

hexed arrow
#

Thanks a Lot!

#

Very inspiring stuff

cloud hawk
#

Also made the API very easy to call from other mods, who wants to build on top of that. Just call this guy here and you're inside the system

https://github.com/codx-dev/doom-frequency-mod/blob/1b219f67169df9119dca2920976cff3110e1efab/DoomFrequency/Contents/mods/DoomFrequency/42/media/lua/server/00_DoomFrequency_Broadcaster.lua#L91

GitHub

A Project Zomboid radio enchancement tool. Contribute to codx-dev/doom-frequency-mod development by creating an account on GitHub.

hexed arrow
#

Are we allowed to have .exe files within a workshop upload?

#

I suppose not

cloud hawk
#

I'm not sure @ terms of service level, but technically speaking you can put anything there. The user will have to execute it manually anw

#

What I did was publish a python package that will do the magic. Since it's all open source, it's verifiable that I didn't put any malicious code there

#

So I don't need to bundle the whl package inside the mod (tho the first version had the whl file, and it was published to steam)

hexed arrow
#

True and it looks awesome, I want to try to make something similiar now 😄 Maybe a small program that retrieves and writes json sporadically and zomboid reads it, two way should also be possible like this

cloud hawk
#

Yeah, it works on my machine xD

hexed arrow
#

Asynchronous “multiplayer” is awesome. Like rimworld trade mods with other players 😄

cloud hawk
#

Yeah something like that. I was thinking smth like a cross-server radio communication, but I think it would kill the roleplay a bit

hexed arrow
#

Yeah but I see lots of possibilities

#

How long did you work on it?

#

For it to be playable

cloud hawk
#

Hmm didn't rly count. I struggled a lot to onboard, but after I understood the system, I think like 3 days? Not sure tho

#

Spent a lot of time onboarding and understanding the thing

#

Community here was very helpful tho. Whenever I had questions, I posted here and got very fast replies

hexed arrow
#

I’m always impressed about all the niche knowledge here

cloud hawk
#

This whole thing is more of an experiment too. I want to see how the AI thing performs and scales. Was thinking of implementing a MCP server to handle private convos scheduling, but that was too much overkill xD

hexed arrow
#

Small steps

silent zealot
# vast pier Why does the normal pot version not have the pour on ground option ```item BaseP...

Looking at the code that controls this in ISInventoryContextMenu:

        if not instanceof(testItem, "Literature") and ISInventoryPaneContextMenu.canReplaceStoreWater(testItem) then
            tests.pourOnGround = testItem
        end

So 1) you can't pour out a book and 2) this function:

ISInventoryPaneContextMenu.canReplaceStoreWater = function(item)
    if item:hasTag(ItemTag.NO_POUR) then return false end

    if item:getReplaceOnUse() then
        return true
    end
    if instanceof(item, "DrainableComboItem") and item:getReplaceOnDeplete() then
        local itemType = moduleDotType(item:getModule(), item:getReplaceOnDeplete())
        return ISInventoryPaneContextMenu.canReplaceStoreWater2(itemType)
    end
    return false
end
#

PotForged has CanStoreWater while Pot does not. But Pot is IsCookable while a forged pot is not.

#

So not sure it's falling back to those.. I think Replace onUse was supposed to become replaceondepelete?

vast pier
#

well idk if it inherently requires a pour type, but it normally works with items that have replaceondeplete

vast pier
silent zealot
#

try using teh lua console to manually check item:getReplaceOnUse() for a pot and forged pot

#

try equpiing it in your main hand and print(getPlayer():getPrimaryHandItem():getReplaceOnUse())

#

and print(getPlayer():getPrimaryHandItem():getReplaceOnDeplete())

#

maybe a print(ISInventoryPaneContextMenu.canReplaceStoreWater(getPlayer():getPrimaryHandItem())) just to be sure.

wintry tree
#

Does anyone know if there's an event when the player eats something?

#

Oh, Twincrows food allergy traits might tell me. Gonna look at that mod.

digital osprey
#

good morning, i looking at adding b42 compatibility to my older mods, what would be the correct folder structure so i dont break it for all the ppl still using it on b41?
mods/Modname/42 for the b42 version and
mods/Modname for the b41?

silent zealot
#

I don't know if there is an event, but there will be a timed action for eating.

#

Note you also need mods/Modname/common

#

It can be empty, but it has to exist.

digital osprey
#

ah yea its there thanks for reminding

#

its for files shared between versions right?

silent zealot
#

I think translation files -> json is the only other structure change, but obvioulsy the content of scripts/recipes/etc needs to be redone and any lua has a good chance of needing updates.

digital osprey
#

yeah i already did the update not that many things needed maintenance

silent zealot
#

yeah, this idea is you can put stuff like models/texture into common so there are not three copies when you have /42, /42.13 and /42.16 folder.

digital osprey
#

and they added the function i needed so i no longer need the zombie folder to override the class either

digital osprey
#

b41 had no way to query an item for metal contents

willow tulip
digital osprey
#

i found some functions

#

lemme dig them up

willow tulip
#

Yea, that arnt used and the info isen't defined yet in items, AFAIK

digital osprey
#

yep inventoryitem, hasMetal() and getMetalValue()

#

all i needed was hasMetal really as its a check for putting unsuitable items into the microwave

willow tulip
#

Yea, getMetalValue() isn't actually used AFAIK

digital osprey
#

oh fair, i only really quick tested with a spoon and it got correctly marked using hasMetal

willow tulip
#

right now the game looks at if (item.getMetalValue() > 0.0F || item.hasTag(ItemTag.HAS_METAL)) {

#

so its using the HAS_METAL tag

digital osprey
#

i see, so in theory it should work in the microwave case for all items that cause the fire right?

willow tulip
#

Hu, they have started adding MetalValue's to items now... 391 results for it.

digital osprey
#

good timing for me to update haha

willow tulip
digital osprey
willow tulip
#

Some weird tidbits though:

#

Microwaves are explicitly forced to not hasMetal() so you can safely put a microwave into a microwave.

#

Also, it recurses into containers to check for metal

#

so a backpack doesn't have metal, until you put a fork into it

#

No wait.. only the isoStove version of hasMetal does that, nm

#

hasMetal on an inventoryItem does not recurse

digital osprey
#

i need to do some weird testing

willow tulip
#

Heres the isostove version:

#
private boolean hasMetal() {
        this.hasMetal = false;
        if (!this.isMicrowave()) {
            return false;
        } else {
            int size = this.getContainer().getItems().size();

            for (int i = 0; i < size; i++) {
                InventoryItem item = this.getContainer().getItems().get(i);
                if (item.getMetalValue() > 0.0F || item.hasTag(ItemTag.HAS_METAL)) {
                    this.hasMetal = true;
                    return true;
                }
            }

            return false;
        }
    }
#

reading it a little more apparently it always returns false if its not a microwave (but is isostove)

#

inventoryItems is just ```java
public boolean hasMetal() {
return this.getMetalValue() > 0.0F || this.hasTag(ItemTag.HAS_METAL);
}

digital osprey
#

i wonder if some deployables count as metal but wont get caught by the inventoryitem function, all deployables are inventory items when in inventory right? i remember seing them in script manager i think

willow tulip
#

Anything in the inventory is an inventoryItem

#

Or at least derived from it

digital osprey
#

yeah ill need to test with those i cant believe i didnt try putting a microwave in a microwave

willow tulip
#

yea I misread the code, apparently its testing if the item itself is a microwave and refuses to ever return 'hasMetal' if its a stove

digital osprey
#

oh its only 5 capacity vs 10 weight

willow tulip
#

so... I guess you should be able to put a stove into a microwave safely? or something I dunno lol

#

Looks like its not an isostove while its in inventory though, sad

digital osprey
#

yea it wont fit either way, unfortunate

vast pier
#

retexturing my gun mod

#

How much detail will be kept is unknown, figuring out stuff still

#

Will definitely be scaling down the texture

#

maybe not even tbh, as I'm remembering how many objects the singular texture file is texturing

#

will test how it looks in game tomorrow and go from there, going to bed now

willow tulip
#

@torn igloo Yea that lack of recipe hiding in B42 really annoys me too -_-;

#

B41 had an isHidden or something but it got lost in B42

#

I tried for a day to hide recipes in B42 and only found 15 new ways to horribly break the crafting UI

dull moss
#

it has to be CharacterTrait

#

you know i wrote this to say that you're incorrect but then I realized that they indeed rolled out this like 2 minor versions ago

#

felt like so much longer

#

wasnt it 42.13

willow tulip
#

yet another 'lets break all the mods' update.

#

I really wish they could like, schedule the mod breaking changes to occur on one update instead of.. every update.

#

(though I guess B42.16 wasn't bad)

silent zealot
#

At least keep the known-breaking updates to 42.X releases, not 42.something.2 which they did once.

willow tulip
#

@silent zealot there are ways to edit recipes via Lua, but yea the tag thing is very valid

#

Iv previously asked they move the tag cache build to later (after the global mod data event)

tacit dove
#

Hi guys, anyone knows how do you make a second option for wearing clothes? Like being able to wear a pilot's helmet with visor down/up?
I wanted to add an option to wear my modded hazmat with helmet on/off. What should I do? Will it need another item coded, with its own stats (for example, the clothing area so it does not protect the head), how to link them to each other if so?
Many thanks to whoever answers or even points in the right direction to move.

silent zealot
silent zealot
#

The short version is you make two completely separate clothing items and add a "this can turn into = that" and optionally "text for turning into other form = translate string"

silent zealot
#
    item HoodieDOWN_WhiteTINT
    {

        ClothingExtraSubmenu = DownHoodie,
        ClothingItemExtra = Base.HoodieUP_WhiteTINT,
        ClothingItemExtraOption = UpHoodie,

    }

    item HoodieUP_WhiteTINT
    {
        ClothingExtraSubmenu = UpHoodie,
        ClothingItemExtra = Base.HoodieDOWN_WhiteTINT,
        ClothingItemExtraOption = DownHoodie,
    }
#

And the other stats change too (model, clothing slot, coverage, neck protection, etc.)

#

You can do more than two choices in a loop (The Frockin' series of clothes sometimes have 5 options, that loop back to the start) and some of those also have a menu for sleve length though that might be done in lua.

#

Also, that means one shirt is 15 different items for 5x various levels of unbuttons & 3x sleeves rolled up.

tacit dove
#

Yeah, makes sense

silent zealot
#

Because the author is insane... but I appreciate the results of his insanity.

tacit dove
#

Well... That level of dedication is something to be appreciated

true holly
silent zealot
#

Hmmm... You could combine clothing swap with @hexed arrow 's approach to animating items to do a marvel superhero armor transformation item.

#

Which sould not fit the tone of Zomboid at all but would be cool.

#

And Superheros vs Zombies is a genre! Just... not a very popualr or common one.

tacit dove
silent zealot
#

Hazmat suit with helmet up/down is a much more sensible idea.

digital osprey
#

how does one get the player object server-side having the nick reference (the one above your head/login), i am using this but getting nil errors in server console, while foodItem:getChef() prints the nick correctly.

local player = GameServer.getPlayerByUserName(foodItem:getChef())
willow tulip
#

also note there is: getPlayerByUserName and getPlayerByRealUserName

silent zealot
#

GetChef returns a string, so I'd assume it's the crafter's name.

#

But it may be the character name, not the player name

digital osprey
#

it prints the nick above my head, also i checked them both in decompile, real user name should take the nick only and username has the option for both

#
 public static IsoPlayer getPlayerByRealUserName(String username) {
        for (int n = 0; n < udpEngine.connections.size(); n++) {
            UdpConnection c = udpEngine.connections.get(n);

            for (int playerIndex = 0; playerIndex < 4; playerIndex++) {
                IsoPlayer player = c.players[playerIndex];
                if (player != null && player.username.equals(username)) {
                    return player;
                }
            }
        }

        return null;
    }

    public static IsoPlayer getPlayerByUserName(String username) {
        for (int n = 0; n < udpEngine.connections.size(); n++) {
            UdpConnection c = udpEngine.connections.get(n);

            for (int playerIndex = 0; playerIndex < 4; playerIndex++) {
                IsoPlayer player = c.players[playerIndex];
                if (player != null && (player.getDisplayName().equals(username) || player.getUsername().equals(username))) {
                    return player;
                }
            }
        }

        return null;
    }
willow tulip
#

wtf at playerIndex < 4

silent zealot
#

there's also getPlayerByRealUserName()

willow tulip
#

oh its per connection

#

still weird.

silent zealot
#

yeah, that one!

digital osprey
#

so it should be that one and i have a mistake somewhere else? 🙂

willow tulip
#

Could be.

silent zealot
#

put some crafted food in your main hand and see what print(getPlayer():getPrimaryHandItem():getChef()) outputs

digital osprey
#

when my function runs, it prints the getChef correctly

#

but in local console

#

not sure about the server 1 sec

#

no prints GoDziO as well

#

getChef returns a string this takes a string i dont get it

silent zealot
#

try print(getPlayerByRealUserName("GoDziO")) and print(getPlayerByUserName("GoDziO"))

#

I pet one of those wants the character name

#

Or something weird

digital osprey
#

no, error

#

hmm

silent zealot
#

print(tostring(getPlayerByRealUserName("GoDziO")))

#

To handle nulls

#

or maybe toString

#

one of those

digital osprey
#

on both btw

#

it shouldnt matter if its the only argument in the print

#

tostring in lua

silent zealot
#

I know it shouldn't, but it also should not be able to cause an error.

digital osprey
#

i tried in any case and error 😄

#

could it be cause im admin?

silent zealot
#

I doubt it.

#

Maybe getPlayerByUserName does not work on the server, but that would be super weird

digital osprey
willow tulip
#

(as its scanning connections, 99% sure it only works on server)

digital osprey
#

both, but in MP on server

#

this logic is after an isServer() check

#

but the chef print is before

willow tulip
#

so what error are you getting?

#

getPlayerByRealUserName isn't used in the LUA btw.

#

in the java its used like IsoPlayer p = GameServer.getPlayerByRealUserName

#

try the global getOnlinePlayers() and then scan the ArrayList returned for a player that matches

#

I don't think getPlayerByRealUserName is exposed to LUA

tacit dove
#

I must say:
I am so happy that I've decided to join this server. I really got the help that I needed to figure out how to make mods and what I'm doing wrong.
Thanks guys for being so supportive and helping towards the beginners in mod-making. I appreciate your help and am sure that many others do too

digital osprey
#

sorry for the delay, the error broke all of my stoves had to reset the world, this is the server console:
LOG : Lua f:1320, t:1775569915929, st:1,970,734,344> Chef=GoDziO
ERROR: General f:1320, t:1775569915930, st:1,970,734,345> KahluaThread.flushErrorMessage > -------------------------------------------------------------
attempted index: getPlayerByUserName of non-table: null

digital osprey
#

getPlayerByUserName? or real username?

willow tulip
#

getPlayerByUserName

digital osprey
#

ah ok thx, was going by the javadocs, so what do people use? should i go digging? 🙂
i somehow missed the getOnlinePlayers() tip, that works perfectly hats off

willow tulip
#

javadocs tell you whats in java, but not 100% of java is exposed in Lua.

digital osprey
#

yeah i learned that lesson with the item variants, still hard for me to predict that stuff

#

still dont understand why the Flier or Brochure class is exposed but Magazine and Photo isnt

tacit dove
#

I don't get it. Why a simple mod adding two hazmats just prevents the whole game from loading in MP?!

#

It freezes either on "This is the story of your death" or on the black screen after that

#

Could anyone maybe look at the code? I feel like there's something obvious I just missed

hexed arrow
#

I got a prototype of my mod working 😄 it revives and heals the player two times as of now

#

its not that big when its finished just wanted to see how the model looks at all

vast pier
#

It's not just a retexture, I touched up on the models a bit as well to fix some lighting bugs

#

still very in progress, haven't looked in game

hexed arrow
#

how are updates made with the climate manager? I can get a reference to it but no settings seem to take effect

bright fog
#

getClimateManager().instance (I might have made a mistake in the fct name, I can't check rn)

hexed arrow
#

already tried that but maybe I made a mistake, thanks!

vast pier
vast pier
true holly
# vast pier

Are you doing a custom crafting section like "Homemade" or something to go with this?

vast pier
#

I still haven't made a guide for how the gun crafting works though

#

there's several steps to it, as you have to assemble the gun piece by piece, with there being several different parts to choose from

#

I'm currently just doing a remesh and retexture of it, as the currently uploaded version reuses textures from Ramshackle, and has some minor issues with the models

vast pier
#

Since I'm redoing the textures and meshes, I plan to add in some more texture variations in this upcoming update

#

One thing I plan for is to have higher level skills produce cleaner finishes on parts

#

so a minimum level part will have scratches and dings, but a masterwork part will have a smooth finish

vast pier
hexed arrow
sturdy adder
#

Hi, I'm very new to modding and I'm having an issue while trying to create a clothing mod. When I find the item in-game, it shows up without a description—only the title—and when I drop it on the ground, the screen fills up with these errors.

Sorry for my english, not my first language

hexed arrow
hexed arrow
#

Are there any tools to generate a mod setup(folders,xml and item declarations)? Otherwise I thought about programming an app for this 😄

#

At least for simple clothing items and such

tranquil kindle
#

Check if file guide entry is the same as XML of clothing item name and guid just to be sure

silent zealot
#

Then I forgot to change the modid before uploading so now one of my mods on Steam is NepTemplate and the template is NepTemplate2

#

For item scripts, I usually want to copy a vanilla item to start with. Clothing might benefit from a better way to manage item scripts/model script/xml file/that file that references the xml file/outfits.

frank lintel
#

anyone got a second... https://pzwiki.net/wiki/Mod_structure
~/Zomboid/Workshop/ ??? MyExampleMod ??? /Contents/mods/ ?? MyMod1 2 3...
kinda confused what the MyExampleMod should be. because they explain my different mod(s) the naming is done at the MyMod1..2... level

tacit dove
tacit dove
tacit dove
frank lintel
#

okay so use it named as they show

silent zealot
tacit dove
silent zealot
frank lintel
#

well thats what it implied but I got lost cuz few levels down is where ya build all your mods and name the folders accordingly so was headscratching for a good min

silent zealot
#

The names people will see are in workshop.txt (name on steam) and mod.info (name in the in-game browser)

tacit dove
#

Oh

silent zealot
#

Highly recommended that you name the folders after the mod to make life easier for you, but you can call them Alice and Bob if you want,

frank lintel
#

no I was gonna use the mod Id actually

silent zealot
#

That works too.

vast pier
silent zealot
frank lintel
tacit dove
#

I made a personal use mod and now around 6 people except those I know are subscribed to it... I'm horrified :D

silent zealot
#

By having all the mods under .../Workshop/MyGun/content/mods/...

frank lintel
#

👍

digital osprey
silent zealot
gloomy hornet
#

random thouht

#

but can the vehicle behaviour of the animal trailers be put onto drivable vehicles instead of trailers?

bright fog
gloomy hornet
#

like replacing the backseats of the cop sedan with a animal compartment

bright fog
#

I don't think animal spots in vehicles are seats, so maybe but you'd have a seat and an animal place

#

I suggest checking the vehicle script of the animal trailer

#

To see how they define it

gloomy hornet
#

thats fair

#

im more of a texture guy so i just thought id put forward the question to any actual modders

#

just an idea for if they ever add dogs, we can have K9 vehicles

idle condor
#

I`m making a hair mod with fluffy hair and apparently my mesh doesnt seem to show in the game. I wonder if somebody could help me with this.

#

When I change the mesh into something else it shows, so it probably is not a script problem.

#

also already tried scaling and still didnt work.

idle condor
#

I see... so, is there like a certain way zomboid render its models? Im quite new to modeling.

silent zealot
#

And an AnimalEntry location will be needed

silent zealot
#

Which is only a vast amount of extra work compared to shoving them into a "animal trailer" purgatory.

bright fog
sonic needle
#

if so. its wrecked.

idle condor
#

i followed the wiki`s recommended settings.

sonic needle
#

upload the FBX file.

shy mantle
sonic needle
idle condor
#

here

silent zealot
sonic needle
# idle condor

congrats. on your new skyscraper teto hairstyle. its 100x the size it should be

silent zealot
#

You're going to need to do more work if you want to convert cars between seats/animal storage, as opposed to making a car with dedicted animal storage.

shy mantle
silent zealot
#

As an alternative idea, animals are sort-of-but-not-really inventory objects and you might be able to make it so they can be picked up and placed onto car seats like anything else, taking up storage space.

sonic needle
silent zealot
#

There may even be a mod for that

shy mantle
#

Idk

silent zealot
#

Sure, but how long are you leaving your dog in your car?

shy mantle
sonic needle
silent zealot
#

I'd just say "don't leave your dog sitting in a car or it will starve to death"

shy mantle
#

Literally the first thing I said in the discussion for it lol

sonic needle
#

see the ragdolls yet ?

#

go turn em on for funsies.

#

zomboid space program on ragdoll

idle condor
# sonic needle

oh, it really was the scale. that was quite dumb of me I only did on 1/1000 and 100x

#

thanks a lot

silent zealot
#

lol I will look tomorrow, I need to go to bed. Except my legs have been attacked by mosquitos and I'm itching too much to sleep.

#

One of those nights. 🙁

sonic needle
silent zealot
#

do it, will distract me from pain.

#

Also I'm going to shower so heat can help.

sturdy adder
#

Any idea where the error is coming from?

sonic needle
#

bodylocation error OR XML name error > clothingitem

sturdy adder
#

Tyy

vast pier
#

For model scripts, is it possible to put a color mask on the texture, or does that have to be done with entirely new texture files?

sonic needle
#

perhaps you could use a decal, with a texture made wrong to do that in a fun way

bright fog
#

There's a hue or color parameter that I remember of

vast pier
#

Attachment models/textures are predetermined

#

and have no real connection to their parent item

sonic needle
#

Too many framez

vast pier
#

why is the cape humping you

sonic needle
#

its animated

bright fog
vast pier
#

I know they're still items, but when they're attached to a gun they don't display their real model/texture

sonic needle
#

show?

vast pier
#

Gun attachment's models are determined by the item they're attached to, through the ModelWeaponPart param

vast pier
#

The actual model of the parent item can be anything, all that matters is the model defined in ModelWeaponPart

sonic needle
#

every modelweaponpart gets its texture pre defined, its the easiest way,

vast pier
sonic needle
#

i have seen dynamic texture swapping before

silent zealot
hexed arrow
#

Is it possible for one player to be immune to the draggeddown death without changing the Sandbox variables?

silent zealot
#

No idea if the rendering system will respect things like that though, but it should.

silent zealot
#

I'd search the code for "ZombiesDragDown" and see where the sandbox setting is referenced.

#

huh, you're immune to auto-kill via dragdown if you sit on the floor.

#

BodyDamage.java

silent zealot
#

But that's deep in the java so not something that can be changed per-player with a lua mod.

vast pier
#

Maybe that could help them

silent zealot
#

Only if they can can turn it on and off for each hit, and avoid having it on when a player update happens or it will fully heal the character

#

Also that function handles all the damage/stagger from a hit so even if you could isolate it somehow the character would never take damage from zombies

#

Maybe track who is near zombies and constantly turn sandbox settings for drag down on and off, but I hate that solution.

hexed arrow
#

Thanks a Lot as always

silent zealot
#

Well,it happened.

#

On April 7th, we received reports from multiple users regarding a mod that was allegedly generating malicious code when run. We immediately investigated the mod in question, which contained heavily obfuscated code, and confirmed that it was creating malicious files outside of the Project Zomboid directory.

Further investigation revealed that the same user had uploaded a total of 14 mods, all containing the same exploit. These mods had been installed on between 500 and 2200 devices. The user has since been banned, and all affected mods have been removed from the Steam Workshop.

At this time, the full scope and behavior of the malicious files have not been fully determined. However, because these mods were capable of creating files outside the game directory, we strongly recommend that anyone who downloaded them take appropriate security measures to ensure their system is safe. Simply uninstalling the mods is not sufficient.

silent zealot
#

Looks like the update added more "check that the file path does not contain double dots" but I don;t have a 42.16.2 to compare to, I only have 42.16.

brisk falcon
#

Yo chuckleberry

#

On b41 i get errors from your mod but they dont show up

frank lintel
#

they arent even touching the fact there tons of copyright violations alone with that modlist

#

roblox, MC, MG Rising, Bebop, all these OST wanna be 🎣 OST's

#

btw shouldnt all mods not be obfuscated? (not sure if thats in the agreement or not)

bronze yoke
#

it's not

bright fog
#

Dane did that for his 10 YL mod for example

frank lintel
#

wasnt sure I know some games they say 'okay everything gotta be wide open' no tricks here... etc why I asked

bright fog
#

Let me verify quickly

#

Maybe that one

#

Eh not really

#

Bcs obfscating your code doesn't mean it doesn't do what's on the workshop page

frank lintel
#

yeah its seems like its a grey area.

bright fog
#

Not exactly

#

It's morally a grey area

#

In the modding policy there's nothing stopping you that

frank lintel
#

wonder if that falls under 3.2 possibly, as thats intentionally hiding its usage in part or full to PZ.

bronze yoke
#

i don't think it does

frank lintel
#

well regardless thats lawyer level stuff I was just wondering cuz Im trying to get into modding and just didnt wanna waste time protecting something if I make anything and its not allowed

dry stone
bronze yoke
#

42

red tiger
#

Well gosh darn. That blows.

#

I was always worried about this happening.

red tiger
#

(Or the ability to ship code like this at all)

bronze yoke
#

i don't think it's 'vague' i think it's obviously not intended to address this kind of thing at all

#

2.6 is concerned with mods having undeclared features

willow tulip
red tiger
#

Legal vagueness yeah it has to be defined as clearly as possible. That's what I was saying. Not the general sense of the paragraph.

willow tulip
#

And nobody is really looking through mods code before joining a server anyway

red tiger
#

Obviously I'm doing a good service and the contents of my mod is well understood.

willow tulip
#

Honestly its just another use case for proper permissions system for mod

#

Like how android cellphones now work for everything you install

red tiger
#

Been a long-time advocate of API permissions groups / flags

frank lintel
#

one reason I dont ever log onto anyting in my phone

bronze yoke
#

the problem with security through openness is that it requires us to actually read the code before using it, which we don't

bronze yoke
#

on a large scale there's an argument that at least somebody will do it, but pz mods aren't on a large scale (and there's plenty of cases of 'nobody checked this obvious exploit in a massively popular dependency' outside of pz)

willow tulip
#

Like: 'MusicModAddon wishes to: Write to your hard drive, allow?' would have been pretty sus

frank lintel
#

given I started modding back in like 1.3.2 MC days I def look at mods I install or require clients to use.

red tiger
woven badger
#

So you're saying a mod used a function like this to escape the Project Zomboid Lua sandbox? 🤔

WorldMapEditorState.checkInstance():fromLua2("writeAnnotationsLua", path, content)

Wow, interesting!

willow tulip
#

and likely would have exposed that mod to inspection wayyy sooner

red tiger
#

Even then it'll take 10,000 USD+ for dev time and refinement which is too expensive for low return for user experience.

willow tulip
#

what happened to fromLua1? is it still in use? 😛

bronze yoke
#

yeah all the debug uis have dogshit api, i've never been sure why

willow tulip
#

Or are they now using fromLua3?

frank lintel
#

o.O

red tiger
#

fromLua2 takes 2 args

bronze yoke
#

i've wondered if they predate the wider lua API or something but i doubt that (the older ones at least, they still add new ones exactly the same way)

willow tulip
red tiger
#

Whoever did this was explicitly looking for exploits.

#

That's deep API

frank lintel
#

that or caught their HD going wonky for no reason

red tiger
#

@willow tulip Any additional API in Sickle will be gate-kept through grouped permissions defined in a sickle config file for mods.

red tiger
#

The same reason why permissive URL policies was planned was to permit access but only by the user explicitly when enabling mods or manually editing their policies.

willow tulip
#

4 drive raid5 was noisy back in the day 😛

#

Can't believe I used to sleep near such a racket...

#

so much energy wasted spinning those things 24/7 for years... little heads zipping back and forth...

frank lintel
# willow tulip I remember waking up because my HDD access patterns where off.

well when I seen my GC filling up and down and doing nothing in something and then seeing my HD light just going ape. I know typically something 'wrong' not exactly what but it gets your attention. I didnt know about the zero day stuff till I seen that link not that Im dealing with it sorry OST's I get copyright flags by 3rd parties enough as is for music that I made and sole holder of as is.

willow tulip
frank lintel
#

nah it was a memory leak in a hotpatch nothing crazy so it made GC go wild ( not this game either)

willow tulip
#

Ah

#

Garbage collector then

frank lintel
#

yeah actually run some GC tweaks for this game helps out big time but thats offtopic

#

gonna DM you a link from Oracle check it out if ya want.

red tiger
#

Wondering if people want me to update my anticheat engine to 42...

#

@minor perch Did you want that?

#

I know you worked with ModLoader which it ran in.

#

I'm going to try and work on getting my CSS parser done this weekend lol. I don't think I'll have a browser emulator UI framework done until like June.

#

I'm always going to be happy when security fixes go live. :)

minor perch
red tiger
frank lintel
#

wish I knew how to poke to look at code fixes cuz someone posted a fix for broken rain barrels

minor perch
# red tiger Yes and ModLoader / asledgehammer_utilities

I don’t know. I’m already using a version for 42 modified by me, as you know. If you think something can be improved, let me know.

In terms of compatibility with 42, there’s not much to do—if I remember correctly, there wasn’t much to change to make it work on 42. There was maybe some reflection used in Asledhehammer to put an event at the top of the callback list, but unfortunately that can’t be used—nothing too impactful though.

As for the modloader, I don’t know if anyone besides me even uses it haha. For the anti-cheat, I already have a rough version inspired partly by EtherhammerX and other anti-cheats, plus my own stuff. Still in development and needs improvement, with features yet to be added, etc.

Let’s say I’m still heavily testing everything, but I don’t think I’ll release anything to the public—not for now at least. if you want we can talk in pvt

vast pier
#

Hey so it seems like if I set a weapon's reload type using
item:setWeaponReloadType(BOLT_ACTION)
It causes the gun to crash the game when attempting a reload.

    java.lang.NullPointerException: Cannot invoke "zombie.scripting.objects.WeaponReloadType.toString()" because the return value of "zombie.inventory.types.HandWeapon.getWeaponReloadType()" is null at IsoPlayer.checkReloading(IsoPlayer.java:3758).```
Am I doing something wrong, or is setWeaponReloadType() currently unusable in 42.16?
frank lintel
#

kinda off topicish but was looking at doing debugging for the client game itself more in detail so where should my IDE workplace/root folder be? at just root folder of the game install or down inside the lua folder?

vast pier
buoyant violet
craggy furnace
#

zhenja has attempted to get in touch with you twice but there it is against my wishes to bring SMUI to 42 in any way

#

please put that effort toward your own project, we are trying to push guns and leather in 43

hollow oriole
craggy furnace
hollow oriole
craggy furnace
#

happy to hear it, ive tried to keep SMUI up for people like you since we've considered getting rid of it entirely 43+ for guns and leather

vast pier
#

Textures still not finalized, but here's a current look

The synthetic stock got a remesh, overall rounder and more generic stock looking instead of a weird rectangle

buoyant violet
hollow oriole
buoyant violet
#

last video of the night

bright fog
clear dawn
#

hello yall, do you guys have any idea on how i can make an outfit unusable by players but still usable by zombies without removing them from the zombie body?

#

im making a nemesis mod but i don't want the players to acually use the nemesis skin, just the zombie that i'm spawning

wheat prism
# vast pier

Pretty cool, has a very apocalyptic and rustic design to it.

frank lintel
#

Any Lua experts awake atm?

bronze yoke
#

looks reasonable to me

#

it's certainly not going to do anything malicious

frank lintel
#

okies sweet I tested this and it works makes the menu work again but just wanted to run it by some Lua people first cuz its not java :)

#

sadly doesnt fix the crash bug from the composters

upbeat turtle
silent zealot
#

Feather Cloak?

upbeat turtle
#

full body replacement for specific zeds cathappy

#

i'm using the api in truemodelz to make this possible

karmic elk
#

@mellow frigate Hi. There is a massive error on the B42 AquaYacht mod. This function is giving multiple errors per second. The mod (and it's requirements) are set as the last in the mod order and there are no red errors in the mod order (or yellow). I tried to DM you on Steam but for some unknown reason it's saying I'm blocked from DM'ing you?!

buoyant violet
coral blade
#

Project Zomboid Mod Updater/Downloader zombie 👑
Update 1.1.6:

  • added this changelog file to the program.
  • updated SteamCMD executable.
  • updated most assemblies.
  • merged all changes from RimWorld Mod Updater to this program (which are relevant).
  • cleaned leftover files.
    Instructions:
  • download and extract the archive preferably into your PZ installation folder.
  • if "mods" folder doesn't exist (weird...) in your PZ installation, do create it.
  • if C:\Users\yourusername\Zomboid\Mods folder doesn't exist, please run the game once just to create the settings environment.
  • run with PZModUpdater.exe
  • minimum screen resolution required 1600x900

If you have any feedback/bug reports/good vibes, do tell and share...
https://drive.google.com/file/d/1_yCDaG3yRhWBo6Vdz6LH6rz8PJCUjs4S/view?usp=sharing

#

Hope it's fine to post here

#

I mean, it's not a mod, it's a program

cinder light
#

Hi Everyone, I'm the creator of Project Thiccener (https://steamcommunity.com/sharedfiles/filedetails/?id=3659585445), and I've hit a bit of a roadblock trying to implement my persistent zombie morph memory, I want to ensure zombies have access to the same data between game reloads and when they are turned into corpses. I added in an item which contains my data, my problem is that to me it looks like we cannot add any items to alive zombies (ModData gets wiped between reloads, and when they turn into corpses), does anyone know a way to get around this? according to my research zombies do not have an inventory, and I can only add the item to their inventory when they die, which defeats the purpose of reload persistence. their ID also changes when they get turned into corpses. so I can't even rely on that to save their old morph state between the "alive" and the "dead" zombie

fleet bridge
cinder light
frank lintel
fleet bridge
#

Container id maybe

cinder light
#

well, the zombie IDs sadly change between reloads, for the container ID I'm not sure, but I don't think that would work, due to zombies not having an inventory (or if you mean corpse item persistence, that definitely does work between restarts)

#

oh well, it was a long shot, if the zombies can't keep their size, I guess I'll have to accept it, unless if I modify the game's java code any more to add our morph changes to the saves directly (although that would lead to other problems). Thanks for the help Lect :)

bright fog
bright fog
cinder light
bright fog
#

See Object pooling section

dry stone
#

If you send out a lot of server commands, it seems the client takes its sweet sweet time getting through the queue and actually calling your LUA with them. Is there anything that can be done to make it less sluggish?

#

This is localhost so it could be practically instant.

bright fog
dry stone
#

I have to.. I'm doing file transfers.

bright fog
#

Or send commands together to process

dry stone
#

the alternative is to get the zomboid server and client talking on some other port purely via java....

#

You get to send payloads of up to 32KB and i'm already at that limit as well

bright fog
#

Do you need to do file transferts instantly ?

#

Bcs overall that sounds heavy on the network ?

dry stone
#

Technically the mod isn't dead / broke if it's slow, but it should be a lot faster than this. Like a LOT faster

#

and yea, it will be heavy. it does tons of caching so generally things only ever get downloaded once

cinder light
bright fog
#

Bcs that custom outfit is persistent

#

OR the other method is to make the zombie a revived player

#

Which the game does save

#

BUT you should not do that for lots of zombies

cinder light
bright fog
#

Bcs you'll bloat save files

cinder light
#

yeah

bright fog
#

Depends how many zombies you need custom morph on

cinder light
#

we're morphing every zombie, and player character that is loaded into the gpu

bright fog
#

Yikes

cinder light
#

it's very performant

bright fog
#

Also it's not zombies with the same outfit share the same pid

cinder light
#

it's done through shaders

bright fog
cinder light
#

there's a lot of java, we have to hook into a lot of calls, I had to rewrite a lot of the render pipeline for this to work properly

bright fog
#

Back then I did a test in LV to see how many zombies shared the same true ID and it was like 10 or so zombies ?

bright fog
#

What do you do with this morphing ?

coral blade
bright fog
coral blade
#

as I posted the last update here, OK then

cinder light
#

before I did through the VBO, so when we got the clothing / player model into the VBO, we would do the morphs on the CPU, changing the sizes of the characters, the problem with this was that some modded clothing were set up inproperly, and in the VBO we only had access to the raw vertex data for the meshes, but not the skeleton, not properly anyways, so some clothing did not morph correctly, with shaders this can be avoided as they run much later, when we have the skeleton data again, and we let PZ itself set up the clothings properly (so their location, rotation, and scale is correct compared between the clothings and playermodels)

bright fog
#

Interesting

cinder light
#

here is an image of what our code does, it changes the sizes of different zombies (making them thinner, or fatter, or more muscular), it also works on the player as well, and this is synched between clients in multiplayer, so the same zombie would have the same size (morphs), my problem currently is persistence, between game reloads, and zombie to corpse transformations this ModData is lost, not from the players (as that's calculated out from their strength and weight data, and the dynamic morphs, which are stored as ModData on the character)

bright fog
#

Sadly there are no other solutions to my knowledge

cinder light
#

the nice thing with our mod is that we do not need to create different meshes for each of the clothing (and then a mesh for each value of the morph per clothing), as it's all just vector calculations, so if in the future we want to add in a new morph, it's really easy to do so as we just need the "maximum" that morph can be, and then we can control the morph through our dynamic morphs (here is a quick video i just made of how that UI works), or through custom lua callbacks to our java code, so we could manipulate how zombies work (for example making them thinner the longer the game has been going, to simulate the zombies "starving") [the ui currently doesn't change sizes, this is due to me changing over from the VBO calculations to the shaders, I'm planning on fixing this, this is why we can see the character model in our custom ui window]

cinder light
frank lintel
bronze yoke
#

it's true they're not actually guaranteed to be unique, but zombies with the same outfit usually won't have the same one

#

each outfit has 500 male and 500 female ids, so it's very rare that there will actually be two of the same id on screen (and if there is, in your case it won't really matter)

cinder light
dusky quiver
#

afaik persistentOutfitId is constructed from 2 parts - outfit ID + some number that is incremented for every new zombie

bronze yoke
#

it's not incremented, it's just a random offset

frank lintel
#

btw know yas talking about outfit ID's and missing ones is a major problem I see spam in debug window constantly for that.

#

LOG : General f:97574, t:1775754532356> ItemPickInfo -> cannot get ID for container: inventoryfemale (hope this is relative to what you refering about)

cinder light
#

i see, thank you so much for telling me about this, that is really smart, especially if we use the trueID (thank you SimKDT [and Chuck]!) I remember very early on i looked into this, but for some reason or another I abandoned it, probably due to me incorrectly assuming that it's only 1 trueid / outfit

cinder light
frank lintel
#

interesting... should pass that on to them maybe they'll implement it so we stop getting invalid lookups?

paper ibex
#

"Further investigation revealed that the same user had uploaded a total of 14 mods, all containing the same exploit," the developer said. "These mods had been installed on between 500 and 2200 devices. The user has since been banned, and all affected mods have been removed from the Steam Workshop."

i remember mods using "heavily obfuscated code" somewhere.

frank lintel
#

automatic flag for me to not use it :P

paper ibex
#

non tech peoples never checking any mod files, even me, i tot lua "sandbox" is safe

frank lintel
#

true most people also never decompiled reverse engineered stuff either

tacit dove
#

So.... Guys... You've already helped me with how to add an extra option for clothes... Now I need your help once again. If there are several options, how do I code it?

bright fog
tacit dove
#

In that case there are only two options. In the mod I'm working on there are supposed to be three (per piece of clothing)

#

So I was wondering... How

bright fog
#

Can you quickly remind me which parameter you used for the secondary option, I can find that quickly

tacit dove
#

This thing

#

Oh

#

No images

tacit dove
bright fog
# tacit dove ClothingExtraSubmenu ClothingItemExtra ClothingItemExtraOption
    item Ring_Right_MiddleFinger_Gold
    {
        DisplayCategory = Accessory,
        ItemType = base:clothing,
        Weight = 0.1,
        Icon = Ring_Gold,
        BodyLocation = base:right_middlefinger,
        ClothingExtraSubmenu = RightMiddleFinger,
        ClothingItem = Ring_Right_MiddleFinger_Gold,
        ClothingItemExtra = Base.Ring_Left_MiddleFinger_Gold;Base.Ring_Left_RingFinger_Gold;Base.Ring_Right_RingFinger_Gold,
        ClothingItemExtraOption = LeftMiddleFinger;LeftRingFinger;RightRingFinger,
        Cosmetic = true,
        WorldStaticModel = Ring_Gold_Ground,
        Tags = base:hasmetal;base:tinygoldscrap,
    }
#

You can define multiple ones via an array

tacit dove
#

Oh

#

Thank you

#

I hope everything goes well...

#

But for now... Good night (or any other time of day) to ya, nice people. Thanks for your help

willow tulip
#

@lost tartan Yea the useDelta stuff really annoys me too, especially when making a mod that changes items useDelta onto existing saves

#

"yay more lighter uses.. wait why do all my lighters show min now?"

willow tulip
dry stone
#

its possible, but it's extra setup because server admins might need to go open another port and stuff

#

really trying to avoid anything that makes this monstrosity i've created any harder to get going

lost tartan
willow tulip
lost tartan
#

in zombie/inventory/InventoryItem.java

        return (float)this.uses / this.getMaxUses();
    }

    public void setCurrentUsesFloat(float newUses) {
        newUses = PZMath.clamp(newUses, 0.0F, 1.0F);
        this.uses = Math.round(newUses / this.useDelta);
    }```
#

original useDelta is forever baked into the item state, since this.uses is the storage variable, but getMaxUses() for a drainablecomboitem is

        return (int)Math.floor(1.0F / this.useDelta);
    }``` so one adjusts with changed useDelta, but the other doesn't ![cococoShrug](https://cdn.discordapp.com/emojis/740426976635912233.webp?size=128 "cococoShrug")
willow tulip
#

Yeaa... so stupidly cursed.

#

'oh but we can't change that, it would break saves!'

#
  • Company who breaks everyones saves every minor version
frank lintel
#

atleast you know what semantic versioning is :P

willow tulip
#
if (header.hasFlags(1)) {
                    this.setCurrentUses(input.getInt());
                }
#

its stored as int in the save file