#mod_development
1 messages ยท Page 506 of 1
i see...
Apparently people used one of the cheat mods to do this? I remember learning that was a thing when i first released my tile pack
how would you add shaders like that?
necroforge is broken
but it couldn't do modded tiles unless you copied them
not totally sure, tbh. There's a folder somewheres in media\ with shader files, but they're all associated with java code as well.
I want something like the tilespicker but it allows you to place a tile just by clicking on t
tfw no java / lua experience
god it sucks having so many ideas that i just cant realize bc im too busy w shit to learn how to code
I'm legit tho, I have $100 I'm willing to commission this mod with ๐
there's no supported path to it, I'm just straight patching existing bytecode to make it run my code
there's https://github.com/quarantin/javamods from co` that you might find helpful
Is there a reference like https://projectzomboid.com/modding/ for older versions?
depends what version you're looking for, but https://zomboid-javadoc.com/
you need older then that? lol that was from 2015
<!-- Generated by javadoc (1.8.0_45) on Mon Jul 13 17:47:43 ADT 2015 -->
Perfect, also hello Fenris.
anybody? no takers? Plzzzz
are you sure you should post this here? maybe you can try to DM the modders about buying things ๐
Yeah I posted here cuz this is where all the modders mingle
the mingle to help each other and learn mostly.. but anyway im not sure how to do what you are asking anyway
i woud take the 100 if i knew lol
lol so
Basically what I'm asking for
is a sort of "creative mode" ala more build
But allowing you to place any tile
even modded ones
yes yes i know what you are asking for i dont think its even possible, the other players on the server need to have have those files too
No, it's been done before with necroforge, but it required you to clone an existing tile
you cant just 'create' a item and put on a server without the ohter players having those models too
I think you're misunderstanding
i guess lol
I'm talking about TILES not models
and they would be available since the server has them
anyway im sorry i wish i could help ya, im kinda new on PZ modding, but if someday i learn it i let you know
you said there was a mod that did that, did you try to contact this necroforge guy?
maybe he can help you
IT's been discontinued
yes you said that, but did you try to contact him privatly?
Can we get a mod that lets at night time virals spawn from dying light? That would make for some awesome game play.
Are there any mods that add other kinds of zombies?
There's a nighttime sprinters mod on the workshop, could be what your looking for.
i want the threat of the odd sprinter all the time lol, but that is interesting
sometimes people dont want to be contacted privately about mods they make or have made
i dont care, thats why i sugest him, period.
plus the person is offering $100 bucks im pretty sure necroforge would not turn his back on cash
do I need to do something special server side to change a players mod data ?
Can somebody make me a simple Hobby mod please?
I want one called Rat Catcher, +1 short blunt, +1 Sneaking, +1 Nimble, +1 Foraging.
And one called Rat Hunter, +1 short blunt, +1 Sneaking, +1 Nimble, +1 Sprinting.
Description for both- That's Charlie Work!
Sussy Baka
big dodgy
Are there any good gun expansions for multiplayer to be played with friends?
Looking for interesting options but not over the top militaristic
also lookin for something like this, btw have u found any automatic crossbow mod?
Not at all, an automatic crossbow never crossed my mind. Having crossbows would be nice
Iโve heard of this Kitsuneโs Crossbow mod and itโs no longer on the workshop?
hello, i have a problem. i re-installed the game, and now my mods doesnt appear in my mod apart in PZ, but i am still suscribed to them
When you make non gunpowder weapons at home, you are usually restricted to single shot contraptions or manual repeaters at best. But of course the ultimate goal is to build a full auto machine gun style weapon!
That is by no means very easy. Muscle powered weapons are simply not quick enough for a true Brat-a-tat action. Gas powered engines are...
this would be so perfect in pz lol
nvm, it somehow fixed itself
That crossbow may do too little head damage I imagine.
How can I add spawnpoints for custom maps on my dedicated server?
hey @cyan halo did you figure out how to do it?
do I need to transmitModData() after changing player mod data ?
Hey all. Is there currently an NVG mod that works in MP? I've got the NVGs from the Brita pack, but can't seem to operate them.
i got that
on my server
How do I deal with special characters in translation of mods?
For example, I tried to translate the myclothingui mod and letters like ร, ร are being shown as ร
Does anyone know why in game there isn't a space between spear and with when my display name is this?
DisplayName = Spear With Glass Shiv,
Hey everyone, so i have quite a lot of mod installed on my server and it's just a hassle to restart my server everytime there's a mod update. i heard around that to mitigate this you can pack all the mod together to create one single mod. The problem is how can i do that ? can somebody teach me, i looked it up but can't find any tutorial.
lmao
im doing thundercats cosplays now lol
did you look at the translation files?
how
Can somebody make me a simple Hobby mod please?
I want one called Rat Catcher, +1 short blunt, +1 Sneaking, +1 Nimble, +1 Foraging.
And one called Rat Hunter, +1 short blunt, +1 Sneaking, +1 Nimble, +1 Sprinting.
Description for both- That's Charlie Work!
you mean trait mod?
i did not mess around with new traits yet, but since you dont need blender or photoshop it might be real easy to do it
you talking about traits right?
ya!
Hobbys are things that are like jobs
jobs give the hobby, and hobbys are listed under traits
wiki lists them seperate
dang i never notice that lol
i will look into it someday prb, could not hurt add 2-3 new traits on my mod
you could basically just make it a trait really not sure theres a difference
i was thinking they could just modify the hunter one
rename and swap the 4 bonuses
you think you could make it?:P
nah changing vanilla stuff is not nice, its better just add new traits/hobbies
yeah sure
Thanks a ton!
i was real annoyed at the lack of traits giving a +1 to blunt in particular lol, getting the other traits i like is nice
my friend in MP already has carpentering and mechanics so kinda waste for me. and i like the sneaky bonk build:P
you know how to find the mods itself on your PC?
inside those 20020202 number folders i mean
you need to change the encoder on the text file
i can find them on workshop and put them in folders if need be
i'm not sure which one you'd need so you'd prolly need to look up which one for the characters you want to use
does anyone know how save/load data for a mod? i'm guessing register the save/load with OnServerStartSaving and OnServerStarted events respectively
if you could find a very simple mod on steam that add like 1-2 traits would be perfect, i could do it for you i guess
isnt your pic DBZ ginyu force? lol
Anyone managed to track down adding new colours for the map system? (New pens with matching colours that can be applied to markers)
hum prb nobody tried that yet
Yeahh was figuring as such.. Spent the past 2 days hand drawing every symbol I could think of in vanilla style for the map, would love to finish off the mod by adding a white (To mark industrials/darker areas) and green (for ticks! :D).. Just found some stuff I'd missed in the pencil.x file so cross your fingers for me I guess ๐
That would be a neat little QOL mod
So with my habit of trying to find and fix bugs, a lot of them would require modifying the vanilla Java code to test potential causes and solutions. Is there a guide to doing that? (For my own personal use in testing, not for redistribution or making mods.)
https://theindiestone.com/forums/index.php?/topic/44491-4165-singleplayer-saving-and-reloading-breaks-lbmw-radio/&do=findComment&comment=332877 This is the solution I'm trying to test at the moment, if that helps.
โข Version: 41.65 โข Singleplayer/Multiplayer: Singleplayer โข Host or dedicated: N/A โข Mods: No โข Reproduction steps: 1. Start a new game. LBMW radio works fine. 2. Save and close save. This does not require closing the game, but the effect is the same. 3. Load the save. At this point LBMW radio wi...
@weary matrix you might know, since you're familiar with java modding? Or at least more familiar than I am.
The most I've managed to do is rewrite the bytecode in a class file to change a false to true, so.
if you just want to edit some class files in place check out https://github.com/Col-E/Recaf
@teal slate why not recompiling?
Someone know a mod that make unbreakable the tools?
@teal slate just do something like this: javac -cp /path/to/your/pz/install/folder Radio.java or something
@teal slate sometimes it's painful cause you have to fix the broken java code from the decompiler, can be tedious for let's say LuaManager
yyyyeah
but nothing too hard, it's mostly annoying
the tool i had to edit decompiled code and bytecode in-place only worked for bytecode
recompiling will pppprobably be okay
when there's lambda too
ahhhhhhhh this is spewing out hundreds of errors ๐ฉ
package not found
should i be compiling it against the pz install or the decompiled source
oh right
they use uhhh, java 15?
you also need to supply the jars
aren't the jars in the pz install?
so assuming your path to zomboid install folder is /steam/ProjectZomboid just try this: javac -cp /steam/ProjectZomboid/*:/steam/ProjectZomboid YourClass.java
yes they are but jar file have to be explicitly specified, or using a wildcard
but java won't try to list the folder to find jar
ah no sorry
hah
also you're using a crap OS that decided to change every standard available ๐
i noticed
so for example on windows : is not a correct path separator because of the drive
so you have to use ;
and now i need to use java 13
really? ๐ฎ
aaah
Java 15 uses major version 59
just do -target 13
or something
hold on
mm no
@teal slate try this --release 8
i said this, then realised it was the opposite way around
@teal slate also I'm not sure but you might want to set that --release flag at the beginning of the command
ah, good news
the only errors left are the ones i made
i swapped var7 and var6 in my code
nice ;D
it might hide other errors though
but at least it probably means you got passed the import step which is good
Going to bed, cya
Took longer than I would have liked but I finally found it...
Incoming QOL map marker mod ๐
so how do i access the mod making thing
most simple mods are made in a text editor like visual studio code or notepad++
unless you're adding just basic recipes/items you'll need to learn a bit of lua and get to grips with zomboid lua events to get started
How are you all testing server/client interactions in-game? do I setup a server with my mod? do I host a game from menu and start another client? (I tried the latter but every time I join it gives "Already Authenticated")
Nevermind, I got it working. You need to run PZ in non-steam mode if anyone is curious
{
DisplayCategory = Household,
Type = AlarmClock,
DisplayName = Alarm Clock,
Weight = 0.5,
Icon = AlarmClock,
AlarmSound = AlarmClockRingingLoop,
SoundRadius = 10,
MetalValue = 25,
WorldStaticModel = AlarmClock,```
Is there anyway I can edit how long the clock alarm will ring?
OnConnected and OnDisconnect do nothing serverside and clientside??
FWIW Soul Filcher's Relaxing Time also adds green colors to the map.
When it works that is. ๐
It should, are you trying in single player or mp?
mp
I have a server running with my mod
super simple setup
but it never gets called
I've had to do it a hacky way
local players
local function OnConnected(player)
print("OnConnected:", player)
end
local function OnDisconnected(player)
print("OnDisconnected:", player)
end
Events.OnTick.Add(function()
if players == nil then
players = getOnlinePlayers():clone()
for i = 0, players:size() - 1 do
OnConnected(getOnlinePlayers():get(i))
end
else
for i = 0, players:size() - 1 do
local player = players:get(i)
if not getOnlinePlayers():contains(player) then
OnDisconnected(player)
end
end
end
for i = 0, getOnlinePlayers():size() - 1 do
local player = getOnlinePlayers():get(i)
if not players:contains(player) then
OnConnected(player)
end
end
players = getOnlinePlayers():clone()
end)
@acoustic siren if you're interested
Thank you, might have just saved me a tonne of work there!
IDK, if you just added new colors to the map it'd still be worth it. Relaxing Time adds a bunch other stuff too.
Does the server not know what is in a player's inventory??
for i = 0, getOnlinePlayers():size() - 1 do
local player = getOnlinePlayers():get(i)
local items = player:getInventory():getItems()
print("items", items:size())
for i = 0, items:size() - 1 do
print(items:get(i))
end
end
prints 0
Do I have to place my mod folder in Zomboid's mod folder? Cuz it is not showing up for some reason. I need to test my mod
@zealous wing I meant I can just look at how they achieved it ๐ I plan to do a "Vanilla map markers expansion" which will only be new markers drawn to look like vanilla ones, i thought the green and white pens would be a nice addition. So more lightweight/streamlined than what others are going for - less a random box of stuff.
Anyone having trouble loading into server with -Ddebug?
i get that error:
java.lang.RuntimeException: Cannot override modID. ModID=pz-vanilla
WorldDictionary: Warning: error occurred loading dictionary!
ERROR: General , 1641381100007> ExceptionLogger.logException> Exception thrown zombie.world.WorldDictionaryException: WorldDictionary: Cannot load world due to WorldDictionary error. at WorldDictionary.init line:255.
What's the full command you're using?
@weary matrix no i mean like, my client trying to connect to the server (as admin access account)
After the loading it just crash
well not crash but
I used to be able to join my server in debug mode but its been a while since i had it enabled
Nothing special in console.txt?
LOG : General , 1641381099904> WorldDictionary: Checking dictionary...
LOG : Network , 1641381099970> Delay processing packet of type IsoRegionServerPacket while loading game
LOG : General , 1641381100001> ===================================
ERROR: General , 1641381100003> java.lang.RuntimeException: Cannot override modID. ModID=pz-vanilla
ERROR: General , 1641381100003> at zombie.scripting.objects.Item.setModID(Item.java:3223)
ERROR: General , 1641381100004> at zombie.world.DictionaryDataClient.parseCurrentItemSet(DictionaryDataClient.java:37)
ERROR: General , 1641381100004> at zombie.world.WorldDictionary.init(WorldDictionary.java:213)
ERROR: General , 1641381100004> at zombie.iso.IsoWorld.init(IsoWorld.java:2296)
ERROR: General , 1641381100004> at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:260)
ERROR: General , 1641381100004> at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:217)
ERROR: General , 1641381100005> at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1641381100005> WorldDictionary: Warning: error occurred loading dictionary!
ERROR: General , 1641381100007> ExceptionLogger.logException> Exception thrown zombie.world.WorldDictionaryException: WorldDictionary: Cannot load world due to WorldDictionary error. at WorldDictionary.init line:255.
ERROR: General , 1641381100007> DebugLogStream.printException> Stack trace:
zombie.world.WorldDictionaryException: WorldDictionary: Cannot load world due to WorldDictionary error.
at zombie.world.WorldDictionary.init(WorldDictionary.java:255)
at zombie.iso.IsoWorld.init(IsoWorld.java:2296)
at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:260)
at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:217)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : Network , 1641381100100> Delay processing packet of type IsoRegionServerPacket while loading game
I dont have any mod with id pz-vanilla im confused xD
Corrupted save maybe?
as an admin, i do skip checksum
without -Ddebug set it works
ill try without workshop dir
meh same error
guess that could be because i need the default admin account with username admin
Try to reset your user profile
Why does server not contain inventory information for players?
On client side
@weary matrix you replying to me?
@cyan halo if it doesn't it could be because player are saved on the client machine.
That's super confusing
No
and unsafe
@cyan halo i feel your pain lol
I thought at least some things would be authoritative
lot of thing is not safe in the pz
but this means I could edit my own save file for a server and get many items
I'm trying to make a mod so that when a user goes offline they become lootable in a sleeping position
if i had one wish it would be that it is rewritten with authoritative in mind. But that would mean too much changes and work I believe.
it been this way since mp in old pz
wow
Players aren't saved on the client anymore? That was b40 MP.
Oh really? What makes you think so?
Well, maybe a copy of the players is saved on the client.
@willow estuary I can't seem to get the server to print items in a player's inventory
well thats how it was if im not mistaking. But i do not know if it changed today.
havent looked at that yet
@willow estuary even code this basic
but it works on client
Oh, I mean, I don't know how to access the inventory of an offline player?
I just was under the understanding that the player data was switched from being stored on the client to the server for b41 MP is all.
@willow estuary if that were the case, the server would load the inventory and send it to the client, and I'd be able to access what's in a players inventory
anyone have a compatibility patch for britas and scrap guns for disassembly?
@willow estuary even picking up items and the server still sees nothing, seems this is handled completely clientside
that sucks tbh
I don't even really know what you're trying to do here, but it's not something I can help with?
I was just clarifying that in b41 MP, vs b40, the player data should be saved on the server, and not the client? Albeit there may be a player side copy.
@willow estuary I've had some player roll back after restart.
Only one player was rolled back on all the players.
Not sure if it server sided but doesn't look like somehow.
But if you're trying to access the player data of offline players as if they were a player, that shouldn't work as that player shouldn't be instanced, they just exists as a record on the server and not as an actual player object until the player connects and a player object is made using the recorded data.
is there a bug with loot moving right now? after some time in game i can't drop big stacks of stuff, just drops like 20 , and i cant loot stuff
Anyone knows what this means guys?
ignoring invalid ItemPicker item type
Why can it be wrong item type?
Unless it's associated with a STACK TRACE, "red numbers", or crashes, those sort of Error/Warn messages relating to "itemPicker", "missing translations", "tildef must be from 10-1000", or "missing cont distribution for" can almost always be ignored.
It's just "developer nagging" regarding something that might have been an oversight in the assets, and not indicative of anything that generates actual errors, crashes or other significant issues.
Thanks, it was my fault about the id of the mod. I'm trying to get the game's feel on modding currently ๐
@teal slate Hey, any luck checking out that bug?
Oh! If you're trying to mod, and not a mod user, I can give a more detailed explanation? Sorry, I'm used to dismissing concerns about those messages, but there is one instance where it could be relevant when modding? ๐
Usually, IME, that invalid itemPicker type message comes up when an item distribution table is consulted, and there's an item in the table that doesn't exist in the game instance?
This happens in vanilla with older, removed items that are still in the tables, for example.
So, if you are making a mod, and it's related to your item, then it may indicate that your item script might not be loading; that there's an error in the item name, or the module, and such?
Haha ๐ I can understand the automated system. I just started trying out adding a new item. Actually I saw somewhere from forums someone wanted a swiss army knife, so I went ahead and tried creating it. That error was because I have changed the id of the mod but forgot to change it on the item txt file. Right now I can see it in game.
Another issue I'm seeing rn is, I could make it count as a screwdriver together with the function of a can opener however, multiple tags or attachmenttype s seem to have issues. I'm thinking if adding a dummy invisible item on the inventory could work?
Nah, multiple tags work no problem.
Separating with comma did not work
however adding another line did
item SAK
{
Tags = Screwdriver;CanOpener;Corkscrew,
ahh
Look at how vanilla does it for stuff like that ๐
didn't know a multipurpose item existed
do you know by any chance what tag does slice breads
That doesn't have a tag yet ๐
In regards to making a Tag and reciper overhaul for slicing bread and such, I would just wait, I'm sure better use of the tag system is gonna be one of the things they touch on when they get back regular updates and polish to b41?
Hey there, hope I'm not interrupting your discussion... I'm trying to freely build (non carpentry or metalworking stuff) as an admin on a MP server, but I'm not sure if it's possible in the base game... I've looked through the game files and I'm kind of stuck. I wondered maybe somebody found a solution to this ? Is there a mod I'm missing that would allow me to do what I want ? Thanks in advance !
I see, but then how does the game differentiate knives? Are they hardcoded one by one rather than a tag system? I mean, even creating the item based off of a knife doesn't help it.
Look at the vanilla recipe files. Like I said, I'm fairly certain they'll be improved with a tag system sooner than later?
It's not that great right now ๐
anyone here tried the True music mod on MP?
I got it. OKay currently I can still force the knife functionality it seems. I'll try it.
Until we get a recent update on it, as you have mentioned the recipes are the way to go! Thanks a lot for your time and help ๐
Is it actually possible to modify a player's speed/damage?
I've been trying with a method of mine, but it either doesn't work or too unnoticeable even despite trying to set them to insane values.
Tried "_target" to manually apply sethealth and well, damaage zombies more but that doesn't seem to work.
Doesn't seem any workshop mods have achieved this goal either so I'm also doubting it, but I want to hope it's possible to do for traits and such.
a quick look gives me the indication that it's the items that carry damage modifiers, not the person
now, you could make a function around the following line:
getPlayer():getPrimaryHandItem():setMinDamage(3);
Where you get the damage of the item in hand(s), then multiply it by whatever you want it to be increased by.
could possibly do it on item pickup, or item equip
I was about to ask if I was going to have to modify EVERY item individually, but I actually forgot the primary hand item was a thing in the code.
as for speed, the sneakers give an increased modifier, i'd find what code causes that, then do the same as above and increase it depending on footwear
yeah the problem with that would be if you wanted it on MP, doesn't make sense for everyone to have a pan that does insane damage
As funny as it may be, yeah.
Although it would test if player has the trait, just after if it's true the player has it I have to put everything in it.
so i'd hook it into on equip, characters get a modifier, then it pulls that modifier and applies it, and on unequip does the opposite, so it sets the items damage to damage/mutliplier, rather than damange*multiplier
Which one, the radio one? Yeah, the fix I was testing worked fine.
sweet
Would getPrimaryHandItem apply to double handed weapons? Or would I use "getUseHandWeapon"? Or something along that line
I don't know
@teal slate since you seem to be in the mood for bug fixing, what about this one? ๐
Error with packet of type: 56 for <player name>.
java.lang.NullPointerException: Cannot read field "OnlineID" because "this.player" is null.
at zombie.network.packets.SyncClothingPacket.write(SyncClothingPacket.java:85).
at zombie.network.GameServer.receiveSyncClothing(GameServer.java:4253).
at zombie.network.PacketTypes$PacketType.onServerPacket(PacketTypes.java:290).
at zombie.network.GameServer.mainLoopDealWithNetData(GameServer.java:1535).
at zombie.network.GameServer.main(GameServer.java:797).
Just the primaryhand will do for now, but ensuring it can apply to all weapons in general would be ideal.
Oh god it's networking. Maybe, I'll take a look
the more player the more frequent the bug occur
Could be something like uh, the reason radios all show up as 0.-1MHz in chat
player just doesn't get set sometimes
๐ค
time to get coffee and check the code
yeah I've had this problem recently
wondering if this bug was always there or introduced recently
I looked into the heavy item duplication bug and couldn't make heads or tails of why it happened
is there a way to remove the debug timer while in debug mode? want to see if the timer feel correctly when debugging the code ?
Netcode and inventory code is cursed tbh
I'd say spaghetti cursed ๐
Spaghetti code is something I'm used to, as an SS13 fork dev
I've worked on code that's old enough to drink.
heh
We celebrated the 10th birthday of some code on the day we ripped it out
Anyway, biggest issue is probably actually a lack of documentation and the awful decompiler var names
The one I used doesn't even do stuff like int1, string1, etc
there is nothing better then get an assignment hey could you integrate this stuff into our legacy system
Just var1, var2, var3
have you tried BeautifulJava yet?
I replace the shitty names with a name based on the type
still not that much helpful for primitive types, but for the rest it's quite helpful
guys what are your suggestions for top hardcore, hard af, no kids allowed, kick in the balls mods that sends dark souls experience to bed?
I haven't
I'd suggest asking in #mod_support, this channel is for mod creation! :P
If anyone is playing with the 'family manor' mod. Where the hell is the key from this house?
my intuition, while i'm still setting up beautifuljava, is that the stacktrace isn't going to be useful and it's going to be elsewhere, i.e. when the packet is formed
also, vanilla or modded?
modded, but looking at the code I'm pretty sure the bug is here in vanilla too
and I'm also pretty sure it's related to the bug where the player is missing sometimes
you'd better ask in #mod_support here it's about developing mods
ty
aaaaaaaagh there's no windows binary for beautifuljava is there
@weary matrix do you know if there any lua script or is it the zomboid server there look at the variable "sandbox_fuel_optionN"
wonder if i can run it with git bash lmao
where n is the N is the option from 1 to 8
i sure can
@teal slate it's a not a binary, it's just bash script, and yeah you should run it with git bash, that's what I use for testing it on windows
@mint sphinx good question
i realised that maybe it wasn't a binary, but the lack of a .sh extension threw me off :P
@teal slate well my thought was most windows users don't make the difference between a .txt and .exe so... ๐
wowwwww
and how many of those most windows users would be running BeautifulJava? ๐ค
i did, but i just assumed that because of your apparent disdain for windows, you just didn't include a binary :P
@mint sphinx well I don't have that variable anywhere
i tried it in git bash anyway
Javadoc Project Zomboid Modding API declaration: package: zombie, class: SandboxOptions
maybe?
@teal slate well I think windows is a crap OS but I also know most people around the world use it, and I wanted my tools to help pz modders, most of which use windows too
and you can't imagine how hard it is to write bash scripts that runs on Linux, Mac, and Windows ๐
I got the base script working for linux in a few hours, then it took me like two extra weeks to make it work properly on windows and mac
usually people just provide two or three separate scripts :P
@teal slate but where would be the challenge? Also I would have to maintain 3 separate scripts
@weary matrix thx anyways hmm also i think there is bug in it and couldnt just find out where the thing is set at all. going to report it and then they can try to have a look at it xD
where do you see this variable?
the reav variable name im looking for is this Sandbox_FuelStationGas_option7
which i only can find in the translate.txt and i think the code somewhere have the enum swapped around for Sandbox_FuelStationGas_option7 and Sandbox_FuelStationGas_option8
hmm maybe you meant Sandbox_FuelStationGas_option as suggest my JadeLavenza?
this one I have
oh ok
let me check
@mint sphinx it's defined in the scenario/sandbox settings, look:
$ luagrep -R FuelStationGas
client/DebugUIs/Scenarios/Multiplayer.lua: SandboxVars.FuelStationGas = 4;
client/OptionScreens/ServerSettingsScreen.lua: { name = "FuelStationGas" },
shared/Sandbox/Survival.lua: FuelStationGas = 4,
shared/Sandbox/Survivor.lua: FuelStationGas = 4,
shared/Sandbox/Apocalypse.lua: FuelStationGas = 4,
shared/Sandbox/Beginner.lua: FuelStationGas = 7,
shared/Sandbox/Builder.lua: FuelStationGas = 4,
shared/Sandbox/FirstWeek.lua: FuelStationGas = 5,
shared/Sandbox/SixMonthsLater.lua: FuelStationGas = 4,
yea also the only place i can find it more or less which annoring. because i thing fuelstationgas = 6 do what fuelstationgas = 7 should do and inverse..
what do you mean? Like 6 gives more fuel in gas station than 7? ๐ค
constantly reminded of how intellij is the worst thing ever ๐
how so?
ah yeah
like 6 give infinity fuel in the pump pumps and 7 give full fuel in the gas pumps
same thing when using BeautifulJava? I just use the java-decompiler.jar from IntelliJ
it seems less slow but i haven't done any huge searches yet
.
so i can find it easier
well BeautifulJava will just provide you with a folder containing the source code, there's no editor or anything in there
so you can use whatever editor you're used to
oh wait
it specified to have intellij
not necessarily use it
fair enough, but now i have it open :P
yeah
public void sendClothing(IsoPlayer player, String string, InventoryItem inventoryItem) {
if (player != null && player.OnlineID != -1) {
SyncClothingPacket syncClothingPacket = new SyncClothingPacket();
syncClothingPacket.set(player, string, inventoryItem);
ByteBufferWriter byteBufferWriter = connection.startPacket();
PacketTypes.PacketType.SyncClothing.doPacket(byteBufferWriter);
syncClothingPacket.write(byteBufferWriter);
PacketTypes.PacketType.SyncClothing.send(connection);
}
}
hah
yeah I know
ahhhhhhh
@teal slate isn't it more enjoyable to read the code now? ๐
i see it.
ummmmm
public boolean isEquals(IsoPlayer var1, String var2, InventoryItem var3) {
is it,
should i not be using the decompiled folder
decompiled folder is the raw decompilation result from intelliJ
hmm but what you pasted was already from the source folder right?
heh
somehow i'd accidentally opened both :P
but i was explicitly searching the decompiled folder, i think i may have used go to file
I still have a bug I have to fix, like sometimes some variables get a name that's just wrong, not sure what's the reason
zombie.network.packets.SyncClothingPacket.parse doesn't call set
so this.player is just never set
wait
no, i just didn't read
it's not calling set but it still set this.player
okay, packet format is...
problem is here I believe:
static void receiveSyncClothing(ByteBuffer byteBuffer, UdpConnection udpConnection, short short1) {
SyncClothingPacket syncClothingPacket = new SyncClothingPacket();
syncClothingPacket.parse(byteBuffer);
for (int int1 = 0; int1 < udpEngine.connections.size(); ++int1) {
UdpConnection udpConnection2 = (UdpConnection)udpEngine.connections.get(int1);
if (udpConnection2.getConnectedGUID() != udpConnection.getConnectedGUID()) {
IsoPlayer player = getAnyPlayerFromConnection(udpConnection);
if (player != null) {
ByteBufferWriter byteBufferWriter = udpConnection2.startPacket();
PacketTypes.PacketType.SyncClothing.doPacket(byteBufferWriter);
syncClothingPacket.write(byteBufferWriter);
PacketTypes.PacketType.SyncClothing.send(udpConnection2);
}
}
}
}
see how it gets the player from the current udp connection
but then this player instance is not used so...
yeah, but syncClothingPacket.parse should ensure that the packet's player it's non-null
it's used for nullchecking
it does, but it takes the player from another place
we don't wanna waste time sending to a dropped/non-in-game connection
- short onlineID
- UTF location
- bool hasItem
- serialised item?
- serialised HumanVisual
- serialised ItemVisuals
wait
it should add the player to the byteBufferWriter
it shouldn't, i think
player on the packet is the source of the packet
this is distributing it to other players
hmm maybe
it goes client->server->client, i think
this.player = (IsoPlayer)GameServer.IDToPlayerMap.get(short1);
this must be failing, then
problem is parse() is getting the player from (IsoPlayer)GameServer.IDToPlayerMap.get(short1); while receiveSyncClothing is getting it from the UDP connection directly
because that's the player the packet is being redistributed to! :P
they're supposed to be separate players
for (int int1 = 0; int1 < udpEngine.connections.size(); ++int1) {
guess you're rigth
it's just broadcasting it
that said
receiveHumanVisual seems to have more guard conditions
byte byte1 = byteBuffer.get();
IsoPlayer player = getPlayerFromConnection(udpConnection, byte1);
if (player != null) {
try {
player.getHumanVisual().load(byteBuffer, 186);
} catch (Throwable throwable) {
ExceptionLogger.logException(throwable);
return;
}
could be worth just adding this? that'd check the incoming udp connection and ensure that there's a player
likewise with receivePlayerAttackedItem
IsoPlayer player = getPlayerFromConnection(udpConnection, byte1);
if (player != null) {
yeah i think the issue could be that by the time the packet is processed, the OnlineID is invalid
I donโt want to interrupt but was hoping I could get a quick opinion
How hard would it be for someone who has no modding experience at all to do a clothing mod? Iโm pretty sure I saw a mod that just gives the barebones of what is needed code-wise (or whatever) but likeโฆ if you were to model something and not just reskin anything in the game
What would that be like?
I think you can do that entirely with scripts, no Lua involved except for maybe translations?
aha
the issue is keeping track of player at all
stuff like SyncInjuriesPacket just keeps track of the ID
public boolean set(IsoPlayer player) {
this.id = player.getOnlineID();
this.strafeSpeed = player.getVariableFloat("StrafeSpeed", 1.0F);
this.walkSpeed = player.getVariableFloat("WalkSpeed", 1.0F);
this.walkInjury = player.getVariableFloat("WalkInjury", 0.0F);
return true;
}
so i'd probably just rewrite SyncClothingPacket
private short id;
private String location = "";
private InventoryItem item = null;
public void set(IsoPlayer player, String string, InventoryItem inventoryItem) {
this.id = player.getOnlineID();
this.location = string;
this.item = inventoryItem;
}
in the instances where we use something in player other than getHumanVisual we should probably be getting player from onlineID
some of the reasons we keep a reference to player is for debug info?
Thank you! This is Greek to me, now, but Iโve saved it for when or if I try to add more clothes.
so i suppose we could probably keep it
oh, the rest of this is just me trying to fix a bug
Oh
this is all you should worry about ;P
hmm, actually, rewriting it is totally unnecessary. the correct thing is the guard conditions like the other receiveSuchandsuch functions
if you show me the resulting code I could get it tested somewhere
the interesting thing is that the guard condition exists
it's just... inside the for loop
if it works I'll submit a bug report to TIS with the patch (unless you're willing to do it of course)
which is weird; you should probably only check it once, prior to entering the loop
but either way, it IS checked... which is double weird
wait
... can there be multiple players on one UdpConnection?
mmm I doubt it
i mean there's code for it
oh
the difference is:
IsoPlayer player = getAnyPlayerFromConnection(udpConnection); for receiveSyncClothing
maybe when playing with coop/ splitscreen?
IsoPlayer player = getPlayerFromConnection(udpConnection, byte1); for basically everything else
can you play splitscreen on remote servers??
i wouldn't be surprised that that's an untested edge case causing disappearances and errors
I mean locally, like hosting the game and using splitscreen?
still has to use the server part in that case right?
dunno
the issue is that the server part isn't checking for the possibility of multiple players on one connection
or like
i guess multiple players at the same house, potentially?
same source, same destination?
if two players shared the same UdpConnection and one disconnected, it would probably result in these errors
hmm. i might just make id a public field on SyncClothingPacket
oh wait
getHumanVisual also does getAnyPlayerFromConnection
weren't characters disappearing?
a lot of these use getAnyPlayerFromConnection
The server where I got the log from is a regular dedicated server though
what i asked was if that's a possible scenario on a regular dedicated server :P
and i think it could be
hmm
i.e. two players sharing an external IP might have the same UDP connection; idk, i'm not a networking person
the only other thing i could think of is uhhh
IsoPlayer is deleted when it dies, no?
they might share the same IP but would still use different UDP connections
so if a HelmetFall is triggered by death, that'd do it
or a hole being torn in clothes simultaneous with player death
I think I saw the bug occuring for a player who just connected to the server
doesn't have to be the player it occurs for
i'm not good with networking though :P
and by not good i mean i know nothing about it
@teal slate well I know how to write networking code, but struggling reading crap networking code basically
I don't even know how it's supposed to work in that case which is clearly not helping
I think the network architecture is much more complicated than it should, maybe I'm wrong though
Hey guys! Anybody have a "Distributions.lua" with only food spawn?
Does anyone know if thereโs a mod to change the default timed action scale? Like the dexterous trait but applied server wide?
Does anyone know a way to obtain the list of "dropped" items in the world?
Or where the Render3DItem gets called when loading into the game to render all the items?
Has anyone made any visual studio code snippets for lua modding? Only thing Iโve found thus far is pz-mod for intelij
@weary matrix do you have an code example on that you require an item on you before it addoption to the context menu ?
There is some way to be able to create constructions in a "creative" way to put zones on a server
It would be something like mapping an area but without having to enter the map editor
Which I have no idea to use
to know, a friend put mods in heberegent his server but since that saving does not work any more. Why?
try under mapping channel
thx i guess going to have so long if statement lol..
see if the player distance is to far away. if the player have this item , and if this items is this isomatic item ^^
if x and y and z then
ezpz
i know just look ugly to see ๐ and i knew you use the "and" name
is there a mod for temporary power and water shutoff?
the game isn't that lively without water and power, but i don't like it being infinite either
if you have any bugs that don't have to do with netcode, i'd be happy to take a look, btw :P
haha will try to think about it ๐
most of the recent bugs I've seen are network related though
drat...
i'm taking a network security class this semester, so maybe i'll learn a thing or two and be able to poke at it :P
nice!
btw just managed to get javassist to work in my javamods framework!!!!
it means I can hotpatch the game!!!
no need to do stupid replacement of .class that breaks for each game update!!!!
nice!
@teal slate just have to do this for example:
public class JavaModTest extends JavaMod {
@Override
public List<Patch> getPatches() {
return Arrays.asList(
new Patch("zombie.network.GameServer", "main", "System.out.println(\"w00t\");")
);
}
}
absolutely no idea! it's a java library/framework for runtime code modification used primarily for minecraft modding
ah I see
it's similar to, uh. harmonylib for C#, used by rimworld and caves of qud
I guess mixins is using javassist too?
oh, is it?
it uses ASM instead of Javassist
but it's the same idea, yeah
Is there any write up of how save data is stored? Specifically, what time it is on the server in game. Id like to make a little web app thats shows game info
I have a request for a mod. Idk if I'm allowed to seek commission work here, but here I go:
I'm willing to pay 50 bucks, but the price is negotiable
Essentially, I'd like an antiviral drug mod that spawns in the same loot tables as other medical equipment.
kind of already exists
If you're infected with the zombie virus, you'd have to keep taking these drugs every day or two
The drug doesn't cure you
But it stalls the virus until you have to take it again
So once you're infected, you're infected. And if you can't find any more of the drug, you'll die
https://steamcommunity.com/sharedfiles/filedetails/?id=2703664356
https://steamcommunity.com/sharedfiles/filedetails/?id=2512119000
here are two mods that might interest you
They don't seem to be the kind of thing I'm looking for. Also don't work for the most recent build. Thanks, though
I don't really want an expansive solution with skills, research and books etc.
Really just a single antiviral drug that can keep the infection at bay until you have to take it again
~~how would I detect if a player is wearing pants? ~~
Stabilizing Syringes in this one https://steamcommunity.com/sharedfiles/filedetails/?id=2666123663
Would I be able to make a new local sqlite db in java and also use methods from classes from project zomboid to make mods?
I was looking and it seems java modding is available, but want to make sure I could also create a custom db to put data into and pull from with for modding
Closer to what I want, but still allows for a total cure, and I don't know what the rarity are of those syringes.
I can upload an alternate version w/o the total cure, and adjust the rarity to your preference in the alternate version? By default they're rare.
I'd like the stabilization to spawn in the same places and at the same rarity as antiobiotics
You got it.
I have been trying to change the ZombieSurprisedPlayer sound but just changing it is not the issue I am running into. I want the sound that is played to be randomized between multiple sounds. I know what the suedo code would look like but if someone can either show me how to do rands and if statements in this language or just tell me what language all these txt files are then I could look up what I need to.
module Base
{
sound ZombieSurprisedPlayer
{
category = Zombie,
clip
{
file = media/sound/whatever.wav,
}
}
}
That is not Lua. That's a script file.
It's not an interpreted language, or a language at all, really.
As far as I know it's a glorified config file.
I call it the bastard son of JSON ๐
I'll see myself out. I assumed, and I shouldn't have.
Wait them how am I supposed to have random value that I can sort through with if statements.
Well, there's this;
sound MaleZombieCombined
{
category = Zombie,
clip
{
event = Zombie/Voice/MaleA,
}
clip
{
event = Zombie/Voice/MaleB,
}
}
So you could maybe try:
Do you know if that only plays one randomly
I don't know, but I think it does.
The thing is, I don't know if file is an actual attributeโall I see is event, which uses the fmod sound banks, which are a pain to work with
Ah, wait, there's code for it.
private static void loadNonBankSounds() {
if (BaseSoundBank.instance instanceof FMODSoundBank) {
Iterator iterator = sounds.iterator();
while (iterator.hasNext()) {
GameSound gameSound = (GameSound)iterator.next();
Iterator iterator2 = gameSound.clips.iterator();
while (iterator2.hasNext()) {
GameSoundClip gameSoundClip = (GameSoundClip)iterator2.next();
if (gameSoundClip.getFile() != null && gameSoundClip.getFile().isEmpty()) {
}
}
}
}
}
... except it looks unfinished
Is that a .lua file though?
I'm mostly just trying to process the code and thinking out loud to see if what you're doing is possible.
@cursive junco why not adding different sounds and just choose randomly from Lua? Don't know if that's possible
The mods on the workshop I am looking through for that sound are .txt files that just have one sound. Most of the .lua files are server side I think. I've only looked through the files a little.
Either the decompiler is broken or there's no code for actually using the file attribute in sound scripts.
since the body of this if is just empty
I think it is something you would need to test in game
it's also broken in the raw decompiler output so it's def. not beautifuljava
aha
} else if ("file".equals(string)) {
gameSoundClip.file = string2;
there it is
okay, so thaaaat works. what else
GameSoundClip gameSoundClip = gameSound.getRandomClip();
AHA
Yeah.
You just define multiple clips @cursive junco
module Base
{
sound ZombieSurprisedPlayer
{
category = Zombie,
clip
{
file = media/sound/file1.ogg,
}
clip
{
file = media/sound/file2.ogg,
}
}
}
And it picks one of the clips at random.
That's awesome and the files just need to be different names?
Yeah, I think so.
Actually looking into this more. Would I be able to get the same effect by creating a LuaTable and storing it? Not sure if Lua has an option for sqlite either. In general just need a way to store a good chunk of data locally about the player
Look into (Global)ModData, maybe?
Perfect. I'm going to try it out, I have like 30 different sounds so we shall see.
Maybe, not sure how well it would handle storing a lot of dynamic data. Potentially thousands of entries
That's the main reason I'd like to use a db if possible
I haven't quite entered the Zomboid modding scene yet, so I'm curious if there's any method of telling how many days an item had existed in a world?
I have a peculiar idea I wanna experiment with when it comes to alcohol.
Also, apologies if I may stop by to ask questions here a lot in the future, this is my first time modding a game.
@quasi geode I'm having an issue with pf:
> I set removedefaultraits to true
> I add the vanilla traits (by your example file), with modified costs & skillpoints
> ingame the description is doubled
> costs are not altered
> skillpoints are not altered
> functions for spawning new items are run
Lastly does anyone know if there is an easy way for me to test this to make sure it works or do I just load up a single player world and try getting scared
using github version or workshop? because the remove default traits option has no effect on workshop version. thats all part of a system for replacing the vanilla traits with pure pf versions of them..the stuff in the examples was going to be moved into a more useful file.
but is all unfinished work
github
ah well then your playing with experimental features i havent truely finished or properly tested. why that version still isnt released XD
dag naggit
not sure how the vanilla ones are still overriding though, since if the flag is set it wont call the vanilla function that declares them
I like to put my test stuff triggered by a key press, in this case it's the comma , key. This should play the sound when the comma key is pressed, I think. Haven't tested it though.
local TestFunctions = {}
TestFunctions.testKeyUp = function(keynum)
local specificPlayer = getSpecificPlayer(0)
if (specificPlayer ~= nil) then
if keynum == 51 then
specificPlayer:playSound("ZombieSurprisedPlayer")
end
end
end
Events.OnKeyPressed.Add(TestFunctions.testKeyUp)
What exactly are you storing? Is there not a more succinct/robust way to store it? I'd make sure there's no redundant info first
If you're planning to put it into a database, is it in normal form already?
I've got a few ideas but was going to start with player position over time
So there could be a lot of data points for a player over that player's lifetime
I could probably get away with writing everything to a csv file, but sql would be more robust
Just need to figure out how I can create a sqlite db or add a new table to the player.db using lua. I'd assume it would be pretty easy with java but can't find much on how to actually make mods using java for zomboid
Is there a list of possible modifiers on items somewhere?
Like Speedmodifier but for more specific stuff like "10% less likely to get spottet" etc.
My Mod won't show in the Mod selector, Its in the right directory and has the right files. I've restarted the game multiple times yet still its being weird
Here's how it looks
Thanks everyone who helped, got it working and it's up. First workshop mod.
https://steamcommunity.com/sharedfiles/filedetails/?id=2709325757
@cursive junco awesome, btw -This mad currently has-
Yeah... I saw that right after I posted it but I can't be bothered to change it until I equalize the sound effects and add a few more.
Does anybody have any knowledge on how the ZedDmg textures are actually being used in the game and how they appear beyond zombies spawning with them?
I've redone 9 textures so far, but i'd like to know if some of them aren't being used at all to save me some time.
I am new to this whole modding thing, i have two questions: How do I set a precise position for wheels and other stuff for a car inside the text file inside the mod? What is the tris limit for models in pz?
o no
ok but is there any way to add more than a single mesh to a vehicle? As in not only base but additional parts to counter this tris limitation
well you could just edit the description in the workshop directly ๐
hey guys on the script files, the jewels carry this entrance
Cosmetic = TRUE,
anybody knows what this do?
it's just used for rendering, nothing fancy about it
hum what does it change u know?
Does anybody have any starter tips on how to preview your textures ingame? It's kinda tough to reskin the zombies when they keep walking with their heads drawn down when they look so radically different from the angle than they did in blender.
Is there a way to create "custom" events? For when specific calls are done to some functions or player actions?
@weary matrix would you happen to know how to do something like that?
it's just checking if the item has this attribute to make rendering decisions
no special behavior or anything, just drawing things differently
you can create your own events from Lua, but you have to trigger them yourself
Oh okay, i think that would work great. Any guide or place to start looking into the Lua Events?
just check the Lua source from vanilla, look for triggerEvent and LuaEventManager.AddEvent
Is there a line to make zombies T-pose ingame?
I guess the manual trigger is a pain in the ass since i want it to trigger when ISDropWorldItemAction is queued
Will do, thanks a lot!!
ah, this is a Lua object, so you can probably hook a Lua function to achieve what you want
like hooking this one for example: ISDropWorldItemAction:perform()
ohhh perfect! Will look into that too! (Basically i need to register when I drop items to the ground and this is, for now, the easiest way i've found)
might be the only way yeah
The perform hook sounds like what i need! thanks
@drifting ore hmm your question made me realize I could make it possible with my javamods framework to add events for any java function, at the beginning or at the end of any function
Can someone hit me with a guide on how to create a UI Panel upon loading in? Similar to that of the small tutorial that opens on first boot.
For what i want to accomplish I don't think there's much of a difference between Java and Lua events, but it definitely sounds interesting!
best tutorial available is to check the source IMHO
indeed you don't need my stuff to do what you need
Also i recommend checking existing mods that do something similar to what you need
@weary matrix @drifting ore Noted. I'll have a look and see what I can find :)
K so i had an idea, but not sure if it is in the game already: what if you could cut sacks to make a sort of make ship mask? Or even an Undermask
is there a way to log a variable and its values to the lua console in the game?
print(something, something2, soomething3etc)
hm
does that print to the ingame lua console? i have that currently and it's not printing
and the function is definitely being invoked
What is the ingame Lua console? :O
debug mode
:o
does print() just go to console.txt?
Is there a tutorial somewhere to turn an item into 3D? I've got an item that uses the Money sprite, but despite having a WorldItems file and whatnot, still can't get it to work
It also goes into /logs
How about trying to print right at the start of the function?
Fat fingered my enter key >_ >
yeah i did; the printout is in console.txt, but i don't see it in the LUA debug console in game
idk but probably it involves what is called the static model in /scripts for the item and the model itself in models_x and /scripts
:|
I know not the answer you seek.
Static model, I'll have another peep
It seems like static models are used for clothes
item Money
{
DisplayCategory = Junk,
Weight = 0.01,
Type = Normal,
DisplayName = Money,
Icon = Money,
WorldStaticModel = Money,
}
WorldStaticModel = Money,
Replaced that. Still doesn't seem to work
Wait
Give me a minute
model Money
{
mesh = WorldItems/Money,
texture = WorldItems/Money,
scale = 0.6,
}
Still nothin' :/
How about renaming the model in /scripts and picking a model you know works like money like this
model Money2
{
mesh = WorldItems/Money,
texture = WorldItems/Money,
scale = 0.6,
}
item Money
{
DisplayCategory = Junk,
Weight = 0.01,
Type = Normal,
DisplayName = Money,
Icon = Money,
WorldStaticModel = Money2,
}
To see if it works then?
Sure, give me a moment!
It does not reload .x model entries in /scripts while the game is running to my knowledge, but it loads new model entries in /scripts.
I have just found a few typos in my code. Missing a few ,'s >_ >
That was probably the big issue, will let you know inabit
:o
not only was i wrong i was super wrong, I just wasn't saving the right file ๐ฆ
where do you place a mod's requirement for another workshop mod?
ah yes
hello friends, pretty new to the whole modelling thing and i can't seem to find any documentation on the "skinningData is null " issue. any pointers to how i should remedy that? seems to be my only handicap at the moment
how do i tell what game version im on if ive never opted for a beta?
should say version in bottom right corner
yep
now im working on a dedicated server right now thru g portal, eventually wanting to move to ovh for bare metal, whats the best way about going about finding people who already know how to mess with this game XD
is their any info for setting up rented dedicated bare metal servers for this game anywhere i can be directed to? how many mods are too many? im looking at around 32gb of ram on the server with a 500gb nvme drive
When checking character XP multipliers.
Does public float getMultiplier(PerkFactory.Perks perk)
take into account skill books and profession multiplier in one combined value?
Anybody up to answer a potentially stupid question?
Iโm running the game in โ-nosteamโ mode and was wondering how I might add mods to my personal dedicated server on it? Reason Iโm running it this way is because I kept getting an error stating that the server was offline even though I could see it had started. Any help would be much appreciated
How do I add my own custom catagory?
What mod should I install for adding npc for singleplayer?
@worthy hamlet they go in your zomboid cache dir, which is Zomboid in your home dir by default. So ~/Zomboid/mods
you can also stick them in nvm that only works in steam modemods/ in the dedicated server installation
are you using a module and imports Base?
do the model script only in Base
IDK why but that made my tiems turn into 3d instead using the icon as sprite
Hi guys, starting a world sound with PlayWorldSound start it for everyone around
but trying to stop it only stop it for the person running stop
anyway of stopping it for everyone
audio = getSoundManager():PlayWorldSound(...)
audio:stop() -- dont stop for everyone
getSoundManager():StopSound(audio) -- still dont stop for everyone
so weird:
self.character:getEmitter():playSound("sound");
self.character:getEmitter():stopSound(audio) -- its stop it for everyone
yet getEmitter() of player is the same type of a regular emitter
Ah ok so stopSound send a stopSoundPacket only if the emitter parent is an IsoMovingCharacter
Not cool.
Player disconnecting and sound keep playing too.
@iron salmon would it be possible to ask to TIS for a way of stopping a WorldSound on the network like from a character sound emitter.
Hello,
I'm trying to add sandbox options to my mod, but I would love to wrap them under a feature toggle, like "Zombie Lore" section has "Proper zombies" toggle. Is this possible? And if so, can anyone share a config sample, or perhaps name of mod that has such feature?
Mod suggestion = When you insert a battery in your flashlight it remains in your hands.
Mod suggestion = When you are afk, you can leave your character playing with a rubik's cube and never get bored
Are you looking at Windows or Linux? If Linux, I would recommend LGSM to manage the server. https://linuxgsm.com/
But that discussion doesn't really fit in this channel, so best to talk another channel about this
Is anyone familiar with the "project humanoid" mod
Are mod branches for workshop mods possible to implement by TIS? if so that would fix the annoying workshop update fiasco with modded servers. Just a thought
imagine a prod. branch + dev branch. would be sick but it may be too technical for Steam and for normal end users
you can kind of do that by uploading a new version of the mod as a seperate workshop page and making it unlisted and just including a link in the description of the original mod i think
Does anyone know how tsarautotuning mod works??
Tried using cheat menu to learn all recipe but it keeps requiring me to learn advance mechanic and basic tuning
you could add multiple mod folders inside the workshop item.
and name them update_1, _2, etc. but very annoying to do and i doubt many would actually do that
also for people who don't run servers it means more work
why not use the items list to spawn in the books that will tick that off. doesn't fix if there's an issue with the mod, but gets around the problem
I rip my hears out while trying to get some custom outfits spawn on zombies.
I studied the "Authentic Z" mod and some others but i dont really understand what is really neccessary to make them appear.
For debug reasons i try to spawn some custom zombies in the trailerpark with a high chance, since the trailerpark is big it should be easy to find some.
Basically i have made 2 LUA files. One defining the outfit, and one defining the spawnzone.
What do i miss i wonder
(The Outfit i copied for now from the pilot to make sure in case something is wrong with my custom outfit)
m_Top - false,
m_Pants - false.
wouldn't these bools preclude the list of allowed items
i think those just stop random default pants and shirts from spawning on them?
perhaps, but i'd try changing those
try replacing the 2nd line with
require 'NPCs/ZombiesZoneDefinition'
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...
Seems like those are just random default tops
I try, thanks
i'd also recomment using ZombiesZoneDefinition.Default instead of trailer park so theyre easier to find
is default = everywhere?
yeah
Ah good to know. Thats also what i want. Thanks
can we get a mod that let us see eachother at a long distance?
like a tracker
for example like terraria
when u choose a team
Hi, I tried to make some new attack animation, I know how to use Blender and making animations, but don't know how to add them in. Does anyone know how to adding new animations?
u can see how long ur are from eachother
Getting alot naked zombies
I wonder if they are supposed to have this outfit on
Switching the random tops and pants to "true" make them dissappear. So it seems like the game tries to load the custom outfit
Can I only get these mods from nexus then as well?
Or would I also be able to get them from the workshop as long as I copy data to the ~/Zomboid/mods folder?
you can copy them from the workshop
Awesome. Last question, how would I do that? Find the mods folder in the Steam Zomboid folder, then copy them to that directory? Or would it be the directory Iโm running the server fromโs mod folder?
is the outfit guid unique?
ok so is there anywhere that passwords are stored when a player joins my dedi? he forgot his PW
I mean his account pw, its surely stored locally
not in plaintext, no
on a client they're saved as plaintext in ~/Zomboid/Lua/ServerListSteam.txt
on the server they're stored in a SQLite database as hashes
is there a mod where you can wear clothing covered in zombie blood which makes you less detectable from zombies?
Hmm. Am I gonna need a third party app to do it? Or is going the nexus route easier? I wish there was some kind of video walkthrough of it haha @tacit ermine
if you youtube search "how to find mod files steam workshop" you'll probably find one
Okay that works. If I need additional help Iโll @ you again if thatโs alright?
I'd suggest #old_techsupport or #mod_support instead
thanks
Got it, thanks
hey folks, they only resource that i have not been able to understand is how to decompile the jars of the game; I have the decompiler but i just need a bit more information on the process. Any recommendations?
Yep
oh i know why theyre naked
literally all of the clothing items that you use in your outfits need to be listed in your mods guidtable
even vanilla ones
so you'd need to copy all of the items you want to use from the vanilla table into your own
Hi everyone
I'm trying to change the size of an image that I'm placing as the UI element on screen, but I can't seem to change the size of the image, even though I can change its coordinates. No matter what I put as the width and height parameters the image stays the same size of the original texture. Does anyone know what's causing this?
Yep that was the problem. AuthenticPeach has just told me that as well. ๐
Thank you as well for helping spongie!
np lol
when you start adding your own stuff to the outfit you should use comments to document everything because its a nightmare without it lmao
Yep ๐
does anyone know of a mod that focuses on multiplayer interactions? I am looking for a reference to implement something akin to the medical check in multiplayer
an absolute nightmare indeed, idk how the devs can go without doing it
i just assumed that they do but they run it through a script that filters them out or something but now that i think about it they probably just wing it lmfao
what is it you're trying to do? medical check is quite unique in that there's a special packet to start getting body part information for another player
but then again, you have devs like Eris and you look at their work and its all annotated and all!
the people who work on clothes definitely hate themselves then lmao
I am trying to make it so a player can right click someone and inject them; so WorldContextMenu -> Inject player -> targeted player takes health effect.
more than anything i'm trying to figure out how to get the reference for another player after right clicking on them.
also, maybe i'm just too stupid to find it but... where are all the vanilla item definitions? are they in Lua? or are they in a db file somewhere?
yeah all the items are in media\scripts
my huge massive dumb ass
are there any mods i could use to get rid of a infection
Evening all! Any leads on how to create a recipe without result but only XP?
antiserum or zombie vaccine
do you know of a simple command mod? i dont have enough time to make a vaccine in game
Are we able to edit the games combat code?
Question for you guys, if I add a vehicle mod to an existing server, will it spawn those vehicles in undiscovered regions or will it only spawn them at the game's initial generatioun?
The first one
Awesome so then I won't need to make a new server. Thanks
Anyone know how to add the decompiled files to intellij properly ?, The methods are not showing up in suggestions even though I added the decompiled folder into my global libraries. (I used beautiful-java to decompile)
Has anyone made any ui inventory mods?
Go in debug mode, enable godmode and you are fully healed
Hey people, quick question. When developing a mod for Multiplayer, what is the difference between lua code executed in the /server folder and lua code executed in the /client server? I got reports of a mod I made working for the host but not for a client, and I'm thinking it has something to do with this.
try putting it in the shared folder maybe, so its executed for the host and players
Thanks I'll try that out.
did you look at the guide?
I have my mods loaded into my non-steam version of PZ, do I just enable them then launch my dedicated server and have access to them? Or is there a folder in the dedicated server folder I need to put them in as well?
The guide is not clear when the files are decompiled they are not outputted as .jars, I am slightly confused as to where hes got the .jar files.
I tried adding the decompiled folder as the library but it doesnt really do anything. For reference I followed this guide: https://github.com/Konijima/PZ-Libraries/blob/Tutorial/README.md
I agree, I am also not sure where he got the JARs, that's why i was asking. i have no idea
"Solved" it by just resizing the image file itself. Modern problems require modern solutions.
@molten basin what are you trying to achieve?
I want auto fill to show all the available functions or object properties, I am learning how to mod this game atm.
@molten basin so you just want the source files available in IntelliJ?
yea atm say if i try to find out how this function works quickly i get this.
ok so have you tried to simply create a new java project and add the content of the sources folder from BeautifulJava to your new project? That should work
(BTW the decompiled folder is only the raw output of the decompilation, the sources folder is what you should use)
guess I should change the name of the decompiled folder to make it more obvious ๐
I gonna try and and see what happens, its taking a long time to process fingers crossed.
hmm what's taking a long time? You could just copy the content of the sources folder directly into your project that should be quick
I can see the sources if i manually search for the class, how i have no idea where the mapping is registed in lua, ie the function getTextManager() that gets the java TextManager class.
I was trying to use sendNonPvpZone. I've found a workaround now, but I was curious if you were able to figure anything with getGameClient() out?
Unfortunately no. What's your workaround?
Essentially, I want a moving non-pvp zone. When it's created it seems to sync with client, however when it's moved it does not. I'm just deleting it and recreating instead of moving it. Probably a lot less efficient, but that's a workaround, afterall.
hey, does anyone have a good reference for stuff like player:getinventory because i cant find anything online
oh thanks ๐
Is there a tool for checking if mods are trying to modify the same things, and if so resolve the conflict? for example by changing the load order. Something like LOOT for skyrim
i wish
That sounds like a no ๐
Anyone got any advice for spawning specific VHS videos? When VHS_Retail is spawned in, it is changed to be a different type of media.
Would it be possible to make something like that? Going through the console I see that it's already showing if mods are overriding anything.
Is it even possible to force mods to load in a different order?
likely not until they make a change to how the base client loads mods; right now i think it's mostly alphabetical
you can use "require" in the Lua, import in the Lua, and require in the modinfo, to make sure you have another mod loaded
Right now you can force mod loading order by first loading one mod, applying and than loading the other mod I think, but don't know for sure
What is the max texture size for project zomboid?
im not sure but i usually just stick with 1024 x 1024
thank god
then again, ive never put any of my models in the game yet since idek how to
and im lazy
Keep in mind if textures are too high res they look off compared to the vanilla items
Yeah I realize, but when the model is higher poly than average, it is almost impossible to make it even remotely good looking with 512x512
256 and max 512 is a good size
I create textures in 4096 and scale them down to 256
The advantages of working in 4k is that the scaled down version gets some kind of anti aliasing
Booth are 256 pixels
But the left one was 4096 and then i scaled down to 256
The right one i exported in 256 directly
This way you can do alot of details in the High poly mesh and when scaled down it still looks good
No problem. It was a gamechange to me when i found that out ๐
but do you have any idea on why blender likes to create these artifacts on textures when I am painting
just straight up random lines going through the whole texture, intersecting with other uv islands
Seems like some UVs are overlapping
but they arent
and if they were, they wouldn't create this
Very weird indeed... mh
it's a some kind of bug inside 3.0.0
Havent painted for a long time in blender
The only reason I am using this tool (never use it) is to do the masking
I found getGametimeTimestamp
if getGametimeTimestamp() - zone:getLastActionTimestamp() > 50000 then
What is the timestamp? A millisecond?
if getGametimeTimestamp() - updateZone:getLastActionTimestamp() > 20000 then
also this
and it's random, if I redo the bucket fill, it's fixed all of the sudden
you dont need this man, PZ is far more simple; when you sub to a mod you can see on the description what the mod do, and so you can easly know witch mods change the vanilla mechanics
Maybe its a viewport bug
Well, I dont know honestly, I turned off bleeding, maybe this will help
But some mods implement completely different features by changing the same things, which is where such a tool would be really nice. Especially if it can resolve a potentially resulting conflict and keep the functionality of both mods
Anyone know any nice mod lists that are working in multiplayer ?
Anyone know which file manages the health menu?
You could use python (or another language, but python is nice and simple to run) to compare the lua files of the mods and to dump out any stuff that matches. You'd be using the expression stuff that substitutes characters to get general things; such as x many letters containing at least one or two capitals and ending in (); that'd capture a lot of the Java class stuff
Worth it? Probably not.
Hello guys, I am trying to make a modmod to make MetalWorkbench from The Workshop mod a moveable item. Right now you place it in 3d world as 3d object, and it's used in recipes because of "keep MetalWorkbench", so it's a hacky solution and it doesnt really block tiles, you walk through it. I wanted to make it a proper furniture.
Now as an example I looked at LabWorkbench from Vaccine mod by Dr Reaper.
It looks like there are only two things needed to make a static furniture item
- type = moveable
- worldobjectsprite = somedata
Now I am at complete loss where to find tutorial how to properly make what goes into worldobjectsprite. Can someone help me? I assume it has something to do with .tiles file packaged with the mod? Is there a tutorial for this kind of object making?
Also did I miss, or it's only (1) and (2) that is enough?
And sorry if the question is stupid, today is the first day I started trying to learn modding
worldobjectsprite doesn't exist in the vanilla game files, that'd be a function the modder created, can you find that and paste it here
oh
well if thats not a common way... How would you normally make something like a table?
I will check that too, 1 sec
But it explains why I couldnt google it, Thank you Elpine ๐
you are using notepad++?
Yep
but it seems to exist in vanilla
look
WorldObjectSprite = appliances_television_01_8,
It looks like it references something in custom tiles, which I dont know how to make and came to ask for a hint or direction ๐
yeah, this is a part of item definition
and I checked the java stuff
do the above just change the folder you're searching
A sprite tends to be how the thing appears, and doesn't contain any information about how it should exist physically in the world
Sorry, I dont get it. I am not trying to figure out where the modder defined this value. I am trying to understand how to edit the .tiles file that contains it
I'm trying to guide you toward finding out how the game developers use it
So you can then compare, learn, and replicate
Yep, I found this value inside of modname.tiles file
Your issue is that the object appears, but doesn't interact with the physical world, correct?
However if I open that file in tiled - tile properties, the icons for tileset are question marks, so I assume i am doing it incorrectly
No, my issue is that I have
- Existing mod where another object has moveable type
- another existing mod (The Workshop) where the item is just a normal item with 3d object
I try to convert 2 into 1. But I dont know how to take existing 3dmodel and turn it into tile
All I found is that for mod (1) the tile is defined in .tiles file, and named worldobjectsprite as a property of the item
Mod idea.....automatic garage door opener....it would be awesome to drive up to my double gate and be able to open and close it with out leaving my vehicle
feel like this is a bit of an xy problem
what's xy problem?
my problem is that the item in question has no tile
I dont know how to make it ๐
But from what I can make out; The properties we see on the wiki entry for the TV mostly determine how the item is displayed. The worldobjectsprite points to the .tiles file where there is more information that determines how it will behave in game; This might help
https://pzwiki.net/wiki/Tile_Properties
I want to MAKE it moveable, so I need to make tiles for it, in 4 directions, and make it twotile
@fleet smelt Perfect, your link led me to https://pzwiki.net/wiki/New_Tiles
This is what I was looking for
Thank you so much ๐
You're welcome. an xy problem is where someone is trying to make x do y, when x can't (or shouldn't be used) to do y and there are other solutions. Just a problem with conveying pertinent information on the internet
yeah sure but reading the descriptions should do it, modders should also describe every feature on their mods, sometimes they dont. about this tool, GL trying to find someone to do it lol
Is there a place with all the zones for ProceduralDistributions and SuburbsDistributions?
Find it in media\lua\server\Items\ProceduralDistributions.lua
anyone got a hair mod tutorial?
Look at Spongie's Hair on the workshop
Guys, I cannot for the life of me find "Broken Glass" as an item to spawn/use. I also dont know its ID to use as an item in a recipe. Can someone tell me why is it so different from all other items?
Is anyone having issues with Zupercart on MP right now? It updated this morning and now all my carts/trolleys are gone
@covert atlas Updates can do that, I had that with mod updates with other items
in fact there's a chance all of them on the map are gone, in the locations that you visited
Gotcha, just wanted to make sure the mod was still working. I saw one before in a place and went to check it out and didn't see one, no
you can try spawning new one and seeing if it works
having the same issue with the log wall right now, seems I cant find a reference anywhere in the scripts folder and the lua folder has a few things referencing it but nothing point at the actual item class that I have seen so far
You have to have admin on the server right?
yep, login as admin and you can do that
I haven't ever spawned one before, is there a list you can choose from ?
you can also test in SP in -debug mode
Hmm, I must have a misunderstanding of something; an item that I have setWet, setWetCooldown, and setItemWhenDry on doesn't seem to ever actually begin to dry out. Is there something else I need to do?
@frosty stirrup Broken Glass is a moveable
Would anyone know how to make a custom catagory?
Dl it on the workshop and then you will find it in C:\Program Files (x86)\Steam\steamapps\workshop\content\108600 if you are on steam
@junior flame But you should be able to have ID even for basegame movables, right? What would be the name to use in the script?
And thank you for answering!
Not exactly, it's kind of dynamically created
like, a couch is a movable... You can have it in inventory
you can also have broken glass in inventory
is there a way to check for its presence and amount?
I safely overrode the TimedAction for picking up broken glass, and created my own broken glass moveable
And also created recipes for creating broken glass from other objects
Maybe it's like how myFunction is a variable which can be passed as a function argument, while myFunction() is a function call, and what it returns is what is passed as a function argument. So if HelicopterSandboxOptions returns nil, you are effectively doing Events.OnCreatePlayer.Add(nil). Maybe you could instead make a new function, like a local function or stored in a table somewhere, and do it like this
local myString = "OnCreatePlayer: ";
local function HelicopterSandboxOptions()
local myString = myString;
---Your other things
end
How difficult would it be to do a sound mod for Zomboid? I'd like to change the zombie noises. I haven't tackled any modding previously, but I figured you guys might have some insight.
Itโs finicky and very tedious.
That's disappointing.
Does anyone know (or know where I can look) for the item string for zupercart trolley/shopping carts?
is there like a print or Debug.Log method thing I can use, my mod is screwed up and I need to pinpoint where the code stops working lol
Also I'm new to lua and zomboid modding so forgive my potentially really stupid question
Logs are stored in console.txt
Guys, do anyone have a " essential ", aka too good to be left out mod list for MP?
Yeah but there's also a debug menu with F11 in game, but I need to see exactly when/if a method is occuring while playtesting, but I'm not sure what line of code I'd need
It's not very helpful if I can't see when it's actually happening lol