#mod_development

1 messages ยท Page 211 of 1

cedar kraken
#

Is this the proper way to do this? I'm trying to change the name of a vanilla item

nova socket
#

Does anyone know which method of (IsoGrid i guess?) highlights tiles inside of it like it happens with safehouses in -debug mode by default?

cedar kraken
#

How do you alter item distributions?

#

Whether that's to completely remove pre-existing a specific location, changing the chances of an item appearing at a pre-existing location, or creating entirely new locations.

drifting ore
#

you need to modify the procedural logic and intercept the tables keys in order to achieve what you want, i think that would be the correct approach

cedar kraken
#

I'm really new to Lua... as in extremely new, and so I apologize if I'm really slow to understand ๐Ÿ˜…

cedar kraken
drifting ore
# cedar kraken So essentially modify the procedural distributions before the game loads them, a...

you need to create a function that will be passed as an addition to the event, in that function you need to declare the tables as they're declared with their by default value or empty as empty tables, then you call the iterTable function for each of your desired tables to instruct the rolls reduction

local function reduceTableRolls(key, zone)
    if zone.rolls and zone.rolls > 1 then
         zone.rolls = 1;
    end
end

local function iterateTable(table)
    for key, zone in pairs(table) do
        if type(zone) == "table" then
            if zone and zone.items then
                reduceTableRolls(key, zone)
                if zone.junk and zone.junk.items[1] then
                    reduceTableRolls(key, zone.junk)
                end
            else
                -- Iterate until `zone.items` or `zone.procedural` are found.
                if zone and not zone.procedural then
                    iterateTable(zone)
                end
            end
        end
    end
end

Events.OnPreDistributionMerge.Add(yourPreDistributionMerge)```
cedar kraken
#

Am I an idiot for not really understanding this

#

It's not your fault for not explaining it properly I'm just an idiot

#

local function reduceTableRolls(key, zone) What's "key" and "zone" here?

drifting ore
#

dictionary values

#

dict = { key: value }

cedar kraken
#

Dictionary?

#

Is that just another term for a table

drifting ore
#

oh in Lua i think they're tables tho ๐Ÿ˜›

cedar kraken
#

ah okay

#

So "key" and "zone" are just two different keys for that specific table?

#

Or for that function

#

Wait I'm confused

#

What do those do for that function? There doesn't seem to be a table defined in the scope of reduceTableRolls

drifting ore
#

see iterTable

cedar kraken
#

What does the iterateTable function do

#

oh

#

Is it just to reduce the rolls for a specific item?

#

if I make the rolls 0, does it do the equivalent of making it so that item doesn't spawn in that location?

#

Sorry, I'm completely clueless about how to do this - I can't even entirely understand what the code is doing/how to read it ๐Ÿ˜•

#

Coding seems like something that's very hard to... practice. Like, where would I even start to learn more Lua?

cedar kraken
cedar kraken
#

Does type simply refer to a list of variables?

#

Ohhhh wait

#

type will return what kind of data type the variables stored in it are

#

I think

past trout
#

Hello comrades, I apologize for a possibly stupid question... but does anyone know the function that puts clothes on a character? or a mod that has something similar

For example: after pressing a key on the keyboard (or after any event), an item of clothing from the inventory is put on the character

teal slate
#

Is there a way to edit a recipe added in one mod with another mod? Do you have to use Lua for it, or can you just redefine it?

gilded hawk
#

How can I get the current mod id in lua? Like, if my mod is has the id casualoid is there something like getModId I can call in lua?

teal slate
#

Eugh. Can't just use Override:true like people claim?

bronze yoke
#

you can redefine it, but i wouldn't recommend doing that unless your mod is personal use

teal slate
#

It is.

#

If the original mod were open-source I'd just PR the fix, but instead I have to patch it myself.

#

For me and a few friends to use. I'm just doing the bare basics and handing it off to someone else to do what they want with it, upload it, whatever.

bronze yoke
#

overriding the recipe entirely puts a maintenance burden on you as you have to keep your overwrite up to date with changes to the original, and it eliminates the possibility of compatibility with other mods doing the same thing

#

but for personal use, it doesn't really matter

vague raven
#

Override only works on vanilla recipes AFAIK.

teal slate
#

The original mod has been unmaintained for I think at least a year now.

teal slate
#

The issue with Override:true is that it only applies to the first recipe named that - so it's not reliable in some cases. Just something to keep in mind.
This is the closest I've seen.

vague raven
teal slate
willow garden
#

Hello, does it happen to anyone that when they download the Britas Weapon mod they get a little red box in the game that says "error"? If anyone has a solution it would be very helpful.

abstract pine
#

I've been told and observed before that some vehicle data on vehicles in save games isn't updated when the vehicle script file is updated. I'm trying to figure out what parameters are/aren't updated and how it's saved into the save data. Anyone have an idea, or know where I'd look for this info? I've been looking at the BaseVehicle and VehicleScript classes but haven't figured much out.

gilded hawk
#

Is there an event for when all the mods have loaded? ๐Ÿค”

rugged latch
#

anyone here know opengl shader stuff yeh?

abstract pine
#

It looks like vehicle data is saved in vehicles.db and less is saved than I thought, unless there's somewhere else data is saved too that I'm missing. It seems pretty much only part data, mod data, and inventory of a vehicle is in the database, so I think vehicle parameters should almost all be moddable and testable mid-save apart from the parts/part templates themselves? Hmm

quartz oxide
#

Does zomboid have modding support for using MySQL?

#

I'm trying to make a plugin that connects to an external database to store stats like playtime etc.

mellow frigate
teal slate
#

It has numerous issues, which is why there are forks/reuploads with fixes.

#

But those aren't very good either.

mellow frigate
teal slate
#

Okay. I didn't ask you.

willow garden
#

Anyone who can help me with this error would be of great help..

mellow frigate
#

41.78.15 ? was this version out in 2022 ?

livid badger
#

Ladies and gentlemen, my farming mod sometimes incorrectly selects the current plant sprite. The functionality works correctly, but visually it looks incorrect. Do you think the server will be overloaded if you check the surrounding global farming objects every 10 game minutes and change the sprites to the correct ones if they do not match?

wise igloo
#

anyone know which mask layer is for the head? i realise that bc of my outfit having all masks it removes any headwear

cedar kraken
#

Iโ€™m thinking of adding firefighter boots and Iโ€™m curious as to if itโ€™s possible to make it so a piece of clothing prevents a body part from catching fire?

#

Does anyone know if it is?

zinc lantern
#

making a huge map

clever halo
#

Hello, I have an issue with my recipe and the context menu, let me explain. I have a recipe that requires an item + a screwdriver, and I want that when right-clicking on the item, the option to apply the recipe is shown REGARDLESS of whether the screwdriver is in the inventory or not. So, if it's there, the recipe is displayed with white text (the default behavior), and if the screwdriver is not in the inventory, the option is shown in red, and it's not possible to perform the recipe.

It seems that OnTest (in Recipes.txt) is not working for me. I can create a tooltip manually and set "notAvailable = true," but in that case, I don't know how to display the panel that shows the items needed to craft the recipe (the one that says: "you need a screwdriver", and renders its texture).

What can I do?

cedar kraken
#

I finally got my lua code to work

#

I feel really happy

#

and I feel as though I'm actually learning

rough anchor
#

Hi I'm new here.
TLDR: is there a way to tell if a corpse is a zombie corpse or a dead non zombie?

I'm working on a mod for my public PVP server. I'm wondering what I have to do to identify if a corpse is a zombie corpse?
I want to be able to EG: Cut ears off dead players but not dead zombies (like in diablo 2 ^.^)

wise needle
#

Heyo peeps, gonna be here every now and then trying to work on a project. I'm no stranger to programming, but hadn't modded PZ before. What's the proper way of adding a new 3D Item?

Like, I have an item in my script file, do I need to do the

model = mName
{
  mesh = FBX-File,
  Texture = FBX-File-Texture,
  scale = 1.0,
}

in the same file as my item? And reference it wiiith... WeaponSprite, right?
Also is mesh suppose to be the FBX 3D model, is texture suppose to be, well, the texture for it? what if the 3D model had colored polygons or such and doesn't have that? That gonna mess it up?

raven zinc
#

Some British Vehicles from a mod I'm making

bright fog
#

You could test to detect zombies around and see if those that are fake zombies are detected that way

cedar kraken
tough coral
#

also make sure that you're only running 1 version of arsenal 26

coarse ember
#

hello
i use this code for zombies to drop money: table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.Money");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 50);
but is there also a code for min and max amount they drop?

ornate grotto
#

guys is it possible to respawn a dead player? (same character)

#

maybe when player didnt press the respawn button yet

granite ginkgo
#

Does this look ugly? (the green car ofc)

brave lava
#

yes

cedar kraken
#

Not sure if anyone saw my message yesterday, but Iโ€™m looking for help with making flameproof clothing. Is it possible to make it so a piece of clothing protects a specific body region from catching fire?

cedar kraken
#

Maybe a code that checks to see if the body part is on fire, and if it sees that youโ€™re wearing the piece of clothing, it prevents the body part from being on fire - would that work?

mellow frigate
#

maybe dig the code and tell us what you found ๐Ÿ˜„

cedar kraken
#

Ahh, I thought which part is burned is because the game checks to see if a body part is "on fire" when the player is burning

#

Iโ€™ll definitely still go have a look to see what I can do!

median stone
#

hello. i am thinking of creating a remote control mod where i would control the character by another application.
for this to work i need some form of communication between the game and the app.
i think i can somewhat achieve this by file io where i would use getFileWriter for current status and getFileReader to wait for commands.
writing to a file is the easy part but not sure how i would incrementally read a file via lua commands. before sinking in many hours fiddling more with the lua api, do you think any of this make any sense? would you recommend any other way?
i actually wished for a headless client that can connect to a local server. that way i could run multiple players at once but i guess there is no such thing.

bright fog
#

After adding back the compatibility between Susceptible and Spore Zones, I'm now looking at Bloater models. And I did it :)

#

Time to check if everything works correctly, and if I can simplify the files of the mod

patent holly
#

ah, the fun part lol

bright fog
#

It's mostly some copy pasta

#

But I want to see if I have to repost the whole infected mod to actually add the model

#

I mean I don't think it would be an issue anyway since the developper stated he won't continue the mod, so reposting it overall should be fairly ok

#

Is it possible to replace a function from another mod ?

patent holly
#

it has a section on overwriting

bright fog
#

I mean if I can do it fairly simply, I'll do it, but it definitely isn't really needed. I just modify a simple file but need the others from the mod

#

Also I literally just modified a single line of code so it was very easy lol

#

Just had to understand how PZ handles custom models, clothing on zombies etc but it was ok

gilded hawk
#

Question, can I store the mod data in a IsoThumpable that can be moved around and carried like a box? And ensure that this mod data is saved when the item is picked up?

bright fog
#

:D

rugged heath
#

Hi, quick question-- do lua events like EveryHours and EveryTenMinutes operate on real-world server time or in the in-game clock?

rugged heath
#

got it, thank you!

gilded hawk
#

Which also means, that if you change the day duration, it changes how often they get triggered

bright fog
#

I guessed it correctly then

rugged heath
#

yeah, i'm just trying to log the in-game time on our server so we can pipe it to our discord. While I was googling around I found this bug report post from a year or two ago -- https://theindiestone.com/forums/index.php?/topic/50777-4168-singleplayer-event-everyhours/ does this mean that if I trigger an event on EveryHours that calls GameTime.getHour, the return from that function will still be an hour behind?

gilded hawk
#

good question, I don't know ๐Ÿ˜…

rugged heath
#

figured, but I thought i'd ask. Thanks for the help, I'll just try it out

gilded hawk
#

Out of curiosity, why do you need the in-game time on a discord server? ๐Ÿค”

rugged heath
#

it's a large multiplayer server with long days, and often groups want to coordinate things like "let's go out looting together when it's morning" without logging in to see the time.

gilded hawk
#

Ahh that makes sense cool stuff!

ornate grotto
#

guys how do i respawn the player, like after u die add a button that respawns u on the same position and with the same character and remove the dead body or remove the zombie, items arent required to get kept, only clothes tbh and character name

#

i want to make like be a zombie mod

#

that is better than "infected player"

restive notch
#

Are item distributions used client side? I noticed that mods that modify the distribution tables will often put the code for it in /lua/server/items but not gate it with an isServer() check?

bronze yoke
#

to my knowledge no, people just don't realise they could (and a not isClient() check would be more appropriate otherwise your distributions wouldn't be applied in singleplayer)

upper stump
#

guys

gilded hawk
#

guy

upper stump
#

there is a mod for spawn in the rosewood prison

#

??

gilded hawk
#

yep

upper stump
#

do you have it

#

I dont find it

gilded hawk
#

IIRC nurse made a video about it and linked it

upper stump
#

thanks bro

fast galleon
gilded hawk
#

ah interesting thank you

gilded hawk
#

I would like a way to stress test my "Proximity Inventory" mod, does anyone know a good way of doing it?

#

I need to put a stupid amout of items inside containers, like thousands of them

bronze sand
#

For example I'd like to remove the African and All of the Regional USA Flags (but the one from Kentucky), and some pop culture flags as well.

#

But I'd like to keep the option of crafting the remaining flags

raven zinc
fleet bridge
#

What are you stress testing? I've killed up to 1000 in one go to test some zombie loot dropping stuff. Aside from the game itself lagging prox inv seemed perform fine.

frosty estuary
#

Hi... how can I render a icon on the screen, like the PVP icon, to show to player when he's inside a specific custom zone. Any one have a exemple of that ?

opal pier
#

Guys, do I need anything besides that to make the zombies able to spawn with clothes? For me it's not working, the zombie is appearing naked

gilded hawk
fleet bridge
#

standing over 1000 zombies and loading thousands of items didn't break the old prox inv, fwiw

#

awfully laggy though

#

lol

gilded hawk
#

Great thank you for sharing, I will try it ASAP.

It should fix the lagginess this new code

fleet bridge
#

though there was an issue, and i'm not sure it's because of prox inv - items that are added to zombies on death dont seem to populate on prox inv window

#

sometimes you have to refresh the container and then stuff just appears

gilded hawk
#

It can happen with thousands of items

fleet bridge
#

got reports of players not finding stuff (cures, special items) unless they manually scrolled through zombie inventories or specifically moved items around

gilded hawk
#

Interesting thank y

#

I'll test it in a bit as I just woke up

knotty tide
#

Hi, I am trying to create a evolvedrecipe but I'm not sure how I add it to the base items EvolvedRecepi property. The only way I found so far is overriding every item that can be added to the recipe.

#

is there a way to add a recipe to the EvolvedRecipe property without overriding the entire item?

opal pier
drifting ore
#

fuggit ima try and balance the skyler DrugMod. its not my mod but the drugs are too common and way too risk free/op so ima change it so u can od or have other effects XD

drifting ore
#

alright im also adding fentanyl and dmt. withdrawl effects etc. but im allitle stumped on how i can script for the dmt trip. im not sure if pz coding has a way to let me distort the screen or color change

#

if anyones got any tips to throw at me for that id love it!

#

(ive only done lua for roblox devving lol)

#

also anyone know the event name for like falling over?

#

or stumbling etc

#

i cant find it on the event list

#

(i might just be blind lol)

#

hnnn i see fallenOnKnees isbFalling isBumped isBumpFall isBumpStaggered

#

idkkk, im new to pz modding lmao

#

oh i also see setKnockekdDown

sick yew
#

Gentlemen, bit of a question on how Zomboid works.

#

When making a vehicle whose engine is located in the rear, is it possible to do this?

#

From what I've seen, the engine and rear "hood" take damage once you hit something head on.

drifting ore
#

i swear im deep in a dungeon looking for the right animation variables rn

bronze sand
fleet bridge
#

you can overwrite the recipes and make them hidden

bright fog
#

This is what is used in TLOU Infected to add the clicker headpiece to the infected

#

And the clothing name

#

Exactly how you got it

drifting ore
#

will Empty Bottle,
work for a recipe requiring them? considering all the botttle types default to Empty Bottle i jus wanna be sure

bright fog
#

I don't understand the question ?

#

A filled bottle isn't the same item

#

So if your question is that you can use a filled bottle in a crafting that requires an empty bottle: no

drifting ore
#

ohh wait i see now. thats display name XP

#

is there a way to do item distrobutions? cuz i aint gonna edit 621 lines LOL

drifting ore
#

HOWW

#

intercept all the tables when procedural distributions and others occurs

#

implement your logic there, done

#

if you scroll up the chat, then you'll find information about it

bright fog
#

I saw the line for a it yesterday I think

#

Not sure where tho

drifting ore
#

do your research on certain topics, don't expect to be spoonfeeded here

bright fog
#

ngl when you're new to modding or coding in any sort and have no way for what words to search to find something, it's normal to come and ask for help

#

Especially when you don't have the vocabulary, searching it can be tedious

#

One thing I would suggest however, is just find mods that do what you want to do and try to copy it

drifting ore
#

ngl when you new to modding you need to learn the basics

bright fog
#

Scrap some other mods to see how they do basic stuff

bright fog
drifting ore
#

google's everyone friend ^__^/'')

bright fog
#

Like 2 years ago I was new to Python and had no idea what class are and how to do those, and even today even if I know how to do it, I'm not too sure what the word is to describe what it means

#

Google is your friend if you know what to search for

#

It sounds easy when you already have the basics, but it's hell when you don't know shit and it's not the kind of stuff you pratice everyday, and in fact it's a subject you just try to get a grasp of

#

Coding doesn't work like anything else in life, most people don't ever touch a subject that looks like it

#

And there's nothing wrong with that, and neither is it wrong to ask for a small tip, even just where to look

drifting ore
#

there's official documentation, thousands of mods of variety of categories, you don't have a solid point, if you are new to programming or modding, then aim to your level of knowledge, yes you can ask for help if you stuck or couldn't find information, he didn't even scrolled up the chat, spoonfed won't happen

#
hooking into Events.OnPreDistributionMerge https://pzwiki.net/wiki/Lua_Events/OnPreDistributionMerge
you need to modify the procedural logic and intercept the tables keys in order to achieve what you want, i think that would be the correct approach
Mitch (GDmitch) โ€” 30/12/2023 18:17
I'm really new to Lua... as in extremely new, and so I apologize if I'm really slow to understand ๐Ÿ˜…
Mitch (GDmitch) โ€” 30/12/2023 18:21
So essentially modify the procedural distributions before the game loads them, as to have it load the distributions I want instead of the regular ones?
Francis โ€” 30/12/2023 18:32
you need to create a function that will be passed as an addition to the event, in that function you need to declare the tables as they're declared with their by default value or empty as empty tables, then you call the iterTable function for each of your desired tables to instruct the rolls reduction```
clearest example ever of a newcomer trying to touch procedural distributions, there's nothing wrong with it, but do you think this is where you should start as a rookie? do you think someone will take the time to explain to you the language and then how to do it? ye, gl wit that
bright fog
#

Sure ain't a solution to scroll up this chat when there are thousands of messages

#

The documentation follows the same rules as what I described, when you don't have the vocabulary it's barely possible to read it

drifting ore
#

you've no point, say less

bright fog
#

lmao whatever boy

#

If that's your argument

#

Do as you wish, go follow your way of life it's fine, but don't be a dick about someone asking for help, there's no need for such rudeness towards someone new to this subject

drifting ore
#

rude's to come here and ask to be fed to finish your project, because you didn't sit down for 5 minutes to read anything

bright fog
#

If you think that's how it was shrugs

fleet bridge
#

best thing to do is look in the base lua files, you can learn quite a bit. look in distributions lua and you will see functions that will already do what you need. start from there.

modern hamlet
#

Hi, If I teleport a bag full of items with Lua, will the items inside be teleported with the bag?

drifting ore
#

hey anyone here wanna help me with an error XP again ive only done lua for roblox deving, so i have NO idea how to use debug. but here

#

wait

#

wronmg file LOL

#

WAIT

#

WRONG FILE IT MAKES SENSE NOW

#

LOL

#

worlds biggest dummy

#

thats me

#

put the distrobution file in the wrong folder

slender stream
#

Hi, does anyone knows if there is a way to store data on the client side? I am writing a public mod that check if the resetID on the server is changed. I can get the current resetID from server without problem, but i would need to save and read a copy of the resetID on the client side so I can compare and determine if the resetID was changed. Does anyone knows how to store and get data on client side? or if anyone knows a mod that might have similar feature that i can learn from?

modern hamlet
#
local player = getPlayer();
if player:getModData().MyCheck then
  -- player has MyCheck data, do something with it
else
  -- no data, create it
  player:getModData().MyCheck = {}
  -- add data to table
  player:getModData().MyCheck[1] = true
end

I'm not sure but I think something like that is client side. You can save data on player

crystal terrace
crystal terrace
bright fog
#

Hey so I'm overall new the modding of Project Zomboid and I'm wondering how PZ handles a certain line of code.
In the lua/shared/.lua , how does the game react with the specific lines of code exactly ?

player = getPlayer();
pillowmod = player:getModData();

How does it react in multiplayer more specificly is my question ? In multiplayer, this gives up this: attempted index: getModData of non-table: null

#

What exactly is player:getModData meant to output ? (this is not my code, trying to fix an error that happens with this part of the code in multiplayer)

sour island
bright fog
#

What's that supposed to be for ?

sour island
#

You put in a mod ID and it scrapes the workshop for uploads with the same ID

#

I found 1 mod with 39 reuploads, another with 28, and another with 20

bright fog
#

Damn

#

Funny

#

You check manually if they are approved ?

sour island
#

for my list yeah

#

there was 3 that were not reuploads

bright fog
#

right

#

Interesting how this works

sour island
#

it just so happened they used my modID+another word, for a patch or language

bright fog
#

yeah

#

I guessed it

sour island
#

I bet if I used the special character for line breaks it could avoid those

bright fog
#

hmm well some mods probably follow the same rule in title

crisp dew
#

Anyone happen to know if the tiles property app is buggy, or am I just missing something? Been trying to load a sprites file to create a new tile, but the "Add tileset" button is only listing the files in the default tileset, (despite my custom spritesheet being present in the "2x" directory alongside all the other sprites).

crisp dew
#

Hmmm, progress. ~/.TileZed had cached records for the tilesets available on the filesystem and it didn't seem to refresh. Deleting that directory and re-launching Tiled allowed the custom sprites to be visible :/

bright fog
#

Hey so I'm kind of stuck here:
In lua/shared/.lua, I have the function getPlayer() that sends a nil and this at any time of the character's life. If the player is spawned in and his character here and present, it doesn't matter and the function always sends nil. Searching about it it could be because the player isn't here yet (like spawning in and stuff like that) but the character is present and the player is present too, doing actions etc.
Would anyone point me towards the reason of this issue please ?

bright fog
#

I definitely prefer this icon

exotic lynx
slender stream
exotic lynx
#

Congrates on the mod @slender stream

slender stream
exotic lynx
#

Yeah I am trying to learn lua and figure out some modding stuff also

slender stream
exotic lynx
#

I am a moddler and 3d 2d artist I am not a coder for sure but hopefully I can figure out some stuff

#

Thanks by the way

crystal terrace
exotic lynx
#

Ok @crystal terrace cool thanks any chance you got a cheat sheet with these classes written down somewhere you could share maybe

crystal terrace
# exotic lynx Ok <@1014989258165072028> cool thanks any chance you got a cheat sheet with thes...

i don't exactly remember, been a while but i did add some resources in a guide i wrote a while back. https://steamcommunity.com/sharedfiles/filedetails/?id=3006109377 checkout the last section for resources that i linked, apart from that this channel will be your source for getting your foot in the door. Don't be afraid to drop questions, search chat for related keywords.

This specifically targets adding custom items to game through your own mod....

exotic lynx
#

I only ask because I am way out of my normal wheel house man OK thanks to @crystal terrace and @slender stream for helping anwser the question of basically where to start and figuring stuff out. The new information I will follow up and review the Modding 101 in a few minutes Thanks again for the help guys I really appreciate it alot thanks so much glad their are a few helpful people here

crisp dew
#

I managed to get the tileset working and placeable with the brush tool, but it's not rendering that tile when you place the item, clearly I'm missing something, I just need to figure out what that is.

exotic lynx
#

So I ran across a page talking about using java but the way I understand it Java is what the base code for the game was written in and Lua is a very basic scripting language that gives us a flexible and simple language to build scripts for Project Zombie to have base logic.

dawn palm
#

how to start modding?

#

I made a client folder and made a Test.lua file

dawn palm
#

nvm I figured it out

#

but in every changes in the lua file and I'm ingame, do I have to quit and join a save again?

mental vigil
#

Yes

dawn palm
#

like the function Say

#

when i type in the command line smthing ingame

#

I'll just enter the code?

gleaming sequoia
#

Anyone knows how to change sound effects in game like level up sound or death screams?

sick yew
#

player:getInventory():AddItem("Base.Pistol");

#

How would I change this code to give me two pistols?

neon bronze
#

Put it in twice in your code

sick yew
#

If you don't want to put it in a box?

neon bronze
#

I think you can set up how many bullets in the gun

#

Donโ€™t remember the command for that though

#

Look into the java docs for pz for that

bright fog
#

Is the player visually freezing for other players when attacked by zombies in multiplayer (but actually moving on the player screen) a vanilla problem ?

signal dew
#

hello guys, Have you guys ever encountered the same problem as me?
I have made some very beautiful mansions, but as soon as I enter certain areas of the mansion, my game becomes very lag and FPS becomes very low
Whenever I walk down the corridor from the second floor to the third floor, the FPS of my game instantly drops from 75 to 3
The basement garage, first floor, and attic have no such problem at all
It's so strange, why do I encounter so many strange problems every time?
Last time, there were thousands of zombies spawned in my mansion, and after, i'm fishing in the river, the fish resources did not recover. This time I'm in my mansion, and after walking in the hallway on the second floor, the game says Application not responding
Game freezes directly

#

This is the house where I have problems

modern hamlet
#

How can I get gridSquare with coordinates?

fleet bridge
gleaming sequoia
#

am I supposed to change the whole 300 MB .bank file just to edit a single sound effect as PZwiki tutorial says? If so how do I make it compatible with other sound effect mods since they will all change the same .bank file?

upbeat spindle
#

How to go through all ground-level squares in a map, or alternatively a predetermined list of coordinates, with lua?

#

Apparently this line can be used to access a square sq:

local sq = getWorld():getCell():getGridSquare(x, y, z);

#

So should the idea be something like this

for x = 0,299
for y = 0,299
for z = 0
getWorld():getCell():getGridSquare(x, y, z)
end
end
end

#

But then, how to access all the cells that I'd be interested in ๐Ÿค”

bright fog
#

You could maybe find something similar

ornate grotto
#

guys i think its "possible" to make project zomboid in 3d, tho it would require raycasts and making a whole 3d engine

#

and it would be really hard

#

but if someone makes it then gl

upbeat spindle
# bright fog You could maybe check the code for Cordyceps Spore Zone by Braven, I haven't loo...

Hmm, thanks! Definitely closely related, not sure if I can get anything useful to myself, as buildings seem to be treated as something special.


    local args = {
        origin = { x = buildingSq:getX(), y = buildingSq:getY(), z = buildingSq:getZ() },
        groundZero = { x = zoneSq:getX(), y = zoneSq:getY(), z = zoneSq:getZ() }
    }
    sendClientCommand(playerObj, 'SporeZone', 'TransmitSporeZone', args)

    if SandboxVars.SporeZones.GroundZero then
        local args2 = { x = zoneSq:getX(), y = zoneSq:getY(), z = zoneSq:getZ() }
        sendClientCommand(playerObj, 'SporeZone', 'CreateSporeZoneTile', args2)
    end

    if SandboxVars.SporeZones.SpawnCorpses == true then
        local bodyAmount = math.floor((buildingDef:getH() * buildingDef:getW()) / 50)
        if bodyAmount < 1 then bodyAmount = 1 end

        for i = 0, bodyAmount - 1 do
            local randomSq = BuildingHelper.getFreeTileFromBuilding(building:getDef())
            if randomSq then
                spawnBody(randomSq)
            end
        end
    end

    playerObj:getModData().cordycepsInfectionTimer = 0
    BB_Spore_UI.drawSporeCanvas = true
end```
modern hamlet
#

I'm trying to make a cargo mod. I want the player to be able to teleport a box of items, but it doesn't work unless the target gridSquare is nearby. Is there a way to load a gridSquare and place the item in the desired location without the character going to that area?

bright fog
#

I haven't looked into how he makes the difference between every building

#

Could be related to how they are mapped in the game (a single inside zone for a building for example)

upbeat spindle
#

Yup, the snippet I pasted looks like it treats a generic building into a sporezone, then somewhere else they access all buildings somehow

bright fog
#

Something weird I've seen is that, you can have a building with multiple floors considered the same building but I've also seen some zones where the first floor wasn't a spore zone but the floor above was (it was a building in the port of Louisville

#

This makes some spore zones more interesting in fact, as you could have a low area infested but top area not infested and shit like that but eh

upbeat spindle
#

Ahhh, they add a checker to be done every minute, then access the player character and see whether it is in a building

    local playerObj = getPlayer(); if not playerObj then return end
    local building = playerObj:getBuilding()```
bright fog
#

Yeah every minute they check if you are in a building

upbeat spindle
#

But how does the everyminute -checker know what player character to access :--D

bright fog
#

The code for spore zones is very clean and easy to read, at least at my level of Lua (it was the first code I studied)

upbeat spindle
#

yeah, what if there are 10 players on server?

bright fog
#

getPlayer() gives the player it runs the code on

#

It runs the code for each players I think

upbeat spindle
#

Ooo

#

I see, that's why these are in the Client -folder

bright fog
#

Yes

#

I guess

upbeat spindle
#

Anyhow, that's not in my toolbox then, as I try to figure a script that runs entirely on the server-side, and on a trigger associated with season changes

bright fog
#

Something I learned yesterday night when trying to fix a problem with getPlayer() is that if it runs in shared (and probably server), you have to make sure the event can use the player as a parameter
Like OnTick doesn't have the parameter isoPlayer for example and didn't recognize getPlayer() as a player, it outputs nil
https://pzwiki.net/wiki/Lua_Events/OnTick
but OnCreatePlayer for example does have isoPlayer so it can run getPlayer()
https://pzwiki.net/wiki/Lua_Events/OnCreatePlayer

#

Because it runs the event for each players independently I think

#

Basically what I described here

upbeat spindle
#

hm.

bright fog
#

And my solution was to not have getPlayer() in events that don't have isoPlayer

upbeat spindle
#

I wonder if I could use Events.EveryDays.Add(MyFunction). Any hints as to where I could read what info I can access within this event?

upbeat spindle
#

All I'd need is to access the World, and thus its ClimateManager

bright fog
#

Basically what I sent you before comes from this page

#

You have every events

upbeat spindle
#

:DDD

bright fog
upbeat spindle
#

Of course there are two pages for lua events even in the wiki

bright fog
#

Hmm idk what the difference is

#

Yes Ik actually

#

You have old events lists "Deprecated Events"

upbeat spindle
bright fog
#

And what I sent is "Current events"

bright fog
#

But here for example it can't access getPlayer()

#

Nor can it apply functions on a player

#

I guess your question is mostly what can you access in general

#

informations from the game

upbeat spindle
#

Mm, indeed

bright fog
#

And to this I have no answer but to tinker around other mods and see how they access things

#

Or look for some documentation

#

Yesterday I used ChatGPT to get some better understanding on how Project Zomboid handles stuff, and it worked pretty well, just the problem with getPlayer() he didn't knew about it seems like

#

He gave valid reasons, just missing some of the possible reasons my getPlayer() sent nil

upbeat spindle
#

For example OnWorldSound -event doesn't have anything that needs getWorld()

`local function OnWorldSound(x, y, z, radius, volume, source)
-- Your code here
end

Events.OnWorldSound.Add(OnWorldSound)`

#

So I guess getWorld() in this case is a method that is global to the events

#

Aight, Imma wish that

local function blabla()
local Season = getWorld():getClimateManager().getInstance():getSeason()

 -- do stuff depending on season

end

Events.EveryDays.Add(blabla)

would actually do what I want it to do

bright fog
#

What does getWorld() output ?

upbeat spindle
#

apparently a string

bright fog
#

I mean, yeah

upbeat spindle
#

why the fuck would it be a string

#

asdfgh

bright fog
#

But does it output the name of the world ? The season ? The time and date ?

upbeat spindle
#

I have zero clue

bright fog
#

Oh it's like player, it allows you to modify the world

#

Okay I get it

upbeat spindle
#

I don't even have an idea as to how to do the usual debug via printing as I've no idea where the printed message is readable

bright fog
#

Console

#

I use the console for the prints

upbeat spindle
#

The in-game console?

bright fog
#

in Zomboid/console.txt

upbeat spindle
#

ty!

bright fog
#

I guess ingame console works too

#

I didn't use the debug menu for modding yet

#

Tho I'm new to this shit

upbeat spindle
#

Aaaaand which Zomboid folder would this one be, naturally it ain't the one in steamapps :--D

bright fog
#

Mainly because debug mode is terrible when you have a lot of mod and just makes it so buggy, to the point where you can't even launch the game properly sometimes

upbeat spindle
#

aha, found it

bright fog
#

user/Zomboid

upbeat spindle
#

yass

bright fog
#

user in my case is my name

#

It's where you place your manually installed mods too

#

Or just the one you are testing

#

Same folder as workshop to send a mod on the workshop too

#

And loads of other shit

#

You can also find coop-console.txt when you host a server to test your mods on server

#

If errors don't appear on the bottom right in server, they could still appear in coop-console.txt

#

But if a red error appears bottom right even on servers, that's a client side error

restive notch
#

Argh. Does anyone know how to disable the red overlay shown for safehouses in debug mode?

upbeat spindle
bright fog
#

Yeah

#

Sometimes the print don't print in the console

#

I'm not too sure how to debug if you can't print in the console in some functions

ornate grotto
#

guys how do i check if player hp is less than a number, i want to test a thingy for a suggestion

ornate grotto
bright fog
#

Probably do

player = getPlayer()
hp = player.getHealth()
if hp < number then
  -- do action
end
ornate grotto
#

ty

bright fog
#

Events.OnPlayerUpdate.Add(function);

and in the function do the example code I did

#

Adapt it in your own way and needs

#

Don't hesitate to check other's mod code that could use what you want to do

ornate grotto
#

what program do u recommend for editing code?

#

the microsoft one i forgot the name or notepad++

sour island
#

Reupload Tracker v2:
Make a copy and change the mod ID at the top only. https://docs.google.com/spreadsheets/d/1JDO_jELKNQqpNVU_IbzgJ-gprxEU9Pn3kFsCLu_L1YE

#

V2 makes one load per sheet

ornate grotto
#
        imports {
            Base
        }
        Events.OnPlayerUpdate.Add(function(player));
            hp = player.getHealth()
            if hp < 2 then
              player:SetGodMode(true)
            end

will this work or i need some modifying, i have no experience in PZ modding but have experience in gmod/roblox lua

#

lil in gmod and more in roblox

upbeat spindle
#

What comes out from getWorld() seems to be a string called "zombie.iso.isoWorld@[some identifier string]"

bright fog
#

yeah it's basically the world

upbeat spindle
#

ahh, this gives me a human-understandable handle to the season

#

even within a "everydays" -trigger

local Climate = getClimateManager();
local Season = Climate:getSeasonName();

#

For some reason the "Early Summer" is followed by "Autumn"

ornate grotto
#

guys pls help

#
        Events.OnPlayerUpdate.Add(function());
            print("ok ok it works yeah?")
            player = getPlayer()
                hp = player.getHealth()
                if hp < 50 then
                  player:setGodMode(true)
                end
            end
#

i dont get why its not working

sour island
#

Updated the tracker to automatically pull multiple pages

#

๐Ÿ‘

ornate grotto
#

ai fixed some stuff

Events.OnPlayerUpdate.Add(function()
    print("ok ok it works yeah?")
    local player = getPlayer()
    local hp = player:getHealth()
    if hp < 50 then
        player:setGodMode(true)
    end
end)

tho it gives errors now

upbeat spindle
#

local function TestFunction()
print("ok ok it works yeah?");
player = getPlayer();
hp = player:getHealth();
if hp < 50 then
player:setGodMode(true);
end
end

Events.OnPlayerUpdate.Add(TestFunction);

#

idk if this fixes anything, just massaged the syntax to something more common, and in doing so removed at least one bracket issue from the original lines

bronze yoke
#

player.getHealth is not valid

#

you must use : for instance methods

upbeat spindle
#

true, edited

#

also edited some semicolons into it

ornate grotto
#

it sends errors every second

merry fjord
#

Is OnGameStart event triggered every after player's character creation?

bronze yoke
#

no, it's triggered each time the game enters the game world

#

you can catch character creation with OnNewGame

merry fjord
#

Thanks! this is exactly what I'm looking for

ornate grotto
#

guys do lua scripts should be named some exact way or u can name then however u want

bright fog
bright fog
ornate grotto
bright fog
#

But overall I don't think you need to have exact name

bright fog
#

Why would you call it like that

ornate grotto
#

yeah, just to test

merry fjord
bright fog
#

Don't call it like that, I don't think it will cause issues but god damn it that's a weird name that could glitch something out

ornate grotto
#

also i decided to use VS microsoft

#

visual studio

bright fog
ornate grotto
bright fog
#

I think with VS you can search terms in the whole project

ornate grotto
#

oops, my bottle pressed on send button

#

but is the path correct?

bright fog
#

Sounds like it yes

merry fjord
ornate grotto
#

when code runs this error appears

ornate grotto
# ornate grotto when code runs this error appears

i dont know how this is related

local function TestFunction()
    player = getPlayer();
    hp = player:getHealth();
    if hp < 50 then
    print("ok ok it works yeah?");
      player:setGodMode(true);
    end
 end
 
 Events.OnPlayerUpdate.Add(TestFunction);
#

ok my script works now but it doesn't auto work

#

and always works when hp is even over 50

fleet bridge
#

print(hp) and see what your hp actually is

ornate grotto
#

it says 1

ornate grotto
#

no matter what

fleet bridge
#

1 is less than 50, checks out

#

i believe its just a 0 to 1.0 scale?

#

as in, 0% to 100% health

ornate grotto
#

nope

#

when i change my hp nothing happens

#

50 is 0.5

upbeat spindle
#

Hrmkph, I need to access a given square, but I'm completely in the dark as to how the fudge I define an IsoSquare -object with only its world coordinates

Like for some reason a vast majority of """tutorials""" just state cell = world:getCell(), but this seems to me like it is a clientside call and not a serverside, rhnhrmknghmknasg

fleet bridge
#

is it suppose to be getPlayer():getBodyDamage():getHealth()?

bright fog
ornate grotto
ornate grotto
#

ty

#

but i have one more problem

#

its that code doesn't auto execute

fleet bridge
#
local InjuryRedTextTint = (100 - self:getPatient():getBodyDamage():getHealth()) / 100```

from ISHealthPanel
bright fog
ornate grotto
# bright fog how so ?

when i join the game nothing happens, my variables are changin, it works only when i manually execute it

upbeat spindle
ornate grotto
bright fog
ornate grotto
bright fog
#

Go download a random mod and check how they organise their folder

#

In media/lua you either put it in /client /server or /shared

#

Does what you expect

#

client only affects the clientside and server only serverside

#

And shared idk how it handles shit but it affects both sort of ?

fleet bridge
bright fog
ornate grotto
bright fog
#

Legitimate question, I lack some knowledge in modding

ornate grotto
#

anyways, how do i like cancel the animation where u are being eaten, like how to detect it happens

bright fog
#

uuuuh

ornate grotto
#

godmode doesn't cancel it

fleet bridge
#

the onplayerupdate event will pass the player variable down

#
local function OnPlayerUpdate(player)
    -- Your code here
end

Events.OnPlayerUpdate.Add(OnPlayerUpdate)```
ornate grotto
#

how to make a wait() function

fleet bridge
#

otherwise if there are lots of people in close proximity it might trigger for them too

ornate grotto
#

i need it to wait for 0.1 seconds

bronze yoke
#

there's no wait in kahlua, best you can do is an ontick handler that checks if enough time has passed

ornate grotto
#

also how do i heal the player fully but not using the godmode, like remove sicknesses and infection

#

like fully heal but not godmode

upbeat spindle
#

be me
copypaste a tutorial given by official pz sources
the syntax in the tutorial is wrong

nice

patent holly
#

lmao

upbeat spindle
#

otoh the tutorial is from 2012, maybe they changed GetBlabla()'s into getBlabla()'s

patent holly
#

ah yeah, one or two things may have changed since then lol

#

I dunno if it's always been that way, but lowercase first is def the convention now

#

Does anyone know if a splitscreen player is considered a client in solo? I can't test atm

bronze yoke
#

in what sense?

upbeat spindle
#

how the fucking fuck is it this difficult to access a fucking sprite in a fucking tile hr,mrhnmgrnmhnm

patent holly
bronze yoke
#

generally but it's all the same code so they can be treated as clients in many places

patent holly
#

do you happen to know how to check if a session is mp specifically?

crisp dew
upbeat spindle
#

this pain SUCKS

#

pz lua makes me want to perform inexplicable violence to objects near me

bronze yoke
crisp dew
#

I don't mind the LUA aspect, but TileZed makes me feel that way.

bronze yoke
#

one of these should be true in multiplayer, neither should be true in singleplayer

patent holly
#

Guess that's what I'm doing tonight. Whoot

ornate grotto
#

guys how do i prevent player death

#

all i know is that this function runs a second before the death or less than a second

#
 local function OnPlayerDeath(player)
    player:setGodMod(true)
end

Events.OnPlayerDeath.Add(OnPlayerDeath)

what i have tried

#

oh wait i sent the wrong one

#

there

crisp dew
#

Events are triggered 'on' something, ie: after the action has been initiated so that listeners can implement logic upon that event firing.

ornate grotto
bronze yoke
#

i'm not sure you can

#

when this event fires the player is already dying

ornate grotto
#

what about character

upbeat spindle
#

like how the fuck is it near-impossible to access one freaking tile, and the objects that are in it

#

this shit shouldnt take 4+hours to do some goddamn obscure raindances with a blackbox that refuses to tell me how it works angry

bronze yoke
#

what are you having trouble with?

upbeat spindle
#

accessing a tile and the objects that are in it cant you read

#

tile being synonyme to a square

crisp dew
#

I've seen that functionality before I believe, but I forgot exactly where I saw it.

upbeat spindle
#

i know the exact world coordinate in X Y Z that a given sprite is in, and i've struggled for aeons to tell the goddamn game that this indeed is the sprite that i want to interact with using lua

bronze yoke
#

getSquare(x, y, z)

upbeat spindle
#

then what is this nonsense of getWorld():getCell():getGridSquare(x,y,z)

#

if its just a getSquare() then i'll praise you to the highest honors

bronze yoke
#

that's what getSquare ultimately calls upon iirc but getSquare is provided to keep the lua api cleaner than that

upbeat spindle
#

:DDDDDDDDDDDDDDDDDD i'm gonna bang my head into a goddamn bucket

ornate grotto
#

how do i prevent player death?

bronze yoke
#

keep in mind that a square that is not currently loaded cannot be accessed in any way

ornate grotto
#

like reset his health to full when u are about to die

upbeat spindle
#

i'll report on whether this works

ornate grotto
#

pls

#

how do i make so when player is about to die his health goes back to full

#

so he doesn't die

#

and it works only once

upbeat spindle
#

(to the highest honors)

sour island
#

Also added page support

bright fog
ornate grotto
bright fog
#

Or just learn from it :)

#

Tho it doesn't work in some cases

#

Like since I do TLOU modding, the clickers oneshot you, and the cheat doesn't prevent that

#

I haven't even tested it properly yet, if it actually saves you

patent holly
#

Mfw I haven't saved and my power goes out hungover

upbeat spindle
#

I GOT IT TO WORK

#

praised be merry christmas!! to the highest of honors!

patent holly
#

Noice. I only caught the end of it, what are you doing that was so specific to that square?

upbeat spindle
#

An appletree

#

The part that I got to working is that now the script fires each day, and changes the sprite of the appletree if a season has changed

patent holly
#

Ahhhh, okay. Very cool.

upbeat spindle
#

Next part is to also spawn some apples into it โœจ

void ember
#

How would I add a new tab under the sandbox options

bright fog
#

uh

#

Under the sandbox options ?

patent holly
#

lol That yours @bronze yoke?

bronze yoke
#

it is!

patent holly
#

Nice! I saw the profile pic and was wondering before you reacted lol Very helpful guide!

bronze yoke
#

glad to help ^^

upbeat spindle
#

Ok.

#

Why is this ok:

local AppleTreeX = 1;
local AppleTreeY = 1;

But this breaks everything:

local AppleTreeX = {1,2};
local AppleTreeY = {1,2};
#

AFAIK every single lua tutorial on arrays and lists tells me the latter is also OK, but for some reason it breaks all functionality from my script that worked just well with the above formation for only one coordinate pair

#

It refuses to even print the list if i put it into a print()

#

It refuses to access things like AppleTreeX[1]

#

i swear to got the person who invented programming was a sadist, and everyone who thought this is a good idea, i'll also do it, is a masochist

#

Is the issue in that syntax, or should I suspect I added some extra semicolon into a nonsensical spot while doing it

bronze yoke
#

that part is fine

#

semicolons don't do anything in lua so unless you put one somewhere completely ridiculous they shouldn't cause problems

upbeat spindle
#

So then I must've done something else to mess the code than the array

#

hmmm...

#

Well, atleast reverting back to the single-tree -case I managed to spawn apples in it :3

#

I probly should ask the maker of the farmable apple trees -mod if I can use their sprite for my mod in case I ever release this on steam, these are nice sprites

bright fog
upbeat spindle
#

That's trivial:

                for j = 1, (ZombRand(20)+1) do
                    AppleTree:getContainer():AddItem("Apple");
                end
#

The last step to figure out is to access all the appletrees i plant in the map via map editor, which should also be trivial if i just hardcode them as a list

mystic lava
#

Hello all! I'm working on a small mod and have a few questions. I have very little experience with writing mods for PZ and I'm not very familiar with lua. Anyway, the mod I'm working on adds a single item, for now, which is a bag. I've basically copied the decalation of the Satchel and changed a few things around to make the new item something different. I've made a crafting recipe and an icon for it so it's distinquishable in one's inventory. How would I change the way the bag appears in the game world? Would I have to make a new model for it?

tranquil kindle
# mystic lava Hello all! I'm working on a small mod and have a few questions. I have very litt...

If you want custom model, then you do need one. Then you would have to rig it into player armature, assign the Weights so it moves with the player model, You do need to export 4 separate models (1 with weight suited for backpack on back, 2 models where each would be in right and left hand with their weights assignet aswell and finally one final model exported without any bones/armature, as it would be just World model that would appear on ground) if you would like to have it work like in vanila.

mystic lava
tranquil kindle
# mystic lava Any way to make that easy? I intended on the bag functioning the same as the sat...
The Indie Stone Forums

Hello and Welcome! Here you will find a concise and comprehensive guide and tutorial of making 3D models for Project Zomboid. Currently, this will mainly pertain to custom Clothing creation but may include weapon creation in the future. This will present how to create models from scratch with Ble...

tranquil kindle
mystic lava
#

I'm aware of its existence lol

#

I have no experience with it

tranquil kindle
#

Well... its kinda needed to create a model and then rig it. There is no easier way, even if you were to find model on the internet, you still need to tell game where its supposed to be on body and how to move with it and thats the task of Armature in blender

bright fog
#

Considering PZ is low poly, it's not extremely hard to make a model

#

Depends what you plan on modeling

#

I tried learning blender a while ago, it was fairly easy but it was to make just 3D models

#

You can find a bunch of tutorial for Blender nowadays

mystic lava
#

If one exists, anyway

sour island
#

The competition for most re-uploaded I think has been decided...

๐Ÿฅ

With a whopping 918 re-uploads...

๐Ÿฅ

||ModTemplate|| unhappy

#

Honorable mention is ||Arsenal Gunfighter with 360+|| ๐Ÿ˜…

fierce thunder
#

once you have a mod prototype and want to test it in game, do any of you know which file folder I would put it in?

sour island
fierce thunder
#

Oh gotcha thanks, the mods folder seems to have worked for me

sour island
fierce thunder
#

can you have a tile mod that allows the crafting of a tile without the use of pack files and tilezed?

void ember
patent holly
bright fog
#

It's because the configs of the mod were side mods at first I believe

void ember
patent holly
#

oh sorry, that's for the mod.info sandbox options are just .txt

bright fog
patent holly
#

"sandbox-options.txt" specifically

bright fog
void ember
#

I have the sandbox-options.txt

bright fog
#

Like this is something you could have figured out in 2 seconds by taking a random mod with sandbox options (if you're into mods and don't know one, idk what to tell you lol) and check how they do it

void ember
#

but when Im putting the script in there what does it need to be

#

Sorry if its a dumb question im new to all of this

bright fog
#

Go do that

#

Things will be so much clear right after

#

It is very small, easy to understand

#

You don't even need to look at what it does

#

Your best friend in programmation is to just look what others do, because everyone does that and you rarely get a genius out of nowhere that did everything himself

hollow current
#

can someone explain what exactly transmitModData() does?

sour island
fast galleon
sour island
#

I can't even check truemusic cause most of them are the addons

#

I forgot gunfighter told everyone to make submods for configs lol

#

I vote it is disqualified and skill journal is reinstated as the 2nd runner up with 39 drunk

fast galleon
#

The number of people who have shown me logs because something doesn't work and had the ||ModTemplate|| enabled is high.

#

But wow, 918 public mods.

crisp dew
#

grrr, ScriptItems support AcceptItemFunction, but TileZed doesn't seem to have similar functionality for Tiles.

bright fog
#

Configs files for every server that were created back then when that was the only solution to get configs for Arsenal b41 I guess

fast galleon
bright fog
#

I think I'll definitely stop using Arsenal B41, the mod just has too many issues

crisp dew
#

Happen to know where I can look to implement this functionality? I'm sifting through the extracted game code now, but it's a slow process.

fast galleon
#

I use it in the solar panels mod

#

I remember explaining it before here, need to find the message.

crisp dew
#

If you just let me know which solar mod, I can reverse engineer what you did from your code.

#

ah, nvm, believe I found ya

crisp dew
#

Ah, someone with source code actually published, nice to see that!

#

I'll be publishing mine on github as well, but won't upload until it's at least half-way working.

fast galleon
#

You need to set the function in 2 places, when the object is first placed and when it is loaded again.

crisp dew
#

That placed handled in your client lua in o.process()?

fast galleon
#

I have a global object, not sure if this works for your case.

crisp dew
#

eh, it'll give me a starting point at least. Thanks!

fast galleon
#

You could use the OnObjectAdded event or maybe something else.

crisp dew
#

True, if placedItem == myContainer, ...

#

If only we could just attach a function based off the ContainerType

echo whale
#

I was digging through some mod files and I saw a setPoisonLevel function. Is there anywhere that tells me what this stat is and what it does? I'm assuming it makes your character sick, but I have no idea what the value itself is supposed to represent. Is it a percentage? or is there a certain threshold where it starts killing your character?

crisp dew
#

ummm, ok

crisp dew
#

Yup, having success with Events.OnObjectAdded! Got a breakpoint when I placed the tile ๐Ÿ™‚

upbeat spindle
#

These calls print what they should print:
print(AppleTree);
print(AppleTree:getSprite());
print(AppleTree:getSprite():getName());

However, after changing a sprite with
if AppleTree:getSprite():getName() == "spritename" then
AppleTree:setSprite("anotherspritename");
end

The abovementioned three calls no longer print what they should. AppleTree still exists, but getSprite() is no longer the same for 3 AppleTrees that have the same visual sprite, and getName() returns nil.

#

What am I missing when updating the sprite with setsprite?

#

This is how the logs see those print calls at the point where the sprite is changed, repeated for 3 separate AppleTrees:

LOG : General , 1704335823514> zombie.iso.objects.IsoTree@74ab0c84
LOG : General , 1704335823515> zombie.iso.sprite.IsoSprite@3ed49315
LOG : General , 1704335823516> mosapuut_01_1
LOG : General , 1704335823517> zombie.iso.objects.IsoTree@4487f330
LOG : General , 1704335823517> zombie.iso.sprite.IsoSprite@3ed49315
LOG : General , 1704335823518> mosapuut_01_1
LOG : General , 1704335823519> zombie.iso.objects.IsoTree@64b50534
LOG : General , 1704335823519> zombie.iso.sprite.IsoSprite@3ed49315
LOG : General , 1704335823520> mosapuut_01_1

LOG : General , 1704335843803> zombie.iso.objects.IsoTree@74ab0c84
LOG : General , 1704335843803> zombie.iso.sprite.IsoSprite@deca6bf
LOG : General , 1704335843804> nil
LOG : General , 1704335843805> zombie.iso.objects.IsoTree@4487f330
LOG : General , 1704335843805> zombie.iso.sprite.IsoSprite@10914a30
LOG : General , 1704335843806> nil
LOG : General , 1704335843806> zombie.iso.objects.IsoTree@64b50534
LOG : General , 1704335843807> zombie.iso.sprite.IsoSprite@415cf920
LOG : General , 1704335843807> nil

crisp dew
#

Does the other sprite you set it to not have a name?

upbeat spindle
#

It is in the same spritesheet right next to the sprite I'm changing from

#

The spritesheet is well-defined.

crisp dew
#

also you can always do what I'm doing; force an Exception to be triggered in that block of code and look at the call stack in-game.

upbeat spindle
#

Also: how and why does getSprite() return a different identifier for all three AppleTrees if the sprite i'm changing them to is the exact same

#

Visually they look the same, visually all of this works brilliantly.

crisp dew
#

According to your log, IsoSprite is a different location in memory.

upbeat spindle
#

Yes, I can read, I'm asking for how to interpret what I've just read.

#

This feels complete nonsense as to why the sprite I'm referring to would suddenly be in three different memory locations

crisp dew
#

Oh, I just noticed that, that is fun, isn't it? The first pass it's all the same variable, but then it's suddenly something different each pass

frank elbow
# hollow current can someone explain what exactly ``transmitModData()`` does?

If called from the client: sends the relevant mod data to the server, which receives it, updates its copy, and propagates changes to other clients
If called from the server: sends mod data to clients

It's only necessary for certain things, since some handle syncing themselves. Couldn't tell you which because I don't remember ๐Ÿ˜„ (maybe IsoObjects & IsoGridSquares?)

rough yarrow
#

does anyone know how to make your own skill VHS tapes? ive been stuck on it and im also confused on why the messages are encoded strings and have to be decoded

harsh herald
#

Someone should make a mod that adds more suicide options other than bleach

void ember
hollow current
harsh herald
#

Bet

hollow current
#

alright so im trying to solve a bug in one of my mods where renaming an item on a MP server won't appear for other players or get saved when server restarts, unless the item is renamed in main inventory, or if renamed in another container then moved between containers. I assume something triggers the "name saving" when the item is moved, so I checked the relevant vanilla files but no luck. I think the function addItemOnServer does it, but I can't tell for sure, and its not useful in my case anyways

I also tried to pass the item using sendClientCommand, which then passes the item to all clients using sendServerCommand, and renames it on all clients, but apparently the item becomes nil somwhere in the process

Anyone has an idea of how to solve this?

P.S.: an item is renamed in the mod using item:setName()

hollow current
#

also vehicle's moddata isn't saved on MP either, not sure why

fast galleon
bleak dune
#

if here is some guy that makes mods. please make a mod that we can craft traps in and for example put them under windows

upbeat spindle
#

Thanks a billion, I also think this could fix my issue with container overlays I ran into, since now the sprites seem to be more properly defined in-game than before โค๏ธ

upbeat spindle
#

In containeroverlays, the room is defined as "other" by default. However, my container overlay doesn't seem to work. Would there be a specific room definition that is valid outdoors?

Hm. The containeroverlay works. What doesn't work is a containeroverlay for the object whose sprite I change with lua.

upbeat spindle
#

I thought containeroverlays were associated with sprites, and the lua-changed sprite is the exact same as the one to which the overlay is associated to, when I print it using getSprite():getName()

#

njaha, so its most likely associated with the luaobject, and the constructor of the object merely checks the sprite and then slaps the appropriate containeroverlays to the object

#

that's why a pre-placed appletree behaves like this when it has items

#

and a lua-sprite-changed -appletree behaves like this when it has items, even if the visual sprite is exact same and verified through print calls

#

let's see if "setOverlaySprite()" would fix it

#

Yep!

#

HAHAA!

#

FINALLY

sour island
#

Oof, wish I was around, I could have pointed you to overlay sprites ๐Ÿ˜…

#

You can also tie actions to overlays

#

Similar to removal of vines

#

I'm case you wanted to tie a picking function and not have to fetch the overlay as well as house modData

#

Oh you're already sorted on that front ๐Ÿ‘

upbeat spindle
#

It looks like it behaves as it should, so I'm gonna keep it as is and wait for the moment a playtester eventually breaks everything ๐Ÿซก

#

"It's just a container whose sprite changes depending on a season, and spawns some items in it depending on a season, how hard can it be?"

#

a very pz-esque funny feature, not a bug, is that i can store my socks in an appletree and it looks like a bunch of ripe apples during autumn

crisp dew
#

Yup, same thought, "I'll make a simple garage container for a specific type of item and displays how many of those items you store visually, should be simple, right?" heh.... sure

fleet bridge
upbeat spindle
#

this exists completely outside the farming system

fleet bridge
#

Might need to prevent people from dumping random stuff in it then so they can't fill the tree with random stuff

#

And prevent apples from spawning

upbeat spindle
#

b r a h

#

dumping random stuff into the tree is part of the fun

fleet bridge
#

"look I grew all these ripped sheets!"

upbeat spindle
#

turns out the add items -part of the script can, and will go beyond container limits

#

so the tree can't be blocked from spawning apples whenever the time comes

fleet bridge
#

Ah yea I was thinking of container spawns

#

People with organized be malding if they can't grow an extra 30% more apples if that's the case lol

upbeat spindle
#

nono, the logic is, in its simplicity,

check day number
if in range Range
do things, including set appropriate sprite or spawn a bunch of apples

fleet bridge
#

You could make it so it doesn't grow in winter too...

upbeat spindle
#

...

#

as if i didnt already do it

fleet bridge
#

Love me some winter farming

upbeat spindle
#

the wintertime appropriate sprite is there, and the only time it spawns apples is in autumn

#

ain't no that pz infinite crop every 3 weeks -nonsense from these beauties

fleet bridge
#

Nice, any plans for other fruit trees?

upbeat spindle
#

Nope, but I will release the script whenever the map is released. :P

#

Should be simple enough for others to adapt, but the drawback is that it is hardcoded for trees that are pre-placed via tile editor, and no more trees can be planted.

#

In other words, it fits my scenario well enough, and I don't have an interest to push it to be more general

fleet bridge
#

I see, still pretty cool implementation.

upbeat spindle
#

thx!

#

I'd imagine the generalization to also have plantable trees would be to make the script check all tiles in the map for whether it is an appletree, and I suspect it gets quite heavy to check the entire map every day.

#

The other necessary bit would be to program a script to generate new IsoObjects that are apple tree saplings, and then to account for the growth of saplings would be a different routine than the one that merely checks what season an adult apple tree should be in

#

Considering the timescale in an usual PZ playthrough, I guess the most meaningful way to include fruit trees is to just have a set of pre-existing ones and be happy with it

fleet bridge
#

Still interesting to see it done, perhaps one day the idea can be used on placeable containers where the sprite updates based on planted duration and season

upbeat spindle
#

I'm not experienced enough to know how to make these objects have an independent memory of their own past, but if that is doable, then that'd be doable, yes!

#

tbh I'm already super surprised that the game allows for a sprite that acts as a tree that can be chopped for logs, as well as a container.

crisp dew
#

TK, you can attach this logic onto the actual Tile object, so it could support a plantable tree concept.

#

It's a little weird as the game doesn't natively support it, but it works.

fleet bridge
#

I believe you can attach mod data to the object, then use transmitCompleteItemToServer() and transmitModData() so the information persists

bright fog
#

Is there a way to remove a trait from the character creation panel ?

sick yew
#

Considering someone has already made a mortar mod

#

How feasible would it be to make a 155mm / 203mm artillery mod?

#

Enter in coordinates, cause a huge explosion in the assigned coordinates

patent holly
#

I believe they're the ones with a "2" iirc. I think they were planning on changing them but didn't get around to it.

bright fog
#

Hey I found how but thx ;)

patent holly
#

Noice

bright fog
#

Just Spyjack hid the .lua in random folders so I was having trouble actually finding how he added the Susceptible trait in his mod lol

#

It was in lua\shared\NPC

#
local function initSusceptibleTrait()
    TraitFactory.addTrait("Susceptible", getText("UI_trait_Susceptible"), -11, getText("UI_trait_SusceptibleDesc"), false, false);
end

Events.OnGameBoot.Add(initSusceptibleTrait);
#

That's how to add a trait

#

Actually to remove a trait it seems like you can't just remove this line of code lol

patent holly
bright fog
#

I know why

#

I did a thing where you check a sandbox option to stop players from getting the trait

#

But since it loads the trait ongameboot

#

The sandbox option was by default true

#

So the trait was always here anyway

#

The way more trait removes traits, is by having a secondary mod loaded in, and this is checked on game load

#

So you are sure the trait will be removed if you have loaded the side mod that removes the trait

#

I'm doing that

mellow frigate
bright fog
#

But you are right, I should learn to use them, but at my level of modding it seems to be ok

#

I do simply scrapping of code right now

mellow frigate
#

Most importantly and obviously: do as you please. Secondly, I would be very surprise that mods and debug mod mess with boot time significantly more than cheat mods. I am also perplex with the notion of 'heavy modpacks' (especially the plural to modpack) so maybe this why I do not understand the rest. Anyway have fun out there.

bright fog
#

Oh boy, has debug mod caused me some issues. Between the glitches that can happen and make it absolutely impossible to read and just the overall need to press the play button (no idea if it has a specific name) to close 3 times the debug menu to actually have the game and/or save to boot up

#

Basically to load debug menu in a heavy modpack, I need to unload all my mods, and join my save with all the mods which will reload all the mods

#

If I load my heavy modpack with debug mode, the main menu will not appear, only the background image

#

Probably some mods fucking it up but hey tis okay, I can still use it as long as I do that manipulation lol

mellow frigate
crisp dew
#

If mods muck up debug mode, I'd 100% ditch those mods.

bright fog
crisp dew
#

Well that would be pretty easy; the debugger tells you what mod threw the Exception.

mellow frigate
bright fog
#

cdp ?

#

oh the guy nvm

bright fog
#

Tbf I'm just fine with not using the debug menu rn

crisp dew
#

Reminds me of jobs I've had in the past. I'd turn on debug mode on an application I'm working on only to get assaulted with a bunch of issues. When asking about those, other devs would just say "yeah, that's why we don't enable debug mode" or even better "there's a debug mode?!?".

bright fog
#

lmao

crisp dew
#

Covering up the glaring underlying issues in code with a blanket and just not looking at them does not magically make your bugs disappear.

mellow frigate
crisp dew
#

(not saying you personally, just in general)

bright fog
#

ahah no worries lol

#

Technically I don't debug my mods with my heavy modpacks, so I could technically use it for mod creation rn

#

I don't really know the features of debug mode, and I'm not too sure those would actually help me for my current modding intentions

#

Like anything in coding, just pure lack of knowledge of what's possible and available

mellow frigate
crisp dew
#

Aye, debuggers can be overwhelming at first, but once you get a grasp of how they function, they're MASSIVE time savers.

sour island
#

Alot of modders drop print() in debug only

#

That's the only "issue" I can think of

crisp dew
#

example: I'm working on a mod and am trying to figure out containers and how to retrieve its item contents.

sour island
#

Also prints rendering onto the console can cause some stuttering

crisp dew
#

There's getContainer and getItemContainer.... WTF is the difference? What do they return?

bright fog
#

I mean, those print I only use for debugging

#

Tho they don't always render in the console and I'm not too sure why

crisp dew
bright fog
crisp dew
#

The debugger shows me local variables, so I can see that continer and containerContents point to the same space in memory, so those two functions do the same thing.

bright fog
#

hmm

#

bruh

#

Probably an upsie on the dev's side

sour island
#

One is for if the item has a container

crisp dew
#

I can also dive into the object and look at all the properties on it

bright fog
#

Interesting

crisp dew
#

Still, it pales in competition to Jetbrain's debugger and I would love if I could find a way to integrate the running application into it, but that would require configuring JRE to connect back to the IDE, which I'm too lazy to do at the moment

gleaming sequoia
#

for a mod to edit an item's variable can I just do this

item WeddingJacket
    {
        ScratchDefense = 70,
    }

will this override that item's ScratchDefense or must I also write rest of its properties?

gleaming sequoia
#

Another question, where can I find this Jacket property? I need to change a clothing's body protection areas and I believe this is it?

item Jacket_WhiteTINT
    {
        BodyLocation = Jacket,
    }
fleet bridge
#

You want to use script manager and use DoParam to change the item

gleaming sequoia
#

I dont understand

gleaming sequoia
fleet bridge
#

No because you'll just overwrite the entire item and you're missing everything else

#

So you'll just brick the item and cause other issues

#

You need the rest of the properties. But you can use DoParam to do it. Search for DoParam in this discord for some examples.

crisp dew
#

vs

#

it works ๐Ÿ™‚ (and yes, I'm aware there's an overlay management feature in tiles already, but it only supports 0, 1, and 2+ quantities, whereas I wanted 0..12)

frank elbow
#

With the benefit of more context, since they could have different behavior depending on whatever factors

crisp dew
#

Well yeah, you should also have access to the decompiled code, that's useful when actually writing the code, whereas the debugger will give context of the running code.

#

Also make sure your IDE is setup to use that code as a source library, so you can benefit from autocomplete, typecast hinting, etc.

frank elbow
crisp dew
frank elbow
#

Serves essentially the same purpose, but idt that's maintained + Umbrella includes typings for Lua events as well as the Java & Lua

crisp dew
#

If you want to use Umbrella with IntelliJ IDEA, you need to use a build from before 2023

Oh..... got it. Different IDE.

#

I don't know how well that zdoc repo is maintained, but seeing that I had to patch it to get it to work on a41, probably not overly well. It's got native Linux support though, so it worked well for my needs.

frank elbow
#

Yeah, I remember having to tinker with that one when I used it, too. I imagine the same will be true of future builds unfortunately, unless it's updated

void ember
#

Can someone help me figure out why my new sandbox tab isnโ€™t working even though I have the file order right and everything in it right

frank elbow
#

I think we should first confirm that you actually have the file order & everything in it right, but before that: is the mod enabled in the main menu's mod menu (as opposed to the save)? Also, you're referring to options added in sandbox-options.txt, yeah?

worthy terrace
#

Any of you awesome devs willing to hop on a 1:1 voice chat and tutor me a little bit? To be clear I'm looking for someone to give me the basic run down of mod file structures, best practices, and limitations? I'm not a dev noob, and I've been a Mobile App Dev for 5+ years now so I have a solid understanding of foundational programming skills. I want to build a very simple mod to start, a leaderboard, and I think that would be a great foundation to get started with modding. I have so many ideas I want to build, but resources online seem spotty. Blackbeard on YT shows some stuff and theres one other, but their videos aren't very explanatory in a way that works for me.

crisp dew
#

I would, but this is my first time fumbling through this too.

void ember
mellow frigate
# worthy terrace Any of you awesome devs willing to hop on a 1:1 voice chat and tutor me a little...

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
worthy terrace
mellow frigate
worthy terrace
#

Lol thats fair. What I really need is more of how do different files interact with one another, where's the entry point, how can I use a dependency, etc..

mellow frigate
#

entry points are mostly events (see page above for events)

#

others are functions override, see FWolf's guide (see page above)

worthy terrace
#

Ty that's quality stuff my friend ๐Ÿ˜„

worthy terrace
#

Oh my there's TS for PZ modding ๐Ÿ˜ฒ

hollow current
#

Any idea what's the correct way to pass an InventoryItem object from client to server, then back to all clients, using Server/Client commands?

#

I thought about item:getID() but it requires a container to retrieve the object using its id, which I can't pass

sour island
hollow current
#

I mean, in certain cases, modifying its modData will be useful too

#

apparently passing the item object directly in sendClientCommand makes it nil

sour island
#

I only ask cause modData has the same caveats

#

What I do in gameNight is move the item into the player's inventory discretely and back out

#

I suppose you could try sending a command to the server to then send to all clients

#

Like if the item is not in the player's inventory -> send to server -> send to clients

#

But I'm not sure if those changes will take as I never tried that

hollow current
hollow current
mellow frigate
hollow current
#

Doesn't seem to solve the problem

fierce thunder
#

Does anyone know why my TileZed tiles are offset? These are the main pz tiles not even my custom ones and they all do this! Any help greatly appreciated I've been struggling with this for hours

sour island
#

Had to place a delay for my stuff though to prevent the vanilla issue of items not self correcting the item ID being in the same container multiple times or multiple containers

sharp totem
#

Sorry new here :P, How can I get a player faction id and store it in a file? I've looked around online and at other faction mods but I'm lost and my head hurts so any help is greatly appreciated

mystic lava
fleet bridge
fierce thunder
junior mason
#

I'm trying to make a function that ticks while the player is in a moving vehicle. Is there a good way to do that that doesn't involve riding the onPlayerUpdate/onTick events constantly?
Would adding the function to onPlayerUpdate using onEnterVehicle and removing it using onExitVehicle work?
If it helps: End goal is to collect information (movement/condition/passengers) on the vehicle and use that information to modify the player.

fleet bridge
#

Why not use onplayermove?

junior mason
#

Doesn't seem to work in a vehicle when I tested it.

fleet bridge
#

Adding and removing player update would work on vehicle entry and exit

#

It's how ki5 maintains minimum part condition on cars iirc

#

Also the reason why apc is indestructible lol

junior mason
#

OnUseVehicle is only for the driver, unfortunately :/

drifting ore
#

see VehicleManager.clientPacket(ByteBuffer var1) this method seems to handle the packet bytes for each client in different switch statements to achieve certain things

hollow current
cedar kraken
#

Is there a way to detect if thereโ€™s a puddle present on a tile?

#

Say after it rains, way to get a function which will check every tile in the area the player is in every 10 in-game minutes and see if there are puddles present

#

I didnโ€™t see anything for the detection of puddles in the climate manager

patent holly
# cedar kraken Is there a way to detect if thereโ€™s a puddle present on a tile?

I'm not sure if there's a better way to do it, but I was in ISWorldObjectContextMenu.lua and saw

local function isPuddleOrRiver(object)
if not object or not object:getSprite() then return false end
if not object:hasWater() then return false end
return object:getSprite():getProperties():Is(IsoFlagType.solidfloor)
end

At least that's how it figures puddles for the context menu

nova socket
#

Crucial question.

Any idea if there is a way to perform /addvehicle directly from server Lua?

pastel raptor
#

Hello everybody guys, can somebody help me? I have a problem with one of my custom traits mod. I mean, I ran a dedicated server a few days ago and I put on it a few mods containing custom traits I made. The problem is, everything works fine but when I try to add a new trait as admin to a player or to myself, the player is not able to see it in the "info" panel. If I try to add the trait to myself, I can see the icon in the panel. Moreover, when I add the trait to a player, if he has other custom traits, they disappear :(. Could anybody help me understanding why?

mellow frigate
torn igloo
hollow current
#

Will try to mess more with it

eager grotto
#

Hello guys, I just made 2 weapons mod CM901 and ACR, does anyone has an idea how to make my mods compatible with brita's weapon pack mod? specifically in distribution part?

fleet bridge
#

Believe you may need to do table.remove, setname, then table.insert. Check out ISInventoryPane there's a function that loops the items on the container and does table insert

#

Otherwise yea drop it on the floor and stuff it back in the container with an instant timed action to get it to stick

livid badger
#

Hello! I needed to get a list of global farming objects as an array of objects. The goal is to check that each sprite matches the current growth phase of the game's cultures every game hour. How can I efficiently retrieve and process this list of objects in my script?

hollow current
fleet bridge
hollow current
#

well when you put it that way.. that's actually a decent idea

#

I made it so that its transferred to player's inventory and then back to the container with maxTime set to 1. It seems to actually work very well

fleet bridge
#

it won't work if the player is max encumbered or wil become max encumbered, but otherwise it should work

hollow current
#

it works even if the player is encumbered

fleet bridge
#

i mean at 50 carry

#

they wont be able to pull the item out

hollow current
#

oh

fleet bridge
#

probably no big deal, but if you want to avoid that fringe case (it's inevitable) just make it so you can only do it from main player inventory

hollow current
#

yup doesn't seem to work at capacity > 50, will make it so that renaming items happen only from inventory

#

seems like least troublesome option honestly

fleet bridge
#

you could do the item transfer to player inventory first, then check if its in the inventory before renaming

#

if you wanted to preserve what you already wrote

#

basically the same thing, if you're >50 encumbrance you're not going to be moving items anyhow lol

hollow current
#

i would go with the dropping on floor instead of moving to inventory logic, but it seems buggy

#

sometimes works, other times not

#

unless you mean to check if the item "successfully" moved to the inventory in the first place

fleet bridge
#

^

hollow current
#

its a good solution but inconsistent

fleet bridge
#

just needs to be consistent is pretty much the goal i think, otherwise people might get confused?

hollow current
#

exactly

potent mulch
#

I'll keep it sweet and short. I want to make channels on TV and radio chatter.

#

Where would I ultimately start?

cedar kraken
#

Itโ€™s for a mod which will add mosquitos

#

Also, I hear "Context Menu" get brought up a lot, but what does it mean exactly)

patent holly
cosmic sequoia
#

Hey I'm new to modding and I was wondering is there a location I can get the project zomboid clothing assets in .fbx format? I'm having trouble working with the .X format

potent mulch
#

I'm generally looking for context on modding the radio and tv channels

#

Does anyone have resources

cedar kraken
patent holly
patent holly
potent mulch
#

all of the radio sounds don't even play

#

42 is about to be out and I want people to go back in with something great

cedar kraken
#

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

potent mulch
#

Is there a cleaner way to do this?

#

Or is this jumble the only way to generate text out of devices?

patent holly
#

I'm def not an expert lol but afaik all the media lines are those encoded strings

potent mulch
#

There has to be cleaner code.

#

God I hope so.

patent holly
#

I think it's because those strings contain timing and player effects and stuff, but I'm not experienced with the recorded media

fast galleon
potent mulch
#

I can compare the results of what some Russains gave me as an example.

#

Then go from there.

#

This is exactly the gateway I needed. Thanks @fast galleon

#

the tool is made by the same dude who won't fix his shit

#

Whatever here I go

#

Both use unique id values for things like VoiceEntry, ChannelEntry, ScriptEntry, BroadcastEntry, and LineEntry.

#

One uses channels but the other uses adverts

#

No telling what script entry does

#

yeah i got this, all of this can be easily automated

#

won't even need this tool

hollow current
#

Never worked with global moddata before. Any reference I can learn about using it from? Also, how does it differ from normal moddata?

fleet bridge
#

getModData is attached to an object

#

global mod data is not attached to anything

#

local ModData = ModData.getOrCreate("whatever")

bright fog
#

getorcreate ? uh

fleet bridge
#

if "whatever" does not exist it creates it

bright fog
#

getOrCreate is an existing function ?

fleet bridge
#

yes

vernal fiber
#

How would I go about adding a player model to play as in zomboid

hollow current
fleet bridge
pulsar rock
#

Hey hi, has anyone made a decryption script for the player data field of the players database? Need it for some server management / statistics system.