#mod_development
1 messages · Page 537 of 1
you stand at the top of the building then walk across then down
and mark it as added
add safezone my bad
i can seemingly mark them on mine i dont have that map mod installed but on other ones
like a police station
i dont know if its a spawn location tho
police station is a spawn location in rosewood at least
let e try with your fix
Ooooh ok
You have to paint the whole zone by walking ?
yes
I am officially dumb
turn that flashing thing on to make it easier to see
nah no worries you got it figured out for you and your buddies - sweet!
Yeah, thanks 😄
Safezone and safehouse have the same functions, meaning no zombies spawning inside ?
Well guess what the flashing is now red
because it is a spawn location 😦
Ah no I'm good, two zones overlapped
ah ok i haven't tried that before
btw i dont know if this is helpful for your situation or not, but i also do use this mod https://steamcommunity.com/sharedfiles/filedetails/?id=2717575749
The safezone I put downstairs will work upstairs ?
cheers! nice glad it works
i see people play cryogenic winter on streams and their game is heavy blizzarding and i barely see light snow most of the time on a very rainy world can the difficulty of the mod change that? im 3 months in and it hasnt ever blizzarded
Fun stuff
I'd expect a Fallout super sledge to turn a zombie into a blood smear.
At least have it instakill them?
Ohhhh, looks like a clever rascal figured out the trick for adding new functional sledgehammers!
It does enough damage to better than most melee weapons enough and personally I'm not ever gonna be adding a insta kill anything unless it has very limited use like the gun on my vertibird mod
and ye lol but not my way. Found someone who made the dildo bat from the brita pack into a sledgehammer and tinkered with that
Does anyone know if anything is wrong with my code here? i keep getting an error when trying to craft the item.
function Random_Item_OnCreate(items, result, player)
AddRandomItemToInventory({"CreditCard", "LightBulb"}, 0, 1)
AddRandomItemToInventory({"Screwdriver", "Battery"}, 0, 1)
player:getInventory():AddItem("Screws", 20)
end
which line is the error on
Did you make a function called AddRandomItemToInventory because I don't believe that's a actual function that exists in the game code?
@willow estuary yes i did
function AddRandomItemToInventory(items, rangeMin, rangeMax)
local result = math.random(rangeMin, rangeMax)
if result == 0 then return end
player:getInventory():AddItem(items[result])
end
Well, in your function player isn't defined?
local?
AddRandomItemToInventory({"CreditCard", "LightBulb"}, 0, 1, player)
&
function AddRandomItemToInventory(items, rangeMin, rangeMax, player)
should work however?
for future reference, it always helps if you actually state what error you are getting.
but in this case, math.random doesnt exist in pz's kahlua. use ZombRand
oop
yeah that would be it
ZombRand can also give you zero, so if you dont want zero make sure to add on a one
function AddRandomItemToInventory(player, items)
player:getInventory():AddItem(items[ZombRand(#items) +1])
end
though that should probably pass a player argument as well
ahh i see
Currently trying to work out how to make a new clothing set I've made spawn on zombies, are there any tutorials or pinned posts on it?
You could always just refer to another mod
They Knew does it for example
Yeh, i've had a go at looking and recreating They Knew and Spongies's lua files for their mods, but I've got to be making a mistake somewhere in my scripting
thanks for the help btw
It takes abit of tweaking but using They Knew I was able to create an item with usability
that spawned in on zeds?
Not on zeds no, But its mostly txt file based if I remember corrrectly
for zeds that is
ok, will take another look at his files 🙂
Its the same concept with adding a item to a loot table, you end up inserting it into the base loot table
yeh i think i must be making a really dumb mistake since i got it spawning in containers aha
The outfit?
yeh just not on zeds
hm
I think I'm probably making a spelling error or something (will triple check)
check TheyKnew_ZombieDefinition in shared npcs
has something to do with it
I wish you the best of luck
I myself have been trying to make something client side only, i'm been browsing the lua docs for hours 😂
you and me both aha my lua file is starting to make my head spin
You will get it eventually
@quasi geode sorry for the ping, i tried the code you gave me and it seemed to not work.
what my main focus for this is for it to choose a random item from the function list to create as i craft its recipe
function AddRandomItemToInventory(player, items)
player:getInventory():AddItem(items[ZombRand(#items) +1])
end
function Credit_Card_OnCreate(items, result, player)
AddRandomItemToInventory({"CreditCard", "LightBulb"}, 0, 1)
AddRandomItemToInventory({"Screwdriver", "Battery"}, 0, 1)
end
I'm new to coding so i really dont know where to put what.
thats because your calling it wrong.
function AddRandomItemToInventory(player, items)
player:getInventory():AddItem(items[ZombRand(#items) +1])
end
function Credit_Card_OnCreate(items, result, player)
AddRandomItemToInventory(player, {"CreditCard", "LightBulb"})
AddRandomItemToInventory(player, {"Screwdriver", "Battery"})
end
ahh i see now thank you so much for the help.
Modding Project Zomboid almost makes you wish for a Zombie Apocalypse. 😛
Adding 100s of lines of rote code can be tedious at times.
can someone dm me some good mods ?
can someone help me set up my gportal server?
im in bob safehouse
I was trying to modify helicopter mod to fit in MP, and I think it has to be sync between all players who are seeing choppers.
Is there a function for get all vehicles in a specific player's sight?
and if OnTick() ticks synchronously for every players in MP or is it framerate bound?
Anyone know of a mod that makes a % of the zombies to sprinters? That works for multiplayer. Apparently Customizable zombies is a bit iffy atm.
isnt there a mod that fixes long text for item descriptions from going off the side of the screen? some modded gun parts have such long descriptions that it goes off the screen
I don’t think they used a mod, they probably changed the sandbox settings and set the zombie speed to random. This means that a portion will be shambling, fast shambling, and then sprinting.
When you call getCell() on the server side in MP, which cell is it getting?
Hello, I look for mod which add animals or hunting to game to get food. Anyone knows such mod
I don't think we will get anything like that until npcs come out
https://steamcommunity.com/sharedfiles/filedetails/?id=2756430960 this mod only add props or I can kill animals for food
Looks to only be props
Is there a way to add conflict in mod info?
Is there a list of mod info types somewhere?
not sure, heard mod manager does something like that
is there a way to fetch all nearby vehicles? I want to update sound and visual of cars in lua
Worst case, you should be able to scan over the cells, get their world objects, and check if any of them are vehicles (compiling those that are into a table)
getCell():getVehicles() returns an array list of vehicle IDs I believe. Or maybe the vehicle objects themselves.
I want to remove a 2nd object from server when an IsoThumpable is pickedup or destroyed but I get index error on clients. What's a good way to get around this.
I'm using the onobjectabouttoberemoved event
Hey does anyone know what happened to get Better UI removed from the workshop? Anyone have any backups to reupload?
New update is out for Left Click Redux:
https://steamcommunity.com/sharedfiles/filedetails/?id=2795987309
If you use it and find a bug, feel free to @ me
Literally just found this on the workshop and I like it so far. I didn't realise how useful it would be
What's left click redux?
@balmy prism It does a lot of stuff, the short explanation is that it makes a large amount of Zomboid playable using only the mouse.
My inspiration was Runescape's controls. Left clicking anything will make the character walk over and do a default interaction.
oh neat
is there a simple method to get a list of the connected users usernames?
yes
but you have to be admin of server im pretty sure
ok
Nice mod, congratulations @craggy furnace @sinful vessel
Hey there, Im working on a mod for a trait that interacts with music, is there a function to reference volume variable of the closest playing audio device?
Does the function hooking into a lua even happen before or after the thing happens
I want to try to hook into a player update event to prevent the player from entering a state
i have no idea :(
Is ZombRand() guaranteed to be return the same values on clients and server, or is this mod code I'm reading flawed?
varies depending on the event. best to assume its happening mid-way through the event (some things will have been processed, some not) and past the point of no return. you'd have to check the decompiled java for the specific events though
will be totally different. any identical results are flukes.
thank you, ill have to go check the java
im decompiling the java
does anyone know what actually sets the knocked down status on players when being attacked
setKnockedDown() I think
Hello developers/survivors, I was sneaking into the IsoGameCharacter class, and I found this setSceneCulled(boolean boolean1). Can someone help me understand what this mehod does? Thanks so much!
is Z's actual length different from X's and Y's?
I work, I have more time to help on discord but if when I pass I see a mention of my name I ask ofc, if I can help for a specific thing
is there a value that can make a moveable's health infinite?
Is there a mod that makes my character gain unhappiness from killing zombies?
you're good mr. bounty 🙂
dmca struck and deleted apparently
who wrote it?
Oof, I wonder what that broke.
i personally didnt have anything that required it but playing without it even briefly felt a lot worse
I only installed that mod for the Comparison feature when hovering over items.
I'm gonna miss that feature.
i know its a bummer
im sure out there has to be a copy or something but idk the rules or regulations for using something that's been DMCA'd
I presume using it yourself is fine but redistributing it isn't
There would be no way to prove you are using the content for personal use.
To be more specific, at a glance; there does not seem to be any regulation on the personal use of copyrighted material, and the regulation is specifically placed upon the distribution and recipient of the distributed content.
Therefore you are not exactly breaking a regulation by using the content, but have already broken the regulation if you have the content in your possession.
Wild
What are mandatory mods to have

Lmao
Better sorting, filibuster cars, that one with the inventory button...
If you search most subscribed and just scroll you'll find them
https://steamcommunity.com/sharedfiles/filedetails/?id=2795987309
This helps new players who don't like ASWD movements a lot!
Keep them coming
Save time to open wiki
https://steamcommunity.com/sharedfiles/filedetails/?id=2787291513
Your girlfriend will like this (if you have one)
https://steamcommunity.com/sharedfiles/filedetails/?id=2726792138
Do this, but keep in mind that some mods are out of date.
what is the one with the inventory button?
I guess this?
expanded heli event. It is a much needed upgrade for the fairly boring vanilla one
F
Better UI is just a collection of these mods
-ExtraSauce Quality of Life by MonsterSauce
-More Description for Traits by Champygnakx
-Simple Add Inventory Pages by RH4DB4
-Turn off the TV/Radio from the context menu by RH4DB4
People know Better UI but don't recognize the original mods. 😿
well now I do 
thanks for the sauce
Laren X's human female skins, can someone share them?
RH4DB4 mods are simple and incredible at the same time
been using Simple Add Inventory Pages for months now
Yo
I have an idea for a mod that in theory should be easy to make but I have no idea how to mod
I would love if somebody helped me
:getType() -- I'm having trouble finding documentation on the getType method (the frequently useful https://projectzomboid.com/modding/zombie/iso/IsoObject.html#getType-- is singularly unhelpful and terse here). I went so far as to find this enumerated list of constants for its result (https://projectzomboid.com/modding/zombie/iso/SpriteDetails/IsoObjectType.html) and realized this can't be right! I see it get used all over the place with lots of different kinds of items in other mods and it's definitely returning things that aren't in this list, but I can't seem to find out what value it's grabbing and returning.
TLDR; can you briefly tell me what value/field it is that getType returns when you feed it an item? (How do I know what the possibilities are, or what value to expect for a certain kind of item?)
I wonder if any of the people uploading music to the workshop realize that they ae basically committing copyright violations.
Well, I imagine that someday in the future there may be a case where the steam workshop has uploads scanned for DMCA content the same way Twitch/YouTube/Instagram does.
the blind trait definitely has to be up there
they aren't violating any copyright laws
Its because of fair use
since modders Aren't making any directly stated income off these mods it all falls under fair use
If steam made any money from these mods or if the creators made any money it'd fall under copyright but 99% of time its only private income as in commissions or just a person doing it on their own time
now if indie stone put any copyrighted music in the game without getting creators permission that'd be a very different story with a very different legal outcome
Section 107 of the Copyright Act disagrees with this.
correct me if im wrong
Moreover, mods with copywritten music in them have been taken down the past.
Funny story there, they aren't transfomative in the slightest.
There's whole damn albums on the workshop, and all you have to do to get at the music is to dive into the folder through the file explorer and copy the files into a music player app.
Anyways, if this is going to start turning into some extended back and forth over people's interpretation of copyright law it would probably be better suited to #offtopic_non_pz ?
The fact of the matter, as relevant to modding for pz, is that mods with copywritten music in them have been taken down in the past, and if you upload a mod containing copywritten music you run the risk of having it taken down.
Alright, I kinda thought transformative fell along the lines of adding it to game files in a certain way, well thanks for correcting me
If mods that have copyrighted music generally get taken down how is there so many mods that add music to the radios n junk
Yeah, this might not 100% be the place, even though it's mod related. I was debating adding some Blue Note to the game, but I changed my mind.
Simple. Some have been reported and taken down, but not all of them have been reported.
It's a bit of a process to formally file copyright claims, IIRC. Copyright holders would baiscally have to play wack-a-mole.
ah
Yeah, NBD, I just know that when people start arguing over their interpretations of stuff like copyright law on the internet it can turn into some 100-post back and forth and such? I'm headachey today so I'd rather just say something now than come back to pages of internet debating re copyright law 😄
Tbh i just try and post what i know and welcome corrections to people who know more than me
Is there any mods that actually let you go inside the bigger cars
Like cargo trucks n junk
There's this one:
https://steamcommunity.com/sharedfiles/filedetails/?id=2795611320
Is something like what that mod does what you meant?
Basically, it's a car that connects to a worldspace isolated from the rest of the map.
It's bigger on the inside. 😄
thats actually pretty wacky but definitely cool
does it have english text or is the video just in, uhhh not really sure what that language is
Sure, the actual code is brief-- It returns the result of this.sprite.getType() or IsoObjectType.MAX if this.sprite is null
I think it has an English translation, yeah.
my goal is to have a completely portable home
I dont like being locked to one location
btw how do zombie break-ins work
I've toyed with the idea of making a version of that with one of FR's RVs, but I've got a lot on my plate at the moment.
The return type there is IsoObjectType, which has these values (where IsoObjectType.MAX seems to be a placeholder for unknown/bad values):
like for instance a zombie breaking the car
They wail on the windows til they break, and then start trying to nibble on the sweet succulent manflesh on the other side?
They path to you?
wdym
Are you asking how their pathfinding works?
Oh!
You're talking about that Armored MH mod. 😛 No clue, I've yet to even look at that mod.
They probably can't, to be honest.
I know the mod works by basically teleporting you to a whole different area of the map.
Like, to a cell outside the original bounds of the game world.
so yeah they probably cant hear or see you if your in the home part of the car
You should look into how it works lua-wise, if you want to know more.
I might toy with it this weekend.
Tbh i dont have any plans on learning lua
Shame. All PZ modders should.
I didn't exactly have fun with python so i cant imagine lua being much better
At least a basic understanding of the structure of how it works.
either ways it should be fun to mess around with it
how does this work on MP if at all?
like if there are multiple of those cars on the map
"7. Each car has its own space. If you lose your car, your room will be gone. The server supports up to 25 independent spaces"
oh nice
really cool idea. Would absolutely love to see it on a proper rv or as an addon for the boat mod
The thing about the mod though is that it's reliant on the admin TP functions, and MP is real fucking bad about players teleporting all over the damn place.
the zombie thing would need the be worked on but one fix I could think of is a cooldown on going to the living space if zombies are around
maybe if more mods start using this method the devs might find a fix for it
Unless the author has figured out a way to keep the game from wigging out when trying to load 50 cells all at once, there WILL be issues in MP.
bruh
so im playing with the motorhome mod u recommended
it spawned on another car
and now i can't get it off
lol
rip
Thanks for the reply! I'm still a bit lost...
Yeah, this list you gave here looks just like the list I found and linked to in my original question... but people seem to use it for all sorts of things that aren't there in that values list. (For one example, it's used multiple times in Arsenal(26) GunFighter Mod, file media\lua\client\GunFighter_02Function.lua among others; they call getType and are searching the result using string.find for lots of things that don't show up in that values list, things that the mod writer must have added when they created new items in the scripts perhaps for example, like string.find(canon:getType(), "Suppressor") .) But I can't see or figure out where they would have added the phrases they're searching for, so I'm still stuck trying to figure out how to use getType because I don't know what sorts of things I should expect it to return in the context of, say, an inventory item or something. Any insights?
you're likely looking at the wrong getType method (wrong .class). theres multiple java classes that have a getType method, but are used for entirely different things (and different return values). in the case of the gunfighter mod, he'd be using it on InventoryItem.class objects, in which case it returns a string value: the name given to the item in the media/scripts/*.txt files
Oh, the DisplayName then?? (Hmm, or maybe the actual item name as in "item MyItemsName {" perhaps?) That's really helpful! Thanks a ton!
I'll look into that InventoryItem class to see if I understand that part better now too 👍
not the DisplayName
item Something {
... block of properties here
}
it will return Something
gotcha - was just editing to consider that, thanks for the confirmation
So helpful, you ROCK 😎 🤩
Hmm, so I see the method you're referring to (https://projectzomboid.com/modding/zombie/inventory/InventoryItem.html#getType--) but it is terse as always... how did you know that it returns "Something"/the item name? (and how do you get it to show up with that code formatting here in Discord?) Would love to know so I can better figure stuff out on my own and not trouble generous ppl like yourself if I can help it 😉
still waiting for those, if anyone has them, please 🙏
dont expect much from that documentation. its like 7 years outdated. better to look at the decompiled java. And discord code formatting is easier to explain with a screenshot:
use 3 ` backticks, followed by code, and ended with 3 more ` backticks
for language specific code blocks, include the language name after
function example()
-- lua code example
end
Fair enough! I haven't yet looked into decompiling the java (though I've seen it mentioned in passing a couple times), but it's good to know what it could be doing for me, though. Once again, thanks for all the help (ticket closed, haha). Have a good night/day/whatever it is wherever you are!
Guys hear me out
I have an idea for a mod
In The Long Dark when you store your food outside it gets frozen
So you don't need a fridge because it's cold outside
Can someone make a mod that adds the same feature to Zomboid?
So if it's for example 4°c or less
Then the food that you put outside gets the same effect as if it was stored in working fridge
And if it'd cause lags because that would be too many calculations or something
Then make it work only if you use an option from context menu
For example : bury food in snow
I've made this suggestion once or twice before.
People up north know to put their food out on the porch if the power goes out in the winter months.
And only then it'd start calculating the temperature of only this food
Yeah and it'd be really useful when playing with Cryogenic Winter
Or when you just don't have a generator yet
Because you started in winter
And there's no electricity
I'd try to make that one myself if i knew how to make mods lol
So please guys
If any of you know how to do it
Then I would be very grateful for your help
Hello guys, I am new to this server. I want to make a small mod that will add tobacco pipe, but I completely don't know how to mod. Are there any useful modding tutorials? Thanks.
There is already a lot of mods that do so, best bet is to download the smoker mod and reverse engineer that
@ancient panther I know for a fact that Jigga's Greenfire has a tobacco pipe.
The Smoker mod has a smoking pipe as well.
thank you
MOD IDEA:
(I don't know how modding works so it's up to you guys to make it work if you like the idea.)
For Walls, Doors, Gates, etc.
Rather than relying on just Hit points alone, how about a pressure threshold limit?
Walls, Doors, Gates, & etc., Should have a threshold limit, once reached, it starts to break down, taking permanent damage on its total HP, and the more HP it lost, the lesser threshold it wil have since, making it realistic. Just like when you bend a metal wire back and forth, it eventually cannot be returned to the same state it was before you bent it, and sooner or later it rips apart.
Walls, Doors, gates, & etc., being destroyed by multiple zombies makes sense. A Horde can definitely break down a metal gate, or tear down a wall. But right now, even a single zombie can do that.
So Example:
A garage gate threshold limit is 100.
Zombies that is trying to break through this gate, counts towards the pressure. If there are enough Zombies at this gate, it may start reaching the threshold, and the Garage Gate starts to take damage and permanently loses its maximum threshold, which eventually the gate breaks down. But if halfway the zombies are stopped, the % HP left is equivalent to the max % threshold that would remain. So if there is 50% HP left, the threshold would now be 50.
Optionally, materials also have an age. The longer the days since the apocalypse, the lesser HP and threshold structures can withstand.
since the remove zombie hair mod is gone is there a way to do it myself
Interesting idea
Yeah but it seems like no one is interested in making that happen
Lol, I just said it was interesting because I might want to take up the torch
More to come
Heh I was just thinking of looking if that was feasible with lua mods the other day 🤔
Probably one of those things so hardcoded in java classes that if it was it'd exist as a mod already
v possible
So I’m working on a mod that adds a bunch of water jugs for bulk storing water, one of the features will be taking water jugs out of water coolers. Is there a way to set the water in the jug to match the water in the dispenser?
how different is lua from python, the only experience I have with any language is basic python? How hard would it be learning lua after python?
Look in the tools category of your steam library for a thing called Project Zomboid Modding Tools. You can type that into the search bar.
doesn't the water dispenser mod already do all of that?
Yeah I think there's a mod like that already. But if u still wanna roll your own, I'd look at how the tooltip shows water level
Might be in its moddata
I plan on making a big mod with a lot of extra water stuff, and taking jugs out of coolers is just one thing I want to add
I just don’t want to start infinite water glitches
gotcha
Hello. When editing the item scripts for cigarettes, is it possible to add RANDOM (from 5 to 15 ) cigarettes spawn?
@tawdry moss IsoObject:getWaterAmount() will let you read the amount of water from the dispenser
Thanks
Another thing to consider would also be checking IsoObject:isTaintedWater()
To maintain contamination across transfers
@sharp crystal you can get random integers using ZombRand(x)
So you'd want ZombRand(11) + 5
(ZombRand(11) gives whole numbers from 0 to 10, but never 11)
Hi, is there a way to assign a random animation from a set of animations to a recipe via AnimNode variable? Or I have to define a custom timedAction for that?
thanks will do..
@broken fulcrum I found it indeed where you said, now which script parses this recipes.txt file, is it the one we found the spear cond in? (lua\server\recipecode.lua)
hm
so, that's the thing, the function OnCreate is there, but I don't even think it's imported on the recipe-weapons.txt
I just simply can't understand it lol
I was thinking about making it 5 (vanilla value) + (CarpentryLvl/2)
for a maxcondition of 10
ye we need to figure out how to make a recipe that doesn't exist in that lua file, get processed by it with our own code 🤔
this is called but I have no idea how you'd make one for axe, trying to scour through the code https://projectzomboid.com/modding/zombie/scripting/objects/Recipe.html#Recipe
like how do we hook our own recipe.oncreate.stoneaxe so its called when you make a stone axe, I don't get it xd
yeahh
that's the problem I THINK I had
because it simply would not apply
I tried making an axe with 0 and then swung it a bunch of times, it had 5 maxcondition
then with 10 carpentry
and still, 5 max condtion
nah it won't apply unless its called, and idk how you make it get called when you create a stone axe
when you craft it the recipe should look at your own code you added, but at the moment idk how you make it do that
like, how do other modders create a new weapon recipe and make a lua function be called during crafting
@modders hello Kappa
yeah, I tried making very similar to the spear one, but to no avail
I’m out and about now I finished work but maybe someone else can chime in, otherwise you could look at scrap weapons or something that adds custom weapon crafting recipes and find the recipe code and how it hooks
humm, yeah, if they have the same principle with carpentry based condition it could help me
So I'm fairly new to modding for PZ, I been trying to work on a mod that adds stackable items (I know there is already one but it's out of date and I'm pretty sure the creator has abandoned it. Plus they didn't make 3d items for them.) I think it have the files set up correctly but may have screwed up some where with the coding or missing something.
Is there a mod to better understand and write the log?
so if there is an error, the mod would tell from which mod it was originated
@inner bladeDid you make the stackable planks mod??
No, but I wanna try and make it.
Ahh man, okay. XD
But thanks for telling me the mod, it might help me figure out what's wrong with the one I'm making.
I am having a problem using require
I do this but when I check it, it's nil
using this as reference, it does not work
Both files in lua/server
the require mod is in require on the mod.info
why does it not work?
aaah
I need returni in the end of the first file
Can someone please tell me how i can make multiple choices for one mod in the "mods" page in PZ ?
I saw this on some mods like Paw Low Loot, Authentic Z etc...
I want the people that uses my mod to be able to choose between two textures when playing but i can't seem to find any guides on how to do this.
I can't even get the mod I'm working on to show up in my mods list.
Try copying a mod.info from another mod and making sure your mod id is unique
Think the realization is that I was putting in the mod folder and not workshop..
God I'm dumb.
Like this ?
Yep !
he just had 2 mod folders
When you add your mod to workshoip, you just put multiple mod folders in the contents/mods
Hmm, ok 😮 How do you make it so there's only one Workshop page for it tho ?
Yes like that.
Zomboid\Workshop\aadvzmbmod\Contents\mods\Main Mod
Zomboid\Workshop\aadvzmbmod\Contents\mods\Secondary mod
Like that
2 folders
Ooh alright, i see now, i'll try it thanks 🙂
I'm still having trouble getting my mod to even show up in my list, as far as I know my id shouldn't be overriding anything.
Try restarting the game after changes.
You can test with the template mod
I have, I tired both ways using the mod folder and the workshop folder. Tried even setting up the files how it's in the workshop and nothing. I more or less need someone to look over to files and see what I did wrong.
Weren't folks just talking about custom sledgehammers recently?
"- Several new Tags were added to the item scripts, and their functionality added to the lua code.
- This allows for modders to add new items that seamlessly work with the game in several places, such as adding new fully-functional Sledgehammer items, or adding new Gasoline containers."
can someone help with this problem? i have my super shotgun model working good but...
but when reloading, it swap to the model of the pz shotgun
i got this in the code
and my custom models
Hey! I wanted to make a update of my texture pack but since I switched to the new TileZed, I have a problem when I try to post one of my posters.
Quick question, what is that program?
{
imports
{
Base
}
item APO_PAPERBOARD
{
Weight = 0.2,
Type = Moveable,
WorldObjectSprite = apoflag_44,
DisplayName = Paperboard,
Icon = APOFlag,
}
}
Thanks in advance 🙂
I use TileZed > Tile Properties
On my backup, everything work
Wish there were better tutorials on how to mod PZ. I'm really struggiling on how to even get a mod to show up in the mod list, hell idk where to even put it for it to even show up.
I'm lazy during testing and use C:\Users\YourUserName\Zomboid\mods\YourModName
I tried doing that and still nothing.
I feel like I'm doing something wrong but have no idea. I've had modding experience but manly with source coding. Not Lua.
name=ModName
id=ArbitraryModID
description=This is a description string.
pack=NameOfAnyPackFiles
poster=poster.png
tiledef= nameofanytiledefs xxx
Double check your mod.info file with an editor perhaps.
Pretty sure it looks fine, have no idea what the pack or tiledef is though.
no problem those are not important to get what you need right now
Not sure if the parser will interpret your two description lines properly try removing one for now.
Okay, so if there a specific place I need to put the mod? Like in the mods folder in PZ or somewhere else?
Or could I send the wip so far and have it looked over since I'm like learning as I go?
Your mod goes into the C:\Users\YourUserName\Zomboid\mods folder.
Otherwise you will need to learn the workshop workflow later but this works for testing
just like the examplemod listed in that directory, if you have an issue you can study this and follow along using your own sub directory.
I was trying to figure out where the hell it was, but at least I can view it now. Only issue it seemed to wipe my text from the starting screen after I enabled it.
And it just crashed my game now.
Perfect.
It gets stuck on loading scripts and then crashes.
Something in your media folder of the mod must be causing an issue, I would suggest starting small and building the mod up piece by piece until you find what the conflict is
Okay, at least I know how to put the mod in the game now. Many thanks either way.
You are welcome Cory
I cant for the life of me get Night Vision of Any kind to work. Anyone have advice?
Has anyone seen a mod for building a roof?
what are some of the best mods
Could someone enlarge the Frog 3d Model and make a big plushie out of it? Thanks flies away
Plenty of YouTube videos for this. Do a search and you’ll be surprised
i did, just curious about your opinions
when I add a mod to a server do I need everyone who joins the server to download it?
yes
Okay so what do I do when I can place an item but it only show it's invisible but when placed it only shows the icon? I have a model made but it seems to not be using it.
Hm, I think I may scale it down. Not sure if I should lol
Heya everyone, so today we’re pushing the 41.69 patch out into the Unstable beta. This is the first release of a wide-ranging version that touches many parts of the codebase – including some fairly foundational stuff to improve the smooth running of MP, some handy new hooks for modders and many and various different fixes […]
Many mods break the game.
3D items now shown as textures rather than models. As such they now slide around less when the player moves, and have far less of a performance impact when all piled up.
Lots of changes
query: is anyone aware of a mod that allows you to tweak values for loot respawning at all, or is that just totally not possible anymore?
it's rather frustrating to me that 'extremely rare' is the lowest option for a lot of things when 'extremely rare' still means 'way too much'
What do you mean?
Doesn't sound that game breaking
what app is this?
Some mods cause the game to fail to load.
VS Code + GitHub extension
You can check what's new and get some fresh ideas for your new mods for the next patch update.
Dear god
I'm confused what it means by that the models will be textures now.
So its gonna be like the player models now?
Where can I found the item's Icons folder? I can find the frog texture, but not the icon, unless it has other name
You don't have to find it, you can just remap it to another location.
no, but the thing is that I want to copy one of the icons lol
Just rip it off wiki
yeah, I ended up doing this after searching a lot and finding nothing
Anyone know solutions for client side mod configuration other than Mod Options?
People keep complaining to me about using Mod Options in my mod
oh shit are you the doom mod maker
very cool
props to you
I enjoy the model of the doomguy
If you know enough about lua probably you can look at the menu lua and add things to it.
is there a mod that autounlocks ability to use generators or gives it as perk? i know there was one but i cannot find it on workshop
yes i am, thanks
this mod will be focused just on killing zombies, less survival, making doomguy overpowered lol
Yea I hoping that wouldn't be the answer. Oh well, I guess that's what I'll do when I have time.
What's the biggest a texture can be?
on a multiplayer server is there a file modified locally upon death? Like with a solo play a characters map_p.bin is cleared, but is there something similar for multi?
All the vanilla icons are sorted into .pack files. You need the mapping tools to access/unpack them.
ohh
Good to know
Yeah, it can be a little annoying at times. Instead of like 1000 separate files, everything you see in the UI is wrapped up in about 20-30 tilesheets of sprites.
I personally unpacked the main item icon sheets, to use them as a quick reference.
If you need to copy any of the icons, I can send you the files in a PM.
yeah, I think it makes sense, it's a lot smaller and it works the same
I stole the one I was looking for from the Wiki hehe
Hahaha, all right then.
Vehicle textures text to be a bit bigger than that. As for things like world static objects (items on the floor), you're doing something spectacularly wrong if you're making textures larger than 128x128.
Okay, I was gonna remake a texture since It's a bigger model.
What is a "stale" zombie?
guys Can you mod Turkish food?
A zombie that's gone past its expiration date. 😄
I don't even know any Turkish food.
you can search in google
You would assume, but it sometimes considers brand new zombies stale.
somebody should make a mod that makes military outposts at major roads leaving the knox event map. idk how itd fit into the lore but itd be something along the lines of the military trying to keep people in the area, with the outposts either being overrun or still manned. (IDK)
What is this syntax in java with the expression (value, value), such as in:
sendObjectChange(var0, "reanimatedID", (Object[])("ID", (double)var1.OnlineID));
It looks like a tuple in other languages, but I can't find information on it working like that in Java.
I found an article that said it only resolves both sides of the comma, and only returns the one of the right.
My jdk won't compile it for some reason though
@harsh falconp sure i've seen this in the survivor mods
army NPC's that shoot you if you approach the road blocks
ok
tho idk how long they last
also how do i get mods to work on a server that im hosting
i click the host button and start making a server preset or whatever
the mods never really show up on the servver
do i need to add them to the steam workshop AND mods section or what cuz ive been here for like 3 hours just messing with mods
i wish there was a quicker way to add them (i did spend 2 hours just browsing the workshop though)
oh i see there a channel for it mod support but whatever i did it lets see if it works
How do you make custom posters? Like the ingame posters?
That's not building a Tuple, it's calling a method, and there are two type casts in the middle of the expression
Cast var1.OnlineID to a double, then cast the string "ID" and the double value as an array of objects. After that it's just calling sendObjectChange with all three values.
anyone know how to get fps for lua?
Did a thing that makes the first aid kits red by editing files, but when I tried using a mod to replace those files for MP use it didn’t work. How do you overwrite textures for a steam workshop mod?
don't know if it works with textures, but for recipes you can use the line
Override:true,
but someone with experience can answer you better
What tools do you use to decompile and recompile the java? The intellij decompiler fails to decompile some syntax, and javac encounters strange errors recompiling.
usually a wrench and a screwdriver will do
What JDK/IntelliJ versions are you using? I haven't had a problem
what do you mean with "fails to decompile some syntax"? you mean the code is all obfuscated?
i have an idea for a mod that may be cool, idk if anyone would be willing to make it or how hard it world be, but what if there was an immunity mod that was completely randomized? kinda like the story in tlou, what if there was a chance (maybe a configurable chance with the mod options mod) that every player could be immune to the bite virus? there would be nothing that tells you or indicates that you're immune, but you'd have to figure it out yourself.
maybe doctors or nurses would have a slightly higher chance of being immune or something as well.
could be kinda cool for rp servers and such, idk. just an idea. i really like the they knew mod and this is kinda like that in terms of randomization
I mean it decompiles varargs function calls into invalid syntax entirely
I don't remember which version I decompiled with, but it was a fresh install of IntelliJ 2 months ago
do you remember where it failed? the .class file and method? I have intelliJ open and want to check.
sounds good
It doesn't error out, it just produces invalid syntax in some places
I understand, I want to see if I get the same.
in any case, regarding your question, I do not know other options for decompilling.
Then look in IsoGameCharacter line 7462 after decompile
@junior raven here?
at glance I don't see anything wrong, but I don't know much about java.
Sorry, GameServer.java:7462
Search for line containing: sendObjectChange(var0, "reanimatedID"
It's in the sendReanimatedZombieID method
oh I see, is the "(Object[])("ID", (double)var1.OnlineID)" bit?
I have no idea what is that.
seems so, thanks for indulging me.
no, I just decompile for figuring out what the game is trying to do.
Yeah, me too so far
hoho
@junior raven http://www.benf.org/other/cfr/
CFR is a JVM bytecode decompiler - it will decompile modern Java features (including Java 13) but is written entirely in Java 6, so will work anywhere! - It'll even make a decent go of turning class files from other JVM languages (eg Kotlin, Scala, Groovy) back into Java!
Yeah, I've been looking at that one, but I'm not sure it can decompile directories recursively
ah you on windows?
yes
Me being in linux so I was going to tell you to "just script it" but it wasn't going to be helpful.
In my experience, overriding parts of other mods tends to be a crapshoot. Sometimes the Override function works, sometimes you just have to overwrite entire script or lua files.
So is a single texture a nightmare
Are you overriding a vanilla texture?
Vanilla then.
I've actually done the same exact thing, funnily enough. I thought the neon green was too obnoxious.
I got it to work by editing the files on my computer but I want to be able to be on the workshop so it works in MP, cuz I do MP more than single player
Basically you use ItemTweaker to override=true the WorldStaticModel of the FAK to a custom model that uses the vanilla FAK mesh and your custom texture.
So you'd need the ItemTweaker core file, a IT script with the change, your texture and a script file detailing the new model.
Plus all the usual a accoutrements of a workshop mod: Description, icon and cover images, etc.
The color is fine
does anyone know how to take mods from your game and transfer them over without re adding them all to the game on server side
probably Authentic Z or Paw Low Loot Fantasy
but can't guarantee, haven't used em
in a long time
Woudnt be that hard to make one probably. Just a long dress with a bit extra around the neck and then the head cover.
yeah
tried looking for "nun" on the workshop, it literally had 1 result and it was a music addon lol
I could try to make one but I have little to 0 knowledge on how to make clothing.
I could try to make one but I have little to 0 knowledge
I know theres a guide on how to make clothing.
I just thought of a clothing mod but I'm gonna be quiet since I don't wanna be outed for it
🤨

sexy nun mod when
What module can we use to get the frequencies of the radio presets of the clients?
I can't figure it out, I'm using RWMPanel
anyone know of a mod or setting i cna add to double the capacity of containers?
Can anyone point me in the right direction. I'm looking for where the game determines when to split a heavy item into multiple packages as such:
Purpose being to provide the other half of an item when crafting it
Hi
Is there a mod to further analyze the log?
because all those messages don't correlate to mods, just the message itself and no explanation what and where
If I try to update steam mod and get error 8, does it mean I don't have permission to update.
Quickie, Some mods add more sandbox settings, but how do i change those settings on a multiplayer server? When i go edit server settings there is no additional settings under sandbox
Create server settings on host from ingame with this mod. Then settings will appear in one of settings file. Then copy them to your server
Update steam mod can only person who uploaded it
Hello, can anyone help me with this. I wish to change the text color appearing on top of my head. It's my first mod xD
sorry for cross-posting (kind of), but it's also mod related so... has anybody an idea how to fix #old_techsupport message ? when the server kicks the client because it cannot find a specific file even though it exists and is exactly the same content (100%) as on the server and as on other clients? are there cases where the client cannot read mod files for some reason or something like that?
Anyone interested in collaborating on a mod similar to "Save Our Station" but for power and water utilities?
Where can I find proper documentation on types like this? https://pzwiki.net/wiki/Modding:Lua_Events/ISInventoryPage
How am I supposed to know exactly what properties and methods it has?
Or do I just have to look at the game's media/lua files?
Nvm, I see that basically the entire original definition exists in media/lua 🙂
query
how do you guys edit .pack and .tiles files?
there's a kinda semi-abandoned mod that has a couple bugs, i wanna fix it up for personal use and it feels like they'd be simple fixes if i could figure out how to get into the files, just not sure how
Could someone send me that tutorial on how to make Zomboid run as a server and client in a single computer used to test MP mods????
I am run dedicated server and 2 clients of PZ in nosteam mode for test MP stuff
Pack files you can open by pack manager (check on theindiestone forums). Tiles file open by one of project zomboid modding tools i think
noted. azakaela's flags mod is pretty abandoned by now and has some weird bugs that result in flags turning into other flags when placed, so i wanna see if i can fix it up to get those flags working properly
i'll see if i can figure out how to dig into those files
thanks!
Yeah, If I'm not mistaken, it is necessary to copy and edit some executables to do this, but I don't remember how to do it and I know that there is a lost tutorial that teaches how to do this, but unfortunately I didn't find it in the "pinned messages"
would be so cool to have an escape from tarkov type hud mod
Hey just making sure, Events.OnNewGame have the same effects in MP or is it messy?
Would it be only for the host or for everyone coming into server for the first time?
nvm found my answer, its on host.
Just add -nosteam param to exe file and bat file (server)
Raccoon City Part 5
Fossoil and Gas 2 Go bout to have some serious competition from the City of Raccoon
Slightly updated RC Transit Authority Bus
Does goto not work in this Lua implementation?
Exception thrown se.krka.kahlua.vm.KahluaException: Testing.lua:116: '=' expected near `nextSquare` at LexState.lexerror
About line goto nextSquare
Hey y'all, is there any mod that enables minimap automatically/only when you're in a vehicle?
I actually suggested it in the pz-chat this week while a discussion about the mini-map was going
but I don't think so
goto was added in lua 5.2, pz's kahlua is based off 5.1
I see, thx for the info.
i have an error popping on new game startup but it goes away too fast that i cant click it.. how do i catch this error so I can see what it is?
Try check console.txt in Zomboid folder
anyone know a good tutorial to make a vehicle mod?
also does anyone know how to add true music addons to an mp server? I tried but it just sat at a black screen and wouldnt even load
Hello and welcome to my tutorial. It covers full workflow of vehicle creation for PZ. If you are a complete beginner in 3D modelling, you'll have to watch/read additional tutorials, I won't cover every aspect of model creation and 'where this button is located'. I divide vehicle creation in these...
the first one is more up to date but this one has the color codes for the damage masks https://theindiestone.com/forums/index.php?/topic/24408-how-to-create-new-vehicle-mods/
Has the patch on unstable caused much trouble with existing mods? Wondering how safe it is to update an existing game with some mods installed
backup your save first, though the patch notes say there would be some conflicts with certain mods.
how does ZombRand(0,4) work?
is it picking a random number between 0 and 3 or 1 and 4? or am i misunderstanding what the 0 and 4 represent
my recent testing with it always resulted in the same number when using a small range. Not sure if I was statistically unlucky or using it incorrectly. was testing loot drops when dismantling world objects
ZombRand(4) is from 0 to 3
ZombRand(0,4) is from 0 to 4
thanks
another question.. when looking at the console.txt.. im seeing these for my items:
WARN : Script , 1651468232142> ModelScript.checkMesh> no such mesh "WorldItems\HTFACPack" for HTFAC.HTFACPackInjectors
WARN : Script , 1651468232142> ModelScript.checkTexture> no such texture "WorldItems\HTFACPackInjectors" for HTFAC.HTFACPackInjectors```
however the items seem to all spawn in properly without issue. Can I just ignore this error or is there something I need to do so it doesn't throw this error?
its doing it for every single one of my items
How do I specify that an item must be cooked food in recipe? For example I want to specify Cooked Fish Fillet?
You need to do a bit of lua and use a function called OnTest I think?
function Recipe.OnTest.SliceBreadDough(sourceItem, result) if sourceItem:getFullType() == "Base.BreadDough" then return sourceItem:isCooked() end return true end
As an example.
` recipe Slice Bread
{
keep KitchenKnife/ButterKnife/BreadKnife/HuntingKnife/MeatCleaver/FlintKnife/Machete,
BreadDough,
Result:BreadSlices=3,
Sound:SliceBread,
Time:40.0,
Category:Cooking,
OnTest:Recipe.OnTest.SliceBreadDough,
OnGiveXP:Recipe.OnGiveXP.Cooking3,
}`
Relevant recipe.
Thanks for your help, I think I should know how to do it 😀
👍
Does anyone have any idea if it would be possible to remove this through a mod
The craft sheet rope recipe?
generally
the whole window
that appears after i hover my mouse over rip or craft rope
Not sure how to do it myself? Never had a desire to.
You'd probably have to mess with the UI functions regarding tooltips.
you mod comrade?
Yeah. But I'm not too familiar with the finer bits of the lua/java.
You're better off asking someone more experienced than me in that regard.
What do you need help with?
I need help with deleting this tooltip from the game
The whole window
Remove the recipe too or just the tooltip
just the tooltip
My game stutters because i assume
the rest 169
are also loading
Lemme show u
Lags when right clicking or only when the tooltip is shown
Not on my pc so cant give exact help but the code is in invcontextmenu or similar name
I doubt you can do it though iirc the filling the menu is a very long function and removing the tooltip after its made would keep the lag probably
You could override the entire function and make sure its the first file loaded so it doesnt conflict with other mods
Well you see chief i have absolutely no experience in modding
This impossible noted
Optimizing it
noted
Its not impossible just a bit intrusive
Well the problem for me is getting to start
Yeah so watching the video again it only lags when creating the tooltip and not after when only displaying it
The tutorials on youtube are usually old and include adding stuff not deleting them
i mean barely any tutorials found 1
Could also look into optimizing the tooltip code
Ive achieved i think it was ~54x performance increase in a worse case scenario ui interface
I can give better guidance later
That would be much appreciated
My whole day is free but what hour is later since
as you said you arent around your pc
Give me like 30min-1h
no problemo
Yea I have that problem, too. It loads the entire list of all clothing items you can rip for sheets and then sorts them, so the ones in your inventory show first. Gets worse and worse with more clothing items from mods.
And that's with an i5 12600k, so not exactly spec problems
so its not a ryzen problem
I might look into it again tonight, maybe it can be optimized
mod wise or game wise
Cuz pretty sure i tested everything aleardy with spiffo
Mod wise, see what takes so long. Mby smth can be cached.
List of items shouldn't really change once game is loaded. Sorting the table also shouldn't really take that long, with only couple hundred clothing items
Even then - I'd rather not see the available items on top, if it avoids the stutter.
But at this point it's just guessing - maybe the problem is smth else entirely. Won't know before taking a proper look
Comrade you up today in like 1 hour or 5
What are the arguments for ItemContainer.new exactly? I can't quite figure it out. This, for example, is the call for when it creates a floor container:
ItemContainer.new("floor", nil, nil, 10, 10)
What are the nil, nil, 10, 10?
Hey! do you know if there is a method to overwrite a recipe in .txt from a mod like using the ItemTweaker mod? (i don't want mod pack)
That doesn't match exactly, but I decompiled from 41.65. You might be seeing a new signature introduced in 41.66+
Yeah see, there's no constructor with 5 arguments 😄
Comrade decenttech
Hello
maybe you have some ideas regarding my issue
From what I read, Browser and Tiaxx seem to be on the right track
Badly optimized mod code is probably re-sorting those many items or using an inefficient search algorithm to know those clothes are involved
(I would also expect sorting 100-200 items to be reasonably fast unless the sort algo is slow)
I mean as said
this looks like its sorting it every time if the cast is slow sort algo
case*
Problem being
This is my problem and the mod ain't gonna write himself for me
Does a particular mod you already have create that UI?
No this is pure vanilla
ive found where the code is but going to have to head out again plus very tired
You do your stuff irl first and then rest lad
if you want to have a look at it its ISInventoryPaneContextMenu.lua from line 2328 to 2684
At least somewhere to start
Im no pro at modding
if even i can say im whatever at modding
or even worse optimize it if that's the case.
Finding a performance problem in vanilla code is very motivating to modders, IMO
People would love to solve that, myself included
Most vanilla code is a performance problem
Problem being tutorials to modding ain't really tutorials how to solve this issue
i mean i watched this tutorial https://www.youtube.com/watch?v=N6tZujOPnDw&t=2980s
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...
But its adding a food item
not changing the vanilla code
Well it NEEDS to sort it everytime, in order to show stuff you actually have in inventory at the top. There's gotta be more going on there, though. No way it stutters for that long sorting 200 elements
The only thing I know about that is the Override:true,
but I assume it only changes recipes, it's for what I've used for at least
I won't be home for another 2-3h at least, feel free to share any findings 😂
The funnier thing is it does not even show the things you have at the top of the list
Sum1 mind pastebinning that lua file?
Not sure where even from but you can surely guide me there
I can surely download atom if that's the case
^ it's in gamedir/media/lua somewhere
If I wanted to get every container in a safehouse, would my only option be to iterate over every square within its width/height from the X/Y coordinate and check for containers on them?
Yea just use the search
Visual Studio Code
Visual studuo code is massively overkill for this and imo too heavy of a text editor
yeah
actually true, but it has some colour features may help understand the code for beginners
That's how I do it for a room: https://github.com/TheCrimsonKing92/pz-item-searcher/blob/master/media/lua/client/TimedActions/SearchRoomContainerAction.lua#L33
This is great, thanks 🙂
Synthax highlighting isnt unique to it
This is actually kinda related to what I am trying to achieve. I want to have 1 container in a safehouse that basically has the capacity of all other containers combined, and any item you put in a container in a safehouse gets moved to that container.
Sometimes, that's the right way.
what are you trying to do my friend?
Beware, there are limitations on container capacity, and if you exceed them the contents won't save correctly
I see.
Delete it as a whole
Though perhaps your "1 container" could rather be an interface into the contents of the various containers in the safehouse.
I had hoped I could somehow just "show" the other containers. But don't see a way to do that.
delete what? a recipe?
Delete the tooltip window
Yeah this is what I wanted to do. But when I add a container button, it basically asks for a specific container to reference.
What's that again? I always hear it, but always forget
so you want to delete everything and the person is kinda like on their on?
You might have better luck not making it a true "container" per the game, then skimming the container-related code you would need to create the new interface
I'll have to find a way to do that. Haven't done PZ modding before.
Item Searcher is my first, so I def feel ya. You might want to have a look at MrBounty's tutorial regarding making custom UIs: https://github.com/MrBounty/PZ-Mod---Doc/blob/main/Make an custom UI.md
Yeah custom UI is probably the way to go. Thx for all the tips. That's the kind of info you only find after trying for hours but someone experienced can tell you in a minute 😄
Haha exactly. I'm by no means the be-all end-all with PZ modding, but I've hung around long enough to pick a few things up 😄
def post back any time you want some help
Nothing more deleted lines can't fix 🤣
Get the building definition and go through the rooms iirc room defs have a getall containers
Then add the items to your ui
I absolutely can't optimize
so deleting the whole window should work
Problem being
its kinda hard to understand somebodys code
i think i found the whole window
Just comment out original line 673
That adds the crafting portion of the context menu
update
it now looks like that
and does not lag
which is fucking amazing
its bad shit stupid
but it works
Alright the video lags
because i have rdr2 on
🤣
But this isn't the problem anymore
Which is dumb
might as well be the sorting algorithm
but i suppose it works
that ALWAYS bothered me
maan when I'm on top of a 50 corpses pile
Wait
and click on "rip clothes"
you telling me even more ppl have this problem?
it lags so fucking much
yeah
When it's like what I've said right there
I think it's so much different clothes the games kinda goes boom
Yea it looks for like every recipe u can do with everything on any container around u
It's bit of a mess 🤣
I mean
kinda weird the game shows u things u can rip
in the
quickcontextmenu
not in the building menu
Anyway
Anyone think they can help me with this one after they finish everything important in their life and rest?
Yeah it's been annoying me for way too long, too. I will find some kind of workaround in next couple days.
i mean im just gonna try to delete the window for now on
Alright
fresh out of ideas
i have no idea which part of the code is responsible for the window to popup
you would like to remove even the popup that is empty right now?
ohh
most "mods" i try to make it spills out errors while hovering the cursor over
Ok so partial progress, problem is definitely in CraftTooltip:layoutContents, in that for j=1,#itemDataList do loop
tried commenting that out; removes any stutter!
Let's see what it actually does that takes so long, it looks simple enough 😄
yeah ok that's a lot of iterations
How's the thing doing
Go on comrade
Probably can cache the result of that shiet, got it down to 50ms from 250+ rn
I'm hcecking soulficlher's building time mod to figure out where I would have better chances of finding clay. From what I understand, it is in the "stone" category. I don't quite understand the rarity of the item on different zones, though, indicated in the highlighted line
The higher the number, the lower the chance of finding it?
Or is it the opposite?
No idea comrade
Set them to 10
Check if you find many
set them to 0
check if you find any
The game says stones are rarer outside of roads, so that's why I'm wondering
Fair. May have to do that. I'm on a server rn, so I guess I'lll just keep exploring and find out
The thing with mods that its
y know the authors code
not the original one
I would assume
Sorry, don't know the author's code. I supose the original is the id?
the higher the number
the higher the chance
since trailerpark does not seem like a place you would find clay
No i ment that in general this is a mod and for all we know the 4 could mean anything because he wrote it
lol it only gives 2 xp
I guess that it is a mod, but it still needs to follow the rules. I'd suppose it would be the same standard the game has for rarity
fair point
would make some sense
So you bscly fixed it lol
Yea but that will break smth if you just remove it 😄
What it does is it checks every item against every other item if they are "similar", i.e. Wrist watch on left hand vs wrist watch on right hand
if you have 400 clothing items that's roughly (ignoring the off-by one) 400*400 = 160,000 checks
ye
far worse when you have open closed variation of that
when you have sponge's clothing lol
Yup
So what I'm trying rn is make it save the result, so it just has a lookup, instead of fetching the item definition and checking it 400 times for every item 400 times
so I have a table { item -> extra items }
and just populate that first time it does the crazy shiet which will still lag
any time after that it'll just take a fraction of that though
good enough for me. Could populate that "cached" table on game start but first tooltip is fine for me I think
Note to self: don't print() in loop with 160k iterations
will it work for modded concent lol
yes
chad
Now I just have to figure out how to override that via mods
CraftTooltip is defined local 😩
Nah I mean how to replace the function
I'd love to avoid replacing the entire file lol
if that won't work comrad
remember
you can always go down my path and delete the window xD
but as said
only a matter of figurin it out
yeah - we don't do that here 😄
Hey I'm a total newbie to modding this game but I wanted to create a mod that builds upon the erosion system. Is there a good way that I can learn about how this is implemented into the game?
Im not gonna lie comrad the tutorials on youtube seem outdated af
Did you mod any games since you said newbie to modding this game
Hearts of Iron lol so pretty far off.
I found the class files related to erosion but they are all compiled and not really readable
I'm not sure how the system works, but I wanted to redefine what tiles can be eroded and build upon what is there, to create more erosion than the base game has
When it comes to this game you gotta go of text tutorials not videos
RoboMat's Modding Tutorials - An introduction to modding for Project Zomboid - I - Introduction I1 - Where to start I2 - What is neededI3 - Lua TutorialsI4 - Other Resources II - The first steps II1 - Getting the connectionII2 - The entry point: Events III - The first mod III1 - Preparations III1...
here is one
a pretty old one at that
2013
phew
I remember @devout zephyr 's original erosion mod, the streets could eventually grow grass and trees. but that was removed when it was brought into the base game
Yeah I figure - somewhere - there are definitions of what tiles can grow plants and the asphalt/concrete is excluded.
That i would suggest asking or reddit on steam project zomboid help
they respond pretty quickly
You mean the r/projectzomboid board?
yup
but i also mean
Project Zomboid - Project Zomboid is an open-ended zombie-infested sandbox. It asks one simple question – how will you die? In the towns of Muldraugh and West Point, survivors must loot houses, build defences and do their utmost to delay their inevitable death day by day. No help is coming – their continued survival relies on their own cunning, ...
not a great approach when you could write a better algorithm
theres a global declaration
Open for ideas, but I think to find out if your 400 items are the same as the other 399 you have to test every single one
Yea using ISRecipeTooltip now
besides having read the code that portion was meant to be commented out anyway
well it isn't, there's an extra minus
instead of checking every single item against most other items simply check before inserting if theres already a variation inserted