#mod_development

1 messages ยท Page 92 of 1

sour island
#

But AEBS has dynamically generated and translated phrases

high cloak
#

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

sour island
#

You'd have to piecemeal the phrase sections

#

And translate accordingly

high cloak
#

handwriting the translate keys would be a pain lol, i guess i could just try to generate the file

sour island
#

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

high cloak
#

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

jaunty marten
#

maybe will help to u by some way

#

to don't think about name for each line u can use uuid generator

high cloak
#

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

cosmic condor
high cloak
#

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

sour island
#

Depending on how radio works you could split longer phrases dynamically as well

high cloak
#

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

sour island
#

I assume all the data is fed into a table for the radio to pull the text from and play?

high cloak
#

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

sour island
#

I'd have to see when/how phrases are selected for radio

#

If you can bypass the function entirely to provide your own string

ancient grail
#

ISUIWriteJournal.lua

sour island
#

You can just use bits and pieces of the translation system as needed

high cloak
#

oh yeah i can just provide my own string

sour island
#

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

high cloak
#

oh yeah that could work

#

would look better than what i have now

sour island
#

Id still recommend "@Greeting@, @body@. @transition@, @body@" etc format

#

I parse the translation using the n+1 into a table for myself to use

high cloak
#

yeah

#

i'll go with that then, thanks for the help

sour island
#

Np

small topaz
#

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?)

small topaz
sour island
#

if Rand.Next(10000) <= chance(modified by luck) * 100 * lootmodifer + zombiedensity * 10

viral notch
#

What is parameter for models to not accept alpha or to make solid model without transparent like for xml or self script ?

sour island
#

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

hollow current
ancient grail
sour island
#

May have changed since then

#

Also, they added a loot spawning tool thingie

#

Should be accessible in -debug

zinc pilot
#

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

jovial harness
zinc pilot
#

but they wouldn't show up since well

#

they can't be destroyed normally

#

now the main problem is making them thumpable

jovial harness
zinc pilot
#

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

ancient grail
#

But i called the function activate on the contextmenu

zinc pilot
zinc pilot
#

so only when the player is really close basically

ancient grail
#

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

zinc pilot
#

no no I meant like, substituing every object in the world with your own

ancient grail
#

Also the moddata that makes it unsledgeable

zinc pilot
#

but from what I'm understanding you're making the substitution only when the player uses the context menu

ancient grail
#

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

zinc pilot
#

mh

ancient grail
#

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

zinc pilot
#

ohh

#

that seems interesting

ancient grail
#

On thus making it apply to all existing tile in the game

#

Once they restart the server perhaps

zinc pilot
ancient grail
#

U can look at the roadblock or the flamingo mod

zinc pilot
#

oh right, damn

#

I forgot about the flamingo

#

you're right

ancient grail
zinc pilot
#

I was trying to think of something to use as an example

ancient grail
#

I forgot where i found mine

#

I can send it to you but its older than current version

zinc pilot
#

that would be fine

#

I was trying to use the base code as an example but it's a big mess

ancient grail
zinc pilot
#

it would make sense

red tiger
#

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.

ancient grail
#

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

ancient grail
#

Idont get the use of the old_isValid=ISSomthing:isValid

red tiger
#
local __originalFoo = SomeClass.foo;

function SomeClass:foo()
  __originalFoo(self);
  -- (My code)
end
ancient grail
#

I can only understand if u have a conditio
If newitem then donewfunc else dooldfunc end

red tiger
#

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.

ancient grail
#

I once saw @weak sierra code she made a thing that on the last line she returned the original function back

red tiger
ancient grail
#

Like its as if nothing hooked. It was clever but idk how to do that

red tiger
#

Is code from 2016 lol

ancient grail
#

I dont understand what im reading

red tiger
#

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.

ancient grail
#

Maybe a simple psuedo code would help

jaunty marten
# red tiger Old code, but practical example.

pancakes_hedgehog

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;
red tiger
#

I'm showing you an actual implementation that preserves the original code without removing or using copied code.

ancient grail
red tiger
#

If only PZ Lua used modules..

jaunty marten
#

with it no problems

ancient grail
#
function original()
myHookFunc()
--orig stuff here
end

Or maybe

oldfunc = original
function original()
if checkerFunc then
newfunc()
else
oldfunc()
end
red tiger
#

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.

jaunty marten
red tiger
#

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. =)

jaunty marten
#

yes, but good to know what exactly mean is to call static function as method

red tiger
#

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.

jaunty marten
finite radish
#

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

crimson tundra
#

excuse me but where can i find the event trigger file
like event.Ontick etc
and can i add some more event triggers?

red tiger
red tiger
crimson tundra
#

many thx but where

red tiger
crimson tundra
#

i believe it should be saved somewhere in media/lua

red tiger
#

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.

crimson tundra
#

not likely?

red tiger
crimson tundra
#

so the bottom of client?

red tiger
finite radish
red tiger
#

Organization is up to you @crimson tundra

crimson tundra
#

looking for a needle in a bottle of hay aint it

finite radish
#

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

crimson tundra
#

am i?

finite radish
#

how would i know what editor you're using lol

crimson tundra
#

i do have vscode

#

and using it

finite radish
#

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

jaunty marten
finite radish
#

(or it's dead)

#

lmfao

#

why would they suddenly make it private, but continue development? it's definitely dead as fuck

jaunty marten
#

but currently in 3d2d game it's enough personally for me to creating interested things

crimson tundra
#

wait.... it couldnt be....

jaunty marten
#

ยฏ_(ใƒ„)_/ยฏ

red tiger
#

I remember forking Kahlua and rewriting their reflect code to use method headers.

crimson tundra
#

indie... youd better not put it everywhere seperately.......

jaunty marten
#

lmao

#

or if will join then shot me msg

#

let's agree on this spiffo

finite radish
#

lmfao will do

jaunty marten
#

cool

small topaz
#

what is the recommended way to add new items to the spawn tables? using an event like OnNewGame for example? Or OnGameBoot?

red tiger
#

TIS modified their copy of Kahlua2 to handle certain things with Lua like serialize and event-related stuff.

faint jewel
#

@dark wedge your mod and mine are fighting. we must now deathmatch.

thick karma
#

๐Ÿ™„ ๐Ÿคฃ ๐Ÿ˜ญ ๐Ÿคช

finite radish
# crimson tundra

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

crimson tundra
#

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?

jaunty marten
finite radish
crimson tundra
#

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

finite radish
#

๐Ÿ‘

jaunty marten
#
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)
sour island
#

You can make your own trigger able events but only in your own Lua - you cant make more in Java

crimson tundra
#

ah

#

first good news today

jaunty marten
#

u can rewrite java module ded

crimson tundra
#

rewriting this will make my mod pretty unstable i suppose

sour island
#

Yes but that would require more work for end users not to mention a huge security concern

jaunty marten
#

yea

#

it will require manual installation of mod

dark wedge
jaunty marten
#

not just subscribe to it and enable in mods menu

crimson tundra
#

that would be a disaster

jaunty marten
#

mb u already saw this manual installation in some workshop mods like better car physics

crimson tundra
#

i may wanna use this tricks if i wanna make a mod that not all-age directiondrunk

red tiger
faint jewel
#

I proxy called YOUR MOM! she's doing well and misses you.

jaunty marten
#

@faint jewel it's lose, u have to delete ur mod immediately

crimson tundra
#

like just subscribe you got an 12+ mod but with manual installation you got the patreon version kek

faint jewel
#

we never chose numbers, thus it's a tie no matter what.

dark wedge
#

i choose the number: crowbar

jaunty marten
crimson tundra
faint jewel
#

I CHOOSE ๐Ÿš

jaunty marten
jaunty marten
crimson tundra
#

and me

jaunty marten
#

@dark wedge go hide in the house and wait while he won't fly away

#

easy win

#

win by brains

dark wedge
#

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.

bronze yoke
#

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

sour island
dark wedge
# sour island 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

bronze yoke
# bronze yoke this is working because the code is all running on the client, not because of ne...

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)
sour island
#

It's tiny stuff like that which nagged me into modding ๐Ÿ˜…

small topaz
bronze yoke
#

oh, i can't explain that

astral dune
#

maybe global get synced on connect, then never again? or possibly they have the same seed at that moment

small topaz
bronze yoke
#

how were you testing the values on the server? were you checking the coop-console.txt?

small topaz
small topaz
#

at least the game allowed me to create a new character then and used the same world...

bronze yoke
#

hmm, i think the client save file would be the same, so the moddata wouldn't be recreated

dark wedge
bronze yoke
sour island
small topaz
#

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

bronze yoke
#

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

small topaz
#

although in my case, ModData.request might suffice I guess

#

what exactly is "Rand.Next(10000)" doing?

astral dune
#

random int [0,10000) I think

red tiger
#

It's unfortunately always a high-quality PRNG.

small topaz
# astral dune random int [0,10000) I think

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 ?

astral dune
#

no idea, but I do believe it is actually 4 separate attempts

small topaz
bronze yoke
#

yeah, it just does the normal calculation multiple times

astral dune
#

great for performance, lol

red tiger
small topaz
#

any knowledge about what the default value for lootmodifier and a typical value for zombiedensity is?

finite radish
red tiger
#

You can write a very performant weight table.

#

It needs compilation though.

finite radish
#

bro is out here compiling lua FLUSHED

red tiger
#

I wish.

#

I'm speaking generally about weight tables and polling / rolling it.

faint jewel
finite radish
red tiger
#

You can compile integer weight values as array indices and then call with one random int.

#

=)

red tiger
dark wedge
small topaz
bronze yoke
#

random

faint jewel
#

hey as long as we got it sorted it's ALL good.

red tiger
#

IIRC it already supports it, loading stdlib in the root folder of the game.

finite radish
#

does it use LuaJIT? i forget

finite radish
faint jewel
#

they get MAD about fancy handiwork lol

astral dune
#

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

finite radish
#

it's actually Java, so it'd be 0

copper umbra
#

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

finite radish
#

can't recall if there's one there for the player

copper umbra
#

That's good to know - I will have to give it a look. I assume that is with the debug mode running?

finite radish
#

yup, debug exclusive

small topaz
#

is "lootmodifier" =1 if we play on default loot rarity settings?

copper umbra
finite radish
small topaz
finite radish
#

that's entirely dependent on what lootmodifier is defined as in that context

small topaz
#

just thought some of the people here might know since spawn rate modding seems not sooo uncommon

finite radish
# small topaz that's why I ask...

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

bronze yoke
#

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

finite radish
#

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

bronze yoke
#

lootzed works fine

heady crystal
odd notch
#

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

astral dune
bronze yoke
#

no

astral dune
#

so all the rand functions are [0,n)?

finite radish
#

it's absolutely ass-backwards, but it's what we have

finite radish
astral dune
#

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

finite radish
#

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

astral dune
#

Lua was literally developed for this purpose, I don't know what to tell you

finite radish
#

I don't know who told you that, but they didn't know what they were talking about lol

astral dune
#

the lua devs? aight

finite radish
#

lmao what

heady crystal
#

Lua is the worst language I've ever worked with

#

So primitive

#

Even C is infinitely better

bronze yoke
#

i quite like it myself

#

it's very flexible

finite radish
#

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

bronze yoke
#

yeah, i find it a little difficult to even call zomboid's modding api... an api

heady crystal
#

Ahahah yeah

finite radish
#

yeah. even calling it "barebones" would be an insult to bones tbh

heady crystal
#

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

finite radish
#

you really have to know Java and treat the code as Java to write good Zomboid lua KEKW 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

ruby urchin
heady crystal
#

Never copied anything dude, I only reference what I see in the game's code

red tiger
#

__>

ruby urchin
#

and the fragments poorly disguised in their code

heady crystal
#

Jeez imagine asking how somebody did a public mod

#

God forbid somebody asks me how I made the music festival mod work

red tiger
#

Can I have a link to your mod @ruby urchin ?

red tiger
#

I remember seeing this mod.. was this commissioned?

ruby urchin
faint jewel
#

what mod am i missing?

red tiger
#

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.

finite radish
#

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

red tiger
#

A lot of ways to share code and give credit.

ruby urchin
#

lol according to steam DMCA, you just need just say the work is done by you, read steam terms

heady crystal
#

People even place mods in modpacks without asking

red tiger
heady crystal
#

Exactly haha

red tiger
#

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. =)

finite radish
#

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

heady crystal
#

Yeah

finite radish
#

not that I'm saying anyone here fits in that category, but I've certainly seen some folks lean toward that behavior

red tiger
heady crystal
#

If you're making big money with mods pls tell me your secrets

red tiger
#

Hahahaha

#

Sometimes I struck gold in PZ for being paid.

#

I mainly did contract jobs for MC modding.

heady crystal
#

Ah but commissions only tho?

red tiger
#

Nah. I worked and got paid weekly for an old server from Build 35 days.

#

It can happen. Just sayin.

dark wedge
#

To me, this is how I play the game now. Its fun, we're all just supposed to be having fun.

red tiger
#

My stance is that if people here find my code useful enough to use in their works, then I did my job.

finite radish
#

isn't that against the terms of use?

red tiger
#

I was an IT / admin.

heady crystal
#

Yeah it says you can be commissioned

#

Just can't like directly sell copies of the mod

finite radish
#

"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

heady crystal
#

Mod creators are permitted to work on commissioned mods provided such mods are not sold

#

๐Ÿ™

finite radish
#

ARE permitted

#

smh my head

heady crystal
#

Relatable

red tiger
#

Legal is always fun.

dark wedge
#

covers the "don't have a Patreon paywall" in its wording too

red tiger
astral dune
#

server exclusive mods seems to run afoul of 2.3 though

finite radish
#

yeah definitely

#

if a commissioned mod isn't public, it's in violation of the terms, more or less

astral dune
#

thats how I read it as well

dark wedge
# red tiger Recent addition?

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. drunk

red tiger
#

This would also mean any commissioned Java mods would need to be shared.

ancient grail
red tiger
#

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.

astral dune
#

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

finite radish
#

yeah exactly

finite radish
#

there's nothing silly about that lmfao

red tiger
#

What's the point of commissioning?

#

=)

astral dune
#

to have content made?

finite radish
#

^

#

lmfao

#

that's the ONLY point

red tiger
#

People commission mainly for exclusivity in any market.

finite radish
#

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

red tiger
finite radish
#

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

astral dune
red tiger
finite radish
#

but TIS does ๐Ÿ™‚

red tiger
finite radish
#

(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

astral dune
#

they give us the rights to our code, actually

red tiger
finite radish
#

I don't recall saying that they did, just that you have to abide by their terms.

red tiger
astral dune
#
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.
red tiger
#

It's not being a dick about it.

finite radish
#

lmfao

#

it's a legally binding contract

ancient grail
# finite radish but TIS does ๐Ÿ™‚

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

astral dune
#

not ownership, you grant us a non-exclusive, permanent, sub-licensable, royalty-free, irrevocable, and worldwide licence

ancient grail
#

Ow anonymous just posted what i was refering to. Im too slow

#

Ow ok

#

Yeah legal words

#

Big ones

sour island
#

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

red tiger
#

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...

finite radish
#

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

red tiger
#

I'm happy that some designs I wrote back in the mid 2010's came to be seen in the official game.

astral dune
#

if indiestone wants to take something I made and put it in the game I hope they fix it first

finite radish
sour island
#

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

fast galleon
#

Not sure, the trailers were more broken that the mod or not?

sour island
#

I wasn't aware of the can't sell mods thing

red tiger
#

Law can't be irrelevant.

sour island
#

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?

finite radish
finite radish
#

(which is what a purchase is, more or less)

red tiger
sour island
#

Would that be against the current TOS?

finite radish
#

yes.

sour island
#

๐Ÿ˜ฆ

#

I can't help but feel like that's not standard

finite radish
#

it is if you disallow shitlords in your modding community (and TIS does, thankfully!)

finite radish
#

unfortunately a lot of this stuff happens behind the scenes without anyone knowing, so it's hard to catch offenders

finite radish
#

lmfao

red tiger
#

You're looking for problems that aren't affecting you.

finite radish
#

?

red tiger
#

That's so confusing.

finite radish
#

lmfao what are you on about

red tiger
#

I'm asking you exactly this.

finite radish
#

I think you're just butthurt because I'm probably talking about you, from what you've said

sour island
#

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

red tiger
fast galleon
#

Crater just wanted you to be aware of TIS policy, he's not NSA or whatever.

finite radish
#

exactly lmfao

ancient grail
#

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?

finite radish
#

i'm not the mod police, that's the staff's job

red tiger
#

It's hard to take your position seriously when you're on the attack. I'm moving on.

sour island
#

Perhaps we can ask for clarification, instead of circling the drain a bit

finite radish
ancient grail
#

Ok just wanted to clarify if you see it as something that is redflag or so

finite radish
#

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

ancient grail
#

Ok thank you

finite radish
#

(they're cunts, and should probably find a new game)

astral dune
#

the line between commissioning and selling is so thin, haha. Its pretty much whether you agreed to exchange money before or after

red tiger
ancient grail
#

Before or after matters? I dont quite get that

finite radish
#

idk, I think defending the game against people who want to exploit its players for money is a pretty lovely thing tbh

sour island
#

@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?

astral dune
#

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

ancient grail
sour island
#

I'm fairly certain the caveat in the TOS is to combat paywalling and not for commissions, as commissions are mentioned elsewhere

astral dune
#

they explicitely state commissions are ok, I'm just noting how shaky that is when they disallow sales, lol

finite radish
#

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

astral dune
#

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

red tiger
#

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.

finite radish
#

"don't approach someone who's breaking the rules in bad faith"

sour island
#

I think until a staff comments there can't be anything new added to the convo.

finite radish
#

hmm I don't think I'm going to adhere to that!

sour island
#

Let's move back to mod development ๐Ÿ‘

#

Pz_legal is elsewhere

finite radish
#

Rosewood Legal, the hit new TV drama

sour island
#

A movie set would be a fun scenario to run into

finite radish
#

wasn't that one of the challenge maps? can't remember if that's still a thing

zinc pilot
sour island
#

Imagine fighting your way to a prop gun

sour island
#

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

heady crystal
#

That'd be amazing

cosmic condor
#

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

cosmic condor
sour island
#

That was to compete with nexus right?

finite radish
#

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

zinc pilot
astral dune
#

"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

sour island
finite radish
sour island
#

I put out the ping, but I can try reaching out to clarify

late hound
finite radish
#

(which isn't allowed)

cosmic condor
#

my perspective
sell = you sell the products
commission = you sell your labor of work

sour island
#

I think we all agree

finite radish
#

right, again - the definition of sell/commission isn't the issue here

#

lol

#

no one is arguing that

sour island
#

But I'd also want to not be breaking TOS

#

Or to adjust how I take commissions

finite radish
#

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

astral dune
#

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

finite radish
#

one is allowed under circumstances

sour island
#

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.

finite radish
#

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

sour island
#

The clarification needed is to whom the burden of distribution is expressly on. Which isn't mentioned.

finite radish
#

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

sour island
#

To clarify, the content should be public -- what I don't want to be is on the hook for that

finite radish
#

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

sour island
#

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 ๐Ÿ˜…

finite radish
#

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

late hound
astral dune
#

forcing people to manually install your mod without the workshop is a bold move, lol

sour island
#

The argument that came up is if the 1:1 exchange of money for a mod commission counts as private distribution

finite radish
#

(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.

sour island
#

But having it on GitHub makes it publicly distributed - it's just there's some commissions I rather not also become tech support for

finite radish
#

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

sour island
#

I've also been approached by people who want it kept private

ancient grail
astral dune
#

provided without warranty

finite radish
#

...but Zomboid isn't on the Source engine? PepoThink

faint jewel
#

y'all are pulling the translators into this.

finite radish
sour island
#

Legal translators now

cosmic condor
#

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

sour island
#

So an actual donation

finite radish
#

uh lmao did you post the wrong link or

sour island
#

๐Ÿ˜…

finite radish
#

that's for Source mods

#

like what lmao

odd notch
cosmic condor
#

I mean it's the stance of Steam

finite radish
#

...on Source mods

#

it says it right there, I don't know how much clearer it could be

astral dune
#

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 ?? ๐Ÿคช

finite radish
#

Zomboid does not run on the Source engine, therefore mods of it.. aren't Source mods.

odd notch
finite radish
#

the amount of "I'm going to assume things without actually reading" going on in this channel right now is astounding

odd notch
cosmic condor
#

I mean since it's use Steam workshop as a medium to distribute, it should be the same

finite radish
cosmic condor
#

no need to avoid and use GitHub as a medium

zinc pilot
ancient grail
astral dune
finite radish
#

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

odd notch
#

im not sure what the argument is about but i hope i added much needed context to resolve it :x

finite radish
#

thanks wing

astral dune
#

buffy didn't understand I was taking a poke at the confusion, but you should have, lol

finite radish
#

(also yes)

#

poe's law

cosmic condor
#

not sure if we are on the same page though lol

zinc pilot
cosmic condor
#

it's 4 am here, nothing good come after 2 am

zinc pilot
#

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

astral dune
#

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

finite radish
thick karma
#

That's not true, Crater. They explicitly say in what Buffy posted that charging for server costs is fine.

thick karma
#

You cannot pay for preferential access to aspects OF a server.

#

I think their intent is pretty clear.

finite radish
#

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.

thick karma
#

I'm sensing they don't want server owners ripping people off for content for which the devs themselves only charge us $15-20...

finite radish
#

it's fairly cut and dry. they recognize it as a grey area, and then outright disallow it.

thick karma
#

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.

weak sierra
#

dm me if u do, otherwise i might not see

fast galleon
finite radish
thick karma
#

Right... I just... wouldn't call something that has a clause a "grey area", but to each their own... ๐Ÿ˜‰

finite radish
#

exactly KEKW

fast galleon
cosmic condor
#

there is no law enforcer here, you are free to go

red tiger
#

That's a good question.

zinc pilot
red tiger
#

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.

finite radish
#

completely irrelvant when there's an explicit, legally-binding document explaining the nature of modding, the distribution of mods, et al.

fast galleon
#

Typo not plural

late hound
finite radish
zinc pilot
#

found it, I'll take a look at it, thanks @fast galleon

late hound
finite radish
#

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

cosmic condor
#

You know what, if they really enforce what they state, more than half of the workshop are gone

drifting ore
#

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

late hound
drifting ore
#

look at most of silicon valley

fervent mountain
#

anyone know how to dig up graves that you have put your previous body into

ancient grail
late hound
#

It would an ideal world if people got along.

cosmic condor
#

Shitposting, Memeing, Heated Disagreements, Drama, and flooding the channel with Gifs have no place in this channel

fervent mountain
faint jewel
#

if my code helps make someone elses mod be that much better then so be it.

cosmic condor
#

lol

faint jewel
#

i was trying to break all the tension in here.

cosmic condor
#

the discussions are solely for the exchange of differing opinions and not intended to be taken personally drunk

idle dawn
#

I'm a programmer trying to get into modding. And uhm...

#

No... documentation...?

#

๐Ÿ™‚ ...

idle dawn
#

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.

idle dawn
#

Yes.

#

To me a simple mod to make.

#

Go into pipebomb java code, sees it spawns an "IsoTrap" and detonates it instantly.

fast galleon
#

I once was dropping Molotov's, like last stand but it was too weird so I trashed the code unfortunately.

idle dawn
#

But like... I'm stuck here in terms of documentation.

cosmic condor
drifting ore
#

yea use intellij and setup libraries for reference

#

i dont have much coding knowledge and am using it to code lol

cosmic condor
#

I'm just... a translator ๐Ÿ˜…

drifting ore
#

along with lovely people from here of course

idle dawn
#

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.

cosmic condor
idle dawn
#

Oddly enough the java version they mentioned works with it is jdk-8

jaunty marten
jaunty marten
#

u have java 17.0.1 but u need to have 18

idle dawn
# cosmic condor and this one? https://zomboid-javadoc.com/

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.

idle dawn
jaunty marten
thick karma
jaunty marten
#

I just literally re-install java to 18 ver and this process was fine for me

idle dawn
#

Oh.

#

Okay let me check that out.

thick karma
#

Beyond that, searching media/lua in your Zomboid directory for vanilla uses of Lua is the way most people seem to do it.

jaunty marten
drifting ore
thick karma
#

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

idle dawn
#

Gotcha, the IS naming convention probably made me think it was related to the ISO prefix.

thick karma
#

Indie Stone.

#

They make this game.

weak sierra
#

i never considered that meant that

thick karma
#

Does it not?

weak sierra
#

im from C# land so prefixing with I meant interface

thick karma
#

I just assumed since it's all their files

weak sierra
#

i just assumed it was something like that

#

lol

thick karma
#

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

weak sierra
#

u might be right yeah ๐Ÿคทโ€โ™€๏ธ

#

not saying ur wrong, i just never considered it

thick karma
#

For sure

jaunty marten
sour island
idle dawn
#

ISO is relating to "isometric" so anything that exists physically within the game world more or less, probably, maybe.

sour island
#

Yes except when they dont

#

๐Ÿ˜…

#

See: the new world item object

#

WorldInventoryItem?

#

Also BaseVehicle

thick karma
#

@crimson tundra What event are you trying to trigger? Your question is better suited to this channel.

weak sierra
#

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

cosmic condor
#

I thought they emphasized the word is lol

weak sierra
idle dawn
#

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.

weak sierra
#

yup

idle dawn
#

I am now enlightened and documented.

#

Be right back as I make explosive zombies.

thick karma
#

Haha enjoy

red tiger
#

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.

idle dawn
#

I don't know how much a short blunt weapon will be of use to me but...

red tiger
idle dawn
#

Okay it was like 8 posts down google.

#

heck

red tiger
#

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. =)

thick karma
#

Looks cool though

red tiger
#

I wrote a short paper on this when I first published PipeWrench.

thick karma
#

Fair, that's cool. I just wonder what the code actually looks like and whether the autogenerated output would produce inefficiencies

red tiger
#

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.

thick karma
#

Ahhh I do see some examples at the bottom

red tiger
#

It's my original paper though. =)

#

Might need to update that paper.

#

Pipewrench is now npm packages.

thick karma
#

That's awesome though, looks like you went hard on thiz project, good on you

red tiger
thick karma
#

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.

red tiger
#

It's also not going to slow down the game.

thick karma
#

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.

red tiger
thick karma
#

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...

astral dune
#

"Typescript" will always make me think "Typesetting", have to frequently remind myself its a programming language

thick karma
#

I would probably have to not read them frfr lol

red tiger
#

Seeing the types of what I'm calling & working with is a big +. Getting compilation errors is even more of a bonus.

thick karma
#

Right on, I usually preload my mods for that

red tiger
#

Wasted countless hours troubleshooting Lua code.

thick karma
#

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)

astral dune
#

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

red tiger
#

I wonder how much it'll be worth to bake in the existing documentation from the official JavaDocs with PipeWrench.

red tiger
#

I've decompiled and reverse engineered Java since like 2009.

#

Fernflower was a lot more fun in its infancy.

weak sierra
red tiger
#
// $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)

astral dune
#

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

weak sierra
#

trying to confirm their code works like i think it does, and that this is a TIS bug

#

rather than something im somehow doing

red tiger
#

Not syncing.

weak sierra
#

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

red tiger
#

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.

weak sierra
#

oh im not judging their code, but the decompile should be an accurate representation of the function even if spaghetti

red tiger
#

I've seen rough conversations in the past.

weak sierra
#

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..

red tiger
#

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. =/

weak sierra
#

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

red tiger
#

You're more than welcome to DM me where the code is and I can take a honest look at it.

weak sierra
#

oh i just searched for map_sand.bin

#

no need to give you specific spots

red tiger
#

(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.

thick karma
#

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.

weak sierra
#

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 ๐Ÿคฃ

thick karma
#

Agreed 100%

weak sierra
#

ill shut up about everything

#

and fix it myself

thick karma
#

Modders would finish the game in a year. ๐Ÿ˜‚

#

We'd have wild animals and full gamepad support and all kinds of insanity.

astral dune
#

I have a java mod that lets you update an engine power at runtime, lel

red tiger
weak sierra
#

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

thick karma
vestal geode
# weak sierra is there an exposed way to force an update or delete map_sand.bin?

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
weak sierra
#

there's one one the workshop that fixes zombie pop-in

#

there's lots of stuff.

astral dune
#

someone was working on shaders recently, that may be enough to get people involved in java

weak sierra
red tiger
vestal geode
#

Ahh okay

vestal geode
thick karma
#

Lol someone make it.

mint helm
#

I wish all the gun mod authors would just collaborate and compile all their models together

thick karma
#

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

ancient grail
#

To collaborate meaning they would have to compromise which is just another unecesary task for them

astral dune
#

still trying to figure out why Brita requires you to make a separate mod in order to handle settings serverside?

ancient grail
#

You can just dl alot of gun mods why do you need em to be on a collaborated mod

mint helm
#

I don't think there's anything wrong with the concept of different starts working together to create something that really covers all sides

thick karma
#

Are they incompatible?

mint helm
thick karma
#

Oh you mean like attachments, e.g. scopes and such?

astral dune
#

simply having other silencer mods installed can break all the silencers from all the mods, lol

mint helm
ancient grail
#

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)

thick karma
#

I don't use many weapon mods and hadn't noticed this conflict tbh

ancient grail
#

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

vestal geode
#

Thats why I'm still hoping that TIS will introduce way more item tags soon

#

This would solve that problem

ancient grail
#

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

astral dune
#

we can add our own can't we? It'll never happen but the modding community could come together on a standard

thick karma
#

Is the issue here a models issue or a Lua variable naming issue?

ancient grail
#

Im just trying to explain my perspective that its not feasible to do such things and its not worth it anyways

vestal geode
ancient grail
#

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

astral dune
thick karma
#

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.

ancient grail
#

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

astral dune
vestal geode
vestal geode
ancient grail
#

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

thick karma
astral dune
#

is new XKCD any different?

thick karma
#

No I mean I just haven't looked in forever and it seemed familiar

#

Does author still update that site lol

astral dune
#

lol ya, its one of the popular ones that makes the rounds all the time, and probably the only one I agree with

thick karma
#

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

astral dune
#

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

thick karma
#

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.

astral dune
#

"You need Arsenal Gunfighter Mod" so far hasn't worked out, haha

thick karma
#

Is that a framework for compatibility between gun mods? I had no idea

astral dune
#

ostensibly, yes, but only one mod uses it

#

has kind of an inverted prerequisites though, it and brita require each other iirc

thick karma
#

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.

bronze yoke
#

from what i've heard they're the same mod and that's just the way they choose to collaborate

thick karma
#

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

astral dune
#

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

ancient grail
#

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

thick karma
astral dune
#

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?

astral dune
# thick karma I would have to look at how guns and ammo are added to the game and told to inte...

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

vestal geode
#

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

thick karma
#

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.

hot patrol
#

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)
thick karma
sour island
#

I recognize the ` ` as errorMagnifier

hot patrol
thick karma
#

Ummm I would expect that if a line exists it has some use so I would not do that

hot patrol
# thick karma 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

thick karma
#

But that's not ALWAYS true because human error and also automatically generated code

#

Which line

hot patrol
#

if rotation ~= 0 then item:setWorldZRotation(rotation) end

thick karma
#

if rotation ~= 0 and item

#

Sorry typo because on phone @hot patrol

#

Did not mean z

hot patrol
#

so just change the then to and?

thick karma
#

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

hot patrol
#

ok so just add yours after that

zinc pilot
thick karma
#

To add a condition to if condition then we say if condition and otherCondition then

thick karma
hot patrol
#

ohhh

#

ok

#

thanks

thick karma
#

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

hot patrol
#

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.

thick karma
#

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

hot patrol
#

how would I make sure of that?

thick karma
#

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

hot patrol
#

I didn't write the code so I can't say but if it works most of the time I would assume so?

thick karma
#

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

hot patrol
#

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

thick karma
#

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

hot patrol
#

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

thick karma
#

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

hot patrol
#

This is probably obvious af but I don't even understand the terms so i'm lost aPES_LulLaugh

thick karma
#

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?

hot patrol
#

yep

thick karma
#

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)

hot patrol
#

yea i see it

thick karma
#

ZombRand(x) returns a number from 0 to x - 1.

vestal geode
#

A typical off-by-one

thick karma
#

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?

hot patrol
#

i'm actually doing that now

thick karma
#

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

hot patrol
#

Everything appears to be spelt right as far as I can tell

thick karma
#

Wanna paste item script?

hot patrol
vast nacelle
#

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?

thick karma
#

Maybe

#

I wouldn't expect it to work at all

#

I thought ZombRand returned an int

#

If it didn't the odds of it appearing to work ever would be incredibly low