#mod_development
1 messages Β· Page 19 of 1
?
the bpack value it saves in moddata
yeah
AFAIR, there is only a limited set of types you can successfully save in modData
and I'm pretty sure all those types have to be lua builtins
e.g. numbers, strings and tables
hm
tries to think back through all the moddata she's seen
that seems to fly with what i've seen yeah
usually ids or strings for names of items and whatnot
at runtime you can do whatever you want, but it'll never persist across a save and reload
I am using a military semi truck
the item data isn't stored on the player presently though it's stored on InventoryItem's mod data
It has the highest HP
Still slows down on the road and I have to keep tapping W
that's how it's gonna be
It took 2 hours to get home
and I am still not home
I am maybe 4 minutes from home now
cool story bro
yeah that's really the wrong channel tho
u want #mod_support and u wanna tell ppl waht mod
yeah, seems so
which is CONTAINERS! and i guess ki5's oshkosh semi mod
if my assumptions are correct
but yes that's pretty much ur best case scenario
game engine limitations blah blah
Yeah the actual container was easy as fuck to move, even when full
but an empty gasoline tank was a nightmare
Not in a realistic way
report to mod maker
keep it out of this channel
this is for mod makers to talk to each other about making mods
I could get up to like 10 MPH, then it drops instantly to 0
And I would have to keep tapping W
to keep it somewhat steady
Apologies. I'm very sorry.
I was just wondering if maybe somebody had more insight into the ISO container mods and knowing vehicle was the right one to use
still #mod_support , but the answer from people with insight is just "there is no right vehicle"
it's gonna suck no matter what
@calm depot won't this "waiter" thing get screwy running from a server context in the first place? am i wrong or does this need a redesign to have like.. a waiter/player combination registry'
how does it work when a bit of code is in shared and it's of this nature
i really need more insight into how what code gets run where
i get the basic idea, client on client, server on server, shared on both (and loaded earlier)
yeah, I don't quite understand why the operation needs to live in OnPlayerUpdate
I guess it's because you don't immediately get the hotbar item available
but even so, why not queue up the event function when the conditions are met and have it remove itself after the job is done
Hey random question, when using
context.addOption, how does one make it appear above Drop and Place item
execute it before those do
So i take i need to hook into another event?#
if you really want to be particular about where it goes, you'll have to hook the function that adds those items
and do some clever interception of the addOption function to inject your own element
Yep its me being a little ocd i think, i want it to be neat aha
Ill look some more into it, pretty minor one though xD
care to elaborate on this
im aware u can add and remove functions from events
i've used adding them before for things
seems to me there is no point in having the OnPlayerUpdate function firing until OnClothingUpdate has set the moddata for it
yeah
and once all its conditions are met, it can dequeue itself
declare a local which will hold the function before assigning the function to the local
actually, I think you can also just use local function blahblah()
could as long as we save the reference? i think that's how it works?
AFAIK, that is internally equivalent to first declaring local blahblah prior to assignment
im from C#-land, still adjusting to lua
in Lua, this is called an upvalue
so if there's a lot of players
all taking a backpack off
u need these queued events to not get mixed up on server end
the lua code runs single threaded and only once per tick
it's impossible for events to just interleave themselves simultaneously
because the lua state does not support multithreaded execution
i mean though, if you have one person take a backpack off
why doesn't it save someone else's attachments
if it's in shared or server
PZ java backend player stuff?
because the event receives that player argument
ah ok
yeah
yeah yeah that seems obvious now :p
hard to remember everything at once sometimes xD
thanks, when i do this i'll put a thanks to you in the description
gonna defer this to later since it's not just a quick fix though.
to do it right
no reason the reattaching code can't be on the client actually
that'd make uh.. more sense
lol
is there a first person mod
No
make one
How does weight reduction works? I did set it to 90 and doesen't seem like to do notthing to the weight of the container
ah yes, just make one, I wish I'd thought of that
@gilded hawk the weight reduction bonus only applies when it's on your back as a backpack or in a primary/secondary slot
What about fanny bags tho? π€
ah sorry, I should have said when it's in a worn slot
so, I hate to sound as new as I do here but I'd like to know before I rabbit hole for a week. Is there support for building our own lua modules to use in mods?
yes, though I wouldn't really call it "support"
everything executes in the same lua state
gottcha but it can still call external libraries as part of those events?
you can make your mod.info depend on other mod IDs which will ensure their lua executes before yours does
when you upload it to the workshop, you should also edit it to depend on whatever the workshop item(s) you require are
that part is all done from steam's website
Ah okay thank you
Good evening.
Debug-testing a mod that's about to be updated that enables RCON for singleplayer.. basically for Twitch integration custom commands.
π
isn't that a bit overengineered? There's nothing stopping you from just running a server instance on your own computer and connecting to localhost
The original mod made custom commands possible for server-hosted twitch streams.
It was a heavily requested feature since a lot of streamers play on singleplayer maps.
Question: How do you create/define custom tags for modded items? E.g., like the 'Milk' and 'Egg' tags for food items.
I get it, but I'd have said "yeah, so fire up the server instance on your PC" - it's still basically single player if you're not exposing it to the internet π
You'd be surprised how simple it was to mod this in.
in pure lua?
Java with a lua mod.
yeah, and there's the rub
Not sure what you mean but ok.
the catch
Not a catch if it comes from a trustworthy source. π
anyway, if you're interested in going that route, this tool of mine might interest you: https://github.com/Olipro/PZHook
If you're interested in close to 8 years of Java modding tools, you might be interested in this too: https://asledgehammer.com
I don't know which repo you want me to look at; my app lets you patch methods at runtime; doesn't matter if the game classes get changed by an update (unless the function signatures change, of course)
That'd be the tool WoodGlue.
Dynamic patching and sandboxed environment.
premain jazz.
so it's using a Java agent
And Kotlin.
my approach is that you do it by defining annotations that tell it what to target
It's for servers.
Oh. Reflection stuff is avoidable. I'd rather edit the main bytecode.
PZHook will work for any setup
Back to debug testing so this mod can get the green light for the update.
Dumb question: Is there a way you can use, say, a water source like a sink or rain barrel in a crafting recipe, rather than a water source like a water bottle already in your inventory?
I am ashamed to admit I've never given it thought before. TBF I never thought to try before now though. π
you could if you have a custom isvalid/perform function, but you won't be able to make it show up as a requirement in the recipe
I figured I'd have to make something in lua? Either that or just make the item drainable like any other portable water source.
Tl;dr, I'm trying to hack together a way to make ice. I want to fill a tray with water at the sink, rather than from a bottle or mug.
you can define a lua function that's called for every input item to test if the recipe is allowed and a lua function that is called with all inputs and the output item when they perform it
alternatively, instead of making it only a recipe, add a right-click context action
so, the recipe will just use some container with water, the context action will only show up if they click a moveable that supplies water
Blegh, headache inducing.
I'd have to define timed actions and stuff.
I just wanna fill an ice tray. π
I return
I've recently made a mod similar to that, i transitioned from a simple recipe from Empty lighter to a fuelled lighter, to setting the usedDelta to 0 manually and allowing it to be filled via a custom context menu item, then it hooks into a timed action and runs the logic inside
Though not quite sure how you would freeze the water, but i can imagine where you might start by getting water into the tray, by making it drainable etc, you could pretty much take the code from existing Water bottle item in media/ and go from there
it would be simpler to make it a food item with a ReplaceOnRotten
I was thinking that creating a museum to display all you collect would be superb like the skyrim mod legacy of the dragonborn
{
Base.WristWatch_Right_DigitalBlack/Base.WristWatch_Left_DigitalBlack/Base.WristWatch_Right_DigitalRed/Base.WristWatch_Left_DigitalRed,
keep ATTS.Barcodereader,
Result:Money=5,
Time:30.0,
Category:Zamazon Trading,
}```
I have another question about the recipe. I made a recipe that sells digital watches. But It sells favorite(The yellow star) watches as well. Is there any way to protect favorite items from this recipe?
what happens if you prefix it with destroy
destory? Oncreate?
what?
umm like this one
OnCreate is for running a lua function
{
destroy Zasawkit,
Result:Base.Needle,
Time:100.0,
OnCreate:Zasawkit,
}```
I know it might be a dumb question. but can I ask what does destroy do?
yeah, that's not a thing, unless you defined a lua function called Zasawkit
it destroys the input item
{
destory Base.WristWatch_Right_DigitalBlack/Base.WristWatch_Left_DigitalBlack/Base.WristWatch_Right_DigitalRed/Base.WristWatch_Left_DigitalRed=1,
keep ATTS.Barcodereader,
Result:Money=5,
Time:30.0,
Category:Zamazon Trading,
}
"destory"
Oh It still destroys favorite items. But I think I found some hints from original recipe file
{
Shotgun,
keep [Recipe.GetItemTypes.Saw],
Result:ShotgunSawnoff,
Sound:Sawing,
Time:200.0,
OnCreate:ShotgunSawnoff_OnCreate,
}```
This recipe takes favorited item
{
[Recipe.GetItemTypes.DismantleDigitalWatch],
keep [Recipe.GetItemTypes.Screwdriver],
Result:ElectronicsScrap,
Time:30.0,
OnTest:Recipe.OnTest.DismantleElectronics,
OnGiveXP:Recipe.OnGiveXP.DismantleElectronics,
Category:Electrical,
AnimNode:Disassemble,
Prop1:Screwdriver,
Prop2:CDplayer,
}```
but this one is not. because of OnTest..?
most likely, it's a function
so you can make it do whatever you want
it gets called for every input item in the recipe
So I found that recipes can require items be hot via the Heat parameter.
E.g.: Heat:-0.22,
Does anyone know what value would correspond to something being cold?
you'd have to use AllowFrozenItem:true and implement custom logic in OnTest to check that it's currently frozen
What does the parameter for that look like? Ctrl-F recipecode.lua turns up nada.
For the OnTest bit I mean?
Hey I found it! 'return not sourceItem:isFavorite()' this one was the protection. Thank you so much for helping me out. It works!!
Hey I am curious if anyone has ever had a problem where sounds play sometimes and other times they do not. I have tested it just now and how it goes is - load up game - mod sounds don't work - reload game - sounds work. Recipes and eating.
It may be all mod sounds but that is all my mod has - any ideas what would cause that?
Does anyone know a mod that adds a temporary effect? I'm trying to figure out how to add a temporary effect in multiplayer.
Was curious about some opinions on a couple professions I was thinking of.
Caveman: 10 fitness, 10 strength, 5 foraging, but you can not drive, you can not read, you learn every skill at a reduced speed, and you panic indoors.
I thought of this for people who either want a challenge and want to live exclusively off the land or for people who want to do some RP using the 10yrs later mod.
Plumber: Starts off with 3 in short blunt, 2 in maintenance, would be a -5 profession.
Not that βplumbingβ per-se is in the game as of right now but they have most other trades as professions except plumbers. That and to cater more to people who main with short blunt.
Rural Hermit: 3 farming, 3 foraging, 2 tailoring, 2 axe, 3 trapping but your stress, unhappiness, and boredom increase around other players and you get the sunday driver perk but would still make it a -6 profession
You could try using the "EveryHours" event or one like it, I am not sure of a mod that does that but those events are good to manage time based things I think. You can see em all here: https://pzwiki.net/wiki/Modding:Lua_Events
Ya, I know I can use this event, which I plan on it, but I need to figure out how to apply an effect to a specific character in multiplayer.
I've gotten the character, but i'm not sure how to store it to check every so often. I can't use a global variable for every possible character.
Never mind, I think I've figured out lua tables are just hash tables.
I should be able to use that
Cool I would have to mess around a bit to figure it out but it sounds like you are on the right track. I haven't done too much on here with storing and recalling variables per player like that.
Imo rural hermit would be better split into traits
Would be cool to have the traits "People Person" and "Antisocial" with corresponding effects.
sort of; both keys and values can be of any type you like. You get arrayish behaviour if you have sequential keys from 1 up to whatever - regardless of whether or not you are storing any other kinds of key as well
Question:
How can I add/remove firearm accuracy without manipulating the firearm skill or firearm stats?
you probably can't. but you can just modify the stats back and forth if you want
I suppose I could just set the firearm level, but I don't want to trigger the xpgain event
I'm essentially trying to make a high accuracy temp effect
But also trying to not touch OnPlayerUpdate Event
Maybe OnEquipPrimary will be useful, I just don't want to touch the firearm because I want this to be compatible with any other mod.
I don't see an Unequip event though...
Anyone knows where I can find the code for hot drink recipe ? I made a mug and I would like to be able to make coffee or tea in it 
you don't really need to unmodify it specifically when the weapon is unequipped. it doesn't really matter what stats the gun has when it is just in a container. those stats will only be used when equipped again, so you can just modify it to what it should be at that time.
But if I modify the weapon stats, won't they stay that way until modified again?
In that case, if the weapon was dropped or given to another player without the buff, that instance would still have that modified stat and be used as such..
yeah the gun would have the stat when the other player picks it up, but when they equip it, your OnEquipPrimary function would run again, and you just set it back to the correct stats
But I'm not checking everyone, only those with the buff because that's all I care about π
actually, looking at the java, it looks like OnEquipPrimary does also trigger when unequipping from your hands
Oh, really?? Can you link me that please?
sure, but that OnEquipPrimary is going to be run on all clients, regardless of if they have the buff or not
sure you can technically add and remove from the event list, but that is so much more complicated than just having a check in the function if the current player has the buff
so
if player has buff then
buff gun
else
set gun to default
end
public void setPrimaryHandItem(InventoryItem var1) {
this.setEquipParent(this.leftHandItem, var1);
this.leftHandItem = var1;
if (GameClient.bClient && this instanceof IsoPlayer && ((IsoPlayer)this).isLocalPlayer()) {
GameClient.instance.equip((IsoPlayer)this, 0);
}
LuaEventManager.triggerEvent("OnEquipPrimary", this, var1);
this.resetEquippedHandsModels();
this.setVariable("Weapon", WeaponType.getWeaponType(this).type);
if (var1 != null && var1 instanceof HandWeapon && !StringUtils.isNullOrEmpty(((HandWeapon)var1).getFireMode())) {
this.setVariable("FireMode", ((HandWeapon)var1).getFireMode());
} else {
this.clearVariable("FireMode");
}
}
public boolean removeFromHands(InventoryItem var1) {
boolean var2 = true;
if (this.isPrimaryHandItem(var1)) {
this.setPrimaryHandItem((InventoryItem)null);
}
if (this.isSecondaryHandItem(var1)) {
this.setSecondaryHandItem((InventoryItem)null);
}
return var2;
}
Wait, is this the actual code from the game files?
yeah its the decompiled java
Is that public somewhere? Or did you decompile it yourself?
myself. there is a really good guide here that I used.
https://github.com/Konijima/PZ-Libraries
Oh shit.. I didn't realize that was a decompile tutorial.... I glanced at it earlier and was like "interesting library" and moved on π
where are "furniture" containers defined? Is it possible to change the capacity?
TileZed
I'm looking to make a halberd-like weapon(s), any suggestions on which vanilla weapon I should be referencing for the best results?
referencing?
Yeah
In the sense that people making axe-like weapons would look at the vanilla axe to learn how to set it up, what size to model it, etc
the only thing you might care about is recycling animations
is it a folder? or this file tiledefinition.tiles?
TileZed is the tile editing tool
it's part of the PZ modding tools
you can download it either on steam or from the forums
ty
either use an old ass version of Blender, or get something to convert it to FBX
yeah i looked it up in this channel and saw you saying that haha
oh and just so you know, you don't need to put weapons in .X format
the game will handle an FBX just fine
Thank you, yeah I'm planning to do that
One question though, I've opened the Vanilla Spear with Machete and also Scavenger's Bushcraft Bat
I noticed that the spear is laid out horizontally while the bat is upright
π€
So which orientation am I supposed to adhere to
given the ease with which you can translate a weapon, who cares?
make the model, translate and rotate it till it looks right
Yeah I did see a translation script thing in the mod files, I'm just wondering cause I wanted to know which is the "default orientation" that doesn't require more adjustments
I believe it depends on the anim to determine the origin point
I'd wager the spear and the bat are using different ones
Makes sense π€
Aite I'll give it a shot now then
Since I'm making a halberd-y thing I'll follow the spear
Oh I meant the spear with the machete
I mean, sure it's legit since it has the spiky point, but swinging it seems more "fun"
That's a swinging one right?
I think all the spears are a stabbing motion
something like the sledgehammer or fire axe strikes me as a better fit
Hmm actually yeah, it's weird cause I'm in game now and the spears do a swinging animation
But when I look at stuff like these
It's stabbing
Admittedly I don't use spears much so I don't quite know how they work
Using the sledgehammer anim is a great idea, thank you
How do I make a recipe that get's an item in input and returns different item but with a similar name?
Like, I have Bag_MedFannyPackFront that if put into a recipe it will return Bag_MedFannyPackFront_Spec, how can I do this? π€
It is relevant because I have 10 items, with 10 spec version, and I don't want to make 10 recipes
well, if you don't care that the user won't be able to see what they're really getting, add an OnCreate function - nuke the result from its container when you're called and give them whatever they're meant to have
alternatively, you could programatically define the recipes
Is this even possible? π€
yeah
quick question, is mod options dead?
Source pls
you build the recipe string and feed it in through a function call
Do you have an example?
hey π maybe someone knows this: how can I allow debug enabled cients on my dedicated server? ty π
@gilded hawk ScriptManager has a ParseScript function
you can get the class instance with getScriptManager()
the ParseScript function expects a string, which should look the same as a recipe script file
So, I should give a string like this one from AZ?
module AuthenticZRecipes {
imports {
Base
}
recipe Open Pack of Glowsticks
{
AuthenticGlowstick_Pack,
Result:AuthenticGlowstick_Blank=3,
RemoveResultItem:true,
Time:120,
OnCreate:OpenGlowStickPackage,
StopOnWalk:false,
AnimNode:RipSheets,
Tooltip:Tooltip_GlowStickPack,
}
}
yes
Wait, would this work even with items????
items are a little different

you can just call createNewScriptItem
Does not work dude
that gives you an instance of the new item, then you use DoParam
it absolutely does work, I have used it myself
I spent last week working on createNewScriptItem, and it only gave me problems
well, evidently you didn't do it right
Do you have a github repo where you used the createNewScriptItem?
what's more likely, the game function is broken, or you made a mistake?
anyway, it's irrelevant, I used exactly this API for dynamically generating items
didn't have any issues
what I suspect you missed is that you also need to emit a script file
I was trying to do it too
otherwise when someone reloads the game, the world dictionary will not have the entries
What do you mean?
you think that file is a lot? you should see the metatable code I had to write to coerce it into using the alternative gasoline containers
You impress and scare me
nvm. found it. u just have to be admin
Has anyone ever tried to make a mod that reads twitch chat messages and events?
yeah, I believe there's one that interacts with the server RCON
Do you know which one?
no, you'll have to google it
can I trigger setGhostMode (dedicated) server side? I'm doing it but it doesn't seem to populate to the client or has any effect at all
@calm depot I did it!!
It does the funny now!
Only thing is the action seems to sometimes get stuck in the crafting anim even after it's finished but that's just a nitpick
Also, I need to find a way to dynamically add items with the tag into the recipe for removing batteries
(Because otherwise it won't recognize the hand crank)
@weak sierra You on?
not if they have no privileges, no
and, if they do have privileges, there's no need to do it server side
the point of using tags is that you don't need to
Nono I mean
I want to adjust the default recipe to use the tag
But I don't wanna edit the script so it can be more compat
it doesn't even work with admin access level. looks like only client can call this func π
the server can definitely synchronise the bit flags when a client connects
never checked whether it can be manipulated from lua though
Is there a way to translate "[Recipe.GetItemTypes.BatteryItem]" into the items or am I able to just plug it in as-is?
I doubt I'll be able to just plug it in since vanilla scripts go brr, I'll probably have to loop through the items with the tag and add them

I imagine getScriptManager():getItemsTag("BatteryItem") works but idk
Ui, is it possible? I can find some icons but the rest are hidden in packs I cannot open
Editing UI is possible, just has a lot of incompatibilities since they tend to override the same file.
I haven't had a reason to open them personally, but I'm sure someone knows.
Most UI objects actually return themselves / use other objects as templates like timedActions
You can even grab some by a global clientside instance
Oh? I was thinking stuff like moodles.
Though that could still apply for all I know
Yeah moodlets, widgets icons sorts thing
I tried it with the ones available outside packs and it worked of course
Oh those use shared textures
I'd have to double check how those are loaded but conceivably you should be able to include a file matching the expected file name
It's different for everything unfortunately -- I know items require specific format to filenames and you can't use vanilla names but that could've changed/I misunderstood
I think I got it working
might be one of the things you have to reference from your mod.info
but don't take my word for it
OLI I DID IT
nice
fear
could add a shake weight, but it'd be rather anachronistic
Ok so I found a minor but, bug other than that it's perfect
Apparently one can insert a battery into the crank when a battery is already in it, so I gotta patch that
im fairly sure this will fall on deaf ears (no pun intended lol(but i just had an idea ima share with you two words hearing aids
hm, sounds like your isValid has an issue
yeah, that'd kinda nerf the deaf trait
but considering that batteries for those things in the 90s were probably good for a day or two at best, not that bad of an idea

I used hearing aids my self battery nowadays can last for ages
on the other hand, if someone is profoundly deaf, hearing aids are useless
recipe Drill Cochlear Implant into head { ... } π
lol
I'll patch the bug later, but am very proud of what I've managed to accomplish with some help

Now I understand the inner workings of zomboid a bit better in regards to items
Next up: funny couch searching
of course, that's the point of modding: the satisfaction you get when it all works
phonak a pretty dam popular manufacturer of hearing aids https://www.phonak.com/uk/en.html this be good for inspiration
You figure it'd be better to make couches into containers for a couch searching mod or something like a timedaction?
Imo timed action might be better but idk
Could introduce a "failing" factor where you don't turn up anything.
Hey all, Iβm new to PZ and the discord server. This seems like the right place to ask: Iβve only played vanilla PZ up to this point and am curious if thereβs a list somewhere of some recommended or βessentialβ mods the community know about?
dylans car mod
I realize this is subjective, but Iβm not sure quite where to start when it comes to modding.
go to the workshop and sort by most popular/downloaded over the past year
Good point
also, any mod I've made is obviously a must-have
Iβll look for ya 
I'm mostly joking, though chances are you'll pick up the 4-colour bic pen
my most popular mod is the one that was the least technically challenging to make, go figure huh?
Iβm big on mapping in solo games so that would help
Simple and smart usually is the best
I guess simple and obvious*
But still, someone has to see it
well, I think it had more to do with the fact someone suggested it on reddit, so I made it and linked it there and it blew up overnight
Nice
normally I chuck it on the workshop and leave it at that
I figured itβs best to learn the vanilla game first before diving into mods
I can imagine thereβs a lot of good enhancements from the community
you might enjoy the steam powered generator, if you like the idea of using wood/charcoal for electricity
Sweet
Havenβt quite gotten that far out in my solo games yet, so Iβm not sure what kinds of electrical generation you can do unmodded?
just the regular generator, it runs on gasoline
Oh right
Okay, yeah seems like additional power sources would be a good addition
Maybe find solar cells on some houses or buildings
Or build a windmill
Steam is a good one though
I think someone on here was working on solar power - dunno if they ever got it done though
Apparently there was a working steam engine in the old Library of Alexandria before it got destroyed the first timeβ¦
Random thought
I've been tempted to do it myself but I don't really do pixel art; I make a 3D model and take isometric renders of it which gives it a bit more of a "Factorio" feel
But still, humans naturally gravitate towards steam as an energy source it seems
Would be a good and logical addition
Solar is pretty prevalent across the US now
how can I add noise tokens?
Could someone identify this log? I'm getting tons of errors while selecting any type of vests, and I'm unable to verify which mod is causing it (doesn't show up which one even in mod list)
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@957c2b63 function: render -- file: ISToolTipInv.lua line # 108 | Vanilla. [29-08-22 19:01:54.190] ERROR: General , 1661792514190> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor2044.invoke.. [29-08-22 19:01:54.190] ERROR: General , 1661792514190> DebugLogStream.printException> Stack trace:. [29-08-22 19:01:54.203] LOG : General , 1661792514203> ----------------------------------------- STACK TRACE
To anyone still having issues with a missing mod titled "Summer Car," it appears to be due to this mod having been removed from the workshop. I posted here about this a few weeks ago, but I've been getting messages from people asking if I ever fixed it.
At first it showed Night Vision Chuckled and Named Literature as reason of these errors, but it still appears even after turning them off, and only goes away after disabling all mods
There's other mods that have tooltips added in but I'm having trouble remembering all of them. I think one of Soul Filcher's mods does it, and Eggon's mod has some tooltips too
Idk if that's your issue, but I also had a bunch of issues with tooltips giving errors, or just straight up overlapping so I can't read them
Yeah, not using using anything from soul filcher's except for learning time, might try disabling it
Still weird that it doesn't show it as the reason
Really wanted to use Shark's uniform mods, but now that it requires Night Vision Chuckled, it breaks all vests in game
Well, anything that modifies tooltips seems to be messing up vests
Really weird
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@957c2b63 function: render -- file: ISToolTipInv.lua line # 78 | Vanilla function: render -- file: namedLit - ISUI_overwrite.lua line # 211 | MOD: Named Literature function: render -- file: eris_inventoryTooltip.lua line # 44 | MOD: Night Vision Chucked. [29-08-22 18:32:39.658] ERROR: General , 1661790759658> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor2044.invoke.. [29-08-22 18:32:39.659] ERROR: General , 1661790759659> DebugLogStream.printException> Stack trace:. [29-08-22 18:32:39.661] LOG : General , 1661790759661> ----------------------------------------- STACK TRACE
This is the log I get with Named Literature and Night Vision being the issue
Had the same issue a while back with Rosewood Fire Station spawn being removed from workshop, all saves were messed up
Thankfully I still had it on PC, so I just copied it to my mods folder
And I found the issue, if anyone has it, disable "Undo mask exclusion" mod, that's the cause of this problem
may isee a sample of this
What's the mod that returns tools to their respective bags once you're done crafting something?
hello can anyone help me with typical distributions?
i don't know how to really do them
best way to learn is to look at code from existing mods
I believe it's Tidy Up Miester
well i will try doing that
Great thanks!
one thing, i see a lot of poeple use procedulardistribution.lua but i would like to add item to corpses item pool, but this one is in distrbution.lua
okay i found a work around
but now
how do i make option for those?
like, i add a lot of plushies to game. A shiton in terms of zomboid, but i want to give choice if you want them to spawn or not
anyone could help me make a function/option to disable them from spawing in world
Is it possible to get an item from the player's inventory through it's DisplayCategory? Or make a custom item type?
what do you mean exsacly?
Like clothing has Type = Clothing
But when I write my own type in an item's definition I get errors
display category is one thing
type is strict
I have a bunch of items in the mod and I want to filter through the player's inventory to get specifically those items
so you can display category = clothes
but you can;t
type = clothes
so don't change anything in type
Yeah but I only found getItemsFromCategory and getItemsFromType
so why not
getItemsFromCategory = YourCategory```?
I cannot declare a category it seems
Only DisplayCategory which doesn't work with getItemsFromCategory afaik
yea
i think its hard coded for 16 main sub categories
Oof
processSayMessage();
Though it sucks, what prevents you from looping through the inventory items and collecting the ones that fall under your category?
How do I add messages in the chat box, but in a way so other players don't see it?
How do I make a message appear above player and stay for longer?
The fact that it sucks lol but yeah I ultimately decided to do that
It be like that
is britas weapon pack and arsenal gun fighter not working rn?
Works on my machine
How to make messages in the chat box so that other players can't see them?
message in chat box:
-- At least 1 message required
processSayMessage(" ");
function My_FakeMessage (_Msg)
local _Chat = ISChat.instance;
local _TabID = 0;
local _Tab;
for i,tab in ipairs(_Chat.tabs) do
if tab and tab.tabID == _TabID then
_Tab = tab;
break;
end
end
local _FoundMessage = nil;
for i,msg in ipairs(_Tab.chatMessages) do
if (msg and not _FoundMessage) then
_FoundMessage = msg;
end;
end
local _NewMsg = _FoundMessage:clone();
_NewMsg:setText(_Msg);
_NewMsg:setServerAlert(false);
_NewMsg:setServerAuthor(false);
_NewMsg:setLocal(true);
ISChat.instance.addLineInChat(_NewMsg, 0);
end;
I found a fix for this issue
Ok so, I think my mod is basically done for now.
So that's nice.
Any idea as to how I can make a "submod" for patching BetterBatteries until they update?
Or perhaps I can wait on them to update-
Better question, is there a way to differentiate between a modded and regular recipe?
hey yall, im trying to add the mod called firearms b41. i only have one other mod with it. i'll show you the screenshots of what im doing in a moment. basically, when i add it, it says this:
-2 more
#mod_support is prob the place to ask
gilbz, what is your wisdom
haha wdym i have no wisdom
aw hush you have plenty
did you end up figuring out your battery mod?
For the most part
Stuck trying to differentiate between modded and regular recipes, but I dont know if thats possible
hmmm yeah idk if it is either
Can't check if it inherits from Base since most recipes inherit from Base anyways-
ahh yeah i was literally about to suggest that haha
Might just have to override "Remove Battery" behaviour entirely, but that can and will cause some incompatibilities
when do the recipes get added? if your mod fires first could you store the vanilla recipes somehow?
or you could literally have a list of vanilla recipes and check if it's not those lol. i know that's a super naive solution though haha
Might just have to deal with the incompats tbh
It's an easy patch on their end, they just gotta fix it lol
wait, idea
yeah no, just gotta deal with incompats for now
i found way
just made them rare
in normal spawns (houses etc)
in toy shop they spawn like other ones
am thonk
Here it is the finished mod thanks to all and the advice along the way i learnt a lot, it does work differently to Refillable Lighters but is inspired by it with the Empty Lighter item
https://steamcommunity.com/sharedfiles/filedetails/?id=2853797818
(also my first ever mod for any game) aha
What're its snazzy features?
It's not a recipe to refuel and it uses a smaller amount of delta
You can refill while it's equipped and before it destroys itself, that's when the Empty lighter logic kicks in and you can refuel that in the same way
It creates a new lighter for the cost it would to fill the original Lighter from the Empty Lighter
It runs the Craft animation, no sound yet. But i have some ideas for that
It finds the first Petrol type in the inventory for now it keeps the UI clean xD
@sour island Sorry for the ping, but do you know if it's possible to fetch the emitter that's used when you call PlayWorldSound ? I'd like to pause / stop it if possible
if sourceItem:hasTag("Barcodereader") then return true end
return not sourceItem:isFavorite()
end```
does anyone know how to add a custom item into hasTag?
I've tried ("ATTS.Barcodereader") or just ("Barcodereader") but none of them worked
yeah, you have to define Tags on the item
take a look at any of the in-game pens, they all have tags
also, tags are not module-qualified
Question my modded server is having errors with Clothing and dropping items to the ground. the items to ground is the big one every time an item is dropped to the floor it disappears
if you had read more of the conversation, you would have found that I did link it
damm i did the wrong one my bad im sorry, saw modding and went yup thats the one
Tags = SewingNeedle,
How's this look for a makeshift hand crank?
Thank you so much! I had no idea what Tags were for
pretty good, what art app do you use?
Aseprite
interesting, thanks
Yeye!
Should makeshift be essentially equal to regular or should it get a buff / nerf?
depends, what are the components you need for the makeshift?
@calm depot Thank you so much. Now it detects my custom item.
Apart from the icons does anyone know what the ui is comprised of
I suspect itβs just code with some pngs for the icons
Hey, so im messing with some code, how would i tell the code to use units of wire instead of full things of wire?
I don't remember if it's a drainable, if it's not, you can't. if it is, setUsedDelta is what you're looking for
Any idea why it wont let me craft it?
do you have a custom OnTest?
Does anyone have an issue with RCON where the message for the previous command is returned?
eh?
Not sure if this is a consequence of my RCON client.
I'm using MCRCON to perform tests using PZ's RCON utility.
what do you mean by "message for the previous command is returned"
If I fire two commands in sequence, the first command (if after connecting), returns nothing. If I fire a second command following that, the return message from the first command populates the next line in the console.
Both commands fire nominally however it appears as if PZ is returning the wrong order of executed commands by one.
nah, that sounds more like it's buffered and the buffer hasn't been drained
I would be inclined to blame your RCON client
yeah why use mc rcon
I'm asking the same thing. I should check the client first. Thought to ask here to possibly save the trouble.
well i shouldve clarified, how much of the ui is code and how much is png
Already answered? π
Everything not rasterable is essentially procedurally drawn.
So frames, text boxes, text input fields (mostly) is code.
I don't understand what you would do with the answer anyway. Say someone had found some hyper-efficient syntax to minimise the amount of code required to draw a dialog, that doesn't change anything
Quite a bit. Things like the clock, Moodles, and a couple other components are not modifiable via Workshop.
more of adding some personal flavour rather than destroying the whole thing
Integration.
what?
?
Whoops, sorry about the ping
RCON can be listened to by any software.
say it just used very high-def images that were several megabytes in size, the images would dwarf the code in terms of byte count. again, not useful information
Oh. Not talking to me? mb.
You can do a fair bit. My only suggestion for those who work on UI is to keep things open for extensions and some consistency with API design choices.
π
I had to deal with radial menu API from a mod today that's pretty locked down where it doesn't have to be. =/
Commission work.
For drainables, do I just do DuctTape=0.1 to only make it use some?
yeah i dont wanna remove anything or drastically change things just swap some colours and add some things to my liking
So you'd like to "CSS" the game's UI.
you can certainly try it, but I'm not sure if the recipe syntax will accept a float
It seems a large part of the commissions that comes through my market are either 3D models or UI-based extensions / additives.
UI stuff is king rn.
@crimson ore Study client/ISUI/ISUIElement.lua and then take a look at ISPanel.lua in the same folder. That's where all Lua-based UI code extends and those methods will get you started on what you want to do. π
ty ill have a look see
π
do you know how to open pack files
TileZed
also a question about the texture folder and texturepack folder
do they comprise the same textures or is textures just a collection of individual images
texture packs are a collection of one or more images, each image is an atlas
the textures folder is obvious, you can see what it is from browsing it
I would suggest you visit the tutorials section of the forum
i shall jump over there
Well, the hand cranks are done.
I just gotta figure out how to modify loot distribution now
So I can make the regular ones spawn rarely in, say, electrical-related areas.
@calm depot any ideas as to how I could go about this?
yep, poke through ProceduralDistributions.lua and perform table.insert operations into the appropriate keys
also, it's not really "areas", it's container types
heh, well that's a matter of personal taste
I guess "1" works
you can turn on LootZed in-game to inspect spawn chances
and also get it to re-roll a container's contents so you can get a feel for how often it'll spawn
what to do when .pack tool fails to output images
you turn off the computer and contemplate your life choices that have lead to this point
π am i doing the prefix wrong or what
how would we know?
I don't know what you're extracting, but if I leave it blank, it works fine
this is what i will do now
I need to find a way to make Better Flashlights compatible with Better Batteries
Only way I can think of doing it is modifying their recipes dynamically.
Is there a way to only get recipes from a specific mod?
Question for anybody else that uses Dynamic Traits. Any way to tone down the deadliness of catching a cold a bit? Kills you pretty quick in the mod.
Some of the folks I play with are pretty put out by how fast it can kill you.
I see
Thing is, they also have a recipe named "Remove Battery" for all of their flashlights
Would getScriptManager():getRecipe("Remove Battery") just return a table of both?
no, it will return the first one it finds
Knowing the game, that's probably the vanilla one.
sounds like it would be better to convince the mod author to clean up their shit π
If they're lazy they could always just make their mod dependant on mine
lazy? that's the best way
if you really want to go down this route, look at my Bic pen mod - it does this recipe shit for the skills journal mod
Oh trust me I wanna avoid it if I can
I absolutely loathe to do this sort of thing though
Man, I would love to see an in depth medieval armor mod, with different helmets and stuff.
I should probably see if I can remove it, hopefully the skills journal dude started using tags
Only thing I'm worried about is the Better Flashlights dude seems kinda inactive
you could alternatively release a separate mod that depends on his and patches it
How would I do that?
Like, if I can patch it in a seperate mod I might as well do it in the main mod-
Unless it's just copy pasting scripts with minor edits
well, the point is separation of concerns
why should your main mod care about another one that not everyone uses
it also spares people from unnecessary updates to the main mod
if it works and you've done what you set out to do, why not?
worrying about other mods is what we call scope creep π
I'm actually somewhat familiar with that term from game dev
Always pleh to deal with
oh it's absolutely not a term that gamedev owns
Oh nono I'm not saying it's exclusive to game dev
I'm just familiar with it because of game dev
Anyhow, time to try and figure out how to upload mod
Oh wait I should prob work on a proper description and like icon-
in my game I recently made a bunch a spears, and I wanted to trash the poor quality ones I made by using them as fuel. I noticed I cannot add a spear as fuel to a grill. (I assume fire based things is the same)
I also notice there is no mod for one. Any know what files I'd need to update to allow it to be a fuel source?
recipe?
no, I want to right click the grill or other fire related thing, and add spear as fuel. Like I can with books and twigs
maybe tag
better that way
it would be, but I dunno if they tagged wood items like they did for petrol
are zombie IDs on the server the same on client?
given that they have to synchronise between the two, I would imagine so
I'd check myself but I haven't figured out where in the library I can get that info just yet
I had assumed NPCs.UI but I think i'm up the wrong tree here
maybe you should check out ProjectZomboid\media\lua\server\Camping\camping_fuel.lua
That does look like what I'd need to modify. Basically any where it says twig, I'd have to change it to also allow spear with probably the same stats (or less since it got whittled down?)
yes, give it a try ππΌ
would you know the item file location that lists the item names so I am make sure I am adding the correct name
all items are in media/scripts distributed across a few different files
you can use Notepad++ for searching through multiple files
currently working on trying to figure how to make the mod using https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/structure/README.md as guide, but it doesn't really talk about packing it up for workshop
there's an example mod that comes with the game
Anybody know a good bit about mod data?
you mean modData ?
Ye
it's just a lua table
Lua tables go br
One of my values isn't saving
I assume a square doesn't fit
for moding ProjectZomboid\media\lua\server\Camping\camping_fuel.lua in my mod. Do I only include my changes i.e. to campingFuelType, or would I replace the contents of the entire file. Not sure if I need the Delta from basemod of I just need to overwrite
I NEED ITTTT
at least not a tis cake
Evolved recipes: Literal headache inducing MADNESS
Fuuuck this shit. Been at it for hours trying to debug some nonsense
in the same lua state meaning my code would only overwrite campingFuelType (element?) and the rest of the things in that file would still be loaded even if I don't include them in my mod
write a script that require's the file you're patching from the base game and override/wrap the functions as needed
Is there a way to make changes to a base game item's evolved recipe parameter value with a mod that isn't ItemTweaker?
Is there a function that allows me to make the player speak similar to the Conditional Speaking mod? or am I going to have to dive into the source code for that mod?
I don't know what that mod does - there are functions to play sounds, there is no text-to-speech built into the game if that's what you mean
I understand what you said, but I am not sure I understand how to do it the best way to implement my change.
I want to add 2 lines to \media\lua\server\Camping\camping_fuel.lua
If rename it so something like <ModNamehere>-camping_fuel.lua it wouldn't get called. If I simply overwrote camping_fuel.lua I suspect it would work but would not be the proper way. If I made a media/scripts/ script. I wouldn't know what do in order to get my ModNameHere script to get called instead of camping_fuel.lua.
Ultimately I want to add:
BaseballBat = 1.25,``` to campingFuelType
scripts and lua code are two entirely different things
when creating a mod, you can name your lua files whatever you want, the game doesn't care
ditto for naming script files
I am following a guide from blackbeard (on youtube) on how he created a mod to add nuka cola. That works for items, but not sure how to implement a pure lua change
Sorry, lemme rephrase;
Is there a way to make the player say something like they would when they type something in local chat? Similar to this image;
well, you only put in a lua script and nothing else
that's about it
@thorn bane yeah, look at how the game does sneezing
i feel stupid, completely forgot about this mechanic
thanks!
Should my lua script be named \media\lua\server\Camping<ModNamehere>-camping_fuel.lua
Or does it not matter?
I just want to ensure campingFuelType function or whatever it called if overwritten with my mod
it doesn't matter, the file names are completely arbitrary
the game just loads lua files into the lua state and executes them
that goes for vanilla game code and your own
ok that makes sense
Iβve recently been working on a massive mod for my server.
Iβve been getting a error for the mod saying.
IP.Transfer not reachable.
Any help?
Dm me for more detail about the mod
@calm depot Mod is working as intended, thank you
Do Weapons have some sort of scale value? I don't see any in the game files, and the model I made is just massive.
They do
it's in a .txt file
Called staticmodels iirc
or worldmodels
There you define the model and you can define the scale too
model ModelName
{
mesh = mesh/directory/here,
texture = texture/directory/here,
scale = 1,
}
An example
peeking through items_models, I don't see the scale value for spears anywhere
Does anyone know if one can create a sound emitter?
I am back to the 0 here, I really need a way to stop a sound emitter and I couldn't find a possible way to do it when using PlayWorldSound
Hecc
Yeah I am giving up
I don't think it's possible to add a proper jukebox mod atm
Too many issues with sound emitters
Can't create an emitter, can't make a radio apparently and even if I could, can't mod the interface so it'd be ridiculous. And PlayWorldSound completely ignores volume, loop, etc. and doesn't return any emitters or transmits it to the OnWorldSound event
Funny that people complained about this 6 years ago and the devs never addressed it
Everything about that sounds painful
I managed to make it work, but it has too many little issues that make it unusable to the public
There's no way to adjust volume, radius, set the sound to loop, stop the sound, pause it, nothing. So you either play it in full or you don't
I feel like there's gotta be some way- you considered consulting True Music's code?
They figured out something that works well enough.
I wouldn't doubt you have already, but it doesn't hurt to check.
No because they use tsar's lib and their disc player is broken
Ah.
So basically it's just a modded car radio... on a car.
So it doesn't even apply to this use case.
Idk I tried it like a month ago and it was still broken
@calm depot https://steamcommunity.com/sharedfiles/filedetails/?id=2856184689 Ty sir it is done and published
@heady crystal well, if you particularly want to use the mod, this fixes it up: https://steamcommunity.com/sharedfiles/filedetails/?id=2809787779
That reminds me, I had an idea for searching couch cushions.
How painful would something like that be?
a bit awkward, you've have to change the tile definitions for all the couches
oh, if you want to fake it so that it uses something that's totally separate from the real container logic, sure
Cuz I imagine it'd be as easy as making a small loot table, adding a context action to whatever tiles are counted as couches, randomizing some items when you interact with the couch for the first time, then just pull random items / occasionally fail from there.
it isn't, it won't
Agony
oh, you don't mean the game's loot table
Yeah I mean a static one
yeah, you can do that, but you'll need to also either roll your own UI or cannibalise the game's one for picking out items
I'm just thinking it'd be like
- Right Click Couch
- Check Couch Cushions
- Roll random number if we get an item, then roll a random number to see what item.
- Make the player say something according to what happened
- Give the player the item if it was obtained
- Remove item from couch's current loot
ive extracted the images from a pack file now how would i put them back into its original state so its read by the game?
i tried the .pack tool but cant figure the create a pack out, is there a link in one of the channels here
there's a tutorial on the forums for working with pack files
the indie stone?
@quasi kernel OK, that's relatively trivial if it's just one item. very doable
Yeah I'm just thinking we generate a random "storage" for a couch when you initially interact via modData, then you just grab from that storage one at a time.
Primitive, but less intrusive I imagine.
Good evening / morning.
Hihi!
not sure I'd even worry about storage; just set an isLooted flag
or if you particularly want a couch to have a few runs until it's empty, give it a counter to decrement from upon the very first loot action
yep, no need to give it an actual inventory - players will never know the difference anyway
I periodically see people posting questions about projects or commissions here so if someone sees this and needs work done for server or personal mods, feel free to DM me. I also run a market for people who do the same thing so DM me if you want a link to that.
(LFW) π
a market?
A simple thread setup with rep channel for people to post projects or small jobs for people looking for that sort of thing.
It's a part of the network / org server I'm a part of.
People already posted work and some of that work is already completed too.
couple of questions
where did the items from the couch initialy came from?
if its from you then lost it there right?
and idk how you implement a cooldown on recpes
players might just roll it again and again and abuse the power of the couch
whats this? islooted? is this an exisiting code or not yet
Theoretical modData
im not familiar with timer mod can you giv eme an example ? lets say you can only interact once a day
or you have to wait 24hrs or somethign
im such a newb but in theory its probably like this ??
local function ISlooted()
return
if not ISlooted() then
performLootAction()
end end
if timer = timer then
local ISlooted() = false
end
end
local function performLootAction()
getPlayer():getInventory():AddItem("thread")
end
or am i waaaay offf?
Also, for ref, I don't really need a cooldown since there's finite items in the couch anyways
But to entertain the idea, we'd likely have to find a time value that is affected by game time.
SendCommandToServer(string.format(""/servermsg" .. getPlayer():username() .. "took from the couch!""));
and to send the msg
im so not sure if thats correct lol
When I subscribe to a mod if im using a laptop and go to my pc, will all the mods I've subscribed download themselves once steam boots?
I believe so yes
How does one translate recipe names?
Nevermind, it's already formatted for you, you just have to match up the names.
Okay so better question, is there any particular reason why the action keeps playing even after it's completed with a custom TimedAction?
It's specifically the animation, everything else works perfectly fine.
for custom outfits
can i use itemGUIDs from other mods
or do i have to create my own
<probability>0.3</probability>
<itemGUID>bd83cfe9-e3c9-4281-be7d-f2a054c94a5c</itemGUID>
</m_items> ```
Do I have to upload to the workshop in order to test my mod? Or can I load it in locally
create your own. just use any GUID generator. using one from another mod kind of defeats the purpose of GUIDs
thank you, ill try that
Hi, someone have fix for Cannot create recipe for this movable item: Base.MandoDBPoster ?
My code :
module Base
{
item MandoDBPoster
{
Weight = 0.2,
Type = Moveable,
WorldObjectSprite = oxum_posters1_01,
DisplayName = MandoDB Poster,
Icon = Poster,
}
}
But im referencing the same item
Cant i just use the GUID provided byvthe mod
oh I see, I thought you were making one for your own item. yes in that case I think it is appropriate to use the existing GUID. I don't think it is possible for the item to have 2 of them, one for your mod to use as a reference, and one for the existing mod to use.
dope
Regarding step 3, what is this cached directory for?
I went and put my file here but it didn't show up in the game's mods menu
am i missing a certain step π€
Train mod, me want drive big loud metal choo choo
I get this error when I click to open the items list.
This happened after I added a new recipe and items
ERROR: General , 1661873204273> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: missing argument #1 to 'sort' at KahluaUtil.getArg line:380.
ERROR: General , 1661873204273> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: missing argument #1 to 'sort'
at se.krka.kahlua.vm.KahluaUtil.getArg(KahluaUtil.java:380)
at se.krka.kahlua.vm.KahluaUtil.getStringArg(KahluaUtil.java:330)
at se.krka.kahlua.stdlib.StringLib.sort(StringLib.java:1501)
at se.krka.kahlua.stdlib.StringLib.call(StringLib.java:130)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
at zombie.ui.UIElement.onMouseUp(UIElement.java:1228)
at zombie.ui.UIElement.onMouseUp(UIElement.java:1183)
at zombie.ui.UIManager.update(UIManager.java:809)
at zombie.GameWindow.logic(GameWindow.java:261)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:764)
at zombie.GameWindow.run_ez(GameWindow.java:680)
at zombie.GameWindow.mainThread(GameWindow.java:494)
at java.base/java.lang.Thread.run(Unknown Source)
Does anyone ever seen this?
It should be in
[Your pc name]/zomboid/mods
Not the installed location
you propably made a typo
KahluaUtil.getArg
line:380
Check this one
Can't find it
Yeah, got it working
Thank you!
Is it possible to have a vehicle that runs on electricity and not gas? I am not super familiar with the code limitations for vehicles, but would love to see about implementing a way to build an electric bike
https://github.com/mxswat/pz-mxbackpacks full repo with current issues
Nope, does not affect the result
There is something wrong in here:
item Bag_MedFannyPackFront
{
DisplayCategory = Bag,
WeightReduction = 50,
ClothingItemExtra = Bag_MedFannyPackBack,
ClothingItemExtraOption = FannyPack_WearBack,
clothingExtraSubmenu = FannyPack_WearFront,
Weight = 0.2,
Type = Container,
Capacity = 1.5,
DisplayName = Medical Fanny Pack (Front),
Icon = MedFannyPack,
IconsForTexture = MedFannyPack;MedFannyPack_Red;MedFannyPack_Blue,
OpenSound = OpenBag,
CloseSound = CloseBag,
PutInSound = PutItemInBag,
BodyLocation = FannyPackFront,
ClothingItem = Bag_MedFannyPackFront,
CanBeEquipped = FannyPackFront,
RunSpeedModifier = 0.98,
WorldStaticModel = FannyPack_Ground,
}
On the left is the vanilla fanny bag
and fanny bag works?
Yeah
trying
Nopr

Oh
wait
Capacity = 1.5,
π
Apparently I can't put 1.5
only an integer
go with 2
iswtg this is bullshit
casual zomboid things :D
Why can't I put 1.5 π
Zomboid Moment β’οΈ
RIP.
I swear I hate non-standard files so much, why is this not yaml, or JSON or anything common

Is there a way to remove a recipe?
I found a way to make Better Batteries compatible, even if it's a bit lazy.
replace that recipe txt file with a file with an identical name but no recipe
This tool is great for creating mod cover images. No skill required.
https://www.adobe.com/express/create/logo
Better use this app instead of using the TIS default image 
How do I make sure that updating local mod reflects the changes in the game I'm playing in
Do I need to disable and re-enable it?
If your mod is published on the steam workshop, unsubscribe that mod
test your mod in -debug mode
I'm not sure if my changes are taking effect since it's just a weapon mod and I'm tweaking the damage and stuff
and reload lua
click the button at the bottom right corner on the main menu screen
also depends on what your mod can do
Just a mod that adds a weapon(s)
reloading lua should do it
also when pausing the game with ESC key, you can see your active mod list
thank you π
Won't that require me literally re-uploading the entire mod..?
I'd prefer not doing that if I can-
just include that single file in your mod
I don't see the bigger picture of your mod though
maybe what I understand is not what you are trying to do π
I'm wanting to add a specific tag to all of the flashlights of another mod, add them to the base game "Remove Battery" recipe, and remove their custom "Remove Battery" recipe
I guess if you want to add compatible support like this, you may have to put those mods as requirements to ensure loading order
but I may be wrong, if there are other ways to implement this
I think you can require iirc
Yes, but that will require the users to subscribe to those mods even if they don't want to
if you are willing to do that, I believe replacing recipe txt files with removed recipe txt files with identical names can do the job
If I drastically increased the damage of the weapon (just to see if there's any difference) and nothing changed even though I reloaded the lua + tried closing and reopening the game, what's going on
vanilla item?
Modded weapon
Been troubleshooting for the past 1.5 hours to little success
Maybe it's because I need to start a new game/scenario or the mod values don't update?
could be
Heck, am I not able to just check if the mod is installed and modify the recipes from there?
too advanced for me. I have no capacity to help π
you should be happy that you found the cause π
could someone help me?
I would if I could. what's your problem?
good idea
i wonder if its possible to change the loading screen to a custom one
Do you mean the main menu screen or the black screen that display texts "this is how you die"?
hmm, no idea. never see anyone doing it
do you know where can i find the black screen on files?
thanks, i wish i could make an old pics on my server's loading screen
but you can change those texts on the loading screen
ikr
yeah you can. although I didn't read your entire convo you were having, incase im missing something
if (getActivatedMods():contains("Hydrocraft")) then
-- code to manipulate recipes
end
Will mod load order affect things or should I be okay?
There's technically loads after mine, but their scripts point to a diff function that I can probably modify.
And would a sub-mod be overall better or just complicate things?
so scripts should all be loaded before lua stuff, so won't be necessary, unless they are also manipulating the recipes in lua code. If it is just like and Oncreate or Ontest that is belonging to a recipe, you should be able to just overwrite their function if you want to.
That's what I figured
Regarding scripts, must recipes and weapon stats be on separate txts? Or it's ok to put them in the same one as long as they're probably denoted?
nah you can put them all together tmk. I think it's more of a modders preference how to organize them. There isn't any technical need to seperate them TMK. I've seen people separate into items files or recipes files. or putting related recipes and items together so maybe you have a big mod. you have all your farming related items and recipes in one txt. then all your clothing related stuff in another etc.
Thanks
Yeah I personally rather have it all in one place π€
Is there a way to get an item from it's FullType?
Think I found it
ScriptManager:getItem()
Hi all! I've got something that has me perplexed with my first mod: Is it possible to make an attachment for an item that is NOT a weapon or clothing? I want to be able to attach one electronic item to another without having to make a separate model of the two conjoined objects (like the spear weapons) to save on memory, similar to the way you'd put a scope on a gun. Do I have no other way of doing this besides making a recipe for a separate model with its own separate texture? I couldn't think of or find any items I've encountered either in the base game or the workshop thus far that let you do something like this.
If you really want to avoid the Recipe route, I believe manipulating Context Menus and ModData is your best bet. @vagrant rampart
Hello fellow modders, I am wondering if it's possible to add a custom moderator role with limited commands to my dedicated multiplayer server. I do know about each role such as Admin, Moderator, Overseer, GM, and Observer. I also read the forum post about it which someone stated that we will be able to customize it in the future. Going back to what I said, is it possible to make a mod specifically for making custom moderator roles right now?
Hello. I primarily modify the core of the game which allows me to do such things. If you're interested, let me know.
would I be able to change zombie speed from server script? π€
Would it be possible to override the death animation? So I could create new ones for specific deaths?
Anyone know about
getServerOptions():getInteger("ResetID")
DDoes it work in shingle player?
One mod I want more than anything is to be able to actually pull engines out of cars, rebuild them with different selections of parts that modify its properties (horsepower, quality) and possibly the transmission as well to change things like number of gears or type of shift.
Seems so obvious that the fact it doesn't already exist and people live with the boring "spare engine parts" mechanic tells me its probably not possible with the current code.
Am I onto something?
I dunno, I think that might work
How can I add a new retextured crate to the game?
I know how to add clothes and how to code, but never worked on furniture
Tilesheets in .pack files
No lua shenenigans? π€ What if I don't want to retexture it π€
Then, what is it you want to do
I'm looking to do the following, you pickup a container as example the Green_Wall_Locker and thanks to a Recipe, you can turn that container into a specialized container who has 50% more capacity, but can only get one kind of on item, eg: Ammo
I'm already doing this for some bags, and backpacks, but I need to do it for furniture too
yeah, you'll need to create a new tile definition
if you're not recolouring it or anything then you don't care about the texture pack
unless things have changed, there is sadly no lua API for changing container size
Oh, damn.
If I want to use the texture pack, Can you pass me an example or send me a guide?
see my Craft Metal Drums & Rain Barrels mod
I added custom metal barrels that can be used as storage
(and also a recipe for turning them into drums with the lid cut off)
Dude I will kiss you one day
Thank you
I assume I need to use an external tool to edit 2744974916\mods\CraftMetalDrumRainBarrel\media\tiledefinitions.tiles right?
TileZed
Alright thank you
so, external, but also official
Oh very nice
you can just download the PZ modding tools on steam to get it
I will thanks!
Is there a way to read a player's ping?
anyways, was a way to define multiple textureLights for a vehicle, based on the skinIndex found?
@sour island getServerStatistic() will return everyone's ping, but I suspect the server will boot you for querying it if you're not admin
see client/DebugUIs/DebugMenu/Statistic/ISGameStatisticPanel.lua
well, admin/privileged to some level
isoplayer has a getping apparently
so it does - I imagine that'll be the ping from you to them, rather than them to server
