#mod_development
1 messages Β· Page 520 of 1
You can send it to the server
Are you using mods or writting one?
Are you modding the game
You are looking for help in #mod_development channel.
Can i ask you please for any simple example?
looks like what I needed, thanks
Can you show us what you were doing?
gonna grab the entire movie transcript?
so my car windshield is culled from the inside, im guessing theres nothing i can do about that?
What export setting do i use with FBX blender for animation? i use Female_Body_14_animBase.fbx as import changed a bit and exported it, it works ingame, but as you can see, it strechtes out
i edited the IDLE animation
NVM got it working
IS there a way to add a trait if you read a skillbook? I see that script for learning recipes
but I want to give a character a trait when they read the book
what files should I look into to research the effects of certain moodles?
I want to make an "extended moodle description" mod like traits have, showing what EXACTLY is happening when you are hungry, tired, thirsty etc (how much strength you lose etc)
I know where the tooltips are, but not where to actually find this information in the code. Not even the wiki is clear about this.
would like to understand what "heals faster" and "strength is increased" mean, exactly
Does anyone know if the Aquatsar Yacht Club mod REALLY requires Cherbourg?
Just reduce scalne in blender
No one yet, I'm I'm keeping investigation.
also what kind of object are you trying to do ?
why is my item letting me equip it instead of using it like a medical item?
The line object has a "codes" attribute and a "getCodes" method, but calling this method (line:getCodes(), also line.codes) caused an error.
I have not yet solved this problem, but I am on the verge of being able to achieve what I want to do in another way.
wait you have an runtimeeception
yap
also just tried to zoom in to read your code
and you made an infinity loop its never stops
wait might be my missunderstand in lua never mind
do you have your project on github or somehting ?
local categories = getZomboidRadio():getRecordedMedia():getCategories() for i=1,categories:size() do local category = categories:get(i-1) local mediaType = RecordedMedia.getMediaTypeForCategory(category) local list = getZomboidRadio():getRecordedMedia():getAllMediaForType(mediaType) for j=1,list:size() do local mediaData = list:get(j-1) if mediaData:getCategory() == category then local title = nil local line = mediaData:getLine(0) local codes = line:getCodes() -- <--- error occured debug(codes) -- this is my debugging mehod just output log and speech end end end
Sorry, I have my project but it private π¦
what does the error say
Exception thrown java.lang.RuntimeException: attempted index: getCodes of non-table: zombie.radio.media.MediaData$MediaLineData@49c0e5d7 at KahluaThread.tableget line:1689..
In a normal case, this Java method call would work, but my guess is that there is a problem on the Lua side that prevents the method from being called properly for Java internal classes.
[06-02-22 00:25:58.624] LOG : General , 1644074758624> userdata.
I wont just access in some attribute on userdata. π¦
how does zomboid normal handle recording ?
normal handle recording ?
look like you trying to do some sort of VHS right ?
@mint sphinx @rain pumice
Anyway, I was able to achieve my goal in a different way. I'll put this matter to pendding at this point! Thanks for suggestions π
nice
so how did you solve it
Mind to share with us please? :)
I found that the following vanilla source has access to codes.
So I used the same own code on the shared side to access the codes information,
and then cleared it from the client side by referencing this code on the shared side.
\shared\RecordedMedia\ISRecordeMedia
set those faces as double sided in blender?
i would love to see cars with see through glass
Hey, I don't really understand why this basic distribution isn't working.. Could anyone help me ?
require 'Items/Distributions'
table.insert(distributionTable["all"]["cashregister"].items, "simonRandom.coinItem");
table.insert(distributionTable["all"]["cashregister"].items, 1.0);
SuburbsDistributions not distributionTable
require 'Items/Distributions'
table.insert(SuburbsDistributions["all"]["cashregister"].items, "simonRandom.coinItem");
table.insert(SuburbsDistributions["all"]["cashregister"].items, 1.0);
Even if cashregister is not considered in that table ? Interesting lemme test it thanks
Why is my item not letting me "Use it" as a medical item
but instead I can just equip it on primary and secondary
It worked now thanks π
vehicle mod like this does this mean bus can take more hits than small vehicles in vanilla? or are they the same but just reskinned
so you was running the code only on client? ^^
it takes more hits and you can tune it for it to be almost invincible lol
oh nice thanks. i'm concerned that they might just be normal vehicles but just reskinned
does anyone know which popular mod would be the one that's preventing players from finding and wearing underwears and bras in multiplayer?
they don't have insulation/condition bars
but a blank tooltip
why is my medical item not working at all...
I can just hold it in my hands
Literally hitting my head against the desk rn trying to figure out why
Thanks!
Genius ty
There's an unused car with translucent windows called ModernCar_ez
I should see how it's done
Might be SportsCar_ez
i think that was part of the car interiors development https://projectzomboid.com/blog/content/uploads/2019/08/image-6.png
Sadly still not in game. :(
Does anyone have any ideas what may cause this?: WorldDictionary: Cannot load world due to WorldDictionary error.
Was trying to debug something turning some mods on and off, and now when I try to load my test save, I get an error and am forced to quit to desktop. My console log file says that ^
In Single Player.
world dictionary is a list of items, right now there is a bug in it that it can't remove properly a modded item that has the same ID as a vanilla item, the only way to fix it is to put the modded item back
Oh I see, thank you very much. So I should just start a new game when trying to disable and reneable mods I guess
more like showing players inside vehicles will require a lot more animations, sync and all that
yeah, that's the safe bet
Thanks brother
Pulling my hair out here with this map mod I've made.
I cannot for the life of me get it to work as an MP mod.
I also can't get my mod to work MP. Anyone have any ideas? It works on a hosted server when I load the mod from Zomboid\Workshop (mod I uploaded) but not when I download it from the workshop and it's in workshop\content\108600
I love Indiestone, but fuck me, I wonder how they manage to cope with this engine/file system, it's so frustrating.
Yeah, every time I update my mod I have to reorganize the folders since the file structure is different between the two locations it's bananas
agreed π
keep in mind that having it both in the workshop folder and subscribe to it will activate both at the same time as the ID is the same, leading to possible conflicts
so, if you're going to play with the subscribed version you should remove the other one from workshop temporarily and add it back when you resume work
I did move it.
Other than that I have no idea what you mean by reorganizing folders
Thanks brother o/ I found out the issue I was looking for βοΈ
in lua can you access all public methods of a java class?
and can you only use java classes that were passed to lua via the event functions
local mods are in user/Zomboid/mods/examplemod/ while mods to upload are user/Zomboid/workshop/examplemod/Contents/mods/examplemod/
I got it to work. Under Server Settings > Steam Workshop, select the mod, then under Server Settings > Mods select the mod again. I thought I would only have to select it in the workshop section.
I only play single player but people on the workshop say the items aren't spawning in MP.... not sure what else could be going on
I got the map mod on my server, but the vanilla cell is still overwriting it. The game is detecting that I'm inside of a building..
I just never use that first folder, just the workshop folder
lookin good
I was wondering, is there a mod that makes it so you seen a engine under a hood of a car?
Hello people, are there any guides or information on how to add additional skins for currently existing vehicles and clothing?
Yeah we deleted the cell from the server-files and restarted. Seems to still contain the old data. :x
I guess I'll start doing that then. I was trying to keep different versions going, like the one I'm actively working on vs. copy of what's in the workshop
I don't know if there are any guides, but for clothes that use their own models you add texture variations in their XML files. For vehicles you need to modify their vehicle scripts (media/scripts/vehicles txt files)
so a couple of my items are breaking the game and i can't figure out why. i thought maybe it was that they lack static models and things like that, but items that are ALSO missing their static models are working fine. they're breaking the game on right click.
Try posting the log error
would you mind telling me how?
thank u!!
thanks
behold the blursed mod
https://steamcommunity.com/sharedfiles/filedetails/?id=2744139061
the tissues................. i'm howling
immersion
i cant find where the lua print function prints too and im not sure if im looking in the right place or if its something else
its the console that comes up automatically in debug mode right?
yeah that should be it!
neat tip you know how steam has 2 launch options? you can configure one to be normal and the other to be debug
okay so i'm STILL having issues with the same items. it was working until i tried to *right click one item and THEN right clicking the others started throwing errors as well. https://pastebin.com/Km9ZLe1f i'm at a bit of a loss
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.
how do you do that
redacted*
something tells me its working now
Hi, probably been asked before but I cant find it at the moment, how can I make a recipe give experience when completed?
What kind of item is it? Looks like it could be a problem with a model? Double check you're using valid model script entries
is there a way o 'craft' a car and place it on the world? or the only way to get cars in-game is spawning?
it's an item without a model, just yet. i'll try placeholders and see if those stop throwing the error. i assumed placeholders for icon would be sufficient, as they have been in the past, but i guess everything is sufficient until it isnt
you're breaking a recipe code most probably in this case, it is failing to retrieve an icon to show in the recipe display
an item without a valid icon works, but a recipe code with that item breaks
THAT explains why i wasn't having any trouble until just now when i was debugging crafting. thank you for your help! here's hoping this is the only issue. do you know how large an icon should be in pixels??
32x32 or it also breaks recipe display
perfect thank u so much
I've seen this in the games files, but I'm looking for tailoring XP specifically but not sure what to put in that line to make it work.
Is there mod, or would it be possible to make a mod; that allows the use of C2 breaching charges on doors to blow them open (Either via remote or timer). To add onto that, a C4 kit for destroying barracades/walls/etc?
sorry i vanished but the first option on steam launches the exe, the second a .bat
you can edit the .bat to add the debug flag
oh neat
recipecode.lua has the OnGiveXP code. I don't see tailoring in there
but use it as a base to make your own function
ok, whats the tailoring skill called in the code? just Tailoring?
So the OnGiveXP for woodworking5 is
player:getXp():AddXP(Perks.Woodwork, 5);
end```
just make a version of that for tailoring and use Perks.Tailoring instead
if you don't want to give a specific xp amount you can use ZombRand(1,3) instead of 5 for example
so just make a file in my mod's lua folder and pop those 3 lines in and call it good?
I have my functions in media/lua/client
take a look at recipecode.lua, you might need some of the stuff at the top, it sets up some arrays or something (not sure what they're called in lua)
ah yeah, the top has
Recipe.GetItemTypes = {}
Recipe.OnCanPerform = {}
Recipe.OnCreate = {}
Recipe.OnGiveXP = {}
Recipe.OnTest = {}```
well the game boots, thats a success
ah, but still no exp
hmm
maybe try this instead self.character:getXp():AddXP(Perks.Tailoring, ZombRand(1, 3));
slightly different version I pulled out of ISRepairClothing.lua
I'm not sure what the difference between referencing player vs. self.character is though
oh it looks like it's trying to find it in the wrong spot
lovely
Let me show you how it works in my mod and then maybe you can figure it out. I'm not doing XP but am calling a custom function from recipe
so in my recipe I call
OnCreate:DairyModReturnSaucePan_OnCreate,
and here is the lua
function DairyModReturnSaucePan_OnCreate(items, result, player)
player:getInventory():AddItem("Base.Saucepan");
end```
my guess is it's not being called correctly from your recipe
nice!!
I do that a lot, don't feel bad π
You probably didn't need the recipe {} stuff then, huh
indeed
i called "GiveTailoring10" in the recipe, and added the Player:AddXP part in there
simples
Good evening all! Has anyone created a recipe from lua instead of from text files?
I want to create recipes only if another mod is loaded too but can quite manage to find a way to do so π€
To all PZ modders, if you are a mod creator. Please take a moment to read this.
We've just released https://topprojectzomboidservers.com
Like our other ranking sites, we like to sponsor mod creators and help promote their mods. If you're interested, you can open a ticket on the site and provide support your mod ID and some info about it. We provide custom game servers for development, sweet gear we get from our sponsors and custom API endpoints etc.
Find the best Project Zomboid for 2022. Search Project Zomboid by rank, players, country, map or votes.
Hey, I am once again coming here to get some help of y'all kind people helping others.
I have published my small little mod but i'd like to make it accessible in other languages. I am sure there a way to modify the lua depending on the language, but I've yet to find an example of someone doing so ! Any help is gladly welcomed
I am currently there:
local activeModIDs = getActivatedMods()
for i=1, activeModIDs:size() do
local modID = activeModIDs:get(i-1)
if modID == "modIfFromMod" then
local allRecipes = getAllRecipes();
-- add recipe from lua
end
end
The allRecipes I get from getAllRecipes seems to be mutable but I don't really know how to write down a recipe properly to add it there
anybody know if theres a way to add the libraries from the javadoc to visual studio or if theres a better way than looking back and fourth to find things
Somebody please make a mod that allows players to choose different options of wearing for clothing. Like choosing to wear a jacket open or closed, tuck a shirt in or out, tuck pants into boots, wear pants rolled up. I feel like this would be super awesome for immersion purposes, as well as opening a bunch of possibilities for RP opportunities and would be awesome for kitting your survivor out in a more personalized aesthetic
I know nothing about coding ;-; so I beg you guys XD
Hey, I created this Spider-Man (PS1 Version) retexture for the Player/Hazmat Suit, it also works for mods like Leather Suit, if someone wants, upload it to the Workshop or use it for a Modpack.
Here's the texture
Here's some pics in-game
Nvm I found how to do so
i'm still having the same right-click crash problem. i right click the item and the game crashes. nothing fancy. i tried adding a static model and an icon to one of the items that was acting up as was suggested, but it's still throwing the same issue. i've got a MUCH better debug log here (https://pastebin.com/WqKi1u9T). i hadn't understood what i was doing that first time around; this time i've managed to isolate the pertinent bit of code.
I do have the option to wear ehirts tucked in or out in my mod, but I have not finished that for all shirts, there's a lot of them. That's the kind of thing I want to add in my mod. Recently I added the option to wear mismatched socks
That sounds awesome, youβre doing great work. Iβve used your mods before π
Can you add custom properties to custom clothing items
As in, pressing T will add to an integer in a jetpack clothing item or something, and once that integer hits 4 it gets removed from your inventory?
Plz paste the item's stuff.
ERROR: General , 1644105036291> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getTexture of non-table: null
You could look at ISInventoryPaneContextMenu.lua line # 2689.
is it possible to make a sleveless jacket, with no sleeve tailoring slots?
and if not, can we add new body locations?
You can add body locations to the end of the list and I think probably to the beginning of it. If you wanted to be able to answer questions like that you could use notepad++ and its search function to find where certain words are referenced. So the bloodlocation specified in a txt file may be referring to something specified in a Lua file.
Ok
Hey everybody, I have uploaded my mod to the steam workshop. It's in my workshop folder and I can see it has been downloaded. But when I boot the game it does not show up in my mod menu.
Any ideas?
Anyone know if there is a balenced version of Fashion montage for MP that doesn't allow OP items like bags and armor at start?
I want deeper character customization for my server but I don't want people being able to start with end game loot
So I made my first mod, got it uploaded, it's showing in the main menu, but its not showing up in game/
I followed Blackbeard's tutorial for making a mod
I can't find it in any of the containers i set in the distribution list
look at console log to see if any erros
errors*
anyone knows the value for set a new name?
In User/Zomboid folder there is a file called console.txt
SEVERE: Error found in LUA file: C:/Users/Morgan/Zomboid/Workshop/Bleach Soda/Contents/mods/Bleach Soda/Media/lua/server/items/bleSoda-Distributions.lua
I would guess that would be it.
π
No really though actually gold, bless you.
I can't imagine how many people haven't read this wondering why their code is so sloppy.
I am brand new to LUA though so this will be painful looking up the different roomdefs and stuff to find the places I want it to spawn.
Yeah, to be honest I got frustrated with how commonplace it was for mods, popular mods even, to mess up item distribution?
Adding stuff to distro tables is super simple and straightforward when you use the simplest method.
But, when people use that distribution-merge method that's more complicated, well, not only is the extra work involved with that method completely unnecessary, but also, because it's more complicated, there's more opportunities for people to make mistakes.
For reference what would be an easy way using this guide with a drink item?
Because that's what my mod is.
Just search the vanilla tables for a vanilla drink item, and use the tables they spawn on, and their spawn values, as a starting point?
And I can find the tables in the distro lua file of the base game?
(deleted, was the guy's username)
Yup that's my name don't wear it out.
Yeah, ProjectZomboid/media/lua/server/Items will have Distributions.lua and ProceduralDistributions.lua which are the vanilla item spawn files, aside from ProjectZomboid/med/server/Vehicles/vehicleDistributions.lua which handles the spawning of items in vehicles gloveboxes/trunks.
Perfectly explained, you should be a teacher if you aren't already.
that looks like king pin in a spiderman suit 
i know
you also have the skinny version
looks good though gg
ty
Anything I need to add to this?
Besides my item name obviously
This is for the regular distributions.
ISInventoryPaneContextMenu.lua lua if resultItem:getTexture() and resultItem:getTexture():getName() ~= "Question_On" then tooltip:setTexture(resultItem:getTexture():getName()); end i don't know how if resultItem:getTexture() and resultItem:getTexture():getName() works, or how tooltip:setTexture(resultItem:getTexture():getName)) is applicable - i've never messed with tooltips before, and for good reason! they're spooky
here's the item that's still throwing the error.
item LancingDevice {
DisplayCategory = FirstAid,
Weight = 0.01,
Type = Normal,
DisplayName = Lancing Device,
Icon = BakingTray,
Medical = TRUE,
WorldStaticModel = BakingTray,
}
and here's the recipe involving it
recipe Lance Finger {
TeststripsVIAL,
keep LancingDevice,
Result: TesttripWET,
Category: Diabetes,
Time: 100.0,
NeedToBeLearn: false,
}```
Would it be possible to merge all the mods I have into a pack? I'm tired of mods updating and breaking my server
So in my mod my module is BleachSoda, and I'm importing Base. Do I need to include base.modname or do I need to write BleachSoda.BleachSoda
This is in my bSoda_items.txt file defining the two items.
Okay I think I am understanding. But I just need to know what I am pulling the name of my mod from now
my items.txt?
{
imports
{
Base
}
item bSoda
{
DisplayCategory = Food,
HungerChange = +10,
Weight = 0.3,
AlwaysWelcomeGift = TRUE,
ReplaceOnUse = bSodaEmpty,
Type = Food,
UnhappyChange = +45,
ThirstChange = -99,
DisplayName = Bleach Soda,
Icon = BleachSoda,
CustomContextMenu = Drink,
CustomEatSound = DrinkNoiseMod,
Carbohydrates = 0,
Proteins = 0,
Lipids = 0,
Calories = 140,
Packaged = TRUE,
CantBeFrozen = TRUE,
StaticModel = PopCanFizz,
EatType = popcan,
WorldStaticModel = PopCanFizz,
}
item bSoda_EMPTY
{
IsWaterSource = TRUE,
Weight = 0.1,
CanStoreWater = FALSE,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.1,
DisplayName = Empty Bleach Soda,
ReplaceOnDeplete = bSodaEmpty,
Icon = Bleach_Soda_Empty,
CustomContextMenu = Drink,
CustomEatSound = DrinkNoiseMod,
StaticModel = PopCanFizz,
}
}
table.insert(ProceduralDistributions.list["BinGeneric"].items, 90)```
Is this correct?
@willow estuary ?
BleachSoda.bSoda
Thank you sugarskull!
attempted index: getTexture of non-table: null means the variable the code tried to do getTexture on was just nil. Your quote does not say which line is #2689. Two different things have getTexture called on them - resultItem and tooltip. One of them is nil. Someone said a failed recipe can make something fail. You can disable a recipe like this
/*item LancingDevice {
DisplayCategory = FirstAid,
Weight = 0.01,
Type = Normal,
DisplayName = Lancing Device,
Icon = BakingTray,
Medical = TRUE,
WorldStaticModel = BakingTray,
}*/
I still am not seeing my mod in the game even after updating the tables
My console isn't throwing any errors.
You should be using BleachSoda.bSoda, Base.bSoda as you defined your item as being of the module BleachSoda.
Honestly, IMO, unless there's corner case reasons for doing so, I consider using a module other than Base for adding new mod items/recipes/vehicles to be an unnecessary complication that just causes more headaches than it prevents? At least with people that are new to modding PZ,, but I don't think I use anything other than Base in any of my mods?
So can I just remove the module or do I make the module Base?
And then, do I update the name in the tables to Base.bsoda?
I'm tearing my hair out lmao I've been at it for 10 hours.
My advice?
Yes, just make it module Base, as it makes everythting simpler?
so
Yes, but also, if it's module Base you don't need to include the module for the distro tables, and can just use bSoda; see how it's simpler and more straighforward?
module Base
{
imports
{
Base
}
item bSoda
{
DisplayCategory = Food,
HungerChange = +10,
Weight = 0.3,
AlwaysWelcomeGift = TRUE,
ReplaceOnUse = bSodaEmpty,
Type = Food,
UnhappyChange = +45,
ThirstChange = -99,
DisplayName = Bleach Soda,
Icon = BleachSoda,
CustomContextMenu = Drink,
CustomEatSound = DrinkNoiseMod,
Carbohydrates = 0,
Proteins = 0,
Lipids = 0,
Calories = 140,
Packaged = TRUE,
CantBeFrozen = TRUE,
StaticModel = PopCanFizz,
EatType = popcan,
WorldStaticModel = PopCanFizz,
}
item bSoda_EMPTY
{
IsWaterSource = TRUE,
Weight = 0.1,
CanStoreWater = FALSE,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.1,
DisplayName = Empty Bleach Soda,
ReplaceOnDeplete = bSodaEmpty,
Icon = Bleach_Soda_Empty,
CustomContextMenu = Drink,
CustomEatSound = DrinkNoiseMod,
StaticModel = PopCanFizz,
}
}
Remove the import statement. You don't need it, and it will cause console messages that people will report as bugs.
Ohh yes, that makes sense. That's what you were talking about.
The only time people need import statements, AFAIK, is if they have recipes using items from other modules, that are included in import, in their recipes.
guys i cant make my gun attachment to attach to my weapon: (the option is not even appearing now, and it was before)
item Wiz_GunLight_small
{
DisplayCategory = WeaponPart,
Type = WeaponPart,
DisplayName = Robocop Auto 9 Flashlight,
Icon = Wiz_GunLight_small,
Weight = 0.2,
WeightModifier = 0.2,
WorldStaticModel = Wiz_GunLight_small,
AimingTimeModifier = 5,
MountOn = Wiz_RobocopGun,
PartType = Canon,
MetalValue = 1,
}
i set this on my weapon:
ModelWeaponPart = Wiz_GunLight_small,
No recipes should mean no import.
Everything is Base? No import.
All the items in the recipes are Base? No import.
Shoot, you can use items from other modules without importing if you just include the module name in the recipes as such as I did with farming.Strewberrie
recipe Make Pink Dye
{
keep KitchenKnife/HuntingKnife/MeatCleaver/Hammer/BallPeenHammer/ClubHammer/StoneHammer/WoodenMallet/MortarPestle,
Sound:AddItemInRecipe,
farming.Strewberrie;100,
Salt;10,
Pot,
Result:PinkNaturalDye_Raw,
Time:200.0,
Prop1:Source=1,
Prop2:CookingPot,
AnimNode:Loot,
SkillRequired:Cooking=1,
NeedToBeLearn:true,
}
I swear that 90% of the time I see import statements in mods scripts, they're not necessary?
Now just update the tables and I'm good? Or do I need to update mod info as well?
Because I'm an idiot who is tired and doesn't know anything in the first place?
Fair enough, I was just confused there π
π
But I'm sure you're picking up how doing thing the simpler way also makes it easier?
Absolutely.
require 'Items/SuburbsDistributions'
require "Items/ProceduralDistributions"
require "Vehicles/VehicleDistributions"
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "bSoda")
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 90)
table.insert(SuburbsDistributions["Bag_SurvivorBag"].items, "bSoda");
table.insert(SuburbsDistributions["Bag_SurvivorBag"].items, 40);
table.insert(ProceduralDistributions.list["KitchenRandom"].items, "bSoda")
table.insert(ProceduralDistributions.list["KitchenRandom"].items, 90)
table.insert(ProceduralDistributions.list["WardrobeRedneck"].items, "bSoda");
table.insert(ProceduralDistributions.list["WardrobeRedneck"].items, 40);
table.insert(ProceduralDistributions.list["BathroomCabinet"].items, "bSoda")
table.insert(ProceduralDistributions.list["BathroomCabinet"].items, 90)
table.insert(ProceduralDistributions.list["BinGeneric"].items, "bSoda")
table.insert(ProceduralDistributions.list["BinGeneric"].items, 90)
Look right?
Yeah, looks good to me alright? You;re using debug mode right?
I am not lol.
the part i quoted starts on #2689. i disabled the item and it stopped throwing that error, which just confirms for me that the item was causing the issue. i don't know where to go from here - copy/pasting doesn't seem like it'll change anything, but i'll give it a shot!
Hold left shift on game start for debug right?
Okay, so using debug is actually super important for making modding simpler?
Using debug mode you can spawn in items.
Now, that is important for easily evaluating whether you made the scripts for your items properly so that they "can exist"?
If an item can't exist, then it can't spawn.
A lot of times I've seen people flailing over their distro table stuff, but the real issue was that they screwed up their scripts for their items where the item doesn't exist?
guys the effects from the traits are on lua or java side?
Both.
Yeah I read online that you can't spawn in mod items so I went straight to the distro
So this link outlines how to enable debug mode; I have two shortcuts for PZ myself, the regular one for playing, and the one with debug for modding.
https://gamertweak.com/debug-mode-project-zomboid/
That's some really crazy misinformation right there π
If the mod is not in the distro, or the distro is messed up can I still spawn it in?
As long as it doesn't throw an error?
Yes, if the item script was made properly, including the fussy formatting and such, then you can spawn it in, regardless of the distribution stuff.
Maybe try with the module name and a dot.
Why copy and paste? I meant plz copy onto discord ; ;
what about disabling the recipe, though, does that fix it?
(Farewell)
Heyoo I can spawn it in.
The Icon is bugged, and the sound effect loops forever, and I can drink it unlimited times.
But it works!
where?
I dunno if this is why you can drink it an unlimited amount of times, but I would guess this is the reason:
ReplaceOnUse = bSodaEmpty,
item bSoda_EMPTY
Do you need a custom mod sound for this? If you just use a vanilla drink sound it will be simpler
True.
Simpler is better!
Easy fix would be to just make the sound a second longer or so
If nothing else. "start simple, get simple to work, and then get fancy"
Until the animation finishes
Oh one last question, can I edit the mod inside the workshop folder or is that a no-no?
Having to reupload every time I make a change to test is ridiculous
Ah yes. that how you should be doing it π
.....you're new, so it's understandable, but yeah, probably not the best state of affairs to be uploading stuff to the workshop before confirming that it all works properly in testing?
You can also set the privacy settings for mods so they're hidden or unlisted, in case you need to test a mod with other people but don't want people downloading it yet.
Amazing, I am done for tonight but thank you so much for your time. I really do appreciate it.
Yeah, no problem, despite how it was just one goddamn thing after another π€ͺ (which is pretty normal for "first mods" TBF), you picked up on stuff really well, sol it was pretty low effort on my part?
Tends to be how coding of any sort works lol. Glad I wasn't a complete idiot with it all!
Good night!
i meant copy/paste because i figured that was the next step. disabling the recipe stops the error as well. (goodnight!)
Thanks to your help, the new petite Mod is now complete π
damn thats nice
Hello, I already have a working firearms mod with two shotguns, one pump and one semi auto. I am able to spawn them with item spawners, but they do not spawn in the game world.
Can anyone please help or provide some scripts to make them able to spawn in appropriate locations like armories and the trunks of some cars?
Why is my modded car floating menacingly?
It didnt do that 5 mins ago
you left the helium tap on in ur vehicle

now its a blimp
Ah it might be a Physics Chassis Shape problem, looking into that.
Fixed.
has anyone made flying objects in a mod yet
Wasn't there a flyable copter?
Anyone know how to edit Phys.Chassis Shape in a not mirrored way?
It currently extend all the way underground when i want to cover the roof of the van
Which makes the car fly...
u cant
u have to use the offset
so the car isnt centered
oh its centerOfMassOffset
means u can move the chassis rect
child labour mod when
Well whatever then. i'll leave the roof as is.
now why is this happening... Why is my hitbox OK against walls but completly clips through other cars??
idk about that but apparently a lua script will silently fail to load if you have a syntax error, which is something i wish i knew earlier
Thanks. This took me way to long to understand
sorry i explained that poorly xd
i dont know if this is here or modeling i have to ask this question in hmm but is it possible to make sprite animation for isoobject ?
what i have to do is turning an object around based on a world attribute ^^
hi all! how can i increase the frequency of car jams and car wrecks on the roads?
How to change metal working recipes? I would like to remove scrap metal from metal roof recipe
the metal roof ?
yes
if so you might be able to overwrite the fuction call at line 258 in blakcmsithmenu. which mean you just have to only overwrite that funciton call in your own mod
with other word its a larger function so i wouldnt do it if any other mod extend or doing hooks in
its a 246 line functions called "dobuildmenu"
did find it, but no idea what is what here... was expecting items required for the recipe called by their names
Are these numbers the ones that need to be changed?
local canDo, toolTip = ISBlacksmithMenu.checkMetalWeldingFurnitures(0,1,0,0,1,2,0,playerObj,toolTip);
I would assume that 2 is welding rods, and one of the 1 is scrap and one of them is small sheet...
okay nvm found it. it seems like they are at line 125, what these numbers mean...
removed scrap from all of the recipes. YEET. How are you supposed to build anything with metal when you can hardly find enough scrap for anything?
disassemble some cars
I did. cleared a bridge and it only gave me enough to build a metal roof for a tiny shed
eek
after that went around looting trash cans for scrap metal, but still far from enough... dismantled a lot of stuff too, all the way to level 6 metalworking but still got nowhere near enough. got nowhere as much as I got for dismantling cars
honestly this is just ridiculous
so... do I need to do something for the game to replace that old recipe with mine?
I tried enabling the mod, loaded just fine but all the recipes are still the same
dunno if it's already been done, but I couldn't find anything, so I did it: https://steamcommunity.com/sharedfiles/filedetails/?id=2744974916
How am I supposed to make changes to existing building recipes? did changes in IsBlacksmithMenu.lua, but nothing is changing
the mod is enabled
probably because you're just redefining it without unregistering it
without unregistering it?
look at the bottom of the file
if you understand the semantics of lua, you'll understand that redefining it won't actually do anything
It did work that way in another game... just change it and it just works
that would be because that game took a reference to the table containing the function, rather than the function itself directly
it passes ISBlacksmithMenu.doBuildMenu, not just ISBlacksmithMenu
maybe you should look at the mod I just posted a minute ago, it basically does exactly what you're trying to do
namely, it injects a new menu item into Metalworking
yeeting scrap metal from all of the metal working recipes, but just the metal roof would be fine too
this channel is about modding, your question doesn't sound like it's related to modding
not really, moreso for you
you'll have more success if you post in the right place
yes, being obnoxious and spamming will definitely get someone to help you
lol
that block feature in Discord is so handy, instant spam filter
Depends on the changes. There is a variable disabling parts of it. Check my Blacksmith mod
obvious troll is obvious
main character huh
why you crying bro
just get your server on the internet list
This is #mod_development good sir
well, I say "like"
this is not r/roastme
bye bye
ty
ye np, what a weirdo
if he's really dedicated, he'll be registering a new Discord account right about now
Anyways, this should work right as a custom distro without any other requirements?
`require "Items/Distributions"
SuburbsDistributions.officenerd1 = {
metal_shelves =
{
rolls = 1,
items = {
"R2D2_WorldItem", 100,
}
},
}
`
that way completely overrides the distribution
guaranteed to have one of them? sure, looks fine to me
you should append
the entire distro?
yes
SuburbsDistributions.officenerd1 =
you are assigning a new table
you should append to the existing table
argh alright
ah yes, table.insert(SuburbsDistributions.officenerd1.metal_shelves, {...})
Is there a good example of how I should format it?
just cut and paste the entire {} block for metal_shelves that you have there
`require "Items/Distributions"
table.insert(SuburbsDistributions.officenerd1.metal_shelves, {...})
metal_shelves =
{
rolls = 1,
items = {
"R2D2_WorldItem", 100,
}
},
}`
like this?
no
{...} was the placeholder
table.insert is a function
it takes 2 arguments - the first being the table to add to, and the second being whatever object you want to add, which in this case, is your table with the rolls and items
I'm not very good at working out this stuff
I'll try to understand what you mean
and fix it
table.insert(SuburbsDistributions.officenerd1.metal_shelves, { rolls = 1, items = { blahblah } })
do you end between every new table insert?
Example of how i have it right now
`require "Items/Distributions"
SuburbsDistributions.officenerd1 = {
metal_shelves =
{
rolls = 1,
items = {
"R2D2_WorldItem", 100,
}
},
}
SuburbsDistributions.astrosuit = {
metal_shelves =
{
rolls = 1,
items = {
"AstroSuit", 100,
"AstroHelmet", 100,
}
},
}`
if you find it makes your code more readable, you could also do
local r2d2 = {rolls = 1, items = { ... } }
table.insert(SuburbsDistributions.officenerd1.metal_shelves, r2d2)
argh alright ty man
by chance does anyone know the difference between template and template! ?
nope, but if you find out I'd love to know too
Yea... still don't really see how you're supposed to replace existing building recipe. all these examples just add new recipes. I think I'll just add a recipe for changing metal sheets into scrap metal...
far more simple to just add crafting recipes
if I want to make a recipe that requires blow torch, but doesn't use any propane, do I just write in keep BlowTorch?
I did some modding before but never published it, here's my first mod that I actually release π
i have a idea fora mod but i think it might be more a modelling thing... but the 2 seater pickups could be 4 seaters if people sat in back.
i want a trailer that can carry two small/mid sized cars lol
Anyone suggest any cool mods? Just some stuff to check out, idc the topic π
is there a quick guide on what's needed to add a new zombie into the game? I'm looking at Authentic Z, Advanced Zombies, and the vanilla stuff, and it seems that I need at least:
clothing.xml
three files in \NPCs\ for attachedlocations, bodylocations, and zombiezonedefinitions
is that it, or is there more?
- name zombie
- 1a. add zombie clothing and name into clothing.xml ( splice into other mod if needed?)
- add zombie to ZombiesZoneDefinition.lua
- done???
optional: add attachedlocations.lua info for extra stuff
does that sound right?
please help, me noob π i want to make a very simple mod that expands the safehouse radius from 2 tiles to 4 outside the building. Will this work? https://pastebin.com/vPWDuXzA
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.
got inspiration from the claim everything code by @quasi geode (sorry for tag)
bodylocations isn't needed for a new zombie, it is needed for a new locations to rquip clothes, attached locations is only needed if your zombie outfit has different options for items on it than the standard options
What do you mean by "splice into other mod if needed?"
like, geared zombies isn't compatible with authentic Z; I'm assuming that since they're both adding zombies, they're incompatible
so if I add in the new zombie I want to the other, it'd work
This isn't the first time this has happened to me but I have this problem that I can't seem to solve. It's with combo boxes in UIs. I can't select it. Has anyone ever had the same?
The video to see the probleme
Adding zombies is totally compatible unless you're doing it wrong
o
cant figure out how to get lighting info from a square, everything on the docs says it should work but no matter how i try and do it it returns nil or errors
local function OnZombieUpdate(zombie)
--print("working!")
local sq = zombie:getSquare();
local colour = sq.Lighting;
if sq then
print(sq);
print(colour);
else
print("fuck");
end;
end;
Events.OnZombieUpdate.Add(OnZombieUpdate);```
anyone know what ive done?
i also tried sq.Ilighting :lightinfo() and some others but none of them seem to work
sq:getLightLevel()
same error
Like MyModule.MyItem and MyModule.MyModel.
Someone said the recipe will be broken if one of the items in the recipe does not have a working icon.
:o Maybe it's if an icon is specified but it's bad one like wrong format or size or something.
That's the crafting screen, what happens if you right click an item in your inventory that can be used to make those?
Is there a way to execute something N seconds (or ticks) later without using the OnTick event?
I'm wondering if there's a delay or interval function or something to that effect. I do want it to pause when the game is paused so it seems like OnTick is the way to go, but I'm not certain
if anyone wants to team up just add me π
Continuing from last night, I have updated everything and now the mod no longer appears in game since switching it to Base.
I'll post my updates here I suppose since I've spent a few hours trying to fix it by reuploading the mod, editing things, making sure the file structure was correct, etc.
id=BS
description=Bleach Soda
poster=poster.png```
bSoda_Items.txt
```module Base
item bSoda
{
DisplayCategory = Food,
HungerChange = +10,
Weight = 0.3,
AlwaysWelcomeGift = TRUE,
ReplaceOnUse = bSoda_EMPTY,
Type = Food,
UnhappyChange = +45,
ThirstChange = -99,
DisplayName = Bleach Soda,
Icon = Bleach_Soda,
CustomContextMenu = Drink,
CustomEatSound = PZ_DrinkingFromBottle,
Carbohydrates = 0,
Proteins = 0,
Lipids = 0,
Calories = 140,
Packaged = TRUE,
CantBeFrozen = TRUE,
StaticModel = PopCanFizz,
EatType = popcan,
WorldStaticModel = PopCanFizz,
}
item bSoda_EMPTY
{
IsWaterSource = TRUE,
Weight = 0.1,
CanStoreWater = FALSE,
Type = Drainable,
UseWhileEquipped = FALSE,
UseDelta = 0.1,
DisplayName = Empty Bleach Soda,
ReplaceOnDeplete = bSoda_EMPTY,
Icon = Bleach_Soda_Empty,
CustomContextMenu = Drink,
CustomEatSound = DrinkNoiseMod,
StaticModel = PopCanFizz,
}
misssing { after module Base and } at the end
right I want to publish my mod on the workshop, what's the proces
Even with the brackets, the mod is not showing up in game.
I have the opening bracket on the next line, and the closing bracket on the line after bSoda_EMPTY's closing bracket.
@bronze arch Put the mod into your Workshop folder with the provided example mod's file structure. Launch the game, go to workshop in the main menu and from there it is pretty self explanatory. Then go to Steam and download your mod and make sure you activate it.
Which now that I think about it I think I forgot to activate mine lmfao.
No it is activated, damn.
do you guys have a favorite mods list to use? since the MP updates i think i have to rearrange mods to work now.
so i've updated this to spawn on stuff now
https://steamcommunity.com/sharedfiles/filedetails/?id=2744139061
Problem: for some reason the damage overlays are not showing up on a car. Instead parts of it are blacked out when taking damage.
I have my damage1 and damage2 textures, i've had them as a transparent PNG and they didnt work.
I've tried replacing them with repainted damaged textures but they dont show up as well...
Are textureDamage2Shell mandatory?
Any ideas please?
This is what I bought Zomboid for
anyone know of an easy or the best way to check if there is a wall between two points or squares
So my drink mod appears in game now but when I right click on it, my game crashes with no errors in my console log. Any ideas?
right click it where exactly?
In my inventory
AS if I were going to drink it
Same thing happens when I right click the empty version as well
one thing, your empty item points to itself in ReplaceOnDeplete = bSoda_EMPTY, water conatiner usually point to a normal type item for their empty versions
your food item points to a drainable item, I don't remember seeing that before so I don't know if that could be the problem, usually it is a normal type
you're missing an item there, it is usually food item -> normal item -> drainable item
does anyone know of a way to create an unmoveable, indestructable object as the basis of a trading beacon?
i need some help i've been trying to get mods for me and my friend to play but it keeps saying something failed to load when i try and start the server with mods and i've checked avary mod and its build 41.61 or 41.65 and its being a pain in the ass anybody know how to fix it?
even if somebody could hop in a call with me and help i'd be fine with it i just need help
Any insight on this?
I noriced that too, keep insisting, you should get past that eventually
is there a boilerplate for a mod that adds a custom bandage?
i need it for a mod i'm making
item Bandaid { DisplayCategory = FirstAid, Type = Normal, DisplayName = Adhesive Bandages, Icon = Bandaid, Weight = 0.1, CanBandage = true, BandagePower = 1.5, Tooltip = Tooltip_UseOnHealthPanel, Medical = TRUE, WorldStaticModel = BandAid, } item Bandage { DisplayCategory = FirstAid, Count = 1, Weight = 0.1, AlwaysWelcomeGift = true, Type = Normal, DisplayName = Bandage, ReplaceOnUse = BandageDirty, Icon = Bandage, CanBandage = true, BandagePower = 4, Tooltip = Tooltip_UseOnHealthPanel, Medical = TRUE, WorldStaticModel = Bandage, } item BandageDirty { DisplayCategory = FirstAid, Count = 1, Weight = 0.1, AlwaysWelcomeGift = true, Type = Normal, DisplayName = Dirty Bandage, Icon = BandageDirty, CanBandage = true, BandagePower = 0.5, Medical = TRUE, WorldStaticModel = BandageDirty, } item AlcoholBandage { DisplayCategory = FirstAid, Count = 1, Weight = 0.1, AlwaysWelcomeGift = true, Type = Normal, DisplayName = Sterilized Bandage, ReplaceOnUse = BandageDirty, Alcoholic = TRUE, Icon = Bandage, CanBandage = true, BandagePower = 4, Tooltip = Tooltip_AlcoholBandage, Medical = TRUE, WorldStaticModel = Bandage, }
how about for a stitch?
like a suture
ISStitch.lua
@drifting ore
That file contains this line that checks for the pain and time modifier of the suture needle holder and needle
local basePain = 20;
if self.doIt then
if self.character:getInventory():contains("SutureNeedleHolder") or self.item:getType() == "SutureNeedle" then
basePain = 10;
end
else
basePain = 5;
endlocal baseTime = 200; -- a suture needle or a suture needle holder make it faster and less painy if doctor:getInventory():contains("SutureNeedleHolder") or (item and item:getType() == "SutureNeedle") then baseTime = 150; end
thanks
@drifting ore Medical = TRUE is also only used on actual medical stuff. Ripped sheets does not have it, CanBandage and BandagePower are the only ones used there
alright
thanks
Yo. I Tried to Transfer my music
with True Music Mod
but somehow My Song just doesn't exist in the game
eventhough I followed all the instructions
to transfer my song
Weird.
Anyone got a fix or something I really really need help
While modding I found this easter egg within the games scripts:
40 votes and 4 comments so far on Reddit
Anyone ?
can someone make a chemlight mod

I wish we had some glowstick to throw in room that was cleared or to mark rally points. they could be found in camping and hiking stores and come in pack of 5 and last for like 12h ingame
now go find the dragon ball reference
Trying to get ideas for a weapon mod. Would something like a riot shield mod work? You could bash with it, and the zeds would not path towards it meaning they would try and get around it?
(Originally asked in wrong channel) Am I safe from VAC if I mess about with network traffic between a -nosteam server and a -nosteam client?
hey guys im trying to make a glove here give +4 strenght while equiped, i came out with this code, but its not working (dont give errors thou):
local function PowerGlovesEffect(_player)
local player = _player;
local strengthlvl = player:getPerkLevel(Perks.Strength);
if WornItemβ(java.lang.String string, InventoryItem inventoryItem) = Wiz_BatgirlGloves then
local modifier = + 4;
strengthlvl = strengthlvl + modifier;
end
end```
i dont know lua btw, i could use some help π
How does one get the player's skill in a perk?
And how would I do it on a multiplayer server? For reference I want to get all players in a multiplayer server's strength perks
Can anyone tell me how to spawn those metal drums that you can only find at the LV military checkpoint? Whenever I spawn it from the debug menu its just a packed item with weight of 2 which is not correct and it cannot be placed (the drum normally cannot be dropped and must be placed)
Try something like this:
local perkLevel = player:getPerkLevel(Perks.Strength)```
@long grove looks like there's a bug in the item definition. You could teleport to a place where there is some though
I know nothing besides that it is about Dragons and weird yellow balls that they have to find, so I guess that will be hard.
But I saw someone else found a The Walking Dead reference
@opal wind oh sorry guess you already have this part covered
i set it up like this now
local function PowerGlovesEffect(_player)
local player = _player;
--local strengthlvl = player:getPerkLevel(Perks.Strength);
local perk = PerkFactory.getPerkFromName('Strength')
local perkLevel = player:getPerkLevel(perk)
if WornItemβ(java.lang.String string, InventoryItem inventoryItem) = Wiz_BatgirlGloves then
local modifier = + 4;
strengthlvl = perkLevel + modifier;
end
end```
do i need a local here strengthlvl = perkLevel + modifier;?
meh im so noob on lua lol
local function PowerGlovesEffect(_player)
local player = _player;
--local strengthlvl = player:getPerkLevel(Perks.Strength);
local perk = PerkFactory.getPerkFromName('Strength')
local perkLevel = player:getPerkLevel(perk)
if player:getWornItemβ():getType() == "Wiz_BatgirlGloves" then
local modifier = + 4;
strengthlvl = perkLevel + modifier;
end
end
huuuum
does this look a bit better?
So uh, who here knows about power toys?
perkLevel is the strenght value right?
no you shouldn't have, that part was fine actually (I also updated my code snippet to reflect yours)
just replace:
local perk = PerkFactory.getPerkFromName('Strength')
local perkLevel = player:getPerkLevel(perk)``` with ```lua
local perkLevel = player:getPerkLevel(Perks.Strength)```
ah i see, will test now, thanks!
ah bummer, nothing.. it gives this error
GRAVE: Error found in LUA file: C:/Users/GUSTAVO/Zomboid/Workshop/WizTradeMod/Contents/mods/WizTradeMod/media/lua/client/Wiz_BatgirlGloves.lua
ERROR: General , 1644219576542> ExceptionLogger.logException> Exception thrown java.lang.ArrayIndexOutOfBoundsException: Index 7946 out of bounds for length 31 at LexState.token2str line:251.
ERROR: General , 1644219576542> DebugLogStream.printException> Stack trace:
your line with strengthlvl won't do anything useful. Rather try something like this:
for i = 1, modifier do
player:LevelPerk(Perks.Strength)
end```
also change this:
local modifier = + 4;``` to ```lua
local modifier = 4```
local function PowerGlovesEffect(_player)
local player = _player;
local perkLevel = player:getPerkLevel(Perks.Strength)
if player:getWornItemβ():getType() == "Wiz_BatgirlGloves" then
local modifier = 4;
for i = 1, modifier do
player:LevelPerk(Perks.Strength)
end
end
end```
this line here dont need a ';' on the end?
local perkLevel = player:getPerkLevel(Perks.Strength)
local perkLevel = player:getPerkLevel(Perks.Strength); <--- ?
you never need a ;
lol ok
unless you want to write multiple statements on the same line
same error, and equip the glove dont change the strengh
GRAVE: Error found in LUA file: C:/Users/GUSTAVO/Zomboid/Workshop/WizTradeMod/Contents/mods/WizTradeMod/media/lua/client/Wiz_BatgirlGloves.lua
ERROR: General , 1644220172075> ExceptionLogger.logException> Exception thrown java.lang.ArrayIndexOutOfBoundsException: Index 7946 out of bounds for length 31 at LexState.token2str line:251.
ERROR: General , 1644220172079> DebugLogStream.printException> Stack trace:
java.lang.ArrayIndexOutOfBoundsException: Index 7946 out of bounds for length 31
@opal wind try this to see if it gets rid of the error:
local function PowerGlovesEffect(_player)
local player = _player;
local perkLevel = player:getPerkLevel(Perks.Strength)
--if player:getWornItemβ():getType() == "Wiz_BatgirlGloves" then
local modifier = 4;
for i = 1, modifier do
player:LevelPerk(Perks.Strength)
end
--end
end```
yeah that remove the error
so the error is here
player:getWornItemβ():getType() == "Wiz_BatgirlGloves" then
maybe just player:getWornItemβ() == "Wiz_BatgirlGloves" then instead?
because i was giving the Item name there, but i never gave its type anyway
good morning. can anyone help me with some advice?
Before anyone can answer that you also have to send the question ^^
ha ha π yes. I want to add a small mod to my server. Just increase the safehouse grid by 1 more square when it gets claimed. This is my first try. Will this work? https://pastebin.com/C6Jf3HKr
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.
https://pastebin.com/GC0H6p9w - Lua section of code
https://pastebin.com/Peqy325K- Console error
Does anyone know why I get this error when swinging a weapon or shoving?
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.
right now id have the files i thouhg you had an error or so.
also i though savehouses was already larger..
someone know why the attachments work like this on the weapons? like reapeat 4 times the item name?
ModelWeaponPart = RedDot RedDot reddot reddot,
i dont know how to test the mod π¦ safehouses are 2 tiles outside the building. Want to make them a little bit bigger
isnt it because your weapon is nil ?
looks like the 4 names there are partType, modelName, attachmentNameSelf, attachmentParent
what that means idk
hum
but the last 2 are allowed to be omitted
Don't think it should be, but what would you put in place there and what line?
not sure what effects that has though
its strange how they are arranged, not a ; or , just a name after the other
indeed there is some inconsistency in the separators for values
offset or color use a space as well
wait sry i missread the console file. it looke like it this line here there is nill ? local weaponPerkLvl = ACAC.getPerkLevel(_player, ACAC.currentWeapon)
it says nil at line 82. which more or less always one line ealier
i looked on this silencer mod now and the guy set the 2 first ones as the silencer item name, and the other 2 he sets 'supressor',
ModelWeaponPart = WPNMOD.pistolsuppressor WPNMOD.pistolsuppressor suppressor suppressor,
but i cant find on his hole mod other mention of this 'suppressor' on the 3rd and 4th places...
i wonder if those are vanilla code that they did not implement?
nah i checked his luas too
and he does not have a custom UI or anything
hes mod only have 4 files hehe
on his mod?
not his mod, just on the game
yeah thats what i said; i think this 'suppressor' on the 3rd and 4th palces must be a vanilla (zomboid) thing
SteamLibrary/steamapps/common/ProjectZomboid/media/lua
but i never know about PZ having supressors
i will test it out tomorrow and let u know if it works somehow
suppressor is just a name
zomboid could use it to tell attachments apart
does american have police speicifcally for parks
Yes
they have rangers
urban parks?
Typically if the park is in a single county it has just the local sheriffs office enforce it
Urban parks fall under the cities they are in
So it would be local police
But some cities also have like
Parks and Recreations departments
Which might have their own enforcement departments
Its really hit or miss lol
And depends on the demand and the size of the parks
Like here in Wisconsin we have places like Kettle Moraine
Which are HUGE multi-county state parks
But are serviced by the state DNR
And then local sheriffs office
Basically if its a small park its just whatever area police govern that region. However, state and national parks have park rangers who are employed by the National Parks Service
or USFS
they also some of that
Jan is right yea
United States Forest Service also does parks stuff but theyre more forest than park
tested and changed... any idea why this is not working https://pastebin.com/XuRpDwR0 ?
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.
Im new to the game but is there a super realistic food mod?
Like with bmr, bf%, and calories depending on gender, activity, maybe even profession?
is there a way to reset all the vehicle within the map and respawn it without doing a hard reset of the server?
e.g. wipe all of the vehicles within the map and spawn all the vehicles?
Sound more like #mod_support question I guess but isn't the food already realistic enough? So gain and losses wait base on what you eat ^^ and nutritionist to be able to see what each thing have as fat carbs and so on ^^ also I do think you burning more calories if you move a lot in the game. Base on when I play with a friend who just read vs me running around fell like I have to eat more then he do.
i want to overwrite the vanilla function ISInventoryPaneContextMenu:equipWeapon(weapon, primary, twoHands, player) How would i go about this? i want a check if something is true, if it is true than you cant equip weapon, if it is false do the main function self
oh yeah, that works thanks
can you help me π i am trying to overwrite a function aswel, but cant seem to find a way to get it working.
For posteriority about vehicle spawn, vehicle reset, vehicle generate, vehicle generation, spawn vehicle, reset vehicle, generate vehicle
From my my testing:
- In every case of an attempt to do a map-wide vehicle spawn/generation, you would have to wipe all of your currently owned vehicle
- Vehicles.db and map_x_y.bin files would need to be removed in order to allow vehicle to spawn in that (x,y) area
- Deleting map_x_y.bin will reset state of the area meaning any player crafted assets and items within that area will be removed
- If you are worry about the progression you made on your safehouse, just delete every map_x_y.bin file except the area where your safehouse is. (to check the (x,y) co-ordinate use any zomboid map site and move the decimal point of x and y to the left e.g. 12222x2770 -> map_1222_277.bin). Though the area of the map_x_y.bin that you didn't delete won't have any vehicles spawned
- It is possible to use the different vehicles.db seed of another file and apply to your current world provided that you delete map_x_y.bin area that you want the new vehicles.db seed to spawn, and then replace vehicles.db of your choice. (I have tested this by removing vehicles.db and all map_x_y.bin of my current server in order to force the game to generate new vehicles.db with different sets of vehicles)
- Do this at your own risk / backup beforehand as I am not exert at this. I only wanted to share my findings for posteriority purpose.
please correct me if I'm wrong
Overwrite is usual easy to do. But do not advice to do it. So you sure you want to overwrite it and not do a hook? To overwrite you just overwrite the default name of the method with your function
yes i need to overwrite.
so this will do it?
-- Function that equip the selected weapon
function ISInventoryPaneContextMenu:equipWeapon(weapon, primary, twoHands, player)
getPlayer():setSayLine("Test")
local playerObj = getSpecificPlayer(player)
-- Drop corpse or generator
if isForceDropHeavyItem(playerObj:getPrimaryHandItem()) then
ISTimedActionQueue.add(ISUnequipAction:new(playerObj, playerObj:getPrimaryHandItem(), 50));
end
-- if weapon isn't in main inventory, put it there first.
ISInventoryPaneContextMenu.transferIfNeeded(playerObj, weapon)
-- Then equip it.
ISTimedActionQueue.add(ISEquipWeaponAction:new(playerObj, weapon, 50, primary, twoHands));
end
or after reading again ISInventoryPaneContextMenu:equipWeapon = myFunction()?
Yep like that
If you do that you overwrite default function.
got the blood for my fiat working
only thing i need to figure out and I can't seem to find anywhere is
how do i set the schematic that is meant to appear here?
lua/client/ISUI/CarMechanicsOverlay
allright thanks i will try
will be home in about 40 min from now and i might be able to help more
allright, i just figured out that i did not even enable the mod, xD so i will try to do everything again
hahaha
did item tweaker api break
i cant change anything now
TweakItem("filcher.SmithingMag5","TeachedRecipes","Make 22LR Magazine;Make 22LR EXT Magazine;Make 44magnum Magazine;Make 223 Magazine;Make 223 Ext Magazine;Make 556 Magazine;Make 545 magazine;Make 762x39 magazine;Make 308 magazine;Make 308 Ext magazine;Make 9mm magazine;Make 9mm Ext magazine;Make 45 magazine;Make 45 Ext magazine;Make Tongs;Make Sheet Metal;Make Small Sheet Metal;Make Ball Peen Hammer;Make Metal Drum;Make Scrap Metal");```
it appears on the book
and the recipes are in game
but it just doesnt teach the player the recipes
Does anyone know of a documented API or does everyone just kind of look at how the game does it?
A good example is DoZombieStats from IsoZombie. I'm using this as a resource and it doesn't really tell me what it does:
https://zomboid-javadoc.com/41.65/zombie/characters/IsoZombie.html#DoZombieStats()
I think I understand that it updates a zombies stats from another mod however.
Javadoc Project Zomboid Modding API declaration: package: zombie.characters, class: IsoZombie
See the issue I am having is that in the pastebin, the line numbering is correct, the only instance of nil is 6 lines earlier. What should I do in this case?
in line 5 ACAC.currentWeapon is defined as nil, might that be it?
if you want to really know what something does then decompile the games code to read but usually names are self explanatory
only think i can see is say the error is tried to call nil in OnWeaponSwing at KahluaUtil.fail line:82. and i dont know if line 81 is allowed to be nil or not
did it work ?
why do you need to override
if another mod tries to do something with it its likely to be incompatible
instead you should hook like
Is there an easy way to find out if the game is in single player or multiplayer?
isClient() and isServer() return false in single player
thanks
local oldISInventoryPaneContextMenu_equipWeapon = ISInventoryPaneContextMenu.equipWeapon
function ISInventoryPaneContextMenu.equipWeapon(weapon, primary, twoHands, player)
--do thing before
oldISInventoryPaneContextMenu_equipWeapon(weapon, primary, twoHands, player)
--do thing after
end
already said that a bit ealir browser ^^ atlast it would be bad to overwrite but people do it and yea i even told hook would be better ^^
yeah i saw just reiterating and showing how to do it
also best part about this one is when mod overwrite each others functions xD
then you get people coming here or mod support asking why stuff isnt working
But i need to not activate the function. Not equip the weapon. To remove the function if a variable does not is false
then
Not yet. The parameters are nil. The function is now called
local oldISInventoryPaneContextMenu_equipWeapon = ISInventoryPaneContextMenu.equipWeapon
function ISInventoryPaneContextMenu.equipWeapon(weapon, primary, twoHands, player)
if notFeelingLikeIt then
return
end
oldISInventoryPaneContextMenu_equipWeapon(weapon, primary, twoHands, player)
--do thing after
end
see no need for replace
Thank you for this non replacer method. I will try it. Better indeed
that what is called a hook in ^^
Thank you and @mint sphinx, this method works and exactly what i needed π thank you guys you are amazing
np
yea only time i feel it okay to "override" is if you optimazi the old code and still support all the cases
and you make sure its loaded before other mods
allright, i just needed the notFeelingLikeIt, never intended to rework functions
is there a mod that allows me to activate god mode on main menu before actually loading my save
Hi all, I'm trying to update the SandboxPlus mod, just the alternative combat portion for personal use as a challenge to really learn LUA and the game's API. I'm on a good track so far, I think I understand everything the mod does but I need help updating it to current build, or rewriting the code.
For those unfamiliar with SP... I essentially want to change MultiHit to be dependent upon the player's strength and endurance(fatigue) levels, as well as the weapon type held.
For example: a player with 10 strength, holding a barbell, with full endurance can hit a maximum of 8 zombies in one swing.
Whereas: a player with 3 strength, holding a butter knife, with low endurance can only hit a maximum of 1 zombie in one swing.
Could anyone point me in the right direction in getting started?
So far I'm adapting the mod name, and trying to understand all the variables from the mod and finding the methods in the game's API. This is what I have so far. Have to send in two chunks because I don't have Nitro.
Any tips or help updating this, or just hinting me in the right direction is GREATLY appreciated on this project.
What defines an item being usable?
The script or the lua
I can only get my item to be equipped in hand but not usable
it really depends on the item, what uses it should have. Adding food or an item that holds water should work just by adding a proper script
@nimble spoke Sorry to ping you, but would you have any insights on what I've posted above?
I don't know where exactly you're stuck
10-4 no worries.
I can't really explain right now, I'm just sitting and staring at the code like "ok I have the code... What do I need to do with it?"
it is an older mod that you're trying to update, right? What happens when you try to use it? Might want to go fetching errors in console.txt
ty
smooch
Please don't tell people to get cancer and swear at them, just at us instead
it was a bot but i understand why youβre saying this
anyone know when animzed's coming?
i thought the devs were gonna release it with .41 launch
@nimble spoke
ERROR: General , 1644253176033> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in OnWeaponSwing at KahluaUtil.fail line:82.```
--so basically at line 83, local weaponPerkLvl = ACAC.getPerkLevel(_player, ACAC.currentWeapon)
--I think ACAC.currentWeapon errors out due to calling nil
Updated the code with some notes.
Could it be that the list of perks is outdated, so it is not returning a valid perk?
Very well could be. It could be that anything in the mod is updated and these are outdated references to the API in general.
That would be a good place to start, thanks. Let me know if you think of anything else.
Wait yeah local weaponPerkLvl = ACAC.getPerkLevel(_player, ACAC.currentWeapon)
This is telling weaponPerkLvl to store the level of a perk of the player but
A: I don't think that the perk is defined?
and
B: ACAC.currentWeapon would return a value of nil because because the perk level for the weapon doesn't exist right?
Good evening all! I am searching for a way to use emote animation as action animation in timed actions.
I tried that self:setActionAnim("CeaseFire"); but it did not work and tells me that it can't find a node for PerformingAction = CeaseFire
Is there a way to achieve that or am I wasting my time and the anim is locked to emote system?
is there a good tutorial anywhere about adding icons to mods? i've tried with two separate items and neither is displaying the icon i made, but the item i used the baking tray icon for IS displaying the baking tray. my icons are saved as .pngs in my texture folder. is that not the appropriate way to save icons?
make sure you have the icon name start with "item_"
thank you i was losing my MIND
iirc they also need to be 32x32? dont quote me on this
Alright so I used the "PlayEmote" function in the start and the update instead of setActionAnim and it worked aswell!
oh they're definitely 32x32 i made sure of that
they don't quite fit with the game aesthetically but u know what i can fix that later jiwerweporjwe
my icons still aren't showing up. do i need to have the recipe file ALSO call for item_<item name>? item_<item name>.png, even?
Update: I cannot find getPerkLevel anywhere in the API. It seems it has been replaced with getLevel()
What parameters should I pass in order to get the strength perk level?
no
Can anyone confirm for me?
icons are very simple, they just need to have the Item_ prefix and be 32x32, besides that there is no secret
i failed to capitalize the "i" in "Items" so im hoping that's the issue
in your item script, use the tag " Icon = " if you only have 1 icon. If you use more than one, use "IconsforTexture = ".
oh he have multiple textures too? might be it then
nah i only have the one texture for each item.
show us your item script
ah btw you are putting the icon texture on the /texture main folder right?
yes in /texture on it's own. /texture should be in /media right?
yes
should it be /texture or /textures?
show us your script, the item code
texture
Oh.
π
DisplayCategory = FirstAid,
Weight = 0.1,
Type = Drainable,
UseDelta = 0.05,
DisplayName = Vial of Test Strips,
Icon = VIALStrip,
StaticModel = PillBottle,
Medical = TRUE,```
is the one being a bit of a dick right now
on the script it must be like Icon = myicon, and the texture is Item_myicon
so your texture is named Item_VIALStrip?
yes indeedy
Strips
yeah lol
GODDAMN IT
:D
i feel like a DOOFUS
luv this small mistakes, pretty hard to notice and easy to fix. :D
it happens to the best of us
they are lol, yeah happens all the time to everybody
guys im still trying to learn lua and make this basic code here, i really could use some help... i want this glove to give +4 strenght when equiped:
local function PowerGlovesEffect(_player)
local player = _player;
local perkLevel = player:getPerkLevel(Perks.Strength)
if player:getWornItemβ() == "Wiz_BatgirlGloves" then
local modifier = 4;
for i = 1, modifier do
player:LevelPerk(Perks.Strength)
end
end
end```
Is that whole code? Or you call this function somewhere?
Also, any errors?
I don't know you will have to check that function and make sure it can only return valid stuff
Hello, does anyone know if I'm doing a basic mistake here? The lua script errors out in line 4 (getRootLayer) and it doesn't really tell me anything useful (i.e. why it errors out). This is the whole code
function handleZombieUpdate(zombie)
advAnim = zombie:getAdvancedAnimator()
if advAnim then
rootLayer = advAnim:getRootLayer()
if rootLayer then
print("red")
end
end
end
Events.OnZombieUpdate.Add(handleZombieUpdate)
I forgot to say. Thank you very much
If i want to add a vehicle mod would i have to wipe all the existing vehicles for them to be in the game or do they spawn in on cell discovery?
yes

they will spawn on cell discovery
YES
just wanted to do an inclusive or
Yeah, it's just a syringe and I'm trying to add it to the medical menu but I can't figure it out
You might want to check a mod that adds similar items, these are not simple to get working
i think you should post there on Modeling section
i made some medical pills, with new effects.. maybe i can help you, what this syringe do?
Ehhh
no, not really
because how's it modeling ?
Fully heals you then your health decays overtime, basically adrenaline shot
I'll hit u up when i get home
that car is a model, thats why?
I have the lua I just cant get it to be "used"
k
yes thats the hole code, its a function only, to make that glove give +4 strenght while equiped
no errors, it just dont work
no bonus when i equip.. i dont know lua so im trying to learn that
starting with that code
Try something like this:
local function PowerGlovesEffect()
local player = getPlayer()
local perkLevel = player:getPerkLevel(Perks.Strength)
if key == Keyboard.KEY_COMMA then
if player:getWornItemβ() == "Wiz_BatgirlGloves" then
local modifier = 4;
for i = 1, modifier do
player:LevelPerk(Perks.Strength)
end
end
end
end
end
Events.OnKeyPressed.Add(PowerGlovesEffect)
And then press comma in game.
lol this will sound so stupid, but witch one is the 'comma' key lol
thank you btw i will try it now
Oh, it's , on keyboard, near . :D
lol ok thanks
Or replace with any button from here.
https://zomboid-javadoc.com/41.65/org/lwjglx/input/Keyboard.html
Javadoc Project Zomboid Modding API declaration: package: org.lwjglx.input, class: Keyboard
Any errors now?
i will check in 1 minute, i got someone on the phone atm
Sure. :)
is there a mod with multiple cars at once? I have like 10 different car mods
yeah i saw some mods that add more than 1 car, like apocalipse machines
it gave me this error (the same from the last try)
GRAVE: Error found in LUA file: C:/Users/GUSTAVO/Zomboid/Workshop/WizTradeMod/Contents/mods/WizTradeMod/media/lua/client/Wiz_BatgirlGloves.lua
ERROR: General , 1644269372720> ExceptionLogger.logException> Exception thrown java.lang.ArrayIndexOutOfBoundsException: Index 7946 out of bounds for length 31 at LexState.token2str line:251.
ERROR: General , 1644269372720> DebugLogStream.printException> Stack trace:
java.lang.ArrayIndexOutOfBoundsException: Index 7946 out of bounds for length 31
outofbounds something
i know its this line the problem
if player:getWornItemβ() == "Wiz_BatgirlGloves" then
must code this different i guess
How would someone make new outfits that zombies can spawn with
But with the default clothes
@quartz badge from what i know you need to copy vanilla item path and guid to your fileGuidTable and then you would be able to use it in clothing.xml
<path>media/clothing/clothingItems/Shoes_ArmyBoots.xml</path>
<guid>227cb2d5-05a5-44ed-872d-ac4ca16e80bc</guid>
</files>```
for example army boots
Maybe iβm just stupid but i didnβt get a word of that lmao
this file on media/clothing controls what outfits the zombies spawn, you need to set there waht you want them to use, vanilla or not
oohhh
authenicZ did that, he prb knows a great deal of it
he made clown zombies π so cool
i removed the key thing it dont give errors anymore, i also used a different getFunction, but still its not working lol
local function PowerGlovesEffect()
local player = getPlayer()
local perkLevel = player:getPerkLevel(Perks.Strength)
if player:getClothingItem_Hands() == "Wiz_BatgirlGloves" then
local modifier = 4;
for i = 1, modifier do
player:LevelPerk(Perks.Strength)
end
end
end
Events.OnKeyPressed.Add(PowerGlovesEffect)```
looks like this atm
i think that for i =1 part is not doing anything, since there is no errors now
oh rofl, srry about that, from your question i thought you already knew how to create custom zeds outfit π
No this is like my first dive into stuff like this
Im currently making dawn of the dead zombie skins so i'd want to make outfits similar to the ones in the original movie
you can mess around with the vanilla stuff, specially the ones they dont use, like the bunnysuit lol
or u can make custom outfits and add there too
Id want to make outfits from clothing thats already in the game, rigging too much for me
Although im experienced in blender i dont want to deal with making new models for this game lmao
i made 150 already π its fun lol
check the clothing list on the wiki, the IDΒ΄s are there
np
The old game id use to mod for had people who'd rather spit on you than tell you how to do anything
lol
and when we will see your mod on workshop already? π and besides how do you plan to "distribute" it?
on workshop? prb never... i will upload on curseforge i think
steam makes me sick
people will have the 'horrible' ordeal of having to download it and put on one folder lol
skins for the zombies?
cool
lol
They look way more like people than zombies are depicted today
that woman looks like she got cirrosis π
Lmao
But since it was in the 70s, everybody wore stuff that people would wear in the 70s
i like the 80Β΄s outfits a lot, i grow up on the 80s lol so based stuff
The shell suit jackets in the game are the best looking clothes imo
So colorful, its a shame they provide no protection
oh well just don't forget to say when you do upload it wherever you want, more outfits to collect
well you can allawys just make a replace file and give them protection, takes like 1 minute
sure π
also do you only made costumes from comics and anime?
i might just upload on steam too, i didnt decide yet lol
yeah i made dragonball, super sentais and such
tbh even if you dont like steam, you still can do both no? xD
yeah saw those on #modeling ch
i got a sims 4 server with hundreds of dragonballs mods, i ported only a few to PZ yet
rofl
well quite some free time you got there
lol
i got a minecraft server too, but i dont did aything there for the last year, i got this large mod with almost 250k downloads there
kids ask me for updates all the time
well creating mods is sort of double edge sword
we usually do that when we want and most of the times it is bcz we have fun doing it
but when ppl then starts to demand updates or fixes or features
it becomes quite a chore
especially when you even stopped playing the game
specially when you dont get paid π u forgot that
and bum streamers make thousands with 'reviews' of your mod π
i'm THRILLED to say the crash on left click issue for my t1d mod seems to be resolved. part of the issue was i mistyped an item name in the recipe, and another was a misplaced comma. i added icons to the items that were causing the error and the error seems to have stopped. i'm gonna have to do more intense debugging to make sure it's REALLY gone but i'm so happy things are starting to work correctly.
cool
yeah, but users don't care about that, and if something does not work, you will be the first one to be yelled on, and cried about injustice of this world, and how we(moders) own to them!
that all SAID im having trouble making the player read their SugarValue out loud. i'm sure i'm making a simple mistake. any help would be appreciated!
function Diabetes.OnCreate_TeststripDRY(items, result, player)
self.character:Say("My blood sugar is " .. tostring(SugarValue))
-- read blood sugar
end
i wish i could help u there anger, but im noob on lua too lol, i posted a simple code couple minutes ago too that i need help with π
no worries man i appreciate the thought, haha
There is no metatable thing called self. It will be trying to get character of non-table null. You could instead use one of the variables that feed into the function (items, result, player)
In some functions you can reference a thing called self. This is because a thing is specifically created by a Lua script where it creates something called a metatable and calls something self. If you see a function defined with a : in the name then it means something, usually named self in zomboid, is fed into it.
so it would look like
function Diabetes.OnCreate_TeststripDRY(items, result, player)
player.character:Say("My blood sugar is " .. tostring(SugarValue))
-- read blood sugar
end
or do i need to dig deeper and find what player itself can reference?
player is your isoplayer java object in that context. It can Say things.
awesome!! do i need .character to make it Say something, or is that superfluous?
In timed actions in zomboid the devs have a convention where they name the isoplayer java object character, and the variable referring to it is stored on a thing they name self. So it will say things like self.character and self.item.
ok!! that makes sense. thank you so much for all ur help my dude
:o
it's still not triggering :( does :Say work in single player? i assumed it did but now i'm second guessing myself
Say does work in singleplayer.
function Diabetes.OnCreate_TeststripDRY(items, result, player)
print("My blood sugar is " .. tostring(SugarValue))
player:Say("My blood sugar is " .. tostring(SugarValue))
-- read blood sugar
end
How about this?
Maybe you made a mistake in the recipe?
You seem to be trying for a long time. Are you simply returning to the main menu and reloading the game to test? Restarting the whole game would be slow.
........i have...................... not been doing that.......................... i have been restarting the entire game every time. lord.
alright so this is neither printing nor Saying, which means OnCreate_TeststripDRY isn't triggering, right? is there something missing from my understanding about how OnCreate works? here's the entry for the item.
DisplayCategory = Junk,
Weight = 0.01,
Type = Normal,
DisplayName = Dried Test Strip,
Icon = StripDRY,
OnCreate = Diabetes.OnCreate_TeststripDRY,
Medical = TRUE,
}
u can even replace models with the game opened, it refresh, but u still need to quit/reload to replace textures and codes
you can use the same savegame thou
OnCreate for items will be in build 41.66, but in the currently available build it's only available for recipes.
well NOW i feel silly. how would i add it to a recipe?
I'd say to check recipes.txt in the scripts directory for some examples of how vanilla does it?
if vanilla does it i can figure it out!! thank you
π
So i made the texture mod, and it works if i enable it, but when i turn it off the reskin doesnt go away
Even after restarting the game
@willow estuary May I PM you? I really am stuck and need some help. You can get to it whenever you have time I just don't know what is wrong with this mod.
If the mod list in the game you load does not match the mod list in the main menu, it reloads Lua.
Forgot I could reply to myself. Still need help on this.
I've scoured over the API and the code and everything looks right to me, but I start my game and go in and it throws this error.
VICTORY
i too shout my blood sugar on command
it's the first thing i was trained to do when i was diagnosed, it's true
lmao
i was thinking about randomizing insulin sensitivity factor & carb ratios per character to better capture real diversity in diabetes management, but i worry that won't be "fun". right now ISF & carb ratios are really simple (1:25 & 1:10) and lend themselves to mental math pretty easily. i'm torn between making it simple for easier accessibility or more complicated to stay truer to reality. any thoughts?
I made an update for my mod to add custom size. If there is someone with a 4k screen who uses it, can tell me if it works well that would be great, thx !
https://steamcommunity.com/sharedfiles/filedetails/?id=2733680483
Btw can a russian make me a translation pls? There really isn't much. The equivalent of 2-3 sentences to translate. (I don't trust google translate for Russian. Am I right ?)
The files to translate (UI_EquipmentPanel_infoText is not necessary, do it only if you are motivated)
i just got math.floor to work and i feel like a wizard πͺ
your mod will add the diabetic trait too? thats cool
What's the F in QOF?
yeah! is there a mod out there that already DOES diabetes??? mine's gonna be a whole THING i'm really excited about it. i'm thinking of making the trait itself worth (low thirst + low hunger) as a reward for managing a whole new stat. i haven't learned much about traits yet, but i figure taking the trait will just toggle the functions? i've seen toggle buttons in other mods so i'm hopeful i can figure out how they accomplish it
A miss click, it's QOL ofc
Okay I figured, but thought maybe there was some other "quality of" phrase that I didn't know about
no i dont think there is, and its a cool idea haha, quite realistic too your sugar level thing
i dont know what is wrong here, i made just like other mods did and the vanilla, but i just cant attach the part to the gun:
item WizGunLightsmall
{
Type = WeaponPart,
DisplayName = Robocop Auto 9 Flashlight,
Icon = WizGunLightsmall,
Weight = 0.2,
WeightModifier = 0.2,
StaticModel = WizGunLightsmall,
WorldStaticModel = WizGunLightsmall,
AimingTimeModifier = 5,
MountOn = WizTradeMod.Wiz_RobocopGun,
PartType = Canon,
MetalValue = 1,
}```
item Wiz_RobocopGun
{
DisplayCategory = Weapon,
ImpactSound = null,
MaxRange = 15,
WeaponSprite = Wiz_RobocopGun,
Icon = Wiz_RobocopGun,
DisplayName = Robocop Auto 9 Gun,
SoundVolume = 20,
MinAngle = 0.95,
....................
ShellFallSound = M1911CartridgeFall,
RackSound = M1911Rack,
StopPower = 2,
MetalValue = 45,
WorldStaticModel = Wiz_RobocopGun_ground,
ModelWeaponPart = WizTradeMod.WizGunLightsmall WizTradeMod.WizGunLightsmall reddot reddot,
}```
i tried without my Mod ID prefix too
the option to attach dont appear
i also set the attachment on the model of the gun, so i dont know what im missing here
model Wiz_RobocopGun
{
mesh = Weapons/firearm/Wiz_RobocopGun,
texture = weapons/firearm/Wiz_RobocopGun,
attachment reddot
{
offset = 0.0000 -0.0710 -0.0700,
rotate = 90.0000 -1.0000 176.0000,
}
}```
Woo I finally figured out how to do this (uses plaster and requires a trowel in hand)
hello?
can anyone help me
item tweaker doesnt seem to work
require("ItemTweaker_Core");
else return end
TweakItem("filcher.SmithingMag5","TeachedRecipes", "Make 22LR Magazine;Make 22LR EXT Magazine;Make 44magnum Magazine;Make 223 Magazine;Make 223 Ext Magazine;Make 556 Magazine;Make 545 magazine;Make 762x39 magazine;Make 308 magazine;Make 308 Ext magazine;Make 9mm magazine;Make 9mm Ext magazine;Make 45 magazine;Make 45 Ext magazine;Make Tongs;Make Sheet Metal;Make Small Sheet Metal;Make Ball Peen Hammer;Make Metal Drum;Make Scrap Metal");```
the recipes show up on the book
but doesnt teach the player
not sure whats happening
Is there anyone who knows the basics of how to make a modded hairstyle in PZ (or even a modder willing to be commissioned to make a hairstyle)? I've tried scouring the internet for any information possible about it and I'm really struggling here.
Hello. Is this tutorial still up to date ? It says to decompile the JARS, but doesn't say how to do it. https://github.com/Konijima/PZ-Libraries/blob/Tutorial/README.md
just curious here; Did anybody made a mod that add weapons to a vehicle already? like a machine gun from those james bond cars
i saw a APC mod the other day, but the turret didnt fire i think
Howdy there folks, does anybody know where the OnCreate function for recipes is in Zomboid's directory? Specifically for the candy package, as I'm trying to get a recipe that gives you candy alongside an empty wrapper, and since I know very little about lua I was hoping to use that as a reference
im so scared to even BEGIN debugging adding this modded treatment
Heh I can imagine that being quite the hassle
examples of OnCreate can be found in recipecode.lua which can be found in whatever your version of Steam\steamapps\common\ProjectZomboid\media\lua\server happens to be
if thats what your asking for, i mean! i may be misunderstanding
Ah nah that should be just fine. Thank you very much haha, I'm quite slow when it comes to lua but I've wanted to make food mods on the game for years and have finally decided to take the dreaded plunge!
I suppose another thing I must ask for it is for this OnCreate part, do I need anything else other than just linking it with the recipe?
eg. OnCreate:Recipe.OnCreate.OpenPomps, in the item's recipe, while lua is just the information?
eg. function Recipe.OnCreate.OpenPomps(items, result, player) player:getInventory():AddItem("Base.MintCandy"); end
Hey guys can we create mod suggestions here, or is it just for the techy side of mods
Oh, a while ago there was a glitch in zomboid so the last weapon in the MountOn list was not included, so if that glitch is still there you may be able to get it to work by adding a second entry.
anger, the historical record calls diabetes a wasting thirst or one with sweet urine, a formidable wasting disease. People with diabetes passes a lot of urine, making them thirst for more water. "wasting" was because they wasted away getting thinner.
There is some evidence that type 2 diabetes was not known of or recognised in the past, and that there may be environmental influence making type 2 diabetes known of. Maybe I am not remembering right now any of the arguments against this.
There is evidence that the rate of diabetes has been increasing hugely over many decades and that there may be environmental cause for this. Some would say that people may have instead become better at documenting the cause of death as diabetes as a result of environmental changes.
Diabetes was lethal after a few years. I am thinking maybe in the zomboid context the character would actually be able to live a long time with diabetes (by a long time I mean a few years), without anything else causing end of life, and that failure to inject insulin might be best simulated by effects other than hp loss.
Check https://github.com/pzstorm/capsid#storm-capsid to decompile and generate annoted jars with IntelliJ and Gradle.
a second entry on the mountOn too? like MountOn = WizTradeMod.Wiz_RobocopGun WizTradeMod.Wiz_RobocopGun, ?
this is strange, because BritaΒ΄s and the other 2 mods i look for those part scripts dont have them, but i will try anyway lol
Hi, is it possible to get safehouses and factions in Lua on the server side? These don't seem to work:
local s = SafeHouse:getSafehouseList()
-- s:size() == 0
local f = Faction:getFactions()
-- f:size() == 0
it might not have loaded them yet when you call those methods
Can I save a table to a file to save variable for the user? Like that they still the same even beteween character and save
sure
@drifting ore i use this script to serialize lua table into json and vice versa
I had thought of using json, I was just thinking that there might be a method directly in lua. As for matlab for saving matrices
Thx, I will try it
local Json = require("Json");
local theTable = {};
local function Save()
local fileWriterObj = getFileWriter("file_theTable.json", true, false);
local json = Json.Encode(theTable);
fileWriterObj:write(json);
fileWriterObj:close();
end
local function Load()
local fileReaderObj = getFileReader("file_theTable.json", true);
local json = "";
local line = fileReaderObj:readLine();
while line ~= nil do
json = json .. line;
line = fileReaderObj:readLine()
end
fileReaderObj:close();
if json and json ~= "" then
theTable = Json.Decode(json);
end
end