#mod_development

1 messages ยท Page 272 of 1

ancient grail
#

can you show the mod info

#

and open cmd on the mod folder
then enter command

tree

#

then it might be duplicated mod which is the issue

gleaming sorrel
#

The original texture come straight from Project Zomboid so it makes since it was originally saved years ago.
I did use Gimp, but I've always used Gimp for this kinda thing and it's never done this before.

#

It's really strange.

#

I've made 2 textures just now and put them in a new mod folder.
I want to see if something is wrong with the export.

#

I placed it in a folder with other textures that I am 100% sure work just fine.

gleaming sorrel
#

Ok

I made the textures in the same way
I think it has something to do with me using the copy and paste tool for some reason.

The original male texture works fine.
But the female texture which I copied things from the male texture onto.
Doesn't work

#

I'm not sure why though.
This is worrying because the copy paste tool is the only thing that allows me to add rot layers to my textures.

gleaming sorrel
#

It seems to work if I copy-paste but avoid merging the 2 layers.
I'm not sure why, if anyone does know why that is please tell me so I can hopefully fix the textures.

#

At the very least I have a way to keep it from happening.

languid peak
#

Hey all, was doing some random looking through Github code for mods on the workshop and I noticed this code in a pretty widely used mod. It seems like the code is obfuscating something but I'm just unsure on why that would be needed. Is this a common thing to do for PZ mods?

https://github.com/Chuckleberry-Finn/EasyConfigChucked/blob/f916b82e2c4c7ad294b79ee3402b392679132f3c/Contents/mods/EasyConfigChucked/media/lua/shared/EasyConfigChucked1_Main.lua#L4

GitHub

Utility mod for Project Zomboid - Adds custom configuration for mods. - Chuckleberry-Finn/EasyConfigChucked

waxen knot
#

partly deobscufated
at zomb ie.GameWindow.WHY(GameWindow.java:101)
at zomb ie.core.profiling.AbstractPerformanceProfileProbe.ARE(AbstractPerformanceProfileProbe.java:32)
at zomb ie.GameWindow.YOU(GameWindow.java:115)
at zomb ie.GameWindow.READING(GameWindow.java:33)
at java.base/java.lang.Thread.THIS(Unknown Source)

#

(why are you reading this in caps)

#

stacktrace

languid peak
#

๐Ÿ˜‚ Ah so it's just an easter egg?

waxen knot
#

I haven't looked into it , i can send you the whole thing if you want to check it out

languid peak
#

How did you go about deobfuscating it? Did you just run it?

waxen knot
#

I took the numeric values being passed to string.char() and converted them back into their corresponding ASCII characters.

languid peak
#

Ah I see, the first ascii translator I used gave me a bunch of garbage output. Interesting that it's included here

waxen knot
#

you could also probably just send the string to gpt and have it done for you haha

#

yeah it does look dodgy

#

you can hide payloads like that

languid peak
#

Exactly what I was thinking. ChatGPT gave me some random answer about a lua debug function that made no sense so I figured I'd ask here

#

I guess it'll remain a mystery to me but thanks for checking it out anyway hahaha

coarse sinew
#

is for people who repack to mod

sour island
#

Who would mess with repackers like that?

#

But yes, it's a fake error that has a message in it. I may make it easier to read though as most people don't figure it out anyway.

#

It's my understanding for B42 (or later) mods will use their workshopID and modID together for identifying which folders to use. Which should prevent the incorrect folder being loaded due to matching modID

#

So I'll be able to stop using this snippet

lilac mural
#

Hi all. I was trying to make a mod and rn I'm changing item type from normal to clothing. After that item doesn't show tooltip and making errors..

    at zombie.inventory.types.Clothing.DoTooltip(Clothing.java:215)
    at zombie.inventory.InventoryItem.DoTooltip(InventoryItem.java:619)```
Is there's something I'm missing?
tranquil kindle
#

I'm pretty sure I've seen this copy paste before and it was from other scammer

sonic needle
#

yeah.. thats Sus for sure.

unreal copper
#

oh i completely forgot about that tutorial, thanks

round notch
#

๐Ÿคจ

sand gull
#

Hello, I am new to modding. I am trying to programmatically alter the attribute of an item without redefining it but I don't know how to access the specific item attributes because I don't know the names of the functions. I've been trying to search for the place where they are defined but I can't seem to find it. I am trying to alter the sawed of double barrel shotgun and alter the attribute ConditionLowerChanceOneIn using this script but it errors out because I don't think that function exists:

local function alterSawnOffDoubleBarrelShotgun()
local item = ScriptManager.instance:getItem("Base.DoubleBarrelShotgunSawnoff")
if item then
item:setConditionLowerChanceOneIn(100)
end
end

Events.OnGameBoot.Add(alterSawnOffDoubleBarrelShotgun)

lilac mural
sand gull
lilac mural
#

Try changing this line to item:DoParam(ConditionLowerChanceOneIn = 100)

sand gull
lilac mural
#

My bad, try this item:DoParam("ConditionLowerChanceOneIn = 100")

sand gull
copper abyss
#

If anybody can help me out with acouple things before I release this mod of mine it would be a MASSIVE help..

1: How do I import custom sounds?
2: How do I create a custom crafting recipe for my weapon?

crude forum
#

Is there any way to add new skintones? Asking because it's possible to add new hair colors to character creation.

small topaz
crude forum
sand gull
lilac mural
#

Uh.. I don't know actually

ancient grail
#

anyone know if its possible to reinitiate animsets handlers or whatever java uses to load animsets
i would really love it if i could add and remove xml files without having to restart the game every god damn time

ancient grail
#

note i added the texture not overwite

lilac mural
#

Is it possible to define clothingItem using model from another mod?

ancient grail
#

yes if you require the mod
then add another xml clothing item that uses that mods model

#

just note that you shouldnt just take from other mods
requiring them is ughhh required

crude forum
lilac mural
lilac mural
ancient grail
#

should be the same as how you would if the model is there on your mod
basically everything is sorted and merged virtually
so your mod should still be able to access that as if the file is there

lilac mural
#

So.. Something like skinned/clothes/somemodelname?

ancient grail
#

same as what you do with vanilla
you dont need to copy the files
since you alreeady have access

lilac mural
#

Okay.... I hope there'll be no errors this time

ancient grail
#

btw for clothing mods (unless its a lua question) i would suggest asking #modeling as they should know more

lilac mural
#

Nah, I'm just trying to make compatibility between two mods

ancient grail
#

yeah if thats the case then require do mods and you should be good to go

red tiger
#

Might write some documentation today for Pythoid, a Java mod that adds Python 2.7 support for modding PZ.

lilac mural
#

Okay, I still have this problem with tooltip and I don't know how to fix it

#

Like, it doesn't have wearable model, tooltip, and doesn't render 3d world model

sand gull
#

How do I print messages in console.txt?

left needle
#

Hello does anyone know how many items are in the game?

ember geode
#

guys can i write a mod code with chatgpt?

#

because i want to create a mod where sneaking reduces the zombies hearing distant (so that becomes a better option) and shooting atracts way more zombies.

i opened 2 windows with chatgbt and asked one of them to write the code so i can send it to the other one. the other thinks the code has methods the game doesent have and writes me a new one. now the first one says the same and so on

#

this is the current code:

#

if not getPlayer then
function getPlayer() return nil end
end

if not Events then
Events = {}
function Events.OnZombieUpdate() end
end

if not Events then
Events = {}
function Events.OnZombieUpdate()
return {
Add = function() end -- Dummy-Funktion
}
end
end

-- Zombie-Hรถrverhalten anpassen
local function AdjustZombieBehavior()
local world = getWorld() -- Ruft die Welt-Instanz ab
if world then
local zombies = world:getCell():getZombieList() -- Holt die Zombie-Liste
if zombies then
for i = 0, zombies:size() - 1 do
local zombie = zombies:get(i)

            -- Wenn der Zombie existiert, passe das Verhalten an
            if zombie and zombie:isUseless() == false then
                -- Reagiere auf laute Gerรคusche
                zombie:setTargetSoundRadius(zombie:getTargetSoundRadius() + 20)

                -- Reduziere Sichtweite bei Schleichmodus
                local player = getSpecificPlayer(0) or getPlayer() -- Fallback
                if player then
                    if player:isSneaking() then
                        zombie:setSeeThroughAlpha(0.2) -- Schleichen macht schwer sichtbar
                    else
                        zombie:setSeeThroughAlpha(1) -- Normale Sicht
                    end
                else
                    print("Kein Spieler gefunden!")
                end
            end
        end
    end
end

end

Events.OnZombieUpdate.Add(AdjustZombieBehavior)

bronze yoke
sour island
#

So the answer to your question is "no".

sand gull
#

Yeah, ChatGPT is an assistant. In order to program something you need to fully understand what ChatGPT is saying, scrutinize it and basically call it out whenever it "fabricates" something.

sour island
#

More so with PZ stuff

#

But also the code provided is just very very wrong even for Lua standards lol

bronze yoke
#

yeah this is the most insane code i've seen it output and it also does literally nothing you asked it to do

#

i'm guessing passing it back and forth between itself just caused it to amplify its own errors over and over

sour island
#

Pretty sure since it's making Events = {} it has even less context than normal

small topaz
#

Hi! I am currently trying to help a user of my mod to fix a problem and the problem is really weird and confusing. They are playing multiplayer with +250 mods (not good... ๐Ÿ˜‰ )

So, they get an error of the following form and it is apparently caused by one of my mods:

attempted index: Hair of non-table: null

Afaik, this error appears when you try to call a lua table with index "Hair" but the table doesn't exist. Thing is that the table absolutely exists in my code. It is hard coded in the shared folder and then accessed in the client folder via return-require. The code in client is the one which produces the error then.

I also tried to reproduce the error but it works completely fine for me (in single player as well as in multiplayer via host button). I also play-tested the stuff with a small selection of their mods (but not yet with all of them).

Has anyone an idea why the game cannot find those data although they are actually in the code? Is it somehow possible that mod conflicts can cause this behavior? I also thought there might be some strange load order issues going on but I cannot understand how those might happen since I use the return-require construction...

bronze yoke
#

how is your shared file named? is it possible another mod would use the same filename?

#

the only effect mod order has on lua is that if multiple mods have a lua file with the same filename, only the one from the mod latest in the load order will actually run

#

also be sure there is no other error - an error in the execution of the shared file would cause it to return nil which would also cause this error

small topaz
#

it is "[MyModsName]SharedData". so I guess it is unlikely that another mod uses the same name. but you never know ofc. in theory, this could be an explanation...

bronze yoke
#

seems very unlikely

small topaz
#

What do you guys do when your mod users report mysterious errors (in case that ever happens to you)?

Should also say that my mod is no way new. I published the 1st version 2 years ago and it seems to run quite stable for most people (there are some known incompatibilities though). Last update was a month ago but it only added a translation. There was a more technical update in October (I am therefore wondering if this is causing trouble to those specific users...).

bronze yoke
#

if it's crazy and only happening to one person, i give them some basic mod support but otherwise basically just ignore it LOL

small topaz
#

haha! think I am gonna do this too! XD

mellow frigate
#

also you may be tempted to consider all undetailed reports that way and save enough time to actually improve your mods or make new ones. do not resist the temptation!

copper abyss
#

Does anybody know how to apply custom sounds to a firearm mod?

ancient grail
# ember geode if not getPlayer then function getPlayer() return nil end end if not Events...

damn probably the worst ai generated pz code on
posted on this chat channel

also the mod you want to make isnt easy because you cant easily make zeds ignore you
there are several ways to do so but you have to do stuff to workaround certain limitations

like for example setting them useless will make em ignore you but then they will not move

or turning ghostmode but then players wont see you

you can set their target to nil but you have to spam it

theres no function to just tell a zed to ignore you
which means you cant easily modify its attraction to you

it seems to you that the idea is simple but to execute this mod project you will need alot more than just chat gpt so NO you cant use chat gpt to make a mod for you

ancient grail
#

if its your mod it via its item script
if its not you use scriptmanager doparam via lua

copper abyss
#

HOWEVER

#

do you possibly know if having the gun play a random sound out of acouple different sounds is possible

#

?

ancient grail
#

cool glad you figured it out

#

yes but thats probably gona require lua

#

you can choose not to add sound to it then onweaponswing event play a random sound

#

you can name your audio the same name

youraudio_0
youraudio_1
youraudio_2

then just do

local audio  ="youraudio_"..tostring(Zombrand(3))
copper abyss
#

ah I see! and I assume that If I have more then 3 sound files I can up that number and it will select one out of those?

#

I am not great with lua-

ancient grail
#

weird my codeblock didnt work

ancient grail
copper abyss
bronze yoke
#

"Sound_" but your file names don't have an underscore in them

#

also do not actually call them SoundX, that will make it very prone to conflicts from other mods

copper abyss
#

now- what do I set for my swing sound now that I've written this or is there more

#

this is the past setup:

#

Do I just set Swingsound to nothing, or is there more steps?

ancient grail
# copper abyss here is the directory, sound names, and what is written inside the lua file
function DogZedMod.getBarkSfx()
    return 'DogZed_Bark_'..tostring(ZombRand(1,7))
end
function DogZedMod.playSFX(zed, sfx, isAttract)
    if not DogZedMod.isDogZed(zed) then return end
    local range = 50
    local pl = getPlayer(); if not pl then return end
    if isClient() then
        if DogZedMod.isClosestPl(pl, zed) or pl == zed then
            local sq = zed:getSquare()
            if sq then
                local vol = DogZedMod.VolumeHandler(DogZedMod.checkDist(pl, zed), range)    
                getSoundManager():PlayWorldSound(tostring(sfx), sq, 0, 50, vol, false);
            end
        end
    else
        pl:playSoundLocal(sfx)    
    end
    if luautils.stringStarts(sfx, "DogZed_Howl") then
        pl:getStats():setPanic(100)        
    end
    if SandboxVars.DogZedMod.HowlAttracts or isAttract then
        addSound(zed, zed:getX(), zed:getY(), zed:getZ(), 50, 10);
    end
end




#

this isnt exactly what you need but this is what i used for my zeds

#

you would have to comeup with something else
use onswing and then play the sound from a function like
what i did with DogZedMod.getBarkSfx()

copper abyss
#

thank you! this is so much help you don't even know

#

I didn't know those were your custom zed mods!

#

I love the psycho oneโ™ฅ๏ธ

copper abyss
#

AWESOME! so it plays a random sound now!! I am working out the kinks right now so that it doesn't play when the gun is jammed or the gun is out of ammo

#

I can figure that out though

#

awesome! I'll come back later once its done with one last request! I appreciate all this help, thank you all so much!

languid peak
ancient grail
#

then check if the weapon is your weapon

#

then do the sound function

sonic needle
bronze yoke
#

eh? doparams don't have a gameplay time performance impact, they just guarantee compatibility with updates and other mods for no real downside

sonic needle
#

the itemscript is right there i mean, its adding steps to a new modder's workload that isnt required

bronze yoke
#

if you edit the item script, you are inherently incompatible with other mods that also edit that item script, and if the original script is changed in a mod update, your edit will still be based on the previous version

#

it's not difficult to do, has no meaningful performance impact and has several compatibility benefits

sonic needle
#

im quite used to avoiding code due to pz being, not great in 41, i do hope its better in 42

ancient grail
sonic needle
#

code was, never something i was strong at in the early days of modding suprisingly

ancient grail
sonic needle
#

i might be lightyears past that these days at worst..

#

not bad advice, but hasnt been applicable to me in a very... long time

ancient grail
#

gotcha well anyways if ever you comeup with an idea just ask and hoepfuly its feasible we can point you to the right direction and give you ideas of how to do it.

orchid dune
#

Peace and blessings be upon you and your loved ones. Does one need to pay for the Better FBX Importer?

tranquil kindle
orchid dune
tranquil kindle
#

Blender is what you're looking for. Its Good and its free

#

However you will require to watch some tutorials to start doing anything in blender

orchid dune
wide shale
#

im trying to improve the structure. is there a place to put my table besides hiding it in modData?

bronze yoke
#

that really depends on what the table is/what it's used for ๐Ÿ˜…

wide shale
#

just a table to look up values

bronze yoke
#

it doesn't sound like it needs to be in mod data at all then

#

mod data is for saving data you might still need after a game restart, if it doesn't change there's no need for it

wide shale
#

right, so im trying to look for a place to hold while event callback is still able to access it

bronze yoke
#

why not just```lua
local myTable = {}

wide shale
#

i tried, but the entire function is nil

ancient grail
#

this is frustrating i just learned that the mod doesnt work on MP now

first it works on MP not SP now its for SP not MP

median thistle
#

how can i alter vanilla game textures like the flag for example and have it change for everyone in multiplayer

wide shale
#

maybe put lua in shared folder?

wide shale
ancient grail
wide shale
uneven ore
#

Quick question, is SoundRadius The distance Zombies can hear the sound, Or is it the distance Players can hear the sound?

bronze yoke
#

zombies

#

the actual audible sound's distance is configured by the sound script

stoic falcon
#

Ay dumb question but i cant find it, is there some sort of documentation or API i can look at? Also i want to locally enhance a mod i downloaded from the workshop, is it enough to just edit the .lua files in steam/steamapps/workshop/content/108600/...?

sonic needle
#

mods are deployed from PZ's source storage locally,
mods in 108600, are the downloaded result, Meaning,
while you can edit them there, you will need to remake a shell template with all changes
in order to upload it to the WS

stoic falcon
#

Im not looking to upload it, just for myself, its a small tweak and idk if the modder wants me to distribute so i was just going to keep it to myself

#

so then i can edit it in the 108600 folder right?

#

and i should be able to see the changed code after i reload lua or the whole game?

ancient grail
#

it should be placed on the workshop folder or mods folder otherwise it will just get updated everytime

ancient grail
bronze yoke
#

to expand on that, if the mod updates your changes will be lost - it's a bad idea even if the mod doesn't get updates though because you won't be able to join servers using that mod

ancient grail
bronze yoke
#

well even if you only want to edit the mod for singleplayer it might come up as a surprise annoyance later

stoic falcon
#

Fair point, i only really play sp, feel like mp is too much of a learning curve i dont really have time for (i.e silent rules on etiquette lol). Thanks for the help though ๐Ÿ™‚

copper abyss
#

Is it feasible to write a script in which whenever a zombie/entity is struck, a png is applied on the entity and disappears after a few seconds?

I know this seems unusual, but I swear the payoff is enormous.

grizzled fulcrum
#

you probably will have to put a timer in OnEveryMinute event to get the whole image disappearing after x seconds

#

or use OnTick if you want more precise timing or fade, but if you only need it to instantly disappear after >= 1 second, I'd use OnEveryMinute

#

idk how to draw sprites on screen tho

warped valve
mellow frigate
#

Does one of you know for sure the nb of nails in a nail box ? My memory tells me there is 50 nails in a nailbox. but the code I read tells me 100 (20*5 as the item is created by group of 5).

ancient grail
#

@bronze yoke
great job with the repairable windows

i peeked at the github and saw wizardry

ancient grail
warped valve
wide shale
#

how should i update my mod?

#

i keep clicking update but the file doesnt seem to work

tranquil kindle
#

Exacly same way you uploaded it

#

Just don't change mod id

wide shale
#

but it seems no change to the file

tranquil kindle
#

it updates?

#

Like, finishes updating?

wide shale
#

yup

#

i only need to update the folder in user/zomboid right?

tranquil kindle
#

If you uploaded mod, that means you had proper files in workshop folder in user/zomboid

#

And to update it, you change things on that folder where is mod that you did upload

#

Not in...i dont know, mods folder

#

mods folder in user/zomboid is for local mods, where workshop one is for uploading to steam, but will also work localy

wide shale
#

yes, but the change didnt reflect somehow

tranquil kindle
#

Then maybe you did something wrong with said change

wide shale
#

user/zomboid/workshop right?

tranquil kindle
#

EXACLY same folder that you uploaded to workshop

wide shale
#

i was only fixing the sandbox variables names so it shouldnt break it (?)

tranquil kindle
#

I mean, i have no idea what you did so i can't tell. Also to test changes you don't need to update mod, you can always unsubscribe it from steam if you had it subbed and use local files, then if youre certain everything works, update it

wide shale
#

nvm, something seems wrong on my understanding of some sanbox naming

tranquil kindle
#

You name them/translate them in lua>shared>translate>EN or other langauge>Sandbox_EN

wide shale
#

yupyup, i might understand the relation between these files'

#

wait, it just didnt update. weird

#

is there a cooldown for uploading?

ancient grail
#

there are no cooldowns

#

but if the mod is being used by an online server the that would make em need to restart everytime you update

#

just something to keep in mind when updating

queen oasis
#

My brain feels like a bowl of mush. Thoughts all tangled in a rush. Too much coding, too much drink. Now I can barely even think.

normal gulch
#

Hey guys, anybody knows how to view getModData of each save? I currently print it on the console but was thinking there could be a better way for sure haha

queen oasis
#

what even is logic?

mellow frigate
queen oasis
#

and maybe use more descriptive variable names

mellow frigate
#

this is the way

small topaz
#

don't think that there are any better ways to print stuff or seeing what is currently contained in the modData

mellow frigate
queen oasis
#

Community Modding Debug Tools lets you inspect item mod data but it has to be in your inventory or in the world

sonic needle
warped valve
normal gulch
#

Thank you so much guys @small topaz, @mellow frigate and @queen oasis
I will check TchernoLib, wasn't aware that it existed

ancient grail
# sonic needle

its for a specific roleplay server
he didnt make it for public use
(replied without reading, already answered lol)

brittle geyser
queen oasis
vapid cargo
#

I have a question about Azakaela's NoteMaker / generator, does anyone use it ?

I think I followed the instructions, and didn't modify the size of the given template.
Zombies are spawning my notes like expected, but reading them opens a blank square..
I feels something is wrong with the boarders or scalling, like ia zoomed image?
Is there something I could be missing with my overlayPNG ?

Thank you for your help and sorry if it has been answered here previously.

true nova
vapid cargo
vapid cargo
warped valve
marble folio
hollow onyx
#

am i missing or wrong (i got it now)

vital canopy
deft sentinel
#

hello

#

can someone reccomend a modding tutorial for the game I want to try and make a mod

#

No background knowledge on programming but oh well

#

If you know a tutorial you can recommend give it to me I will search for tutorial for now

normal gulch
#

hello

#

This guy explains the basics pretty well and also how to debug: https://www.youtube.com/watch?v=ikRcbRHc45k&t=4307s&pp=ygUOcHogbW9kZGluZyBsdWE%3D

median thistle
#

i added my mod in workshop but it says there is no content/folder

normal gulch
#

Use the same structure as the ModTemplate in your Workshop foler

edgy prawn
#

Can someone tell me what I did wrong with my mod

#

Because it is not working

#

Lemme find the files rq

#

Why do these websites suck? Why would they make you download it instead of just viewing it

grizzled fulcrum
#

upload to a google drive

#

it will let you view folder structure if you really care

#

or preferably use github

grizzled fulcrum
#

among other things

#

you just have file extension issue, you need to turn on display file name extensions

#

in "File Explorer Options" view tab

grizzled fulcrum
#

yes

edgy prawn
#

fuck

grizzled fulcrum
#

file extensions need to be correct

#

also you have a 2k res texture as a jpeg btw

edgy prawn
#

Is that baddd

edgy prawn
grizzled fulcrum
#

just in case the website is too sketchy for some reason even though its a legit website

grizzled fulcrum
#

it just needs .png extension

#

poster.png

#

same with other files that you messed the extension up for

edgy prawn
#

I fixed extensions

grizzled fulcrum
#

for example, Hat_MicahRDR.xml.txt needs to have only .xml like Hat_MicahRDR.xml

edgy prawn
#

I'm removing the poster.png from media folder

#

Thanks for helping me, sir (or ma'am)

stone olive
#

hello, i am hoping someone in here can help me with the last steps of a soundtrack mod if you have experience with fmod or fmod bank tools.

i have all the music swapped over, the names are all matching, right format, they are the correct song length and the songs are ready to go back into a bank file, all of the songs together even managed to stay the same file size. but when i hit "build" fmod bank tools 1.6 gets stuck in an infinite loop and doesnt actually do anything. I tried extracting the vanilla file and rebuilding it without touching anything and fmod bank tools still couldnt build the .bank file. For any soundtrack mod people how do you get it to rebuild the .bank file? I have been using sokolov's "Change Zomboid's in-game music and sound effects." steamcommunity guide and it has gotten me through without issue until now. any help would be greatly appreciated. i have had no problems extracting the .bank files into seperate .wav songs

grizzled fulcrum
#

other than that idk really

ancient grail
grizzled fulcrum
#

This is specifically for banks, I assume the game doesn't except 32-bit wav either (or anything above 48 kHz) but I surprise myself every time

tacit pebble
#

Hello a basic question:
Is this better using getSpecificPlayer() instead getPlayer() for future compatibility if i can??

I recently joinned on PZ modding, and I had used both for my works, however i'm getting worry about MP compatibility in these days. I've never played MP and I'm not planning to play MP tho but you know good is good.

grizzled fulcrum
tacit pebble
grizzled fulcrum
#

And there can be up to 4 players for splitscreen, so getSpecificPlayer(screenNum) basically

teal jay
#

Hello, wondering if anyone knows how to use drawRect(). Tried using it to draw a rectangle on screen, but the script errors and lets me know drawRect is nil. Do I have to import any thing into the script? Like this?

    Base
}```
tacit pebble
#

I don't think you have to import something like that in lua. about drawReact, sorry I'm not friendly with UI..

ornate grotto
#

how do i make a trait that's like organised but better so u get a lot more weight capacity

#

just a lil bit more than organised

InfiniteWeightCarry = {}

InfiniteWeightCarry.DoTraits = function()

    local InfiniteWeight = TraitFactory.addTrait("InfiniteWeight", getText("UI_trait_InfiniteWeightCarry"), 0, getText("UI_trait_InfiniteWeightCarrydesc"), true  );
        TraitFactory.sortList();

        local traitList = TraitFactory.getTraits()
    for i = 1, traitList:size() do
      local trait = traitList:get(i - 1)
      BaseGameCharacterDetails.SetTraitDescription(trait)
    end
end

Events.OnGameBoot.Add(InfiniteWeightCarry.DoTraits);

this is what i have

#

i dunno how to change players weightr

#

capacity

#

oh organised does not change the default weight capacity?

small topaz
teal jay
#

thanks guys for the help and tips

small topaz
#

no guarantee that this will do what you need but maybe worth a try?? the similar command "getCapacity()" actually returns the capacity of an inventory, so "setCapacity()" might be related...

hollow onyx
#

can anyone help me? it appear that the shirt is diffence from each other but it get the same texture on the shirt

small topaz
small topaz
#

maybe that both xmls link to the same texture

small topaz
#

m_BaseTextures links to the actual textures

small topaz
#

then you might have created one and the same texture for TShirt_KDMV and TShirt_2KDMG??

#

ah wait... they both have the same GUID number. this could lead to weird behavior

hollow onyx
#

look bro they not the same

#

about guid i already use diffence it still the same

small topaz
#

each clothing item should have its own unique GUID number! you also have to make a correct entries in the file GUID table

hollow onyx
#

let me try diffence guid again

small topaz
#

typically, most problems of the type you describe are caused by setting up your files, guid numbers and/or naming conventions incorrectly. just double check everything until everything is correct

hollow onyx
#

still the same.

hollow onyx
small topaz
#

won't be able to help you more. sorry. you just have to debug your stuff

small topaz
hollow onyx
#

done

#

aw man it drving me insane it still the same problem

small topaz
hollow onyx
#

thank, i use that everytime.

#

do you got any mod that have 2 or 3 it easy to look at

small topaz
#

you could check any clothing mod on steam. also could check the vanilla game files

small topaz
tranquil kindle
# hollow onyx done

Did you give one shirt unique guid that is different than the other shirt?

tranquil kindle
#

If yes, did you apply correct guids to guidtable too?

hollow onyx
#

oh when froget to mention when i use import base it missing

#

it working guy

#

thank you shit driving me crazy

#

GUID thing. i change it all jesus

fleet bridge
#

do getMaxWeightBase() to find your current value, its not linear

ornate grotto
# fleet bridge getSpecificPlayer(0):setMaxWeightBase(int)

InfiniteWeightCarry = {}

InfiniteWeightCarry.DoTraits = function()

local InfiniteWeight = TraitFactory.addTrait("InfiniteWeight", getText("UI_trait_InfiniteWeightCarry"), -1, getText("UI_trait_InfiniteWeightCarrydesc"), false  );
InfiniteWeight:setMaxWeightBase(int)
    TraitFactory.sortList();

    local traitList = TraitFactory.getTraits()
for i = 1, traitList:size() do
  local trait = traitList:get(i - 1)
  BaseGameCharacterDetails.SetTraitDescription(trait)
end

end

Events.OnGameBoot.Add(InfiniteWeightCarry.DoTraits);

#

so somthing like this?

small topaz
#

you must also tell the game that the player has more inventory capacity in case they choose the trait. don't think your code will do this

small topaz
flat robin
#

Hello comrades! How to add your mod in Project Zomboid workshop? Thanks for answer!

normal gulch
#

Hey @flat robin, I would recommend checking on youtube, just type "lua modding project zomboid" at the end of every video, they upload the mod

normal gulch
#

Hey guys, quick question, I want to create a mod extension for an existing mod that uses local functions Kill Milestones (Zombies) instead of completely re-writing the existing logic, is there a way to utilize the author's local functions?

bronze yoke
#

no

normal gulch
#

oh rip then

digital sail
#

I'm trying to write those characters in chat from code: 'ฦ’', 'ยข', 'ยค', 'ยฅ', 'ยง', 'ยฌ', 'ยฐ', 'ยถ', 'ร—', 'รธ', 'รพ'
They are printable when copy/pasted in the chat but I get ? instead when printing them from Lua.
I am guessing this is a charset issue. Any idea how to do this?

tacit pebble
normal gulch
tacit pebble
#

yeah I fully understood of that ๐Ÿฅฒ

digital sail
#

I found a way

#
LanguageManager.UnknownCharacters = {
    -- 'ฦ’', 'ยข', 'ยค', 'ยฅ', 'ยง', 'ยฌ', 'ยฐ', 'ยถ', 'ร—', 'รธ', 'รพ'
    0x83, 0xA2, 0xA4, 0xA5, 0xA7, 0xAC, 0xB0, 0xD7, 0xF8, 0xFE,
}
local newUnknownCharacters = {}
for _, c in pairs(LanguageManager.UnknownCharacters) do
    local newChar = string.char(c)
    table.insert(newUnknownCharacters, newChar)
end
LanguageManager.UnknownCharacters = newUnknownCharacters
#

(yes I could write the number directly...)

#

(alright, fixed)

crude forum
#

yeet!!

#

i love your mods

ancient grail
ancient grail
ancient grail
stone olive
quiet prairie
#

if anyone could point me in the right direction on how to get an edited body model working in the game that would be awesome.

grizzled fulcrum
#

If anyone knows of a better way to pack game files if FMOD even provides a good compression benefit lmk

#

outside of zomboid scope specifically

copper abyss
#

has anybody made a mod with different smoke colors?

#

I've looked around and can't seem to see anything, I have something in wip but I might just give up lol

stone olive
#

@grizzled fulcrum i would just recommend fmod bank tools 1.4 for soundtrack stuff over 1.6

bronze yoke
#

i would expect fmod to use pretty competent compression since it's so widely used (and even if it didn't compress sounds at all it'd still naturally result in smaller file sizes than loose files just because of how disks work) but either way the decision to use fmod isn't really based on how well it happens to compress sounds, it's the sound engine

grizzled fulcrum
#

unleess I am mistaken

#

I don't think it's worth it to trade the CPU time for slightly less memory

bronze yoke
#

no, actually it benefits smallest files the most

#

disks are basically split into chunks and a file can't take up a non-integer amount of chunks so one big file is generally a lot more efficient than many loose files as most files won't align to the size of a chunk exactly

ancient grail
bronze yoke
#

each file can only waste (most of) 1 chunk so less files inherently wastes less space

grizzled fulcrum
#

You probably save a couple of megabytes to a gigabyte at most, just to lose that efficiency to cpu time

#

especially when storage for a gigabyte or so doesn't cost nearly as much as it used to

#

I can't speak on how much storage it really sves though because I don't know how much compression it does

#

considering audio files are nearly compressed already (mp3, ogg) I dont see the point

bronze yoke
#

this itself doesn't cost anything whatsoever

#

there isn't a meaningful gap in cost between 'look in this file and read it' and 'look x bytes into this big file and read it'

grizzled fulcrum
#

hmm turns out their decompression time isn't that much anyway?

grizzled fulcrum
#

I am talking about

#

when you compress something, to use it you have to decompress it

#

now I was wrong because according to FMOD it's not that much cpu time at all but I only just knew about that

bronze yoke
#

i don't really know what kind of compression fmod uses but i'd assume it's pretty adequate given that it's so widespread in the industry

#

audio is like 90% of the disk size of most games so i'm sure compression is a persistent issue to them and that they weigh these things carefully

grizzled fulcrum
#

and then you have workshop mods taking up 20gb for a couple music tracks and there's nothing we can do about it ๐Ÿ˜ญ"

bronze yoke
#

zomboid definitely doesn't have any performance issues related to decompression (it noticeably could use some actual streaming for long sounds but vanilla doesn't use long sounds so it makes sense there isn't support for it)

grizzled fulcrum
#

also, how are loose files (like files in mods) played if they aren't in banks?

#

Unless they use FMOD core since I (think) that you dontn eed banks for core, only FMOD studio

bronze yoke
#

it is fmod directly playing them, and i believe loading them too, but i wouldn't know the specific implications like that

#

i haven't worked with fmod itself but i've looked around some of zomboid's sound code and that's how i remember it going

grizzled fulcrum
#

I'd imagine the only delays are just the loading time for audio streams which is extremely low

#

and then why not just use that method for audio files in vanilla too? i dont get it

#

definitely not my field though, I've never really touched FMOD

#

All the previous games I've looked into must have their own simple like audio engine or something

bronze yoke
#

i've only worked with openal and it feels dishonest to even compare that to fmod ๐Ÿ˜…

bronze yoke
#

i'm not sure they can easily use loose audio files within the sound engine, and if they can it must certainly be a lot more annoying and might lack functionality they need

#

all we can really do with loose files is 'play a clip of audio' with no extra complexity

#

but i don't know exactly how much of that is because they're not in banks and how much of that is because luaside we have a very limited sound api to start with

#

as i understand it most of that stuff is done with fmod to begin with and it's just the game's job to trigger things and set variables and such

grizzled fulcrum
#

ok I will have to come back to that

#

but it seems fmod has no problem playing files loosely anyway so its not that big of a problem

true nova
#

anyone have experience with the file reader/writer? I just want to know how to get it to work outside of zomboid/lua

grizzled fulcrum
#

you can't really

#

as far as I know

#

there are some specific functions that write to certain folders like write Log iirc and it writes to a log file in Logs but isk anything else

bronze yoke
#

but you can't freely write anywhere unfortunately, it'd be a security risk

normal gulch
#

Like if the original mod adds player.modData X
I need to check if X is added then add my side effect

ancient grail
#

yesh thats something hard to deal with you have no choice but to overwrite. try contacting the mod author and see if you can request him turning the function into global

bronze yoke
#

you can sometimes do cheesy stuff by hooking functions the local function calls

ancient grail
#

depends on the lua file actually and what youre trying to do

normal gulch
bronze yoke
#

also, if the local function is added to an event, you can actually get a reference to it through that

ancient grail
#

ahh by removing it

#

and initiate your version instea

bronze yoke
# ancient grail how

make your file load earlier, hook Events.EventName.Add to save the function reference somewhere, and then require the file

ancient grail
#

they said they are new to lua

bronze yoke
#

i'm just explaining it to you, don't know yet if that'd actually even help here

normal gulch
bronze yoke
#

oh, no, sorry, load order doesn't affect the order in which lua files run whatsoever

#

they just load alphabetically, lua has a require() function which forces a file to load (if it hasn't already) and returns any values it returned

#

so in this case you'd make your file alphabetically earlier so it loads first, then mess with the functions it's going to call, and then require the file to make it run

#

but that's assuming the function you want is added to an event

normal gulch
#

Oh wow that's very interesting, I really appreciate you taking the time to explain all this!!

#

Since I'm kinda new to this, can you refer me to any article that explains this or even a mod you made that does this, I can subscribe and study the files

bronze yoke
#

i'm not sure i've actually published anything doing this and documentation is very sparse ๐Ÿ˜…

normal gulch
#

Or at this point it's too messy it would even be better to either contact author to make functions public or just copy/past the entire existing logic and extend from it (which means that the mod author can reclaim the new mod any time)

#

I'm not sure if there are any policy regarding mod extension, like if you don't have time to maintain (fix bugs) in your mod, is it okay if others do it for you and then you can include the changes in the original mod?

#

Also lot of mods are not in github so it's very hard to open pull requests

bronze yoke
#

the game's modding policy outlines that it is okay by default to extend mods that are clearly abandoned (i think an attempt to contact the author first is encouraged), but not if they've expressed somewhere that they don't want anyone doing anything to their mod or if they gave a license that forbids it

normal gulch
#

I see! thanks again for your support, really appreciated especially with the lack of resources haha

lilac mural
#

Is it possible to make new line in sandbox tooltips? "\n" didn't work, so idk..

bronze yoke
#

try <br> and <BR>

#

the difference being <BR> creates a larger gap between lines than <br> does

lilac mural
#

worked, thx

vague elbow
#

Where should I start to learn how to mod Zomboid? I want to make a GOOD first aid overhaul and maybe some map mods at some point

frank elbow
bronze yoke
#

i think <LINE> literally draws a line between the two lines

frank elbow
frank elbow
#

I'm unsure there's a horizontal rule one

bronze yoke
#

if i remember right <br> is part of the translation system and just gets replaced with a \n and <BR> is part of the text renderer

frank elbow
#

Ohh, that makes sense. I was thinking of just the code that handles the latter

bronze yoke
#

well i'll double check anyway

#

i've learned how easy it is to be 100% sure of something you completely made up so i never trust myself too much

frank elbow
#

Definitely been there ๐Ÿ˜… but you could swear it's real when it happens

#

The translations handling <br> thing does sound familiar though

bronze yoke
#

yeah, from Translator.getTextInternal:```java
if (translated.contains("<br>")) {
return translated.replaceAll("<br>", "\n");

frank elbow
#

My evil plan to put entire html documents in PZ strings, foiled again

onyx valve
#

Hello, does anyone know how I can make the sandbox configurations of my mod remain when I exit the game? Because when I go back in my weapon spawns again even though I have already deactivated it from the sandbox option.
i did this and it stops appearing but when I leave and enter it spawns again

-- Thompson
if SandboxVars.MHFirearms.BaseThompson_Enable == true then

table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, "Thompson");
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, 0.1);

table.insert(ProceduralDistributions.list.FirearmWeapons.items, "Thompson");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);

table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, "Thompson");
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, 1);

end

bronze yoke
#

add your distributions during the OnInitGlobalModData event, and call ItemPickerJava.Parse() when you've finished editing them

#

e.g.```lua
local addSandboxDistributions = function()
if SandboxVars.MHFirearms.BaseThompson_Enable == true then
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, "Thompson");
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, 0.1);

    table.insert(ProceduralDistributions.list.FirearmWeapons.items, "Thompson");
    table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);
    
    table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, "Thompson");
    table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, 1);
end

ItemPickerJava.Parse()

end

Events.OnInitGlobalModData.Add(addSandboxDistributions)

onyx valve
#

Okok thanks a lot, if I have more weapons to add, should I do the same with each one?
I want to do is have the players activate or deactivate the weapons that they like the most, or don't want, that's why I made the sandbox vars with each one.

true nova
bronze yoke
onyx valve
#

local addSandboxDistributions1 = function()
if SandboxVars.MHFirearms.BaseThompson_Enable == true then

table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, "Thompson");
table.insert(ProceduralDistributions.list.GunStoreDisplayCase.items, 0.1);

table.insert(ProceduralDistributions.list.FirearmWeapons.items, "Thompson");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);

table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, "Thompson");
table.insert(ProceduralDistributions.list.PawnShopGunsSpecial.items, 1);
if SandboxVars.MHFirearms.BaseFNP90_Enable == true then
table.insert(ProceduralDistributions.list.FirearmWeapons.items, "FN_P90");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);

table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, 0.9);

table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, 1);

table.insert(ProceduralDistributions.list.GarageFirearms.items, "FN_P90");
table.insert(ProceduralDistributions.list.GarageFirearms.items, 0.6);

end

local addSandboxDistributions2 = function()
if SandboxVars.MHFirearms.BaseFNP90_Enable == true then
table.insert(ProceduralDistributions.list.FirearmWeapons.items, "FN_P90");
table.insert(ProceduralDistributions.list.FirearmWeapons.items, 0.1);

table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.ArmyStorageGuns.items, 0.9);

table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, "FN_P90");
table.insert(ProceduralDistributions.list.PoliceStorageGuns.items, 1);

table.insert(ProceduralDistributions.list.GarageFirearms.items, "FN_P90");
table.insert(ProceduralDistributions.list.GarageFirearms.items, 0.6);
end

ItemPickerJava.Parse()
end

Events.OnInitGlobalModData.Add(SandboxDistributions1)
Events.OnInitGlobalModData.Add(SandboxDistributions2)

#

like this?

bronze yoke
onyx valve
#

sorry for so many questions jaja

bronze yoke
onyx valve
#

I'll try it, thank you very much.

#

๐Ÿ’–

true nova
bronze yoke
#

the argument would be the full text of a script file

true nova
#

thanks a bunch spiffo

wheat blade
#

need a advice. what best lua book, or your better way to learn this language specifically for this game

#

from scratch with no experience

red tiger
#

Anyone want to donate to the Jab's Whiskey for Modding Fund?

#

:D

frank elbow
# wheat blade need a advice. what best lua book, or your better way to learn this language **s...

The phrasing of learning the language โ€œspecifically for this gameโ€ makes it sound to me like you're looking for more of a modding guide than a language guide. I don't know how to judge those too well, but there are many. But for learning the basics of the Lua language, Programming in Lua is what I'd typically recommend. The first edition, available online for free, is written for 5.0; PZ uses Kahlua, which is similar to 5.1

red tiger
#

I just ran out of my Jameson so morale is low.

frank elbow
#

The Jameson shortage will continue until morale improves baseballbat

bronze yoke
frank elbow
#

I haven't ever had the need to use them, so I think I just said it based on that lol

#

I suppose it's not a need to disregard in the same way io is, though

bronze yoke
#

they aren't spectacularly useful, no

wheat blade
wheat blade
queen oasis
#

fun SpriteRenderer$RingBuffer.next> Buffer overrun..

earnest pebble
#

Oh, Hello!

frank elbow
earnest pebble
#

Question, how hard is it to make both models and textures for an Anthro Survivor Mod?
(Edited) I seen an Anthro Jolteon and Sylveon in the workshop and wondered how to make an Eevee one

wheat blade
mellow frigate
#

Hello lua fluent people (and you: End Game Boss) How do I distinguish false from nil in lua ?

bronze yoke
#

just do var == false or var == nil

mellow frigate
bronze yoke
#

yeah

mellow frigate
#

Thank you EGB ! spiffo

wheat blade
tacit pebble
frank elbow
#

Using just Lua is preferable & what most do, though, for many reasons

bronze yoke
#

and anything originally implemented in lua should be editable pretty easily (which is a surprising amount of the game)

queen oasis
red tiger
#

Join the crew.

tacit pebble
onyx valve
#

๐Ÿ’–

drifting ore
#

Hello!
I love this game and I want to take a jab at modding. I have some modding experience in JSON and Lua, but it's for an entirely 2d game...

First question though. "50% inventory transferring time", I'm trying to get a better understanding of how traits work in the game. Does 0% imply instant transferring time, and 100% means longer transferring time? Just so I'm getting this right? And do the percentages cap at 100%?
If 0 is instant and 100 is delayed, is that how every trait with a percentage works? Or can it be "backwards" sometimes?

normal gulch
#

50% transferring time means if a sledge hammer takes 6 seconds, it will be 3 seconds

grand cloak
#

how can i make something happen in like a time interval between the everyoneminute funcion and the ontick

#

OnTick is like too much but EveryOneMinute is slow

tacit pebble
#

then, fire your function only at every 10 ticks or something like that.

grand cloak
#

yeah i will try something like that

tacit pebble
#

good luck ๐Ÿ˜‰

#

i've never used OnTick event so i don't know what is okay value tho..

grand cloak
#

good point

#

i will test it here

#

i want to make the zombies bleed

#

like everytime

#

just keep bleeding

bronze yoke
#

keep in mind ontick doesn't take a set amount of real time so timing by ticks shouldn't be used for things that are meant to take a constant amount of time

grand cloak
#

oh yeah

#

surprisingly it worked tho

#

not fps friendly obviously but it did

bronze yoke
#

it will work but the timing will vary based on lag and the user's framerate limit and settings

grand cloak
#

yep, not the ideal

tacit pebble
grand cloak
#

fair enough

bronze yoke
#

if you want to do something a fixed amount of real time you can add getUnmoddedMultiplier() to a counter every tick until it exceeds a certain value

grand cloak
#

thx

#

i will keep testing things here

#

i'm kinda new to this so i will try things until they work idk

ornate fable
#

Hello, I've been messing around trying to add my own guns to the game and last night I got my glock to appear in game, but today I've treid the same with a double barrel shotgun and I get this error when opening the item list in the debug menu

#

that is the script

#

error doesn't happen without the double barrel

tacit pebble
#

MinAngle the ,

ornate fable
#

oh my

#

lmao thanks

#

thats half an hour gone

tacit pebble
#

hope it works

grand cloak
#

there is this bleeding animation from the character when it's really hurt/bleeding a lot
is there any way i can like find it inside the game files and add it to the zombies or it just doesn't work that way?

tacit pebble
# tacit pebble that's why i don't use ontick and everyoneminute ๐Ÿคฃ

will this also lower performance by the way?

local tick = 0
tick = tick + 1

end
Events.OnTick.Add(blahblah)

I mean, this function does nothing but only counts every tick.
I know if there's something like print or actual function then will cause performance issue. but since it does something only with Var..

grand cloak
#

well pz is not really the game that is like

#

optimized

#

quite the opposite

tacit pebble
#

I always try to make something performance-friendly. I always test my mod with my old laptop at the last moment.

grand cloak
#

I tried using something like that and it caused low framerate but I was spawning blood splats every 0,2 seconds so that was probably the issue

#

I am also doing this through an old laptop because I actually have a good pc but the game hilariously runs quite similarly on both machines

ornate fable
bronze yoke
#

i would point out this function does nothing as local tick = 0 is defined within the function but i'm pretty sure that's just a typo

tacit pebble
bronze yoke
#

you'll often hear the advice to avoid ontick because it causes performance issues, it's good advice to avoid it because if you do heavy stuff ontick it will cause performance issues, but it's not on its own actually going to cause problems

tacit pebble
#

it was curiosity between lua and game engine (?) sorry hard to explain in English. hope you understand what i mean.
I just wanted to know better about performance thing. so i will be able to avoid clearly later.

grizzled fulcrum
#

I should point out that stuff like OnEveryMinute and OnEveryHour exist. Some people don't even know that and they use OnTick to count the amount of minutes. I always abstract the timing to one of those higher events if its not absolutely necessary to run every tick and its proved quite good for my use cases.

#

Bit of an old post i just realised xd

frank elbow
#

I'm far too paranoid about the one player out there that has the timescale set to real time, so I only use those for arbitrary โ€œrun every once in a whileโ€ things (like clearing old cache items)

#

Or if I'm actually concerned with the ingame time, of course

sand radish
#

guys, is there something wrong with this line in particular? "self.character:setPerkLevel(randomPerk, currentLevel + 1)"

#

I'm trying to give an level to the player but it just breaks

#

I've tried manually giving them the necessary XP to get them to the next level and it worked fine

bronze yoke
#

there is no such function setPerkLevel

sand radish
#

this explains much

#

does even exist a function that does something similar?

bronze yoke
#

use setPerkLevelDebug

sand radish
#

I have a question that may sound dumb, but, does it work even if you have no debug activated?

#

hold on, I'mma test real quick

#

ty

#

it worked

#

now I just have to fix the logic behind it since it can't level you up if you don't already have at least 1 level on that skill

small topaz
#

Hi! Does anyone know when exactly the event OnPlayerUpdate is called? I did some tests and for me, it seems that it is simply called all the time. Was the same as OnTick for me...

bronze yoke
#

it is the same as ontick

#

it fires every time a player object updates, which is generally every tick as along as the player is alive and such

small topaz
#

thx!

normal gulch
#

@bronze yoke doing god's work on this discord channel

small topaz
#

yeah! how does it happen that you know so much about the PZ code?

bronze yoke
#

i've just been modding for a long time, nothing special

verbal sparrow
#

zomboid lua lowkey looks easier than roblox lua

warped valve
red tiger
#

We need more Lua developers that writes API with callback functions.

warped valve
frank elbow
bronze yoke
#

what's this annotation format you're using? i've never seen it before

#

sniped...

red tiger
#

Yeah wtf

frank elbow
#

Jinx

red tiger
#

Use LuaCATS

#

Like a real man.

warped valve
#

@frank elbow @bronze yoke @red tiger It's Doxygen with a custom Lua script for reading that kinda syntax to generate HTML files, the plan is to host a website at some point once I release FrameworkZ to the public for developers to reference

frank elbow
bronze yoke
#

i think luacats has some built in thing for exporting the annotations to some other format (i *think* web?) but i never really paid attention to it

frank elbow
#

They are awful

#

It has options for json and html and both outputs are very not good

red tiger
#

I mean I was writing a HTML engine in Lua

#

For PZ UI

#

Does that count?

warped valve
frank elbow
bronze yoke
#

so the json wouldn't even be a good intermediate format to generate html from?

frank elbow
frank elbow
warped valve
bronze yoke
#

what a shame

red tiger
#

I could write a HTML renderer for LuaCATS annotations too.

#

I will convert everyone here to using VSCode one day.

warped valve
#

VSCode is awesome

red tiger
#

It wouldn't be hard to actually write a JavaDocs-like solution for LuaCATS.

#

There's many good AST parser libraries for Lua.

warped valve
#

I used Notepad++ for far too long, I only use it for the search function at this point and quick edits

bronze yoke
#

i generally prefer other ides but i haven't found any ide that supports lua nearly as well

red tiger
#

JavaDocs always looks ugly to me.

#

JavaDocs and UML programs both.

frank elbow
#

Something entirely custom would be neat too

red tiger
#

They're for like programmers who used vacuum tubes.

bronze yoke
#

in my mind it should be quite easy to parse, i wonder why the official implementation chokes up so much

frank elbow
#

I haven't looked at the code to confirm but I think it's mostly just spitting out partial info from what it already has for language server purposes

red tiger
#
  • The year is 1944
  • The British successfully crack the ENIGMA code because it was published on GitHub and has JavaDocs.
frank elbow
warped valve
bronze yoke
#

yeah, i guess that makes sense, i was thinking from the perspective of parsing a file but of course they don't actually do that

red tiger
#

I am a document-aholic.

#

I literally write tools exactly like these so I mean the door is open for discusson.

#

My goal here in PZ is to help people code better and know what they're coding sooooo yeah.

#

That's why Umbrella exists. =D

warped valve
#

I needed a way for the framework to interact with the plugin system I got planned, so I made that. It's also kind of convenient to have everything flow through the framework (although not super efficient I know)

red tiger
#

MMM I really like this thing you're describing.

#

I have a plugin framework as well from 2017 if you want to take a look at it.

warped valve
#

Sure

red tiger
#

Sec

#

old code but also attempted to be a plugin-based framework. It took code sent from the server machine and loaded it.

warped valve
#

Ohhh that's pretty neat

red tiger
#

Seriously, +1 rep for working on a framework.

warped valve
grand cloak
#

what is the "bandage power" thing?

tacit pebble
# grizzled fulcrum I should point out that stuff like OnEveryMinute and OnEveryHour exist. Some peo...

thanks for advice.
why I asked about OnTick : I've made Tarkov injectors which have delayed and time limited effects by using EveryTenMinutes. and I counted while effect is running so worried about that. but I think I don't have to worry about performance now ๐Ÿ˜‰

Tooltip_EFK_SJ6 = "Injector<br>[Dur. 240min] Stamina Recovery Rate (+1/m)<br>[Del. 200min, Dur. 60min] Temporary Panic & Temporary Fatigue",
    ```
grand cloak
#

how can I code something to the healing context menu to like "instantly cure" any injury?

foggy gate
#

Hey, can someone give me a simple code to make the mod save the log file in the "Logs" folder in Dedicated Multiplayer Servers?

coarse sinew
tacit pebble
grand cloak
#

the remove injury part actually

tacit pebble
grand cloak
#

i wish i could fix all of the injuries in an specific body part, not the whole body

tacit pebble
#

yep i know. it will effect only for one bodypart. unless you loop like this:

    local b = getPlayer():getBodyDamage():getBodyParts():get(i)
    b:RestoreToFullHealth()
end

This will make player 100% condition.
grand cloak
#

thx

frank elbow
tacit pebble
#

sorry but what is masked link? do you mean "this" part?

frank elbow
tacit pebble
#
  • ctrl+c URL
  • drag "this"
  • ctrl+v
    this is what i did.
frank elbow
#

Interesting

tacit pebble
#

sorry if they are not allowed, i didn't know. ๐Ÿ˜›

frank elbow
#

I'm not a mod nor a narc, just curiousโ€”although if they see this maybe they'll patch it ๐Ÿ‘€

tacit pebble
#

๐Ÿ˜ฎ ๐Ÿ˜ฌ

true nova
#

hello i'm trying to write items into the script manager and i am getting the error

WorldDictionary: Warning script item loaded after WorldDictionary is initialised.

and my items do not show in game. anyone know a fix for this?

bronze yoke
#

you cannot add items at runtime and still have them be registered in the world dictionary

#

this means that they cannot save

true nova
#

this happens on game boot. is there someway else to add items like this?

bronze yoke
#

not really

#

if they aren't defined in a script file they won't be defined when the world dictionary is built and they won't be able to save

#

all of that happens before lua even loads

true nova
#

why give access to add to script manager at all then? unhappy thank you atleast you saved me wasting more time lol

bronze yoke
#

i don't think any other kind of script at all runs into this limitation

true nova
#

ok so specifically items are limited by this?

keen agate
#

Hi, a question please

#

Nothing sorry

grizzled fulcrum
#

are you in my computer components

grizzled fulcrum
fierce trench
#

How does one replace the UI sprites, especially the moodles?

#

i have tried packing only the modified sprite and packing every moodles

#

still no change at all

grizzled fulcrum
#

Don't know if this would be the issue but hey ๐Ÿคท

small topaz
gleaming sorrel
gleaming sorrel
small topaz
#

ok. but still... if you try to mod moodles, I wouldn't do this while another moodle mod is active (except you'd like to change the other moodle mod)

gleaming sorrel
#

Though we already took it off just to make sure

#

Me and Lauren are both trying to do the same thing, but we haven't been able to get it working.
Somebody has to know what we are doing wrong here.

grand cloak
#

i don't understand why only the "SetBitten" part works

tacit pebble
cosmic panther
#

whats the script line to eat faster

#

would it just be something like "EatSpeed = 0.5"

bright fog
#

To remove infection ?

#

If yes, that won't work

bronze yoke
#

the reason they don't work is because setBleeding doesn't take two arguments

#

just do self.bodyPart:setBleeding(false) and the rest should work

bright fog
# grand cloak i don't understand why only the "SetBitten" part works

You can remove that second boolean for SetBitten, no point sending a false in that, you can keep the singular boolean version

    public void SetBitten(boolean boolean1, boolean boolean2) {
        this.bitten = boolean1;
        if (SandboxOptions.instance.Lore.Transmission.getValue() == 4) {
            this.IsInfected = false;
            this.IsFakeInfected = false;
            boolean2 = false;
        }

        if (boolean1) {
            this.bleeding = true;
            this.IsBleedingStemmed = false;
            this.IsCortorised = false;
            this.bandaged = false;
            if (boolean2) {
                this.IsInfected = true;
            }

            this.IsFakeInfected = false;
            if (this.IsInfected && SandboxOptions.instance.Lore.Mortality.getValue() == 7) {
                this.IsInfected = false;
                this.IsFakeInfected = true;
            }
        }
    }
grand cloak
#

oh

#

i just used copy paste in a part of the game code and i was with the two booleans

cosmic panther
#

why am i still able to smoke without needing the lighter if i added "OtherHandRequire"

bronze yoke
#

OtherHandRequire is only used for weapon attacks

cosmic panther
#

is there a way to make it for food

grand cloak
#

now it worked

#

thank you guys

onyx valve
tacit pebble
ruby dock
#

Here's an idea for a mod...... Imagine you're grilling in the game and your character is wearing assless chaps?

tacit pebble
teal nacelle
#

Just wondering, how can I only apply panic/stress for my autism mod when the sound is close to the player? Rn it just makes them freak out from any sound over a certain volume on the whole map.

#

I'mma try using the distance thing someone showed me before, and just add it to the if statement that adds the panic n stuff

copper abyss
#

Is there anyway that I can change the color of a weapons muzzleflash light and muzzleflash texture?

true nova
onyx valve
#

Hello, is there a way to make sure that when the character eats something, some effect is applied to him, such as healing him completely? I think OnEat doesn't work but something similar.

tacit pebble
#

maybe check your function first? what code did you write for heal?

normal gulch
#

Hey team, anybody knows how to add levels to a perk?
tried:
player:setPerkLevelDebug(perk, newLevel)

but it only works on passive skills Fitness and Strength
Then tried:
player:getXp():setXPToLevel(perk, newLevel)
And I got this weird looking color:

code block:

local function applySkillBoosts(player, trait)
    local boosts = skillBoosts[trait]
    if boosts then
        for perk, levelChange in pairs(boosts) do
            if perk then
                print("Applying skill boost for " ..
                    tostring(perk) .. " with level change " .. levelChange .. " for trait " .. trait)
                -- Adjust player's perk level
                local currentLevel = player:getPerkLevel(perk)
                local newLevel = math.max(0, math.min(10, currentLevel + levelChange)) -- Ensure level is between 0 and 10
                player:getXp():setXPToLevel(perk, newLevel)
                print("Set level for " .. tostring(perk) .. " to " .. newLevel .. " for trait " .. trait)
            else
                print("Invalid perk detected for trait: " .. trait)
            end
        end
    end
end
copper abyss
onyx valve
# tacit pebble OnEat may work.

-- Instant Health1.lua
local function applyEffectInstantHealth1(player)

local bodyDamage = player:getBodyDamage()
local currentHealth = bodyDamage:getOverallBodyHealth()

local healthToRestore = math.min(currentHealth + 25, maxHealth)
bodyDamage:setOverallBodyHealth(healthToRestore)

local function OnEatInstantHealth1(food, player)
applyEffectInstant Health1(player)
end

Events.OnEat.Add(function(food, player)
if food:getType() == "Instant Health1" then
OnEatInstant Health1(food, player)
end
end)

#

I wanted to deal with this but when searching for events I didn't find an OnEat I found OnPlayerUpdate but that's all I think I didn't search correctly

true nova
tacit pebble
#

something like these

item MyItem
  {
    DisplayCategory = Food,
    Weight = 1,
    ...
    OnEat = YourFunctionName,
    ...
  }

and code

function YourFunctionName()
  print("I just ate MyItem!!")
end
onyx valve
#

Oooh in items script ok ok

true nova
tacit pebble
onyx valve
#

Thanks a lot

#

๐Ÿ’–

tacit pebble
#

oops i clicked wrong button, deleted previous message :/

onyx valve
#

Thanks

modest swallow
#

yo if anyone wants to make this real they tottally should but im playing with the rv nomad mod but im playing with my friend and we dont have space to put a second bed so if some one can make a bunkbed mod that would be sick

normal gulch
#

I spent 20 min figuring out why I can't remove the trait "Claustrophobic" only to realize in the game code

#

there's a typo

strong nimbus
#

How hard would it be for me to create a mod that removes the clothing patches texture including clothes from other mods?

queen oasis
normal gulch
#

Bro I'm new to modding haha

#

I forget it's an indie game

queen oasis
#

I came across "DistanceManhatten" which should be "DistanceManhattan" and I shook my head. The 3rd grade state spelling bee champ inside me just dies.

normal gulch
#

Devs please stop approving PRs without reviewing them

faint wadi
#

Hello hello! I just made my first mod which only introduces a couple of new items, but it only works in single player, I'm a programmer but have no experience at all with modding pz, any kind soul could help me?

faint wadi
#

Nothing, I've compared with other mods and I can't figure out what I am doing wrong. It's a couple of new items, and a couple of new recipes, but it doesn't requires other mods or anything. It works perfectly on single player, but whe I tri to Host a game with just my mod installed from the workshop, I load in but the mod wont work. my gf and friend tried to add the mod to their servers but the server just wont start (Server has stopped during launch (Normal Termination)). Any ideas?

faint wadi
#

Ok, I think I managed to make it work. My friends were activating the mod through the mod manager, but it seems they needed to go to the server settings and to the Steam Workshop tab. Weird. I'll still eye it just in case.

random finch
#

Is there a trigger or a function I can hook to run some code upon an item being placed after the timed action completes?

random finch
queen oasis
random finch
#

I think its my issue. Seems to be triggering. My code is looking for a sprite name but Im passing the sprite object.

queen oasis
#

getSpriteName() on the object

random finch
#

yup I got it

queen oasis
#

I didn't know about OnObjectAdded before you asked, so thanks!

bright fog
#

This documentation is more up-to-date, and indicates if events run client or server side

bright fog
#

If events don't run client or server side, no code is triggered

random finch
bright fog
random finch
bright fog
#

๐Ÿ‘Œ

placid river
#

Heya, quick question:
Can i somehow check for a item's data in a crafting recipe?
More specifically, i'm trying to only accept drained batteries (0.9 delta or below) in my recipe. Sadly couldnt find anything except the OnTest: property, but that needs me to write a full on lua function.

bright fog
#

But yes you can do such a check, with lua

placid river
#

alright... time to figure that out then

bright fog
#

Time for you to learn lua, thankfully you have hundreds of example of how to write such a check

placid river
#

thank you though

#

Well, thankfully i do know a bit of lua, i just havent used it in a good while

bright fog
#

You should be able to find crafting functions which involve consummable delta (battery level here), which checks for empty batteries I believe

bright fog
#

Don't hesitate to ask questions

placid river
#

do you maybe know where those are located? i have tried to look a bit through the files but i couldnt really make it out

#

there was nothing under items and there is nothing like a recipe folder

bronze yoke
#

server/recipecode.lua

gaunt belfry
#

Anybody ever use BaseVehicle.getForwardVector() ? It seems to be bugged on the Y axis. Curious if anyone else has noticed this behavior?

placid river
placid river
#

hmm i tried adding my lua function to the Recipe.OnTest table but whenever i try to call it in the recipe it says that the function doesnt exist. I seem to be doing something wrong clearly?
In my server.lua i defined

function Recipe.OnTest.RechargeBattery_IsDrained(sourceItem, result) { ... }

Do i have to define it in some other way?

#

thats how all the other functions were defined in the recipecode.lua at the very least

bronze yoke
#

not sure if you just did that to express it visually but if you actually surrounded the function body with { }s that's not valid lua syntax

placid river
#

yeah i only did that to not bloat the message further

#

it just uses the lua end thing

bronze yoke
#

your lua file should be located in MyMod/media/lua/server/ and the filename should end with .lua

placid river
#

ah. there is my mistake

#

i'm missing a directory...

left aspen
#

I want to make a translation/localization mod, how exactly would that be done?

meager light
#

im kinda dumb, at least when it comes to programming and finding what i need for it. how do i make clothes spawn on zombies

#

i've scoured a few mods for it, ones that i know do spawn clothes on zombies but, i cant find the code that does that, unless im missing something

#

if anyone has an answer for this just ping me - i don't check here much

random finch
#

Can someone please explain addOption to me? It seems the parameters within addOption are in the following order:

  • Context Label
  • worldobjects
  • Function to execute
  • other parameters are added

containerTypeOption = containerTypeMenu:addOption(getText("ContextMenu_AddAll"), worldobjects, ISWorldObjectContextMenu.doAddFuelGenerator, generator, containerType, nil, playerNum);

function ISWorldObjectContextMenu.doAddFuelGenerator (worldobjects, generator, fuelContainerList, fuelContainer, player) --some code end

Why does worldobjects, a parameter to be passed into doAddFuelGenerator, come before the executing function and its other parameters?

bronze yoke
#

because it's stupid

#

the arguments are:

  • context label
  • first argument to the function
  • the function
  • other arguments to the function
olive ore
#

somebody should make an ozempic mod my 90kg fatass character wont lose weight no matter how much he jogs and starves

random finch
#

Saving objects in a modata table then referencing it afer a restart would break the object?

mellow frigate
# random finch Saving objects in a modata table then referencing it afer a restart would break ...

In computer science and object-oriented programming, a passive data structure (PDS), also termed a plain old data structure or plain old data (POD), is a record, in contrast with objects. It is a data structure that is represented only as passive collections of field values (instance variables), without using object-oriented features.

tacit pebble
#

can anybody explain for me what is different between client, server and shared folder? or any guide?
for now, I mostly put my files into client and everything works fine. is this about MP compatibility? GPT has never helped with this. their answer has so much noise and makes me more confusing.

reef portal
#

The folders relate to the mods code structure, well really its particular implementation of multiplayer architecture. Client is code that runs on the players computer, server is on the hosts computer, shared is for both. Someone else might have a more detailed description but thats the gist.

copper abyss
#

Does Anybody Know How To Apply Custom Explosion Affects?

I am using Advanced Trajectory for this W.I.P Pistol Mod I am developing... This would be a HUGE help

random finch
#

ISTimedActionQueue.add(ISGrabItemAction:new(playerObj, itemObject, time))

`STACK TRACE

function: onReleasePCZ -- file: ISPlayerConstructionZoneUI.lua line # 907 | MOD: Player Construction Zone
function: onClick -- file: ISModalDialog.lua line # 77 | Vanilla
function: onMouseUp -- file: ISButton.lua line # 56 | Vanilla.
[17-12-24 00:34:47.376] ERROR: General , 1734417287376> 260,873,287> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in onReleasePCZ at KahluaUtil.fail line:82..`

Any idea which player object and item object this time action wants?

warped valve
placid river
#

Created a contextMenu Entry for my mod, but for some reason just opening the menu, so right clicking the item triggers my callback function already?
I thought the function only goes off when the option is actually clicked, or did i miss something here?
entry = context:addOptionOnTop("Recharge Battery",player,startRecharge(player, validBatteries))

#

i looked at vanilla code too and this seems correct, as far as i can tell... but it always goes off right away

snow bobcat
#

local dumptable = context:addOption("reset table", localPlayer, function ()
sendClientCommand("MODID", "requestResetTable", {playerName = localPlayer:getUsername()})

end)

local dumptooltip = ISWorldObjectContextMenu.addToolTip()
dumptooltip:setName("Delete Table")
dumptooltip.description = "resets table"
dumptable.tooltip = dumptooltip

this is how i add a simple one.

placid river
#

i'm not sure if my issue comes from the fact that i have a TimedAction attached to it

snow bobcat
#

maybe since theres no "tooltip" it just auto executes, not too sure either.

placid river
#

ah thats maybe worth a try...

#

oh but as far as i can see, in your case its for a WorldObjectContextMenu

#

I'm using the OnFillInventoryContextMenu

snow bobcat
#

hmm...darn.

placid river
#

not sure if there are differences between the two on how they execute

#

oh! nesting it like this
entry = context:addOptionOnTop("Recharge Battery",player,function () startRecharge(player, validBatteries) end)
seems to have worked, for some reason

bronze yoke
#

startRecharge(player, validBatteries) calls the function with those arguments and passes the return value (probably nil) - if you wanted to pass the function you'd just do startRecharge with no () (the other arguments to addOption are for setting what arguments get passed to that function when it does get called)

placid river
#

ah, that makes alot more sense

bronze yoke
#

your later attempt works because function() ... end just creates a function without calling it

placid river
#

thanks for breaking that down so well!

#

i'm still so bad at lua

quasi kernel
#

Suppose I should ask here just in case, but does anyone how if :sendObjectChange("containers") works with vehicles? If not, is there an alternative or something else I can do?

#

Running into issues where items are updating for basically everything except for things in cars, which are updating server-side but not on the client.

chilly flint
#

who is going to patch in MP before devs do it?

dull moss
#

So

#

How fucked we are with b42? PepeLaugh

#

They actually released b42 the moment I left the country for holidays KEKL

fading horizon
stiff fiber
#

I made 3 car mods so I guess it's time to find out if they still work

frank elbow
#

Mods will continue to work in b41 & the unstable gives time to update them for b42

dull moss
#

Good news is that I can just not update stuff until dependencies are updated anyway

gleaming sorrel
#

Time to see what the damage is

steep cloak
#

Gotta figure out how the version folders actually work now beyond what that one post roughly described

#

(Genuinely curious how much of Save our Station gets borked and what i will need to fix)

ebon dagger
gleaming sorrel
#

I only do texture edits, I'm hoping if they didn't change too much about the texture placement the damage is minimal.

dull moss
#

Pretty sure you just yeet a folder with version name

steep cloak
steep cloak
ebon dagger
steep cloak
#

Actually maybe updating my game would update the examplemod, so could be worth checking that

dull moss
#

So you'd have multiple maps

#

Each for separate game ver

stiff fiber
#

As a beginner modder I have no idea how this will affect vehicle mods

#

I hope I'll only need to redo the folder structure

steep cloak
#

Thats the part thats making me wonder how thatll work

dull moss
steep cloak
#

if it gets deprecated

dull moss
#

In your b41.72 you'd have PZ version b41.72

#

No real reason to remove it

#

I guess it's not needed

#

But like why remove

#

Idk, we'll see

steep cloak
#

Because it could infer the version from the folder structure

gleaming sorrel
steep cloak
#

like, no point having it defined twice lol

dull moss
steep cloak
#

Im gonna see if the examplemod updates when i delete it.

dull moss
#

Which defines what PZ version uses it

#

Idk exact name

#

But you get the idea

gleaming sorrel
dull moss
#

No, each mod has version folder inside it

steep cloak
#

Yeah thats the thing, in the actual local mods folder, they're still separated. Which makes me think the version folders go into the directory where the info file sits. So when you load the mod, the game picks the version inside the mod that works.

dull moss
#

So game knows what folder to use

mellow frigate
#

[edit] bad info corrected by nasKo

dull moss
#

80% of workshop users are pepegas who won't install dependencies

#

Unless game literally won't launch

gleaming sorrel
mellow frigate
dull moss
#

It adds backslash in list of dependencies?

#

Which obviously borks the game because games don't like having slashes in them?

#

Well I gotta wait for you anyway so I can chill EZ

#

Not home anyway

steep cloak
#

Do we have a common folder that works across versions in the new structure

dull moss
#

Not sure cuz not home and can't check

#

Gotta check example mod

#

It should be updated

steep cloak
#

Yeah launching now to see if it gets created

ebon dagger
#

saw the new armor system at work and my brains already ticking

#

it'll be neat to see what can be done with it

gleaming sorrel
#

I'm interested in the new animals

#

The headcrab mod is inevitable now

ebon dagger
#

haven't even spawned in yet i'm just fucking around with the outfit builder

#

Project Fashionoid

mellow frigate
#

Moodle Framework is updated to B42

iron salmon
#

How to adapt your mod for 42 unstable (a thread)

gleaming sorrel
#

I haven't even updated yet.
My pc shit itself immediately as soon as it finished.
I hope those new optimizations save me

iron salmon
#

How to update your mods for 42 (a thread)

ebon dagger
#

oooooh ankle holsters!

dull moss
#

All praise our lord and savior nasKo

steep cloak
#

^^^^

#

I was going to say, the Example Mod is not updated

ebon dagger
#

thank you nasKo

dull moss
#

Significant changes in Lua/scripts exposed

steep cloak
#

So thank you for this info post

#

Should pin that btw

random finch
#

Did I just see a small update for B41?

dull moss
#

I swear to God if my 2k lines UI page not working anymore I'll commit a felony
||For legal reasons it's a joke||

steep cloak
#

sweeet

iron salmon
#

I'll edit them into one later, sorry. Was just how I had it for testing ๐Ÿ™‚

#

xoxo

dull moss
#

xoxo

#

Better to keep multiple so you have more space to edit stuff

#

Albion handsup

#

Woop woop

bronze yoke
#

here's umbrella for build 42, for those who can install it manually - it probably won't be on the addon manager for a few days judging by the usual wait time

steep cloak
#

Right, time to see if we're cooking with SOS, or if SOS is cooked

random finch
#

albion, what are you calling the addon manager?

bronze yoke
#

vscode's lua extension's addon manager

steep cloak
dull moss
random finch
#

Very nice, I need to stop using notepad

dull moss
steep cloak
#

You telling me i couldve gotten by without having to mess with lua extension settings to prevent certain globals from erroring

dull moss
#

Pls tell me you were at least using notepad+

steep cloak
#

oh man

random finch
gleaming sorrel
random finch
#

But, I just found them too clunky for pz cuz wasnt aware of any available addons.

steep cloak
#

Yeah i just kinda lived with manually defining certain globals in the config so it wouldnt error

#

there being an addon makes life a lot easier now lol

#

not the best workaround but a workaround nonetheless

#

(pain)

dull moss
#

@iron salmon can we get example of mod.info in the thread? With example of how the new backslash thing looks

left aspen
#

I want to make a translation/localization mod, how exactly would that be done?

small topaz
glacial thorn
#

I have 1.5k lines for one ui window

dull moss
ivory gyro
dull moss
#

I have a suspicion but can't test

glacial thorn
#

I am pretty sure they will post the changes done for modding in few days

ivory gyro
#

Ahhhh....better now drunk

dull moss
#

Yes that list might be too big to track

#

So I doubt

ivory gyro
#

Maybe upload them on the B41 version

spare hinge
#

did anything change about how mod.info looks?

ivory gyro
spare hinge
#

im not even uploading yet

#

just trying to fix old ones

cursive escarp
#

Do we have to worry about our b41 saves breaking due to some people updating mods for b42? Or does the new mod folder structure allow mods to be loaded for both individually if setup properly

ivory gyro
#

Yes same, my mod dont show up in the mod list

spare hinge
#

oofst

dull moss
#

xdd

spare hinge
#

ive thrown mine into ~/Zomboid/mods

ivory gyro
spare hinge
#

linux user?

ivory gyro
#

nop

spare hinge
#

thank fuck that isnt the problem then

queen oasis
#

just made a new folder named 42 and threw the whole thing in there. works great. well, my mod doesn't but it's in the list

spare hinge
#

but there isnt a nice example as far as i can tell

#

it mentions something about a workshop id, but i dont exactly have one yet since its not uploaded to workshop yet

mellow frigate
#

for local tests, you can use require=\requiredmodid

#

but I am not yet sure of the right way in the end.

spare hinge