#mod_development
1 messages ยท Page 290 of 1
im currently making new texures for the item icons cause the ones i had were really crappy
well for me, I have 2 mods to update
It would be cool if someone made a mod to make pz like a normal life expirence
Oh man, you didn't hear?
The Sims 4 is on Steam!
Project zomboid is way more realistic it has an actual life alike feeling to it

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



try the day one mod
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.
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."
I Blame Kevin.
I tried them all including week one pz has a life alike feeling its a shame it isnt a life based expirience without the zeds
I like pz the way it is
But it would be cool if they make a pz normal life expirience
Pz patch notes:
- u dont get anything dumb fuck dont u know how hard making a game is get a job
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?
sorry i have no exp with b42 but if its b41 i can guide you
Standard Blue Body Bag and Biohazard Body Bag. I think that may be enough work for one day. l8r, lads
Sims will flee the building lot when a meteor is going to hit.
Unless it is a school, in which the Sims are not allowed to leave, and will always die.
Didn't wanna type it all out again
Sure. Can you hit fools with books yet?
Knowledge is power after all
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
I say this like I don't fully intend to make it so whisks can be used for a few swings
I keep thinking about the mechanics of wet clothes. It shouldn't dry in seconds, but at least in game hours.
Do they not?
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
)
holy crap my new icons looks so good
๐
i gotta fix one before i show it off its not transparent LOL
You're right, it's not constant I forgot about that part. Tho if your goal is to run actions less often, why do you need such an exact one second timer ?
Also you can probably use GameTime.getServerTime() to detect whenever a second passed
Nice !
thank you so much its my first time doing textures
baller
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
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
Can you give an example ? I'm not sure to understand
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
good job, tho is it me or do they seem a bit flat
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?
Upload it as hidden and change them pics to whatevs you want, then make it public
Also I'm not sure but maybe the poster.png can be better than 256?
yea i'm talking about the poster image, in game it asks for 256x256, tho idk where to change that on steam
yeah the preview.png does have to be 256 but do the poster.pngs too?
oh preview not poster yea *
but like, i see all those other mods with good quality preview images, and mine is ass
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
i mean those
Or show us your preview.png and we can see if we should cheerlead you or burn you at the stake
just to be sure, is this all tested? not to cast doubt but you could theoretically do some of the stuff here in b41 with an ArrayList and it ultimately just didn't work for no particular reason - my assumption was that kahlua simply could not pass an array as an argument/return even directly to a function expecting one
otherwise there is something quite silly i can do that was entirely bottlenecked by this that i'm excited to try again
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,
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
I tested yesterday with the enum example and it worked, but I haven't tested passing an object arrayโI did test passing a non-object array and confirmed that it still doesn't work, though
b42 recipes do not have this feature yet 
remove the wireframe
Thanks ๐ have a good day bro

alright that's promising, i'll try it out when i get a chance - i needed an object array anyway
Let us know how it goes if you beat me to it; I might poke around at it a bit more later
the fact that you can pass it into the array constructor should indicate that it'd work anyway
Theory lures us in so practice can gut punch us (but that's true, so hopefully this is true in both theory and practice)
Because FPS aka frames per second....per second.......
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
You can go ahead to make that request for a flexible timer event function.
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 ๐ฆ
i play on 3h ๐
I see mine in bottom right and i literally took screenshot next to a window...
But i guess you mean first 6 mods*
yea i mean the ones that look like they are at least 1024x1024 or smh heh
Make sure your preview has no "anime" in it and youre golden. There seem to be dislike of anime content
pff, no anime is a crime
Maybe not dislike, but more like there are less people intrested in that.
People want MOAR Military gear.
yeah my mods don't cater to that part of the community ๐
Whats your mod about anyway?
You use custom player texture, right? Whats it called
Make an anime military content pack, boom. Gold
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
I kinda wanna make myself custom Ash-12...
Love that weapon in tarkov for some reason
People want good military gear.
So much of it is kinda'..meh..And in reality; you know what I really want?
Good male clothing. Where's my decent flannel jackets?? Turtlenecks??
I want them 3d popped collars smh.
It's a cool weapon but unfortunately for PZ a time-breaker ๐ฆ
What exacly is "good" military gear. Stats? Detailed model/ texture?
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.
There are 2 camps, ULTRA hd 4k enjoyers, then there are vanila like enjoyers.
come on you gotta go all the way in, no half measures
For my tastes, at least.
I'll just say this.
When Arsenal[26] climbs the mountain of updating all of the code required for B42, I'll be playing with Arsenal+Brita's for a hot minute.
I belive recent "Vanilla Gear Expanded" does a really good job at it.
my recipe shows up but not in the craft menu dangit
Yesss; that one is more along the lines of how I like it.
Did you use the B42 craftRecipe thingie? Did you give it a category?
Does the category exist in base PZ?
I've stopped using brita armor/weapons. Those mods DO look Incredible, but as some people say, its "too much" + I hate the thing about Brita backpacks being the same 38capacity and same reduction.
Triple backspace or whatevs, code, triple backspace
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?
No "," on tags.
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.
It's a perspective thing, the other bodybags could fit inside the medical ones.. They also don't hug as tightly to the corpse so it's harder to tell what's in there. And I can sadly confirm from my time as a cop: It's accurate.
I love me Hyzo's Firearms models too. My guns are literally a bunch of cubes and cylinders that I toss at some textures
oh and i bet those comments shouldnt be there huh
thanks i didnt catch that
That isn't how you comment out in .txt's, yeah.
yeah its usually -- in lua
i see, just imo it would look better if it hugged the body, but don't mind me
IIRC brita does 1k texture for shoes alone
Yep, and 2k for quite a lot of their clothes.
Yeah I think Brita is an actual professional 3d modeler
Just like Arsenal[26] is a goddamn White Wizard
They are; but it's extremely bad practice for Zomboid since oversized textures can cause some memory leaks.
Thats great for them and as i said i really love how it turns out. But it feels too much.
Well my 3d models suck ass and use textures made with MSPaint ๐ Give 'em a try lol
He's good but Brita's has a lot of issues. It overwrites a lot of Vanilla functionality which is why nearly every mod has conflicts with Brita's even if it doesn't touch guns.
So it becomes a kind of plague/meme amongst other modders that Brita's is the bane of the workshop in some ways.
Exacly
I don't think that's a Brita's issue though, it's the Gunfighter mod right?
It is; but they're one and the same, essentially. Due to the requirement.
@tranquil kindle it works!
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...
the slow firerate is due to the AnimSets... That I'm STILL waiting to get fixed so my machine guns fire like gosh darn machine guns
I used custom one 
And still? Okay
I knew that gun mods were always gonna be incompatible by their very definition but added guns should work together
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.
I feel like 90% of gun mods are conflicting Only due Attachment system.
You can animate the spinrack for my lever action sawnoff Winchester 1887, and that'll already draw the subscribers in
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.
I suppose you could lua in a way to make attachments work together on a .txt basis, and to insert/modify their upgrade tables
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.
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.
Absolutely
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"
We just need one basic framework, just like those that exist for Traits
But you don't really see mods that override other mods traits, do you?
But in terms of guns, thats what would happend.
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.
don't worry
we are making a better gun mod then brita
Bro made a rotating Gatling machine gun today
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)
And have everyone follow some simple model rules
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.
Oh right, aren't Brita's models .X?
Yeah
I'm basically making the Fluid equivalent of a framework mod so how hard could a Firearm one be 
Fuuu~
so are b41. but X models can be seen on FBX guns so thats not a problem
Us Blender poors deserve respect
Well make it then ๐
We are making a firearm framework with many features, which should be released soon
orly?
what is that?
I'm kinda tired of making gunmods... I'll be updating my TLOG gun mod and thats it i guess
orly roughly translates from internet to English as = "Oh, really?"
https://i.gyazo.com/73fea35692e3a49a3a7b535d6205341e.mp4 You can use this one if you want
I don't understand many abbreviations, but I will learn them
zomg, I will with this permission
we made things like this more easy to achieve
Actual lever moving not included 
Who gives a rat's ass
just write a table and it will work
can someone please answer this 1st question for me, pretty please
test it locally u silly sod
It is, just remember to update them in Fileguid aswell as in clothing item scripts
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
Where can I find this awesomeness?
aight thanks !
https://youtu.be/JGizZoJ_hbE
ASH will do more things like this
Why is muzzle on laser?
don't care about that
I like that, but how will it also work on MP?
If you can animate this with a prop, I will give you approximately 1.25 monies (maybe)
just for test
yes
Now you got me
Could be done, yeah
โค๏ธ
The framework is a community project, and we hope to defeat Brita
You absolutely rock my socks dude/dudette, and I will put public credits on my mod's description ๐
<m_AnimName>Bob_Reload_Lever_RackAimTLOG</m_AnimName> For aiming animname for XML
<m_AnimName>Bob_Reload_Lever_RackTLOG</m_AnimName> For non Aiming.
That feels a bit too much in my opinion.
You can choose which gun packs to use, the main structure is the frame, and everything else is optional, just like true music and its add ons
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
This is starting to sound extra rad
Great to hear it
We like everyone to be able to make their own high-quality firearms
My firearms are very high quality, it's just that the models are stone-age and I barely understand textures.
Am I welcome in this club?
1.25 monies then
That really doesn't mean anything lol
Why 1 second, and no 0.1 or 0.5 or 0.2 or 0.8 ?
Why do YOU specifically need 1 second
Not sure to understand the applications
It's not too common that you find yourself needing to mess with a raw Java array so that's fair, but there are a few places that return them
Pretty much anywhere that's the case would benefit from the new class
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
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
Tbf I'm mostly confused at what it even is. It's to create a new array right ?
Yes, but a wrapper for a Java array. This is distinct from an ArrayList or a Lua table
Bcs the way you put it makes me confused if that's what it just is
We haven't had access to Java arrays in the past, so anywhere that used them was rendered p much unusable from Lua
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
Like you can use it for cases where you need to pass an empty array to a java method ?
which was what i needed it for
potentially ArrayList#toArray did actually work in b41, since that's what i tested it against as well
By variable arguments do you mean overloads, or variadic?
Or a populated array
variadic, like Object...
it was my understanding that that basically compiles to Object[] anyway but it doesn't seem to like it
Odd that that's not handled. Maybe that explains why the devs so frequently do the arg1, arg2, arg3 (and so on) thing ๐ค
Uh, just an argument of a method
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)
I'm not knowledgeable on the technical aspects of Java tbf
That was @ Albion; response to you was yeah + populated array
What's the function, if you don't mind my asking? I'm curious
i believe it has security implications so i don't want to specify exactly what i'm doing
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
yeah, i tried just passing the args raw but it doesn't like that either
any clue what to do with this? ๐
LOG : Lua f:1125, t:1736530670800>
https://i.gyazo.com/b43909c708e079f80154ade0d4a1564a.mp4 Not done, but overall idea. My gun model is too long though.
Tried drawing spiffo and then realized Im doing it in lowest quality from start
It's also in reverse but I will already get ready to accept your proposal
Isnt he rotating it barrel down forward?
On video*
you gotta add that part where it opens like here
I made it just for laughs and to unrust myself, but will try make it better.
You rock either way ๐
Why would someone create a Java array and use toArray if all the mod's logic is on the Lua side?
Anyone knows how to apply a recipe programmatically in B42? For example I want to apply this recipe: Recipe_OpenBox100 = "Open Box (100 Items)"
they would not
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
Is it possible to make the watering can water more than one tile at the time?
that's an empty print
print("")
Or possibly another print with a line break "\n"
whats the lua for checking if a mod with ExampleId is active?
thx, I thought it was some kind of error or something
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?
getActivatedMods():contains("\\ExampleId")
in build 41 you don't need the \\
At this point it is becoming ungenuine. Can you be upfront about what are you unhappy with the suggestion?
thanks, does this mean in B42 you need the \ or was that for previous builds
yeah, it's new in b42
ok and just to clarify further, it's not needed in b41 but can still be used or should only be used in b42?
it will not work in b41
I feel like I'm either missing something obvious or the answer will be silly, but why does this work if the IDs are workshop ID + "\\" + modId?
because the workshop id does not get added ๐คทโโ๏ธ
It was option B
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
I made my pattern matching optionally look for a number instead of requiring one, so at least what I wrote isn't broken ๐
yeah, i wrote something similar early on
most likely every mod with a dependency breaks next patch when they fix that
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?
yeah

"\\ExampleId" is the mod id for all contexts now
reeee
(well it's \ExampleId but you need the second one to escape the slash)
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)
That sure did fix it. Well, that's one thing out of the way for now at least.
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
I've never had a steam workshop upload fail before but I just had one, lmao.
I just did it again and it worked.
i've never had a steam workshop fail that wasn't just steam doing it for fun
Steam just trying to keep me on my toes.
You could make so if you have high enough reloading skill, that animation kicks in maybe? ๐
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?
when hooking a java method, your hook will only apply to lua calls to that method
Hmm.. I see, is there anything I could do to make it work?
i would guess the button probably calls Safety.toggleSafety, so you can probably hook that
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! ๐
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?
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
hm.. thank you
Anyone know what these logs are? Front trunk spawns loot just fine, capacity is affected by condition, etc.
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
Thank you very much, everything worked out ๐ค
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?
Sandbox options ? ๐
Are they changeable while the server is running? ๐ค
Yea I believe so
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.
Do Gas Tanks get distributed in-game?
Right now I just want the admin to be able to change a boolean easily so that players can only change their safety inside a safehouse they have permissions to. Basically a hooked function
Update: Thx, sandbox was exactly what I was looking for! ๐
New debug tool found ! Imgui was accessible since the start
https://pzwiki.net/wiki/Imgui
Can someone tell me why my empty alcohol bottle is showing up as fluidcontainer?
Bcs it is
You need to define the name in a different file
Translate file yea, same thing, you can see the file name at the top
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.
Nice !
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?
That's an interesting question lol
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
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
How do I add a context menu option?
Like when you right click an item and it says open?
Search for "addoption" in this channel bad advice, ignore
that link is an exampel of adding a context menu
Does my code make sense? It's not working
It's in the lua/server folder. The mod's name is AlcoholEmpire (if that's an issue with localization) not FermentationMod
how can i check for tags in recipes?
added clothes, is there a way to have Zombies wear them?
Mabbe you should check Authentic Z mod, they have Freddy Cruger, Jason, Michael Jackson and many more clothes
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 ๐
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)
Is there any function to get these preset locations?
I imagine something like: cell:getVehicleZones()
can we use it even if we intend to make a mod for b41?
also i use nosteam and it opens up b41 (which is what iwant for now) how do i make it open b42 tho
is there any way to hide recipes
@lavish kestrel an i would like to invite you to try drugs ^-^ ehh moo
https://steamcommunity.com/sharedfiles/filedetails/?id=3404956403
why error?
confusion...
weird... i mean the link works.. just didn't showcase
Did you just upload it? Takes a few minutes for a mod to be publicly available
^ ight bet
How do you even start to balance a drug mod when a 1/4 can of soda is the ultimate survivor medication?
We did!
It shall probably be an ongoing thing haha. But hopefully I did a decent job to start!
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
we plan on coding each grain of cocaine molecule for micro dosing
Crack to clear fatigue, smoke a cigarette to clear the stress from the crack, perfectly balanced.
EACH!?
XD jokes
Sandbox options: mg per snort
Don't forget LSD for Boredom and Unhappiness
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
I see one for reload and rack, not fire
OnPressRackButton, OnPressReloadButton
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.
no
unless you want to backport it after making it for b42
I'm lucky my mods were all easy to migrate to B42. And by "lucky" I mean "I only make very simple mods"
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?
what does it even do anyways?
and also do you happen to know how to control which version loads for nosteam
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
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.
just finished 2k textures for my character xD
Hard to blend in in 1993 Kentucky... ๐
Put Anything Into Anything is steadily coming along.
now that's something i could use, there's never enough room for all the trash i gotta pick up ๐
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.
It also lets you hold more than 50kg in your main inventory, so you can actually pick up bags contgaining 500kg stuff to equip them.
Is it just the vanilla 2x scope being attached?
If so, you at elast know the scope object is good.
There goes my dream of a crossbow with red dot scope, laser targetter and gun light.
Does anyone know where the Vanilla OnCreate lua code functions are stored?
Laser and Reddot work in Editor, but none in game. ๐ฆ
lua/server/recipecode.lua
np.
Are there any mods that use async aside from netcode commands? I am trying to figure out how todo it with PZ Kahlua. Perhaps this is the right direction?
https://www.lua.org/manual/5.4/manual.html#pdf-coroutine.wrap
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
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.
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
There is os.time so it's possible to make a mini framework for timed functions, e.g. DoTaskInTime(fn,5)
Also see "OnTickEngine" via Ctrl+F that I posted here earlier.
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
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.
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
yeah, i actually wrote something like this this morning
well actually mine doesn't deal in real time yet, just ticks
i get you, this just isn't really a style lua supports well
there's no possibility of concurrency in the current api, it's straight up impossible
This is the main optimization: ๐
TASKS[task] = task
you can emulate an async/await style-wise for certain things using coroutines but ultimately everything will still happen linearly in one thread, and the complexity of doing so will probably have it end up running worse too
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?
replace
it's up to the individual parameter, there's no consistency. generally replace is more common
Fair. So, the safe bet would be to attempt to get the current value, and replace after appending.
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
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)
Yeah, I was running into this.
replacing it is easy, additive is difficult
I can just hardcode the string, but its not future safe ๐
DoParam must add the parameter if it doesn't exist
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.
i just get this constantly whenever i play
walking around a bit will give me a couple errors just like this
Ah ok, then thats not it ๐
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?
Wrong chat bro lol
I figured my issue out, my Origin in my model was wonky
Anyone have any thoughts on making an item destroy itself when it hits the player inventory, OR preventing an item attachement from being detached?
You can open B41 with imgui ??? 
Modify the context menu so that the option is disabled (red)
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."
}
sandbox-options.txt
option Playmode.OnlyInSafehouse
{
type = boolean, default = false,
page = Playmode, translation = Playmode_OnlyInSafehouse,
}
Sandbox_EN.txt
Sandbox_EN = {
...
Playmode_OnlyInSafehouse_tooltip = "..."
}
how do I get all these stacked items when right clicked? using OnFillInventoryObjectContextMenu only returns 1 unless I manually highlight them all
Now I just need to figure out how to kill the muzzle flash.
That is a great idea.
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.
i thkn when you get the display name it includes the (Fermenting), maybe you need to store the origName in mod and use that when you set the new name
what do u mean?
Thanks, it works! ๐
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)
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 ?
no i just asked if you could , albion said you cant ,
my next question was
how to open b42 via no steam cuz its only opening b41 for me
even tho this is what i want for now
but in the future i might need b42
i do mods via nosteam so i can test mp
i would use inventory:FindAndReturn() to fetch the item
if its found the remove
for event
perhaps trigger it onplayerupdate or 10mins or something
this is your code item:setName(item:getDisplayName() .. " (" .. AlcoholEmpire.States.FERMENTED .. ")")
- item name = Steel Fermenter with Airlock (Mead)
- you set the name its now
Steel Fermenter with Airlock (Mead)(Fermenting) - then your function triggers again, when you log
item:getDisplayName()it will returnSteel Fermenter with Airlock (Mead)(Fermenting).
So this codeitem:setName(item:getDisplayName() .. " (" .. AlcoholEmpire.States.FERMENTED .. ")")will result toSteel Fermenter with Airlock (Mead)(Fermenting)(Fermenting). - if your function triggers again, when you log
item:getDisplayName()it will returnSteel Fermenter with Airlock (Mead)(Fermenting)(Fermenting), then so on.
This happens because you are using item:getDisplayName() which you are changing every time
item:getDisplayName()+ (Fermenting) =Steel Fermenter with Airlock (Mead)+(Fermenting)=Steel Fermenter with Airlock (Mead)(Fermenting)item:getDisplayName()+ (Fermenting) =Steel Fermenter with Airlock (Mead)(Fermenting)+(Fermenting)=Steel Fermenter with Airlock (Mead)(Fermenting)(Fermenting)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 .. ")")
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?
No idea I never use no steam
I assume nosteam is not useful when you you need more than 1 client on the server to test stuff?
Oooooooh KI5 is back on B42 babyyy
What are the glitches?
"eฬจ" != "ฤ"
its offline so you cant connect to hosted server
only on your local system
maybe local host
and maybe other server means that doesnt use steam
Yup, thats what I mean. Host the server on your LAN, connect with clients on the LAN as well.
That looks like a tracer for the bolt, not a muzzle flash?
He probably meant flash when you fire firearm that lights up surrounding area
oh, he didn't show that in the video, but that would make sense
Udo, are you working on an aiming system similar to Advanced Trajectory?
I think that's just the build 42 aiming
Is there a reason why there aren't any mods that make it so pants and other articles of clothing have pockets?
I dont see why not, there are pocket icons as well in the UI pack.
I say icons, its an icon
maybe there's a system limitation
or just nobody has thought to do it
the only mods I see related to pockets are vests
I think the latter
That was something I wanted to delve into myself
Just too busy with what i got
wack
Does anyone know how I can make a tool-tip progress bar like the cooking one?
Why you need pockets if there are bags?
same reason to wear a fanny pack?
more storage
So you need a mod to make bags better.
I saw a message appear and disappear
Having 20 containers is not a good idea
what no I don't want a buff to bags, I want pants to have pockets
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
I mean I don't think it can directly increase capacity, so it would be like carrying a sewing kit in your secondary
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.
https://imgur.com/Eufj5wP
Does anyone know how to fix that the numbers do not overlap each other? I don't know how to do it anymore.
It counts all pockets to increase main inventory limit.
Does anyone know how I can make a tool-tip progress bar like the cooking one? It tracks progress from my modโs script.
Make a timed action.
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
Is it a lua or media script?
It's a Lua for a custom action.
It's on tooltip. It's somewhere in lua files..
It goes in Lua/server right? In a seperate file for this timed action?
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
use the tool from TileZed
- You know that there is a word "Burning" for sure.
- Go search in game files
"Burning"(here are quotes because it's an entire phrase)
- The result: few filenames including IG_UI_EN.txt
- Read it. Find the word.
- The result: a string
IGUI_invpanel_Burning = "Burning",
- Search the word
IGUI_invpanel_Burningin all game files
- Thre result: a file ISInventoryPane.lua
- Read it.
- The result: this word is in a function
ISInventoryPane:drawProgressBar
- 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.
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
I guess it's non-ascii symbols in file paths. What is the name of your OS account (C:\Users\<your name>)?
Do they have to be extracted into C: ? I tried Desktop.
Thank you so much โค๏ธ
tbh I also tried to unpack it once but it didnt work
download zomboid modding tools from steam
the tiles are there in pngs
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?
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
Might be due to outdated software?
maybe
but i use the pngs from the tools when i need them
why exactly do you need to extract them
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
Because I want to customize existing erosion tiles and the ones that are in tiles2x are the only ones that are used in the game I think.
You mean like make a safehouse's claim area be bigger?
That's in the admin tools, I think it's called "Add safezone".
A safezone is exactly what a safehouse is, and an admin can add players to a safezone after making one
can't you do it using the pngs?
yeah im just having trouble finding it within the admin tools D:
from the modding tools
Isn't it in the admin panel button's options?
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?
It's been more than 6 months since I used it but I know it's there somewhere. Just look for something-something safezone
hmmm maybe iso regions?
I wish I knew how, but there's just a lack of tutorials of how to do such a thing. I've searched the web and most are like a decade old.
Could you provide a good one that works for modern use?
actually i have also never found a good one tbh
where are the erosion tiles in the 2x
what number in the list?
no luck :{
Tiles2x25
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
Thanks, should I name it "tiles2x"?
I am not. I see no reason to. Just making a modding resource to turn a standard firearm into a "Crossbow"
that is the part that i dont really know bc i never replaced them but i guess it should work
Yah my bad, I havent seen the new B42 aim cursor.
you also have to put it in your mod info
I thought they didnt touch the combat system
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
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
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?
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?
Oh, no problem, I'm just not heading in that direction ๐
The startmuzzleflash is at media/lua/shared/TimedActions/ISReloadWeaponAction.lua
I've been thinking about how to disable the same thing when using one of my suppressors ๐
ignore me using mods that change the muzzleflash to look better
replacing a texture is a tiny bit easier than disabling a lua function's start_event_thingie ๐
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
New page about Sandbox options
https://pzwiki.net/wiki/Sandbox_options
hmm speed bump on this idea which may be why it's not a thing.
Turning clothing into a container means it can no longer get holes in it
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
Follow up to this- does anyone see any like glaring issues with my sandbox-options.txt? The dropdown menu isn't showing the option listed.
Sandbox_EN = {
Sandbox_WhoWeWere = "WhoWeWere",
Sandbox_WhoWeWere_HobbyOne = "HobbyOne",
Sandbox_WhoWeWere_HobbyOne_option1 = "Never (Not recommend)",
}
Never mind once again! The updated sandbox page was majorly helpful.
Doggy Jvla is on it with the wiki update, its great to see
I could possibly get around this by overwriting the pants instead of editing with lua, and create a new set of recipes that don't involve the holes. This would make it less compatible with mods, but would get rid of the rags issue and wouldn't spit out errors
This may be the path I go with, since idrc if the pants are suddenly impervious to holes
yeah its honestly so good ๐
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?
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
thx, that was hella complicated, but sure finally released my first mod i worked on for 2 weeks.
nice, what is it? as far as I know, you can link mods here
trying to fix a last thing i noticed after releasing it, few secs
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.
found it, very nice ๐
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 ๐
aight
what kinda car is this?
It's super easy to do - BUT you need to change the Type to Type = Container which means every existing item in a game will be destroyed on load when you enable/disable the mod.
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```
Yes if you scroll down further you'll see the actual problem with containers not being capable of having holes, causing an error with the rags recipe
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.
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
hahahhah
taking them off or dropping them makes them instantly disintegrate
The Kings new Clothes
There is a "rip worn clothes" recipe seperate to "rip clothes", does that offer a hint?
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
I hope so, I do it whenever I release a new mod. It's not like the rate of new mods will fill the channel with spam.
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. ๐
just put a disclaimer that enabling the mod invites the underwear god who will bless new worlds and vanquish the filth of olde
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.
sounds like a skill issue and not your problem
hahahahaha
Steam workshop -> ...Or Are yo Just Happy To See Me? mod -> comments -> disable comments
solved.
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
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.
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?????????
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
no because I have some mods for kenshi that I made, that show what npcs/shops the armours are given to
nobody reads the description, and that's their fault and their problem but it will make it less annoying for you to deal with
and I still get comments about "what npcs can I find these on??"
not an exaggeration
that's the problem, that's a block of text
It's the only image on the mod page
nobody reads a big block of text, same issue as the description
no the problem is the 4% of people who wanna express themselves and not read.
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
no hate to this guy btw
the solution is to disable the comments and put a link to pz discord mod support in the description
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
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)
These copy the stats of the cargopants versions, weighing slightly more with a 0.8 price mult instead of 0.7.```
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
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.
easiest solution is to add "SPAWNS ON NPCS" as a header at the start of the description lol
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???
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?
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.
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?
That's a really good idea
Maybe a gif with blinking red WARNING
half the description and workshop images become solely dedicated to warning you that the mod will cause your old underwear to be eaten by ravenous zombie moths
is this happening for every item or just the gay pride bracelet?
cuz it looks like it's missing the right hand model
I hate that! Making a mod doesn't mean "I think this should be a base game feature" it means "people can choose this if they want, or they can ignore it"
Hardcoded 1990's Kentucky attitudes to gay pride?
just this one, and i can wear it left and right, just the ground model is a icon
i deleted the icon and its still showing up ingame, this is weird lol
well the error is specifically saying a model is missing
no such model "???.PrideBracelet_gaypride"
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
also images and textures are saved to the game cache, deleting the icon wouldn't do anything until you restart the game
I had the same issue, turns out I forgot a , in the world models file
they should be freed when they stop being used, at worst when you exit the save
This one
--
Anyone got an idea why this entire mod is broken? lmao
specifically the lua shared scripts and recipes
I added everything related to recipes and it aint working
what was it
<
??
the < is missing
\clothing\clothingItems
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>```
im still not sure whatbroke, im just glad it got fixed
I was looking at it to see what broke before you found the guid problem
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
B41 or 41?
B42
did it previously work in 41 or was it built of 42
Built
Its new
Lets focus on the recipes
Can you tell me why it aint appearing ig?
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?
Well. GPT wrote it. I gave him the base game coding for recipes and a modโs to use as references
chat gpt cannot write zomboid mods
I did check it and found nothing weird
Yeah IK, but it can try
Which sometimes works
ah then the problem is probably just cuz chatgpt
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
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
It scares me when people talk about GPT like a living person and not a horrific plagarism algorithm
@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
Its not bro. You aint a plagiarizer if u use a calculator. It makes life easier and does calculations for you instead of you spending several weeks making complex calculations by hand cuz then you made effort and aint a plagirizer
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
a calculator actually requires you to know what you're doing
"Bro trust me im an expert at this i type a few lines into a machine and it spits stuff out at me"
Anything worthwhile you have to actually learn
So if you want to be good at modding actually learn it
lol yall stay in 2020, we goin into the 2030s and leaving ur ass behind
Imagine copyrighting maths.
I love ai bros
@frank elbow Bro I managed to get Suno to render Project Zomboid music lol
Ai generated music is like the definition of soulless
This is so funny juxtaposed to the plagiarism discussion above lol
What the hell do you think Suno is trained off of
Dude you can't say chatgpt did fine while actively trying to find out why the mod isn't working
You havent tried saving fifty hours from having to translate LUA files. Specially when its a broadcast thing
it isn't working because chatgpt did it wrong
But u do u
Then why are you here asking us for help
Would be funny if we found out that the PZ new music is actually Suno.
Just ask chatGPT
Cuz im a modder and im debugging
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)
Worlds friendliest modder
Imagine asking for help with something you didn't do and being this rude lmao
Bruh big talk
The talk was normal-sized actually
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
Clearly you did all the work because you wrote what GPT should produce
A true AI promot artist
Bro I told Suno to make "Depression Banjo music" and I composed this bad boy.
AI is a wieldy tool. /shrug
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
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
Good self image there
Why bother learning something when the computer knows more about it?
It's not trained on Zomboid Lua code, as people have tried to point out
This isn't a productive conversation, clearly. I hope you learn Lua and have fun modding, with or without AI
Whats fun about modding and most creative things is learning it and perfecting the craft
Skipping the whole process is dreadful
I think the AI trained on that code would need to be admitted.
There's like a bajillion different coding styles in this game.
I mean if you wrote it yourself, it would probably be actually working
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.
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
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.
did i just see someone say they used chatgpt to make ui translation files
See that stuff is as funny as people blind-raging about someone doing anything with AI.
Says the man who seems to think their ai music is hot shit
Wait.. Wait a goddamn second lol
I never even said that lol wtf you on about bro?
You're just trying to start stuff
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
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.
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.
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. =)
I absolutely detest AI music and AI art to my very core
"specifically the lua"
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)
1000% hilarious content.
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
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
I use AI generation for some of my mod images - like the backgrounds in these
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
Things I'd never actually pay anyone for so there's no loss for artists trying to make a living.
sad to see
Looks bad
Looks better than my drawing skills.
At least your drawing skills are your own
you could just use screenshots from the game lol
is what it is at the end of the day, as an artist see it happen all too often
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
I do that too - the guy w/ chickens is a hacked up couple of screenshots, the car dashboard, a lot of other mods are easy to show with a screenshot.
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.
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
Its mostly the arrogance of thinking that writing prompts makes you a developer is what does it for me
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.
"prompt engineer"
I've seen that used for image generation.
The only thing i like ai for is shitposting and thats about it
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.
Why not just go onto google and look for commons licensed images?
Because google will return a bunch of stuff that isn't common licensed.
And ironically, because google results are becoming full of AI crap
you can filter it to only show specific licenses
So how does making more ai crap help
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
I'm not making webpages written by AI, I'm using it as a layer in an image I created in GIMP
breaking fair use laws to make images online is a time honoured tradition
Is one truly a mod developer without taking an image somewhat illegally
ive been using an illegally obtained font for all of my mods for years๐
I try to avoid that - I even put comments in code when I stole built upon the base structure of another mod's code.
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.
You need to find the image you want and then verify the license, not trust the search results page.
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
That's not how copyright law works.
May as well just trust ChatGPT at that point.
I mean or you could just look through images and then when you find one you're interested in you look at the source
Or I can quickly generate what I need with a few billion floating point numbers.
I mean it's not really just generating it with numbers though is it
It is.
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
That's why GPUs are so much better at it than CPUs, and why there are tradeoffs with different/mixed precision numbers in models.
That's actually kinda how each iteration works, with the magic being "and then pick the version that is closest to matching the prompt"
okay but how does it know that's the closest matching
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
The main issue comes from where those training images are sources from, and if they were given with permission
(also sorry for completely derailing "using ChatGPT to write code is bad" by mentioning image generation)
Do you worry about the images a human artist used to learn how to draw?
I redirected Athens to try looking at the code for a mod I felt would be relevant for what he wants in dms.
Well no because the difference is the skill to turn the image you see in your brain from looking at it into one you made
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
If an image generation model is 8GB is size it's obviuldy not holding copies of all the source images.
No it wouldn't need to, it could just need to memorize patterns
Would have been nice if AI was doing all the shitty menial work so human could write and do art instead.
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
Fair enough.
Oh woah thats sick
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
To thr bookmarks folder it goes
Our 2-Minute token editor โ customize our growing collection of fantasy heroes and monsters. A token maker for Roll20 and similar virtual tabletops.
This is another great image resource for stuff
Its mostly for DnD but you could repurpose it for placeholders which is fun
The largest collection of Dokucraft, The Saga Continues textures.
Log in to submit your textures and become a contributor.
I know it's a minecraft resource, but you could repurpose some of the icons
as far as I know it's public use?
Hmmm thats cool too
Ayyy thanks for showing me! Ive been learning Godot and those icons are useful
some icons definitely have enough pixels to be used in zomboid if you so chose
yeah! If you know the minecraft mods Thaumcraft or Botania then you'll recognize some of the icons in game-icons.net
Its been a while since ive played modded mc lol
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
Last time I played minecraft was with a group working to build a fusion reactor to power all the machines we had.
Mining rare ore from the nether and building a giant complicated structure that needed very precise placement of blocks...
I mostly just played MC mods where i made nuclear generators lmao
My zomboid mod actually uses an icon from the website
https://steamcommunity.com/sharedfiles/filedetails/?id=3399569763
Beautiful magic had no place in my energy hellscape
Thaumcraft makes a great mix tho, since it's artifice
botania on the other hand. That's just a tech mod in disguise, don't let it fool you.
more icons from the website
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
Yeah i think the problem i had with modded minecraft is that balance was kinda nonexistent
At least the way i played it
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
I just made railguns and no scoped creepers
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)
What do you mean?
Do you mean that OnPlayerUpdate runs the same amount even at higher speeds
Thats prob for optimization
yep thats what i wanted to say.