#mod_development
1 messages Β· Page 480 of 1
Off hand I don't recall, but I believe that is right, but, also, look at the vanilla item scripts for the proper examples on how to do stuff?
You use a model script to define a model, and WorldStaticModel to define what model a script item uses for the world item.
Did, just wasn't sure as the BlowTorch just has BlowTorch as StaticModel, in models also BlowTorch and the models_x Blowtorch so wasn't sure when which exactly would be used, especially with the model file having a lowercase t, but the model definition an uppercase T. But thanks!
There's a lot of things that muddy the waters with this model business for sure.
Really, looking at the way vanilla stuff does things + extensive trial and error is the way to understand things and I strongly recommend that people put in the work in that way so they "understand" things versus blindly following a checklist?
I mean, if it works, it works, but in the big picture learning via investigation and experimentation will be significantly more fruitful, you dig?
I do, nevertheless thank you!
No problem.
Yeah, I'm not trying to be cranky or gatekeep with this putting in the work business so much as it makes people more self sufficient and skilled?
A lot of people who got the answers handed to them, months or even years later, are still flailing with really remedial mod matters.
I understand now why some of my instructors in school were such bastards about pointing me at the direction of the solution instead of giving me it π
Kept away from adding new items (with new models) due to confusion with .x files and all (actually even overlooked the models_items.txt file up to now until you mentioned it, which actually gives me some confidence now :P)
.x files are absolute trash and a gigantic pain in the ass to work with and are being phased out for .fbx. Use .fbx instead
Also, learning via investigation and experimentation, and the associated skills one learns with troubleshooting and how the files directory is laid out pays off in spades when updates & changes to PZ vanilla mess everything up, so that's another reason I try to keep harping on that approach.
Is what i (atleast try to do) with lua, though 3d models are a completely new territory for me, so i may fuss about it more than necessary. And given the current topic i just had to jump in and askcough cough... if there's a chance for an easy way, i usually do try to take it (yes, it might not be the best thing to do, i know that myself π )
I mean, ultimately, my gentle efforts in encouraging people to put in the work using the investigative/experimental approach so they learn the fundamentals as well as build understanding amounts to me trolling myself so π€ͺ
But I'm am neither intelligent or knowledgeable, i'm just a stoned caveman that plays with lego pieces until they work.
So I encourage playing with the lego as it worked out surprisingly well for my empty peabrain?
Well, you did pretty much answer my question instead of directing me to it, so it is kind of the exact opposite of what you encouraged me to do π
And well, instead of just playing with the lego pieces until it works, you do remember on what causes it to work, which means you learn. As such, I wouldn't say you're not intelligent or knowledgeable (especially in regards to knowledge, no one can know everything)
Well, in the big picture I've had a lot of people with ambitious ideas ask "how do I do this", and all I can say, in absolute good faith is "You're going to have to do a lot of learning before you'll be able to tackle that"? Not just the specifics of PZ modding, but also stuff like fundamental troubleshooting skills; being scrupulous with formatting; learning how the file directory for PZ is laid out.
Like nobody "told" Bruce Lee how to be a martial arts whiz? He put a lot of time and effort into it to be able to do what he did.
You gotta learn how to walk before you learn how to fly a jet plane and all.
You mean image transparency? I use an image with it and it works.
nice
can paw low loots mod be downloaded and enabled mid playthrough?
Yes though anything new added by the mod won't appear in areas you already explored. Also the mod is severely outdated AFAIK and likely won't work.
Yeah, people are gonna have to be patient regarding PLL being updated for the distro changes.
I mean, I keep repeating this, but the distro changes in PZ Vanilla have not been finalized, so, if anything Paw Low is being smart in waiting for this whole business to be wrapped up before updating?
I didnβt realize that many mods got ran out of commission from this new update
Mainly mods that deal with loot tables. So lootable stuff. It happens and as Algol said it's ongoing.
And even aside from the distro changes, there could be other changes with future updates to build 41 that breaks a lot of mods?
Ultimately both making mods, or using mods, for an in-development beta build that isn't stable is an exercise in living in a sand castle?
One wrong breeze and the whole house of cards could come tumbling down.
P sure Paw said he isnt updating till it hits stable branch
Same for the guy hwo made swatpack
Probably the smarter move, like you said
Nuka Cola π
Lots of transparencies overlapping? Probably not lol
Yeah, can't say I blame either of them for that.
All thsi fucking around with the build 41 beta is a dress rehearsal anyways,and not the real deal IMO.
It's almost like we're learning alongside the devs 
it's not about transparency
so you really do need to optimise them
well well well
who would've thought that my words about 1 million tris car were right all along
huh, fair enough, My first though was that having a lot of overlapping transparencies was tanking it
About that, i won't make it transparent
Looks off and has some glitches i can't fix
think that'd only apply if the game wouldn't render what's behind something else.
heh
looks very based
Can you use the bottles for water after / collect the caps? :0
i don't really know if you can do both but now after it's depleted it gives you a cap
please do the quantum next, maybe you can make the drink inside neon, to give it a glowing look?
wtf are you talking about, i didn't even started making the regular one lol
this shit ^ is a prototype made with no effort whatsoever
How can you make it look better?
Just... make it look better?
idk
I recall there being an onuse function for smoking
Alternative: require the bottles be opened
Even by hand
maybe you could make it have a fogged and water droplets, if its in a freezer, ice cold nuka cola
who will code it?
no one, because its just frosting on a cake not needed
@nimble spoke is the only one that I know that dose commissions
for a shitty model it looks good
Commissions?
you pay he codes, and depending on how hard, the price goes up
But it was never intended to be my mod
Why not, I am sure the code for it could be easy to make, using drinks and other code already in PZ
Or you could just shelf the project
Well i thought i will make models and someone could make the mod
@lethal sparrow seems to want to make everything in their mod, without any outside help, you could maybe ask shark, doubt he would want it
Damn you really want that nuka cola
It will look badass for dΓ©cor
I could try asking Snake, he has a large food mod, want me to ask him?
is it released?
yes
Le Gourmet Revolution
So want me to ask?
ye, why not
message sent, will tell you what he says, when he gets online
Fuck it, @craggy furnace want to make a nuka cola mod, maybe you can make a vertiabird from fallout, and when crashed it spawns nuka cola.
Well, the only one I've actually done was very simple
It's not like i can afford paying someone
I don't even have moneys to pay for my internet this month
fuck it, ill put up the funds, how much would it cost?
what is the idea? I just answered the ping
Nuka cola, mod, it will spawn in the world, and give a cap when ever drinked
which a bunch of other flavors
Do I need to make icons and models?
Only code i guess?
hhmmmm sounds simple enough. BUT, you would need to provide all possible flavours beforehand, I so I know exactly how long it will take me to finish it
Adding new flavours later isn't included
ok, so 8 flavours. When you drink it you get cap and empty bottle. They spawn in proper fridges and other containers? That's all?
https://www.youtube.com/watch?v=XH_ILMre9h8 would adding this sound effect be possible?
WHY is this f*cking masterpiece not on YouTube!? :D
And yes they will spawn in fridges and other containers
Will making them be 3D place able items require extra code?
No, as long as they are 3d models you can place them
Well i mean it's just the texture change isn't it?
No, but it may require separate ground models
yup thats it
ground models and hand models often need different placement, which I think can be done in the txt file
https://fallout.fandom.com/wiki/Nuka-Cola_(Fallout_76) here under variants shows you
oooh, so that's why my model was so wonky
Yeah, some vanilla items have 2 separate models, but weapons use a txt offset for ground placement
it pierced my fucking head
π
scufffed
About the sound: I don't know what changed in the recent update so I can't really say how sound modding is going right now
also looks like the model is upside down
have literally no idea how the game handles it in hands
got it
on the ground it looks normal
did you change its size to match that of an in game item when in blender?
Oh ya also soul, the drink should act like coffee, in the lore that shit is filled with sugar and other chemicals
well, both
very strange,
it's in the middle between the water bottle and the pop can
i imagine this is it's size irl?
ya and that should allow it to work correctly
yes
how strange, can you send me the file?
ill put it in my mod and try to see where its going from bottle to spear in your face
Hi, can i create 3d cardboard boxes and make it so that items can be stored in them?
yes
ok how can i do this if 3d models are ready?
look at code of some backpacks in the game
I find all of this funny since blackbeard's tutorial on modding covers nuka colas
yet they are 2d
where can I find this code?
in the game files?
You can use an ContainerItem as a reference, like a briefcase
item Suitcase
{
WeightReduction = 50,
Weight = 3,
Type = Container,
Capacity = 16,
DisplayName = Suitcase,
Icon = Suitcase,
RunSpeedModifier = 0.98,
OpenSound = OpenBag,
CloseSound = CloseBag,
PutInSound = PutItemInBag,
ReplaceInSecondHand = Bag_Suitcase_LHand holdingbagleft,
ReplaceInPrimaryHand = Bag_Suitcase_RHand holdingbagright,
WorldStaticModel = Suitcase_Ground,
}
...\ProjectZomboid\media\scripts\clothing\clothing_bags
Hello, my dear pz friends. I have a newbie question for you pro modders out there.
Is there any way to increase the number of tiles on an existing building (Building Editor)?
Thanks for any help in advance.
This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.
0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...
How do you apply textures for mods? I think you use xml but I have no idea
There's an option I didn't see. "Resize Building". Thanks.
just replace the current texture for what you want, check guides on pinned messages
Is it possible to make new zombie models/animations?
well, apparently is IMPOSSIBLE set a model to any item Clothing, but exist another option, set a itemClothing as another clothing
itemVisual:setItemType("Base.Trousers_DefaultTEXTURE_HUE") -- just replace model
-- or
itemVisual:copyFrom(zombie.core.skinnedmodel.visual.ItemVisual) -- replace all atributes
while it is possible to make new models and apply them through hidden clothes, I guess animations would affect all zombies
@lethal sparrow I'm sorry, one thing let to another and boom
well mainly I was curious if I could turn zombies into xenomorphs
I saw this image on artstation. and I noticed the models are kinda like the ones in PZ. While obviously I would not steal thier work, it did get me thinking.
You could turn zombies into zombies wearing xenomorph costumes, but nothing more ambitious than that.
Or you could wait until animals are added to PZ with build 42, which will explicitly allow for stuff like that.
hmm we are still waiting for build 41 to come out of beta right?
Everyone mostly waits for MP
ah
I kinda wish i could learn how to mod this game
It's pretty simple
I dont think
if anyone here uses superb survivors can i ask why there is no npc spawning even tho is set it to extreme spawn or the highest one (forgot the name)
- Superb Survivors is notoriously inconsistent and just does not work for some people.
- It's possible that the high spawns are screwing up matters, try using normal or low spawns.
But be warned, NPC mods are notoriously janky, and even if you get NPCs spawning, you might find yourself unhappy with them.
Talented people put a lot of hard work into those mods, but they're a improvised solution to PZ not having NPCs. It just might not work, and it's best not to have high expectations.
ic thank you so much
i am wondering how the standard is for distributions. should i make a Distributions.lua file in my Items folder (in media/lua/server) or should i make it like MyModDistributions.lua and then add my items to a table and merge it with the distributions table?
i am kind of confused on how distributions work in general though
Never make a Distributions.lua file. It overwrites the vanilla distributions, and it's one of the "seven deadly sins" in things people do with workshop mods that break other mods + vanilla loot distribution.
It is absolutely the worst way of implementing item spawning; use the other method instead.
will this do what i want it to
i just want to add my breen water to the loot table for vending macines
That should work, but Never include rolls in your tables when you do the distribution merge. This is another one of the deadly sins that fuck up vanilla/mod item spawning.
You only need to have rolls defined when making Absolutely New distribution tables. You do not need to do it when merging tables, and doing so can fuck up the vanilla values and cause all sorts of unintended fuckery.
Now, no damage will be done when the rolls value matches the vanilla table, but then it is still absolutely unnecessary, and it's still an awful practice.
thanks, i really appreciate it
when i add this script and the tables merge, is it looking through the "all" table then then the "vendingpop" one? or are the table names arbitrary? i am curious what is going on behind the scenes
and what are the arguments being passed to table.insert at the end? i am particularly curious what the "1" is for. if it is an index, is it pushing the other tables out of the way or something?
I can't speak to the specifics of that example or the technicalities? I don't pretend to understand that shit, or care to investigate it? I'm just a stoned caveman that played with the lego pieces until they work.
I actually strongly dislike the distribution merge method, in that people fuck shit up with rolls etc.
This is the far easier way to add items to tables without the hideous potential to fuck shit up:
table.insert(SuburbsDistributions["all"]["vendingpop"].items, "halflife.BreenWater");
table.insert(SuburbsDistributions["all"]["vendingpop"].items, 1);
But, as always, you'll need to test/investigate/experiment?
ah ok, i was seeing that format in other mods but i thought maybe they were just outdated since i think i heard that indie stone overhauled the distribution system and the distributions file just looks different in the base game scripts
Yeah, frankly there are a lot of mods on the workshop that are an absolute dumpster fire in regards to the distribution business? And a ton of them fuck up/break item spawning in all sorts of ways.
Also, the distribution rework in vanilla is till ongoing and the specifics may change with future updates.
also i should just ask, is the second argument in the second function (the 1) the max amount of BreenWater to spawn on a roll?
Nah, it's just it's the "spawn change". It's not a percentage, there's all sorts of hideously convoluted math going on to determine what the roll is that is checked against that value.
I consider it a waste of time to worry overmuch about it; just use the value of a vanilla item spawn that you want to approximate.
The "rolls" value, that again, applies to all items in a table, is the maximum amount of any item in that table to spawn.
ok i see
But again, just do not fuck with rolls unless you are making an absolutely new table, such as for an absolutely new container or roomdef.
If you don't know what that means, then you don't need to worry about it.
on blair algol's command i will hereby swear to never touch the rolls unless i make a new table
Thank goodness, one less distribution table dumpster fire on the workshop.
Yeah no problem!
Also, include this in your distribution files. Some of it might not be necessary. But you want this at the start of all your distribution files regardless.
require "Items/SuburbsDistributions"
require "Items/ProceduralDistributions"
require "Vehicles/VehicleDistributions"
what is the difference between suburb distributions and procedural distributions?
hey so i know this is a very specific question so not a lot of people are going to be able to answer it but can you add clothing with that glows, or like a specific part of the clothing
like this
probably adding shader (aparently always is null, so... nop this.m_Shader = null;) and some coding
Idk why tho
MP isn't that good
Didn't like
B40 had it
And it was dead af ?
yup
there were massive servers
there are only a few left now
And the other method being ?
Just keep reading?
Is there a guide for adding new traits based on Profession Framework? Tried a few times and got me bunch of errorsπ©
Are death poses something that can be done in Blender? Or is that something that requires animzed or the like?
So i'm making a gun mod and if the items is placed on the ground the model looks like it's suppose to but when the player use it it gets distorted
does anyone knows how to fix it
screenshots?
ok give me a sec
Oh
I thought like the model was spazzing out all over lol
Its just a little shifted back
know how to fix it
i tried to change the sixe and shape of it but it was still messed up
all the other weapons work
Not particularly, I dont really know the code well, I just make dumb basic models lol. If I had to guess though, maybes its center is off in Blender? the center would need to be the handle so thats whats in his hands?
yep already did that
Try putting it behind the handle?
oh wait i'm gonna try that
So long as its visually correct it doesn't matter so much about the under-the-hood stuff that got it there lol
XD
You wanna kill yourself?
I think the first one was most better than this
in the first one my gun looks like it has stage 4 terminal cancer wdym
It looks 2d in your hands π€
yea i know but i justed fixed it
actually i didn't well thats cool
What is the problem exactly?
gun playing hot potato with his hands
the only way i found to fix it makes it look 2d
im not sure
check out the uh
Dont forget to apply object transform before you export after moving the model in blender
new to blender what is object transform
i suppose you could figure something out from there
in object mode, select the model and search for "apply object transform"
then tick the boxes at the bottom
didn't find it cus i'm a smooth brain however i found that by the offsetting the origin it fix it at the cost of it looking 2d
is it not centered on the scene?
center should be near trigger / grip
well if i do that my gun get all fucked up
show me screenshot of ur whole blender
yeah we cant see everything
we meant your hud
and blender things, not just the model
is that w11?
it's the revolver from cyberpunk
centered task bar and the colours are from his background image
i gtg but maybe i can help tomorrow
ok thanks
hmmmmmmm
well i don't think thats how you drink chief
well i'm gonna go maybe i'll figure a way out while not being sleep deprived
ok so it DOES have a separate model for animations
the worldstaticmodel is for when you place it on ground? i havent played pc in 3 months so i havent tested the new update yet
yep
damn
but you cant have it open when using it
or mods with equipable bottles will also have it open
wdym?
was thinking about updating better belts mod so the hiking water bottles are open when you use them, but when you have them attached to front belt they would be open too becouse theres no seperate model for it
damn that update is sick
is it possible to put items on items?
so i could make a scrap workbench model
and put items on scrap workbench?
nope
sadge
i tried making placeable furniture for 1.5 years but i am too stoopid to figure it out
literally no fucking converter can convert game's .X wine bottle model into .FBX
does look cool as the worldmodel tho
There is a addon for blender 2.79 tho
I think i use this one here: https://github.com/poikilos/io_import_x
Then you can just export it as FBX and open it in a newer blender version
Or just copy paste it over to a second blender window
π
Pls update your old mod βScrap Gunsβ it doesnβt working on new build ( I mean , fix spawn of magazines itβs doesnβt spawning anymore on new build :c )
Well, i think that's as good as it can get
Magic
Ah, yes. A good old magic trick from STALKER
Pour it in through the filters for extra zest
that are exactly the same
they are basically the same except one has to be upside down
so export, then rotate it 180 then export again
yes, but you can't assign 1 model to multiple objects
yes
Once i play pz again and get motivated to do it ;v
Hey guys, sorry if this is a common issue or wrong place to ask The other day my brita's despawned all the guns on my long-term save. I have since updated the mod but there appear to be no guns from britas anymore - I cannot even spawn them in through cheat menu. Have tried a new save and the issue still persists there. From what I can find online it appears that the mod has been updated though and is working for some - any advice? Ty in advance
He did warn updating the mod would remove all existing ammo and guns from saves, and to use the back-up old version of the mod for old saves
*she
Brita is a women
ok...
So if you have an older or back-up save, and install the older version of the mod it should be ok?
I did read that page, plus the link - I still cant see the bit relevant to what I'm asking sorry :S New brita's has no ranged weapons then?
It does
Well then I should be able to spawn them through cheat menu on a new save right? I can't, but I cant still spawn melee weapons added
I can still spawn melee*
And what loony is saying is relevant
It breaks on old saves
Just like when PZ gets a update
Give it a try on a new save
If it doesnβt work than most likely your brita mod folder is busted and needs a complete reinstall (deleting the folder and stuff)
Are you using any of the distribution overides?
nope, even on a new save with only britas + the dependencies. No ranged weapons but the melee ones are added.
Like the 90's distro pack
Not as far as I know
Britas armor + weapons are the only mods I use that add items
And the melee weapons/ammo are still coming through fine, its just the guns. I will try deleting the mod folder and re-installing and check back in
unsub from them on the workshop, let steam do its thing, check that everything was removed, then re-sub on workshop. sometimes the workshop is fucky
I did that :/
As I said you might have to do a full delete
Can you show us your modlist? You said they are the only ones adding items, but that doesn't mean something else wont be mucking it
Which means youβll have to play around in the steam workshop folders
New save where it occurs
I'll faff around with the folders and do a full reinstall, atleast I know it is working for other people
getClimateManager():triggerCustomWeather(0.95, true);
Thanks for the assistance peeps
anyone knows what 0.95 and true mean?
True means itβs on, 0.95 is the percentage Iβm assuming
thanks, but percentage of what? It's where puzzles me...
thanks, I'll look into the code and try to understand again
uhh, ok, i guess?
nuka colas ftw!
Did you apply location/scale/rotation in blender
nah, it's just i fucking copied the wrong model on half of them
the ones that upside down don't have caps
cuz it's the "drinking" models
fixed
Fully removing all my workshop folders and resubbing worked, Thanks π
Whyβd you remove all of them?
Could of just removed britaβs folder
just britas didnt work
good to see others making worldmodels
they're too powerful.
Like, everyone?
@errant meteor
When did Keanu enter Zomboid?
what are the caps gonna be used for
Currency?
Ask todd
They where the only thing to last through the apocalypse Iβd wager
I mean metro used bullets as currency
@west crystal ΠΡΠ»ΠΈ ΡΠ΅ΡΡΠ½ΠΎ, ΡΠΎ ΠΌΠ½Π΅ Π±ΠΎΠ»ΡΡΠ΅ Π£ΠΠ ΠΏΠΎΠ½ΡΠ°Π²ΠΈΠ»ΡΡ π
yea bullets i understand
Ρ Π°Ρ
IIRC one of the fallout 1 devs said in a talk that one of the guys on the team used to collect bottlecaps, and they liked the idea so much during development of FO1 they made it the currency.
Oh yeah baby, pixel perfect
right into the chin monster
So anyone know about those death poses?
in Fallout: New Vegas one of the merchants explain that there is a limited amount of bottle caps and they are hard to make more to counterfeit them.
Well i mean if they are still intact after like 200 years yeah, they are very hard to copy
yeah that makes sense in terms of how money works
Nuka CUM
As god intended
Send in dm
Nuke-cummer
fixed it just by flipping the model? Is the world-item not affected by it? π
By the way π
They are two separate models lol
Aww, still, looks great! Aside from... you know... Nuka Cum... I wouldn't want to drink that D: (Though collecting's a whole different matter...)
cough cough sure, i'll totally believe you. - didn't actually think that Nuka-Cola Quartz existed.. didn't play enough Fallout it seems.
I stand corrected πββοΈ
there are actually quite a lot of them
Not like irl Cola
Classic one and who cares about other ones
"now 98% semen free!"
I love how we have bottles with more tris compared to the original Fallout ones
hey man, they had a harsh deadline to try and meet, no time for nuka-polys
MODDING
- Added optional vehicle.passenger.showPassenger=true|false parameter for iBrRus.
When true, the player model isn't hidden when entering, exiting or sitting in that particular seat.
does this mean we'll be able to see player models while driving?
But we don't have car interiors modeled do we?
I dont think so
but windows and as far as i know we already did see the player character/s through it, no?
Hmm, i think no
I never saw my character
I have everything maxed but i don't see a player in the car
guess i just imagined it then π
well some cars are have model interior the only time i saw it tho was when i accidently glitched the game don't remember how but i was something alongs the lines of looking away while some parts are off
There is someone working on that https://www.youtube.com/watch?v=1WTmeCjrPHE
Meet the new subsidiary of Autotsar Trailers Inc.: Tuning Atelier.
Are you tired of your old car? Do you want to stand out from your neighbors? Or is Day Z already here and you need armored glass, spikes on the door and a bucket with pointed stakes in place of the bumper?
We have good news for you: our engineers are already doing all this!
Yo...
the car interiors were pretty much not burnt down version of the interiors from crashed cars not that much detail the textures seemed pretty simple like the interior part textures didn't have details and i don't remember if there was anything on the dash board
or at least when you open a windows or when your window is broken
But wait
The game does support transparent textures already
Why car glass is not yet?
probably cus they have more important things to do first, probably going to be added when the have some slack
Well, what about modded cars?
Or every car just doesn't have interior so they all make glass opaque?
or yeah probably that you could change the texture to make it transparent but that would mess up all the cars without interior making said mod incompatible with most cars mods and well more importantly the base game
and idk if there's actually transparent texture or just tiles that doesn't block you view
which would make the illusion of transparency
I made transparent bottles already, not perfect but transparent nontheless
Because thereβs no driving animation, and no interiors in cars. I think thatβs why
how ? you just didn't add texture to said area
Alpha channel?
Player just βvanishesβ when gets in a car
I guess it won't be like that in the new update
i started messing around with making mods like 4 days ago i'm still smooth brain and doesn't know what you're talking about
Every modern texture has 4 channels
R - Red
G - Green
B - Blue
A - Alpha
ie transparency
and how to do color something with "alpha" i know the phrasing is wrong but still
well it's actually right
alpha is just another paint channel that games resognise as a see-through
oh shit thats so cool
if you're working in PS, and i guess you do
yep
I mean that is what alpha is
i'm guessing the darker area represent density ?
Darker area?
I didnt even know the game would recognize alphas im... dumb
well there's deeper brown and stuff at the bottom than the top
what does the texture look like?
Because that's the stuff that is not transparent
This is how texture looks with... nothing i guess?
how i though that this was the texture file for this
Don't have it anymore, i scrapped the idea cuz it looked bad and didn't work as intended
alright but now I know that transparency works at least π
ok so the alpha thing doesn't change the color just the level of transparency
Exactly
basically like using the opacity slider
Did you like, never touched transparency slider in PS?
This is literally what this is
in my head this was some kind of dark magic fuckery trying to make the game reconize a certain not commonly used color as tranparent or not
There are no colors beside Red Green and Blue
it used to be like that in the 90s when games had limited pelettes
not commonly used as like a weird shade of yellow that isn't used in any texture
I still deal with that BS in the original starcraft files
But... no?
Let's take first doom for example lol
Does this dude looks like rectangle?
No, because his sprite texture has alpha channel
To store matte information, the concept of an alpha channel was introduced by Alvy Ray Smith in the late 1970s and fully developed in a 1984 paper by Thomas Porter and Tom Duff.[2]
exactly, but do you know how alpha is done in many games? through one of the colors in the palette
not a separate channel
never seen any game that has that
starcraft, heroes of might and magic, x-com, most if not all NES and SNES games
ooh, didn't knew startcraft was in 98
Later that day: "Aaargh, I'm being attacked by flying clothing!"
Well, you can see your skin when you rip your clothes
PZ has some issues with how it renders models and transparency sadly. I couldn't do semi-transparent socks/stockings
But I could add shirts by using a model on to of the body
dumb question but are changing textures possible?
changing as in "animated"?
yes
doubt so
I doubt its possible with ordinary methods. Maybe through lua force changing the texture of it or something... but no clue (nor would i recommend such an approach, no clue on how it'd affect performance and all)
So not just flying clothes, but actually ghostly figures. Would've been fun to see "bug reports" of being attacked by nothing, while it'd just be non-clothed zombies π
UHHHHHH
Why not vodka, brat 
Nuka&Rom will be added later
yes this is a canonical nuka drink
Rom not Vodka, vodka it s good, vodka it s stolichnya
I like Pyat' Ozer more
Stolichnya more rodnya
at least yours are glass and not a shitt brown plastic shell
Infact you should make the Nuka-Rum a shitty brown plastic looking texture
and slightly larger than the others

Anyone using Size Labels mod? I want to make an adjustment to it for my own personal enjoyment
and when you're trying to drink it the plastic shell brakes and everything spills out on your shirt
spawns brown puddle on floor - Clothing dirtiness +50% - Angry moodlet at maximum
"Drink" character lifts bottle, window crashing sound, glass shards on ground and shirt dirty and wet
Essentially want to make the action for checking a clothing item's label not take 10 seconds
But idk what I should be looking for
the code

It has a bunch of functions, ends, ifs and elses.
Can you tell yet that I don't know lua, or how to code in general?
finally implemented Assembling Firearms
ISCheckClothesLabel.lua
Lines 96 to 115
require "Items/SuburbsDistributions"
require "Items/ProceduralDistributions"
--inventorymale
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.RoadMap");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 90);
--inventoryfemale
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Base.RoadMap");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 90); ```
Anyone see anything wrong with this? I got the item to spawn in vehicle gloveboxes but this doesn't seem to be working
Are you getting an error message or is it just not spawning?
Just not spawning, no error message
Okay, first step is to swap your item for a vanilla item that ordinarily doesn't spawn on corpses and test that.
Ok i will try that
You can also spam the fuck outta the distro table by repeating that code multiple times just to make sure.
There's a pinned message detailing a debug test to see if your table looks like it should.
Anyone know how just get the asset xml?
Rather than blow up your code and leave it to chance to test.
@upper junco
90 for chance is also alot I would think -- if you're not seeing them appear something is wrong for sure.
Yeah I had turned it up to make sure I saw it in game before adjusting the spawn rates to where I want them. Thanks for the replies. Had to leave for work so I will get back at it tomorrow.
You don't need to add Base. only do that when the module isn't Base
This has probably been asked before. Is it possible to take the old sounds and reimplement them in the game?
Kinda? You can just change every sound you want
any modders here looking for suggestions for a new project?
how about being able to attach minigun on top of ur car (has to be heavy duty)
just like in dayz for arma 2;D
You are asking for too much
Just saw this message π hahaha thanks, they looks cute I think
yeah i popped into ditos stream earlier too
flying zombies
anyone here know about procedural distributions?
i cannot get an item to spawn in kitchen drawers for the life of me, i will send my code
require 'Items/ProceduralDistributions'
table.insert(SuburbsDistributions["all"]["dishescabinet"].items, "plate.Plate");
table.insert(SuburbsDistributions["all"]["dishescabinet"].items, 10);
table.insert(ProceduralDistributions.list["KitchenDishes"].items, "plate.Plate");
table.insert(ProceduralDistributions.list["KitchenDishes"].items, 10);
--for mod compat:
SuburbsDistributions = distributionTable;
ProceduralDistributions = distributionTable;```
delete the last lines
lol

So that explains the Slightly Banned role π
If I want to introduce a trait that can reduce the unhappy mood by 10%, how do I write the code?
require('NPCs/MainCreationMethods');
local function doMoreTraits()
local optimistic = TraitFactory.addTrait("optimistic", getText("UI_trait_optimistic"), 6, getText("UI_traitdesc_optimistic"), false);
TraitFactory.setMutualExclusive("optimistic", "gloomy");
end
local function optimisticEffect(_player)
local player = _player;
if player:HasTrait("optimistic") then
//please help//
-- if player has this trait, I'd like him or her to have a strong mind to resist unhappiness
end
Do you really need
require 'Items/ProceduralDistributions'```Has it not already loaded all the server lua files from the base game?
Is there a tutorial to add your own objects to the build menu, like building a rain barrel?
That's fairly specific and if you learned how the game files worked you would learn that or learn how to find it out, but also that specific thing may work as a tutorial that teaches someone about how the game files work and how to find out how they work.
No, the requires aren't needed for those since they're loaded globally
wait, require would provide access to the local variables of another file? I just thought it'd ensure another file was ran before the one containing the require
Yeah, it would be for access to local variables, but there aren't many scripts you'd currently need to do that to since they tend to give access via the classname. I think you're right about the load order too, but I imagine that'll still have conflicts when the mods load unless strict order is specified by the player
but why would the base files use require, if not for local variables then?
For example
require "ISBaseObject" in for example lua\server\Movers\ISBaseMover.lua
while the lua\shared\ISBaseObject.lua already has it all publically declared instead of locally?
Actually, i'm gonna test that now regarding local variables π For the satisfaction of my curiosity!
I did not know require gained access to local variables. :o
Actually, atleast from the quick test i just did, doesn't seem it does.
The local variable i declared in ISBaseObject.lua still ended up as nil in ISBaseMover.lua π (Might just've done it wrong though, who knows)
:|
Require solves load order issues.
Sometimes it's not necessary, but it causes no issues if it isn't.
It's a best practices issue.
And, as people regularly fuck up the spawning of vanilla and other mod items with bad distribution files, I'm gonna hammer people over the heads with the most remedial fussy best practices minutia in regards to distribution stuff.
Lua offers a higher-level function to load and run libraries, called require. Roughly, require does the same job as dofile, but with two important differences. First, require searches for the file in a path; second, require controls whether a file has already been run to avoid duplicating the work. Because of these features, require is the preferred function in Lua for loading libraries.
from https://www.lua.org/pil/8.1.html
(of course, it uses kahlua, but i think it'll be about the same as result?)
i think so
it was more of a learning experience
if there is some absurd demand for more plates then i will look into it
@ruby urchin please handle modelling matters in the #modeling channel?
Sorry, it's just that we're going to end up having to manage two channels that have the same stuff being posted in both of them if people don't use them as intended?
People asked that we add a modeling channel so that we could keep the channels more focused π
np my wrong
Yeah, no worries, just attempting to keep things focused and running efficiently here? π
Yeah, don't worry, I returned to modding for PZ, so I will update and add new stuff to my page for new modders, I spent several days looking at the decompiled files of the game and I understand much better how things work, this could ease the burden on the channels of repetitive questions π
Sweeeet! π
Finally, change ClothingItem without create another Clothing (and keep properties)
Thank you sir I'll be using this example to implement spawning gun parts
Awesome!
Since people are already cutting and pasting my code and files for their mods, I figured I might as well turn that negative into a positive? π€ͺ
lol
There was an oopsie in that example file, gonna re-up the good version in a minute FYI.
I'm doing 374 different things right now. I'm also in as cranky of a mood as the authorial voice in that file. It will be pinned.
slowly backing away
Hahaha. π€ͺ
I give 6 points to Optimistic, is it fair?
you should lower it to 4 or 5
YEah 6 seems steep, considering how easy it is to manage boredom/unhappiness
I'd go so far as to say put it to 3
you mean a 50% reduction? 5 times would be very different lol
If it does the flat opposite, 50% increase in unhappiness and 30% increase to boredom, then just the opposite of what Optimistic is. Also call it Pessimistic lol
This is an example of file of How To Implement Item Spawning For Your Mod's Items That Just Works.
Unlike the ways that far too many mods on the workshop handles it, It Will Not Fuck Up The Spawning Of Vanilla And/Or Other Mod Items.
I'm neither smart nor do I pretend to understand the hows and whys of this shit, it just works.
Need a :JustWorks: emote of toddy bois head lol
Just like the vanilla distro tables, I can't wait for the dang old document to be stable.
Even though I'm ultimately trolling myself with it, as either people will ignore it; use it as a mod in their games/collections and be confused by the results; or ping me with a million question about the math behind the spawn values etc.
Please take all modeling related questions and discussion to the #modeling channel where the people who can answer such questions regularly post.
We are attempting to keep the two channels distinct to improve the signal to noise ratio.
People asked that we add a modeling channel so that we could keep the channels more focused π
Alright, sorry
I just wasn't sure that was entirely a modeling question since this was more a subject of how to use the files
Oh dear, What does horny do?
Do you star with 50 HottieZ magazines?
Is there any guides on how to make cars?
hello it's my first time making a mod for pz. I can't for the life of me find what handles the drying of clothes in clothes dryers and washing machines. Can someone point me in the right direction?
Yes youtube
Not exactly, Horny just gives you +1 fitness
But HottieZ magazine? I'd say it's a nice idea.
wtf is that a mod?
Clothing.setWetness(flaot) and Clothing.getWetness() should help you
Thank you for this! Also found setDirt([clothingparts]) and setBlood([clothingparts]). This will do for now although I would like to change how the washer and dryer themselves function.
good question
I found the function, and probably you can't change that, or maybe I'm wrong, anyway here is the class that was transmitted to lua IsoClothingDryer extends IsoObject
Thanks again man! I'll look deeper into this and hopefully find a solution. Kinda weird that they didn't make this on lua in contrast to the cooking method but maybe they had good reason.
anyone know off the top of their head the difference between WeaponSprite and Icon?
WeaponSprite is the weapon model (I know, sigh) and Icon is the actual icon while in the inventory.
I believe the confusing terminology is a holdover from when PZ actually used sprites and not models?
that makes more sense, thanks
It makes an inadequate amount of sense to me given the confusing terminology, but yeah π
just a trait and profession mod I'm doing. Not completed
Hey there, does somebody knows how the getPlayer works?
Does every client runs it and it returns the player for that client? (talking about MP), I'm asking because if I try to use it, for splitscreen it doesn't work. I mean it works for the first player but if a 2nd player joins, the getPlayer will now return that second one only. This is because the splitscreen runs as a single client?
If so the only solution to make it both MP and splitscreen compatible would be to do a for loop and get all the players by its index using the getSpecificPlayer?
If somebody that made MP mods knows would be really useful π€
Yeah, if you need to check all player's for something then you'd need to loop over them with getSpecificPlayer()
You can use getOnlinePlayers(), I see it and it works for both client side and server side
if (GameServer.bServer) {
return GameServer.getPlayers();
}
if (GameClient.bClient) {
return GameClient.instance.getPlayers();
}
returns: ArrayList<IsoPlayer>
GameServer.bServer and GameClient.bClient are just to check if it is a server or a splitscreen game? sorry never used those
does anyone know how sound in scripts work?
i have got them working in game when i use a weapon but it sounds horrible
vanilla weapons sound like they are actually coming from the player and the weapon, but my modded weapon sounds like the sound is being played from the sky and it comes from every direction and sort of skips a little bit
idk
Can anyone share me your default.txt? I have problem with mod conflicts
Can anyone tell me which one of my mods that conflicting?
it depends on if you just want the player to hear it, or if you want everything/everyone around the player to hear it as well
To find out which mod causes issues, this should be a great help:
#mod_development message
Finally finished Fort Knox. Jesus.
A total of 58 roads were named along with 84 buildings.
I think that's more than what I did in vanilla but then again I grouped the cities in a single category, didn't divide it by street. Only placed grouped in Fort Knox is Quitman. About 800 lines of code for it all.
Now the finishing touches.
i would like it to be heard by everyone because it is a weapon noise. how do you think i could go about making the noise in a world space when a zombie is hit with it?
this is how it looks now, and it sounds like it is coming from the sky instead of the weapon/zombie being hit unlike other weapons
For a "world sound", which is what you're trying to do, you don't even have to define the sound like that. Just make sure the .wav is in your sound folder and you can spawn the sound at a specific tile with this:
-- This adds the sound stunstick_hit to the player's location, pitch change of 0, radius of 1 tile, max sound gain of 0.8, and "ignore outside" (unsure of what it does exactly)
getSoundManager():PlayWorldSoundWav("stunstick_hit", player:getCurrentSquare(), 0, 1, 0.8, true);
You'll want to change the 1 to whatever tile distance you want others to hear it from (including zeds)
ah ok, how do i call that method when the player strikes a zombie?
it doesnt go in a .txt file does it?
No, it'll be in a lua file. Likely in one of the client subfolders, but I don't know which would be a best fit
You can make it run though by adding that to a function and passing that to Events.OnHitZombie.Add(functionName)
ok thanks, how could i add a conditional to check if the player is hitting them with a stunstick? wouldn't the sound play if i hit them with anything (without a conditional)?
There are the lua events
https://pzwiki.net/wiki/Modding:Lua_Event
linked to on
https://pzwiki.net/wiki/Modding
I'm not sure what gets passed into the event, but if one of the arguments is the item, then a simple if item:getType() == "StunStick" would work
It would help if you already knew about coding, then you would know what to look for.
alright thank you, i will start trying that out
One thing you can do is look at mods that do similar things like
https://steamcommunity.com/sharedfiles/filedetails/?id=784672271
i have an idea about coding in general, but i am having trouble navigating pz modding. there are a lot of resources and front end stuff they have for modders that is not explained very well in any one place. thanks for that link to the lua events though @undone crag
https://projectzomboid.com/modding/ This will be your saviour
If you want the item type, you can make the item do :GetType() or :GetFullType()
are there tips for navigating the api
Umm, Iso- stuff is in-world stuff (not UI), and if you ever just run print() on something, it tells the type of thing it is, which really helps when certain containers are of one type while others are another and they have different methods to do the same thing
if i run print() where is the output going to be?
C:\Users\Username\Zomboid\Logs
if you run the game with debug mode (steam library, right click on PZ, launch options -debug) you'll see them (if ingame) in the bottom left - live
Otherwise as mr_anon said
If you run zomboid with the command prompt - like window open you can also read it in that. I tried running it like that in the newest version but it said I need windows 10 for it.
and also if i add lua files and just throw code in them it will run, right? there is no main or start method?
It runs when the code loads, which is when the game loads on startup, or when it changes from one set of mods to another, like when you load a game with different mods loaded to the main menu mods loaded.
right, though if you define a function, example:
function test()
print("this is a test")
end
it will not automatically execute the function, but define it for use
i see
and if i hit reload (while in debug mode) on the specific mod, if i am remembering correctly, will it run it all again if i changed the code while the game is running?
So if you are defining functions then the functions will be defined when the game loads or when it says ''reloading lua''.
Nvm you may have known that already.
exactly
I don't think i did know that or maybe i dont understand. does the order of the function execution/declaration matter in lua? i had thought you could call a function before it was declared but it would see the declaration later in the file
I meant this message I am replying to says when the lua is loaded or reloaded, which is when the Lua is run. First shared, then server, then client (with however ''require'' works). So when the lua runs it does what the Lua says, like making your functions, or printing something.
I do not think you can call a function that does not yet exist.
ah ok i understand
What do you mean by calling a function before it is declared? The order your file makes its functions in can matter if they are local functions I remember.
i went into an ide and tried to sketch it out but it makes sense now that i am trying it
i appreciate the help, i am going to try and get the sound to work now
one more thing actually, is there a methodology i should follow for what lua files go where (server/shared/client)? some of the things in the base files i dont really understand why they are in client, like erosion or weather
I do not understand that the shared server client thing.
From what i know:
Shared would be for things that're ran in both, a server and the client (player)
Server would be for the server only - and for singleplayer/splitscreen
Client would be for the player only
as for example, if you were to join a server, you wouldn't need to have the distributions loaded, hence those files are in server\Items\
Recipe code is in server.
Because it handles the "what happens" on crafting, the recipes themselves are defined in scripts
this is big. I think i get it now. Thanks
When multiplayer comes out I may have to learn or decide how much of the ''what happens'' should be in client and things :s
Trial and error in worst case π
In all actuality
Seems like there's a "movierental" shop with "MovieRentalShelves". Is that only in the files or does anyone know of actual places that became movie rental places in the map?
functions do run once upon lua load actually - sorry if this was covered just scrolled through briefly.
Can be useful for a few things
wait, they're actually ran once? Wouldn't that cause potential problems?
it does/can
if the lua file is not* syntax'd properly it prevents the game from loading
I use it for defining globals on the fly that I rather not update with scope
Oh, i thought that was because it never receives and "end" to the function, which is why everything after would be considered a part of the function of sorts
That would be an error in syntax - but I think that error is what breaks the game in loading
I don't think it's a planned thing
the debug window will literally be unreadable with blocks instead of letters
with debug mode on anyway - not actually sure what it does with it off
probably the "my main game screen has no menu on it"
π€― my whole world is shattering. Though i guess i do not need to worry about it?
Not really
When you enable/disable a mod and go back to the home screen all lua files get reloaded, afaik
sometimes if you give a function parameters you may have to add sanity checks in to check if the parameter is not null/nil
to prevent it from trying to run to completion
oh, i do that in case the part which provides the parameter could potentially be nil (like getGrid thing function with coordinates, can occasionally return nil)
That's an issue I ran into when doing OnGameStart events
I run code on load for EHE regarding presets, and announcer line sets
Yeah, I don't think it's mentioned anywhere
Though... still.. function being run automatically without a call... are you really sure this happens? o.o
Hold on
---NOTE: Any variable which is by default `nil` can't be loaded over - consider making it false if you need it
---@param listToSaveTo table
---@param checkIfNotIn table
function eHelicopter_variableBackUp(listToSaveTo, checkIfNotIn)--, debugID)
for k,v in pairs(eHelicopter) do
if ((not checkIfNotIn) or (checkIfNotIn[k] == nil)) then
--[DEBUG]] print("EHE: "..debugID..": "..k.." = ".."("..type(v)..") "..tostring(v))
--tables have to be copied piece by piece or risk creating a direct reference link
if type(v) == "table" then
--[DEBUG]] print("--- "..k.." is a table (#"..#v.."); generating copy:")
local tmpTable = {}
for kk,vv in pairs(v) do
--[DEBUG]] print( "------ "..kk.." = ".."("..type(vv)..") "..tostring(vv))
tmpTable[kk] = vv
end
listToSaveTo[k]=tmpTable
else
listToSaveTo[k]=v
end
end
end
end
--store "initial" vars to reference when loading presets
eHelicopter_initialVars = {}
eHelicopter_variableBackUp(eHelicopter_initialVars, nil, "initialVars")
this is under a bunch of variable defines
oh, i thought you meant more like:
function somerandomFunction()
nonExistingFunction()
end
that the function would automatically run at some point in time, even though theres no
somerandomFunction() call in the file itself
Im starting to get more confused than ever atm... π
I meant more that you don't have to lay functions in events/hooks only
you can call them in the lua file
Oh you meant that not everything has to be in a function but can be straight put into a file? Then yea
Yeah sorry
Was wracking my brain trying to think of why and how to avoid issues if a function is automatically ran (on load) without calling it π
π€
from what i understood now, he meant the file contents is ran on load, not necessarily the functions defined in the file, so for example:
print("test")
would work as a file in and of itself and would run, but
function foo()
print("test")
end
won't run without being called.
Yikes lol
https://steamcommunity.com/sharedfiles/filedetails/?id=2610521493 - @drifting ore has added eris minimap support for anyone using Pitstop
is there a mod for double carry on the back ?
Double carry as in 2 weapons on the back? If so, i haven't heard/seen one like that, but IIRC there was a mod which caused to switch the back weapon with the currently held one, efffectively allowing 2 weapons for as long as you don't "unequip" one of them.
ah shame
Fixing loot distribution in Ammo and Medical Pouch
Find out that all this time I was playing with only Medical pouches since ammo pouches don't spawn
That's my mod SwapIt 
ey there sir, is it possible to implement skill recovery to an object in game? Like the placeable object computer, might also be able to view maps or write notes with it, @sour island
Ayy, advertising your mod's a good decision then, no regrets on my end!
Ayyy good stuff but just curious, ever thought about making 2 weapons on the back ?
Wouldn't be all that hard to do honestly. Just not in scope for SwapIt
Also depends on a few things I can think of off the top of my head
I wish the item tags system was more extensive in regards to things like size
size?
Would make scaling stuff like slits much easier and friendly to other mods
Specifically, items having the ability to overlap behaviors -- iirc you have to script where weapons can attach.
Where as in other games it's determined by item size for example -- like items can be tiny, small, medium, large, huge, etc. And that determines where it can go or fit
I think if an extra back slot is added all weapons would need to be accounted for unless I'm mistaken
To not only be equippable to the back but both backslots
I could be wrong though -- I haven't touched item scripts in a while
I'd look into it but I got a new job recently that's been taking up all my time
hmm from what i've seen theres definitions for where "weapons" could be stuck inside a zombie, like in the back and all, but the location to equip on back π€
Gonna look a bit further due to curiosity, will let you know if i notice anything interesting π
Sounds good
I'm in the camp that you should be able to encumber yourself if you want
I need to sit down and update vanilla weapons expanded too - I made items with 3D models (used at the time for animations) into weapons -- since I can't make models myself -- but now every item has a model π©
Well, doing things for oneself which may provide useful information for someone else, why not share it then? Though wether it'll be fruitful or not is a whole different matter. π
I mean in-game, if a player wants to carry extra weapons at the ready they should
Oh that π cough cough totally understood it the right way... i did not at all misunderstand.
There's this
local Back = {
type = "Back",
name = "Back",
animset = "back",
attachments = {
BigWeapon = "Big Weapon On Back",
BigBlade = "Blade On Back",
Racket = "Racket On Back",
Shovel = "Shovel Back",
Guitar = "Guitar",
GuitarAcoustic = "Guitar Acoustic",
Pan = "Pan On Back",
Rifle = "Rifle On Back",
Saucepan = "Saucepan Back",
},
}
table.insert(ISHotbarAttachDefinition, Back);``` so I think you could make another one like it called Back2.
There's also this
group:getOrCreateLocation("Big Weapon On Back"):setAttachmentName("big_w_back")```
So you could make copies of them with names like "Big Weapon On Back 2", and also add the attachments with a txt file in scripts.
Things like this
attachment big_w_back_bag
{
offset = -0.0290 -0.1040 0.1190,
rotate = 90.0000 -2.0000 -172.0000,
bone = Bip01_BackPack,
}```
You can reposition them in the debug mode thing.
did start writing tests, but you seem to have found pretty much all of it already D:
:B
Though, i do wonder if those attachments could be added the same way recipes can be created with lua π€
That'd make it possible to make a straight up copy of the back hotbarAttachDefinition, then based on it's attachments content, make copies of the groups possibly and add new attachment"scripts" via lua that, if can be accessed with lua, have slight variation in the rotation
Debug mode can modify the models_items.txt file in the base game so maybe it can add attachments to a mod file?
I have not looked at its code enough to know how it edits the file.
It is possible to add attachments through lua. That's the main reason I made Model Tweaker, so there's no need to override the scripts
You... you made a mod for that? o.o
I never saw it, but nice to know! π
i never remembered to thank you for that
so thank you lol
Oh ya shark, are you planning on add police caps, I want to role play as a sniper
baseball caps I mean, blacked out
I'm glad it is useful
already did ya dingbat
theyre blue and black
they switch between colors like normal baseball caps
nah
Hey Shark! Long time admirer, first time caller. When are you planning to do the Demolition Man police officer uniform? I think it would be supreme to role-play as one of these officers. Consider it!
A true chad, unlike the soy above me
yes sir, i am going to be adding every single action movie hero film article of clothing from 1980 to 1993
Sweet! A true legend!
dies inside even more :[
Hey can someone help me with this:
I want to create a global object and store modData with.
I have looked at the Rain Barrel and Trap but both are huge and have a number of lua files that contribute to how they work, both server side and client side.
If someone could help me with the first part I could figure out the rest.
Basically how do I create a global object and store modData on it and then retrieve the data.
for a real simple example there is an object and in modData it stores a boolean on and off and every in game ten minutes it will switch from on to off or off to on and the player right clicks on they can check the state of the object if it is off or on. With the context menu.
If I could understand how that works I could figure out the rest.
question regarding your plans: Do you want a global variable to toggle back and forth, or do you wish to have one object, whose value toggles back and forth? (with the potential of multiple items)
An object, I want the data on the object so it persists through reloading of the game
only a single object, or multiple? And would the state of that object change what you do with others, or only with that one?
for the example a single object would work.
The trouble I am having is creating the global object and putting it into the world
The other stuff I can do, like switching over and the menu
If it's intended as a variable that just switches back and forth and determines what you do with objects overall, i believe you could use the player, or something and add the mod data there.
Issue is if you wish to have an object carry that data and change it in an interval, as when you distance yourself far enough from the object, you can't find it in the grid anymore, so save/loading would require you to first "seek up" that object and "reset" a reference to the object, which may just as well be unreferenceable as soon as you're out of reach (im not sure as i didn't test that)
so one alternative would be, if you wanted it truely to be on the object, and certainly in a 10 minute interval, to give it a variable setting it to "true" or "false" and never change it again, but rather take the ingame time (minutes) and check if it'd be 0-10 for true for example,10-20 for false, then 20-30 for true again
and moddata can be accessed IIRC if you have the object, or item and using :getModData() and :setModData()
"creating" the global object (i believe you mean either an item, or an "object" like a stove or similar?) depends on which you want to do i guess?
like a stove
an object like a stove, something that is in the world, something you can place down
then i'm sadly not useful for that part π didn't do much with that yet
how about if you want to store it on the player?
keep in mind, however, that if you distance yourself too far from the object, you might not be able to change it's moddata, or can't reference it after save/loading
and for the player it should just be getPlayer():getModData() or getPlayer():setModData() (singleplayer, unsure on how to ensure you choose the right player when in multiplayer)
so I could add a function that goes off every 10 in game minutes and it grabs say getPlayer():getModData(switch) == true then getPlayer():setModData(switch) = false
what i believe:
--grabbing specific mod data:
local switchState = getPlayer():getModData().switch
-- or getPlayer():getModData()["switch"]
-- setting mod data:
getPlayer():getModData().switch = false -- or true
getPlayer():setModData()
-- or maybe getPlayer():transmitModData()
-- unsure on which would be correct, ideally trial and error
-- as it's just how i'd try it for now after seeing the uses in the base lua file for a bit
Hope you achieve what you wish to do
A simple solution would be just to put it on the player for now I think
alternatively i believe there's also the possibility of adding it to modData of the "save" itself? Not sure there.
That could work too, I will have a look
You can also use the new global ModData object. They talk about it a bit in the latest dev blog.
jaja the guy who writes the blogs is just fantastic
Made a proper PASGT helmet and Interceptor body armor. Big thanks to Dislaike, Scavenger and AuthenticPeach for their precious help !
Thanks ill have at that too
try it, you can be the first
doesn't that seem like a perfect opportunity to start on it then? π
the first place to start would be making the map and tiles n what not
because i imagine a map will stay working for a longer period of time compared to any funny mods
6 years have hydrocraft and there are still people talking about him
No shit its the top most subscribed mod on the workshop
It will stay that way if it gets updated to build 41
A collection that is on fire from new update, and a lot of bad aged mods
brita weapons are still showing up in game without icons or models even though the mod is uninstalled
anyone know why or a fix
like it still appears in loot distribution
Unsub from it on the workshop, and check the workshop folders that its actually gone. If it still happens then try a fresh install of zomboid
Someone knows if there an event called when a zombie hits an object?
yea thank you
Someone uploaded my mod to steam, even tho i had licenced it. how do i take it down?
oh ya saw that to lol
I would ask nasKo, seems like he would have the means to do it
Which mod?
@hollow shadow file the DMCA through that button if you so feel fit.
DMCA? you mean the licence?
if you own it, you can throw it down shits creek by filing that since you are the owner of it.
Well. i already reported with a little description of what happened and now the button is red ;_;
check your dm's
I have also DM'd it to him lol
i got DMCA ready to send
Looks like it's gone?
Sorry that happened @hollow shadow
People might not realize this, but it can be both stressful and hurtful finding your hard work being used without permission in such a fashion.
The people who make mods are human beings, not a vending machine, and deserve more respect than that sort of treatment.
Why can't i emote this goddamn finger
just click on it?
It just reverts back
I can not either.
Maybe he has blocked us :O
I read that that was a sign of being blocked on discord.
But why would he block me lol
Hmm have you once sent him a direct message or replied to him or said something about one of his mods? I am trying to speculate here.
None of that
But why lol
Can you send a link on this mod, maybe itβs fix your mod at new version?
the mod has been taken down
Ok
Yeah i have no mercy with ppl that just upload. If it was a fix then they could have asked me to implement it or something
What is the mod anyway?
Hydrocraft is also being uploaded for the new version by the community, and this makes the mod work
But author donβt banning this
This is why he still alive in PZ
Oh
it was scrap armor. the mod wasnt finished in the first place and wasnt suppost to be on workshop yet
Then how did he got it?
he got the beta tester version from my discord. which is licenced and has a big readme on it that says "dont reupload this"
Wow that sucks, can't really trust anyone i guess
Not that one random ruski, atleast
i am ruski...
You arent that one random one though
fair enough
Or are you π€ Secret steam account to pirate workshop items lol
lol
It took 1 hour for him to break
The hey what option message could have been 1 hour and 55 minutes and 1.337 seconds before the LoL message, and on top of that he could have started breaking before he sent that hey what option message.
I can confirm it'd only just ticket over to an hour
:o
I think either Brita turned the comments off to stop the spam, or I got banned from the comments for calling the guy an idiot and to stop spamming lol
Hey @craggy furnace, I gave it a try now to the mod and it worked, just a small issue, if you have your pants patched, when tucking them for the first time, the patches disappear. But after that if you tuck in and tuck out the patches keep applied .
hmmm
yeah i ended up pulling a sneaky last night to convert all vanilla military clothing
I suppose is because you created a new item and it changes to the new item?
ill take a look at it but i am not entirely sure its fixable
yep
ive never patched a hoodie
it works on the same principles
Yeah that's probably that, because I have now english in that pant haha anyway it is a really minor issue
ill look it over, thanks for bringing it to my attention lol
ill see what i can do
General reminder for this channel, also:
- Do not post, upload, transmit or otherwise disseminate information that is obscene, indecent, vulgar, pornographic, sexual or otherwise objectionable
I don't want to have to start banning people here but I will if we can't follow the rules.
Yeah
Enough
If it's not directly related to actually modding for project zomboid, take it to #offtopic_non_pz
Well, I guess my first mod is done π
https://steamcommunity.com/sharedfiles/filedetails/?id=2611652130
Congratulations for publishing your first mod then!
We need desert
Good suggestion, I'm starting that.
anyoen know how you use RV's in Filibusters? is tehre added functionality to them?
dont know if this is the place to ask this but has anyone had any trouble with finding guns since the new brita update? trying to find out if im just super unlucky or if its a mod conflict or something
alot of ammo spawns which is weird
lootdistro is a bit off right now might wanna wait for em to fix and figure out
i can find guns in in vanilla locations but not locations added by mods
thanks this might be just what i needed
lol at least the same thing happens every week, I don't understand how they still don't have a bot anti-spam
congrats on your firstmod
π
Yo, anyone using pillow's random spawns mod?
Try making a police character and doing random profession based spawns and let me know if it fails. I just tried twice in a row and i think something in the recent updates might have broken at least the police spawns in Pillow's mod or something since it seems to spam a bunch of warnings like this:
SpawnPoints.initSpawnBuildings> initSpawnBuildings: no room or building at 11869,7186,1
followed by failure to spawn:
java.lang.RuntimeException: can't create player at x,y,z=11869,7186,1 because the square is null
Just an idea, but didn't that add spawns for some other mods as well, which might've updated?
no idea, don't think that would affect me however given i don't have any map mods
mhmm then i'm probably mistaken with my idea, so you can probably ignore that π
there's 48 warning lines in my consiole.txt about bad coords and 69 spawns defined by police profession in the mod
so maybe this means the rest are fine, though that is still a high chance of a bad choice
how do I convert between absolute coordinates and worldx/posx, worldy/posy coords?
Since presumably the worldx and worldy are cells and the posx and posy and local coordinates within the cell
Hmm... i'd assume that posx and posy are always the "true coordinates" in the world?
Atleast i can't seem to find coordinate parameters or similar to get cells in the base file (might just search wrong and it's named differently than what i'm searching)
but there's also this line return getCell():getGridSquare(worldX, worldY, z), worldX, worldY, z
(in lua\client\DebugUIs\DebugChunkState\DebugChunkStateUI.lua line #286)
Which make my assumption seem "correct" (though could still be wrong)
Found a way to convert, checked the first coord i had of the 48 that threw errors, turns out it's 48 broken spawns out of the ENTIRE professions spawn list since the first one is near the top of the Unemployed which is the first set defined in the mod and matches coords exactly
Oh, so it has to be "differentiated" and not "exact coords"?
{worldX = 39, worldY = 23, posX = 169, posY = 286, posZ = 1}, -- West Point, apartment 6, above valu insurance ID:138
in fact it's on a random ass road
Yep, it's supposed to be 39,22 not 39,23, they got the cell y wrong
Don't know how to exactly say this but I have an interesting idea for a negative trait
Pregnant
This trait can be applied at character creation, idea is the player character had gotten pregnant before the apocalypse or during depending on when you start. chosen by a random number will depend on how long this trait lasts whether the full 9 months or 3 weeks (maybe even give the player a choice in this)
After the wait, the player becomes exhausted and tired. At this point I honestly don't know what else would happen, maybe the baby dies on delivery and the player suffers depression from this. This is just an idea that popped in my head and made me go "that could be good for story telling, or a horrible way for a character to end"
I don't even think this would be received well but it's an interesting idea for story telling\
or maybe either the character dies like in the walking dead lori 
mark it as spoiler (too be fair idk if anyone doesn't know it) but you bring up a good point to add to this
Yeah, I think the concept of a pregnancy mod is super weird and definitely would not make sense in Zomboid.
these are the ideas that get passed here that makes me believe that god is dead
Spawned by profession
I feel like it would make some sense, you could come up with some kind of story for it for your character like a once surviving town in the midst of everything where they thought it was safe before things collapsed and now they're on their own. the idea was more so story and plot rather then full gameplay

