#mod_development
1 messages Β· Page 14 of 1
are you talking about searching arbitrary strings in the java source code? I think IntelliJ does not index .class files decompiled on the fly so they won't be searchable, hence why you have to do the manual step beforehand ><
for reference, here is the command I used on macOS
java -cp "/Applications/IntelliJ IDEA CE.app/Contents/plugins/java-decompiler/lib/java-decompiler.jar" org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler path/to/source path/to/dest
Good afternoon.
night night
I use fernflower, which is the same core that's ran as a plugin for IDEA.
Since 2011-2012. π
Minecraft days.
oh nice, I'll look into it thx
oh looking at the contents of java-decompiler.jar, it looks like it's just fernflower so I think we're using the same thing ^^
Is there a Alexandria Community or any Community mod?
Yes. This is what I meant.
IDEA took over the project a while back and packaged it as their decompiler tool.
haa gotcha
https://theindiestone.com/forums/index.php?/topic/24408-how-to-create-new-vehicle-mods/
gearRatioR = 4.7,
gearRatio1 = 3.6,
gearRatio2 = 2.2,
gearRatio3 = 1.3,
gearRatio4 = 1.0,
Where are these vehicle values derived from? Are the values given in this guide the default? I notice only three vehicles (vehicle_car_sports, vehicle_car_sports_ez, vehicle_car_normal) even have them defined. So the other vehicles must be getting them from somewhere, but a Find in Files search doesn't return anything usefulβother than that these are the same values found in vehicle_car_normal, is that file like a template for all vehicles?
A bit of help needed...
If I set
pl:clearWornItems();
the character's starting clothes worn by the character are removed and moved to the main inventory ( In brief the character remains naked ).
What I have to use if instead I want the starting clothes completely removed/deleted so that they will not show up in the main inventory?
you could just call RemoveAll on the players inventory to clear it
What mods have vehicle definitions aside from fhq-Vehicle Spawn Zones Expanded, Skizots Vehicles Spawn Zones in the Riding Mower mod and Tread's Military Vehicle Zone Defs?
Yep but I need to remove only the starting clothes and instead " remove " delete any clothings from the inventory unfortunately ( Thanks for the help mate somehow π )
Not being able to use an Exoskeleton and a Exoskeleton Power Suit in Stalker Armor Pack? use this:
https://steamcommunity.com/sharedfiles/filedetails/?id=2851814587
is there a better way to wait for a different mod's lua file to run than changing the filename to later in the alphabet?
looking to see if anyone could make me a mod
@winter boltMaybe be able to help you
okay thanks
I also might be able to help!
which one that you picked?
Dynamic if you are using other trait mods
Vanilla if you aren't
Guess i missed that both are toggled on at the moment, but it doesn't seem to be causing any problems
or wait no sorry
I use dynamic, and dynamic means that traits come and go depending on health conditions.
Was thinking of a different mod
for example, if you go to bed well fed you are restful, and require less sleep. but if you go to bed hungry, you are restless and require more sleep
hope that helps
People usually enable all the mods available when the workshop comes with multiple optional mods. π
Anyone have experience adding modded maps to PZ server on Apex Hosting can help me?
Then I suggest not using clearwornItmes(). Use getWornItems() to get a list of the items you are wearing, then just use removeWornItem to delete them, of if you need to unequipt them first, then delete them, do that
if you want a file to run later, use the require statement to state which file you want to run before it. If it really is a situation where you need it to run after all other files, then renaming it is probably the easiest way to get it to run after all other files from the same mod. If you Need to run it after literally all mod files, including other mods, then I would put it all in a function, then add that function into OnGameBoot
awesome that makes sense, thank you!
How to set the cooldown for an item? Allow the player to use an item once every 5 minutes.
i've made the item wet and use the wet cooldown, its how my item is supposed to function though. i'm sure there is a diff way without using wet though
Could you please give me your workshop link?
{
Type = Normal,
DisplayName = dirtysoap,
Icon = dirtysoap,
StaticModel = dirtysoap,
WorldStaticModel = dirtysoap,
Weight = 0.5,
Wet = TRUE,
WetCooldown = 30000,
ItemWhenDry = Soap2,
}```
it be something like this
10000 is the default value for a wet towel so i just upped it to 30000 but i think that's around 10 min real time, so you have to play around with it.
{
DisplayCategory = Household,
Type = Normal,
DisplayName = Wet Bath Towel,
Icon = Bathtowel,
Weight = 0.5,
Wet = TRUE,
WetCooldown = 10000,
ItemWhenDry = Base.BathTowel,
WorldStaticModel = BathTowel,
}```
so these are different items
{
Type = Normal,
Count = 1,
Weight = 0.25,
DisplayName = Soap2,
CantBeFrozen = TRUE,
Icon = Soap2,
ReplaceOnUse = dirtysoap,
StaticModel = Soap2,
UseWhileEquipped = FALSE,
WorldStaticModel = Soap2,
}```
this would be the first item which gets replaced on use with the dirtysoap item just as an ex
okay, I get the idea now, but not sure if WetCooldown can be used for any items
yeah that's why i wasn't sure if it be applicable or "realistic" enough for what you are doing, i think as long as it is a normal item it should be okay though
what are you trying to make?
np
you could always just use something in the mod data, then use canperform to check the moddata to see if that item is valid to be used
then just need some extra stuff to modify the display name to show it can't be used
Thanks mate I'll try. I was already experimenting with something similar ( but I was testing using getWornItems+remove ) and not removeWornItems as you suggested. Again, thanks mate π
Hi guys,
I don't know if this is the chat, but here I go.
How do you see the idea of two scripts with the following functions?
- Script that spawns vehicles in different zones randomly so that the map does not run out of vehicles.
- Script that checks if there is an updated MOD and restarts the server with warnings and a countdown.
I have developed them for my server with PowerShell for Windows.
1 - good for gameplay but may be bad for the economy of server
2 - there are some mods that can do this but cause data loss for some servers. The script may need to kick the players before restarting the server to avoid the problem
In my case the script has a countdown of 10 minutes so they can exit
they won't lol
is their problem :V
riko make me a mod
Im doing a /quit command with the save option, that cause data loss too?
I just happened to see that this problem is real. You may or may not experience this.
people will abuse this to farm firearms
well, ill make the script kick all the players xD
make them not drop any firearms

not cool then
but funny
@cosmic condor
@cosmic condor tested and it works
Warning message with a countdown
then kick players
and finally restart the server
its basic but it works
that's cool. congrats! π
thanks for your idea and info ^^
You should post the template for others to use.
Good system
Isn't there a mod for ai? And can't there be friendly and enemy?
there is. search for super survivors
Oh cool thanks!
if i make a recipe with the same name as vanilla will it override like for items?
Hi, I have a problem with a Tile I have created. I've been trying for 6 days to get it to work in game, but I can't get it to work. Can someone who speaks Spanish help me? My English language is bad but I can try!
nope, either mark them both and then explain in the description, or mark neither and explain in the description lol
wouldn't that be nice lmao
can i conditionally include a recipe depending on if another mod is present in a script?
they're just LUA but not marked as LUA right?
so
theoretically i could just do one that has a require() statement?
or i guess a if not X then return
I added some maps to my modded server and a lot more zombies are spawning naked more than normal anyone know why is that happening?
anyone down to make a simple mod for me
SIMPLE?
if it really simple you can just ask how to create one here π
I can assist
but if not really simple then I can't help
yeah i just want zombies that fire rockets out of their toes
and have swords for teeth
lmao
okay end of the talk
sup riko
π€£
i was thinking i just want it to play an audio file when using beta blockers
that's super easy
idk anything about mods
other than how to juggle them
if its not hard then ill dm you when i wake up and you can assist?
or whenever we are both on and free
im passin out
me too
ya, hit you up on the flip?
then we can make the "zombies use firearms" mod as planned
nie nie
i just made a fork of a recipe mod (with permission) and added a few things, nothing that should break anything as long as i followed syntax (and i checked it..) and yet i'm getting wonk errors when u load up a game and failures when i try to open the crafting window
attempted index: getFullType of non-table: null
LOG : General , 1661105117135> -----------------------------------------
STACK TRACE
-----------------------------------------
function: populateRecipesList -- file: ISCraftingUI.lua line # 1093 | Vanilla
function: createChildren -- file: ISCraftingUI.lua line # 969 | Vanilla
function: instantiate -- file: ISUIElement.lua line # 653 | Vanilla
function: addToUIManager -- file: ISUIElement.lua line # 1009 | Vanilla
function: createInventoryInterface -- file: ISPlayerDataObject.lua line # 157 | Vanilla
function: createPlayerData -- file: ISPlayerData.lua line # 187 | Vanilla
ERROR: General , 1661105117135> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getFullType of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1661105117135> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: getFullType of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
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.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:134)
at zombie.gameStates.GameLoadingState.exit(GameLoadingState.java:398)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:105)
at zombie.GameWindow.logic(GameWindow.java:297)
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)
LOG : General , 1661105117135> -----------------------------------------
STACK TRACE
-----------------------------------------
function: populateRecipesList -- file: ISCraftingUI.lua line # 1093 | Vanilla
function: createChildren -- file: ISCraftingUI.lua line # 969 | Vanilla
function: instantiate -- file: ISUIElement.lua line # 653 | Vanilla
function: addToUIManager -- file: ISUIElement.lua line # 1009 | Vanilla
function: createInventoryInterface -- file: ISPlayerDataObject.lua line # 157 | Vanilla
function: createPlayerData -- file: ISPlayerData.lua line # 187 | Vanilla```
LOG : General , 1661105138274> -----------------------------------------
STACK TRACE
-----------------------------------------
function: @stdlib.lua -- file: null line # 10
function: setVisible -- file: ISCraftingUI.lua line # 30 | Vanilla
function: toggleCraftingUI -- file: ISCraftingUI.lua line # 1368 | Vanilla
function: onOptionMouseDown -- file: ISEquippedItem.lua line # 390 | Vanilla
function: onMouseUp -- file: ISButton.lua line # 56 | Vanilla
ERROR: General , 1661105138274> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: 1.0 of non-table: null at KahluaThread.tableget line:1689.
ERROR: General , 1661105138274> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: 1.0 of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:492)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1243)
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)
LOG : General , 1661105138274> -----------------------------------------```
my assumption is that the latter errors are due to the former since the first is probably choking on a recipe
and not loading everything up
gonna go poke around in the vanilla code and see if i can narrow down what might be broken but if anyone has run into this lmk
so a result item isn't workin' out
do i need to preface a reference to something in Base
even if i import Base?
cuz that'd do it if i do
gonna guess that's it.
mm the originals don't do it tho
where's your script?
there's four of them
ill uh
post them as files ig
got permission a while back to make a VFE version of Kitsune ammo craftin mod
so im doing that, plus an addon for my PPSh mod
most of the content is the same as the vanilla version of Kitsune ammo crafting
just added ammo and mag crafting recipes, and new calibers added to the gunpowder gathering recipe
i did rename the gunpowder gathering one to match the original recipe since i want to override it
is that.. a problem to try to do?
that one is in misc
why do you have many modules?
based on the original modder's structure
they have three separate submods to let the users pick whether they want ability to craft ammo, mags, and/or the misc
and then the final one is included in a separate mod for my PPSh gun
as a submod
Is it possible to modify the capacity of vanilla objects such as crates or lockers?
i have a question, is there a way to spawn a car without it's parts.(without tires, car door, etc) only it's body remain?
well, this is weird. Your scripts break my other mods too lol
magical isn't it?
i wish the script parser didn't have shit for output when it fails lol
debug logs run like crazy
yeah but it's all just pointing at vanilla code that parses it
no line references in the scripts
looked at the vanilla code
seemed to fail because it couldnt find the full type for some result of a recipe
but i can't find a mistake
well, I don't have these items
I wonder if loading order can cause the problem
a modified mod based on two other mods, this is hard π
some of that isn't even in these scripts
nothing about a vz58 for instance
that looks like brita's shit
the scripts i sent depends on Vanilla Firearms Expansion
and UdderlyAttachments->UdderlyGuns: PPSh-41 SMG for the last one
no, you can have multiple different recipes with the same name, so just making a new recipe will add the new one. There are some tags that seem like they are meant for manage overwriting recipes but it doesn't really work that well. much easier to modify recipes through lua by modifying the recipe through the recipe manager
I don't think you can do that using the txt scripts to add recipe,but you can do this if you are creating the recipe through lua
I can't find any info about it one way or the other, nor any clues in the scripts or lua code I checked. Anybody know?
I believe you can. You would have to modify the base games tiles for those storage devices
Guys, is there a tutorial that explains how to add containers to cars? I want to add an extra container inside the ambulance but I think I'm skipping some step
you can do it on a script on access of the container too
but that's a little janky
But where are those base tiles stored? Am I blind or what?
so it happens with just the ammo recipes installed
and i only added two things to that
{
GunPowder=6,
keep [Recipe.GetItemTypes.Hammer],
keep Wrench,
Result=22Bullets,
Sound:Hammering,
Time:5.0,
Category:Firearm,
SkillRequired:MetalWelding=1;Reloading=1,
}```
and
{
GunPowder=25,
keep [Recipe.GetItemTypes.Hammer],
keep Wrench,
Result:762Bullets,
Sound:Hammering,
Time:5.0,
Category:Firearm,
SkillRequired:MetalWelding=4;Reloading=4,
}```
i.. do not see anything that would make it choke
you could add some print statements, so you can figure out exactly which recipe it is reading when it freaks
the calibers here are from VFE but it puts all its shit in module Base{}
in the script?
so u can execute random lua in there?
no I mean where it is causing the lua error
i mean that's in vanilla, but ur right there's no reason i can't do that
that's a good idea
lol
strategic print statements are the OG debugger
is your mod adding any new items? or just recipes using existing items btw
because the message was that it couldn't call getfulltype on some item, so it seemed like some item is missing from your game, which is in one of your recipes
so there is a mod involved there
i made sure that the names were correct
and that VFE is loading first
maybe double check all the correct VFE mods were activated
maybe i accidentally edited a VFE script while i was poking through it..?
might be worth checking
easiest way to fix is probably to unsubscribe, check its gone, then resubscribe
ok so i fixed VFE and that let an actual error come through
ERROR: General , 1661111618140> DebugLogStream.printException> Stack trace:
java.lang.NumberFormatException: For input string: "22Bullets"```
it tried to parse it as a goddamn number
not sure why, since the original mod had 556Bullets and did not have this problem ._.
slaps "Base." on the new additions to see if that helps
actually i wonder if my log line is somehow causing that
yeets that
i figured it out
i wrote Result=22Bullets instead of Result:22Bullets
:)
seriously TIS please, please add syntax checking for the scripts
:|
a single = sign should not stop the entire crafting menu from appearing
and a line number in what file would be fantastic
Quick stupid question
When you do a mod that requres a file from another mod
And this other file also requires a mod
Do I need to require the requirements too or not?
Lets say, file A requires file B. file A has a function I wanna use, so, on my file C, do I need to only require file A or do I also need file B?
yes and no.
yes in that, if your mod A is dependent on mod B and mod B is dependent on mod C, You need to have both mod B and mod C for your file to work.
no in that, if you are simply talking about the require statement in lua, if file B already has the require(fileC), you only need to do require(fileB) in file A. when your file A runs the statement require(fileB), it will run/retrieve the cache of the result of file B. And when executing file B, it will reach the require(fileC) in file B, which will then run/retrieve the cache of the result of file C.
Got it
Just for context, I am trying to make something to trigger the Expanded Helicopter Events. And EHE has like a TON of files haha
But I think I am doing it right as it is right now
Prevent your script to run if the required mod is not activated.
then require the other mod file you want to load FIRST (before your script).
add require=TheRequiredModID to your mod.info
if not getActivatedMods():contains("TheRequiredModID") then return; end
require("TheRequiredModFilePath")
What's the first thing to do, in order to start creating mods?
try to find if the mod has already been made/similiar mods
Can not find a Changed/Puro mod.. so. That's a start. But I don't know if there's much of special infected or changing the look of the zombies in general.
But I haven't really looked that much into it.
Not 100% noob tutorial but may help also is incomplete for now
Also this is focused on the lua side of modding, explains load order etc
https://gist.github.com/Konijima/7e6bd1adb6f69444e7b620965a611b74
oooo very helpful!
I wont get beat to a pulp for trying to ask newbie questions here right-
I've been wanting to get into modding, I've read a few tutorials, but I'm still a bit lost.
I'm hoping to develop a mod that introduces a "Battery Charger" for the normal batteries so they can be used with mods like Better Flashlights and Radios can continue to be useful with Save our Station n stuff. Is this too much for someone just starting?
I'm more interested in the Lua side of modding rather than the Java side if that means anything, though I can technically do both since I have experience with both languages.
(yes I just read the link posted it helped a little)
from my experience people have been super kind in here so don't worry about asking questions!
Oh thank god.
I've been torn to shreds in other communities just for trying to learn.
I really want to contribute to the modding scene here because I love the game so much.
and from my limited experience I'd say the best thing to learn is to download mods and open them in vscode/your ide and just study them at first
Oh? Hm.
everyone has been super kind dw!
Where would I go to start tampering with my mods?
It doesn't seem like the Users/.../Zomboid directory has much in regards to that.
Would local steam files be more effective?
Oop, think I found it.
This is such a good guide, it should be pinned
Is there any particular vscode extensions I should use for modding in the lua side of things?
I'm using this one:
https://marketplace.visualstudio.com/items?itemName=sumneko.lua
And it's quite handy
I also use my extension for PD2 modding, that works well for zomboid too
https://marketplace.visualstudio.com/items?itemName=MassimoMx.pd2-dev-tools
But I forgot to write any documentation for it π
oop hehe
Seems that first extension was the most popular available, so that's a good sign. Thank you!
I take it that there will be some wonk with the interpreter because of the nature of Zomboid's "forked" lua, right?
I know Zomboid runs off of a Java-compat version of Lua, forgot what the exact name of it was.
Forked may not be the right term but whatevs, am not a professional

When my tutorial series is more complete ill pin a post with them listed
i will cover lua but also ts modding
With pipewrench? π€
yeah typescript modding is pipewrench
My framework pzpw v2.0 is in alpha i have lot to do still
But its so much more structured than my v1
pzpw? π€
yeah its commandline tool to create mods
with its own template/config json and now a new command line compiler
Now that I look at the lua, how possible is it to make a "Better Batteries" mod without outright breaking / being incompatible with most mods..?
Something like this one I made? π€ https://www.npmjs.com/package/mx-create-mod
Because from what it looks like, at least for SoulFilcher's Explorer mod in AwesomeTime, it uses something similar to a durability check and just lets you insert a new battery.
So if the battery is 0, instead of making a new item, it's just.. replaced entirely.

Agh I worded that weird
From what it looks like, would it be smarter to seperate it into two mods?
"Better Batteries" and "Battery Chargers"?
Maybe that won't be necessary actually, I sound insane.
will simplify alot with time
Is it normal to feel like a complete moron when first entering the modding scene-
For any modding scene then yes
Okay good to know I am experiencing normal human emotion yesyes
Yeah
haha yeah
I really wanna learn all this stuff but it's hard to tell where to start.
Looking at the lua files of some mods helps, but it also makes me more confused in some aspects.
Not easy at first, there is alot of different things in pz modding.
But really think about what you want to acheive, make it simple at least at first
Wouldn't batteries be simple enough? I'd hope so anyways-
then ask here we can probably send you in a direction toward your goal
Oh, ok!
I just don't wanna use y'all as a crutch if that makes sense
Like, I don't wanna have to rely on y'all 24/7 for my mods to work, I wanna learn to be independent too
Thats what this channel is for
How would I start with setting up a mod that can be enabled to begin with?
Yes, and don't worry about it. Welcome on board
I know there's an "example mod", but it doesn't have any lua files for me to tamper with.
This is pretty cool
Any mod on the workshop is an example mod, that's how most modders start
So just yoink one and tamper?
Obv don't release it to the public if it's hardly edited but
Y'know
@quasi kernel this guy also does some really basic lua coding / setup https://www.youtube.com/watch?v=ikRcbRHc45k&list=WL&index=8 would recommend 2x speed but it was helpful for me to look through to see where to start
Ooo thank!
I have an idea of how to do some things, though I imagine I'd have to modify some behaviours on the Java end of things for this to work the way I want.
if you modify the java it won't work on the workshop just an fyi
and to modify the java you have to decompile it
there's a lot more that you can do with the lua than you think tbh
Oh wait, I forgot you can override stuff via lua
yes in Konijima's guide he shows you how to hook into a function and override it
will keep that very open
this one: #mod_development message
-debug can be put in the Steam boot options too right?
Yes, and you should look also at this:

excitement
I think I did something wrong- it does not appear to want to boot.
uhhh

Oh, it seems to be trying to boot via regular means.
I need to get it to use safe mode somehow.
Is in spanish. Is a problem?
im trying to translate a bit
Thank you
If you can translate it that would be awesome, if not, post the script, and some people here can help translate with that.
I do believe we have some Spanish speakers
@gilded hawk @eternal garnet
There are 4 files .ps1
I can upload a .rar or I use any web like pastebin?
how do the texturepacks work in this game? what file format is .pack and how does one edit that?
Well I just wiped all of my mods in an attempt to fix regular booting for 0 reason
Yeah or GitHub
1 - CheckModUpdates.ps1 --> https://pastebin.com/yVukRngq
2 - Reboot_10m.ps1 --> https://pastebin.com/BTC1WFgg
3 - KickPlayers.ps1 --> https://pastebin.com/wRkN0R19
4 - RebootGSM.ps1 --> https://pastebin.com/sq3jA99H

edited two links with a little more translations
I hope you cand understand it
That's awesome mate.
Thank you for posting it for us to use.
no problem, glad to help
more translations updated >.<
@cosmic condor
And this is for spawn new random vehicles in the map:
RandomVehicles.ps1 --> https://pastebin.com/kWCe4Pv0
I hate to be a bother, but do you know of a boot option to allow alternate launching?
you can add the game to steam multiple time
something like add custom game
Nono I know that
I just can't get that to boot through alt launch
My default launch doesn't work for some dumb reason
what does it do?
It closes automatically the second I try to use the "Dev" version of the game.
No prompt to use alternate launch or anything since it's not the main game.
I don't have problems using alternate launch normally, but here it's particularly a problem because I can't use the method everyone else is using to have a designated "mod friendly" version.
Should I open a ticket?
I really want to study UI things like this one. But I have no idea where I should begin.. Could anyone give me a tip?
So if i understand from the drawing you want to create Context Menu options ?
oh yeah, the context menu
I tried to figure it out myself by searching Lua files. but couldn't understand a single one..
try reinstalling too? that's strange
I already wiped it completely and reinstalled twice, no good.
Not sure what's up with it.
Anyone knows where the "Destroy tile" code from the new update is? Like in which file
take a look at this. #mod_development message
I had compiled a more simple example to show how they are done
any chance anyone in here knows how to use the addImpulse method for vehicles? I'm just messing around and trying to move around vehicles with physics on events, but I am so bad at visualizing vectors
params are vehicle:addImpulse(Vector3f impulse, Vector3f rel_pos), can anyone in here who is smarter than me tell me what these vectors might represent? i thought it would be the first one is the direction/magnitude on the vehicle and the second was the relative position that the vehicle is at but I can't figure it out π’
I haven't used it before, but I would guess the first vector is the direction and magnitude of the force, since it is the impulse, and the second one tells where on the car this force is applied, relative to the vehicles internal coordinates
I haven't dabbled with these, but so like, you modify the first vector, if you want to change the impact to hit to the right or to the left. Then you modify the second vector if you want it to be applied to the front of the car vs the back of the car.
You are totally right I didnβt even think about where on the car it would come from
For the first vector if I just did a (0,0,5) and set the second one to the middle of the car would the car most likely go straight up?
And I wonder if they need to be based off the world position at all or if they are just relative to the car itself idk man
Thank you so much for giving me a great example. This is what I needed!!!
well, since it is rel_pos, so relative position, I assume it doesn't depend on world position, and is just relative to the vehicle
Is LastWriteTime the "last modified" in this screenshot?
hi, i would like to make a mod that adds a sword to the game, but i have no idea how to make the model, i already know how to use blender but dont understand how i put it in the mod
where the heck is carry weight or capacity for containers stored? I can't find it anywhere
specifically the metal crate right now but any of them really
those are defined in the tiles.
Is it possible to remove "Full to Bursting" moodle using Lua?
I think so
Like hiding it? π€
Yes
Can someone help me fix this problem im having with the model of my sword?
This is it in blender
Do you know the syntaxis for servermsg with powershell?
For example with a .bat this works:
rcon.exe -c rcon.yaml "servermsg \"Test message.\""
I get this:
With .ps1:
cd C:\Users\Administrador\Desktop\RCON
rcon.exe -c rcon.yaml "servermsg \"Test message\""
I get this:
I tried with and without the characters " \ ' and it didnt work
sorry, i have no idea, im new to modding
This option only send the first word:
cd C:\Users\Administrador\Desktop\RCON
.\rcon.exe -c rcon.yaml 'servermsg "Test message"'
in powershell, you have to double β to escape it. So you can try ββ instead of \β in your first example
Like this?
rcon.exe -c rcon.yaml "servermsg "Test message""
In theory, like this
rcon.exe -c rcon.yaml "servermsg "βTest messageβ""
ignore the weird quotes from my phone, these are all double quotes (β)
yes
hmm that must happen at the rcon.exe level then, the powershell should be fine, Iβm not familiar with rcon.exe
can't you just use single quotes on the outside
.\rcon.exe -c rcon.yaml 'servermsg "Test message"'
yes you can, he tried that but same result as the last attempt
I tried this one
ah sry i missed that
np xD
you nerd sniped me, so I downloaded gorcon/rcon-cli to try. Apparently you need a PhD to pass command line arguments with quotes inside them in powershell https://stackoverflow.com/questions/6714165/powershell-stripping-double-quotes-from-command-line-arguments @rugged cosmos
that works: .\rcon.exe -c rcon.yaml 'servermsg \"FOO BAR\"', but there are many layers to this ^^
LOL, you did it! Thank you a lot
yw ^^
When you guys are talking about RCON, are you referring to this? https://developer.valvesoftware.com/wiki/Source_RCON_Protocol
Does this look like a decent battery charger? I'm still new to spriting so
(Search alkaline battery charger, not just battery charger for ref)
hi all 1 just have a question can i use this model in pz
want to start with it instead of male or female
this one is not common, I prefer the 4-pack
I can edit the sprite to make it a 4-pack
hi, i have been having this problem with my sword model, it is fine when i use place item, but looks like this when i use it as a weapon, Anyone know how to fix this?
try searching old posts in #modeling I saw many people encounter this problem
ok thanks
Yes itβs a standard protocol to issue admin commands to dedicated servers
Okay thank you
Updated the codes with functional messages in powershell thanks to @flat cipher
And added a ps1 to check windows tasks
1 - CheckModUpdates.ps1 --> https://pastebin.com/5G4R1LdA
2 - Reboot_10m.ps1 --> https://pastebin.com/Rxu01kAa
3 - CheckTasks.ps1 --> https://pastebin.com/5xiqkDDh
4 - KickPlayers.ps1 --> https://pastebin.com/wRkN0R19
5 - RebootGSM.ps1 --> https://pastebin.com/sq3jA99H
@gilded hawk @eternal garnet
I Send you love 
can someone help ? i want to use my 3d nft fbx file in zomboid as charactor to play is that posible ?
ntf has nothing to do with fbx file
sorry i had to say i was a 3d nft
if your fbx file can be opened in blender then it could be possible
its made in blender
can you open the file with 3D Viewer?
didnt try that but can you tell i witch folder i have to drop the fbx file to try or do i have to do more to make it work
and do you really have a permission to use that fbx file?
i know they allready used it in gta 5
what?
that nft
do you mean FiveM?
saw them playing gta 5 so
many of NFTs are stolen contents
you have to make sure that the sellers give you the permission to use that fbx file
and yes i can se my nft in the 3d viewer
to set it straight, nft is just a queue in the blockchain, it doesn't store anything, your fbx file is hosted somewhere else
i have all permission for it
so you can drop the NFT part so people can understand what you really mean
"I have the 3d fbx file that I bought" is enough
now, back to the main story
what does your fbx look like?
i just want to use my void in pz
pic?
thats the 1 i want to use as character
i just want to now how i can fit i in to the game
so not as a male or female but as a void
nft
oh no the guide on how to create clothing mod is removed
screenshotted
have you seen some anime character mods?
you may use the same method
yes i made a screenshot of my nft sorry
make the whole 3d model as a clothing
thats already don the skelet is allready but in the void
thnx i will dive in to
and if thats done i can make it work
if i check the file thats allready done
follow this guide https://theindiestone.com/forums/index.php?/topic/37647-the-one-stop-shop-for-3d-modeling-from-blender-to-zomboid/
Hello and Welcome! Here you will find a concise and comprehensive guide and tutorial of making 3D models for Project Zomboid. Currently, this will mainly pertain to custom Clothing creation but may include weapon creation in the future. This will present how to create models from scratch with Ble...
thnx sir
IS there a version of Hydrocraft you can currently run on a multiplayer server or are they all nuked?
Would the grass and foliage added by the 10 Years Later mod be "Map Data" or "Chunk Data"? I'm trying to use a mod to clean it out of my server
(Please try to answer the other questions before mine please, it's not urgent!) Do y'all know if radios and regular batteries spawning in the world start with randomized charges?
From experience, I don't think I've EVER seen a radio without a full battery in it unless it's been left on.
Same goes for walkie talkies on zombies.
I've never seen one without a full charge either, but sometimes radios spawn "placed" and turned on, so as soon as you load their chunk they start losing battery
I'm aware of them starting on, I just wanna know their setup so I can make adjustments in a mod I'm making.
I'm wanting to make a "Better Batteries" mod that introduces rechargable batteries, a battery charger, and fixes to a bunch of objects (supposedly) starting with 100% battery.
Plus possibly adding a Watch battery that can be replaced, so you have to maintain your watch a bit.
I do need feedback on whether or not watch batteries would be a good addition or not though
how do i trigger a function when i come close to a certain item or step on a specific tile
a simple function for quest purposes such as saying "what is this place?"
or a sound
watch batts would be sweet @quasi kernel , just thought about the fact that they never need batts a few hours ago while playing
also you loot one digital watch in the first 10-30 minutes and then never interact with it ever again
Yeeup
yeah I think you can just overwrite the item definitions to make them require batteries
Well digital watches can last up to 15 real life years without batteries because theyβre so simple
and look for how batteries are defined as well
true
maybe they are all apple watches from the 90s
Like literally you dont need to change them just like in a calculator
But better batteries would be cool
hm you have a fair point
For creating new batteries, would I make a new item entirely or extend off of the battery class?
Because it'd be nice ot have two seperate types each with their own benefits.
Non-rechargable which has a longer lifespan, but can't be recharged. And rechargable with a shorter lifespan, but can be recharged.
I'd have to introduce "Charge" and "MaxCharge" variables somehow
if you are changing the item I think you can just overwrite the Base.Battery or whatever it's called
like just keep the module as base
I see
Were rechargeable batteries common in the 90βs?
No, and that's why they're interesting in a Better Batteries mod.
You'd have to go hunting for them and they'd come in a pinch.
(ntm you'd have to get an alkaline battery recharger, yes those existed in 1993)
Cool
Hey, does anyone know what happened to the fractioned moodles mod? It got renamed for "nothing" and it seems like its not working anymore
Both a modding and end-user question at the same time
I made a sub-mod for a vehicle mod that renames all cars to be lore-friendly (changing ford for franklin and all that stuff)
My mod works flawlessly in single player, but in multiplayer the original names still show. I've checked, double-checked and triple-checked the server's load order yet i still get my immersion broken by a "pontiac" or a "chevrolet" all the time
Here's my mod, any help would be much, much appreciated https://steamcommunity.com/sharedfiles/filedetails/?id=2811283502
Anybody know how do I listen to client commands?
I made a LUA file in media/lua/server and wrote this, but it never gets triggered even though it should be subscribed to client commands.
oh yeah I think that's the event you're supposed to use
I considered that it simply doesn't print because it's the server or some random reason but I'm not sure
just to be sure, but you're not testing this in SP are u?
Ofc not
https://github.com/mxswat/ZomboidModPackTool so, I made a tool to repackage lots of mods into a single modpack if you have a private server.
I'll probably remove this once we have a way to lock mods versions in the servers
out of curiosity what is your client sending?
maybe this will help? #mod_development message
The function is right
It's possible to open windows, doors, break windows, etc with code right?
is this the code that ended up working for you?
i believe so since better Lockpicking opens the door after you lockpick it
Now I just need to figure out if I can spawn and despawn zombies on command, that'd make this 100 times better
Hey everyone! qq would there be a way to catch a rcon comand on a server script? I'm thinking about a mod that would allow to trigger game events / read game stats from another backend application like a website API. any idea?
how does modData work? do you guys know of any resources where that's explained?
Do y'all know of any way to get debug to run in alternate
Im trying to host a server for my friends and I but the server says terminated before it finishes initalizing, how do I tell what is causing the problem, do i just search for errors in the console.txt and figure out what mod the error is a part of??
nope. I gave up on that and decided to use the skinIndex instead
yeah
I know how to make a zombie spawn only in houses, but is there a way to make it always stick around the house? Like if it's chasing a player it only goes like 5 feet away from the house before going back lol?
Pretty specific, but I'm trying to make a ghost mod
Random ghosts everywhere on the streets would be kind of weird
This is really cool. Unlisted by default. π―
hydrocraft continued is still alive and is the latest and working in MP. Give it a try. And if you find any issues in MP, I would appreciate it if you come to our discord to report it
Thank you! And yes, unlisted by default cause I wanted to make it clear that it has to be a tool for private servers, not steal shit, also cause I'm a modder too
we tried two different hosts and gave up, it just seems bonkers nuked right now.
it kept saying different "animals.txt"
Hey, does anyone know what happened to the fractioned moodles mod? It got renamed for "nothing" and its not working anymore
Maybe the modder got pissed and wanted to remove it without breaking servers?
yeah that is related to if you have multiple hydrocraft mods present. You need to make sure only one is present. The issue might be because the server has an old version cached in the mods folder. PZ is kind of weird like that. We intentionally kept the same mod id, so people could easily upgrade from the old abandoned mod to the new one, but it causes some confusion unless you know alot about how the PZ handles mod files
Is it me or TCCacheMP can't be added to collections anymore? π€
even with only one mod that happened to a fresh server
make sure none of your friends are subscribed to any of the old mods. The issue can happen in either direction. either the server accidentally have both, while clients have only the one, or server only has the 1 correct version, but then the clients are subscribed to multiple
its would also be good to manually check that the previous mod is properly gone, cuz some times steam can be funky and doesn't properly delete a mod, when you unsubscribe
we've also had people not remembering that they had manually installed HC from years ago before they took a break from PZ, so it would be good to double check all locations, that there isn't another hydrocraft mod in any of the manually installed locations
Can't even find the mod
Same error
π€ Odd

Alright, now for the fun stuff.
How would I start with my battery mod? Any particular place I should start?
Creating/modifying existing/new items seems like the easiest first step, though I might still need to be walked through that a bit.
Updated my tool to differentiate which mods are part of a repack, using !! in the name
This is especially good if you use chuck way to setup different zomboid dev enviroments (#mod_development message)
Does anyone know a mod that I can use to create a key for an specific door? I know that Necroforge has that function, but I'd like something that's a little more immersive, if possible. Otherwise, I'll just go through the coding/admin powers way
I would say admin power way is easier no other mod comes to mind
is this a decent edit for the rechargable battery?
It took a little more effort than just flipping it around but I think it turned out okay
Hey @gilded hawk, would it be smarter to leave Base.Battery alone and just implement a new item for the recharge?
The only edit I can see myself making is just adding an "Empty Battery" for when it's destroyed
I would make a new kind of battery, to avoid compatibility issues with mods that also affect batteries
Sure, why not
Alright
So leave Base.Battery alone except for adding one of those "ItemDestroyed" things
Then just make that into an Empty Battery
Actually, maybe not.. Base.Battery in itself is just a regular Alkaline, so there's no real point to making an empty version since it can't be recharged.
At least not safely.
That does call into question whether or not the Battery Charger should work on classic batteries or not

π€
Honestly, if you want easy life, make a recipe that converts normal batteries into rechargeable.
And apply the recharger only to the new battery
Also
Battery's deplete so maybe you could make use of the replaceondeplete or replaceonuse
I'd likely have to do something to vanilla items to add a "Type" of battery variable which is a little annoying
Because players can take batteries out and one has to take the correct battery type out
You don't wanna put a rechargable in and have it magically turn into a regular one
Because from what I'm assuming happens, Batteries are "Destroyed" when they're inserted into an item, where the item simply increases it's charge to correspond with the battery's.
Then when the item is removed, it just creates a new battery with the current charge of the item.
That's just my theory as to how it works, though I feel as if it's a sound theory seeing as SoulFilcher's lantern just lets you put a new battery in if the charge is 0
I've tried catching any server command sent thru rcon in onServerCommand but no event get triggered. will have to look at the java code probably
yeah i didn't see any rcon code in the lua
thx! did you see any other mean of basically invoking a lua script from outside the application by any chance? π
Is there a command or something to make the map fully known? π€
I don't think there is a command. Although if you are in debug mode, you can just toggle to unhide unvisited areas
π€ I'm making a mod that makes the map fully known if you start with a specific trait
I imagine it's gotta be possible, seeing as someone made an Explorer trait mod that extends the range of how far you mark the map.
Ah i see, I thought you meant like with and admin command or something. Its definitely possible, you can just look for lua code for the context menu for the debug minimap, and check what function it is calling to reveal the map
Oh thank you!
also I found there is a setVisitedInCells function for the worldmap object in the java doc
Javadoc Project Zomboid Modding API declaration: package: zombie.worldMap, class: WorldMapVisited
I don't see any examples of it being used,but you can probably figure it out with some trial and error
Oh nice! I'll give it a look, maybe I can make it work π€
if I would have to guess, the first 2 ints are the x and y for some cell, and the second pair of ints, would define another rectangle of squares. so using the 2 pairs of vectors, it would set thoughs cells to be visited
ofc if you have decompiled, you could just directly check what it does
Is it possible to add a column to this menu
Sure
sure
yeah you can. tmk all the UI stuff are in lua, so you can manipulate them pretty freely
Is it possible to add new injuries to the health menu?
This one seems less likely but if so that'd be great
I don't see why it should not be possible π€
not easily. the injury system I think is in the java, but you could manually implement whatever you want, then just manipulate the UI so it is visible
How would I go about adding a new item well?
and also adding it's icon somehow-
I have this much
module BetterBatteries {
imports {
Base
}
item RechargeBattery
{
Type = Normal,
DisplayName = Rechargeable Battery,
Icon = Base.Battery,
Weight = 0.1,
}
}
Used part of an unfinished tutorial to get this far
Anybody can help me out on how to add custom world models to a new cloth item? I can only replace the existing models by replicating a Vanilla model's name and folder path, but I cant ever add new stuff, no matter what name or path I add, when I drop it on the floor, it just shows in the game as a sprite.
you need to add the icon as a png file with the following name. "item_youriconname.png"
Under textures?
so for example, if your icon is called betterbattery, you will have a file called item_betterbattery.png, and then in your item script, you have the line Icon = betterbattery
yes
module BetterBatteries {
imports {
Base
}
item RechargeBattery
{
Type = Normal,
DisplayName = Rechargeable Battery,
Icon = item_RechargeBattery,
Weight = 0.1,
}
}
So it'll be like this?
no, only the png file has the item_ prefix
Ohh so it's just RechargeBattery?
yep\
Ok perfect
I have this, but it's not quite showing up in the item explorer in debug mode.
module BetterBatteries {
imports {
Base
}
item RechargeBattery
{
Type = Normal,
DisplayCategory = Electronics,
Type = Drainable,
DisplayName = Rechargeable Battery,
Icon = RechargeBattery,
Weight = 0.1,
}
}
can you show your file structure for the png
and the png file if you could as well
its a png right?
when you load in, does that file get loaded?
actually nevermind, im not sure if it outputs the png files
Hold on, I may be stupid
hey if i were to have a modded world and then disable the mods then reenable them would all my modded stuff still be there?
yeah im just dumb lol
they will, if you haven't loaded into that save in the meantime
i forgor to actually enable the heccin mod
so as long as i exit the game. disable the mods then enable them before i start the world up again im good?
yep
what happens if i load in before i enable them again
you can have multiple saves with different mods for example
and you can just load into them back and forth, without needing to modify anything
can i have one unmodded world and one modded without having to disable and enable them all the time?
technically, when you load into a save, it automatically activates whichever mods were activated in that save, and deactivates mods that weren't active
you have to manually remove them from the save, if you want to actually remove a mod
im not talking about removing mods im just wondering if i can have one of each without having to disable them to play on my unmodded world
so when you select mods from the main menu, that only affects what mods are loaded in the main menu(this is for mods that affect the main menu), and it automatically has those mod selected when you generate a new save.
so the mods you have selected in the main menu do not affect what mods are activated in existing saves.
when you load a save, PZ reloads all of it's lua stuff, and will check what mods were activated in that save, and then activate and load those files when you load a existing save
things only break if you unsubscribe
or if the mod author breaks their mod and uploads it to steam workshop
so what you're saying is i can have my unmodded world that has never had mods activated on it and also have my modded world which will be started with mods and wont have to disable them to switch between the worlds
also im wanting to mod from the workshop
yes, you dont need to manually turn them on and off ever time you swap between unmodded, modded, or modded with different set of mods
very cool
loading into that save will take care of it for you
Alright, now for the fun stuff. I got the item in but it doesn't do anything. Is there a way to use it as an alterative battery?
I imagine I'll have to apply edits to individual vanilla items with lua
thanks for the help
The items off the top of my head that require edits are Flashlights, Radios, and Walkies
And possibly lamps since im p sure you can use high electrical skill to modify them to use batteries (?)
hey heres a dumb question when my friend and i try to load map mods they dont work. whats the deal im sure you hear this alot but i cant find anything online
like the map extensions
youll have better luck in the mod_support channel
bet thanks
Alright, so how do I start modifying stuff like radios?
Radios would be a good place to start for now.
@shadow geyser I was looking at how the tsar boat mod implemented their physics and here's how they rotate the boat:
if isKeyDown(getCore():getKey("Right")) and
not isKeyDown(getCore():getKey("Forward")) and
not isKeyDown(getCore():getKey("Backward")) then
-- boat:setPhysicsActive(true)
-- AquaPhysics.addImpulseGetWorldPos(boat, force)
boat:setPhysicsActive(true)
local forceVector = boat:getWorldPos(-1, 0, 0, tempVec1):add(-boat:getX(), -boat:getY(), -boat:getZ())
local pushPoint = boat:getWorldPos(0, 0, lenHalf, tempVec2):add(-boat:getX(), -boat:getY(), -boat:getZ())
pushPoint:set(pushPoint:x(), 0, pushPoint:y())
forceVector:mul(force)
forceVector:set(forceVector:x(), 0, forceVector:y())
boat:addImpulse(forceVector, pushPoint)
boat:update()
local forceVector = boat:getWorldPos(1, 0, 0, tempVec1):add(-boat:getX(), -boat:getY(), -boat:getZ())
local pushPoint = boat:getWorldPos(0, 0, -lenHalf, tempVec2):add(-boat:getX(), -boat:getY(), -boat:getZ())
pushPoint:set(pushPoint:x(), 0, pushPoint:y())
forceVector:mul(force)
forceVector:set(forceVector:x(), 0, forceVector:y())
boat:addImpulse(forceVector, pushPoint)
boat:update()```
so it looks like it is based off of world position?
And would something like modifying objects go in client, server, or shared-
the line I'm curious about is pushPoint:set(pushPoint:x(), 0, pushPoint:y()) I wonder why they are putting the Y as the Z π€
and also why the heck does getWorldPos take two vectors I would think it should take nothing and return a vector3 π’
yeah looks kinda wack. seems like you would need to look through the decompiled java to understand what's going on
actually it looks like it might just be some unique thing for the boat. the boat wont just be pushed forwards/backwards, there is a bit of torque due to the sail. The swapping of the y to the z might just be some wierd math stuff
Yeah I looked through that a bit too but it's so confusing since none of the vars are named
like var1-var9 lol
ohhhh yeah that could be
best of luck
and enjoy zomboid π
public Vector3f getWorldPos(Vector3f var1, Vector3f var2, VehicleScript var3) {
return this.getWorldPos(var1.x, var1.y, var1.z, var2, var3);
}
public Vector3f getWorldPos(float var1, float var2, float var3, Vector3f var4, VehicleScript var5) {
Transform var6 = this.getWorldTransform(this.tempTransform);
var6.origin.set(0.0F, 0.0F, 0.0F);
var4.set(var1, var2, var3);
var6.transform(var4);
float var7 = this.jniTransform.origin.x + WorldSimulation.instance.offsetX;
float var8 = this.jniTransform.origin.z + WorldSimulation.instance.offsetY;
float var9 = this.jniTransform.origin.y / 2.46F;
var4.set(var7 + var4.x, var8 + var4.z, var9 + var4.y);
return var4;
}
public Vector3f getWorldPos(Vector3f var1, Vector3f var2) {
return this.getWorldPos(var1.x, var1.y, var1.z, var2, this.getScript());
}
public Vector3f getWorldPos(float var1, float var2, float var3, Vector3f var4) {
return this.getWorldPos(var1, var2, var3, var4, this.getScript());
}```
π΅βπ«
do modded cars have random spawns around the map or do you have to spawn them in to use them
cuz alot of these mods dont say
i think most of them have random spawns
cool
can always change values and look for yourself too
cuz it might not be what you want
modded vehicles need to be added into VehicleZoneDistribution to use the vanilla vehicle spawning system
wait im new to modding in this game
do i have to manually do all this
or can i just get the mod from the workshop and apply it to my new world
if you are making a new mod, yes. if you are just taking a mod from workshop, the mod author will have done it for you
oh ok yeah im only getting other peoples mods
just btw this modding channel is more for people creating mods. mod_support is more for user questions and help
Alright, I'm back from the binge.
What would be the best way to add extra functionality to radios, and where would I put the lua file?
Would I put it in server? Client?
Because I'd like to add the option to stick the rechargable batteries in radios and the like.
Okay I found some of the code for the battery
-- AddBattery
function ISRadioAction:isValidAddBattery()
return self.deviceData:getIsBatteryPowered() and self.deviceData:getHasBattery() == false;
end
function ISRadioAction:performAddBattery()
if self:isValidAddBattery() and self.secondaryItem then
self.deviceData:addBattery(self.secondaryItem);
end
end
I'm a bit stumped at to where to go from here.
I dont know what provides this data either than the constructor, so I don't know what to do now.
Hi! Is it possible to delete vanilla recipes from game or to overwrite them? I am trying to make a new recipe for "jar of broccoli". I gave it the same name name as in the vanilla recipes.txt but what happens is that in-game interface now displays two "Make jar of broccoli" options, one according to the vanilla recipe and another one according to my own recipe.
SOLVED: by searching the web via, I found this: https://theindiestone.com/forums/index.php?/topic/22762-how-to-change-tweak-existing-recipes/ stating that adding Override:true to the recipe should do the trick
Hi all Quite new at programming for Zomboid but I have to start somewhere so sorry for the stupid questions. My firts hopefully small goal is that I want to be able to write a small mod that changes recipes already in the game. That beeing either adding items keept after crafting or new items got...
Can the .class files be decompiled or am I screwed? I've never tried to do that before.
Nevermind. http://www.javadecompilers.com/ seems to work pretty well.
Is modifying the radio to accept an alterative battery even possible..?
hey in a recipe how do you say (or) is this the way? ex: Soap2/LiquidSoap
Alright I've been digging through .class files for an hour straight and cannot find this shit. I've found tons of code that would get called when these items are generated, but nowhere have I found the actual generation of a single item. Does anyone have any idea where these things are defined?
what are you trying to find?
May I call upon your knowledge
Anyone know how to edit the zombie settings of Horde Night? Firearms B41 is showing up after adding the mod, HN doesn't.
not showing up ingame either and not showing up in AZO
wait. is horde night broken in 73?
well, I havn't meddled with the radios so you will have to discover this stuff mostly on your own. I would try taking a look at ISRadioWindow.lua. It is the file with the UI. From what I can tell, the interactive elements are all RWMxxx.lua. so for example, I think the RWMPower.lua is the battery. Atleast I think it is as that class has a addBattery method
Well that's def a lead, thank you so much.
Ive just been looking at ISRadioAction.lua for ages now
You would at the very least have to modify RWMPower:verifyItem, as that is the function that decides what items work I think.
function RWMPower:verifyItem( _item )
if _item:getFullType() == "Base.Battery" then
return true;
end
end
although i doubt just adding a if so it returns true for you item is enough. there are probably other checks as well that you would need to fix. Although you can always just try it out
How would I safely modify it?
Yes I'm still a newbie, I'm figuring things out as I go.
I doubt just changing the file there will do what I want, I imagine I have to do something with a new file.
Redefine the function at least, yea?
Would I just do like..
function RWMPower:verifyItem(_item)
local itemType = _item:GetFullType()
return itemType == "Base.Battery" or itemType == "Base.RechargeBattery"
end
If I understand correctly, RWMPower is global, so I can just modify it from my lua script via redefining the function to my new code.
(That's assuming my understanding is indeed correct, I'm taking shots in the dark)
so in your new lua file, you should have the following
require "RadioCom/RadioWindowModules/RWMPower" <-- this ensures that this file is loaded before your file. its technically not needed because all vanilla files are loaded before modded files, but I personally think its still good to do. Just to explicitly show what files you are modifying for future people(yourself or others) looking at the code
--the easy dirty way. this replaces the function entirely and may break if other people are also modifying this function
function RWMPower:verifyItem( _item )
--your changes here
end
--the smarter way. not guaranteed compatibility, but its better in general. you are replacing the verifyItem function, but still using its logic. so if another mod made their changes, you would still be using them
local old_verifyItem = RWMPower:verifyItem;
function RWMPower:verifyItem( _item )
if _item:getFullType() == "Base.RechargeBattery" or old_verifyItem(_item) then
return true;
end
end
if you want. whats important is that it is still logically consistant, and you are monkey patching the old function so it is still working
require "RadioCom/RadioWindowModules/RWMPower"
local old_verifyItem = RWMPower:verifyItem;
function RWMPower:verifyItem( _item )
return _item:getFullType() == "Base.RechargeBattery" or old_verifyItem(_item)
end
I see
Alright, thank you so much! This is one step closer to my goals.

wait how do you post code blocks with color
triple ` with lua after it
what happened to this mod?
it was a moodle status thing
now it is renamed to nothing
how can i use mod manager when hosting a server IT works when I make a solo world but when I'm hosting the default thing appears
Has anyone attempted or is currently working on/playing with the concept of a radiation mod?
probably deleted his mod? check the change log or the comments if he has said anything
try the mod support channel
i think he may have deleted it because it doesnt work now
and there are no comments
Did anyone ever made a "brita" light version of the mod? π€
90% of the weapons not not spawn by default, so I'm wondering if I should switch to a lighter mod
Just use Firearms B41
Why not
I think there's a lot of brita's "Balance patches" in workshop that does that. Just read their description and pick what suits you.
(Or you can just manually tweak them in mod options)
Good luck making a light version brita code is almost a new encryption algorythm xD
can you lock a repair type behind a recipe requirement?
im using VFE w/ my own tweaks/etc. and making my own guns one at a time (i just began, so there is only one gun released)
i have similar opinions about brita being pretty heavy/bloaty, nice as it is in many ways
working on a gun repair rebalance rn
Yeah, the mod is great but it has 200+ weapons, but only a bunch of them are appropriate for `90 Kentucky
and many are almost identical to one another
yeah
pistols with so little difference in stats it's irrelevant, etc
well it is about the aesthetics mostly
how can i open pack files?
i have the same question ^
I imagine that for putting the battery into the radio, that's gonna be server managed for replication purposes.
So I gotta figure dat out
how?
@steady herald You can download the modding tools in your steam library
aye i have it
i cant see where to open the .pack files
ah gotcha, yeah idk either
Any chance someone has the files from "Moodle Fractions"? Seems that yesterday the author might have gotten hacked and the files are gone.
I donβt remember exactly. I believe there is a TileZed.exe wherever the tools downloaded
yes i ran it
I also see something about pack files here: https://pzwiki.net/wiki/Useful_Links
but it doesnt let you open pack files
There is a pack file extractor on the wiki
i do
Sorry, Iβm about to take off and the message was from so long ago. Otherwise Iβd be more helpful D:
When you've got second I would love a link if you've got it.
Aww, yeah same. Well I'll see if I can figure something out or I'll switch to another mod and hope the author got hacked and gets their account back rather than having raged over something and deleted it themselves. Thanks for trying though!
sorry i couldnt be more help
No worries.
how long should it take to unpack a pack file lmao
ok i got a feeling both unpackers dont work
ive been upacking a small pack file for half an hour
@sour island Can I make a modified version of your "Skill Recovery Journal" mod? π€
qq how can call e.g. IsoPlayer method when returned from java array? I get the player objects in the list (calling getOnlinePlayers) but can't access any class members of it π€
To what end?
If the change is worthwhile, you can make a pull request on github
For my private server I'm looking to add a negative trait that disables the usage of the skill book skill recovery journal.
Since some of my friends need to use it, but me and another guy don't want to use it, but we still want some benefits out of it, so the idea of a negative trait seems good to keep it somewhat balanced
Illiterate?
Illterate but just for the skill recovery journal
You could make a secondary mod for something like this probably - but sure I don't have any isuses
Okay thank you.
what do I need to make an item have 3D model I can place ingame (be a Movable)
is it just a sprite from the sprite pack or do I also need an .x 3D model?
the sprite pack, if you mean like for the .pack files is just for the tiles. you need a .x 3D model if you want to place it into the world like when you place bottle onto a table
Hey robot, any idea why the rechargable battery icon isn't appearing properly in the item list?
It's not an urgent fix or anything, just a nitpick.
It appears properly in the inventory and everything which is strange.
Perhaps it's because the file for the texture doesn't fall under Base..
what item list?
do you guys happen to know what method project zomboid uses to check recipes? I need to change any recipes that are keep WeldingMask to keep [Recipe.GetItemTypes.WeldingMask],, but I don't want to go through and change all of the recipe definitions manually
if you mean the one to spawn items in when in debug. im not sure. you can probably figure it out from the lua for it. ISItemsListViewer.lua can probably help
you can do it with lua scripts. Use the getScriptManager():getAllRecipes() and then loop through them with the correct logic to find the recipes with keep WeldingMask and change it to your function
awesomeeee thank you!
I figured I could do it with scripts I was just searching the codebase aimlessly haha
The debug one
so from what I can tell, it is drawn in this function. ISItemsListTable:drawDatas()
Hm, perhaps it's just a limitation on Zomboid's part. Soulfilcher's Awesome Time has the same problem.
maybe try investigating that
cuz it renders like this
it's a minor nitpick so im not too worried about it, was more worried if it would affect gameplay any
all of SF's stuff has the same problem
thats the code it uses to render the icon. maybe it is the drawTextureScaedAspect2 function failing
might need like a specific png ratio for it to work or something
it looks fine ingame so i guess its a non-issue lol
Also, robot, do you figure that the actual battery insertion is on the server side?
I'd reckon such seeing as it's likely it fires an event somewhere to make it replicate over when inserting a battery.
I have it so it detects the rechargable as a valid item to insert, it just doesn't insert quite yet.
so looking at the code, the verify item is just a filter for the addbattery function, which then queues up a ISRadioAction "AddBattery" action
Yeye
then we have all of this logic
which seems relatively irrelevant(?)
Okay so it creates a new "instance" of the ISRadioAction then adds it to the ISTimedActionQueue
ah big of
looks like its not possible
the adding of the battery is done by javaside
you will probably just change your mod so that your recharge recipe returns the dead batteries into a fresh one
Prob
yeah, honestly idk why you didn't do that in the first place
I was thinking of having a proper appliance that did that, is that possible?
unless you just wanted to make your own special ones to do it
I wanted to have it so regular batteries and rechargables each had their own benefit
Rechargables would hold less charge but were rechargable.
so not all batteries could be charged
Ye
well it might still be possible
Looks like if I wanna implement that I gotta wait for more to be exposed
basically you would just manipulate all the logic in the mod data of the item
and just have a flag in a battery that it is a rechargable one
although it would be quite alot of logic to manipulate all the UI to make it seem like a seperate item
probably
Hm..
even just saying it, I was dreading the amount of stuff you would have to do to get it to work
Man, oh well.
Might be better to wait until I have more experience so you wouldnt have to practically make the mod for me hehe
I dont wanna put you through that
Wonder what would be a good alternative mod..
Eh, perhaps I could still just make a "temporary" version that makes all batteries rechargable.
Though, I'm unsure how possible that is.
Seeing as the way I want to do it is a little strange.
I was wanting to have a specialized Battery Charger object that could be placed on tiles that have electricity to slowly charge batteries within their slots.
Thing is, I'd have to fight to make a functional UI whilst somehow making it all on the lua end.
The lazy way is to just add a recipe, but that feels cheap.
Actually, I just had an idea.
@shadow geyser I hope I'm not being a bother, but how much more possible would it be to simply create a "hand crank" battery charger?
That way you can just charge a battery at a time and use a bit of fitness.
depends on how much quality you want it to be
without an animation, pretty ez
or I guess if you can find an animation that looks like you are cranking you could just use it
Yeye
all you need to do is make another item for the hand crank
then make a recipe with keep handcrank, which basically means, the recipe needs that item, but it wont consume it
then have a Oncreate function which gives the player exp
I'm unsure how realistic hand crank battery chargers are, so perhaps it'd be smart to make it like an electrical thing..?
So you could craft a hand crank out of a bit of electrical scrap, maybe a bit of metal scrap, and some wire.
Would there be a way to make it so it progressively charges as it's done or is that gonna require a different approach?
And what I mean by that, I mean it actually charges the battery as you do it, and it doesn't just wait until you're done to apply it all.
Cuz stuff like liquid transfer is able to do that in real-time and I'd like to know if similar is possible here.
Sorry if I'm asking too many questions

you can. you would just need to then use an Ontest to filter batteries, to only allow batteries with less that 100% uses left, and then your recipe only adds a certain amount of uses back to the battery.
you would then have the battery use the keep keyword as well
Why in the heck would you not just make a simple LUA timer that adds a charge every X minute?
Find the script for a fridge, or similar; Rip it apart, make it charge up batteries.
Remove original batteries from distribution list, add your custom ones; Done.
Original batteries are required due to java limitations.
I can't just make a new battery instance without having to do all sorts of wonk that could break crap
Just what.
(Specifically for radios)
Radios are hardcoded on the java end to only accept Base.Battery
all javaside. and anyways, implementing that would be alot harder than just using recipes
or atleast implementing it in a way that wouldn't lag the shit out of PZ
Anyone knows if it's @sour island's extended helicopter events that has a siren that starts playing sometimes? For a really long time? π€
actually nevermind, if its only every minute, it wouldn't be that bad depending on how you handle it
but either way, alot more complicated than just adding a recipe
So having it charge realtime is more complex?
yes
its less about it being complex, and more about using recipes being incredibly simple
so relative to just using recipes, doing other methods are very complex
I mean, I guess. Though I'd like the opportunity to learn more on the lua end of things.
anyone have an idea why i cant unpack any .pack files? i let it ran for 2 hours on a 1000 kb file and nothing
like i literally just wanna get the tv tiles so i can make an animated tv
Is it the kind of complex that'd be bad for me or is it just like, the kind where it'd just take a bit?
really depends on how much you are willing to just teach yourself to do
I'm def willing to learn so long as I know the end result is possible.
So to my understanding, I gotta figure out how to add onto the context menu, get actions working, somehow find a way to get a loop going when an action is initiated, adjust charge of a battery, yadda yadda yadda.
yeah there is stuff you would need to learn. obviously there are many ways to implement whatever you want, but imo you would need to learn about how to make a new tile. You would want it to be a container. Then the globalobject system would be a good thing to scour through and learn how you use the global obejct system to track these tiles. That gives you a good performant method to finding the batteries to have the charge
Oh, I'm thinking of going with the hand crank for now.
oh I see
Seems simpler and more convenient.
Plus it makes it so Electrical is more valuable since those with high levels can recharge batteries.
Thus making batteries themselves more valuable.
oh if you are going to do the hand crank, then just use the recipes
I just need a way to adding a context menu to batteries with less than 100% charge / are dead to "Charge with Hand Crank" if a crank is available.
just seems simpler
Yeah but recipes wouldnt constantly update the charge would it?
Unless that's an option-
Sure recipes work but it's just bleh
I wanna go for something with at least a tad bit of difficulty so I can learn
I'd need to
- Add item "HandCrank.DeadBattery", which Base.Battery turns into at 0% charge.
- Add Context action to "HandCrank.DeadBattery" item or "Base.Battery" with less than 100% charge
- Initiate an action that begins "charging" the battery a bit every minute or so, with the amount charged varying with Fitness and possibly Depression.
- Stop action when the selected battery has reached 100% charge or the player sprints.
iirc there's a value for items to turn into another upon draining / destroying so
well, just to give a head start on having the actions repeat themselves. here is on I made for something else
function ISAddPollenAction:perform()
local inv = self.character:getInventory()
local count = inv:getItemCount("Hydrocraft.HCPollen")
local args = { x = self.beehive.x, y = self.beehive.y, z = self.beehive.z}
inv:Remove("HCPollen");
sendClientCommand(self.character, 'Beehive', 'addPollen', args)
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self);
count = count - 1
-- add 2 week_unit to check if new action is needed because beehive.pollenAmount wont update immediately
if ((self.beehive.pollenAmount + 2*Beehive.week_unit) <= self.beehive.honeyMax and count > 0) then
-- queue up another pollen action if the beehive has the space for it.
ISTimedActionQueue.add(ISAddPollenAction:new(self.character, self.beehive, 100))
end
end
oo
yeah, ReplaceOnUse is the one
Alright, so lemme try and translate this to try and make sure I'm understanding this correctly..
there is also a replaceondeplete
ReplaceOnDeplete is prob the one I need
Only thing is idk if it'll trigger properly with some vanilla items like walkie talkies / flashlights
Since I'm p sure they just eat the battery when it's lost charge
im not sure exactly which one the vanilla batteries trigger when they run out of charge, so you might have to figure that out by yourself
oh, then you might be screwed with regards to that. might as well try tho
Lemme guess, vanilla actions like that are also java-side-
figured out how to add a new sourceitem to a recipe from code. thanks for the advice @shadow geyser
function editRecipes(){
let allrecipes = getScriptManager().getAllRecipes();
for (let i = 0; i < allrecipes.size(); i++) {
let recipe = allrecipes.get(i) as Recipe;
let recipe_sources = recipe.getSource() as ArrayList;
// For each source -- check if there's a WeldingMask and no WeldingGoggles.WeldingGoggles
for (let x = 0; x < recipe_sources.size(); x++) {
let source = recipe_sources.get(x);
let sourceItems = source.getItems();
if (sourceItems.contains("Base.WeldingMask") && !(sourceItems.contains("WeldingGoggles.WeldingGoggles"))){
sourceItems.add("WeldingGoggles.WeldingGoggles");
}
}
}
}
onGameStart.addListener(editRecipes)```
typescript too
nested for loops yay
vanilla recipes all are correct, but I needed to add this for mod compatibility since they just hardcoded the weldingmask item instead of the tag
yeah all the items that aren't confined to 1 tile are butchered like that, because the 2 tiles are technically different tiles
but tvs are 1 tile
welp
only 1 way to test it
hmm, aren't the wide screens atleast 2 two tiles? maybe im just imagining things
Good old Isometry.
hmm, then maybe its a performance thing? cuz I think atleast the verticle cuts, are where a wall would cover them partially
so that way only half the furniture needs to be rendered when there is a wall partially infront
although I can't explain the horizontal cuts


