#mod_development
1 messages ยท Page 24 of 1
it just has GodigodMod
possibly, idk
ok lets go ahead, so I need to put the folder with the workshop files back right ?
yep if you ever want to make more mods they'd have to go in there
and appears this two files like I said
yeah when you use the workshop option in pz.. it auto generates that
when creating a workshop mod
Ok! It is there again.
Same problem when I put it there
I think It overwrite the other idk why. This same thing happen with your made mods ?
@glad ridge
I belive that after you upload your mod trought workshop place, you need to get him out of there
At least for me, when I leave it there, it doesn't read the file from the mods folder and forces it to read the workshop file
If this doesn't happen for you or other modders I'm definitely doing something wrong that I don't know what it is
At least taking my mod out of the workshop I can use it through the mods folder
hey so question
i'm working on a true music mod
table.insert(ProceduralDistributions.list["PoliceLockers"].items, "Tsarcraft.CassetteHomeLabelled'acidrain'");
table.insert(ProceduralDistributions.list["PoliceLockers"].items, 0.7);
if i change that 0.7 to 0.1, will it make it less likely to spawn?
yes
rolls = 4,
items = {
"Bag_DuffelBagTINT", 0.5,
"Bag_FannyPackFront", 2,
"Bag_Satchel", 0.2,
"Belt2", 4,
"Briefcase", 0.2,
"Disc_Retail", 2,
"Earbuds", 1,
"Glasses_Aviators", 1,
"Hat_CrashHelmet_Police", 1,
"Hat_EarMuff_Protectors", 8,
"Hat_Police", 4,
"Hat_Police_Grey", 4,
"Headphones", 1,
"HolsterDouble", 0.5,
"HolsterSimple", 2,
"Jacket_Police", 4,
"Lunchbag", 1,
"Lunchbox", 1,
"Lunchbox2", 0.01,
"Nightstick", 2,
"Radio.CDplayer", 2,
"Radio.WalkieTalkie4", 1,
"Shirt_OfficerWhite", 10,
"Shirt_PoliceBlue", 10,
"Shirt_PoliceGrey", 10,
"Shoes_Black", 8,
"Shoes_Brown", 8,
"Suitcase", 0.2,
"Trousers_Police", 8,
"Trousers_PoliceGrey", 8,
"Tshirt_PoliceBlue", 10,
"Tshirt_PoliceGrey", 10,
"Vest_BulletPolice", 2,
},
junk = {
rolls = 1,
items = {```
Looking at the code you can see that the items that have the highest number appear more often (easily) in game
So since 0.1 is less than 0.7, 0.1 is less likely. The logic is this. haha
thank you!
Are there any ways to edit the radio/TV broadcasts via the LUA, or do they need to be an XML edit? I'm hoping to make something that delays the life and living broadcasts so server users don't miss out on things while they sleep.
I have a question....
When in a map you have various/multiple spawn points does the game take / use them randomly or is there a way to make the game use them in a certain order (Defined in the script of interest...for example a loop )?
Excuse my curiosity, but what purpose would you like to make a loop?
I believe that with code you can do anything. For example choose among certain spawn points to randomize between them or follow a certain sequence yes. One hour is born in the police, another in the fireman, another in the school etc.
-> To not overwrite a certain file, what precautions do I have to take? I would like to change an ISUI file, change the color of text in a tab for example... Any tips on how I can do this? I know I can change the original file directly and it works ok, but to turn this change in a mod idk ๐
Having more control on spawnpoint basically. Actually you can set how many of them you want but you can't decide in which order they are used by the game if you have multiple spawn points set for a map. Sample: You have 10 different spawn points on the X map...When you create your new game ( SP ) there's no way to select which one will be used and every time you'll create a new game you'll get a random one. Sure you can set single spawn points naming them, for example, " Spawn at Police Office ", " Spawn at Doctor house, etc but this will create, at the end, a very long list of available spawn points in the spawn point list menu ( thing that I would like to avoid )
Well if you want to change something in a file you are forced to overwrite it ( if I have understood correctly what you intend to do ). You need to use the same file name and file structure of the original mod and then in the file of interest changing the values depending on your prefrences
You could set more than a single spawn point, like a group of each and randomise them
Yes exactly where the problem I'm trying to fix comes. If you set a group of spawn points, you can't select in which order they will be used
I do not want them random but, if feasible, I want them used in my pre-fixed order ( set in the script/function )
Ohh , now I understand what u want ..
( ..but looking at other spawn points mods I guess that the only solution is to create each single spawn point and leave it as a single selectable one )
..or a dedicated function
I think that the walkaround is creating a function that gives X percentage chance of spawn to each spawn point
Sample:
Police station Spawn 20%
Doctor house Spawn 10%
Laboratory spawn 70%
IIRC the Occupied Louisville mod does exactly this...Got to check it as reference for making my script...
Gotcha. I think is possible but Idk how to do
Yep that's super easy to be done but that's not what I want
But I need to copy all file or can I copy just the part that I want to change and change it?
You need to copy and edit only the file you want to modify ( but you need to keep the same file name and the same path location as the original file )
Yeah but inside the file I want to change a single part like the color of text for example.
Ok I'll made you a sample
I need just to change the value of R G B
If you want to change that value you have 2 ways
1- Directly edit the string/value of interest ( For example if you are the only one using the mod )
2- If, for example, you want the value changed but you want it for your mod, you need to copy the file of interest from the original mod, then making your edits and put it in your mod but keeping the same file name and file path of the original mod
This is what I did here to test by the way.
But I want to share with others so I believe better way to do that is make a mod and share
So you need to do what indicated at my point number 2
In the file there are several other things that I don't need to change, so I thought that suddenly I could just change what I wanted and add to the file. As if it were an addition of an item in the items table.
Said in brief: For your use only you can simply edit and save the values you want. To share with others, you need to create a mod.
If you change that value in the original mod ( and you don't want to make a mod ) you have to tell to all the users to edit the line of interest otherwise you'll be the only one getting/see your modifications
Yeah yeah
..and you'll get compatibility issues
My suggestion is to create a mod if you intend to share it with a lot of people
The direct edit thing I guess is feasible only if you have 2-3 friends playing with you, not surely for a mod you intend to release in the workshop
Hi! Is there a mod tha tmakes tailoring clothes a little less ugly?
Or even just, hides the padding?
Search the workshop. For mod support please use the dedicated channel this is for modding only thanks ๐
Ah, sorry!
and the name of lua file I need to change to my mod name file ? for example ISLiteratureUI.lua so I need to use the same name or can I put something like LiteratureHighlight_ISLiteratureUI.lua ?
No problem mate have a good day ๐
Thank you for the heads up, I'll refrain from blabbing her again. o7
in case LiteratureHighlight be the name of mod
Switch to PM or we will engulf this chat ๐
k
Right now nothing. just trying to see the big picture to know what I can work with =)
thanks! I'll look into it
Again, is it possible to simply use some sql library to make sql requests over the network?
hello, I would like to know if zomboid is supported with the development of interfaces by the figma tool?
Not 100% sure but I guess no
if it's server sided, you might want to do javamod for that one. lua modding doesn't support sql library.
this one's a bit of a longshot, but query:
how hard is it to add tabs to the item list interface?
like these
Any other way to communicate from lua via network is prohibited, too?
There is a way to communicate from lua via network but I'm not sure if this is what you want.
sendClientCommand and sendServerCommand
and also OnClientCommand and OnServerCommand hooks
still wondering if anyone would like to tell me how to add tabs to the item list interface like some mods do!
think you need a fileguidtable.xml and another folder, best bet is to look at those mods and see what they are doing with that file
i was actually trying to do that with tsarcraft but couldn't for the life of me find anything
i'll take a look at another mod and see if i can find smth
that's how mine works at least
but i've only used it with clothing
idk how you'd do it with other items
i'm personally trying to make a specific tab for my true music mod and its available cassettes/vinyls
ah yeah idk mine all get added to the tsarcraft automatically when i make them
see i noticed that too and i was curious if i could separate them out, hence my current journey :p
i like to make my mods as tidy as possible and it's one more thing i could do that's nagging at my brain
well lmk if you figure it out, would be nice to do that with mine as well
so far i'm coming up blank--undead survivor did indeed have a fileguidetable but your comment about that being mostly good for clothes sent me looking for others
and intriguingly the other two mods i've checked that have tabs seem to have no files that seem at all related to the task of adding a new tab to the ui
so it's kinda befuddling me
okay it has to do with what's getting imported in the scripts txts
or what the module is that is being used
I know its a small change but i added a space to it by changing the module i imported, by adding a space in the name of the txt file
hmm, aren't true music mods referencing something from true music or tsar's common library as their module
that'd mean that there's no way to change what header they go under without changing it in one of the other dependent mods
yeah thats what i was thinking too
could just try to change the module name
see if that works
oh yeah it does lol
that was easy
nvm
it doesn't play the tapes
yeahh i figured that might break something, darn
well, it sort of does, but it loses the functionality
of being able to take it out of the boombox and other stuff
actually
hm
nvm
yeah look at that, that's quite a shame
it almost sorta works
anywho:
Whatever you do in Zomboid, do it with your own soundtrack.
Music for the End of the World is a mod based on the "True Music" framework, providing 600 tracks of real-world music to be listened to in-game, and frequently updated with more.
Available here: https://steamcommunity.com/sharedfiles/filedetails/?id=2857842616
i made a neat little promo for my music mod :)
i bumped mine down to 0.05 and the vinyls down to 0.1
still a lil weighty so you can't carry a billion but still light enough you can fit like 100 in a glove box
promo was cool looks like you put a lot of work into it
thanks :)
This is probably the best song selection out of any true music mod I have ever seen. Like, for real, this could genuinely replace all of them with how good some of these songs are
thank you! :D
I got to put gymnopedie in mine that's a good one
It pains me that I Want It That Way is in the extended version but I understand since it's after 1993
sacrifices must be made ๐
originally when i made this mod for more private use they were all mixed together, and honestly in my ideal world everyone would use all three expansions but
i understood some people are lore sticklers so i separated 'em out
Is there a place where I could commission a mod from someone
so. im not sure if this is a problem with my mod or if its just a zomboid issue.
i'm playing on a 3x population world and i was trying to clear out a small area of riverside using my modded berserker trait (gives stamina back based on # of kills) and i noticed that it felt like zombies kept respawning after they would die.
i killed well over 1200 zombies in the span of about 45 minutes. and there was 0 signs of the zombies slowing down. so i went into ghost mode and started watching and sure enough zombies that were dead were poofing back to their feet with full health. at this point there were hundreds of corpses on the floor so hadn't actually seen one get up, but i kept noticing that zombies were arriving from all directions even though no zombies were anywhere in the direction it was coming from.
these new revived zombies weren't giving me weapon exp either, but they did give strength xp which was super wierd.
is this just an issue with pz and the number of zombies? or is it indicative that i messed up my mod somehow?
there wasn't any sort of "get up" animation, the zombies were dead on the floor and then they just 1 frame became alive and it would take them about half a second for their AI to turn on. like it does when they spawn normally.
Are you playing on normal + 3x pop?
Did you know different zombie settings and pop settings have different zombie counts.
Such as low zombie and 0.5 pop will have less zombies than insane and 0.5 pop
You should use debug mode with the zombie pop monitor
its very high 3x
with grouping amount set to 30
to make the groups themselves bigger
no respawn?
Did you make any noise?
If I make loud noise, even the areas I'm not in start moving towards me
yeah, noise was being made to attract the zombies so i could clear them out
but when i checked zombie population i had very succesfully done that. there wee no zombies anywhere near me in the cell besides the ones i was fighting
and i was watching them pop up on zombie pop
respawn is enabled and left normal
but respawn is supposed to only happen outside of the current cell?
it also doesnt care about previous zombie's corpses
I would assume they just moved in from the cell next to yours
there wee no zombies anywhere near me in the cell besides the ones i was fighting
and i was watching them pop up on zombie pop
zombies that were dead were poofing back to their feet with full health.
there wasn't any sort of "get up" animation, the zombies were dead on the floor and then they just 1 frame became alive and it would take them about half a second for their AI to turn on. like it does when they spawn normally.\
sounds about right
I think there's a reanimation command and a mod that uses it, but that should be more graceful
same with vanilla revive
someone told me that on higher populations zomboid issues with zombies. so im wondering if this is what he was talkign about or if its an issue with the damage bonus from the berseker trait
vanilla revive is a 1% every decay stage
Ahh, that's possible
I know in multiplayer I've had zombie stop working on higher pop and despawn or stop randomly
So maybe it's bugging out, yeah
lets say I wanted to change this to take 14 days to rot instead, would I simply create a file in my mod folder with the relevant script file (in this case: mods/mymod/media/scripts/items_food.txt
and have the content look like the 2nd image? or does it not work like this?
(oops I didn't change the 7 ๐ )
absolutely not. first, if you name the file items_food.txt then you'll replace the entire vanilla file (and wipe all other items in it if you dont include them too)
second, creating a new item DogfoodOpen you'll replace the whole item, not just the one property
ideally to edit script item properties for a already existing item (without replacement), create a lua file in media/lua/shared and add the line:
getScriptManager():getItem("Base.DogfoodOpen"):DoParam("DaysTotallyRotten = 7")
Exactly what I was after, tyvm
Oh god I was on the wrong place
haha
Anyone here know what is the thing that I can install on vscode so it autocompletes what I can use on my mods?
Like getNearbyDoors or something
if I use noirs backpack attachments with authentic z - current will my shit break or are they compatible
im not sure how exactly they'll interact if u try to use both backpack attachment systems, i use authentic z lite with it just fine tho
which is the same but no backpack attachments
note that for some reason peach made them have different item IDs though so u cant swap between them w/o items disappearing
@late hound why did you do that, anyway?
is there a technical reason?
ive wondered
This means only on client? Am I able to use fs on the server (for instance, read/write files in the mod folder)
it's sandboxed on both sides, but u can read/write to the lua folder on both sides depending on context
e.g., u can write to the server's lua directory
ive not tried to escape it, my knowledge is secondhand, but i've been told by someone who knew their shit that it wasn't doable to read a file outside of it
i wanted to read vehicles.db
Sandboxed folder is more than enough!
Can I install lua libraries to use with my lua mods? How does this work?
if they are just lua code, just include it in your mod, do a require if necessary, and use
if they use another file.. maybe? i dunno, never tried
Question: any way to specify how long an item added as fuel (to an antique oven, campfire, etc) adds?
I'm working on something where you can shred a piece of paper into scrap paper, and the scraps can be added as fuel to an antique oven no problem, but they also count for 15 minutes. Which makes no sense, realistically speaking; a piece of paper adds 15 minutes; shredding it into several pieces, shouldn't allow each piece to be 15 minutes as well lolz
quick question when i import modules ex:imports {Base} could i just say for multiple modules {Base, Example}?
Hello everyone ๐ Not sure if this is the right channel, do you know if there is a mod that allows zombies to break the fence-crate-fence exploit? Or, if anyone can help me figure out how to write a mod that does it?
Different crowds of people were begging me to make different versions of the mod. Knowing that I can't remove an item without troubles, I had to make it this way so that people using the main branch of the mod are unaffected.
ah i thought the set of items in each was the same with just some recipes disabled or etc.
that makes more sense
yes
that's a weird way to format it, usually we do
import
{
Base,
Whatever,
}```
though obviously everyone has their own style
i rarely see them inline fully
but it makes it more obvious that it's a list this way
which is why i mention it
yeah im a weirdo, thanks i'll probably conform to the norm
hey auth is there an easy way for me to allow your attachments on my modded alice packs?
I made each branch have their own items so that each branch can be independent from one another. At the time I made that decision, I analyzed that I would have less problems using multiple item modules than using one. There would have been far too many redundancies and I feel that I would have tangled myself up into a human pretzel with my own code. This way its also easier for me to keep track of all the moving parts and pinpointing issues when they arise.
ah yeah probably easier to figure out which branch someone's using too
since it's in all the item types
if they report somethin
Yup that too. Still have the problem of people using multiple branches, but thats the least of my worries now that people, who report issues, on average use 150+ mods.
lol multiple branches ๐
some people
i run ~400 mods but if i report something to u on behalf of my server i'll narrow it down and/or test on a cleaner server first to reproduce xD
do my part to not contribute..
Impressive...Very Nice
400 mods is not that shabby
xD
xD
yeah it's work to make everything work nicely together and be stable and etc.
most of them are tiny stuff
DM'ing you the steps
oh hey can you send me that too? i should probably have support built into my backpack mod
"Your mod is not working it's broken"
Has 60+ mods installed
"It's not my other mods they worked fine a few days ago"
I feel your pain Peach
if only every user was computer literate enough to understand interactions and that other things can change besides the one named in an error lol
at least TIS adding that thing that tells u which mods' code is what by file sheds some light on it at a glance for them
When you see great comments like "How do I enable a mod" you know it is going to be a doozy the next time they comment in Mod Support
u can tell which things MIGHT be relevant more easily now
oof
sometimes when i edit my mod's they end up getting deleted in my saves, that's probably because i'm changing its item name right? if i just change some things in it's parameters it should still remain in game?
And then they sent you the modlist and there are mods without an update since 2020 but "hey, I just get a couple of red errors, it works all fine..."

I actually had some DM that before
20 pages worth of mods
Said "Could you fix this for me"
is global mod data only savedd on clients?
No syncronization as well?
does anyone know what the name/id of the gray flashlight is? the only one I can find on the wiki is the yellow one
wait nevermind found it
hand torch?
it can be synchronized
one of my mods sets it on the server under certain conditions then pushes it to clients
How to disable another incompatible mod?
Let's say my mod and another mod are incompatible. The user has enabled both mods inadvertently. I'd like to disable another mod on game load because my mod is newer and does the same thing.
I guess the prerequisite is that my mod must be active in the main menu.
what makes my local dedicated server kicked me out without explicit logs, but sometimes it breaks into debug window and shows exception in DoSpecialTooltip1, i tried to override ISWaterPlantAction:perform(), it works, but whenver i tried to change the logic etc, added more overriden fuction like harvest/fertilize/seed with near the same logic, it causes crash :S
is eraser or dumpster reserved words?
getting some weird errors when trying to create an item
probably better in #mod_support
yuh my bad
can anyone help me with this mod? for some reason it's causing lots of issues, i really didn't think it be this hard lol ```module Cleaner {
imports {Base}
item Cleaner
{
DisplayCategory = Junk,
Weight = -60.0,
Type = Normal,
DisplayName = Cleaner,
Icon = Cleaner,
WorldStaticModel = Cleaner,
}
recipe Craft Cleaner
{
DisplayCategory = Junk,
Eraser = 1,
result : Cleaner,
Time : 150.0,
}
}
for good practice, either use prefix in module name or item name, also check icon and worldstaticmodel existence in the imported base module if you're not defining the model on your own.
also try to change the recipe DisplayCategory = to Category :
@glad ridge for better readability, put Eraser above Category: and delimited by blank lines between the ingredients and definition, then rename Eraser to use module name prefix instead Base.Eraser=1
Thanks, I will try it out. I just followed other mods I've created that don't have issues but this one has been giving me trouble. Didn't think I needed Base. As I'm importing base but no harm in being explicit
I've renamed the module multiple times and the textures are there, but even if I used the base eraser texture for both I still end up with the errors
It's something weird
yeah, being explicit will help you in the long run as your mod grows
haven't you change the DisplayCategory = junk in recipe Craft Cleaner, to Category with double dot? Category: < it's for naming the tab in crafting windows
perhaps thats what you mean... because the resulted Item Cleaner already define the DisplayCategory, and also, in result: section, proably it confuse the interpreter, this what you mean > Cleaner.Cleaner, interpreter might get the module Cleaner instead of Cleaner.Cleaner, i dunno...
@glad ridge everytime you check the crafting window, and click upon recipes of crafts, it exectue "OnTest" if its defined, or they iterate thru the definition of your recipes, if one of the things goes wrong, it throws error
Yeah I had it as garbage eraser but I wasn't sure if they were reserved words so I changed it because I know naming items with ex: pills, will cause some issues
This is good info to work on I'll lyk when I can get back to my pc and change it if I figured it out
yeah, its better to add prefix into any of your mod, as example, module GCleaner { item I_Cleaner }, so you can distinct between this and that
Yep thanks friend i didn't think about that at all
good luck
bro.. i think it was because i had result instead of Result.. lol it's all good now
it threw some crazy weird errors because of that
Is there any way to add sound(that zombies can hear) to the crafting recipe?
yeah, using the Oncreate of the recipe, you can make a lua function run when the recipe is crafted. so you can execute code to add a sound
Oh super, Thank you! I gotta find sound functions from reciplecode.lua
how would i add a completely new drop to this table with a dist lua? like how theres one for junk and items, i want to add my own as to not bog things down with too many item rolls.
don't know if this will be helpful but i think he explains things to do with dist in here https://steamcommunity.com/sharedfiles/filedetails/?id=2609939329
is there a good video or article that talks about the details of modding for PZ and especially the debugging aspect?
you could check these out https://pzwiki.net/wiki/Modding , also maybe check out authentic peach on youtube, i see hes got a few videos dealing with debugging
From where you get a .X file? ( What program is needed to create/import one? )
thank you. i will check AuthenticPeach out. live debugging sounds like a good way to understand the process in PZ.
Where is located in Blender the option to import/export .X files? Preferences...then?
looking for someone to make the worst most cursed mods of all time
i need things like "30 second day cycle"
and "its morbin time anytime you melee attack"
Blender dont have import or export .X files, just .FBX files
Blender don't work with .X in this new version of it, but if u want, u can use some converter FBX to X file
You donโt.
.X is a packed file, you need to convert it to an FBX format
Go here ! Maybe help you -> #modeling message
less go
yo guys where icons go?
eh its something else
thats wrong in my game
i mean mod
you need to give more details of what you want, if not there is no way to try to help
Does somebody know if it is possible to make passing out mechanic, like in dayz for example?
Ye, i was in school so i havnโt gotten time to explain
But now i do
So i have it there
item_thing.png
Yet it doesnโt load for my mod
Like any thing doesnโt load
Tho looking at this i may made typo in textures
Like directory typ
I'm building an heli model but I presume I've made it too small ๐ ๐ ๐ Welcome to the heli toys world LOOL ๐
Scale=10000;
Where I need to add it? Blender?
In model
You can send me code if you want
Or gimme few sec
Because i forgoten when exsacly you put scale thing
ok on stand by
thats the opposite problem i always have when importing models
Both can be solved this way
{
mesh = FUMOTH_powercsm_low,
texture = FUMOTH_powercsm_fumo,
scale = 0.004,
}```
from my mod
Thanks mate! ๐
Now the game supports .fbx files so where there were earlier .X files I can now use the .fbx ones in the same way right?
Yes
Actually
Just use FBX
.X more like .ASS
getTileOverlays():addOverlays(overlayMap)```
I'm trying to find some info or documentation about the parameters to `addOverlays`. Can anyone point me to info that specifies its input?
Im using fbx and havent any problem with it yet
Hey modders! I got a request, not sure if any of you will care enough to listen but it's just a thought.. Back in the day for build 40 I found a mod and it allowed for not only GPS's in cars but also it added roof racks that could be added to the Wagon and a few other cars. If you guys could add it and maybe even make it work for Philibuster rhymes cars that would be super awesome!
They had to be naked
I released a mod a while back that adds a "reload" action to spears. It puts a new spear on your back from inventory if you press 'R' with a spear in your hand.
The issue I have is I get a bug from time to time and instead of reloading the spear, he just raises it up above his head. I'm pretty sure it stems from this horrible hack where i try to detect what slot to use for the back. Does anybody know a better way of doing this?
local new_spear = find_spear_in_inventory(player)
if new_spear then
-- Another hack. I cant figure out how to identify which slot to use programmatically so i
-- just look for a backpack and determine which slot to use that way. Need to look into hotbar
local slot
if get_equipped_backpack(player) then
slot = "Shovel Back with Bag"
else
slot = "Shovel Back"
end
ISTimedActionQueue.add(ISAttachItemHotbar:new(player, new_spear, slot , 1, 'Back'))```
https://github.com/texasrut/spearbreaker/blob/main/Contents/mods/Spearbreaker/media/lua/client/spearbreaker.lua#L116-L127
nvm
So i am hosting a local MP server and testing it with how much FPS it delivers for my own session. with game zoom of 200% i get 30 FPS, which is weird because i allocated 12GB Ram for the game and 8GB for the server. My CPU and GPU also hovers at 10% load. And the 12 GB and 8 Ram als have tons of room left.
Before i added all those mods, my FPS was 120 straight, at all times.
So now i want to debug my local side and also the server side. How can i see the server game loop and client game loop with stuff that is bottlenecking them?
wheres the lua reference?
like how would I find player:getNutrition exists
do you just browse through the zomboid lua files?
How difficult would it be to change the horn sound that the vehicles use
i kinda hate the stock one and want to make it something a little more, realistic? maybe?
maybe like less of a high pitch motorcycle horn and more generic car horn
i might be interested in making it a mod, but if theres a way i can do it just for me, id be fine with that too
look i have invisible gun
inventoryfemale and inventorymale here are the inventory of zombies (the chance of loot "appear" or not)?
table.insert(SuburbsDistributions.all.inventorymale.items, 0.1)
table.insert(SuburbsDistributions.all.inventoryfemale.items, "GodigodMod.GinsengPills")
table.insert(SuburbsDistributions.all.inventoryfemale.items, 0.1)
table.insert(SuburbsDistributions.all.medicine.items, "GodigodMod.GinsengPills")
table.insert(SuburbsDistributions.all.medicine.items, 4)
table.insert(SuburbsDistributions.all.sidetable.items, "GodigodMod.GinsengPills")
table.insert(SuburbsDistributions.all.sidetable.items, 1)```
i think so
Was just a very quick test so I didn't dressed the character ( a random one ) then I started laughing when I saw the size of my item ๐
Now we can make a mod together " Toy items and invisible guns " LOOL ๐
u created children hahahaha
maybe you can create giants too .. lol AHUahhaha
Don't say it too loud because today with doogymoney we found how to create them LOOL ๐
The challenge of every respectable modder LOOL ๐
It's like modding without having 10000 windows open on the desktop ๐
god i wish i had 2nd screen already
So i am hosting a local MP server and testing it with how much FPS it delivers for my own session. with game zoom of 200% i get 30 FPS, which is weird because i allocated 12GB Ram for the game and 8GB for the server. My CPU and GPU also hovers at 10% load. And the 12 GB and 8 Ram als have tons of room left.
Before i added all those mods, my FPS was 120 straight, at all times.
So now i want to debug my local side and also the server side. How can i see the server game loop and client game loop with stuff that is bottlenecking them?
because for now i have wish to blow my head off
for fuck sake, everything doesn't work
just because
even Item_ PNGs doesn't work
Yesterday I've solved a bug in my mod after almost 3 weeks of work and not understanding what the hell was the error despite the efforts so you're not alone on that boat LOOL ๐
where can i see gameloop sequences and the time it takes for 1 loop in debugging window?
there's lots of mods with roofracks on various cars but it's not a generic thing - roofracks have to be set up to fit on a specific car model
what is a gameloop sequence
:P
reads ur earlier post
everything that the client or computer does during 1 frame. logic, rendering, network sync. normally games show how much times each of these steps took, so that u know where too look for problems and errors. or where to optimize the server.
not sure if zomboid has that or not, but if it does it'd be in the debug mode someplace
u can see much of what is going on in the logs
but that won't tell you things like render time/etc.
if u find that lmk tho, that would be useful
damn, i wish it would be there. one of the most useful tools for optimization
yeah now that i know what ur talking about
for many games that's done with an attached debugger rather than having it set up as a built-in feature
but that said i haven't explored debug mode in its fullest
it might be somewhere 
yeah but none of the other moders jumped into our little discussion. so my hopes are small.
ive asked questions that are like 101 level in the past and had nothing but silence
sometimes it's just quiet or the people who know aren't around
lmao I laughed, but everybody else in the elevator was alienated to say the least
Don't forget that you're a PZ modder so people will always look at you with a strange gaze LOOL ๐
scaling items outside of blender tends to be more trouble than it's worth - depending on what state the object is in such as on the floor vs wielding it, it won't apply the in-game scale
much simpler to get the FBX right and be done with it
Hello, im searching for a mod that adds a graphic inventor y like this but i cant find it
Does somebody has any guide to how play animations? I think is using the playEmote function but how to configure the .xml or any place where I could see what every option in the xml means
I would like to be able to play these two:
Bob_EmotePassOut_Back
Bob_EmotePassOut_Front
Has anyone ever created a mod and added it to a dedi server and after restarting it, the server won't load up in pzs join option?
This was supposed to be my simplest mod I've made and it's been the biggest headache of them all
https://steamcommunity.com/sharedfiles/filedetails/?id=2695471997
Thats the closest one i know
Hi guys! I don't quite understand why I can't call methods on some Java objects from lua. For example I do getGameClient() - it returns me a Java object of type GameClient, that, of course, has some methods. When I try to call those methods with getGameClient():someMethod() lua tells me that I attempted index: someMethod from non-table. My thoughts are: GameClient object is not a table (cuz it's not shown as a table by print()) and that means I can't use indexing with [], . and :, which all basically do the same thing - getting a value from a table.
At the same time I AM allowed to call :size() and :get(i) on ArrayLists which are returned my some methods (e.g. getConnectedPlayers()), but those lists show up as [ObjectType] (e.g. [IsoPlayer]). Does this mean array lists are special case?
Dear coders, please help me with this! Am I simply not allowed to call methods on GameClient or am I doing something wrong?
in Kahlua, the Java objects work basically like userdata objects in regular Lua
these objects can have metatables, also just like in regular lua
in the case of [] . or : these all just result in the __index metamethod being used
in the case of Java objects, their __index metamethod takes care of ensuring the appropriate marshalled function is returned to your lua script
nvm figured it out lol talk about wasted hours
alright guys, back once more
I've got this mod that removes clothing from zombies, but only sometimes
here is the code, how do I make it so that it removes it all the time ?
local function zomCloth(zombie)
local cDebug = false;
local vMod = zombie:getModData();
if vMod.Tagged ~= true then
vMod.Tagged = true;
if ZombRand(10) == 9 then
-- print("removing shirt");
zombie:setClothingItem_Torso(nil);
if ZombRand(5) == 4 then
-- print("removing pants");
zombie:setClothingItem_Legs(nil);
end
zombie:resetModel();
end
if cDebug == true then
zombie:setClothingItem_Torso(nil);
zombie:setClothingItem_Legs(nil);
zombie:resetModel();
end
end
end
Events.OnZombieUpdate.Add(zomCloth);
Also will this work with "zone" zombies like cops etc. ? I have tried lots of different code but none of it worked
Replace the ZombRand(10) == 9 with 1==1 so it always triggers?
Remove the random so it wont be random haha
Can you give me an example of that ?
What do you mean?
How would I remove the random thingy ?
You replace the ZombRand
ZombRand(10) will pick a number from 1 to 10 afaik
It checks if its equal to 9
So a 1 in 10 chance
Make it so it always returns true on this comparison
Hello, I was wondering if anyone could help me out with a glitch? I think? That is causing my world to slowly turn into wood floors. Like after about 3 hours of playing, I start seeing wood floor take over my self-hosted server
lol sounds interesting
Veryโฆ ummmโฆ. interestingโฆ
well if it's your mod maybe someone here can help you, otherwise it might be better for #mod_support
Ohhโฆ thanks I didnโt realize there was different ones ๐ฌ Iโll post there
Iโm actually not sure if itโs a mod or server issueโฆ most likely a mod though
probably, you'll most likely have to go down your list removing mods until you find the culprit
I saw a similar error once.
I think mine was because the riverside expanison mod
And also I think rosewood expansion
I had a similar problem in the past
When I was trying to make a heli spawn and fall (from heli expanded events)
Any suggestions? I donโt think I have either riverside or rosewood. I have riverside fire department?
The error was that a code was running on the server folder that should be ran on the client folder
Hmmm Iโll look into that too
It was something related to that. I am not completely sure of what caused it, but I didnt test the falling helicopters too much
I never tried checking that so itโs definitely worth a shot
No not that, must be different
riverside expansion aka trelai
I definitely think its a location mod/map mod though. Or even just a tile mod? Iโm not sure lmao
yeah, I had to try by removing different maps and starting a new game every time
Yeahโฆ thatโs what Iโm currently doingโฆ not a fan ๐
What is an easy way to get all the containers on a square? Furniture containers, not item containers
See it isnโt just modded locations that this happens to, the photo is of pitstop area but it happens all over the world.
Sigh, Iโm gonna keep removing mods. Only thing that sucks is it takes an hour or so to start happening so this is gonna be a couple day project
you can just go into debug mode
on the library tab click the gear and at the bottom type in -debug, then in game click on the lil mosquito icon on the left side of the screen
there should be an option in the menu that lets you speed up in game time
Worth a shot ๐
getGameTime():setMultiplier(9001);
use that in the debug console to make game super fast
If it's based on the time
Ohh, it also happened to me on pitstop, did you try changing pitstop to be higher or lower in the load order?
Where should it be in the load order? ๐ค Before or after the tile sets
I am the host of the server that Corrival is talking about ๐
I just tried top and bottom ๐คทโโ๏ธ
Is there a guide to start learning weapon modding ?
Of the whole load order? or do you mean with the tiles? lol I always thought it goes Tiles then the maps that use said tiles ๐คทโโ๏ธ
Off the whole things yeah.
Well as far as I think makes the most sense.
The mods are all initially processed, the required fields are read and processed
Then the mods are loaded in an order where anything that's required, will load before the frist mod that required it
So if you put it to the top, it will probably load the tilesets in the requirement before it anyway
Does the steam workshop load order matter ? Or just the mods section load order?
I didnt know that was a thing ๐ omg thank you! That makes things a lot easier lol
If your making your own from scratch might want to look up blender tutorials. Although I've heard of people using already made assets and porting them to the game. Then maybe download a basic weapon mod that adds 1 item and try to use it as a guide
getPlayer():getInventory():contains("RippedSheets")
Does it search in array or by hash?
i.e. O(N) or O(1) ?
when i have a recipe that upgrades a bag or something, is there a way to save the items inside of the bag?
i know authentic z has a OnCreate:PleaseKeepColor, but i have no idea where to find where it's being called
--function to use for the OnCreate recipe paramater when upgrading bags
function Transfer_Bag(item, resultItem, player)
local player_Inventory = player:getInventory();
local transferred_Items = {};
local dItem;
local texture
for i = 0, (item:size()-1) do
dItem = item:get(i);
if dItem:getCategory() == "Container" then
if player:getClothingItem_Back() == dItem then
player:setClothingItem_Back(nil);
end
if player:getPrimaryHandItem() == dItem then
player:setPrimaryHandItem(nil);
end
if player:getSecondaryHandItem() == dItem then
player:setSecondaryHandItem(nil);
end
texture = dItem:getTexture()
dInv = dItem:getInventory();
newInv= resultItem:getInventory();
dInvItems = dInv:getItems();
if dInvItems:size() >= 1 then
for i2 = 0, (dInvItems:size()-1) do
invItem = dInvItems:get(i2);
table.insert(transferred_Items, invItem)
end
end
end
end
for i3, k3 in ipairs(transferred_Items) do
dInv:Remove(k3);
newInv:AddItem(k3);
end
resultItem:setTexture(texture)
end
Fuck it, couldn't fix the formatting
sweet thanks, so i just throw this in a .lua and OnCreate:Transfer_Bag?
in the txt
If you do everything properly then it should work ๐
i will try it, i've been scared of touching the lua side so we'll see how it goes
Unless I fucked up something
this goes in server folder right
thank you that worked perfectly!
I did a code that respawns the items inside the containers near the player, to force spawn in case when the loot respawn is broken due a mod or anything. However, when the container has different sprites for "empty" and "with items", the sprite do not update unless I put/remove something with the player. Is there a code that allows me to trigger a sprite update on the containers?
Might need the same, since i use Sacks ๐
I dont know what sacks is haha
Yes you do!
Here let me make it simple: https://pzwiki.net/wiki/Sack
^_^
I am not used to using sacks in game. And since I play in pt-br, I am used to its portuguese name
ah, alright, wait, what is the portuguese name then? now i'm super curius
Saco
haha
Its similar, but I must confess I didnt think you were talking about an item
heh
is there a way to make a recipe require a FULL petrolcan?
when i try this:
**recipe Example
{
destroy PetrolCan=10,
Result:Money=2,
CanBeDoneFromFloor:true,
Category:Test,
Time:10,
}**
Then it requires 10 of them, but when i remove "=10", then i can use a petrolcan with 10% gas in it
um, yes
that one i think i can answer
could look in recipe.txt which i'm about to, i have seen a few recipes that demand the entire thing
i have another recipe which requires x amount of welding rods, that seems to work fine with thesame syntax
maybe just remove the amount?
I think you need to remove the Destroy
{
IronIngot=40,
BlowTorch=5,
keep [Recipe.GetItemTypes.WeldingMask],
Result:MetalPipe,
Time:150.0,
Category:Welding,
OnGiveXP:Recipe.OnGiveXP.MetalWelding10,
NeedToBeLearn:true,
}```
This is how the Make Metal Pipe recipe works
You see, it uses 5 of the blowtorch
now that you mention it, my welding rods recipe doesn't have destroy either, i'll try it thanks
However I am not sure if there is a way to check contents
Because I THINK you can fill the cans with water now
it looks like all you need to do is just don't specify an amount if you wish to use the whole thing
yup, latest update added the ability to use gascans was water cans ๐
I know that you can do the opposite, like fill bottles with petrol
But here
@midnight mica ``` recipe Make Molotov Cocktail
{
WineEmpty/WineEmpty2/WhiskeyEmpty,
RippedSheets/RippedSheetsDirty/DenimStrips/DenimStripsDirty,
[Recipe.GetItemTypes.Petrol]=1,
Result:Molotov,
Time:50.0,
}```
Here is something that uses Petrol
You can make it so it doesnt require a can, but just uses the Petrol
Which I think its a better way
Also, if I am not mistaken, the petrol can has 2 items. An empty one and a filled one
might i suggest something?
thanks for the replies, using: PetrolCan=10, without "destroy" does the trick, but it doesn't consume the gas can, so i will need to do something else.
many gas stations are powered up on my server, so would be too easy money
Check RecipeCode.lua at line 240, find the file in Media/lua/server --- It might be what you need @midnight mica
thanks, i'll check it out
just a guess - was looking for some possible code to match my own request i made a few mins ago in the same file, in hopes i can get what i'd like
yeah thats actually helpful, never looked at that file before, thanks both!
destroy PetrolCan,
OnTest: Recipe.OnTest.FullPetrolBottle,
This combo did the trick for what i wanted, consume the whole petrolcan which is filled to 1 delta
glad i could help with at least something for once, instead of being the one asking for help all the time ๐
Have you tested with half petrol can?
yeah, it ignored it
never played with OnTest before, should be able to sell "empty" backpacks with this method aswell
Question for ya'll, do we want this channel to become the coding channel and have another channel just for general modding questions enquires seeing as we use this for code work anyway.
As we have a Mapping for Mapping, Modeling for Modeling but not one for Coding.
That way the Coding channel is for Coding, don't have to worry about Modding questions, or enquires being lost, or Code ones being lost either.
Asking as I dropped a message to nasKo about it and he want's to know what you lot think.
Not-a-pz-modder but separating development stuff from general mod questions / talk / etc sounds like a pretty good idea
you got my thumbs up
kind-of modding question.
When making stuff, do people usually make it single player and then add multiplayer?
When devs make stuff like the new chicken system, do they just make it and then add multipalyer later once it's a more finished feature?
There is nothing really specific that needs to be done when making a mod.
Only in specific cases would a SP mod and a MP mod need extra steps.
As for Build 42 with the first lot of Animal stuff, not when it drops it should drop for both, but things are always subject to change.
yeah, just wondering if IK should just develop mods which add new stuff using multiplayer in debug mode
And thought someone probably figured out which is more efficient usually
Technically when making something new, even if you have a plan.
You still might change thigns working on it, so might be better to make something work in singleplayer.
Then add whatever is needed for MP.
It all depends on what it is, if it is something that you are doing code wise specifically for Multiplayer, such as an extension that checks for Players on the server then yes.
If you are talking making a hat, then no
Yeah, probably so far I'
if your project requires additional work to function in MP vs SP, then either forget MP entirely, or plan it into the design from the start
I think just anything that needs data and saving functions
dont try and tack MP on after the fact
Ahh okay, that's exactly what I meant ๐
ya better to have it part of the initial design then try and change it after, you may (probably) run into additional complications that could have been avoided if you had planned for it from the start
I do mods for my own dedicated server to add interactions with chat and everything
So I always start with MP
I'm not even sure if half of the things i've done would work on sp
But since I am modding for my own use, I am not too concerned with that
So it mostly depends on what your focus is
Anyone knows how to force a furniture texture update via lua/client?
i'm rather perplexed by something lately
so i've been working on a true music mod, and it has a sub-mod that has a small selection of modern songs that i want to make WAY rarer than the others. but something about trying to lower their numbers in the distribution tables seems to have just failed basically every time i've tried it
it always either somehow causes the items to break and not spawn, or their chance remains the same, both visible in lootzed
so to give an example of what i tried:
before:
https://pastebin.com/7LsVwpHq
after:
https://pastebin.com/T1CddHXh
i basically search and replaced all instances of 0.1 and 0.7 with 0.0001, because with a file this big there's no other way to change that many numbers. just no way to do it manually
so uh, yeah, if anyone knows what i did wrong and how i can get this to work, let me know! it'd be very helpful
When using VehicleZoneDistribution what's valid value range for spawnChance? Is it 0-100? Does value like e. g. spawnChance = 25 means that there's 25% chance for the vehicle to spawn in specified zone?
We need a takedown mod
Or maybe a grab mod
for us to grab zombies from behind and eliminate silently
knife
how do i turn off the network packet in the debug mode console... wanted to mock and call some modded function to see the result, but the network packet stuff are too verbose...
nevermind, i found it in debugLog :S
Its possible but I wish there was more variety in the animations
Are you trying to make your own mod or fixing submod by editing it?
i'm making my own mod that uses true music
Then you should fix true music loot tables. Now you are just trying to add new tables, so chance of an item is 0.7+0.0001
interesting, shouldn't they be separate? true music generates separate loot definitions for each cassette and vinyl, so it should be mod-side and not tsarslib/true music-side
the ones i posted there are not new tables i'm adding, they're ones i'm editing from the mod that true music's tools generated for me
The same filename?
no, as recommended i changed the names on the files inside of my mod to enable compatibility with other true music mods
I'm not sure how it works. But I guess files in your mod are only for items from your mod. I think it's possible to hack chances from other mod but it's tricky.
so yeah, if anyone knows what's up and how to alter these loot distributions, lmk
i was kinda annoyed when general purpose questions about mods like "does a mod exist that does X" and "i have a new mod idea even though i don't make mods" were officially endorsed as belonging here when the description seems to indicate otherwise
so i definitely want a channel that i can go to and not be bothered with that kind of thing, personally
i personally would also suggest that mod_support be where things like "does a mod exist that does X?" belongs in the current structure
I agree with you
You put what I was thinking lol
Most of my own code work I don't post here, but when asking for code checks, it is somewhat annoying to see someone come and just do that and it's like.
Dude, come on
I think at that point something like "mod_ideas" exist
on other modding communities there's usually a mod general chat, mod ideas chat, mod troubleshooting chat of some kind, mod development chat of some kind and if there's enough variation to warrant it then subcategories like we have here for modeling/mapping (another server for another game has an "art" channel separate from the dev channel for instance)
though i must say, mod ideas don't flow here at the pace where that necessarily requires its own channel (yet?)
if there's a general chat, it can probably handle that
pwease does anyone know... i can't say for sure but this seems like it'd be super simple for someone who actually knows how coding for this game works and i'm just having issues with it because i'm not really a coder
Do you guys know any good outfit mods that just adds clothes not retextured
You did nothing wrong, but you made them so rare that they seem to not be spawning, most likely
.0001 is truly a low number
i only have one mod with a rarity value that low, and it's for ammo cans full of ammo because i want them to be an extreme rarity
most "rare" items are something like .01, .02, etc.
but the way the tables work
it goes through and rolls on items until it has enough to satisfy the amount to spawn there
see, that's the thing
so if there's a lot of items in the table, you will see the rarer items less and less
i know for a fact that it's not that they're too rare because of LootZed
yeah ive never used lootzed
any idea where that is
or how to get to it if it's built in
:p
i've seen other mentions of it
lootzed tells me the exact chances, and changing them this way has variously resulted in:
- it worked once, and then never again, despite me doing it the exact same way again and not getting it to work again
- the numbers stay the same as before and don't seem to be altered, or
- the numbers ARE altered properly, but also the item name breaks in LootZed and it stops spawning no matter how many times i reroll the container
so uhh
What could one call an item that is both heavy and light?
I'm working on my mod, and the item I got needs a name.
But i can't think of a good name other then "Odd Thingy".
if you're in solo, debug mode, cheats, lootzed
then right click the container icon
yeah it kinda sounds like it doesn't it
so i kept searching workshop and google for it ๐
and checking around the modding tools
the debug tools are strangely poorly documented
that's how it is for nearly any game, actually.
well u'd expect a big community documentation
considering the size of the community
:p
kinda, it's unusually strange for this game where the debug mode also doubles as basically a cheat mode that is frequently useful for lots of stuff that normal users might want access to
so you'd think they'd be a little more documented but nope
it's not meant for that
there's mods that are better as a cheating device
and cheating isn't usually what a game dev worries about enabling people to do
lol
well i more meant documented by the community
also, debatable! there's definitely a lot of stuff you can only get access to through debug, though not as much as there used to be
debug holds useful tools for like, server admins running events and stuff
i run a server and mod things
idk
unless server admins or cheaters need to edit attachment positions or view animations
i guess the zombie radar thing would be useful for an admin
to check zed distros
but u can enable all those tools w/o debug mode if you mod them in
so
there's lootzed which lets you refill loot containers, a lot more climate debuggers that let you make advanced changes to the weather for events
stuff like that
i still haven't poked around debug mode enough tbh
i just usually find it unnecessary for the dev process
im rather old fashioned, i write my code in a syntax highlighting text editor and read the log file
lol
"it's unusually strange for this game where the debug mode also doubles as basically a cheat mode"
No, not at all, what do you think a debug mode is?
It is to test aspects of the game.
If you want to test what certain Weather Conditions are like, you can do that.
If a Dev needs to test what the Zombies real time pathing is like, they can do that and see it in real time.
Have you ever played any other game and seen the debug mode for it?
sometimes i use it when i wanna dynamically run code, but i can also use cheat menu for that
Hi i've made an addon for true music mods. Maybe this isn't the channel to post it but here we go : https://steamcommunity.com/sharedfiles/filedetails/?id=2863047003
i mean, i know what debug is for
Knife is a piece of shit
we want TLOU take down
And the knife have about 9% of really insta kill
I mean, you kind of get that if you stab a Zed in the neck
LIKE I TOLD YOU IRGHT NOW BRUH
its bad
The vanilla is bad
Should Be nice we get a snap neck or something like that
with 100 % of really take down
"we"
I think that might be all we are getting I'm afraid
The Royal "we" xD
There is a lot of people who really wants that
there's already an instakill mechanic for knives, im honestly surprised that exists as it is given the way the gameplay is for melee
anywho, i guess i'm just going to tinker around with the numbers and see if i can find some way to force that to work, because i swear it worked once and never again
anyway if u care, learn to mod
ok, fuck you too
I dont know hw to do that bruh
a modder would have to care too to want to do it
well yeah, that's why i said learn - nobody does until they do it
Can anyone give me advice on what I might be doing wrong for getting these custom traits to show up? I'm not an experienced coder by any stretch but I have a bit of general experience. I'm not really understanding why this isn't working.
Thats the point
You ran it in Debug mode yeah?
Did you get any errors running only this mod on the main menu?
That was my face when he said "knife"
you really are 15 huh
well i think it's cringe ya come in here shittin' on the game for lacking a feature i can't even fathom caring about
xD
but u know
we all have our opinions
Lol right
Running the game in debug mode with just this mod on yields no errors yeah
Bruh, this is the modding channel, take it to DM's or some shit.
Trying to help a guy out here
and this is why we need a separate channel for that stuff, lol.
@drifting ore be lovely is our main rule, just a reminder.
Nothing is showing when you go to the character creation for assigning traits right?
You don't get an error appear up at that part no?
Alright, I will take a look
Yo spiff, can we get a our own coding channel
or.. a place for people to take general mod-related chatter to that isn't here, if not
like "does mod X exist" and "i have a mod idea, someone make it for me pls"
We have had the coders amongst us say we want one, case in point what you guys ended up doing lol
Okay actually Stahl this might be entirely on my end with my game, don't worry about taking a look for now, thanks for the help though, I'll hop back over here if I turn out to still be wrong lmao
No worries man, not a problem
I hope you get it working
bruh
the API are kinda hard to find, jetbrains also doesn't gives good intellisense, is there any snippet to getItems() count of certain types, without creating new dummy table?
ah i think this is it > getSomeTypeRecurse(_, _)
Crying ?
What?
You called a mod t
I remember being 15
What has this
"Nothing is showing when you go to the character creation for assigning traits right?
You don't get an error appear up at that part no?
Alright, I will take a look"
Got to do with a "mod t"
this is the issue i'm running into
for some reason changing the numbers in the loot defs breaks something that makes the name no longer show up properly in lootzed and they don't spawn
and their chances are no different than the normal cassettes
If you are copying an existing item to create a new one, you need to make sure that it's ID monikers are unique and not shared
If you have done that, then that's not the issue
so:
this is a true music mod, which generates items for you
it also generates a full set of loot defs based on those items that seem like they should be the place to change spawnrates, and i've seen it work once or twice before but with no consistency
damn dude you sound like a fun person to be around, being a jerk is a fantastic personality trait to have
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
matter of fact, you win a prize ๐
you can see the tables i'm trying to change here
like this seems cut and dry like it's what i should be editing to change the loot distributions, but something about changing these numbers just makes things break
Oh right.
I thought you was talking about making a vanilla item or something.
Not sure about the True Music stuff as I have not worked with that, I don't do music.
Does the True music mod not have a guide on there page?
they have a guide, but i'm kinda colouring outside of the lines on this one
there's no guide/support for changing the distributions
Ah
The only stuff I have looked at it what is on the forums
This is a visual guide for mappers and modders who need to add or modify PZ's loot entries using the new ProceduralDistributions.lua approach. Whilst the ProceduralDistributions.lua file has been in the game for quite a while (i.e. the Gigamart shelves having distinct loot types), TIS will be eve...
can we change the scripts def in runtime?
like i wanted to create a discounted item, however it'll be lots of redundancies if just add another copy with less material quantity and different recipe name..
would be good if items recipes requirement could be changed in runtime dynamically...
Since duffelbags don't despawn on their own, i'd like to encourage players to remove em for server currency.
Is there a way to make the following recipe take a combination of 5 of all different type of duffelbags?
Adding the line [Recipe.GetItemTypes.DuffelBag], five times in a row works, but looks very ugly in-game.
For sound files, what is the format and file format i need to use?
3gp? :S
what?
.ogg
Is there a lua event which is triggered when picking up something from a zombie?
What i want to do is to have a clothing piece i can attach easily on a zombie, but when the player picks it up it should turn into a different item.
Havent found anything on "https://pzwiki.net/wiki/Modding:Lua_Events"
You could use the Lua. There will be a timed action where the character transfers and item from one container to another.
Sounds like what i need, do you know the name of that function?
It is not easily coming to memory fully clearly. It's somewhere like media\lua\client\timedactions and called something like IndieStoneTransferItemAction
44k wav file worked fine XD
Thank you! I will dig there
Is it possible to randomize the pitch or the sounds? i got 3 different versions, would be cool if it was sorta randomized in their pitch or played randomly one of the 3 sounds i got
Also you can add something to the function like this https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/api/README.md#overwriting-vanilla-code
you can look at the lua for the defecation mod
............ wot m8? .....
.... look at the lua for the defecation mod...... it has the answer you are looking for
...
alright
Yea, i have thought about using "every tick", that "on player update" seems similar.
But i assume it might be laggy
wut
The Long Drive all over again... and here i thought i had seen enough... well... defecation to last me a lifetime...
i landed on the page at where is "Events.OnPlayerUpdate.Add(someFun)" ๐
Hmm I tried linking to the "Overwriting Vanilla Code" bit, shortly below that.
Yea, now i got there.
Reading right now
But to be honest i am worried about overwriting vanilla code as i have no clue what i am doing. ๐
With this bit
local original_render = ISToolTipInv.render
function ISToolTipInv:render()
if not CONDITION then
original_render(self)
end
-- ... some custom code ...
end
You let it run whatever the original code is, and also have it run some extra code.
Mh i see. I try that. Thanks
local sup_dawg = ISInventoryTransferAction.perform
function ISInventoryTransferAction:perform()
sup_dawg(self)
-- then some code that makes a replacement item before deleting the original.
end
Awesome! That looks even better
It's applying the same thing that was done with the tooltip render function to the ISInventoryTransferAction function. :I
Mainly changing the names.
Oh, i thought it only triggers when a action in the inventory is done instead of doing it all the time when rendering the inventory.
But i might understand it completly wrong ๐
ISToolTipInv.render is the function used as an example on the instruction page I linked to. :/ so I copied and pasted that with a bit of explanation on what it would do.
is there any lead on how to add context menus to modded items such as book?
There's something for that in the client code. You could remember something that appears in a context menu and find its name in \translate, and then find where that string is used in the client code, and you should find context menu code.
(away)
ah okay, thanks, i already did, seems this is the one
just need to wrap up the sow seed menu into inventory item... wish me luck
it's the apostrophes probably
it isn't
they work just fine normally and only break after i change the numbers
but
i have more context for this now:
i just manually changed the numbers on a true music addon
not but two hours ago
worked fine
re-generating the loot tables and changing them then caused it to start working
i don't know why, but i basically had to remake the entire mod and edit the numbers again and it just kinda worked
what do u mean "re-generating the loot tables" anyway
how did u go about that
u mean wiping stuff?
or
wat
putting all the sound files into the music converter and basically making it generate me a new true music mod
oh
i'd just like
not use their template thing
cuz it makes shitty messy code that's hard to maintain
:P
i'm not a coder
anywho, it's still not as rare as i'd like which is weird, i literally made the number so low that i can't go any lower without it starting to fuck up in lootzed but it's still at least a little more rare than it was before
"fucking up lootzed" eh?
so
here's the thing about stuff
the base mod true music's template sets shit to .1 or .7
those are fine if you have like 10 cassettes
but if you want those chances to be relative, so that you find roughly the same amount of cassettes in a container
they need to be divided by the number of cassette items you add
and mind u this is across addon mods
so if you have 100 cassettes
you want .01 and .07
if you have a tousand, .001 and .007
to maintain the SAME rarity
in code this is simple to automate and just put new songs in and have it adjust the rarity for u
with this table not so much
so what'd u set it at, and how many songs do u have
well, important context: the mod in question is a sub-mod that is part of a larger pack of 3 mods, one that adds 455 songs, one that adds 196 songs, and this one that adds 94. for this one, i set it to 0.0001 before lootzed started returning clearly bugged results
so 745 songs total
if i made the number any smaller, lootzed's listed chance would go from like 0.0002% or something to 2% with an E at the end
yeah
there's no reason it should bug with low values, i've read the java
it just starts showing scientific notation in practice from what i've seen
i'm using smaller values on one of my mods
i haven't made sure in lootzed yet but it seemed to work fine
anyway to maintain original rarity
.1*(1/745)
.00013
so yeah that should be about right
this leads me to a question actually
actually nvm i think i figured it out. i'll give it a try setting it to a very low number and see if that gets me the result i'm after then
id go for .00005
half as often to spawn as a small number of cassettes originally
bout
and then just check in practice, not in lootzed, whether it works if lootzed really does bug out
huh, you were right
i was just getting spooked by the scientific notation i think
excellent. good to know
Its not that simple, right?
after testing the number i settled on was 0.00000000005
at that point i'd only find a cassette every 7-8 houses or so on default settings which is about where i want it to be
assumin that's in a place where player is populated by something, can be, yeah
What's the difference between a player and a survivor?
IsoPlayer and IsoSurvivor, is the latter for NPCs?
I guess a player is more specific.
No, I was wrong. IsoSurvivor is for NPCs I guess.
Okay I think I'll work off the assumption I can ignore IsoSurvivor for the time being
I take it IsoGameCharacter is even higher up the tree, and includes zombies
Hello, the clothes have a fabric type for cloth and denim, I can't put a code to use any item?
that's a confusing one
is there a mod that lets me attach cd players to my belt?
๐คทโโ๏ธ that might be a #mod_support question here is more so for your own mods idk of a mod off the top of my head though
You ever feel like your post apocalypse is too bland?
Do you need something that'll bring the party to the zombies?
Well look no further than the Silly Syrup mod, Spiffo Loves Lean, by Mothman and myself on Steam.
https://steamcommunity.com/sharedfiles/filedetails/?id=2863486646
Adds a new consumable, Lean, into the game. Craft with any mug, any candy, any pop, and one sleeping tablet
If an item was added to distribution like this "table.insert(SuburbsDistributions.all.inventoryfemale.items, "module.item")
table.insert(SuburbsDistributions.all.inventoryfemale.items, 1)" - was is the best way to update the chance, and also what is the best way remove it from that distribution list? I have tried using RemoveItemFromDistribution(SuburbsDistributions.all.inventoryfemale.items, "module.item", nil, true) - and a few other ways I thought might work but nothing seems to change anything. Any ideas?
Would it be viable to use the hazmat as a base for full model replacements or no?
in my true music mod a lot of the cassettes will stop playing mid song and i'll have to start them from the beginning again, does anyone else have this issue or know of a fix for that?
on a dedi server
i just used the addmusic.exe and pretty much leave it alone besides the cassettes weights
Just to check in case it isn't a task for beginners to approach, which if any of these is easiest/most doable?
- replacing/modifying existing textures for posters/carpets
vs
-adding new skins for existing posters or carpets
I'll be going through tutorials and testing and looking at how other mods implement such things later but it can't hurt to ask while the idea is fresh in my mind
Is there any tutorial I can learn how to make custom Furniture?
I tried to figure it out myself but still have no idea how does WorldObjectSprite work
Found old tutorial but it seems does not work in the current version
Same here, looks like that unpacker tool doesn't work anymore. Guessing that the format of texture.pack files has changed?
At least TileZed works :P
aye. i just got the tiles from project zomboid modding tools folder
Quick question. How to get current mouse XY?
Hm.... Seems it's Mouse:getX() and Mouse:getY()
Why my recipe to create Concentrated Ginseng Pills is not appearing using mortar ? Some idea ?
{
imports
{
Base
}
recipe Make Concentrated Ginseng Pills
{
keep [Recipe.GetItemTypes.MortarPestle],
Ginseng=5,
Result:GinsengPills,
Time:60.0,
Category:Health,
}
}```
none ERROR ... idk what can be
try Ginseng=5, keep [Recipe.GetItemTypes.MortarPestle],
try
Ginseng=5,
keep MortarPestle,```
in this way it would use the item (spend it, the mortar)
but I will try just to see what happen
"keep" means "keep" ๐
hahahahah true
I'll try
nothing yet
surely i did something wrong at some point ๐
Add spaces between the : on both sides?
Where exactly?
Im following this pattern
{
keep [Recipe.GetItemTypes.MortarPestle],
Plantain=5,
Result:PlantainCataplasm,
Time:60.0,
Category:Health,
}```
How is the structure in the translate part?
C:\Users\romar\Zomboid\Workshop\GodigodMod\Contents\mods\GodigodMod\media\lua\shared\translate\en
{
recipe Make Plantain Poultice
{
Plantain=5,
Result:PlantainCataplasm,
Time:60.0,
NeedToBeLearn:false,
CanBeDoneFromFloor:TRUE,
Category:Health,
}```
I need to add this ?
What I put would be for the crafting section for making your Plantain Poultice
As for the reference of the Mortar Pestle, try just using this.
{
recipe Make Plantain Poultice
{
keep [Recipe.GetItemTypes.MortarPestle],
Plantain=5,
Result:PlantainCataplasm,
Time:60.0,
NeedToBeLearn:false,
CanBeDoneFromFloor:TRUE,
Category:Health,
}```
I have not created a crafting item with a pre-existing item being used in the code.
My default ones are:
{
recipe J6's Helmet
{
RippedSheets=5,
Result:J6_Helmet,
Time:60.0,
NeedToBeLearn:false,
CanBeDoneFromFloor:TRUE,
Category:J6's Equipment,
} ```
You could just changed the RippedSheets=5, to that of "Plantain=5",
Yeah, I think is alright
Give a try and see if it works
I think some of the files in this part are poorly structured on my part.
are you writting recepie in lua folder?
Iwill share one by one .. better
Recipe_Make_Concentrated_Ginseng_Pills = "Make Concentrated Ginseng Pills",
}```
certanly the problem is here
ItemName_GodigodMod.GinsengPills = "Concentrated Ginseng Pill",
}```
ContextMenu_Take_Ginseng_pills = "Take a Pill",
}
Tooltip_GinsengPills = "Increase your pulmonary endurance.",
}```
These are my 4 files in the lua folder part
Need I put my module GodigodMod in Recipes too ? Like I did in ItemName ?
recepies are in scripts
The recipe I already showed you before
{
imports
{
Base
}
recipe Make Concentrated Ginseng Pills
{
keep [Recipe.GetItemTypes.MortarPestle],
Ginseng=5,
Result:GinsengPills,
Time:60.0,
Category:Health,
}
}```
I just don't know the structure in the lua file part
If is like this ```Recipes_EN = {
Recipe_Make_Concentrated_Ginseng_Pills = "Make Concentrated Ginseng Pills",
}or like thisRecipes_EN = {
Recipe_MakeConcentratedGinsengPills = "Make Concentrated Ginseng Pills",
}or like thisRecipes_EN = {
Recipe_GodigodMod.Make_Concentrated_Ginseng_Pills = "Make Concentrated Ginseng Pills",
}```
or many others possibilities ... idk the structure
That code will fail at line 7. It tries to run getInventory on what the variable player refers to, but in that context there may be no variable named player, so player is nil. It can not run getInventory on nil.
Yea it crashed when i tested it like you say.
So rendering the inventory is function without a player reference.
Do i need to make a function outside of this rendering function which is triggered inside the render function?
I do not think you need to make a function outside of it which is triggered inside it?
If you want to get a reference to the player's character object, there may already be a reference to it in the lua table called self.
I forgot to check back on this discord server for a number of minutes.
No, the player character object's getInventory Java function does not have any "arguments" passed into it. Also, player will still be nil in that context so there's no getInventory function being called anyway.
You may be able to get a reference to the object with something like self.player. You could look at the original tooltip render file to find out.
Thanks, i will take a look
Always when I'm going to rip some clothes to create bandages, the screen freezes for a few seconds. I believe this happens because in the clothing table there are many options that are created in the context menu. Does anyone have any ideas on how to fix these mini freezes?
I thought of making some change so that it shows in the context menu only the clothes that are in the character's possession and not all the possible clothes that exist in the table completely. Will we be able to make this work?
Have you tried this? https://steamcommunity.com/sharedfiles/filedetails/?id=2802922253
Yes
I think it doesn't work anymore
Have you currently tested it? I didn't see any difference
I haven't personally used it, I just remembered being here when a couple of people were batting the idea around/working on it
My idea was, to show only the clothes that were in the character's possession and not all the possible clothes, you know?
Yeah, that makes perfect sense
That way it wouldn't spend unnecessary processing and consequently wouldn't cause this micro freeze, I think.
Even this comment is mine Hahhaha
im not sure if its possible since i think the game just shows every possible crafting material for the recipes normally
It gave me a light. Maybe that's why I'm not able to create an item using mortar and pestle? Or does it have nothing to do with one another?
i mean like in the crafting menu it just shows all of the items a recipe can use
So mortar and pestle have your own items that can be used and I cant change ?
I don't know if you came to see a doubt that was before this new one.
lol many doubts hahahah
how do you guys view modData of objects in the world via debug?
I guess you just do it all in your mods code tbh, I'm just lookin at vanilla objects and their moddata values
Are you saying like this?
an example; how do I view the fuel left in a pump?
its stored in modData for the pump as far as I can tell
Does anyone know whether PZ runs access level-based code on player login, and if so, where I can find that in the Java?
I would start with the network classes
Hey, I tried your technic but I got
-----------------------------------------
function: SetProfessionDescription -- file: MainCreationMethods.lua line # 634 | Vanilla
function: DoProfessions -- file: MainCreationMethods.lua line # 609 | Vanilla
ERROR: General , 1663332606401> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getLabel of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1663332606401> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: getLabel of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)```
etc
Any idea of what I did wrong ? ๐ค
thanks I found it, F2 seems to show it
Is there any better way to sift through the distributions.lua file to set spawn rates for an item im trying to mod in, because its absolutely massive
What is the best way to remove an item from distribution that was added to SuburbsDistributions.all.inventoryfemale.items? I have a problem where old sandbox settings are not updating current spawn rates and I am unsure how to update or replace the earlier loot table entries.
I have tried every way of removal that I can come up with from SuburbsDistributions.all.inventoryfemale.items but nothing seems to do a thing here.
im trying to find a way to transfer an item to player's inventory after being dropped (i use onitemfall event) but i just cant seem to find a line for that. making player equip it will not put it back into inventory, but make many bugs instead (like duplicating items in the world but only 1 item instance being real)
i've tried setting the item's container to player inventory (printing it while it was on the floor showed an ID, and when i checked type, it showed floor, so it seems to work correctly), but it didnt work at all. (printing it AFTER the line shows player inventory ID, but it doesnt appear there in game, its still on the floor)
Any clue on how to fix the next issue:
print("Forcing the player to sleep"); if player:getVehicle() ~= nil then local playerVehicle = player:getVehicle(); if playerVehicle:isRegulator() then print("Turning off speed regulator") playerVehicle:setRegulator(false); end print("Turning off vehicle") playerVehicle:shutOff(); end ISWorldObjectContextMenu.onSleepWalkToComplete(player:getPlayerNum(), nil) player:getModData().DTpassingOut = 0;
Basically that code will force the player to sleep, and what I want is that if the player is in a vehicle, the vehicle stops. But I'm able to shut off the engine and also if activated, the speed regulator, but what I'm facing is that if the vehicle was moving when the player went to sleep, the vehicle keep moving at the same speed (even if the engine was stopped)
I was able to get distribution removal to work at the high level (I cannot specifically remove an item from a male or female zombie loot table though, I need to remove it from the entire suburbs distribution - like this: RemoveItemFromDistribution(SuburbsDistributions, "module.item")) - but I did notice something when working with this. Sandbox don't seem to get updated - when I check variables via code they are the defaults. Does sandbox only read one time when the world is first loaded and thats it? It seems like I could adjust these and the game should see that - but it is not - it is giving back either the defaults or the first settings applied to the world - I am not sure. Am I totally misunderstanding how this works?
looks trivial to fix that
i was planning on making a fix for this issue anyway but that'll make it very very quick
actually it doesn't look like there's anything to fix

when you change sandbox options they are not applied until reloadoptions is called, from an admin perspective
so if you are changing them programmatically you'd have to programmatically trigger that same feature
it pushes the sandbox options out to clients and applies it on the server end
or of course it reloads when the world is loaded
Is there something you can hook into whenever a new IsoObject is created in the world?
In my case I'm interested in IsoThumpables
I found this, but it doesn't seem to be called.
I think what I'd really need is something like OnTileAdded?
there's only an event for removal though
I want to edit Instant popcorn to give the player some happiness how can I make a mod that does this?
There's a few other mods you can look into for a base, I believe there's a couple vitamins mods that adjust how much fatigue reduction it gives.
Then you can adjust it to instead augment happiness to your wishes.
steamapps > workshop > content > 108600 > find the id of the mod from the workshop
okay thaks
anyone know how to get the name of a placed furniture from a reference to the IsoObject?
doesnt say
Lemme check evelyn
name is null, before someone suggests that 
Try getObjectName
If that doesn't work, you can try uhh
getContainer() with getType()
But that's only if that doesn't work

Meantime, time to continue bashing my head against a screen trying to figure out where the fishing logic is
i have PTSD re: code stuff so sometimes i get overwhelmed and i can't think straight :)
fishing logic? hm
I can only find where the lures are defined and possibly retrieved from
what do I now do to remake it
But not where it's actually being checked