#mod_development

1 messages ยท Page 290 of 1

low shell
#

change just h to d

light cliff
#

im currently making new texures for the item icons cause the ones i had were really crappy

low shell
#

well for me, I have 2 mods to update

placid plover
#

It would be cool if someone made a mod to make pz like a normal life expirence

ornate sand
placid plover
low shell
placid plover
#

Sims is just moving persons and completing life tasks while getting maried and have kids

#

While a grim reaper comes to get u when u truly completed the npc life alike expirience 10/10

low shell
#

try the day one mod

torn igloo
#

That's not how game tick works here. Game tick is basically your FPS. If you zoom in, the number of game ticks the client can do will increase. If you zoom out, the number of game ticks drop. The only accurate way to get a average 1s is by getting actual time and do math from there. Many many modders have the same misunderstanding, they rate limit the ticks believing that certain amount of ticks is 1s.

Is not hard to test it either. Create some functions, tie it to a context menu for easy trigger. Use getTimestampMs() or getRealworldSecondsSinceLastUpdate(), whichever you prefer for your arithmetic. Start a tick event, count how many ticks, end that event after 1s. It will tell you the same value as your FPS.

Anyway, @bright fog was referring to my suggestion in https://discord.com/channels/136501320340209664/1318920979581501502

Because many many modders don't understand game ticks, they also tend to abuse it quite a fair bit. That simply not good, better to have legit 1s function for modders to use than to educate them about game ticks.

ornate sand
#

Some incredible patch notes in the Sims.
"-It is no longer possible to 'Try for Baby' with the Grim Reaper."
"-Kleptomaniac Sims can no longer steal Subway stations from lots."

elfin cradle
#

I Blame Kevin.

placid plover
#

I like pz the way it is

#

But it would be cool if they make a pz normal life expirience

placid plover
crisp fossil
#

if the weapon's ConditionLowerChanceOneIn=20 that means for about 20 strikes it will lower the condition by 1? then if ConditionMax=15 then the total strikes to break is 20*15 = 300?

ancient grail
#

sorry i have no exp with b42 but if its b41 i can guide you

elfin cradle
#

Standard Blue Body Bag and Biohazard Body Bag. I think that may be enough work for one day. l8r, lads

vast pier
#

Didn't wanna type it all out again

ornate sand
#

Sure. Can you hit fools with books yet?
Knowledge is power after all

vast pier
#

I was thinking about it, can't imagine the book would last very long though

#

I'm going through random household items n stuff.
Though, can items even be multiple things? Would changing it to a weapon not break it's functionality as a book?

#

Cuz type:weapon

#

I'm assuming books have their own type and aren't type:normal

vast pier
undone elbow
#

I keep thinking about the mechanics of wet clothes. It shouldn't dry in seconds, but at least in game hours.

vast pier
#

Do they not?

bright fog
#

I mean yeah, it could import with wrong proportions, but the problem is that in Blender the PZ models are literally in milimeters, which means PZ uses wrong proportions by default. You literally need to export your model while it is in the milimeters for it to be in proportion

#

Importing another model yea sure it could import in mm or m but here the problem is fucking proportions when exporting lol

#

So that's normalized

#

Unless your software is dogshit

#

(which let's be honest, fucking fragmotion is drunk)

light cliff
#

holy crap my new icons looks so good

bright fog
#

๐Ÿ‘€

light cliff
#

i gotta fix one before i show it off its not transparent LOL

bright fog
#

Also you can probably use GameTime.getServerTime() to detect whenever a second passed

light cliff
#

i love it

bright fog
#

Nice !

light cliff
#

thank you so much its my first time doing textures

bright fog
#

Looks good yea

#

I personally haven't tried yet to make icon textures

drifting ore
frank elbow
#

I meant to mention this when I noticed it yesterday: haven't seen anyone talk about the new Array utility class we have access to

#

It's essentially an interface for operations on raw Java arrays (not ArrayLists, arrays. e.g., string[]). This means we can actually use array return values now, and pass them to some Java methodsโ€”still can't pass arrays that aren't Object[] as far as I could see from a quick look

#

Props to whichever dev threw that in there, I'm sure it'll be helpful

undone elbow
#

Okay, it takes 5 ingame hours to dry a piece of clothing. Now I think that it may be not only water...

#

Let's say it may be juice or milk

bright fog
frank elbow
#

Unfortunately I'm not at my home computer to be able to actually reference it, so this will be loose based on memory.

local arr = Array.new(1) -- creates a Java array wrapper
arr:add("hello world")  -- adds an element
someJavaFunctionThatExpectsAnObjectArray(arr:toArray())

You can also wrap array return values, regardless of type. So, for example, if you wanted to access the return value of the values method on an enum for whatever reason (contrived example below since you can just use index or whatever it's called):

local values = BodyPartType.values()
local arr = Array.new(values)
print(arr)

-- loop through using `size` and `get`, I believe they're called
#

@bright fog ^. Looking at the actual decompiled class would prob be clearer

sly monolith
#

Guys is it safe for a save file to change names of the .xml files of clothes? And like everywhere else, I had something with "red" in name, but I added more colors so the name doesn't make any sense now.
Also unrelated, how do I add a quality preview picture to a steam workshop mod, instead of this 256x256 sh!t?

ornate sand
#

Also I'm not sure but maybe the poster.png can be better than 256?

sly monolith
#

yea i'm talking about the poster image, in game it asks for 256x256, tho idk where to change that on steam

ornate sand
#

yeah the preview.png does have to be 256 but do the poster.pngs too?

sly monolith
#

oh preview not poster yea *

#

but like, i see all those other mods with good quality preview images, and mine is ass

ornate sand
#

Is it so that the preview.png is just the one on the right side of the worshop item's page?
Because the rolling picture slideshow can be pretty much anything. I think mine are 700x400 there cos they're ingame screenshots

sly monolith
#

i mean those

ornate sand
#

Ah

#

Go to ChatGPT, slap your preview.png on there and tell it "maek dis gooder pls"

sly monolith
#

heh

#

ok thx

ornate sand
#

Or show us your preview.png and we can see if we should cheerlead you or burn you at the stake

bronze yoke
#

otherwise there is something quite silly i can do that was entirely bottlenecked by this that i'm excited to try again

ancient grail
#

corerct me if im wrong but theres no function that allows us to modify a weapon instance and toggle this on and off right

TwoHandWeapon = TRUE,
tacit pebble
#

Hello, quick question. I accidently turned on this 3D line(?) feature and i have no idea how to turn off. :/ anyone has idea?
I remember I clicked Animation Viewer to see some anims and this turned on.
I even can't search because i don't know its name

frank elbow
bronze yoke
#

b42 recipes do not have this feature yet unhappy

ancient grail
#

remove the wireframe

tacit pebble
ancient grail
bronze yoke
frank elbow
#

Let us know how it goes if you beat me to it; I might poke around at it a bit more later

bronze yoke
#

the fact that you can pass it into the array constructor should indicate that it'd work anyway

frank elbow
#

Theory lures us in so practice can gut punch us (but that's true, so hopefully this is true in both theory and practice)

torn igloo
bronze yoke
#

i'd like to see a proper api for running functions at different specified timings over stacking on another event that will still not fit everyone's usecases

torn igloo
warm vector
#

Does anyone know if it possible to create a mod that makes a day length in PZ to 1 hour and 30 minutes?
I hate playing on 1 hour length, but 2 hour length seems too long ๐Ÿ˜ฆ

sly monolith
#

i play on 3h ๐Ÿ˜‚

tranquil kindle
#

But i guess you mean first 6 mods*

sly monolith
#

yea i mean the ones that look like they are at least 1024x1024 or smh heh

tranquil kindle
#

Make sure your preview has no "anime" in it and youre golden. There seem to be dislike of anime content

sly monolith
#

pff, no anime is a crime

tranquil kindle
#

Maybe not dislike, but more like there are less people intrested in that.

#

People want MOAR Military gear.

sly monolith
#

yeah my mods don't cater to that part of the community ๐Ÿ˜‚

tranquil kindle
#

Whats your mod about anyway?

sly monolith
#

project bimbo as someone called it in comments lmao

tranquil kindle
sly monolith
#

i just pasted tattoos on it and made it a bit more saturated or smh

ornate sand
tranquil kindle
ornate sand
#

Feel free to use my M249 or M60, or if I may be so bold, my AA-12 Automatic Combat Shotgun for your preview.png

tranquil kindle
#

I kinda wanna make myself custom Ash-12...

#

Love that weapon in tarkov for some reason

old ginkgo
#

I want them 3d popped collars smh.

ornate sand
tranquil kindle
old ginkgo
#

Decent detailed texture; I'd say Brita's is one of the few that has detailed textures but it almost goes too far. Something more low-key but well made like KATTAJ.

tranquil kindle
#

There are 2 camps, ULTRA hd 4k enjoyers, then there are vanila like enjoyers.

old ginkgo
#

I want that nice inbetween of those camps.

#

Britas goes too hard on it, imo.

sly monolith
#

come on you gotta go all the way in, no half measures

old ginkgo
#

For my tastes, at least.

ornate sand
tranquil kindle
#

I belive recent "Vanilla Gear Expanded" does a really good job at it.

light cliff
#

my recipe shows up but not in the craft menu dangit

old ginkgo
ornate sand
light cliff
#

this is currently how it looks

#

how do i make ita text display on discord?

ornate sand
#

Does the category exist in base PZ?

ornate sand
#

Oh whoops

tranquil kindle
ornate sand
#

Triple backspace or whatevs, code, triple backspace

tranquil kindle
#

codehere*

#

Or without lua*

light cliff
#
module Base
{
    craftRecipe RollAJoint
    {
        timedAction = Making,
        Time = 30,
        Tags = InHandCraft
        category = Miscellaneous,

        inputs
        {
            item 1 [ProjectZaZa.CannabisFlower],
            item 1 [ProjectZaZa.RastaRollingPapers],
        }

        outputs
        {
            item 1 ProjectZaZa.CannabisJoint, // Produces one CannabisJoint
        }
    }
}
#

should my module be ProjectZaZa how i have it for my items.txt?

tranquil kindle
old ginkgo
#

The issue is Brita's is so high texture, and there has been no other mod that goes as far as they do in their art-style. So if you're using it, you can't really efficiently mix/match clothing between their mod and others.

#

I will say I enjoy the gunmod more than their clothing mod tbh.

elfin cradle
ornate sand
light cliff
#

oh and i bet those comments shouldnt be there huh

light cliff
old ginkgo
light cliff
#

yeah its usually -- in lua

sly monolith
tranquil kindle
old ginkgo
ornate sand
#

Yeah I think Brita is an actual professional 3d modeler

#

Just like Arsenal[26] is a goddamn White Wizard

old ginkgo
#

They are; but it's extremely bad practice for Zomboid since oversized textures can cause some memory leaks.

tranquil kindle
#

Thats great for them and as i said i really love how it turns out. But it feels too much.

ornate sand
old ginkgo
#

So it becomes a kind of plague/meme amongst other modders that Brita's is the bane of the workshop in some ways.

tranquil kindle
#

Exacly

ornate sand
old ginkgo
#

It is; but they're one and the same, essentially. Due to the requirement.

light cliff
#

@tranquil kindle it works!

tranquil kindle
#

I tried to use my gunmod once with Brita/arsenal to see what would happend. My guns did not spawn, though i added them into distribution files. Guns fired ALOT slower and had no sounds...

ornate sand
ornate sand
#

And still? Okay
I knew that gun mods were always gonna be incompatible by their very definition but added guns should work together

old ginkgo
#

Just combine forces and make a giant super-mod for firearms and become the next Arsenal Gunfighters/Brita's that you want to see in the world.

ornate sand
#

Let's go Nik

#

Anime gun mod

tranquil kindle
#

I feel like 90% of gun mods are conflicting Only due Attachment system.

ornate sand
#

You can animate the spinrack for my lever action sawnoff Winchester 1887, and that'll already draw the subscribers in

old ginkgo
#

The attachment system is just a table, right? Couldn't they work together?

#

Although I guess you'd need a standardized tagging system for every modded firearm to work interchangably, wouldn't you.

ornate sand
#

I suppose you could lua in a way to make attachments work together on a .txt basis, and to insert/modify their upgrade tables

tranquil kindle
#

If modder A makes attachment with "mount on" on certain guns, then someone else needs to edit it but every attempt at me editing it failed. I tried albion's way of doing it with Starlit library, but got errors from it.

old ginkgo
#

I know Ash wanted to make a firearm framework to synchronize firearms across mods to work together and play nicely.

#

Something like that definetly needs to exist for firearms tbh.

ornate sand
#

Absolutely

tranquil kindle
#

Thing is, for guns the export settings, how you set up your gun and scales/rotation (from my experience) plays huge role. I can't count how many times i've seen people struggling with attachment not showing or being too big/ small, not lined up

#

So its kinda hard to make something "standard"

ornate sand
tranquil kindle
#

But you don't really see mods that override other mods traits, do you?

#

But in terms of guns, thats what would happend.

old ginkgo
#

That's where making it a standardized framework with 'guidelines' to follow would help. It would require communication and effort amongst the individual modders, a project essentially.

lapis moth
#

don't worry

#

we are making a better gun mod then brita

#

Bro made a rotating Gatling machine gun today

tranquil kindle
#

The best way would be to allow all attachments to be mounted for guns that have certain tag, so if gun has tag "handgun" for example, it will be able to equip all "handgun" attachments, you could create more tags(maybe revolvers too for diffrent set). Thats all. Then you have person who makes gun with their model they can make so if person equips "scopex2" It will use X attachment point (added in attachment editor) and use Y model (you specify it in itemscript of your gun)

ornate sand
old ginkgo
#

Honestly after my fluid mod I'd be willing to help with the logistical side of a firearm's mod and possibly with minor code/animations. I'm not exactly a great 3d modeller or texturer, and I've barely even looked at the firearm/weapons/combat side of Zomboid, but I could help with the organization to some degree.

ornate sand
tranquil kindle
#

Yeah

old ginkgo
#

I'm basically making the Fluid equivalent of a framework mod so how hard could a Firearm one be KEK

ornate sand
#

Fuuu~

tranquil kindle
#

so are b41. but X models can be seen on FBX guns so thats not a problem

ornate sand
#

Us Blender poors deserve respect

lapis moth
#

We are making a firearm framework with many features, which should be released soon

lapis moth
#

what is that?

tranquil kindle
#

I'm kinda tired of making gunmods... I'll be updating my TLOG gun mod and thats it i guess

ornate sand
#

orly roughly translates from internet to English as = "Oh, really?"

lapis moth
#

I don't understand many abbreviations, but I will learn them

ornate sand
lapis moth
tranquil kindle
#

Actual lever moving not included feelsfunnyman

lapis moth
#

just write a table and it will work

sly monolith
ornate sand
tranquil kindle
sly monolith
#

i mean, it works for me, but idk if it's not causing some errors in the background or smh, i know nothing about how all that magic behind the scenes work

ornate sand
lapis moth
tranquil kindle
#

Why is muzzle on laser?

lapis moth
#

don't care about that

tranquil kindle
#

I like that, but how will it also work on MP?

ornate sand
lapis moth
#

just for test

tranquil kindle
ornate sand
lapis moth
#

The framework is a community project, and we hope to defeat Britaded

ornate sand
#

Antagonistic competition in PZ gun modding?

lapis moth
#

The first release should include Ash's gun pack and my gun pack

#

about 100 guns above

ornate sand
# tranquil kindle

You absolutely rock my socks dude/dudette, and I will put public credits on my mod's description ๐Ÿ™‚

tranquil kindle
# ornate sand โค๏ธ
<m_AnimName>Bob_Reload_Lever_RackAimTLOG</m_AnimName> For aiming animname for XML

<m_AnimName>Bob_Reload_Lever_RackTLOG</m_AnimName> For non Aiming.
tranquil kindle
lapis moth
ornate sand
# tranquil kindle That feels a bit too much in my opinion.

One of the main reasons we decided on Vanilla Firearms Expansion over Arsenal/Brita's for our server was this.
They're both awesome and very well scripted, but it's a hassle and a half to get Arsenal to spawn only what you want it to, while VFE is well balanced by its nature

ornate sand
tranquil kindle
#

Great to hear it

lapis moth
#

We like everyone to be able to make their own high-quality firearms

ornate sand
ornate sand
lapis moth
#

we didn't have a own channel ,yet

#

i will ask ASH

bright fog
#

Why 1 second, and no 0.1 or 0.5 or 0.2 or 0.8 ?

#

Why do YOU specifically need 1 second

bright fog
frank elbow
#

Pretty much anywhere that's the case would benefit from the new class

bronze yoke
#

was just about to ping, since you're here: it does look like it works - at the very least you can pass the result of Array#toArray() to an Array constructor or its static methods and it will work as expected

#

i couldn't find other functions that take non-primitive array arguments to test it against though

frank elbow
#

Nice. I wonder if this means readers can be used with more than readLine nowโ€”I don't remember their interface perfectly & maybe not since I think I'm thinking of a byte array

bright fog
frank elbow
bright fog
#

Bcs the way you put it makes me confused if that's what it just is

frank elbow
#

We haven't had access to Java arrays in the past, so anywhere that used them was rendered p much unusable from Lua

bronze yoke
#

i'm pretty sure you are supposed to be able to pass other Class[] with toArray(Class<V> var1) and the constructors that create them with class arguments, but primitives aren't classes so we can't use them for that and unfortunately i couldn't find methods that take class arrays

#

it notably does not seem to work with methods that take variable arguments, even though to my understanding they should be seen as mostly the same by the jvm

bright fog
bronze yoke
#

which was what i needed it for unhappy potentially ArrayList#toArray did actually work in b41, since that's what i tested it against as well

frank elbow
#

By variable arguments do you mean overloads, or variadic?

bronze yoke
#

it was my understanding that that basically compiles to Object[] anyway but it doesn't seem to like it

frank elbow
#

Odd that that's not handled. Maybe that explains why the devs so frequently do the arg1, arg2, arg3 (and so on) thing ๐Ÿค”

bright fog
bronze yoke
#

i'm wondering if it's something more complex going on with the specific function because i noticed there is a variadic function in the global object now and you can call that without using an array (and infact an array suffers the same error)

bright fog
#

I'm not knowledgeable on the technical aspects of Java tbf

frank elbow
bright fog
#

Ah sry right

#

I see yea

frank elbow
bronze yoke
#

i believe it has security implications so i don't want to specify exactly what i'm doing

frank elbow
#

I'm wondering why an unpack wouldn't suffice for that but presumably I'm missing something like Kahlua's reflection not handling it

#

Ah, fair

bronze yoke
#

yeah, i tried just passing the args raw but it doesn't like that either

weary matrix
#

any clue what to do with this? ๐Ÿ˜…

LOG  : Lua          f:1125, t:1736530670800>
tranquil kindle
low shell
#

Tried drawing spiffo and then realized Im doing it in lowest quality from start

ornate sand
tranquil kindle
#

On video*

ornate sand
#

Obviously spinning upward because push hand forward and rack & spin like a coolguy

sly monolith
tranquil kindle
#

I made it just for laughs and to unrust myself, but will try make it better.

ornate sand
undone elbow
#

Why would someone create a Java array and use toArray if all the mod's logic is on the Lua side?

weary matrix
#

Anyone knows how to apply a recipe programmatically in B42? For example I want to apply this recipe: Recipe_OpenBox100 = "Open Box (100 Items)"

bronze yoke
#

the use case would be when you need to interact with java api that requires/passes an array

#

for lua mods tables will always be the most efficient way to store data by far, the overhead on using objects is way too high for anything else to matter

atomic hare
#

Is it possible to make the watering can water more than one tile at the time?

bright fog
#

print("")

#

Or possibly another print with a line break "\n"

quiet fulcrum
#

whats the lua for checking if a mod with ExampleId is active?

weary matrix
atomic hare
#

Another question, i want to make a "simple" mod that makes the watering can use less water to max water a planted tile. Is that possible?

bronze yoke
#

in build 41 you don't need the \\

torn igloo
quiet fulcrum
bronze yoke
#

yeah, it's new in b42

quiet fulcrum
#

ok and just to clarify further, it's not needed in b41 but can still be used or should only be used in b42?

bronze yoke
#

it will not work in b41

frank elbow
bronze yoke
#

because the workshop id does not get added ๐Ÿคทโ€โ™€๏ธ

frank elbow
#

It was option B

bronze yoke
#

it's clearly supposed to, but it doesn't

#

the game seems to fail to get mod workshop ids entirely now, you can't see them on the mod list anymore even though there's a box for it

frank elbow
#

I made my pattern matching optionally look for a number instead of requiring one, so at least what I wrote isn't broken ๐Ÿ™ƒ

bronze yoke
#

yeah, i wrote something similar early on

#

most likely every mod with a dependency breaks next patch when they fix that

old ginkgo
# bronze yoke ``getActivatedMods():contains("\\ExampleId")``

Bear with my ignorance for a moment and my potentially asking a stupid question but I've been having an issue with getModFileWriter/Reader lately, specifically only for B42 for my .json I use for storing Favorites.

Would this cause an issue since getModFileWriter uses the modID as one of the arguements?

bronze yoke
#

yeah

old ginkgo
bronze yoke
#

"\\ExampleId" is the mod id for all contexts now

old ginkgo
#

reeee

bronze yoke
#

(well it's \ExampleId but you need the second one to escape the slash)

frank elbow
#

Since they're presumably gonna fix it, it seems worth recommending the future-proof approach, no? For the earlier question of checking for a mod being enabled, I mean

#

(well, as future-proof as we can be anyway)

old ginkgo
bronze yoke
#

yeah for checking enabled i can drop a function for it, for requires and stuff you're out of luck though since they aren't scriptable

#

i used this:```lua
local activatedMods = {}

local mods = getActivatedMods()
for i = 0, mods:size() - 1 do
local shortId = string.match(mods:get(i), "\(.+)$")
activatedMods[shortId] = true
end
```the usage is just checking if activatedMods["ExampleId"] then

old ginkgo
#

I've never had a steam workshop upload fail before but I just had one, lmao.

#

I just did it again and it worked.

bronze yoke
#

i've never had a steam workshop fail that wasn't just steam doing it for fun

old ginkgo
#

Steam just trying to keep me on my toes.

tulip valve
unique harbor
#

Never hooked a function in PZ before and I'm wondering if I'm doing it right because I don't get the print when I press the Safety button.

local hook = Safety.isToggleAllowed

function Safety:isToggleAllowed()
    print("Check here")

    return hook(self)
end

Am I missing something?

bronze yoke
#

when hooking a java method, your hook will only apply to lua calls to that method

unique harbor
#

Hmm.. I see, is there anything I could do to make it work?

bronze yoke
#

i would guess the button probably calls Safety.toggleSafety, so you can probably hook that

unique harbor
#

Yeah just found it by searching the lua folder, seems like I can hook ISSafetyUI:toggleSafety().
Guess I will give that a try, thanks! ๐Ÿ™‚

Update: Works! ๐Ÿ˜„

past trout
#

Comrades, please help me. Previously, in b41, it was possible to add many different animations by simply naming their xml files differently and prescribing different conditions "<m_Conditions>", now when I try to do this for build 42, if I name the file differently than it is called in the original, (For example, I want to add my animation sit on ground, before to do this, you just had to put a file with any name in the player/sitonground folder, but now the game just doesn't see them, but if you call it for example "sit_loop.xml" or "sit_action.xml" , then my animation appears and works), maybe someone knows how to solve this problem?

bronze yoke
#

a bug means the game can't detect xml files in the 42/ and common/ folders currently

#

if you add one to media/ like it was a b41 mod, it will be detected and iirc actually loads the one in 42/ or common/

#

the ones with vanilla names work because they're already detected because of vanilla

past trout
#

hm.. thank you

cosmic ermine
#

Anyone know what these logs are? Front trunk spawns loot just fine, capacity is affected by condition, etc.

umbral raptor
#

Can someone help me figure out whats wrong with this mod? For some reason, an empty alcohol bottle I added is showing up as "FluidContainer AlcoholBottle" and the 3D model and texture won't work, it uses the 2D icon instead

past trout
unique harbor
#

What's the best method for letting an admin change mod settings? ( They're only server related )
Can I somehow add it to the server settings or what's the way to go?

unique harbor
bright fog
old ginkgo
#

That would depend on the sandbox options and what youโ€™re wanting to change. But most are, yes.

#

Some settings and parameters will require restarts but again; itโ€™s all subjective to the settings in question.

cosmic ermine
#

Do Gas Tanks get distributed in-game?

unique harbor
bright fog
umbral raptor
bright fog
#

You need to define the name in a different file

umbral raptor
#

DisplayName = Empty Alcohol Bottle,

#

Doesn't this do it?

bright fog
#

No not that

#

give me a sec

umbral raptor
#

I sent the translate file

#

if thats what u mean

bright fog
#

This

umbral raptor
#

Ahaaaaa

#

Thats why!

#

Where is that file supposed to go?

#

Translate file?

bright fog
#

Translate file yea, same thing, you can see the file name at the top

umbral raptor
#

Lemme try that rq and see if it works

#

That fixed it! Thanks so much!

#

I managed to fix all the bugs with my mod haha. Time to add more.

bright fog
#

Nice !

umbral raptor
#

I have a question

#

When do we add , in lua?

#

function FermentationMod.extractItem(item)
if not item then return end

local data = item:getModData()

if data.fermentationState == FermentationMod.States.FERMENTED then
    -- Logic for extracting the fermented item
    print("Item successfully extracted.")
    return true
else
    print("Item cannot be extracted in its current state.")
    return false
end

end

#

Does anything here use ,?

#

item SteelFermenterWithAirlockMead
{
DisplayName = Steel Fermenter with Airlock (Mead),
DisplayCategory = Crafting,
Type = Normal,
Weight = 9.1,
Icon = FermenterMead,
Why does this end with , in the end?

bright fog
#

The scripts and the lua files are not the same

#

, is used usually to separate variables when defining a function, or to separate entries in a table

#

In Scripts, they are way way more important but work kind of like lua tables with , between each entries of the tables too, tho those are weird tables and it's not really a programming language I guess

atomic hare
#

Well fudge, this didnt worked to reduce the use of water of a watering can:
-- Overriding ISWaterPlantAction to reduce water usage to 10%
require "TimedActions/ISWaterPlantAction"

local originalUseItemOneUnit = ISWaterPlantAction.useItemOneUnit

function ISWaterPlantAction:useItemOneUnit()
if self.item and self.item:getType() == "Base.WateredCan" then
-- Use 10% of the original water consumption
local waterReductionFactor = 0.1
local originalDelta = self.deltaPerUse
self.deltaPerUse = originalDelta * waterReductionFactor
originalUseItemOneUnit(self)
-- Restore the original delta after use
self.deltaPerUse = originalDelta
else
-- Call the original function for other items
originalUseItemOneUnit(self)
end
end

umbral raptor
#

How do I add a context menu option?

#

Like when you right click an item and it says open?

silent zealot
#

Search for "addoption" in this channel bad advice, ignore

#

that link is an exampel of adding a context menu

umbral raptor
#

It's in the lua/server folder. The mod's name is AlcoholEmpire (if that's an issue with localization) not FermentationMod

grand cloak
#

how can i check for tags in recipes?

median karma
#

added clothes, is there a way to have Zombies wear them?

crystal idol
median karma
#

oh thx will do and see how they did it

#

i tried but this seems like the top tier of developement things id rather have to skip, but thanks ๐Ÿ™‚

umbral raptor
#

I really need help with a LUA script. if someone has experience it'd be great if u could PM me

#

it adds a new cooking process to the game. (fermentation)

tacit pebble
#

Is there any function to get these preset locations?
I imagine something like: cell:getVehicleZones()

ancient grail
#

also i use nosteam and it opens up b41 (which is what iwant for now) how do i make it open b42 tho

grand cloak
#

is there any way to hide recipes

severe jay
#

why error?

#

confusion...

#

weird... i mean the link works.. just didn't showcase

silent zealot
#

Did you just upload it? Takes a few minutes for a mod to be publicly available

severe jay
#

^ ight bet

silent zealot
#

How do you even start to balance a drug mod when a 1/4 can of soda is the ultimate survivor medication?

lavish kestrel
silent zealot
#

I'll subscribe, see if I can replace my soda addiction with cocaine.

#

I've done B41 vehicle nomad playthroughs using crack instead of sleeping

severe jay
#

we plan on coding each grain of cocaine molecule for micro dosing

silent zealot
#

Crack to clear fatigue, smoke a cigarette to clear the stress from the crack, perfectly balanced.

severe jay
#

XD jokes

silent zealot
lavish kestrel
#

Don't forget LSD for Boredom and Unhappiness

silent zealot
#

Fluid system: I don't care, I'll just assume you snorted a litre of cocaine

#

Does anyone know what event is called when a gun is fired? I want to turn the doublebarreled shotgun into a super-shotgun that fires both barrels, but this is a "If I can't do it in 10 minutes the idea wasn't that great" mod idea.

#

I can only find events that are for swinging weapons, not shooting... not sure if they lists I'm using are all from B41

lavish kestrel
silent zealot
#

I can probably do what I want with OnPressReloadButton by making he gun only hold one round, having it use an extra shell when you reload and doubling the number of projectiles.

patent flare
bronze yoke
#

unless you want to backport it after making it for b42

silent zealot
#

I'm lucky my mods were all easy to migrate to B42. And by "lucky" I mean "I only make very simple mods"

ashen arch
#

hey guys need advice

#

im making nach der untoten in project zomboid but i want the game to start as if its the last stand Accumulator challenge with the rounds and the shop menu etc. any idea how i can do that?

ancient grail
bronze yoke
#

it's just whichever version of the game you have?

#

it's not like you can just do -b41, if your install is b41 it's b41

#

if you want to have both versions you can just copy the game folder for one version and move it somewhere else, and then install the other version through steam

silent zealot
#

Is there a way to get the elapsed ticks, or game time, or real time, or anything similar? My goal is an event-based function that won't trigger a second time within X seconds of last triggering

#

Doesn't need to be exact, so real time/game time/ticks will all work but I can't find a "getCurrentGameTime()" type thing.

sly monolith
#

just finished 2k textures for my character xD

silent zealot
#

Nice.

#

Looks like the person responsible for this zombie mess.

silent zealot
#

Hard to blend in in 1993 Kentucky... ๐Ÿ˜‚

#

Put Anything Into Anything is steadily coming along.

sly monolith
#

now that's something i could use, there's never enough room for all the trash i gotta pick up ๐Ÿ˜„

ebon dagger
#

Aight, yall.

I made my second custom weapon. I've made several custom attachments, those all worked fine.

For some reason the second custom weapon isn't displaying any attachments, in-game, though they are displaying in the attachment editor

For example, the standard x2 scope. Adding it to the weapon in attachment editor works just fine.

However, placing it on the weapon held in the characters hand does not.

THE ONLY THING I CAN THINK OF:
When I load into game, there is a flash of black that looks like a model bugging out. Like maybe the model has some junk data or something on it.

Any ideas?

#

Also, so all the data is available, I do have a script swapping the WeaponSprite, based on if its loaded or not.

silent zealot
#

Is it just the vanilla 2x scope being attached?

#

If so, you at elast know the scope object is good.

ebon dagger
#

I can't get ANY attachments to show on this model.

#

Vanilla or modded.

silent zealot
#

There goes my dream of a crossbow with red dot scope, laser targetter and gun light.

ebon dagger
#

Oh, it will happen.

#

I'm not gonna give up

#

lol

vast pier
hybrid tiger
#

Does anyone know where the Vanilla OnCreate lua code functions are stored?

ebon dagger
#

Laser and Reddot work in Editor, but none in game. ๐Ÿ˜ฆ

ebon dagger
hybrid tiger
#

oh wow

#

I really just missed it

#

lmao

#

ty

ebon dagger
#

np.

random finch
bronze yoke
#

there is no async in kahlua

#

there's never been any kind of native asynchronicity in lua (it's just incompatible with the language's design), coroutines have that kind of interface but they aren't actually asynchronous

random finch
#

Wouldn't there be a huge performance benefit if it were possible? Do you see any issues with implementing a library into a mod to somewhat replicate an async functionality such as this?
http://dkolf.de/lua-async-await

#

I would have todo more research before I even attempted it, but I also do not want to waste my time.

bronze yoke
#

there probably would yeah, but you can't do it in pure lua

#

this is an area i didn't study so my usage of the language isn't the most consistent, i've probably said async a few times when i should have said concurrent, but there's no concurrency here, you just can't do it in lua

#

i haven't seen people using things like sleep functions (which imo is the only real use for this), i usually see people just call functions with a delay

#

i think there's a performance penalty to using coroutines too much like that (which would be a prerequisite if you wanted a sleep function like this) and in general i don't think i've ever seen someone use one in pz?

#

to be honest that's a mistake, there are some decent reasons to use them, but i don't use them either so i can't say much

undone elbow
#

Also see "OnTickEngine" via Ctrl+F that I posted here earlier.

bronze yoke
#

yeah, i've written pretty similar things in the past

#

i think if you wanted an async/await sort of syntax you could set up a table of coroutines which you suspend when starting the await and check every tick if the condition has passed that they should now continue

#

but it sounds complicated to set up and i think it would probably actually perform a lot worse than the current methods

random finch
#

When you say only say the only use would be sleep functions, wdym? For example, you are using Events.OnRenderTick.Add. You want to update elements in the function using OnRenderTick. As of now, it must check all the changes before it proceeds or you can use another Event. If you were able to use async function that ran concurrently to update those elements that could also be an option.

At least that was my thought process. Perhaps my idea of aync is convoluted either from not understanding or using C# context.

Using other events to replicate concurrency is probably the way to go in PZ Kahlua.

undone elbow
#

An example from TTS:

local time_now = os.clock()
local TASKS = {}

local function DoPeriodicTask(period, fn)
  local task = {
    period = period,
    fn = fn,
    act_time = time_now + period,
  }
  TASKS[task] = task
  return task
end

local function DoTaskInTime(seconds, fn)
  local task = {
    --period = period,
    fn = fn,
    act_time = time_now + seconds,
  }
  --table.insert(TASKS,task)
  TASKS[task] = task
  return task
end

local function CancelTask(task)
  if task then
    TASKS[task] = nil
  end
end

function update()
  time_now = os.clock()
  for k,task in pairs(TASKS) do
    if time_now > task.act_time then
      if task.period then
        task.act_time = time_now + task.period
      else
        TASKS[k] = nil
      end
      task.fn()
    end
  end
end

This is just an example. os.clock should be replaced with os.time etc

bronze yoke
#

yeah, i actually wrote something like this this morning

#

well actually mine doesn't deal in real time yet, just ticks

bronze yoke
#

there's no possibility of concurrency in the current api, it's straight up impossible

undone elbow
#

This is the main optimization: ๐Ÿ˜Ž

TASKS[task] = task
bronze yoke
ebon dagger
#

Does DoParam add, or replace?

For instance, if an item already has entries for "MountOn", would a script that calls DoParam("MountOn = whatever") overwrite the items starting values?

undone elbow
#

replace

bronze yoke
ebon dagger
#

Fair. So, the safe bet would be to attempt to get the current value, and replace after appending.

bronze yoke
#

if you have a decompile it's easiest to just check doparam for the specific parameter you're interested in, if you see it creating a new arraylist then you know it's replacing

#

mounton looks like it will replace

undone elbow
#

the lack of a replacement is just a bug I guess

#

It must replace.

bronze yoke
#

i don't see an elegant way to get the original mount on unfortunately, the two ways to get it seem to be field access or instancing the item and grabbing it from the instance (the instance's mount on is weirdly not actually identical to the original but seems like it should ultimately reference the same items anyway)

ebon dagger
#

Yeah, I was running into this.

#

replacing it is easy, additive is difficult

#

I can just hardcode the string, but its not future safe ๐Ÿ˜„

undone elbow
#

DoParam must add the parameter if it doesn't exist

ebon dagger
#

Anyone ever seen:
WARN : General f:1568, t:1736585985150> SpriteConfig.initObjectInfo > Invalid SpriteConfig object! scripted object = null

so far its my only lead on why my models aren't displaying attachments.

bronze yoke
#

i just get this constantly whenever i play

#

walking around a bit will give me a couple errors just like this

ebon dagger
#

Ah ok, then thats not it ๐Ÿ˜„

umbral raptor
#

Events.OnItemSpawned.Add(function(item)
if FermentationMod.isFermentable(item) then
FermentationMod.startFermentation(item)
end
end)
There is an error in the first line
what's the event's name for what I want?
I want it to start a process when the item spawns into the world.

#

OnObjectAdded?

ebon dagger
#

Wrong chat bro lol

ebon dagger
ebon dagger
#

Anyone have any thoughts on making an item destroy itself when it hits the player inventory, OR preventing an item attachement from being detached?

bright fog
undone elbow
unique harbor
#

How do I add a tooltip to a sandbox option?
I have tried a few ways now, based on other mods but it just doesn't want to work.

sandbox-options.txt

option Playmode.OnlyInSafehouse
{
    type = boolean, default = false,
    page = Playmode, translation = Playmode_OnlyInSafehouse,
    tooltip = Tooltip_Playmode_OnlyInSafehouse, (also tried without 'Tooltip_')
}

Tooltip_EN.txt

Tooltip_EN = {
    Tooltip_Playmode_OnlyInSafehouse = "Players will only be able to change the safety inside a safehouse."
}
undone elbow
#

sandbox-options.txt

option Playmode.OnlyInSafehouse
{
    type = boolean, default = false,
    page = Playmode, translation = Playmode_OnlyInSafehouse,
}

Sandbox_EN.txt

Sandbox_EN = {
    ...
    Playmode_OnlyInSafehouse_tooltip = "..."
}
crisp fossil
#

how do I get all these stacked items when right clicked? using OnFillInventoryObjectContextMenu only returns 1 unless I manually highlight them all

ebon dagger
ebon dagger
umbral raptor
#

Can someone help me figure out what's wrong here? It keeps adding fermenting context menu tag each periodic update. the fermentation progress is counting, but never switches to fermented state.

crisp fossil
umbral raptor
#

what do u mean?

unique harbor
random finch
#

Anyone know if you can get an outline on a player by using setHighlighted? Doesn't seem to work on render tick but I could be doing something wrong.
IE:

player:setHighlighted(true, false)
local OBJECT_HIGHLIGHT_COLOR = ColorInfo.new(0,1,0,1)
player:setHighlightColor(OBJECT_HIGHLIGHT_COLOR)
player:setBlink(true)
player:setOutlineHighlight(true)
player:setOutlineHlBlink(true)
player:setOutlineHighlightCol(1.0, 1.0, 1.0, 1.0)
errant bluff
#

could someone know how to record the weight of a fish in the inventory, not the one that refers to the weight for the hunger/nutrition thing.

#

its that getActualWeight ?

ancient grail
ancient grail
crisp fossil
# umbral raptor what do u mean?

this is your code item:setName(item:getDisplayName() .. " (" .. AlcoholEmpire.States.FERMENTED .. ")")

  1. item name = Steel Fermenter with Airlock (Mead)
  2. you set the name its now Steel Fermenter with Airlock (Mead)(Fermenting)
  3. then your function triggers again, when you log item:getDisplayName() it will return Steel Fermenter with Airlock (Mead)(Fermenting).
    So this code item:setName(item:getDisplayName() .. " (" .. AlcoholEmpire.States.FERMENTED .. ")") will result to Steel Fermenter with Airlock (Mead)(Fermenting)(Fermenting).
  4. if your function triggers again, when you log item:getDisplayName() it will return Steel Fermenter with Airlock (Mead)(Fermenting)(Fermenting) , then so on.

This happens because you are using item:getDisplayName() which you are changing every time

  1. item:getDisplayName() + (Fermenting) = Steel Fermenter with Airlock (Mead) + (Fermenting) = Steel Fermenter with Airlock (Mead)(Fermenting)
  2. item:getDisplayName() + (Fermenting) = Steel Fermenter with Airlock (Mead)(Fermenting) + (Fermenting) = Steel Fermenter with Airlock (Mead)(Fermenting)(Fermenting)
  3. item:getDisplayName() + (Fermenting) = Steel Fermenter with Airlock (Mead)(Fermenting)(Fermenting) + (Fermenting) = Steel Fermenter with Airlock (Mead)(Fermenting)(Fermenting)(Fermenting)

As long as your function triggers it keeps adding to the existing name. You need to store the original name in modData once then use that name

-- Trigger this once
local modData = item:getModData()
modData.origName = item:getDisplayName()

then the function where you change the name item:setName(modData.origName .. " (" .. AlcoholEmpire.States.FERMENTED .. ")")

desert lagoon
#

Hi all, during tests of my mod of PL translation for B42 (as currently, in unstable snapshot there are many character glitches caused by encoding), I've noticed that all parametrized items already generated in game stays with the old name (if you install the mod and run it with previously created save). New items are correctly shown, as expected, but the old ones are still invalid, for example Key Ring of X Y or ID Card

I suppose it's a code wise bug in this situation. By any chance, do any of you guys noticed such thing before and is there an easy way to refresh phrases of previously generated parametrized items, or it needs to stay that way?

random finch
ornate sand
#

Oooooooh KI5 is back on B42 babyyy

undone elbow
#

"eฬจ" != "ฤ™"

ancient grail
random finch
vast pier
tranquil kindle
vast pier
#

oh, he didn't show that in the video, but that would make sense

random finch
vast pier
#

Is there a reason why there aren't any mods that make it so pants and other articles of clothing have pockets?

random finch
#

I say icons, its an icon

vast pier
#

maybe there's a system limitation

#

or just nobody has thought to do it

#

the only mods I see related to pockets are vests

random finch
#

I think the latter

#

That was something I wanted to delve into myself

#

Just too busy with what i got

vast pier
#

wack

umbral raptor
#

Does anyone know how I can make a tool-tip progress bar like the cooking one?

undone elbow
vast pier
#

more storage

undone elbow
#

So you need a mod to make bags better.

vast pier
#

I saw a message appear and disappear

umbral raptor
#

Having 20 containers is not a good idea

vast pier
#

what no I don't want a buff to bags, I want pants to have pockets

umbral raptor
#

I can barely keep up with my chest rig, backup, and others

#

I mean, is each clothing piece going to be its own bag?

#

Or is it going to increase inventory capacity

vast pier
#

I mean I don't think it can directly increase capacity, so it would be like carrying a sewing kit in your secondary

undone elbow
#

In the past I made mod "Realistic Inventory" (B41 only for now) that provides pocket mechanics but it makes sense only as a mod that makes game harder.

errant bluff
undone elbow
#

It counts all pockets to increase main inventory limit.

umbral raptor
#

Does anyone know how I can make a tool-tip progress bar like the cooking one? It tracks progress from my modโ€™s script.

undone elbow
#

Make a timed action.

umbral raptor
#

Do you know how cooking works? Like how the bar increases over time in an oven till its done then another burning bar shows up. I want to make it so that it does that it increases over time since ObjectAdd

umbral raptor
undone elbow
#

It's a Lua for a custom action.

undone elbow
umbral raptor
#

It goes in Lua/server right? In a seperate file for this timed action?

serene crest
#

Sorry if I'm jumping right in, but I have trouble with unpacking the texture pack "tiles2x" with the Pack Manager Tool. I just get a "๏ฟฝ" in the unpacked folder and don't know what's causing it. Appreciate if anyone could help.

#

It's from B42

undone elbow
# umbral raptor It goes in Lua/server right? In a seperate file for this timed action?
  1. You know that there is a word "Burning" for sure.
  2. Go search in game files "Burning" (here are quotes because it's an entire phrase)
  • The result: few filenames including IG_UI_EN.txt
  1. Read it. Find the word.
  • The result: a string IGUI_invpanel_Burning = "Burning",
  1. Search the word IGUI_invpanel_Burning in all game files
  • Thre result: a file ISInventoryPane.lua
  1. Read it.
  • The result: this word is in a function ISInventoryPane:drawProgressBar
  1. etc etc etc

That's how you can "dig" the game to find the place where it is. Then you can copy/pase the code, take an idea, see API examples etc etc.

grand cloak
#

guys do you know if there is a way to create custom building categories

#

i can do it easily with the crafting menu but for some reason it didn't work in the building one

undone elbow
serene crest
umbral raptor
grand cloak
#

download zomboid modding tools from steam

#

the tiles are there in pngs

serene crest
# grand cloak download zomboid modding tools from steam

I did, and I assume I'm suppose to click "extract images" and then proceed here as shown by clicking "OK". But I don't get any extracted images in the folder. What exactly am I suppose to be doing here to get the tiles extracted into a custom folder?

grand cloak
#

for me there are like only a few that worked

#

i never extracted those from the games files

#

bc they never worked

#

i dont know why

#

if i create one i can easily extract it back, but the ones from the game are different

serene crest
#

Might be due to outdated software?

grand cloak
#

maybe

#

but i use the pngs from the tools when i need them

#

why exactly do you need to extract them

runic hare
#

can anyone help me with figuring out how to expand safhouse parameters in a MP hosted server?

#

been on multipul servers where the admins can with a requested ticket, so im trying to figure out how they do so

serene crest
ornate sand
runic hare
grand cloak
#

from the modding tools

ornate sand
runic hare
#

im in debug mode within the game, next to the safehouse and unsure what tab to select i thought ive tried them all

#

is it within the debug menu main/dev?

ornate sand
#

It's been more than 6 months since I used it but I know it's there somewhere. Just look for something-something safezone

runic hare
#

hmmm maybe iso regions?

serene crest
#

Could you provide a good one that works for modern use?

grand cloak
#

actually i have also never found a good one tbh

#

where are the erosion tiles in the 2x

#

what number in the list?

runic hare
#

no luck :{

serene crest
grand cloak
#

you can find them here

#

inside the modding tools files/tiles/2x

#

and then you need to edit those images

#

and create the .pack to replace them

serene crest
ebon dagger
grand cloak
random finch
grand cloak
#

you also have to put it in your mod info

random finch
#

I thought they didnt touch the combat system

runic hare
#

so i just found out there is an admin option

#

also

#

that i can change sandbox settings ingame without having to create a new world ๐Ÿฅฒ

#

so much time i couldve saved

#

got it ๐Ÿ˜„

#

ty rain

ivory bramble
#

Hey everyone ๐Ÿ™‚ Does anyone know of any mods that use enums in their sandbox options? Looking for a quick example of the structure for my own

#

nvm! Found an example

hybrid tiger
#

Is there a wait to maintain food stats when using replaceOnCooked? The food being replaced with has the base weight / stats instead of the food actually being cooked?
Or call a function when the food is cooked? I saw OnCooked but I think it got removed in b42?

atomic hare
#

techinally speaking, would it be possible to add a working torque system to the vehicles as a mod to make them no rely on just HP?

ebon dagger
ornate sand
atomic hare
#

ignore me using mods that change the muzzleflash to look better

ornate sand
finite scroll
#

is there anyone that can explain how to draw sprites properly? i've been digging through other people's code for like a week and cannot figure out how to make it work without having a whole absurd chain of things

bright fog
vast pier
#

at least as far as I can tell

#

which isn't a huge deal for pants, as they rarely get holes anyway.
The issue comes from the tear clothing recipe, it checks for holes in an item and bugs out if the item isn't capable of having holes

ivory bramble
viral notch
ivory bramble
vivid imp
#

Doggy Jvla is on it with the wiki update, its great to see

vast pier
#

This may be the path I go with, since idrc if the pants are suddenly impervious to holes

grizzled fulcrum
median karma
#

is there any reason that whenever i want to make a mod it has to contain a empty folder called /common/ else it wont show up?

bronze yoke
#

it's a bug

#

you can and should put files that are likely to be shared between versions in the future in common/ instead of the version folder (e.g. 42) but you are supposed to be able to put everything in the version folder instead

median karma
#

thx, that was hella complicated, but sure finally released my first mod i worked on for 2 weeks.

vast pier
median karma
#

trying to fix a last thing i noticed after releasing it, few secs

cosmic ermine
#
if VehicleZoneDistribution then
    VehicleZoneDistribution.good.vehicles["Base.isg85countach"] = {index = -1, spawnChance = 100}
    VehicleZoneDistribution.sport.vehicles["Base.isg85countach"] = {index = -1, spawnChance = 100}
end
```Was testing out the spawn and my vehicle does in-fact spawn properly. I guess the mod will be ready today.
vast pier
median karma
#

one item shows just icon when dropped, but the code is right, still trying to fix it lol

#

can u remove this and if u want ask in pm ๐Ÿ™‚

vast pier
#

aight

silent zealot
#

You can't work around this with lua because only Type = Container will become ItemContaoner in the Java,

#

But if you want to do it, here's code for letting you shove stuff into your underwear:

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


local function NepChangeBraParams()

    -- maybe instead pull list by looking for items with BodyLocation = UnderwearTop or BodyLocation = UnderwearBottom?
    -- See mod 2947370877 Weightless Accessories for example
    
    local brasRedFrillsOnly = { "Bra_Straps_FrillyRed" }
    
    local bras = { 
    "Bra_Strapless_Black",
    "Bra_Strapless_RedSpots",
    "Bra_Strapless_White",
    "Bra_Straps_Black",
    "Bra_Straps_White",
    "Bra_Strapless_AnimalPrint",
    "Bra_Straps_AnimalPrint",
    "Bra_Straps_FrillyBlack",
    "Bra_Strapless_FrillyBlack",
    "Bra_Straps_FrillyPink",
    "Bra_Strapless_FrillyPink",
    "Bra_Straps_FrillyRed",
    "Bra_Strapless_FrillyRed",
    "Corset_Black",
    "Corset_Red",
    "Corset",
    "Corset_Medical" }
    local undies = { 
    "Underpants_Black",
    "Underpants_RedSpots",
    "Underpants_White",
    "Boxers_Hearts",
    "Boxers_Silk_Black",
    "Boxers_Silk_Red",
    "Boxers_RedStripes",
    "Boxers_White",
    "Briefs_White",
    "Briefs_AnimalPrints",
    "Briefs_SmallTrunks_Black",
    "Briefs_SmallTrunks_Blue",
    "Briefs_SmallTrunks_Red",
    "Briefs_SmallTrunks_WhiteTINT",
    "Underpants_AnimalPrint",
    "FrillyUnderpants_Black",
    "FrillyUnderpants_Pink",
    "FrillyUnderpants_Red" }

    for _, bra in ipairs(brasRedFrillsOnly) do
        NepItemParam(bra,"Capacity = 2")
        NepItemParam(bra,"WeightReduction = 75")
        NepItemParam(bra,"Type = Container")
        NepItemParam(bra,"OpenSound = OpenBag")
        NepItemParam(bra,"CloseSound = CloseBag")
        NepItemParam(bra,"PutInSound = PutItemInBag")
        NepItemParam(bra,"CanBeEquipped = UnderwearTop") --not for undies!
    end
    
end```
vast pier
silent zealot
#

Makes sense, they are different objects in java do have different properties and some fields/methods that shoudl be inherited by everything are just missing.

#

Plus I guess that avoids the "stuff shodl fall out of a bag full of holes" issue.

vast pier
#

It still produces a single rag, but spits an error

#

Another issue being it doesn't unequip the item when you shred it

#

meaning your pants stop existing, but you're still wearing them until you unequip it

silent zealot
#

hahahhah

vast pier
#

taking them off or dropping them makes them instantly disintegrate

silent zealot
#

I too hate wearing pants.

#

Such a realistic game.

silent zealot
#

There is a "rip worn clothes" recipe seperate to "rip clothes", does that offer a hint?

vast pier
#

I am thinking about looking at the code & recipe(s) for the sheet sling bag and simply overwriting the pants with a new recipe to rip them up

silent zealot
#

That sounds easiest

#

Once I gave up on converting underpants into storage as a mod because I didn't want countless complaints about "all the underpants in the world disappeared!" I considered making a version that let you convert undies with a "sew pockets into undies" recipe, but it just didn't seem worth it.

#

Using undies as a holster slot with a chance to shoot you in the groin if you fall over was another idea. ๐Ÿ˜‚

vast pier
#

just put a disclaimer that enabling the mod invites the underwear god who will bless new worlds and vanquish the filth of olde

silent zealot
#

I could, but people will not read a giant warning and how many people back things up before adjusting mods? I do with a little robocopy script, but I bet most people do not.

vast pier
#

sounds like a skill issue and not your problem

silent zealot
#

hahahahaha

#

Steam workshop -> ...Or Are yo Just Happy To See Me? mod -> comments -> disable comments

#

solved.

vast pier
#

I've been letting myself get more into the mindset of just making mods how I feel they should function, and if someone is stupid and messes it up, that's their own fault

#

At least if it's not convoluted, I'm not against making mods accessible and understandable

#

but if you don't read the top of the description that literally says it will delete items on old worlds, that's genuinely your fault

silent zealot
#

Hmmmm.

#

I shall ponder this apprach. Or I'll keep it as a personal script so I can set one desired item to storage, respawn it with dev mode, and use that.

vast pier
#

Like yeah this mod is complicated and convoluted, so if it messes up that might be on me for not explaining properly. But if I have a full explanation and walk through of the mod and how it works and you still mess up on the first thing I warn you about?????????

bronze yoke
#

the real trick is to put it in an image on the workshop page

#

since i got into the habit of explaining everything with pictures i don't get very many confused commenters anymore, and those i do get are generally things i actually did not explain well in the screenshots

vast pier
#

no because I have some mods for kenshi that I made, that show what npcs/shops the armours are given to

bronze yoke
#

nobody reads the description, and that's their fault and their problem but it will make it less annoying for you to deal with

vast pier
#

and I still get comments about "what npcs can I find these on??"

#

not an exaggeration

bronze yoke
#

that's the problem, that's a block of text

vast pier
#

It's the only image on the mod page

bronze yoke
#

nobody reads a big block of text, same issue as the description

mellow frigate
bronze yoke
#

for what it's worth i'm not saying you have to or should do this, you literally provide all of the information right there, but if the comments bug you improving the presentation usually does reduce it

vast pier
mellow frigate
#

the solution is to disable the comments and put a link to pz discord mod support in the description

vast pier
#

the armours are visually identical, you can only tell them apart when you have them in your inventory, there is literally no better way to present this information.

#

I actually don't blame this particular person, I'm pretty sure english isn't their first language

bronze yoke
#

yeah, i guess i don't really know what your mod is so i can't say exactly how you could do it better (or if you even could)

vast pier
#
These copy the stats of the cargopants versions, weighing slightly more with a 0.8 price mult instead of 0.7.```
bronze yoke
#

my mind goes to showing their stats alongside a picture + nametag of each npc who sells them, likely in a separate image for each of the variants

#

unfortunately, yeah, doesn't seem like something you can present too visually

last edge
#

Just a question - does anyone know if a mod to fix animal vehicle collisions is being worked on? Something to prevent rabbits and mice from shredding your hood.

winter bolt
#

easiest solution is to add "SPAWNS ON NPCS" as a header at the start of the description lol

vast pier
#

An unrelated gripe I have is when you make a mod that changes a function and someone goes in your comments and says something like "why did you make this, vanilla version was fine" Because I wanted to???

bronze yoke
#

ugh yeah dude like

#

not everything is for everyone, just don't use it

vast pier
#

Like if you aren't interested in the mod, just keep scrolling?? Why are you wasting your time with the mod if you think vanilla is better?? Just go play vanilla then??

#

I remember when I was developing a cloth tweaks mod, I made it so cloth equipment gave bonuses to combat speed.
Because in vanilla, they do literally nothing except have a physical appearance.
It's not like in zomboid, where clothing without protection still has environmental protection.
And someone asked why you would buff them.
Because I don't like useless items in games?

median karma
#

ugh thisx is weird, i checked my code 100 times, the code for all items ingame are exactly 100% the same, but for one item it only loads the icon and not the model? console.txt spits this out

WARN : Script f:0, t:1736641073808> ModelScript.check > no such model "???.PrideBracelet_gaypride" for Base.PrideBracelet_Right_Gaypride and as said all the text must be correct.

vast pier
# vast pier I remember when I was developing a cloth tweaks mod, I made it so cloth equipmen...

Everything should be capable of having a use in my opinion, even if niche.
Can't afford that chainmail shirt? wearing a normal shirt will still slightly benefit you.

It also adds an interesting equipment dilemma, where you choose between better protection and combat speed.

You're wearing a chestplate and plate leggings, do you go for a bit more protection and add a heavy chain shirt, or do you put on a cloth shirt instead to negate some of the speed penalty from the plate armour?

silent zealot
#

Maybe a gif with blinking red WARNING

vast pier
vast pier
#

cuz it looks like it's missing the right hand model

silent zealot
silent zealot
median karma
#

i deleted the icon and its still showing up ingame, this is weird lol

vast pier
#

well the error is specifically saying a model is missing

#

no such model "???.PrideBracelet_gaypride"

median karma
#

i gave the mod a new ID to see that it does not play with the workshop mod, and now nothing drops anymore, ill have to troubleshoot more

vast pier
#

also images and textures are saved to the game cache, deleting the icon wouldn't do anything until you restart the game

umbral raptor
bronze yoke
#

they should be freed when they stop being used, at worst when you exit the save

umbral raptor
#

--

#

specifically the lua shared scripts and recipes

#

I added everything related to recipes and it aint working

median karma
#

oh hello Error

#

<m_GUID>9b0afef4-8efd-4e42-a34d-4d646724ssf5/m_GUID>

vast pier
median karma
#

<

vast pier
#

??

median karma
#

the < is missing

vast pier
#

where was that

#

like, where was the guid

median karma
#

\clothing\clothingItems

vast pier
#

odd, the workshop version doesn't have that guid for the gaypride right bracelet

<m_MaleModel>media\models_X\Static\Clothes\M_PrideBracelet_Right.fbx</m_MaleModel>
<m_FemaleModel>media\models_X\Static\Clothes\F_PrideBracelet_Right.fbx</m_FemaleModel>
<m_GUID>9b0afef4-8efd-4e42-a34d-4d646724ssgg</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_MasksFolder>none</m_MasksFolder>
<textureChoices>clothes\bracelets\bracelet_gaypride</textureChoices>
</clothingItem>```
median karma
#

i just uploaded a new version

#

like 2-3min ago

vast pier
#

well this version is about 20 minutes old

median karma
#

im still not sure whatbroke, im just glad it got fixed

vast pier
#

I was looking at it to see what broke before you found the guid problem

vast pier
umbral raptor
# vast pier what's broken about it and what's it supposed to do

So its supposed to simulate fermentation. When an item is added into the world its suppossed to ferment and progress tracked then af the end it changes the context menu tag from (fermenting) to fermented and allows it to be used in a recipe since its given a tag. Now the progress is occuring but it goes on forever and doesnt change the state, display name or anything. I also tried to implement a simple progress bar that tracks down fermentation using the burning tooltip in zomboid base game, but that attempt resulted in a fucked up inventory screen for the player and no progress bar

#

Also recipes dont work

vast pier
#

B41 or 41?

umbral raptor
#

B42

vast pier
#

did it previously work in 41 or was it built of 42

umbral raptor
#

Built

#

Its new

#

Lets focus on the recipes

#

Can you tell me why it aint appearing ig?

vast pier
#

me personally I cannot, I'm very new to zomboid modding.
Just going through steps to try to diagnose, or at least draw attention to it for someone who may be more knowledgable

#

Did you base the recipes off existing ones?

umbral raptor
#

Well. GPT wrote it. I gave him the base game coding for recipes and a modโ€™s to use as references

bronze yoke
#

chat gpt cannot write zomboid mods

umbral raptor
#

I did check it and found nothing weird

umbral raptor
#

Which sometimes works

vast pier
#

ah then the problem is probably just cuz chatgpt

umbral raptor
#

Specially on easy stuff

#

Like translate files

#

But yeah 100% GPT but i barely know how to code so he does good

#

And half the mod is working so I got that going

vast pier
#

Well I think one of the issues is none of your recipes have OnCreate which I think may be needed for these sorts of recipes?

#

Your recipes seem like they would be in a similar vein to can opening, which all have OnCreate functions

vivid imp
vast pier
#

@umbral raptor maybe the recipes don't work because you don't have the items in game for them?

#

getting the items to exist should probably be the first step

#

wait this might be on me, I'll check again in a minute

umbral raptor
frank elbow
#

Imagine if you typed 0/0 into a calculator and instead of it telling you it can't handle that calculation, it just tells you the answer is 100. That's what using ChatGPT for zomboid is like

vast pier
#

a calculator actually requires you to know what you're doing

vivid imp
#

"Bro trust me im an expert at this i type a few lines into a machine and it spits stuff out at me"

vivid imp
#

Anything worthwhile you have to actually learn

#

So if you want to be good at modding actually learn it

umbral raptor
#

lol yall stay in 2020, we goin into the 2030s and leaving ur ass behind

red tiger
#

Imagine copyrighting maths.

frank elbow
#

It's actually 2025 right now

#

You shouldn't trust ChatGPT to be your calendar either

umbral raptor
#

Yeah GPT wasnt that popular before 2020 bro

#

Thats why you staying there

vivid imp
#

I love ai bros

red tiger
#

@frank elbow Bro I managed to get Suno to render Project Zomboid music lol

vivid imp
#

Ai generated music is like the definition of soulless

frank elbow
vivid imp
#

What the hell do you think Suno is trained off of

vast pier
#

Dude you can't say chatgpt did fine while actively trying to find out why the mod isn't working

umbral raptor
#

You havent tried saving fifty hours from having to translate LUA files. Specially when its a broadcast thing

vast pier
#

it isn't working because chatgpt did it wrong

umbral raptor
#

But u do u

vivid imp
#

Then why are you here asking us for help

red tiger
#

Would be funny if we found out that the PZ new music is actually Suno.

vivid imp
#

Just ask chatGPT

umbral raptor
#

Cuz im a modder and im debugging

frank elbow
#

If you're going to use ChatGPT at least say that you did that in the initial post that you're asking for help, please

#

Not everyone wants to spend time trying to help debug AI code (only to figure out that's what they're doing, so it'll take much, much longer)

umbral raptor
#

oh should I put an AI-generated content tag as well?

#

Bruh stfu

vivid imp
#

Worlds friendliest modder

frank elbow
#

Imagine asking for help with something you didn't do and being this rude lmao

frank elbow
#

The talk was normal-sized actually

umbral raptor
#

You pretending like GPT generated the file after I typed in like 10 lines

#

I learned Zomboidโ€™s modding and fix errors in its code as well as direct the AI

vivid imp
#

Clearly you did all the work because you wrote what GPT should produce

#

A true AI promot artist

red tiger
#

Bro I told Suno to make "Depression Banjo music" and I composed this bad boy.

frank elbow
red tiger
#

AI is a wieldy tool. /shrug

vivid imp
#

Music and art are about human expression it fucking sucks

#

When a machine makes it

red tiger
#

Machines are made by humans

#

Vegan food is made from decomposing animals.

frank elbow
#

I'm not even wholly anti-AI (though I don't use it myself), but if you're asking for help here with AI-generated stuff it is necessarily going to take longer to help with it

#

So it's rude to not disclose that right away

umbral raptor
# frank elbow

Yeah cuz an AI trained in more LUA programming than u will ever get to see in ur lifetime is gonna write better code than me, a guy who learned LUA a week ago

vivid imp
#

Why bother learning something when the computer knows more about it?

frank elbow
#

This isn't a productive conversation, clearly. I hope you learn Lua and have fun modding, with or without AI

vivid imp
#

Whats fun about modding and most creative things is learning it and perfecting the craft

#

Skipping the whole process is dreadful

red tiger
#

There's like a bajillion different coding styles in this game.

vast pier
red tiger
#

NGL @frank elbow It'd be funny to post an AI overhaul of music as a mod on the workshop to watch the fireworks.

#

It'd scratch the chaotic itch I have to see how far the workshop is willing to go to be toxic.

vivid imp
#

Wouldnt call it toxic considering thats the worst idea ive ever heard in my life

#

Is it toxic to be against things that truly, truly suck

red tiger
#

The idea that people couldn't stand a mod being on the workshop (Without any reason to subscribe & use it), trying to take it down is just the funniest sort of toxicity I could imagine.

winter bolt
#

did i just see someone say they used chatgpt to make ui translation files

vivid imp
#

Yea

#

Then they said they did a lot of work because they wrote the prompt

#

Good times

red tiger
vivid imp
#

Says the man who seems to think their ai music is hot shit

red tiger
#

I never even said that lol wtf you on about bro?

#

You're just trying to start stuff

winter bolt
#

not to join the dogpile but saying "we're leaving you behind in the 2020s" while asking for help fixing chatgpt code is incredibly funny

red tiger
#

I messed with Suno. Doesn't mean I sit in the blind cryptobro AI camp now.

#

Suno is a tool. Use it wisely. Use it well. Doesn't mean it's hot shit if I post something.

#

It's funny to watch people go off about AI in general.

silent zealot
#

One day we may have an AI model that can generate code which is validated so it's at least 100% syntactically correct and does not call imaginary functions, but current large-language models are not that AI.

red tiger
#

If someone thinks that anyone who uses AI, even once is of that mindset, it says a lot more about that person than the people they're pointing at. =)

vivid imp
#

I absolutely detest AI music and AI art to my very core

vast pier
#

"specifically the lua"

silent zealot
#

I once asked it how to do something in powershell - it gave a very detailed writeup on Get-ThingIWanted, except Get-ThingIWanted did not actually exists. But if it did exist, it would have worked exactly the way ChatGPT described it (consistent with other existing Powershell commands)

red tiger
vivid imp
#

Yeah 'if the thing worked, it would have worked'!

#

Truly groundbreaking...

winter bolt
#

i can at least understand using gpt to write lua but using it for the zomboid script files is confusing me

#

to make zomboid script files you literally just copypaste vanilla ones and replace stuff with your own

vast pier
#

Genuinely though Athens I feel like if you just looked around for functions that would simulate what you're wanting and put them together, you would have a much easier time doing it with your 1 week of lua than you would with GPT

silent zealot
#

I use AI generation for some of my mod images - like the backgrounds in these

vast pier
#

Because I would assume you have a functioning brain and aren't just an algorithm fed very specific data and the inability to search for new data

silent zealot
#

Things I'd never actually pay anyone for so there's no loss for artists trying to make a living.

undone orchid
#

sad to see

vivid imp
#

Looks bad

silent zealot
#

Looks better than my drawing skills.

vivid imp
#

At least your drawing skills are your own

winter bolt
#

you could just use screenshots from the game lol

undone orchid
#

is what it is at the end of the day, as an artist see it happen all too often

vivid imp
#

I was shit at Blender a few years ago and im still not great now, but at lwast I spent the time to learn the skill for my icons

silent zealot
#

Compared to getting AI to write code, at least with an image you can tell what you have and not wonder why it does not work.

winter bolt
#

true

#

i dont think using ai to write code is morally wrong i just think its really funny seeing people asking for help and then mentioning they got chatgpt to write it lol

vivid imp
#

Its mostly the arrogance of thinking that writing prompts makes you a developer is what does it for me

silent zealot
#

Agree, taking a "this tool can help someone who knows what they are doing" tool and getting it to do everything is a quick way to get issues that are hard to track down.

silent zealot
#

I've seen that used for image generation.

vivid imp
#

The only thing i like ai for is shitposting and thats about it

silent zealot
#

And there is some skill to getting a prompt to deliver what you want, but it's not that hard to learn the quirks of a model and it's a long way short of actual artistic skill.

vast pier
silent zealot
#

And ironically, because google results are becoming full of AI crap

vast pier
#

you can filter it to only show specific licenses

vivid imp
vast pier
#

I will admit, I have used ai generation for creating a few icons for an older mod I have.
But for most use cases that don't have a very particular art style, I try to make my own or use public resources

silent zealot
#

I'm not making webpages written by AI, I'm using it as a layer in an image I created in GIMP

winter bolt
#

breaking fair use laws to make images online is a time honoured tradition

vivid imp
#

Is one truly a mod developer without taking an image somewhat illegally

winter bolt
#

ive been using an illegally obtained font for all of my mods for years๐Ÿ’€

vast pier
silent zealot
silent zealot
#

Like the core loop of the discomfort mod being based on the stable weight mod, but by the time it is done none of teh origianl code is left.

vast pier
#

yeah I think that's just how coding works tho

#

everyone is branching off everyone else

silent zealot
# vast pier

You need to find the image you want and then verify the license, not trust the search results page.

vast pier
#

I mean it's sorted to show creative commons images specifically. I think if anyone got in legal trouble, it would be google not you

silent zealot
#

May as well just trust ChatGPT at that point.

vast pier
#

I mean or you could just look through images and then when you find one you're interested in you look at the source

silent zealot
#

Or I can quickly generate what I need with a few billion floating point numbers.

vast pier
#

I mean it's not really just generating it with numbers though is it

silent zealot
#

It is.

vast pier
#

And where did those numbers come from, how does it know what order they should be in?

#

If it were truly just generating numbers from nothingness, the images would just be visual gibberish

silent zealot
#

That's why GPUs are so much better at it than CPUs, and why there are tradeoffs with different/mixed precision numbers in models.

silent zealot
vast pier
#

okay but how does it know that's the closest matching

silent zealot
#

That's the initial training; taking a bunch of images of learning what numbers would make those images.

#

And doing it in enough combinations that it figures out the different bits, not just recreating original source material

vast pier
#

The main issue comes from where those training images are sources from, and if they were given with permission

silent zealot
#

(also sorry for completely derailing "using ChatGPT to write code is bad" by mentioning image generation)

silent zealot
vast pier
#

I redirected Athens to try looking at the code for a mod I felt would be relevant for what he wants in dms.

vast pier
#

image generation is like if you just took the image from your brain and photo copied them

#

which don't get me wrong, is a genuinely really cool concept. And I don't actually have much issue with the way you're using it yourself. It's mainly an issue for the economy

silent zealot
#

If an image generation model is 8GB is size it's obviuldy not holding copies of all the source images.

vast pier
#

No it wouldn't need to, it could just need to memorize patterns

silent zealot
vast pier
#

I have very little problem with the way you're using it. I just brought up that you didn't have to use ai for what you wanted

silent zealot
#

Fair enough.

vast pier
#

speaking of public use content

vivid imp
#

Oh woah thats sick

vast pier
#

I use this quite often, and if you look through the icons there's a good chance you'll find out some games you know of use it too

vivid imp
#

To thr bookmarks folder it goes

vast pier
#

I used it to make an icon for an unreleased botanist profession mod

vivid imp
#

This is another great image resource for stuff

#

Its mostly for DnD but you could repurpose it for placeholders which is fun

vast pier
#

I know it's a minecraft resource, but you could repurpose some of the icons

#

as far as I know it's public use?

vivid imp
#

Hmmm thats cool too

#

Ayyy thanks for showing me! Ive been learning Godot and those icons are useful

vast pier
#

some icons definitely have enough pixels to be used in zomboid if you so chose

vast pier
vivid imp
#

Its been a while since ive played modded mc lol

vast pier
#

Genuinely once you start looking through the icon choices, you'll start seeing them all over the place

#

the website is used way more than it's talked about

#

here's the entire icon sheet

silent zealot
#

Last time I played minecraft was with a group working to build a fusion reactor to power all the machines we had.

vast pier
#

I actually think it would be interesting to replace the zomboid moddles with these

silent zealot
vivid imp
#

I mostly just played MC mods where i made nuclear generators lmao

vast pier
vivid imp
#

Beautiful magic had no place in my energy hellscape

vast pier
#

botania on the other hand. That's just a tech mod in disguise, don't let it fool you.

vivid imp
#

I mostly just liked Tinkers Construct

#

Filling the Tinker Tank was super fun

vast pier
#

Tinkers is cool on the surface as a concept, but I grew to dislike it

#

Might just be because I used to make modpacks, and tinkers is very restrictive outside of itself. And it's also difficult to balance alongside other mods or even vanilla

#

Base tinkers is just op and I don't like it really

vivid imp
#

Yeah i think the problem i had with modded minecraft is that balance was kinda nonexistent

#

At least the way i played it

vast pier
#

I have a modpack uploaded to curseforge with like 500 installs, I used to play it a lot and it was curated to how I wanted things balanced

#

I would continue working on it if I had a better pc

vivid imp
#

I just made railguns and no scoped creepers

tacit pebble
#

I just realized OnPlayerUpdate is not speed up when game is speed up. do you guys already know this?

    if getGameSpeed() == 2 then
        bodyDamage:setFoodSicknessLevel(currentLevel - (currentForce * 5))
        print("5")
    elseif getGameSpeed() == 3 then
        bodyDamage:setFoodSicknessLevel(currentLevel - (currentForce * 20))
        print("20")
    elseif getGameSpeed() == 4 then
        bodyDamage:setFoodSicknessLevel(currentLevel - (currentForce * 40))
        print("40")
    else
        bodyDamage:setFoodSicknessLevel(currentLevel - (currentForce * 1))
        print("1")
    end
end

Events.OnPlayerUpdate.Add(test)
vivid imp
#

What do you mean?

#

Do you mean that OnPlayerUpdate runs the same amount even at higher speeds

#

Thats prob for optimization

tacit pebble
#

yep thats what i wanted to say.

vast pier
vivid imp
#

Thats dope

#

I need to get back into game dev ive been hibernating too much this winter lmao