#mod_development

1 messages ยท Page 221 of 1

digital osprey
#

could someone point me in the correct direction? i want to add full MP support to my mods but there is little in terms of resources. My auto oven one seems to work fine with the exception that turning on and off the oven doesnt sync (shows on for one player, off for another) what would be the steps i need to take?

#

do i just getCurrentPlayer instead of getPlayer and run the same function for all in game, or is there more to it

fast galleon
#

@digital osprey
This guide will teach you a way to solve almost any MP issue.

gilded hawk
#

Poltergeist do you have any suggestion regarding this?

fast galleon
drowsy delta
#

how do i modifiy degration speeds on clothing n stuff in a script?

drifting ore
#

does someone have like a hand icon

chrome egret
#

Any easily-recognized problem (hopefully with an equally easy solution) that would cause my new generator PNG to be added to Tilezed with two GIDs?

#

And what would be a feasible way to check for the ### value used by tilesets, as referenced in the TIS thread "Customer texture packs and tile definitions"?

#

Obviously it's beyond a human to look at every Steam Workshop mod for PZ and make sure they're not conflicting

hot void
#

is there a way to make a piece of clothing a weapon

drowsy delta
#

just a thought not completely sure tho

digital osprey
# hot void is there a way to make a piece of clothing a weapon

https://www.youtube.com/watch?v=N6tZujOPnDw this teaches how to make a consumable but the process is similar

This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.

0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...

โ–ถ Play video
mellow frigate
thick karma
#

Halp. Should I use AI art, just show the code, or wait for a classic Spiffo bg from Chuck?

desert kelp
#

Hi Team, Just hoping to check. Is OnPlayerUpdate just as taxing to the server as EveryTenMinutes?

opal badger
#

is there a wiki for all the PZ lua functions?

mellow frigate
mellow frigate
robust locust
#

Is there a difference between StaticModel and WorldStaticModel?

inner wedge
#

Thank you so much, this is exactly what I was looking to do. Where in the file structure would I put this chunk of code?

nova socket
#

That was annoying me for a while from both sides

mystic vessel
#

So, does anyone know a possible answer?

I made a test tile, put the pack file in the folder

"texturepacks"

I opened the mod config and put

"pack="

And in the tile editor it appears, but inside the game for me to put it down, it doesn't

#

What am I doing wrong?

#

And typing the name "test" doesn't appear either

nova socket
mystic vessel
#

Sorry did not understand

#

Do I have to create tile definitions and place them both in the folder and in the file?

#

and what would be the "pak"?

nova socket
#

So I guess this is your first time creating tiles?

mystic vessel
#

Yep

nova socket
#
  1. mod.info has to describe both your .pak and .tiles files like that
pack=tradertiles
tiledef=tradertiles 1337
  1. Your .pack file is where your textures are and should be located in media/texturepacks folder of your mod
  2. Your .tiles is the file that describes the purpose of those textures in-game and should be located in a media folder of your mod.
#

@mystic vessel ^ most compat explanation

mystic vessel
#

and after that i restart my game and should be available right?

#

well didn't work

mystic vessel
thick karma
#

Feel free to repurpose our code if you want to do your own main volume / options page, albion.

mystic vessel
opal badger
mellow frigate
opal badger
#

very very white

#

my eyes hurt looking at the wiki lol

#

Im looking through and cant seem to find any functions for shooting, any idea where those are?

nova socket
#

Not sure how to achieve firearm shot event but I guess you can combine mouse down with it or sum

mystic vessel
nova socket
#

Check manuals about how TileZed works

mystic vessel
mystic vessel
nova socket
#

This page helped me to get through everything I needed

bronze yoke
nova socket
#

Thats cheatsheet for properties, PSD for tiles and blender template for creating sprites from 3D models

mystic vessel
#

And another question, can I only reload the textures by closing and opening the game?

nova socket
#

yes unfortunately

mystic vessel
#

This is sad ;/

nova socket
#

Well actually makes sense, blobs always get flock'ed in most engines

mystic vessel
nova socket
#

new save is not required, you need to enable mod and reload the game to make game load fresh copy of assets from blobs

mystic vessel
nova socket
#

Remove unneccessary mods for debugging

#

There is no need to run game with 100+ mods like you do for gameplay while you code the mod, you need to only do it after to see any possible conflicts

mystic vessel
nova socket
thick karma
# bronze yoke very cool! i love seeing tools like this

Thanks! I thought about decorating require itself, but decided against it because I didn't want to accidentally grab samename mod files instead of local vanilla modules in the event of overlap. Still might offer that in an update as an optional import mode. But yeah, hopefully it leads to useful things.

nova socket
#

Game can run potato mode and switch to 1x textures instead of 2x

bronze yoke
#

DOME is a sick as hell name btw

#

i wouldn't mess with require, i've played around with stuff like that a bit but modifying global state is a bad idea in a heavily modded game like this

#

normally i'd be worried about adding any overhead at all to global functions but require isn't really performance sensitive

#

you can sort of locally inject overwritten 'globals' using the fenv stuff but it's kind of overcomplicated and i hear runs badly

thick karma
bronze yoke
#

i wrote an overwrite for pairs() that would allow it to iterate over arraylists but found it not worthwhile to add any overhead to the global function, and if people have to manually import it with an injector function they might as well just call apairs or something instead

thick karma
#

Completely fair. I could also simplify use with a global function but wasn't sure what people would prefer, so I decided to keep stuff local.

#

wrequire har har

bronze yoke
#

please keep everything in a module whenever possible ๐Ÿ™

thick karma
#

Yeah all my latest mods are doing that now. No globals in TMJ

#

Well glad my decisions were at least acceptable lol

#

Probably leave it as is indefinitely

bronze yoke
#

it seems good how it is to me

outer crypt
#

When you pick up a sprite item like furniture it results in this log entry "pickup test" does anyone know where this is coming from? Be looking through the actions etc but do not see any furniture pickup actions... I found the place commands in lua server world objects

mellow frigate
bronze yoke
#

what do you mean?

mellow frigate
#

if everything is local to a module, you cannot override it from "another mod" without overriding the whole module.

bronze yoke
#

you can override parts of modules just like anything else

#
local MyModule = require("PathToTheModule")

local old_foo = MyModule.foo
MyModule.foo = function()
    print("foo overwritten!") -- will be printed whenever the function is called, whether it's by this mod, another mod, or the original mod
    old_foo()
end
frozen frigate
mellow frigate
bronze yoke
frozen frigate
#

oh right, sorry that's what I meant

#

so like calling Picker from Lua and overriding it to another Picker

bronze yoke
frozen frigate
#

I somehow managed to make a more accurate picker (in this case, for mouse over tooltips) in Lua than the basegame apparently, even though it took me over a week to figure out the math and stuff lol

bronze yoke
#
--PathToTheModule.lua
local MyModule = {}

-- part of the module, can be accessed by other files by requiring this one
MyModule.foo = function() end

-- not part of the module, can't be accessed by other files whatsoever
local function foo() end

return MyModule
mellow frigate
#

thanx

true crown
#

Is there any way to guarantee certain clothes on a zombie outfit? I just got started learning how to add custom outfits for zombies and it is half-is working. The shirt is popping up as expected but it puts random pants on the zombie instead of the custom one. I already checked my code multiple times and everything seems to be correct :/

#

For the record: Shoes are also fully ignored and replaced by generic shoes for some reason

near hull
#

Is this to add new moodles (because I understand so) or to modify the form of the current ones (UI)? My idea is to modify the interface in the style of Plain Moodles/Moodles Quarters and Flat UI Revamp. This is the first time I'm trying to do this, answers to those questions would help me a lot. Thank you

mellow frigate
near hull
bright fog
true crown
bright fog
#
<?xml version="1.0" encoding="utf-8"?>
<outfitManager>
    <m_FemaleOutfits>
        <m_Name>Bloater</m_Name>
        <m_Guid>06c758ce-eb0e-4905-9ede-5c84e5c45332</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>6b9a55dd-a875-46d9-8205-b3454358b9d5</itemGUID>
        </m_items>
    </m_FemaleOutfits>
    <m_MaleOutfits>
        <m_Name>Bloater</m_Name>
        <m_Guid>06c758ce-eb0e-4905-9ede-5c84e5c45332</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>6b9a55dd-a875-46d9-8205-b3454358b9d5</itemGUID>
        </m_items>
    </m_MaleOutfits>
</outfitManager>
true crown
#

That is probably it

bright fog
#

Example of clothing I have

true crown
#

Ok that is a lot of info I had no idea about, thanks

#

I'll see if I can get it to work this way

bright fog
#

Tho in my case it just adds a single clothing which is a complete custom model of a zombie

#

idk if it will apply to what you want, go try it

barren goblet
#

I'm trying to make a standalone region, but I wonder if there is a way to remove the default map items from the loot tables somehow?
(Solved btw. - turned out I was very close to the actual solution but did just some small mistake all along)

drowsy delta
#

how do I get a BloodBodyPartType so I can setBlood of a clothing Item? like is there a way to just type it out instead of having to use :getBloodBodyTypes() or whatever that function is called?

barren goblet
#

All the stuff I find is about adding additional items to the loot tables - but in my case I'd rather want to remove entries or replace them.

true crown
#

Wait I might have figured it out

#

Nvm cry_hopper

slow graniteBOT
#
Sleepy_Butterfly#1493 has been warned

Reason: Bad word usage

nimble yarrow
# drowsy delta how do I get a BloodBodyPartType so I can setBlood of a clothing Item? like is t...

You could use getCoveredParts() to get an arrayList that works for BloodBodyPartTypes.
If you use getCoveredParts() on a pair of pants, you'll get Groin, UpperLeg_L, UpperLeg_R, LowerLeg_L, LowerLeg_R, then you can iterate through that arrayList (or specify the index) for the addBlood command

local coveredParts = thisClothingItem:getCoveredParts()
IsoGameCharacter:addBlood(coveredParts:get(i), false, false, false)

stone garden
#

does anyone know where to start learning modding

true crown
#

I solved it!

#

Just gonna write it down here in case someone else ends up having the same problem and is a bloody amateur like me:

When creating outfits for zombies, make sure that every piece of clothing, etc. is referenced in your own mods' fileGuidTable.xml, regardless of whether or not the items are from your own mod, vanilla, or from another mod. All have to be referenced in there in order to end up on the outfit

austere sequoia
austere sequoia
#

Dude, I gave you two superb starting points for learning how to mod PZ, I am not sure how else I could have answered your question. I even went out of my way to get you a link. That is literally the best advice I could give you. I dont know how this could possibly result in such a rant about the community supposedly being bad

bronze yoke
#

what kind of label? you should be able to just change its text whenever that action completes, though finding the label might be difficult

austere sequoia
#

How can I make Icons change their color depending on the color of the item? Like T-Shirts and other clothing does? I cant find any hint on this in the gamefiles

#

Dude, I already told you where you can find out how to mod the game. There is nothing more anyone here could do for you, unless you ask modding specific questions

robust locust
#

errr.... does anyone know why this screen popped up on pz?

#

it appeared when I disassembled my item

#

is it a "major error" screen?

cosmic ermine
#

It's a script debugger, it shows up sometimes when there's an error with a code, most often with mods. You can close that by clicking on the play button above or F11.

robust locust
#

oh thanks... i didnt realise it could be closed ๐Ÿ˜„

cosmic ermine
#

Sometimes you'll have to click the 'Break On Error' box if the error is persistent.

robust locust
#

wondered what that was...

wise warren
#

WHO'S BEING BULLIED HMMMMMMMM

stable plover
wise warren
#

You're all under arrest

stable plover
#

lets bully uppy now

wise warren
#

Including you Goose

#

You sunbish

stable plover
wise warren
#

Oooooooo

plain crest
winter bolt
austere sequoia
fast galleon
open drum
#

hey boys

#

what will be a best approach in trying to check if a certain UI is open

#

so i can prevent for it opening repeatedly?

#

I tried setting a name to an UI by using setUIName("string")

#

and it didn't help.

#

has anyone done this before please give me advice

zinc pilot
zinc pilot
#

and then you can perform the check to see if it's open\exists from there

open drum
#

is there a way to check if the table exist ?

zinc pilot
open drum
#

like at line 85

#

i create an empty table

#

and save new() into it so it's all packed into a table

#

as an "instance" mimick

#

by returning the "o" table

zinc pilot
#

Ok, I think I understand what you mean. You're not really "saving" it to the o table, since it's local. Your only reference to that is gonna be the returned value in your case

#

you'd need something like the instance I told you about to have a reference

open drum
#

i understand

#

thanks ill try that

sour island
#

Looking for a group of testers to help testing some of my mods. ๐Ÿ‘ผ

robust locust
#

Hey peeps, what ya think of my guitar on wall mod im working on? only a couple of days in, so it looks rough. long way to go still

bright fog
#

It might not be perfect but that's already pretty good

open drum
cosmic ermine
muted garnet
#

Is there a way to set 2 types in item`s script, like drainable and weapon?

bright fog
#

But you can make a lua function that swaps the item between 2

fast galleon
#

I know chuck has a mod that converts most items to weapon type for this purpose.

#

I made a mod that converted buckets to different types for different uses.

#

It would be a nice feature for the future, like tags were a nice addition.

muted garnet
#

hmm, thanks at tips

plain crest
#

Does anyone have any tips for formatting the steam workshop page?

true crown
#

Quick question: So I figured out how to get zombie outfits working properly, but I'm wondering around the probability that I can set for clothes. Does 1.0 equal 100% or 1%?

plain crest
#

If anyone has feedback for my description I'd appreciate it

austere sequoia
austere sequoia
# plain crest https://steamcommunity.com/sharedfiles/filedetails/?id=3172171349&searchtext= ...

Jesus, this Icon Art is beyond beautiful, have you done this yourself? Otherwise I feel like you are going a bit on the overkill side of things with your text - you add three hairstyles with textures (that I like, great work here!) and for that rather small amount of content you have written a book on steam, including chapters containing political education ๐Ÿ˜„ maybe a bit over the top for a PZ mod, imo. But its yours, so do whatever you feel like with it ๐Ÿ™‚

small topaz
plain crest
plain crest
austere sequoia
plain crest
#

Depending on the hat, you just need to keep testing it (you can have the game open while you update the model/export it straight from blender into your mod folder) and warping/moving the hair around until you get it to fit the hat. You may even need to "cut" part of the model off or flatten it reeeeaaaally close to the body

austere sequoia
#

How do you do this with your afros? I mean, if you make them match, lets say, a cowboy hat, there is not much afro left

plain crest
#

for those, some styles will have to be bald. like, a hood, it's just gonna be bald most likely, or just a small model of the bangs showing.

#

did you peek at spongie's hair guide? they do a much better job of explaining it than i do

austere sequoia
#

have not heard of this one yet. you mean the mod on steam?

plain crest
#

Nope, a guide! Helped me most of the way through my experience.

austere sequoia
#

Thank you, I will have a look ๐Ÿ˜„ Maybe I can do some fixing without breaking everything, lol

plain crest
#

Im sure you can! Youve got this ๐Ÿ™๐Ÿฝ

urban ravine
#

could anyone tell me how to upload my clothing mod? i cant seem to figure it out.

plain crest
#

is it in the Workshop folder? From there, you click on "mods", then "create or update"...and go from there!

austere sequoia
urban ravine
plain crest
austere sequoia
plain crest
urban ravine
#

here, let me get a pic of what i mean

austere sequoia
urban ravine
plain crest
plain crest
austere sequoia
plain crest
#

go into the workshop folder and copy the structure shown in the mod template

urban ravine
#

weird?

austere sequoia
urban ravine
#

but ill give it a shot

plain crest
austere sequoia
# urban ravine but ill give it a shot

Look at users/zomboid/workshop/ModTemplate. This is how your mod has to be structured. Add folders in users/zomboid/workshop following the logic: Yourmodname/contents/mods/Yourmodfolder/media/....

plain crest
# urban ravine but ill give it a shot

ye you've got this! you should just need to drop your mod a couple folders deeper--[Mod Name] > [Contents] and a 256x256 preview image > [mods] > [Mod Name] (MAKE SURE ITS THE SAME!), a 500 x 500 image named poster, and a txt file called mod.ini > [media] > ...

#

anything in brackets needs to be a folder

austere sequoia
#

or not?

plain crest
#

you're so right it's lie 2 am here

#

so tired LOL

austere sequoia
urban ravine
#

i got it working, i really appreiciate you guys helping, modding this game is very different than what im used to

plain crest
#

Same! I'm also new to this--glad we can all help each other <3

urban ravine
#

<3

austere sequoia
#

Thats why we are here ^^

urban ravine
#

Now the real test is to see if it actually works

plain crest
#

bahaha legit half the battle is getting the mod up in the first place

urban ravine
#

honestly kinda suprised there arnt more mod templates?

plain crest
#

tbh there's such a variety of mods out there--i highly recommend doing what you did and just looking for a mod that does something similar to what you want, then following their structure, or asking for help

austere sequoia
plain crest
#

BAHAHA JINX

urban ravine
#

well thats a good sign

plain crest
#

Like, I was thinking "what if I want to do custom textures in the future?" took a look at Yaki's, figured out how they do it...now, if I wanted to, I could do that.

#

But I would've had 0 clue without seeing how they did it.

austere sequoia
urban ravine
#

yeah no, i tried making one from scratch from the tutorial the devs reccomend and HOLY, it goes from 0 to 100 real quick

plain crest
#

It really really does. Give yourself time and kindness while you learn! The learning curve is def steep...

#

But you can do it!

urban ravine
#

honestly, it really helps having some experiance modding other games tho

#

lets me weight paint models and the like better

austere sequoia
#

I still dont really feel like touching blender. Way to many buttons I have no clue about

urban ravine
#

true, but its needed for armor sadly

plain crest
#

oh man...yeah, i went into it with 0 knowledge and 0 wllingness to watch videos (which i ended up having to do anyway LOL)

urban ravine
#

i just powered through blender learning most of it myself

plain crest
#

same LOL i just didnt want to do the like

#

"learn how to make a fish!" tutorials LOL

#

like lemme just DIVE IN...

austere sequoia
#

I stick with Gimp. 2D is already enough dimensions for me ๐Ÿ˜„

urban ravine
#

dont get it confused with paint tho

#

btw, is their a way to cheat in materials so i can craft my stuff?

austere sequoia
urban ravine
#

sick, thanks

plain crest
small topaz
plain crest
#

It def is--If you pick up a red t-shirt, the t-shirt is red...I forget how you do it though.

austere sequoia
austere sequoia
small topaz
plain crest
#

I wonder if ElictraV knows--it looks like their mod does what you want

#

Do you mean how the pink shoes have a pink icon?

austere sequoia
austere sequoia
small topaz
urban ravine
#

finally, a starwars mod

austere sequoia
austere sequoia
small topaz
austere sequoia
urban ravine
#

"Leviosaaaa" Scott Pilgram

plain crest
austere sequoia
plain crest
#

(idk why i say i think when like.....i know they are)

austere sequoia
urban ravine
small topaz
urban ravine
#

id imagine its with the "masks" but i have no clue what color the should be

plain crest
urban ravine
#

forgot that mod exitsed, lemmie download it rq

plain crest
#

lmao i love it, it's one of those "you don't realize you have it until you don't" kinda mods

#

spongie is around this server too, you could ask them what they did

plain crest
small topaz
urban ravine
#

i have not, couldnt hurt

small topaz
urban ravine
small topaz
urban ravine
#

nope

small topaz
#

that's strange. in general, the game will render everything which is under your clothing by default if you don't use masks. only the parts which are covered by your actual 3d model should be hidden. so at least the nude character texture should be shown then

plain crest
#

try reloading just in case..?

small topaz
urban ravine
#

i'll restart again then

small topaz
plain crest
#

USUALLY you can just update textures and models straight into the game but i have noticed sometimes she gets...goofy.

#

so give 'er a restart LOL

small topaz
plain crest
#

tbh i'm not sure. sometimes it works for me, sometimes it doesn't. i always just do a full restart just to be sure. sometimes i have an issue, restart, and it goes away, so...

#

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

urban ravine
austere sequoia
urban ravine
#

even your skin?

#

hell of a suit

small topaz
urban ravine
#

what could i change it to and have it still be one peice for the body?

#

i mean, worse comes to worse, i can give teh model an under suit

austere sequoia
#

Try something different. I picked Nose, not many problems with that

plain crest
#

belly button ring/whatever slot that takes would be a good one

#

since you can't see the belly button ring anyway with the full suit on

austere sequoia
urban ravine
#

is the slot just bellybuttonring?

#

or does it have a different name?

plain crest
#

i have no clue unfortunately

#

๐Ÿ˜ญ

plain crest
#

it looks like it's BellyButton

urban ravine
#

time to boot up the game and give her a go

small topaz
#

or a make a new body location... but still wondering whether fullsuit automatically hides the vanilla character skin. that's usually not what bodylocations do.

urban ravine
#

yeah, cause i can let it get holes

plain crest
urban ravine
#

i lowkey wana make those zombie stormtroopers nw

#

wait

#

do i have to update the mod page everytime i change somethign to test?

austere sequoia
plain crest
#

nope! if it's in the workshop folder, that's the verson your computer loads

#

update it when you're ready for everyone else to have that version

austere sequoia
urban ravine
#

D:

plain crest
#

opposite--work in the workshop folder, update when ready

#

mod folder is the copy that is CURRENTLY uploaded to the workshop

austere sequoia
austere sequoia
# plain crest opposite--work in the workshop folder, update when ready

It updates from the workshopfolder for me? ๐Ÿ˜ฎ I will give this a try, I am working in user/zomboid/mods, what works just as fine, and only copy over to workshop when I am done/updating. Gives me two copies of my mod, so a lifeline if my python code messes something up badly xD

plain crest
#

if you work in the workshop folder, nothing updates until you click "update" in the game menu

#

BACK UP YOUR FILES OFC BUT

#

you can work in the workshop folder if you're feeling risky

austere sequoia
plain crest
#

i work in the workshop folder cuz i wanna just be able to update as soon as my stuff's done/fixed rather than having to look for everything

#

but i'm sure it'll bite me in the ass

austere sequoia
plain crest
#

nope

austere sequoia
#

interesting!

plain crest
#

though, if you're subbed to your own mod, it's possible that version might overwrite the local one...hmm...

thick karma
#

@frigid mantle My only thought on the issue is that you do trigger log-in using a primarily Lua UI, so in theory perhaps you could make the game re-trigger log-in process while already in a server -- but it may require logging all the way back out and back into the server due to Javaside processes between pressing Join and the actual "Click to Start" screen that cannot be modded from Lua.

#

Or it may require Java modding, which is beyond my Zomboid interests, personally, due to how much harder it tends to be for some users to install those mods correctly.

small topaz
frigid mantle
thick karma
#

But, yeah, in theory, I could see it being feasible, if you hack hard enough at the code.

#

Steam wouldn't stop you to my knowledge, but I could be wrong about that. (And if the only thing stopping a thing is PZ itself, well, in theory, that can be modded.)

austere sequoia
# plain crest though, if you're subbed to your own mod, it's possible that version might overw...

BTW, since you asked for feedback to your mods steam-stuff before: For me personally the "v 0.1" in the thumbnail is hell of confusing. My brain reads it as "Vol. 1" and therefore automatically categorizes it as just another music mod and therefor uninteresting (to me!). Honestly it took me until writing this now to realize that it does not even say Vol. 1. So I guess this could be discouraging people from looking at it

plain crest
#

any ideas?

urban ravine
#

something fucked up

#

i think i need those masks

plain crest
#

check your recycle bin

small topaz
austere sequoia
# plain crest eh, that's fine. i'd hope the name doesn't Sound like a music mod? and i think i...

Well, it does not say that it is a music mod, but it does not say that it isnt either. To me as someone just looking over it "Palsj's Poofs" could be some indie band with three black ladies singing and someone uploaded their music and albumcover to the game. Maybe replace the "v 0.1" with something like "African Hairstyles" (cause thats whats in the mod) and just say in the mod description that it is a work in progress (as you already do)

urban ravine
austere sequoia
# urban ravine the belly peircing

some bodylocations can do crazy things IIRC. Maybe try "Nose". This worked for a lot of stuff for me, and only replaces noserings, so no biggie

small topaz
# urban ravine the belly peircing

this is rendered before the pants and the sweater and it doesn't have the correct setExclusive definitions. it therefore won't cover those clothing types. you should choose a body location whoch is rendered after them to hide them

austere sequoia
plain crest
small topaz
austere sequoia
urban ravine
#

looks like i just need to do some reposition now, thanks for all the help

small topaz
urban ravine
#

Nose

small topaz
# urban ravine Nose

you can try using this but this will result in a lot of glitches. whenever players wear pants with a 3d model for example like baggy jeans, they will get those render problems as in your screenshot from above

urban ravine
small topaz
# urban ravine eh, ya win some you loose a few hundred

ofc it's your mod and you can design it to your liking. was just to inform you that those problems will occur. using appropriate body locations can prevent this. the whole vanilla body location system is specifically designed to avoid those problems.

#

I'd still try the FullSuit location...

#

did you try this after reloading your mod without the masks?

urban ravine
#

yup

#

just got done refitting the suit too

small topaz
#

cannot imagine that the full suit doesn't work! can you send me your mod as a zip so I can have a look?

#

I am just bored atm ๐Ÿ˜‰

urban ravine
#

sure thing, but keep in mind, its a heavly edited T-60 power armor mod, so its gonna be a bitch to find references

small topaz
#

I'd try ๐Ÿ˜‰

urban ravine
frigid mantle
small topaz
urban ravine
#

yeah my thinf being weird on my end ten

small topaz
urban ravine
#

i did, but i readded them later

small topaz
urban ravine
#

well then

#

okay, so i can see clothing underneath but not the player? weird

thick karma
# frigid mantle so as a game suggestion would be better than modding it

I wouldn't necessarily hold my breath for either modders or devs to add that particular feature, to be honest. But you are welcome to try to make those changes possible. It'll be a lot of reading through game files at the point where the game tries to log you into a server and figuring out what you would need to trigger from in-game to simulate everything necessary that follows.

small topaz
thick karma
#

So you would need to decompile game files most likely and read the Java as well as the Lua, starting with the function triggered when you hit Join Game.

urban ravine
#

well, i should be heading off, its like 6 AM :/

small topaz
urban ravine
#

nah, ill just edit it out on my end

small topaz
#

kk

austere sequoia
small topaz
austere sequoia
#

but it can only hide like a whole model, if I see it right? So no (easy) way to make, lets say, Hats override the part of wigs (items with hair meshes and textures) that they actually touch?

small topaz
#

it can in some cases prevent glitching since the problematic clothing item is then simply not rendered

austere sequoia
#

dang it... you dont happen to know where in vanilla I can find the models for the altered hairstyles that happen through hats?

small topaz
urban ravine
#

\

small topaz
austere sequoia
#

yes, like the normal "FHairLong2" version of the models when using hats

#

the basic one (I use it) is in models_X/Skinned/Hair, but I guess if there is no other way than making new models, there already must be models for this somewhere

small topaz
austere sequoia
#

Oh. Now that makes sense. So the models for different hair lenghts are the same, no matter the hairstyle

#

when using a hat

small topaz
austere sequoia
#

Well, gaining that information is progress and setback at the same time ๐Ÿ˜„ I guess I will be fine with a bit of clipping for the moment, lol xD

small topaz
#

your mod already on steam?

austere sequoia
#

Funny thing is, by accident I already added the "hat" hairstyles as separate wigs on steam. Now I can just sell it as if I did this on purpose to give wigs that are useable with hats xD

small topaz
austere sequoia
#

I thought so... Well, I guess Python will find a way to make the work for me

small topaz
#

Python?

austere sequoia
#

yes, my whole mod is written by python code. would not be possible by hand

small topaz
#

also made a mod where I created some of them automatically but I even used lua to generate them XD

#

btw just had a look at your mod and saw that your hair styles are all clothing items. then there is no way to make them all so that they don't clip automatically (i.e. just combining your hair style and a hat and there is "magically" never a clipping issue). you probably have to remodel your hair styles or make a separate "hat version" for each of your hairstyles. In the latter case you have to replace the hair styles whenever player puts a hat on. this must be done by lua coding

austere sequoia
#

I was afraid that this would be the way. This would at least double the already obscene amount of items I have ๐Ÿ˜„ And yes, the hair needs to be items, as It needs to be put on mannequins

small topaz
austere sequoia
#

yes, exactly! It is a difficult balance between providing a solid amount of content and flooding everything in files

small topaz
#

also the amount of 3d modelling required for this would be some work

#

do you just use vanilla hair styles for your mod or did you create your own ones?

austere sequoia
#

No, everything is vanilla. I try to avoid blender as much as possible

small topaz
#

hmm... ok. so the 3d modelling could be bypassed if you simply try to use the vanilla "Hat" and "HatLong" hairstyles. then there would only be the lua coding thing. this wouldn't be much code I guess but still some work if you aren't used to lua modding in PZ

austere sequoia
#

This would require some drastical rewriting in every single file, but the textures, lol ๐Ÿ˜„ Maybe I will tackle this in the future, but at the moment I guess I am happy (seeing the amount of work the alternative means). There is hair on my mannequins, that is all I ever wanted ๐Ÿ™‚

#

And I even have the hat versions as wigs in the mod, so they are separate items that can freely be used with hats

#

That actually was an accident- but a lucky one xD

small topaz
austere sequoia
#

I would basically need LUA code that checks if a hat is placed on a wig, check for the wigtype to chose the proper hat-hair-type and make sure it uses the wigs texture. would this be possible with LUA?

austere sequoia
#

what would you consider the best starting point / guide / tutorial to start learning LUA?

small topaz
#

for me, it was more difficult to find out how the PZ code works and how you can mod it via lua

austere sequoia
small topaz
#

without any programming knowledge, it might be a bit more difficult then to learn the basics

#

in this case, I also don't have an idea for a good tutorial then. but maybe there are some out there

austere sequoia
#

I say by reading code, I understand 60-80% of whats going on. I just cant write it. But seeing that LUA is an own language, and nothing that PZ just made up (what I presumed), I now can find out how to go on ๐Ÿ˜„

small topaz
austere sequoia
small topaz
austere sequoia
#

well, it is extremely limited at best. Cant write myself, but can successfully alter existing code to do what I want ๐Ÿ™‚

austere sequoia
#

I just asked ChatGPT if it can also write in LUA... and it said yes! Lets goooo

small topaz
#

you then need to get a rough overview over the pz lua code, learn how to properly mod it and how to use all the predefined commands and stuff

#

I think there are also some simple pz modding tutorials on the pz wiki

austere sequoia
#

I will first try make my robot do this. I just need to find the right commands, and iirc they were somewhere on the wiki ๐Ÿ™‚

small topaz
austere sequoia
#

Thats great! I knew I have seen this list somewhere, thanks for the link!

sour island
# open drum which mod do u need test with

@cosmic ermine It's a cluster of my mods, but the main one would be EHE. The server I have is 24/7, mostly vanilla settings. I turned events up, just trying to see if this latest fix for the infinite sound is fixed.

thick karma
#

Filename is 87GMCarmoredcar.txt... Seems a bit specific to be a chance alignment. And code is almost identical up to a certain line. P sure it's no vanilla file in my game.

winter bolt
cosmic ermine
#

Does editing the workshop description affect your workshop.txt aswell?

austere sequoia
#

No. Did this mistake a couple of times

bright fog
#

No, do a copy of your steam page before updating a mod

thick karma
sour island
#

If you use the SteamAPI you can bypass the in-game uploader

#

Would only change the contents package, and not the workshop related stuff

#

For what that's worth

thick karma
#

Fancy

sour island
#

This is also how gif posters are setup- using a program/steamAPI to edit just that file - as the in-game uploader doesn't allow gifs

crystal oar
#

just gonna toss this out in the aether since i just had the idea: Pogs

crystal oar
#

nice!

oblique shard
#

is it possible to set up custom survivor npcs that idle on the spot for rp faction guards in a mod

urban ravine
#

morning, does anyone know how i can get my mods armor to spawn on zombies?

oblique shard
#

ooh nice ty man

urban ravine
#

np

sour island
#

Braven made a NPC framework? I thought he was using PZNS ๐Ÿ˜ฎ

bright fog
#

He did yes

#

Not sure how good it is tho

oblique shard
#

looks nice but wish it was for multiplayer like spawning npc hostile military guards or police that raid you for looting lol

sour island
#

MP NPCs as a mod would be pretty close to impossible

#

and probably require java mods to get off the ground

#

Not to mention parallel developing something like that along with the official version would be a good waste of time

bronze yoke
#

that is, it probably originates from that mod and not us

thick karma
#

@bronze yoke Interesting, because this picture suggests that it is not allowing an overwrite, and simply registering it as a mismatch:

#

I wonder if perhaps the files loaded in the opposite order on server vs client?

#

So client overwrote the opposite direction?

#

Not sure, problem could be something else.

#

But that's why I hyu

bronze yoke
#

does the client definitely have the correct mod installed? maybe it's checking before making the client download it

thick karma
#

Unsure, he has other issues and burned out before we could finish. @bronze yoke

#

I'll let you know more when I know more.

#

He rebuilt new server settings from scratch and launched his server okay (I didn't catch whether he used both those mods the second time), but then it crashed due to some kind of divide by zero error associated with clothing, which leads me to believe maybe he removed a very important clothing-related mod that the save cannot live without.

#

We never made it to reproducing what he originally asked for help solving.

#

I think he was given the idea to just remove all mods and resub to everything by Beard and did that before I could get my scalpel out. Was at work.

bright fog
heady crystal
thick karma
bright fog
#

๐Ÿ‘Œ

sour island
thick karma
#

Uh-oh, what's this? Do they go to 11, you in fact never asked?

#

Oh, they go to 11.

bright fog
thick karma
#

No.

#

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

#

(mo #*$&a โค๏ธ )

bright fog
#

bruh

thick karma
#

BROUGH

#

IT IS ON

#

This update gonna be crankin 90s

#

gets banned

thick karma
#

Anyone hearing impaired? You can become so...

#

(I put subjectively reasonable limits on this, but it does get pretty loud.)

bright fog
#

why lmao

thick karma
#

Accessibility of course

#

For the hearing impaired and people who are metal

#

And doesn't seeing it just make you happy?

#

I mean isn't happiness worth something?

#

is banned for getting off-topic

thick karma
#

@bronze yoke I might just be delirious from modding all day, but, if not, I believe I've found a small error in MFTEOTW...

#

While using it for many months, I have very rarely encountered the following error:

#

Originally I chalked it up to a bad track or something; but today I was bored enough to check line 50 of that file, and I found this:

local function onFillContainer(_roomName, _containerType, container)
    local dummies = container:getAllType("Tsarcraft.BlankCassette") -- dummy item type
    if dummies:size() == 0 then return end
    for i = 0, dummies:size()-1 do
        container:Remove(dummies:get(i))
    end

    for i = 0, ZombRand(1 * SandboxVars.MFTEOTWC.maxCassettes) do
        local itemChoice = ZombRand(#itemList)
        local item = container:AddItem(itemList[itemChoice]) <-- Invocation Target Exception
        container:addItemOnServer(item)
    end
end

Events.OnFillContainer.Add(onFillContainer)

So I think to myself, "Can I be sure itemList[itemChoice] exists?" and I quickly notice ZombRand(#itemList) which would give you a number from 0 to #itemList - 1... And if I'm not mistaken, itemList does not have a 0, because it is created entirely using loops based on table.insert. It is therefore possible for this to randomly (about, what, 1/500 times?) throw an exception because it rolls 0.

bronze yoke
#

thanks, it'll probably be fixed when the next update comes out

robust locust
#

Thoughts on my mod (wip) to hang guitars on the walls? (other instruments might come later)

plain crest
cosmic ermine
dawn acorn
#

how would i go about creating new animations for new guns

austere sequoia
austere sequoia
#

Is there a way to give tiles tooltips? As in just hovering over a generator with the mouse, it will tell how much fuel it has? Or does anyone know of a mod that adds something like this?

austere sequoia
oblique shard
#

noob question but do players autodownloaded required mods for a multiplayer server or do they need to dl them individually from workshop ?

#

wondering if i should compile them all into one megamod (its just a small server for friends)

austere sequoia
oblique shard
#

easy thats what i was hoping, thanks

granite ginkgo
#

Guys, anyone has a clue why a car mod would not work in MP?

#

And also, what if a car doesn't spawn randomly on the map at all?

small topaz
robust locust
robust locust
austere sequoia
robust locust
#

so would i mostly see shadows cast from items on the northwall onto that wall? items on the west wall would cast a shadow into the center of the room?

#

isnt topleft the west side?

austere sequoia
austere sequoia
robust locust
#

I might just focus on the north wall, as that's where a shadow would hit the wall... im thinkink

sage mantle
#

Cant figure this out. I'm trying to make a function called localTigerIITurretKillZomb() that uses a global variable from the other existing function to make a killzone in front of the turret (to act like an MG) the problem I have is that when the vehicle spins in the opposite direction the rotation of the MG zone gets inverted. Ill post video

#

Idk how to change the math to fix it

#

P.S I had an idea to use this function for a flamethrower tank as well lol

brittle vapor
#

How to remove the sandbox label in sandbox-options

tough edge
#

Adding new tiles to TileZed, does anyone know what this tile property does? Is it the surface the tile uses or the surface that items can be placed on the tile?

thick karma
# brittle vapor How to remove the sandbox label in sandbox-options

Looks like the translation variables are set up wrong. I'm not even sure using non-English characters for the variable name can work at all. I imagine there are many non-English characters that would definitely not work as variable names properly in the Lua but I could be wrong.

#

Share your sandbox-options.txt and Sandbox_LANGUAGE.txt and we may be able to spot the issue

brittle vapor
#

Sandbox_LANGUAGE.txt no

thick karma
arctic ember
thick karma
#

If my app is misreading the translation names because you're not using English characters for the names, it's possible Zomboid also parses then wrong.

brittle vapor
thick karma
#

Yes that's the problem

arctic ember
#

aw man

#

ok

thick karma
sage mantle
# arctic ember aw man

well maybe but not with that model at least. I got permission from the coder but not the model maker

brittle vapor
thick karma
#

Translations in your Sandbox_LANGUAGE file can be Cyrillic with the correct encoding.

thick karma
#

But I don't know if that's allowed for the names of the options

sage mantle
thick karma
#

Also, you do not use a closing comma on the last field in sandbox-options

arctic ember
#

ah, it looks cool though

sage mantle
thick karma
sage mantle
#

Im just gonna keep working on the code though

thick karma
#

I have never tried Cyrillic for variable names anywhere, and I would expect problems if I did

sage mantle
#

the issue is here on mine if vehicle and string.find(vehicle:getScriptName(), "TigerII") then local angle = vehicle:getAngleY() -- Calculate the direction vector based on the turret's rotation and current bearing local deltt = {} deltt[1] = math.sin(math.rad(angle + currentBearing)) if math.abs(vehicle:getAngleZ()) > 90 then deltt[2] = -math.cos(math.rad(angle + currentBearing)) else deltt[2] = math.cos(math.rad(angle + currentBearing)) end

but Im stupid and cant figure it out

austere sequoia
#

I am somewhat stuck. Tiled cant find my png in the 2X folder, so I cant add it via the blue plus button. I used the basetemplate for creating new tiles and paint in it, as I did before (I already made it work before), but now it is not working - no matter what I try. It is 1024 x 2048, it has an alphachannel, it definitely is PNG, but nothing is working. What did I miss? Is there a certain way to name my layers? Or like a button I missed during saving?

thick karma
#

Also one of your options seems to have a "." where its name should be

brittle vapor
thick karma
#

Yes they should be

brittle vapor
thick karma
# brittle vapor Ok thanks

If you're not using quotes they're assumed to be variables pointing at translations in Sandbox_RU or whatever language that is

#

You can check True Music Jukebox for examples; we have sandbox options with Russian translations

brittle vapor
#

๐Ÿ‘Œ

thick karma
#

And, again, I'm pretty sure you cannot use a trailing comma there

#

I think it'll bug the line and cause translation not to load

#

@brittle vapor

sage mantle
#

yeah I dont think its supposed to have comma either

brittle vapor
sage mantle
#

so in pz does the y angle become like a negative value after crossing the center axis or something

#

in terms of like vehicles

muted oyster
#

What is like the least amount of time it would take to make a mode ?

austere sequoia
sage mantle
muted oyster
sage mantle
muted oyster
#

Ah

sage mantle
muted oyster
#

Wish I could help but I ain't no coding genius

sage mantle
muted oyster
#

No no you probably have basic knowledge I have no knowledge about coding I mean I'm currently taking a classes for it but I'm failing lol

sage mantle
muted oyster
#

Exactly

sage mantle
#

I think I just need to do like this but have an else to do the other way

        angle = angle -180
        end```
muted oyster
muted oyster
#

Very basic just something that makes it so the only people that see the circled part are the nurse/ Doctor occupations

#

Basically, so it's dangerous to change bandages alone.

sage mantle
#

man idk nothing about player UI stuff I just been messing with vehicle stuff

muted oyster
#

Ahhhhh ok well thx anyways

sage mantle
muted oyster
#

Honestly bruv idk anything about notin

sage mantle
muted oyster
#

I'll look more but I know the inventory tetris changes looks of inventory ui

sage mantle
#

If I had my game decompiled maybe

muted oyster
#

Ight

nocturne swift
#

UI ..Tell me please how to set the default selection in a comboBox to the first element? It really confuses me that I have to click every time to select

fierce sparrow
#

it looks like you're using the vehicle's model direction

sage mantle
#

yeah and then the current bearing is a globabal variable thats calculated in another function and thats a value between 1 and 360 so I'm subtracting that from the vehicle angle

#

which gives me the right angle in most directions except when the vehicle turns 180 then it breaks it

#

so these are the two functions

    local playerObj = getPlayer()
    local vehicle = playerObj:getVehicle()

    if vehicle and string.find(vehicle:getScriptName(), "TigerII") then
        local angle = vehicle:getAngleY()
        -- Calculate the direction vector based on the turret's rotation and current bearing
        local deltt = {}
        deltt[1] = math.sin(math.rad(angle + currentBearing))
        if math.abs(vehicle:getAngleZ()) > 90 then
            deltt[2] = -math.cos(math.rad(angle + currentBearing))
        else
            deltt[2] = math.cos(math.rad(angle + currentBearing))
        end

        -- Get the initial coordinates for spawning smoke
        local xxx = vehicle:getX()
        local yyy = vehicle:getY()

        -- Variable for breaking out of the loop
        local isbreak = 3```
#
        for i = 3, 20 do
            xxx = math.ceil(xxx + i * deltt[1])
            yyy = math.ceil(yyy + i * deltt[2])

            -- Loop through a grid of squares around the calculated coordinates
            for xx = -1, 1 do
                if isbreak <= 0 then
                    break
                end
                for yy = -1, 1 do
                    if isbreak <= 0 then
                        break
                    end
                    -- Get the grid square at the calculated coordinates
                    local zsquare = getCell():getGridSquare(xxx + xx, yyy + yy, 0)
                    if zsquare then
                        -- Check if there's a zombie in the grid square and kill it
                        local zombie = zsquare:getZombie()
                        if zombie then
                            zombie:Kill(playerObj)
                            isbreak = isbreak - 1
                        end
                        -- Spawn smoke at the grid square
                        IsoFireManager.StartSmoke(getCell(), zsquare, true, 200, 1000)
                    end
                end
            end
        end
    end
end```
#

and then

    local modData = player:getModData()
    if vehicle ~= nil and vehicle:getSeat(player) == 0 then
        if isMouseButtonDown(1) then
            modData.TigerIIAim = true
            modData.TigerIIAimVehicleId = vehicle:getId()
            goalBearing = pMod(math.floor(playerDirection(player:getDirectionAngle()) -
                                              vehicleDirection(vehicle:getAngleX(), vehicle:getAngleY(),
                    vehicle:getAngleZ()) + 0.1), 360)
            goalBearing = math.floor(goalBearing / 1) * 1
        else
            goalBearing = 0
        end
        if RotatoTick <= 0 then
            RotatoTick = getAverageFPS() / 50
        else
            RotatoTick = RotatoTick - 1
            return
        end
        if goalBearing > currentBearing then
            TurretRotating = true
            locked = false
            if goalBearing - currentBearing <= 180 then
                sendClientCommand("TigerIISend", "Rotate", {
                    newBearing = tostring(pMod(currentBearing + 1, 360)),
                    oldBearing = tostring(pMod(currentBearing, 360)),
                    vehicleId = vehicle:getId()
                });
                currentBearing = pMod(currentBearing + 1, 360)
            else
                sendClientCommand("TigerIISend", "Rotate", {
                    newBearing = tostring(pMod(currentBearing - 1, 360)),
                    oldBearing = tostring(pMod(currentBearing, 360)),
                    vehicleId = vehicle:getId()
                });
                currentBearing = pMod(currentBearing - 1, 360)
      ```
#
            -- Check if the looping sound is not already playing
            if not vehicle:getEmitter():isPlaying("TurretRotate") then
                -- Start the looping sound
                vehicle:getEmitter():playSound("TurretStart", false)
                vehicle:getEmitter():playSound("TurretRotate", true) -- 'true' for looping
            end
            ISTigerAimTime = ISTigerAimTime + 1
            if ISTigerAimTime >= 1 then
                ISTigerAimTime = 1
            end
        elseif goalBearing < currentBearing then
            locked = false
            TurretRotating = true
            if currentBearing - goalBearing <= 180 then
                sendClientCommand("TigerIISend", "Rotate", {
                    newBearing = tostring(pMod(currentBearing - 1, 360)),
                    oldBearing = tostring(pMod(currentBearing, 360)),
                    vehicleId = vehicle:getId()
                });
           ```
#
            else
                sendClientCommand("TigerIISend", "Rotate", {
                    newBearing = tostring(pMod(currentBearing + 1, 360)),
                    oldBearing = tostring(pMod(currentBearing, 360)),
                    vehicleId = vehicle:getId()
                });
                currentBearing = pMod(currentBearing + 1, 360)
            end
            -- Check if the looping sound is not already playing
            if not vehicle:getEmitter():isPlaying("TurretRotate") then
                -- Start the looping sound
                vehicle:getEmitter():playSound("TurretStart", false) -- 'true' for looping
                vehicle:getEmitter():playSound("TurretRotate", true)
            end
            ISTigerAimTime = ISTigerAimTime + 1
            if ISTigerAimTime >= 1 then
                ISTigerAimTime = 1
            end
        else
            TurretRotating = false
            locked = true
            if vehicle:getEmitter():isPlaying("TurretRotate") then
            -- Stop the looping sound
            vehicle:getEmitter():stopSoundByName("TurretRotate")
            --vehicle:getEmitter():playSound("TurretStop", false)
            end
        end
    end
end```
#

I wrote the top code to use the bottom code

muted oyster
#

My brain has done gone

sage mantle
fierce sparrow
#

because your playerDirection changes according to the vechile doing 180

#

and then you subrstarct the vehicle dir from it too

muted oyster
#

Give me your brain juices

sage mantle
#

but yeah I do see it does this in his ```if goalBearing > currentBearing then
TurretRotating = true
locked = false
if goalBearing - currentBearing <= 180 then
sendClientCommand("TigerIISend", "Rotate", {
newBearing = tostring(pMod(currentBearing + 1, 360)),
oldBearing = tostring(pMod(currentBearing, 360)),
vehicleId = vehicle:getId()
});
currentBearing = pMod(currentBearing + 1, 360)
else
sendClientCommand("TigerIISend", "Rotate", {
newBearing = tostring(pMod(currentBearing - 1, 360)),
oldBearing = tostring(pMod(currentBearing, 360)),
vehicleId = vehicle:getId()
});
currentBearing = pMod(currentBearing - 1, 360)

  end```
#

so what would I have to put here to fix it?

            TurretRotating = true
            locked = false
            if goalBearing - currentBearing <= 180 then
                sendClientCommand("TigerIISend", "Rotate", {
                    newBearing = tostring(pMod(currentBearing + 1, 360)),
                    oldBearing = tostring(pMod(currentBearing, 360)),
                    vehicleId = vehicle:getId()
                });
                currentBearing = pMod(currentBearing + 1, 360)
            else
                sendClientCommand("TigerIISend", "Rotate", {
                    newBearing = tostring(pMod(currentBearing - 1, 360)),
                    oldBearing = tostring(pMod(currentBearing, 360)),
                    vehicleId = vehicle:getId()
                });
                currentBearing = pMod(currentBearing - 1, 360)
      
      end```
fierce sparrow
#

Why are you checking btw if the GoalBearing is higher than the Current Bearing?

#

and not if they aren't the same for example

#

but for erm fixing, I think you might want to, check how you spawn the smoke

#

and where

#

Because, when you aim it, it doesn't aim where your mouse is

#

its not in the current bearing etc

sage mantle
sage mantle
#

it proably is from it going from

currentBearing = pMod(currentBearing + 1, 360)

to

currentBearing = pMod(currentBearing - 1, 360)

in his function thats making it flop in mine

#

so I need to edit this to account for the change

        local angle = vehicle:getAngleY()
        -- Calculate the direction vector based on the turret's rotation and current bearing
        local deltt = {}
        deltt[1] = math.sin(math.rad(angle + currentBearing))
        if math.abs(vehicle:getAngleZ()) > 90 then
            deltt[2] = -math.cos(math.rad(angle + currentBearing))
        else
            deltt[2] = math.cos(math.rad(angle + currentBearing))
        end```
#

I think I dunno lol

#

more likely is my math part is wrong

#

or that when the current bearing goes from a positive to a negative value instead of adding it I need to subtract it instead

vital karma
#

I have been trying to figure out a way to get the number of zombie kills from the player, is there a function I need to call or should I make one that runs separately?

austere sequoia
#

isnt there a mod that does this already? you could look what they did

small topaz
vital karma
#

thats what I found is used in the mod listed above, was just asking too see if there was something else reccomended to use. but as of now thats what I am using.

small topaz
vital karma
#

thank you!

plain crest
quick garnet
#

Hey guys, do anyone know where can I find the layout for the zpop_xx_xx.bin file?
I wanna be able to see how many Zeds are still around in a given playthrough and think this may be the way to do it.

robust locust
sage mantle
#

this is what I ended up doing if curious

    local playerObj = getPlayer()
    local vehicle = playerObj:getVehicle()

    if not vehicle or not string.find(vehicle:getScriptName(), "TigerII") then
        return  -- Exiting if player is not in a Tiger II or not in a vehicle
    end

    local angledet = -currentBearing
    local deltt = {}

    local angleY = vehicle:getAngleY()

#
        deltt[2] = -math.sin(math.rad(90 - angleY))
    else
        deltt[2] = math.sin(math.rad(90 - angleY))
    end

    -- Calculate deltt[1] based on the condition
    if deltt[2] < 0 then
        if math.abs(vehicle:getAngleZ()) > 90 then
            deltt[2] = -math.sin(math.rad(90 - angleY - angledet))
        else
            deltt[2] = math.sin(math.rad(90 - angleY - angledet))
        end
        deltt[1] = math.cos(math.rad(90 - angleY - angledet))
    else
        if math.abs(vehicle:getAngleZ()) > 90 then
            deltt[2] = -math.sin(math.rad(90 - angleY + angledet))
        else
            deltt[2] = math.sin(math.rad(90 - angleY + angledet))
        end
        deltt[1] = math.cos(math.rad(90 - angleY + angledet))
    end

    -- Get the initial coordinates for spawning smoke
    local xxx = vehicle:getX()
    local yyy = vehicle:getY()

    -- Variable for breaking out of the loop
    local isbreak = 3

#
    for i = 3, 20 do
        xxx = math.ceil(xxx + i * deltt[1])
        yyy = math.ceil(yyy + i * deltt[2])

        -- Loop through a grid of squares around the calculated coordinates
        for xx = -1, 1 do
            if isbreak <= 0 then
                break
            end
            for yy = -1, 1 do
                if isbreak <= 0 then
                    break
                end
                -- Get the grid square at the calculated coordinates
                local zsquare = getCell():getGridSquare(xxx + xx, yyy + yy, 0)
                if zsquare then
                    -- Check if there's a zombie in the grid square and kill it
                    local zombie = zsquare:getZombie()
                    if zombie then
                        zombie:Kill(playerObj)
                        isbreak = isbreak - 1
                    end
                    -- Spawn smoke at the grid square
                    IsoFireManager.StartSmoke(getCell(), zsquare, true, 200, 1000)
                end
            end
        end
    end
end```
#

I just jammed stuff in till it worked lol

mellow frigate
#

I am currently removing a floor tile and replacing it with another floor tile. The removing works immediately. but the adding half works: the Iso object + sprite is on the tile (seen through Chunk Debugger), but invisible (black tile when there is no other IsoObject on the tile) If I move far enough away and come back or quit and continue, the tile loading system shows the new tile's sprite as I initially expected. ```lua
currentSquare:RemoveTileObject(toRemoveIsoObject)
local newObj = IsoObject.new(currentSquare, "myvalidspritename", 'myobjectname')
currentSquare:disableErosion()
currentSquare:transmitAddObjectToSquare(newObj, 0)
newObj:transmitUpdatedSprite()

sage mantle
slow graniteBOT
#
castiell_ has been warned

Reason: Bad word usage

#
K2#1335 has been warned

Reason: Bad word usage

quick garnet
# quick garnet Hey guys, do anyone know where can I find the layout for the zpop_xx_xx.bin file...

Hy @mellow frigate, you are the author of the Auto Loot mod right?
I am the guy who was asking about the possibility of reaching farther the other day.
Maybe you can help me here, I am trying to find a way to count how many zombies still exist on the map in a given playthrough, and think that the answer may lie on the zpop_xx_xx.bin files.
Do you happen to know where can I find a description of their layout and usage?

thick karma
#

@bronze yoke @bright fog Mission completed fairly easily thanks to DOME.

robust locust
#

Can a recipe give more than 1 item?
i.e. I want to seperate 1 item into 2

vital karma
#

Say...... How do I make an object edible?

Been having issues with making nails edible, it's an inside joke and was wanting to make it possible for us.

robust locust
vital karma
#

As the type? I should yes, I will double check

robust locust
#

Yea, i think that does it... if not... im all outta ideas ๐Ÿ˜„

vital karma
#

anything I am missing? or that could cause an issue?

quick garnet
#

@robust locust and @vital karma maybe you guys would know where can I find the layout for the zpop_xx_xx.bin file?

#

I wanna be able to see how many Zeds are still around in a given playthrough and think this may be the way to do it.

vital karma
#

idk. have you checked the game files? I have no clue

quick garnet
#

Do you mean, decode the java source?

vital karma
#

It should be in the file if its opened and not ran I believe

#

idk though

drifting ore
#

anyone know where to find the lua code for the generator?

quick garnet
#

In the bin file you mean?

vital karma
#

yes

quick garnet
#

No, it is not there, just binary stuff and some codes about dresses and types of zombies

robust locust
robust locust
quick garnet
#

Thanks guys, I am a newbie myself, just trying to find my way

drifting ore
vital karma
#

from my understanding there is no "zombies left" as I know zombies in buildings are not spawned until you look in the building.

robust locust
#

quantum zombies panic

vital karma
#

sorry was running somewhere on my play through

quick garnet
vital karma
#

then I would recommend looking into how zombie spawns work and starting from there. might be able to find your answer there.

chrome egret
drifting ore
# robust locust no, but let me know if you do as i was looking for that too

found these two files, but they dont appear to contain the actual lua workings of the generator.

"C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua\client\TimedActions\ISActivateGenerator.lua"
"C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua\server\Map\MapObjects\MOGenerator.lua"

robust locust
crystal oar
#

if i use local recipe = getScriptManager():getRecipe(item) will that get me a recipe object or an array of all the recipe objects that match?

nova socket
#

Subbed and favorited

grand raven
#

Hi mates

Mb somebody could help me explaining how to make modpack?
Thanks

#

At least
If i make modpack
Will it stop mods from updating on server and client?

signal frost
#

Is there a gitflow pipeline for zomboid mods?

mellow frigate
small topaz
austere sequoia
#

Hey guys! When I want to add tiles, I have to add the "tiledef=nameofmytiledef randomnumber" line into mod info - my question is, where do I find the random number? Do I just pick one? Unfortunately all guides and videos about this I found dont mention this / are outdated

grand raven
#

If i make modpack
Will it stop mods from updating on server and client?

small topaz
small topaz
#

Is there a way to get the grid square a player is facing at?

cedar ingot
#

How can I make a mod

cedar ingot
#

How do I get everything to work right and so that I could test it

austere sequoia
#

set up the folderstructure with your contents in user/zomboid/mods, then you can test it ingame

cedar ingot
#

It'll auto load it and then I can just go into a world and shite

austere sequoia
#

when you put everything in the right folder, you can activate it ingame as any other mod and test it

cedar ingot
#

Oh ok

#

Ans what would be the best cheat mode mod or thing to help test a new mod

austere sequoia
#

set -debug in PZs steam starter options

#

then you have debug mode, with all cheats

#

and an item search menu, and basically everything you could ever need

cedar ingot
#

Ok that's cewl

#

So adding a text file to the game through that structure will automatically load and be used or? Like how do I get it to recognize it as code for the game

austere sequoia
#

it is highly depending on what you want to do, but yes, when you add a textfile with the right contents to the right place in your mods folder structure, you can make something happen in your mod

cedar ingot
#

so do i create a new folder in the mods folder or no?

austere sequoia
cedar ingot
#

like this

austere sequoia
#

yes, one folder per mod. so you "mymods" folder should contain the mod.info file, a poster.png (not mandatory) and the media folder, where all your stuff goes into

cedar ingot
#

media folder?

austere sequoia
#

yes, a folder, called "media". best to look at other mods how they have done it. your mod basically copies vanillas folderstructure, beginning with "media" (the main folder of the game with almost everything in it)

cedar ingot
#

so i need to create a new folder in "MyFirstMod" called "media"?

austere sequoia
#

yes

cedar ingot
#

what do i need to put in that folder?

austere sequoia
#

depends on what you want to do. Add an item? Put a scripts folder in your media folder with a textfile called "items_whateverbutspecifictoyourmod" as name and your item desription in it

#

as example

#

textures go somewhere else, as well as code, texturepacks, clothing items, etc. Look at the vanilla folder structure or at mods that do something similar you want to do, to learn how they made it

cedar ingot
#

so the mod.info should just be those 5 lines?

austere sequoia
#

Is enough for most mods, yes. Some mods, like tilepacks, would need additional entries

cedar ingot
#

whats a tilepack?

austere sequoia
#

stuff like furniture, floor textures, wallstyles.... all the 2D stuff

cedar ingot
#

oooh ok

#

nah i think i just want to do something basic like a new item or something

austere sequoia
#

alright ๐Ÿ‘

cedar ingot
#

how can i find the info from other mods so that i can look at it

sage mantle
#

is there a way to disable a key press if certain conditions are met. Like if I want to prevent the E key from exiting vehicle if the player is aiming with the tank

#

because I get a overflow if the player exits while aiming

austere sequoia
sage mantle
#

maybe isExitBlocked?

reef vine
#

Hello ! I'd like to work on a mod about Wooden Crate. It's ok for the .fbx but I can't find where's the script or files in PZ directory to work on ! Help ? ๐Ÿ™‚

cedar ingot
austere sequoia
cedar ingot
#

i meant to add an item or the scripts or anything like that

austere sequoia
cedar ingot
#

maybe but i cant find a mod simillar to what i want to do because their all numbers

austere sequoia
#

the numbers (i guess you mean workshop ID) are on each mods workshop page. So you want to look at the files of mod XYZ? Go to mod XYZs workshop page, look at the bottom of the description, and look for the folder named after the steam ID in the 108600 folder I mentioned earlier

cedar ingot
#

oh

thick karma
# bright fog Now that's interesting

Next update we read in Mod Options if they exist and write them to our own file... Mod Options will no longer be a dependency of TMJ. We're handling our own options using our DOME now.

#

I reimplemented everything it did for us but better using DOME (better in that we now have more control and our own options page with less dependency on other mods)

thick karma
#

If you modpack badly and without permission, modders can and in my opinion should have that modpack pulled from steam. And before you try hiding a badly made modpack that reuses original mod ids, know that we will find out about it through mod support even if it's hidden or private because it will cause bugs for people who will show up there for help.

#

Changing all the ids and references in mod.info and the mods' files will reduce chances of you causing bugs for people, but you can still get pulled down for reposting code that isn't yours without permission.

small topaz
#

Does anyone knows how to check whether a square contains obstacles for player movement? I.e. solid, insuperable obstacles like cars or tables but also obstacles which only slow the player down like hedges or trees.

azure edge
#

maybe here it better to add my question so i can continue trying

#

if i want a recipe to have 2 different results how i write it? for example result is a 200$ coin and a 50$ coin
Result:200$,50, or Result:200$/50$? or something else?
i dont want to create a 250$ bill also as a new item (which i guess i can but i dont want )

thick karma
#

@small topaz

#

I think you'll have to use isSomethingTo as trigger to figure out what

small topaz
sage mantle
#

anyone use setLocked() or getDoor() ?

azure edge
#

cant any1 help me?

small topaz
# azure edge if i want a recipe to have 2 different results how i write it? for example resul...

Recipes can only produce items of one type. For example, to get 20 nails, you can add
Result:Nails=20,
to your recipe script.txt. Recipes cannot return items of different types. If you want to achieve this, you have to make a Recipe.OnCreate function in your mod's lua/server folder and use this function to add the additional items to the player's inventory. To see an example how this works, you can check the vanilla recipe "Open Box of Jars". It has a function Recipe.OnCreate.OpenBoxOfJars attached to it. This function can be found in vanilla lua/server/recipecode.lua and it adds additional items to the player inventory.

azure edge
#

@small topazty so much

#

so it will be easier for an amateur like me to make it return money=250 i guess

#

ty

small topaz
azure edge
#

ty

crystal oar
# small topaz should return a recipe object. you can check that here https://zomboid-javadoc.c...

oh boy, how does getAllRecipesFor work? what i am trying to do is go through the list of all recipes and affect certain ones based on if it matches a recipe enumerated in the sandbox vars. the way I used to do it was with local recipe = getScriptManager():getRecipe(item) but i realized that it would only grab the first recipe with a given name from a given module, when what i want is each matching recipe (in the event more than one has the same name and module name)

small topaz
crystal oar
small topaz
crystal oar
#

okay, thanks for the help anyway

mellow frigate
robust locust
#

Hiya... I'm trying to write a function that always gives me back an item...

#

but it's pulling an error in game... could someone please point out how I'm being an idiot?

neon bronze
#

Whats the error?

rich void
#

Made a new anomaly today, kinda fun ๐Ÿคฃ

robust locust
# neon bronze Whats the error?

when the save loads, the "break on error" screen pops up and shows that code. I cant tell what the error is saying exactly

robust locust
#

ideally, I'd like my DisconnectGuitar function to check what guitar ive clicked on (if I have more than one type for example) and return that item...

#

but I dont know how to do that

rich void
#

Just ctrl + f stack and send the error, it will tell you the line it throws and the error ๐Ÿ‘

robust locust
rich void
robust locust
#

this is the 1st part..

#

thanks btw

stone lantern
#

Hello. I have a question. I would like to design a mod that not only was a profession but changed the way the Character looked. Like a 1-Armed man, or 1-legged woman. The idea being you get a large number of bonus traits along with draw backs. What tool can I down load that would let me design characters and their animations?

stone lantern
#

Blender is the goto for MODIng? I see a map modding tool in steam for PZ. Nothing for character development.

robust locust
rich void
#

My guess is that Recipe is returning null, I haven't really messed much with recipe script calls but I'm pretty sure you need

require "recipecode"
require('NPCs/MainCreationMethods')

and to be on the safe side

Recipe = Recipe or {}
Recipe.OnCreate = Recipe.OnCreate or {}

at the top of your script @robust locust

neon bronze
robust locust
neon bronze
#

In your function you have the latter

rich void
#

^ Good spot

robust locust
#

i'll that change first, as it's a quick one, then 1ndie's

robust locust
#

so many i things need to fix panic

#

this still appeared on start up

#

i think i also have a texture problem somewhere

#

the recipe worked, but the function didn't

#

I wish they made an easier way to get more than 1 thing back from a recipe...

bronze yoke
#

if you try to Recipe = Recipe or {} here, it won't work because the vanilla file doesn't do that, it'll just overwrite the table you created - you can guarantee you load after the vanilla file by just putting it in the server folder, which they have done

bronze yoke
#

in the screenshot OnCreate is still not capitalised, which would throw an error

robust locust
#

is there a reason why Recipe has a squiggly line?

#

or is that no biggie?

bronze yoke
#

vscode doesn't know about zomboid stuff so it doesn't know where Recipe is coming from

#

if you install umbrella it should go away

#

but it won't affect how your code actually runs

robust locust
#

i tried installing it but the lua open library doesnt work

bronze yoke
#

you don't need to do all that stuff anymore, i put it on the addon manager

robust locust
#

i ran the game and it crashed on load

bronze yoke
#

instructions here

robust locust
bronze yoke
#

weird as hell, never seen anything like that

robust locust
#

that's not good ๐Ÿซ 

bronze yoke
#

i can't see why your function wouldn't work, it looks like a perfectly valid oncreate function - at the very least it has absolutely no reason to crash the game

robust locust
#

i took the lua file out and the game ran, but with it in... it crashes. Something in there is killing it ๐Ÿ˜ฆ

#

do I need to import Base?

bronze yoke
#

nah

#

at least not inherently, if your recipe uses base items you might need to unless you reference them by full type

robust locust
#

Result:addItems() or something like that instead

#

should I try ?

cedar ingot
#

For a new item, all the attributes is a list and that's how we make new weapons or whatever?

thick karma
#

E.g. event handler templates

#

I've copy-pasted those before and gotten bad results

robust locust
thick karma
#

Did you post the file that prevents game from starting somewhere here?

#

Letting people read the whole file might be necessary

#

Also did you check console.txt after crash?

#

Sometimes an error makes it there right before crash

robust locust
#

i posted the only code in there...

thick karma
#

But gotta check before you reload game

robust locust
#

no I didnt check console file... had to restart as it boinked my entire pc

thick karma
#

Whaaa

robust locust
#

yea, the icons in the taskbar wouldnt go, and shit wasnt closing all of a sudden

#

I removed the code file and reloaded the game, and all worked again

thick karma
#

Sure doesn't sound like anything I've ever heard of PZ doing

robust locust
#

as far as i can tell, it's only a simple function that i wrote zombie

thick karma
#

Did you try reinserting code file after restarting?

#

To confirm it causes that outcome?

#

And not a coincidence?

robust locust
thick karma
#

Oof

#

Hmm

robust locust
#

does the line in recipe script that calls that function have to be there, or will that cause a problem?

thick karma
#

Without it no function gets called afaik

final raptor
#

Is there a way to debug player mod data the way globalmoddata works? I am tired of console logging ๐Ÿฅต๐Ÿฅต

final raptor
#

See the values for each key of each mod

robust locust
#

im looking forward to the debugger they showed off on the latest update

thick karma
#

Mmm... Not sure how easily. I have a function for quickly grabbing all keys but not values

#

You could definitely write a loop

final raptor
#

Can I add a button to the debug "dev" tab? Or is that a private api

thick karma
#

Never tried but if I wanted to I would use visible words to find translation variables, and use those variables to try to find a Lua file for the debug window UI

#

Idk what file it is or whether it's even Lua

thick karma
#

May be that file

#

Idk

bronze yoke
#

you just need any generic table dumping function, nothing special about mod data

thick karma
#

(I think he's so tired of typing into console he wants to make a button if I'm not misunderstanding?)

thick karma
thick karma
bronze yoke
#

the debugger screenshot shows server/HGWHRecipeCodes.lua

thick karma
#

Oh

#

Hmm

#

@final raptor

BS = {}

BS.maxSafeDepth = 7

BS.reveal = function(someTable, verbose, depth, prefix, found)

    if not (someTable and type(someTable) == "table") then return "" end

    found = found or {}

    if found[someTable] then return "" else found[someTable] = true end

    prefix = prefix or ""

    depth = depth or BS.maxSafeDepth

    if depth > BS.maxSafeDepth then depth = BS.maxSafeDepth elseif depth < 0 then return "" end

    local result = ""
    
    for key, value in pairs(someTable) do
        result = result .. "\n" .. prefix .. tostring(key)
        if verbose then
            local subresult = BS.reveal(value, verbose, depth - 1, prefix .. "--", found)
            if subresult then result = result .. subresult end
        end
    end

    if prefix == "" then
        Clipboard.setClipboard(result)
        print(result)
    end

    return result

end

@final raptor I use this to dump keys to my clipboard to read them in an editor. You could easily edit result line to include tostring(value) and see what's up.

mellow frigate
thick karma
#

Then just call BS.reveal(getPlayer():getModData()) from debug console and paste results to somewhere worthy of reading them.

thick karma
#

Well sheeit

robust locust
thick karma
#

Yeah tmk that's where you need to be... I dunno that's odd. I would crash it one more time and send us the console.txt

#

Might have to let your computer crash, too, but console.txt should be there when you restart

robust locust
mellow frigate
mellow frigate
#

it was required because vanilla refresh moves back the scrolling to the top and it was anoying

thick karma
#

Bahahaha

bronze yoke
#

can it collapse/fold tables?

thick karma
#

On a serious note, Tchernobill, can you stop releasing so many cool mods that I feel absolutely compelled to provide gamepad support?

#

Haha I just spotted Roll; killin me over here man.

#

lol I have to have that.

robust locust
#

It worked!!! ๐Ÿ˜„
My game didn't crash and it gave me back what I wanted!!

thick karma
#

I didn't think anything sounded wrong...

robust locust
#

I didnt do anything differently.... put the file back and it loaded... then I added the line in the reciped, loaded and it worked!

#

I swear computers are already sentient and they're messing with my head ๐Ÿ˜„ ๐Ÿซ 

thick karma
#

I mean it would make sense if their first instinct upon becoming sentient is to troll people

robust locust
#

thanks all the same, much appreciated!

mellow frigate
thick karma
#

lol receives thanks for saying "try running it"

robust locust
#

if they're learning from the internet, they know to troll and take feet pics...

final raptor
fathom sapphire
#

I know this is probably obv but I'm very new to lua, and I don't understand why this isn't working.
I looked for an example in the files and found ISFastTeleportMove that looks the same, but when i press the g key it does not log anything to the console
input.lua -
OnKeyPress = {}

OnKeyPress.log = function()
print("G IS PRESSED")
end

OnKeyPress.OnKeyStartPressed = function(key)
local player = getPlayer()
if player ~= nil then
if key == 71 then
OnKeyPress.log()
end
end
end

Events.OnKeyStartPressed.Add(OnKeyPress.OnKeyStartPressed)

I do have it in the ModName/media/lua/shared folder if that is important as well

thick karma
# fathom sapphire I know this is probably obv but I'm very new to lua, and I don't understand why ...

I would be careful about highly generic root level names for files (e.g., input.lua) and common names for global modules (OnKeyPress), because it'll increase risk of conflict with other mods. Assuming nothing in vanilla or another mod has prevented your file from being read properly, I would verify it exists in the game at all by firing print(OnKeyPress and OnKeyPress.OnKeyStartPressed) in the debug console.

#

If it exists I would try logging every key instead of just logging G to make sure the key event even fires

fathom sapphire
#

If that helps

thick karma
#

It's also possible you need key signals in client. I'm not on PC right now so I cannot confirm, but if the process depends on files that are loaded in client, you could be attempting to use it before it's ready.

fathom sapphire
#

Oh i thought shared was just client and server

thick karma
#

shared means that it loads on client and server, yes, but it does not eliminate the importance of load order.

#

Since both client and server use shared, it logically loads first.

#

If you try doing things in shared as soon as a file loads that depend on things found in client, they won't work, because client hasn't loaded yet.

#

client loads after shared

fathom sapphire
#

But if i put it in client will it still be able to print to the console?

thick karma
#

Yes, the console to which you print is the client console.

#

The debug console in game shows clientside messages

#

Not serverside ones.

fathom sapphire
fathom sapphire
thick karma
#

Then the function does exist.

#

I would try removing 71 condition

#

Or perhaps putting key command in client; unsure

#

Just a guess

#

The code doesn't look wrong but I could be overlooking something

#

Half busy sorta

#

Watching stuff with friend online

fathom sapphire
#

Ah thats fair, I appreciate any and all help, I couldn't find anything about simple stuff like this online

thick karma
#

That's a good reminder link to visit

#

For this detail

fathom sapphire
#

Ah, it was the 71

thick karma
#

Or just use if key == Keyboard.KEY_G maybe

#

It's been awhile since I mapped keys

thick karma
#

Keyboard is exposed you can def use it globally

vital karma
#

Are Global variables able to passed through to other Lua files? Like let's say I wanted to make a file that only updates and declares variables. Is that able to be used by other files?

thick karma
#

In DirectoryName/NomOptions.lua:

local NomOptions = {}

NomOptions.one = true
NomOptions.foo = "bar"

return NomOptions
vital karma
#

And that's the same with functions right?

thick karma
#

Yes

#

In DirectoryName/ThingThatNeedsOptions.lua:

local NomOptions = require("DirectoryName/NomOptions")

-- Can now call NomOptions.whatever.
-- Adding to it will be registered in every file that references NomOptions.


#

Changed Package to Directory above to be clearer

thick karma
vital karma
#

thank you!

thick karma
#

It's passed by reference

#

You can declare in A, import A in B, import A in C, add functions in C, and call them in B