#mod_development
1 messages ยท Page 92 of 1
the emergency broadcast system is what i looked at to figure out how to get my channel working, and it works now
but i cant really find a sane way to write the translation file
handwriting the translate keys would be a pain lol, i guess i could just try to generate the file
I use keywords in conditional speech, denotated with "<KEYWORD>" basically the phrase gets translated once, then I break the phrase down by spaces and translate any single section starting with <>
Before the phrase is finally handed over
Translations also have their own in-text parameters using %1 %2
Which you can fill with anything
oh i see what you're saying, yeah i do something like that with my translation as is, where certain context-related things are in curly brackets
I'm not sure if emergency broadcast uses same system as cd and vhs but for second one u can check /media/lua/shared/RecordedMedia/... and translate for it in /media/lua/shared/Translate/LANG/Recoded_Media_LANG.txt
maybe will help to u by some way
to don't think about name for each line u can use uuid generator
just thinking of how it seems like a pain to do something like
channel_intro1_line1 = "hello"
channel_intro1_line2 = "i'm your friend"
for every single segment of text
and maintaining this, adding or removing different lines
but maybe it won't be a big deal idk
check out this tutorial https://www.youtube.com/watch?v=iv7N7gmowWU
hello everyone and welcome to my basic tutorial on using wordzed!
Here's the link to download the program -- https://drive.google.com/file/d/1vY-08QJBIzh8gxzIzhGuyLs-RP-CV2T3/view?usp=sharing
and then another thing i see as a forseeable problem, i only speak english but i am suspicious that it won't be possible to translate something line for line in some cases in another language
Depending on how radio works you could split longer phrases dynamically as well
yeah I've used wordzed a bit to see how some of the channels work, though I don't know if I can use it in my case since entire shows won't be scripted from start to end, they'll be created somewhat at random
I assume all the data is fed into a table for the radio to pull the text from and play?
well, at the moment i'm doing something where i put multiple interchangeable messages (like a greeting) that are worded differently in the same translation key, but separated by an @ symbol, so that one of the messages between the @ symbols is selected at random
I was thinking it would look cleaner if I used a long string where each message was on a separate line, but I don't think I can do that
so yeah for picking a random message, i parse this text by separating each of those messages and putting them in a table
I'd have to see when/how phrases are selected for radio
If you can bypass the function entirely to provide your own string
ISUIWriteJournal.lua
You can just use bits and pieces of the translation system as needed
oh yeah i can just provide my own string
I use translation for conditional phrases but I have it loop through n+1 until the translation gets back nil
So each language can have a different amount of phrases
Id still recommend "@Greeting@, @body@. @transition@, @body@" etc format
I parse the translation using the n+1 into a table for myself to use
Np
Thanks for the hint. I just playtested the code where I logged into my server as a client with a new user name and still received the correct data.
and the number behind the items is just the probability with which they are added? for example, "Apple", 8 means there is a chance of 8% (=0.08) that an appel is added? (in each loop?)
Yes but it's not out of 100
do you know how it is scaled?
if Rand.Next(10000) <= chance(modified by luck) * 100 * lootmodifer + zombiedensity * 10
What is parameter for models to not accept alpha or to make solid model without transparent like for xml or self script ?
If you jump to the comment, the context is I was reading through the java and trying to translate it in real time - sorry for the back and forth lol
oof that looks like something, thanks so much!
Finally was able to help out ๐ซก
omg
May have changed since then
Also, they added a loot spawning tool thingie
Should be accessible in -debug
just to keep the ball rolling, I was thinking of basically replacing already placed items with custom ones... That seems like the easiest (though horrendous) way
it should be fairly easy to "intercept" placed objects, even if it'll probably become stupidly heavy
Yeah, though I don't know what the id of these fences are. And there isn't an easy way of getting them as object from the IsoGridSquare from what I see, but it sounds like you've researched it more than I did
some of the objects that I want to edit are referenced in some random table since there are already destroyed versions of them
but they wouldn't show up since well
they can't be destroyed normally
now the main problem is making them thumpable
I found the fences' thump condition at 1, but I have no idea how to make them thumpable
it's a whole different instance of object afaik
we can't just set it to 1 and done
that's why I was thinking of just deleting and replacing them
anyway I wanted to find a side project and that seemed doable, I think I'm gonna wait until I'm a bit more versed
What i did to my atm mod
Was i needed to make it a container
And i cant seem to do that if its not thumpable
So i deleted the object and added another one thats thunpable and has the same sprite
Technically it wasnt a conversion that happened
More like a substitution
But i called the function activate on the contextmenu
That's what I was thinking of... how do you substitute every instance of the old objects though?
aw rip
so only when the player is really close basically
U mean like the properties? I dont know how to iterate all properties
So i just made a new one and assign every possible properties that matches and that i know of
no no I meant like, substituing every object in the world with your own
Also the moddata that makes it unsledgeable
but from what I'm understanding you're making the substitution only when the player uses the context menu
Ahh well that doesnt apply to my mod cuz i dont want every atm to become a shop
So admins has to spawn atm or interact with existing one
mh
Howver on my serverextrasetting mod all the container does that but i dont know how that happens cuz its chucks code
I used his container api
Yes
What i observed from other mods is that they upload a modofied version of the tile definition for that tile
On thus making it apply to all existing tile in the game
Once they restart the server perhaps
that would be fine too, at least for what I wanna do... But I couldn't find the definitions for the tiles I wanted to modify
U can look at the roadblock or the flamingo mod
I was trying to think of something to use as an example
I forgot where i found mine
I can send it to you but its older than current version
that would be fine
I was trying to use the base code as an example but it's a big mess
Theres a draw back to this tho. If incase other mods also went and use tile theres a chance for your mod to break their mod
it would make sense
If you extend functionality for existing code, store the function you modify and call to it when you can to avoid conflicts with other mods.
Im safe from that thing cuz what i look for is the tile name . But if incase theres a mod like maybe the hoppable counter
Or something like that tho idk what his code looks like
But how will other modders know that
Idont get the use of the old_isValid=ISSomthing:isValid
local __originalFoo = SomeClass.foo;
function SomeClass:foo()
__originalFoo(self);
-- (My code)
end
I can only understand if u have a conditio
If newitem then donewfunc else dooldfunc end
If all mods that touched this method used this approach, all of them would execute nominally.
It's up to the modder to implement their code.
The best you can do is tell people about this approach.
This is how I override the MainScreen render function to insert render code as callbacks in Lua.
I once saw @weak sierra code she made a thing that on the last line she returned the original function back
Old code, but practical example.
Like its as if nothing hooked. It was clever but idk how to do that
Is code from 2016 lol
I dont understand what im reading
Sorry to hear. If you look at it I'm inserting functions as callbacks through global funcs.
I override MainMenu's render, prerender, and update functions to call the original code and then invoke those callback functions.
The result is that the original code (Even updated), will execute and also execute my code.
That's why this code still works.
Maybe a simple psuedo code would help
Simple pseudo code.

MainScreen._alc_prerender = MainScreen._alc_prerender or MainScreen.prerender;
MainScreen._alc_render = MainScreen._alc_render or MainScreen.render;
MainScreen._alc_onFocus = MainScreen._alc_onFocus or MainScreen.onFocus;
I'm showing you an actual implementation that preserves the original code without removing or using copied code.
๐ค
Yep this i understood
ah, u have requiring MainScreen again, yeah, my bad
with it no problems
function original()
myHookFunc()
--orig stuff here
end
Or maybe
oldfunc = original
function original()
if checkerFunc then
newfunc()
else
oldfunc()
end
For these, you'd be calling these functions as non-instanced. (Think static)
So a common thing I see asked here is the nuance on calling an instanced function.
local foo = new Bar();
-- Calling this:
foo:bar()
-- Is the same as this:
foo.bar(self)
In that example:
-- Is a static or non-instanced invocation of a function, even if the function is assigned to the pseudo Lua class.
foo.bar()
Make sure to know this when working with overriding vanilla code.
exactly in this example "same" should be foo.bar(foo) cos self not presented
self is passed as the first parameter when : is used instead of ..
Python has a very similar solution to their class functions.
self is "self-managed" by Lua. =)
yes, but good to know what exactly mean is to call static function as method
What I don't get is why Kahlua forwards this same syntax with calling Java objects since Java is rigid and read-only.. and only methods can be inside of class bodies.
I guess consistency with Lua code in general..
It doesn't explain JavaObject.new(..) vs JavaObject:new(..)
That throws off a lot of new modders here.
It could be the class solution TIS uses for their code that creates this oddity.
They could get away with making new be static.. ๐ค
@jaunty marten It'd be good to have a YouTube video to point at when people have issues with PZ-specific Lua nuance.
never tried to find any guides for pz lua but I think there's ultra small amount of it
it's an absolute clusterfuck. I'd say most of the blame is on Kahlua, since it's old and dead, but I don't know that for certain
excuse me but where can i find the event trigger file
like event.Ontick etc
and can i add some more event triggers?
I'd always investigate the code before blaming the platform. xD It's more to do with changing design over many years.
Yes and yes.
Events.OnTick.Add(function() .. end)
triggerEvent('MyEvent', arg1, arg2, ..) -- MAX: 6 arguments. If you need more, make an argument a table.
many thx but where
The bottom of a Lua file usually.
i believe it should be saved somewhere in media/lua
If you need to listen to an event for a period of time or after loading your mod then just add it where it needs to start listening.
That is an IntelliJ IDEA project artifact.
so the bottom of client?
it's not dead lol
A lua file.. Wherever the code makes sense to be.
the only repo I can find had its last commit in 2013 lmao
Organization is up to you @crimson tundra
looking for a needle in a bottle of hay aint it
what are you looking for? you should be able to ctrl+shift+F to find whatever you need, as long as you're using a modern editor like VSCode
am i?
how would i know what editor you're using lol
okay then yeah, ctrl+shift+F should get you where you need to go
if you can't find what you're looking for, it's likely Java
mb they have own private repo with updates or just without repo idk
(or it's dead)
lmfao
why would they suddenly make it private, but continue development? it's definitely dead as fuck
but currently in 3d2d game it's enough personally for me to creating interested things
wait.... it couldnt be....
I remember forking Kahlua and rewriting their reflect code to use method headers.
indie... youd better not put it everywhere seperately.......
if somehow I'll join TIS I'll send u msg about kahlua state 
lmao
or if will join then shot me msg
let's agree on this 
lmfao will do
cool
what is the recommended way to add new items to the spawn tables? using an event like OnNewGame for example? Or OnGameBoot?
TIS modified their copy of Kahlua2 to handle certain things with Lua like serialize and event-related stuff.
@dark wedge your mod and mine are fighting. we must now deathmatch.
๐ ๐คฃ ๐ญ ๐คช
i mean yeah, events are basically the main method of calling Lua functions. that's not surprising. you're going to have to narrow it down
this is becoming an XY problem quickly, you're best just asking what you're specifically trying to do
trying to find the code which explain how all triggers do so i can figure out a RAM friendly way to stay with tons of zombies?
to just don't search events u can find them here https://pzwiki.net/wiki/Modding:Lua_Events and after it find it in code and check how it can be used
that won't exist in lua, the events are almost exclusively fired in java
that's another new list of nkvd
anyway still i wanna figure out how to create my own triggers so i will be able to make a less laggy Armoured MH mk3
thx anyway
not "anyway" i suppose... you really helps a lot
๐
LuaEventManager.AddEvent("event_name")
triggerEvent("event_name")
Events.event_name.Add(func)
-- if u have name with spaces and symbols like :.!? u can use this
Events["event_name"].Add(func)
You can make your own trigger able events but only in your own Lua - you cant make more in Java
u can rewrite java module 
rewriting this will make my mod pretty unstable i suppose
Yes but that would require more work for end users not to mention a huge security concern
Yea, mine overrides your animation in code. I have a patch ready to go, is 100% on my end. Was trying to finish up a new feature but will probably just release that fix here soon.
not just subscribe to it and enable in mods menu
that would be a disaster
mb u already saw this manual installation in some workshop mods like better car physics
XD
round 1... FIGHT!
i may wanna use this tricks if i wanna make a mod that not all-age direction
lol okay
I added a proxy call to that in GlobalObjects. =)
I proxy called YOUR MOM! she's doing well and misses you.
@faint jewel it's lose, u have to delete ur mod immediately
like just subscribe you got an 12+ mod but with manual installation you got the patreon version kek
we never chose numbers, thus it's a tie no matter what.
i choose the number: 
www.. why... no... no.. no fight? 
and......ROUND 2!
I CHOOSE ๐
I think he will choose 
lul
and me
@dark wedge go hide in the house and wait while he won't fly away
easy win
win by brains

yea. my transfer item animations are too much of a work in progress to delay release of that fix. thought i could squeeze it in, but i've only gotten the timing down. lol. just to show off a bit...still needs work but the timing is there.
this is working because the code is all running on the client, not because of networking - moddata isn't synchronised automatically
code in the server folder still runs on every client
so while this works fine now, you'll notice it'll desynchronise when you start doing more complex things since it isn't actually serverside
Neat, but are they standing on the table?
yes. i'm trying to just correct the animation for when you transfer the item out of the ground container, but its on a table or something. doesn't make sense you animate picking stuff up off the floor in that case, but the default loot animation was too quick for that, didn't look right
if you want your code to only run on the server, start the file with if isClient() then return end - this means it will only run on the server or in singleplayer
you can send global mod data with ModData.transmit("Key") , (this sends it to the clients or to the server depending on whether it's being called on a client or the server) which you need to handle on the OnReceiveGlobalModData event, which is passed the string key and the table
a typical implementation of this looks like this:
local function handleModData(key, data)
ModData.add(key, data)
end
Events.OnReceiveGlobalModData.Add(handleModData)
```for security reasons, you probably want to check the keys first
```lua
local function handleModData(key, data)
if not key == "KeyFromThisMod" then return end
ModData.add(key, data)
end
Events.OnReceiveGlobalModData.Add(handleModData)
Reminds me I meant to look into accurate placement to cursor - sometimes when you place stuff it goes off the edge of the table for example
It's tiny stuff like that which nagged me into modding ๐
thanks for the tips. I also tried running my code where I randomized the ModData I am using. It still has been the same for server and client when I playtested. So started a new game as host, ModData have gotten initialized with random values and then joined my game as a client. The data have been the same...
oh, i can't explain that
maybe global get synced on connect, then never again? or possibly they have the same seed at that moment
found this stuff quite confusing. maybe I did smth wrong when I playtested
how were you testing the values on the server? were you checking the coop-console.txt?
in this case, I probably need further treatment as @bronze yoke suggested. Although I simply store 2 numerical values in ModData and only send them to client (not the other way around), I'll plan to change those values at certain points in game...
I created a game via host button using the steam parameters -nosteam -debug I think. Then quitted, started the game with parameter -nosteam and joined the game again with a different user name. not sure if this is the right way of doing this
at least the game allowed me to create a new character then and used the same world...
hmm, i think the client save file would be the same, so the moddata wouldn't be recreated
100% same for me. ha. Also, i had noticed that was off sometimes, thought it was just me messing up. 
i'm not really sure if that's how it works though, the client save files are scary
I think the tile gets set if you're hovering over it and it ignores if you were just on a table surface nearby
maybe I just use if isClient() then return and ModData.transmit("Key") blindly, check that everything works in singleplayer and just hope that it will work for mp too
yeah, isClient() won't return true in singleplayer so server-only code should still work then, and ModData.transmit() won't even fire in singleplayer so we're okay on that end too
although in my case, ModData.request might suffice I guess
what exactly is "Rand.Next(10000)" doing?
random int [0,10000) I think
It's unfortunately always a high-quality PRNG.
Ok. (Question was about how the probability for the loot spawn in the distribution tables work). So, if we ignore lootmodifier, zombiedensity and "modified by luck" stuff and if I have "Apple", 10 and rolls = 4 in the distribution table, does this mean that apple is added with a probability of 4000/10000 ? so 0.25 ?
no idea, but I do believe it is actually 4 separate attempts
Yeah, was not so precise. More precisely: In each of the 4 turns, it is added with a probability of 0.1 then?
yeah, it just does the normal calculation multiple times
great for performance, lol
How so?
any knowledge about what the default value for lootmodifier and a typical value for zombiedensity is?
"next" just means "go to the next number in the sequence" but the argument there is a limiter, so it'll find the next value as long as it's between 0 and N
bro is out here compiling lua 
let me know when it's done and i'll add a link in my mod to yours.
yeah i get you. the base game does the same thing for its Perlin and Simplex noise maps that are used for soil/weather/etc, at least in multiplayer
You can compile integer weight values as array indices and then call with one random int.
=)
Ah ok. I don't know much about this area of the game's core.
great timing. I literally JUST updated it: Jan 23 @ 12:34pm
Had to fix a quick bug too, but should be live now. Sorry for the number of comments you got. ha
and what is the "Rand." before the "next"?
random
hey as long as we got it sorted it's ALL good.
We should mod Kahlua to support loading compiled Lua code haha.
IIRC it already supports it, loading stdlib in the root folder of the game.
does it use LuaJIT? i forget
yeah as albion said that's just random, it's the name of the parent class just like any other. Rand contains several methods relating to pseudorandom number generation
they get MAD about fancy handiwork lol
I think most of the random generators are exclusive of the upper bounds, so Rand.next(10) will never give you 10, only 9. I can never remember what the lower bound is though. I assumed 0, but since we're dealing lua sometimes it may not be
it's actually Java, so it'd be 0
Do you guys know if there is a way through the debug mode or any mods that allow you to hide your player character render?
Like, I want to basically have an admin that can have No Clip and Fast Travel enabled to be used like a camera
And having a derpy survivor that is in the center of the screen is not ideal for recording purposes haha
you could check the breakpoint menu, in F11 - if you press the options button at the top there's a whole bunch of toggles for rendering/not rendering certain things
can't recall if there's one there for the player
That's good to know - I will have to give it a look. I assume that is with the debug mode running?
yup, debug exclusive
is "lootmodifier" =1 if we play on default loot rarity settings?
Noted. Thank you kindly!
which "lootmodifier" do you mean?
the variable in this forumla: if Rand.Next(10000) <= chance(modified by luck) * 100 * lootmodifer + zombiedensity * 10)
that's entirely dependent on what lootmodifier is defined as in that context
that's why I ask...
just thought some of the people here might know since spawn rate modding seems not sooo uncommon
right, but I don't know where you're getting that from, so I can't tell you what it means in that context. it isn't a global variable that I'm aware of, so it's probably local
from what i've seen, literally nobody has any idea what they're doing with it
at best we have a very general idea of how it works, nobody seems to have it down to a science
probably because most people get scared off when they have to look at the java
isn't it pretty simple just to use LootZed? or is that buggier than I remember
i haven't touched that in ages but I assume it still works
lootzed works fine
for zombies to smack it you mean?
the ai tends to break down around smackable objects, as zombies will prefer to bust up things that are bustable
buuuut let me grab something i did a long time ago
if i'm not mistaken to achieve this you need to set the isThumpable property to true
off of the top of my head, maybe some kind of obj:getModData()['isThumpable'] = true; magic
or maybe obj:getModData().isThumpable = true;? i think both end up producing the same result
rand is, but doesn't zombrand adjust it?
no
so all the rand functions are [0,n)?
nah. if it's a java method, it's called as a java method. that's like 90% of the lua in this game, even - this is BARELY even Lua, it's more like you're writing Java in Lua's syntax
it's absolutely ass-backwards, but it's what we have
as far as I'm aware, yeah - Next() is the main one obviously, not sure about the others
I mean, that is the point of lua, using Lua to interface with another language. Its not usually java but that doesn't really matter
its perfectly ass-forwards
that's rarely how Lua works, actually - that's the point of having a layered API, which Zomboid really only has for stuff like event handlers
the method used here is entirely "unwrapped" which defeats the point of a wrapper in the first place
Lua was literally developed for this purpose, I don't know what to tell you
I don't know who told you that, but they didn't know what they were talking about lol
the lua devs? aight
lmao what
Lua is the worst language I've ever worked with
So primitive
Even C is infinitely better
lua is normally alright but the way it's used here is insanely counterproductive and counterintuitive
it's more or less just used as a security measure and that's it
oh, and UI scripting, I guess. that's nice
yeah, i find it a little difficult to even call zomboid's modding api... an api
Ahahah yeah
yeah. even calling it "barebones" would be an insult to bones tbh
I spent so much time trying to make bike mod that I'll never touch that thing again
I can't begin to comprehend the effort it must've taken to make something like Britas and Arsenal
you really have to know Java and treat the code as Java to write good Zomboid lua
even the vanilla Lua more or less looks like Java-esque OOP when it comes down to it, except maybe some of the UI
lots of inheritance too. not complaining about that by any means, just saying like... I'd much rather just use Java instead of this weird pseudo-Java. it's like they're so scared of reflection/IO access that they implemented Lua solely to put a limiter on the power of mods
which is definitely something that should happen because people would absolutely do malicious shit with that, but idk I wish they would have gone with a different path
How it take you much time something that you copied? you're lucky I didn't send a DMCA request in that moment
Never copied anything dude, I only reference what I see in the game's code
We don't talk about the UI code here..
__>
do you really have the nerve to say that? I hope you are not deleting the messages where you ask about my mod and how to do such a thing...
and the fragments poorly disguised in their code
Jeez imagine asking how somebody did a public mod
God forbid somebody asks me how I made the music festival mod work
Can I have a link to your mod @ruby urchin ?
I remember seeing this mod.. was this commissioned?
self work, I don't like upload to workshop commissioned mods
what mod am i missing?
Hmm.. well it's your choice on what licensing you use for your works. If you suspect something like what you mentioned earlier to be the case, consider a more formal approach before DMCA. Jumping to accusations creates a toxic modding community.
I license my work too, although I'm very open about it.
I created factions functionality along with a new chat system and discord integration before any of those three were in the official game. Even though I made it first it was open-sourced and expected to be deprecated at a point.
anyone who has "Copyright <their name> <year>" in their mod description is kidding themselves lmfao. either use a real license, or rely on the one that actually matters - aka the zomboid modding terms of use
I try to encourage more modders to license, however more copy-left than copyright. xD
A lot of ways to share code and give credit.
lol according to steam DMCA, you just need just say the work is done by you, read steam terms
People even place mods in modpacks without asking
exactly lmao
Been an issue since time in memorial.
Exactly haha
I actually formed a solution for this.
Since the server I made this for isn't using it, I might release it.
It fights against server-exclusive workshop content being stolen. =)
the solution is just to not be a stuck-up dick head tbh. it's modding, it's not that serious, and no one is making a living off of it. your code isn't a gift from God, and if someone makes something cool using it - good
Yeah
not that I'm saying anyone here fits in that category, but I've certainly seen some folks lean toward that behavior
Assuming a bit on the uhh 'living' part. xD
Hahahaha
Sometimes I struck gold in PZ for being paid.
I mainly did contract jobs for MC modding.
Ah but commissions only tho?
Nah. I worked and got paid weekly for an old server from Build 35 days.
It can happen. Just sayin.
To me, this is how I play the game now. Its fun, we're all just supposed to be having fun.
My stance is that if people here find my code useful enough to use in their works, then I did my job.
isn't that against the terms of use?
You can get paid for service.
I was an IT / admin.
Yeah it says you can be commissioned
Just can't like directly sell copies of the mod
"However, having mods created exclusively for those who choose to donate (or separate โin-modโ content and bonuses) is not allowed."

"2.4. Commercialisation. Unless any arrangements to the contrary have been made with us, mod creators cannot sell access to a mod and/or mod content. Mod creators are permitted to work on commissioned mods provided such mods are not sold. Please see section 4 of the Terms & Conditions for more information on this."

oh wait that middle part
Mod creators are permitted to work on commissioned mods provided such mods are not sold
๐
Relatable
Legal is always fun.
covers the "don't have a Patreon paywall" in its wording too
Recent addition?
server exclusive mods seems to run afoul of 2.3 though
yeah definitely
if a commissioned mod isn't public, it's in violation of the terms, more or less
thats how I read it as well
afaik, 2.3 covers that.
However, having mods created exclusively for those who choose to donate (or separate โin-modโ content and bonuses) is not allowed.
I would consider that part of those services, but that's my interpretation with 0 real world law experience.
Commissions are then forced to be shared with the entire community, which in common practice would mean that most of what would be commissioned would be against those rules.
This would also mean any commissioned Java mods would need to be shared.
not unless that mod is way too specific and doesnt really add to anything whatsoever.. like intro scene for a server.. or their logo as item or tile.. imean they wouldnt want anyone to download that maybe
Aaaand that conflicts with not sharing or distributing decompiled source code.
That would then nullify the commission part. I'd expect the decompiled source distribution to survive that conflict.
the only limitation I see on releasing source code is if it can be used to play the game for free (or to cause damage)
and people are free to commission you to make code that you give away, but exclusivity to them or selling it after the fact is a no-no
yeah exactly
Which I'll openly say is silly.
there's nothing silly about that lmfao
to have content made?
People commission mainly for exclusivity in any market.
if you're playing keepaway from the rest of the community for some elitist reason, then you're a cunt and don't belong in the community in the first place tbh
servers that want to pull that kind of shit can get fucked
"How dare you not give us free stuff" is what I'm hearing tbh.
mods are free stuff, so yes - that's precisely what you're hearing
modding is voluntary, and I do what I do out of passion for the game and its community, not for money
exclusivity is typically for profit motive, this is modding, and its against their terms ๐คทโโ๏ธ
You don't own or have rights to my work. =)
but TIS does ๐
Actually they don't.
(sorta)
it's their game, and you agree to the terms by using their game
so they're free to tell you what not to do under those terms
they give us the rights to our code, actually
You agree to their terms but they can't copyright an API.
I don't recall saying that they did, just that you have to abide by their terms.
I'm abiding by US copyright laws.
3. Ownership
3.1. You own mods that you create. We own Project Zomboid, our other property and everything in them.
3.2. We need a right to use your mods so that we can distribute them, and so that others can play them through Project Zomboid. In legal terms, you grant us a non-exclusive, permanent, sub-licensable, royalty-free, irrevocable, and worldwide licence to use, modify, reproduce, create derivative works from, distribute, transmit, perform communicate and exploit your mods (or any part of them) in connection with Project Zomboid.
It's not being a dick about it.
not if you're doing what we mentioned above, you aren't
lmfao
it's a legally binding contract
Yeah they do . Its said so on the modding agreement thing..
In order for them to distribute our mods to steam they must have ownership and posting it to steam technically is our way of signing said agreement
not ownership, you grant us a non-exclusive, permanent, sub-licensable, royalty-free, irrevocable, and worldwide licence
Ow anonymous just posted what i was refering to. Im too slow
Ow ok
Yeah legal words
Big ones
Imagine if someone spent a month fully fleshing out a feature and then tried to sue TIS for 'copying' their work ๐ง when they wanted to improve the same feature
I'll leave this here to give an idea of what I'm referring to, or a practice associated with how API and copyright work here in the United States.
https://en.wikipedia.org/wiki/Clean_room_design
Clean-room design (also known as the Chinese wall technique) is the method of copying a design by reverse engineering and then recreating it without infringing any of the copyrights associated with the original design. Clean-room design is useful as a defense against copyright infringement because it relies on independent creation. However, beca...
the first line of the introduction of the terms of use is, quite literally, (a) These are the (legally binding) rules for Project Zomboid.
any mod not cooperating with the modding policy is disallowed under those terms, which means the stuff @red tiger was talking about explicitly falls under it
See that would be stupid.
I'm happy that some designs I wrote back in the mid 2010's came to be seen in the official game.
if indiestone wants to take something I made and put it in the game I hope they fix it first
copyright law is irrelevant if contractual restrictions are placed upon you beyond them, which is precisely what we're discussing in this context
I'm guessing avoiding messy legal crap and the fact it's also steam's policy for workshop content is why it's worded like that
Not sure, the trailers were more broken that the mod or not?
I wasn't aware of the can't sell mods thing
You should research how breaking laws via contractual obligations nullifies the contract and absolves the affected party's responsibility or obligation to that contract without penalty.
Law can't be irrelevant.
What if you get commissioned to write a mod and in the agreement hand over ownership? Wouldn't it be on the buyer to distribute it or not?
except laws aren't being broken. it's an explicitly restrictive terms of use, not a permissive ticket to break the law.
that'd be considered a purchase, because you're transacting ownership for money
(which is what a purchase is, more or less)
Some contracts are like that, especially working for Minecraft server networks as a plugin developer for example.
Would that be against the current TOS?
yes.
it is if you disallow shitlords in your modding community (and TIS does, thankfully!)
Whose being a shitlord though?
unfortunately a lot of this stuff happens behind the scenes without anyone knowing, so it's hard to catch offenders
You're looking for problems that aren't affecting you.
?
That's so confusing.
lmfao what are you on about
I'm asking you exactly this.
I think you're just butthurt because I'm probably talking about you, from what you've said
If they're selling access that's one thing - but if I write something for someone else as a service - I would assume it's on them to distribute it or whatnot
You're argumentative and talking at me at bad faith. I'm clarifying and filling in for nuance surrounding both the licensing for the game and law.
Crater just wanted you to be aware of TIS policy, he's not NSA or whatever.
it's on you whether or not you distribute it, and if you're distributing it to a single person in exchange for money, that's against the TOS.
exactly lmfao
How do you do that. I mean u know we do commission work right . Your are there on one of the servers we work with
But do you think what we do is selling?
i'm not the mod police, that's the staff's job
It's hard to take your position seriously when you're on the attack. I'm moving on.
Perhaps we can ask for clarification, instead of circling the drain a bit
I joined that server strictly to talk about modding with the people in it, I don't know what you're doing in there in regards to money, nor do I give a shit honestly
Ok just wanted to clarify if you see it as something that is redflag or so
it's not my place to flag things, I'm just saying what is and isn't part of the TOS, and how I feel personally about people who decide to break that TOS
Ok thank you
(they're cunts, and should probably find a new game)
too much
the line between commissioning and selling is so thin, haha. Its pretty much whether you agreed to exchange money before or after
Reminder: Don't break the rule "Be lovely!".
Before or after matters? I dont quite get that
idk, I think defending the game against people who want to exploit its players for money is a pretty lovely thing tbh
@iron salmon is taking a commission (and in that process handing over ownership of the mod for money) against TOS? Since it's technically a distribution of one person. Or are we all overthinking this?
Commissioning: I give you money, you give me the thing I want later
Selling: You have the thing I want, let me give you money for it
ye i get it now .. right so im the first one hehe
I'm fairly certain the caveat in the TOS is to combat paywalling and not for commissions, as commissions are mentioned elsewhere
they explicitely state commissions are ok, I'm just noting how shaky that is when they disallow sales, lol
agree
as the TOS reads, the ONLY case in which monetization of a mod is acceptable, is if you're 1) accepting donations that aren't tied to access of the mod, or 2) you're taking a commissioned work that will be released to the public as any other mod would be
that's what it says, if you like you can read it yourself - it's fairly cut and dry. if the staff wants to elaborate or shine light on that, or clarify a misconception, then that'd be wonderful - but that's how it reads, as someone who's worked with legal documents extensively
In my mind, the final determination over whether its a sale or not is exclusivity. A commission creates content, a sale creates content only for the person who paid for it. The other wording in the agreement seems to support that, but its pretty grey imo
If you want a constructive, inclusive and non-toxic modding community, don't approach what people are doing in bad faith. Ask and discuss sure. Name-calling and accusing people is not ever going to get anything better.
"don't approach someone who's breaking the rules in bad faith"
I think until a staff comments there can't be anything new added to the convo.
Rosewood Legal, the hit new TV drama
A movie set would be a fun scenario to run into
wasn't that one of the challenge maps? can't remember if that's still a thing
I'll have a try I guess, thanks
Imagine fighting your way to a prop gun
I believe it was kingsmouth? Nurver made a mod to bring it back I think.
I think if I had more free time and talent I'd want to add a ren faire and civil war reenactors
A random, large scale, scenario you can run into
That'd be amazing
Selling = you can sell unlimited of copies
Commissioned = Do this for me and you will get paid one time
that's a lot of different
if you can sell a mod, you can get richer than the game publisher
Steam used to support mod selling lol https://steamcommunity.com/workshop/aboutpaidcontent
That was to compete with nexus right?
I don't think anyone was confused on what the definition of a commission is, just that you can't privately sell a commissioned mod to one person without releasing it publicly
sorry to annoy you with this, but do you have some old code with this working? I'm not sure I can do this in my case
"Sales" and "Commissions" have been around long before infinitely reproducible content existed, I'm not really aware of a universally agreed definition in the modern age for IP but I imagine there is one
I think this is what should be clarified. As I think you should be able to sell the distribution rights too - and thus make it not your problem as the mod author. ๐
that's just selling the rights to it, then.
I put out the ping, but I can try reaching out to clarify
I don't know where pz_legal is located, the topic is interesting, just wish it was covered more civilly and on a level-headed matter.
(which isn't allowed)
my perspective
sell = you sell the products
commission = you sell your labor of work
I think we all agree
right, again - the definition of sell/commission isn't the issue here
lol
no one is arguing that
if you don't want to break TOS, it's very simple: all paid content must be released like any other content you make for public consumption. if it's distributed to one person, consider it distributed to every person, whether the "patron" of the commission wants that or not
it kinda is the issue though, since one is allowed and the other isn't. Obviously selling copies is sales, and taking payment once for released content is commission, but taking money once for unreleased content is the grey area that's being discussed, imo
one is allowed under circumstances
Also there is a whole field of legal debate over "letter of the law" and "spirit of law". It could be this confusion wasn't even intended or considered fully.
it doesn't say "all commissions are allowed" and "all sales are disallowed" although the latter is probably closer to being a full blanket, of course
The clarification needed is to whom the burden of distribution is expressly on. Which isn't mentioned.
"server-specific game modifications alongside a financial exchange fall far enough inside this bracket to create a grey area. Given time this could be exploited, and as such we feel that from the outset we shouldnโt allow, encourage or support it."
it couldn't be any clearer lol
just because certain people choose to try to tiptoe around the wording, it isn't working very well unless you just... don't know how to read
To clarify, the content should be public -- what I don't want to be is on the hook for that
oh, like you don't want to be the one responsible for hosting it? yeah, that does create a difficult challenge.
at that point, I'd go with "I won't accept this commission" as the correct answer
Going forward I'll just be informing everyone the work will be on GitHub but not the workshop. Unless they want or don't mind me publishing it there.
That way it's technically public/published ๐
as long as it's a public repo, yeah I don't see why that wouldn't be allowed I suppose - but if it's for a specific server to use, then that's apparently explicitly disallowed
why would you be on the hook for that?
forcing people to manually install your mod without the workshop is a bold move, lol
The argument that came up is if the 1:1 exchange of money for a mod commission counts as private distribution
(and it does)
because I promise that 100% of the time, that's for a server, not for singleplayer use lmfao. maybe an exception would be like, a streamer that wants a specific singleplayer experience for a stream/video/etc.
No I meant, the thing they're paying for won't be private at any point. If they prefer to workshop it they can do so. If I don't want to, I wouldn't have to.
But having it on GitHub makes it publicly distributed - it's just there's some commissions I rather not also become tech support for
yeah, I think that's absolutely reasonable and well within the TOS
as long as it's a public repo, naturally, which is what seems implied by what you're saying
I've also been approached by people who want it kept private
same
provided without warranty
...but Zomboid isn't on the Source engine? 
y'all are pulling the translators into this.

Legal translators now
this one is the key 'It is ok for a mod team to accept donations from its users so long as the access to the mod or features thereof is not dependent on making a donation.'
yeah, kind of gobbledegook
So an actual donation
uh lmao did you post the wrong link or
๐
not without making your mod unfortunately, sorry :x
I mean it's the stance of Steam
...on Source mods
it says it right there, I don't know how much clearer it could be
you can't put up a paywall to content. But can you put up other walls? If you require donation to log into your server to cover server costs, is that a paywall to the mods ?? ๐คช
Zomboid does not run on the Source engine, therefore mods of it.. aren't Source mods.

it specifically mentions that, yes - you cannot have donations as a barrier to entry to a mod, or other content
the amount of "I'm going to assume things without actually reading" going on in this channel right now is astounding
I mean since it's use Steam workshop as a medium to distribute, it should be the same
Source mods are not distributed through Steam Workshop
no need to avoid and use GitHub as a medium
found it anyway, it wasn't exactly that but I misunderstood some stuff about the IsoObject class and found what I needed, thanks!
if you don t mind me asking. what are you trying to build
you are hopelessly combative, throwing punches in all directions at all times, lmao. Take a breather
i'm doing fine lmao it's just wild that people refuse to read the document they're discussing
there's a reason someone just linked you the exact excerpt I'm talking about lmfao
im not sure what the argument is about but i hope i added much needed context to resolve it :x
thanks wing
buffy didn't understand I was taking a poke at the confusion, but you should have, lol
not sure if we are on the same page though lol
destroyable metal fences by zombies
it's 4 am here, nothing good come after 2 am
like those in the luxury zone in Riverside
there are already some sprites for the damaged version of the fences but they can't be damaged by the zombies by default
The only real point of confusion for me is IF section 2.3 implies you cannot lock up content that was commissioned, what about free content? What about free content on a paid server? Lots of grey, some things seem to require knowledge of intent... This is why I just throw stuff out there under MIT and not worry about it. Its a mod for a zombie game
there can't be a paid server, so that's beside the point
That's not true, Crater. They explicitly say in what Buffy posted that charging for server costs is fine.
4.1
You cannot pay for preferential access to aspects OF a server.
I think their intent is pretty clear.
oh whoops, you're right - I think I was thinking about the mod-access portions
in that case, refer to the below section:
server-specific game modifications alongside a financial exchange fall far enough inside this bracket to create a grey area. Given time this could be exploited, and as such we feel that from the outset we shouldnโt allow, encourage or support it.
I'm sensing they don't want server owners ripping people off for content for which the devs themselves only charge us $15-20...
it's fairly cut and dry. they recognize it as a grey area, and then outright disallow it.
Which is fair enough.
They're saying you cannot charge for mods de facto by only running them on one private server that has an access fee.
@ this
u still need help w/ this?
dm me if u do, otherwise i might not see
you probably need something like replace functions of Map Objects, e.g MOTraps.lua
right, that's what Anonymous was asking about though - the grey area he mentioned falls within that clause
is MOTraps a mod or what?
Right... I just... wouldn't call something that has a clause a "grey area", but to each their own... ๐
exactly 
vanilla filename
there is no law enforcer here, you are free to go
What about non-public workshop items too.
That's a good question.
uh I can't find it in vanilla files
I always follow two rules when handling gray zone: 1) Clarify anything and everything and 2) Be nice to all parties involved. Being mean only gives you the worst results.
I actually emailed TIS back in 2014 asking for permission to modify and distribute partial bytecode for modding PZ. I was asked to respect the license of the game AND the third-party licenses like RakNet.
I usually see people get in hot water because they assume modding isn't a gray-zone. It always has been.
It's been less popular and more backlash for companies to go after modders legally today than it was in 2000.
Console mods & cartridge mods were hella legally pursued.
Communication & reaching out is always key to preventing scary situations like what happened to modders before things like Minecraft came around.
completely irrelvant when there's an explicit, legally-binding document explaining the nature of modding, the distribution of mods, et al.
Typo not plural
I would disagree here, what have we been talking about here? There are grey areas in the TOS, ergo its not exactly explicit.
not saying there aren't grey areas, I'm saying that all the nonsense he just mentioned regarding "companies going after modders" and such is entirely irrelevant when you have a developer that's clearly laid out in a document what is/isn't allowed.
found it, I'll take a look at it, thanks @fast galleon
.... but things are not clearly stated, some things are not explicitly addressed. Therefore its not irrelevant.
the grey areas aren't widespread, they're niche. the document is fairly thorough and explicity addresses several grey areas within it, as I pointed out earlier with the "free mod, paid server" example.
everything that's been up for debate so far has been fairly cut and dry, people just refuse to actually read the document. refusing to read something out of fear that you might possibly be in violation of it doesn't mean you aren't in violation of it
You know what, if they really enforce what they state, more than half of the workshop are gone
this is one of those things where. you do you and if you get sued, you shouldn't have stepped so close to the line if you aren't willing to deal with the what ifs. it's really as simple as this
Granted. I do think its appropriate that the subject matter is talked and discussed about, since not everyone can thoroughly comprehend and understand correctly the legalese of a TOS document.
look at most of silicon valley
anyone know how to dig up graves that you have put your previous body into
ow the ones that wasnt breakable before
It would an ideal world if people got along.
no such thing afaik
Shitposting, Memeing, Heated Disagreements, Drama, and flooding the channel with Gifs have no place in this channel
dang it
if my code helps make someone elses mod be that much better then so be it.
dont forget be lovely
lol
i was trying to break all the tension in here.
the discussions are solely for the exchange of differing opinions and not intended to be taken personally 
I'm a programmer trying to get into modding. And uhm...
No... documentation...?
๐ ...
check out these guides
https://github.com/FWolfe/Zomboid-Modding-Guide
https://github.com/MrBounty/PZ-Mod---Doc
But ye, I'm having trouble figuring out how to actually get the exposed functions from the java part of things. I want to make a simple mod where a killed zombie creates a pipebomb explosion where they died.
instantly?
Yes.
To me a simple mod to make.
Go into pipebomb java code, sees it spawns an "IsoTrap" and detonates it instantly.
I once was dropping Molotov's, like last stand but it was too weird so I trashed the code unfortunately.
But like... I'm stuck here in terms of documentation.
maybe this https://github.com/Konijima/PZ-Libraries
yea use intellij and setup libraries for reference
i dont have much coding knowledge and am using it to code lol
I'm just... a translator ๐
along with lovely people from here of course
I think I saw this, but sort of refuse to install another IDE just for decompiling the whole thing. Tried using z-doc standalone but it decided not to work with me.
and this one? https://zomboid-javadoc.com/
Oddly enough the java version they mentioned works with it is jdk-8
I've seen this as well, but this is for the entirety of the java side. I've no idea how it's exposed in the lua itself, or what I can do with lua.
There's like tidbits of code that references things like this.
function luautils.walkAdj(playerObj, square, keepActions)
if not keepActions then
ISTimedActionQueue.clear(playerObj);
end
where ISTimedActionQueue seems to be a global table. I don't know where it comes from or if it's java implementation.
Check the line under it where I show the JAVA_HOME and the folder name.
then u set it by wrong way if it's still don't work
That Konijima link is hands down the easiest way to decompile Zomboid and also lets you search throug the decompiled files very fast and precisely. After you decompile it, you want build/generated/sources/zomboid/zombie/Lua/LuaManager.java. The stuff on which they call setExposed is exposed.
I just literally re-install java to 18 ver and this process was fine for me
Beyond that, searching media/lua in your Zomboid directory for vanilla uses of Lua is the way most people seem to do it.
first of all just search ISTimedActionQueue in /media/lua/ folder
here is also a post glytch3r made with almost every reference outside of vanilla code
#mod_development message
ISTimedActionQueue comes from ISTimedActionQueue.lua. To figure that out, you could have done an indexed search of media/lua for the phrase ISTimedActionQueue.clear.
A non-indexed search for ISTimedActionQueue would also take you to the file
But if you index media, you can search the text of the files as well, and find more specific code references, such as ISTimedActionQueue.clear
@idle dawn
Gotcha, the IS naming convention probably made me think it was related to the ISO prefix.
i never considered that meant that
Does it not?
im from C# land so prefixing with I meant interface
I just assumed since it's all their files
I mean I am inferring purely from the context of this game and never seeing a game with so many IS-prefix files in my life
For sure
welcome to hell land 
For a while, I thought the same
ISO is relating to "isometric" so anything that exists physically within the game world more or less, probably, maybe.
Yes except when they dont
๐
See: the new world item object
WorldInventoryItem?
Also BaseVehicle
@crimson tundra What event are you trying to trigger? Your question is better suited to this channel.
there's a situation in which map_sand.bin is created in client saves on mp and this seems to retain old values rather than being updated when you log in, leading to undesirable behavior
is there a way to uh
stop that
maybe force it to regenerate that on login
im not sure if that problem is universal or just my server
but
i'd love to not have it
I thought they emphasized the word is lol
yeah i hate LUA so much
Alright, found it.
So yeah, LuaManager has a blanket exposer, and in one of the files has a whole list of all of the ones that are exposed.
You basically just call it like if it's a global.
And call it a day.
Neat.
yup
Haha enjoy
If you want something other than JavaDocs or Lua code to look at to research the game's API, you can take a look at the generated Typescript typings for the project "PipeWrench".
PipeWrench is generated per version change so you can even check out the GitHub repo's commit diffs to see where API is added, modified, or removed.
It's nice to code in TS too because it'll tell you when something is incorrectly called.. so if you update to a newer version of PZ and an API call you made breaks, you don't need to blindly search for why it's breaking since the compiler will tell you immediately on compile.
Is an option if you ever want to try getting around writing mods in Lua. =)
I wonder how the automatically translated Lua compares to what most people would write manually for complicated mods. Wish the example were more complex and included a comparison of Lua output to TS input.
Looks cool though
OOP tools and scalability. Less human error.
I wrote a short paper on this when I first published PipeWrench.
The code for this is outdated but here: https://github.com/asledgehammer/PipeWrench-Template/wiki/pipewrench_paper
Fair, that's cool. I just wonder what the code actually looks like and whether the autogenerated output would produce inefficiencies
It shows the Lua output.
I had to write a compiler plugin (with someone's help on the plugin API part), to add boilerplate for module re-imports to remove the "chicken - egg" problem with load-order of scripts.
Ahhh I do see some examples at the bottom
It's my original paper though. =)
Might need to update that paper.
Pipewrench is now npm packages.
That's awesome though, looks like you went hard on thiz project, good on you
Thanks! It was a 7 month project.
I don't know that I would use it, but to each their own, and that is obviously its value.
The example seems like a lot of code generated just to call print("Hello, " .. getPlayer():getFullName() .. "!"), but I get that it's one example and not all situations would go that way.
I wouldn't be worried about that boilerplate. It's part of what makes this solution good.. in that it handles the pseudo-OOP structure and translation of common operations for you.
It's also not going to slow down the game.
For sure, for sure, definitely. I think I have an unusually weird interest with clean and efficient-looking code... I'm not a big fan of unnecessary lines of code, such as imports that ultimately aren't required. I like to eliminate that stuff... would feel awkward publishing it, even though I know I could link people to my nice and neat-looking TypeScript version in theory.
I'm weirdly interested with the human component of efficient code. =)
Haha right on. I am sure there are some nice-looking mods written in TypeScript, I'm just not sure I would love how they come out in Lua...
"Typescript" will always make me think "Typesetting", have to frequently remind myself its a programming language
I would probably have to not read them frfr lol
Seeing the types of what I'm calling & working with is a big +. Getting compilation errors is even more of a bonus.
Right on, I usually preload my mods for that
Wasted countless hours troubleshooting Lua code.
I just refresh the main menu (after enabling working mods) to check for Lua compile errors.
Doesn't take terribly long although I'm sure it could be done faster
As for types and such, that would be nice. I definitely do research to find something's type from time to time.
Or a have to be in game so I can dump it in console
(which I usually am)
I use EmmyLua to handle checking types, but only when its critical and I usually end up taking it out anyway
its weird coming from a strongly typed OOP background to going wild west with typeless functional programming, but I dig it
I wonder how much it'll be worth to bake in the existing documentation from the official JavaDocs with PipeWrench.
It's my background too. =)
I've decompiled and reverse engineered Java since like 2009.
Fernflower was a lot more fun in its infancy.
Care to help me with something? Might be trivial for you but as a C# programmer rather than a Java one it's a bit irritating for me..
// $FF: synthetic field
private static int[] $SWITCH_TABLE$BlocksAndStatements$SwitchStatement$TestEnum;
...
public int TestSwitchOnEnumReturn(SwitchStatement.TestEnum e) {
switch($SWITCH_TABLE$BlocksAndStatements$SwitchStatement$TestEnum()[e.ordinal()]) {
case 1:
return 1;
case 2:
default:
return 3;
case 3:
return 2;
}
}
(Random code I found old enough to show these lovely enum ordinal switch table artifacts)
I like that Intellij just builds it in. Although I used to always use a tool called something ridiculous like octobeard or something for minecraft stuff
trying to confirm their code works like i think it does, and that this is a TIS bug
rather than something im somehow doing
That's definitely a TIS issue.
Not syncing.
f
can you say that in there then, please lol
that's a devastating problem, esp since most mods use things like whitelists and user lists in sandbox options
I feel like it's an unspoken rule in this community to not bring up decompiled code when discussing bugs with the game because a lot of people cannot properly determine what is a compiler artifact and what is a pre-compiled logical design.
oh im not judging their code, but the decompile should be an accurate representation of the function even if spaghetti
I don't think you are.
I've seen rough conversations in the past.
i encountered this real-world though, many times, over months
and i have just come to realize teh scope of the problem
is there an exposed way to force an update or delete map_sand.bin?
'cuz i have clients with old settings
lots of them..
Heheh.. You imagine how awkward it is to tell TIS that they have a SQL injection exploit on their game? xD
(This was fixed a long time ago)
But it was bad enough to report. =/
they recently hobbled getOnlinePlayers and entirely broke in-game VOIP-over-walkies (while telling me it isn't a type of VOIP) in order to avoid a specific hack that used lists of players to rapidly go between them
which is.. laughably not the thing they should focus on security-wise
and broke significant things
it's pretty disappointing, i wish they'd listen to the community more about such things
they could have fixed a lot of huge hack potentials by now
but ๐คทโโ๏ธ
honestly im not super worried about cheaters
roll back saves, etc.
but when users who aren't cheating can't get the right settings that just sucks
You're more than welcome to DM me where the code is and I can take a honest look at it.
(Not to bring up past drama from convos but I'll say people have asked my help in this way to fix critical issues slowing down and even halting servers)
This is how the anti-cheat came to be in January.
Sounds to me like someone needs to make an absolutely irresistible mod that can only be done in Java... Force everyone who loves mods to get on board with a Java mod installer... then we can fix a whole lot more things, e.g. this thing.
i wish they'd just give us a java mod hook
that'd fix everything in my book, i don't need them to do anything else ๐คฃ
Agreed 100%
Modders would finish the game in a year. ๐
We'd have wild animals and full gamepad support and all kinds of insanity.
I have a java mod that lets you update an engine power at runtime, lel
i have java mods that fix various security holes written by a friend of mine
and i have envisioned but not bothered writing my own various ones
I thought about making one to give 360 degree view. I saw the other one but don't want what it's packaged with. But I've become too busy implementing gamepad support.
If you want to wipe your server, you can adjust this script if you are under windows
:: Path to your dev servers "zomboid" directory
:: Use with care, it will delete all multiplayer save files within in and the server database file
SET zomboid_directory=E:\Development\JavaWorkspace\ProjectZomboidModding\appdata
SET servername=DebugServer
DEL "%zomboid_directory%\db\%servername%.db" /F /Q
DEL "%zomboid_directory%\Saves\Multiplayer\" /S /F /Q
FOR /D %%a IN ("%zomboid_directory%\Saves\Multiplayer\*.*") DO RD /Q /S "%%a"
EXIT
someone was working on shaders recently, that may be enough to get people involved in java
uh no, i want to wipe map_sand.bin on the clients
The one I linked fixed 60 potential exploit security holes. =)
Ahh okay
Tried to find a way for that, too, some time ago. had no luck
This is the mod. This is the one everyone will need.
Lol someone make it.
I wish all the gun mod authors would just collaborate and compile all their models together
I wish someone better at programming and animation than I am would make a dodge roll mod
Also a jumping mod would be cool
I imagine 4 different jumps (stationary, walk, jog, sprint) with reward and punishment for good and bad timing near hoppables
Not all guns mods are compatible in alot of ways
Size comparison
Stats some has higher dmg output or accuracy
Carry Weight
clip sizes
Attachments
Attachment locations
Loot spawns of specific mags and ammos
Some have abundant ammo spawn
Same ammo type but spelled difrent itemtype
Rarity
Imagine highpowered OP guns are easier to find compare to non OP guns
To collaborate meaning they would have to compromise which is just another unecesary task for them
still trying to figure out why Brita requires you to make a separate mod in order to handle settings serverside?
You can just dl alot of gun mods why do you need em to be on a collaborated mod
A lot of them do well on certain areas and dip on others, and I noticed that where one overlaps the other excels at
I don't think there's anything wrong with the concept of different starts working together to create something that really covers all sides
Are they incompatible?
Yeah, none of the weapon mods' assets are usable on the other
Oh you mean like attachments, e.g. scopes and such?
simply having other silencer mods installed can break all the silencers from all the mods, lol
Ammo too if you haven't noticed
To be fair im just assuming
But think abt it this way
Modders wont have same naming scheme right
This hypothetical gun that exist in realworld is known to use the ammo called potato
So i make gun
I named it
Glytch.gun1
Glytch.ammopotato
Someone made the same gun but isntead used base module
And named it potato (which caused conflict to the actual potato item)
I don't use many weapon mods and hadn't noticed this conflict tbh
My point here is your gun cant load my ammo and viceversa
Unless we use vanilla but we both made a gun reference thats not yet in vanilla
And we cant name it normally like basepotato
Thats why I'm still hoping that TIS will introduce way more item tags soon
This would solve that problem
So we are never going to pick same name scheme ehat are the odds of that
And so now we both have gun mods we cant edit the itemtypes otherwise it will break servers item
we can add our own can't we? It'll never happen but the modding community could come together on a standard
Is the issue here a models issue or a Lua variable naming issue?
Im just trying to explain my perspective that its not feasible to do such things and its not worth it anyways
Would be possible. But the easiest way would be if TIS introduce some more tags for their vanilla content
Hopefuly we do
Chuck is building a community api of tooks we should atleast take the chance and try to synchronize stuff i guess
But not all modders are here on discord
So its futile
sure, but if you want .30-06 ammo from different mods to work together, you'd need to have a thirtyaughtsix tag or something for people to agree on. TIS isn't going to add that because there isn't .30-06 ammo in the vanilla game
I'm not sure whether this would work because I don't know the details, but it sounds like someone needs to make an attractive gun modding framework that individual modders can use to make their stuff cross-compatible.
Problem with same name is thing
We both did same ammo name but we have diffrent design
One will overwrite the other for sure
The tag idea isbest
Yeah thats right, for that only accepted standards would solve it properly
Reminds me of PSR in early days ๐
Yeah we ought to look for modders working on same things and join forces but its never going to instantly work the first few attempts im guessing
Is that an old XKCD?
is new XKCD any different?
No I mean I just haven't looked in forever and it seemed familiar
Does author still update that site lol
lol ya, its one of the popular ones that makes the rounds all the time, and probably the only one I agree with
Lol I mean it's only true when the new standard is bad but the kernel of truth it represents is represented humorously
A good new atandard is a bad standard killer
If it's good enough
depends. I work in industrial automation, it doesn't matter how good a new standard is, nobody is making the switch unless forced to by act of god
Lmfao good point
Context is everything
Although I suspect that there are some standards that quickly become universal even in industrial automation, e.g., widely understood safety standards
But yeah, fair point, a great idea for a standard can easily be ignored in many situations
Still, I bet most people come here or check YouTube to learn Zomboid modding... A good video and everyone here saying, "You need the Firearm Modding Framework," whenever anyone asks might help a little to create at least a productive plurality of mods that are compatible.
"You need Arsenal Gunfighter Mod" so far hasn't worked out, haha
Is that a framework for compatibility between gun mods? I had no idea
ostensibly, yes, but only one mod uses it
has kind of an inverted prerequisites though, it and brita require each other iirc
At a glance, I think one significant issue with uptake of this mod is its claim to apparently lower rather than improve compatibility with mods that are "unaware" of it.
from what i've heard they're the same mod and that's just the way they choose to collaborate
I think it would be optimal if a gun framework would be harmless to or improve everything it touched
Just helper functions and naming guidelines and such
Idk maybe wouldn't work I don't make gun mods
a framework that does nothing isn't much better than just accessing vanilla. If it's made for intercompatibility I don't know any way to achieve that without being a prerequisite
The ondeath event doesnt have an arg that points to what killed the thing that died
How do i capture the killer is there aanother event
I would have to look at how guns and ammo are added to the game and told to interact with each other to speculate on what a harmless or helpful framework would look like in detail
hmmm, keep track of who was the last person to damage it? Maybe check in the on damage event for when the health gets to zero?
its more just a conceptual thing, if you want to make an intercompatibility layer the mods using it have to know it exists and make use of it. Its possible to make the layer in such a way that it doesn't break mods that don't use it, but that also limits its capability.
I think this is more something that has to be implemented from TIS's side, or by a large project like Minecraft's Forge, but then you still get competing standards eventually
The only thing I could think of quickly is that you record in the OnWeaponHitCharacter for each player who last caused damage (there you have a pointer to the character who caused it) and then query it in the onPlayerDeath
Right, I definitely understand that conceptual tradeoff. I'm saying I think a mod that errs on the side of limiting capabilities would probably be more well received than one that breaks things in the name of doing more if those things aren't around.
I know that as a seeker of mods in any new game, if I see a mod warning me that it is likely to break other mods, I am tempted to keep my eyes open for other, less "hostile" solutions.
someone using my mod gets this error when using a map loader to pre load the map. Can someone tell me what it means?
function: spawnRandomPillowOnSquare -- file: DakiArmor.lua line # 42 | MOD: Big Degen's Dakimakura Emporium
function: distributePillowsOnBeds -- file: DakiArmor.lua line # 106 | MOD: Big Degen's Dakimakura Emporium
java.lang.RuntimeException: attempted index: setWorldZRotation of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1812)
at se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:64)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:92)
at zombie.iso.IsoCell.ProcessSpottedRooms(IsoCell.java:5873)
at zombie.iso.IsoCell.updateInternal(IsoCell.java:5722)
at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83)
at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230)
at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26)
at zombie.util.Lambda.capture(Lambda.java:130)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81)
at zombie.iso.IsoCell.update(IsoCell.java:5696)
at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:3499)
at zombie.util.lambda.Invokers$Params1$CallbackStackItem.run(Invokers.java:37)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.core.profiling.AbstractPerformanceProfileProbe.lambda$invokeAndMeasure$0(AbstractPerformanceProfileProbe.java:83)
at zombie.util.lambda.Stacks$Params3$CallbackStackItem.invoke(Stacks.java:230)
at zombie.util.lambda.Stacks$GenericStack.invokeAndRelease(Stacks.java:26)
at zombie.util.Lambda.capture(Lambda.java:130)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:81)
at zombie.iso.IsoWorld.update(IsoWorld.java:3427)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1617)
at zombie.gameStates.IngameState.update(IngameState.java:1333)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
at zombie.GameWindow.logic(GameWindow.java:298)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:765)
at zombie.GameWindow.run_ez(GameWindow.java:681)
at zombie.GameWindow.mainThread(GameWindow.java:495)
at java.base/java.lang.Thread.run(Unknown Source)
On line 42 of spawnRandomPillowOnSquare in the file DakiArmor.lua in the mod Big Degen's Dakimakura Emporium, the game is trying to call setWorldZRotation on an object that does not yet exist.
I recognize the ` ` as errorMagnifier
would I just delete that line to fix it?
Ummm I would expect that if a line exists it has some use so I would not do that
This is the full thing --- SPAWN A PILLOW local function spawnRandomPillowOnSquare(square, offsetX, offsetY, height, rotation) if not instanceof(square, "IsoGridSquare") then return; end if not offsetX then offsetX = 0 end if not offsetY then offsetY = 0 end if not height then height = 0 end if not rotation then rotation = 0 end local rand = ZombRand(DakimakuraWeapons:size()) local item = square:AddWorldInventoryItem("Base." .. DakimakuraWeapons:get(rand), offsetX + 0.00001, offsetY + 0.00001, height) if rotation ~= 0 then item:setWorldZRotation(rotation) end return item end
But that's not ALWAYS true because human error and also automatically generated code
Which line
if rotation ~= 0 then item:setWorldZRotation(rotation) end
so just change the then to and?
You still need then
You need to add a condition
The current condition is rotation ~= 0... Assuming that function ever works, you should also make sure item exists
ok so just add yours after that
Thanks for the heads up, I got something working without having to do some crazy workaround
To add a condition to if condition then we say if condition and otherCondition then
This becomes if rotation ~= 0 and item then item:setWorldZRotation(rotation) end
Not sure why it gives you a nil value for item though... Hopefully that is not always the case
Because if so the function is not doing what it should presumably
well I use my mod in every playthrough and I see them spawn properly so my guess it sometimes it bugs out because of that error. that person was using a map pre loader and got that error 8 times in different towns.
Got it well yeah if there is a chance of trying to spawn a pillow and getting nil back from AddWorldInventoryItem under normal circumstances, gotta make sure item is not nil
how would I make sure of that?
Are you sure DakimakuraWeapons is indexed 0 to size - 1, and are you sure every value in DakimakuraWeapons refers to an existing item in your scripts?
It seems like that function would presumably work as long as it finds a valid item
I didn't write the code so I can't say but if it works most of the time I would assume so?
If you didn't write it, I would report the bug to mod author
Hopefully they can fix it properly if they know exactly where it is
I am the mod auther but I got a lot of help with the coding.
lol
I didn't write a lot of it. particularly the spawning system
Oh I see, then I would try to figure out where the code populates your "DakimakuraWeapons" (gonna call this your arraylist from now on)
And then make sure everything in your arraylist refers to a named block of code that gets defined in your item scripts
That's this ```
-- Add Weapons Items Here for each Item variant
DakimakuraWeapons = ArrayList.new()
DakimakuraWeapons:add("Dakimakura1")
DakimakuraWeapons:add("Dakimakura2")
DakimakuraWeapons:add("Dakimakura3")
DakimakuraWeapons:add("Dakimakura4")
DakimakuraWeapons:add("Dakimakura5")
DakimakuraWeapons:add("Dakimakura6")
DakimakuraWeapons:add("Dakimakura7")
DakimakuraWeapons:add("Dakimakura8")
DakimakuraWeapons:add("Dakimakura9")
DakimakuraWeapons:add("Dakimakura10")
DakimakuraWeapons:add("Dakimakura11")
DakimakuraWeapons:add("Dakimakura12")
DakimakuraWeapons:add("Dakimakura13")
DakimakuraWeapons:add("Dakimakura14")
DakimakuraWeapons:add("Dakimakura15")
DakimakuraWeapons:add("Dakimakura16")
DakimakuraWeapons:add("Dakimakura17")
DakimakuraWeapons:add("Dakimakura18")
DakimakuraWeapons:add("Dakimakura19")
DakimakuraWeapons:add("Dakimakura20")
DakimakuraWeapons:add("Dakimakura21")
DakimakuraWeapons:add("Dakimakura22")
DakimakuraWeapons:add("Dakimakura23")
DakimakuraWeapons:add("Dakimakura24")
DakimakuraWeapons:add("Dakimakura25")
DakimakuraWeapons:add("Dakimakura26")
DakimakuraWeapons:add("Dakimakura27")
DakimakuraWeapons:add("Dakimakura28")
DakimakuraWeapons:add("Dakimakura29")
DakimakuraWeapons:add("Dakimakura30")
return DakimakuraWeapons
So that's the problem... There are 30 elements but the images are not indexed the same as the arraylist
Your indexes go from 1 to 30
But you rand from 0 to 29
Can you think of the easiest fix?
Lol kinda wanna let you guess for the good of humanity and whatnot
Hint: do not rename your files ffs
This is probably obvious af but I don't even understand the terms so i'm lost 
Don't feel bad, it's another language, but rather than giving you the answer let's look back and think this through
In your code you are randomly selecting a weapon to add from a list of 30 weapons
Do you understand that much?
yep
You choose your random index by calling ZombRand on the size of your arraylist
Do you see that line of code?
Lmk
(Ctrl F is your friend)
yea i see it
ZombRand(x) returns a number from 0 to x - 1.
A typical off-by-one
Wait maybe I read the line wrong on my phone... Actually you use the index
I thought you appended it to a string
Can you check your item script to make sure Dakimakura1 through Dakimakura30 exist and are spelled correctly?
i'm actually doing that now
I was mistaken you are not off by one
I misread the append
So now I'm concerned that either the module is misnamed or an item def is misspelled or missing
Everything appears to be spelt right as far as I can tell
Wanna paste item script?
Could ZombRand being giving a float (e.g. 5.5) and they need to Math.Floor it to force it to be an integer value?