#mod_development
1 messages ยท Page 117 of 1
Not yet
alr
Finished updating blindcoder's mod, took a different approach to it
https://steamcommunity.com/sharedfiles/filedetails/?id=2934556282
What mod
I never want to see an xml file ever again.
muhahahahaha
how about json?
. t x t ?
I would happily marry a txt file at this point
The worst part is that all the outfits are functionally identical except for a single item changed
Which should be handleable through a simple lua script
But worn zombie items aren't persistent once the zombie unloads
i hate fixing hardcoded crap
I hate writing it
you figure it yet?
No. Something strange. Problem in scripts, but I can't found where
One day TIS will tweak the zombie code or something, and then I will delete the entire file and replace it with, like...a 10 line lua script
And I will make merry
huh
i did sample cod
code
from the beef patty
Do suggestion on TIS forum ๐
gonna go to sleep
Good night! I will write here if will found way how to fix it
This may be fixed with B42...I was eyeing the new OnZombieCreate event.
If it works the way I hope it works then we're golden.
Ty man
Not sure if it will treat "Create" as "appears for first time" or "is loaded for player," though. I think the issue comes from the semi-persistent "despawn zombies but still track them" behavior that happens.
If it fires whenever the zombie is physically "created" -- i.e. loaded for the player to see -- we're good 'cause that's right when you'd wanna be forcing any clothing items.
Okay, check again module name (you have mistake in it) and change texture to square format (like 256x256)
lol slowly figuring this out.
Does it come with a clap on, clap off function that saves you the trouble of walking over to the switch at the cost of alerting nearby zombies? :P
still have to figure out the buttons and attach the functions to the buttons lol
lmao right
this is the LAST feature!
Actually this is such a profoundly stupid idea I just might make it myself
ahaha
when tf did that commercial even come out
back in the 80s, apparently
For this holiday version, they added a Christmas Tree! Isn't it hilarious how hard that old lady with the huge hands claps?
Looking for a guy who would fix this mod. Mod creator gave me permission to change it.
It's payable, of course. DM me
https://steamcommunity.com/sharedfiles/filedetails/?id=2832464569
the function isnt ready to be used
you shouldnt be creating children in the render
to see how to do ui properly look at https://github.com/Browser8/PZ-Server-Points
@weary matrix Noticed SalamanderAnder requesting gamepad support for Ladders. I had assumed it was not working; didn't even realize that it was key-activated-alone. If you would like, I could update your mod with gamepad support and send it back to you to save you trouble.
Consider this an alpha, not as fleshed out as I was hoping it would be due to the last minute change in reverting damage calculations. But, should be stable enough. I wanted to release what I got and take a break from this thing for a day or 2. Have fun y'all. Thanks for being an inspiration. https://steamcommunity.com/sharedfiles/filedetails/?id=2934621024
Does anyone know where vanilla sets all of the player's inventory and loot info back to how it was for KBM players?
Apparently there are 89 individual things in the inventory pane that need to be individually resized correctly in order for the pane to be correct.
Setting x, y, width, height on getPlayerInventory/Loot(0) when the game launches is not enough
Hmmmmm I may have just found a way
Recreating its children may do the trick
Dang no dice, duplicates things
Okay I got it. I need to be using its resize widget
Hmm hold on
That's no dice either... Weird.
Resize widget is apparently not the issue?
Maybe fixed this by decorating new* (?).
I made my first mod yesterday! I put some decent effort into learning how to do it entirely by myself looking through the vanilla files not using other mods (except the example template for file structure). I have a lore-friendly description in-game and everything. Only issue is you do not have the key to the door but who cares you got a window. Feedback would be nice ๐ I have another one I made after this but I am fixing an issue with it first. https://steamcommunity.com/sharedfiles/filedetails/?id=2934259602
Hi, sorry for necro-posting, but I need to ask how do I update the value of a field I obtained using getClassField and getClassFieldVal?
Like, I need to update the value of ClothingItem.java, the public String m_MaleModel; field
local scriptManager = getScriptManager();
local clothingItemAsset = scriptManager:FindItem("Base.Jacket_ArmyCamoGreen"):getClothingItemAsset()
-- Using Nuzzleskatev getfield
local m_MaleModel = getClassFieldValueByName(clothingItemAsset, "m_MaleModel");
print('Base.Jacket_ArmyCamoGreen.m_MaleModel: '..m_MaleModel)
You can't change value of java object. Only by set functions
Does this mean that because there are no setters inside ClothingItem I can't set the values at all?
You can read some fields of java objects. But you can't set values by same way. For change values need use functions of object, that change this value
So, if ClothingItem don't have setter for this param, then you can't change this value
@thick karma sure, that would be nice. You can submit a pull request on github if you like
@dark wedge So I noticed for brutal handwork you made most of the configuration sandbox restricted. would it be possible for you to make some of the rebinds in the normal settings as well?
He's alive.
I can do that.
Wanna DM me the link?
I'll let you know when I get to it... I'll probably do it today if it's easy, which I expect it should be.
I still need to find a ladder that reliably works, though... Tried E on my keyboard in Raven Creek and had similar results to others ๐ญ
Maybe because I was running 10 YL, will test that further.
Good morning.
how do i easily put all the plumable world obj on 1 table
is there a certain p-roperty i should look for
Does PZ ever plan on consolidating script files with modules?
I can see this breaking mod support for overriding files but it'd be an easy fix.
ZedScript files that are prefixed or suffixed with 'new' have been there for ages now.
hey, I have an idea for a mod if anyone is interested?
Drop it by the marketplace for comms later on if you can.
an "inspect weapon" mod that would show the 3d model of the weapon at a large scale and maybe some stats at the bottom?
for all the people who want to put an assload of detail into a weapon that will never be seen, at least with that mod it can be seen.
Oh darn that sounds cool.
maybe it have it show the attachments it has and all that.
or have the ability to add them in the inspect window.
that's a bit more than i was thinking but yeah
Ty man
still cant see whats wrong
@red tiger im in dire need of your advices ๐
What's up?
making something dynamic is a pain... and that leads to errors made by the user... so i was thinking maybe it would be better to define a standard syntax for the json string so that it follow some "logic" allowing me to check for errors on the string
since you work with gigantic json data strings
i think you would be the best choice to give me some tips on how to structure the json string
unless you have a way of working with dinamicly created stuff... im already making the UI based on the json string
and one typo "kills" the whole thing
so i was thinking maybe... a static syntax would be best even if it limits the end use case scenario... so your thoughts on this would be apreciated
I can't respond immediately so give me a bit. I am reading it.
take your time ๐
And yeah I spend time in the abstract with data.
the whole ui is abstract as of now, taking the static menus for config login info and stuff
Heh
Those types define the entire ZedScript schema and JSON can be hundreds of thousands of lines long.
Ok brb
hmmm so use the type do detect what type of json the user sent or created, based on that allow for less strict json for that typ or more strict depending on the "use" of it? That make sense
and from that i can create the syntax for every type, and allow for a custom type that its 100% user made and handled
uh, you've unblocked my brain ๐
Oh and look up JSON Schema format.
can anyone help me
That'll help if you need further help figuring it out
cheers, i will.. now to make the types and structure for the basic stuff and then further expand it
dunno if i can but i can give it a shot, what do you need?
alright thanks
Aiteron said this but idk whats wrong with module name
ohh
wait
he said check again module name (you have mistake in it) and change texture to square format (like 256x256)
so youre calling the module with a typo and the texture needs to be a square
the width and height has to be the same
show me the code then
eh?
i dont get it
nevermind
oh
thanks man
always check the case of the modules
a typo like that is what usually makes me lose a lot of time and hairs trying to figure out whats wrong ๐
yeah thanks
yeah, but you have to follow the folder the model is in
zomboid uses that name for the models folder
fbx files should be in models_X, but you don't need to include the folder in the mesh entry
you can just rename models to models_X
rename the models folder to "models_X"
so then it should work
probably
but i didnt specify
you're not supposed to, but it might not find it if it's in the wrong folder
ah
the normal 'models' folder is for weird old txt models
ah
Ow wow finally said something here ๐
Still wont work
idk if it even spawns in
like to find it
i have it set to icecream freezers
and i cant find any
you should cheat it in with debug item picker
i'm leaving my lurker shell 
Did you notice one of your lines says ROUDMEAL instead of ROUNDMEAL?
Not sure if that's supposed to be like that
it is
thats the texutres nae
name
Nvm i'm being blind xD
thats good news !
(this what happens when i try to be overly helpful ROFL)
this is what happens when i build a mod from scratch at 3 am
i did go to sleep guys
its 4pm
Now that i'm here, i actually have an issue of my Own. i figured out i can replace recipes with the use over Obsolete:true and Override:true but using just Obsolete doesn't remove a recipe, is there another way?
trying to figure this out makes me wanna cry
what seem to be the problem? maybe my limited knowledge can help
the model will not spawn
did you restart the game after making all the changes etc?
the icon does
yeah
been like this for the past hour
your model is exactly models_X/model_ROUNDMEAL.fbx?
Not sure what the model is exactly but i got mine to work by just placing them in the correct folder, didn't even have to assign the texture it just "works"
My models and textures have the same names so for example modelname is M13Bo1.fbx and the texture is called M13Bo1.png
in my case the models are in \media\models_X\weapons\2handed and the textures are in \media\textures\weapons\2handed
and all i have for the model code is this:
{
mesh = Weapons/2handed/M13Bo1,
}```
I did, because i wanted them to be in a subfolder
the model is a Japanese Bo (or a Bo-staff if you will)
sec
be careful of case sensitivity
your models are in weapons but your script specifies Weapons, this will break for non-windows users
ahh good to know
so people not using windows will have a non-functioning mod because the folder is in lowercase
i didn't know this, i'll fix and reupload that real quick xD
also, ALL of your weapons could use the Bo3 texture
can somone help me specify thus
Yeah i kinda realized that later, but if i remove 1 and 2 they won't get removed due to how Steam works
so i kinda left it like that
renaming the folder might cause problems like that, better to just correct it in the script
i edited the script, because renaming the folder with a uppercase W won't change it
would that work
the first "slash", if I am not mistaken, points to the root directory of the mod
eh?
ah
hold on
what mine looks like
if you do it this way you are telling it to look for models_X/models/..
oh
i just have models_x
the game already knows the models are in the models folder, you don't need to add that to the path
shouldn't it be food/model_ etc then instead?
no im stupid
not models/food etc
it was a misstake
inside your mod's media folder, use this form:
inside models_X, you can place your FBX
this is my media
thats what i did
what's the name of your FBX? model_ROUNDMEAL?
you should use mesh = model_ROUNDMEAL
yeah
mesh = food/model_ROUNDMEAL
food/model_ROUNDMEAL
Same idea for textures
i don't think the issue is the path, it looked like you had it right earlier and it still wasn't working
thats what i did
texture = food/texture_ROUNDMEAL
yeah i did it for sorting
im gonna add more stuff
Should make sure your base stuff works first XD
it works
don't include models_X and textures
i just cant get models to work
why
i edited the script to use lowercase w's @bronze yoke , will upload that tiny change to the workshop in a bit
mesh = food/model_ROUNDMEAL,
texture = food/texture_ROUNDMEAL,
scale = 1.0```
without the / in front of "food"
yea
done
or it will go BACK 1 folder then start looking for food, which it won't find
idk if its the same as HTML, but if I remember correctly when I was learning HTML, a slash in the beginning means root directory
idk if its the same for other languages
if it still doesn't show up with code after you restarted the game then either your model or texture isn't working
i don't really know what it'll do exactly, but it won't work
i assume you did your uvmap
if i put a model while in blender
sorry
texture
would that break it
No you can actually put your texture in blender to see if your uvmaps are correct XD
thats what i did
But in my personal opinion you should remove the prefixes and make the filenames shorter
alr
would anyone be able to point me to the vanilla code that allows zombies to have the key of the house they died in?
can't find it
need to actually find the way/function to allow players to create keys for a specific doorknob and the way to create a duplicate of a key (i.e. copying the key into a new key)
rip
anyone help?
media\lua\server\Items\Distributions_Jumpstarter.lua
yeah
require 'Items/ProceduralDistributions'
table.insert(ProceduralDistributions["list"]["CarSupplyTools"].items, "Jumpstarter");
table.insert(ProceduralDistributions["list"]["CarSupplyTools"].items, 6);
table.insert(ProceduralDistributions["list"]["GarageMechanics"].items, "Jumpstarter");
table.insert(ProceduralDistributions["list"]["GarageMechanics"].items, 0.05);
table.insert(ProceduralDistributions["list"]["MechanicShelfElectric"].items, "Jumpstarter");
table.insert(ProceduralDistributions["list"]["MechanicShelfElectric"].items, 6);
table.insert(ProceduralDistributions["list"]["MechanicSpecial"].items, "Jumpstarter");
table.insert(ProceduralDistributions["list"]["MechanicSpecial"].items, 10);
table.insert(ProceduralDistributions["list"]["GigamartTools"].items, "Jumpstarter");
table.insert(ProceduralDistributions["list"]["GigamartTools"].items, 0.05);
what mine looks like ^
what mine lloks like
acc i should ctrl c
`local containerData = ProceduralDistributions.list[containerName]
if not containerData then
print("Container does not exist. Are you sure you typed it in correctly?")
return
end
table.insert(containerData.items, itemName);
table.insert(containerData.items, itemChance);
end
AddLootToType("Roundmeal", "FreezerIceCream", 2)
AddLootToType("Roundmeal", "FridgeSoda", 2)
AddLootToType("Roundmeal", "FridgeSnacks", 2)`
there
i want it to spawn in the gas station icecream freezers
require 'Items/ProceduralDistributions'
table.insert(ProceduralDistributions["list"]["FreezerIceCream"].items, "Roundmeal");
table.insert(ProceduralDistributions["list"]["FreezerIceCream"].items, 2);```
try this
replace the whole file contents with this
like so?
yes
also idk what 'Items/ProceduralDistributions' is
it basically what controls what items spawn where and what is the chance
but i dont have that
ah
inside the file you'll find all containers and what items spawn in them
FreezerIceCream = {
rolls = 4,
items = {
"Icecream", 50,
"Icecream", 20,
"Icecream", 20,
"Icecream", 10,
"Icecream", 10,
},
junk = {
rolls = 1,
items = {
}
}
},```
this is the container we're working with
is the item spawnable using debug?
Try check by lootzed
lootzed?
did you visit this container before?
it won't spawn in containers you already looted
naw
aah
new world
Open cheats - turn on zedloot cheat - then right click on container icon - open loot zed
where would lootzed be under
you need to enable debug mode on your steam launch settings
using -debug
it'd be more efficient to use debug
well, its easier using debug mode
ik how
oh okay
with lootzed you can see the spawn % of every item on the container
I wouldnt recommend enabling debug this way
When you launch the game there are 2 launch options
where is lootzed
there's a panel on the left of your screen, click on it and open the cheats menu
enable lootzed, and right click on a container
If you edit the bat and add the debug parameter to it you can then choose in what mode to launch the game
why not the properties method tho?
Properties control the exe which is used for the normal launch
Alternate launch is more suitable for debug because its easier to remember you put debug on that and it shows a cmd to see prints and errors
Ah you meant properties on steam
It applies to both launches and you cant join server youre not admin of in debug mode
the steam properties option is, personally, better for me because i tend to quit/re-launch a lot during modding and it'd be really annoying if I have to input -debug everytime i am launching
so I just put it once
and when I am done with modding for the day I remove it
Plus debug has some quirks to it
Cba editing the steam properties everytime i need to swap mode
You dont input anything
Starting to hate the steam workshop, i had to change more then the uppercase letters so steam even UPDATES the damn file on the user end :S
Is there an easy way to safely reset the player's UI? Something like this look approximately correct and safe?
local playerData = getPlayerData(playerIndex)
removeInventoryUI(playerIndex)
playerData:createInventoryInterface()
... or is the answer just "no"?
Ah inventory only
Resizing it simplistically doesn't put stuff in the right places
So I am trying to recreate it, which works, except the old UI was running in the background and threw an exception during the death loop
That might do it not sure how its implemented specifically
I think I need removeInventoryUI to prevent that
But I haven't tried it yet
No worries... was just thinkin someone in this community had maybe ran into the desire to do that already
But I guess on KBM it would virtually never come up
nice... that seemed to work...
(I tried like... so many things before I asked.)
lol
Im off work in a bit and struggling with ui myself too though in a much different way
Trying to solve some render issues caused by the fast border render
Feel free to rubber ducky... can't promise I will have any useful insight but I can read and ask questions.
Decently sure if anyone can help itll be jab unless you happen to know opengl and zomboids renderer
Well, I don't, lol, and that's fair enough, but nevertheless I didn't know any Lua like 4 months ago, so, you know, capacity to learn and answer questions about things I presently know nothing about on the basis of literacy and logic.
My brain might get lucky and ask the right question; impossible to know unless I look at ze data.
Also, you know, the rubber ducky doesn't necessarily need a brain at all, right?
Definitely helpful having another couple of brain cells looking at it
My 2 and half remaining arent looking good
Looking good right? Then lets overwrite the vanilla function to apply it to all uis
Not working properly
Can anyone direct me to where I can figure out how to create a restriction on a container to only allow certain items? I've looked at the tileset properties area in TileZed and wasn't sure where to look or if I had to make a script for it
Iirc you just point it to a function giving the eligible items
i got it all figured out
So is the first example the intended background color in the next two? Full transparency?
thanks to another mod maker
Also which vanilla function are we talking about overwriting?
model works now
Hello all, I was wondering how I could turn a spawnpoint like { worldX = 1, worldY = 1, posX = 1, posY = 1, posZ = 1 } into something I can see on a map? I'm mainly just trying to see where that spawn point would be on a pzfans.com map. Or is there a better tool?
For what it's worth, to me, this looks like either A) some hardcoding got missed, B) an overwrite got missed, but the question is where and the answer would probably be a matter of stepping forward from the point of attempting to set that background differently (until you find the point where the color gets set again by something else, which presumably must be happening, unless the wrong object's background color has been set by your approach).
This will tell you your current location and you can also mouse around the in-game map to see locations around you
Ah okay perfect, thank you @thick karma.
I guess it's time for me to try and get into modding. Any resources or documentation for nubs like me?
You'll also want to check the pins up top. @woeful sluice
I know I can't be the only modder who is gonna want this now... ๐
https://steamcommunity.com/sharedfiles/filedetails/?id=2934405064
i should actually tell my game to store the saved stuff on a different partition
Trying to do frosted glass?
https://gyazo.com/e41efffaa09c8b2752f470d3b8abfbdf Done, now all i have to do is move all my stuff there XD
I never bothered to research if i could, happy i can and did... i trust my normal HDD's over any SSD anyday xD
Anyone knows what affects the damage and target amount of the basic push (space) ? Is it considered the item Base.BareHands ? It is, i just was going crazy as the hidden item was already present due to the char having it by default, so it wasn't being modified post-char generation
Check the threads
Im done with the mod
Grats!
you should DL the mod I just posted lol will make it easier to submit your mods since you have 400592 of them
@faint jewel are you planning on writing the item overwrites into the lua via script manager, or are you just sticking to doing it via the script file lol. You even have "Don't do this" in your code haha.
in reference to https://steamcommunity.com/sharedfiles/filedetails/?id=2921029369 specifically
a mod to use a mod?
i say dont do it because the game is dilikes overwrites sometimes.
I'm not sure what I may be doing wrong or if it's by design, but when I watched @viral compass videos when he's using the editor, the tiles show up as whole, but when I try to load mine in - they show up split into an upper and lower half. Am I setting something up incorrectly?
@drifting ore Are you aware you can look at the code of other workshop items after subscribing to them?
You need to put them in the 2x folder
The. You are on the wrong channel
#mod_support
If you want a mod to work, I imagine you need to understand some code, or at least the programming structure of the mod, i.e. where files belong, what folders should be named. Idk what to tell you.
Welp its now 400593 then
@drifting ore you should learn manners b4 that
No he isn't
He is developing his own mod Glytch3r, I brought him here on purpose
A music pack for online use doesn't require a mod?
youre not? so you have no manners not developing a mod so go to #mod_support
I did do that - I created a pack file, viewed it to make sure it was correct then moved the PNG sheet to the 2x tiles but it still does the same thing.
His not developing the tru music
He is an end user figuring out how to make the addon . He should contact iBrRus directly instead
yeah he should... and learn how to ask for help
Is the addon not a mod?
I'm just changing some properties of propane tanks and noticed you overwrite them, just curious if you were going to move that to lua so changes like that would stack. It's solvable with mod order, so it's not a huge deal, more curious than anything.
nop its a functionality of the mod
Music for the End of the World is an addon and also a mod, right?
so he should talk in #mod_support or contact the mod author
why should i help you when you have no manners?
I bet if you had a better attitude people would bend over backwards to help you
youre not even willing to learn
you cant just expect for us to vomit out the solution for someone who behaves like a troll
No more annoying than you have already been
Yes he will np goodluck
Look for his discord link on the desxription of his mod
His usually active there
No, your crappy attitude is annoying
yup
We help people all day
its not the asking for help but the way you ask for it
what do you mean?
I told you twice
local scriptManager = ScriptManager.instance
local item = scriptManager:getItem("Base.PropaneTank")
if item then
item:DoParam("KeepOnDeplete = TRUE")
item:DoParam("cantBeConsolided = FALSE")
end```
%userprofile%/Zomboid
HSSSSSSS
@drifting ore
I sorta understand how frustrated he must have felt when he was told to understand syntax and all that. We cant blame him tbf
But it wasnt the right conduct to act sure, tho if we atleast understand why then we can perhaps tolerate better ๐ so thaat enjoy a peaceful community ๐
hahaha, what's that reaction?
Its fine, good luck
dude... this is a channel to develop mods
not to helpdesk
go to #mod_support
or contact the author
My bad all
I thought he was doing something like Music at the End of the World
Which may be an add on but it's also a workshop item and thus to me constitutes modding
And didn't seem to belong in support where people learn to USE mods
Idk how True Music addons work clearly
true music comes with a batch file or some such thing to turn your tracks into items
Or how people classify them mentally
it's automated and the instructions are in the main mod's description
But don't you still need to put a workshop item in the right place and name it and such?
nah i simply replaced the vanilla function with the new one and it breaks some stencil operations
I'm all about frosted glass though.
unfortunately its nothing that simple
im more into the cheapest version of it, windows aero ๐
i thought it was something to do with stencil layers which i implemented in lua the best i could
okay now put anime girls in the background 
theres like 1 vanilla operation in java i cant track but since it clears right after shouldnt matter
winamp themes when
i suspect it might have something to do with
I just wanna make the menus in my medieval mod have a woodgrain background ;-;
Are you sure GPS is turned on to enable tracking?
/s

Can we simulate players ? (As in : spawn a fake player)
You can spawn in IsoPlayers - thats how the NPC mods work
As for simulating them, it's a huge undertaking.
I guess it is, thank you
seems fixed in the menu
what did i do?
raise the default stencil layer
working ingame
well
ok
Interesting!
do
local StencilLevel = 1
function ISUIElement:setStencilRect(x, y, w, h)
StencilLevel = StencilLevel + 1
return self.javaObject:setStencilRect(x, y, w, h)
end
function ISUIElement:clearStencilRect()
StencilLevel = StencilLevel > 0 and StencilLevel - 1 or 0
return self.javaObject:clearStencilRect()
end
function ISUIElement:drawRectBorderStatic(x, y, w, h, a, r, g, b)
self.javaObject:setStencilRect(x+1, y+1, w-2, h-2)
local renderer = SpriteRenderer.instance
renderer:glStencilFunc(517, StencilLevel, 255)
renderer:renderi(nil, x + self:getAbsoluteX(), y + self:getAbsoluteY(), w, h, r, g, b, a, nil)
self.javaObject:clearStencilRect()
end
Events.OnPreUIDraw.Add(function()
StencilLevel = 1
end)
end
that event at the might be fine removing i just did it when testing to assure consistency with the vanilla behavior
now to test it on the non static border
its causing issues with the stencil used in scrolling lists
because that's a lot of friggin work.
I've tried it again and ran into the same issue where they show up with the upper and lower halves separated - if I create a new file in TileZed and load up the tileset's that way, it does show them correctly - but when I place the, it ends up with an infinite loop error saying no rules in /rules.txt
Do you have a rules.txt?
You could mess around with superb survivors - as far as I know Nolan is up for collaboration.
It also is best practice to have the most compatibility hahah
Got it - that worked, thanks!
it MAY be, but it will break the way my mod works.
Yanno what else is alot of work? Recreating 3,498 cells 
oof
Is there an area in the tile properties that you can specify which items can go on in a container for a mod?
pretty sure yeah
Do you know where it would be or what it would be called?
are you referring to its coordinates in a tile, or if items can be placed on top of things in a tile?
No like if I was making a tool chest and only wanted items categorized as tools to go in it.
Can you make an item have 2 Type?
you can find rooms, containers, etc in Distributions.lua
Hey, I've got a function which checks for nearby windows. For some reason, it doesn't seem to find windows that are directed south or west compared to the player... Does anyone here have any clue what could be the culprit?
the only thing I know that does something like that are clothesracks. you can try looking at their code
Oh awesome - thank you.
Chuck was working on something like this, but I never followed up cause I just wrote my code to ignore what I didn't want processed
Jog my memory, as I'm not sure if/when I mentioned this ๐
You said you were writing it into one of your frameworks I thought, having it so it filtered on specific item type
Ah, to clarify the functions related to inventory display slumps items all together for rendering - what I was talking about was allowing those items to be grabbed pre-render and allow for modders to manipulate them.
Atm one would have to hard overwrite the function or to avoid a hard overwrite slip in behind and reverse the display process (which I don't think is possible/realistic)
But manipulating item transfer is also something that sounds doable, for what it's worth
Tipsy, tired, and worked but gonna code tonight regardless. =)
@glass basalt finnally got my mod to work
it took some help from another person
i was missing worldmodels
(Scratches head)
@tame mulch I'm glad the ZedScript format will change for 42. zombie.scripting.objects.Fixing scares me. =(
Writing out the AST schema made parsing it a breeze. =D
what's a timed action that's looped?
just found this may give it a shot
was better literacy removed?
it's been unlisted for a few months
ah someone mentioned it having issues with recovery journal
honestly considering just dropping the read timedaction and making a fake version
only been headaches
sounds like it might be worthwhile
I noticed you have a literacy mod - do you know of any issues with SRJ?
i don't use srj myself, but i've heard they play along
so did moonslime just unlist all their mods?
i remember that
i also remember the person who made it
forgot his name tho
Might leave it alone then
managed to wrap up the EHE MP syncing
might leave the night on a high note lol
- updating SRJ pisses off at least 30 people ๐
Is it possible to have a submenu in a submenu for the emote radial?
I'm making an emote mod and I want to categorize my own emotes into many submenus without bloating the main emote radial menu.
Yes
Do you have an example or know of any mod that does this?
I'm using True Dancing as an example for my mod and it seems to have only one submenu.
I'm looking to make something like
Emote Radial -
-> My Emote submenu
-> Category 1 -> Dance 1, Dance 2, Dance 3
-> Category 2 -> Yes 1, Yes 2, Yes 3
-> Category 3 -> No 1, No 2, No 3
-> vanilla stuff
Category 1,2,3 and so on being my own emote categories
(Looks at item script properties) ....... .... .... AAAAAAAAAAAAAAAAAAAAAAAAAA
That's a lot.
I think that I'll split up the item script into their categories.
Looks like you can give emote variations but I want all of them to be selectable not randomized
If you have only 1 entry it's not random
also if the entry is a string it seems to be a direct call
hey, can someone please tell me how to get translated radios names?
getText( ... ? )
yea if its from the translated folder yes getText
but i dont know the in-game names
search the game folder lol
i think the in-game radio names dont have translations
ohhh
https://steamcommunity.com/sharedfiles/filedetails/?id=2762807877 Ahh this mod seems to be doing what I was talking about
there is a guide on the radio stuff
i do think its a little different if i recall
i missed the part about radios you mentioned earlier
like, does in Chinese got named translate...
but i dont think so
the transcriptions got, but station names no
here read this
this is a little chat from people here about it and a guide to using wordzed
i'm sure something around this can get you in the right direction
thanks nippy
if you use radialmenuapi it handles that for you
Yup, I'm taking a look into radialmenuapi lua code atm
You can.. however you have to deeply modify the system to handle it.
I did this for a private commission.
?
for submenus?
Yes. I wrote a recursive submenu solution for emoteRadial UI
Someone paid for it and is theirs to do what they want.
I don't really like relying on external API but I am not really good at figuring out Lua code
i manage to deal with radialmenus, with submenus too, in radialmenu addon for superb survivors
But I will say it's doable.
it was 14 lines of code for submenu
?
the submenu handling took me 14 loc
you might be thinking of a different kind of submenu because it didnt require changing anything
just provided the functions for handling it
This
something like that but with extra menus
this
each slice can keep creating its own submenu
so something like
ISEmoteRadialMenu.menu['myemotes'].subMenu['emote_category_1'].subMenu['emote_dance_1']?
Yes. This. Exactly this.
doing it through the vanilla table wont work
You can. You have to modify it though to work.
It'll take some work.
or just use the api and its a single function call
Strange.. There's a ton of specific properties for all items like engineLoudness
o__O
No category for vehicle items.
Going to split up ZedScript item properties to their respective categories.
The current classes for the parser so far:
Loco Bell Dame Work in Progress.
Game by Project Zomboid.
Quest System by Dmitry "Oneline" Borovsky.
Mod by LeoIvanov.
Music by Orsartag.
I am, and you're unbanned from this server? ๐
And the forums.
Seven years is a long time.
Tldr server drama and all sides were unhinged.
I was mad mainly for losing a side gig modding for a server when it all went down lol
oh that I know, I mean how come you've been unbanned? ๐
Now I find it funny
Idk. For real.
anyone got an idea what does "MetalValue" do?
/************************ Keys ************************/
item Key1
{
DisplayCategory = Security,
Weight = 0,
Type = Key,
DisplayName = Key,
Icon = Key1,
MetalValue = 5,
WorldStaticModel = Key,
}```
@hollow current how much metal you get from salvaging the item
ah gotcha, thanks!
ah so you don't even know lol
No I don't and it's really good lore-building material.
And now I pester people about Typescript here.
Also transpiler stuff I'm writing along with a parser library I'm working on for ZedScript.
what does typescript has to do with pz?
PipeWrench.
oh so you mean now people can mod pz in javascript? ๐ฎ
not sure why someone would want to do that ๐
Typescript typings
Guardrails and type safety
Also generated method signature documentation
Intellisense
Compiler checks
I see, doing god's work ๐
I have a coding job atm
oh nice
Thanks to pz I can build two of the best transpilers in the world. Check out the typings for PipeWrench.
I generate Java typings with in-depth generics.
The Lua to Typescript transpiler is planned to have "type - discovery" technology built in.
The most fun modding I've ever had. <3
Why did you get banned? Thats awful
nice
Banned or not I'm always going to have fun modding games.
what about making your own game? ๐
Hahaha then being banned makes sense
how so?
But helping people here is rewarding. I enjoy making tools for modders. You guys are my players.
I'd be competing in the same genre right?
well whatever floats your boat ๐
Ehehehehehe, I made a mod/submod very late last night and for a few hours today. Helped to have blender and texturing exp.
People still use your docs
You did a great job helping people
I redirect them from your site since tis actually did an update to their javadocs.
It's good to hear from you though @weary matrix . You helped a lot of people.
oh they finally did? ๐
Yup.
8 years too late but still good to know ๐
You're able to see javadocs metadata as HTML comments
The date is Nov 2022
Last one was 2015
I remember how painfull it was to have the javadoc tool to parse pz decompiled java code ๐
I remember digging the 38 version of the code cause this one had symbols compiled in
haha
I found a archive of the code from 30 I had.
good to know, although I don't really mod pz anymore
still was happy to see my out the window mod reached 800K subscribers recently ๐
2nd most popular mod of all time or something
Your ladder mod is popular.
it's so funny for such a stupid mod ๐
not as much I think
My faction safehouses mod is popular
I wrote it in 50 minutes
Funny stuff.
Always the silly stuff that's popular.
Nice to see you around again. You were my strongest critic.
oh really I was?
nice to see you too
I'm honest. It's good to have that person.
It keeps me focused on giving better work. Thanks for that.
you're welcome mate, glad I could be helpful
This channel is if you are developing a mod
Hopefully I helped you in some way
@red tiger got to go, I have some sc2 campaign to finish in brutal mode ๐
Have fun.
Does anyone know if there is a way to disable the "reloading Lua" functionality after you change your modlist in-game? I am finding progressively more annoying to wait for it to finish, as I have to quit the game anyways to also reload textures.
might just start Alt-F4ing, it's so irritating at this point. let me relaunch the game :(
As a sheep fan this looks extremely incredible, holy shit
mod link: https://steamcommunity.com/sharedfiles/filedetails/?id=2934987146
it's a submod for anthro survivors
(also includes cows and boars)
holy shit this is like.... the best thing ever
Thank you so much for making this, ive been looking for someone to make a sheep model ever since ive seen anthro survivors
no problem! :D
no idea sorry
i cant find the pipebomb explosion only a basic explosion any idea?
i wonder if i should add an immune trait that is mutually exclusive with my bitten trait
@red tiger btw, I checked ur mini-project, but tbh idk what's the useful usage for it? ๐
Hot reloading code & server-exclusive code for workshop content. Oh and you can soft-lock mods that will only work for that server.
hot reloading for zed files?
Wrong project lol
Thought you were talking about the mod loader
ZedScriptParser is useful because it can be used to modify and filter ZedScript.
I plan on making a gui editor for it.

modloader still didn't check... 
where to get time for pz 
even didn't done refactor
sounds amazing 
Hey new here, jumping in a bit late into PZ, but i have some questions on this mod im making.
- how/is there any way to adjust the body temperature for during my custom fitness exercise ?
- how do i create/edit an animation
2.5 how do i link an item to this animation ?
Wow thats alot of questions
Quite an intro ....
Check out the threads first and learn from the guides then comback with a bit specific and filtered question @cunning kestrel
^^ hehe kinda, what threads/guides are you referring too if i may ask ?
i tried, googled, debugged but not much luck
working on mine...
@cunning kestrel found it?
Got it. Thanks ! ill see if i find what im looking for
Thats almost evrything out there
How do you guys test if your mod works in multiplayer?
Also, how can I make this code work. I'm trying to save the original function, but
baseInventoryPane(self, context, items, player)
```or
```lua
baseInventoryPane(context, items, player)
``` don't work
```lua
local baseInventoryPane = ISInventoryPaneContextMenu.doBandageMenu
function ISInventoryPaneContextMenu:doBandageMenu(context, items, player)
baseInventoryPane(self, context, items, player)
print("Debug")
end
You're declaring your override with the : syntax, but the original doBandageMenu does not do so. That is, the original has no self parameter, so your implicit self will be the expected value of context when it's called. Calling the original without self and changing the colon to . should work
Can somebody explain me how to make custom furniture rotate?
guys my second mod went live yesterday (after a bug fix) and I forgot to show it here
https://steamcommunity.com/sharedfiles/filedetails/?id=2934279481
In the future I will customize it more with dedicated locations for each profession (like the burglar on the roof or the back room, or carpenter at a hardware store etc.
Right now the chef will spawn in the food court (was actually made for testing the bug that was causing a broken leg at spawn for that point)
Also I will build upon my prison spawn mod to evolve into a more elaborate overhauled Rosewood spawn setup so each profession can end up more interestingly perhaps (like security guard and police officer can spawn at the prison gate (guard would always spawn there but officer would have a chance between there and the police station or even the donut shop ๐ )
Anyone ran into a way to determine if you're on the main menu? Gamemode returns the last gamemode you were on - in the case of exiting to the main-menu. I'm using the gameboot event to catch lua resets as well
For now, I think next mod will be Fallus Lake spawns
this is that area
is there a way to create a scenario? like a predetermined sandbox and spawn setup like CDDA or opening hours?
isIngameState seems to work - for anyone curious
Good morning.
Hi. I am looking to commission someone proficient in car modding to fix my vehicle mod as well as teach me a few things about adding car mods.
What I've done:
Made the model & textures,
Set up areas and other stuff related to the vehicle editor,
Added code and made it work (besides some things that I'll list below),
Animated many interactable parts and made them removable.
What I need someone else to fix or explain:
The green areas appear larger than normal,
The trunk which has two vertex groups, two bones, but one animation doesn't appear where it's supposed to and the area for it doesn't work,
The animations for the front doors don't work as this car is supposed to have the steering wheel on the right side and hence the "driver's seat" is on the right,
The car doesn't drive despite having wheels in contact with the ground,
No overlay exists for the car yet and I've got no idea how to set it up (besides rendering the car in the black and white view).
In addition to all of this it'd be great if all of this can also be explained (how and what was broken and how to fix it so I can keep modding in the future without help).
In my opinion most of my issues can be solved within a couple hours given the person understands vehicle modding.
If you know someone who can help, redirect them to me.
DM me for more questions and provide your portfolio as well as potential price.
Wow a full comm post. First time I have seen one this solid in PZ mod chat.
anyone has any info on how to adjust our body temperature ?
Ive tried
player:getBodyDamage():setTemperature(player:getBodyDamage():getTemperature()+1.0)
player:setTemperature(initialTemperature + temperatureChange)
which did not seem to do anything. (nor throw errors)
I know its linked to metabolism and like environment etc but is there anyway to set/adjust it ?
Any resource where I can find about how the context menus in pz work?
perhaps, best how i learned was subscribe to a mod and learn from its code ...
Said I'd sneak in some coding for my work today but..
I really want ZedScript JSON.
=/
media/lua/client/ISUI/ISWorldObjectContextMenu.lua
media/lua/client/ISUI/ISInventoryPaneContextMenu.lua
Events that get called post-fill: OnFillWorldObjectContextMenu OnFillInventoryObjectContextMenu
I need to get my server to be more active with modders so individuals like you can post your commissions on the market there.
=/
@thick karma What was the issue with SwapIt and controllers or was it that hotbar stuff doesn't really work with controllers as one would be using the radial equip menus?
Doing a light pass over my mods since I have a bit of time
It was your options menu; when you try going down in the Swap It menu, the joypad gains focus on something oddly and starts trying to fire commands that don't exist
ah right, you did mention that
Thanks for the reminder ๐ , sorry for the ping
Do controllers offer a way to drag and drop items?
I'm currently updating shops/faction banking
One thing banking needed was a way to deposit raw cash
I think temperature of body changed dynamically
figured. but then is there any way to increase our temp while doing my exercise ? some work around ?
When/how are you adding the temp?
how is it handled vanilla ? metabolism increases temp while exercising ?
through the update loop of the timesEvent/fitnessEvent
currently have it set the metabolism level but not sure if its being picked up
cause its not using the vanilla "fitness" action event for the game im in "idle"
hmm
would like to use it, but dont know how to trigger it without it resorting to one of the vanilla ones
You're trying to add a new type of exercise?
working on fitness overhaul + treadmill + benchpress
whats the exercise timed event called? I can look around
ISBaseTimedAction:derive("FWOWorkingTreadmill");
No I mean the vanilla one
Or is there not?
Timed actions can be given caloric burnrates btw
Not sure if that triggers the temp rising tho
function ISChopTreeAction:new(character, tree)
local o = {}
setmetatable(o, self)
self.__index = self
o.character = character
o.tree = tree
o.stopOnWalk = true
o.stopOnRun = true
o.maxTime = -1
o.spriteFrame = 0
o.caloriesModifier = 8;
o.forceProgressBar = true;
return o
end
As an example: o.caloriesModifier = 8;
Hmm I see, ill give that a go
I have this, but again not sure if its picked up
player:setMetabolicTarget(Metabolics.Fitness);
Looking around, and I don't really see where the temperature changes tbh
Does vanilla exercise actually make you hotter?
thought it does
it doesnt i believe, but ive added that in mine though
theres a mod that adds "nature calls" to your char needs ( toilet needs ) it also added sweating
dunno how never went much into that mod's code
adding sweat/wetness aint the hard part. its the temp / getting the game to see my event as an exercise...
Seems to be done in relation to thermoregulators
Are you adding to the vanilla exercises?
media/lua/shared/Definitions/FitnessExercises.lua ?
There's options for exercises to require items
Perhaps you could tie it into there to check for nearby worlditems
This is assuming vanilla exercise actually raises your temp
its a custom one. and do have a check for "bring your own BarBell" to the bench press so..
testing it now and it does
I'm saying if you're adding the exercise to the vanilla system for exercises you shouldn't need to worry about alot of the under the hood stuff
You wouldn't need to make your own timed action
i tried adding it to the current vanilla excercise list but it wouldnt read properly, said the list was empty suddenly etc
the app icon... anyone who might have a better idea and more talent to do stuff like this and can help me out will be credited in the app
Did you set your files in the same directory as the vanilla file and use require on it?
yes
I'd have to see the error then, you can keep going your current route but you'd basically be doing alot of ground work
yeah i hear you,... makes sense
Hey guys, i just got back to modding and i noticed that none of my grenade throwing sounds are working anymore. Does anyone know another way to do it?
Are there any guides on how to make an overlay mod?
what do you mean by overlay mod?
there are several tutorials about the game UI
the wiki has one i think
and you can always mess with the mod simple ui api
thats a good place to start learning about how ui works in pz
im 1/5 done with the gui...
and i agree... a drink would help the struggle of ui design
dont know what your sound file looks like but your script file doesn't seem to be the issue
unless the name of that sound has changed or something
it was working fine a few updates ago
even so lol
i wasnt modding for a year and now my stuff is broken lol
check the sounds to be sure
there is a full guide that Aiteron posted on script syntax it's like 90+% done
if you want to see if anything is updated. even though
there is a link for each now depending on your goal
ill try it thx
i'm sure it's something very small
i would start with sound block though
got this far with my UI
and then restart from scratch lol
it's amazing after spending 2 entire days learning how much wrong i was doing lol
had a look at server points code?
yes
big time
and more vanilla usage also
there were a couple of derived classes that made more sense to learn from
vanilla isnt a great example
you aren't wrong...
i noticed that many people did it
and everyone does their own ways
LOL
i followed your hierarchy though on function usage
this is what that child block looks like for now
dont mind all the options. im just testing things
function NipSwitchUI:createChildren(width, height)
-- Calculate new dimensions for the child elements
local newWidth = self.width - 40
local newHeight = self.height - 85
local newSliderWidth = newWidth - 20
local value = 15
-- Create a label for the slider value
--[[self.sliderNum = ISLabel:new(self.width / 2, 10, 20, value, 220, 180, 1, .9)
self.sliderNum:initialise()
self.sliderNum:instantiate()
self.sliderNum.setColor(self, 220, 180, 1, .7)
self.sliderNum.borderColor = {r=1, g=1, b=1, a=0}
self.sliderNum.backgroundColor = {r=0, g=0, b=0, a=0.2}
self.sliderNum.highlightBackgroundColor = {r=1, g=1, b=1, a=0.1}
self:addChild(self.sliderNum)]]
--Create a label for the slider
self.sliderLabel = ISLabel:new(self.width / 2, 20, 20, "Light Intensity", 180, 140, 1, .9, UIFont.Dialogue)
self.sliderLabel:initialise()
self.sliderLabel:instantiate()
self.sliderLabel.setColor(self.sliderLabel, 180, 140, 1, .7)
self.sliderLabel.borderColor = {r=40, g=20, b=1, a=0.5}
self.sliderLabel.backgroundColor = {r=0, g=0, b=0, a=0.7}
self:addChild(self.sliderLabel)
-- Create the slider
self.slider = ISSliderPanel:new(10, self.sliderLabel:getBottom() + 10, newSliderWidth, 20, self, value)
self.slider:initialise()
self.slider:instantiate()
self.slider.sliderBorderColor = {r=80, g=40, b=1, a=0.5}
self.slider.sliderMouseOverColor = {r=160, g=120, b=1, a=0.5}
self.slider.sliderColor = {r=20, g=10, b=1, a=0.9}
self.slider.sliderDim = {r=10, g=10, b=1, a=0.8}
self.slider.sliderBarColor = {r=0, g=100, b=0, a=0.8}
self.slider.sliderBarDim = {r=240, g=200, b=1, a=0.7}
self.slider.sliderBarBorderColor = {r=100, g=60, b=1, a=0.5}
self.slider.setValues(self.slider, 3, 30, 1, 3)
self:addChild(self.slider)
local value = self.slider:getValue() or 15
local buttonWidth, buttonHeight = 60, 30
local applyButtonX = self.slider:getRight() - 5 - buttonWidth
local applyButtonY = self.slider:getBottom() + 15
local closeButtonX = self.slider:getX() + 5
local closeButtonY = self.slider:getBottom() + 15
-- Create the "Apply" button
self.applyButton = ISButton:new(applyButtonX, applyButtonY, buttonWidth, buttonHeight, "", self, NipSwitchUI.onClickApply)
self.applyButton:initialise()
self.applyButton:instantiate()
self.applyButton.borderColor = {r=80, g=40, b=0, a=0}
self.applyButton.backgroundColor = {r=10, g=10, b=10, a=0}
self.applyButton.highlightBackgroundColor = {r=1, g=120, b=1, a=0.5}
self.applyButton.highlightBorderColor = {r=240, g=200, b=1, a=0.5}
self:addChild(self.applyButton)
-- Create the "Apply" label
self.applyLabel = ISLabel:new(applyButtonX, applyButtonY, 20, "Apply")
self.applyLabel:initialise()
self.applyLabel:instantiate()
self.applyLabel.setColor(self, 120, 80, 5)
self.applyLabel.center = true
self.applyLabel.backgroundColor = {r=0, g=0, b=0, a=.3}
self:addChild(self.applyLabel)
-- Create the "Close" button
self.closeButton = ISButton:new(closeButtonX, closeButtonY, buttonWidth, buttonHeight, "", self, NipSwitchUI.onClickClose)
self.closeButton:initialise()
self.closeButton:instantiate()
self.closeButton.borderColor = {r=80, g=40, b=0, a=0}
self.closeButton.backgroundColor = {r=10, g=10, b=10, a=0}
self.closeButton.highlightBackgroundColor = {r=1, g=120, b=1, a=0.5}
self.closeButton.highlightBorderColor = {r=240, g=200, b=1, a=0.5}
self:addChild(self.closeButton)
-- Create the "Close" label
self.closeLabel = ISLabel:new(closeButtonX, closeButtonY, 20, "Close")
self.closeLabel:initialise()
self.closeLabel:instantiate()
self.closeLabel.setColor(self, 120, 80, 5)
self.closeLabel.center = true
self.closeLabel.backgroundColor = {r=0, g=0, b=0, a=.3}
self:addChild(self.closeLabel)
end
im not smart enough to figure out how to get the slider value to update the label on the fly though
that was were i fell asleep last night ๐
i'm trying to have it update the label above it and also use that value to apply the value to the onClickApply function so i can update the light radius properties
using prerender for my drawing
and yes im overlaying a label on top of an invisible button for a tiny but more customization that i couldnt find in the ISButton class
if you get a chance to look over it even slightly and have any critique. I am totally open. all good if not, but i do want to do this the right way. some options i will move to the constructor and call from here also but for now this seems best for testing each customization
you have to tie into the window's render
and call the slider's getCurrentValue/setCurentValue
for the slider UI yeah
lol saved me a huge headache
I use it for the split cash UI
in general i find labels wasteful
a whole uielement instance for just rendering text
i couldnt figure out how to change the text color though
simpler to add a drawtext in the render function
and this menu will only be open for like 10 seconds at time ever
okay
ill check it out. i def like doing things that make more sense
i can just tap into the UIFont also for that i assume?
we do not have the same definition of entertaining... i do agree on the time consuming part ๐
wdym tap into UIFont?
but i'm learning some good stuff here
for specifying which font to use?
you can just ommit and it defaults to Small
im almost at the point of renewing my devxepress license just to finish the damn GUI for the app faster....
damn i forgot how time consuming and boring this is...
ahaha maybe after 300 more hours ill get bored
it's how many hours i got into learning mapping before i decided it made more sense to learn to code to achieve my goals here
i actually got closer to 500 in mapping and tile properties

the boring bit is that im coding all the aspect of the layout customization for the app... so you place whatever you want wherever you want with the size you want
done the snap into place bit...
usually i dont do the GUI work on any of the projects i work...
so i forgot how tedious it is...
that was a rushed release to stop the dms ๐
lolol
the real work isnt even at 10%
i managed to improve the app performance in the meantime... so i guess thats a win
oh hell yea
plus @sour island gave me the idea to make my app "universal"
so if anyone else wants to use it for their own mods, that will be possible and easy to do
not easy to develop though...
to many unkown vars to deal with... and no matter how user friendly ill make it... nothing is 100% "dummie" proof
Tried this but it still doesnt work :I
Im guessing devs did something that made SwingSound no longer work on throwables?
i've noticed there is ISVehicleMenu.showRadialMenuOutside for outside and ISVehicleMenu.showRadialMenu for both inside and outside, but no such thing as ISVehicleMenu.showRadialMenuInside for only inside. Is the function name different?
What's this script for, making items in media/script ?
Parsing them into API objects yes.
I'm currently in the process of mapping them with context and not generic string arrays.
Hi! Is it possible for you to share your code?
Been struggling myself for creating unique ID (passport item with predefined values of a character name) for a player.
inventoryItems :getID() should already be unique
