#mod_development
1 messages ยท Page 44 of 1
i'm looking through this mod at the moment to see any signs it could break something
Mm, kind of hard if you can't repro it yourself. Ideally, you could see both server and client logs to verify the server command was or wasn't sent and the client-side did or didn't pick up the command
i have asked him for server logs before, but it seems pretty clear that the client is the issue
i don't see any sign in the other mod that it would break this one, and certainly not permanently
it might be the save file... there is some weird stuff going on there
something i noticed early on is that every container has an extra item in it that is literally just nil, i have no idea what that's about
Could that extra item be the โstore ledgerโ item I used on the container to turn it into a store?
if that was it it'd happen on my end too, and it would've caused errors the whole time, definitely just something weird that's happened in your save
Hmm. Hopefully the next go around we can prevent the save from being corrupted in this way.
Utils.getNumberOfClients = function()
local onlinePlayers = getOnlinePlayers()
if not onlinePlayers then
-- onlinePlayers is nil in singleplayer
return 0
end
local onlineIDs = {}
for i = 0, onlinePlayers:size() - 1 do
local player = onlinePlayers:get(i)
table.insert(onlineIDs, player:getOnlineID())
end
table.sort(onlineIDs)
local numClients = 0
local nextClientsPlayerID = 0
for i, id in ipairs(onlineIDs) do
if id >= nextClientsPlayerID then
numClients = numClients + 1
nextClientsPlayerID = math.floor((id + 4) / 4) * 4
end
end
return numClients
end
the way i ended up doing it was storing to the item's moddata the original values i needed to keep track of when the user opens the edit item menu

an ugly way could be creating an item of it's type, copying it from that, then deleting said item but that felt too excessive and prone to ||unforseen consequences like the item not getting deleted in time/tidily||
@undone elbow Sorry to bug you, but is there any way to push a settings change to Mod Options without entering the options menu and have that change actually appear in the menu?
I tried :set on the gameOption in one of the options objects that we get back from .options_data, but the options screen checkboxes were unaffected, so not sure if I did it wrong or it's just not possible
If anyones interested Iโm currently working on a Project zomboid Roleplay server that contains no zombie lore and is purely player to player interaction. Thereโs tons of custom systems and ui I have planned and need help implementing them. If youโre interested in joining the team let me know! Weโve got a large discord server with tons of members to give feedback. I also plan on creating a board of where we are now and where we need to be in terms of creating new mods. Also you will most likely have to work with others to help integrate each otherโs systems and make them work together. I will share a brief and bare sheet containing the planned systems or systems we currently have in place. I will also be providing a separate server duplicate to the beta the players play on. This server will be accessible to all devs working on this project and you will be free to test your mods with our current mods before testing it on the main server
And of course Iโd be buying you coffee if you joined my team and helped us on this journey ๐
lmao your crew is gonna need a hell of a lot of coffee @trail lotus
hehe well that works for me
What was the purpose of it all?
Some of the mods has cross over
Like UI and database
I bet sir nolan can do the npc part of this
if a player death, his ModData is reset?
Fair question id like to know too
No idea. Maybe it is copied over to the IsoZombie? ๐
I imagine a new character is a new object, ya
I can test it, but well I just ask here to save a little of time
Or maybe its just there but wont have anything to do with the player that respawns
Why theres no modder streaming while doing mod? Cuz it ruins concentration? Hehe
Id like to watch u guys in action
I can't imagine watching somebody coding, lol
AuthenticPeach stream modding on twitch
I don't even like watching myself coding
Well not twitch but on a room where its direct and people help out too oreveryone doing own work but is just there streaming for social reasons
Anyone has snippets for moddata?
been doing it in the Unofficial PZ Mapping discord lately
its about mapping ?
mainly, but I don't do mapping there (personally not a fan of doing map modding)
ok ๐ ill watch sometime when i see you thnx for the heads up
getting the original values for setting the loot rarity of an item back to it's lowest (basegame default) tier
Can anyone direct me to the mod that provides a live minimap of all active zombies within the vicinity as they move about?
theres already something like that
that's a basegame debug mode feature
right click -> ui -> zombie population i believe
ZombiePopulationWindow.OnOpenPanel();
Ohhh, alright. Saw it in a vid, figured it might've been a mod.
do this when you are on debug @drifting ore using lua console
or what buffy said .. hehe
ow wow this edits the distrib?
this is amazing
no need to edit distribution, it happens when a client finds an item
takes the item they view and rolls the chance of it being a certain tier
can apply to any item from any mod
in my use case it applies to weapons via
if item:getModData()['_itemTier'] == nil then
if instanceof(item, "HandWeapon") then
--etc
yeah but it overwrites how distrib does things right? makes it easier for non modder admins
it negates distribution entirely
in 41.78
extremely interested to see what people will do with that
aw then what if you have an item that you dont want to spawn entirely ,. if you install this mod will it spawn by dfault or what
ah cool
it's an in-house mod for my rp server
I need some help, when I try this in debug it works (set to 0, never find Burned Houses). But when I play I still find burned houses.
for i=1,getWorld():getRandomizedBuildingList():size() do
local story = getWorld():getRandomizedBuildingList():get(i-1)
if instanceof(story,"RBBurnt") then
print("test fires 2: story chance",SandboxRandomChance[SandboxVars.WorldOnFire.RBBurnt])
story:setChance(SandboxRandomChance[SandboxVars.WorldOnFire.RBBurnt])
break
end
end
i want to browse your modlist :P
oh it's not public?
it doesn't tie into anything (yet) 
itssssssssssssssssssssssssssssss theres a collectionnnnnnnnnnnn ill dm you one sec

Sorry if I'm asking obvous but I just was not able to find it.
I would like to create a mod wich makes a new generator type.
This should be a 3 tile structure wich increased distance and fuel-capacity.
I just don't know where to start when it comes to modding.
Coding is no problem, I can learn that but I think this Idea is mostly copy and paste, the only problem is I don't know where to start and I can't find a proper guide for this idea
@chilly flint 3 tile structure? how do you place it, is it part of map?
part of the map
they just made moveable tiles worked earlier i think
don't need that, i want them to stay where they are for now
I just need a proper interduction wich I was not able to find. I'm just better when somebody tells me what to do
generators by themselves have a set range, can't edit that. You'll have to do some manual wizardry.
at this point I just want to get this Idea work. The how's can be adjusted later
The steam powered generator, replaces the movable with an IsoGenerator when you place it. This solar battery bank needs more sprites and places a generator on top of moveable.
wow you know all about this @fast galleon
I started updating ISA for my SP and ended up with most of Lua made by me.
You can make it so that when an object with your sprite is first loaded something happens.
generators have a fixed range? that sucks
at least i get to find out before i actually work on anything though
sure but I don't know how to start at all if it comes to creating and uploading mod. I just know where stuff is located in the files
A generator rework was mentioned some time ago, adding support for different types.
is it possible to spawn a sprite or model on screen that isn't a vehicle/item/moveable? For example a balloon that just floats up for a bit before disappearing?
it is
check my script on my mod
it actually lets you pick whatever sprite
you can just pick from a custoim tile you do
can you animate/move it when its on screen?
its possible but i havent done anything that animates. but the concept for that is just destroying the sprite and create another 1
just dont know how to make it so that its simultaneous
is this tied to a particular cell or is it a free moving entity?
hmmm i think its tied to a cell but you can try to move it it might work if you setXYZ i havent really tried
ok, well I'll have a look, thank you
#mod_development message
dislaik was adding arrows or smth
dislaik is always up to some crazy stuff
but now that I think on it EHE adds indicators pointing towards the helicopter which I don't think are vanilla, that may be a possible route as well
๐ค somehow this will work
Ok, when player dies, just create a new IsoPlayer
I mean, ModData disappear
Does anyone know if you can set the fps limit for a specific UI?
get the UI FPS and then set a counter?
I suppose you could skip frames or count frames/time when rendering a specific UI window to achieve that
I think, I mean, no need to interact with mp
sorry I did my question poorly, you can set UI FPS on game options, but I would like to set an upper limit
if doUpdate then ...
another function sets doUpdate as true or just some condition when it needs to update
ah
I think that option does it
so... im trying to so If Panic = Panic 25-100 == true then chancemod = chancemod + 4;
but i need someone to help me
as if i write it wrong slightly it will break the whole thing or simply not work with conastant little errors on bottom right
Can you explain what condition you are trying to express in words? I don't understand what's meant by that code
PLEASE i have been editing for over 6 days, my head hurtsm if anyone is feeling kinda PLEASE vc me & ill share my screen, i need a human to talk to
Can you just paste the code or screenshot?
thx guys, This what I was searching getCore():setOptionUIRenderFPS(fpsTable[box.selected]) (I think I can see the difference between 30 and 60 fps lol, it looks good)
dude, wow. that looks amazing ๐ฎ Will it be a released mod? if so, when? ๐ฅ ๐ฏ
yeah, it's a waypoint mod, but I think it will take a while, I'm working on 4 other mods
fantastic. i am hyped for this. ๐
Y'all... there has to be a way. There just has to be. I must update the gd Options menu when my mod options get set. Anyone here an expert on the settings menu, especially how to toggle a redraw of the Mod Options page?
yeah went to the vc with him and ended up giving him this
if panic >= 50 then
basechance = basechance + 1 ;
elseif panic >= 25 then
basechance = basechance + 2 ;
end
turns out hios already being helped bysomeone else so i left
lol this is weird, why require on server side always load client side, isn't this supposed to work like this?
Oh I see lol, it sucks that works like that <#mod_development message>
anybody has an idea of an easy way to make a custom tile like a door unbreakable by Z, i tried with the tiledefinitions but with no luck so far ๐ฆ
or like set the maxhp of that tile to super high?
Hm.. As I remember, there is no API for that. Ofc it's possible in general.
Wait
:set should work
Well I kind of ran out of energy after who knows how many hours updating 3 mods, lol, but if I get back to it I'll try to find a manual way. I ended up just leaving it up to players to reset defaults my having them click a toggle.
Why you need this?
For me, :set works just fine if I do it from within your onUpdate(), but not outside of it.
Someone has loaded a mod of mine into a large population server and they would like to push new defaults to the players who have saved settings already @undone elbow
I was clientside, I don't know if that matters.
But yeah multiple times I verified that neither :set nor changing the action option in MyStuff.mod.options affected the appearance of the tickboxes in Options.
Although both worked
They both changed the setting
I think it also should work in OnApply
Right, but I need it to work when the player loads into the game.
I was hoping to force the settings change at the request of the host.
As I said, I gave them a solid ass workaround, but still
settings:loadFile()
options.myoption = true -- default
Well, I'm not sure why you need this feature OUTSIDE of the mod (i.e. if the ModOptions is disabled?)
No I need to fire it outside of the main menu
Mod Options is enabled
I need to fire it without the user's confirmation
try this then)
What exactly is settings? Is that the variable that goes into the instantiate call or whatever you called it? (Afk for a minute)
loadFile - loads options from file,
then you may overwrite the values
settings is the main instance of ModOptions and also it's settings of your mod
And loadFile refreshes the Main Menu Options screens?
Or at least refreshes Mod Options screen?
loadFile() makes so it won't load later on load for your mod.
You mean if I load from file it will not overwrite what I load with saved user settings?
That's the goal here. I can change the settings already. Only their appearance in the menu is the problem.
They change, but they LOOK unchanged
Incorrectly
I'll answer in 50 min, a bit busy now
U should get some rest man
I just finished so much modgress successfully
I want to play now @ancient grail lmao
I'm pretty sure I haven't played this stupid game in hundreds of hours
i havent played it in months lol
have a good one
anyone uses a tool for making their UI?
@thick karma ```lua
-- These are the default options.
local OPTIONS = {
box1 = true,
box2 = true,
reset_deafults = false,
}
-- Connecting the options to the menu, so user can change and save them.
if ModOptions and ModOptions.getInstance then
local settings = ModOptions:getInstance(OPTIONS, "MyDebugMod", "Debug Mod")
local reset_deafults = settings:getData("reset_deafults")
function reset_deafults:onUpdate(val)
if val ~= true then
return
end
settings:getData("box1"):set(true)
settings:getData("box2"):set(true)
settings:getData("reset_deafults"):set(false)
end
end```
(implementing the way 1)
hey everyone
i had a mod i was making
and i stopped making i got busy with other stuff
and then i got sick(still am haha)
today i tried doing more stuff for the mod but nothing works
at this point i literally had one script change
the file is the same
and everything
if anyone could help i would really appreciate it
whatcha working on?
a mod about stakes
for now i had it so stakes are made with planks
3 stakes
btw how do you do that different looking text for coding
module UppingTheStakes
{
imports {
Base
}
recipe Make Stake
{
Plank,
keep [Recipe.GetItemTypes.SharpKnife]/MeatCleaver,
Result:Stake=3,
Time:80.0,
Category:Survivalist,
OnGiveXP:Recipe.OnGiveXP.WoodWork5,
Override:true,
}
}
i had this is the files
it was on the folder the game says the mods will be in
@ancient grailshould i maybe remove it from the other mod folder?
ah i remember this
the one in the steam files
How can i get a permission
permission ? you have to be more clear sir
like there are 2 zomboid folders
one separate from steam
and one on the steam folder
the users?
Wdym clear?
should i remove it from the steam folder?
are you just asking where to put your files to upload to steam?
imean permission for what?
no no no i mean is the fact that i put them on the 2 folders the thing that makes the mod not work
i really dont understand what your saying ๐คช
can you be more specific as what did you put to what exact folder
i put the script file for my mod on the users zomboid folder
SteamLibrary\steamapps\common\ProjectZomboid\mods
i mean this
the steam one
Users\kopv1\Zomboid\mods
this is the users one
this is the steam one i was talking about
ye and put them there
dont have to put it on the steam
but should i remove them from the steam one
yes
What do u mean ?
the mod still doesn't work
Do u see modtemplate on the workshopfolder of the users folder
Use that put your script there properly and learn the pz file structure in regards to modding
whats writtien on the mod info
the name and the description
which is?
you have to keep the id blank
did you put anything on the id
the workshop is going to give you the id number once you upload it
name=Upping the Stakes
description=Mod centered around making stakes a more practical weapon to use, including improved accessibility and quality of life/realism improvements.
Included changes:
Making stakes able to be crafted with wooden planks. 3 in fact.
Making stakes able to be repaired(not that useful but just makes sense). Half the requirements of a spear.
Making stakes have a carpentry boosted maintnence stat.
name=Upping the Stakes
description=Mod centered around making stakes a more practical weapon to use, including improved accessibility and quality of life/realism improvements.
description=Included changes:
description=Making stakes able to be crafted with wooden planks. 3 in fact.
description=Making stakes able to be repaired(not that useful but just makes sense). Half the requirements of a spear.
description=Making stakes have a carpentry boosted maintnence stat.
id=
poster=poster.png
The defaults are hardcoded by mod author.
"Someone" who uses the mod is not the author, so they can't change the defaults.
But if it's a fork they may just change the options names.
local OPTIONS = {
box1_new = true,
box2_new = true,
}```
Old options (with old names) will remain in the file but won't be used. The new options will get their defaults before first change by client.
still doesn't work
i replaced the folder with that
*file
should i have a image named poster on the same folder
so it uses that image
have you activated the mod? maybe you didnt activate it?
Users\kopv1\Zomboid\Workshop\ModTemplate\Contents\mods\ModTemplate\media
here do it here
just put it there make a script folder and activate modtemplate
dont modify anything else
ok ok
still doesn't work
ok it works
@ancient grailthanks
just weird how this is the only way for it to work
even tho it used to work completely fine
thats not it theres something wrong with your file structure or modinfo .. the template ensured less human error
guys, is there any mod out there that make our character can't be killed? still get fatally injured but not get killed...
anyone know a good build for the More Traits mod?
That's quite cool
i think there is .. just forgot the name...
ahh searched it for ya https://steamcommunity.com/sharedfiles/filedetails/?id=2710074485
havent personally tried it tho
@ancient grailhey dude
btw
i was messing with the files and i got my mod to appear in the mod option in the game
with the description and the correct name for the mod
but when i click to enable the mod
nothing happens
it doesn't turn green and doesn't say enabled
Thanks chaps
idk man
can we use gif as mod poster
it wont get enabled if theres something wrong with the code or a file thats not supposed to be in it
or perhaps a missing }
and you only have one file right
while naming it what i wanted and putting my image
you should put it on a folder named scripts
ye i did that
i deleted the maps folder and put it on the scripts folder
C:\Users\kopv1\Zomboid\Workshop\upping the stakes\Contents\mods\upping the stakes\media\scripts
the script file didn't change
it never changed
and it worked when i just put the scrip folder in the mod template
module UppingTheStakes
{
imports {
Base
}
recipe Make Stake
{
Plank,
keep [Recipe.GetItemTypes.SharpKnife]/MeatCleaver,
Result:Stake=3,
Time:80.0,
Category:Survivalist,
OnGiveXP:Recipe.OnGiveXP.WoodWork5,
Override:true,
}
}
@ancient grailbut just in case i got something wrong
Just make it base since its baseitems
the category?
Remove the override whats that for. Havent seen that
The module UppingTheStakes
No reason to do this
Youre not creating an item anyways ๐
ok ok
module base
{
imports {
Base
}
recipe Make Stake
{
Plank,
keep [Recipe.GetItemTypes.SharpKnife]/MeatCleaver,
Result:Stake=3,
Time:80.0,
Category:Survivalist,
OnGiveXP:Recipe.OnGiveXP.WoodWork5,
}
so this?
Thats why
Ehhh?! Woah really? Nah it doesnt allow multiple result
Can anyone vouch for it?
Or am i the only one who didnt know that was possible?
I had to use OnCreate
And added lua files with additems
Lol
But if it worked for you then whats the problem then ?
that's the thing idk
the weird part is that the mod worked perfectly
Cool then youve done the mod ๐ congrats
it just suddently stopped working
Yeah i dont have a clue on that one sorry
๐ซก
Im making a mod to add recipes and an item but somehow when i click the craft menu it brings me to this page
anyone knows if you can have multiple animations in a recipe? for example first Blowtorch animation followed by hammering?
it means you got error
can you send the recipe?
it could be a simple thing like a typo
or forgetting a comma
might need make time based stuff ... dunno how to start with that.. goodluck tho thats a good code to have and will make lots of stuff look realistic if done properly
Yeah im kinda working on a "craft everything" mod
stuff like more builds as example is cool and all but sucks for MP servers
its broken and unbalanced and lots of lazy coding
and the menu bloat is insane
so i am shifting all of that to the actual crafting menu
this is all i have that involves what you want to do
getPlayer():playEmote("Build");
getPlayer():playEmote("BlowTorch");
getPlayer():playEmote("BlowTorchMid");
getPlayer():playEmote("BlowTorchFloor");
getPlayer():playEmote("Craft");
Yeh some players can use the metalcounter to farm exp and metalsheet
Craft it with planks
Then disassemble
i see
would you know how to chain them?
like
lets say time =1200
and every 200 it changes the animation
thats kinda the plan i have
but honestly finishing the recipes rn before i add that
I really dont but if u dig deep enough i believe tyrir posted something that lets u que action
i see i will have a look at that
Not 100% if it was him tho
will figure it out eventually
just want to have some nice immersive animations
since i mainly make this mod for the rp server i run rn
and immersive animations/recipes are like one of the best things for that
Awsome pls do share if u manage to pull it off . It will add extra flair to any mod
yeah will 100% share it
i wish it was as easy in the recipes to like
time=200
animation xyz
time 300
animation xyz
๐
might be easier tbh to just create new animations by chaining them together
but allowing to queue them properly would make it easier to be applied to other mods
and to customize
Yeh kinda does make you wonder why its not
yeah TIS prolly never expected a bunch of RP servers to pop up that really value immersion in every small thing ๐
Yeah you could make it like evolverecipe ithink or is it that one for like wall structure levels
U just need lots of tile for that tho
Like imagine building a table
Where the first part would be puting the objs on the ground with looting animation
Then swtting it up with hammer animation and a tile that shows the legs not yet attached
Then screwing them
Would have to just repeat it with every table lol sounds like lots of pain tho
Mod idea (if someone hasnโt said this yet Iโd be surprised)
Vault over counters in buildings like Knox bank and the ice cream shop to quickly get away from zeds (especially when you play sprinter zombies!)
Hi, do we have any documentation about the context menu ? I wanna add an option on a item in the right click menu
Thx
I can't find information on the forums/google
you can use OnFillWorldObjectContextMenu event, it show when menu context appears
local onFillWorldObjectContextMenu = function(player, context, worldObjects, test)
--TODO
end
Events.OnFillWorldObjectContextMenu.Add(onFillWorldObjectContextMenu)
my mod is done but i just need one last thing.. when i added an item on the ground how do i refresh so that it apears? i tried the
ISInventoryPage.renderDirty = true;
but it didnt show
theres already something like this
finally Non-global environments
local ENV = require 'DislaikLib/ENV';
local EVENTS = require 'DislaikLib/Events';
local _ENV = {};
ENV.Add(_ENV, EVENTS);
Test() --> THIS IS A TESTITO XD
print("FDISLAIK START")
print(Test) --> nil
ENV and EVENTS are local modules
https://steamcommunity.com/sharedfiles/filedetails/?id=2882228912
done for the day
Damn! This looks very nice!
hello ya all its me again, and i come here looking for help (again)
last time MX allowed me to check his code how to make pills usable, and its great
but i can't script pills to remove food poisoning efects
PILLCore.init = function ()
local player = getSpecificPlayer(0)
end
PILLCore.applyMedication = function ()
player:getBodyDamage():setFoodSicknessLevel(player:getBodyDamage():getFoodSicknessLevel() + 20)
player:Say("I feel bit better")
end
this is my code for now
it "works" if command for food sickness works
@weak sierra I whipped up some sandbox options for named lit ๐
Hi. First time making a mod, and I'm having a bit of mare of it, and any help would be very appreciated. I'm trying to mod in a few firearms, of which the base functionality is working fine after a lot of trial and error. I am now trying to get attachments working for these guns - currently the base game red dot sight. While the attachment is now in the right place - the model is somehow inverted, with only the back of the model displaying - with the camera facing side of the mode see through. The model is however perfect when placed, but having this inverted issue when equipped. I can show screenshots/ code where required - but for the attachments, I've been simply using the -debug mode attachment editor system. Thank you for reading
anyone at least knows a what type food poisoning is?
is it body damage
do i need to create custom lua file to be able to affect it?
What weapon are you making, and on what weapon are you basing?
I am making a 2 handed SMG and i am basing it upon the AssaultRifle/ M16
did you use the same item script for that?

Yeah, a modified M16 script in effect
Can you send images of the issue?
Sure
Im not sure how well it will come on in screenshots
You can see the back glass peice though the side
If i get the M16 to show as a comparison, you can see the issue
On the proper M16, the sight is rendered correctly, so the front facing side is correct, as you can see the glass sight on the red dot is such that you can only see the front, not the back piece at the angle, unlike the modded weapon
your issue is that the model is rotated.
attachment reddot
{
offset = 0.0000 0.0850 -0.0480,
rotate = 0.0000 0.0000 0.0000,
use this in your media/scripts/(yourSMGname).txt
and rotate the attachment with x y z
back to square one - gotta love modding eh
Thank you though
Ive been such on this for a few hours
i'll DM you the .txt of a firearm i'm making and you can see the general format
Thank you!
Anyone knows if there are a function like getCurrentNameMod or something like that?
Any know of an NPC mods for multiplayer servers?
What do you mean?
(deleted, found it, was looking in the wrong part of the code)
Am I correct in guessing that if I want to modify a mod, then I can just set the original mod (TheyKnew) as a dependency and it will load my mod (Shenanigans) after the original one, allowing my mod to overwrite parts of the original mod?
I think so because I set something as a dependency and had a lua file with the same name and it prevented the original one from running.
Okay cool
load order requires load order if ur overriding files, dependency setting won't ensure order
in SP perhaps that will work
but on a dedicated server u shud make sure to include instructions
all dep ensures is that it loads the other mod
is there anywhere i can look for a proper 'getting started' modding tutorial?
the wiki and such are quite outdated it seems
pick apart an existing mod instead is generally the answer you'll get around here
but there are some less out-of-date tutorials around
check pins maybe
dang, that sucks
ill have a look around on youtube and see if i can find anything helpful
i looked through the pins already and the wiki link is outdated and not helpful :c
also doesnt help im new to lua but i can grasp it
well im not entirely looking for specifics, you know?
i was more so looking for a "getting started" kind of thing
just the basics of getting one goin
that varies by mod type
the way u hook in is different depending on the task
u can add items without ever writing a line of lua
etc
there IS specifics but i didnt think it was needed, my apologies
currently im looking for a way to detect when the player consumes food/drink/whatever else
a while back i found "ISEatFoodAction" but with the latest update to the game that suddenly broke the mod and i just ignored it until now lol
u would probably wanna find the code that handles that in the PZ lua files and then hook the relevant function by setting a var to it, then overwriting it and calling that var inside
ah
well something akin to that still exists im sure but i dont know off the top of my head
where would i look for PZs lua files?
i can find it on my own just didnt know where to look ig
in the media folder in the game dir
/home/evelyn/.steam/steam/steamapps/common/ProjectZomboid/media/
linux but
im sure u can figure out waht that means for windows :P
mhm
im super duper new to lua so i wanted to learn it via playing around with PZ modding
Awesome. Thank you, I will give this a shot!
i made a mod but it doesn not show up in the game, its in the porper PZ mod files list inside a folder with a random numbers like the other form workshop
how do i gte my mod to be shown in the game?
If you gave it random numbers then I think maybe you made a mistake and did something like this: \zomboid\mods\1234567890\contents\mods\yourmod\media instead of \zomboid\mods\yourmod\media.
anyone know a way to disable collision on a tile object like stairs or a cabinet in-game?
trying to find a way to have it so i can set objects to be nocollided dynamically
does anyone enjoy helping noobs mod PZ lua code in NotePad++, i request help! if you would like to chat & help me out a bit in Voice chat contact me any time, i have been streaming every day for 8+h trying to overhaul the game to be as realistic as possible but im not as skilled at some of the rest of you, so what takes me 2 hours might take you 30s
I wonder if it's possible to have a fake controller... Seems like Java side isn't exposed, but a lot of it is Lua side in JoyPadSetup.
anyone had problems uploading a mod to the workshop?
i made a mod and i wanted to upload it and it worked
but bcs i thought the only way to update it was to delete the mod from the workshop and upload it again i deleted it
You'll need to remove its ID I believe, from the workshop.txt file
That's my guess at least, it tries to update a mod that doesn't exist
Last person that asked that here wasn't able to find a way to restore a deleted workshop item. They just uploaded it as a new mod (by deleting the id as diakon said, giving you the option to upload it as a new workshop item)
Hello, is it possible to โpushโ a playerโs character? Iโm thinking about how human body would be sent flying on impact with a high velocity vehicle
Iโm not asking for a code, just if itโs theoretically possible
Well... You can shove a player in PvP to my knowledge
There's also a mod that lets you jump out if a moving vehicle, and you tumble out of it when you do
What are the best gun mods
did william tell you you can ask me anything about it? dont have much time to code but answering questions is simple
it also seems like you dont understand whats going on
everything should be local
you can access the variables from other files (like a global) by doing a module which is that return thingy at the end
Any good Tank Mods?
Like
A good, working one, wich isnt a WW2 one, for the current Version?
I might be misunderstanding what I've seen on YT, but is it possible to switch zombies back to being sprites?
I was looking into trying to insert custom sprites for a replacement/new unit thing
quality issues aside, it's mostly to toy around with it
The main reason Zombies were switched to 3d was performance, somehow they can render more of them 3d models than sprites. Also, lets them be more dynamic...
I very much doubt it would be easy, compatible, ir performant
I think the main reason was just scalability of animations / visuals
If 3D models were somehow more efficient then bodies wouldn't be flattened into sprites on death
Speaking of which, 3D ragdoll corpses would be neat
Yeees. I want my zombie to collapse at my feet in despair, not reload as it hits the ground and randomly turn itself 50 degrees to one side
I want the zombie to go barrel rolling to one side when my bat kills them in standing position
The two positions are because of the animations they use I think
I wonder if it would be difficult to add more
Is there a way to disable seasons? ๐ค
I doubt theyd go for true Ragdolls, but I imagine they could have them ragdoll in some third party simulator and export those out
Imagine the corpse piles.... Add collision and you could literally block yourself in while making a stand.
From what I recall I think they're changing the weather system to be more localized - but if cryowinter is any indication, Yes.
Oh I forgot about cryowinter!
Thank you
I'm preparing myself to make a Zomboid Total conversion mod, that turns the game into SCP-3008
(SCP-3008 : The Infinite IKEA)
That'd be pretty neat
I kind of wanted to take a shot at procedurally generated stuff
Are you going down that rabbit hole?
No no thank you, I still like having some degree of sanity
I'm planning in making a single massive map that repeats itself
if possible, as big as the vanilla map
Repeated by hand?
I'm planning in using tile zed to make the template and then repeat it manually, but I want to see if I can make a tool to do it for me
But I need to learn how to make maps first,
cause I usually do only code
I wonder if it would be possible to have the game generate entire regions based on a template
Like just keep stacking more of the same map over
I was thinking that it could be done, since we have the brush tool and the brush tool can add and remove tiles 
Maybe we can make a full lua generator 
That'd be pretty neat
I thought the interior cars mod was doing that
But I think they're using predone areas off to the side
That's my assumption too, but I haven't looked into it
Basements should be generated as per the blog
I wonder if that's going to be expanded to the homes based on a lot to lot basis
๐ค
Unless I woefully misread the recent blogs, basements are procedurally generated
I assume they meant even the map/furniture and not just loot
Oh, that's quite cool
I could swear they had a really really old blog about mapping tools that basically filled a room/house automatically based on parameters
Like youd slap down an empty house, make room size changes, hit a button and it would populate it
Then you could tweak it as needed

tbh ngl bet fr fr no cap innit
custom triggerevent
--- client.lua
local onKeyStartPressed = function(key)
local source = getPlayer(); if not source then return end
if key == Keyboard.KEY_NUMPAD0 then
TriggerServerEvent("ClientToServer:Example", "TESTITO")
end
if key == Keyboard.KEY_NUMPAD1 then
end
end
Events.OnKeyStartPressed.Add(onKeyStartPressed);
---server.lua
RegisterEvent("ClientToServer:Example", function(source, asd)
print(source)
print(asd)
end)
probably need a send command in between
It already has, but I won't release it until I have my library ready
also, they are made in a non-global environment, so those functions are not propagated in other files
for some reason i was under the impression that requiring a file would create a local copy, not a reference to a global object๐คฆbut i just tested it and that is not the case at all... i thought doing things that way would make a mod difficult to patch
more importantly, in retrospect i feel that message was a little condescending towards you, i apologise
thanks for the offer of help, but it doesn't seem like the issue we're facing is likely much to do with the behaviour of the player shops mod, it's probably some strange mod conflict or something like that, so there isn't much i can think to ask you; i will keep that in mind though!
here you go
if you want to take it to an extreme you could also locally override the global space
the mechanism behind a module is when the file gets parsed and executed the final return statement gets stored. from there any require statement for that file returns that stored variable
i knew what requiring did, but i didn't know that altering the variable in one file that requires it would affect it in other files that require it - i thought it was just a local copy
i'll definitely be making use of that in the future, thanks for that!
and remember kids globals were a mistake ๐ back to work
is the "Robomats Modding Tutorials" post still relevant for modern pz modding?
is this broken code for effecting the player negatively if i add a negative
also how would i make this a thing where its a random chance to trip
i want the player to have negative effects such as dropping weapons & tripping when under extreme stress & many other overhauls (PS) i dislike more traits mod version that does similar things
How do I make tooltips appear for world menu with my fake controller ๐
which button is it
Good news! The workshop.txt editor is going good!
I did some testing with reanimated players (as zombies). I think (really not sure) if I check if the zombie is reanimated on server side (first occurence of this zombie in onZombieUpdate event) and send a command to the client, the client doesn't necessarily already know the zombie ID. Can anyone confirm that?
I have tried sending zombie references between client server and it has failed. :/
๐
I don't expect refernces to work... Because they can't be the same over network... (client/server)
Zombies should have something to match network ID
Worst case scenario you can have the sound play to the same xyz
If they're out of sync that's another issue entirely
Added Avatars to Superb Survivors quest dialogue windows:
That's neat
I would suggest cropping it to the face and zooming in
This is done with the hairstyle UI tweak mod
I use the OnlineID for client/server stuff. But if I didn't tested wrong. My command was already on the client which didn't found the ID.
As I think about it maybe the zombie wasn't in the cell of my player... So I didn't find it.
Could someone help? I want to include a recipe for cooking 10 Base.Grapes for 20 minutes in a Pan and the result should be Base.Sugar. However it should remove 1 Base.Paper from the inventory (for the packaging).
Hmm, in that case the xyz of the zombie could be transmitted instead
Well, it's finally time to say good bye to poor in-game editor for the workshop.txt
I got all the steam BB code covered ๐ช
I'll release this as soon as I'm done with the debugging ๐
I also thought about this. Or probably send a args-table with args.zid, args.x etc...
@hearty dew your mod desc for misc patches doesnt talk about the item tweaker thing, so i didn't even know that was there to try, but i have an extensively modded server so perf increases/time saving is very wanted. i read the code but it's made of lua wizardry and i have no idea what it's doing, mind kinda.. explaining wtf is going on in summary so i have some idea what i'd be putting on my server? xD
i can see u intercept the tweakitem stuff and prevent other instances through metatable dark magic
but what's the performance improvement approach
I want to make a project zomboid mod but I have no skill
It would be cool to make this in pz, a welding machine on a trailer
and then a new animation for welding that looks more realistic
like this
I'm just thinking
and using the trailer machine can make stronger barricades/fences etc
Regarding the perf improvement of tweak item, it reduced the tweakitem api OnGameBoot time from 44sec to around 0.5 sec with the mods I play with. The bulk of that improvement was inserting all the print lines into an array, then at the end doing print(table.concat(printoutput, "\n").
The rest of it was shenanigans to deal with all the ways different mods did their own implementations/copies/modifications of the tweakitem api in order to hook them all into my implementation to minimize the boot time.
If there's something more specific you're curious about, I'd be glad to explain more.
It only improves the game boot time. Not sure how important that is if you have a server running that doesn't get rebooted often though.
my god really, their print statements?
are print statements that performance-eating?
:|
prints are crazy expensive
it's very important because they run on clients too
so it means server boot time and client load-in time is huge
Uh, then the other patches are for miscellaneous bugs/things I didn't like in other mod. I'd have to go dig through them to remember, heh. There was one graphical rendering issue with two mods that conflicted that added a map icon size slider and extra map icons I think
yeah i dont use the slider mod because of that issue
:P
sounds like overwriting the print function to buffer it and spit them out once every N might yield a net gain in server performance eh?
and client
Yea, so it was like 40s to print 8000 lines (each of the tweaked items). Something like that, I don't recall exactly. But with that mod enabled, it will print out the # of items and time it took to run the function to do all the DoParam calls
Yea, that's likely
I never noticed much log output serverside, but I only run with my two test clients ๐
Then that might be worth doing
certain mods that don't need to be, too
yeah
thanks for the insight on that..
do i need to know any metatable-fu to do that or can i overwrite a base function with typical approaches?
i have never touched a metatable really
Is there a way to set which body parts are protected by a clothing using a Custom BodyLocation ?
PrintBuffer = PrintBuffer or {}
PrintCount = PrintCount or 0
PrintEvery = PrintEvery or 100
local original_print = print
function print(...)
PrintCount = PrintCount + 1
local printParams = {...}
if #printParams == 0 then return end
local line = tostring(table.remove(printParams, 1))
for i = 1, #printParams do
line = " "..tostring(printParams[i]) -- I can't remember the format print() uses for multiple args atm
end
table.insert(PrintBuffer, line)
if PrintCount % PrintEvery == 0 then
original_print(table.concat(PrintBuffer, "\n"))
PrintBuffer = {}
end
end
Something like that, idk. :p Gotta head off to go eat so getting impatient ๐
tostring would make it not error out in some places were default print would. Not sure if that's something that concerns you
To just override print, it's no different that the others
my god i look away and u just write the whole thing pretty much
was thinking every N time rather than lines
print uses something different than tostring, I'm sure, but probably not an issue
wonder which is better
every N time will prevent too much wait to see lines when things are slow
hell maybe could throttle on both
if >100 lines or >5 seconds then dump
Oh, can use the that debounce api for that
i have heard the term debounce but have no idea what it means :)
.
im one of those "i taught myself everything i dont know terms" programmers
Basically means it will wait 5 seconds (or whatever you set) after the last print to print everything. If during that 5 seconds another print comes along, it will reset to 5 seconds again
that sounds like the opposite of what i want, though yet another option
In other words, buffers everything until X time has passed with no prints
i'd wanna ensure no more than X passes without letting things print rather than ensuring it doesn't until a gap
lol
quite the opposite
anyone here have interest in joining the modding team for my server, btw? could really use others to help with all this shit i make, rn i'm doing wayyyyy too much of the work alone
the list grows faster than i can do the things
Ah. Just use the regular interval timer that debounce uses. It's in that same link
I'm sorry, how do I get scite to use lua?
Suggestion for any modders out there looking for an idea for a project. I'm wondering if anyone is interested in working on a mod that adds concrete walls?? I was thinking that players could build (zombie) indestructible walls but they require a lot of concrete powder and maybe a metal frame? The material cost would be high to prevent spamming but would allow players to build permanent defenses in vanilla. Visually, the walls would be thick like log walls. Possibly half-walls could also be included. Concrete walls could be demolished with a sledgehammer of course.
I can make textures and such but I don't have enough experience to do most of the core lua stuff. I'm mostly just throwing the idea out there to see if anyone wants the idea and offering to help with what I can. Seems like the idea isn't really on the workshop outside of Soul Filcher's Building Time but that includes a bunch of other content.
I think I got it nvrmd
here is a video of the first complete new quest for superb survivors in case anyone wants to see but cant/dontwantto play it out yet
https://youtu.be/VUyrY6bUfzg
This video shows the full hilltop survivors rescue quest. which is the first ever quest included in surperb survivors!
I cut out some of the driving but otherwise "full"
lemmie know in the comments if you wanna see more quests!
... are you doing this in a different programming language?
hello I am on the wiki learning how to mod but it wants me to use pipewrench for project zomboid which is typescript. do I have to learn another programming language?
I just learnt basic lua
you only need lua, pipewrench is just for people who want to use typescript
ye, no point in learning a whole new language unless you really want to
everything can be done in lua
ok i'll go on to the next section of the wiki
my head is spinning https://github.com/Konijima/PZ-Libraries
I don't understand this ๐ข
that one teaches you how to decompile the java in Intellij, so that you can read the java source code if you'd like
its not strictly necessary, although it helps
ok thanks
I want to create a vehicle mod so I will go onto that section of the wiki
this has been my best resource for learning,
https://github.com/FWolfe/Zomboid-Modding-Guide
ok now I just have to learn how to use blender
to make the models? ya probably, haven't gotten that far myself, haha
- The ItemTweaker patches described above. It does a number of things to route different mods copies/duplicates of the ItemTweaker code into one place so they all benefit from the performance improvement.
- Reduces the weight of a number of base items that seemed too high to me e.g. changing a pen's weight from 0.1 kg to 0.01 kg.
- ModOption options to configure ClothingBoxRedux loot rarity. By default the value is unchanged (factor of 1.0).
- ModOption option to change chance of Attached Weapons to zombies. Felt it was too high, so I change it from 6% to 3% personally, but by default with no configuration, it remains at 6%.
- Loads a SnakeUtilPack file earlier in the lua load order because it override a tooltip function that several other mods decorate. That should fix tooltip compatibility issues between snake's mods and the others that modify that tooltip function (can't recall them atm).
- Fixes the MapSymbolSizeSlider incompatibility with that other map icon mod described earlier.
- Patch for an minor exception that occurred in the Basements mod when right-clicking on a placed radio.
aren't mod options client-side and thus a really weird prospect for a dedicated server?
for stuff like that
Didn't put much effort into writing it all up properly. Someone else wanted to use the itemtweaker improvements, so I put it on steam with a little info. I wasn't really expecting any others to use it beyond that
what aspects of modding will I need to make a character use a tool for a timed action? I assume blender first
It is awkward, but if you copy the mod options config from a client to server, it will load those settings on the server. The mod options config file is in the Lua directory in the cache dir and needs to be copied to the server's Lua directory in its cache dir in order for the mod options will take effect. Obvious caveats of clients having different settings do apply though
if I want to creat the tool
Believe it is Zomboid/Lua/mod-options.txt
what is the point of fileGuidTable.xml which u can see in some mods? what will happen if this file is missing?
Also, the reason I used mod options was because the other options don't load the configured values early enough. A number of those patches have to be applied when shared/ lua files are loaded. Sandbox options aren't available until later
how do you get a zombies tile location
Nolan is already on v43 ๐
Tyrir, which mod are we currently talking about? tried scrolling up, but maybe I'm just blind
This one, Misc Patches
It contains misc patches ๐
it really is just called "Misc Patches", huh... (โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
but thank you for further enabling my mod hoarding
Yep. It's my hodgepodge of patches. Only tossed it up on steam bc someone wanted the itemtweaker perf improvements from it so it's named confusingly and what it does isn't made clear in the description :p
Similar to Eve, our server runs virtually every mod under the sun.
I made some vehicle spawn related mod, but it's still being ironed out
might yeet it on here for some quick "ooh, aah" testing before I release it into the wild
Maybe but what's the server like what mods they'd better fit my objectively correct definition of dank or something oh no in the time between typing this and scrolling to the bottom I lost significant interest
lmao
check here for info about the server: https://discord.com/channels/136501320340209664/1026684756873715742
I feel like one of the mods we're using is having an insane memory leak (yay 32gb use of ram), any moderately simple way of checking which one it is, other than turning stuff on and off?
Hmmm I don't actually feel like playing Project Zomboid much soon actually... maybe not...
that's probably the fastest way, cuz the other way is to read the code of each mod and look for one :p
im unaware of any tool that would break things down for you..
yeah... feared as much
our server runs approx the same amount as yours so you can probably tell the pain I feel 
there might be some lua magic that can be done to hook all the functions at once and get stats on them but i wouldn't know
yup :|
Transmog 2.0, Eggons sharpen your blades, ammo smelting and fixing the laggy crafting menu + everything has a name comes + rename containers comes to mind
but hmm.
Is there a way to get all SoundNames which are from the same directory? For example if I have media/sound/colletion1/file1,file2, ... I want them in a table/list so I can later choose one of them.
Or maybe there are better ways to do that...
I remember seeing in code that sounds conceptually contain sound clips. I wondered if that meant that you can have different clips that can be selected from one sound entry. Idk if this is relevant or could help your situation though, more of a pondering ramble :p
Looks like they to stuff like this:
GameSound var1 = GameSounds.getSound("Helicopter");
if (var1 != null && !var1.clips.isEmpty()) {
if (inst == 0L) {
GameSoundClip var2 = var1.getRandomClip();
technically what I want I just don't know if I can create them by myself... I investigate further into the code ๐
brrrr
You can script sounds, including multiple clip{} under the same sound makes it a random selection
Cool. Is there a documentation or tutorial of this?
Not that I know of - but if you dig in the java you can see all the parameters for sounds
module Base {
sound icecreamAlarm {
category = Vehicle, loop = true,
clip { file = media/sound/vehicle_cream1.ogg, distanceMin = 10, distanceMax = 20, reverbFactor = 0.1,} }
sound icecreamWall {
category = Vehicle, loop = true,
clip { file = media/sound/vehicle_cream2.ogg, distanceMin = 10, distanceMax = 20, reverbFactor = 0.1, } }
sound icecreamYelp {
category = Vehicle, loop = true,
clip { file = media/sound/vehicle_cream3.ogg, distanceMin = 10, distanceMax = 20, reverbFactor = 0.1, } }
sound IceCreamFlyBy {
category = EHE: Main, loop = true, is3D = true,
clip { file = media/sound/vehicle_cream1.ogg, distanceMax = 500, volume = 2.0, reverbFactor = 0.1, }
clip { file = media/sound/vehicle_cream2.ogg, distanceMax = 500, volume = 2.0, reverbFactor = 0.1, }
clip { file = media/sound/vehicle_cream3.ogg, distanceMax = 500, volume = 2.0, reverbFactor = 0.1, }
clip { file = media/sound/vehicle_cream4.ogg, distanceMax = 500, volume = 2.0, reverbFactor = 0.1, } }
}
goes in scripts folder
same scripting format as the other types of scripts
although I think the inclusion of {} inside of others is unique to sounds
also doesnt take , for clips
I completely forgot about the script folder... This should help. Thanks.
sound {
if ("category".equals(var7))
} else if ("is3D".equals(var7))
} else if ("loop".equals(var7))
} else if ("master".equals(var7))
} else if ("maxInstancesPerEmitter".equals(var7))
clip {
if ("distanceMax".equals(var6))
} else if ("distanceMin".equals(var6))
} else if ("event".equals(var6))
} else if ("file".equals(var6))
} else if ("pitch".equals(var6))
} else if ("volume".equals(var6))
} else if ("reverbFactor".equals(var6))
} else if ("reverbMaxRange".equals(var6))
pulled from the java
maxInstancesPerEmitter hmm - this would be useful
from which class is this?
zombie/scripting/objects/GameSoundScript.java
Thx. I'll try this. The script files seems to be exactly what I need.
zomboid wins this time >:(
Hey y'all, I have a quick question!
I want to make a wallet that holds money found in-game. Is it fine to edit the existing wallet item to do this, or is it best practice to create a separate item and allow the player to craft the new item using the base item I'd want to use in the first place?
Also, is it possible to restrict the kinds of items a bag can hold? In this case, money and credit cards?
I don't know if its better to change or create a new wallet. I still have to test this. But to filter the items I use this:
SoulMod.ItemFilter = function(inventoryContainer, inventoryItem)
local scriptItem = inventoryItem:getScriptItem()
local category = scriptItem:getDisplayCategory()
if category == "Ammo" then
return true
end
end
and apply it to the items AcceptItemFunction
item:DoParam("AcceptItemFunction = SoulMod.ItemFilter"); -- in lua
or
AcceptItemFunction = SoulMod.ItemFilter -- in items.txt
its notepad ++
what is the best program to use to edit or make mods for PZ?
notepad++ is good, but you should switch your theme to something darker to avoid getting blind ๐
Is it correct that I can't access public variables on exposed classes?
public final class GameSound {
public String name;
public String category = "General";
public boolean loop = false;
public boolean is3D = true;
public final ArrayList clips = new ArrayList();
I'm interested in the clips in this case...
I'm not familiar with this but if there's no get method, you can probably use this.
#mod_development message
Thx. I'll check this...
Is there any event for player after he killed another survivor? Just like "OnZombieDead" triggered after he kill zombie?
How I get the IsoPlayer for the killer?
Btw, Is there a way for us to store data permanently in the player? The data should not be lost even if the player comes out of the game and returns.
ive been looking for something like this website for forever. just gotted started on modding
thank you kindly sir
on zombie dead doesn't have the killer either..
there will be update that adds event when players hit each other
omg after lootzed breaks something, you need to restart the save in order for your own script to fill container to work.
I mean, Can I do this?
function PlayerKilled(deadPlayer)
local killer = getPlayer()
killer:Say('I KILL SOMEONE!')
end
end
Events.OnZombieDead.Add(PlayedKilled)```
sure why not, as long as it's not split screen with more than 1 players
I am gonna using this script on multiplayer btw, Is that gonna be problem?
I think the client script only run by the client that trigger the event? not every client that connected to the server, right?
Ok question: if I wanted to make a mod that allowed you to ring church bells, how complex would that be? Would it just be like a timed action and maybe some mapping stuff for the rope?
is it possible to hack the map discovery by editing the user files? or does that have to match the servers file too?
fairly easy . you just need to add the audio for the churchbell and just basic scripting i juess
Alright thank you
I think it will trigger for all people in the area where the death occurs.
Hi, maybe you have the answer :
How i can identify an item through an item kahlua table, but not with his name ? How can i find the module.item value ?
i found the answer by myself !
local item = itemTable[1].items[1]; print(item); print(item:getModule()); print(item:getName());
I think it would be zombies
Although you can print the items of that list to see what class it js
Hey, how to get SteamID from serverside lua?
ArrayList<IsoMovingObject>
Ty ty
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoPlayer
I'd try that
Tyrir, regarding my attempts yesterday, is there absolutely no way of finding out what is hogging ram?
Someone mentioned debug mode to me but I genuinely have no idea
Ahh thank you, btw is there any function to get steam owner id?
I've been tryingto remove mods and get back to square 1 but so far I've not been able to tell what the problem is
What is a steam owner?
The way to do that would be to run the java process in a java memory profiler of some sort. I'm unfamiliar with those sort of performance tools for java though, but that's where I'd start. I'd then try to connect the dots from those java objects using large amounts of memory to where they fit into kahlua or into other pz objects (e.g. memory leaks causes by large textures that indie stone devs have warned about). Hopefully there'd be enough context to infer what mod is the source of the issue.
So It's the steam that owning PZ, and you play using another steam via family sharing, I can see it show SteamID and Owner ID or something on pz database
Probably will use the profiler to start java, so likely would involve editing your server startup script to start the profiler and pass java and its args as params
Oh, I'm unsure about that the two ids in that scenario
Ahh okay, thanks btw
Hey all, I'm new here and I was wondering if there is a guide or any tips on making some additionally towns/locations - I plan on having a mess around with the aim of making a unique town/village at some stage
Mapping would be a suited channel for this @molten cobalt
Apologies will do
so i'm lookin to add in new sounds for custom explosive items. i've got it working well enough, but if i walk a considerable distance away from it, there is no explosive sound. i'm guessing it might be something to do with distant sounds? since the vanilla explosives have two sounds, the close up and the distant one. right now i cant seem to figure out a way to define the distant sound with my own, if that is possible
the example (loud volume warning)
I'm also working on sound stuff at the moment. I could solve the distance problem by setting up a proper sound.txt file in the script folder. for example my current sound I'm testing:
sound ZombieDemonScream
{
category = ZombieScreams, is3D = true,
clip
{
file = media/sound/ZombieDemonScream.ogg,
distanceMin = 10,
distanceMax = 120,
reverbFactor = 0.1,
volume = 0.9,
}
}
hope this helps...
oh alright! i'll work with it, thanks
let me know if it works ๐
It does! Thanks!
Hows your mod @blissful salmon
I'm still working on some conceptual problems. I think I have my zombie sound stuff in an ok working state. Now I mess again with the zombie modData stuff. I'm still a little confused and do some testing atm.
CraftingOverTime like reading a book seems to work. Just need some code clean up.
So all in all I'm a little slow but things start getting to work ๐
You could have the zombie update stuff stay in client/ and just send out a serverCommand to play a sound from the xyz
So you don't actually need a zombie reference
You can also set an attraction event which is also refered to as sound but isn't actually audible
So I have this partly working Mod Options function that is driving me insane and I am wondering if anyone of you brilliant heroes can help me make another little breakthrough...
function resetServerDefaults:onUpdate(value)
local varsOfTheZed = SandboxVars.DawnOfTheZed
if value and varsOfTheZed then
gamepadShortcut:set(varsOfTheZed.gamepadShortcut)
hideNames:set(varsOfTheZed.hideAllPlayerNames)
hideByDefault:set(varsOfTheZed.hideUserInterfaceByDefault)
hideMouseCursor:set(varsOfTheZed.hideMouseCursor)
keepMyHotbar:set(varsOfTheZed.keepMyHotbar)
keepMoodles:set(varsOfTheZed.keepMoodles)
keepMiniMap:set(varsOfTheZed.keepMiniMap)
keepButtonPrompts:set(varsOfTheZed.keepButtonPrompts)
if hideHaloNotes then hideHaloNotes:set(varsOfTheZed.hideHaloNotesIfPossible) end
if varsOfTheZed.toggleBehaviorOnMap == DOTZ.sandboxAutomaticCursor then
autoShowCursorOnMapOpen:set(true)
closeMapOnHide:set(false)
shortcutActivatesCursorOnMap:set(false)
elseif varsOfTheZed.toggleBehaviorOnMap == DOTZ.sandboxShortcutClosesMap then
autoShowCursorOnMapOpen:set(false)
closeMapOnHide:set(true)
shortcutActivatesCursorOnMap:set(false)
elseif varsOfTheZed.toggleBehaviorOnMap == DOTZ.sandboxShortcutActivatesCursor then
autoShowCursorOnMapOpen:set(false)
closeMapOnHide:set(false)
shortcutActivatesCursorOnMap:set(true)
else -- varsOfTheZed.toggleBehaviorOnMap.option4
autoShowCursorOnMapOpen:set(false)
closeMapOnHide:set(false)
shortcutActivatesCursorOnMap:set(false)
end
end
end
So this function mostly (kindasorta) works, except for one very important detail. When I grab SandboxVars.DawnOfTheDead, it doesn't grab the options as they appear live in Change Sandbox Options, and it doesn't grab the options as they have been set in the .lua config file either. It grabs the sandbox options as they were when the server was first created. Can someone help me understand why, and for bonus appreciation help me adjust it so that I'm tracking the sandbox variables from the server's config file, in the same place something like Change Mod Options sets them?
In fact, when I change Sandbox Variables with Change Mod Options, it doesn't even update SandboxVars in the actual game... what gives?
I just printed something set to false in the lua AND in Mod Options, and it printed true, which was its state which I created the server.
So confusing!
sandbox not being in sync is known and old issue
someone else can contribute more to your solution but i just wanted to put that out there lol
Thank you for telling me that Yule
That is helpful because it makes me feel less insane
I've been banging my head on the table about this for awhile
yeah that's just how it is
"Is there a way to sync them manually?" becomes a potential follow-up question.
it can depend on mods or your server host. if you are hosting locally i dont know much as ive only hosted via dedicated
there is, let me find it
โค๏ธ
I try to keep it all server side. What me currently confuses if I add modData to a self created zombie, I can't find it after server restart. Also no other zombie seems to have the new modData. But my resurrected player zombie always keeps the modData. So I try to figure out the difference...
This is how I spawn the zombie serverside:
function SoulMod.server.commands.SpawnZombie(player, args)
if args and args.X and args.Y and args.OutfitName then
local zombies = addZombiesInOutfit(args.X + 6, args.Y - 6, 0, 1, args.OutfitName, 100)
local zombie = zombies:get(0)
local modData = zombie:getModData()
local zombieData = {}
local zombieID = SoulMod.shared.getZombieId(zombie)
zombieData.WalkType = "sprint1"
zombieData.CanWalk = false
zombieData["ZID"] = zombieID
modData["SoulMod"] = zombieData
zombie:transmitModData() -- relict because I do everything serverside and send the soundCommand to the client.
SoulMod.server.ApplyModDataSettings(modData, zombie) -- function which sets the walktype etc. for the zombie
zombie:transmitCompleteItemToClients()
local x, y, z = zombie:getX(), zombie:getY(), zombie:getZ();
local zombieId = SoulMod.shared.getZombieId(zombie)
local args = {}
args.zid = zombieId
args.x = x
args.y = y
args.z = z
args.screamName = "ZombieDemonScream"
SoulMod.server.SendCommandToClient("DoZombieScream", args)
end
end
Everything works as expected only the modData is lost on restart. So I can't reapply the settings.
so i got a queston what is iType? is it name or category or something else?
where is it defined
(of an item)
getSandboxOptions().load() was thrown around as a way to do this
omfg I hope it's so easy
I also have some mods installed which don't save their options but other do. Is this just a general bug? I haven't checkt this so far...
It's getSandboxOptions():load(), but... it doesn't work ๐ญ
Wait...
lmfao
It does the opposite of what I want @bronze yoke
So instead of loading up the Change Sandbox Options version or the lua version, it actually pushes the server's saved Sandbox options into Change Sandbox Options again!
i.e., it just overwrites the changes I'm trying to make live with the server's birth settings
Ahhhhhhhhhhhhhhhh
loses mind
oops, well it was thrown around specifically as a way to load them early, so that makes sense
are you hosting it yourself or is this a server?
I am doing this update for someone else
they cannot just remake their world
To get the defaults they want
For any new server, my technique is fine
For any existing server, it fails
only reason i ask is where the files are
I am hosting r.n.
a copy of the server
they're in Zomboid/Server or something iirc
have you tried changing the actual file in server folder?
and not ingame
sometimes this fixes desync
one of the issues i observed was installing a mod that added to sandboxvars, then the mod being uninstalled, but their lines still being in sandboxvars, so it stopped syncing altogether until the entire file was reset
I have edited that file manually multiple times... 3 things sync: server_SandboxVars.lua, the actual settings menu for editing your server settings (before hosting a game), and the settings displayed in Change Sandbox Options all sync up. But the in-game variable known as SandboxVars.yourModName does not get updated after the server already exists. @gaunt meteor
I wonder... if I just deleted the SandboxVars.myModName variable when I quit the server, would it automatically make a new one when I join again using the defaults? Or just bug out eternally because it did not expect that to ever happen?
sigh
Does anybody know if I have to create a kahlua table here (see post from above):
local zombieData = {}
Or should it work if I just add a normal table to the modData (like I did)?
i think that would default it
So I know I asked this before, but sadly the issue remains - despite the help, many thanks to @jade chasm for your help, even if we couldn't get the issue resolved. I am trying create a small firearms mod and when I add a base game attachment to the modded firearm, the attachment model is rotated 180. I can see through the front of the attachment model with the back of the model being rendered. Regardless of how I attempt to rotate the Attachment, this error persists, with the front of the model facing away from the player in effect. I believe the issue is with the model I am using, as when replaced with a base game model, the attachment model is correct, however i have no what the issue with the model is, nor how to fix it. Any help would be greatly appreciated. Thanks
Image above shows the issue
The workshop.txt editor is finally complete! ๐ (only works on chrome/edge)
Now I can finally take a break from PZ modding/toolmaking
Wow this deserve to be inducted on the pz wiki tools link
Congrats man
It may be that the isreanimated zombie let's the system know to save that zombies data
Hmm... Maybe... but it would be kind of strange because the modData is on the IsoObject.
The thing about that is save() is different per object
For the most part most objects save modData
But most objects are also pretty stationary
Yes, I saw many if's... I make some tests...
Hmm, alright. I'll attempt it. Thanks a lot
Zombies only save health, location, outfitId, and a few other things
Application live ๐ https://mxswat.github.io/pz-description-editor/
Sauce ๐ : https://github.com/mxswat/pz-description-editor
โ ๏ธ Limitations :
- Only works on Chrome, Edge and chromium browsers
- Malformed BBCode will break the app
- No Bullet list preview because of some issues with the [*] BBCode
Example of malformed BBCode:
[img=http://projectzomboid.com/images/MODS_03.png]
Use instead: -> [img] http://projectzomboid.com/images/MODS_03.png [/img]
Tips: CTRL+O and CTRL+S To quick open and quick save
I think this will make 10x easier editing the workshop file, and hopefully it will make it easier to have better looking workshop descriptions ๐
This seems to be true... I changed the bool manually and now the data is saved...
Thanks dude
I'll check the flags. If this is the only one or if there's one that I can abuse...
Are there any resources for adding/creating modded animations?
I didn't find out where the modData is "Lost". As far that I can see its the this.table on the IsoObject. But I couldn't even find out if it's not saved or not loaded (or maybe overwritten somewhere). It's to confusing to me with a decompiled class...
Hey all ๐ ๐ Brand new here and I was wondering if I could get some help with a simple patch I want to make between two mods. I wan't Arsenal weapon attachments to work with the fallout weapon pack. Does anyone know of a patch for one that exists already I could reverse engineer? I code but have no idea where to start on PZ stuff.
I tried to just copy the mod, make a few edits to the ID, and add the weapon to the attachment list in the GunFighter_Weapon_Parts.txt file. But then all my guns/parts broke in solo, the icons were all the question mark one, and none would attach anymore.. Thanks for the help all! ๐
Hey, is there a Mod out there that makes the Voicechat with Radios on MP Server sound like...well...Radio Chat? And not like the Person is standing next to you. Like, a bit static.
anyone ever see this before? a few items, now two in two different mods, do this to me but not others
some failure of tooltip rendering
i run the game on proton under linux
self.item:DoTooltip(self.tooltip);
that line..
gonna try this to see if it suppresses it```lua
local original = ISToolTipInv.render
function ISTooltipInv:render()
if self.item ~= nil then
original(self)
end
end```
tho i'd rather know WHY it's happening
:P
Could it be named lit?
nah happens even when that's not runnin
lol
i reproduced this with cheatmenu and mod manager and th mod in question
You were able to widdle down the mod?
and similar problem happens to only me on my server without those two mods running for clothesbox's waterproof overalls
yeah
it's the mod that has the item
:p
What mod?
in this case the MAS-36 gun in the Chiiku Arms mod
clothesbox's waterproof overalls also does it
Only that item?
Could be something to do with the script that is calling something
{
DisplayCategory = Weapon,
DisplayName = MAS-36,
Icon = MAS36,
WeaponSprite = MAS36,
Weight = 3.0,
AmmoType = Base.762Bullets,
AmmoBox = Base.762Box,
MaxAmmo = 5,
RecoilDelay = 40,
ReloadTime = 35,
AimingTime = 20,
MinRange = 0.61,
MaxRange = 13,
MinAngle = 0.965,
DoorDamage = 25,
MinDamage = 2.4,
MaxDamage = 2.6,
StopPower = 2,
PiercingBullets = TRUE,
KnockdownMod = 5,
PushBackMod = 0.4,
CriticalChance = 30,
CritDmgMultiplier = 10,
AimingPerkCritModifier = 15,
HitChance = 60,
AimingPerkHitChanceModifier = 15,
AimingPerkMinAngleModifier = 0.01,
AimingPerkRangeModifier = 3,
SoundVolume = 90,
SoundRadius = 110,
SwingSound = mas36shot,
BreakSound = MSR700Break,
InsertAmmoSound = MSR700InsertAmmo,
EjectAmmoSound = MSR700EjectAmmo,
RackSound = mas36rack,
BringToBearSound = MSR700BringToBear,
HitSound = BulletHitBody,
ClickSound = MSR700Jam,
EquipSound = MSR700Equip,
UnequipSound = MSR700UnEquip,
InsertAmmoStartSound = MSR700InsertAmmoStart,
InsertAmmoStopSound = MSR700InsertAmmoStop,
EjectAmmoStartSound = MSR700EjectAmmoStart,
EjectAmmoStopSound = MSR700EjectAmmoStop,
ShellFallSound = MSR700CartridgeFall,
Type = Weapon,
SubCategory = Firearm,
IsAimedFirearm = TRUE,
UseEndurance = FALSE,
ConditionMax = 20,
JamGunChance = 0.25,
Ranged = TRUE,
MetalValue = 45,
SwingTime = 0.5,
MinimumSwingTime = 0.5,
ToHitModifier = 1.5,
SwingAmountBeforeImpact = 0,
MultipleHitConditionAffected = FALSE,
SplatSize = 3,
SplatNumber = 3,
SplatBloodOnNoDeath = TRUE,
ImpactSound = null,
NPCSoundBoost = 1.5,
SoundGain = 2,
SwingAnim = Rifle,
RunAnim = Run_Weapon2,
IdleAnim = Idle_Weapon2,
ShareDamage = FALSE,
MaxHitCount = 1,
KnockBackOnNoDeath = TRUE,
ProjectileCount = 1,
ConditionLowerChanceOneIn = 210,
TwoHandWeapon = TRUE,
RackAfterShoot = TRUE,
RequiresEquippedBothHands = TRUE,
WeaponReloadType = boltactionnomag,
AttachmentType = Rifle,
ModelWeaponPart = x8Scope x8Scope scope scope,
}```
there's the script for that item
at zombie.inventory.types.HandWeapon.DoTooltip(HandWeapon.java:317)
at zombie.inventory.InventoryItem.DoTooltip(InventoryItem.java:607)
... 45 more```
that's the tail of it
so it looks liek it's failing to get the display name
the display name has random spaces/tabs in the start of it
but it says it's cuz CreateItem(String) is null
not cuz the display name is problem
public final class InventoryItemFactory {
public static InventoryItem CreateItem(String var0) {
return CreateItem(var0, 1.0F);
}```
mm
public static InventoryItem CreateItem(String var0, float var1) {
return CreateItem(var0, var1, true);
}
public static InventoryItem CreateItem(String var0, float var1, boolean var2) {
InventoryItem var3 = null;
Item var4 = null;
boolean var5 = false;
String var6 = null;
try {
if (var0.startsWith("Moveables.") && !var0.equalsIgnoreCase("Moveables.Moveable")) {
String[] var7 = var0.split("\\.");
var6 = var7[1];
var5 = true;
var0 = "Moveables.Moveable";
}
var4 = ScriptManager.instance.FindItem(var0, var2);
} catch (Exception var8) {
DebugLog.log("couldn't find item " + var0);
}
if (var4 == null) {
return null;
} else {
var3 = var4.InstanceItem((String)null);
if (GameClient.bClient && (Core.getInstance().getPoisonousBerry() == null || Core.getInstance().getPoisonousBerry().isEmpty())) {
Core.getInstance().setPoisonousBerry(GameClient.poisonousBerry);
}
if (GameClient.bClient && (Core.getInstance().getPoisonousMushroom() == null || Core.getInstance().getPoisonousMushroom().isEmpty())) {
Core.getInstance().setPoisonousMushroom(GameClient.poisonousMushroom);
}
if (var0.equals(Core.getInstance().getPoisonousBerry())) {
((Food)var3).Poison = true;
((Food)var3).setPoisonLevelForRecipe(1);
((Food)var3).setPoisonDetectionLevel(1);
((Food)var3).setPoisonPower(5);
((Food)var3).setUseForPoison((new Float(Math.abs(((Food)var3).getHungChange()) * 100.0F)).intValue());
}
if (var0.equals(Core.getInstance().getPoisonousMushroom())) {
((Food)var3).Poison = true;
((Food)var3).setPoisonLevelForRecipe(2);
((Food)var3).setPoisonDetectionLevel(2);
((Food)var3).setPoisonPower(10);
((Food)var3).setUseForPoison((new Float(Math.abs(((Food)var3).getHungChange()) * 100.0F)).intValue());
}
var3.id = Rand.Next(2146250223) + 1233423;
if (var3 instanceof Drainable) {
((Drainable)var3).setUsedDelta(var1);
}
if (var5) {
var3.type = var6;
var3.fullType = var3.module + "." + var6;
if (var3 instanceof Moveable && !((Moveable)var3).ReadFromWorldSprite(var6) && var3 instanceof Radio) {
DebugLog.log("InventoryItemFactory -> Radio item = " + (var0 != null ? var0 : "unknown"));
}
}
return var3;
}
}```
so this is the method that's somehow failing
DebugLog.log("couldn't find item " + var0);
since that doesnt show
it's not that.

so i guess this must be null?
var3 = var4.InstanceItem((String)null);```
where
var4 = ScriptManager.instance.FindItem(var0, var2);
so either var4 is null or InstanceItem is null
presumably?
I have a problem which i am struggeling with since 2 days. i have a method called fetchSandboxVars which is called on the server side if not isServer() then return end; in the Events.OnServerStarted event handler.
that is basically everything that is part of the mod, except the sandbox-options.txt. However when i start my server with the mod the servertest_SandboxVars.lua gets cleared, and the mod specific entries get deleted. and then obviously my fetchSandboxVars function reports an exception, that my SandboxVars... calls return null on a non-table.
Anyone knows why this chicken, egg problem happens?
ah ur making the thing that forces those to load early? been planning to do that too
dunno.
is OnServerStarted prior to normal sandbox var loading?
they don't load until relatively late in the process
and now that im re-reading it doesnt look like ur triggering them to
InstanceItem branches off by item type
if it's a weapon it runs this
which means literally any field could make this fail eh
You could try comparing it to a vanilla weapon
There's alot of fields I've never seen before
It could be a left over field that's triggering old code in the tooltip
Or worse yet, a missing field
author claims it doesn't do it to them on other servers
so it's either something finnicky with proton/linux
or something else weirdly specific..
int var4 = this.thumpDmg;
int var5;
if (var3 >= var4) {
var5 = 1 * ThumpState.getFastForwardDamageMultiplier();
this.Health -= var5;
} else {
this.partialThumpDmg += (float)var3 / (float)var4 * (float)ThumpState.getFastForwardDamageMultiplier();
if ((int)this.partialThumpDmg > 0) {
var5 = (int)this.partialThumpDmg;
this.Health -= var5;
this.partialThumpDmg -= (float)var5;
}
}
I've had too much java today, what's the best to set thumpDmg here for small health loss, is 666 good
java modding, eh?
or are u just poking at it
most decent damage to a thumpable is like 20-25 for guns hitting doors iirc
so 666 is massive
if what u mean is "high health so it doesn't care" then u want like 10k or something
if what u mean is "low damage so it doesn't do much" u want like 1-2
unclear which way u were talkin about
Just poking to see what I need to do make certain work. I want my object to break very slowly, so that players don't have to worry too much about it when first finding it.
Are you using any other mods at all?
for this test just cheat menu, mod manager, and the mod in question
Hi! if you find smth on this pls share with me) I'm trying to do animations with Fragmotion+blender with blender source tools as found here https://docs.google.com/document/d/1jTx34yyClwSq7JiR_TagUuNexlA3ljcNxdbDtse6sXQ
Now I'm stuck on animations being "pile of character" in game))
eHow to import pz animations into blender. REQUIREMENTS FRAGMOTION: Fragmosoft - 3d animation, modeling, sprites, games BLENDER: (I hope you already have this.) BLENDER SOURCE TOOLS: Blender Source Tools - Valve Developer Community (valvesoftware.com) Step One: Import the animation you ...
yeah, setting high thumpDmg made object super durable.
In contrast, objects you place get the maximum damage possible, thumpDmg is set at 1
Anyone knows how to trigger a "Container visual update"? I got a function that forces the respawn of items on a container, however if , for example, a bookshelf was empty before, it doesnt update the shelf with the books
Its MP, if it matters
Dedicated server, to be more specific
getContainerOverlays():updateContainerOverlaysSprite(isoObject)
Is there a mod that makes crawlers not able to break fences so I can just chill with the 2 fence between 1 crate glitch?
I have been struggeling 2 days with this. Tried every possible solution on earth. And now because i felt not hope, I just changed the Mod Id to something shorter.... NOW it works? Can that be? Or am I delusional? ModId before was GpzEvents_AlwaysPlayerRank and now for the test was yyy
OnServerStarted might be too soon to access sandboxvars.. If memory serves, they aren't populated until after all lua scripts are loaded and the world is near done loading. That said, why they'd get cleared is unclear atm. If the mod is that small, maybe could upload it here and I could have a look at it later today to figure out what's happening
@hearty dew has the id (modid) in the mod.info a max length, you know about? Could that be a thing?
Because with the shorter id the mod is behaving completely different
Heello!
Any clue on why this stopped working to force the player to sleep? ๐ค
ISWorldObjectContextMenu.onSleepWalkToComplete(player:getPlayerNum(), nil)
Probably stopped working since the last patch as I remember this was working some weeks ago
or maybe some cache was cleared or is no longer taking place, by changing the mod id. however i always created a new dedicated server to test.
Looking into distributions/item spawning, what's a number that almost makes it 100% it spawns in that container? Want my magazine to spawn in bookstores
20? :p
honestly if you set it to anything >=1 it's pretty common
though number of books and loot limit
there's a lot of competition there
Thanks!
Not to my knowledge, but that's possible, yea
Anyone know if it is possible to make a radio function in ranges outside of the typically allowed ones? Like~ <0.2mhz or >1000mhz
Have been trying, just limited success so far
and by that- I mean I havent gotten it to work at all... lmfao
Hello all. Super niche question does anyone know how to get the id for an entry in the ZombiesZoneDefinition.Default table? I am trying to remove a zombie that is added by another mod
any mods that change UI?
Hey is there a drive through gates mod? I just saw there is a run through doors and gates mod where it auto open/closes for you when you run through.
Where can I find the lua for these?
OnCreate:Recipe.OnCreate.DismantleRadio
I'm looking in the PZ source folder
Went into LUA/ but not sure where to go from here lol
recipecode.lua
function Recipe.OnCreate.DismantleRadioHAM(items, result, player, selectedItem)
local success = 50 + (player:getPerkLevel(Perks.Electricity)*5);
if ZombRand(0,100)<success then
player:getInventory():AddItem("Radio.RadioTransmitter");
end
if ZombRand(0,100)<success then
player:getInventory():AddItem("Base.LightBulbGreen");
end
DismantleRadio_OnCreate(items, result, player, selectedItem);
end
function Recipe.OnCreate.DismantleRadio(items, result, player, selectedItem) --TODO adding return items/chance based on selectedItem value
local success = 50 + (player:getPerkLevel(Perks.Electricity)*5);
for i=1,ZombRand(1,4) do
local r = ZombRand(1,4);
if r==1 then
player:getInventory():AddItem("Base.ElectronicsScrap");
elseif r==2 then
player:getInventory():AddItem("Radio.ElectricWire");
elseif r==3 then
player:getInventory():AddItem("Base.Aluminum");
end
end
if ZombRand(0,100)<success then
player:getInventory():AddItem("Base.Amplifier");
end
if ZombRand(0,100)<success then
player:getInventory():AddItem("Base.LightBulb");
end
if ZombRand(0,100)<success then
player:getInventory():AddItem("Radio.RadioReceiver");
end
--if selectedItem then
--print("Main item "..selectedItem:getName());
--end
for i=1,items:size() do
local item = items:get(i-1)
if instanceof(item, "Radio") then
item:getDeviceData():getBattery(player:getInventory())
item:getDeviceData():getHeadphones(player:getInventory())
break
end
end
end
Someone please help, i need the player to fall, i know the code works but it has 2 bugs, 1 being... the player does fall he only "stops running" & the second is once this happens maybe 1-3 times it seems to just stop running the code
thanks!!!
i could really use advice, as im new to this & i've been doing this over over a week, 1 trait... over a week... just to learn lua... i seriously need help
i was also looking for this.. i dont believe its possible to remake the action by lua tho.. its probably java sided
if ou actually do that code on lua it will make your character stuck
it wont make you stumble and fall
idk if you figure it out pls do share with me
๐
im gonna cry
ill do the same if im able to figure it out too ayt
i call upon greater minds then mine to figure out the un figure-out-able!
maybe you can look at the debug thing where you can right click and set the fall
but it doesnt happen on the server side it only animates the thing for the one who did it
do u mine VC'ing for a moment? for free time? im just sitting here coding for the next few hours
DebugContextMenu.onTick = function()
if DebugContextMenu.staggerBacking then
DebugContextMenu.stagTime = DebugContextMenu.stagTime - 1;
if DebugContextMenu.stagTime < 0 then
local chr = IsoPlayer:getInstance();
DebugContextMenu.stagTime = 300;
chr:setBumpType("stagger");
chr:setVariable("BumpDone", false);
chr:setVariable("BumpFall", true);
chr:setVariable("BumpFallType", "pushedFront");
end
end
end
im abt to have breakfast sorry.. perhaps later
Can I do this in LUA? And would I access it by ElectricianExperienceGain[dismantleSomething].experienceGain or how would it look?
ElectricianExperienceGain = {
dismantleSomething = {
experienceGain = 30,
}
}
yes, that or ElectricianExperienceGain.dismantleSomething.experienceGain
Sweet, thanks โค๏ธ
Also I'm Mr. 1000 questions today, is it possible to have a file that remains.. "static" on mod updates?
Say I have a file where I keep an overview of variables such as above, a table where I store all the set experiences players gain from doing X tasks. Now I run a server and want to balance the experience gain so I change the values. If the mod that uses this file is updated, it will reset back to what the mod's default values are but can it be avoided? I know most ppl probably modpack it but was wondering if it could be another solution.
Try this
getPlayer():setVariable("stagger");
getPlayer():setVariable("BumpFall", true);