#mod_development

1 messages · Page 196 of 1

bronze yoke
#

oh, zombie moddata isn't persistent usually since zombies themselves aren't usually persistent

#

in the traditional sense anyway

sour island
#

zombies dont save theirs unless they're flagged as a former player

elder cradle
#

Man you guys rock! I wish I came here ealier!

sour island
#

👍

elder cradle
#

To be honest, I've haven't tried yet to set myself up to have access to uncompiled PZ code, so I've been coding blind for now. Still not sure what's the best/easiest way to do that.

sour island
#

I would recommend one of the two annotators

#

CAPSID is older, but I haven't really worked up the courage to switch over to... umbrella?

#

Naming the tools after items in game is really nice design - but man I can't remember what each does at all

bronze yoke
#

umbrella won't help you decompile, the annotator is open source but it's distributed as the generated annotations

sour island
#

ah

bronze yoke
#

umbrella is basically the output of a few connected annotator projects

sour island
#

does it address class inheritances? capsid has that issue

bronze yoke
#

yeah, it does

#

it also grabs the parameter names from the javadocs

sour island
#

:^o

#

pz published source license when

bronze yoke
#

oh, and it doesn't show you unexposed stuff

sour island
#

capsid generally doesn't

#

is umbrella automated entirely?

#

in terms of updating releases?

tepid dawn
#

Hellooo

bronze yoke
sour island
#

Jab is the dev right?

bronze yoke
#

for candle, the java annotator, yeah

#

omar wrote the lua annotator and i wrote the events annotator

tepid dawn
#

Quick question drunk

How can I trigger an event exactly at the middle of a timed action ? In other words how can I fetch the current progress or time of a timed action ?

sour island
#

yall are awesome

sour island
tepid dawn
#

Thankss

sour island
#

(I think it's update()?)

elder cradle
#

Thanks guys, will look into all that. I'm really bad with setting up setups like that.

sour island
elder cradle
#

I bet!

tepid dawn
#

Uh if you mean TimedAction:update() isn't it just what's going to be triggered in every tick while the action is being done ?

sour island
#

Yes, and you can grab the delta, to clarify

elder cradle
#

In my day job I work with Unreal 5 and have direct access to code. But I never has to set anything crazy to make it possible. 😄

tepid dawn
#

Oh I think I can just set a timer at the beginning and increase it in each update

#

Thank you, it will be helpful

sour island
#

ISBaseTimedAction:getJobDelta()

#

fetches the progress

#

I think it's 0 to 1

tepid dawn
#

😘

elder cradle
#

Quick update:
Yeah, I can now persist MoData on the player when doing the save with OnPlayerUpdate.
I was testing with the rest of the code draft before so I guess something else was preventing it to work.
Thank you some much guys!

elder cradle
#

So I guess doing something like this stores the current instances of the objects and won't persist, right?
Can I retrieve the new session objects through their IDs?
for i,v in ipairs(getPlayerLoot(playerNum).inventoryPane.inventoryPage.backpacks) do if v.inventory:getType() == "SmallBatteryCharger" then local chargerIso = v.inventory:getParent() if v.inventory:getItems():size() > 0 then player:getModData().BatteryChargers[chargerIso] = v.inventory end end end

balmy terrace
#

In situations other than when you’re actively fighting the game to implement it like hardcoded male/female values grrrr, is lua modding really that restrictive? Would it be possible to, for instance, implement moving creatures using lua alone? I’m inclined to say it is, but I’m not sure

bronze yoke
#

yes but you can't render characters from lua specifically in multiplayer

#

if you saw that dog mod that was popular for a while, that's why it didn't support multiplayer

balmy terrace
#

That’s weird. Wait, why wouldn’t that be possible? Can’t mod data be shared between client and server easily?

#

It would be a hassle, but couldn’t you just sync something like the dogs yourself?

bronze yoke
#

you just can't render their models in the first place

#

i don't know the exact reason behind it

balmy terrace
#

Oh,

#

Weird

bronze yoke
#

the dog mod probably used LuaMovers, which are the ideal class for this kind of thing, but most npc mods just create player objects, which also don't render in multiplayer for whatever reason (except when they're real players)

balmy terrace
#

I really hope the domestic animals they release in 42 are mostly implemented in lua, or come with functions necessary to render non-player and non-zombie entities in multiplayer

bronze yoke
#

i've always imagined that will happen anyway, it seems like they would have to outright try to stop us at that point

balmy terrace
#

It would suck if they were just implemented completely in java and entirely closed off from most modders

bronze yoke
#

for sure, it feels very out of line with their typical design though so i'm sure that won't happen

#

the flexibility of the new systems could go either way but i'm sure lua will be able to interact with it to a decent degree

#

and from what i've seen the newer systems have tended to be much much more lua oriented

#

(/better written)

balmy terrace
#

I am kind of concerned because they already said they didn’t want to release partially unfinished survivor code, because they didn’t want the modding community to do ridiculously cool stuff with it before they’re even able to finish it themselves

I am worried the same thing kind of applies to animals, because even the most basic ability to have multiplayer-compatible creatures could open up an absurd degree of modding capability. And since the domestic animals are kind of the “unfinished”/prototype version of the animal system, it’s the same kind of situation

bronze yoke
#

they did seem to suggest that the animals would have modding support, and that was why they were leaving out some of the more intelligent parts of the ai they've developed until 43

balmy terrace
#

oooh, so that implies they’re trying to get the modding tools out as fast as possible, before they get wild with it themselves? that would be awesome

bronze yoke
#

ah sorry i missed a word there, it was meant to be leaving out

#

they don't want people to use their own technology to steal the npc steam, so the b42 animals will essentially be a lobotomised version of the ai they've been working on

balmy terrace
#

there are many hot takes about this I could espouse but out of respect for it being the official server I won’t say anything

#

Well, I meant other than the fact that it is really understandable. I can’t imagine how disheartening it is to have game dev plans and then have some hyper focused modder do everything in a couple hours before you even formulate it

bronze yoke
#

i mean, they've been working on it for nearly a decade, it's the most common suggestion and the most common complaint, and their release will likely be pz's biggest moment in the spotlight - but if npcs nearly as good using the technology they developed for it have already been modded in it won't really mean much

balmy terrace
#

Yeah

balmy terrace
fast galleon
finite kettle
#

Hi! I'm trying to develop a sneak overhaul mod but I can't seem to find the files related for sneaking anywhere. Does anyone know anything about it?

undone tapir
atomic crow
young orchid
#

help spiffo

atomic crow
#

Nope, if something's changing in the files ya gotta reload for it to take effect

faint kestrel
finite kettle
#

Thanks I will try that

elder cradle
# elder cradle So I guess doing something like this stores the current instances of the objects...

@bronze yoke @sour island Based on your recommendations, I gave up on the idea of storing a list of all battery chargers on the player, and went back to the simpler approach I had initially: Only updating batteries charge when the player interacts (or is near) a battery charger container.
I doesn't take in account time periods where a a running generator stops working, but I guess it's good enough for a first version of the feature.
Do you guys sometime do code reviews here? I'd be curious to see if some things could be done better, or optimised.

sour island
#

If you use GitHub you can link it here.

elder cradle
#

Ok sounds good! I got to get that setup again. I used to have all my code there a while ago, back when I was modding for 7 days to die.

sour island
#

Nice, it's useful for any type of project tbh

#

What does 7days modding look like? Scripting as well?

tardy wren
#

think it's on a strict 7-day limit

drifting ore
#

Can I do a POST using openURL?

tardy wren
#

Probably not, as Zomboid's Kahlua won't allow you to touch the interfaces

drifting ore
#

😢

#

There is no way to do this kind of ideas on this game xD

cedar anvil
#

I made a short code but not sure why this isn't working. Could anyone help me out? "

if player:getInventory():getItemCount("Base.Money") >= 50 then

    UI["b1"]:setColor(1, 0.5, 0.5, 0.5)

    else

    UI["b1"]:setColor(1, 1, 1, 1)

end"
elder cradle
# sour island Nice, it's useful for any type of project tbh

I haven't done it for a while, so it may have changed since. Adding new items, recipes, sounds was super easy, all done through XMLs. But if you needed to add new game functionnality you had to overwrite the vanilla C# base code (game uses Unity Engine) which was not ideal. There was a special mod launcher made by modders to manage those type of mods, and package all the base code modifications of the mods you have active together, to modify vanilla code in one compile.
If you know the game a bit, this is the kind of mods I was doing back when the only vehicle available was the mini motorcycle: https://www.youtube.com/@manu_x3299/videos
None of that is working anymore, it was for A16 version.

drifting ore
#

We can print an image in the user screen smh?

sour island
#

If that's what you mean

drifting ore
#

I want to draw an image in the cheater screen if something gets detected

#

I'm not just drawing a black color in their screens

#

Works well but that's not my idea

fading oasis
#

can anyone help me with procedural distribution? i just need an item to spawn in one location then i can do the rest

#

this is what i have but it doesnt seem to work

require 'Items/ProceduralDistributions'

table.insert(ProceduralDistributions["list"]["ArmyStorageMedical"].items, "Base.HungryMane");
table.insert(ProceduralDistributions["list"]["ArmyStorageMedical"].items, 10);

sour island
#

DrawRect is a shape

#

Both have to be drawn every frame

tardy wren
#

There must be something I'm missing about tiles

#

I have no idea how I can detect what I'm clicking on when creating a context menu

balmy terrace
#

Soon, my evil will spread to the Steam Workshop…

The only thing scarier than the zombies… THE VAGUE IMPLICATION OF NON-CIS PEOPLE EXISTING!!! And CHARACTER CUSTOMIZATION OPTIONS! OH NO! ||/s||

drifting ore
#

Will try, thanks for the info

balmy terrace
#

making some character model (“male” or “female”) locked options non-locked, such as beards, and making the “male” and “female” options “masculine” and “feminine” for more accuracy (they’re literally just player model choice)

tepid dawn
balmy terrace
#

Indeed
I have already implemented workarounds to the programming side of it but the actual models need to be edited

#

Hoping to figure out the addition of an androgynous player model too, but that’s a long way off

sour island
#

Actually, you can pretty easily enable beards on female models

#

They get auto removed on model update - so you'd just need to snap it back on for specific events

#

I don't recall seeing if beard growth is kept to male characters though

#

Oh discord did that thing where it doesn't update messages

fading oasis
#

okay well i got my item to finally appear in the lootzed but it has a -1406 chance of spawning lol, hows that possible?

#

well i fixed that, but when i refill a container to see if my item can spawn, it doesnt. it shows up in the lootzed so shouldnt it be able to spawn?

balmy terrace
woven scarab
#

I hate to interject on an ongoing conversation but I have a five second question

#

are Mod ID's the same as Workshop ID's?

#

(setting up a dedicated server for context and pzidgrabber.com is down or not working)

balmy terrace
#

I believe the Mod ID is defined in the mod.info file and the workshop id is a unique set of numbers given to a file when it’s uploaded to the workshop, so they should be different, I believe

woven scarab
#

😭

#

Will entering the Workshop ID's autofill the mod ID's like when hosting non dedicated?

#

well actually I think I can grab them albeit tediuously by making a server settings and adding the workshop items

#

thanks to all

atomic crow
bronze yoke
#

keep in mind one workshop item can contain multiple mods, and you may not want to use all of them/they might be outright incompatible

atomic crow
#

That is true, it was moreso a matter of helping to find them in the first place.

fervent shadow
#

should i continue my 1985 ford LTD model to then figure out how to mod it into zomboid

tulip cipher
#

is there any way to make a drink multi drinkable - more than one use that is

vague rose
#

Hello

#

guys any idea why this msg spam in console every minut ?

WARN : General , 1694554171438> 646 404 731> AnimationPlayer.play> Anim Clip not found: InvalidOnPurpose
WARN : General , 1694554171540> 646 404 832> AnimationPlayer.play> Anim Clip not found: InvalidOnPurpose
LOG : General , 1694554171554> 646 404 847> receiveObjectModData: index=-1 is invalid x,y,z=10713,10149,0
LOG : General , 1694554174919> 646 408 212> receiveObjectModData: index=-1 is invalid x,y,z=8156,11656,0
WARN : General , 1694554175942> 646 409 234> AnimationPlayer.play> Anim Clip not found: InvalidOnPurpose
WARN : General , 1694554176035> 646 409 327> AnimationPlayer.play> Anim Clip not found: InvalidOnPurpose
LOG : General , 1694554176262> 646 409 555> receiveObjectModData: index=-1 is invalid x,y,z=14064,5202,0
LOG : General , 1694554176548> 646 409 841> receiveObjectModData: index=-1 is invalid x,y,z=10592,9166,0

drifting ore
#

Hey guys im making my first firearms mod and ive got everything correct and working exept the gun is invisible in the player models hand and ive checked all my scripts it all checks out so if anyone has any advice that would be great.

mellow frigate
vague rose
#

@mellow frigate what do you mean ? more details please 🍻

mellow frigate
vague rose
mellow frigate
vague rose
#

not good not good but thx for info

mellow frigate
#

lol

drifting ore
#

Yo im making a gun mod and the gun model is not showing up can anyone help?

balmy swan
#

Would anyone here have any experience with editing Advanced Trajectories / adding new weapons for it?

I'm having an issue where a custom weapon's projectile pierces through an unlimited amount of zombies in AT, despite the gun being set to no piercing in vanilla (It doesn't pierce in vanilla)
I've tried all sorts of changes, there even seems to be a value for piercing in AT, which i've tried both on true and false, and that doesn't work either.
Perhaps anyone has an idea here?

Nevermind! User error here.

boreal rose
#

Think it's possible for Endurance to drop into the negatives, similar to how the nutrition stats work?

#

rather, allow Endurance to drop into the negatives by stopping whatever is making negative endurance reset to 0

tulip cipher
#

is there a way to call a function when having finished reading a magazine

#

i would of asumed that OnEat would of worked as i thought it does but apparently wont do it for me

#

        DisplayName = Razzy's Knowledge Bundle 1,
        Weight = 0.5,
        Type = Literature,

            StressChange = -5,
            BoredomChange = -20,
            UnhappyChange = -12,
        
        UseWhileEquipped = true,
        CustomContextMenu = Read,
        OnEat = RazzyBooks_Book1,
        WorldStaticModel = PopBottleWorld,
        UseSelf = false,
        Icon = MyIcon, }```
fading oasis
#

hello, i finally got a specific item to spawn in loot but cant get multiple specific items. what are the basic lines of code to achieve that?

fading oasis
#

sorry to bother but can anyone help with that?

fast galleon
fast galleon
magic nymph
#

Does anyone know how to get the containers the player is within distance of and can see the items inside?

magic nymph
#

If someone knows plz @ me, thanks.

tulip cipher
#

I'll try IsRead

drifting ore
#

hey im new to modding i would like to know how to do ambience mods, if anyone knows drop some tips or tricks

elder cradle
magic nymph
elder cradle
#

Yeah that's what that mod uses too.

magic nymph
#

lol damn and it took a bit of digging into to the code to find it. Oh well, now I know where to look for all the global lua functions in the future.

elder cradle
#

He does it OnPlayerUpdate, and that's the part I'm not sure is optimal. But there doesn't seem to be better events to attach to.

fast galleon
#

That gives you the player's loot UI.

magic nymph
#

In the mod I'm making, I'll be calling it from OnFillInventoryObjectContextMenu because that's when I'll be needing it. You can call it any time you need, just check for nil or whatever in case there's no surrounding containers.

#

Technically, there should always be 1 container, and that's the floor

elder cradle
#

I thought I tried the that event but was not triggering when or what I needed, can't remember.
I currently do it with something like this:
for i,v in ipairs(getPlayerLoot(playerNum).inventoryPane.inventoryPage.backpacks) do if v.inventory:getType() == "SmallBatteryCharger" then -- Then dig inside the items... end end

#

And yes if there is no containers around, you still always have the floor.

#

It detects any tile or item containers like backpacks.

magic nymph
#

Thanks for that code, now I know an easy way to get backpack items on the player. That works for any container that can be equipped or just ones that can be equipped on back?

elder cradle
#

From what I remember it only gets nearby containers of tiles or item containers on the floor (or maybe in tile containers too), but it does not get the ones that are currently on you.

magic nymph
#

ah that's right

#

brain fart lol

elder cradle
#

In the mode I refered earlier, he also has a variant of that to check the containers that are on the player. I don't remember the call he uses.

raw tulip
#

simple mod idea: ability to change duffle bag colours

#

I have a rough mod that I wrote that uses the crafting to generate a new duffle bag upon crafting

#

HOWEVER

#

crafting a dufflebag into a new dufflebag deletes the contained items

#
{
    recipe Change to Random Colour
    {
        Bag_DuffelBagTINT,
        CanBeDoneFromFloor:true,
        Result:Bag_DuffelBagTINT,
        Time:1.0,
    }
}```
#

this is literally just a crafting txt file

#

but.... it "kinda works" as it crates a new duffle bag with a different colour

#

just as mentioned, it deleted all contained items within it.... thats the problem
need to find a way to retain the items in the container, or have some user interface/colour picker to choose what colour to change the duffle bag into

#

so if I were to release this "mod" it may cause collateral damage since it deletes items from the duffle bag, please help!

#

(I will post a video on what this looks like later/soon/right now/im recording)

bronze yoke
#

you could either use an OnTest function that checks that the bag is empty before letting you craft, or an OnCreate function that moves the items into the new bag

raw tulip
#

I am a 3d artist, not a programmer. so I am not totally sure how to do that/works, sorry!

#

only got this "working" from deconstructing how a crafting recipe works

raw tulip
#

since its doing a check, which will remedy this "issue" of it deleting items

neon bronze
#

You need a OnCreate function that iterates over the inventory of the bag and and adds it to the inventory of your new duffelbag

bronze yoke
#

might be simpler to just work out how to change the colour of the existing bag honestly

raw tulip
#

I have tried with an alternative texture

#

no success with that for now, since I need to have a function to be able to access additional textures

raw tulip
#

but as you can see, it deletes the items

#

this is most likely NOT the optimal way to make a colour/TINT mod for duffel bags

#

the purpose of this mod is to remedy the black backpacks being nearly invisible, and to have a nice way to sort stuff since you can colour code the duffel bags (without the use of backpack borders)

raw tulip
raw tulip
#

but I dont know how to program or create UI elements, buttons or functions NotLikeThis

hot void
#

learn

#

just dont make useless stuff like me

#

@raw tulip

#

talk about uncanny

raw tulip
hot void
#

makeup ui was a pain in the ass

raw tulip
#

does this mod contain some way to modify an items colour?

hot void
#

not

#

sadly

raw tulip
hot void
#

nvm then

#

...

raw tulip
#

I subscribed to your mod to deconstruct it looking for any functions that were related to assist me, but there was nothing

#

just a self advert huh?

#

yeah nah

hot void
#

you could probably look into transemog mod it think it has what your looking for

#

it changes colthing items colors and textures

#

or the cosmatic look at least

#

the extra e sry

#

🤣

raw tulip
#

thanks, I will study this for now

hot void
raw tulip
#

I will try to figure out if this is a viable solution

hot void
#

also iam not advertising my self

#

or maybe a lil XD

raw tulip
#

k

hot void
#

now how do i make occupations and traits

#

i forgot i came for that

raw tulip
#

probably learn how to by deconstructing additional occupations and traits mod

#

since these are just extra additions and integers within the files

#

tinkering with names and numbers that give you extra stats are each to their own "occupation"

hot void
#

i am not that smart ill try it again 🥔 (tho i failed once)

#

almost crashed my game

#

TY 🙂

granite ginkgo
#

Guys,is there a way to parent a part to another via script?

#

like a window to a door?

balmy terrace
#

Could someone walk me through why multiplayer-compatible moving creatures/npcs aren’t possible? I’m legitimately curious and want to know

#

Maybe partially because I want to see if I can find a workaround (not likely)

balmy terrace
bronze yoke
#

the models just don't render

#

i'm not aware of any other issues

balmy terrace
#

I’m mostly interested in why that is the case
It seems superficially possible to make an “illusionary” model/sprite using client side lua but I honestly don’t know if that’s past the extent of the lua api or not

bronze yoke
#

i doubt it, i've seen somebody fake it with dropped item models but there's no chance of animation, clothing, or even smooth movement that way

#

rendering is pretty locked off from lua

#

animated models are one thing, but i'm not sure we even have the ability to just... render a model independently of existing systems

bronze yoke
#

i'm curious about finding the exact reasoning behind it myself - not really interested in npc mods but it would be a fun breakthrough

balmy terrace
#

hack could be using the SpriteRenderer which seems to be exposed but that could reach into absurd territory

#

but tbf absurd territory is fun

bronze yoke
#

i heard somewhere that it actually did work in early b41 versions, but i don't really remember who said that so i can't say for sure they even knew what they were talking about

balmy terrace
#

multiple render() methods seem functional

bronze yoke
#

ugh, the auto-generated parameters are egregious here

balmy terrace
#

wow i can't wait to input my FLOAT VARIABLE NUMBER 3 into FLOAT ARGUMENT NUMBER 3 to do undefined behavior

bronze yoke
#

the named ones aren't much better but it looks like they draw tris

balmy terrace
#

there is a "drawModel" method but i wouldn't know if there's any way to access a "ModelSlot" properly nor if it even works in multiplayer or if they use entirely different rendering methods for that
for all we know rendering could be hardcoded for multiplayer, right? java is kind of a black box. like i could decompile it but that might not even help

bronze yoke
#

the lack of z co-ordinate could imply it's in gl screen co-ordinates, or this actually does just refer to sprites still (since the 2d -> 3d conversion 'sprite' often still means model)

#

i don't think the model manager is exposed, which makes this kind of a nightmare

balmy terrace
#

tbf either way it could still work, just without a z coordinate it would require massive amounts of manual calculation

bronze yoke
#

you'd basically be writing a renderer - and you can't access any of the low level tricks opengl needs to be performant

#

i wonder if we can get shader ids from somewhere, i thought we were unable to reach uniforms but it looks like you can do that here

balmy terrace
#

also PostRender, if someone wanted to do post-processing I guess

bronze yoke
#

i've written an opengl renderer recently so i'm familiar with what appears to be going on here, but using these functions to manually render a model (as i don't think renderModel can be used) would have unacceptably terrible performance

balmy terrace
#

it does have a constructor

#

can kahlua "use" those?

bronze yoke
#

it's not exposed unfortunately

balmy terrace
#

rip

bronze yoke
#

we can use constructors

balmy terrace
#

wait how would we know it isn't exposed?

#

is there something on the javadoc?

bronze yoke
#

no, unfortunately i don't know of any list, i just check the lua manager source

#

it has a big block of setExposed(classname.class)

balmy terrace
#

Ooooh

#

is ModelManager exposed?

#

because ModelManager has an Add(IsoGameCharacter) method

bronze yoke
#

it isn't, i think encapsulated classes are exposed together with the class

balmy terrace
#

rip

balmy terrace
#

yeah the LuaManager doesn't even expose ModelInstance or anything

#

which is kinda weird imo

#

maybe security thing

#

wait

#

an exposed lua method:
loadZomboidModel(String var0, String var1, String var2, String var3, boolean var4)
returns a model
seems to load one put in path to the ModelManager

#

it's in the LuaManager class, ctrl+f "loadZomboidModel"

#

what's weird to me is that it returns a Model object even though Model isn't exposed to lua at all???

bronze yoke
#

yeah, i'm not sure what we can do with this - i *think* you can still pass unexposed objects

#

you just can't call any of their methods

#

so something that takes model as a parameter would be worth looking at

balmy terrace
#

entering the deep end then i guess

bronze yoke
#

yeah, it does understand it as an object

balmy terrace
#

strange

#

SceneModel(UI3DScene var1, String var2, ModelScript var3, Model var4)

#

setExposed(UI3DScene) is in LuaManager

#

sort of unclear on what exactly it does

#

but i think it might be used to render cars?

#

but if that's the case it should be hijackable

#

hmmm it might be for the map

#

kinda weird it's in the vehicles package then

sour island
#

There's an ingame vehicle editor

#

A similar thing exsists for item attachments too

#

Theyre all related to stuff like the character screen

balmy terrace
#

fascinating

sour island
#

If you're curious about using that type of UIelement you can check out that mod that adds/changes the hair display in character creation

balmy terrace
#

i assumed the mechanics screen and the radial was the extent of that but this game continues to impress me

sour island
#

There also someone manipulating models rn to get obese + diff weights

#

If you speak with them maybe you can help each other test / avoid trending over the same ground

#

@keen silo meet @balmy terrace

balmy swan
#

I've been looking around for a bit, maybe I'm searching for the wrong thing.
Where could I look to get info about adding a contextmenu to a specific tile

sour island
#

Search for OnFillContextMenu

balmy swan
#

Gotcha, thank you!

keen silo
#

@balmy terrace what mod are you trying to make exactly?

balmy terrace
sour island
#

They would like to make the features selectable in CC not tied to gender.

#

I assume specifics would be hair styles and facial hair.

#

Maybe taking the bodyframe of the female gender sans breasts

#

I think it fits with what you're trying to do in terms of the technical approaches

keen silo
#

probably, would have to experiment more

sour island
#

Yeah, just saw how much time you're putting into it - and figured to spare someone else + possibly lighten your load

balmy terrace
keen silo
#

this are the compiled classes modified that enable me to swap the models characters of the game @balmy terrace

bronze yoke
#

i'm curious about getting animated characters rendering in multiplayer myself

balmy terrace
sour island
#

Can't you just send a command to tell others to animate?

bronze yoke
#

my understanding was that they were unable to render in the first place

sour island
#

That's how I handle MP sound ☠️

bronze yoke
#

otherwise i'm not sure why npc mods haven't done it already

#

that's something i'd be willing to resort to java modding for, the demand is great enough

sour island
#

Oh wait, I made MP animations

keen silo
sour island
#

For Sharks car mod - the seat animations are MP compat

balmy terrace
sour island
#

If it was Nolan stating it was impossible I would just take that with a grain of salt

balmy terrace
keen silo
#

yes it does

balmy terrace
#

nvm it does

keen silo
#

HumanVisual is exposed

balmy terrace
#

how did i miss that

bronze yoke
#

it seemed like the general impression, and even from scratch mods haven't supported multiplayer

#

i'm going to investigate it a bit more myself

keen silo
#

the problem is that by default, if you setForceModel() of human visual it doesn't work correctly

#

so I had to make it work :v

balmy terrace
sour island
#

Commands have the option to send to all actually

balmy terrace
#

is it just broken in the java code and required javamodding to fix?

balmy terrace
bronze yoke
#

yeah, i haven't had any success playing with force model, regardless of multiplayer

keen silo
#

just, experiment :v

balmy terrace
#

to be clear, the usual lua process of replacing a method to overwrite it does NOT work with kahlua right? because it's basically just a wrapper around java?

#

because if it did you could just 'override' getModel() and put a bunch of your own code in there

bronze yoke
#

yeah, when you replace a method you only replace lua's reference to that method, not the method itself

#

which means that calls from lua get modified but not calls from java

drifting ore
#

hey can anyone help im creating a firearms mod and the gun model is invisible ingame i checked debug menu it shows up with correct textures and all correct exept in game

balmy terrace
keen silo
#

Javamodding, but it didn't add any lua functions

balmy terrace
balmy terrace
drifting ore
keen silo
#

is just a fix that makes it so that the forcedModel is asigned to the model instance of the player

drifting ore
#

wdym

keen silo
#

because the way is currently done, each characters modelInstance model has only 4 posibilities, a human male/female, or skeleton male/female

balmy terrace
drifting ore
#

oh lol its my first mod im making here bro

keen silo
#

I changed it so that you can force the model of any specific chr to any model

balmy terrace
keen silo
#

because

#

it doesn't use the humanVisual():getModel()

#

to set the model for the model instance

balmy terrace
#

setExposed(ModelInstance.class)

keen silo
#

sadly

#

I cannot compile the LuaGlobal

#

so I cannot do that

#

I really REALLY wish to

#

but none the less, I cannot

balmy terrace
keen silo
#

model Manager uses the public function getBodyModel

balmy terrace
bronze yoke
keen silo
#
public Model getBodyModel(IsoGameCharacter gameCharacter) {
        if (gameCharacter.isZombie() && ((IsoZombie)gameCharacter).isSkeleton()) {
            return gameCharacter.isFemale() ? this.m_skeletonFemaleModel : this.m_skeletonMaleModel;
        } else {
            return gameCharacter.isFemale() ? this.m_femaleModel : this.m_maleModel;
        }
    }

This is the code of the function. as you can see, it completely ignores the model of HumanVisual 🙃

balmy terrace
drifting ore
keen silo
#

and that's not even the best part yet

bronze yoke
#

zomboid has lots of dead code, you have to accept it at some point

keen silo
#

however

#

I havent managed to load other skinned body models correctly

drifting ore
balmy terrace
drifting ore
#

whats the normal kb size for gun models btw?

bronze yoke
#

think i've seen fed using it before

balmy terrace
#

speaking of which, has there been any experimenting/knowledge about setForceModelScript specifically?

bronze yoke
#

i tested it earlier today and it didn't seem to do anything

balmy terrace
bronze yoke
#

there's no hard limit, it shouldn't refuse a big file or anything

#

just know that it will take longer to load bigger files, and nobody can tell the difference at zomboid's zoom level

balmy terrace
#

i don't want to do that though

bronze yoke
#

is hair animated?

balmy terrace
#

oh tbf it's not

#

you could technically manually "animate" it by manually setting the model to different positions.

#

super saiyan mod incoming

bronze yoke
#

well with my experimentation i've reached a point where i can definitively say that not only are they not an effective replacement for npcs, actually lua movers are impossible to be used in any circumstance

#

a java error instantly exits to main menu if you try to use them

balmy terrace
#

this feels like a coincidence
i think they intended us to be able to call setForceModel but made a mistake

bronze yoke
#

it might be old, or yeah an accident

bronze yoke
#

when the mover's update function gets called it tries to update its moodles, but movers don't have a moodles object and there's no way to give them one, and the game immediately exits to main menu

keen silo
#

I had to make a java function to copy the skinning data from the male models to the other models :v

bronze yoke
#

you can prevent its update from being called but then they won't render

balmy terrace
#

is the moodle update function a java thing? could you just replace it?

keen silo
#

it doesn't affect the model instance from what I experimented, so I kinda ignore it

bronze yoke
#

it's a java thing

balmy terrace
#

AGH

keen silo
#

just

#

learn java xd

bronze yoke
#

i don't see any way around it - lua mover calls the isogamecharacter update method, which expects a moodle object to exist even though only IsoPlayer ever has one

keen silo
balmy terrace
# keen silo learn java xd

that's not the issue
i know java, don't want to have to distribute sussy jar files to people for my mods

#

obviously our only option left is code injection ||/j||

keen silo
#

I'm not that good of a modder to help you with code injection

balmy terrace
balmy terrace
bronze yoke
#

nah, even if kahlua was a little more functional it's protected

#

the root of the issue is in the constructor```java
if (this instanceof IsoPlayer) {
this.BodyDamage = new BodyDamage(this);
this.Moodles = new Moodles(this);
this.xp = new XP(this);
} else {
this.BodyDamage = null;
this.Moodles = null;
this.xp = null;
}

#

i'm not really sure i understand why these objects aren't just part of IsoPlayer at this point but sure why not

balmy terrace
#

IsoMovingObject doesn't subclass from IsoGameCharacter

keen silo
#

are cars game characters?

balmy terrace
#

no, BaseVehicle inherits from IsoMovingObject

#

actually IsoMovingObject has a sprite due to inheriting from IsoObject and seems functional
you might be able to make like a moving 2d sprite that way

#

or even update it based on direction faced

bronze yoke
#

isomovingobject might actually support models, never seen any indication of it but literally every subclass of it i can think of is 3d

balmy terrace
#

isomovingobject is also exposed

balmy terrace
#

just checked it's source code and no it does not

#

but it would probably be way more performant to manually render sprites through it

bronze yoke
#

so do they do that for every subclass individually? U_U

balmy terrace
#

but i know nothing

balmy terrace
#

like it literally checks if it's a subclass of itself/instance of IsoPlayerObject/has animation object

#

this does not work for the non-gender-locking mod but unless i'm wrong about isomovingobject a multiplayer compatible mod that adds animated creatures is totally possible

keen silo
#

there is kinda of a way to get the non-gender-locking mod working I gather

#

you could make the skins and hair clothing models

#

and just

#

code how they should be worn

balmy terrace
keen silo
#

(add the value can't have holes)

balmy terrace
#

if anybody has the time pls test isomovingobject and either way ill test once i can

balmy terrace
#

IsoMovingObject has an anim map that you can call anims from

undone tapir
#

oh no the horse car

raven zinc
#

Does anyone have a good tutorial I could follow for retexturing base game cars?

sour island
#

It's an actual mod too...

atomic crow
#

A fair few people I play with know about it, namely from watching streamers use it.

sour island
#

It's pretty sick

#

Curious why they don't upload it to the workshop too

#

Being it's a lua mod one could add their own support

mellow frigate
#

too much text saying "boost your income" and not enough explaining what it does.

sour island
#

It's a twitch integration mod - a suite of callable events

#

basically what m3ss made - but has more twitch end stuff

atomic crow
#

Yeah the whole boosting the income bit is because it makes donations directly impact the gameplay for the streamer, effectively further incentivizing donations.

sour island
#

Spoke a bit with the devs - they may add support for other mods 🙂

atomic crow
#

Nice

elder cradle
brave dew
#

I have this idea for a mod to make

I’m an animator and I wanna reanimate all the gun animations for this game, is this possible? I see people adding in custom animations for their weapon mods and I was hoping I’d be able to do that too

balmy swan
#

Alright, so now I have some code that lets me place down a tile (set as ISSimpleFurniture) with a custom name.
Now i've been trying to create a custom contextmenu that only shows up when you right click this tile. I've been trying some things out, but I seem to be stuck with detecting the tile.

brave dew
balmy swan
#

And, to add to your question. That should be doable, yes 😄

#

I think by overriding the same animations in your mod, by using the same names?

brave dew
#

how would i do this?

#

also how much coding is involved

neon bronze
balmy terrace
# brave dew also how much coding is involved

technically, because the game has a scripting system, I think none? But it might be more difficult than that if you want different animations for different kinds of guns (other than the basic differences between types like pistol and rifle, which are almost definitely easy to change animations for separately) and such

sour island
#

Nearing the finish line

balmy terrace
#

CATAN

sour island
#

although its a bit pixel hunty you can use place item to organize the board faster

balmy terrace
#

for some reason I thought “THE ONE PIECE IS REAL” after seeing the reaction to “CATAN” and now I need to add a flippable, actual readable one piece manga to the game

bronze yoke
elder cradle
#

Ok thanks I had found the LuaManager but was not sure if all functions of those classes were automatically available.
In that case I guess I didn't set the function parameters properly.
I was trying to call this implementation of:
IsoGameCharacter.Say(String var1, float var2, float var3, float var4, UIFont var5, float var6, String var7)
using this in Lua:
character:Say("No Power", 1.0, 0.0, 0.0, 30.0, 0, "default")
I'm basically just trying to change the color of the text that is displayed.
Might be the UIFont failing, was not sure what to put there. I thought I could use something similar to what's called within the simpler version of IsoGameCharacter.Say:
public void Say(String var1) { if (!this.isZombie()) { this.ProcessSay(var1, this.SpeakColour.r, this.SpeakColour.g, this.SpeakColour.b, 30.0F, 0, "default"); } }

sour island
#

if the method is public it's exposed

#

You have to call on methods using exact argument types

#

The way I get say to use colors is applying "radio" instead of default

elder cradle
#

Ok thanks, and the types are the same in Lua, just using ":" instead of "."?

bronze yoke
#

yeah, the uifont is the issue there

elder cradle
#

So this maybe?
character:Say("No Power", 1.0, 0.0, 0.0, UIFont["Medium"], 0, "default")

vague bay
#

Greetings,
My friend recently modeled an M270 mlrs and we thought of introducing it to Zomboid as mod. I'm wondering if it's possible to make the rockets works because in my research working mounted guns on vehicles do not exist. I hope someone enlighten me with knowledge .

upper helm
#

@sour island you're actually insane. much love my dude

elder cradle
#

I think there is some mounted turrets in the "Armored MH MkII" mod.

#

And yeah no error when fixing the font parameter, thanks!
Color doesn't change thought, I'll try you're "radio" trick...

elder cradle
#

Ah ok I get it. I has to be set to "radio" so that it listens to the color params. Thanks a bunch!

#

OMG, I missed your board game posts, that's really amazing, wow!

vague bay
fast galleon
# vague bay Thank you. I will check it out.

just and idea but they use different models for every rotation, you could use one model and rotate it in the part script instead. This might be more difficult to get right alignment, do what you find easier.

vague bay
vague bay
#

Is there list for Lua naming conventions that the community is using that I should be aware of ?
I came from Laravel (PHP framework) background

#

I do notice the use of camelCase

tardy wren
#

Can you access private members with reflection?

#

I don't need to right now, but just wondering

tardy wren
frank elbow
#

But I'm uncertain, so take that with a grain of salt (maybe that applies to modifying them? idk I just woke up and probably shouldn't have even answered)

tardy wren
#

Right. I was trying to read Calories off of a script item, and they're private there(I know because I was using reflection somewhere else). I managed to read the values by getting the InstanceItem... Still, just curious

vapid quest
frank elbow
vapid quest
#

i tried just to add arguments{arg} and {"arg"} so after this i had errors, i want to write /kill "nick" so i think i need arguments but don't know how to add them

frank elbow
#

What does your code that checks for the command currently look like?

#

And how did you try to add those? As new table keys? I wouldn't expect errors there unless there was a syntax error (which would be another push towards reading PIL!)

vapid quest
#

this is all commands:
ISChat.allChatStreams[8] = {name = "addperk", command = "/addperk", tabID = 1};
ISChat.allChatStreams[9] = {name = "kill", command = "/kill", tabID = 1};
this code checks commands:

            sendClientCommand("cmd", "addperk", {});
        elseif chatStreamName == "kill" then
            sendClientCommand("cmd", "kill", {});```
and this is main code:
```local function addperkcmd(data)
    print("addperk command called")
    local plrnick = data[1]
    local perk = data[2]
end

local function killcmd(data)
    print("kill command called")
    local plrnick = data[1]
    getSpecificPlayer(plrnick):getCharacter():setHealth(0.0)
end

function mycmds(mdl, command, data)
    if mdl == "cmd" and command == "addperk" then addperkcmd(data)
    elseif mdl == "cmd" and command == "kill" then killcmd(data)
    end
end

Events.OnClientCommand.Add(mycmds)```
vapid quest
neon bronze
#

If its a table wouldnt it be better/safer to do table.insert?

vapid quest
frank elbow
#

I think it'll be easier to respond to this with a list rather than prose; hopefully this doesn't come across as terse

  1. arguments{plrnick} is not valid syntax for what you're trying to do (it's not a syntax error, since it is valid syntax for something else, but an error is expected from it). If you want to add a key-value pair with the key arguments, you need the equals sign, as the other keys show. You should also have the values in quotes, since they presumably should be strings: arguments = {'plrnick', 'perk'}
  2. It appears that you didn't actually add handling for the arguments—you assumed their existence when reading the command. You need to read those variables from the command input
  3. I don't see the full code so I can't be certain, but it looks like you've copied the original function rather than doing an override as I originally suggested. This is still just a suggestion, but please consider deferring to the original function when your modifications don't apply, so you don't break other mods
vapid quest
#

but how to read variables?

frank elbow
#

You can use functions in the string module to read the player input (disclaimer, as always, that PZ Lua is not exactly equivalent to Lua 5.1. The documentation of the string module should still apply)

vapid quest
#

ok, i'll try this, thanks

eternal stirrup
#

does anyone know what may cause the skybox on a car to be zoomed out? here's my car compared to vanilla

#

I tried changing the scale of the model with the script, exporting from blender in a different scale, changing the size of UVs... nothing works. Not sure what I'm doing wrong.

tepid dawn
sour island
#

Writing to them can only be done in debug

sour island
tepid dawn
#

😋

tardy wren
sour island
#

It's not something usable in realtime probably

#

Even in this example I store the values

bronze yoke
#

i wrote a util for it

#

i don't think it allowed accessing anything private

vague bay
#

Sorry I'm new to here. I have Lua 5.4.2 installed on my pc. Currently trying to follow some modding guide and this appeared :

bronze yoke
#

modules aren't a lua thing, the txt files in scripts are an original format

sour island
cedar anvil
#

"local function canibuy()
local itemname = zamahardcode[args.index]"
Could anyone tell me why 'local itemname = zamahardcode[args.index]' is causing an error?

fast galleon
#

you miss end ? It would help if you provided the stack trace logs.

bronze yoke
#

most likely either zamahardcode does not exist or args does not exist

cedar anvil
#

Thank you!! It says 'attempted index: index of non-table: null.' Does this mean that the [arg.index] number is not available?

bronze yoke
#

it means args does not exist

cedar anvil
#

Thank you very much! I gotta figure out why args is missing

cedar anvil
#

I managed to get rid of errors! But I faced another problem which is 'buy' button is not working. ```local function itemdes(button, args)
local player = getPlayer()

infoUI:open();
infoUI:setPositionPixel(subUI:getX() + subUI:getWidth(), subUI:getY());
infoUI:setWidthPercent(0.1);
infoUI["name"]:setText(zamazonhardnames[args.index])
infoUI["itemcode"]:setText(zamazonhardcode[args.index])
infoUI["image"]:setPath(zamazonharditemicon[args.index])
infoUI["number"]:setText(tostring(numbers[args.index]))

if args.choice == "buynow" then
    if player:getInventory():contains("Base.Money") >= numbers[args.index] then
        player:getInventory():AddItem(zamazonhardcode[args.index])
        player:getInventory():RemoveOneOf("Base.Money")
    else
    end
end

end

local function onCreateUI()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
subUI:nextLine()
subUI:addImageButton("zh1", "media/ui/brake.png", itemdes)
subUI["zh1"]:addArg("index", 1);
subUI:addImageButton("zh2", "media/ui/brake.png", itemdes)
subUI["zh2"]:addArg("index", 2);
subUI:addImageButton("zh3", "media/ui/brake.png", itemdes)
~~~~~~~~~~~~~~~~~~~~~~

subUI:saveLayout()

infoUI = NewUI();
infoUI:setTitle("Item Information");
infoUI:isSubUIOf(subUI);
infoUI:nextLine()
infoUI:addRichText("name", zamazonhardnames[1]);
infoUI:nextLine()
infoUI:addImage("image", zamazonharditemicon[1]);
infoUI:setLineHeightPercent(0.05)
infoUI:setWidthPercent(0.03);
infoUI:nextLine()
infoUI:addText("number", "", "Small", "Center")
infoUI:addText("itemcode", "", "Small", "Center")
infoUI:nextLine()
infoUI:addButton("buynowButton", "Buy Now", buynow);
infoUI:close();

infoUI:saveLayout()

end``` infoUI:addRichText("name", zamazonhardnames[1]); and infoUI:addImage("image", zamazonharditemicon[1]); are working great, but infoUI:addButton("buynowButton", "Buy Now", buynow); isn't working.
robust briar
#

Does anyone know where/how things like *hammer* in chat get replaced with images? I have dug through the lua, followed the trail back to UIElement in java, followed that to AngelCodeFont in java, then looked at the fonts in media/fonts but still do not see where the parsing is done for that.

#

I know of <IMAGE:texture> works, but thats different than *hammer*.

sour island
#

Are there any results when you search for uses?

robust briar
#

Nadda, both in the lua and java source

#

public static String parseStringForChatLog(String var0) <- Appears this is it

#

Now just need to figure out how tf that works

#

Thats what defines them all!

#

Perfect, ty yall

raven zinc
#

Anyone know where I can find the male and female 3d models?

#

nvm

chilly flint
#

Hey, wanted to ask how distributions for items work.
I followed a tutorial, but since it's 3 years old a lot of stuff changed.
So I would like to know how to do it today
(Tutorial that I use + the timestamp: https://youtu.be/N6tZujOPnDw?t=1080)

fading oasis
#

is there a way you can it make it where someone dies instantly after eating a certain food?

fast galleon
fading oasis
fading oasis
#

would i put the onEat function in the _items.txt?

uncut meteor
#

yo is there a event that can be called only when the players move any item inside hes inventory or player is inside inventory ui.

rough storm
#

Add this

tulip cipher
#

what masses is the game in?

#

pounds or kilos?

#

nevermind seems to be in pounds... Americans nooooo2

frank elbow
# tulip cipher pounds or kilos?

I believe it's officially neither—can’t remember where by now, but I'm p sure they said it's an abstract “encumbrance” measure that considers both weight and difficulty/awkwardness to carry

tulip cipher
#

it seems like pounds canned tuna = 0.3 ... 0.3 from pounds to grams is ~140g which is the weight of an average can of tuna

#

they probs leave it unoffical so they dont get nitpicked like crazy over "THIS SHOULD BE 0.01 POUNDS HEAVIER!"

#

and added benifit - really free to balance how they want XD

#

the game is incredible honestly - and i only see it as an advantage for them to build it how they want, allowing modding is the icing on the cake

elder cradle
storm hound
#

Hey, sorry to bother y'all. I'm working on a small mod just for personal use, but I'm struggling to understand how the controller system is implemented. I've got bits and pieces of what I'm doing working, but I have a few questions if anyone's familiar with it and has the time

  1. getControllerCount always returns 16, which I've noticed from looking at a bytecode decompile of the controller system, is the maximum due to some kind of sanity check. But I only have one Xinput controller connected. Is it picking up the first 16 USB input devices, even ones not supporting Xinput?

  2. I can't pull axis and button count from any controller index (Always returns 0). Do I need to activate a controller for it to work? If I do, how do I do so? Pull its GUID and call addJoypad? (Can I pull the GUID with Lua or does that require a decompile and working with the Java source?)

  3. From what I've gathered, Lua is unable to work with button and axis information outside of what's normal on an Xbox 360/One Xinput controller/in the controller binding file. 6 Axis and 14 buttons, is this true?

  4. Can multiple joypads be active and assigned to one player?

storm hound
#

If there's a write up anywhere that describes the controller system and how to work with it, a link to that would be more than fine

sour island
#

There is someone who wrote/writes patches for controllers - I don't recall whom, they may have more knowledge.

#

otherwise digging around the joypad files lua/java would be your best bet

fading horizon
median prairie
#

Hello everyone! I hope you're all having a productive day. I'm curious if someone knows a method to prevent body damage from showing up on zombies without simply overwriting the BodyDmg texture.

storm hound
tulip cipher
#

ERROR: General     , 1694746047201> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: OnInitGlobalModData of non-table: null ```
storm hound
#

I think you might be trying to treat something that isn't a table, as a table. If I'm understanding that right? Like having a string, integer, float etc with a table index?

tulip cipher
#

        for _,v in pairs(Shotguns) do
        local item = ScriptManager.instance:getItem(v)
        item:DoParam("OBSOLETE = true")
    end

        for _,v in pairs(Pistols) do
        local item = ScriptManager.instance:getItem(v)
        item:DoParam("OBSOLETE = true")
    end
end```
#

all is happening is that its Event.OnInitGlobalModData.Add(ChangeDefaultItemTable)

#

then running the function

#

i didnt have this issue before - which is why it is so odd

storm hound
#

I think either Shotguns or Pistols isn't successfully having data put into it, so it's empty when it tries to loop through it?

tulip cipher
#
                    "Base.ShotgunShells", "Base.ShotgunShellsBox"}
local Pistols = {"Base.Pistol", "Base.Revolver_Long", "Base.Revolver_Short", "Base.Revolver", "Base.Pistol2", "Base.Pistol3",
                    "Base.Bullets9mm", "Base.Bullets9mmBox"}```
#

ohh maybe im running the function before it actually ini the tables

#

thats probably why XD

storm hound
#

Oh xD Yeah that'd definitely do it

tulip cipher
#

ill just call it in a function - no idea why its having a problem weeks later XD

#

i should of just "kept it simple" XD

storm hound
#

Is it possible the event is triggering later than it used to? I don't really know why that would happen though

tulip cipher
#

i think it was having issues getting the SandboxVars before so i delayed it (not quite sure honestly)

storm hound
#

I don't know enough about the event triggers and when things happen during mod loading to really suggest much. Might be worth putting some debug info in, chuck a print() in before you init the tables, and at the start of the function before the for loops. Then check the console to see which one's loading when. Wishing you luck though 👍

#

I'm trash, and litter my garbage code with "if debug then print() end" and then set debug to false when I don't want anyone to see it. lmao

balmy terrace
#

idea: make debug method that does that check and takes debug and the message as variable

tulip cipher
#

that would be WAAAAAAY to easy and intelligent

balmy terrace
#

intelligence doesn’t exist, just luck

tulip cipher
#

too real

muted garnet
#

Is there any way to loop the sound, since the action is very long and because of this, during the first action or further restart, it lags for a couple of seconds, or maybe there is a way to load the sound in advance?


self.sound = self.character:playSound("Autopsy")

storm hound
#

Done, thanks for the idea xD

#

Also, accurate.. Luck really do be a big part of everything

brave dew
#

coming back to my reanimation mod, how does gun animation work in this game?

#

im guessing theres multiple seperate anims for each reload
that being:
mag out
mag in
bolt pull
unless the reloads are all in one anim just broken up

sick slate
#

ive been playing this game for so long

#

and only now have i dived into modding, a fascinating switch up from modding unity games, this game uses LWJGL right?

atomic crow
#

Yup

#

And LUA

brave dew
#

does anyone have a blender pz rig

#

please

sick slate
# brave dew does anyone have a blender pz rig

https://www.youtube.com/watch?v=31H54TpJjSA just watched an amazing tutorial!

SQz

This video took too long to make, but I made it.
Yes there will be a part 2, no it won't be as long as this one... I think.

Official Project Zomboid Discord server: https://discord.gg/theindiestone
Official Project Zomboid website: https://projectzomboid.com/blog/
Kekdot's video for armature rigging: https://www.youtube.com/watch?v=hWfUe03Ib5E&...

▶ Play video
median prairie
brave dew
#

i have to make it myself? 😭

brave dew
#

wtf is this 😭

median prairie
#

What were you expecting?
Importantly, what are you doing with it?

brave dew
#

making my own gun mod that replaces the gun animations

#

i want to do a test but this rig is unusable

median prairie
#

You can still add IKs and other bone constraints to this model

brave dew
#

wish there was this for blender but i guess not

#

another reason to switch to maya unhappy

#

all good rigs are on maya like 90% of the blender rigs i use for animations suck

median prairie
#

I've found the rigs to be fine. I just add some constraints, IKs, and clean up the bone orientation. No problems for me. I try never to blame my tools.

#

Regardless, I think #modeling May have more insight for you.

brave dew
#

yeah

sick slate
muted garnet
#

Is there any way to loop the sound, since the action is very long and because of this, during the first action or further restart, it lags for a couple of seconds, or maybe there is a way to load the sound in advance?


self.sound = self.character:playSound("Autopsy")

sour island
sour island
#

PZs own scripting format, just like for items, and models

muted garnet
#

ok, thanks for help

balmy swan
#

Hmm, is there any sort of event to run some code on world creation, or something along those lines. Would OnNewGame work for that?

neon bronze
#

There is a OnInitWorld event

#

Dont know if its too early for you maybe

balmy swan
#

I'm trying to spawn some tiles into the world through the code, so would have to do it when the world's already been initialized I think?

neon bronze
#

Are you trying to spawn in tiles somewhere specifically?

#

Like in a specific cell or grid?

balmy swan
#

Yeah, I do have specific coordinates. I should be able to figure out that part, just wanted to know if the event I found was the right one, or if a different one should be used.

neon bronze
#

I dont know if that would work through that basically you’d need to have the specific cell loaded in first to get the coords for your tile

#

And if player hasnt visited that cell they arent initialised and are null

#

If im not wrong

#

Albion talked about the same issue earlier before

balmy swan
#

Hmm, I didn't know about that. That's good to know.

tulip cipher
nova socket
#

so... is there any server-side alternative for addVehicleDebug.
I'm looking precisely for spawning in coordinates and returning the vehicle object.

hasty vector
#

Hello, I want to create a mod that makes existing vanilla items not appear in the game. Does anyone know of an example mod or guide for this???

mental jackal
#
    {
       Bullets38/Bullets44/Bullets45/Bullets9mm/556Bullets/308Bullets/223Bullets/ShotgunShells
       /Bullets50MAG
       /10gShotgunShells
       /20gShotgunShells
       /410gShotgunShells
       /4gShotgunShells
       /Bullets22
       /3006Bullets
       /Bullets357
       /Bullets380
       /Bullets4570
       /Bullets45LC
       /545x39Bullets
       /Bullets57
       /50BMGBullets
       /762x39Bullets
       /762x51Bullets
       /762x54rBullets,

       Result:GunPowder,
       Time:10.0,
       OnCreate:Gunpowder_OnCreate,
       Override:true,
    }```
Hey folks im trying to override the blacksmith mod's gather gunpowder recipe but wrapping the above code in module Base wouldn't work. Any help is appreciated! Thanks a lot in advance
sour island
hasty vector
#

Where can I get informations like that?

cedar anvil
#
local text3= "Zamazon Light Bulb Package"
local text4= "Zamazon Fishing Tackle Kit"
local text5= "Zamazon Garbage Bags 20PK"
local text6= "Zamazon MakeYourDoor Package"
local text7= "Zamazon Electronic Repair Package"

local zamahardnames = {text2,text3,text4,text5,text6,text7}```
#
IGUI_text3= "Zamazon Light Bulb Package",
~```
#

I'm working on translating texts in Lua, But I'm not sure about this.. Am I doing correctly or missing something?

#

I think something should be in there between IGUI and text. maybe Lua's name?

bronze yoke
#

you use getText("IGUI_text2") to get the translated text for that entry

#

keep in mind that all mods need to share the same names so very generic entries like 'text2' are not a good idea

cedar anvil
#

Thank you!! so it will look like.. local text2 = getText("IGUI_text2")

#

YaY Thanks!

#

Gotta change the names as well

tardy wren
#

I am gonna make a big mistake and edit a ton of items at once at runtime

#

Since editing script items doesn't change the existing ones, I'll be hooking into OnRefreshInventoryWindowContainers and looping through it all to change spoil timers of everything

#

I'll make it a disabled by default feature

#

Albion you seem to know this is as bad of an idea as I do, if you have anything better please speak or remain silent forever

bronze yoke
#

nothing comes to mind

tardy wren
#

It may not be as bad

#

Proximity inventory does the same thing

#

I don't know how often the event fires exactly... I can try to throttle it somehow

bronze yoke
#

well it's difficult for any one competently written mod to actually cause serious performance issues, but things like this stack

#

but i think it'll be okay

tardy wren
#

This is supposed to be a transition-only measure for when you install the mod on a running save

bronze yoke
#

new saves won't even need to use it so it's just a compatibility option

tardy wren
#

Yes

#

if I knew how to dig into the save file directly, I would do that instead

bronze yoke
#

probably not ideal, this is fine

#

i was going to suggest something but i think it'd actually be much worse 😅

#

this is probably the best way of doing things

#

as long as the code is efficient it won't be noticeable

tardy wren
#

Well... I don't think I can avoid a double loop

#

I can try to throttle it, depending on how often the event runs

#

Can try to make it run on only a single container every launch

#

I'll make it work, then I;ll worry for performance

#

Anybody knows what the Local Container is from ISInventoryPage.GetLocalContainer?

#

Oh nevermind, wrong file, it's not vanilla

cobalt fiber
fast galleon
#

immersive solar panels spawns tiles using this

elder cradle
#

Hello!
Is there any way to have more than 1 overlay sprite on top of a tile?
The tile is a container which already has container overlays defined through TileZed, but I would like have an additional custom overlay on top, triggered through lua.
When I use the below, it replaces the container overlay. I would like to add it as another layer on top instead.
chargerIso:setOverlaySprite("myTiles_01_4")

fast galleon
#

you could add an attached sprite or another object.

#
function attachAnim(isoObject,spriteName)
    local isoSprite = getSprite(spriteName)
    isoSprite:setName(spriteName)
    local spriteInstance = IsoSpriteInstance.get(isoSprite)
    
    local attached = isoObject:getAttachedAnimSprite()
    if not attached then
        attached = ArrayList.new(4)
        isoObject:setAttachedAnimSprite(attached)
    end
    
    attached:add(spriteInstance)
end
elder cradle
elder cradle
# fast galleon you could add an attached sprite or another object.

Your trick totally works, thanks a lot!
Not the greatest sprites, but this is a battery charger for small batteries. The 4 green batteries inside are the default container overlays and the green light on the left is attached with your method when there is Power available on that tile.

chilly flint
#

How can I mod that replaces files for another mod.

Basicly a mod that applies a fix onto a mod without uploading the whole mod that needs the fix

cobalt fiber
chilly flint
#

I would like to fix the item distributions

cobalt fiber
#

If it's some kind of Lua file that you want to fix, sometimes you can override the original function in your own file if it's public (more compatible), or if it's local, you copy the whole file and edit what you want (not very compatible)

cobalt fiber
#

Maybe @bronze yoke will have a better idea than me

chilly flint
#

yeah I fought also about just copy the whole file, fix it but then what?
After the "fix" is done, somehow I have to tell the mod to use my file instead of thiers

cobalt fiber
#

If you want to override the original file, just put your in the EXACT folder structure and the EXACT name of the original, then it will override it

#

I think load order matters in this case

#

Not sure tho

chilly flint
#

okey thats worth a try

#

I will do so with a test mod, let's try to confirm that

cobalt fiber
#

Yeah, I have a 'Test' mod just for testing some random ideas ;P

chilly flint
#

^^

elder cradle
gilded hawk
#

Is there a native Zomboid way, to save a lua table to file? Kinda like the sanbox options?

fast galleon
elder cradle
#

Ok thanks, I'll patch it with some special start game init code for now.

elder cradle
gilded hawk
sharp obsidian
#

Hi all

I'm making a mod to add some recipes for making digital watches for my server. However, when I add the recipes to the script file, and load the game to check it, the recipes don't exist. I've looked through the console.txt to see if there are any errors, and there aren't any, I've checked through errorMagnifier to see if it caught anything and it hasn't.

I know this code works as I made another mod recently that adds the exact same recipes, has the same code (except for me importing Base on this code), and that mod works. I've attached a screenshot of my code. I'm genuinely stumped as I don't know what I'm missing.

The only other thing I can think of is I have a separate recipe file for making bourbon for my server mod, but I'm unsure how that would affect it.

elder cradle
gilded hawk
#

Yeah, I think ill stick to that

elder cradle
sharp obsidian
#

Let me try that and see!

#

So I tried both options and the recipes still didn't show.

elder cradle
#

I'm not familiar with mods on servers. In SP, that should work. (given that the script is in the right folder and the mod is activated)

sharp obsidian
#

The mod is in the right folder and is activated, and I am testing this in singleplayer, which is mainly why I'm confused

#

As you are right, it should work

elder cradle
#

You could always try adding a simple item in the script and check if you can add it to your inventory in debug mode. At least you'd know if the mod is working properly.

sharp obsidian
#

I do know the mod is working, as my separate file for a bourbon recipe based off corn does show up.

elder cradle
#

I don't know if console.txt has all the errors. I usually check the ..._DebugLog.txt to check errors.

bronze yoke
#

it should

sharp obsidian
#

So I redug through both console.txt and the DebugLog.txt, where I specifically searched for "error", The only thing that pops up besides errorMagnifier is this:

#

Im not sure if this is the actual error, but it is the only thing I can find

gilded hawk
#

Did anyone manage to extract this icon from the game files? media/ui/Container_DeadPerson_Male.png

tardy wren
bronze yoke
#

oh my god finally... scientists have found a use for OnContainerUpdate

tardy wren
#

I don't know when it runs exactly but I can use that to edit the items in the container

bronze yoke
#

it's whenever the list of containers the player can access change

tardy wren
#

Also hello from 3 am

bronze yoke
#

or actually when it could change

tardy wren
#

Wait, really?

bronze yoke
#

hehe it's only 2am here, much better 😇

tardy wren
#

Your doc mentioned it's when it first loads

bronze yoke
#

hmmm i might be misremembering, my doc seems pretty explicit

tardy wren
#

I know that a container calls its update function when you look into it

bronze yoke
#

but the basic idea of it is that it happens when a new container becomes available/an old one becomes unavailable

tardy wren
#

In multiplayer at keast

bronze yoke
#

i think the primary function of it is literally just to tell the ui to update to show the correct containers

#

not 'when the contents of the container changes' like it sounds unhappy

tardy wren
#

Right

#

So it would be the same as the current event, theoretically

#

You can avoid flash-spoiling of food by not looking into the fridge until you power a generator

bronze yoke
#

i think the event gets fired even if you can't reach the container

tardy wren
#

That'd be better for my usecase.

#

Regardless, I'll look into it with some debug printing at a more sane hour

bronze yoke
#

the vanilla use is essentially to the tell the inventory ui 'the containers the player can reach COULD have changed'

#

later i'll have a quick look over, i trust my docs over my memory

tardy wren
#

(Client) Fires when a container is added or removed from the world.

#

That's what the GitHub doc says

bronze yoke
#

yeah, sometimes it might be overly brief since i wrote all 100 or so in about a day so i have to check that that's not misleading

tardy wren
bronze yoke
#

it's probably not untrue though

#

there just might be more to it

tardy wren
#

I think I'll do debug printing...

#

Just have to... do it smart. Live mod and such

mental jackal
#

hey folks can anyone give me some help on how to override a modded item/recipe?

mellow frigate
mental jackal
#

hmmm i checked historical weapons and armor, they used the same module name but I am also using the same module name

mental jackal
#

and i have override=true in my recipe too, doesnt seem to work

mellow frigate
mental jackal
indigo hearth
#

Where I can I find the vehicle distributions of a custom mod map? I'd like to make it where vehicles don't spawn in specific areas of the map. Is it in the map file itself?

#

nvm found it

storm hound
#

Is decompiling the game and working with it in a Java IDE something that's allowed to be discussed here, or is it lua modding only?

atomic crow
#

Modding Java is allowed for discussion as far as I’m aware

storm hound
#

Awesome 👍. I couldn't find a statement anywhere or anything in the rules regarding it so I figured I should ask

hasty vector
#

Hi all, Is there a way to print global variables like ProceduralDistributions.list while the game is running?

fast galleon
#

If you are looking for something specific in distributions you can check the LootZed tool.

peak bronze
#

Is it possible to make a mod for logging when containers are sledged/disassembled?

dense kayak
#

Just trying to understand the game's API

bronze yoke
#

the lua doesn't need to be decompiled, you can just read it from the media/lua/ folder

nova socket
#

Anyone knows how to get some sort of bool that can tell if character is yet to be created/ already created?
It does seem all events, including EveryOneMinute already running even in stage of character creation.

Tried to do this

local player = getPlayer();
if not player then return end

But apparently its not always true and doesn't return at some point.

drifting ore
#

Hey, how do you make inventory:FindAll search through a list/table? currently it accepts a string only.
this doesn't work, i think it tries to find if the player has ALL of these items, not any of them

    local arena_weapons = {"Base.ArenaSBlunt", "Base.ArenaLBlunt", "Base.ArenaSBlade", "Base.ArenaLBlade", "Base.ArenaAxe", "Base.ArenaSpear", "Base.Apple"}
    local items = inventory:FindAll(tostring(arena_weapons));
neon bronze
#

You’d need to iterate over the table yourself and feed the items one by one to FindAll

drifting ore
#

oh, right, thank you! i got it to work now

glass tartan
#

Where can i find the scripts for the crafting skills (Espec. Metal- and woodworking)?

drifting ore
#

Whats the method for getting the player's currently wielded/held weapon/item
context: i am trying to remove items from the player's hands, e.g they are holding an item, i want to remove that item. setting their hands to not wielding anything.

#

i tried this, but it doesn't work unfortunately.

        player:removeFromHands(tostring(element))
mellow frigate
# drifting ore i tried this, but it doesn't work unfortunately. ```lua player:removeF...
function updateUnequip(isoPlayer)
    if isoPlayer then
        --unequip all
        local primItem = isoPlayer:getPrimaryHandItem()
        if primItem  then
            unequip(isoPlayer,primItem)
        end
        local secItem = isoPlayer:getSecondaryHandItem()
        if secItem then
            unequip(isoPlayer,secItem)
        end
    end
end

function unequip(isoPlayer,item)
    if not isoPlayer then return end
    if not item or not item:isEquipped() then return end

    if InfPla.Verbose then print ('InfPla.unequip '..p2str(isoPlayer)..' '..tab2str(item)); end
    isoPlayer:removeWornItem(item)
    
    local hotbar = getPlayerHotbar(isoPlayer:getPlayerNum())
    local fromHotbar = false;
    if hotbar then
        fromHotbar = hotbar:isItemAttached(item);
    end
    if fromHotbar then
        isoPlayer:setAttachedItem(item:getAttachedToModel(), item);
        isoPlayer:resetEquippedHandsModels()
    end
    
    if item == isoPlayer:getPrimaryHandItem() then
        isoPlayer:setPrimaryHandItem(nil)
    end
    if item == isoPlayer:getSecondaryHandItem() then
        isoPlayer:setSecondaryHandItem(nil)
    end
    item:getContainer():setDrawDirty(true);
end

drifting ore
sour island
#

Anyone familiar with timed actions, specifically transfer and drop getting "bugged actions" errors and resetting the queue?

Since world items can't be moved around and you can't change their offsets directly - ive taken to using pickUp and drop in a queue to do it.

Prior to this I gutted out the internal steps since using timed actions was causing problems with flickering + the slight delay of picking up and moving (as well as the bag sound).

But even with the two timed actions being used again, it's causing "bugged action clearing queue" with transfer, as well as the initial issue which is "error, container has ID" is still occurring.

nova socket
#

That's considering if its translated, but so far modders do care to translate their stuff too.

mellow frigate
# sour island Anyone familiar with timed actions, specifically transfer and drop getting "bugg...

from memory, bugged action on transfer timed actions occure when one of the element of the transfer is not valid (or not in the right container) anymore. This can occure in an asynchronous world (MP) when two players do concurrent actions or when a server-side action (like fire destruction) removes an item during the transfer. Other than that transfer timed actions works well and if you meet those bugged actions a lot it is likely due to invalid requests (e.g. in earlier versions of autoloot I was piping twice the same transfer action)

drifting ore
#

How do you parse through a container's items (backpacks)?
Inventory:FindAll() only searches through the player's inventory

mellow frigate
sour island
#

Hmm, I'll have to check the actions - maybe it's sending the request twice due to how I wrote the UI

mellow frigate
sour island
#

The "error container has ID" was the original issue - which happens alot less but still occurs. And in that the container is getting two entries of the same item.

#

I have to loot it twice to clear it

mellow frigate
fallow osprey
#

is there a way to add or remove a recipe input through lua?

sour island
sour island
#

Oh? Does it involve removing and adding? Or?

mellow frigate
#

yes

drifting ore
# mellow frigate player:getInventory():getFirstTypeRecurse(itemType);
local arena_weapons = {"Base.ArenaSBlunt", "Base.ArenaLBlunt", "Base.ArenaSBlade", "Base.ArenaLBlade", "Base.ArenaAxe", "Base.ArenaSpear", "Base.BaseballBat"}

function remove_arena_weapon()
    local player = getPlayer();
    local inventory = player:getInventory();
    --unequip and remove arena weapons
    for _, element in ipairs(arena_weapons) do
        player:setPrimaryHandItem(nil)
        player:setSecondaryHandItem(nil)
        player:resetEquippedHandsModels()
        local items = inventory:getFirstTypeRecurse(element);
        print("test!! ", items)
        if items then
            for j=items:size()-1, 0, -1 do
                local item = items:get(j);
                print("removing arena weapons", item)
                inventory:Remove(item);
            end
        end
    end
end

I'm iterating through a string table to find items and remove them, inventory:getFirstTypeRecurse doesn't work because it returns nil

#

i tried other methods in the itemcontainer, but they all also return nil

mellow frigate
#

and you probably cannot expect the result to always be different from nil.

#

also I am not confident Remove method works recursively so you have to remove the item from its own container

nova socket
#

Not sure If I reinvented a wheel here but you might want this at some point

function IC:sleepAnDo(seconds, func)
    local time = os.time();
    local targetTime = time + seconds;


    local function OnSleepTick()
        local timeNew = os.time();
        if timeNew >= targetTime then
            Events.OnTick.Remove(OnSleepTick);
            func();
        end
    end
    Events.OnTick.Add(OnSleepTick)
end
drifting ore
#

Me? or are you talking to chuckleberry?

nova socket
#

No i mean in general whoever reads that snippet

#

Never found any "engine solution" so far for sleep function to schedule code.

drifting ore
mellow frigate
drifting ore
cedar anvil
#

Does anyone know how to fix a low resolution icon? I even matched the Bit depth but it still looks like this.\

elder cradle
# bronze yoke it's whenever the list of containers the player can access change

@tardy wren@bronze yoke From my testing OnContainerUpdate() only triggers after a container is removed from the world and its argument container is usually nil at that point.
The one that triggers when the list of nearby containers changes is OnRefreshInventoryWindowContainers().
And with it's iSInventoryPage arg you can directly access a list of all nearby containers using iSInventoryPage.backpacks.

tardy wren
#

Will see myself

elder cradle
#

I currently have a similar need so I've been debugging all the events to see when they trigger.

bronze yoke
#

the reason the argument container is usually nil is because in most cases it doesn't pass any arguments

#

the vanilla usecase doesn't need anything so they didn't add any, except in a couple calls where it does pass some things

elder cradle
#

I was initially using OnPlayerUpdate to detect and verify nearby containers but that seems very taxing on perfs.
I'm converting it to use OnRefreshInventoryWindowContainers instead.

tardy wren
#

What mod are you making btw?

elder cradle
#

Just a simple Battery Charger for the small batteries.

#

A tiny container tile that charges batteries when there is power on it's square.

tardy wren
#

Hmm, OnContainerUpdate did fire when I loaded a new save...

elder cradle
#

You're right, it also seems to trying when you place a moveable in the world. It's arg is still nill thought.

tardy wren
#

Yeah... and it seems OnContainerUpdate doesn't fire when you load older saves

bronze yoke
#

technically this event does have a tiny bit of vanilla documentation

#
-- Called when an object with a container is added/removed from the world.
-- Added this to handle campfire containers.
#

one of the five comments in vanilla lua

tardy wren
#

No good for my usecase then

elder cradle
#

What's your use case?

tardy wren
#

Syncing existing Inventory Items with their Script counterparts

bronze yoke
#

i guess it doesn't fire for objects being streamed in since you'd have to be moving to access them anyway

neon bronze
#

Is it triggered for all containers? Even bags that you drop from inventory on the floor?

tardy wren
#

Didn't test that

bronze yoke
#

yes

#

actually it's triggered for all items dropped

#

it doesn't check if they have a container

neon bronze
#

Lmao

#

Is it also triggered when you equip a bag from your inventory?

tardy wren
#

Think not

elder cradle
tardy wren
#

No, no

#

Newly spawned items are fine

#

It's the existing items before the mod was installed

neon bronze
#

Yea i wouldnt think so too

bronze yoke
#

it just exists to dirty the ui, so things that would already be handled probably won't trigger the event

tardy wren
#

Hmm

#

For some reason it didn't update all of the items in the container

#

Okay what the hell

#

Canned Chilli avoids detection somehow

#

It's not perfect

#

Right

#

I, like a moron, initialized the inner loop with a value of the current index of the outer loop

#

AKA I did
for j=i, items:size()-1 do

#

Oh this is not something you want to see

balmy terrace
#

What? You don’t want to see butter?

hot void
#

i got an idea what if pool tables have a mini game you can play with 1-4 players while your playing the world pauses and a mini game pops up like the map so you can play

#

can be fun activity for mp and reduce bored and unhappy

frank elbow
#

May be better there, since those message will get pushed up by mod discussion. I've had a similar idea for a more general framework for minigames, but the project that gave me the idea was a bit narrow for my liking after realizing it could hypothetically do stuff like what you just said 😄 Idk about pausing the world, but it's certainly a plausible idea

vague hedge
#

Thanks

nova socket
#

ehm is sendServerCommand operational?
I can catch event from client to server, but cannot do the same from server to client via Events.OnServerCommand.Add(func)

indigo hearth
#

Wouldn’t that be commands sent directly from the console versus a client sending commands to the console via /commands through in-game?

ivory warren
#

anyone here know any mods that change just the sound of sprinting zombies? looking to figure out how to do this myself for a personal mod that will change the sound of spinters to Last of Us Clickers. I know there's a bunch of mods that will replace the sounds of all zombies but I need it for a world that only has like 2-5% total sprinter population

nova socket
bronze yoke
#

are you testing in singleplayer?

#

servercommands don't function in singleplayer, even though clientcommands do U_U

nova socket
#

Yeah, that was my last guess, thanks.

#

Is hosted game valid? Should be right?

bronze yoke
#

yeah

ivory warren
cobalt fiber
#

I'm working on something related to UIs, and I need to draw a texture (tile sprite), but not the full texture.
Is there a way of 'cutting' only a part of the texture and draw it?
eg. a 128x256 texture, I want to cut 64 from the top and bottom, getting 128x128

fallen ivy
#

Hi guys, I want to create a basic mod the replaces the level up sound in the game but I am not sure where to start, any advice would be appreciated !

zealous pebble
#

I feel like someone should make a repeating crossbow mod

weak sierra
#

can't update workshop item because "reason=2"

#

on my private server mod

#

i just uploaded an identical copy to the test version of the mod a few mins ago without issue..

#

anyone?

bronze yoke
#

restart steam

#

always fixed it for me

weak sierra
#

will try

mellow frigate
weak sierra
bronze yoke
weak sierra
#

this is bad

bronze yoke
#

unfortunately steam gives 'reason 2' for literally everything

#

might not like the files, might just be having a bad server day

#

if you already uploaded it it's probably not the files

weak sierra
#

steam has logs for workshop upload

#

was very helpful

#

[2023-09-16 16:30:27] [AppID 108600] Upload workshop item <redacted> failed (Colliding file mapping of "/home/evelyn/.local/share/Steam/steamapps/compatdata/108600/pfx/dosdevices/c:/users/steamuser/Zomboid/Workshop/UdderlyRP/Contents/mods/UdderlyRP/media/lua/server/items/VFE_Distributions.lua" and "/home/evelyn/.local/share/Steam/steamapps/compatdata/108600/pfx/dosdevices/c:/users/steamuser/Zomboid/Workshop/UdderlyRP/Contents/mods/UdderlyRP/media/lua/server/Items/VFE_Distributions.lua".)

#

i apparently had this under two capitalizations

#

not sure why it let me upload it other times tho

#

@bronze yoke wanted you to see

#

/home/evelyn/.steam/steam/logs/workshop_log.txt

#

in case u ever run into it or help someone who has issues, helpful place to look it seems

bronze yoke
#

i sort of agree with case sensitivity on principle but god case sensitive file system can't ever be good

weak sierra
#

im fine with it as long as it's consistent, but it sucks that the ecosystem is like half case-sensitive and half-not

bronze yoke
#

that log file will be crazy useful

weak sierra
#

yeah

bronze yoke
#

better than me going 'idk restart steam' every time

weak sierra
#

i cant imagine trying to update a mod that overrides a file in Items

#

when ur on windows

#

and items == Items

#

but then on linux server

#

the mod doesn't work

#

etc

#

must drive people nuts

#

advantage of linux client

bronze yoke
#

iirc they made the game search case-insensitive for files because that kept being way too prominent of an issue

weak sierra
#

when doing override by path i think it's still an issue?

#

anyway thanks for the help

#

gotta go now

rare scaffold
#

how do I go about making my own type of grenade / projectile?

indigo hearth
#

I haven’t written any of the code yet but basically I want to make a mod that plays a music file when a player crosses a certain coordinate on a map. To create an invisible line for the music file to trigger would I have to list each coordinate individually? Would it make more sense to use an interface similar to creating safe zones?

frank elbow
#

would I have to list each coordinate individually
No; you can use math

Would it make more sense to use an interface similar to creating safe zones?
Maybe, but this is a question about specifying the area rather than the code that would be used to trigger it

indigo hearth
frank elbow
#

I think the answer will be “it's up to you,” regardless. Depends on how you'd like to implement it

indigo hearth
indigo hearth
frank elbow
#

Ah, gotcha. There are ways to preload sounds iirc but I don't think that'll be the biggest concern (i.e., it'll still play the sound you specify without that preloading). I'd focus on having it play at all before thinking about when to load it

frank elbow
frank elbow
#

Some other things are worth consideration: will it play only the first time? Every time? Either way, you'll need to ensure you don't inadvertently trigger it multiple times in rapid succession

indigo hearth
frank elbow
# indigo hearth Oh like a house alarm

I'm not sure exactly how those are implemented or whether it's Lua or Java side, but that's a great idea of a place to start (i.e., searching for that in the code)

indigo hearth
#

Sorry for late response I’m at work. Thank you for your advice!

indigo hearth
#

How do I tie in player positions relative to function luautils.getNextTiles

storm hound
#

Speaking of IntelliJ, can anyone give me advice setting it up? I can code but I did the network architecture/Cisco side of things in college and never got taught how to set up an IDE.

I have the file I want to work with in src/zombie/core/physics/ where it is in the game files, and I have the game files set up as a library. It validates the file fine, gives me warnings, but it doesn't throw errors until I build it, and then it can't resolve any of the imports :/

The dependencies are set up so it looks at the game files and libraries first

#

I'm not using maven or gradle to build it since I don't know how to set them up, using the default build system in IntelliJ

#

I suppose I'm wondering:

  1. Which version of the jdk do I want to be on? The tutorial I initially used to decompile the game used 19, but I'm not sure if that's still correct
  2. With the zombie/core/physics/CarController.java, do I have zombie as the source, or do I have zombie in the source?
indigo hearth
#

PZ.io.storm GitHub page will help you set up gradle

storm hound
#

Oh, awesome! Thank you I'll follow that then

indigo hearth
#

Just a heads up though, you’ll need to mess around with the source SDK and gradle version to get it to work since it was discontinued 2 years ago. I ended up having to revert gradle to the version that was released around the same time as PZ docs latest release version

storm hound
#

Ahh, definitely good to know. Thank you 👍

#

I was looking for a modding api when I was originally trying to figure out how to work with the java side of it, but had no luck finding one so I'm glad there's actually something like that around

indigo hearth
#

It’s a bit old lol so I’m still having issues trying to get certain functions to work

#

Like I ended up having to set my sdk version to 16

#

It’s on 20 right now

storm hound
#

I mean, it can't be worse than beating my head against a wall trying to resolve import problems I shouldn't even be having

#

At least, I hope not xD

indigo hearth
#

Dude I’m still beating my head about knowing if it’s working properly or not lol. Although it could be my lack of knowledge in Java 😅

storm hound
#

That's in general just been my experience trying to get this stuff working 💦
Every other time I've messed with a java game there was an up to date tutorial for setting up gradle that just worked 😅

#

I'm sure it's a skill I need to get off my ass and learn. Setting up an IDE, and maven or gradle from scratch

#

My approximate understanding of build order, libraries, and dependencies is fine once I have the stuff set up. But if anything goes wrong I'm just staring at it like.. What do I even do

zealous pebble
#

is modding in this game difficult

storm hound
#

If you're doing something that only needs Lua, no it's super easy

zealous pebble
#

i dont know lua

indigo hearth
#

For me

zealous pebble
#

and ive only ever done programming sucessfully one time

storm hound
#

If you're doing something in Java and know how to set up your build environment, it'd be easy to moderate. If you're doing something in Java and don't know how to set up your build environment, then, yeah pretty difficult

#

Well, imo Lua's the best option to start off with

indigo hearth
#

I managed to get console to print, “hello world” , once

storm hound
#

It's not as fussy with syntax as most languages

zealous pebble
#

i should still have vs code on here

#

is that all i need

indigo hearth
#

You should use IntelliJ

storm hound
#

Well, first off, what are you trying to do? What sorta modding are you looking at doing?