#mod_development
1 messages · Page 204 of 1
All good, I appreciate it
I trying to spawn a tree, when my plant was rotten
if texture ~= nil then
self:setSpriteName(texture);
end
-- get current plant
local plant = SFarmingSystem.instance:getLuaObjectAt(self.x, self.y, self.z)
local square,x,y,z = getSquareDelta(self.x, self.y, self.z) -- 0, -2, 0
-- remove plant
if plant then
SFarmingSystem.instance:removePlant(plant)
else
noise('no plant found at '..self.x..','..self.y..','..self.z)
end
-- remove all (maybe can skip SFarmingSystem.instance:removePlant(plant) by this)
removeAllButFloor(square)
-- set new tree obj with rotten tree sprite
local tree = IsoTree.new(square, texture)
-- add tree on map
square:AddTileObject(tree)
end
some idea what i miss here?
function 😛
intending on making a weather mod, does anyone know how hard the weather system is to tinker with, and if it’s a lua script or java script?
anyone have any idea why a simple function like :getXp() is even producing errors?
`local function TestFunction(player)
local playerxp = player:getXp()
end
Events.EveryOneMinute.Add(TestFunction)`
even this one.
basically whatever or however I use getXp only thing I get in return is errors
because player doesn't come from anywhere
EveryOneMinute doesn't pass any arguments, it doesn't know what player is
nothing changes when there is no parameter for the function and getPlayer() is used
it was just the last example I tried
even a copy paste from a working mod summons errors on solo debug mode
what error?
tried to call nil
on the getXp line
`local function TestFunction()
local curplayer = getPlayer()
local playerxp = curplayer:getXp()
end
Events.EveryOneMinute.Add(TestFunction)`
still getting the same error on the getXp line
like there is no Xp to call
but it should work from what I read
yeah, that's very weird, that particular error should never happen
Im literally going mad for 2 straight days 😄
tried to call nil means that:
- curplayer *does* exist
- curplayer *is* a table
- curplayer does not have a .getXp
any other mods active?
nope
Quick question, how does zombiod work using both Java and Lua? I realized that learning their syntax is important, but I would like to know why I should understand both of them and what they do.
kahlua
you dont have to play with java from what I learned just need to be able to find functions etc.
the engine and a lot of core/sensitive stuff is written in java, lua mostly interacts with java objects and apis
declaration: package: zombie.characters, class: IsoGameCharacter, class: XP
java modding isn't supported so you don't need to worry about it too much beyond that it's what provides the objects and functions
its possible if you are mad enough tho 😛
Ooooh
So that's the name of the mysterious lady in my debug logs /j
lua as a language is designed to be used as part of a larger program like this
Oooooh cool
I guess I kinda get it, and I'll prioritize Lua, just making it work is hard I guess lol
Thank u!!
Im gonna do another restart
maybe reason is reloading lua too often kek
dont think so tho yet
if you're reloading individual lua files using the f11 menu, yeah that constantly causes issues
yeah most of the time.
i recommend always reloading the save to do a full lua reload
but it takes too much time with that way 😭
when you reload a file it doesn't undo anything you did to the global namespace, in this case that would mean all your older event listeners are firing
issue is I didnt try to change anything yet
since I couldnt pass the :getXp 😄
verifying the game files too rn
ll try again
well I dont get errors anymore
for now at least.
trust me, for now
How can I make it so that an item can spawn and exist only if a sandbox setting is enabled? 🤔
Anybody know how to check if an item can be used as a weapon
You could check if the item has Type = Weapon,
😄
I was looking for category and was like dang it! Some weapons aren't weapons lol
Alternatively, you can also check for
MinDamage
MaxDamage
if sandbox var what ever is enabled this
https://projectzomboid.com/modding/zombie/inventory/ItemContainer.html#removeItemOnServer(zombie.inventory.InventoryItem)
or one of the similar functions
declaration: package: zombie.inventory, class: ItemContainer
just a guess tho didnt do it before
Thank you, I'll give it a try
Is there any way to test lua in the server console?
I mean if its not spamming errors on the function it means its workin ig
is there a way to create delay for once called function like coroutines or smt in lua that ll work with pz?
I'm looking for like a lua interpreter with zomboid globals, want to test out IO stuff
I'll just tab use debug mode console and disable all mods 🙂 would be nice to make though
i looking for weather mods. Are there any good ones?
Found a better way
Events.OnGameStart.Add(function()
local scriptManager = ScriptManager.instance;
if SandboxVars.Casualoid.EnableMxMagazines then
return
end
local items = {
"Casualoid.NutritionistMag1",
"Casualoid.AnarchistCookbook1",
"Casualoid.AnarchistCookbook2",
"Casualoid.AnarchistCookbook3",
}
for _, name in ipairs(items) do
local item = scriptManager:getItem(name)
item:DoParam("OBSOLETE = true")
end
end)
didnt know item:DoParam("OBSOLETE = true") was a thing
%100 better thanks for sharing
You are welcome! I almost forgot about it, but then it clicked back in memory
The interesting thing is that the game removes it entirelly from existence, it does not even appear in the item list viewer
feel like its more like hidden and unreachable
Yep
yet exist
Yep, as it appears in the loot zed view
you can wait until OnInitGlobalModData to add entries to the loot tables, and then you will have access to sandbox options while doing so (to exclude certain items, etc)
This is incredibly usefull to know! Do I have to use this even in the server or in the client folder?
server
oh right, you need to call ItemPickerJava.parse() after editing the loot tables
Also, using the obsolete trick should allow me to remove items, even if they spawned before changing the sandbox settings to hide them 🤔
that event happens after the game copies the loot tables to java so you have to call that to make it read the new ones
Super usefull to know! Thank you
does "repeat-until" in lua not work in pz?
it does work
is there a local i = 0 line before this?
yes
okay I saw my mistake Im an idiot
I think it is time to sleep its 6 am
forgot to call the function
🥲
asking helps even if no one answers lmao
Anybody know where in code the Player's red dot thing is rendered on the map and minimap?
is there a possible way to rotate doors guys?
I want to make a double door but the tool only allows me to rotate to west/north
Hi guys, i made some modifications to STALKER Armor Pack so i know how to edit a mod but i want to create one (because i love this game) i don't know how to create one so i need your help.
I tried to see if ChatGPT helps me in this task but as it says "it's an ambicious project": I'm trying to do Automatic Building, it's ambicious for me because this mod detects the container with the resources and later builds the structure (log walls for example) i don't know if this is possible but it's a QOL for a lot of people, if you can help me to understand if i can make it or i give you the inspiration to create this mod, let me know
which way do you rotate a hat in blender for it to properly sit on the character's head
ask that question in modeling topic
Hello guys! I need your help...
I'm trying to change the AnimSet of a specific player.
On zomboid's java doc I've found the function SetAnimSet(AnimationSet animationSet) on zombie.core.skinnedmodel.advancedanimation.AdvancedAnimator but I can't use this function.
Someone know how to use?
AnimSets are applied to all, but have dynamic conditions. if you set a dynamic condition to only one player and use that condition in your added AnimSets, it should do the job. That's what I made for InfectedPlayer. I do not know about AdvancedAnimator.SetAnimSet. I guess AdvancedAnimator is not exposed to lua.
and one more question, can i somehow use full terminal for lua code debugging in game or can only use game chat/command window
I want to rebalance a mod with another mod’s mechanic. They both give a blind trait, but one of them allows your vision to increase based on other sounds like a zombie’s footsteps and such. I like both of them but they each have a fundamental flaw that I want to correct on my own
If I got the permissions from both originators, could someone help me with this task?
Is it possible to spawn/replace/"build" a tile using lua?
I need to set the same item filters for the zombs not to show stuff in their inventory when I restart the game or go back into a save.
Can I tell the game to remember this stuff?
Hello all. Looking to work on a mod for PZ. Haven't done any modding previously but my dayjob is dev (not games). I've done a few lua tutorials in the past. Is the pzwiki the best place to get started? Are there any sample projects out there?
Guys I can't find my lua file from the Debug options, which I imagine it means that it had not been loaded. Do I need another kind of lua file to execute it? Nvm omg I was using the mod from the Workshop instead of the mods file
Check the pinned stuff here, Java docs for reference is the best and just start with something basic, if there is an existing mod that similar to your idea you can download it and examine the code
Wiki is the place, yes. This video is a great tutorial: https://www.youtube.com/watch?v=N6tZujOPnDw and this guide will help a lot (especially if you do not know lua language): https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/README.md
This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.
0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...
Guide to modding various aspects of Project Zomboid - FWolfe/Zomboid-Modding-Guide
Zoom, your spam is visible, I signaled and blocked you. Stop trying so hard to get the last request or others will do the same.
to anyone with problems setting up a second Zomboid folder like me, if your folder names have spaces, you need to put the path in quotes like:
-cachedir="E:\pz modding\ZomboidDev"
Great thanks much, I'll start with those resources.
im a noob too and also found this video as well:
1:11 Step 1 - Know your file locations
4:06 Step 2 - Storyboard your ideas out
9:03 Step 3 - Get your files from the game or other mods
11:47 Step 4 - Build your mod files
1:01:54 Step 5 - Create the textures (mislabeled in the video, oops)
1:19:45 Step 6 - Put your mod files in the right structure
1:30:37 Step 7 - Test your mod (please back up ...
I'll check that out as well Wert__, thanks
Hey all, wondering if anyone can help me clear this up about item models:
Some items have both a 'StaticModel' attribute and a 'WorldStaticModel' attribute.
the bean bowl is an example of this
item BeanBowl
{
DisplayName = Bowl of Beans,
DisplayCategory = Food,
Type = Food,
Weight = 1.5,
Icon = BowlFull,
EvolvedRecipe = Omelette:8;Soup:24;Stew:24;RicePot:24;RicePan:24;Sandwich:8;Sandwich Baguette:8;Toast:8;Salad:8,
EvolvedRecipeName = Bean,
FoodType = Bean,
EatType = 2hand,
GoodHot = true,
IsCookable = TRUE,
RemoveNegativeEffectOnCooked = TRUE,
ReplaceOnUse = Bowl,
MinutesToCook = 20,
MinutesToBurn = 40,
DaysFresh = 2,
DaysTotallyRotten = 4,
HungerChange = -24,
UnhappyChange = 10,
Calories = 170,
Carbohydrates = 33,
Lipids = 1,
Proteins = 7,
StaticModel = Bowl,
WorldStaticModel = BowlSoup_Ground,
}
here are the Bowl and BowlSoup_Ground:
model Bowl
{
mesh = Bowl,
}
model BowlSoup_Ground
{
mesh = WorldItems/BowlSoup,
texture = WorldItems/BowlSoup,
scale = 0.4,
}
what is different between the StaticModel attribute and the WorldStaticModel attribute?
StaticModel is used in the player's hand, WorldStaticModel is used on the ground
so does static model need to reference a model with both a mesh and a texture?
it doesn't matter, as long as it's a valid model
Ok, thank you!
one more question, why does the model Bowl not have a texture, when im eating it, where does that texture come from?
the mesh must already point to it
so a mesh file can point to a texture file?
yeah
ok, interesting, thanks a ton!
So, Inspired by PD2's SuperBLT I developed a system to easily inject functions into the main game, what do you guys think is more tidy?
Left my mod using the new Injection system.
Or
Right using typical injection
And the best thing is that I can enable and disable the entire mod module by using
Hooks:toggleHooks(false)
-- Or
Hooks:toggleHooks(true)
Not sure if anyone has tried this... Thank you for reading: When you click on the inventory of an item like a counter or crate it shows the icon of that item in the inventory pane, is there a way to change or set that icon on a container item? Or maybe a way to create a whole new container type where that can be set?
What are you trying to achieve?
Cause the mod I'm working on right now, can allow changing the icon of a container, and it's capacity
I have a few sprites that I have converted into container items and it would be nice if they looked the part when the inventory was looked at. If I make them counter containers it shows counter icons, stove containers look like a stove, just trying to make them look better than generic crates.
So, if I understood correctly, you made new sprite for the containers, and you want the different containers to stop using the generic icons, and use your instead, right?
yup, just in the inventory windows for when you click on them.
Okay, so you can try and add your icons to the media\lua\shared\Definitions\ContainerButtonIcons.lua
if you look inside of it, you can see how zomboid recycles the same icon for different container, all you have to do is add the correct texture
that's neat, thank you! looks like I could call it by a new name, then a file in the mod under the same tree that requires Base.ContainerButtonIcons and then add to t list with the new texture and drop that into my tree that matches as well.
Yes, you should be able to keep it nice and tidy
That worked perfectly, Mx! Thank you very much!
You are welcome!
is there way to upload mod to workshop with steamcmd? or some other way beside the in-game UI with the workshop buttons?
so i have been developing a reese's puffs mod that retextures cereal and cereal bowls, and gives them unhappiness decreases, but i am struggling with the CerealBowl item. It is modified in a script as shown. The unhappiness change is commented out because adding it removes the 'place item' option from its context menu
any help is greatly appreciated 🙂 ❤️
missing comma at the end of the unhappychange line
this is what you need to do it with steamcmd.
https://github.com/Poltergeistzx/Project-Zomboid/blob/main/docs/steamcmd-workshop-upload.md
🤦♂️ thx
Is there a logical place to listen for zombie-made sounds? I found WorldSoundManager.Worldsound.sourceIsZombie
And OnWorldSound event but I don't necessarily want to try to capture every sound and then decide if it comes from a zombie or not, I feel like it can be zoomed in a bit to capture less world and player sounds?
I'm basically trying to capture all zombie sounds and increase the priority other zombies give them
Dismantling floors could give carpentry exp
I am making a mod to add Reese's puffs to the game. My problem is that the custom eat sound only applies after reloading the world.
test sequence:
load world with mods
find reese's puffs
try eating them, they do not make the sound
quit
load
try eating them, they do trigger the custom sound
tested with the Reese's puffs and bowl of reese's puffs
when they're spawned by the debug menu it also doesn't play the sound
it seems that the order that the modifications to the base module apply are that the custom sound is only applied after reloads? i dont fully understand, does someone know of a fix?
there are 3 images, you need to click the arrows to see them all
thanks in advance!
did some debugging:
howdy ho! i'm currently in the process of making a reskin for Filibuster Rhyme's Used Cars. So far, the working version I have is Filibuster's /entire/ mod, with textures swapped and a few edited script files. I've attempted to as such, make a version that is /just/ the files I've edited, as well as the script files - and found that, if using mod settings to load my reskin mod after Filibuster's, the added skins appear invisible, and the default skin slots appear "vanilla". If loading before filibuster's; nothing happens. Any tips?
i added this
and now the previous warning does not happen, it still behaves the same way though, only playing the sound after the second load
I've entirely copied the file structure from these mods:
https://steamcommunity.com/sharedfiles/filedetails/?id=2762549777
https://steamcommunity.com/sharedfiles/filedetails/?id=3006927863
which do the thing I want mine to.
@winter thunder apologizing profusely for the ping but you had some good ideas that helped me figure out the issue last time
i will send a new message before i go to bed:
i am making a reese's puffs mod, it retextures Base.Cereal and Base.CerealBowl and gives them new display names. It also gives them a CustomEatSound which originally referenced a file, but now references a custom sound which i addedd (i think?). the result is the same either way, the custom sound will only play if i leave and then reload. However, after adding the custom sound, the warning shown in the screenshot of the debugger no longer appears. This behavior is also present in blackbeard's nukacola mod which is also a modding tutorial. https://steamcommunity.com/sharedfiles/filedetails/?id=2200810675.
please ping me if you have a response, thanks!
Tldr I made a custom sound and it only works if I load the world, leave it, and reload it.
afaik, the warning is normal for any sound when first loaded. the world reload requirement is an unexpected bug that I guess is related to something in your mod or your game loading procedure.
please explain how the increase in experience from the doctor profession works, at the end of the action, if the player is not a doctor, then he receives 25 experience, as it should, and if a doctor, then 166, although he should have less exp (no books)
so does someone know how to calculate all faction member zed kills and time spend online ?
As idea, collect data from players, send to server and store in Global ModData
Aren't zombie kills listened to on the server?
Could probably toss a function into the onzombiedeath event
I've been having some issues with networking and using commands
Seems like alot of mods are sending data back and forth either in bulk or too frequently
I was also sending too much data in my shops mod - had to rewrite the networking aspect. Seems like if the table you're sending is too large the server is prone to lose the packet and create a runtime where the error says the IsoPlayer the packet is meant for is null.
I dunno about adding all together but there is this mod that I have been trying out that keeps track of all the individual kills so it may be able to help direct you. https://steamcommunity.com/sharedfiles/filedetails/?id=2553809727
I think the 10YearsLater server has their stats on a website
Sure First of all im pretty new to modding but i know how to get the hours survied ans the Kills from a Player but how do i geht them from a whole faction tho
So please be kind to me 😅
Is it possible to add a parameter to a piece of clothing so that it doesn't fall when you die?
You can grab faction information off the IsoPlayer using getFaction etc - you could calculate the kills that way - but this is a potentially dangerous way to go about data tracking as you'd need to account for the creation and destruction of factions. You could simply have a table of factionIDs - add the factionID to the table if it's there, otherwise add 1. But again, factions can be created or destroyed -people can leave factions, etc.
If you mean like hats/glasses - yes
suits, helmets. boots
Those don't fall when you die, unless I'm misunderstanding what you mean
Sorry, I expressed myself poorly. What I'm trying to do is make the item disappear or break when you die, so that other players can't have it.
Ah, you would need to utilize the on death event to do something like that
You can add tags to the item's parameters to make it easier to expand on - or you could simply include a table of item types to check for.
Thank you, I'll have to learn more to achieve these things.
No problem
Ok, for now I will just publish it since I haven't been able to find a solution. Thanks!
Hey ! Yes i collect all data in a CSV and I automatically push the data to the ftp of my site after there is a planned task that turns to integrate all of this into a database
a small example, of a project on pause which I used to make this system for 10yl
Is this what you'd have in mind @next vine?
Yeah kinda tho i only need the zed kill and survived time from the alived charakter
if u know the SSR Safehouse overhaul im a big fan. tho i dont like how to get the points for the safehouses and i want to make it possible that the whole faction could collect togheter the points for getting more and bigger savehouses instead of the version i have right now. bc only the faction Owner gets count to my point script ^^
Ah well, in that case the kills earned don't really need to be tracked that strictly
You can just use getFaction and reward the faction the player belongs to
`function calculatePointsForFaction(faction)
if faction == nil then
return 0
end
local points = 0
local members = faction:getPlayers():size()
-- Server erhält maximale Punkte
if isServer() then
return 250
elseif isClient() then
local factionMembers = faction:getPlayers()
for _, member in ipairs(factionMembers) do
local timer = member:getHoursSurvived()
-- Punkte für überlebte Stunden
if timer > 12.0 then
points = points + math.floor((timer / 24) + 1)
end
-- Punkte für Zombie-Kills
local zombieKills = member:getZombieKills()
if zombieKills > 100 then
points = points + math.floor((zombieKills / 100) + 1)
end
end
end
return points + members
end
`
i dont know ._.
Check this you have a faction pts system
Nice ill take a look
So how exactly can I take on texturing my own models? What type of style does PZ really have?
Hey all. Struggling to understand how to make mods multiplayer-safe... really just how to get a general idea of what is managed entirely server-side, client-side, or what needs to be synchronized (and how to do that).
For example
getPlayer():getBodyDamage():setInfected(false) getPlayer():getBodyDamage():getBodyPart(BodyPartType.FromIndex(i)):SetInfected(false)
- would that be handled entirely client-side? Would I need to sync any changes to the server?
Ah cool, thanks. So there's no need to push those changes to the server at all?
nope, anything health related will be synced automatically as long as you change it from the client the player belongs to
Great, thanks for the help!
On the opposite side - under a LoadGridsquare event, something like object:setWaterAmount(0) - would that happen entirely server-side and auto-update to clients? Finding it hard to visualise what exactly is happening during a LoadGridsquare
Also, for something that does run entirely server-side, do players need that mod installed/enabled, or is it enough to just have it added on the server config?
usually you do have to use some methods to transmit changes like that, but if it happens on the server side LoadGridsquare is fired before the clients are actually sent the squares so in that specific case you don't need to
unfortunately there is no support for 'server only' mods, technically you can accomplish this with a mod that loads files in the server's cache directory but the game's mod system doesn't support it natively no
it always wants the clients to be using exactly the same mods as the server
Ah right, well that keeps it straightforward at least 🙂 Would I need any specific code to tell it to run something like that only on the server, to stop clients duplicating the same action, or does it sort that stuff out for itself?
you can check if a file is running on the server with isServer() or the client with isClient(), generally i recommend using not isClient() since checking specifically for server will stop it from running in singleplayer
in singleplayer both will return false
if you want a file to only run on the server-side (and singleplayer) you can start the file with if isClient() then return end
unfortunately just putting it in the server folder doesn't do anything like that, even though the client folder *is* restricted to clients
Awesome, think that should be enough info to get me on track. Many thanks!
Anybody know if it's possible to force a player or zombonie to jog? Not sprint, jog.
Or like. Run I guess can be used in English. But I think run and sprint are the same
🤔
setForceRun(true) on a player should do it, though iirc results vary with those methods
it won't work for zombies though, it's an isoplayer method
Hm can I make a timed action have the Player run
yeah, there's one for walking so you just have to flip that flag most likely
Is there? I know there's stopOnWalk
and stopOnRun
I never found anything that specifically makes the player run
i mean just setForceRun at the start of the action
hi, im new to modding and programing in general and I am trying to figure out what DisplayCategory I should put my modded item into
AutoMoveTo mod includes a Timed action that keeps current walk / run / sprint toggle state
and In Jump I use ```lua
self.character:setRunning(false)--I use true too
self.character:setSprinting(false)--I use true too
Is there a way to extract the variable name from a variable, or a table?
Like if I make a
local myVar = {}
How can I pull the name myVar from the variabe myVar?
you can't really
if it's in a table you can loop pairs until you find the value, but if it isn't guaranteed to be unique that's no good
Damn, alright too bad, thank you
🤔 What would be needed to make it so when you complete a recipe it reduces your boredom or unhappiness?
I assume a lua function?
look for OnCreate in vanilla recipes.txt for exemples. and check recipecode.lua
I'm testing my mod on a local server. For some reason, OnZombieDead and OnPlayerDeath fire twice... why is this?
For boredom specifically? Hmm.
I was consider it to be like...constantly reducing while the recipe is in progress
then you need to override the associated timedaction update function
Is there an example of a mod or somewhere in base game I'd be able to see that ?
there are thousands of vanilla and mods that change boredom and happiness. e.g. Infected Player mod, InfectedPlayerStats.lua
Right like I know a book for example reduces unhappiness. But like a book is consumable (though I suppose it could be keep). I meant more specifically the timedaction update function
I dunno. but there is nothing specific to that.
Still appreciate it - I'll probably just simplify it and do like you said for the time being
Would I need to listen to a client command on the server to detect deaths?
you can check the parameters to detect if you already recently took a similar death event into account. That's how I filter in KillCount.
True. But is there any reason why the same death event is firing twice? The handler is located on the server.
None that I'm aware of.
So I guess what I'm trying to do is.... have it something like smoking, where after the smoking action, the item gets consumedand your stress/unhappiness goes down. Where would I look for that if you know ?
Is it possible to set mod data in a specific tile container, and force this mod data to sync with all the other clients?
Does anyone have an Idea why in the OnFillWorldObjectContextMenu inside the worldObjects argument, I keep getting the same object twice?
I had to resort to use a table with string to avoid the duplicate, but I'm not sure if this is a bug, or a feature
local function contextMenu(playerIndex, context, worldObjects)
local player = getSpecificPlayer(playerIndex)
---@type table<string, IsoThumpable>
local validObjects = {};
local hasValidObjects = false;
for _, object in ipairs(worldObjects) do
local square = object:getSquare();
if square then
local moveProps = ISMoveableSpriteProps.fromObject(object);
if moveProps and object:getContainerCount() == 1 then
local getContainerCount = object:getContainerCount()
Debug:print(tostring(object), getContainerCount)
validObjects[tostring(object)] = object;
hasValidObjects = true
end
end
end
if not hasValidObjects then
return
end
i've never found the worldObjects table reliable at all
i had it returning a completely different list of objects in debug mode than in non-debug mode
Anyone know how to dupe items on your server, say a bag full of stuff. Im trying to make server lore
anyone familiar with how to change foraging zones in debug mod?
trying to make an area "urban"
I dont think you can do this in debug? I beleive that zoning is handled with LUA, at least from what I can see. You set a location with the x and y, designate a height/width for it, as well as the type of zone. So you can do that sort of change more permanently through code like that. Hopefully someone else is more familiar with the debug side for you though
Anyone know if there is a way to additively merge tables? Like, if I have two tables like ->
Table1 = { Mustard = 10, Ketchup = 1,}
Table2 = {Mustard = 1, Ketchup = 5, Relish = 94}
Is there a way to turn that into a single table that combines any identical variables? That way the end table is ->
TableFinal = { Mustard = 11, Ketchup = 6, Relish = 94}
I've heard it is possible to do in debug but I am not having the best of luck atm
Try checking the map editor tool in debug?
That is my best guess
Yea, ill do some more research
here's one way of implementing that```lua
local function addTables(t1, t2)
local result = {}
for k,v in pairs(t1) do
result[k] = v
end
for k,v in pairs(t2) do
result[k] = result[k] and result[k] + v or v
end
return result
end
keep in mind you'd have to add checks for the types of the variables if the table could have non-numbers in it
Thanks! I appreciate that :)
And uh- while I am here… How many if / elseif ‘s can I get away with before someone reads me code and tracks me down IRL to cause me harm? 😂
I need to check values, and the if structure is really appealing for how easy it is to set thresholds / bounds for it to go off.
However, I’ve realized that it will become quite easy to end up accidentally nesting quite a few if’s. Ideally I will plan it out so that it needs to take as few steps or checks as possible. But still 👀
This is also going into an OnCreate function, for reference. It shouldn’t be something used a lot in short succession
you can have as many as you want, but long elseif trees like that (especially if you're checking a value as you say) can often be condensed into a couple lines of code using a table instead (and such a system would be easier to extend in the future)
i'd have to see exactly what you're doing to know if that solution is wise, but generally
The output is modulated by the inputs. I’m effectively brute forcing my way through an alloying system for proper smelting in game 😅
The types of metals used in the recipe is being tracked, but I need to know the amounts of each in relation to each other in order to properly modify the resulting items name, sprite, texture, etc.
I can already do all the individual pieces. But the issue I am running into rn is how to best check those values without using a lot of ifs haha
———
Idea rn is be to check the metal that has the largest quantity in the alloy, and run a function specific to that. That function would check the specifics, sorta like this:
function CopperCheck()
local copperOutput = {}
if copper >= 90 then
xxxxx
elseif copper >= 75 then
if tin == 25 then
outputCopper = {true, ‘BronzeAlloy’, }
return outputCopper
elseif tin >= 15 then
outputCopper = {false, ‘Impure Bronze Alloy’, ‘sprite.png, ‘texture.png’,}
elseif copper >= 50 then
xxxx
end
The Boolean would be to tell it if it’s creating an ‘item’, or an ‘alloy’. So that specific alloys / pure metals could actually have their own item scripts
Issue is that when you have 2-3 metals that doesn’t look bad… when you have 5-10 possible pieces, that gets REALLY REALLY gross 😂
hmm yeah using a table wouldn't be straightforward for this
Maybe slap on some booleans? 😂 that way I could specifically run functions that have the right pieces, and very quickly skip them if they don’t
Or just check for nil* depending
using if statements isn't bad, though i recommend if you start getting more than a couple layers deep you should split off into a function, it gets pretty unreadable
you could do something like defining a bunch of alloys and looking for a best fit but, sounds like a massive headache no matter how you do this
That was my thought too. And yeah… that seems to be my MO 😂 I keep picking up really painful projects. The drug mod I made basically made me step away from modding for like 2 months
i guess you could write a bunch of alloy 'recipes', create a function that finds the fitness of a set of materials to a recipe, then when you actually create the alloys you loop through all of them, take the highest fitness, and give it its purity based off of that
but i'm sure that'd lead to lots of weird edge cases
Yeah… biggest issue I had initially was prevented mega-alloys 😂 something that would purposely be a mix of every single possible thing no matter the quantity. Which will 100% still happen, but I realized that it’s kinda more important to figure out what you don’t care about than what you do
I’m my example, you can see that I’ve effectively ignored 10% of the input in that “impure” alloy. Just to make my life easier
Hello.
I would like to make a simple recipe with different xp gain on certain skill levels (lvl 1 = 30xp; lvl 2 = 20xp; lvl 3 = 10xp, and everything above should give you no xp at all).
Unfortunatelly im a complete noob when it comes to scripting. I have already tried a few things, but without success. It's probably easy for someone who knows what he is doing, but i just can't get the function to work.
Can someone please help me there?
So If i understood it right i have to store the Charakter Data in Client side and trandmit the moddata where the information ist stored to share and calculate the whole faction there?
i has a coding question. i still try to get fish working with my adjustable weight script. it does work now for fish created in world (like kitchens etc) since i know how to add my part of script onto "Fishing.OnCreateFish" however how do i do that with "function ISFishingAction:createFish(fishType, fish)" do i just do the same despite it being joined with a ":" instead of a "." ?
local old_createFish = ISFishingAction.createFish
function ISFisingAction:createFish(fishType, fish)
-- YOUR CODE
old_createFish(self, fishType, fish)
-- YOUR CODE
end
so i join it with a dot then. gotcha and thank you.
just a question why is there a "self," in the "old_" call?
I'm not English speaker, so I can't explain it well.
'function A:func(a)' is syntactic sugar for 'function A.func(self, a)' in Lua
thanks 🙂
hmm that throws me a error. "ERROR: General , 1699612762555> ExceptionLogger.logException> Exception thrown se.krka.kahlua.vm.KahluaException: ItemWeightAdjustment.lua:65: function arguments expected near function at LexState.lexerror line:278." line 65 in question : "function ISFishingAction:createFish(fishType, fish)"
it means you did not properly adapted the code given by lisola.
local old_createFish = ISFishingAction:createFish function ISFishingAction:createFish(fishType, fish) local fishToCreate = old_createFish(self, fishType, fish); fishToCreate:setActualWeight(fishToCreate:getActualWeight()*SandboxVars.CustomizableWeightMultiplier.WeightMult); return fishToCreate; end
local old_createFish = ISFishingAction:createFish is bad
local old_createFish = ISFishingAction.createFish is good
facepalms "why its always the small stuff that throws me of the loop. "." instead of ":" easily missable"
so.. sorry for me being a stupid.
don't waste your time on self flogging. you got mods to do ! 😉
plan : get fishies to work properly with my weight mod. once that works i will look into furniture. currently my weight adjustment mod does not touch things like ovens,crates, freezers etc.
seems they are not stored in "getScriptManager():getAllItems();"
i replaced it and it throws me a new error.
function: ItemWeightAdjustment.lua -- file: ItemWeightAdjustment.lua line # 64 | MOD: Customizable Weight Multiplier
ERROR: General , 1699613307415> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: createFish of non-table: null at KahluaThread.tableget line:1689.
all i did was replacing that : with a .
This means that your code can't find 'ISFishingAction'.
Where did you put your lua file?
all i need is the returnvalue of ISFishingAction:createFish to adjust the weight of the created item. that function is a function by indiestone. and i put it at the end of the lua file. i dont think that that matters as the orginal is not in my lua.
I mean, which folder your lua file is?
the orginal is in ProjectZomboid\media\lua\client\Fishing\TimedActions\ISFishingAction.lua
CustomizableWeightMultiplier\media\lua\shared\ItemWeightAdjustment.lua
can someone tell me the code for spawning a base tree at x, y, z position? or where i can check refs
I think you should place your code in client folder since the ISFishingAction.lua is also in client folder.
i will try that. if i understand the lua coorrectly i only need the returnvalue of ISFishingAction:createFish telling me what fish just got created so i can modify its weight with a function of my own. but i have no idea how to intercept that without doing the overwrite...
There's no problem in this code
The problem is where the code is
kk will make a new file with just that in it and place it at the other location.
Oh, my mistake there's 1 problem local old_createFish = ISFishingAction:createFish -> local old_createFish = ISFishingAction.createFish
i fixed that.
which is Tchernobill already mentioned above
leading to the second error.
moving that code works like a charm. thanks for the help! now i need to do extensive testing somehow. to make sure it dosnt messes up peoples saves when i update my mod on the workshop
how long does it usually take tll i see my mod being updated in the workshop?
ok something isnt working. it does update the description but my "submod" isnt showing up at all. i seen other mods doing it. delivering several separately activateable mods with one subscription. how do i do that?
also somehow the "last updated" info still says 4th. not today.
You put them inside the same folder top/Contents/mods/.
This should change after you update the mod.
strangely if i try to upload via the workshop ingame it does update the "description" part of the steam page. but does nothing else.
me stumped. i have no idea why i cant update my mod.
Does anyone know where the inventory images for items are stored?
ok i think i found the problem.... apparently the game does not recognize my submod as a mod. despite there being files inside. it detects the main mod and shows it in the modmanager. however the submod despite being there is not showing up.
does your submod have the same ID as the main mod?
facepalms "ok found the issue. i was using "steamaps/zomboid/workshop" and not "users\username\zomboid\workshop" gosh damn ....
hey game. if you put a folder there. let me f*** use it -.-
Is next available in zomboid's lua? It looks like it's not but I can't get a confirmation
mh, yeah looks like next() is not available in zomboid's lua
no, it's not. There is table.isempty if that is what you need it for.
ok now that i crossed off general items and fish off my list. now i need to do furniture. does anyone know where i can access the list with all tables/bed/fridges/ovens etc? apparently they are not included into "getScriptManager():getAllItems();"
Oh yeah, I was trying to do that too, I never found it tbh
damn. hoped i could use my multiplier on them too. to make it well rounded experience.
What are you trying to achive?
They are now dynamic based on sprite name.
i want the weight be adjustable for my mod here : https://steamcommunity.com/sharedfiles/filedetails/?id=3069424394
oh that's funny, I'm working on a similar mod lol, but for specific items
fishes gave me headaches. as their nutrition is mathed on creation. so slashing the "base item" weight would lower their nutritional value.
so i had to get creative.
Oh damn
Also, have you looked into the Items List viewer?
You can set it to Movable and it gets a list of furniture
And if you try to edit an item, you can get the Item.Type 🤔
Okay, so, Idea.
Do the following, hook into the fuction that is fire once furniture is picked up, and apply the multiplier to it in that moment.
the premise of my mod is that it works on "everything included modded" so i cant use a predefined list of items.
Then the best approach would be of doing the multiplier thing once the item is picked up
i found the "zombie.inventory.types.Moveable" class. it inherits all functions from "zombie.inventory.InventoryItem" so i can edit the base value. all i need now is a list of all items of that class.
I'm still smashing my head against a wall to improve my Storage/Container Upgrade mod
Keep finding small annoying issues with MP sync
to be honest i have no idea if my mod works in mp. never really tested it o.O
Also, do item icons have to be 32x32px? Can't they be 64x64? 🤔
It will probably be fine as you are updating the item for all clients in the same way
for the items itself its editing the base weight of the items on the server side i think. just "weight*mysetting" fishes.. i not sure. i hijack the custom item weight after they are created and edit that.
Are RV interiors created with "addInterior" when first entered or do they statically exist somewhere I can go poking around before entering the vehicle associated with them?
Massive thanks to this community, this channel has been such a useful resource to me and my friends while working on this, hope it's okay to drop in here Spiffo. 🫶
Description:
Welcome to the heart of the Zone! 🌐 In this exclusive dev-log, dive deep into the Stalker Roleplay Project, where survival meets the unknown. Join Indie, the project manager, and lead scripting developer, as we unveil the latest features, innovations, and future plans that will redefine your Stalker experience.
0:00 Introduction
1...
The latter, it's a similar dealio to basements, it actually adds new cells to the world outside of the play zone, I'm not sure if they are drawn as rooms so they may not show on map? might be wrong there but you can definitely find them, I've walked around the plains of basements and rv interiors it's a liminal experience for sure 😛
Nice, that means I should be able to make a little add-on mod to check for zombies. I feel like you should be able to peek through the windows or tap on the doors to check before entering
There is a mod that let's you remove zombies from specific areas in the map that admins can utilize, might be worth peaking, I do a similar thing for my instanced bunkers so people don't get mauled when they first get loaded 🫰
I was thinking more like an alert over the player's head. Add something to the right click context menu to peek in the back and display it.
so after abit testing the "getAllItems()" only returns "Base.", "camping.","farming." and "Radio." items. and strangely one "Moveables.Moveable"... wtf?
do you know where they hare handled?
The weight is set from sprite, like this.
weight = (sprite:getProperties():Val("PickUpWeight") or 10) / 10
If it has a custom item property then it uses that script item's weight.
Hey yo! how are u?
LootRarity = {}
LootRarity.Common = 15
LootRarity.Uncommon = 8
LootRarity.Rare = 3
LootRarity.Elite = 1
LootRarity.VeryRare = 0.5
LootRarity.ExtraRare = 0.01
local suburbsDistribution = {
-- общее
all = {
-- Zombie female inventory
inventoryfemale = {
items = {
-- "SHALCO.itemName", LootRarity.ExtraRare,
}
},
-- Zombie male inventory
inventorymale = {
items = {
}
},
},
-- большая походная сумка
Bag_BigHikingBag = {
items = {
},
},
-- обычная походная сумка
Bag_NormalHikingBag = {
items = {
},
},
-- сумка выжившего
Bag_SurvivorBag = {
items = {
},
},
}
where i can find zombieSurvirors inventory restr. correct name?
not exactly what i meant. i wondered where i should intercept it. if there is a list of all sprites and their weight. so i can alter that perhaps. and if not need to figure out a way to make sure i dont reduce the weight on each subsequent pickup...
im currently combinf trough zomboid/media
I'd say no
You can look at ReadFromWorldSprite to understand how the game transfers sprite properties to the item.
ISMoveableSpriteProps is the file that handles most lua function like pickup. Maybe weight is changed there too. You will need to patch the pickup and the properties for tooltip, etc...
Right, ISMoveableSpriteProps has setActualWeight there and it uses 50 default weight instead of 10 like ReadFromWorldSprite.
ISMoveableSpriteProps.new seems like good candidate for patching.
@placid pine hello bro, how about remove item tweaker from your better sorting mod?
He has a github. https://github.com/ChobitsCrazy/BetterSorting
I don't know how to suggest changes ^^'
You can create an issue, which reminded me to create one myself
Otherwise you can create a fork and submit a pull request - which is for them to pull your code into their code base
maybe you can suggest a reference for my problem?))
about zombie surviver inventory distribution example
?
I have no idea how...
In short, I will continue to use my version corrected from the itemtweaker.
And just tell them what's wrong
Does anyone here know if there is a sandbox option to enable zombies healing? Or an effect or something. I have seen a very weird behavior where zombies are healing constanly and I thought of maybe making a mod, but I first need to find if there is really an issue and which one is
I'm going to assume that there's no way for clothes to give carry capacity bonuses or something like that
I heard there are mods for items with negative(?) Weight, maybe it would work with clothing changing to negative weight when worn?
Just a fair warning, manipulating weight that way can cause problems from what I understand.
Worn items can also be containers - i.e. have pockets. Shark's military gear does this.
Like the fanny pack in vanilla.
This is the mod @tranquil kindle was talking about I think
https://steamcommunity.com/sharedfiles/filedetails/?id=2967288581&searchtext=Upgrade+storage
Afaik it's just items with negative weight you put into containers. I haven't tried it for fear of glitches but it looks interesting
Hi! Can anyone help me with very simple Lua question?
So I do the test mod for myself (mb I'll publish some mods later... when I become more experienced)) )
I try to add experience to player with
OnGiveXP:Recipe.OnGiveXP.ADBandaging, in script section and I make a lua function:
function Recipe.OnGiveXP.ADBandaging(recipe, ingredients, result, player)
player:getXp():AddXP(Perks.Doctor, (10 + ZombRand(10)));
end
But the game doesn't add exp to my player. Console says: "ERROR: General, LuaManager.getFunctionObject>no such function "Recipe.OnGiveXP.ADBandaging" "
What I am doing wrong?
Are you requiring the original recipe file?
any recipe code should be in the server folder
Yep. I placed it in lua/server folder
I make own recipe file
then i do own lua file
/* */ isn't lua syntax, that'll stop the file from reading
oww
use --comment for line comments and --[[ comment ]] for block comments
thanks!
Are there ways to make an item of clothing usable only by an admin? without increasing the weight
There's probably a way to do it by applying a "tag" to the items and finding whether the player is in debug, although I'm not sure how involved the effort for making something like that would be
does anyone know how to resolve IStooltipinv errors? Specifically that an item will not display its toolip, and attempting to edit the item will cause the game to break. The errors reference ISToolTipinv.lua lines 73(i think) to line 108. I think the game is attempting to generate a tool tip but it's stuck in a loop. I don't know where in my mod files the error is generated. Related, an item icon will not be generated though I'm sure i referenced the .png correctly in the .txt file of the item
--sorry for the word wall, trying to keep some documentation for myself
key rings are a complete enigma to me right now
how do they retrieve character names? how do they stay equipped?
i continue to ponder these mysteries
Want to share a silly screnshot of my debug character current vibe
how'd you get an irl screenshot of me debugging? /j
Ty
Is there a way to abruptly stop a hitreaction to allow an attack? Say OnPlayerUpdate when IsAimKeyDown() is true?
I can't seem to find this mod you speak of
Thanks
Hey all. Anyone know if there's a simple way in Debug mode to force-kill all active zombies (as opposed to just clearing them)? I'd like to do some practical tests on zombie loot spawning, to check if my mod is working correctly, but I can't find any simple way to test without just running around shooting lots of zeds.
Either that, or I'm thinking perhaps some code to reduce any loaded zombies to zero health automatically... would that work?
Spawn them with debug UI, set health to minimum, use machine gun.
Hi! Is there a way to do recipe only once on same ingredients? In my recipe I want to keep zombie corpse, but I want that i cannot use this zombie in that recipe again. Also, I dont want to do 'fake zombie corpse' to replace one in recipe. Anyone has ideas?
Maybe I can add some tags? How do I do it?
hello. trying to find a simple way of adding custom cookware to advanced recipe lists without also conflicting with dozens of other mods and/or taking forever. anyone have any solutions?
Is it possible to mod music? Like is it possible to replace the soundtrack?
I've had the idea to re imagine the soundtrack for a while but if it's not possible I want to know before I get too deep.
I try to change the item of a "IsoWorldInventoryObject". I use the following line to change (item is of type "IsoWorldInventoryObject" and newItem is of type "InventoryItem"):
item:swapItem(newItem)
This works on the client but isn't synct so the server. So other players won't get the change. Also when I logout and login again the change isn't there.
I tried the following methods to sync it to the server but it still doesn't work.
item:update()
item:transmitCompleteItemToServer()
Is there something else I have to do?
How about do 'item:swapItem(newItem)' on server side
Because, IsoWorldInventoryObject.swapItem calls IsoObject.sendObjectChange method when it's called on server side.
hello! Can someone tell me how to make a poster mod? I tried with several tutorials and some other guides and I don't know if it didn't work because of something in the program or if I did something wrong.
is there any way to change the spawn rates on this mod? i’ve seen nothing and i hate seeing a fully geared army guy every turn
Does the EveryHours have any way of happening every X ammount of hours, or it can only be in 1 hour intervals?
You can have something count down/up per hour and abort/fire when intended
you can also use the current hour to determine it
Oh yeah, if you need it to fire at noon rather than every 4 hours etc
e.g. adding if getGameTime():getHour() % 2 == 0 then return end to the start would make it fire only on odd numbered hours, depends on what exactly you're trying to do
Ok, thnks
anyone know how to stop this error "page" from appering?
cause it for some reason breaks my whole game when using debug mode
does anybody have a solution for this? i can't upload a mod
it's probably a mod issue
well remove the mod that's causing the problem probably
huh?
k_EResultNotLoggedOn 21 The user is not logged on.
@thorn brook
how do I test my mod, if I remove it ( ͠° ͟ʖ ͡°)
what
wrong msg
sorry I cant follow you
if you only have one mod, and it's yours, that means you most likely did something wrong that causes it to crash
so you might want to double check your code, i'm not sure
what does that mean? i am logged on
how do i solve it
maybe you're offline? try to relog.
oh yeah now it works
weird
well, thanks
I double checked the code for the 5th time now and it still doesnt work
does anyone have a soulution against it?
Try unchecking the box "break on error". To access the error page later, press F11.
nah just the same again
boots me to the main menu with nothing to press
and I did check the code
now my old test mod doesnt work either
im losing my mind
hey, how do i remove the poster image from my workshop item?
like i want to have just a youtube video, but i can't seem to remove the image
@fast galleon do you know maybe?
Fairly certain you can't remove posters on the workshop.
I'm not sure if this is the way to go. Or is there a simple way to tell the server which IsoWorldInventoryObject i want to change? I assume I have to use a client command to achieve this.
then how come other people don't have the icon of their mod also as a poster
for example this one, 2 different images
the icon is shown as a poster when you have no posters
it sounds like it won't count a video for that
alright i'll try a poster then
You can add images to the workshop, which is what shows on the left
What is the purpose of
{
}```
when creating items?
it's to avoid name clashes
you're not really supposed to use module Base, you use one with your own module name (e.g. module MyMod)
if two mods add an item called apple, if they're in the same module it's a conflict, but if they're in different modules they can co-exist (resulting in ModA.Apple and ModB.Apple)
Anyone know if its possible to add text to zombies using halo or say?
Got one that worked
addLineChatElement
As it turns out speedMod isn't the speed of the zombie afterall
Weird it was working then
wait then what's the purpose of imports {base }? I get the purpose of naming items within a module so your mod items are easier to spot and don't clash, but some tutorials say to use imports {base}?
importing a module means you can reference things from that module by their type instead of their full type (e.g. Apple instead of Base.Apple)
there aren't a huge amount of reasons to do it for most script types, but it's very nice for recipes
Which file do you put items in?
👀 noted...maybe i should get rid of that in my item's text file since it doesn't need a recipe and therefore the import does literally nothing
Were zombie behaviors changed? setting tripping from sprint isn't working :\
Oh wait, I think I know what's going on
I left the my mod that stops sprinters from falling on
lmao
Is there anyone here that possibly can help me figure out what's wrong with my mod when I upload it to workshop?
I'm very new at this and wanted to start with something simple, so I wanted to add some simple recipes to test the waters of my understanding of modding.
When I host the server It works fine when it's manually added in C:\Users\username\Zomboid\mods, but when I have it on workshop it doesn't seem to function anymore
I don't know if this is the wrong place to ask about this 😅
The structure of the workshop folder is different
You need the staging folders for the mod - see Mod Template for an example
The structure is fine, the mod is already on the workshop, however, when I host a server with the mod from workshop, it doesn't add the recipes, although it does when I host while having the mod in C:\Users\username\Zomboid\mods
are you adding it to both the workshop tab and the mods tab?
No, when I uploaded it, it was only at the workshop folder.. Should I have added it to mods as well?
i mean in the server configuration
there's a workshop tab and a mods tab
the mods tab tells it which mod ids to enable, but if it hasn't been added to the workshop tab, the server won't download the mod in the first place
Huh.. I did not know that, Usually I am not the one launching the servers, I'll try it out!
Is it possible to get an instance of an existing item by its ID?
This is not the first time this happens, but after I found out I should add it from steam workshop tap, it doesn't load anymore and instead gives this error. however that doesn't happen when I have it manually under mods 🤔
When it happened last time, it was because I had made a misspelling in the script, although I can't seem to see any issues with the script this time
I didn't add any items, only simple recipes
If you're asking however, I believe you need to add item files into scripts and icon into textures
How do I access the workshop mod files for PZ? I want to see if I can make a few patches for compatibility
is this lua bit written to ensure only cooked counterpart of the ingredients are used if there are any?
function Recipe.OnCanPerform.SliceCooked(recipe, playerObj, item)
if item and not instanceof(item, "Food") then return true end
return item and (item:isCooked() or item:isBurnt())
end
it's a part of vanilla recipes to split cooked pasta/rice into bowls
i keep getting this error when i try to craft the recipe, if it's related the recipe isn't becoming available in the crafting menu either
only available with right clicking item in the inventory
here:
here's the part with the error
in case anyone's feeling like helping with what's going wrong

^figured it out processed cheese is breaking it, can ignore the wall of text and images
try create two item
ReplaceOnCooked = MyModule.LLSaucepanMilk2,
ohh
OHHH IS THAT WHY the recipes dont show in the crafting menu
that's the only problem i have left right now
edgerunners 😭
im sorry 
what and where?
in the video
i can craft them by right clicking the ingredients
but i cant over the crafting menu
it all started because i used this vanilla line in the recipes to pick out the cooked version instead of uncooked/burnt/cooked: OnCanPerform:Recipe.OnCanPerform.SliceCooked,
this is the lua definition of the line:
function Recipe.OnCanPerform.SliceCooked(recipe, playerObj, item)
if item and not instanceof(item, "Food") then return true end
return item and (item:isCooked() or item:isBurnt())
end
if i don't add this recipe picks out all kinds of cooked/uncooked/burnt
when i add this it doesn't show as craftable in the crafting menu
but works correctly in the right click options
As far as I remember, spoiled or burnt material cannot, in principle, be used for crafting from standart craftmenu recipes...
it can
wait let me clip this
without the line
OH WAIT
spoiled or burnt
RIGHT
but it still uses uncooked
which is what im trying to dodge

OnCanPerform:Recipe.OnCanPerform.SliceCooked,
need change OnTest:,
and in lua check item state what you want
like, return false if uncooked
if i rightly understood u
wait i have little to no coding knowledge so
let me try to write something to see if i understand it
min
liiiike this on lua?
function Recipe.OnCanPerform.SliceCooked(recipe, playerObj, item)
if item and not instanceof(item, "Food") then return true end
return sourceItem:isCooked()
end
and the recipe would be like
recipe Make Cheese
{
LLSaucepanMilk,
keep Bowl,
keep Spoon,
Result:Cheese,
Time:80.0,
SkillRequired:Cooking=1,
Category:Cooking,
OnTest:Recipe.OnCanPerform.SliceCooked,
}
and i can change the "SliceCooked" to something else
so it doesn't clash with vanilla stuff yeah?
function Recipe.OnTest.MyTest(sourceItem, result)
if instanceof(sourceItem, "Food") then
if not sourceItem:isCooked() then
return false
end
end
return true
end
try it OnTest:, in recipe
hahaha
ohh so
like this in recipe
OnTest:Recipe.OnTest.LLCheese,
because we change it to ontest on lua too

yep yep, better change on new unic name
OH MY GOD
work?

oh while you are here, did you get around checking crafting enhanced core btw?
i was gonna ask that day, i thought your vaccine mod used a similiar system

eeeem....
nope

last time i'm playing, not modding xD
oh alright...
yay, finally, after 8 months
enjoy 
crafting echanced core - it's mod?
emmm
all good, i thought i'd ask since we talked about it before 
ignore it then
thank you for the help again
i'm dont remember xD
like nearItem
yep
but Vaccine do it from lua func
standart recipes has string for check it
not sure about double near item
in CEC double near item doesn't work, just checked
yep, maybe. But if NearItem:1item;2item;3item, work fine, then easy way use it.
But honestly, I don’t know if this is necessary at all.
It’s just that in the fashion for the vaccine there is one recipe with checking the location next to the computer and chromatograph
:D try ;
yeah no it doesn't work
sad)
it shows in game but recipe isn't available
how about double nearitem?
ehhh
Not my, i'm remoder in this case xD
almost sure CEC came after your mod 
but it doesn't matter you guys use different systems
for the samesimiliar result
I don’t know at what point two tiles next to each other can be useful for crafting (except for a vaccine, where you need a computer and a chromatograph, but this is one case out of all the recipes)
i made a recipe mod for our server using CEC as base
it includes everything people can need in a server
from tools to paints to clothes, medicine
never needed double

My hands never got to the CEC.
As far as I understand, CEC uses vanilla tiles, but gives them... names?! so that it is possible to use them as an NearItem
ah, nope, they has autonomy tiles
Well, in fact it's not even a complicate mod, just TileSet...
You can just as easily use any tile like NearItem:,

But this is not bad, for those who do not know how to make moveable objects and tiles xD (like me)
(or me)
HOLYWHATIFOUND!
Listen on Spotify: https://spoti.fi/3SsugU0
Apple Music/iTunes: https://apple.co/41rIQPA
Thanks for listening to my cover of I Really Want to Stay At Your House, originally by Rosa Walton. CyberPunk Edgerunners is just such a moving anime that I had to cover this one. It's one of those songs that gives you a completely different vibe from the f...
delete it from the server
found author of mod and kick them ass
I already deleted it from the server though
Do you recommend unsubscribing then subscribing again to all mods?
U sure?
mod enabled in two table
Mods and Steam Workshop
should be deleted in two place
for example
I've created a miniature script for learning LUA in zomboid which works perfectly fine in singleplayer, but if I wanted to add multiplayer support how would I get the specific player which triggered the event?
Is there a way to replace an in-world item with another item at run time using just Lua? Say I have an ingot that is "hot" that I put it on the ground (that uses a 3D model). After a certain amount of time passes I would like to change it to a "cooled down" ingot item. How would I do that? Is there a way to replace the entire item with a cooled down version while preserving it's location and rotation in the world and making the transition seamless? It seems like the location/rotation functionality might be buried pretty deep in the Java so I'm not sure.
I have been able to spawn items in the world but the location and rotation is randomized, and it doesn't work properly in servers (duplicates ingots sometimes and doesn't show moving between containers for different players) even though I've tried it in both the 'shared' and 'server' folders. This is what I'm currently using that works on a solo world, but doesn't set the location or rotation:
-- Add new item to world square
square:AddWorldInventoryItem(newItem, 0.0, 0.0, 0.0);
-- Remove old item from square
square:transmitRemoveItemFromSquare(oldItem:getWorldItem());
https://projectzomboid.com/modding/zombie/inventory/InventoryItem.html
does this "WorldZRotation" work for what your trying to do perhaps?
declaration: package: zombie.inventory, class: InventoryItem
havent tried it myself but a quick look at stuff gives me the guess that it might lol
dont take my word for it
Possibly?? I'll have a go with it. Also concerning though is the poor implementation I've managed so far with the spawning in servers. Do you have any ideas why items would be duplicating when moving them between containers? Is there a refreshAllPlayersInventories function I should be calling perhaps?
Or maybe pushing the item to the server so it saves it for everyone?
ill be frank i am likely more new than you are wiht zomboid modding lol, i havent fiddled around with in world items yet to know myself
my best guess issssssssssssss its some server shenanigans with some of your code being client side and some of it server side? not sure tho
because if it doesnt show transfering between containers for other players that tells me that its set to run that stuff client side but not server side
All of my code is in the shared folder at the moment, I'll try tossing it in the server folder again and test it more with my buddy tomorrow or Monday. Any other suggestions anyone can offer are greatly appreciated, but no rush, this sucker has been haunting me for weeks at this point : P
Thanks for trying, @rugged latch 🙏
guys, tell me how can I change the character's running speed? (I have ready-made temporary events that will, under certain conditions, be triggered up to a certain period of time) I need links to examples where I can see examples of changing the characteristics (running speed) of a character.
local player = getSpecificPlayer(0);
print(player.CurrentSpeed);
i dont think that this one is correct method
declaration: package: zombie.characters, class: IsoPlayer
this here work for you?
wait sorry had to edit it, try using that
the server folder is also shared, you won't see any behaviour different
it's some legacy stuff, the server folder runs on clients too and there isn't much of a difference between it and shared except load order
(not to mention nearly all of the vanilla lua in shared/server only actually runs on the client)
Maybe someone can help me with this question?
Interesting.. Can you think of a reason why an item might be doing different things for different players on a server? ie. player1 takes item out of oven but player2 still sees it in the oven. Once an item is spawned in the world, shouldn't it be included in all the updates and events that happen naturally? Or do I need to manually refresh all inventories?
you shouldn't need to manually network things unless you're messing with them with custom code
In a multiplayer scenario, how would I turn this from local player = getSpecificPlayer(0) to local player = getSpecificPlayer(playerIndex)?
one thing to keep in mind is that the game is generally just kind of rife with those kinds of duplication bugs, so unless it's really persistent it might not be your fault
the full function:
function checkForKeyPress()
local player = getSpecificPlayer(0)
local key = 25
if isKeyDown(key) and not player:isDead() then
player:setHealth(0)
end
end```
this code doesn't really need to be changed for multiplayer, it should work fine already
So 0 is always the player who triggers the event?
getSpecificPlayer only gets players from the client
Thanks, ya'll, I'll try some more stuff and get back : P
(up to 4 because of splitscreen)
Ahhh, thank you very much 😄
if there's a keyboard player they're always player zero so this works fine in both splifscreen and online
Trying to check the light level of a grid square or something similar and led me to this https://projectzomboid.com/modding/zombie/iso/IsoGridSquare.Lighting.html
local playerSquare = getCell():getGridSquare(player:getX(), player:getY(), player:getZ());
print(playerSquare.lighting.resultLightCount());
however this line right above seems to just error no matter how i fiddle with it with zomboid only ever having this to tell me.
"java.lang.RuntimeException: attempted index: new of non-table: null"
which is confusing considering im not trying to access a table nor does the method im accessing return one
im pretty new to lua but not coding in general so this might just be some typing error or lua jumbo c# brain can't comprehend
declaration: package: zombie.iso, class: IsoGridSquare, class: Lighting
objects are tables
darn your totally right arent you
i'm not really sure where it's getting the new from
also frustratingly you can't just access fields like this
there's a complex method to do it (or i wrote an api that does let you do it the way you're trying) but i think i remember a method to get light level anyway
playerSquare:getLightLevel(player:getPlayerNum())
wowza spent about an embarrasing 7 hours and its just that easy, seriously exactly what i was looking for
there was about a million functions and fields with light related names and i just sort of assumed what i was trying to get was the closest thing without really knowing how to get it
also of course im gonna have to learn some more bout lua but thanks lol
guys, tell me how can I change the character's running speed? (I have ready-made temporary events that will, under certain conditions, be triggered up to a certain period of time) I need links to examples where I can see examples of changing the characteristics (running speed) of a character.
local player = getSpecificPlayer(0);
print(player.CurrentSpeed);
i dont think that this one is correct method
Okay, another server/client question:
I'm doing a simple mod to give a semi-randomized starter kit to each player, using OnCreatePlayer and player:getInventory():AddItem(###) commands. Works perfectly singleplayer - I assumed it would be server-side, so I put the if isClient() then return end statement at the beginning... but then nothing happens when online. If I run it client-side instead, do I need to manually sync inventory changes somehow, or will it just work?
Out of interest, is there any resource out there I'm not finding, that actually gives more details about the API beyond just the function headers? How can I work this stuff out for myself without coming on here every time to ask the gurus? 🙂
Use a decompiler.
the rotation is a property of the InventoryItem while the position on the grid square is a property of the WorldInventoryItem. ```lua
newItem:setWorldZRotation(orientationDegree)--InventoryItem
also if I remember correctly, "0,0,0" coordinate is handled as random position request. put any other value instead to set the position. (valid values are in the range [0,1])
Are there any resources for creating custom UI panels?
How can I check in lua if the player can craft a recipe?
Edit, found it.
local count = RecipeManager.getNumberOfTimesRecipeCanBeDone(selectedItem.recipe, self.character, self.containerList, nil)
Okay, interesting.. So how would I get the old items xyz coordinates on the square it's on so I can plug those in to the new coordinates of the new item on the same square?
Also, I'm assuming in order to access the current rotation of the old item I just use oldItem:worldZRotation? Or is there a getter for that?
Trying to understand how OnCreate works in recipes. For example, when a recipe says
OnCreate:Recipe.OnCreate.SliceHam,
What is it doing
Anybody know how to fetch if the player is the host user of a self host server?
It runs that function from recipecode.lua
You can chekc if the user is both isServer and isClient, if the user is self hosting, both should be true IIRC. This was explained by dislaik before he quit modding IIRC
Does anybody know how I can communicate with the server if something happens client-side? For example, the player clicks a button on the UI
Server commands
isServer() will return false if you're a client
isCoopHost() maybe?
I think if you are hosting via the host button it should return true to both isclient and issever 🤔
That works, thanks!
It didn't, I tested
Oh damn, okay good to know. thank you!
SendCommandToServer("TestCommand")
function onClientCommandToServer(command)
local player = getSpecificPlayer(0)
if command == "TestCommand" then
-- Make the player say something on the server
player:Say("test")
end
end
-- Hook the command handler to the server
Events.OnClientCommand.Add(onClientCommandToServer)```
Do you know what I am doing wrong?
OnClientCommand events triggered when 'server' gets client command from client
So you can't use getSpecificPlayer and there're not enough args for function
How do you find what square a player is in
Is there a way to make it so that the toltip does not cover the option under it?
Player:getSquare() or get the x, y,z coords
Ty 😄
yeah, just test mate. below is an example of parsing all InventoryItem in IsoWorldInventoryObject instances of a grid square. ```lua
local square = getCell():getGridSquare(posX, posY, posZ)
if square then
local found = false
--if the square is loaded and the
local squareObjects = square:getObjects()
if squareObjects then
for i = 0, squareObjects:size() - 1 do
local object = squareObjects:get(i)
if instanceof(object, "IsoWorldInventoryObject") then
-- Get the item from the IsoWorldInventoryObject
local item = object:getItem()
There's also IsoGridSquare.getWorldObjects method
Is there a way to force Zomboid to reload an entire mod's lua while you are playing without having to load and re-load your save?
You can press f11, search for your file name in the bottom right, and then hit reload but it has to be done individually. Sadly I do not think there is any other way
Ah damn, I'm already doing the f11 and one by one thing 😦
Is a pain we must all go through
Alright, I guess I wil implement the hard reloading myself
Would be a good idea to make a mod that lets you reload large sets of files
But would probably screw up your game depending on the file you reset
Yep, I will add it to my upcoming MxUtils then
nice
I'm not sure how WorldObjects and WorldInventoryObjects articulate but I guess they should be different, considering both are distinct instances of distinct types. 😉
I doubt you'll get a functionning tool for every use. Reload all (by reloading the game) or reload by file seem the right granularity of tools to me.
Beware not wasting your time, you've got mods to do 😉
When IsoWorldInventoryObject is added to world (ex IsoGridSquare.AddWorldInventoryItem) it added to IsoGridSquare.WorldObjects arraylist
and IsoGridSquare.getWorldObjects method just returns IsoGridSquare.WorldObjects
So it may works as well IMO
TBH, I do not remember why I used getObjects and not getWorldObjects. If I ever get perf problem I'll try and compare with the later.
this event only fires on the client side, so the code is never triggered on the server - clients are completely authoritative over their own inventories so it doesn't need to run on the server anyway
@near haven object:getX(), object:getY(), object:getZ() ..
does anybody know what this means
I spawn in, get the error. I press any numbers on my keyboard, get the error. I modded the game but I don't know what the issue is
your recipe references an invalid item
i think this only happens when it's a result item
I'm getting this same issue I think
maybe similiar
Has anybody got an example of sendservercommands? I'm having an issue where nothing is happening when calling the function and I'm getting no errors
how do i add clothing on zombies?
i think i'm just gonna remove it and set it in the distributions file instead
Thanks again @bronze yoke Clear and concise - really helping me get my head around all this 🙂
I think in the modeling channel there's a clothing mod tutorial that mentions how to get your clothes to appear on zombies
Though last time I checked, to make clothes appear in containers n stuff you needed to do something with lua distributions...someone please correct me if I'm wrong but I hope that offers a lead
To manually put something on a zombie and spawn it in, I'm not sure though. Sorry if that's what you needed!
i looked into the game code and got an idea
but i cant control the underware spwaning on zombies
Cheers. So what's the general deal with this - it decompiles the whole game's code, or just the modding API part?
i need to able to control all the clothing options
i have really spcific zombies in mind
@wintry dune
Would there be anyone here who can tell me why this happens? (Server has stopped during launch (NormalTermination)
When I try to launch a multiplayer server with a mod I've created, it doesn't allow me to launch the server with the mod from the workshop, however it works perfectly fine when I try to launch a multiplayer server through local files.
At first I thought I must have made a silly mistake in the folder set ups, but after checking it over multiple times, I cannot see any issues, I am completely new at this, so I over simplified the mod to trouble shoot, yet it still doesn't allow me to create a multiplayer server with my mod attached to it when I use the mod from workshop.. What am I doing wrong here?
I have some plans for things I want to make, but if I can't make a simple mod like a single recipe work, it would seem silly to work on a bigger project
the mod is private
the server downloads workshop items anonymously, so it can't download private mods
use unlisted instead
Oh, does the same count for friendsonly?
yeah, if someone not logged into steam can't see your mod, the server can't either
Ooooooh, So all this time.. I've been knocking my head against a wall for 48 hours now, thank you so much Albion, this is my first time trying
When you explain it, it seems logical now 🤔
Big appreciation from here
Do you guys think this UI is good enouhg?
Thank you so much @bronze yoke it made the bigger mods I've been working on work as well, I was making it oversimplified removing my own items and sounds from the game as well because it was discouraging me that the mod didn't seem to work, but now everything works and it has given me back the courage to continue 😊
When you upgrade the container from the user selection, how are you communicating this between the client and server?
Looks clean by the way
Thank you, and I'm be using server/client commands to tell clients in the area that the container has been Updated and the UI needs to be refreshed
decide to work on a blacksmithing mod
just now remember to check last months Thursdoid
see they are implementing a base game version of blacksmithing, with many similar characteristics of the mod being made
😔 suppose that means I just need to work fast enough to beat them to release
sadge
What is the safest and most performant way to apply a default value to table?
yo, sorry if its been asked billions of time, but I'm thinking of giving a try about modding the game, i would like to know if it is the right modeling file and what software should i use as a begginer ?
just want to edit the model/texture of the katana as a first goal
Oh dam, not entirely sure how to do that. I know authentic Z has specific zombies that spawn (like a fully dressed clown for example). I think it's more like: have 1 zombie spawn with x, y, z clothes. You can try looking through authentic z's mod scripts but otherwise I'm not sure how to program such a thing. Good luck, hopefully someone can help a bit more!
you can overwrite the default return value of a table with a metatable but the fastest is to just do value = t[k] or defaultVal
if you want to avoid repetition you can use a function that returns that, i haven't tested but i imagine that would be faster than the metatable approach
gonna test that actually, curious how metatables actually perform
in regular lua the metatable is much faster... can't test for pz now but maybe that is the right approach
Anyone have an idea on how to add storage to tents? I know its planned for build 42 but I want to do a playthrough with no vehicles, travelling on foot and setting up a camp somewhere, I haven't been able to figure it out and I don't know much about modding this game and also still learning Lua
if i change names here will it make a completely new mod or update the current one i have uploaded?
cause im curious what i can change in the mods descriptions and such
updating the mod.info file will update the mod. Only the in-game name will change.
what creates a new separate mod?
a completely new folder?
aaaaah gotcha
so changing anything in mod.info is fine
changing the id can break saves, fyi
ah ok
gonna leave those alone then
they're a little innacurate but oh well
lol
rather not mess up peoples multiplayer servers lmao
you can usually upload a new submod with new id and gradually remove the old after some time has passed
making an expanded music add on for my current one as a separate mod of course
The issue with this right now is that all submods can be enabled automatically on servers or by people who skip reading instructions.
If you have mods that should not be used together (different mod versions) then it could cause issues. Big warning in description helps but not everybody reads it.
just thought i'd have a 1994 to 1999 music mod incase people wanted songs that just missed the 1993 mark lol
Hello,
Someone know how/where i can override/alter the zed story generation ? i'm working on this mod (zombie Legend) : https://steamcommunity.com/sharedfiles/filedetails/?id=2990731456 that spawn grey clothless Zed (Like the movie 'I am Legend'), it work for the random Zed, but those generated by the Story keep their clothes. I find nowhere where i can get rid of it
I searched by keyword on the discord, but i dont think the answer has already been given
Hey guys, how are y'all doing?
I'm trying to change the walk and idle animation but without success 😦
Someone here knows how to change idle and walk animations?
I wanna use on my camouflage mod... When the player is camouflaged, player should act like a zombie
Thanks in advance
Can't wait! 🙂
since you're talking about music mods i'm gonna throw my hat into the ring:
https://steamcommunity.com/sharedfiles/filedetails/?id=3079947392
Please say me can I somehow view the entire list of global variables?
no, u
stop moding, go play! zaebal
no play, only sadomasochism!
da kak ty zaebal, go! you je create your mod on autopsy?
thats all
hvatit
go
da mne fiks nuczhno sdelat na odin mod
huiks
🐖
xD
Does anyone know if there is amod that makes the can opener have priority when opening cans? RN, when u try to open one it will use knifes first, which is not optimal. Thnks
Global Variables? Kak _G?
https://www.lua.org/pil/14.html
heya, just to let everyone know ( whoever has any interest in it ) that im updating my integration mod, plus remaking ( almost done ) the App that stands in between the game and mod, so i'm taking suggestions and ideas of stuff anyone thinks would be something to add in the game integration with twitch.
Proof of concept https://www.youtube.com/watch?v=wdkwUSoycYc
so if anyone has any thoughts of a functionality to add, just let me know
Finished adding bot support ( fully customizable with rivescript ), worked a bit on the UI, ironed out a lot of bugs ( plenty still around i bet ), next step finish coding a more user friendly settings menu/form.
also i'm making it so that anyone who wants to integrate their mod with twitch will be able to do so, using the app and adding a few lines of code in the original mod
like this, but please say me variables that are passed to a function without being used in code, like in this code:
function Function(player, perk, perklvl)
if perk == Perks.Strength then
if perklvl == 10 then
player:learnRecipe("Recipe")
end
end
end
Events.LevelPerk.Add(Function)
in this code the function will be executed without errors, although the code does not contain the variables player, perklvl, perk, I want to find out how many such variables there are or what it is that the function reproduces them itself without specifying the variables in the code, if these are global variables, then using for n in pairs(_G) do print(n) end I did not find any mention of these variables
This snippet would not work, the events add is inside the function, you never call that function.
https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/api/README.md#the-event-system
This is a good guide about events.
https://github.com/demiurgeQuantified/PZEventDoc/blob/develop/docs/Events.md
Another list of events.
https://paste.sr.ht/~ckyb/99d2d134360d355f33ceecf255b971f6b1d03624
You can also test them in-game to check specific conditions...
#mod_development message
Warning, every time "Function" is called, it will be registered to be called another time. Each time you would get double number of calls.
mixed up, event is moved beyond end
function Function(player, perk, perklvl)
if perk == Perks.Strength then
if perklvl == 10 then
player:learnRecipe("Recipe")
end
end
end
Events.LevelPerk.Add(Function)
the function works, but I don’t understand where it gets player, perk, perklvl from, since these values are not in the code
using ongamestart event function will not work and will send error
but using levelperk all works, but how?
In brief:
How does the function understand these values in parentheses?
Is there some kind of sheet of these variables or what is it even?
These are not local variables that we predefine in the function itself.
Anybody know why my mod UI doesn't appear for clients on the multiplayer server when downloaded through workshop?
but does when the mod is installed in the mods folder
it works on singleplayer
Would this work for sending the player from the client to the server?
sendClientCommand(player, "MyModule", "MyCommand", {})```
The server seems to receive a null value for player but every other param seems fine
sendClientCommand already infers the player. You dont need to include it.
Ahhh, thank you 😄
works now
Does anyone know how the get a list of player given the coodinates of an object? nvm found it
Hey guys, im full zero at modding, but i want to add custom sound for the cars in PZ. Is it possible to change default sounds to something more clean and real?
Is there a common sendServerCommand to tell the player that OnContainerUpdate has been triggered?
they are passed by the event, see https://github.com/demiurgeQuantified/PZEventDoc/blob/develop/docs/Events.md for details
anyone knows how to make ingame visible map for modded map? I create a modded map, even though it is loaded into the game, the ingame player map does not reflect the modded map
say please what is the boolean increased? very thanks for response
true if the perk level went up, false if it went down
in vanilla only strength/fitness will ever go down
thanks for answers
@bronze yoke do you know if there is a way to trigger opening the debugger in pz via lua?
I noticed that I need to debug certain things before I can click F11
i don't know if there's a better command for it, but error() will open it
Ah great, thank you
why cant i use vanilla guid to make clothing sets for zombies
the first one is a guid from my mod
but the 2nd one is a guid from vanilla
mine shows but the vanilla one doesent
Ohh okay
@brave ruin
Well some mods have multiple ones
Like britas armor
I find it to be to much loot everywhere
Of brita's armor
my guess is arsenal mod changes distributions for brita mods thats why its more common
I don't use arsenal mod
I'm having a weird problem with my util, apparently { unpack(defaults) } does not work, and it always returns {}
---@param target table
---@param defaults table
function Utils:mergeWithDefaults(target, defaults)
if not target then
-- Return a new table to avoid modifying the input
return { unpack(defaults) }
end
local result = {}
for key, defaultValue in pairs(defaults) do
result[key] = target[key] ~= nil and target[key] or defaultValue
end
return result
end
idk i did a test yesterday and it was 0.1 was seriously rare on clothing even with audient loot
had to change them to something btween 1-4
but thats for cosmatic clothing tho
0.1, on default loot settings, means a 0.0004% chance
WTF it just fixed itself 😕
i still cant find out why i cant add vanilla items to my mod zombie clothing sets and the guide in the modeling channal has the same thing i did
Do anyone know why the console spams
AnimationPlayer.play> Anim Clip not found: InvalidOnPurpose
and how to fix the issue?
When I'm hosting via no-steam, using the host menu, do the server logs go in the console.txt?
no, still coop-console
Ah, okay thank you
not a bad selection 👍
I am trying to make sure this warns the server using /servermsg funtion
this is what I have so far
chatMsg.__index = chatMsg
if not isAlert then
msg = "[Server] "..msg
end
ISChat.addLineInChat(setmetatable({ msg = msg.."\t" }, chatMsg), 0)
end
however it isn't actually putting up the message before restarting, any assistance would be appreciated
I am assumeing the line msg = "[Server] "..msg should actually be msg = "[servermsg]"..msg?
hello guys. i dont know if this is the right channel to write, but my mod that i made automatically disables itself when i try to enable it. lua doesn't refresh, and it just throws me back into the menu if i click on back. any way i could solve this?
I do not know about this.
do you want me to send a zip file of mod?
I am not feeling that helpful, or something ;-;
why not ?
i spend 4 days watching tutorial on youtube and make Beer mod
and i cannot enable it
It is outrageous
my honest reaction
Some reason(s)
You could try debugging it <- wow advice so helpful
so uh, I'm trying to upload a separate mod but idk if i just overwrote my old one lol, they both have the same id? but different folders is that a problem?
it's still uploading rn
but im seeing this
update of existing item instead of creating new item
i could simply reupload the old one if it does overwirte but i was told simply separating folders makes a new mod itself on the workshop
but we'll find out soon
yep
replaced it
LOL
am i meant to leave the id section blank in order to create a new item?
ok yea thats what i did wrong
One on the right had the exact same ID as the left one when i first uploaded it
probably what caused it
Hello. I could use some help debugging a mod that I wrote. I made No Food Expiration (https://steamcommunity.com/sharedfiles/filedetails/?id=2695935241&tscn=1699911640) to prevent food from perishing. It searches the files "farming.txt", "items_food.txt" and "newitems.txt" and deletes every DaysTotallyRotten parameter that it finds. Works great for 99% of cases, except for the Uncooked Pots of Pasta and Pots of Soup that you find in houses. If you cook those, the cooked version rots. I can't find any recipe file that contains these items, so I'm not sure what controls them rotting. Any ideas? It's not a mod conflict, I'm able to replicate the issue on a new save that's only running No Food Expiration. Uncooked version has no expiration. Cooking it gives it a "fresh" parameter, and then it rots.
Also, if you've got any advice, @ me directly. I don't check Discord very often, I want to make sure I see it. Thank you in advance!
yep i feel like an idiot after trying to upload a new mod lmao
so i have created an animated horse in blender, anyone got ideas on how to make it so i can sit on it and ride it?
within the game?
@fast galleon@full fjord testing rn, hopefully the spawn rates are good
https://steamcommunity.com/sharedfiles/filedetails/?id=3082559865
enjoy
Did that get nuked already?
hello, guys, noobie question, what this "Events.EveryTenMinutes.remove(function)" do?
what got nuked?
Shows no mod, but it could be under review if it's recent?
oh
idk works for me
could be under review though yea
i changed the description just like a minute ago
Link works now actually, so it's all good
lol
nice
i didn't thoroughly test it yet though in terms of spawns
still initializing a multiplayer server lol
wanna make sure it doesn't take god knows how long
ok so og mod is bugged lol
after uploading this one onto it
i need to reupload it
the expansion works though
hold up might be on me
gonna resubscribe to my own mod to see if it works
Hmm, thoughts anyone? Trying to tailor a hardcore co-op experience with a friend, and want to inject some additional sense of jeopardy by treating it as strictly "Ironman" - either of us dies, it's a world-wipe, no respawning.
Probably doesn't really need to be any more than an agreement between us really... but I was wondering if there was any elegant way to somehow auto-wipe the world OnPlayerDeath or something.
after some testing i cannot run 2 true music mods as 1 will delete all the songs from the other
so i will have to make a separate mod with all the original songs and the new ones in 1 mod instead
@sour island cant run both mods at the same time unfortunately so i just decided to add everything from the original mod to the expanded mod which makes it 1310 songs lol
True music can't operate with 2 at the same time?
That's ironic considering all the packs
I imagine it could, but because true music has a pre made station for you to make custom, if the 2 mods use that station they would conflict especially since the songs are numbered
Unless I'm thinking of another radio mod, can't remember which one I used it's been a long time
Ah, that makes more sense
Yeah, I was thinking survivor radio but I imagine true music works similarly
Any taker for this mod? I would like to have it in our MP server but unfortunately it's outdated https://steamcommunity.com/sharedfiles/filedetails/?id=2732647029&searchtext=propane
ah... yep... thanks 
True Music exe creates the lua and script file with the default name, you must rename them so that they are not overwritten by other addons.
does anyone know the values that toughness, speed, and strength can go up to?




