#mod_development
1 messages Β· Page 490 of 1
just remember to remove when you're done
cause it add tons of stuff you may not like
if you trying to play legit
Well i figured, mini backpack with 95 reduction and 50 capacity xD
xD
may as well install cheat menu and enable creative and infinite carry weight
I'm tired of a bunch of bags, okay xD
but i feel you building is funn
I changed the value to 25. The... Capacity, and the name to Adventurer Bag
So I just removed the " 's "
So uh... What is your startup time for PZ?
I'm sitting at a blackscreen currently.
Much longer than usual.
I think I left a file open.
try copy paste this one and try again
and doesnt matter if file is open and also make sure to save
lol
joking
Getting locked in a blackscreen after... Loading Lua
Okay.
install cheat menu should be enough
Name change worked, capacity did not.
send the whole .txt file with the bags
So it must be another mod screwing with it.
It has to.
I guess I could disable it and see what disables with it?
Also, I assume the item editor is like not a cheatmenu thing, cause I cannot do that.
module Base
{
item smallback
{
WeightReduction = 100,
Weight = 1,
Type = Container,
Capacity = 100,
DisplayName = Adventure Bag,
IconsForTexture = advbag;advbag2,
CanBeEquipped = Back,
OpenSound = cloth1,
CloseSound = cloth2,
PutInSound = PutItemInBag,
ClothingItem = smallback,
AttachmentsProvided = ChestRig,
BloodLocation = Bag,
RunSpeedModifier = 1,
}
}
try adding just that bag
like remove all the content and paste that
keep a backup if you care
i used that and it worked, but didnt us it with the models and textures but still idk otherwise
As in remove everything else from the clothing_PLLootBags?
yeah you just want that cheated bag right?
Nah, I like the mod overall, I just... Wanted to change that bag because I like it.
If could have gotten the item editor work, I would just do that.
the item editor doesnt allow for chaning all properties
But I couldn't get cheat menu to show the dialog box you had.
either you struggle making this bag work, or you just use a cheat menu to get infinite carry weight
you can still use the bag if you like the style xD
@grand bough or you could use this modded Spiffo backpack 
module Base
{
item smallback
{
WeightReduction = 95,
Weight = 1,
Type = Container,
Capacity = 50,
DisplayName = Super Spiffo Bag,
IconsForTexture = Backpack_Spiffo,
CanBeEquipped = Back,
OpenSound = OpenBag,
CloseSound = CloseBag,
PutInSound = PutItemInBag,
ClothingItem = Bag_SchoolBag,
BloodLocation = Bag,
RunSpeedModifier = 1,
AttachmentReplacement = Bag,
ReplaceInSecondHand = Bag_Schoolbag_LHand holdingbagleft,
ReplaceInPrimaryHand = Bag_Schoolbag_RHand holdingbagright,
WorldStaticModel = SchoolBag_Ground,
}
}
XD
I'm unable to figure it out. At this point it's like something I /HAVE/ to do.
Because there's no reason it shouldn't work.
how about trying this superb spiffo backpack
could it be a spacing thing?
No. That shouldn't matter. Yours has the same spacing.
I know spaces don't matter, but I just... this is gonna burn. It's 6 AM and I have work in a couple hours, and I won't be able to rest until this is fixed.
Gonna check weird mod incompatibilites
xD
Spiffo bag did it work?
at least if it work with spiffo bag you can then just change the texture and model
I should replace the one we're working on right?
I got distracted, I'm sorry.
Or do I make a new text file?
You replace it and check if the new bag work
im going to bed man
i wish you all the luck in the world for your magic bag
Goodnight. And thanks again for the help, Konijima!
I really can't thank you enough.
haha ive done not much but if really it doesnt work then you could just send me the zip and ill make you a bag
later
Rest easy, friend.
π
i didnt follow the subject, but you want to do a bag with a great amount of space available ?
I found it. It's a Lua from another mod- which I didn't realize messed with Modded bags.
And it was tucked away in my modlist too. I don't remember installing it. This should fix it.
Oh ok. hope you will fix your issue.
i was thinking in a bag like minecraft and the enderchest. This is what i heard when i saw "magic bag"
give me a VPS and those annoying messages will disappear
Hey ya'll quick question for ya
I cleared my mod list a bit ago, and accidentally deleted a mod that gave your character the ability to yap about things, like temperature or hunger, or panic and the like. Anyone know what it was called?
uh ok?
Oh hot damn! You're right. I think it's conditional speech
I was looking with comments
Left 4 dead reference
Anyone know what mod is causing food to get insane 1000+ negative mod and bordom when unfreezing?
I saw a few posts about it in the sub
I havent been able to A-B test it yet
And theres no log erros that i think are responcable
Oh its a vanilla bug
HUH
idk but temporary fix is to just let the food "cool down" in the fridge 
I know there are no such things as stupid questions, but does someone want to challenge me? I recently picked up PZ and wanted to get into some modding. Never modded before but have some coding skills.
Should I just create a backup of the lua file, then place a modded one in the Mods folder? Didnt know if the mods folder would override same named files or anything. I have been looking around in all the documents I can find but I have a fear of screwing it up before I even start.
I'd suggest reading https://github.com/FWolfe/Zomboid-Modding-Guide
Gives you a good head start on how Zomboid expects your mod to be formatted and more
Thanks. I'll give it a whirl. I just kept seeing things from 2017 and others more recent. Wanted to make sure I had valid info. I knew people were saying the wiki was getting updated to figured if I asked here, I would get the best answer. Thanks again.
I think it was missed last time so I'll ask again. Is it possible to add custom injury types? My sitting on a hot af idea right now that I'd really like to work on.
The javadoc sucks
I'd start here
https://quarantin.github.io/zomboid-javadoc/41.56/zombie/characters/BodyDamage/BodyPart.html
declaration: package: zombie.characters.BodyDamage, class: BodyPart
Well I'd guess no considering every injury type seems to have methods associated with it
But I wouldn't know. A method called 'FindAllCake' could literally find all cake, or because there's no descriptions of what the method actually does it could actually kill every zombie
That's a shame, regardless.
It looks pretty much welded logic yeah. Would be a challenge to add one from the looks of it. Sorry!
@craggy furnace i tried doing the same thing for your law enforcement pack but got this error
attempted index: weapons of non-table: null
did you change the function?
anyone know of any performance mods?
π
shark
why did u change it from shared to server
threw me off for a bit

kept wondering why it kept returning a null table
What do I need to do in the Texturepack file to fix this issue? Or is this something I cannot fix?
@barren sierra IIRC you have to add a PNG for each item in the folder media/textures/WorldItems/
for example media/textures/WorldItems/RippedSheet.png, same name as your item
IIRC icons should be Item_RippedSheets.png or something along those lines
Well damn! Thats a bummer. Wonder why the tectures just up and left
@dry chasm ha maybe I'm not sure, I just copy pasted the path of a random item from my steam folder
also doesn't have to be in texture pack, but can be. Keep in mind that when using texture packs, you have to include them in the mod.info.
See #mod_development message and it's link at pack for more info.
(Personally haven't make a .pack file yet)
Hey everyone, I'm working on refreshing the Modding:Lua_Events pages in the wiki, I'm not finished yet, but what do you think? Any thing I could improve on the general format / presentation?
https://pzwiki.miraheze.org/wiki/Modding:Lua_Events
https://pzwiki.miraheze.org/wiki/Modding:Lua_Events/OnCreateLivingCharacter
@dry chasm yes, your opinion matters! π
the crossed through ones deprecated/unused? π
IIRC some of them are still used and triggered via lua?
@dry chasm yes, well I take the list of all events from java code by checking for AddEvent(), then I consider as deprecated all events with no corresponding triggerEvent(), is that not correct?
Some are triggered in lua and not java IIRC, so unless they're also not triggered there, then I'd say it's alright.
Also shouldn't it be more of a thing for #pzwiki_editing ?
some events are added via lua only (also triggered there)
ah I see
so check there too
@quasi geode any clue how I could find them automatically?
like for pattern matching
Well that is just becoming way to confusing.
, but I do thank you
I'm trying to automate the whole process
ah cant remember the exact search string offhand, dont have that info handy atm
but should be easy enough to spot. will be similar to the java
Ex. in media\lua\client\OptionScreens\InviteFriends.lua line #355
LuaEventManager.AddEvent("OnSteamFriendStatusChanged")
(LuaEventManager\.AddEvent\(\"[.]*?\"\)) regex maybe?
yeah don't worry about the quotes, that won't be an issue
@sick palm all the events I can find with your pattern are not marked as deprecated in my list
.*? doesnt look valid * and ? should be mutually exclusive in that use?
probably depends on language used? IIRC in JS it's for the least repeatable? so if it doesn't continue with " or ' it should try again? unsure
but, I do find this:
ua/server/Seasons/season.lua: triggerEvent("OnChangeWeather", season.weather);
lua/server/Seasons/season.lua: triggerEvent("OnDusk"); -- we notify that we're on dusk for modding purpose
lua/server/Seasons/season.lua: triggerEvent("OnDawn"); -- we notify that we're on dawn for modding purpose
lua/client/ISUI/ISWorldObjectContextMenu.lua: triggerEvent("OnPreFillWorldObjectContextMenu", player, context, worldobjects, test);
lua/client/ISUI/ISWorldObjectContextMenu.lua: triggerEvent("OnFillWorldObjectContextMenu", player, context, worldobjects, test);
lua/client/ISUI/ISInventoryPage.lua: triggerEvent("OnRefreshInventoryWindowContainers", self, "begin")
lua/client/ISUI/ISInventoryPage.lua: triggerEvent("OnRefreshInventoryWindowContainers", self, "beforeFloor")
lua/client/ISUI/ISInventoryPage.lua: triggerEvent("OnRefreshInventoryWindowContainers", self, "buttonsAdded")
lua/client/ISUI/ISInventoryPage.lua: triggerEvent("OnRefreshInventoryWindowContainers", self, "end")
lua/client/ISUI/ISInventoryPaneContextMenu.lua: triggerEvent("OnPreFillInventoryObjectContextMenu", player, context, items);
lua/client/ISUI/ISInventoryPaneContextMenu.lua: triggerEvent("OnFillInventoryObjectContextMenu", player, context, items);
lua/client/OptionScreens/MainScreen.lua: triggerEvent("OnChallengeQuery");
lua/shared/SpawnRegions.lua: triggerEvent("OnSpawnRegionsLoaded", regions)
```, those are deprecated in my list
don't forget that there's also triggers, that example was just adding new events
probably...i'm used to perl regex (i dont mess with JS at all)
So OK I will fix the invalid deprecated, what about the event page itself, not the list?
see the parameter links pointing straight to the javadoc? I love it π
and the example is also auto-generated
though maybe in that example more along the lines of The description data of the player or survivor being created, as otherwise one could expect it to be a string instead
well if people don't read the parameter list what can I do? Second parameter points to the javadoc URL for SurvivorDesc class
not everyone click on every link they see, so the description is all the more important π
But not that big of an issue anyway i believe
@dry chasm feel free to make some edits or add the missing descriptions here: https://github.com/quarantin/zomboid-wiki/blob/main/descriptions.json. Waiting for your PR π
If I'd have more experience actually working with git, I might've done so π
loool
it's not that hard π
just do: git clone https://github.com/quarantin/zomboid-wiki/ then edit the file, then
git add description.json
git commit -m "Updating missing descriptions + Edits"
git push origin develop-desc``` and then you can create the PR in github web interface
@sick palm or worst case just download the file, edit it and send it back to me through discord
woops, sorry @sick palm I meant to mention @dry chasm
@dry chasm
pinged or not?
yup
Sorry, been away from discord for the most part for the past week, but saw this and it's some good shit @weary matrix ! π
I love how the parameters are listed with the events; I've used that OnCreateLivingCharacter event before specifically to access the player description and I had no idea it automatically called the parameter.
Hey everyone, I am looking to mod some sound files or basically replace the sound files with sounds of my choosing for a project. Would anyone be able to advise me on how to do this?
@willow estuary hey man thanks! Although I'm not sure what you mean cause the parameters are also listed on the official wiki: https://pzwiki.net/wiki/Modding:Lua_Event/OnCreateLivingCharacter
@rare bay check this mods maybe? You should find all your answers in there: https://steamcommunity.com/sharedfiles/filedetails/?id=2613146550&searchtext=music
Thanks I'll have a look
ah this edits the music in game by adding more in. I want to replace sfx like the jumpscare with my own soundfile
Do you know of anyway to do that?
@rare bay I have no idea what your talking about, I don't know what's sfx or jumpscare, so no π
I'm just a developer
Sound effects, you know the noise when a zombie scares your character and its like a stab sound. I was looking to replace stuff like that
its no worries
@rare bay aaaah ok, sorry just woke up, got to power up the brain π
Get that coffee down you mate π
I wish I could π¦
@rare bay what about? https://steamcommunity.com/sharedfiles/filedetails/?id=1518397250&searchtext=sound
is there any mod that let char attach 2 two handed weapons?
like this one,
one attached on the back, and one on the shoulder
@rare bay also check in your steam folder: media/lua/shared/SoundBanks/SoundBanks.lua, looks promising
Got a question for the mod guys. Back in Build 40 when you hosted a server and when you tried to apply a mod that maybe it didnβt work it would give an error message along the lines of βfile x not found in serverβ or something like that. Is there any way to fix that?
Yea I found the banks but need to learn to change the sounds in them
not hard to do, but if i'm not wrong, it's already a mod
@rare bay you probably have to hook the event: OnLoadSoundBanks
It's not the first mod I intended to upload but it is the one that ended up being finished first! https://steamcommunity.com/sharedfiles/filedetails/?id=2653684336
anyone else is missing (im only aware of this one) the 9mm Drum Magazine from Brita's Weapon Pack and ArsenalFighter mods?
i've got the modded weapons, attachments I just don't have the drum magazines for some reason...
I've tried unsubscribing and subscribing to the mods again
it doesn't exist in the debug's item list
Mine is working @fast dagger
sure, give me a few to fire it up
2nd to last is the 9mm drum in your Screen Shot
are you right clicking to use the drum mag?
that does not work anymore, its now the [ key
is it loaded with rounds?
so with my modpack enabled i cant craft scrap weapons and i get "ERROR: module "Base" imports itself" but with the single mod it works
how do i find out which of the 300 mods cause the error xD
Maybe notepad++ and tell it to look for module base in text files.
it is
but my mod uses module base
my 3 mods
it just says that it imports itself
idk which mod is doing that or if its my mod
Do we have to spawn it?
no, i made it a super rare zombie spawn
best balance i could think of for how op it is
π
if you have any recommendations on how I can tweak things let me know. tbh I went the lazy route and just made it super crazy strong and heavy since I didn't know what all the config options meant but I was pretty happy with it. Very satisfying clearing a forest in 3 swings with it.
wtf a module functios returns a table wtf wtf anyone some idea?
local EasyModdingAPI = require "EasyModdingAPI"
EasyModdingAPI.Utils.String():testito("lolololol.com")
local String = function()
local self = {}
self.testito = function(aaaaa)
print(aaaaa)
end
return self
end
return String
I'm guessing that may mean there's something that says both module base and imports base. Maybe you could get notepad++ to show you all the text files saying module base and if the list is not too long you could see if any of them are also importing base.
@ruby urchin it seems testito means testimony in spanish, maybe it's just a debug function to print strings?
@ruby urchin also in Lua even objects are tables so...
check here https://www.lua.org/pil/16.html
returning a local table at the end of a file (for importing via require) is the proper usage of require and modules in lua. this way you arent polluting the global namespace
testito it's just a random name that I given, is the diminutive of test in spanish, I'm working in a modular API with a closed environment (this so as not to create conflicts with other mods, because ENV is open in PZ), but the problem is I given a string parameter to the modular functions and it returns a table, which is extremely strange
@ruby urchin your String() call returns a table containing a function named testito, why is this weird?
I'm not calling String(), just the functions inside of the module
For example, I have another module called Player
local EasyModdingAPI = require "EasyModdingAPI"
...
local player = EasyModdingAPI.Player(source)
local x = player:replaceVisualClothingItem(p1, p2, table)
and it works as it should
@ruby urchin you mean the print statement is showing something like table: 0x55a6b....?
of course, in summary, I give a string and the function print a table
I did some tests, and the parameters is the one that changes
and it should give me the same string provided
@ruby urchin I think if you want to be able to use the : character to call a method you have to set the metatable
Not really necessary, that's why I use self
try to replace your String():testito("lolololol.com") with String().testito("lolololol.com")
@ruby urchin You're trying to call testito as if it was an object method, except your String is not an Object because no metatable
so your code just declare testito as a function, not a method
when you use : to call something, the call will actually add the object itself as first param, that's why it's printing a table and not the string
you can also try to add a second parameter to testito and print that parameter instead, then it should "work" as you expect
for example try this:
local String = function()
local self = {}
self.testito = function(aaaaa, bbbbb)
print(bbbbb)
end
return self
end
print(String():testito('Hello World!'))
Hello World!```
I'm dumb, I forgot the first parameter on the module
local String = function(variable)
now works
local o = {
data = {},
};
function o:addData(val)
table.insert(self.data, val);
end
function o:printData()
for i,v in ipairs(self.data) do
print("[", i, "] - ", v);
end
end
return o;
You could also set it up like so π
I just had an idea and wanted to know if this makes any sense / Would be too hard to modify cause I'm a real newbie with mods
When foods/items are put in a refrigerator container and they turn Blue (+Slowing the time that Perishables food rot) Would it be possible to add a new value to that involving PlayerDamage or whatever the one that controls temperature?
More precisely, I want to make refrigerated food in general (Even the ones not perishable like sodas) to interact with the players heat, making him cool down if he's too hot or even get cold if he eats something frozen in the winter (In the future I'd also apply that to hot food, like eating a fresh hot cup of coffe in the middle of the winter would get your body temperature up)
Would it be possible to do that only with Lua without messing with Java?
@marble folio we can change player temperature thats for sure
we can also get the Heat level of a food item
we can set player ItemContainer CustomTemperature to keep the food warm (red) or cold
we can hook into the action of eating and check the food temperature and modify the player temperature
could use that to make the Cooler keep the food cool and add a new item that allows you to transport hot coffee like a Thermos or something
if its of the class ItemContainer yes
I will try to make something like this
when eating check the food temperature (Gonna see if there's values defined to the red/blue/frozen/burnt temperature, if not gonna try to add something to it) and make it decrease/increase in the players temperature
if I manage to do it correctly, it would be a universally mod, usable with modded food and etc
will finish installing stuff and get into it
Thanks for the help
To hook into the action of eating (after the action is performed):
local original_ISEatFoodAction_perform = ISEatFoodAction.perform
function ISEatFoodAction:perform()
original_ISEatFoodAction_perform(self)
-- do stuff here
if instanceof(self.item, "Food") then
-- local percentageAte = self.percentage -- if 1.0 mean fully eaten
-- self.item:getHeat()
end
end
Are sound mods possible to make on 41.53?
if so whats the folder with the new sounds
@shadow dust it would be in C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\sound\banks\Desktop
file are .bank
'i think'
how do I edit the .bank files?
i keep seeing these around raven creek is this normal?
are you in debug mode by any chance?
currently yeah
it wont happen during normal gameplay, just when it rains or snows in debug mode.
So I followed a guide to make clothing and it's in game but I can't see it on the ground or an my player
I was getting some kind of chat spam so here is my console
Why does that happen in debug mode?
honestly i don't know i just know it happens, probably due to debug mode displaying errors or something but that's just a guess
@willow estuary didnt see anywhere to report errors to you on the mod page so il ping you here, getting an error with Military Vehicle Parts (build 41).
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Usually has to do with brush sprite textures that bug out.
Any clue how to interpret the result of this call? For example what does it mean if it returns 0.5 or something like that:
GameTime.instance.getRealworldSecondsSinceLastUpdate()```
more specifically, how much time 0.5 represent in the game?
guessing here, but 0.5 = 30 frames? (assuming its running at 60 fps) so not entirely sure it actually translates into "game time". the method returns 0.016666668 * a fps modifier, which basically = 1 if that multiplier is 60. at various other points (in different classes) that field holding the multiplier gets set to 60 divided by various variables i'm way to tired atm to properly trace
so 0.5 = half a second at 60 fps
@quasi geode thanks, I can't figure out the meaning of the boolean field here: https://pzwiki.miraheze.org/wiki/Modding:Lua_Events/OnUseVehicle
the boolean value is like: this.useVehicleDuration > 0.5F
anyone know which kind of mods need the most performance?
@hollow shadow the ones with the worst algorithm implemented? π
NGL, that looks amazing xD
It's very hard to tell the collision box is not round
Looks great
The alien at the top keeps tripping too
Maybe he's not actually infected - just trying to assimilate
are there mods which adds small storage boxes but with a high capacity?
@fast dagger try this one maybe: https://steamcommunity.com/sharedfiles/filedetails/?id=2509250999&searchtext=container
eh seems to work fine for now, thank you:)
is there a difference between these two version of Zomboid?
I wondered that myself. I always choose the iwillbackupmysave build every time so I would not know.
Right click PZ in your Steam library. Select "Properties" and navigate to the "Betas" tab. From the dropdown, select either "build41" or "iwillbackupmysave". They're both identical.
#frequentlyasked
Does anyone know if a mod exists that removes the "Delete All" button from all the trashcans?
I was never personally a fan of that feature after it was added to the game, and it's something I can easily just ignore in singleplayer, but I don't want that being a thing for when Build 41 eventually gets multiplayer, for a few reasons to be honest.
I've looked online but haven't been able to find a mod that does this yet.
@dry chasm thanks, btw the picture IS the property panel you're talking about
picture? panel? π
@dry chasm This one
aaand you lost me
There will be an option to disable it for multiplayer.
For the most part, things with "griefing potential" has an option to disable it in the MP settings.
Oh perfect, thanks!
idk who to relate this to, but some russian guy put up "multiplayer for Build41" on workshop stating that it's "likely won't work when downloaded to workshop" then provided a link to a yandex disk which is essentially russian google drive
mod is taken down now
i won't test this shit myself as it is likely malware or worse
and i dont see any report button
Is this not a direct link to it?
It is a direct link to a mod in workshop, although he provides another one in description.
Which might be a malware.
because he also tells that "instructions are there" baiting you to download it
@iron salmon read my post with link above please
btw i got the wrong link, i corrected that now
you were right
Also, if it isn't clear for anyone, don't subscribe to it and dont download shit from his link.
Might be just a simple fluke with enabling mp button in main menu, but it might as well be something like miner.
this is not malware
just why would he add some kind of malware there?
It's been removed; if you see anything that you have concerns about you can always DM nasko, or another moderator to let them know. (even if a moderator doesn't deal with workshop matters, they'll be able to let the right person know).
The report button on workshop pages is here:
π
Hello guys, sorry for the question (it is most likely basic and stupid). I'm fairly new to Lua, specifically to the one in Zomboid and I was wondering: how can I, still if possible, have a function that is called whenever a zombie is hitting something (such as a barricade), with a reference to the barricade (in this example)?
Thanks
change model through ClothingItem
https://streamable.com/spc1y2
local EasyModdingAPI = require "EasyModdingAPI"
local UpdateClothes = function(source)
local Player = EasyModdingAPI.Player(source)
Player:switchVisualClothing("DCP.Trousers_TacticalSWAT", "DCP.Trousers_TacticalSWATForBoots", "Shoes", {"Base.Shoes_ArmyBoots", "Base.Shoes_ArmyBootsDesert"})
end
Events.OnClothingUpdated.Add(UpdateClothes)
in some minutes I will release this API, in his initial state (few functions)
I have two questions about a mod I made - How do I make it so the character is holding an item in their other hand during the crafting animation? I have prop2:broom but I'd like the other hand to have a knife, for example.
the other question is that when they create the spear it always has max durability, but i'd like that to be the same random chance as the original craft spear recipe.
I believe adding a skill requirement will make the quality random, weighted by your skill of course
What will be in your API? What if 2 players in game?
what would that look like? I looked at the code for the spear and copied it but I am still getting max condition every time
When making clothes do you need to make a separate model for both male and female?
I know for normal clothes the answer is probably yes sice it would look bad otherwise but I mean more for something like my pillow armor
Can the same models work for both genders?
Yes just copy pasterino and rename
nice
oh so wait they do need to at least be seperate files?
that might explain why I can't see my clothes
a bit of everything, the idea is to provide new functions from those already in the game, an example of this would be switchVisualClothing() that a while ago I did and I forgot, If there two players, modder just need use getOnlinePlayers() this returns List<IsoPlayer> (Works for Client/Server sides)
Since IWBUMS not have MP yet, I don't think necessary add script for server/shared sides

Could someone explain clothing xml and guid works? I'm trying to figure out how to do clothing.
Specifically how to set up the GuidTable.xml properly.
from what I gather it's exactly how it looks in the vanilla files
this is how mine looks
my modded item is at the bottom
From where do you get the guid string from though?
With what?
Is there a way to change Player Temperature in there?
I've been trying all day to find a way to link it to Lua and try to change it, but from what I could see it's all controled by Java
(And I'm a newbie both in Lua and Java, soo...)
Free Online GUID/UUID Generator
Hi hi!
Can somebody remind me how it was to check if an specific mod was activated?
not for the moment, but I will leave it written down somewhere to add something related to that
Hard to make out, but this is the patch on the back:
Doing it as a favor to a dude. π
If I understand correctly all you need to do is go to 'Load' on the Main Menu and check the save for your playthrough under the 'Mods' section
No no, but I mean, in the code, to do something if an specific mod is activated
getActivatedMods():contains("ModID")
can someone please look at my logs and help me figure out why my clothing won't show up on my player or when I place it on the ground?
so would it be legal for me to make vr version of the game, basically with unity but make it rely on the actual games files to work so that nobody who didn't buy the game can play it ?
like, boot up unity export models make the map ect... same with ai and crafting ect... but, again make it depend on the actual game basically like a mod but a bit bigger
ofc for free no paywall require to play it, well obviously it wouldn't be out for a long time like probably when B42 is fully release
In case anyone is willing to do archaeology on Zomboid source code π
https://quarantin.github.io/zomboid-javadoc/38.30/
https://quarantin.github.io/zomboid-javadoc/39.67/
https://quarantin.github.io/zomboid-javadoc/40.43/
https://quarantin.github.io/zomboid-javadoc/41.56/
Thanks!!
Sounds like something very ambitious, I recommend contact to developers
As far as I know, it is allowed with mods just because they allow it and give the facility to do them
i mean since i'm not trying to make something new, the only tedious task is making the map, the code, the models, the ai, is there
an other way to do this but to complicated for me to do, would be to use to player to detect the tiles he is on and the ones in his field of view with raycast and to detect zombies then, make a 3d model of the scene accordingly, but that would be pretty laggy i'm sure
and messy too
and wouldn't work well with combat yeah i don't think i'll use this approach if the dev let me do this
This sounds like something that you would need to ask a representative of The Indie Stone in regards to what permissions they would grant you for such a project, and not anything that any third parties in the modding channel would be able to help you with. @ nasKo is the person who usually fields this kind of stuff.
Isn't like 90% of the game 2D anyway? Like how would you even render that?
That would be like trying to make a VR version of CDDA.
make a 3d model of each tile and when detected place them
That's pretty much what you'd have to do, yeah.
so when it knows that there's a lets say grass tile below you you load up the grass tile that you would have made yourself
At that point you might was well just make a brand new game, since you'd need to use a better engine that can handle a straight 3d environment like that.
but i'll ask the devs, and if i they allow me to do it i'll probably just make a vr version of project zomboid, normally so just i remake the map load in the existing 3d models ect.. and make it so that the game won't load if you don't already have PZ
So yeah basically what you said but it would be a copy of pz relying on the game to work, otherwise that would be plagia
after all my only motivation to make this is because i really want to play this game in vr, it's already so immersive and fun so i can't imagine in vr. anything else than that would be pointless to me
anyways this is just speculations since the devs didn't reply yet (i dm them to see if they would allow me to do so)
btw thanks i wouldn't have know who to ask
@drifting ore legally speaking I think what you describe is just some sort of modding
as long as you don't distribute the game files and users still have to buy the game, I see no reason for them to refuse
unless of course if they have a VR plan or something, but I doubt it for now π
but don't take what I said for granted, I'm no lawyer
also different laws in different countries so
PZ does not work in any other view or render
people get disappointed that dayz or other games like PZ do not have massive hordes of zombies
specifically because the moment you slip them into those realms the games demands increase eight fold
I don't think that's a problem, you could have a mod that check the PZ world in real-time to communicate the info to the VR engine
of course, but then you have a recipe for some really good pancakes and attempt to make that translate in cake form
youll get some success but ultimately itll just crap out
@craggy furnace he said he would make 3D versions of every tile in the game π
so assuming he manages to do that, the rest is piece of cake, or well sort of
nah i scratched that idea i'll just remake the map is way easier
- i asked the dev and i got a greenlight
yay
@drifting ore man, not sure how I can help, but I'd really be looking forward to a Zomboid VR mod
yeah attempting to 1 to 1 in terms of recreation would be like eating chalk in terms of food enjoyment
if I can help in any way don't hesitate!
if you mangage to pull it off it would be one hell of an amazing mod
hell the devs should hire you if you succeed
clearly
i'll do the basics like vr rigging and every thing that i can but if i have trouble with some things i'll dm you
map, recipe , menu but i think that there's thing like erosion that are going to be harder
@drifting ore I'm a coder btw π
could you look over my mod quick and help me with why the back piece of my armor won't work. I got the front piece going but no luck on the back
I think it's because it takes the bag slot
idk
@hot patrol sounds like a 3D problem, I'm no 3D designer though
the model should work I think it is an issue with the xml since the front piece was having a similar issue
I can send over my log
@hot patrol sure we can check
well
well since 3d object and tiles are different if i were to do this, a plant texture would be spread out on the entire wall
but i'll start and the beginning
making a new unity project and getting started
you need to make it a "thin" project if you want to succeed
going wide will burn you out and you will quit before you know it
so anybody see what might be wrong?
its better to have 5 small victories then one large defeat because you are fighting to make something work
true, for now i'll try to model the smallest city, some forest, and add basic stuff like combat, crafting, first aid, then i'll build what i want from there
you wouldnt be familiar with CAPI, would you?
I don't know what's CAPI exactly
one sec
@hot patrol You have other mods?
You have some really strange errors in some places that shouldn't break
@hot patrol which event handlers do you register in your mod?
what does that mean?
like: Events.OnGameStart.Add(yourFunction)
uhhh how would I find out?
haven't you made your own mod?
this is my first semi complex one
and I know little about coding. I have been jumping from guide to guide and help from on here
yea I don't think I have anything like that in my mod
@hot patrol could you make a new game with a short run to trigger the bug you want to fix? The one you provided has too many errors
sure thing
then you quit the game as fast as possible, and then upload the log
so i'll just log in, spawn the item try to wear it and log out
@hot patrol also check your mod media folder and search for every file that contains "Events." in them (with a upper E at the beginning)
yes!
I did and came across nothing
@hot patrol you have no .lua file at all in your mod?
I do but only for distribution and a custom zombie
both have nothing for events in the code
mm ok
weird, you have the same errors about the ISRecordeMedia.lua, never seen this error before and I'm using same version as you:
OG : General , 1636937663398> -------------------------------------------------------------
attempted index: setTitle of non-table: null
LOG : General , 1636937663405> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21
ERROR: General , 1636937663422> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: setTitle of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1636937663423> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: setTitle of non-table: null
...
at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:262)
at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:219)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1636937663424> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21```
I think I had someone else tell me this. I have no idea why
it doesn't seem to effect my game
but I was getting 1 error
idk if that is what is causing my mod problems tho
and also this one: ```STACK TRACE
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@4b373bc3
function: render -- file: ISToolTipInv.lua line # 108

and this:
-----------------------------------------
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@4682e541
function: perform -- file: ISWearClothing.lua line # 72```
@hot patrol sorry for asking again, but you sure you don't have any mod enabled except the one you're trying to debug?
I only enabled my mod in the world creation settings and I'm fairly sure I have no mods enabled on the base game
I will look again
@hot patrol ok just need to be sure, because those error, if not coming from another mod, they really have to come from your mod
nope, nothing
ok
@hot patrol do you have your mod published online somewhere so I can have a look at it?
@hot patrol is this file supposed to be in there? daki.psd
it was just the photoshop for the textures. I planned to move it once it was done
there are some other files like that. I didn't think it would effect things
ok
I keep a messy work space lol
all right, let's see if I get the same errors as you
@hot patrol what should I do to trigger your bug?
type daki in item spawner and try to wear the one that ends in back
power dakimakura back

well
its a good thing
if I wasn't getting the same error I wouldn't be able to help you π
truu
or to try to help you at least
and it means there is indeed a problem to fix
@hot patrol how come the icon in inventory is not OK?
I haven't made it yet
yep minus the ground model for the armor
both the back anf front piece use the same ground model
I'm not even getting the option to place
ok so there's defeintely a problem already when you right click the item in inventory
Anyone played with the "ReplaceOnRotten ="? Can't get it to spawn the item, the initial item is removed but then nothing π
if the itemname alone doesn't work, add the module with a dot infront of it ex.: Base.RippedSheets
it is meant to use the back pack slot but it's not supposed to be a back pack
maybe that's why
@hot patrol so I know knowing about cloth and wearable in general, so I need to ask a few silly questions π
@hot patrol why do you have so many entries in your fileGuidTable.txt?
Tried it both ways, that was the initial attempt at fixing, now I'm trying if the replacing item HAS to be a food item
ok so I have a custom zombie that spawns with vanilla clothes on so I needed those clothes in my guidtable. I was told to just stick the entire games guid table in there just in case I ever want to use any of those clothes
I was stuck for a week on why my zeds spawned nude
ok
Turns out it has to be a food item, well that was a simple fix, thanks anyway π€£
I wish getting custom clothing onto zombies wasn't so complex. I have literally no idea how or where to start.
what do you want to know?
Well, I have a custom biker jacket I want to be able to spawn on zeds, but I can't even figure out where in the game files are the instructions governing zed outfits.
Like, where's the table that outlines what, say, a given zombie wears then?
you assign them an outfit, a name, then you dress them with clothingitems via clothing guid
only "difficult" part is finding where to spawn them
authenticZ is your go to destination to look at as a reference
Well I know where I want this item to spawn, on zombies at bars and the like, as well as more rarely in the world.
"ZombiesZoneDefinition.Bar" is what it's called in the game files.
@hot patrol ah yeah, I see what you mean about the bag, that could be the issue
sadly I have no clue how to fix it. I thought I put all the important info in there for it to work
@craggy furnace
So I got this hammered out:
`require 'NPCs/ZombiesZoneDefinition'
ZombiesZoneDefinition.Bar = {
WSJacket = {
name="WSJacket",
chance=40,
},
}`
Is that even vaguely correct? π
'WSJacket' being the name of the item in the guid file.
require "NPCs/ZombiesZoneDefinition"
table.insert(ZombiesZoneDefinition.Default,{name = "YOURNAMEHERE", chance=1)
ZombiesZoneDefinition.Bar.YOURNAMEHERE = {
name="YOURNAMEHERE",
chance=10,
}
Put this is a sub-directory of lua/shared/NPCs or else it will get overwritten by other mods that have zombie zones definitions.
You needs to have a zombie outfit defined, using your jacket as part of it, for YOURNAMEHERE
You define outfits in media/clothing/clothing.xml, just take the biker outfit and replace the jacket with your jacket and give it a new name.
All of the clothing items used in your outfit definition need to be in the fileGuid.xml file.
@hot patrol So I just tried something, basically I replaced your clothing/PowerDakiArmor.txt script with this one:
@hot patrol then I can equip the back armor, and it works fine without crash, is properly equipped on the back of the character, but when I try to put the front after that, then the back disappear
follow his directions
I'm thinking maybe you have some shared stuff between the two?
oh I see why
models
you made them both aprons
yes, but the back is really being displayed on the back of the character
and I guess you can have only one apron, so yes that's probably why
Can pz handle fbx animation?
yea but they need to be able to work together so they need to occupy different spots. plus I have it use a bag slot because I don't want you to be able to wear a bag with the back piece
but that at least proves that it being a bag is the problem
but why
I have the back model using the bag bones
idk if that matters
@hot patrol I think somehow you're telling the game that your back armor is a bag pack, so it tries to act as if it was one, that's why you're getting errors when hovering over it with the mouse, or right clicking, cause a bag item will trigger these behaviors, like trying to get the items in there etc
wait do you think making the type = bag or whatever backpacks use might work?
I basically want it to be a backpack with no slots that offers protection
@hot patrol
@hot patrol try this: ``` item PowerDakiArmorBack
{
Type = Clothing,
Icon = Test,
DisplayName = Power Dakimakura Armor Back,
ClothingItem = PowerDakiArmorBack,
BodyLocation = Back,
BloodLocation = Bag,
RunSpeedModifier = 0.93,
CombatSpeedModifier = 0.98,
BiteDefense = 90,
ScratchDefense - 90,
Insulation = 0.2,
WindResistance = 0.05,
FabricType = Cotton,
WaterResistance = 0,
Weight = 4,
WorldStaticModel = PowerDakiArmor_ground,
}
Oh, I don't like this: Caused by: java.lang.ClassCastException: class zombie.inventory.types.InventoryContainer cannot be cast to class zombie.inventory.types.Clothing (zombie.inventory.types.InventoryContainer and zombie.inventory.types.Clothing are in unnamed module of loader 'app')
@hot patrol also when I put on a bag, it remove the pillow in the back, if I put the pillow again the bagpack is removed
it's means it's trying to use a bag as a clothing item
The tooltip code does not like clothing and containers sharing the same clothing slot.
@hot patrol so try to make your back armor to be a container where you can put 0 weight in there
Containers can't have protective properties FYI
will that make it show up in the inventory area on the bag slot tho?
@willow estuary ah good to know
This is the code I use to keep PZ from spewing errors when clothing and containers use the same slot; it's a janky measure in that clothing items that "conflict" withe container won't have a tooltip on mouseover when there are conflicts but it works for my stuff?
require "ISUI/ISToolTipInv"
local old_ISToolTipInv_render = ISToolTipInv.render
function ISToolTipInv:render()
if self.item
and instanceof( self.item, "Clothing")
and self.item:getBodyLocation()
and getPlayer():getWornItem(self.item:getBodyLocation())
and instanceof( getPlayer():getWornItem(self.item:getBodyLocation()), "InventoryContainer")
then
return false
end
old_ISToolTipInv_render(self)
end
nice where would I put that?
Somewhere in the media/client/lua directory, with the caveat that it works for my stuff but no guarantees.
Believe me, you do not want a mod on the workshop that spams errors, even if they are inconsequential.
Unless you like getting lots of DMs and pings from fussy strangers.
@hot patrol try what @willow estuary said
Something unique dot lua.
@hot patrol what do you mean?
I just hover with the mouse over the back armor in inventory and it triggers errors as long as I keep the mouse over the back armor
ohhh
like red square errors in the bottom right of the screen
The lua file solved it correct?
pretty sure. checking again
I still get 1 error loading into the game
yep the error you spoke of is gone
Clothing item tooltips want to compare the clothing item with any clothing item currently worn using the same "clothing slot".
If there's a container, and not a clothing item, in the slot, then it doesn't know how to interpret the information from it to generate the tooltip.
@hot patrol oh sorry, I only get the error when a bag pack is equipped
Can I ask a dummy question? getSpecificPlayer(0); what does "0" mean and can I just ignore it? Like getSpecificPlayer();
I have it equipped and hovering on it in inv does nothing blair fixed it
@hot patrol you have a backpack equipped and the back armor in your inventory ?
yep
well good stuff
I'm almost to the finish line now
the foundation of my mod is done now I just need to add more varients and tweak the stats
basically a lot of copy pasting
my biggest question is if I shoulf make them all seperate items or if I can make 1 model have multiple texture varients
I think I had asked this before
also getting it be able to spawn in the world outside of containers would be a big bonus
shurutsue explained the last one to me but tbh I didn't understand it so i might have to pass on it for now
either way thank you both a ton
@hot patrol this is the java code that triggers the bug:
if (!this.isEquipped() && tooltip.getCharacter() != null) {
float biteDefense = 0.0F;
float scratchDefense = 0.0F;
float bulletDefense = 0.0F;
WornItems wornItems = tooltip.getCharacter().getWornItems();
for(int i = 0; i < wornItems.size(); ++i) {
WornItem wornItem = wornItems.get(i);
if (this.getBodyLocation().equals(wornItem.getLocation()) || wornItems.getBodyLocationGroup().isExclusive(this.getBodyLocation(), wornItem.getLocation())) {
biteDefense += ((Clothing)wornItem.getItem()).getBiteDefense();
scratchDefense += ((Clothing)wornItem.getItem()).getScratchDefense();
bulletDefense += ((Clothing)wornItem.getItem()).getBulletDefense();
}
}```
the spam bug? It's fixed for me. blairs code fixed it
I confirm, it fixed it for me too
nice
I still get 1 error loading in but i've been getting that for a while and I think it happens even with no mods
there's no error at load time in 41.56 with no mod
@hot patrol mmm weird, it was one of the errors I was seeing in the beginning
but I don't have it on my side
yea idk. I even varified game files
do you also get the error with a fresh game?
I can live with it so long as it's not my mod
yea that's what that was
fresh modless world
@hot patrol very weird:
LOG : General , 1636943293290> -------------------------------------------------------------
attempted index: setTitle of non-table: null
LOG : General , 1636943293290> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21
ERROR: General , 1636943293291> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: setTitle of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1636943293291> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: setTitle of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:88)
at zombie.radio.media.RecordedMedia.init(RecordedMedia.java:70)
at zombie.radio.ZomboidRadio.Init(ZomboidRadio.java:192)
at zombie.iso.IsoWorld.init(IsoWorld.java:2280)
at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:262)
at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:219)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1636943293293> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21```
see the first line?
this one: RecordeMedia -> MediaData id already exists : 89108e07-fc70-4eec-a267-790d6f4b9831
what about it?
it looks like you have another object with that UUID, so the ISRecordeMedia.lua is trying to use that other object instead of a radio
not sure what that means but I see radio. Is this an audio related issue?
if so I think I know why
I used to use that audio ovehaul mod
probably yes
guess it broke something then
try to search this UUID in all your game files under media/ folder: 89108e07-fc70-4eec-a267-790d6f4b9831
you would thing varifying game integrity would fix that tho, no?
possibly not
Steam just checks the files it knows about, if you have extra file it might just ignore them
and if you have a conflicting item with that UUID in a file that is not part of vanilla, that would definitely explain this bug
so how am I searching this?
just search for this 89108e07-fc70-4eec-a267-790d6f4b9831 in the content of your game files under the folder ./media
I would try a fresh install then
yea will do
for now I can live with it
thanks tho
I appreciate it
man, a lot has gotten done tonight
@hot patrol let's say you owe me a few hours of your time when I'll try to make some models, sounds fair? π
I would have to point you in MichealChicksons direction. I know about as much about blender and modeling as i do coding
lol
I only made the one pillow. He made the armor
haha ok
well you still have knowledge that I don't have I think
just going through making your mod, you touched a lot of things I never played with yet
yea it blows my mind as well. This was meant to be a simple shit post mod
to play around with
but everyone here piled on the great ideas and now it is a monster shit post
heh
i bet
anyways I'm gonna call it a night. If you have any clues on how I can tackle my remaining tasks hit me up
^
night everyone! 
good night!
Man.. I know some people have been making special zombie mods, but it would be amazing if there were a mod that makes some zombies have the "environmental attacks" feature on
I think i found my next mod! Make it possible to throw zombies out the window! It could be called "Out the window" or something π
@soft musk shouln't be too hard
Is there a Quiet Place mod?
Update of the day for (wip) addon:
- Added Jefferson and (accurate) Knox County Sheriff Vics
- Got all custom sirens to work properly
noice
does the supbar survivor mods still work? starting in the camps with populations and theres no npcs at all
It worked in normal game yesterday so your camp might be simply busted
Why does my fashion montage work? I can not customize character more, but i have enabled it
Guys is there an event for when a barricade Is damaged or something that can make me achieve that? Thanks
Does anyone have any experience with monkeypatching?
I'm trying to modify a function of Better Lockpicking, but still want the mod to require the rest of that mod.
The function I'm trying to modify is CheckAlarmBuildingAction:perform()
I tried the current solution
local BLCheckBuildAlarm = betterLockpicking.CheckAlarmBuildingAction
betterLockpicking.CheckAlarmBuildingAction = function CheckAlarmBuildingAction:perform()
local alarmFound = false
if self.obj:getModData()["BetLock_cantCheckAlarm"] == nil then
self.obj:getModData()["BetLock_cantCheckAlarm"] = (ZombRand(100) < 5)
end
if self.obj:getModData()["BetLock_cantCheckAlarm"] then
self.character:Say(getText("UI_cant_check_alarm"))
else
if (self.sq1:getBuilding() and self.sq1:getBuilding():getDef():isAlarmed()) or (self.sq2:getBuilding() and self.sq2:getBuilding():getDef():isAlarmed()) then
self.character:Say(getText("UI_is_alarm"))
alarmFound = true
else
self.character:Say(getText("UI_is_no_alarm"))
alarmFound = true
end
end
ISBaseTimedAction.perform(self)
return BLCheckBuildAlarm
end
But it didn't work.
Basically what I'm trying to do is insert the alarmFound variable in the Better Lockpicking mod.
@tired charm probably this one: https://pzwiki.miraheze.org/wiki/Modding:Lua_Events/OnDestroyIsoThumpable
thank you a lot β€οΈ
yw
anyone has a cool mod?
what are you looking for? The workshop has tons of great mods!
Hello! Could someone take a look at a trait mod I am working on? Something is not working right, but I don't know what.
what is trait mod
@south brook it's a custom made trait.
can I see it?
It is not finished yet - you should check out the More Traits mod in the Workshop!
Anyone know if there's a way to get a clothing items random tint value and apply it to another item? Been messing with an idea for makeshift winter clothing and a couple of the things I've made use recipes to basically change another clothing item into something else and I wanted the new item created using the other item to have to same tint value/colour?
For example one of the recipes uses socks to make sock gloves in case you can't find anything else for warmth and it all works fine, only that the gloves are set to random tint as well and obviously come out a completely different colour to the socks you used to make them. Is there a way I can get the tint value of an item used in crafting and apply it to the result I guess, if that makes sense π
Any idea's would be muchly appreciated
π
My own code, no guarantees it will work for you, rename the function so it doesn't conflict with my stuff, yadda yadda yadda
function TransferColor(items, result, player)
local ClothingColor = nil
for i=0,items:size()-1 do
local item = items:get(i)
if item:IsClothing() then
ClothingColor = item:getColor()
end
end
result:setColor(ClothingColor)
result:getVisual():setTint(ImmutableColor.new(ClothingColor))
end
Can I take for granted the fact that a player will never have more than one corpse in inventory etc?
arf
no
just managed to have two π
grab corpse, put it in bagpack, drop backpack, grab other corpse, equip backpack
so there's a tiny bug, once you put a corpse in your backpack, even if you unpack the corpse you don't have the option to "Drop Corpse" when right-clicking on the ground
and if I right click on the corpse in my inventory, I can "Grab Corpse" instead of "Drop Corpse"
if I try to grab the corpse in my inventory I'm getting this in console.txt: LOG : General , 1636998618238> bugged action, cleared queue zombie.characters.CharacterTimedActions.LuaTimedActionNew@10dc043e
theres no backpack in the game that allows you to put a corpse in it
Debug mode?
ah, yes, does that change something?
Absolutely.
Why?
A lot of the limitations for handling stuff in the inventory is disabled when in debug mode.
@willow estuary does it affect the game even if you quit to desktop, disable debug mode, and continue the same game?
Cause I was still able to put the corpse in my bag
the bag was the Big Hiking Bag
@hollow shadow any clue?
i was able to do some weird stuff in debug mode when i tried it.
i think i stuffed like 1000 corpses ina duffle bag in my hands 5 months ago
with it
but im not sure since it was a long time ago
@hollow shadow I mean if I start a new game to get a bag, quit to desktop, disable debug mode and continue same game, will the game still be affected by debug mode allowing me to put whatever stuff in my bag like corpses?
i dont know.
thx
Thanks so much! And sorry in advance for a probably really dumb question π
Is it enough to just put this in lua somewhere, rename the function and turn off random tint for the recipe result? Or does the function need to be called somewhere?
Actually I might be able to work it out by looking at your knitting mod ^^ If I end up hitting a dead end I'll ask again here
Again, thanks heaps though. Would've had no idea where to start otherwise
Generally moving the corpses and generators inside of your inventory trigger dropping it. Some mods break this.
@sour island I'm was not using any mod during the test
I know just a heads up to anyone
Why is it that when I try to place an irrigation pipe on the red square's place, it is put in another place?
Same to the solar panel mod
go to #old_techsupport
Itβs a mod so mod support goes here
When I check the properties of an IsoWindow object, I don't get the same "Facing" value depending if I look with Chunk Debugger, or when I print the value from Lua code. Any one could explain what the f*** is going on here? π
oh, and here's the code I'm using:
Any clue?
The worst is if I check a window oriented in the opposite direction, the values are OK, both Chunk Debugger and console show the same value, that is West
Got same problem for North and South
@sour island any clue?
Have you tried pulling out the lambda into a named function? I had some issues with them before
@agile coral you mean the one I'm passing to getAllEvalRecurse()?
yeah
just to double check, are you querying the same floor tile in both examples?
@grizzled grove well with chunk debugger I select the only tile around with an IsoWindow in it, and from the code I check if the object is an instance of IsoWindow, so not sure but I'd say yes? Otherwise how can I know?
@agile coral but the getAllEvalRecurse() is just to get the corpse in player inventory, not related to the window. What kind of issue were you having?
I dunno about the discrepancy between debug and your code, but, as far as I know, windows only have two "facing values", the north/south ones and east/west ones?
Windows only exist on the west and northern edge of a tile.
So a west facing windows is the same as an east facing window.
i just don't know how you're calling your script is all. We have a tendency to click on the visible part of the object, which could lead to the tile behind the one you're wanting info on.
debug is returning 'facing E' though. i think it might matter for in/out of a room and for animation
@willow estuary but then why Chunk debugger is showing East for the first window, and West for the window in the opposite direction?
I have no idea? Could be just two ways of saying the same thing from what I know about windows?
Debug is also specifically a tool for the devs, and isn't designed/intended for other uses? I mean it's useful for making mods, but that's not the intent of it's design?
I'd just look at the chunk debug code for answers though, but as far as I know a west facing window is also a east facing window?
Windows and doors are both funky to deal with IME on account of the whole "only existing on the western or northern edge of a tile" business.
@grizzled grove but the other tiles are not IsoWindows? I check like this: if instanceof(object, 'IsoWindow')
Ah, the chunk debugger probably has extra code for "facings"?
@willow estuary ok so how could I determine which is the square outside the window just in front of it? Cause some window square are inside or outside depending on their orientation
so calling window:getSquare():isOutside() is not helping
I don't remember how I did it, other than it was a pain in the ass to be honest?
@willow estuary have made a mod that does that?
i would assume they're all isoWindows
@grizzled grove I was saying this regarding: We have a tendency to click on the visible part of the object, which could lead to the tile behind the one you're wanting info on.
Ah, here we go, square:isWindowTo(square2), that's what I used for the most part.
assuming square is the "point of origin"
if square1:isWindow(to the other square north of square1) then the window faces north, and so forth.
@willow estuary mmm so I would have to check the four square around the window square? Like window square has coordinates (x, y), then I will have to call windowSquare:isWindowTo() for each square with coordinates (x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1), is that correct?
or just two square to check maybe
Yeah, that seems to be what I uses for evaluating windows.
I'm tempted to open a bug report about this
but yeah what you propose should be working indeed
@agile coral FYI, just tried to make a proper function but same result. But now I'm, curious, what kind of issue were you having with closure?
I don't really remember now to be honest. I think it was something with an event not firing correctly
ok
was probably something else messing with the event then. lua functions are "first class functitons"
ie: they're just variables with a function type instead of something like string or number
All global variables Client side
Any clue when you have a corpse item in your inventory how to get the corresponding IsoDeadBody?
could be tricky. when you pick it up, its converted into a InventoryItem and the IsoDeadBody is stored as byte data via InventoryItem.storeInByteData()
when you drop it, the timed action ISDropWorldItemAction calls IsoGridSquare.AddWorldInventoryItem(), which checks the byte data and converts it back
dont really think you could reimplement some of what the java is doing there via lua, but you can take a look. starting at line 4836 in IsoGridSquare (in iwbums version)
thanks @quasi geode β€οΈ
I suspected the InventoryItem.storeInByteData() had something to do with it but could not figure how to get back the IsoDeadBody
been looking for a DropCorpse action in lua but couldn't find it
I suspect IsoGridSquare also has a role to play in there
especially this: public InventoryItem AddWorldInventoryItem(..
it has a block like this: ```java
IsoDeadBody var6 = new IsoDeadBody(IsoWorld.instance.CurrentCell);
try {
byte var7 = var1.byteData.get();
byte var16 = var1.byteData.get();
byte var9 = var1.byteData.get();
byte var10 = var1.byteData.get();
int var11 = 56;
if (var7 == 87 && var16 == 86 && var9 == 69 && var10 == 82) {
var11 = var1.byteData.getInt();
} else {
var1.byteData.rewind();
}
var6.load(var1.byteData, var11);
} catch (IOException var12) {
var12.printStackTrace();
IsoZombie var8 = new IsoZombie((IsoCell)null);
var8.dir = var6.dir;
var8.current = this;
var8.x = var6.x;
var8.y = var6.y;
var8.z = var6.z;
var6 = new IsoDeadBody(var8);
}
var6.setX((float)this.x + var2);
var6.setY((float)this.y + var3);
var6.setZ((float)this.z);
var6.square = this;
this.addCorpse(var6, false);
and it's adding the corpse to the square
haha yes!!!! β€οΈ
@quasi geode simply call square:AddWorldInventoryItem(corpseItem, 0, 0, 0) and it works! π
or well, the corpse is not exactly where I want it to be, but at least I get a body!
ah ya thats the block of code i was referring too
lol
sorry for screaming but I'm so happy π
didnt realize you wanted it to spawn, just thought you wanted a reference to it otherwise i would have just suggested calling the function (i'm only half-thinking at this time of night). good that it works for your purpose though
π π π π π
Who said there was no gravity in Project Zomboid ??? π
guess I could make it fall properly, so you actually see the fall, not sure it's worth it though
and now I deserve a good night sleep! nite all, thanks again @quasi geode
So I'm trying out the Turning Time mod. Does the spawn of Banshees/Nemeses depend on the zombie population as well? I'm trying to see if it's possible to create a survival where the only zombie spawns are Banshees or Nemeses depending on my choice.
so i switched from old blender to new blender. And i cant figure out how to turn cylinder into prism when i spawn it. Any help?
nvm i switced to old blender
Yeah, it depends on standard population. I could add some kind of challenge mode
The thing is, it would be way harder to find bags and some clothes, that would be my main concern
@hollow shadow I usually google for the name of the stuff I'm trying to do, adding the exact version of blender. I usually find some video, where I can see how it's done π
screw new blender.
blender 2.7 is chad
i googled for it and didnt find anything
Hey someone know some way to get OutfitManager class?
Do you think it's possible in the game too add news models of zombies with news hitbox and animations ? For exemple, If i want to make a left4dead fan game and add a boomer ?
Models yes and anims yes
Some mods already do
HItboxes? Probably not.
That will be feasible when animals are added to vanilla however.
@hollow shadow would you like to get it to work in blender 2.8x? I can probably help
I'm not really a 3D designer, but I learned the basics for both 2.7 and 2.8
Nevermind I thought that was about something else
its ok i made like 200 models in 2.7 so ima rather save time and keep using that instead of learning it again
so, if i get it right. We can change model and anim but in the game mind, you have the same hitbox than an humanoid.
@hollow shadow sure I understand π
Ty for the informations π
200, jebus
You sound like you're gonna have some fun
Ehy everyone. What's wrong with the Fertilizer? Using it in recipe makes game sick (crafting menu doesnt appear, gamepad broken)
can someone help me a mod i subscribed isnt showing up in mod tab to enable it
ok got it working after reinstalling my entire game
nice, but would be more fitting for #old_techsupport next time π
There's a delay between the time a mod is downloaded and when you can launch your client. You just need to close down the game and launch again until you see the mod
Anyone who encountered this bug, please reply to the thread to confirm you have it too:
https://theindiestone.com/forums/index.php?/topic/41757-memory-leak-in-zomboid-game-engine/
for me it happens after I start too many new games and/or load too many saved games
hmm has not happened to me
A challenge mode would be interesting, maybe if it removes the zombies and leaves only the specials and kind of plants the player into this Nightmare scenario.
Either as a challenge or a separate mod. I'd prefer a separate mod because it allows the players to retain the freedom to select via sandbox or defaults, rather than spawn them in the same predetermined location.
But I guess it depends on what is or isn't possible modding-wise.
I've been trying to add a few pices of clothing for a while noe, but I can't get the texture to work, I've even changed a base game item texture to make sure I was doing it right and it worked then, also the item icon for the added clothing changes it's color
I've noticed the leak as well when I was working on mods. The UI would slow down and starting taking longer and longer to load/unload the files. I never got it to actually crash though since my mods are small and I don't have any current saves
@agile coral good to know, could you please acknowledge on the thread you're also having the issue with UI slow down when you start/load/quit games many times?
also I'm writing a script to monitor memory heap usage of Zomboid process, I can already see between each loading/new game that heap space keep increasing
Sure, I added my $0.02 to the thread
I did it!
I just needed to move the fileGuidTable.xml from clothing to media
found a guide on modding and the author said that a lot of people frown upon Java modding. If this is true, why is that?
The only person I've ever heard say that was the author of that guide so I dunno?
@agile coral thanks man!
I may just be harder to get past the workshop screening prosses
@wild estuary probably true when there's no support for modding, might be a nightmare in that case
but in Zomboid case there's an official API for modding, and it's really good. Not perfect but it's still allows you to do many crazy things
yeah they mentioned that so I'm gonna take a look at that. A lot more comfortable with Java than Lua
Where's a good place to learn lava, I've only messed around with lua
Except for closed window and barricade, anything that can block passage through a window? Maybe with metalworking, i'm not sure
I would guess searching up walkthroughs or java/tutorials on youtube and sites like geeksforgeeks. The usual. I learned Java in college so it was kinda force fed to me lol, but I would focus on the stuff that not only shows the syntax and semantics of Java, but also stuff like OOP that shows why Java is so powerful
ok, thanks
If you need anymore help regarding this, let me know!
Awesome! EnigmaGrey from The Indie Stone acknowledged the mem leak bug I reported! I'm so happy π
https://theindiestone.com/forums/index.php?/topic/41757-memory-leak-in-zomboid-game-engine/#elComment_325143
@agile coral check ---^
Aha, so there WAS a leak after all
lmao why put a xml path if it won't work
final String guidFromFilePath3 = ZomboidFileSystem.instance.getGuidFromFilePath("media/clothing/clothingItems/" + item.getClothingItem() + ".xml");
What do you mean?
In fileGuidTable you can set xml path of your ClothingItem, but it doesn't matter, always will be in ../clothingItems/ folder
Just had a workshop update that disabled a load of mods on my save (near pee'd myself, fearing corruption)... Don't think I've seen that before?
Any clue what I'm doing wrong? I'm trying to figure out the square on the other side of a window, but this code always trigger the error at the end:
function getOppositeSquare(player, window)
local square = window:getSquare()
local x = square:getX()
local y = square:getY()
local z = square:getZ()
local sq1 = getSquare(x + 1, y, z)
local sq2 = getSquare(x - 1, y, z)
local sq2 = getSquare(x, y + 1, z)
local sq3 = getSquare(x, y - 1, z)
if square:isWindowTo(sq1) then
return sq1
elseif square:isWindowTo(sq2) then
return sq2
elseif square:isWindowTo(sq3) then
return sq3
elseif square:isWindowTo(sq4) then
return sq4
end
error('This should never happen!')
end```
@willow estuary any clue? Trying to implement your idea
can't figure out why none of sq1, sq2, sq3, sq4 are the opposing square considering the coordinates
oh man, this is driving me nuts π
How can I get the player's current equipped weapon subCategory?
local player = getSpecificPlayer(0);
local equipped = player:get??
Thanks!
@zealous glade found it yet?
yes, trying to figure it out how to use it
It seems to be a handweapon in the inventory? I don't know how to get the equipped weapon.
@zealous glade have you searched for weapon in the link I sent you? π
yes I think that's it
not sure what it does if you have two hand weapons equipped though
I think it's still functional with two handed weapons
no I don't mean a two handed weapons, but like if you have a hammer in one hand, and a screwdriver in the other for instance
guess it will return the primary hand weapon but I'm not sure
It doesn't matter, my goal is to get the subcatogory of the equipped weapon that kills the zombie. If it can attack, it must be an equipped weapon, right?
Can I ask another dumb question? How to define if the zombie is killed by the player?
@zealous glade probably with this event: https://pzwiki.miraheze.org/wiki/Modding:Lua_Events/OnHitZombie
local function realZombie(zombie)
local player = getSpecificPlayer(0);
local equipped = player:getUsehandWeapon():getSubCategory();
local corpse = zombie
--the zombie is hit by player
if corpse:Hit(player) then
--the zombie is dead because player kills it
if corpse and instanceof(corpse, "IsoDeadBody") then
--the weapon player uses to kill it is a Swinging type
if equipped == "Swinging" then
--there is a chance that zombie doesn't die, it comes back later
local Rand = ZombRand(1, 100);
print(Rand);
if Rand < 25 then
corpse:setReanimateTime(10);
end
end
end
end
Events.OnContainerUpdate.Add(realZombie);```
I know it's dumb, sorry about the mess.
I don't know if it is correct to write corpse:Hit(player) to define the zombie is killed by player or not
Are you testing to see if sq1, sq2, sq3, or sq4 are nil?
@kind surge no, but why would they be nil?
it's not on the border of the map or something
@zealous glade probably not, if I'm not mistaken, that would make the zombie hit the player
Is this above ground level? Squares of "air" above the ground can be nil. This bit me recently, so it jumps out at me as one possible cause.
@kind surge right now I've been testing on ground level, still no square returns true for IsWindowTo π¦
@zealous glade that's not the proper event I think
also the parameter could be either Food, or IsoDeadBody, or IsoGridSquare, or IsoWorldInventoryObject
so if you call the method Hit() that would probably trigger an error in all cases
cause none of these objects have a Hit method AFAIK
I see, I'm still stuck at figuring out how to write correctly and call the methods correctly
Thanks man, have to learn hard now
try with the event I told you about, and just check if the zombie has his health equal to zero
is it possible someone could show me the structure i need to use to make a mod that adds guns
file type for models, sounds need to be ogg I think?
is it possible I could just copy paste the files for vanilla guns and change that?
the better way to do it, it's to watch the code inside other mods that do the same.
how
i think i mostly have this figured out but id greatly appreciate knowing how tod that
if you really want more information about modding in zomboid, i suggest you to watch these tutorial. It introduce you to lua coding et explain the "structure" used by the game. https://github.com/FWolfe/Zomboid-Modding-Guide
@hoary hawk https://steamcommunity.com/sharedfiles/filedetails/?id=2628113354 You might want to check this out. A template created by Blackbeard
yeah how do i view it
i have a mod i could have used for this but i have no idea how to access mod files
Subscribe it then locate the mod on your pc
D:\Program Files (x86)\Steam\steamapps\workshop\content\108600
remember the Mod ID, find the folder named that ID
np man
i didnt know that mod, gonna watch it too π
Hello. I just want to remap a key-bind from a mod. How to add numeric keys for it? Like I want to add the numeric key 0. zero...
for F it looks like this:
elseif key == Keyboard.KEY_F
how to add the zero pls?
instead of F?
I think its Keyboard.KEY_0 or Keyboard.KEY_kp_0
Rather should be Keyboard.KEY_NUMPAD<number> for 0-9 ex.: Keyboard.KEY_NUMPAD0 IIRC
Edit: Forgot prefix KEY_
does anyone know what determines if a firearm produces muzzle flash? i'm trying to remove it from a gun that i'm making
Free mod idea: Dirtied & bloodied clothing raises your ability to avoid zombie detection but increases your illness chances, allows for even stealthier gameplay but at a risk. Can also cover your body with dirt/blood as well
Is it possible to load lua file on demand from mod folder?
For example, I'd like to make a kind of version checker that loads right lua file.
IIRC files outside the lua folder (but lua) shouldn't be loaded automatically, so you could - in theory - then load the file line by line and have the string be executed as lua - most likely not ideal though and would likely be easier to have the check at the start of the file and just return nil if it doesn't fulfill the requirements, so the rest should - in theory - not be executed.
ex.:
if condition == false then
return nil;
end
-- Usual file content here
I did that, wait me a sec, I deleted the code by accident lmao
Hello everyone, are there people here who know how to create animations and speak Russian?
here is
Hi, I was looking into the Java code and events. I'm aware of where's the list with all the events, but does anyone know where specifically events are defined? For example, where is the code for the "EveryTenMinutes" events, etc.
I recommend use a decompiler like Procyon for .class files, so you can see them
Yeah, that's what I'm doing. Though the sheer amount of files is immense to look in, that's why I'm asking if anyone knows already. Anyway, I'll check out that decompiler π
You're usin vscode?
idk if JD-GUI have the option to search in files, but in vscode, you just need search and it will give you all the locations where it is named
I'll check it out now, thank you a lot, this seems very useful! Thank you again!
Sorry, I mean that code I showed you was something I wrote maybe half a year ago? So it's idiosyncrasies have faded to to mist of time for me π
I cant scroll in the mod options.
There's no scroll option, hitting buttons don't work, I tried a bunch of different things.
Turns out, Sandbox+ was the problem.
Problem fixed.
ops
@craggy furnace look what came back from the dead
what the fuck
