#mod_development
1 messages Β· Page 509 of 1
yeah im getting its not simple haha.. i just dont know how to do anything advanced lol..
it would just be the same text in the book nothing changing etc but.. thank you @sour island though i appreciate it
who needs peer approval when you can have all them fancy profile picks and effects 
will definitely look into it, thanks for the link
only being able to watch for mod updates and trigger reboots on new releases is already a huge quality-of-life improvement
I would love a mod that gives realistic fog.. let fog also significantly reduce hearing, and let the fog actually affect both zombies hearing and vision. As much as the players. It's kind of silly They seem barely restrained by it at all
It would open up some awesome stealth play!
It is by far one of my favorite aspects of the game and a disappointing to see zombie is just charge me for miles away when they are invisible to me for no reason
I have a mod where fog does affect the zombie hearing and vision.... ....in making it better π
LUA is the language used for almost all PZ modding.
Which lol, and why
yep, afaik base of the game is codded is java and an event api is exposed so you can use it with lua scripts
"Night Zeds", and just straight up Horror logic? π€ͺ
Sunny mid-days are the safest time to loot with NZ running.
sounds like a cool mod, I wonder if affecting hearing radius makes sense in the context of realism, though
not sure, does fog really affect hearing that much?
(irl I mean)
Oh yes I have that one subscribed to for a challenge. I didn't know it enhanced their senses lol. I would love to have them as sprinters, but on an even playing field senses wise.
Yes a lot. It's pretty cool really, the way it dampens noise. It's like heavy snow
TIL
What
we don't have too much fog where I live so that's something new I learned today
thus, TIL π
Minecraft has a cool snow sound scape surprisingly, all you can hear is the crunch of your boots in the snow
While it's snowing that is
Anybody know how to fix JD-GUI not opening files on windows 10?
It just does nothing
Speaking of, snow should dampen noise too..
for sure, it's amazing how small details like that can improve immersion
If you're familiar with altering the weathers impact on the senses, could you make one that equally hurts both player and zed sight and hearing in snow and fog?
@willow estuary I actually really wanted a mod similar to yours, but when the mists come, horrifying monsters spawn with cool loot. Kinda like the movie The Mist. But I don't see many people messing with models:(
Yeah, Night Zeds is what I call a "quickie" mod? It's actually really simple, it just regularly updates the sandbox settings for zombie senses & memory according to a set of parameters, with night being the worst and sunny mid day being the best?
But the idea is straight up hardcore/masochism/survival horror logic, not any sort of "realistic"-ish weather simulation? NZ is easy in that I can directly modify the zombie senses/memory, having the fog affect player senses would be more complicated?
||
if night == 1 or fog > 0.5 then
getSandboxOptions():set("ZombieLore.Memory",1)
getSandboxOptions():set("ZombieLore.Sight",1)
getSandboxOptions():set("ZombieLore.Hearing",1)
elseif night > 0 or fog > 0 or light < 0.5 then
getSandboxOptions():set("ZombieLore.Memory",1)
getSandboxOptions():set("ZombieLore.Sight",1)
getSandboxOptions():set("ZombieLore.Hearing",2)
elseif (hour < 12 and hour > 15) or light < 0.6 or sun < 0.85 then
getSandboxOptions():set("ZombieLore.Memory",2)
getSandboxOptions():set("ZombieLore.Sight",2)
getSandboxOptions():set("ZombieLore.Hearing",2)
else
getSandboxOptions():set("ZombieLore.Memory",3)
getSandboxOptions():set("ZombieLore.Sight",3)
getSandboxOptions():set("ZombieLore.Hearing",3)
end||
That's a cool idea! Monsters will be easier to do when NPCs/animals are moddable.
I might borrow a piece of your idea for my server stuff, and have some extra nasty special zombies spawn during foggy conditions? π
Ooh I see. Ya senses was a mod to make it more realistic, and open up stealth plays.
That's definitely cool! My thing is more making zombies insane asshole menaces for the most part π
But I did include the loophole where mid-day on sunny days is "safer"
Go for it! Let me know when you make it and I'll use it for sure. I was picturing make necromorph style zombies spawn with the mist and snow, and despawn when it's gone.
"True Actions. Act 2 - Lying" not working atm or am I doing something wrong
or maye just the wrong beds etc
I have toxic fog running, so having nast nasties come out to play when it's foggy makes sense for sure?
Having them despawn when the fog is over is a great idea.
#mod_support is the channel intended for end-user mod issues where you can get help with stuff like that? This channel is for modder nerds like me to work out making mods? π
btw you modding guys are doing great. we started adding mods yesterday and really love it β€οΈ
@willow estuary sure, thanks
π
I mean, you've got rigging clothing worked out, right?
So that means you can pretty much do what you like, within limits, with "humanoid-ish" specials?
But yeah, my picture them semi rarely spawning in the players general vicinity, and they have good loot like maybe fanny packs or an ammo belt stuffed with ammo so it makes it worthwhile to try to kill them when possible
Make "practical monster effects" out of clothing, and there you go :_
But they would be quite strong and fast and charge you and slash at you
But yeah, seeing those sword-like arms angling out of the top of the mist would be pretty terrifying
Yeah, I can see some possibilities for having them inflict deep wounds when meleeing players?
There's definitely some cool things that can be done withyour idea.
And of course it needs a bone chilling screech when it charges you
A screech that also alert other nearby zombies?
But yeah I kind of pictured it as leaving deep wounds, maybe with bone shards/teeth you have to pick out with tweezers instead of glass or something
I mean you rarely have a reason to use those awesome tweezers and suture needle as is!
It would also probably be something you don't want to attempt to fight with melee weapons unless you have very high skill
like having they all flock towards the screech and now you have not only mr.super zombie but also a horde to worry about
imagine that with the horror mods that make zombie heads glitch sideways...
"Afraid of Monsters Zed animations" that's the one
This part would be significantly easier to pull off if you retconned it to leave broken glass in the wounds?
Just in that inflicting a wound type that exists already in the game is "easy" vs adding a new wound type would be more complicated.
Or what I would do is start with broken glass working, and then get into trying to implement a new wound type?
Oh, I thought you might just copy broken glass and rename it haha
It's fussier than that π
I just started dabbling in medical stuff. Just wanted to point out that one, in that generally what you're proposing is "simple" in that all the individual pieces are "easy", except the tooth/bone splinter wound type?
Oh, I mostly said that because it is thematically cool, gives extra use to suture needles, and I thought it would be easy haha. We could just leave that part out and make it laceration instead.
I was actually looking for that one, wanted to mention the mod that makes a super zombie that can't be killed. That always follows you, it looks like it actually has a new model for the zombie itself, big buff arms. I haven't really seen any other examples of new models. Unless that's that clothing thing
Yeah, the Nemesis special zombie in Soul Filcher's Turning TIme looks like a new model, but it's a "costume"
Which you never see on its body because you can't kill it?
Oh hey, what if they made you cold?
A special zombie that inflicts temperature ailments would be kind of neat
What are you referring to?
Like, standing within so many tiles of a special zombie causes you to freeze to death
I don't know? Haven't messed with it, but it's not difficult to make clothing you can't "see" in the inventory window, you just don't assign it a display name in the item script? Look at Advanced Zombies VI for how I have extra code so players can't remove the zombie costume items from the inventory as well π
Sounds like you are talking about a wraith
Iβve had trouble with your advanced zombie mods but I didnβt want to ask any questions in public to avoid spoilers
Would you mind if I DM you about it?
Ah, I don't deal with my mod business on discord or elsewhere as a personal boundary to preserve my sanity and good nature?
Fair enough!
Sorry, just too hectic nowadays to deal with it?? π
I actually just sent you a personal message as well to avoid clogging this chat haha.
Yeah I like your no information, no bullshit approach
Does anyone happen to know why sounds would distort (audio swapping between ears) when custom sounds are playing? they're mono tracks, so I don't understand what could be causing it. Maybe a format issue? (using .ogg)
out of curiosity, what would be a "costume" as opposed to actual 3d models ?
Think of practical effects from movie making?
Visible injuries on zombies are actually "clothing items", they're a prosthetic, without display names, that are applied to zombies.
So you make a full body devil costume, as an example, you put that one a zombie, and you have a devil zombie.
From what I've seen, it's possible to override the base mesh of the character with clothing models
Body models, and clothing models, are both models. The Hazard Suit clothing models completely replaces the character model, so it could be considered a "costume" or "model replacement".
Your skeleton zombies use a clothing item, right?
So if you really wanted to make obese zombies, make a full body obese zombie model, make it into a clothing item, give it no display name, and maybe an inventory transfer override in lua, and there you go.
Nah, my skellies, they're actually "skeleton" zombies, that have the skeleton flag enabled, and not costumes?
Oh wow, didn't realize that part of the base game
Body Appearance data, for players, zombies and corpses, has a skeleton flag?
That's how skeleton corpses are generated; they're a corpse with the skeleton flag.
Dunno if you can actually set the flag to skeleton for an actual player, there's a mod item that does player skeleton full body costumes however.
that sounds pretty cool, kinda like mixin models that other models can inherit
had no idea we could do something like that, thanks for the tip
Skeleton Zombies have some problems in that some clothing items and hairstyles don;t map to their geometry in any acceptable way π
It also seems possible to add to or override animations, at least for players
You could probably make an animation such that the bones are in wild positions to look like a quadruped
Yeah, custom animation stuff has been beyond me since I'm fundamentally dumb and lazy and just play with lego pieces until they work? π€ͺ
Whatever you do seems to work, your mods are hands down my favorite on the workshop
Haha, hey, thanks a bunch π
Heya, wondering if it's possible to make a custom discord integration mod? in game to discord probably can read the log files .txt, but not sure if there's an API to send message in game
I play on a server that outputs in-game /all chat to a channel on their discord server
I could try and find out how they did that
I think the current discord integration does that, but it doesn't show the "x died" message
It is possible, in that what I did previously is had a custom bot on my server host that would read log data in real time and use that to interface with my server's discord? This was 2 years ago, and I didn't write/handle the bot itself, but it is definitely possible? π
I also kinda want to link in game name is x and their discord name is y
Death notifications are precisely what we made it for too!
nice
That's a lot trickier
You'll need to verify the discord user somehow
thinking I can do it manually through sandbox vars
did the bot output message through in game chat as well?
I've only looked into javadocs and community API, didn't find something like this
unless I missed it
I think it could output the "server wide big text", but we never did anything with the proper chat streams themselves?
I think we wanted to do a radio channel integration, 2-way, with a discord channel and couldn't get anywhere?
DIscord integration, and chat channels, have got/are getting, do-overs I believe, so more might or may become more possible with that stuff?
alright, thanks!
I guess for now I'll have another bot exclusively emit "died" message and let the 2 way chat handled by the built in discord integration
I remember there were multiple weird little quirks we had to deal with? π
Sorry, I wish I could be more help, but like I said it was a while ago and not something I set up? I still need to reconnect with homeboy and get it working again.
knowing that it's possible is enough help, so thank you
π€
anyone knows what vehicle's java class name is? thx
I'm wondering... Can you add maps to existing map if it is on a rented server?
generally speaking, for mods that add new items will any be generated in already existing maps?
Yes
yay \o/
is loot generated on a opening a container for the first time? (I assume I won't find anything in locations I've already cleared)
I believe so, not only to save on memory and disk space but also to enable traits like Lucky and Unlucky to work as intended
It's vicinity based, not on opening containers.
Not sure about loot respawn however.
Lucky/unlucky apparently don't work in MP currently π
yeah, that makes sense. if we think about it, how would things work for traits like lucky if all items spawned at once when the world is generated? imagine globally altering item spawns based on a single character having that trait in a MP server π
also, does it really not work in MP? gosh...
just realized I wasted some points in previous char builds
Just to be clear, items ordinarily spawn in the vicinity of players as the explore the world and the world chunks are initially generated.
So it's neither when a container is opened/peeped, or at world generation (aside from the world close to the player when they first spawn).
I think the radius of the area may be 75 tile.
which makes me think if lucky trait for multiple characters within the same 75 tile radius would stack in MP once support for it is added
some progress on my potentially pointless site app
php reads data from the server and uploads it to database where its read by a reactjs app
still trying to do rcon for an online players list, and then i want to read playerdata to see how long each has surived
i figure a leaderboard for 'longest survivor' might be fun
It definitely can't be too large since my group has added content as we've progressed it's definitely small enough we managed to find new stuff on the other side of Riverside
thats good to hear
i STILL cant figure out how to read the time though
drivin me nuts
Speaking of potentially useless. I'm building a site for myself that creates a random build for a new run. Would anyone even want to see that? lol
I feel like the fun for most players is creating their own lol
lol
maybe it should have sliders based on how much you want to suffer
how many points itll use
Maybe I'll post it up when it's finished then. Right now it just chooses a random occupation based on real occupation stats from the bureau of labor and statistics. Just a slightly (not really) fancy weighted list based on real stats
max absolute trait value
so you add the negative and positive values by magnitude
and the greater the magnitude you set the whackier the possible build
ha! thats actually pretty good
you could have it do rejection sampling to random a proper build
i like that
For my runs I was thinking of only generating negative traits to a certain degree, and filling in my positives.
using a weighted list on real stats
Thanks. It was fun to research and put together.
you could if you wanted to get weird, use info from a census in kentucky. and assign random names
I was going to do that. But head cannon in me says, that people could travel
from the list
lol
I was born in Ohio (escaped) so I could be one of them.
Either way, the reason I didn't go with just Kentucky is that the stats are shoddier and also there's a bias. So I went with the entire US and decided that they must have been visiting family π
Apparently the random name generation in Vanilla PZ is based on real census data? Although I don't think it's weighed.
I didn't know that. That's awesome
i kind of like the bias - if we are going with the theory that youd be taking the spot of a real kentuckian during the apocalypse
is it? thats great
Yeah, there's no weighing of individual names, they all have the same odds of being applied.
At least lumber jack is balanced now with this. There are a shockingly (maybe not) low number of lumberjacks in the statistics. But getting burglars and fishing license data was fun.
Right now it's just a site. But ultimately, I'd like to build an in game GUI that does all of this. But I'm very very new to modding the game.
Translating my javascript to LUA will be interesting lol
well, you could just shift-tab and open the site using steam overlay for now...
Fire Officer is just unbeatably based
Making a mod that's just a pack of professions with unique traits
seeing how the TraitAPI from the CommunityAPI makes that way easier
would be fun
yeah, for sure. I mean I could use rasProfessions (or my own I suppose but he did a great job it seems of modifying the original profession framework) and expanding it would take time, but ultimately the framework is there
I'm also coming up with a "lore" scripts as well. Adding an array of possibly "reasons" for your traits and tying them together to create a back story for your random character
I'm using the MoodleAPI from CommunityAPI wrong somehow
but I'll figure that out tomorrow 
I keep wanting to put down this damn "mod" and just play. But it's hard to lol
there's very few mods with custom moodles so it'll be fun to get one working
and then everyone can template the one I make for easy moodles 
I'm trying to jack the 0-10 unhappiness range as "happy"
this will also be my first time using lua so that's why I keep fucking up its syntax 
why is my sound stopping after like 20 tiles but I have distanceMax in clip set to 10k ?
I play the sound with player:getCurrentSquare():playSound(sound) btw
I was told it was who opened the container first. Has their luck applied
it is
if not button.inventory:isExplored() then
if not isClient() then
ItemPicker.fillContainer(button.inventory, playerObj);
else
button.inventory:requestServerItemsForContainer();
end
button.inventory:setExplored(true);
end
```- ISInventoryPage.lua
Would be insanely costly to generate loot as the cell is loaded
hm, yeah. even more so for MP with a high player count
From my custom code for testing spawning
LOG : General , 1641963611090> Lighter - 1 - livingroom - sidetable
LOG : General , 1641963611092> Player at 10838.8125/9463.5322265625 - Item spawned at 10753/9529 - Distance 151.2802734375
LOG : General , 1641963611094> Matches - 1 - livingroom - sidetable
LOG : General , 1641963611096> Player at 10838.8125/9463.5322265625 - Item spawned at 10753/9529 - Distance 151.2802734375
ok, now I'm confused
Used to test how common lighters/sledges/gas cans etc spawn for MP.
The onFillContainer event fires it off; this all went off when I was on that road there.
LOG : General , 1641963726214> Sledgehammer - 1 - warehouse - crate
LOG : General , 1641963726216> Player at 10590.689453125/9416.38671875 - Item spawned at 10618/9321 - Distance 122.697265625
LOG : General , 1641963726217> WoodAxe - 1 - warehouse - crate
LOG : General , 1641963726218> Player at 10590.689453125/9416.38671875 - Item spawned at 10618/9321 - Distance 122.697265625
LOG : General , 1641963726923> WoodAxe - 2 - warehouse - crate
LOG : General , 1641963726924> Player at 10590.689453125/9401.8759765625 - Item spawned at 10620/9315 - Distance 116.1865234375
LOG : General , 1641963726938> WoodAxe - 3 - warehouse - crate
LOG : General , 1641963726939> Player at 10590.689453125/9401.8759765625 - Item spawned at 10624/9315 - Distance 120.1865234375
LOG : General , 1641963727645> Sledgehammer2 - 2 - warehouse - crate
LOG : General , 1641963727646> Player at 10590.689453125/9389.6142578125 - Item spawned at 10624/9305 - Distance 117.9248046875
Not sure how distance is calculated; just using local distance = sourceGrid:DistTo(player)
It's repurposed code from Filibuster's WIP gun mod; it used onFillContainer to modify our guns as they spawn?
But I used it as a tool for evaluating how many sledges/axes/gas cans/lighters spawn?
It's useful to testing how many of a mod item spawn as well, if you modify the code π
Now, how does this work with loot respawn? That I have no idea.
the game periodically scans all chunks that have ever been loaded, all their objects, and checks if they're containers that have been looted
then it just does fillContainer again if it needs to
I am shocked lookign at this output in that the distances are further than I assumed π
it's when the IsoGridSquare is loaded (32x32 tiles? maybe bigger?) or the container has been opened for the first time, and it wasn't populated by loot distribution
having a hard time imagining what containers wouldn't be filled when the grid is loaded
maybe containers inside containers
Well, even containers inside containers fill on OnFillContainer when I had recursive code for the gun mod?
I imagine that container check might be a safeguard, or archaic?
yeah maybe it's legacy
I'm actually surprised that containers are populated before a building is entered, as there's flags to track them and individual rooms having been entered or not?
that's only considered for respawns
population happens in LoadGridsquarePerformanceWorkaround
Ah! There are also corner case circumstances where a container can come to exist after a chunk/square is loaded?
That happens with some of my custom loot cache mod stuff; it creates a container in the vicinity of the player in a loaded square, and it still gets populated with distro table loot for it?
Somewhere in here or after this the container is populated:
local newBarrel = (IsoObject.new(getCell(), square, "greensupplybarrels_1"))
local container = ItemContainer.new("SupplyBarrel", square, newBarrel, 1, 1)
newBarrel:setContainer(container)
square:getObjects():add(newBarrel)
square:RecalcProperties();
Or probably at the check when the player peeps the contents.
that's interesting. so when does the lucky trait factor in, especially in multiplayer? (not saying i'm a loot goblin, but...)
Not sure? I disabled lucky/unlucky for my server anyways, so I'm consequently incurious? π
looks like it doesn't
unless you get the case where a container has been added to the world after the grid was initially loaded for the first time
Why is the command createZombie() only spawn a zombie on the local player? somehow in MP other players can't see the zombie that spawned in, what a weird mechanic
@dreamy chasm https://steamcommunity.com/sharedfiles/filedetails/?id=1934820584
I just ran across this. Is this the mod you were trying to find earlier?
Hi
I opened a server for Project zomboid. It's been open for 20 days and a lot of players are playing. No mods are installed. vanilla. I found a mod with multiple different features in it. One of these features is the reset area system. Resets other locations outside of spawn zones and safehouses. But I guess they do this by restarting the server and deleting the map_x_y_.bin file. I wasn't sure.
Is there anyone who can help me with this?
How would you go about making animations for PZ?
Has anyone played around the IsoThumpable file ? I suppose this dictated if zombies can thump and destroy objects in the world
Hi, would someone be tempted to help me fix bugs in my mod for MP ?
Je sais @weary matrix tu t'es dΓ©jΓ proposΓ© mais c'Γ©tait il y a plus d'une semaine donc je redemande mais si tu es toujours dispo, ca sera avec plaisir
Check the spawnerAPI in the pinned post
@drifting ore of course, but right now I have to go to an appointment, should be back home in about 3 hours or so
It's the class responsible for all objects that can be destroyed basically, including the ones you can build, but not only.
what do you all use to open .class files ? I can't seem to open them
@foggy anchor you should ask in #mod_support, your question is off-topic here
Dangit. sorry co
so if i wanted to make a mod that can turn player-built stuff and furniture into unbreakable by zombies, i would have to work with this file ?
@foggy anchor sorry if I sounded rude, we're just getting way too many of those questions in here π
No, no, you're just fine.
good π
I made this tool to decompile pz: https://github.com/quarantin/beautiful-java
Flaming would have been completely acceptable in that scenario.
thank you 3000
Great thanks, we do this whenever you want. Tonight even if you want. I have absolutely nothing to do, I am in quarantine until the end of the week
not sure right now what would be the best way, but I have to run, I should be back in about 3 hours or so in case you haven't found a good answer yet
oh damn you got covid? :/
thanks a lot
No, just traveled for studies
That's why I'm doing this mod, it keeps me busy ^^
ah good π
This is probably a stupid question, but is the modding exclusively done through lua? Or can you write stuff in Java?
from what i've seen the game relies on LUA
You can but it's much more complicated and less documented
I use onPlayerUpdate(), do we know the in-game time between each update? Is it stable as a parameter?
As the others say, you can (Seen a couple of successful mods do it) but it's a bit unstable because it requires replacing base game files which isn't particularly jazzy.
on multiplayer server, there is an admin option to enable "pvp-free zones". Is there an easy way (lol) to implement the opposite ? specific zones with pvp enabled ?
i guess it can be done my making a file similar to ISAddNonPvpZoneUI.lua but i'm not sure where to go from here
That's just the UI code no? I don't know if you'll get much from that.
It's been a while and maybe I'm crazy, but I thought I remember there being a server option flag to invert the zones.
there is a similar file called IsPvpZonePanel.lua but i can't find anything in there neither
oh let me look at that
It's been a while, it's statistically probable that I'm wrong.
unfortunately it's not there, maybe it was though
No, I'm probably thinking of the safety system or something.
I'm not 100% sure but i think it depends on the FPS/framerate, so it shouldn't be used as a measure of time. Rather use the time related events like EveryOneMinute etc
i guess i could try and create non-pvp zones where i don't want pvp zones but the game makes it super laggy
best case for OnPlayerUpdate is 60 fps, worst case is 3 fps
it adjusts based on load
players always get scheduled at 60 fps actually, only other objects get staggered
not ideal, but you could define your own regions in Lua and call player:setSafety(false) when someones new coordinates land in one of them
oh hm, but someone with safety off can still attack someone with it on I think...
might not be something you can do without core changes
so how would the non-pvp zone work in this case ?
in what case?
what i mean is that the game allows certain region to have "no-pvp"
why would the opposite need core changes ?
because it's not something the game supports
code was written to make non-pvp zones work, there's no code to make the inverse work
i understand
the check is done inside SwipeStatePlayer#checkPVP(...), if you wanted to change how non-pvp zones work you'd have to change that
it's part of the Java code
alright thanks again
going through the pins and couldnt quite find what i was looking for. Does anyone have a link to a tutorial from start to finish in creating a mod? Would like to see the process from the beginning to uploading.
I'm in school for software development so coding is coming to me slowly but surely lol
sorry to dig this, do you know where regions (like I assume safehouses and non-pvp zones) are stored ?
they're stored in the binary map_meta.bin file
Thank you!
Air-Crews rise up
what should i use to look at a bin file ? I'm using hexeditor but the file is just random stuff like this :
depends the file format of the binary file π
"funny" thing is that if i take a similar bin file i get actual readable results
this is the map_meta.bin and if I take map_sand.bin i can read it
does anyone know the name of the mod that allows me to dismantle crashed cars (not wrecked car) on the street?
sorry once again i'm a beginner here
lol
it all the depends on the format in use, some binary format, like ELF etc embed raw strings, others don't
you'll have to check the java source to see what data is written in there
i'll do my best
@drifting ore I'm available if you need
it's not random, it's just not printable text
it is data
how
if you want to decode it look at IsoMetaGrid.savePart(...)
could you be more specific? π
nvm
@rich wagon have you found an answer about IsoThumpable?
Is that salvaging cars?
not really, i mean i'm sure there is something to do here but i don't have the skill to understand let alone use the code to get where i want to go
Interesting, can you help me figure out what the "outfitID" should be? it's string so not a number ID, can I find a list somewhere?
So, I've made a mod of sorts for save games, though it's just a technical preview right now. If anyone (technical) has feedback, let me know.
@calm depot that's nice! Would it scale for big pz servers?
yeah
if you're hosting on Linux, my plan is to do the hooking with just a lib and you can LD_PRELOAD it
Is there newer source than the 10yo repo?
@calm depot interesting, wondering how hard it would be to do it in plain java directly
get IntelliJ IDEA, it can decompile the class files
It's not an number, by looking quickly I found that it is form "PrivateMilitia", "Bandit" or "Police" but no idea where they are define. Maybe look at media\lua\shared\Definitions\AttachedWeaponDefinitions.lua
Ty
@tulip narwhal I use this tool of mine:
https://github.com/quarantin/beautiful-java
@weary matrix well, the Java bytecode could be patched, but that would be more troublesome IMO than doing the interception at the OS level like this does
Thanks
Thanks, I will go looka round
@calm depot I load java code in the engine without actual patching π
sure, you're loading new code, in this case you want to alter existing behaviour
also, they use SQLite for players.db so there must be a reason they're not using it for everything from Java land - my guess is performance issues
@calm depot no clue but that was the target of my initial question π
Players.db,vehicles.db, and then a db for whitelists
it was a humourous answer π
@calm depot I'm pretty sure Redis could be used, like using the map coordinates as keys etc
that would imply a total rewrite of PZ's Java code that loads the save games and deserialises the binary files that currently exist
What to do when i try to host and it says : workshop item different than the server
you update your mods
@calm depot doesn't have to be a full rewrite, just need to intercept the requests to DB, which if I understand correctly is what you're doing
you can go to steamapps\workshop\content\108600 and then into whatever ID the game gave you to see what it is
@weary matrix no, not really. They're currently just on-disk binary files using their custom format, essentially opaque blobs - but if you think you know better, go peruse the code and point me at what you see
how to update mods ?
Unsubscribe and immediately resubscribe
yep π
f m
I know
cant you just delete the workshop download folder
maybe, try it and let us know
I would, but the re-download would be annoying
some of us have 512Kb hotel wifi to contend with
oh sorry guess you're right, been mistaken cause someone else was talking about sqlite3
if only it really were that easy eh?
I wish it was
But it should be! π
@calm depot hmm but your writing the data to sqlite3 db, if you can do that it could be send to Redis
yes, it could be, but what makes that a remotely good idea?
Performance?
that's a bit useless when your server goes down
you presumably want your save games to be persistent
also, sqlite uses mmap
so it's not actually true that it's "on-disk"
it's just on-disk insofar as it guarantees your shit doesn't get corrupted
@tacit ermine redis is a separate processs, and it can save data to disk
also, the SQLite connection is 1DB per save game
it's not all getting chucked into one instance
each one can execute on its own thread
yes, the fact it's a separate process means you have a network connection or unix socket
this is entirely in-process
Whats the problem with unix socket?
there's no problem with it, other than the fact you think it would be faster to go across the kernel boundary to something that's single threaded
I know all about redis
how can you believe sqlite3 could achieve faster access then?
I've even used it
why do you believe it can't?
tell you what, go implement it for Redis and we'll have a benchmark contest
my LTO C++ app vs whatever you come up with
I can run a separate SQL DB per game instance, per thread. You've got 1 redis instance using just one thread of however many cores you have
once sqlite has mapped the file into memory and the relevant pages have been touched it's doing almost the exact same thing as redis, searching a sorted set for a key
@tacit ermine sqlite is quite slow
no, it isn't
no, it isn't
osnap
I find myself reminded of that "MongoDB is Webscale" meme
Q&A discussion discussing the merits of No SQL and relational databases.
Only Devops people will know the pain
hmm I kind of remembered sqlite3 sucked for multithreaded apps, but I guess that's wrong indeed
it depends entirely on your scenario
if you're sharing a DB amongst threads, yeah, that can encounter contention
although it also depends heavily on whether you're more read or write
Yes, just found it again last night. lol But it looks like it won't support MP.
@calm depot @tacit ermine any clue what could be responsible for pzserver to freeze sometimes on exit?
different people told me about it but had no chance myself to reproduce the issue yet
no, but if you're curious, run Process Monitor and see what it's calling
nice, didn't know about jstack
@calm depot I'm only aware of people having this issue on linux servers
but yeah I would investigate the process if I could just reproduce the issue
hey fellas, I'm having trouble understanding how to add a new slash-command to the game via lua;
I've added a folder to the mods/[name]/media/lua/server/[name]/[name].lua with this code, https://pastebin.com/yV5gXaWG -- still, when issuing the command it ... returns "unknown command" -- which is.. understandable as I've never introduced the command to the game - just the function
well from the logs I've seen, the freeze occur before quit, but after the saving process has finished. Then the server is not not responding to any commands, whether it is through the console directly, or through RCON
that's all I know for now
I don't think you can, there's a hardcoded list of command classes
https://pzwiki.net/wiki/Modding:Lua_Events/OnClientCommand then what does this refer to? :O
after you've told it to shutdown, I imagine the RCON listener is one of the first things to go
the global object system, it syncs things like campfires between the client and server
@spark plank so is the command argument not what you're looking for?
print it and see what you get
there's commands, server commands, and client commands
server commands and client commands are part of a multiplayer state sync system
commands are the actual chat commands
I see I did find it weird that all the client commands had to do with actions and I couldn't find the "say" command. I'll dig deeper :)
I'll also try to do that, eventually :)
you can't add a new chat command without changing java code, unfortunately
but you can look at how campfires work if you think client/server commands might work for you
nah, I think I can hook on the "onKeyPress" :D
as long as I can have that player "/say" something, I'm good
oh, right, I see what you're doing
chatManager:sendMessageToChat("my player name", ChatType.say, "my text")
maybe
can't we access getPlayer().Say() ?
I don't see that in my method list
oh, there it is
yeah, you can
or SayWhisper, SayShout, etc
one doubt: is the correct notation dot (Object.method()) or with : like (Object:method()) ?
object:method() = object.method(object)
^that
Hah! Makes some sense. Thanks :)
it creates an implicit first parameter called self
(yep, same as .bind or .call(this)) on js
so function tbl.a(self, stuff) end is the same as function tbl:a(stuff) end
there's also the case of java static methods, in which case you should use a dot
Are you doing that with ':Say()'?
yep, getPlayer():Say('string')
got the random with ZombRand instead of math.random()
I'd imagine you're making this for MP? I couldn't get 'Say()' to show for others, when I tried it. I tried it lots of ways as well. If you have issues with that, you may want to replace it with 'processSayMessage()' - that one is global function, so no 'getPlayer()'.
I see. Will have to double check and then apply this. Thanks in advance :)
i once was put in this situation clicked the eject button
hey there. i tried to write some code. took much from other mods so i could get into learning lua or scripting in general. Now i have an OutofBoundsException with my script and i didnt manage to fix it. Also i am not really sure if i used arrays correctly at all. Would someone be willing to give it a look? maybe its a simple fix :9 thanks in advance
playerIndex = 0 lua arrays start at 1
playerIndex isn't used as an index into an array, it's passed to getSpecificPlayer
which takes an index beginning at 0
Is there a list of working mods for mp
It's confusing sometimes in that the lua code will use player and playerIndex interchangeably for the playerIndex value, while also using player and playerObj interchangeably for the actual player object.
#mod_support is probably the better place for that sort of inquiry, as this is a channel for mod making nerds to work out mod making stuff? π
But nah, "the list" isn't anything that exists, and TBH, given all the confusion and misinformation, I wouldn't put any faith in one?
Can I install the pz libraries into visual code?
I've been learning lua for the past 2 weeks so I'm pretty new to all of this, I just really wanted to get into modding lol
the Java code, you mean?
Not the java
then no, there's nothing more helpful than what you get when you open Lua in vscode normally
Will doing reverse engineering the best thing to start modding myself then
Bc I see that the GitHub post doesn't really say much
GitHub post?
There's a modding "guide" on github
How do I import the functions of a game file into one of my .lua files? require "ISHealthPanel" don't work. My file whant the function in media\lua\client\XpSystem\ISUI\ISHealthPanel.lua and is inmedia\lua\client\XpSystem\ISUI
try require "XpSystem/ISUI/ISHealthPanel"
Is there a way to create just a server side mod? I'm looking to make something simple for my server that will announce when a player joins and leaves the server.
I found that in the pins, wasn't sure if that was my starting point. ty
Sorry I didn't mean to reply to you with that
I'm on the subway and I was just trying to send that before, but I just caught a glimpse of internet my bad π
@Doggus#5520
If I'm not mistaken someone already made one. @thin hornet: You did right?
You would have to check for the Scoreboard update on client side and compare.
--- onTick
local ticks = 0;
local function onTick()
ticks = ticks + 1;
if ticks > 500 then
ticks = 0;
scoreboardUpdate();
end
end
Events.OnTick.Add(onTick);
This would update the scoreboard every 500 ticks.
And you just check for changes in the list of player.
local onlinePlayersList = ArrayList.new();
--- OnScoreboardUpdate
local function onScoreboardUpdate(usernames, displayNames, steamIDs)
local connected = ArrayList.new();
for i = 0, usernames:size() - 1 do
local username = usernames:get(i);
if username then
connected:add(username);
if not onlinePlayersList:contains(username) then
triggerEvent("OnPlayerConnecting", username); -- custom event for my stuffs
end
end
end
for i = 0, onlinePlayersList:size() - 1 do
local username = onlinePlayersList:get(i);
if not connected:contains(username) then
triggerEvent("OnPlayerDisconnected", username); -- custom event for my stuffs
end
end
onlinePlayersList = connected;
end
Events.OnScoreboardUpdate.Add(onScoreboardUpdate);
all client side
Nop require "XpSystem/ISUI/ISHealthPanel" don't work, I find this rly weird
Any good example of a mod that can add or remove traits ingame?
for example, consume an item to add a permanent trait
it's just player:getTraits():add("trait name") iirc
This is what I use, which is the same as the above with more steps. I dunno if SynchXp is necessary? π
local traits = player:getTraits()
traits:add("trait name here")
SyncXp(player)
nah, that only works for admins/mods
how do I set the condition on a crafted item?
Ah, probably from copy-pasting from the admin player modification interface then π
I'm not joking when I say I just play with the lego pieces until something works!
Ah, it's on account of the player being modified being a different entity than the client player object?
is clothing:getCondition() always in range of 0-10 ?
no, but 10 is the default max
you can set it with ConditionMax in the item script (and get it with a var of the same name)
so for most vanilla clothes the condition will be max value of 10?
i thought it would be 1.0 or 100 kinda confused
oh boy t_t
I believe if an object doesn't have a defined conditionMax, it defaults to 10?
Can I recover the isoPlayer from one of its BodyPart?
Fun little side note, all objects have a condition value, even items that don't degrade the way weapons and clothing does.
item:getCondition() / item:getConditionMax() normalizes it to [0, 1)
if that's what you need
no, ParentChar is there, but it's private
Damn it
do you only care about doing it for players?
if so just go over every player and their body parts until you find the same instance
No I'm stupid, the variable is stored in the table of the other arguments
There's no getParent() function for body parts?
no
the Java code has access to it, but the field is private
there's no getter function exposing the field
hello is it advisable to put a lot of mod on a multiplayer server?
No getParent(), I also thought of that, funny that it is not available
Try #mod_support, it's more the channel for that
ok sorry
Going to use my monkey brain to change some loot tables
I need advice for making things reasonable
Hereβs the problem Iβm trying to fix
Problem: βalarms and motion detectors and ridiculously hard to acquireβ
Inb4 just raid an electronics store bro!
I could use less gasoline to make thrice the amount of bombs as an engineer making the trigger mechanisms a moot concept
I was thinking about adding timer β² to the loot table of digital watches
And burglar alarms to the loot table of doors with windows (front doors)
I need advice on what would be reasonable
I was thinking 1/20 chance to find either?
Maybe less for burglar alarms because doors are harder to farm?
Like a 1/12 for doors?
I don't make mods, but someone should make craftable needles a thing, because I can never find needles
Forgot to mention that it would be the loot table of disassembling said items
Already a thing, you can make em from dead rats with one mod (bone needles)
oh that's rad, thanks man
thanks guys!
I'd ask TIS to make it accessible, I don't see any good reason to hide that field
Anyone any advice at all?
I don't know much about distribution, but your probabilities seem quite high
also 1/12 is more than 1/20, not less
Iβm aware
I was thinking 1/12 because doors take much longer to take apart
And have added scarcity
Compared to watches
But yeah I worded it poorly
how can i make hand held models ?
i made ground objects
but i don't get how hand items are like
It might have been a while ago, but have you been able to make any new custom containers with bigger capacity? Or anyone, for that matter?
For a while I've been trying to add a new tile item through the Modding Tool on Steam, but TileZed doesn't let me increase the actual ContainerCapacity property more than "100"....
My goal would be to add a tile container with just a huge inventory for mass storage.
P.S.:
- when I editied the *.tile file through VS Code, even when I reversed my changes, TileZed would just suddenly close on me when I try to load my custom tile-set
Anyone knows about the sendcommandtoserver function? There is werid report that when run this function in MP, a random client side player will ger the error of "don't have right to run the command". Why is this happening?
Why is sendcommandtoserver causes a random client player to try run the command? No clues why does this happen
What is TIS ? Btw I found what I wanted, isoPlayer was on the other arg
ah nice
The Indie Stone? π
If a server side run the sendcommandtoserver(), does it randomly choose a client player to run the command?... werid.
Hey y'all, brand new to modding here and just dipping my toes in, I tried to create a model and texture for a new item, but I'm experiencing that the item goes invisible when dropped (it's still there and can be picked back up). No error logs I can see in console.txt. Any advice or does anyone know what causes this? I assume it's something wrong with my model, I'm very inexperienced in 3d work.
I knew it was obvious
@blissful heath you may find this useful
Official Dislaik's Documentations
and i believe it covers creating the clothing item into an actual item
to prevent it being invisible
Hey can some one help me out with good modlist for a server, i kinda havent ever moded a MP server and im having issues finding good mods that are compadible. DM me if your keen to help out
Mine is only a normal item, not clothing, so I have created a mesh/texture for it based off the ones in WorldItems - technically just a tweaked version of a pre-existing one.
I think I am pointing the models.txt file in the right direction to pick up both (I've tested using a different mesh with my texture and that works).
Oh my bad
But using my mesh, it always shows up invisible.
Yeah i must've read that wrong, just woke up and am on my first cup lol
lmao no worries
I have to assume I changed the mesh I was working with in some way which is invalid. Are there some unspoken rules that meshes must conform to? Or any way to see more detailed logs than are in console.txt?
Have you created a unique guid for it and added fileGuidTable.xml? If not, look at that section in the linked tutorial above.
did you use an existing world model as a reference in blender?
I don't think you need to do that for normal items? At least, I've never had to.
Ah, you're correct. I misunderstood and thought they were doing clothing.
Yes, I imported DeadSquirrel (trying to make a DeadRaccoon, haha).
I can always go import the squirrel again and try making infinitesimal changes at a time until I identify what breaks it lmao.
Is it showing the "i" icon when you place the item, or is it just invisible?
Just invisible.
I can pick it back up and everything else works.
Is your model one, single object or is it composed of several objects? I ran into problems when I forgot to join my scene down into a single object.
Models with no textures are also invisible.
Double check pathing and file names. There's a lot of little places for hiccups to happen lol
esfnnj
Wait help me, why is this happening now
I just took the squirrel, didn't resize it
Used the same 0.4 scale
Did Blender change the scale when it imported, hang on
wait was this actually appearing the whole time and I didn't see that the giant raccoon was there because it was outside of the house
been fiddling around trying to understand how hand held models work
holy shit
got no idea
it can, yeah. in the object properties i use XYZ Euler set to 1.0, and then i export at a scale of 0.01
then tweak as needed when defining the model
it can do some really fun stuff
That looks like visual hell and I love it
how do i get mods to work on a gportal server
i added the names and the workshop id
but they wont load in
its just bedford falls and katana
try in #mod_support
got it thanks
does getPlayer() always get the local client even in mp?
https://cdn.discordapp.com/attachments/927350398505865306/930930254896320533/unknown.png
Alright we went through too large, too small and finally reached juuuust right. Thank you so much for your help and patience lmao.
Nice work, happy to help π
any leads on how to make hand held models
i made the ground ones already
for those same items?
yes
been trying to look at the scissors trying to get an idea on how it works but no results so far
Does it work if you set StaticModel equal to the same thing as your WorldStaticModel?
iam trying that rn
nope not working
I think that is one of the lines that will specifically cause issues in MP. If it's a clientside script, getSpecificPlayer(0) will get the player. (1) would get the split screen 2nd player if they were playing coop. If you need to do something serverside, you'll need to pass the player's ID with player:getOnlineID() and then on the server you can do getPlayerByOnlineID(id)
does getOnlineID work in splitscreen/coop ?
It's not necessary in splitscreen/coop. I don't think it works there. You'll need to do getSpecificPlayer in that case.
It's not very elegant, but for defecation, I just added a couple of extra functions to check for getSpecificPlayer(0) and (1) to handle a 2nd player.
the devs really made it complicated to make mods work on all game modes :/
That's the nature of networking, unfortunately
Raccoon city π¦
Hello everyone! A newbie here. I am really interested in trying out modding and already have a few ideas. I have almost little to no experience, therefore I want to start out with a re texture. I would like to ask, if anyone has any tips for it. What program should I use? Or should I start out with something different?
read pinned messages
What am I doing wrong? The sound completely cuts out after moving away ~10 tiles.
soum:PlayWorldSound(_sound, square, 1.0, 10000.0, 1.0, false);
sound test.ogg
{
category = World
loop = false,
is3D = true
clip
{
file = media/sound/test.ogg,
distanceMax = 10000,
volume = 1,
}
}
Thank you. Didnt notice them π
Any clue how to have some kind of ModData associated to the steam user instead of an IsoObject?
kinda did it
its flipped tho XD
Something I usually do in the rare occasions I decide to model something is to first import a native model of similar dimensions to what I want to create that already exists in the game (you can do that in blender by installing an extension if I remember correctly) and then I use it as a reference to match both scale and orientation. Most here probably already know that, but oh well...
@sour island you got any documentation on your sandbox easy config mod?
is there a mod where I can put a gun to my own head and execute myself? So my bitten player doesn't turn.
There was @dim pawn called like Suicide With Gun or something, dunno if it still works
Not really - it was mostly made for my personal preferences - also it's not MP ready unfortunately -- and it's been kicking my ass for a few days
Damn, I've been trying to add a simple sandbox check for Facility-7 to allow for the Insurgent mode in MP, any idea where I should look?
I mean modoptions is pretty good from what I hear - I just like to torture myself I guess
I'll let you know once I figure out how to pass information back and forth consistently and have it show up on the UI
Awesome, thank you
@spiral plover I'm not sure what you're working on, but is there any reason you can't use the regular sandbox options? Those are pretty easily modded.
I need to add custom ones, in preferably a custom tab
That should be super easy, look at this example mod: #mod_development message
Oh? I'll take a look then, thank you
If you throw that in your mods and activate it, you'll see the new tab and it also shows how to add to an existing tab - 'ZombieLore' in this case.
Sweet, alright
Ahaha all good
Ya know I was recently looking into modding of Zomboid and a big thought came to me.
Like if the modding gets more and more popular it can kind of be similar to SS13 in the capacity of what's available to do. Just a thought.
I was playing around with spawns and came across the following: Max #ZONES on one chunk is 19. Apparently each region table can have a max of 19 sets of spawn points (zones). I wonder if there's a way to get around that other than creating multiple separate spawn regions, each having 19 zones.
Anyone happen to know what "java.lang.RuntimeException: __le not defined for operand" means in regards to multiplayer?
My mod works just fine in singleplayer and splitscreen, but when trying to access some player data in MP it breaks
if SandboxVars.Facility7.ToggleInsurgentMissions == true then
if player:getHoursSurvived() > 8 and modData.insurgentObjIndex <= 0 then
local infobox = ISModalRichText:new(getCore():getScreenWidth()/4 - 100, getCore():getScreenHeight()/4 - 50, 200, 100, getText("Challenge_Facility7Ops_ReminderBox")..(FacilityDynamicRadio.channels[1].freq/1000), false, nil, nil, 0);
infobox:initialise();
infobox:addToUIManager();
end
end```
it breaks at the second if
Is there any specific way I gotta be checking these? what changes do I need to make for MP?
modData is attached to gametime in this case
__le less or equal '<=' this part of your line 2. likely modData.insurgentObjIndex is not returning a number (nil?)
So the most likely cause is that it just isn't getting initalized properly
This function is being called in a script inside the client section of the lua folders, this isn't an issue is it?
you should move it to shared
Ah, alright I'll do that
Does the folder really matter?
That would be important to know lol, I'd assume so
My issue is that this is set at 0 on new game ```function FacilityInsurgentObjs.OnNewGame()
--local gt = getGameTime();
local gt = GameTime:getInstance();
local modData = gt:getModData();
modData.insurgentObjIndex = insObjIndex;
modData.insurgentObjMaxIndex = 5;
print("Insurgent Objective Index is"..tostring(insObjIndex))
--modData.insurgentObjs = insObjs;
end```
- that the "client" entity and "server" entities don't have access to eachothers files*
- that the server's scripts overwrite the clients in load order
and I print it and it sets it to 0 correctly, but when I try and call it, it doesn't exist
then that must be the issue
so it's like server's server folder > client's server folder, etc
wish there was a bit more documentation with out having to deep dive into the java
Okay, so then If I want to access gametime on the server I have to put it in server or shared
client has access to stuff in server but most is ignored/useless, not sure about vice versa
cant remember if server parses client folder, but its been a while since i dug through all that
I've had to move stuff out of client for MP - so it would follow
even if it does, its mostly useless stuff for the server anyways
Now how about trait related things, as my main trait script is in client
should I move that over to shared?
traits and profession would probably have to be in shared or server
entirely dependent on whats in the script, if your defining traits or professions, shared
its best to just follow where the vanilla files are for similar things
ya looking at my old dedicated server files (b40, havent run a 41 dedicated yet) client folder is skipped
Hello, I have come seeking mods as this game looks kinda cool id like to know what kind of player model mods can be done for this game.
smh I moved it but it still doesn't work, this is gunna be a pain
Anyone knows why SendCommandToServer() would return "player has no right to excute 'command' " error? it seems to only happen in dedicated server, in my p2p multiplayer it doesn't show up
you'd need to be an admin to use that
hosting locally would consider you to be an admin by default I imagine
If you're trying to run client-to-server stuff you'd be using sendClientCommand
Werid, by hosting locally I print "isAdmin" and "getAccessLevel()", they both return false and empty. So I thought I'm still a non-admin
I will try sendClientCommand() and Event.OnClientCommand. thanks
local function onCommand(_module, _command, _player, _args)
--serverside
print("onCommand: _module:".._module.." _command:".._command)
end
Events.OnClientCommand.Add(onCommand)
``` in server/
sendClientCommand(module, command, {args})
```in client/ (or shared/ if you use isClient())
wow, thanks for the details, will try soon.
no worries, just passing on info others gave me
Is there anyone here who knows how to port characters into this game or if its possible?
Thank you
Damn even my dynamic radio isn't working on the server...
I literally copied that one super closely from vanilla smh, its in the same folder section and everything
Hi, I ran the SendCommandToServer() inside of OnClientCommand but get errors that I can't read. Any clues of what the problems are? Does server just can't run sendCommandToServer()? (I ran the function in normal client side function just fine)
Callframe at: SendCommandToServer
[13-01-22 12:45:25.066] ERROR: General , 1642049125066> 6,983,197> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method)..
[13-01-22 12:45:25.066] ERROR: General , 1642049125066> 6,983,197> DebugLogStream.printException> Stack trace:.
No matter what I do, the command just simply doesn't work in OnClientCommand, maybe server really just can't ran SendCommandToServer()
Then does server can't run admin command? what a strange mechanic
God... what is wrong with PZ, client doesn't has admin access to run command but has function to run command, server doesn't has function to run command but has admin access. What is happening with this thing.
Was wondering if someone had some tips. Trying to have a zombie created (outside of view of the player), and then get aggro'd to the player. Like in the state where if a player aggros a zombie, and then runs in a house and closes the door behind them. Sight is lost, but aggro and pathing is still there(?)
Tried to mimic it like this:
zomb = createZombie(x, y, 0, nil, 100, IsoDirections:getRandom())
zomb:spotted(firstPlayer, true)
zomb:addAggro(firstPlayer, 50) -- No clue what this number does
zomb:setTarget(firstPlayer)
zomb:pathToCharacter(firstPlayer)
print("oioi zomboi", zomb:getID(), zomb:isTargetLocationKnown())
And I get this:
LOG : General , 1642054197957> 433,867,847> oioi zomboi 0 false
LOG : General , 1642054197958> 433,867,848> oioi zomboi 40 false
LOG : General , 1642054197959> 433,867,849> oioi zomboi 41 false
LOG : General , 1642054197960> 433,867,850> oioi zomboi 42 false
LOG : General , 1642054197960> 433,867,851> oioi zomboi 43 false
Zombie will quickly lose their aggro and tratget if they don't see the player, you need to keep adding those aggro in OnZombieUpdate
π©
So it really was as simple a solution as I thought. I'll give that a try, thanks!
a little side hint: createZombie() on clinet will not work on MP, if you want the zombies to exist on MP, make sure to call the function in server side.
Yep, I have this in /media/lua/server
the folder doesn't mean anything, it's just a way to organize file, client will still run the lua inside the server folder
Oh, maybe this part I'm not catching. I have this in /server on both my local PZ game and my local hosted server.
Following the structure of this: https://github.com/FWolfe/Zomboid-Modding-Guide/blob/master/structure/README.md
had me believe that client side execution of scripts are on /shared, /client; and /server is specifically for the server
hrm i probably should clarity that there
does this apply to modpacks as well?
I guess to that point, how does one ensure that something executes specifically on the server?
or is it just good enough that the script exists in the server, and the client ignores the script because it's 'not client-side available'
throw the file in the server directory, add this to the top of the file:
if isClient() then return end
(reminds me of dayz modding)
roger that π
Thanks for clarifying this for me!
Guarantee I would've encountered a phantom bug related to this in the future
As someone who will be attending a bachelor's program for computer science focusing on software engineering, and developing games outside of work, is self-teaching/learning to code via modding (PZ specific) a nice segue into some of the work I'd be doing in early classes with programming languages?
I have some, but very little, experience with Lua and C#.
hey I'm setting the panic stat in my timedAction:Update() so you get progressively panicked and its working however when I use the time controls it doesn't take them into account and I'm wondering how I could check if the game is being sped up so I can adjust the amount to increase panic accordingly?
UIManager.getSpeedControls():getCurrentGameSpeed() will return current game speed as an int
thankyou so much
Any introduction to programming prior to class will help you out for your first (couple?) semesters. At least for my curriculum, we were given java and started with the basics: types, conditionals, loops, scopes, object oriented programming The second semester focused on data structures, which you may not get too much insight into with Lua (https://www.lua.org/pil/11.html).
Just doing whatever project that keeps you motivated to learn is good stuff.
π€ Anyone know something like this: How to fix a car part with a script?
or damage it
having an issue where IsoObjectPicker is being blocked by grass and other objects does anyone know how i could fix this because base timed action context menus are not affected by this.
Are there any mods or config changes I can make to have positive food moodles last longer?
quick question, how do you make your own challenges? Like choose the spawnpoint, starting loot, objective, etc.
Are there any zombie cure mods that are still challenging?
Anyone know if thereβs a mod thattl let you crawl
Does anyone have any information on making custom textures? I am new to modding and have been trying to find the info for quite a while now, but it hasn't been successful yet. Thanks in advance!
First timer? or know your way around a modelling program?
First timer :)
https://steamcommunity.com/sharedfiles/filedetails/?id=2648115890&searchtext=model
This might help you, it got me started with replacing textures common player textures.
First step is to get blender or another software that might entice you, Blender is available on steam for free.
Next step you need an image suite, i prefer photoshop and i'm kinda out of the knowledge on what free software is actually out there. But Gimp has been around for quite a while.
Hey guys question, if i add mods on an ongoing PZ game in multiplayer with friends
Will it work ?
Depends on what mod it is, this should probably be posted in mod_support next time
hi guys, do you know of that mod where if you create a new character during a long playthrough it will start with more skills
Thanks for the link! I had actually already gotten blender. Therefore, I wanted to clarify one thing. The process of making a texture for an object is called UV mapping?
if you're making a texture for an existing model then no
uv mapping is how you unwrap parts of a model so that you can add a texture to it
Oh ok. In fact, this is the first thing I want to try out. I want to make a new texture for an existing clothing item
Can it be done in blender or it needs a separate software?
is there any way to get delta time?
cause i need to increment a value over time on player update and i need it to not depend on ticks
or updates per second, or whatever its called, im new to modding pz
Use events EveryDays EveryHours EveryOneMinute or EveryTenMinutes
alright, that makes sense, how often does OnPlayerUpdate happen though?
Hi, do anyone know if there is a reliable way to calculate days since the spawn day in MP? getDay() only return the day of the month, getDaysSurvived() always return 0 when on dedicated server. Anyway to calculate the days since the world spawn in?
Find it myself, it's getWorld:():getWorldAgeDays(), although it seems to start counting at spawn day 7:10, don't know why
lol
any clue how to associate data to a steam user? A bit like ModData but for the SteamUser class (which is not an IsoObject so no ModData)
I need my data to persist even if the player is creating a new character
it depends on the FPS/framerate
you can't
@hollow shadow did you ever find the icon btw? sry i made a rouge on you just had some importen stuff happen around me
Hi! I was wondering if someone could me understand why my very simple code isn't working in-game. It seems to only work when I remove the function, but then it only grabs the first line and ignores the elseif. The print works and shows changing values. So i'm very confused
Willing to pay up to 10 dollars over steam for a mod where birds can be on your shoulder (clothing mod)
not really sure that this channel is for that ^^
also guess it more like modeling you need aswell and not really that much coding
DROPKICK MOD
runs drop kicks falls gets eaten XD
@tacit ermine isn't there a global object or something in the world I could attach my data to?
are there any mod templates or guides on how to create medicine items? involving the health menu and the like?
finding this hard to figure out
My recollection is hazy, but I feel like I remember a couple of years ago where you could literally attach data to the world (IsoWorld maybe? I'm not sure) itself. Which is what some of the old server operators used to do. Was super unreliable though.
DROPKICK MOD
png or .pack for icon what is best?
I would like to make some new animation mod if the game's animation flie can be open with Blender
Can't you just save a .txt file somewhere on the pc with the data? I suspect that it creates problems but that much?
Correct.
Global Mod Data was added as the new, better version of it.
Does global mod data stay when the server is down?
IsoWorld is not an IsoObject, so not sure how I would achieve that
I specifically don't want it to be available via local files
Hi all. Is there a mod to reduce the amount of blood splatter?
you can turn it down in sandbox settings
Oh ok, thank you π
But what exactly do you want to do?
@river plinth you maintain the professionframework on the workshop right? will you update it?
save a lua table associated to a steam user, so that if the user disconnect or create a new character on the same server the lua table would be available from Lua
You can maybe create an immortal and invisible player and put the data on it
And then make tables with the variable nickname and check when someone connects if they have data in this player
hmm or maybe just attach my data to the admin user's character?
hmmm but what if the admin is not connected, then I wouldn't have access to the IsoPlayer of the admin I guess :/
Mmmm but I think it should be connected all the time, that's the problem
Yes exactly, that's why to make a new player who is always connected. But it's a bit of a shit idea
I think it's crazy that you can't store global data, there has to be a way
There is global mod data, what wrong with that ?
just not sure how to use it
You can store global mod data and it is persistent between restarts.
I thought a link was easier to Google, but the patch notes for the build that released with it lists the functions used for it and how they work.
I just got the permission from Fenris_Wolf to update it on the workshop, will do in a couple of minutes
How to use global ModData :
- Global ModData
Registers moddata tables with a given String key.
When Global Moddata is initialised during world loading it triggers the event "OnInitGlobalModData" with parameter: boolean isNewGame.
LuaTable ModData.create(String key) creates and returns the table with given key, returns null if the table already exists.
String ModData.create() creates a table with a random UUID key, note: returns the string key.
LuaTable ModData.getOrCreate(String key) gets or creates the table with given key.
LuaTable ModData.get(String key) returns the table with given key or null.
boolean ModData.exists(String key) return true if table with given key exists.
LuaTable ModData.remove(String key) removes the table with given key if exists and returns it or null.
void ModData.add(String key, LuaTable table) store the table with given key (overrides any existing table).
ArrayList getTableNames() returns a list of all registered tables.
Networking
Global ModData is not synced between server and client as depending on what the moddata is being used for this may not be required or even unwanted.
Syncing of data where needed is up to coder/author. There are however two methods for networking:
void ModData.transmit(String key)
- this will attempt to transmit the table with given key, when called on server this is send to all clients, when called on client send to server. (see note on receiving moddata below)
void ModData.request(String key)
- client only, this sends a request to server to send back the table with given key to this client.
When the server or the client receives a moddata packet it is not automatically added to the local register.
Instead the packet is read and the event "OnReceiveGlobalModData" is triggered, the String key and LuaTable table are passed as arguments.
NOTE: the table argument can be 'false' when moddata packet replied to a ModData.request.
Could maybe be nice to pin my last message or something similar @willow estuary
yeah would be nice indeed
yeah, you can use the GlobalObjectSystem
oh you found it
Hahaha, thanks to @willow estuary
hehe
Okay, so the pins are a mess, aren't good for people looking for information, and the more pins there are the less use they are individually? The information would be better organized on the PZ wiki.
I'll make a deal though, I will pin posts for people after they or someone else makes some sort of link or reference in the modding section of the PZ wiki
Is that fair?
well no π
I wish I had found this info in the pins
I agree the wiki should be updated though, but please don't make it a prerequisite
no one wants to write technical documentation on mediawiki
A bit of sorting in the pinned massages already would not be bad, like the one with just The link for notepad ++ may not be useful
Pinned messages are just straight up terrible as a resource, all the feedback has confirmed it, and the plan is eventually to have just one pinned post linking to the modding section of the PZ wiki.
I've done some work migrating stuff to the wiki, and yes, it's not fun,but it is simple.
well then when TIS decides to properly document their modding API we can do what you suggest, but until then could you please pin that critical piece of information that is missing from all source of documentation?
a terrible resource is still better than no resource at all
There is not even a modding section in the wiki
that is not true though π
So where, I found nothing
you wouldn't guess from the URL, but that's where it is
i think he understood the message once
Indeed, I find nothing from the main menu
@pine vigil would you please pin to this channel the message from MrBounty about the global ModData?
That looks like the snake that bites its own tail
Not sure what you mean
It's not an English expression too? It means that not linking the wiki will not help to highlight it, not help make article and therefore less chance of link it
I been away from the community since I left my job with The Indie Stone a couple of years ago and have only just returned. I prefer to defer to @willow estuary on this channel. Plus I kind of agree with him.
Yeah but Iβm at work right now and canβt login to the wiki for a couple of hours yet is all Iβm saying
Oooo ok mb
DROPKICK MOD
@pine vigil that's so unfair
I really don't understand your reasoning
like it's not on the wiki so we're not allowed to know this information exists basically?
I just spend 2 days looking for that information, if it was pinned here it would have spare me of all this lost time
@willow estuary @pine vigil don't be like this please, just pin the message
I agree that bad documentation is better than no documentation. The information may be forgotten when updating the wiki in addition
Good evening all, I managed to access all decompiled code to help myself modding, now I search for a ways to access all graphical resources and I can't find a way to recover all item icons and moodles, does anyone knows how I could access those please ?π
yeah feeling you there, I wanted to make a different kind of smoker and my week's been a mess cause I guess no one ever tried and there's nothing on it
All is on the texturespack folder in the .pack format. I can send you a .jar to unzip it. But I forgot where I get it
Yeah that's sorta ridiculous that it isn't pinned @pine vigil ??? Why would we keep info from the community
thank you @drifting ore
DROPKICK MOD
@willow estuary a terrible resource is still better than no resource at all don't you think?
@noble zinc stop spamming
@willow estuary @pine vigil it's already hard enough to do pz modding without keeping information away from the modders?
Iβm not trying to be an asshole here, I just prefer to defer to someone whoβs been around this channel more, but I agree with him on the wiki part. Itβs a better place to collect this information and is specifically made to be edited by the community.
Thanks for the lead, found what I needed π
@willow estuary ah now it's on the wiki, so we can have the message pinned right?
can i ask a question?
well you just did π
what's PZ anims?
Animations I would think.
is there any way to check a tile's brightness?
https://github.com/MrBounty/PZ-Mod---Doc/blob/main/How to use global modData.md
I made that, I think I'll add two three things like how to do a timed actions or something too. What I learn and could be usefull so far
or rather, how would i know how bright the location of a player is
i wanna know if a player is standing in the dark and vice versa
Why wouldn't you just edit this on the wiki?
probably because he's not paid to do TIS's job?
Cause I don't know how and like git hub, never edit a wiki
And the wiki sucks, accept it and do something new. It's no use carrying around corpses for years
different kind of smoker?
I'm trying to make a trait thats essentially smoker but with its own moodles and mechanics
and god, I'm not familiar with this code at all
so I'm having a joyful amount of drinks
it doesnt help that smoker is really something else
cigarettes are food

ultimately it's just recording the time when you use an item
but I want to tie it to a moodle that kills you
and its medicine related
so you can see the spaghetti stacking up
its a smoker that relies on different types of medication and will kill you with moodles similar to hunger or thirst
Hi again, I am looking into recipe code these days, I managed to create many recipes that needs to be learned using NeedToBeLearn:true, but this does not seem to work when applied to fixing recipes, the ones starting like fixing Fix DoubleBarrelShotgun. My guess is that I will never be able to make a fix recipe learnable but before giving up I thought I should ask here. Anyone has leads on how to make learnable fix recipes?
If I'm not mistaken, moodles are difficult to mod. Maybe just do it another way
doesn't look like it, the only thing it has is a chance to fail
there's an API for it, and its what I've been trying to figure it out
but I personally dont see how else would I do this
cause I need to kill the player if they dont take medication
moodles arent the only way to kill a player
I dont see how else would I go about this without moodles
specially from a design perspective, moodles work as an alert too, like a warning before you suddenly die from it
my name got a plunger

In the player's modData, you put a variable that reduces over time. It increases if you take the medicine and kills you if you are at 0
But hey, I get the alert thing
can use overhead chat to signal the alert like getting a cold does
there's examples of custom moodles though AFAIK
look at the happiness one, someone posted it here a couple days ago
it uses the same MoodleAPI that I think you're referring to
he he boi hand models go burr
Well guys my mod is on the workshop now :) https://steamcommunity.com/sharedfiles/filedetails/?id=2717907626
Yes I'm great at art, why do you ask?
Guys, who can advise me on how to open the .tiles file properly with TileZed? Every time I do, it never shows me the pictures of actual tiles
what I am trying to do is to open a .tiles file from existing mod and modify it, I can obviously change values and that works, but I need to know why pictures are not shown, as I am stuck making my own .tiles because of weird behavior of the tool
https://www.youtube.com/watch?v=Fbvb6LeX0Sw Dirkie linked me to this one when I was having problems setting it up - this sorta stuff is more quickly answered over in #mapping
Quick video on getting custom tiles in the project zomboid editors (buildinged, tiled and worlded)
If you like what im doing please consider donating to my Patreon.
https://www.patreon.com/DaddyDirkieDirk
Also if I open any of vanilla game .tiles files, as shown on screenshot, it's an issue too
Ah, I saw that, but it tells you how to use custom tiles for mapping. I need to know how to work with actual .tiles file, not use someone's
oh duh, i got the wrong channel lol
I am not in a need of mapping, I am trying to make in-game tiles for objects (movables), would it still be a proper channel to post in?
Yeah, but if you have the base game extracted tiles set up like he does in the video, it will fix your problem.
I was having the same issue.
Yeah, if you're having issues with TileZed and the like, the bunch over there are the experts with that program?
For making new movables, I dunno how much that bunch deals with that, but the vanilla script files have examples of how that's implemented in moveables.txt and newMoveables.txt.
Moveables functions/capabilities are determined strictly through tilezed
Yep, and movable scripts reference that tile.
As long at the movable script is properly referencing a working movable tile, the script item will work.
item Mov_FoldingChair
{
DisplayCategory = Furniture,
Type = Moveable,
Icon = default,
Weight = 0.5,
DisplayName = Moveable,
WorldObjectSprite = furniture_seating_indoor_01_60,
}
WorldObjectSprite = furniture_seating_indoor_01_60 is the important part there.
I learnt that, my problem is getting my .png file from photoshop into a working file, and also I dont understand why opening vanilla .tiles throws red ??? instead of pictures.
Every time I try to open someone's .tiles, I get these red question marks instead of pictures
I assume because the tileZed doesnt load actual tiles
only the definition
Yeah, okay, that's where the tile wizards in the mapping channel will be able to help you? That's definitely their sphere of expertise π
I will go ping them, thank you for the direction!
Np, and good luck!
his problem is that the tiles don't hold the sprites, the .pack does and those are not accessible by default. you have to crack them open for tilezed to read them lol
custom tilemakers give you the opened files too - since for most of them that's the purpose of them lol
Made that quickly
That'll be widely useful - I'm not sure anyone had compiled timedaction knowledge anywhere, been working with them a lot for my project and it would have been nice to have that when I started lol
Exactly what I said to myself, if you have something to add, don't hesitate
Btw, Is there a doc to make a custom job, trait or perks ? Otherwise I will do it too
Is it possible to create a skill with an XP bar?
I was just thinking of making a little github doc to explain it if it doesn't already exist. I ping you when I finish it if you want
Please do because I was thinking of learning how to mod and do stuff for pz but I've got an ultimate idea for a mod.
Chemistry!
It would be nice, send me a message if I forgot to send it to you
anyone have any idea why the item icon over my head is the full path to the texture instead of the actual sprite? i'm going insane trying to fix this
the icon path automatically checks inside of the texture folder so you dont need to include the full path
i'm pretty sure the texture also needs "Item_" at the start of its name
Isn't there anyway of loading into MP server with debug enabled?
WorldDictionary: Checking dictionary...
LOG : General , 1642096984122> ===================================
ERROR: General , 1642096984123> java.lang.RuntimeException: Cannot override modID. ModID=pz-vanilla
I get this everytime, with local workshop on or off doesnt matter.
Trying to log in account with admin role.
the source code where this error happen:
public static void onLoadItem(Item var0) {
if (!GameClient.bClient) {
if (!allowScriptItemLoading) {
log("Warning script item loaded after WorldDictionary is initialised");
if (Core.bDebug) {
throw new RuntimeException("This shouldn't be happening.");
}
}
ItemInfo var1 = (ItemInfo)itemLoadList.get(var0.getFullName());
if (var1 == null) {
var1 = new ItemInfo();
var1.itemName = var0.getName();
var1.moduleName = var0.getModuleName();
var1.fullType = var0.getFullName();
itemLoadList.put(var0.getFullName(), var1);
}
if (var1.modID != null && !var0.getModID().equals(var1.modID)) {
if (var1.modOverrides == null) {
var1.modOverrides = new ArrayList();
}
if (!var1.modOverrides.contains(var1.modID)) {
var1.modOverrides.add(var1.modID);
} else {
log("modOverrides for item '" + var1.fullType + "' already contains mod id: " + var1.modID);
}
}
var1.modID = var0.getModID();
if (var1.modID.equals("pz-vanilla")) {
var1.existsAsVanilla = true;
}
var1.isModded = !var1.modID.equals("pz-vanilla");
var1.obsolete = var0.getObsolete();
var1.scriptItem = var0;
}
}
that's the weird thing, my icon is just Item_BirchBark.png
try just "Icon = BirchBark,"?
no idea as to why it wouldn't work
Silly sounding question, but have you tried logging in w/o being in debug mode?
Just worried that the world dictionary business is unrelated?
Yeah without debug it works correctly.
It does connect, but when the black screen this is how you die start, it kill the game with the error message.
Well, then the good news is that your server isn't bricked?
Just get worried when I see that world dictionary business π
Unless it's changed in the intervening years, that sounds like it could be my code to prevent users in debug mode connecting from back in the day.
is the icon in just the texture folder?
