#mod_development
1 messages ยท Page 538 of 1
but still, it won't improve much
You mean
save it in the cache?
like the first time it loads its gonna lag sure
but it also saves them clothes
so it wont have to check them again
yea that's what I'm doing rn
Browser thinks there's a smarter way to handle that list to begin with
i mean just two diff ideas
you can get variations of a specific item
i mean
you are both right and it would be the best if the ideas would be combined anyway
Putting this on the workshop for now, might revise if a future version ๐คท
At the very least we know what's causing it now
send the link when you are done lol
yo
Not usre if this is betteer asked here or mod support: Is there a mod out there that lets u buuild dirt paths?
its actually called
build paths
the mod lol
thank you. Like, seriously
I searched for something like this months ago and didn't even think it existed until a friend of mine alluded to it
any mods that combine all of the ui menus (i.e inventory, health info, crafting) all in one menu with tabs? Something like 7 days to die?
Kinda workz
Kinda?
What are the odds of a Teamspeak mod? Like... If anyone's played Arma 3, TFAR/ACRE2, but project zomboid
I feel like it would be doable as the game already has a system to detect how close players are to each other so really the mod would just have to sorta highjack that aspect and take it to teamspeak
But I'm not a modder so idk
Hell it might already exist
Does anybody know about a spawn protection mod? The reason I ask is. People grind for skills, or live a long time, doing a great job. Then gets disconnected due to an error in an unlucky situation. Logs back in and dies.
I didn't know people still use teamspeak.
It's still heavily used in arma 3 and a 32 person server is free
Ingame VOIP not enough?
Currently doesn't work with walkie talkies or ham radios
Shouting through them with Q does, though
Walkie talkie VOIP works
Maybe to far distance?
he was stood next to the guy
And q worked
Also in-game VoIP is kinda... Idk I wanna say underwhelming
It doesn't sound very nice
A teamspeak plugin though, that'd be pog
I think way to connect TeamSpeak to Zomboid is write from game to text file coords of players and if walkie talkies data. And read from outside of game this file and send data to TeamSpeak
So would a plugin like that be somewhat easy to create?
Yeah
I think better wait when we fix radio and walkie talkies. But VOIP with walkie talkie works good now
Also can talk between walkie talkie and HAM radio
Yea true
I got... Fitty cans of Code Red.
Imma do a lotta mod dev this week ๐
Don't know if I should release this tonight or tommorow.
either way its gonna be dope
I think I'll do it tommorow.
I'll get more downloads that way.
hey, anyone knows how are the hair salons called for procedural distribution?
I couldn't find it in the wiki, I think it was outdated
If you mean how haircuts are picked: Randomly with a few conditions found in Definitions\HairOutfitDefinitions.lua
No I mean the "female barber shops" around the map, with towels, scissors and hair dyes
This โ๏ธ
Ah, I think there's a few for different types of containers and they're prefixed with Salon
Thank you! I'll try to find it tomorrow, goodnight 
I would pay for a mod like this
I mean as you said there is a lil micro stutter I will check it with clothing mods later
The whole thing is pretty inefficient the way it's meant to work:
- Get list off all possible recipe ingredients (all clothing items, for rip sheets)
- Mark the ones you have in inventory
- Sort that list, so the marked ones are on top (and then alphabetically)
- Remove stuff (starting from the bottom of the list, so stuff in your inventory has priority to remain) thatbis considered a variant of other items, e.g bandana head == bandana face, so that stuff only shows up once
To achieve that it's at least n^2 (check each item against each other item's extra variants)
And gets way worse with more stuff added from mods, obviously.
I will continue to try and delete the whole window as a whole today
Probably will ask for help
Prepare
Don't do that, just remove that part that removes the duplicates
I mean in general
I dont see the point of the window prompt
It shows me what clothing I can rip
Like bruh
i've always been kinda bummed by this, why are they even sorting it alphabetically. just sort it at launch, then move every recipe that has mats to a new list and hide it from non mats list. would reduce it to O(n) right? no real reason to have it alphabetically since the amount of recipes available per time being so low. Allowing you to easily search what mats you need. While increasing ram a tid bit should be faster(?)
It's a mess but I can see why It's done like that ๐ฉ
I can see it aswell, its viable for vanilla. but a pain when content becomes to high as u mentioned. but theres a mod that just removes the sorting so its fast but hard to find what recipe u can make etc :/
Anyway
Any idea which script part is responsible for the window showing anyway?
If I delete the first 2 script parts
Bscly font and image
It does not lag anymore in anyway shape or form
Which is funny
Bro leave the window, just remove that 1 - character in line 2592. Poof all problems gone
Dead serious
Like
Not worst case you'll have duplicates in the tooltip (omg how will we ever live wkth that)
The whole tooltip window makes no sense to exist anyway
That's what craftmenu is for
That part is:
For every clothing item x:
For every clothing item y:
For every variant in x:
Is y a variant of x?
Cuz like
Which is ok-ish for vanilla's 190 or so clothing items with few variants

Or use that mod I posted, which at least takes most of the computing needed out of is y a variant of x
But does that not mean that it's not only the sortings system fault
But also the fact that it displays it for some reason?
The problem is this
It reaches crazy numbers of iterations
190^2=36k
400^2=160k
Yes but it stops lagging when you delete the texture also
I dont mean that the texture is the problem as you say its obsly the sorting system
But if deleting the texture and font fixes it
It means that the vanilla script check them all in the first place as you said lol
The problem is checking every single clothing item against every other single clothing item's variants and by doing so fetching everything via script manager
^
Couple mods that add clothing you have a million iterations every time that tooltip pops up ๐คฃ
All while that list never really changes, only what's should be shown on top should
Sponge clothing adds the ability to open and close almost every jacket etc
Still tho what I wanna do is delete the tooltip window as a whole
Yup, so you're nearing n^2+n ๐
So when you hover the cursor the whole window just does not popup
Remove everything in that if
2767 to 2775
Well, remove the if as well haha - no point having it empty
Wait is this even possible to release as a workshop mod if it deletes a part of vanilla script
Cuz you optimized it
But this is deleting lol
is it not possible to override like in python?
Dno that's why I'm asking
dunno tbh, never touched LUA i know its a thing in java
@gaunt pendant comrade you reckon if that possible lol? or will it need another script for it to delete it
You can usually replace full functions
do you have any idea why the game becomes insanely slow when you carry alot of stuff. is the game updating every item in ur inventory at every tick?
another problem
even worse
even worse one*
ive noticed this alot cuz i do some experiments to see how much of each material etc u can find per city
and looting eventually ur game to almost entire stop fps wise. driving when ur 2k weight runs at 5 fps compared to 150 fps when at 20-30
Can't get alot of help through google since most of them modding forums happen to be about minecraft lol
ive just been loosely reading, but i mainly work in java / python so abit unsure of datatypes etc in lua
Tiaxx fixed this issue that actually many people have
with this mod that optimizes it mostly
oh yeah yeah, i have that issue in my playthrough
๐
Pretty easy fix would be to sort them and only load limited amount
What im trying to do and did with tiaxx's help anyway is to delete the whole window prompt on its own anyway cuz i find it nonsense that it is there in the first place
it only happens for items with alot of recipes so theres an obvious fix although tedious
like
Dunno, haven't really experienced that. Biggest fps drops I've noticed is with tons of zombies, rain puddles and tons of items on ground
Why do i need to see 192 items i can rip
if thats aleardy in the crafting menu
- it lags the game
is every clothing variant its own id or just a meta type of an overlaying id?
Alright so
as you said tiaxx i deleted the whole window on its own now using your help
From what I saw own id and then there's a list of variants on each
My question is how do i release this as a mod now that i can download everytime i gotta uninstall every mod cuz i use way too many
i see the steam workshop thing
for releases etc
Copy what I did here, just replace that other function
how does it check for recipes? does it look through all recipes and checks which ones got rip clothing as a recipe?
i hope they are doing a crafting rework of that system ngl, it seems wicked slow
Post to github poster description alright noted
Problem being im not sure even how to start this script
time to use google for help as always
Download that shit, goto your userdir, there should be a Zomboid folder, in there ahould be a workshop folder where the stuff goes
It should find it there and you can start changing stuff around
Lad you reckon if i need a script for >when the mod gets deleted the files return to normal
or does steam do that automatically
You what now? If u do it with mods, disabling the mod is enough. If xou changed the files in the gamedir directly, you'll need to restore a backup/do a fullcheck in steam
the mod thing
bruh
as much as im bad at programming
doing simple stuff like a website or somethin in html is easy did that like 5 years ago
But im having major issues typing a simple script in lua that would do
Find lines "" >delete them
Because that's not how you do it
The game loads all the vanilla scripts, then all the mods (in some order). So what ur mod would do is replace an existing function, that is loaded from vanilla game
So brute force method: copy the entire function to a new file in your mod and change stuff there.
This will then override/replace/redefine that vanilla function with that code
That replaces the vanilla function ISRecipeTooltip:isExtraClothingItemOf(item1, item2)
A mod cannot just delete that 1 part within the function, you have to redefine it. Best case you can call the original and change the result or do smth before and then call the original. You cannot do that here, you have to completely replace the function body (even if mostly identical)
So the script will bscly look like that
Function >the function that im changing
Copy paste of the original function but turned off < If i wan't to completly turn off that window lol
Yeah I believe it was ISInventoryPaneContextMenu.addDynamicalContextMenu u wanted to override
Mind you, this is kinda the worst way to do it compatibility wise
If TIS ever changes a single thing, you're still overriding it with the "old" logic. Not much you can do about it in this case, though.
Alright let's say i want to do this like
you said ealier
delete them - for example
in which way the whole script turns off
or change the script
so it just wont turn off in anyshape or form
Yea that whole block is then commented out, makes u wonder if it was supposed to be on in the first place ๐คฃ
So yeah, copy paste that whole function, then change as u like, e.g. comment out that block
Alright so the function of this is
CraftTooltip:layoutContents
epic
Alright copy pasted the whole function
top to bottom
did them changes
Ok so 1 catch still:
CraftTooltip is local, so ur mod cannot access it. Use ISRecipeTooltip:
They reference the same object, so that works
Lastly, put in a folder in mods dir. See that example mod folder already there for reference
In userdir/zomboid/mods, that is
Won't go into workshop stuff, that's extra steps
i mean the function that is the part of this is
a
wait
didn't see them
lines
and the start
is crafttooltip anyway
alright
U don't copy that. I'm just showing that "CraftTooltip" is file local, so your mod lua wouldn't know about it
Luckily, they aliased it as ISRecipeTooltip as global var
So u can use that, it's the same but available to your mod
alright
this at the top and lines 2458 to 2684 copied
with the changes applied
Let's see where it goes
Wait what ๐
or did you literally mean the whole function
Why isExtraClothingItemOf ?
This
But yes, whole file should be
function ISRecipeTooltip:layouContents(x, y)
-- your logic/copy paste with ur changes
end
mod.info has the stuff shown ingame, e.g. mod name and description, just look at what's already there
Should be able to figure it out from there
It's been 10 minutes. His PC exploded taking everything within a 2km radius with him. Probably. Rip.
i have no idea why
but it
i mean its there
fuck
its the id
does the id need to be the same as the lua file xD
Didn't work
big f
here lies my beauty
wonderin if
thats the script problem or i cant put it in
the mod folder xD
i mean
it was there
Mod id is ur arbitrary name for it, just make sure its unique
i mean first it bugged out cuz the id was examplemod
to be extra sure i named everything
What am I looking at?
the script
that was sup to override the vanilla one
That's not at all it though?!
^
Multiple functions, still referrong to it as CraftTooltip
Wtf are you doing ๐
why does
why does
what
what the fuck
i changed that
i sent a screenshot
wdym
BRO
AAAAAAAAAAA
comrade
if i check one
they all light up
y know any epic lifehack
to copy paste it to all of them at once
Yes, but u don't wanna do that
In that script file, delete everything. Now copy the CraftTooltip:layoutContents(x,y) function AND ONLY THAT FUNCTION into it. Now rename it to ISRecipeTooltip:layoutContents
Then do your change (e g. remove that 1 minus). Save, restart game, be amazed.
chineseballs
wait
why
fuck
fuck...
I really cannot explain it any simpler ๐ญ
no but like
you mean
delete everything?
literaslly
xD
alright
i mean
sure
sure
bro
No just wipe that lua file cuz whatever u put in there has nothing to do with wat u showed above
Hence is cursed ๐คฃ
XDDDDDDDDDDDDDDDD
Bro
i have no ideaw how
but it fucking
reversed
everything i did
just fucking went bamboozle
XDDDDDDDDDDDDDDDDDD
Damn
Wut
like late 90s song
it was used in meme complations
#louistheroux #jigglejiggle #1hourloup
alright
back to doing them mods
not this song
what the fuck
WHY IS SPAGHETTI UNDER THER
E
WAIT
BRUH
wait fuck im lost
actually
alright
i actually got lost
what line to what line do i copy
i did 2325 to 2684
why did i copy this then
what

NEW SINGLE OUT NOW!!! https://lnk.to/scatmanhatman
The worldwide number one hit that launched Scatman John in the Pop and Dance scene.
Follow the legacy of The Scatman on Facebook: https://www.facebook.com/ScatmanJohnOfficial
EURODANCE, SONY, BMG, RCA, 90'S HIT RECORD, 90'S NUMBER ONE, Scatman John, official video, Haddaway, Ace Of Ba...
bruh i got so confused i thought i was sippin on whisky
turns out its rum
anyway
to fast travel
to a line?
Ctrl+g for me, dunno if thats the default tho
I'm too old to learn new keybinds ๐คฃ
Looking good now
alriught#
bruh i turned it on
still does not work
pog
and then put it into mods
Yes and .lua file in there
ever heard the story of chineseballs
Not sure I want to ๐คฃ
Also make sure that file actually ends in .lua, not .lua.txt, I see u have file extensions off for some reason
every time I read your mod's name I can only think of john cena talking in chinese lol
"bing chilling"
bro
not worchilling
why that name bro hahaha
sadge
XDDDDDDDDDDDD
WDYM
XDDDDDDDDDD
lemme
lemme
check my game files
holy fuck
Ahaha wtf
maybe try asking help from nasKo or other dev?
they could point that out for you I think
2325 to 2684
No, you are making this more complicated than it has to be :rofl:
this happened once
when i deleted them fonts and sizes
i mean
epic
the mod works
somebody remote desktop him
bro
im just gonna
fucking copy the whole
script
xDDDDDDDDDDDDDDDDDDDDDDD
i fucking can't
it override
That won't work though
Unless u name the file identically
lemme
lemme check something chief
i mean
at least now we know
the script isn't working xD
I'm pretty sure it's called Chineseballs.lua.txt ๐คฃ
^
Ok
part 3
alright
any ideas of what might be broken
we appreciate help
just to be sure
the mod does not need a working poster to work
does it xD
Sec
Ahh crap
U see those constants? FONT_HGT_SMALL etc used in the function?
Copy those too
Sry this is a mess ti figure out via remote, still at work
hey hov to mod
I press subricibe on steam
it doesnt sends any dovnland
or to project zomboid
Lines 2334 + 2335
vhat
XD
i got on that
like 5 minutes ago
after realizing
i did delete those two
and it did the same like 2 days ago
Comrade what seems to be the problem
I cant mod
Comrade
just copy and paste these below >function?
Above
Jeez
at this point
maybe just copy the script from
to
i will try that ina few
But lags
xD
wait
wait
i might have fixed it
๐คฃ
hey anyone here
I have issues for modding
mine is 41.68 cracked version cause I dont have money
I dovnlanded mods I vanted
but couldnt figure out vhere to put them
I put them in mods folder but it didnt vork
try putting them in here -> C:\Users\YourUser\Zomboid\Workshop
sorry for intruppt but hov to open that
Im a dumb about computers
my computer is in portuguese, so it would be hard to pin point where you should go
but if you go to Users
justs select which one you use
๐ there is nothing like that
it should appear in-game
letme check
do you have a pirate game? maybe it's installed elsewhere?
DฤฐD ฤฐT
eyyyy
yeah
me too
and some .txt files
contains my modlist
generated automatically
this is my Workshop folder
you can also make your mods and put in there to test it before launching to the workshop on steam
that shit it haaard
blender experience
oh
@broken fulcrum I put them in mods folder instead of vorkshop
VORKED
eyeyyyyyyyyeyyeyey
ฤฑm in happy
Dunno what that means
to add you as one of the creators for the mod
your steam will appear on the right
with him
yus
Man, I think I somehow made a mod that erased my fucking main menu
Can I use this for my server?
wut
Can I use this mod on my dedicated server?
I don't see why it wouldn't work
Check which works better for you tho
Crafting Contextmenu Antilag [41.69]
this one
or RipAndCraftStutterFix
Will do
Anyone do modding comission work here?
iirc @nimble spoke does
Yeah I would like something done aswell
Thanks, sent him a dm
anyone knows what happened to radioEquipedCheck()? can no longer see it in modding docs
we wanted to make radios work while on belt
You can't is java hardcoded
Nothing saying you can't manually check whether they have a radio on the belt
Hey, got a quick question here, working on adding in a pillow, and I want it to act like the spiffo plush, where it is kind if just a 3d model that sits around, what would be a good way to implement this? Already have the model ready in blender
This might be a dumb quetsion but we all have to start somewhere
Where can I get started on modding?
the PZ wiki has some good starting points @frail widget
yeah, the wiki overall has been improved massively
i just updated my mod, added firearms weapons, zombified doomguys and variants of colors to the armor.
Lets go, got an item added, I just need to import the model correctly, and set an Icon
Does anybody here know how you are supposed to assign a 3d model to a Item? Its just a world item
Anyone know how to get a custom icon in this area? Or any mods that add one?
Just looking for a class/lua name to get me started
ISEquippedItem.lua
Found it
He's trying to make radios work on belts, you can't do it with just lua
Someone knows the Discord User of the guy that created the weird Richard Mask from Hotline Miami?
I recreated his mod and now the mask has better textures and well, it's a full mask instead of a hat
none of my recipes make any sound in the game. these are two of my recipes, both using base game sounds, but neither play. Am I missing something?
I am already importing the base game at the top
Heyo guys can someone give me a Lua example how I would cycle through each clothing item in the players inventory and change the condition for each? I manage to change one item at a time and only by its string name and not its category.
This is weird, I made table with HandWeapon class as a key and if I try to getStock() inside of the table, it returns nil instead of the WeaponPart class
I'm finishing a mod that I've been doing for a long time, but while I'm sharing this trailer what occurred to me to do.
https://youtu.be/y5oqCqhNPv4
Become a REDACTED in project zomboid game to conquer zombies across dimensions and stop the final destruction of humanity.
local items = playerObj:getInventory():getItems()
for i = 0, #items-1 do
local item = items:get(i)
end
Is storing HandWeapon class as a key of a table not recommended?
I just want to say that I am almost done with my Littering 3.0 mod.
I should have a beta up on the workshop this Saturday for people to try. ๐
Currently I am working on distros and some other polish.
Hey there, I have a question. It's rather broad and general. Let's say I have complete 3D model of a car with variety of its variants, perhaps some attachments. How difficult it would be to add it to the game in terms of all the coding/scripting/witchcraft? Also, if there's someone willing to help me with that if I'd actually had such model?
@gaunt pendant comrade when are you free xD
Fairly easy. They got a tutorial for that.
Oh god what now? ๐
Decided to delete the whole window
I did it
Bravo me
But
When you have more items it shows the rip one or all
And when you hover over that it still lagz
๐ค
Oh, yeah, I found it! But still, if I get to it, I'll barge in here with more questions. I'll be aiming for KI5's quality :)
I'm currently trying to stop the loot generation totally, so no loots spawns on the map what so ever.
The servertest_SandboxVars.lua don't have the values for none loot spawn:
-- 1 = Extremely Rare
-- 2 = Rare
-- 3 = Normal
-- 4 = Common
This is what I did next, unfortunately wouldn't work.
#mapping message
I'd be grateful for any suggestions for my case
What happened when you overwrote the distribution like that?
Server terminates itself, cursing me for broken overwritten distributions files.
I'll try servertest_SandboxVars.lua
FoodLoot = 0
CannedFoodLoot = 0,
etc.
And I'll write back
Slightly disheartened that this one file handles all the icons instead of merely equipped items. Have you determined a good way to add a new button entry to this?
This didn't seem to work, the loot's still generated
What's the error on your distribution file when you do it the other way?
It'd odd to me that it would break the game, because people have used it in mods before and it's "broken" their loot generation. Curious that you wouldn't be able to do effectively the same.
vhats the best mods
IMHBOCO, Item Searcher is pretty great https://steamcommunity.com/sharedfiles/filedetails/?id=2789003239
No, I ended up just using it as reference since either way I'd be doing all the drawing manually. I'd been hoping it would have some easy layout management and an easy :addButton() or something.
boo
Gonna be hard to draw it in the right place with multiple other mods potentially doing the same thing
I lost the logs, but I'll try to set the rolls = 0 for each and every item in distribution
Maybe that'll help
It works!
I opted to go sideways instead because it was better for my mods purpose.
ISEquippedItems does store the y position of its lowest element though, so mods could use and update that if they wanted to properly add more buttons to the column it seems.
Thanks for the advice. I like having my custom UI linked to a keyboard shortcut for convenience, but I think most will prefer an on-screen button like that.
I'm not sure what causes this, but after generating a new save on a custom map the zombies seem to be spawned initially in some of the buildings, although my servertest_SandboxVars.lua has the following values:
ZombieConfig = {
PopulationMultiplier = 0.0,
PopulationStartMultiplier = 0.0,
PopulationPeakMultiplier = 0.0,
PopulationPeakDay = 1,
RespawnHours = 0.0,
RespawnUnseenHours = 8760.0,
RespawnMultiplier = 0.0,
RedistributeHours = 8760.0,
FollowSoundDistance = 100,
RallyGroupSize = 20,
RallyTravelDistance = 20,
RallyGroupSeparation = 15,
RallyGroupRadius = 3,
}
I tried generating a new save, multiple times, and each time there were zeds in the buildings. Maybe there is some kind of a prefab for zombie spawn overriding the sandbox options?
BTW, my map has a completely black mapname_ZombieSpawnMap.bmp, so I guess it's not remotely possible for the map itself to generate zeds.
I'm not familiar with how zombie spawning works, but the story generator comes to mind in this case.
They're turned off as well.
guys does anyone knows how to make custom animation in PZ?
Think i found an issue
also i found the general fix
cuz it turns ouit
if you have even more clothing mods
both yours and the thing we did yesterday don't work that well
my fix idea would be deleting the whole winow
i did it
it works
but
it does not when you have two of the same item type in your inventory
cuz the one or all still prompts the window to pop up
ideas?
By ideas i mean
xD
you reckon where this part of the code is
im reinstalling the game
cuz i fucking prolly deleted half of the code
Update:
I've overwritten the ZombiesZoneDefinition.lua and set all the values to 0. Still no effect, zeds still spawn.
Bro don't edit game files, just overwrite with mod. You can turn it on/off as you want. If you have more mods, check if somebody else also overwrites same thing.
im editing the game files in the first place to check which file is responsible for it in the first place
then i will overwrite that part with them mod
HM, make mod with all copies lua files?
@bronze mulch Ctrl+f "CraftTooltip" find where it creates and assigns it. C'mon it's not that hard ๐ฉ
I would do that
i actually even opened the visual studio
and did exactly what you said
But then my food came
And i've been doing yt since this message xD
pretty sure its like this are
area
tho these 3 are just for the option
its one script up or down i found it a minute ago
I usually just drop a break point with the lua debugger when trying to find which code path is responsible for something. Probably a faster workflow to consider.
Instead of editing the files to see a change.
update
i forgot i did it yesterday
while being mighty drunk
loaded a mod that i made yesterday called
chineseSquares
i dont remember why is it called that
but it works
Note to self
drink more
Ahh yes, the Ballmer Peak
Lol
Does anyone have a resource for loot tables and how to add a new item in?
They are defined in Distribution.lua and ProceduralDistributions.lua in media\lua\server\Items
Just add the needed definition and value.
Cheers
Im looking for mods. Is there a mod,
-
that lets you blend in with zombies, making them not recognize you or something?
-
That lets you be a zombie in MP and scare your friends?
-
That lets you control zombies with some kind of... remote or something like that?
Id love to know if there are such mods
Those are game-breaking mods. I don't think there are such things.
Thereโs a mod where you can cover yourself with corpse blood, havenโt experienced any bugs with it. You gotta do that with three or so corpses and you can crouch through crowded areas without being detected for a while
Isnt that op?
Sounds like it, but its a mod, it doesn't have to be balanced.
yeah, i guess so
Might be cool if they spiced it up with higher crafting cost, and some random chance some zombies see through the disguise. And make you really slow without removing the disguise.
yeah!
there is a mod that lets you >put zombie blood on you
so you wont be noticed by them
wont change ur model tho
Maryland State Police, requested by my friend
Hey guys I know its silly, but does anyone know a way to delete zombies via Lua? I've tried removeFromWorld() and it always ends in this happening
Try check how work debug remove zombies function
I've been trying to figure that out, But thanks for the feedback
Only thing i've been able to locate is ForceKillAllZombies()
But obviously that only works to kill ALL zombies, not a specific
Noooo my code was wrong.
local items = playerObj:getInventory():getItems()
for i = 0, items:size()-1 do
local item = items:get(i)
end
It should be items:size(), not #items D:
#items is for a Lua table, while items:size() is for one from Java.
@storm scarab
function DebugContextMenu.OnRemoveAllZombies(zombie)
local zombies = getCell():getObjectList()
for i=zombies:size(),1,-1 do
local zombie = zombies:get(i-1)
if instanceof(zombie, "IsoZombie") then
zombie:removeFromWorld()
zombie:removeFromSquare()
end
end
end
So looks like your original solution just needs to be paired with zombie:removeFromSquare()
has no one ever modded out the vision cone for a full 360ยฐ FOV?
I'd also be interested in this! A full removal of the vision mechanic would make for an interesting, more arcade-y, experience.
for this, would i just copy over the base lua and add my own lines, or should I just do my own lines?
Isn't this controlled by Java?
You want to insert, not overwrite
If i'm reading this right, this code would insert a new item into the distribution pool for garbage bins with a weight of 3
local binItems = SuburbsDistributions.all.bin.items
table.insert(binItems, "NewItemName");
table.insert(binItems, 3);
Doing it like this makes your mod more compatible with other mods and far less likely to break if IS updates the distributions themselves.
Hey my shit keeps buggin out I was wondering if there's someone who knows how to set up a multiplayer modded server. pls dm me
Thanks man I got this script working, kills every zombie in sight of the player on button press haha
Much appreciated
how big is a cell? or rather what is it? sorry Im really new to lua
bigger than a square and smaller than a chunk?
300x300
each square in the ground = 1 tile
so 300 tiles x 300 tiles
thank you, while were at it can you tell me how to scan a certain square radius for a certain object ? similiar to the function Notloc mentioned above but instead of cell a 6x6 square outwards from the player
I found some community api that should do this but I know too little to understand yet, I hardly grasp it as of yet
That's go beyond me, I'm as newbie as you to this haha, ask the guys at #mapping
if you are trying to make a map
Hello, I have a problem with a helmet, when I want to equip it, it does not remove the beard and hair and it does not work with the HatCategory, and if I put it "m_mask 0" the neck is deleted, any advice?
๐
Would there be a way to add decapitations/dismemberment?
anyone know why this doesnt work? player:PlayAnim("clap02");
or does it just get overwritten by another animation the milisecond it works?
it doesnt give me an error but no animation plays
but the player:playSound("bird1"); works
the only way I could think in my very basic understanding is changing the outfit of the zombie model and reloading it via script
with the functions dressInNamedOutfit(string) or setClothingItem_Feet(InventoryItem ClothingItem_Feet) etc. in conjunction with reloadOutfit()
and the OnHit event
thats how I would do in rn lol
I guess, but I mean like it edits the actual player model and it like can only occur if you're using a bladed weapon. Like how clothing can only be ripped via guns and blades.
sure it would work the Onhit event has a handweapon variable
so if it is a bladed weapon it can only cut and if it were a blunt weapon it changes to a different amputed limb model
you can also access the bodypartdamage variables
Maybe I'm thinking to hard about it since I also want it to function like if a headwear were to fall off, but with limbs.
I mean this could work... maybe add the limb model 2 times, one as a replacement for the body and with masks hiding arms and legs and another as an item that defines as headwear and can fall off. We can also use the bodyTexture function for it to be white and black depending on skin color
I mean we could also spawn the limb at the same location as the zombie
Either or, I'm not the smartest with the coding part but I can do models.
im not good at either one xD


Hello!!
Was somebody able to add an OnEat parameter to an item using the new ScriptManager?
I tried this:
local antidepressants = ScriptManager.instance:getItem("Base.PillsAntiDep");
if antidepressants then
antidepressants:DoParam("OnEat = OnEat_Antidepressants");
print("Added property");
end
And I can see that the print happens so I that ran.
Then I have this:
function OnEat_Antidepressants(food, character)
print("Took antidepressants");
end
But that second print never happens. Does somebody knows what should I do to make that works? ๐ค
Antidepressants are Drainable/"DrainableComboItem" type/category items and not Food type/category items; the OnEat parameter should only work for Food type/category items.
If you want to evaluate when antidepressants are consumed I'd suggest trying to slice a check into the ISTakePillAction timed action?
Hmmm, good point. That makes sense.
Will look at that.
Thanks!!
Is there a mod that lets you change the icons/names of various containers? It may make sorting/fetching items easier if I can tell at a glance if this is the Bag Box or the Gun Box
Like, if you paint a crate blue, could the crate icon somehow become blue as well?
Depends on what you're trying to do. If you've got your own items, just add the lines to the files, not touching the vanilla ones. If your idea is to change the vanilla loot distribution then go ahead and edit the corresponding files
Is there any quick way to run a scripted scheduled command serverside? I'm not familiar with Lua, but, umm:
while (true)
{
Console.Write("/removezombies -x 300 -y 300 -z 0 -radius 300");
Console.Write("/removezombies -x 300 -y 300 -z 1 -radius 300");
Console.Write("/removezombies -x 300 -y 300 -z 2 -radius 300");
Console.Write("/removezombies -x 300 -y 300 -z 3 -radius 300");
Console.Write("/removezombies -x 300 -y 300 -z 4 -radius 300");
Console.Write("/removezombies -x 300 -y 300 -z 5 -radius 300");
sleep 600;
}
Well how do u run the server? May be able to write it to the processes stdin to run it ๐คท
You are right, dumb question. ๐
I was thinking of it as from a Lua perspective
Forgot about bash
Screen makes that rly easy, used to do that on minecraft server via screen -X stuff yourcomnand
But I'm sure there is also ways with "vanilla bash" to redirect to a processes stdin
Simple bash loop
while true; do
{
echo 'removezombies -x 300 -y 300 -z 0 -radius 300'
echo 'removezombies -x 300 -y 300 -z 1 -radius 300'
echo 'removezombies -x 300 -y 300 -z 2 -radius 300'
echo 'removezombies -x 300 -y 300 -z 3 -radius 300'
echo 'removezombies -x 300 -y 300 -z 4 -radius 300'
echo 'removezombies -x 300 -y 300 -z 5 -radius 300'
echo 'removezombies -x 300 -y 300 -z 6 -radius 300'
sleep 10s
}
done
Anyone know why zombie:reanimateNow() doesnt work in this context but things like setHealth(0); do?
happens to the best of us
Hey unrelated, but you seem to know about setting zombie clothing, am I doing something wrong?
zombie:setClothingItem_Head(nil)
zombie:reloadOutfit()
Im basically attempting to remove anything on the head to stop them from dropping anything
I made it work for the player in a very bad way getPlayer():getInventory():AddItem("Hat_Army") -> getPlayer():setClothingItem_Head(getPlayer():getInventory():getItemFromType("Hat_Army"));
for zombies this doesnt seem to work I cant figure it yet
Do you know how to clear hats for example? been unable to do it
Or atleast stop them from dropping hats
Whatever i've tried nothing seems to work, I've tried to clear their hat and nothing works
i've tried clearing their inv and that doesnt work neither
Starting to drive me insane
same man
exactly the same
for players it works
ive been messing with it for 2 hours now haha
Is there mod collection you guys like using for Single Player? I intend to do a self sustaining playthrough. Build my own cabin and such.
Didnt check for such a thing, Ill take a look into it
Alright comrades
i seem to have a problem
Tiaxx
comrade
i seek help
i happen to
seek the function
Which
eee
which changes shit
i9 cant quite fucking put my finger on this
you what now
alright
so
remember the deleting -<
so it does not sort duplicates
i deleted the whole window as a whole
bravo me
problem is
Cuz it lags regardless if you have mods
by that i mean 30 mods
for clothing
SO
Keep in mind i did it yesterday but lost it
found it again
and lost it again
SO
im trying to find em
function
You need to stop with the cocaine man, it's too much
I tried changhing this
ISInventoryPaneContextMenu.addDynamicalContextMenu = function(selectedItem, context, recipeList, player, containerList)
CraftTooltip.releaseAll()
cuz it says
= function
This is aleardy the changed file
Im trying to override the original file
like the scrip from the thing we did 2 days ago
find where it does tooltip = CraftTooltip.addToolTip()
i deleted 2 parts
fu8ck
zxDDDDDDDD
IT WORKED REGARDLESS SO I IGNORED IT XD
fuck
i might have to check the code next time
well you won't see it ๐
the mod that i made and put into the folder manualy is not showing up at all in the mod manager
help please
put it in userdir
userdir/zomboid/mods
Should look like the example mod
you put your lua file in the lua folder that you prolly made
i put it in mods folder and workshop and its not showing up next to example mod
in the userdir/ tho?
Put in correct folder? Put a mod.info file?
the way i open the files for zomboid is via steam in browse local files
%USERPROFILE%\Zomboid\mods
copy paste to explorer
better way do it like he said xD
Alright chief
Did em delete that
ok did that starting the game up
how did it go
i put in users/zomboid/mods and workshop still not showing up
trying to make a mod that changes the appearance of flags in the game. where would I find the flag model to edit and have what I want?