#mod_development
1 messages · Page 370 of 1
payload lua?
just got hung up by a weird collision bug where cars hitting cars you've previously been in would be like hitting a brick wall... but seems vanilla -_-
PayloadDamping.lua,PayloadDamping_Server.lua,MassUtil.lua
what would i need to call for a zombie to interact with things like a door, Windows maybe?
ah lemme see what happens with a different vehicle set t similar high masses
@knotty stone yea so something your mod is doing is preventing the semi truck from being a street clearing monster
I set a step van to 8000kg and 400hp and it actually had half decent acceleration, and could plow the hell outta traffic jams
So it's working now without the files?
didn't try deleting them yet.
just disabled the mod and made a stepvan with the same settings
stepvan is like 3 seconds to 30mph
The lua stuff should only reduce weight of the trunk when it's filled so it should not interfere.
But you never know 
Hmm, Seems to be like its at 1/4HP what it should be, so Im thinking I might have screwed up my overhaul (it multiplys 'overhauled' HP's by 4...)
Oh, I forgot to add Base.....
that mighttt help lol
yea that helps
reaches about 58mph after 11 seconds or so without a trailer now
and just plows through traffic jams
(even with many of the other vehicles being 1000~2000kg now)
Hi everyone! I'm currently updating some mods for Build 42 (42.13) and I’ve run into some issues with deprecated functions (like the old BodyDamage methods). Is there an updated API documentation, a wiki, or a spreadsheet where I can check the new function names and changes for B42? Any help would be greatly appreciated. Thanks in advance!
updated javadocs are hosted here
https://demiurgequantified.github.io/ProjectZomboidJavaDocs/index.html
I also find it funny how the semi doesn't even notice the little car that got stuck on it
Pretty much
I don't supposed you have any engine sounds you wanted to use?
I just need 1 solid RPM tone of an engine noise, exhaust noise, and ideally startup/shutdown (but thats kinda optional I guess)
Else i'll just assign one of the 4 iv already made up
Don't have anything like that.
Ah k np
I should prob figure out a way to add the 8 speed PSC transmission to the patch too. -_-;
but that'd mean removing it from PSC -_-...
Oh well. Maybe another patch some other time.
(project summer car actually makes W900's spawn with a unique 8 speed transmission)
So yea, if I don't include engine sounds, the patch is just:
local carData = require "Realistic_Car_Overhaul_Data"
--Kenworth W900
carData.vehicleValues["Base.SemiTruck"] = {horsePower = 425, weight = 8164, cargo = 100, engineSound = "Engine1"}
carData.vehicleValues["Base.SemiTrailerVan"] = {horsePower = 1, weight = 3140, cargo = 5000, engineSound = "Engine1"}
carData.vehicleValues["Base.SemiTrailerCistern"] = {horsePower = 1, weight = 4140, cargo = 100, engineSound = "Engine1"}
Oh, I forgot the other semi truck
But yea. :0
I'll work on dressing it up with requires and/or tollance of the mod not being installed
Next I need to work on an example dash for project summer cars dashboard system at some point -_-;
@willow tulip What's the tooling/env you use for modding PZ?
I gave up on the whole thing because I was trying to read the scripts (with the Lua extension on VSCode) and mess around with the in-game debugger and it was slow and frustrating.
Programmers notepad, why?
jump to definition, find usages, etc. never worked and it was hard for me to figure out what was doing what
the ingame debugger is.... Kinda meh with how often locals are just.. missing
yea I just use find in files a lot
with directories for the games lua and java.. I honestly should just make a single folder with a copy of all that.
so you're basically reading the scripts with Notepad++ and just looking through files and FAFOing?
yep
generally trying to see how things are used in vanilla and immitate that
Or just outright copy/pasting large chunks of vanilla code and then go to work butchering it
My engine menu is the mechanics menu, after much, much butchering
Alright thanks
Don't entirely recommend programmers notepad but whatever, lots of looking up how vanilla does it since the docs are sparse
I recently switched to VSCodium because I hated the constant prodding to use AI
I'm sticking to that because of familiarity
lol.
I've only used vim here and there but it really isn't so bad
Using vi for development does sound masochistic, but vim would probably be alright
wait
how little sleep was the guy who coded this have?
@LuaMethod(name = "addPhysicsObject", global = true)
public static BaseVehicle addPhysicsObject() {
int ID = Bullet.addPhysicsObject(getPlayer().getX(), getPlayer().getY());
IsoMovingObject obj = new IsoPushableObject(
IsoWorld.instance.getCell(), IsoPlayer.getInstance().getCurrentSquare(), IsoSpriteManager.instance.getSprite("trashcontainers_01_16")
);
WorldSimulation.instance.physicsObjectMap.put(ID, obj);
return null;
}
it.. only returns null?
and why is its return type.. BaseVehicle...
it could be that it used to return something and this avoided breaking API changes
for the function that adds trash cans at the players position? Yea im sure so many mods are using this.
its like some weird debugging function gone wrong lol
Technically, since any object can be null in Java, no lie was told (/hj, of course it is misleading lol)
Shoulda never let bro cook
go easy, that's pre-steam code 😅
lol.
Wait now I'm angry
why is it calling Bullet?
Why is it "PushableObject" when neither a bullet nor a vehicle are pushable? Do they mean pushable over the wire? Why not call it serializable?
Why does the obj not need an ID on creation? why isn't the ID generated by the constructor or a factory or an injector? Why does the call to physicsObjectMap need both the obj and ID as args?
See it just gets worse the longer you look at it
Bullet is the physics library
But bullets in game didn't even have physics models until recently...
oh that's probably a third party lib
wait, the library itself has a singleton that you call to do everything
...Ok I wanna forget all this
Yes if by 'everything' you mean '20 outta 500 of bullets functions'
Got it
Sorta like how there is a singleton for 'everything in fmod' except it hardly lets you do shit either
I definitely found a buggy world. Probably caused by some of the mods i am using. It has almost no hammers!
Onky found 2 hammers, onde of them worn, and i visited at least 6 hardware stores and warehouses, and several garage storages. I am actually using debug mode to teleport and visit many different places.
So i wonder.... when do hammers (or any intentoryitem) materialize? When i touch its container? When i enter that building? When i enter that cell?
I know there are tables with ´loot´ odds for every item, but i wonder when do the actual items are created
I want to find out which mod is f*** my game
enter the cell
makes sense! Now i just need to find which event it triggered on that moment and try to debug it
I could also apply some "binary search" to see which mod is supressing most of the hammers.
I keep a savegame just before teleporting to a new cell with a hardware store. Disable half of the mods, teleport and see what happens
then i restore the samegame and try again
Finally found another hammer. The first hammer i find in a crate. The other good one was inside a toolbox
so i created this table that acts kinda like an abstract class - what features would you want on a class that doesnt extend a PZ object/table?
how much does map size affect the performance of the game?
Little, but zombie filled skyscrapers sure tank FPS when nearby
I have a deep fascination for procedural generation. I think maps are not procedurally generated (yet). The loot is.
I would expect a good implementation of the PG in zomboid would generate always the same objects in the same locations.
So if inventoryitems are ' materialized´ when we enter a cell... i expect each cell to have a predermined seed of its own, based on the original seed. The moment/order in which the player enters a cell is not predermined, so the (sub)seed for that cell is fixed.
This makes even more sense for multiplayr games. We don't know who and when enters a cell for the 1st time, so we have to reserve seeds for each cell when the game starts
Areas out of map bounds are procgen right now
hmmm didn't even know there were areas out of map bounds
AFAIK, loot generation isn't deterministic.
With the exact same seed you may find loot in a building, or you may not. It may be already ransacked. It may have different loot. It's pseudo random
pseudo because it still depends on location flags and sandbox settings
it can be ransacked later, of course, but i was expecting the generation to be the same
yes, there are settings that affect loot generation
it's generated when you enter the cell wdym?
but can we say that for the same seed and settings the loot location is the same for tht cell?
According to Black Moon... yes, and makes sense
its the solution that makes more sense, from a design point of view
It's not just according to black moon, you can test this.
Add mods that alter loot tables after a savegame has started, you will find the new items in the undiscovered chunks but not in the discovered ones
because the loot isn't generated when the run starts, but when the map chunk loads
Yes, i know i can test this.
I was playing around with this as a found a world with almost no hammers! and i want to know which mod is causing that.
Yes, its lazy generated, on demand. When the cell is entered, it seems
then it'd probably depend on which mod(s) are affecting the loot tables?
But that´s why i say each cell should have its own seed assigned in the beginning.
A pseudo random generates always the same sequence of results for each seed.
So to make sure the items are the same in that cell for that seed and settings, we would need to make sure that cell loot starts from a fixed seed, which is not picked up randomnly. Its picked always the same way in that world
Yes, but i don't think i had any mod which would touch that, and i have other worlds with that mod combo with hammers enough
Yes, its a mistery. I will probably never discover what the problem is.
But... now i am going to generate a new game, with the same seed as the buggy one, without mods, debug mode and will teleport to that hardware store, and see if at least one hammer shows up
I migth never discover which mod, but i want to confirm it was a mod. And i might also check my theory about loot generation
MOOOUAL WEILDING WEPONS AND BOOMBOX PLAYABLE ON BACK COMING SOON!!!! FOR TRUE MOOZIC B42.13+
https://steamcommunity.com/sharedfiles/filedetails/?id=3632610172
Kinda wish they would delay loot gen to you first enter the room but oh well 🙁
This bacon goes up to 12... that is one more than 11.
but that would make loot generation undeterministic
So?
Pretty sure it already is more or less undeterministic.
What about pre-looted buildings? Would the windows and doors break when you enter?
I don't think they have it seperated
the pre-looted status can be generated before, im just saying the container contents could be generated later
less lag when just driving around in new areas
what makes procgen amazing is that capacity of reproducing a world exactly given the same seed and properties
(the loot tables are IMMENSE)
It's true, there needs to be a solution for that
Slow load was a cool debug feature, they could render in chunks smarter
delayed loot spawn could still save the loot spawn seed on the chest
also not sure if loot even is deterministic atm. that would require synced random number generator seeds.
pretty sure iv reloaded a save and gotten new loot and vehicle spawns/etc in an area too
so yea, PZ is not deterministic, other then world seed defining a few things like basement spawns IIRC
Yeah, seeds do basically nothing
basements and voronoi noise
such wow
I feel like they could do better with that
Keep in mind you can see the seed of a MP server you're in, so maybe they should fix that before having seeds to more
good point... public seeds in MP games could be exploited, if loot is fully deterministic
i think the seed of the MP game should not be public, ot at least have a private part
Why am i running all the time and bumping into walls? i must have hit some key before...
its normal now
so... i have good news and bad news...
good news is.... MP game seed knowledge cannot be exploited
and that causes also the bad news.... not only the loot is totally unrelated to the seed, but even the player spawn location is not determined by that
I am disappointed 
It would be a nice improvement to have a truly deterministic loot generation.
I think its possible, and for debugging/troubleshooting is useful
Here is a guide to make objects that are visible on ground but not in hand.. visible in hand. https://steamcommunity.com/sharedfiles/filedetails/?id=3662153517
Hello modding guru, is listFilesInModDirectory recursive?
no
Hello! I'm attempting to make mod for the first time, its a simple recipe mod to be able to craft spare engine parts using vanilla materials.
So far the mod has worked in SP and self-hosted MP environments, however I am struggling at getting the mod to work on a dedicated server. I've double checked that the mod line in the server.ini file is formatted like \modname and that the workshop id has been copied into the workshop line of the ini file. When attempting to the join the server without being subscribed to the mod, it does force me to subscribe before joining, however when loaded in game, despite meeting all the requirements, the recipe does not appear in the crafting menu.
Any pointers or guidance would be greatly appreciated, and if you need any additional information, please let me know! Thank you!
start a game in debug mode and try to open the Item List. it may break on an error, indicating you a problematic script definition.
Your recipe needs to be in the module Base
It's a bug
My recipe has the module base already specified, but just to double check, like this?
Your ID needs to have no spaces
Sorry if I am misunderstanding, is that referring to the craftRecipe ID?
Yes
I need to add diagnostics for these it seems
I shall edit that now, fingers crossed its that 😄 Thank you!!!
Is it possible to use a c library in a mod if that library has a luaopen_* function?
idk how tf your recipe worked in the first place tbh haha
Most likely not, that C file would need to get loaded by the game
Or at the very least you'll need some kind of manual installation at any point if I had to guess
So require("whatever") or loadlib won't work in the lua VM?
I would doubt it but at the same time I've never heard of loading C libs via Lua
You can test it out tbh
If it does work tho, that's a bit of a huge discovery, but yea I doubt it 😅
Ok thanks, would be nice to just use existing code for mods instead of reinventing everything in lua...
Wdym ?
C libs loads by Lua mods are likely security flaws tbh ?
Else there's plenty of Lua libraries out there
For example using protobuf to sync informations of multiple servers etc.
Will require manual installation of something
There's tools out there that were made by some servers to communicate with the game
Tho I don't know any links to any, but you can definitely find some projects like that
Me again, unfortunately that didn't seem to have worked following a update to the workshop and restart of the server. I've tried what tchernobill suggested by putting the game in -debug to see if the item list would break, but no break unfortunately 🙁
There's no custom items in your recipe right ?
Nope! All purely vanilla items
Show what it looks like now ?
The in game menu?
Yep working right now in singleplayer!
MP is so fucked rn when it comes to recipes it's insane
in game crafting menu in sp for reference
I have no idea sorry
Maybe try to add a recipe translation ?
That's the only thing I see missing
I shall give that a try, thank you for all your help though its really appreciated 😊
also ensure, your server mod source is updated like your singleplayer mod source is, if they differ.
and maybe ensure your MP player has the right prerequisites to know the recipe 😉
I have spent hours figuring out why MP -debug doesn't work for my MP mod and realize the game simply doesn't like having craftRecipe as a sub mod. Then, eventually figure out that the game simply doesn't like having craftRecipe calling for output items that does not exist within the sub mod. I am not sure if said behavior applies to vanilla items as well but you might want to try, by having the said items script in the mod.
That's not it no, worst case it's linked to load order if I had to guess
C libs wouldn't be compatible because they're written for “real” Lua (i.e., standard versions of Lua written in C)
The game uses Kahlua, running on Java
So, if i have a dream of a mod, a mod that does 1 thing out of 10+ i am wishing for, and no idea about scripting or editing, how would I go about sweet talking one of you smart people into doing a quick hack and make a branch of the mod in question? There is no need to make new sprites, basically jsut copy the existing sprites ten times over, and link them to other things... I think...
The unofficial modding discord has commissions & there's a thread in this channel called mod_ideas where people leave them sometimes (idk how often they're actually picked up)
Uh, we don't have that
Huh?
There's a thread here
Ah
I realize I phrased it in a potentially misleading way now that you say that, though
I doubt anyone looks at that thread anyway
Yeah I wouldn't imagine many of them got picked up 😅 but it's something
welp, thanks, i think. Answer seems to be to try a thread nobody seems to use, learn to do it myself, or hope for a miracle.
Learning it can be quite fun, if commissions are off the table 😄 and you can always ask for help here or in the modding discord
The pins have resources on how to get started with modding, if you decide to go that route
And whom would I be talking to, and where, about a commission?
Many thanks for the link. Very much appreciated
Anyone knows how to send a message to all clients in server side lua, like "server restart in 10 minutes"?
processGeneralMessage("server restart in 10 minutes")
I guess, I did not test
yeah that will work, will the sender be admin or another player?
?? if you send from server, the sender is the server, right ?
Tried that on the self hosted multiplayer and the sender was my steam name... so not sure
You have to tell the server to do something generally through a network command
sending that even as a host would most likely send that from your 'client'
Also, you said the c-word in a public pz channel, you will be getting a lot of dms from people saying they can help you lol, don't trust them
Sometimes they also hang around the modding discord, and reply to threads, so make sure to search their name in the server or something to make sure they're an active member and not someone trying to scam you
anyone willing to help me resolve an issue Im running into (I have recipe consuming the proper items and producing the results item wise however the OnCreate hook defined within the recipe is triggering this warning "WARN : CraftLogic f:70987, t:1770568091841, st:64,517,144,886> CraftRecipeData.initLuaFunctions > Could not find lua function: CashToServerzPoints.GiveServerzPoints10 "
and fails to perform the defined sendClientCommand (despite the function being defined in a lua file inside the client folder)
... Do oncreates run on client in MP?
Id assume they would run on the server.
at least in B42
I am trying to use the sendClientCommand opposed to sendServerCommand
but maybe I should use the servercommand
sendClientCommand(getPlayer(), "ServerShop", "add", { getUsername(), 10 })
using the sendClientCommand just sends a request to the server for the change to be made
oh well I'll try using both and see what happens xD
Stick the file in shared or server so both can access it
then slap a print("UNIQUE STRING NEVER USED BEFORE") in there
and see whose console.txt it shows up in
oncreates are server-sided
so using the sendClientCommand wouldnt be advised opposed to using something like sendServerCommand?
the server can't send a client command to itself
in game the money is consumed and the receipt is generated however OnCreate call throws a warning in console and the player doesnt receive the zPoints
and from what I read if the OnCreate is defined in the recipe the function doesnt need an event right? b.c it should fire after the recipe is completed, however it isnt happening like that xD
I also have the Recipe_EN.txt file in translate folder
the server can't see a function in the client folder
yeah I tried it in the server folder and shared as well
but same error
wasnt sure if I need more logic to initialize the recipe or something
or maybe I need to add an Override = true to the recipe?
thanks for the pointers tho much appreciated!
stop trying to send commands from the server to the server
Instead.. just call functions.. on the server.. from the server.
... without sendanythingcommand()
giveThePoints(100);
end```
gotcha the sendClientCommand isnt needed
though I believe oncreate gives you a few parameters.
function Recipe.OnCreate.OpenCannedFood(craftRecipeData, character)
giveThePoints(character,100);
end```
is likely what you want
(craftRecipeData lets you muck around with the outputs IIRC)
Like you could have it give you an item with <X> uses by mucking around with craftRecipeData instead of a full item
thats the recipe for both
Yea, you could do something silly like make Base.Receipt renamed based on how much money they donated or something.
heres some sample code:
function Recipe.OnCreate.OpenCannedFood(craftRecipeData, character)
local items = craftRecipeData:getAllConsumedItems();
local result = craftRecipeData:getAllCreatedItems():get(0);
local jar = items:get(0);
local aged = jar:getAge() / jar:getOffAgeMax();
result:setBaseHunger(jar:getBaseHunger())
result:setHungChange(jar:getHungChange())
...
with you adjustments to the lua it should work
and I shud throw it in server or shared?
Fun fact: the client can execute both -_-;
so the client folder was okay xD
Client gets access to client, shared and server
Server gets access to shared and server.
no.
But make sure to wrap any code you don't want the client trying to compile/etc with if not isClient() then
(Note: this allows it to execute in SINGLE PLAYER, as isClient is false in single player)
will do thanks again!
Is it still possible to pass a string through a timed action now that it needs to go through the server? I used to send a string through the process but now the server does not see that value when it runs.
works fine in single player of course and I have the actions in the shared directory, etc.
called from the client like this: ISTimedActionQueue.add(UseHotDogMachine:new(player, HotDogMachine, soundFile, foodType, squareToTurn))
function UseHotDogMachine:new(character, machine, sound, food)
local o = {}
setmetatable(o, self)
self.__index = self
o.character = character
o.machine = machine
o.soundFile = sound
o.foodType = food
o.stopOnWalk = true
o.stopOnRun = true
o.gameSound = 0
o.maxTime = 240
o.lightSource = nil
return o
end
food is the string I am trying to use as a switch in the complete later on
the name of the field needs to match the name of the parameter
when creating the timed action on the server, the server just calls new() with the values of the fields with matching names from the client
okay so I should have done foodType on both or food on both
Thank you, I guess that should have been obvious but I was missing it. I appreciate you 🙂
heya, i would like to know how to add custom radio and tv transmissions
Keep getting this error, not sure what exactly is causing it. Happens on new game so I believe its my code but I still seem to get my items
Are you modifying an ArrayList as you iterate through it?
Removing entries while iterating through a list with a for loop will cause issues.
Unless its some kind of mutability problem I dont think so
Only seems to happen on the server as well
Believe it happened even when I didn't have two add items, not sure which ones working
what does the print line show?
shoudl give a clue, unless it prints on teh client and errors are on teh server
Also, does it give errors in single player?
add more print statements until you can figure out exactly which line triggers the error (unless it's in the error message below the section you pasted)
though... that error being in gameclient update...
makes it very weird.
as if teh server sending the "new item here" command to the client causes the issue somehow
like it's sending a broken array as data?
Hmmm
function recalculateItemHappyness(baseItem, cookingLevel)
local data = baseItem:getModData();
local ingredientBonus = 0;
-- Ingredients first
for key, value in pairs(data.cookingData.foodList) do
local compensatedValue = value*0.1;
ingredientBonus = ingredientBonus + math.min(compensatedValue,compensatedValue^0.5)
end
-- Next, add in spices.
local spiceBonus = 0;
for key, value in pairs(data.cookingData.spiceList) do
spiceBonus = spiceBonus + value ^ 0.5; -- 0.5 exponent of deminishing returns on each spice, but unlimited amount counted.
end
ingredientBonus = math.min(ingredientBonus,ingredientBonus ^ 0.7); -- keep exponent from increasing tiny meals bonus
spiceBonus = spiceBonus ^ 0.7;
-- Should we add? Or something where spices have a bigger influence on an already good meal?
baseItem:setUnhappyChange(data.cookingData.baseUnhappyness + ((spiceBonus + ingredientBonus) * (cookingLevel+1) * -1))
baseItem:setBoredomChange(spiceBonus * (cookingLevel+1) * -4)
end
Kinda feels like it needs some RNG... lol. or that minigame to manipulate the results some..
Basic idea is, you want to add (up to) 10 hunger of multiple ingredients 'for ideal minmaxing' and 1 hunger of each spice, but you can add more with diminishing returns. Cooking level also multiplies the resulting happiness/boredom buff by level+1
It doesn't actually stop anything either, function runs fine it just throws that error
https://steamcommunity.com/sharedfiles/filedetails/?id=3587204390 Beta of my cooking overhaul 'Realistic cooking' now available...
anyone know what the b42 replacement for getGameTime():getWorldAgeSeconds() is, cant seem to find it in any of the websites ive gone too
maybe getWorldAgeHours()*3600?
Lazy sods can't even be bothered to check sandbox variables for the starting time:
getTimestampMs
getTimestamp
getTimeInMillis
there -> https://pzwiki.net/wiki/Game_time
Omg thanks, do u have a link to an updated wiki on b42 changes ones I seem to find still mostly show b41
Lol thanks u read my mind
if you need irl time
--- [SHARED]
--- Return a numeric timestamp (seconds) for real-world (system) time
--- Returns an integer (math.floor)
function Utilities.GetIRLTimestamp()
return math.floor(os.time())
end
thanks this will come handy, for BB_WorldEffects and BB_WorldEngine was just going to use ingame time but some things will be better for IRL time
Im trying to port an fallout armor to the game, I managed to get the helmet but the chestplate doesn't work, when I "All Transform" the chestplate on blender, it does a tiny little line in-game look
Can someone help me please ?
Is the chestpiece rigged to the skeleton? (eg: like a jacket that moves and deforms with the player model)
Or is it a single static non-flexible model piece? (e.g.: like a backpack that is stuck to a specific bone)
Yeah its rigged
Here's the original chesplate that Is mounted on
And when I replace the model of this chestplate by mine (just replacing the models, the names are still the same)
It despawns
I don't remember yesterday how I managed to get this little line between the character legs
But today I just remplaced on blender the original chestplate model with mine, I used ctrl + l to link object data and ctrl + a to all transform
Idk whats wrong
Maybe something with needing to export bones/links/transformation? I can't recall details, but I can recall things being very fussy with the exact object structure when I did some very simple clothing modding
There was a nice tutorial linked from the wiki that went through it
Yeah so the problem is the rig I think
Because when I put my models It despawns
But I putted vertex groups and armature
Litteraly the same
Can someone explain to me how I can attach/rig my chestplate to the character ?
Can a mod send a global message like \servermsg does?
sending the message with processGeneralMessage() seems to pick a random player as sender even in server lua code
@karmic elk do you remember which 1 story house you wanted to bulldoze and the roof was not getting deleted?
Hi. Yes, it's any with the FLAT roof. If it has any pitch on it, I believe it works fine, but there is a collision that prevents you from deleting the flat, single story rooves.
Yes, those are broken, good find. I think that will fix many, but If you go to Riverside, there is a hotel 'Riverside Aparments' or something, near the river where it has a double story roof (which gets removed) but there is a drop down section of single story and that won't delete and causes a collision.
Same with some houses in Westpoint.
Also, if you dont' mind, do you think you could add 'street decorations' and 'road signs' to the delete list please?
i have, just doing the roof stuff you mentioned right now
I know there is a flat roof that has a corrigated metal undulating effect as it's texture. That doesn't get deleted either... just trying to think where that is. I'm sure it's on the Riverside hotel...
guys all mods work for me other than clean ui and clean hotbar can someone help me fix this ?
Typically how people handle this (or at least how I've handled it & seen it handled) is by creating a “fake” message on the client; i.e., feeding a table to the relevant method in ISChat with the appropriate functions available in that table
If it was picking a random player in “server Lua” then I imagine that code was actually running on the client
I found the answer in the meantime it is very simple
to print an alert modders can use in the client lua ISAlert.instance.servermsg = message ISAlert.instance.servermsgTimer = 10000;
Worth noting that this won't create a chat message like typical server messages do
yes
But if that's alright for your use case then that's certainly simpler
but the chat message caused some headache, like the message gets sent by multiple users multiple times even if only one processGeneralMessage() in the server lua code was used
That's likely because your code is not actually limited to the server
The Lua in the server directory runs on the client too
Ok that is really unexpected
It's certainly odd 😅 the server doesn't run anything in client, but the client runs everything
yea I hated when I found that out lol
You can use the isClient and isServer functions as guards
You'll see a lot of if isClient() then return end at the top of Lua scripts intended only for the server (and if it shouldn't run on singleplayer either, if not isServer() then return end)
='m trying to make an additional mod for Fallout mod power armor, and I'm having trouble changing the chest plate, for example. To test it, I took the original chest plate and merged it with mine, but in-game, only the original chest plate spawned. I then cut out the original breastplate in Blender and kept only a small part of it with my breastplate model. As a result, in-game you can only see the small part of the original breastplate. I conclude that pz only spawns the original breastplate, but why not mine? Can anyone help me? Thank's in advance
Might be the wrong chat, but is there a mod that makes your character hold a rifle in the low ready position and a sidearm in close retention? Or one or the other?
If its not weight painted, it wont show
Weight painted ?
Never heard of that
How can I do it ?
know blender
Here is guide, but if you don't know blender much, it might be tad difficult
Oh yeah I see but the parts that is showed is not weight painted
I don't quite understand
This part surrounded is shown in-game but in blender the weight is full black like mine
i only assume its left over from other armor you mentioned deleting
Bro thanks I've been struggling with this for 2 days straight
Thanks a lot
It was the weight paint
But I got a question, what it means the color of the weight paint ?
I suggest watching tutorials about that, they will explain it far better than few messages from me
Yeah thanks
Do you know maybe why it does that ?
How can I fix it ?
Have you even attempted to read my guide at all?
I do know why it does it, but if you'd follow the guide (especially part with doing hat and weightpaint) you might've got it first try
Yeah but I'm kinda struggling
I'll follow it thanks tho
Apply transforms to armor
I applied all transforms but still the same
And when I walk the whole chestplate is moving as if the chestplate isn't connect to the bones
Show me screenshot from blender and XML file for that armor
<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel>media\models_X\Skinned\Clothes\PFO_PA_FRAME_X_O1_BodyArmorPlate.fbx</m_MaleModel>
<m_FemaleModel>media\models_X\Skinned\Clothes\PFO_PA_FRAME_X_O1_BodyArmorPlate.fbx</m_FemaleModel>
<m_GUID>1bd64751-193e-41c6-9d54-d9e51710bc61</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<textureChoices>PA_Frame\X_O1\X_O1_BodyPlate</textureChoices>
</clothingItem>
And to which bones you parented it?
weighted it*
Armor like this you don't really wanna weight to single bone
Torso would probably be weighted with Spine and Spine1 bone, where panty part would probably be pelvis with some Spine weight to even out
Thanks a lot its working
I didn't understand that you need to weight paint all vertex groups like pelvis etc..
I just did transfer weights from the weights menu from the original to the new one
and its perfect
Thanks !
Do you know by any chance how to move the head position ?
Because the head is too far ahead
Nevermind I figured out
thats so weird, need guard in server/ for client 😅
it will cause fewer headaches when you modularize all the files and control what calls them with events.
sometimes using multiple guards, such as isClient and isServer, makes the code structure more complex to debug
If it's at the top of the script, that isn't really a problem since it'll only run where the statements indicate
i.e., an if isClient() then return end at the top of a script in server doesn't really make the code more difficult to debug, it just prevents it from running on the client
Not that I'm against modularization. I think writing modules by default is ideal. I just don't think if statements that use one of two clearly-named functions are at all problematic
It will just add some noise to read those files. On top of that, they normally have multiple require() calls, global variables, and local variables. Adding an extra guard is like band-aids of "well, idk whether the client will run this file or not-just to be safe."
You do know whether it runs it, though
The guard is specifically to prevent the content of the file from executing on the client because the behavior of which files runs is well-defined but counter-intuitive
So it isn't just noise, it's an intentional prevention of running code intended to be server-only on the client. Such checks would likely exist in the code regardless unless you're exclusively relying on events running on one end only
btw, this is an architectural design problem, maybe related to when TIS ports SP to MP
What do you mean by “ports SP to MP”?
man, completely hijacking a bit here, i've been knee deep in writing a lua library for better OOP stuff...
from here
i don't feel the 'noise' argument is strong when talking about something that serves a clear, irreplaceable, and very basic purpose
it is a shame that we have to do it, but i wouldn't ever argue against doing it
it seems to be pretty good, but are there anything that you guys wish you had but dont feel like implementing? right now i feel like i have a pretty good inheritance system with some utility and have been working on a "collection" class
Nothing comes to mind—if I want something I typically either implement it or add it to a list of TODOs lol
yes
like instance.method.chaining
you do calls to reduce a collection and each call return a new instance of a collection until you get what you want
Any examples specific to collections? Honestly I find that a simple table meets most of my use cases but I'm interested
Ah, I get you
so your code reads a little nicer*
regardless - i feel like i have to do it, but it'd be cool if it^ was also wanted
I'm not in the target audience necessarily but it certainly sounds useful
imagine getting rid of the for calls
im literally just spinning my wheels learning lua and this kinda hooked me in
i see this is problematic in my case, but idk how to proof it (yet), lmao. gonna talk about it later
I'd be interested to see the implementation regardless
ill update my current repo and if you feel like it - take a look and feel free to be brutally critical - the one question i cant fully answer is why.. lol
if you're worried about files having multiple isClient()/isServer() checks e.g. in functions, i do find that complicates things and is something to be avoided in typical cases
its a full on tinker project so im not totally attached, but i do have high hopes of making it more if theres anything interesting that people like
Can you compare yours with Lua OOP modules like middleclass and 30log for pz?
That would be great, because i have also heard about them but havent had time to check yet.
The last time i checked, 30log was good for client only.
ive been trying to keep the root away from PZ and strictly sticking to lua 5.1 with pz's kahlua in mind, but if i get this to some unknown future point, i wanna write some modules that would target PZ specifically that use the library
like properly hooking into the event system easily with all of the considerations considered for you
but this is like the baseline im starting from to build out
also i wanted to add some level of type safety that people could have for "free" *
while also adding some types that PZ doesnt have natively
Well pz and lua
again, im happy with any butal honestly and if you wanna really yell at me - my dm's are pretty open
has to isServer just for basic sound checks to make sure it sends correctly
Maybe im doing it wrong but playing sounds from server code (aka timed actions) is cursed:
if isServer() then
playServerSound("PZ_MetalSnap", playerObj:getCurrentSquare());
else
playerObj:playSound("PZ_MetalSnap");
end
(also why there are missing sounds for mechanic install/removal failure in SP)
I made a github issue interface (supports steamOAuth) for bug reports to my mods https://chuckleberry-finn.github.io/issues/ looking for feedback from my fellow modders. I plan to expand a bit more on the form section.
Hey everyone, I've got a question in regards to caching data.
If I use something like player:getStats(), can I cache the Stats object, or does it change constantly?
What about player:getBodyDamage() ?? Does that data change, or can I cache this once and pull from it constantly?
I'm trying to optimize my code and clean things up, and am wondering what is/isn't able to be cached safely.
I'm assuming if I cached this data, that I'd have to check if the player/character died/doesn't exist and then reset the values if so?
Please let me know if anyone has any insight on this, thank you!
I've heard/understood that setting it as a local earlier in a function and calling on that down the line is better (not sure if it's even registerable performance wise, but it does help reading the code months later when you've forgotten it all)
creating references to objects shouldn't cause any issues generally
Alright. So, for instance, if I use local stats = player:getStats(), will that data change over time? Or is this caching the reference to the object itself that stays updated? I guess that's what I'm trying to figure out. If I have to constantly 'grab' the stats data on each function call, or if I can just set it as a local variable and use that.
Not sure if Im being pedantic, but that's just a reference - and is safe to reuse as a reference 😅
Not sure I'd call that cacheing, but I could see an issue if you keep a table of references but you generally won't ever have to do something like this
the local being within a function for repeated referencing is the usual
Hey no worries, I appreciate the corrections and information!
storing it in a module (table of functions and other variables) might be riskier(?) Someone with more knowledge on the garbage collection of PZ would have to chime in
I was reading into "weak tables" and setting that to allow garbage collection, but I think thats far beyond the scope of what I'm doing.
I'm mostly just trying to get this information/reference called once at the beginning of the player's game session, and then be able to use that unless they die/object changes. Trying to figure out the safest way to do that and not have to constantly call stuff I don't need to.
weak tables do not work in pz
and yes, those objects are all safe to cache, as far as i know they never change, and they definitely won't change within the scope of a function or something like that
Say for instance, I have this code, and then a player dies/respawns. What would occur? Would this point to an incorrect reference? Or would it retain the reference still and continue to work?
local player
local stats
local body
local function OnStartCacheFunction()
player = getPlayer()
stats = player:getStats()
body = player:getBodyDamage()
end
local function SomeFunction()
print(stats:getFatigue())
print(stats:getEndurance())
print(body:getOverallBodyHealth())
end
I guess the real question is, when is the best/safest time to cache a player reference, or other references? Are there Events that always get called when a player spawns/creates a new character after death that would be valid for this?
that would be an issue, a new player will have a new object/stats/bodydamage
there is really no need to cache on this scale, getting stats or body damage is not expensive
I am making a Sleep Deprivation mod, that causes issues for players that try to push past sleep on fatigue enabled servers by using copious amounts of energy drinks, coffee, eating uncooked tea bags (...rolls eyes...)..
I currently have the mod update every 1 minute once they reach past a certain threshold, and I was worried about having to constantly get this data so often and if it'd cause unnecessary usage over time.
If a player does die, how can I check against that to halt my code from running and throwing errors?
I'm assuming I can hook into an OnCreateCharacter or similar event to change those variables if/when a player starts with a new character?
i really just wouldn't cache it, it adds a lot of work and mental overhead for what is really a micro-optimisation
if your code does end up causing noticeable lag it won't be because of a couple getters
Okay, thats a fair point.
In the case of a larger more complex mod where I may need to cache values, do you know of any that do this type of thing effectively that I can reference?
And in the case of an Event that's runs every 1 minute, I guess I should just check if player is nil and return from there to stop errors in case the player dies?
it won't become nil if they die
objects can't really be destroyed in java (they are garbage collected once there are no more remaining references to it), your variable will always point to that object even if the game stops using it
we use isExistInTheWorld() to check if an animal is still 'real' for the horse mod, i don't necessarily know if that works as well for players but it probably does
Hmm.. im still working on B41 stuff. Is that function available, or is it new?
Is there an isNotDead() type of method to use to determine if a player is dead but not exited to the creation menu?
I wouldn't worry too much about usage in this kind of case tbh
Also isn't there an event for like every minute or every ten minutes (in-game) ?
Yes, I am using Events.EveryOneMinute.Add(UpdateSleepStatus) to run my code.
But it is going to try to call code on the player/stats/body objects of that player if they die, and trying to stop the errors from propagating if that happens, unless I am mistaken.
it is, but you have to really stress test it to see the gains - i only know this because ive been doing crazy stuff for no great reason
like 100,000 iterations stress testing stuff
you could also use onplayer update and use a check for timestamps to return if its too soon
as eyeOhScream says - you have to be doing something very wrong to see any impact
Yeah, I don't suspect this mod will have really any performance loss, being how it works. But mostly just want to avoid errors popping up and having players on my server constantly mention it. Trying to fail early if the player is dead/doesn't exist in this case. I'll just go back to my normal getPlayer() within each function I need it for, or just pass it along to the functions instead to keep things stable.
Again update player is the perfect event
Utilizing timestamps and isdead
Would give you more granular control over timing
Do you have a reference for this? I'm not sure exactly what method you are recommending.
I currently run the SleepDeprivation check every one minute, which is often enough to avoid players trying to bypass the fatigue/health restrictions I have set. But I figure if I did it on update, it would be overkill.
You can use something like getTimeStampMS (you should check the spelling in the java docs) + however many MS you want and store that somewhere
In player update which is an event that trigger every tick, you can check if the current timestamp is more than the stored (which was then current + however many MS) you can also check if they're dead, + other stuff
The less checks or a return the better though - you can have multiple checks all returning in a row rather than a giant if and or statement
I do wish objects had a temporary data list tied to them like modData though 😅
But you could store the timestamp in the players modData (it would be saved for what it's worth)
@bronze yoke this actually gives me an idea -- if you generate an array list and drop it into the modData you could use that as a temp data list tied to the object right? As objects aren't saved 
Hmm. I'm currently using timestamps for syncing client/server time for a couple of my mods. I hadn't thought about using it this way. I'm just so afraid of using any type of OnTick event to avoid bloat and delays.
I currently calculate the time since they last slept, and then the current time, and use that to determine just how sleep deprived they are. This is saved in the player's modData on each update, and then referenced when the game restarts so they can't just bypass the system by logging out/logging in again.
You'd have to be doing something obscenely poor for even on tick to have an impact
The game is fairly hardy
Just don't print on tick
I know when using print statements to debug, that they absolutely butcher the game if it's ran OnTick, like some of the Recipe Scripts constantly checking OnTest, etc. So I'm hesitant to do nearly anything in OnTick style events unless it's bare bones lol
Print is an expensive as hell call, as is parsing tiles around the player for objects -- like you'd have to make cascading calls on stuff to see any lag
So gathering objects in a cell around a player is super expensive? Is it like a recursive call or something?
Well again, using the timestamp method would only allow one "heavy" calculation through
It's just a lot of stuff going on, but ironically print is the easiest and laggiest thing you can do
I do have a couple mods where I use deltaTime timers to increase a counter for timing things, and that's about the extent I've used OnTick for to avoid issues.
Yeah that's the same idea - I just prefer time stamps over ticks
Do you have any examples of your mods that use that method? Curious how you do it.
I can think of a few, let me check
Thanks!
I'm blanking on a good example 😅 but I did come across this:
newCoolDown = GameTime.getServerTimeMills()+5000
No worries hehe. So that's just a 5 second delay, and then you check onTick if the current getServerTimeMills > newCoolDown?
Yes
Alrighty
Or rather < then return
Ahh, yes.
Then do your stuff, and reset the newCoolDown, gotcha
so on player:isDead() that is once they have gotten killed by something, but have yet to hit respawn, or close out?
This is what I expect to use to not run my code if the player doesn't exist or is dead.
local player = getPlayer()
if not player or instanceof(player, "IsoPlayer") then
print("FILE: GN84-FDB.lua | LINE: 244 | FUNCTION: UpdateSleepStatus() | ERROR: Player is nil or Invalid")
return
end
if player:isDead() then
print("FILE: GN84-FDB.lua | LINE: 231 | FUNCTION: UpdateSleepStatus() | INFO: Player is Dead, returning")
return
end
I've got into type checking things when I was making custom tables for data and needed to validate things, because large tables had potential for errors which I couldn't let pass. But I'm not sure if I need to do this kind of type validation or not. I suppose it couldn't hurt though.
Basically after the < coodown return, you'd do if is dead then also return
Alrighty. Thanks Chuck!
Fancy logging but I can't help but believe there must be the equivilent of #line and #filename in LUA
Espeically since in your logging, line 244 occurs before line 231...
there is not
sads.
well you might be able to do it at runtime with kahlua-specific reflection apis
Oh well, I recommend just tagging them all with unique words then!
Beefcake is mine, get your own!
制作期間: 3週間
作詞・作曲・編曲・プロデュース:AnythingBecomeMoe
絵コンテ・キャラデザ・イラスト・動画:AnythingBecomeMoe
Vocal: 初音ミク & 重音テト
インスト: https://drive.google.com/drive/folders/1eUHL6_mkW2ZFKdsze_qfwN0GjNjQYzNp?usp=sharing
---------------------------------------------...
a tragic tale of a print statement trying to talk to their friend but their friend gets depressed and disappears 😢 All told through flag signals... and japanese.. and subtitles.
Protip: Never read the comments on a vocaloid song, they only ruin good things.
Yeah, this is just a VSCode Snippet to create INFO, WARN, and ERROR prints really quickly.
It just inserts the line number as I do it, which usually means it's completely off later on. I go back and fix these for debug prints I leave in the mod once its finished.
Usually the filename/function name is enough to get me where I need to be at least, and they are a whole lot more useful than just basic print statements with no details. print("player is nil) could literally be anywhere in code. haha
sure, thats why you specify function or something unique like mod name
Yeah, I was getting driven nuts by multiple print statements that meant jack shit every time I looked at them. So I took a few moments to make some code snippets to use, and made simpler ones when I didn't need all the details either. Has absolutely improved my time programming stuff.
In fact, if anyone wants some useful VSCode Snippets like this, here they are. Figure they might be helpful!
Includes a Basic and Full Print Statement for Info, Warning, Error, and Debug with Filename / Line Numbers. Enjoy!
"PINFO": {
"prefix": "PINFO",
"body": [
"print(\"FILE: ${TM_FILENAME} | LINE: ${TM_LINE_NUMBER} | FUNCTION: | INFO: \")"
],
"description": "Insert a print statement with current line number and INFO"
},
"PWARN": {
"prefix": "PWARN",
"body": [
"print(\"FILE: ${TM_FILENAME} | LINE: ${TM_LINE_NUMBER} | FUNCTION: | WARN: \")"
],
"description": "Insert a print statement with current line number and WARN"
},
"PERROR": {
"prefix": "PERROR",
"body": [
"print(\"FILE: ${TM_FILENAME} | LINE: ${TM_LINE_NUMBER} | FUNCTION: | ERROR: \")"
],
"description": "Insert a print statement with current line number and ERROR"
},
"PDEBUG": {
"prefix": "PDEBUG",
"body": [
"print(\"FILE: ${TM_FILENAME} | LINE: ${TM_LINE_NUMBER} | FUNCTION: | DEBUG: \")"
],
"description": "Insert a print statement with current line number and DEBUG"
},
"BINFO": {
"prefix": "BINFO",
"body": [
"print(\"LINE: ${TM_LINE_NUMBER} | INFO: \")"
],
"description": "Insert a print statement with current line number and INFO"
},
"BWARN": {
"prefix": "BWARN",
"body": [
"print(\"LINE: ${TM_LINE_NUMBER} | WARN: \")"
],
"description": "Insert a print statement with current line number and WARN"
},
"BERROR": {
"prefix": "BERROR",
"body": [
"print(\"LINE: ${TM_LINE_NUMBER} | ERROR: \")"
],
"description": "Insert a print statement with current line number and ERROR"
},
"BDEBUG": {
"prefix": "BDEBUG",
"body": [
"print(\"LINE: ${TM_LINE_NUMBER} | DEBUG: \")"
],
"description": "Insert a print statement with current line number and DEBUG"
},
If you want more control over logging levels, you might want to take a look at https://steamcommunity.com/sharedfiles/filedetails/?id=3653948326
I actually just saw this the other day and thought it was pretty badass. I had already had my snippets to use, but was thinking about using this in the future.
yah, also can create a wrap-around and just replace global print with that https://github.com/escapepz/ZUL/blob/main/examples/MyDefensiveMod.lua
Is this just print logging? Or does it save to a .log file of sorts as well?
zul use writeLog instead of print, so you can check the file Logs/mymodule.txt instead of Logs/DebugLog.txt
MyDefensiveMod.lua wrap to check if zul mod is installed and using it, or default print
So this will create a log based on the module that called it? That's awesome. I've wanted to do something like this for a while just to make debugging and logging easier.
yup, so DebugLog.txt is used only for mod loading and checking require failures, while your mod runtime logs (most of them, hope so) go to your own defined log files
Thats great. I'll have to add this to some of my more important mods that I would like to actually log stuff. Is there a file size limit, does it create new files, or just keeps one keeping added to?
same session like DebugLog. iirc , print uses the same code (java decomplied) as writeLog to append logs to the file. So it always goes to the Logs/ folder.
Gotcha. So this would be good for debugging a specific session of testing vs logging data over time?
Oh, nevermind, I see what you wrote now. It appends the log. Is it timestamped by chance, or datestamped?
It is designed to be simple (KISS_principle) like print, so no timestamp is added, because more function calls would increase CPU cost.
If you want to use timestamps, you can extend it with Custom Log Implementation
https://github.com/escapepz/ZUL/blob/main/README.md#custom-log-implementation
I think at the very minimum, a datestamp at the beginning of a new day of logging would be very helpful. But full timestamps would be nice for certain things.
I think the simple prints I use for my own stuff are more than enough for just programming/debugging. But for logging and saving data for some more complex mods would definitely be nice to have a better logging with date/times and constantly save as you play. I've got an economy mod that I've built that I'd like to track data on this way.
Good catch. Actually, print already has something like LOG : Lua f:0, t:1770706231347, where t: is the timestamp.
TL;DR
I just checked and saw that writeLog already adds the time at the beginning of the line ||(like whattt, how could i forget that detail while reading the log file?)||
So there is no need to manually implement adding additional timestamps.
like [02-02-26 01:28:51.086] [SERVER] [INFO] [init:success]
the file name 2026-02-02_01-18_MyMod.txt
Ahh, nice. is the timestamp for lua just the time since server start in seconds? Or is it an actual formatted timestamp?
for the case in zul, it's os time
Awesome. That's perfect then.
What is the line of code that you used to present that info in the logs? Curious how you set it up.
use TRACE log, i dont print the log with line at all, line can be different after edits
I mean, if it says [SERVER] [INFO] [init:success], what exactly are you typing to present that in the logs?
-- media/server/test.lua
...
logger:info("[init:success]")
Does it always preface everything with [SERVER] [INFO[?
side = SERVER|CLIENT|SINGLE_PLAYER
log_levels = TRACE|DEBUG|INFO|WARN|ERROR|FATAL
[os date time string] [side] [log_levels] your_log_line
This is uniform with both the print statement, and the writelog statement?
Lets say I want to do Writelog > Client > Info > Message, what does that look like?
zul uses no print() here, but MyDefensiveMod.lua, which uses print() as a fallback if zul is not installed
Gotcha, that makes sense now.
So this is definitely more useful for detailed/long term tracking of debug info. I'll be adding this soon.
Is it a module that you have to require to use this, or is it all global?
You will need to define it: local ZUL = require "ZUL".
All the examples are in here https://github.com/escapepz/ZUL/tree/main/examples
Ahh, I just realized this is B42. I'm using B41 still for our servers last season before we transition over. Bummer!
Well, this will definitely be one of the first mods I install when it comes to that time. I'll be doing a lot of debugging then.
I need an eye with a brain, can someone tell me what I am doing stupid wrong here ? ```lua
local function getEvalTagCallBack(tagName)--I use the eval just to insert the print, but I have the same result with getAllTag
local callback = evalCallbacks[tagName]
if not callback then
local tag = tagName and ItemTag.get(ResourceLocation.of(tagName))
if tag then
evalCallbacks[tagName] = function(inventoryItem)
print('callback '..tostring(tagName)..' '..tostring(tag)..' '..tostring(inventoryItem and inventoryItem:getFullType())..' '..tostring(inventoryItem and inventoryItem:hasTag(tag)))
return inventoryItem and inventoryItem:hasTag(tag)
end
callback = evalCallbacks[tagName]
end
end
return callback
end
--actual call. itemCont is the player inventory, getAllEval "should" include the blowtorch but is an empty array
local array = tag and itemCont:getAllEval(getEvalTagCallBack(itemTag)) or itemCont:getAllType(fullType)
local count = 0
for i=0,array:size()-1 do
local itemFromInventory = array:get(i)
local availableUses = itemFromInventory:getCurrentUses()
print('getAvailableItemsType drainable '..tostring(i)..' '..tostring(availableUses)..' '..tostring(itemTag or fullType))
if availableUses > 0 then
count = count + availableUses
end
end
print('getAvailableItemsType drainable '..tostring(itemTag)..' '..tostring(tag)..' '..tostring(fullType)..' '..tostring(itemCont)..' '..tostring(count))
Log with a single full blowtorch in player inventory:callback BlowTorch base:blowtorch Base.BlowTorch false
getAvailableItemsType drainable BlowTorch base:blowtorch Base.BlowTorch ItemContainer:[type:none, parent:IsoPlayer{ Name:null, ID:102 }] 0
Hello modding gurus, how do you set the sandbox value through lua?
Haha, BlowTorch item does not Have the BlowTorch tag !
To tsarlib users, you can now use vanilla tag names in tuning recipes for use & tools. modded tags have not been tested. ```
install = {
use = {
MetalPipe = 10,
Screws=4,
BlowTorch = 7, /tag suffix, vanilla tag only/
},
tools = {
bodylocation = "weldingmask", /tag suffix lower case, vanilla tag only/
primary = "base:wrench", /tag full name, works for vanilla. untested for modded/
secondary = "Screwdriver", /tag suffix, vanilla tag only/
},
skills = {
MetalWelding = 4,
},
recipes = {carRecipe},
requireInstalled = {"EngineDoor"},
time = 65,
},
It's like they got halfway through updating things to use tags instead of fixed items and said "close enough, we'll just leave this half done for the next few years"
I really hope the big changes in 42.13 indicate I'm wrong and it's all getting fixed up soon.
Anyone know why the arm mesh at the right is glitchy ?
WEIGHTS
Messy weights, probably caused by using AUTOMATIC weight
Hi guys, do you know why I have my mod in pz? I will add it to users/"user"/Zomboid/Workshop. but it's not in the game at launch.
Why do you have 2 mod.info ?
Also show your mod.info content
I've already fixed it. Now I want to ask a question about how to reload my lua script right in the game?
Hot reloading can be done from the F11 menu or using the community debug tools
thank you!!!
return inventoryItem and inventoryItem:hasTag(tag) returns true/false btw, does not return an inventoryItem
Oh you found the error nm 🙂
yo
anyone know how to make interactions?
ive been trying to find that but i dont see any info about it
Interactions ?
yea
What do you mean by interactions ?
is that possible?
Thanks so much!
1 hidden message
-# ⓘ Discord now requires ID verification in order to see certain messages. Learn more.
🧐
is that real?
Sounds like a trick to get me to click it... I WON'T FALL FOR YOUR GAMES
I thought hiding links was not allowed though?
i thought this discord had a bot that deleted your messages if you did it though
I'd hope that being linked to a 24 year old Google account would be enough to not be considered a teenager.
hello modding guru? Is there a way to check if a player is fully connected from server side?

You mean this discord or discord in general?
Nevermind, I can't read
Just woke up 
Been trying to get an item to spawn with a random random names and tooltips but been having issues. Tried modeling it after the writtenletters item, with both luas(function and list of names) , and setup translation files and no luck. It is almost like either the item isn't calling the function or setting the item name or tooltip.
what makes you think the function would be called ?
pretty sure math.random is a thing in lua
But yea, check your console.txt for errors
Does anybody know how to fix maps Because for some reason mine's not showing up on the multiplayer
first: confirm OnCreateLetterHandwritten() is getting called by adding a print statment. And to sanity check: the handwritten letter item has an OnCreate entry?
Also... make sure math.random works by testing with the in game lua console.
I have a feeling it's Math.random with a big M, and I also have a nagging feeling it does not work and you have to use one of the ZombRand functions.
lua math is lowercase math., java is Math.
Not in Kahlua tho
ah. yea I recall a bunch of stuff about what random is best but forgot most of it..
yea that
oh nice, slide to cut the cabage image 🤣
hey peeps. Does anyone know how/if it's possible to use the Extended Placement transformations within a function, so that when an object is spawned it can be moved into a particular place in the square?
Check out ISExtendedPlacementUI, specifically onRotateGizmo and onTranslateGizmo
And close, to see how to sync
where do I find that? in the vanilla files? I coulnd't find that in the wiki
Yes, search in media/lua/client/ISUI
thank you!
I am slightly confused, say i have ETWModOptions.lua
local etwOptions = PZAPI.ModOptions:create("ETWModOptions", "ETW - Evolving Traits World")
etwOptions:addTickBox("EnableNotifications", getText("UI_ETW_Options_EnableNotifications"), true, getText("UI_ETW_Options_EnableNotifications_tooltip"))
and I'm trying to fetch the option from it in other lua
require "ETWModOptions"
local modOptions
---Function responsible for setting up mod options on character load
---@param playerIndex number
---@param player IsoPlayer
local function initializeModOptions(playerIndex, player)
modOptions = PZAPI.ModOptions:getOptions("ETWModOptions")
end
Events.OnCreatePlayer.Remove(initializeModOptions)
Events.OnCreatePlayer.Add(initializeModOptions)
---@return boolean
local notification = function() return modOptions:getOption("EnableNotifications"):getValue() end
local function something()
if notification() then ...
end
~~and I'm getting
ERROR: General f:9625, t:1770823529611> ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: attempted index: getOption of non-table: null at KahluaThread.tableget(KahluaThread.java:1447).
so my mod Options for some reason are not initialized? I checked wiki page for mod options and everything looks fine?~~
Yea ok nevermind, it works, the classic case of "have you tried turning it off and on again"
Even thought I reloaded luas

Gonna leave the snippet, maybe someone will need it
~~Hi, I'm looking for a way to make a bodylocation that hides all items on the face, but still lets you keep them equipped. think of it like wearing the spiffo head over a helmet for example.
So far I've registered the Bodylocation, and I think the setHideModel function might what im looking for, but I cant get it to work. any pointers what to look for?
edit: using setHideModel expects a Bodylocation, but im providing an Itembody location. weird.~~
Nvm. im an idiot.
The classic cycle
Have a problem -> Try to figure it out -> Can't -> Ask for help -> Figure it out 10 min later
sometimes all it takes is having to phrase the question
rubber duck debugging yes
I need some help with a mod I'm making, it's somehow caused the crafting menu to not open, and I can't figure out why...
Means you made a mistake in one of your scripts which involves recipes most likely
You're also likely getting errors in your console, read those
I assume it has something to do with
attempted index: 1.0 of non-table: null
but I can't figure out what's the cause
The error has a stack trace with it; reading it may help
Can I just copy a workshop mod folder and create a 2nd copy of the same mod under a different name?
What I want is a 2nd copy of the Auto Loot mod configured differently, one set up to auto loot, the other set up with auto drop and configure different items in both so that specific items are auto looted and others are auto dropped.
the stack trace refers only to the vanilla functions, but not to what list was null
if you want, I can send you that section of the logs
It'll require way more changes that what you think
And it also depends on exactly what this mod adds and does
But you'll have file name clashes, ID clashes, and a bunch of other problems
It's not impossible, but if you're not familiar with modding ... 
Ok thx
btw - anyone have a somewhat small library i can refactor with something* im creating - im not looking to change or take over the original code - i just want something* i can use to make sure what im writing makes sense
right now im just tinkering, but if i can prove my code can make mods just a little better i wanna dive in deeper
You want to use an automated refactoring tool?
Just test it on appropriate mod - there's no harm in that if you don't upload them again.
An example of a well written mod you mean ?
show him a cassette mod addon, /s
Visual representation of my code.
adhd
regarding reuploading. how am i supposed to hande a mod that hasnt been updated to 42+ which i made the effort to fix?
is there way to "patch" things or do i make a completely new mod and upload it to the workshop?
reach out.
if nothing?
Try and respectfully patch the issue with the least amount of theft possible (usually a few KB is size. )
credit and link to source material accordingly.
Guys what do you think about adding gorillas? They could use basic weapons against zombies and sharing the similar genes the could be infected and be "superzombies"
Only would spawn at a zoo or smth though
In the 90s I think they already have some chemistry knowledge already, we can as well make bleach from electrolysis of salt water, which is a new kind of water that can be found on various of place, or can be crafted using salt and water (can be tainted), hydrogen and chlorine are output gas, so if we let the electrolysis indoors, it will have the same effect as generator fumes. Hydrogen can be collected using water bottle as explosion that attract zombie. Irl the explosion is really loud so it would be equivalent to a gunshot. Or can be turned into fuel with some extra steps I think. We can add one more trait like "Chemist" or something like that. Just electrolysis of water alone isn't enough, so other chemistry reaction like styrofoam + gasoline = hydrocarbon glue, potassium nitrate (found mainly in fertilizer and tree stump removal) + sugar = smoke bomb that help player escape from horde of zombie, gunpowder can be made using potassium nitrate, charcoal, sulfur (popular in these day as fertilizer),... and other useful reaction could make the game more realistic in the apocalypse world.
Is there a guide somewhere on how to make a mod? like the file structure and whatnot for B42?
you have plenty of links in pinned message here and on PZ wiki. https://pzwiki.net/wiki/Modding
It doesn’t have to be well written - but sure
Looking for someone, that hosts a dedi mp server on 42.13 to help with mod testing. I launched my first mod lastnight, Tested locally in a hosted mp, it worked fine. Moved it to my dedi server and patched it, got it working for myself and bud on our server. Would like to have one more person load it up just to make sure everything works right and get a little feed back on it if possible.
Posting that as a first post here is Fishy.
Yeah, i can see how it could be so.
Suite yourself, im not here to defend anything, nor placate to your insecurities. I offered an oppertunity for someone to help with a project. Take it or leave it. The mod is public, on the workshop and has passed steams validation. Id like to get it up and going and have some small amount of feedback on it before spewing it out to everyone, to get spammed with bugs at all once. Or have the idea stollen right out from under me first go at modding. Do with that as you will.
https://steamcommunity.com/sharedfiles/filedetails/?id=2987772344
i made a version way back
just wanted to drop it
Friends, can anyone help with water... if there's a way to hook drinking water, from sinks? from new bottles?, or maybe there's a way to hook Auto Drink?
i did not
i never overwrite anims
i added another
ah thats cool, I took a another aproach as well, avoided anims and use pure lua to do this
interesting... i never figured out how to do it pure lua.
how would i make a mod that adds a new setting "blind" in the world setting, where it makes zombies completely blind and only go off sounds
hmm. been looking at docs and having a really hard time wrapping my head around any of this 😔 so the main mod idea i have atm is literally just editing the tired moodle's damage debuff: what's the best way to do that? doable in lua i hope?
You can't directly edit it, at best you can detect damage done, and apply extra damage to counteract it
(Without making a java mod)
Yea its one of the things that really bothers me and is something iv wanted to change too lol.
Not too bad.
this would largely be for my personal usage so hmm
if i wanted to look into direct java tweaking where'd be the best place to start?
i guess decompiling and looking for where the moodle code is
yep
theres a zomboid decompiler script that works quite well, lemme find it
I think you want java 25 or something for the current zomboid?
You can then use a pretty simple command line to recompile your .java files into classes and drop them into the zombie folder (you'll need to create one, but it overrides the .jar for you)
yeah i got that already, was tryna run the decompiler but it said command not found in the terminal uuh
did you install java?
yep
it doesn't matter, you just need java 17 to run the decompiler
did you set the path thingy?
for decompilation context it will use the jdk from the game files
ah.
anyway if you can paste the exact error here, someone way more skilled in java can help ^
PS: zombie\CombatManager.java, line 978ish, just look through the file for all instances of MoodleType.TIRED
ty :> now if i can just get it decompiled lol
Im half tempted to actually make some more java mods that change random stuff like that, that just really annoys the hell outta me lol...
too bad its a pain to update them
maybe someday I'll learn how to use leaf -_-;
v curious as to why it's saying command not found cuz i Just installed java 
to make sure it wasnt version issue
Open zomboidDecompiler in a .txt editor
read file
it has some stuff about shells and such in there that makes no sense to me but might to an actual *nix user.
LMAOO
(I decompile on windows so)
i'm new to linux so
trying here lol
yea I dunno.
Oftentimes if you've installed something and it can't find it a new shell session does the trick
we have liftoff, lol
i got it but ty
👌
im sure i'll have more questions later 
Yea lol, it hits the computer a bit when running it 
Feel free to ask them !
is there a certain thing i should follow for git projects to help other modders extend work? - from what i can tell just following the base "mod" file layout should be good enough
it would be cool to see some sort of auto-dependency download/install
fine. starlit is gonna be my target. prepare for pull requests (:madge: - too spoiled by other discords)
hi guys im trying to make a mod to resound all the vanilla guns and a gun mod for project zomboid can anyone help me further? i've done quite a bit of work but some of the guns i've done so far keep using other gun's sounds
B41
This is what i originally wanted to do with the colt python, its a success but i wanted to expand across all the vanilla guns before for some weird ass reason that the small pistols are sharing sounds with the desert eagle??
Still needing help if anyone can help me
chmod +x filepath to run it tho
dont think it will run without execute perms
Hey i made a mod and i was aiming to replace some of the in game tracks, everything is ready but the game doesnt see the mod i made. I have given it to a proper id inside of the mod.info file but idk what im doing wrong. Its my first mod ever btw. Any ideas what i might be doing wrong?
The releases have a .zip file, so unless someone uses some ancient tool to unzip it the file permissions will be preserved
Presumably also set on the relevant files in the repo (if there are any, although maybe not since you'd have to build it anyway), so a clone would likely work too
igu
still feel it is useful if people know of the chmod cmd and at least to grant execute perms just incase theyre one of those people who might randomly run into such an iissue
you just dont know tbh nor do i
but igu
So, do I need to keep the mod files in both the zomboid/mods folder and a new folder in the workshop folder, then create another folder, name it “contents,” and then copy my mod and mod.info into it?
It's certainly useful knowledge in general, just doesn't apply here
No only workshop.folder
fair but doesnt hurt to know fr
Don't mix both
ah okay thank you. Im new with the modding stuff sorry for taking your time 😅
Make sure you have a common folder
hello @bright fog , listem dude, you probably don't remember me, i am that guy that was making a mod with customs zombies from plague inc. The thing is, this mod is finally done and i will soon release it on the Steam workshop. I would like to publicize it somwhow, make it more visible to people since it took me 8 months to make it and now i want people to see it. any tips?
make a video showing what is awesome about the mod, and once the video is publicly available(*), post you item in the workshop, post on reddit to advertise it, link reddit and your video with he workshop item. (*) also wait a bit for Horse Mod to not be in trend anymore (you do not want that competition).
nhum... ok, i will do that
can i ask you a personal opinion on my mod?
Have you ever played plague inc?
anyway, the thing with this mod is, it is not that fun to play. i tried to recreate the necroa from plague inc, so i didn't really made it to be fun. At this point, this mod is more to a simulation on how would that virus behave in the game. It is hard, very hard, i have almost a thousand hours in this game and i was starting to struggle to survive after 2 weeks. Now i fear that people will find it way to difficult to play and quit.
it is unique and well made, that is it's main selling point tho. I was going to release it today, but after what you said i will make the video and wait a bit.
making a melee weapon pack for project zomboid again after 2 years, feels good to be back.
Love the style! Im still trying to learn to make melee weapons as good as this lol
Don't worry too much, my first mod models were dogshit :p
https://steamcommunity.com/sharedfiles/filedetails/?id=2492565135&searchtext=kept+you
everytime i look at my old modpacks i cringe 🐧
Oh nice !
Anyone willing to help me with this at all?
I do remember you yes
It's nice you managed to do it ! To share your mod I suggest sharing it in various servers, on Reddit, have good visuals on your mod page. You can use the supportive saturday of the modding Discord too
A video is a bonus
incredible, i will manage to make everything requested soon
If anyone has cool melee weapons they wanna see in project zomboid dm me your melee weapon and i make it happen (It needs to be realistic and vanilla friendly)
sent ya two
I did what you said but im having this error rn:
i was able to make the mod appear on my mod list i enabled it but i couldnt manage to make the songs play in the game...
i have been struggling with this for hours. Now mod doesnt come up on my mod list once again. When it appeared, it was installed on mods folder instead of workshop folder. Whenever i try to install the mod here it always giving me that error.
😭
this is the scrips i wrote and the overall look of the folders and sound files. The 42 folder only contains a media sub folder, and inside there are only scripts and a media/music folder, nothing else.
I have no idea what i am doing wrong at this point.
using ai seems like a likely problem here, what is a musiclibrary script, this mod will not work even when you get it to show up
but regardless, your mod.info seems to be in the wrong place, it should be in 42 or common
(and common should be lowercase, capitalising it will cause issues for linux users after you upload it)
(Fieldcraft BOB Knife) melee weapon request from @gilded crescent
dm me if you guys have a melee weapon request that you wanna see in pz
That common folder needs to be lower case too
Camillus Machete
yeah im trying to learn but it seems ai wasnt much of a good help :d
apart from the code part i converted the songs i wanna add to "ogg." i hope at least i did that right 😅
If not well... I can fix that easier than writing a damn code i suppose 😆
The mod.info needs to be in the versioning or common folder for B42
yeah i changed that thank you.
im learning slowly ig 😄
Damn i didnt know its that hard to make mods with 0 knowledge.
Read the wiki docs we provide
Before there was 0 documentation
cant imagine the pain back in the day with 0 info about modding.💀
yeah it seems like i gotta learn more before attempting something big like that it was one of my biggest dreams to make a one or two mods to this game i tought working with audio stuff would be easier. It seems i was wrong 😄
You were reliant on learning from existing mods and others
Audio stuff is ... complex
You're trying to replace game musics ?
yes ambient music stuff.
i wanted to change some of the musics if not all of them with few of my all time favorites.
I wanted to see if i can pull it off without having to dive into a lot of documentation didnt know its actually that complex 😄
this should give you an idea about what i want to do https://vimeo.com/789053193
This is "PZ Machine Gun Horde Slaughter.mp4" by Faahresc on Vimeo, the home for high quality videos and the people who love them.
I recorded this like 3 years ago cant believe its still there 😄
I wanted to make assault rifle weapon sound overhaul and combat music change and stuff. That was kind of a experimental fantasy thing of mine.
Im sure you can notice huge difference on weapon sounds.
As a guy with no coding knowledge or even much knowledge on modding in general, is a mod with 2 crafting recipes and maybe one item too much to handle as a first mod?
That's not easy to do
Musics aren't just sound files
They are in bank files and in B42 are even dynamic music which plays based on current situations
Like some instruments get added based on conditions and stuff like that
Do you ever plan on making like a timelapse making a weapon model? I'd love to see the process behind making a full one, texture and model
sounds like a good first mod, depending on how complex the item behavior is
Im just trying to make it so I can make bones into compost/fertilizer. fertilizer I planned on having a boiling process where you have to add a bit of compost plus bones
Which produces a unfinished fertilizer in a pot, that you have to pour into a sack to get the fertilizer item
Is it possible to make a texture glow in the dark ? Like for example a crystal helmet that glows at night ?
Hi guys. I'm trying to get a little niche mod working. Initially was just a little thing I wanted to use myself after noticing how people are fond of using Zomboid for roleplay even on Singleplayer (making marked maps, using certain Rp mods, that kinda thing). I'm a bit nervous to say that I kinda completely lack any coding experience and mostly been trying to use some ai prompts to see what could be done but as expected that hit a bit of a wall. The mod idea is just something to add a simple chat window to Singleplayer mode, so that if people wanna have their character say/emote things, they can. The chatbox and text inputs have worked decently but it hit a wall on the point where after sending a text or emote, it doesn't automatically focuses back on the game, so you have to manually click the screen to regain character control. Anyone with coding knowledge/experience that may share a common interest in this?
What it presently looks like.
Yea i made some research and also downloaded and unpacked few mods to learn how its done. I understand the basics and general stuff but its not enough. I will try from the scratch when i see myself capable enough to give it a another try at least. I have been reading bunch of modding stuff its not easy at all 😄
Guys, question about crafting recipes. If I want to use a certain amount of uses from a compost bag (2) would I have to put item 2 or would that want 2 full bags
Do I have to put item 0.5 instead?
I am unable to find a clear answer on the wiki
I attempted something and am now trying to test it in game… however it does not show up in the mod selection menu, I have the mod.info file fully and correctly filled out
One of the flags for inputs indicates if the whole item should be used or not in the cases of consummable
I believe the default uses "uses" (durability in a way) instead of the whole consummable
You can also just test it
Needs an integer
I just went with normal item 2
I would test it but the game isnt registering the mod folder’s existence, either workshop or mods
Workshop Preview Image
how to add a new weapon to game? I can just change game files but when i trying to make a mod the game didn't even try to read anything from there.
For example i tried to add new axe.
I created folers mods/mymod/media/scripts/axe_items_weapons.txt
I copied axe only from game files. Something like that
module Base
{
item NewAxe
{
...
Why i can't find the axe in game debug?
you need to activate the mod in your save. You need to ensure the item definition matches your game version requirements.
Question. I'm unable to get my mod to show in the select mods window in project zomboid is there a reason for that it's a custom made one and uploaded and everything?
Actually having the same issue.
you need to get your mod in the right folder and with the right mod structure and content for mod.info. see PZ wiki modding.
Thank you I'll take a look I really though I did everything correctly.
I'm a dumb ass
I'm missing the common folder.
Hiya peeps, do you know how to have your mod work for both 42.12 legacy and 42.13? Some users can't update to 42.13 and have asked for a legacy version.
Is there a particular folder structure? Or should I just create a separate 42.12 legacy mod?
you have to downgrade the interface and retest it with B42.12 as if it was another mod, even if most code will be the same. It is not worth it IMO.
So I guess it's best to just create a separate mod for 42.12...?
My point is your time is more worth than complying to a temporary version for 3 players. but if you're good for it, just put it in a specific folder. no need to make another mod.
Ah ok. I might give it a quick bash, there shouldn't be too much to change... I think somewhere I have a backup of that version. Do you know how to separate the folders? I have the "42" and "common" folders. Do I have a "42.12" folder and a "42.13" folder, alongside the "common" folder?
I couldnt seem to find any info in the wiki
Why i can't to change weapon MaxRange? It works for braking windows, but doesn't work for attacking. For example if i make maxrange of axe 20 it can break windows of house across the street but can't attack a zombie on same range.
Same with bags. For some reason there is a limit of capacity
Game version 42.13
yes you can do it exactly like that
also steam lets you download older versions of your own mods on the change notes page
Knives can break a window across the screen 🙂
All containers are limited to 50/100 capacity (depending) without mods such as Capacity limit remover or Total Capacity Override
(realistic car physics also deletes the limit)
I am referring to the thouthands of reports of people starting the game in B42.13 with mods from B42.12 and no start menu because of it
things that will happend with every new version
That's not true tho ...
That's not a thing every version
What your comment implies is that there's a problem with starting mods from the main menu, but the problem is in fact that they shouldn't activate mods made for the wrong version
No that's larger than that mods can change too
So I really recommend to have NO mod active at start, as a rule a thumb. Obviously ModManager-like stuff and other mods that apply on main menu need to be active there with the mods affected by the Meatballing
I seriously don't see how this fixes anything, because at the end of the day you shouldn't be using mods for the wrong version
That you activate those mods only to get in-game is stupid
The mod isn't for that version, don't use it
It's an unstable build, things breaking are to be expected and it should be users to learn to verify the versions the mods are made for
And no, not every versions are going to break mods
Mods are broken for current version, stop using them and wait for them to update, or find alternatives
Also a mod breaking the main menu is not something common, I've never heard of outdated mods breaking the main menu ?
Last big fail I knew of was in B42.12, any empty 'mod option' that was a text box would brick the game, but thats been fixed in B42.13 (confirmed)
But that's a completely different problem
Has nothing with loading mods from the main menu
I mean, it enables mods options on the main menu and crashes it there...
I think there was a few other things mods can do to crash on main menu... As well as some stuff that won't crash main menu but will crash debug mode
But that would break it in-game too ?
the wording he put on the wiki might be a little off, but i completely agree with the message
If you need to crash the main menu with a mod, that's very easy don't worry, there's plenty of ways to do that
nearly every major patch some popular mod breaks and makes the game unable to launch
for the vast majority of mods there is zero benefit to enabling it on the main menu and it inevitably causes serious issues like that
Thanks. I tried one of them but unfortunately it didn't changed anything. I will try other one, or try changing PackMule trait
Yea but at least if it crashes when you load the save, you can use the load menu to remove mods
The wording on the wiki needs to be fixed then to clarify this with a note template, I'm removing that from the wiki, make it clearer to the users why that is the case
Most people just.... give up when the game crashes on load lol
Yea iv only ever had one mod id like people to enable on main menu, and that was cause it was a bugfix mod that fixed autosort to work
That's a problem. please make it clearer or put it back.
Note while they enable larger sizes, if an item is spawned/saved without them it will likely be stuck at the capacity limit
so make sure your spawning new items after enabling those mods and copy the zombie files over
Why don't you make it clearer ?
You're serious right now ?
I made it clear
I can put it back as I made it
I'll check out a bit later
Is the common folder supposed to have anything in it? I added it and the 42 folder but it still refuses to be recognized by the game for testing
Common folder can be empty
Make sure your mod.info file is in the right place and has the right content
I have two of them, one in the 42 file as well
You shouldn't have two
No point doing that
Only one should exist
In the versioning folder or the common folder
So just the 42 folder?
?
You need the versioning folder and common folder
I invite you to read carefully the page about Mod structure
Oh I didn’t see this thanks
Ive got it to see it, thanks a lot, now I can test scripts
alright ive run into further problems with a few things, most items work fine but the crafting recipes I added wont even show up, ive done everything the wiki said I believe so i have no idea why these wont work. anybody got any ideas? heres one recipe and the only broken item
Ah I missed a C for the item, ignore the item issue. The crafting recipe is still very much an issue and is not a missing C
maybe post the correct syntax because here your output item is not described
Your item does not match item syntax.
heres all the item info of what said recipe is making
ive fixed the item fully, removed some things
for ItemType take example on some vanilla, and the line should end with a comma. Icon has no png extension, WorldStaticModel is not a png either, you have to define the model node.
it did work though, ingame the png is placed there. I aint got a 3D model
do you lua heads use luarocks? i was looking into getting some test coverage and saw that as a package manager
Missing comma on input, you've put PBC in front of your recipe ID, why ?
Why are you putting your module in front of the item and recipe IDs
not to answer for them - but isnt it a good practive to reduce collisions?
no thats what the module is for
some of the game code looks for . on purpose in ID's and does things differently if it exists or not btw.
since all the items are supposed to have PBC. I though the recipes needed it too
so I highly recommend not having . in itemID's or recipeID's or any other ID's
got it - i didnt fully look at the provided code - its scoped to module PBC
btw, in multiplayer, crafting items in modules other then base. doesn't work
(IIRC)
would there be any like, all inclusive video guides for making clothing mods? I've got the outfit meshed and textured and Now I'm onto rigging and getting it into the game I guess?
Why, the module you define already does that
yeah, if you understand namespacing - it seems like module PBC defines the namespace
PBC in the item ID doesn't make any sense, when you define an item in a module, it already has the PBC in front of it
I wasnt aware. I have never done this before and wanted to make sure it would make sure it knew it was from the mod,ill go and remove em then
Placing stuff in a custom module already does that
good to know
i guess pz/lua heads dont mess with luarocks - which i guess makes sense due to the version restrictions
What's luarocks ?
lol - a package manager
like npm
i was just trying to find the lowest amount of friction so i can have visual test coverage (in the IDE)^
@manic swift So not sure if you missed my warning but here it is again: Crafting in multiplyer, IIRC fails if the item isn't in the base. module.
im just trying to get it to work for singleplayer before I even try multiplayer
ive been up and down that page...
What's the problem ?
did you do like me and speed read it or give it the time and really read it?
Adding new inputs really needs an overhaul, reflection isn't needed at all
It's way cleaner than your DoParam shit imo
i did really read it, ive got it working ish.. it just wont give me the output even though it clearly is right there in output