#mod_development

1 messages Β· Page 320 of 1

silent zealot
#

isn't split screen the only local multiplayer?

fallen knot
#

never ever seen how splitscreen zomboid looks like honestly

silent zealot
#

it's weird

bronze yoke
#

a function that uses getPlayer() is just inherently less useful than a function that accepts a player

fallen knot
#

agreed

silent zealot
#

because the way viewing works you get chartacters appearing and disappearing on your screen as teh other person moves.

#

Plus you need a controller for one of them and I have no idea how people play with a controller.

fallen knot
#

today i played without keen hearing and it felt very weird

#

you really can see everything around you

silent zealot
fallen knot
#

that never happens with keen hearing

#

lol

silent zealot
#

try a 360Β° vision mod, so weird. But also good for getting screenshots for your mod or being able to see in front and behind while working on a headlight mod

fallen knot
#

it was a 360 + extra zoom tho

#

only activated extra zoom cause 360 felt like cheating

silent zealot
#

I don't like it for normal play, though I spin around to keep awareness by habit after so many hours of playing, even with the mod

silent zealot
fallen knot
#

haha true

#

it's just weird to see everything all the time

#

keen hearing is kinda that tho

#

thats why it is OP

silent zealot
#

keen hearing is at least a short radius around you

#

There's also a version of 360 degree vision that stops things being hidden if you can't see them

#

So you can see zombie trhough walls etc

#

it's so bizzare

fallen knot
#

yeye, that does feel like cheating

#

i think i mightve actually accidentally left it present because ive seen one thru walls more than once

#

it's just that it is a java mod

#

so annoying to remove properly

silent zealot
#

it will have been uninstalled w/ 42.7

fallen knot
silent zealot
#

Oh right I keep forgetting that's still a thing

fallen knot
#

waitin for stable b42, have tried it sometimes tho and it feels really good overall

#

main complaint is the ui cuz with my 1366 it feels all too big

#

but you get used quickly

silent zealot
#

Given B42 multiplayer is probably a year away, I should remember people are still playing B41.

fallen knot
silent zealot
#

lol

fallen knot
#

its mostly for the mods and because i dream of having a long term save file someday

#

and unstable would kinda get in the way of that

silent zealot
#

I've kept a save since 42.2... but I did wipe the world after the 42.6 great generator incident.

fallen knot
#

once stable releases ill most likely move on tho

#

no mods can match b42

silent zealot
fallen knot
#

it was p cool trying it out when it released

fallen knot
silent zealot
#

...no clues as to what it didn't like, but something in that chunk made it unhappy

fallen knot
#

how even, isnt this like some kind of logger stored in appdata?

silent zealot
#

that's from console.txt

fallen knot
#

i know, but i remember seeing message.txt around too

#

might just be crazy tho

grizzled fulcrum
#

they'll probably end up making IsoSurvivorCharacter as an NPC class and put it as a subcllass to IsoAnimal or something lmao πŸ˜‚

fallen knot
#

thatd be so funny

#

and it's not even impossible

silent zealot
grizzled fulcrum
#

They need to restructure it I think. Like IsoGameCharacter and IsoLivingCharacter feel lkie they serve the same purpose, and IsoAnimal shouldn't be subclass to IsoPlayer. If they need a similar player API but for animals, why not put the API in LivingCharacter

fallen knot
#

sounds like a fun mod

grizzled fulcrum
#

well their classes seem backwards

#

like IsoLivingCharacter, but IsoGameCharacter can be alive and dead, why calll it living character lol

fallen knot
#

i guess living only works when you're alive...?

#

no idea

#

never seen it get called at all even

grizzled fulcrum
#

it is superclass of IsoGameCharacter/IsoPlayer/IsoAnimal

#

Usually you have like Character class/interface which is a game character that may or may not be controllable by the player and may or may not have AI stuff

then you have a Player class which only the user can control and not AI (some exceptions though)

then you have something like AiCharacter or GameCharacter/NetworkCharacter something like taht which is the basis for ai controlled stuff (which zombies/animals can also inherit, so you have all your core AI code in one superclass)

#

entity is more fitting name I think but it works however you name it

silent zealot
#

I think you mean IsoEntity 🀣

bronze yoke
#

'living' here seems to mean not a zombie

grizzled fulcrum
bronze yoke
#

it's not though, game character is superclass of living character

grizzled fulcrum
#

oh true lol

#

i forgot isolivingcharacter is in between them

#

prefixing everything with iso 😭

bronze yoke
#

that class doesn't really do anything, i assumed it's meant to store common code for npcs and players but they put isoanimal under isoplayer so who fucking knows what the plan is

craggy nacelle
#

Huh, hm. So i have a question, i used jumping and falling for damage to scratch and bleed on my shin. But why doe both of my hands also loose health? (Also very, very slowly) Kinda weird.

oak gyro
#

so I want to make a mod in which a user can load their model or at least load my own model into the game, the thing is, I don't want to replace the main user, as I don't want to break the entire game models like zombies or other players in multiplayer, so my current idea is to make clothing and hide the player model so only the custom model clothing is visible, is this possible to do?

craggy nacelle
#

Uhm, first: are we talking about remote controlling a second model or just flying clothing worn by an invisible character?

plush wraith
plush wraith
#

I would suggest looking at some of their mods to see how they do it

silent zealot
craggy nacelle
#

So, i have a bit of a weird question and dont quite now how to formulate it. Is there a way to make event listeners kinda self destruct? As in, i want to remove them but i dont want to use a nother listener for it since that would kinda defeat the whole purpose of doing it. 🧐

bronze yoke
#

what do you mean use another listener for it?

#
local function myCallback()
    Events.EventName.Remove(myCallback)
end
Events.EventName.Add(myCallback)
```avoid doing this for single fire events, since an oversight means that the next callback will be skipped when you do this
#

it usually doesn't matter for ontick but for stuff like oncreateplayer you might break another mod randomly

craggy nacelle
#

Uhm... i guess it didnt work because i used Event:Remove(myCallback) in the function? Works from outside tough, so i didnt know...
What do you mean with i remove them all tough, dont i just remove the callback i handed over to the remove command?

bronze yoke
#

it's an oversight with the way events are triggered

#

it just loops through the list of callbacks in order, if one gets removed, then all the ones after it get shifted down to take up the empty space, which means the next one moves to where the removed one was, and gets skipped

craggy nacelle
#

Oh... dang, that could break a lot of stuff. Are the callbacks at lesat in their own lists (i mean by events) or are they all in one big one? I want to remove exactly the OnTick and OnDamage event callback since they are quite hungry, so when not needed, id prefer to not have them run idle. But since i want the mod to be used in MP, and there will be a lot of other mods? ouch

bronze yoke
#

per event yeah, and it's only skipped once (per removal anyway)

#

a damage event seems dangerous, but ontick is pretty safe

#

if you remove it outside of a callback it's fine though

#

the problem only happens if it's being removed during a callback

#

i imagine the damage one can probably be removed during ontick (i assume they need the same condition?) so that's safe to do

craggy nacelle
#

Oh? Oh! so its only if i call it from inside the callback? Yeah, that solution should work. They are both for the same purpose. thx a lot, that will help :))

silent zealot
#

"Remove the current node from a singly linked list and reverse the order of all preceding even numbered nodes"

ornate basin
#

but for everything else it can throw people off a lot yea

thin swan
#

Hmm, would it be a bad idea to use the tags in an item script to be able to retrieve custom stats that I want to make customizable?
For example Tags = RepairWithTape;RepairWithGlue;5, and then I just use ScriptManager to get the tags and doParam to change it?
Or is there a way to add a completely new stat variable and retrieve it? From looking at the item object it seems there's specific getters for all the stats

bronze yoke
#

if you set a parameter that doesn't exist (e.g. MyParam = 5) it becomes default mod data for the item

#

this would mean (when the item first spawns) item:getModData().MyParam == 5

#

if it doesn't vary per item instance though this bloats the save file, in that case it's better and easier to just have a map of item types to their stats

thin swan
small topaz
#

Hi! In b42, the zomboid devs applied various changes to Muldraugh (overhauled buildings, some position changes of buildings etc.). Does anyone knows whether they applied similar changes to the other old starting cities, i.e. Riverside, Rosewood or West Point?

craggy nacelle
#

PZ modding makes me really doubt my myself. XD
So i triggered the setPlayingDeathSound from the IsoPlayer set it later to false but it still shows it as true when i use isPlayingDeathSound later on, even when that one happened minutes ago. So even if my setting to false didnt work, shoudnt there be a time out?

Anyone played around with that function and knows what it does? I get the feeling im misunderstanding the usage of that function. πŸ˜•

oak gyro
silent zealot
#

I've seen a bunch that are "replace the entire player model with a new model", is that what you're after?

#

Then they recommend using transmog to hide other gear.

oak gyro
silent zealot
#

I'd assume the clothing will show up for eveyone in multiplayer.

#

(since everyone will need the mod installed to match the sever modlist)

silent zealot
#

I'm not sure what is in Widnows 11 chan mod

#

That "Lady Hunk" is from someone who has made a lot of model replacers

#

Done!

#

But I had to commit the sin of using OnPlayerUpdate Otherwise I would have needed to cap all stress from all sources.

#

But the game is already calculating the sound stress every tick so shrugs

craggy nacelle
#

why is it a sin? curious

silent zealot
#

Performance.

#

I've seen mods that do things like Check where a zombie on every tick for every zombie... that's a lot of workload to add.

#

It's OK if you keep you OnUpdate function as light as possible, and there are plenty of ways to help with that (only do stuff every X ticks, cap the number of things updated per tick, etc)

craggy nacelle
# silent zealot Performance.

but onplayerupdate only triggers when there is a change right? and i have to use on tick atm too, also my querry is small, its still one tick so.. if you are a sinner, you're in good company. πŸ˜‰

silent zealot
#

Sometimes there is no way to avoid it, so you just make your code low-impact.

oak gyro
#

if anyone reads this, we should make a Zombotany mod

silent zealot
#

Tallnuts are thumpable construction, peashooters hoot zombies, etc.

#

...it's a lot of work and you'll be fighting the game design on every step

#

So, don't so what I just said unless you're insane.

oak gyro
#

if you kill a zombie on the grass it may drop seeds and more zombies can appear

silent zealot
oak gyro
#

how do I download a mod from the workshop in order to disassemble it?

silent zealot
#

subscribe

#

the files will be downloadde by steam

#

C:\Games\Steam\steamapps\workshop\content\108600<number from mod URL>

craggy nacelle
silent zealot
#

(adjust path if steam is installed somewhere else)

#

No need to disassemble - the mod will be a bunch of text scripts/lua/models/textures/sounds etc

#

It's very rare for modders to use texture packs or java files (which need manual installation)

#

Well I just updated my "mod ideas" notebook.

#

Now I'm going to bed.

craggy nacelle
#

gn8

oak gyro
#

when making clothes or COS/costumes is it possible to resize the user? in case I want it to make the model taller or shorter?

topaz tangle
#

A PVZ mod in general would be sweet

silent zealot
#

Closest you can do is bulk up with big clothes.

#

Like "fat zombie" outfits.

#

might be able to go skinny too with model replacing clothes

#

But that's all using the same skeleton/animations.

oak gyro
#

where are the mods stored?

#

I installed a mod I want to analize but I can't find it

silent zealot
ornate basin
topaz tangle
#

Looking at others code has help me so much with modding lol

silent zealot
#

Agreed, having mods in an easily readable format is a huge help.

#

Compared to stuff like unreal mods.

ornate basin
#

I feel like that's mostly cuz the documentation is horrible

silent zealot
#

Where you are getting a "baked" result.

ornate basin
#

like

#

this is the only useful documentation I could find

silent zealot
ornate basin
#

and even then it's a pain in the ass to find how to do actions

silent zealot
#

The good news is you have every vanilla action to learn from.

ornate basin
#

like all you get is a list of the events, but good luck trying to figure out how to know what functions are actually available to you beyond just scouring for stuff, 0 way to search things

silent zealot
#

Do you use VSCode or a similar IDE?

ornate basin
#

I'm not new to coding

#

I'm not asking for help

silent zealot
#

I keep a VS code instance open with the media folder and decompiled java folder in teh workspace, it's super handy for searching.

ornate basin
#

I'm just pointing that out

craggy nacelle
#

Uhm, there is a api doku tough?

ornate basin
topaz tangle
silent zealot
#

It's not good code either. 🀣

ornate basin
#

TRUE LMAO

#

but then again

#

is any codebase good

#

xd

silent zealot
#

Yes, but only by spenidng a huge amount of extra time, effort, money and mangement to make an excellent codebase.

ornate basin
#

I don't think it's possible

#

if the codebase is big enough

#

like if you don't need it to ever change then yes

silent zealot
#

Consider extreme examples like the code used on deep space probes.

ornate basin
#

but if it needs to be refactorable then it'll always have other downsides that people will hate

#

I think code that has an extremely specific purpose and extremely well defined features that will never ever evolve can be excellent

#

but games? never

silent zealot
#

...and ignore that tiem one group used pounds-per-square-inch and the other used newtown-per-square-meter and the probe exploded.

silent zealot
#

You've got to love fast inverse square root.

#

Things were a lot smaller then so code had to be more elegant to run.

oak gyro
#

I'm trying to align the model to the clothes topology is there any better bone reference?

#

I don't really understand thisone

ornate basin
#

any codebase that has to add stuff that wasn't planned for is just necessarily a mess

#

language features that allow for refactoring without trading off performance or debugging options are simply not advanced enough yet

oak gyro
#

I think I found the correct shape of the bones

broken kayak
tall eagle
#

Hey people, never made a mod, but considering making one to fix a bug that has been flying under the radar for a while now (reported it), specifically about leather gloves and fingerless leather gloves.
The bug itself is the fact that loot tables only seem to contain: Gloves_LeatherGlovesBlack, Gloves_LeatherGloves (and Gloves_FingerlessLeatherGloves).
To craft fingerless leather gloves, you need Gloves_LeatherGlovesBlack or Gloves_LeatherGlovesBrown. The Brown variant isn't even in the loot table and the variant without colour cannot be used for the recipe at all.
Easy mode would be just adding the non-specified variant to the crafting recipe, but that would cause the resulting fingerless gloves to be always random colour.
The proper and a bit harder mode is probably changing all Gloves_LeatherGloves to either Gloves_LeatherGlovesBlack or Gloves_LeatherGlovesBrown. Question is, can I make a mod that edits the existing stuff in the loot table, without replacing the entire loot table?

broken kayak
#

Yes you can edit the distribution table to modify or add items to the loot table without overriding everything

tall eagle
#

Awesome, thanks

oak gyro
#

lets suppose I'm done creating the mod

#

how do I test it?

tall eagle
#

You put it in C:\Users\ <user>\Zomboid\mods

broken kayak
tall eagle
#

Well, honestly, the non-coloured variant should probably not even be in the table at all.

broken kayak
#

Maybe that was the mistake, the put in the non colored varian instead of the brown xd

tall eagle
#

Yap

ornate basin
#

but of course you can use cheat mods alongside it, or debug info stuff

tall eagle
#

another small issue is that the brown fingerless gloves have a different name, so they don't stack, lul

broken kayak
#

AuthenticZ does all kinds of crazy stuff with items, you might find what you need there

#

You can easely rename the fingerless glove in the script/clothing/clothing_gloves.txt file

#

Also there the fileGuidTable which defines wich item is which, I have no idea if this would work but maybe swapping the non colored version and the brown one would work ?

    <files>
        <path>media/clothing/clothingItems/Gloves_LeatherGloves.xml</path>
        <guid>2b0756ac-57f3-415e-bfed-24b28d1ca4d6</guid>
    </files>
    <files>
        <path>media/clothing/clothingItems/Gloves_LeatherGlovesBlack.xml</path>
        <guid>096acc98-7ac1-4867-82dd-af77afb6a87b</guid>
    </files>
    <files>
        <path>media/clothing/clothingItems/Gloves_LeatherGlovesBrown.xml</path>
        <guid>349a92a8-e06e-4da0-8c55-172a358e0173</guid>
    </files>
tall eagle
#

Oh, would that mean that renaming the ClothingItem value of Gloves_FingerlessLeatherGloves to Gloves_FingerlessLeatherGloves_Brown automatically makes all Gloves_FingerlessLeatherGloves spawn as _Brown?

broken kayak
#

Editing the fileguid would replace all non colored variant with the brown (in theory) like they were totally different items

#

So all gloves in any inventory and all the ones which would spawn

#

Worth a shot

oak gyro
#

welp

#

when I craft the COS

#

the item never gets on the inventory

#

if it just despawned stuff

tall eagle
oak gyro
#

do COS models require any specific configuration on the FBX export?

#

I tried directly replacing frog

#

but the model does not seem to appear

#

as if I was wearing nothing

#

a bit cursed but it works

silent zealot
#

"a bit cursed" means it will fit in the always-slightly-janky aesthetic of Zomboid

tall eagle
#

oh this is weird asf. They have the correct display names in the files, but not in game... So not as easily fixable as it seemed.

broken kayak
#

ItemName_EN.txt under ProjectZomboid\media\lua\shared\Translate\EN

tall eagle
#

Ahh. Right. Thanks

#

Also, I wonder if there is a fast way to test spawning of an item... Apparently Golf Bags have quite a high chance of spawning leather gloves, but can I somehow spawn a bag with its loot table filled, instead of empty?

broken kayak
#

I have no idea

tall eagle
#

cranked clothing and bag loot up to 4, which is max, maybe that will help

broken kayak
#

Can the game be run from the executable when in nosteam mode ? I only seem to be able to launch it from the batch file.

tall eagle
#

.exe definitely worked for me in B41 when I tried.

#

But it only made a difference in multiplayer, so it is currently irrelevant for B42 (I was trying to join a locally hosted server with 2 zomboid clients)

queen oasis
#

are microwaves broken right now?

topaz tangle
oak gyro
oak gyro
#

Do mods support lua scripts?

broken kayak
#

Yes

small osprey
# oak gyro oof

This fits in so well. With a certain crowd especially haha. good job.

small osprey
fallen knot
#

arrays start at 1??

#

damn

small osprey
#

Yeah, I want that hour of my life back too.

fallen knot
#

thanks for the knowledge

frank elbow
#

For the purpose of the standard library and the length operator tables start at 1, but if you're feeling real wacky you could start them at 0 anyway (not a real recommendation, just joking πŸ˜„)

small osprey
#

Hehe I am not complaining. This would get into programming philosophy. I guess when lua authors made that choice back in the 90s they didn't envision the kind of tight integration with Java APIs πŸ˜„

#

Now for something different: How many squares around a car spawn should be checked to be "empty" to avoid undesirable 😬 side effects? What else to watch out for?

I can experiment but maybe somebody knows.

silent zealot
# fallen knot arrays start at 1??

Tables start at one, if you're using default "I just put in values and let you choose the keys"

If you get an array from a java function call that's a different thing and starts at 0

#

And you need a different syntax to iterate through it

fallen knot
#

i see

broken kayak
#

Yeah iterating through ArrayList is what got me

fallen knot
#

I'M DONE :D !!!!

#

gonnna upload it to workshop right now!!

#

both for B41 and B42

fallen knot
#

good job!!

fallen knot
#

wdym always true

#

are you silly

faint jewel
#

does anyone know of the mod that lets you right click on the ground and clear trash tiles... i have it and wanna turn it off. but have no clue what mod it is.

craggy nacelle
#

bikini?

fallen knot
#

hmm, no

#

not really

grizzled fulcrum
fallen knot
#

i will trust my own instinct

fallen knot
#

i dunno why intelliji is saying it's always gonna be true

#

probably just a small problem with it

grizzled fulcrum
#

but you do || !yes

#

(false != false) == true

faint jewel
fallen knot
#

you know maybe

#

i'm doing this in the wrong order

fallen knot
#

let's you clean blood and trash

#

with a broom for trash, specifically

fallen knot
#

now it actually checks for the file to exists in a first place

grizzled fulcrum
#

wait you intend to return?

fallen knot
#

uh, it stops the for, right...?

grizzled fulcrum
#

no...

fallen knot
#

oh, damn i see

grizzled fulcrum
#

stops the whole function

#

you want to break;

fallen knot
#

in other languages i've used it does so lol

faint jewel
#

this is an admin option that removes all trash tiles in an area.

fallen knot
#

makes sense honestly

grizzled fulcrum
#

when you return, no more code gets executed

fallen knot
#

GML is quirky, haha

#

it only stops the for

#

not the whole thing

grizzled fulcrum
#

so the if (autoSaveTime == -1) wont run

fallen knot
#

i actually had the feeling that could be the issue

#

so i tried exit too but saw it didnt seem to exist her at all

grizzled fulcrum
#

that is probably why it was complaining, because the code cant even be used past the return, same as why yes is grayed and warning'd

fallen knot
#

yup, that did it

#

thank you

silent zealot
fallen knot
#

it's actually nice i have this setup

#

all i have to do is to double click the compile cmd file and boom

silent zealot
#
  1. get teh exact text of the context menu option
#
  1. search your mod download folder for any .txt or .lua file containing that
grizzled fulcrum
#
  1. profit
faint jewel
#

ouch

fallen knot
#

is there anything wrong with these...?

#

my game's crashing

#

and i dont really know how to check a java error log lol

#

they get used like this just in case

bronze yoke
#

you're closing the reader and then trying to use it again

fallen knot
#

ohhh yeah that makes sense

#

getTotalLines's doing that, right?

bronze yoke
#

yeah

#

don't bother trying to use a native array here, use an arraylist, it's far simpler and doesn't require you to already know the length

fallen knot
#

sure

#

i'm just more used to the first one but it's true the latter is more useful in this case

#

thanks

bronze yoke
#

oh, also, you always initialise the array as length 1, so you likely write out of bounds too

fallen knot
#

i thought i was done with my mod but just before starting to make the workshop page i stopped to think how would this work on a fresh install and by testing so i found it did crash πŸ˜…

#

good thing i thought of that in time

faint jewel
#

grrr... this sucks

fallen knot
#

there we go, much better

bronze yoke
#

i think this will result in it skipping every other line

fallen knot
#

oh yeah, true

#

it will go 1 yes 1 not 1 yes 1 not

#

lol

#

okay i've got the solution

bronze yoke
#

i think you can use fileInput.ready() to check if there's still lines to read instead of checking null

fallen knot
#

was thinking of something else but sure i can try that

#

(just in case, this was my idea)

#

it'd result on having one single empty string but for what's it's worth, i wouldnt really bother

#

but if yours work then that's better

#

i'll try it rn

#

yeah! it worked! no crash

#

cool

#

everything's working just fine, i think I'm actually done now!

#

thanks a lot again, albion

#

just saved me a lot of time lol

fallen knot
#

yup, just made sure it worked on b41 and it did

#

gonna work on the workshop page now, finally

fallen knot
#

Finished it!

#

gonna try adding a proper B42 tag tomorrow

#

gotta go eat now

#

buh-bye!

ornate basin
fallen knot
ornate basin
#

lmao

#

that's not what I mean

#

I guess you might not have the tech to "hide" saves as a mod

#

but that'd be the idea

#

you make the save, you "hide" it, and you "unhide" it 5 minutes later if the character is alive, otherwise you delete it

fallen knot
#

i did think about making it so it wouldnt work in case character was in danger or panicked, but i thought it could just be more annoying

fallen knot
ornate basin
#

no

#

the added benefit of doing that is that you know the save isn't a softlock

ornate basin
#

but I guess not

fallen knot
#

when you load zombies will forget completely their task. the only case this'd turn into a softlock would be if the player's hp is ridiculously low the moment the auto saving happens πŸ€”

fallen knot
#

here, let me link it

ornate basin
#

I'm good thanks

fallen knot
#

well i sent it already lol

#

watch it if you want, i guess

#

but in reality it just creates a separate save file

#

so your main save file is always a different thing

topaz tangle
#

Forgot to take a picture but it’s just about done!!
Gonna need one last day on it, something happened and I took a break for a bit, all that’s left is masking and re-textures

Will either be the jeep forward control next or the zip van

topaz tangle
#

Thanks!!
I’m debating on releasing a closed beta or alpha (whichever is the proper term) for people to play around with since I’m so open and active with posting progress, but I’m unsure yet

fallen knot
#

hope you enjoy it lol

gilded crescent
#

Oh sick, I definitely will

fallen knot
topaz tangle
#

This is true!
I don’t play enough anymore to properly test balencing and such, I’ve got one or two friends who play a bunch that I could send a link to

fallen knot
#

Hope it all goes well, then!

#

Gotta go to sleep lol

#

good night

silent zealot
#

I included a sandbox option to kill trees with one hit because after recreating an entire java functions in LUA and then also recreating a secondary function inside that just to change a single 1 to 0 because TIS screwed up... I HATE TREES.

#

Three hours from start to Workshop upload is the quickest I've ever done a mod, usually I come up with an idea and screw around for along time before completing it.

#

Including my extensive research into lumberjacks

proud hare
#

Is there any way for an object to have multiple types? Example, a clock can also light up

rigid mauve
#

I want to try and make a molotov/firebomb launcher, but I'm not sure how throwables work. Where can I find the throwable logic/lua so I can take a look and reverse-engineer it?

silent zealot
proud hare
silent zealot
#

Tags do lots of stuff.

silent zealot
#

Let me check my "all watches, all features" code for a sec

#

Ok, sorta bad news: the type AlarmClockClothing is what controls the clock appearing

#

sorry that was all wrong - Torches/lanterns are type Drainable.

#

just create a world lightSource under the player and constantly delete/recreate it as the player moves.

silent zealot
#

A warning: this will be very janky unless it's a large area of dim light, because the light source is always in teh centre a tile.

silent zealot
#

In an ideal world more things would be like fluidContainer which is something you add to other items; so you would make an item and attach a lightSource and alarmClock... but that is just wishful thinking right now.

#

But for now, an item can be a Drainable OR AlarmClock OR AlarmClockClothing

#

It might be possible to make a type=AlarmClockClothing emit light like a torch, since the various light parametrs are in InventoryItem

#

which means AlarmClockClothing inherits those

#

If you assign the various light properties to a watch, then you can activate it with setActivated() BUT it will only act as a light source if it is an attached item (ie: on the hotbar) or held in a hand.

proud hare
#

and as radio is posible?

#

like Premium Technologies Radio

slow marten
#

is there a possibility for java mods to be supported by workshop? or is modding gonna just be lua forever?

silent zealot
#

But, there is work on a thingy you hack into Zombod that allows for java modding, which I was menat to look at last weekend and did not.

#

But in practical terms, for now mods are all lua or they require manual copying of a java class that the mod author has to keep updated.

silent zealot
# proud hare and as radio is posible?

Portable radios already exist, you could probably make them glow when in hand/attached by adding properties to the item script (might need some lua to turn on/off)

slow marten
silent zealot
#

No, but I've seen the pace they work at and can guess how much work official java modding would be to implement as well as how low it is on their priority list.

#

They may also just not want it to be easily done to avoid thousands of poorly coded java mods causing havok... lua is much more isolated from the core engine

proud hare
slow marten
silent zealot
#

I've got a suggestion on how you can do that:

#
  1. the pipboy adds two hotbar slots for "pipboy modules"
#
  1. pipboy torch module is a torch
#
  1. pipboy radio module is a radio
#

because the modules are attached items (like if on a belt slot) they will do their torch/radio jobs without needing to be held in a hand.

#

The model for the modules would be something small you can "hide" inside the pipboy

#

Or do some more modelling work so they look correct when attached, adding a torch lend poking out one end and an antenna to the other or some such.

shell geode
#

Any modders looking for ideas? I found this lol

sturdy lodge
#

quick question, how difficult is it to modify some mods so that they could support case sensitivity on linux and all?

ancient grail
ancient grail
silent zealot
#

Or make the case what is expected instead of relying on a case insensitive filesystem

#

But, thats for case sensativity OF THE MOD - not of the java stuff that runs the core game.

sturdy lodge
#

yeah well I'm coming from a player standpoint on linux, and some mods are having some issues when I'm trying to host or join a server, meanwhile for my friend who's on windows, everything is fine

#

therefore im just thinking of patching the mods myself to make them work

silent zealot
#

You'll need to figure out what in the mod makes it fail on Linux. If they also fail single player that will make troubleshooting easier.

#

E.G: if a texture is named myitem.png instead of MyItem.png the fix is to rename that file.

sturdy lodge
#

yeah i do get some errors on game startup aswell, meanwhile my friend doesn't

silent zealot
#

(and let the mod author know, since they are likely unaware of this)

#

What are the errors?

sturdy lodge
#

it seems like they're mostly file not found errors

#

somehow i managed to mitigate one error by just copying the missing file in all lowercase into my game's folder itself instead of it being in a mod

#

but then later on that didn't work for other files?

brave bone
#

question: how do you guys make mod have two selectable suff in mod manager.

like difinitive zombies have:

[ ]Definitive Zombies
[ ] Definitive Zombies WIP

are they just two folders inside or something?

bronze yoke
#

that's just two mods, a workshop item can have any number of mods in it

silent zealot
bronze yoke
#

you just have to make another mod in the Contents/mods/ folder

silent zealot
brave bone
silent zealot
#

Edit mod.info so they are incomatible with each other, or one mod requires the other, as appropriate

sturdy lodge
#

ZNet: CloseConnection: checksum-File doesn't exist on the client: but both files exist, hell it even gives me the file paths for them and i can successfully print their contents with cat which would definetely complain about the file not existing

bronze yoke
#

huh, really? znet was made case insensitive years ago

#

most of the game just treats all paths as if they were fully lowercase to prevent mismatches like that

#

it used to be a really prominent issue

sturdy lodge
#
ERROR: General     , 1744187201279> 0> DebugLogStream.printException> Stack trace:
java.io.FileNotFoundException: /home/a/Zomboid/mods/media/scripts/??????.txt (No such file or directory)``` and these are the errors that i get when starting the game
agile heath
#

Hi guys, i'm not an expert modder, i did a mod that adds a lot of traits and professions, all the logic was based around getting around the game limits and excluding traits and professions to each other via inserting a free trait for each profession added which handled all the exclusions for them.
Unfortunately the latest game update broke something in how trait exclude each others and my mod no longer works.
I tried to understand what exactly was changed, in the changelog I read this: "Fixed free traits with mutual exclusive traits set not returning their removed traits back to the list." and I am convinced that this change generated this bug, but I can't find the logic in the game that defines mutual exclusivity to understand what change has been made and how to act.
Can anyone help me to understand?

slow marten
#

i think the changelog seems to be referring to TraitFactory.Trait.addFreeTrait(string) :

        public void addFreeTrait(String string) {
            this.FreeTraitStack.add(string);
            this.updateMutualExclusiveTraits();
        }

but it intellij idea says it's not used anywhere though.

bronze yoke
#

how is it not working anymore? what happens?

gilded crescent
#

if so is there a way to mass search?

slow marten
gilded crescent
#

Too many times digging through game files to find a singular item

#

holy moly you're amazing

slow marten
gilded crescent
#

gotcha okay, does that work only within the open files or the entirety of the project folder?

slow marten
gilded crescent
#

sweet, the double tap shift thing will help so much, I'm sure I'll end up using the other one as well, thank you

slow marten
#

np

slow marten
gilded crescent
# slow marten also this btw

Sorry I should have clarified, I wasn't the person you originally responded to, sorry for kinda taking over the convo, I was just really curious

agile heath
gilded crescent
small topaz
#

Hi! What parts of the lua code determine which clothes are worn by zombies?

silent zealot
winter bolt
sturdy lodge
#

from the mods

small topaz
silent zealot
#

This is where it's helpful to have a copy of VSCode open to the games media folder

#

try media/clothing/clothing.xml

#

Difficulty: it's all in guid references to clothing objects.

#
<m_MaleOutfits>
        <m_Name>Priest</m_Name>
        <m_Guid>c7b4f6ab-f087-466b-b6c1-b205d835944b</m_Guid>
        <m_Top>false</m_Top>
        <m_Pants>false</m_Pants>
        <m_AllowPantsHue>false</m_AllowPantsHue>
        <m_AllowTopTint>false</m_AllowTopTint>
        <m_AllowTShirtDecal>false</m_AllowTShirtDecal>
        <m_items>
            <itemGUID>22cf3dec-2614-4ff3-ad37-6d25756da612</itemGUID>
        </m_items>
        <m_items>
            <itemGUID>52acd769-424a-4cbb-b02a-441cb723b747</itemGUID>
        </m_items>
        <m_items>
            <itemGUID>593bea3d-c127-4574-ac1e-2197dc56e486</itemGUID>
        </m_items>
        <m_items>
            <probability>0.1</probability>
            <itemGUID>6d702d88-4ca0-4bcb-9aee-d88f2be29e69</itemGUID>
            <subItems>
                <itemGUID>02b1eb52-8492-4e6e-b0f4-4bda5501fd69</itemGUID>
            </subItems>
            <subItems>
                <itemGUID>62ef5f1f-8eca-4ef2-8ade-fd4fa604762f</itemGUID>
            </subItems>
            <subItems>
                <itemGUID>9df22d1f-96cd-4d2c-88f2-4e7423d93649</itemGUID>
            </subItems>
        </m_items>
        <m_items>
            <probability>0.3</probability>
            <itemGUID>5fc22466-2942-4ba1-8c33-2a8528b73021</itemGUID>
            <subItems>
                <itemGUID>ce1a8520-7120-432e-8a3a-aa7b3094f0bb</itemGUID>
            </subItems>
            <subItems>
                <itemGUID>c7cc655b-284a-4087-85a6-d7c116385fb0</itemGUID>
            </subItems>
            <subItems>
                <itemGUID>0383956a-3fbd-4001-9749-69e2ba70b134</itemGUID>
            </subItems>
        </m_items>
        <m_items>
            <itemGUID>a1209137-d0a3-4c77-ae25-b0e5f24b7cf8</itemGUID>
            <subItems>
                <itemGUID>56d487e0-b329-45cd-8b35-8463491891fa</itemGUID>
            </subItems>
        </m_items>
    </m_MaleOutfits>
small topaz
silent zealot
#

Because there was a huge sale on the numbers 0 to 9 and letters a to f a few years ago.

#

So they starting using guids for clothing to keep costs down.

#

Or maybe it's because a guid can be stored as a 128bit integer for fast processing/compact storage when dealing with thousands of zombies and thousands of clothing items.

#

And making you put guid's in the files means the program doesn't have to worry about computing unique hashes or what to do if something changes that alter the guid hash.

#

I assume the devs have some sort of system to build the xml from a database, or at least an excel sheet... but we don't get that.

small topaz
#

Ya... I think it isn't too hard to automate the generation of such an xml file using simple scripting techniques.

winter bolt
daring bough
#

Guys anyone knows what parameter roll influence does in vehicle settings? I tried different values but there are no effect

small topaz
winter bolt
small topaz
# winter bolt try the other two below it and see if they work instead maybe

Same results. Maybe I have a stupid sytanx error or do not access the OutfitManager in a proper way. Btw I call the method on game boot...

What I try to do is adding a specific clothing item to a predefined vanilla outfit so that it may spawn on zombies (without overwriting the outfit's xml entry in clothing.xml). So I am wondering whether it is possible to do this in lua coding.

thin swan
ancient grail
#

is it getOutfit()
or was it getOutfitName()
im afk cant check
theres also a getPersitentOutfit()

#

oh nvm you found the answer and i was way off mark lol

thin swan
small topaz
#

So aren't there any mods which achieve adding a new item to predefined zombie outfit? All examples I've seen so far add a full new outfit with the new item instead.

slow marten
#

how do i make it day in debug mode?

south bear
#

Good Morning everyone!

Is setPanic() deprecated in B42 or have the acceptable argument values changed? In B41, I passed an int of 50 as a value and it was accepted without issue. I've tried in B42 with both 50 and .5 (just in case it is now a float) and both threw errors.

kardchalice Thanks in advance! Learning about this game has been a joy! kardchalice

small topaz
#

In build 42 , are there any problems of running mod code in the mod's server folder??

#

My code in the server folder doesn't run!!!! Is there anything special I have to do to make it run? Putting stuff in the common folder or smth? Btw code in client and shared runs fine, as expected.

small topaz
#

So, if it doesn't work, how can I add new items to the spawn tables so that they spawn in the game world?

#

so what I tried is just running code with a print command but the print doesn't appear in the console.txt...

thin swan
small topaz
small osprey
thin swan
maiden belfry
#

πŸͺ±

small topaz
small topaz
# thin swan Not sure tbh, what does your lua file look like?

It is just

        
        print("TEST_OUTPUT: server code runs")
end

Events.OnGameBoot.Add(testFunction)```
and this doesn't produce output in the console. I also tried running simply print-command without an event. Also doesn't work for me.

Anyway, I just tried running the code during game via the EveryOneMinute command and this seems to work...
craggy nacelle
#

Hm, so i wanted to look at the zombie population on my (whole) map, but the only thing always refers to the zombie popluation monitor in debug. Is there really no way to see it all? Was hoping there was at least a mod for it out there, but no dice (or im looking wrong, which is very likely. XD ).

small osprey
sturdy lodge
small topaz
#

The vanilla code contains a file Distribution.lua in the server folder but the main table is local. It goes like this


local distributionTable = { 

  -- some items... 
 
}

table.insert(Distributions, 1, distributionTable);

--for mod compat:
SuburbsDistributions = distributionTable;```
Can I still add items to the table somehow? Maybe applying "table.insert" to the global "SuburbsDistributions" or "Distributions" tables?
thin swan
small topaz
tranquil kindle
#

Isn't pretty much everything controlled by procedural distribution now?

small topaz
#

possible that these are some irrelevant and older lists. but I am not sure...

thin swan
#

What are you looking to do? Because if you are trying to make an item spawn in a specific place, then I'm pretty sure the ProceduralDistributions list is the way to go

bronze yoke
#

the server folder doesn't run until you actually start/load/join a game and ongameboot happens on the main menu

small topaz
small topaz
craggy nacelle
#

So i read in one of the tutorials you should save functions locally when they are very often used (like in a loop), since they become a local copy. That i understand, i just dont quite get why some functions work while others throw a fit? For example i can save instanceof this way, but getSpecificPlayer would throw an error, even when both are declared in global?

bronze yoke
#

that shouldn't happen πŸ€·β€β™€οΈ

craggy nacelle
#

Well, it does, let me just get back to it and fish out the error (something about _sub if i recall?)

#

how weird... suddenly it works?
Then i retried it with saving os.time that also made problems before... and that one works too? O_o
Albion, did you run a bugfix on the matrix when i wrote that to make it work? XD

small topaz
#

Is there a handy command for making a certain vanilla not spawn in the game world? Or is manually removing it from the spawn tables the only way of doing this?

craggy nacelle
#

you mean like removeing it from teh distribution table?

#

i think there was a command for removing items from the distribution/proceduraldistribution but i cant find it. but you can always go with table.remove that works just fine if you know what you whant to remove

craggy nacelle
# small topaz yes

Ok, here is an example
table.remove(ProceduralDistributions["list"]["MovieRentalShelves"].items,
By iterating through the table, you can stop at the item of your choise and then use the remove command

small topaz
#

thanks! that was the solution I already thought about! πŸ™‚

craggy nacelle
#

Ok, just to make certain i fully understand and its not helpful, back to my question about saving methods locally.
Im runing both on tick and OnPlayerGetDamage, so i want thm to run as little commands as possible.

So if i write in my OnPlayerGetDamage an if controle with `
character:getBodyDamage():getOverallBodyHealth()
i imagine this to be more perfomance hungry then say:
localOverallBodyHealth(localBodyDamage(localPlayer)))
But is that correct or are they pretty much the same at the end of the day? (just curious πŸ€— )

small osprey
#

Lua learning pains.

"You almost never want ipairs unless:
You're working with ordered numeric lists
You're explicitly relying on order or index"

that little shitty "i" slips in so easily ..

bronze yoke
#

you actually literally never want ipairs

#

it's slower than a for loop (usually not so much, but in pz the implementation is so bad it's massively slower) which does the exact same thing

craggy nacelle
bronze yoke
craggy nacelle
thin swan
#

Probably a long shot, but there doesn't happen to be an easy way to change the collision box of the player? 😬 I found something about collision size for animals, but before I start digging deeper I figured I'd check here

craggy nacelle
#

I dont think its code based. The code has lots of stuff about collision, but i dint see anything about seting up boundary boxes. They might just fire when hitting a texture that is set to be colidable (at least from what i read). So maybe just pump it up and see if it collides with the texture of your player?

thin swan
#

I want to make it so my bike wheels don't clip through walls, but if it's too much of a hassle it'll just have to do.
Was thinking maybe it's connected to the character bones, so pushing the size up maybe could do it. But I have no idea, will have to dive deeper

craggy nacelle
#

Isnt your bike like a movable object or something like a vehicle set up? Sry, no idea about modeling, cant even set up a gun with a custom texture, so there is that... XD

thin swan
craggy nacelle
#

Oh? Hmmmmm, i dont think cloth have collision tough? I dont even know if weapons have collision, would have to check in on weapon swing to see the details

thin swan
#

Yeah I don't think it has collision by default, but if there's a way to increase the player collision box then it would be easy to just make it bigger while on the bike. But I doubt it's gonna be simple 😦

craggy nacelle
#

Ok, might sound totally crazy, but how about you make your bike thumpable?

thin swan
daring bough
rigid mauve
#

Okay I lied, I'm not making a molotov launcher. But I still need to figure out where I can modify the molotov behavior to bend it to my will. Is throwable logic defined in Lua, or elsewhere?

craggy nacelle
#

lemmy check, wanna have a wizzard in the game

sonic needle
#
  • The Beginning Has Released
#

A new gamemode challenge based on CDDA but More Evil can be started from the main menu

#

You have 12 Hour ingame, apon start to decide your fate

#

Should you not decide, a 10 Kiloton Nuclear bomb is Dropped Apon you. And All of kentucky is Gone for good.

craggy nacelle
sonic needle
#

a good mod indeed

craggy nacelle
sonic needle
#

( its 90% of the entire game map lol )

craggy nacelle
#

how did you do it without the game going down to 0 frames? XD

sonic needle
#

Candy Mountain Magic Charrrlie!

#

πŸ¦„ stars_orange

craggy nacelle
oak gyro
#

Changed the texture

small topaz
#

When making a new clothing item, in which folder do I put its icon?

rigid mauve
# craggy nacelle what do you mean exactly with trowable logic? i checked and you should be able t...

Right now I'm interested in making it potentially travel faster, or be able to impact zombies. Right now it seems to fly for a fixed amount of time unless it hits something like a wall. I know basic programming concepts but I'm really unfamiliar with zomboid itself, sometimes I feel like its all kind of spread out. So, wheres handweapon and the throwing Java in the game files? Would looking at those two be enough for me to figure out how to make behavior like that on my own, or should I learn more elsewhere?

#

I guess while I'm asking about this, I'm also curious about how shooting guns works. I think it'd be good for making chain lightning

craggy nacelle
#

Uh, you might have to check out lua for that. Modding in java is more of a nono. https://zomboid-javadoc.com/41.78/zombie/inventory/types/HandWeapon.html Thats the handweapons. As for throwing stuff, sorry, i didnt find an example in the source files so you'd have to check it out youself. Maybe one of the big guys here can tell you more, im also rather new to pz modding. πŸ˜•

topaz tangle
#

If it’s a nod your working on, also make sure the wheels aren’t in the ground/are actually touching the ground

#

I had this issue when I was developing my C-series but I don’t remember exactly what the issue was lol

silent zealot
#

You can fake some things, like spawning an explosion directly on a square (IsoGridSquare:explode(), but it takes exactly zero parameters so you just hope it is the size you want)

#

And we have nothing for stuff like "draw a line of lighting between two points" 😦

rigid mauve
#

That is a shame, but I guess since bullets are invisible, invisible arcs of lightning wouldn't be too bad. As long as I can find a way to "shoot" a zombie like a gun and then have chances to "shoot" other zombies from that position.

#

Is there something to spawn fire directly on squares?

silent zealot
#

In B42 Bullets are visible, as a tiny white line.

silent zealot
craggy nacelle
#

Uh, im not certain about the invisible bullets, ive seen shotgun pellets fly

silent zealot
#

I can't ermember how it looks in B41 anymore πŸ˜‚

rigid mauve
#

I don't have the best of eyes, haha. Perhaps I need to take a closer look at guns in-game, too!

silent zealot
silent zealot
craggy nacelle
red tiger
storm trench
#

Anything new in modding news? I hate being so swamped in work I can't enjoy anything but the embrace of my pillow and blankets lolll.

red tiger
#

In my modding world? Released a rewrite of a way-more secure anti-cheat for Build 41 multiplayer.

topaz tangle
#

Current Powell progress
Mask and lights are just about done (gonna continue work tomorrow)
Re-texturing was, honestly making me angry so I’ve still gotta do that, aswell as wheel models and the model varients

brave bone
rigid mauve
#

I've been experimenting with my fireballs and it seems like there might be a limit on tiles that are actively on-fire. I don't mind it so much but I'm curious if the limit can be raised.

hasty wharf
silent zealot
#
broken kayak
#

Is it possible to get a world inventory item's rotation on build 41 ?

silent zealot
#

Check the B41 Javadocs

#

Here are B42 methods:

#

B41 might have a smaller number of methods for this (since items can only rotate around Z) or it might have all of them (even though there is no way in-game to rotate X or Y)

broken kayak
#

Already check for javadocs, B42 as InventoryItem:getWorldZRotation()

#

But B41 doesn't

#

There is a public field worldZRotation in the InventoryItem java class but It doesn't appear to be accessible in lua

silent zealot
#

Starlit will let you read public fields of java objects that are not exposed via methods

broken kayak
#

damn

#

thanks

main pasture
broken kayak
#

But getting the InventoryItem's is possible ?

main pasture
#

If you could have an instance of InventoryItem class, you could get it, but every item uses some extended version of the class, so it is hidden. Only the public fields of the extending class are visible by using it

broken kayak
#

I do have an instance of InventoryItem, I did not require the WorldItem's one specifically

#

But thanks for the tip, now that I'm starting to play with get fields, I could have taken a long time figuring that out xd

main pasture
#

Did you check the type of the item? It was my understanding the every InventoryItem is actually some extended version of it, like ComboItem, InventoryContainer etc.

#

But if you did actually get an item with the "base" class, I would be interested in knowing how

#

I was trying to figure out the same thing for a while, and failed. That's why I requested the getWorldZRotation for B42

broken kayak
#

Well no I don't have a base InventoryItem instance

open drum
#

hi guys, im having problem, trying to port a mod into build 42

broken kayak
#

And now I see the problem

open drum
#

it keeps saying an item doesn't exist

#

but i absolutly have that item script

broken kayak
#

You need a 42 folder and a common folder in your mod

open drum
open drum
broken kayak
#

Oh an item, I read the mod doesn't exist mb

open drum
#

no prob

broken kayak
#

I'm not an expert on the subject of Item, I'd suggest trying to add it in a different module but appart from that πŸ€·β€β™‚οΈ

silent zealot
#

Make certain there are no exceptions in you console.txt about things failing to load.

#

If you can't see a problem, remove the recipes so the game starts up and make certain the items are available in the game.

#

One typo will make the item parser give up, and then no further items are loaded and then recipes can't find things.

#

Or you could do what I did and put the item script in media/lua instead of media/scripts and wonder why it does not get loaded.

open drum
#

i thin;k i found the problem

#

for some reaons... output items need to be outside a bracket

#

i dont' know why..

#

when inputs they are in table form

#

while output is not?

silent zealot
#

the recipe parser is barely holding on when you give it exactly what it expects. Don't confuse it!

open drum
#

haha

#

gotcha

thin swan
thin swan
silent zealot
#

I like that we're getting some non-vehicle transport options.

thin swan
#

Yeah it's something I've been wanting since I started playing, just a quick/quiet option to get around on small loot runs.
Once I get the attachment system working I'll make it possible to attach stuff like saddlebags and other types of containers to it, but they decrease the top speed if filled

#

Hell maybe even a trailer in the form of those baby carriages

#

Oh shit and gotta make a baby seat that you can put a spiffo doll in

sonic needle
#

ACRO BIKE!

#

Prof Ash: Now Is Exactly the time to ride that!

tranquil kindle
sonic needle
#

i quite like them yes, they suite it very well

storm trench
small topaz
#

Hi! I am currently adding new zombie outfits and make them spawn via editing the tables in ZombiesZoneDefinition.lua (B42). Is it possible that editing those tables can somehow reduce the overall number of zombies spawing? I just did a test run of my mod and have the impression that the pop is somehow ultra low (might also by RNG though). Or did the devs lowered population in a recent vanilla update?

fallen knot
broken kayak
storm trench
small topaz
small osprey
thin swan
# small osprey Isn't/wasn't there a bicycle mod in b41? with MTBs etc. what happened to that on...

There was one by Braven yeah. I tried reaching out a few times to see if they wanted to collab on bringing the bike to b42, but I never heard back.
Our methods are very different, theirs is technically a vehicle, so it's affected by vehicle physics, and it adds some difficult limitations in general to work around.
Mine is an item that you wear basically, so I'm essentially just animating the character and sometimes the position of the item, making it a bit more flexible in some ways. There is apparently a way to animate individual parts of items now, so I'm gonna play around with that and see what I can come up with.
Theirs was way more extensive though in how the bike was structured, every part could be swapped out/damaged, and it had animated parts like the wheel spinning.

bronze yoke
#

you can animate parts of items? πŸ‘€

storm trench
thin swan
# bronze yoke you can animate parts of items? πŸ‘€

Ash was telling me about how things have changed since b42 and they now accept different kinds of armature, including non-character ones, as part of making animals work. Unless I misunderstood (I still have to look into it deeper) there's for example some doors now (like in the video) that have the animation exported with the model, and it animates one mesh separately from the other one.

bronze yoke
#

that's true, i'm not sure you could leverage it for items though

#

mostly i just don't know how you'd even trigger an animation for an item

#

i'm actually the person who worked out how animal models even work πŸ˜…

thin swan
#

Oh nice haha, makes sense! πŸ˜„
And yeah that's where I'm at now, trying to see how these animations are triggered

thin swan
storm trench
craggy nacelle
thin swan
craggy nacelle
#

Ok, thats a pity tough. Hoped you'd find a good solution. πŸ™‚

storm trench
#

Unless you mean something other that what I think that means.

thin swan
thin swan
craggy nacelle
#

That would be nice πŸ™‚

small osprey
craggy nacelle
#

Did anyone find out how to change a characters movement speed? Its single player only, so i dont mind if its a dirty hack or anything, its just for me messing around.

jagged ledge
#

Do anyone use Militek mod? How do i set the hotkey of my helmet that turn on the night version? Cause everytime i click A it will turn on

craggy nacelle
thin swan
small osprey
#

Man, I like vscode with EmmyLua-style annotations

ancient grail
ancient grail
craggy nacelle
#

Just wanted to speed up the character freely, not realy caring about the animation honestly. The whole thiing was mostly me messing around since i cobbled yesterday someting together while being drunk that could be fun for a bit, at least for me to make i mean . XD

thin swan
# ancient grail if youre having problems with turning i think ican help you with that(if youre u...

Cheers! The part I'm trying to figure out is how to animate parts of my bike independently from the other parts.
Right now all my animations just affect the player, so the bike is just attaching to the Bip01_Prop2 bone which I then animate using Paddlefruit's rig.
In order to animate for example the wheel of the bike to spin while I'm "on it" (wearing it) I'd have to find a way to trigger an animation that is exported with the model, without having it be a character or door.

Since it seems that B42 accepts different non-human armature, maybe there's a way to do it. Just no clue how lol

#

Been thinking about decompiling the java to take a closer look and see if I can figure out how it all works, but I also don't know if I have the time or energy lol

bronze yoke
#

i didn't search too deeply, but i took a look after we talked about it earlier and it didn't seem possible

thin swan
#

Dang, yeah it seems too good to be true. Maybe at a later time if TIS release more info/tools

bronze yoke
#

i did briefly consider 'what if the item was actually an animal you're grappling' but i decided such thoughts must end there immediately

thin swan
#

I think I can kind of cheat it a little bit and animate at least one part per item by using Prop1 as well. So I'd make the wheel a different wearable item completely that gets spawned and equipped with the bike, attach it to Prop1 and then in my pedal animation I just rotate that bone.
But it's bloaty, and feels very limited in what I can do still

small osprey
thin swan
thin swan
#

Oh haha, it's the dancing door debug thing, makes sense

small topaz
#

Is it save to overwrite a clothing xml file by a new one with the same name? Or can this cause trouble (for example because of the guid numbers)?

scarlet idol
#

Hello. Does the item tweaker functions still work? I'm trying something simple and its just not working

rose dew
#

whats the difference between mod development and mod support chats

queen oasis
queen oasis
rose dew
#

what chat would getting ideas from be better

scarlet idol
bronze yoke
#

item tweaker wasn't even ported to 42

queen oasis
scarlet idol
#

Sorry! I'm on 41. Not 42

queen oasis
#

I thought someone had tried. I might have dreamt it

bronze yoke
#

we've been encouraging people to stop using it for years and b41 cleaning the slate on mods was the opportunity to finally can it

scarlet idol
#

I tried using a script and it worked then but the icons were all question marks

bronze yoke
#

i don't know why it's not working for you but we always tell people not to use it and just do something like this instead:```lua
local function tweakItem(item, parameter, value)
local script = ScriptManager.instance:getItem(item)
if not script then return end
script:DoParam(parmeter .. " = " .. value)
end

tweakItem("Base.Apple", "HungerChange", "-20")

#

this is basically what item tweaker does (it's literally just saving you a couple lines of code, it doesn't do anything crazy) but without all the performance issues and risk of mod conflicts

scarlet idol
#

Does this look ok? lol Or should I do it like you got it

#

Sorry yall. I'm coming from Dayz and this is all a little strange

bronze yoke
#

literally every single function and class here does not exist, where did you get these from?

scarlet idol
#

Haha don't ask

bronze yoke
#

ai?

scarlet idol
#

Yes...

#

I've used it a bunch for Dayz stuff and it did the script just fine but now its broken itself lmao

queen oasis
#

ai + pz = bad time

small osprey
#

You have to spend days force-feeding the AI and give a very strict project-briefing that includes links to offical B42 API docs etc. I am not sure that what I did to brief AI was entirely legal so I'm not gonna comment haha.

what people say here. Check the lua code yourself, search for the functions. Build yourself a dump function and Use getmetatable(obj) to explore the objects live.

I am just scratching the surface as I am fresh myself. Didn't feel like decompiling the java code yet, we'll see ..

queen oasis
#

you'll want to do it like albion shows but you'll need the clothing item names, like "Trousers_Fireman" and what exactly you want to modify, ie ScratchDefense or BiteDefense

scarlet idol
#

I know I know. It did make it work but the icons were just question marks. I made the mistake of telling to try another method

#

Alrighty. I'll give that a shot

queen oasis
#

someone will correct me if I'm wrong, I don't mess with that stuff much

distant inlet
#

AI is a great servant but a terrible master

storm trench
scarlet idol
small osprey
scarlet idol
#
{
    item Jacket_Fireman
    {
        DisplayCategory = Clothing,
        ClothingItem = Jacket_Fireman,
        BodyLocation = Jacket,
        BloodLocation = Jacket,
        Icon = Jacket_Fireman,
        RunSpeedModifier = 0.95,
        Type = Clothing,
        BodyLocation = Jacket,
        /* Here’s the part you want to lower: */
        ScratchDefense = 10,
        BiteDefense = 5,
        Insulation = 0.5,
        WindResistance = 0.5,
    }

    item Trousers_Fireman
    {
        DisplayCategory = Clothing,
        ClothingItem = Trousers_Fireman,
        BodyLocation = Pants,
        Icon = Trousers_Fireman,
        Type = Clothing,
        BodyLocation = Pants,
        /* Again, lower these: */
        ScratchDefense = 10,
        BiteDefense = 5,
        Insulation = 0.5,
        WindResistance = 0.5,
    }
}
#

Should I not do it like this either?

storm trench
#

Very bad idea.

small osprey
#

simple and generic lua stuff though: really nice.

And, I was impressed, It taught me about resolving thunked fields as a pattern for async object building. I am not from game-dev domain so that was interesting and useful.

scarlet idol
#

Haha ok ok.

storm trench
#

Causes issues with anything else that touches that file.

queen oasis
#

I just asked ai how to change the "armor" of the firefighter clothes and it was good advice until it told me to change the base game files...

storm trench
# scarlet idol Haha ok ok.

It's fine if you're not going to publish the mod tho. Before I published my first PZ mod I had been editing my mods in various ways and I've done it like that before.

But you've gotta jot down what you edited and double check nothing is messing with it (every time you add a mod).

storm trench
distant inlet
#

ai is good if the human driver understands its suggestions

icy night
#

Is this a good way to track the time (3 hours): ``` if player:HasTrait("Deaf") then
local startTime = modData.startTime or 0
local currentTime = getGameTime():getWorldAgeHours()

        if currentTime - startTime >= 3 then
            traits:remove("Deaf")```
storm trench
icy night
#

Basically trying to make Deaf only last 3 hours

scarlet idol
distant inlet
storm trench
scarlet idol
icy night
queen oasis
# scarlet idol Should I not do it like this either?

Something like this.

local function tweakItem(item, parameter, value)
    local script = ScriptManager.instance:getItem(item)
    if not script then return end
    script:DoParam(parmeter .. " = " .. value)
end

tweakItem("Trousers_Fireman", "BiteDefense", 15) -- or whatever value you want
tweakItem("Trousers_Fireman", "ScratchDefense", 25)
-- do the above for the other items you want

You need to have a search through the games clothing scripts to find the name of the items you want to modify

queen oasis
scarlet idol
#

Thanks guys!

icy night
queen oasis
#

maybe use the EveryHours event?

bronze yoke
#

why would mod data be an issue?

#

that's what mod data is for

ancient grail
storm trench
#

You gotta tell me where you get that emote now tho @ancient grail hahaa

thin swan
distant inlet
#

does anyone have tips for doing server-side dev for MP? ideally I don't want to bounce a [local] pz server every I need to test a change

bronze yoke
#

unless your mod really depends on multiplayer on a basic level you can do most of your testing in singleplayer and just check everything works in multiplayer when you've got things working

#

code designed for multiplayer will usually work in singleplayer

distant inlet
#

what about code that relies on the client or server using send[Client/Server]Command (plus the corresponding "listener" funcs)? I'm thinking that, for single player, creating a custom event for the use cases that require sendClientCommand and similar will keep the execution flows similar so that it's not a pita to understand/maintain. Does that make sense?

scarlet idol
#

Does this look right?

bronze yoke
#

in vanilla server commands are just used to sync things back to the client so it doesn't actually matter that they don't work, the server code already did everything, but with mods you might do stuff on the client exclusively

icy night
#

Name suggestions for my mod that adds hearing damage from shooting?

queen oasis
distant inlet
distant inlet
# icy night Name suggestions for my mod that adds hearing damage from shooting?

I fed GPT:

Captures the severe aftermath and lasting impact of loud gunfire.

Sonic Aftermath
Implies that the sound from shooting leaves a lasting, damaging effect.

Blast Trauma
Conveys the idea of physical trauma from the powerful shock of a gunshot.

Echoes of Impact
Suggests that the sound echoes beyond the moment of the shot, causing gradual harm.

Ringing Recoil
Combines the concept of a physical recoil with the persistent ringing that follows.

Acoustic Fallout
Implies that just as radiation fallout lingers, the destructive sound effects linger in the ears.

Decibel Damage
Directly references high decibel levels and the damaging effect they have on hearing.

Sonic Wounds
Conjures a vivid image of wounds inflicted by sound, paralleling physical injuries.

Gunfire Reverberation
Emphasizes the idea that the reverberations from each shot lead to hearing damage.

Auditory Aftershock
Reflects the concept of aftershocksβ€”in this case, the lasting stress on your ears.```
icy night
#

Acoustic Fallout lmao

thin swan
#

Bang Bang Ouchie

queen oasis
#

We went to an A7X concert about 7 years ago and stood in front of the speakers. I still feel the Acoustic Fallout from it.

thin swan
distant inlet
#

Ear Today, Gone Tomorrow

scarlet idol
#

Ah nvm. I fixed your typo and made my own πŸ˜„

bronze yoke
queen oasis
thin swan
brave bone
thin swan
queen oasis
#

I mean, I spent 5 minutes trying to figure out why this was bugging out when I tried to assign a value to newGameSpeed

#

and no, it wasn't AI. it was my dumb arse

brave bone
thin swan
#

or well, I guess the character doesn't have fingers haha

#

I could make this instead

#

jesus christ that guy is staring way too intensely

sonic needle
#

give it a small radius sound event so they seem offended by teh flip off xD

thin swan
#

hahaha yes good idea

sonic needle
#

they do that 'HUH' turn around aha

icy night
#

If I wanna play a sound effect after a player gets a trait, would this work: traits:add("HardOfHearing") getSoundManager():PlaySound("tinnitusfx", false, 1.0); end

icy night
#

So all I need to do is add the audio to the sound folder?

thin swan
#

I had the sound also set up in my item script when I tried it, but I don't think it's actually needed, so yes I think you can just drop your sound in media/sound and it will work

icy night
#

Ok, yeah cuz I've seen it done both with and without scripts to define the audio

#

ty

silent zealot
silent zealot
#

So you can use WorldSoundManager.instance.addSound() as an "attract zombies here" method. (though obviosuly reliant on their hearing)

open drum
#

hey guys?

#

is there a vanilla single play option

#

for a character to respawn on dead location?

#

i know in multiplayer they have it

#

but not sure if there's a way to do the same thing in single play

silent zealot
#

Do you want a new character where you died, or to respwan as the dead character (but alive)

open drum
#

new char on the location where i died

silent zealot
#

I don't know of a mod, but it would be possible to make one.

open drum
#

i saw there's a mod that lets u respawn the dead chracter(alive)

silent zealot
#

There's a spawn mod that lets you put any co-ordinates into mod options and spawn there, a variation of that would track where you last died.

#

Then you fight your old body to reclaim loot I guess.

open drum
#

i guess i can use Events.ondeath.add(playerlocation)

#

to run that

brave bone
silent zealot
open drum
#

i guess i can take a look and come up with something

#

it might give me hint of how respawn/spawn functions work

#

thanks

silent zealot
#

actually I think that is the mod I was thinking of, but they updated to use sandbox settings instead of mod options.

open drum
#

i see

#

i wonder why vanilla decided to take the option away in single play

#

they could just simply give checkbox sandbox option

#

to make it on and off

silent zealot
#

I didn't realise it was an option in MP

queen oasis
#

lua question! I store this function in a table for use in a different function:

JB_SpeedKeeper.defaultStopConditions = {
    function() return not ISTimedActionQueue.isPlayerDoingAction(playerObj) or
    playerObj:getStats():getNumVisibleZombies() > 0 or
    playerObj:getStats():getNumChasingZombies() > 0 or
    playerObj:getStats():getNumVeryCloseZombies() > 0 or
    playerObj:pressedMovement(false) or
    playerObj:pressedCancelAction() or
    playerObj:isRunning() or
    playerObj:isSprinting() end
}```

in the other function, I call:
```lua
if JB_SpeedKeeper.defaultStopConditions then
    for i = 1, #JB_SpeedKeeper.defaultStopConditions do
        if JB_SpeedKeeper.defaultStopConditions[i] then
            resetGameSpeed()
            return
        end
    end
end```
will the check above keep the reference to the playerObj defined in the defaultStopConditions table?
#

and I spelled conditions wrong and what else is new fixed it because it bothers me

silent zealot
#

My Mod:

#

Mod's FAQ:

#

Pretty sure there are still files and code in there using "alligned"

queen oasis
#

in typos we turst

silent zealot
#

I like it when the IDE notices these things for me.

#

And if it doesn't, the compiler does.

queen oasis
bronze yoke
#

jetbrains ides constantly nitpick my usage of capitalisation or commas in comments and it drives me mad

#

or my sentence structure 😭

silent zealot
#

And there there's lua. "Optoins? he probably mean Options but maybe some other mod will add an Optoins so that's cool."

queen oasis
#

this seems to work. I didn't think about it being a closure.

-- a temp setup for stop conditions
JB_SpeedKeeper.defaultStopConditions = {
    function(playerObj) return not ISTimedActionQueue.isPlayerDoingAction(playerObj) or
    playerObj:getStats():getNumVisibleZombies() > 0 or
    playerObj:getStats():getNumChasingZombies() > 0 or
    playerObj:getStats():getNumVeryCloseZombies() > 0 or
    playerObj:pressedMovement(false) end
}

-- this is in a closure inside another function that has access to playerObj
if JB_SpeedKeeper.defaultStopConditions then
  for i = 1, #JB_SpeedKeeper.defaultStopConditions do
      if JB_SpeedKeeper.defaultStopConditions[i](playerObj) then
          resetGameSpeed()
          return
      end
  end
end```
craggy nacelle
#

uhm, quick question, when i use player:say("test"), do i have to sync it through the server or is it to be seen by all close players too

queen oasis
#

I don't know why I can't remember that

craggy nacelle
#

yeah, its one of these things you cant really test on a server if you cant run two instances πŸ˜•

#

trying to find the answer in the search, maybe someone has a clear 'yes' or 'no' thing going on in their talks back then ^^

queen oasis
#

my gut says yes but my mind is a void

craggy nacelle
#

yeah, i thikn so too, but with pz you can never be sure XD

#

someone mentioned :sayShout() would do the trick?

queen oasis
#

if it's only running on the client, I would think only the client would see it. if it's on the server, everyone should see it.
I know there's sayChat or something. This is killing me. I might have to reinstall 41 to find out

#

...after I figure out if I can concatenate a string to make a function

craggy nacelle
#

i think there was a tool among the util: something to do that?

#

also if i do it server side, i have to activate it client side too

queen oasis
#

I'm looking at load and load string
tho that might be too slow to evaluate in an ontick function

craggy nacelle
#

yeah, might as well just use find XD

queen oasis
#

my issue is I want to define conditions when the game loads and then evaluate them later in OnTick. the only way to do it without getting too funky is to make every condition it's own function

craggy nacelle
#

evaluate? not sure i follow? i mean you could put the functions in a table and then use starting parameter to just link to the right entry?

#

or just fill the table on game start with the right one? should work, no?

topaz tangle
#

Btw yall, end of day Powell progress report
I’ve got everything except the loot distribution done
For whatever reason, it simply just does not want loot to spawn in the trunk of both the Powell and the enclosed trailer
I know it’s something I’ve done wrong but it’s such an annoying thing to work with

I do still have to do re-textures but every time I look at the texture files my brain feels like it’s going to explode so I’m gonna work on the next vehicle before doing that

queen oasis
#

since they seem to have broken the reset speed after timed action

#

k.i.s.s. I tell myself

#

Trying to complicate it is how I end up spending 2 hours on a simple thing

craggy nacelle
#

Nothing more fun then bashing your head against a wall and seeing the wall crumble. πŸ˜‰

queen oasis
#

yea, I am hardheaded

#

hmm

#

better

silent zealot
queen oasis
silent zealot
#

hahahhaaha

#

I'm considering just deleting any comment that says "does not work" with zero details.

queen oasis
#

my most popular mod only has like 8500 subs and I can't imagine if there were 10's of thousands

silent zealot
#

But I should probably add to the description FAQ for every mod:

I posted "this mod does not work" in the comments wthout providing any details about how it was failing and my comment was deleted, why?

silent zealot
#

I don't blame modders like KI5 disabling comments at all lol

queen oasis
#

my problem is, I like to engage and it's like a flood gate of "can you do this"

silent zealot
#

Same.

silent zealot
#

Oh you added a new car? Can you also add boss zombies?

queen oasis
#

like, you know that's a good idea, but I have like 4 other mods I want to work on

#

like like, like. you can tell I'm drinking

#

Friday Eve

silent zealot
#

hahaha

#

Friday Lunch for me

#

Just got held up for an hour because I am apparently the only person able to use Visio

#

And we use Visio to make shit that would be much better made in Powerpoint

queen oasis
#

I would bet you are the only one who can use Visio

silent zealot
#

or one of the countless free "draw a basic diagram with boxes and lines" tools.

queen oasis
#

I got some crayons and printer paper

silent zealot
#

I know how to make new anchor points on shapes, apparently that makes me the expert

storm trench
silent zealot
#

I also know Visio is not the tool to use when you care more about presentation than what connects to what.

#

hahaha

#

I'm going to get lunch

queen oasis
#

drink lunch

silent zealot
#

I feel like I might drink during the 3pm Friday meeting.

#

advantages of work-from-home

#

Tip: any brown mixed drink looks like coffee on a webcam if you put it in a mug.

#

And you can do shots if you use a little expresso mug.

#

Float some bailys on top and it becomes a latte.

queen oasis
#

I work for myself at home and you have to be pretty persistent to even get me on a phone call

#

and the whisky stays on the desk

silent zealot
#

I'm not even a big drinker, just that some days one or two standard drinks worth of alcohol is needed.

queen oasis
#

I like a little buzz. I'm old enough that a hangover can take me down for days

silent zealot
#

I don't think I've been drunk for over a decade

#

In my teenage years I discovered tipsy was more fun than drunk

queen oasis
#

only a buzz and maintain for me please

#

and little something else to help me sleep

silent zealot
#

And once you realise you don't have to care what other people think if you're not drinking much, easier to maintain a buzz only

#

Also how do people even afford to drink these days?

#

I'm not rich enough to get drunk at a pub!

#

I get my alcohol from Aldi when they have good or interesting things available.

#

Segue to back on topic: once the fluid system is stable I want to rework the way things get named so different alcohol mixes get named.

queen oasis
#

too many people at the bar anyway

#

when they get the grapple figured out, I want everything to grapple every thing

silent zealot
#

Vodka + orange == Screwdriver, milk+coffee liquor + vodka = white Russian, etc.

queen oasis
#

zombie grapple a car? yes. racoon grapple a zombie? yes please

silent zealot
#

hahha

#

Equip a car using Alex's kick scooter logic

#

Then emote so you wave it in the air

queen oasis
#

I have a vision of zombies being on the hood of a car, or holding on to the bumper getting dragged

#

ha

#

I thought about "car in your pocket" but never looked in to it

silent zealot
#

page up/down to change Z-levels.

silent zealot
#

Actually storing a vehicle object without some java modding is not possible as far as I can tell.

#

Tsarlib trailers moves every single VehiclePart to a hidden VehiclePart location on the the trailer, then records enough information to remake the same vehicle type/color and replace the parts with the stored ones. Very clever hack.

#

Oooooh... with Alex's stuff we can now put a bicycle on the back of an RV!

#

since the bike is an object!

topaz tangle
#

If there was a true way to make a working vehicle hauler it would make me soooo happy

queen oasis
silent zealot
silent zealot
#

I think it would be easy to implement provided all they do is make the data structure available and leave all the UI/vehicle design up to modders.

#

Shame we can't submit pull request for the java code. (but that would need the whole game source to be posted and a dev would have to spend a lot of time going through the requests, choosing what was reasonable and then assessing the proposed code change for quality... not a realistic thing)

slow marten
#

is there a way to add a custom event in lua? i want to do something for when a zombie enters and leaves the player's view and i don't think theres an api for that

silent zealot
#

Adding a custom event - yes.

#

BUT the hard part is where are you putting the code to say "this event has triggered"

#

Zombie enter/leave the view based in the lighting engine - you can see that in the mod that does 360Β° vision & see zombies through walls by editing LightingJNI

#

Technically you could put a "Do I have line of sight to the player and has that changed?" check on OnZombieUpdate, but bye bye performance.

slow marten