#mod_development

1 messages · Page 150 of 1

red tiger
#

Getting a better setup for deprecated properties:

fading horizon
#

I comment a lot of my code because I want it to be easy to read and learn from if anyone else decides to read my code

fading horizon
nova dome
#

the problem with writing comments is updating them when you change the code

red tiger
fading horizon
#

I had a suggestion for a feature I'd like to see

red tiger
#

I've spent a lot of time with many updates since the last beta version release.

fading horizon
#

A list for AnimNode parameters in recipe definitions

#

I have a reference to some of them if you'd like it

red tiger
#

I didn't see any when adding it.

fading horizon
#

i'm not sure all of these work

#

but I know several of them do

#

build, craft, ripsheets, sawlog

drifting stump
#

c is not a real programming language

#

i rest my case

red tiger
sour island
#

Are these used?

fading horizon
#

Yes

#

Near the bottom

#

First it adds the item

#

Then the percent chance

#

On mobile or I'd do a code block

fading horizon
fading horizon
torn igloo
#

what's the difference between create survivor and create player?

red tiger
#

Improvements to tooltip box

#

At some point I want to try to scan for items, sounds, etc. and create dynamic lists for properties that are for assigning them.

#

I'm terrified at how long this changlog's going to be.

drifting ore
#

Why won't player:getInventory():Remove() remove stuff from player inventory when the item is on a backpack that he is carrying by HAND

fast galleon
#

getInventory only gives the direct container obj of player

drifting ore
#

player:getClothingItem_Back():getInventory():Remove() This got me to delete stuff from the main bag, but how to make it delete stuff while the bag is being carried?

fast galleon
#

the most useful snippet

        local skill = selectedItem.recipe:getRequiredSkill(i-1);
        local perk = PerkFactory.getPerk(skill:getPerk());

this returns the perk you give it

red tiger
#

Updated ZedScript VSCode extension.

minor snow
red tiger
twilit rune
#

Is there a way to set vehicle spawn with specific couple skins from like 6 total ?

minor snow
red tiger
#

I'm use the major version to stay in-line with any changes TIS does to ZedScript.

dusty wigeon
#

this is what my browser looks like rn lol

red tiger
#

I've been informed that build 42 of Project Zomboid will include changes to ZedScript.

#

They won't let me know until 42 is in the BETA testing stage.

#

Not sure how I'm going to support both 41 and 42 on VSCode.

dusty wigeon
#

think my pc would have a heart attack at that point

nova dome
#

32 gigs baby

#

compensate the 2bit add

dusty wigeon
#

thanks for that

#

i have 32 gig as well with an ryzen5 5600x my graphics is where im lacking

#

probably could use more upgraded storage as well

nova dome
#

5600x + 1080

hot patrol
dusty wigeon
#

i have 1t of HDD and SSD

hot patrol
#

basically got a stick of dynamite sitting next to me

faint jewel
nova dome
#

yeah i went for the 2TB m2 last year when I got a bunch of cash, worth it

dusty wigeon
#

sounds about right im running the gtx 1660 oc card

#

i want to get m.2 but i havent moved on it yet

#

i bought my tower for 300 and basically threw around 600 into it

nova dome
hot patrol
bronze yoke
#

vivaldi is awesome

tiny wolf
#

Hello guys and hope you're fine 🙂 Have a nice weekend everybody !

#

I'm trying to dev a mod for my server which start in few weeks
It's an easy idea about a little add into an existing mod, but i'm blocking on the realisation.
Idea is : making a timed system which damage the player during a certain period when he's into a designed area created by admin
Damage is FoodSicknessLevel which is increasing
Area is kind of PVPE mod : we can create its and areas are stored into a new file which help a lot to save settings
I'm trying to add the damage effect to the PVPE mod.
With a lot of tries, i succeded on solo, but on a server i'm failing to build something good
This could result into a Tarkov/DarkZone system which don't let players stay into a zone too long and, with some mapping into the map, build a special place with higher danger but higher loot

nova dome
tiny wolf
#

Is somebody is ready to help me with this creation, please let me know 🙂

nimble spoke
nova dome
tiny wolf
#

Don’t know what do you mean with « start » 😬

autumn garnet
# drifting ore ``player:getClothingItem_Back():getInventory():Remove()`` This got me to delete ...
        local playerItem = {}
        local BagItem    = {}

        local items2 = getPlayer():getInventory():getItems();

        for i=1, items2:size() do
            if items2:get(i-1).getItemContainer ~= nil then
                innercontainer = items2:get(i-1):getItemContainer():getItems()

                if items2:get(i-1):getItemContainer():getFirstTypeRecurse("Apple") then
                    
                    items2:get(i-1):getItemContainer():Remove("Apple")

                end


                for q=0, innercontainer:size() - 1 do
                    table.insert(BagItem,innercontainer:get(q):getType())
                end
            end
            table.insert(playerItem,items2:get(i-1):getType())
        end



        local itemString = table.concat(playerItem, ",")
        local bagString = table.concat(BagItem, ",")

        print(bagString)```
tiny wolf
#

Mp me if you’re in 😉 (yes i’ve worked 50 hours on this, i’ve got LUA stuff to work)

autumn garnet
#

With other bag (with a Pear) after you can delete it by retrieving the name of the bag

red tiger
#

Going to work on getting vehicle ZedScript documentation implemented in the next days.

drifting ore
autumn garnet
#

You're welcome ^^
In this script, be careful, it removes the Apple object from all the bags, then you can put a condition to have a specific bag (the one equipped... etc)

and when the object is deleted it ignores the other bags

drifting ore
#

How to make an item spawned with AddWorldInventoryItem visible? Or maybe there is another method to spawn item on the ground?

neon bronze
#

AddWorldInventoryItem should work

drifting ore
#

I mean, it is there but it won't show up visually.

neon bronze
#

Is it a custom item?

faint jewel
#

anyone know how to tell a vehicle to disconnect it's trailer??

drifting ore
neon bronze
#

Did you get the correct square to spawn it?

drifting ore
#

It spawns on player location.

#

local x,y,z = getPlayer():getX(), getPlayer():getY(), getPlayer():getZ();
getPlayer():getCurrentSquare():AddWorldInventoryItem("Base.BucketEmpty", x, y, z);

neon bronze
#

Do 0, 0, 0 instead of xyz

drifting ore
fast galleon
#

Bucket you say? What are you making?

drifting ore
#

Bucket was a test, I'm actually making a dynamic mining mod.

#

Like, you can find traces of ores while foraging and then you have to further investigate and then it will turn out to be either a pile of rocks(in various sizes) or iron/salt deposit

fast galleon
#

nice

red tiger
#

Hey @fast galleon

fast galleon
#

If you need any more functions for buckets or farming let me know.

drifting ore
#

I HOPE it will be smooth sailing from now on out.

#

jinxed myself

#

thx me

red tiger
fast galleon
red tiger
#

A stranger online didn't say hi back to me.

#

s a d

faint jewel
#

get sad 😦

drifting ore
#

hi

fast galleon
#

hey hey

red tiger
#

Everything is right again.

#

Thanks, daddy Interwebs.

#

BTW Polt I have updated my extension with all the work in the past few weeks.

drifting ore
#

stop assuming my parental status

red tiger
#

People needing assistance with item documentation can have it now.

fast galleon
#

nice

red tiger
#

Was a "bit" minus the "ch".

#

It's all in a format very close to JSON so anyone could "pick it up" and walk with it and do whatever to make something else with it.

#

A Discord bot or another extension for some editor I don't know yet.

#

I'm actually torn between either continuing on and working on getting vehicle caught up.. or begin work on diagnostics.

bronze yoke
red tiger
bronze yoke
#

well i chose the wording 'look at how realistic it would be' because it's likely completely out of my depth

red tiger
#

Heheh.. This is the very first IDE plugin I've ever written. =)

#

Again, I'm giving you room for making the decision.

#

I'd like to see it if it were attempted.

bronze yoke
#

well if i do look into it it definitely won't be soon so if you're set on it go for it

red tiger
#

BTW, IntelliJ supports TextMate Grammars so you can take mine if you want to avoid coding purely in recursive Regex.

red tiger
#

Documentation will save a lot of grief for newcomers. It makes me glad to see someone else even think about working on it.

#

If you or anyone here do decide to make tools for the community of modders, please please please write it in a way that prepares for the scenario where you are gone. Extendibility is critical.

sour island
#

cough

#

cough

red tiger
# sour island *cough*

Any way I can get extracted templates from this project and forward it in my extension?

sour island
#

templates?

red tiger
#

A well-documented set of generated template scripts and even Lua function templates with documentation could prove insanely useful for modders.

sour island
#

tbh I got swamped with RL stuff + a hefty commission

red tiger
#

Yeah like "New BothHanded Weapon" generates a template with pre-filled properties.

#

or "Create Heavy Vehicle"

#

Lua-side functions could be pre-documented for basic tasks.

sour island
#

The only thing in the project so far are some polished debug tools

#

and a bit of an API to add more debug panels

faint jewel
#

CHUCK

sour island
#

?

faint jewel
#

how do i make a car stop towing another car in lua.

sour island
#

ContextMenu_Vehicle_DetachTrailer

#

heh... looks like the vanill code defines doTowingMenu twice

#
    if vehicle:getVehicleTowing() then
        menu:addSlice(getText("ContextMenu_Vehicle_DetachTrailer"), getTexture("media/ui/ZoomOut.png"), ISVehicleMenu.onDetachTrailer, playerObj, vehicle, vehicle:getTowAttachmentSelf())
        return
    end
    if vehicle:getVehicleTowedBy() then
        menu:addSlice(getText("ContextMenu_Vehicle_DetachTrailer"), getTexture("media/ui/ZoomOut.png"), ISVehicleMenu.onDetachTrailer, playerObj, vehicle:getVehicleTowedBy(), vehicle:getVehicleTowedBy():getTowAttachmentSelf())
        return
    end
``` @faint jewel
#
function ISVehicleMenu.onDetachTrailer(playerObj, vehicle, attachmentA)
    local nextAction = ISDetachTrailerFromVehicle:new(playerObj, vehicle, attachmentA)
    if not ISVehicleTrailerUtils.walkToTrailer(playerObj, vehicle, attachmentA, nextAction) then return end
end
#
sendClientCommand(self.character, 'vehicle', 'detachTrailer', args)
#

Looks like a vanilla clientCommand use

#

I legit don't know where those go

#

Something I've been meaning to ask a redname

bronze yoke
#

there's just a server lua file that handles them isn't there?

#

Vehicles/VehicleCommands.lua

sour island
#

weird it's not in my decompiled thing

bronze yoke
#

yeah it's not in mine either

#

but it is in my lua folder

#

i saw it back when i used vscode

sour island
#

hmm

bronze yoke
#

must be a bug with pz libraries

faint jewel
#

now does that make the character go to the car? or does it just drop it?

sour island
#
function Commands.detachTrailer(player, args)
    local vehicle = getVehicleById(args.vehicle)
    if not vehicle then
        noise('no such vehicle id='..tostring(args.vehicle))
        return
    end
    vehicle:breakConstraint(true, false)
end
faint jewel
#

BINGO

sour island
#

I don't know why player is there but it can be down without one

#

I also just found constraints digging through

bronze yoke
#

it's easier to just pass the player to all commands

sour island
#

that's odd pzlibrary doesnt have that file

#

I was hunting around for something related to commands prior - I wish I could recall what it was

bronze yoke
#

maybe i'll drop the pz library's lua portion

#

apart from the library folder of course

#

the annotations it adds to lua don't really do that much

faint jewel
#

i love you chuck

nimble spoke
#

player is the first parameter for all commnands and any additional parameter goes in the args table

red tiger
#

Hello from the bar

faint jewel
#

hello from the other baaaaaarrrr . I can't see you it's too faaaaaarrrr.

viscid drum
#

Does anyone know if Noir still updates his mods?

faint jewel
#

mower update is out.

dusty wigeon
#

why is it saying category like that?

#
item Ecstasy
    {
        Weight              = 0.1,
        Type                = Normal,
        DisplayName         = Ecstasy,
        DisplayCategory     = Drugs,
        Icon                = KIecstasy, 
    }
sour island
#

Cause you need to add it to the IGUI_ItemCat translations

dusty wigeon
#

oooo

dusty wigeon
#

i cannot find the folders for that anywhere

bronze yoke
#

shared/Translate/EN/IG_UI_EN.txt

dusty wigeon
#

thats what i thought but i cant find the shared folder

#

found nvm

faint jewel
#

are you using notepad++?

#

ctrl+shift+f set it to the medai folder fro profject zomboid.

#

search for IGUI_ItemCat

#

media\lua\shared\transalte\en\IG_UI_EN.txt

dusty wigeon
#

I use VSCode

#

the only folder i have open within that is my personal mods

frank elbow
#

You could open a second window or workspace with the game directory

faint jewel
#

I think the @rich hazelPack might be ready to release.

sour island
#

that's wild, nice job

dusty wigeon
#

i try to just keep the file open in the background @frank elbow

ancient grail
low basin
#

I would appreciate it if I could be directed to a guide for adding 3D models for items. I have created a custom item (Box of Pencils (Not a container)) and can spawn it into my inventory but cannot place it in the world from there. I have the fbx model and related png, however I seem to be missing something that lets it be a placeable item

fading horizon
#

How do I determine if an update to my mod will require a new save or not?

#

Some users are commenting certain aspects of my mod don't work but I've thoroughly tested my updated code and it works on all the edge cases

#

So I think it's either the user having an old version of the mod or having an old version of the item before it was updated

#

I did update the item definition script as well as a lot of the item functions (it now uses battery) so I think it may be conflicting with previously gathered items?

glass basalt
#

old items have old defs, anytime you tweak the items or any table of ModData, it requires a new save

fading horizon
#

Aha

#

That's exactly the issue then

#

Since I added modData

glass basalt
#

modData is fine, nvm, as long as you attach new defs

fading horizon
#

Also thank you very much for your comment regarding the encoding for Russian translations, I really appreciate it

glass basalt
#

👍

fading horizon
#

Can the player have modData or is it only items?

bronze yoke
#

players, items and most objects

fading horizon
#

Awesome, ty

vast jasper
#

anybody recommend any item implementation guides?

#

im new to the modding game so i mess up quite often so it would be nice to have something to follow

#

ntm idk how clothing works at all

#

ive only made magazines and a melee weapons at this point

minor snow
#

What's modder roadmap?

dusty wigeon
#

I am finally starting to see the completion of my mod after 2 days of hard work. Spent a total of roughly 40 hrs writing it this far. I am proud of myself

#

for actually sticking with it

#

Me and my partner should be releasing our mods around the same time as we are actively working on the mods with eachother at the same time lol

#

I do want to say thanks to those people who have helped us throughout our tireless journey

humble oriole
#

Hey, do you guys happen to know if there was a framework for setting up radio broadcasting? I could've sworn I saw a mod but I just cannot find it

bronze yoke
#

like just to add a new radio station or something? i don't think you really need a framework for that

brave ruin
#

If I want to comment out an recipe, is it enough to just do like this?

#

I don't want to 100% remove it yet, but maybe use it later

bronze yoke
#

you need to use java style comments

#

open with /*, close with */

cunning kestrel
#

how do you call a function on game closing/server shutdown ?
(so i can make the mod safe to remove ?)

frank elbow
cunning kestrel
frank elbow
#

What's the multiplier? That makes sense but it wouldn't necessarily be guaranteed to properly reset, considering the user could force shutdown

cunning kestrel
#

the vanilla "multiplier works on passives" is a backend system and does not use this value .. so...

frank elbow
#

OnPostSave runs before exit, but I don't think it'd save the multiplier change. OnSave may work, but you'd have to reset the multiplier after saving as appropriate

#

I would still not mark a mod as safe to remove if I had to do something like this (that is, maybe add a note in the description about this)

ancient grail
#

WIP "Just Keep Swimming"
https://imgur.com/vhexedm
wonky animation
and i think i need a way to add a transparent thing clothing to make it look under water or just mask the body?

cunning kestrel
ancient grail
#

hehe but all my characters are undead its sorta my avatar

cunning kestrel
#

hehe I've noticed, looks promising keep it up👏

ancient grail
minor snow
#

How do we compare defense of items?

ancient grail
#

Is there a way to detect water tiles aside from its sprite? Like the grass and trees..

frank elbow
#

Assuming square is an IsoGridSquare, square:Is(IsoFlagType.water) should suffice

ancient grail
#

Thank you

#

Saves me loads of time writing like sprite based check

#

Cuz idea is
If water sprite is infront pf player then swim

But now
Prpblem is going reverse
But i guess ill justcheck if its a valid square and its not water and theres nothing blocking and can see iguess

frank elbow
ancient grail
#

To automatically switch to walk

frank elbow
#

Wym by going reverse? Like swimming backwards, or water → land

#

Ah, gotcha

ancient grail
#

Swim to walk

frank elbow
#

Looking forward to seeing how this turns out, swimming sounds neat

ancient grail
#

The texture is the main problem id have to add an ovelay clothing or just mask the body

#

With a clothing thing

#

I think one of the bone controls the shadow so i just have to figure that out

frosty stirrup
#

Hey, does anyone know what is "isInfected/setInfected" method in InventoryItem definition used for? I don't recall any usage of this in vanilla game.

minor snow
#

How to open lua error window?

frank elbow
frank elbow
ancient grail
#

Ye

#

Why?

minor snow
#

There's code for this

ancient grail
#

I know

#

iBrRus

#

I dont need his code

minor snow
#

Then render it like boat drunk

ancient grail
#

Illjust use my code from my leviitate mod

#

And just modify it to suit the needs

ancient grail
#

Im just making a swimming animation mod

minor snow
#

So render swimming animation like boat

ancient grail
#

Im not paid to make a boat

#

Like boat? Idont get it sorry

minor snow
#

What's problem?

ancient grail
#

Theres no problem really

minor snow
#

Then cool, who ordered tho?

ancient grail
#

My client?

minor snow
#

Hell, my client can only render stuff

frank elbow
#

A significant portion of a body is underwater while swimming. The same is not true for a boat (not that none of a boat is underwater, just not a significant portion of it)

ancient grail
#

I dont understand what your saying. Swimming mod
Not boat mod

Client
Person who hires us for commission custom mod projects

Idk what IBrRus mod does but i know it has a swimming function
Thats not what im going for

Render like the person underwater? Ye im working on that

minor snow
ancient grail
#

So im still not sure what you are talking about but ill just put every possible relevant info on the table

minor snow
#

Just not render part underwater, or make it partially visible

ancient grail
#

Yeah

#

Using masking

#

But im still going to try some stuff

#

Cuz i already did the legs animations
I might add an overall blue suit to parts submerged

minor snow
#

So it's mod for private server?

ancient grail
#

Its going to be public
Same as all the rest of our commission mods

red tiger
#

Good morning.

dusty wigeon
#

Good Morning

twilit rune
#

Good morning / day / evening or whatever it is now at your place.

I'll try my luck again. The puzzle I have to solve is:

I have couple coords set for vehicle spawn. Now I am trying to find a way to force these vehicles spawn looking at certain direction and with certain skins (2-3 from the total list of 9).

Any chances anyone have a solution?

mossy steeple
#

i am really struggling to figure out what's happened- my game's started crashing whenever i right click on the modded gun i'm working on, and the debug log claims that seemingly every sound in the game is erroring. could someone help me figure out what's happened?

bronze yoke
#

something about your tooltip is messed up

mossy steeple
#

yeah, i'm trying to figure out what it is- i don't think i touched anything related to the tooltip, though, so i'm not sure where the issue lies

bronze yoke
mossy steeple
#

ahhh, yep, there it is

#

thank you! i should've guessed it was just a typo, haha

#

huh, it's still giving me the same errors

red tiger
#

I'm going to love this channel when I get a working formatter for ZedScript.

mossy steeple
#

i tried pruning it down to only the weapon file and the models/textures and i'm still getting the tooltip errors, so it's definitely in that mp5_weapons file

#

but i can't see anything in here that even refers to the tooltip

mossy steeple
#

are tooltips declared in another file that i'm missing?

#

i'm poking through the files of another mod that adds guns, and their file seems to have just about everything that mine does. i really cannot figure this out

fast galleon
#

do you still have this ModelScript.check> no such model "Item_Mp5" for EaMP5.MP5.

mossy steeple
#

yeah, that's still there

#

isn't that just the icon? that shows up in game

fast galleon
#

yeah, first thing to suspect was the icon

minor snow
#

Best IDE for PZ modding?

frank elbow
#

I think the most commonly used ones are IntelliJ IDEA and VS Code. I prefer the latter

#

Can use anything, of course

minor snow
#

Vs code use plugin for code completion? When IJ real code from game?

frank elbow
#

I'm unsure what you're asking

#

You can open the game code in either

minor snow
#

VS code is dependent on third-party?

frank elbow
#

To do what?

mossy steeple
#

the tooltip in game is completely blank, save for the name of the gun, and i'm getting constant errors as long as i'm mousing over it- the icon is definitely showing, though, so i'm not sure what's up with that no such model error

frank elbow
#

IntelliJ does have a decompiler built-in, if that's what you mean

minor snow
#

To get code completion ayo

#

Intellisence

frank elbow
#

Oh. Yeah, but I believe the same is true of IntelliJ (for game code, that is)

minor snow
#

You have to compile it from source in IJ

frank elbow
#

Compile what from source?

red tiger
#

I have two libraries you can use: PipeWrench (Typescript for PZ) and ZedScript VSCode extension (WIP)

minor snow
#

Why I would need other languages?

#

I like lua because there no trash like lambdas, interfaces, generics etc

frank elbow
red tiger
#

Have fun with EmmyLua, or whatever it is.

frank elbow
#

That one is LuaCats

minor snow
red tiger
frank elbow
#

Why did you ask which is the best if you've made up your mind already ?

red tiger
#

But I feel like that's not going to happen.

minor snow
#

Because using third-party things is not advantage of IDE

frank elbow
#

Okay

red tiger
#

You are calling people's work in here "trash". I don't think you'll get the help you came here for with that approach. I suggest "being lovely" and what not.

minor snow
#

Dramatic guy that can't even read properly, how you supposed to help someone?

#

Quote where I call people there trash

red tiger
frank elbow
# minor snow Quote where I call people there trash

Regardless of what you said, you seem to have brought up the topic just to talk bad about vs code for no real reason. You're free to use IntelliJ, others are free to use VS Code—hell, people can use Notepad++ if they want. There's zero reason to try to have needless debates about IDEs

minor snow
frank elbow
#

"I think the most commonly used ones are IntelliJ IDEA and VS Code"

#

You're free to continue to argue with yourself, I suppose, but I'm gonna go ahead and duck out of this one

mossy steeple
#

i've tried a lot of different things to try to fix this icon issue and i'm getting the distinct feeling i'm missing something obvious- it's just supposed to look like this with Item_MP5 in the textures folder, right?

red tiger
#

Wait I think that doc is wrong. Double-checking.

#

Hmmm.. PZWiki says this too..

#

@tame mulch Is this actually a model?

#

If so that's an incredibly confusing name.

bronze yoke
#

i always assumed it was something old

tame mulch
#

I think it's mean name of model script

red tiger
#

Yeah.. It says sprite and relates to models. That's confusing.

#

Wanted to double-check.

#

Thanks for checking.

mossy steeple
#

ohh, i think i see it then, let me try something

red tiger
bronze yoke
#

i think it is? i don't want to say this with too much confidence but it doesn't look like it does very much

mossy steeple
#

i could see WeaponSprite making sense if it's a holdover from pre-animation update

red tiger
bronze yoke
#
   public String getStaticModel() {
      return this.staticModel != null ? this.staticModel : this.weaponSprite;
   }
```this was the only place i could find where it seemed to actually do something and not just it being passed around everywhere, and obviously this shows that it gets overwritten by static model
red tiger
#

Looks like forward compatibility.

bronze yoke
#

from what i can tell it already is deprecated

#

unless there's vanilla scripts that still only define a weaponsprite

red tiger
#

Not to ignore the person here asking for help, however I think it would be good to know more about where these properties will go.. what will happen to them and what might replace them too..

#

If WeaponSprite is in-fact deprecated, I can add a deprecated tag.

bronze yoke
#

i actually don't see where staticmodel gets passed to the instance

#

which is fine since InventoryItem's getStaticModel invokes the script, but since HandWeapon's doesn't, it might actually still be needed there

red tiger
#

Probably a code-stem.

bronze yoke
#

it does look like it is basically equivalent to StaticModel though, so that description would be correct

red tiger
#

Hmm.. Ok. That's good to know.

#

The legacy name is misleading but it actually has something going on.

bronze yoke
#

it looks like, then, that StaticModel does nothing to weapons

mossy steeple
#

huh, i'm still getting the error for no such model- if it's referring to the model then it should be like this, right? first one is the file for the item, other one is for the model

red tiger
#

So the property isn't exclusive nor is applicable to Weapon.

bronze yoke
#

looks right, is the model script's brace closed outside of the screenshot?

mossy steeple
#

yeah, under all of the attachment location numbers

frank elbow
#

This may have already been asked, but which folder have you placed the model file in? & what's it called?

mossy steeple
#

media > modelsX > MP5.x

frank elbow
#

models_X, or modelsX? Unsure if Discord just stripped out the underscore

mossy steeple
#

oh yeah, it's models_X

frank elbow
#

Maybe it has to be in the weapons subfolder? I'm not sure what else would be the problem, everything else looks right

mossy steeple
#

the magazine works perfectly, and the files there are in the same spot

#

oh i can try that

frank elbow
#

The vanilla ones are in weapons/1handed, weapons/2handed, weapons/firearm, and weapons/parts (all within models_X)

mossy steeple
#

no luck, still getting dozens of errors per second when i mouse over it

#

honestly, i can send over the whole mod folder if it'd help? there might be some issue in another file that i'm missing

dusty wigeon
#

any good references for creating new farm plants?

red tiger
#

Some of the properties on PZWiki might need more detailed examples on how to link files.

frank elbow
frank elbow
dusty wigeon
#

@frank elbow ok ill take a look

mossy steeple
#

oh, where's that? i've been looking at the DebugLog.txt file up until now; i thought that was all there was

#

oh wait no i see it

red tiger
#

I guess that means that I'm going further down the rabbit hole.

#

It's all fun and games until you realize that the item-scripts page's 1000+ hyperlinks are all purple.

#

So far I've probably edited around 40-50 of them.

#

Language support is also a concern.

mossy steeple
#

here's the console log file; it's throwing a lot of audio errors in there as well which. i have no idea where they came from but i assume they're unrelated to the tooltip error

bronze yoke
#

the fmod 'no such event' spam? that's normal

mossy steeple
#

oh, huh, weird. i assumed hundreds of errors were probably not supposed to happen

frank elbow
#

Those are just warnings for (presumably future) missing audio files associated with events

mossy steeple
#

gotcha, gotcha

#

that'd explain all the animal noises in there

frank elbow
#

Are the tooltip errors something you're unconcerned about? I don't think it'd affect the model issue but the repetitive errors certainly stand out

#

Looks like they're just due to a missing item for a* magazine/ammo type. I'm unsure what would be causing the missing model from looking at the log

mossy steeple
#

well right clicking the item brings me to the error screen and shows multiple of those instead of showing the right click menu

#

let me grab that and screenshot it

frank elbow
#

Okeydoke, can you also send the full item script?

mossy steeple
#

certainly

frank elbow
#

And the magazine type, EaMp5.MP5Mag, is already defined and working (i.e., showing up ingame)?

#

Is the case right? I notice the p is lowercase there

mossy steeple
#

yep, i can fill it with ammo and place it in the world and everything works fine

frank elbow
#

Maybe the item is unable to find it since they're different modules, assuming it isn't case insensitive

mossy steeple
#

the magazine model is named Mp5_Mag and the gun model is named MP5

#

ooh, wait, no

frank elbow
#

I don't know whether this will affect anything, but can you change the name of the module in mp5_weapons.txt to EaMp5

mossy steeple
#

i was inconsistent in my naming capitalistion between the model and the item itself, that might be it

frank elbow
#

So is the mag in the EaMP5 module (as opposed to EaMp5—boy this is confusing)?

mossy steeple
#

it should be, yeah

frank elbow
#

I'd try changing the MagazineType field to use a capital P instead then

mossy steeple
#

yep, trying it now

#

it's always the little typos that get me

#

aha, yep, that was it

#

spent 2 hours trying to figure this out because i forgot to capitalise a letter 😔

#

thanks for the assistance!

frank elbow
#

Nice! Yeah, finding out it was the little things is always a bit of a pain

mossy steeple
#

the gun's invisible now, but hey, at least i can hold it and fire it just fine- time for me to look for more typos probably, heh

bronze yoke
#

it's pretty common that the model is either so huge or so tiny you can't see it

mossy steeple
#

the model was visible at the proper size while i was testing a few hours ago, albeit upside down

red tiger
#

Code concerning file-discovery should be handled with no case-sensitivity. Always leads to problems like this.

#

Unless that's not a file?

frank elbow
#

It's a module, which would also make sense to be case insensitive imo

bronze yoke
#

it was script modules i think

red tiger
#

Ah ok.

frank elbow
#

I would've assumed they are, never had to look into it (until now & I see that they are not)

red tiger
#

Case-Sensitive fields.. in an undocumented and non-integrated text document even..

#

The devil's playground.

#

I could make that trashy 3rd-party extension do diagnostics like this in the future.

#

It'd be cool to discover all the sounds, items, modules, etc in folders set in the extension's settings so that it can detect unknown items, sounds, models, etc. in certain fields and raise a warning.

#

A dropdown suggestion box would be nice for those fields too..

#

Could save modders like this one 2 hours.

frank elbow
#

Warnings at least for items in similar contexts that are a case-insensitive match but not equivalent would be nice for anyone who doesn't want to pull in folders—that's what came to mind for me

red tiger
#

Non-invasive yet powerful.

#

That's the balance I'm targeting for the extension.

#

It's also why I dropped the formatter I spent nearly 60 hours on.

#

xD

upper mason
#

Will it work?

bronze yoke
#

no

#

lots of made up methods, made up event, and the logic doesn't actually make sense anyway

upper mason
#

damn shame

red tiger
#

The treasure of modding is the journey. Don't forget that.

mossy steeple
#

got the gun working, visible, and playing sounds! now to fix the spawning, and i'll be done

sand dagger
#

Hello together, is it possible to debug ZombiesZoneDefinition ingame, cause my custom zombies does not spawn even if the chance is high

nimble spoke
sand dagger
#

table.insert( ZombiesZoneDefinition.Default, { name="CustomZombie01", chance=50 } ); also default one

#

i checked AuthenticZ to find the definitions

#

and i include require "NPCs/ZombiesZoneDefinition" in the code

nimble spoke
#

And you have a zombie outfit with that exact name?

sand dagger
#

yes and over horde manager its working

nimble spoke
#

is the file generating an error in console?

sand dagger
#

no everthing fine

#

could it be that i use the table.insert in a for loop with a table of data for the custom ones in a init method which get trigged by Events.OnGameStart which not works

nimble spoke
#

I don't add mine through an event, so maybe that could be the issue

sand dagger
#

okay i will test it, thanks so far for the answers

dusty wigeon
#

how hard would it be to step away from the traditional farming method of planting int the ground and allowing the ability to plant in a pot or bucket?

drifting ore
reef karma
#

Hello lads, (I might need to post this in mod_support but I make an "update" to the mod and re-upload it for who ever wants it)
I downlaoded AIZ3 today and I am getting this error (everything seems to work fine?)
"function: MCOverlayMap.lua -- file: MCOverlayMap.lua line # 3 | MOD: AIZ Expansion 3 -- overlayMap["location_shop_generic_01_96"] =...
ERROR: General , 1681600657996> 0> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index of non-table at KahluaUtil.fail line:82"
Could this be as simple as adding local overlayMap = {} on line 2 in MCOverlayMap.lua? I am not too sure what it means, i am just trying to get the mod to not throw errors

nimble spoke
keen beacon
#

Hello, theoretically, on a scale of 1-1000 how hard would it be to make a mod that lets you make safehouses in spawn zones?

Any ideas on how it would work?
Would it be attached to some safehouse-making script or would you need to go around making every spawn zone claimable manually or something?

If you dont need to fix every individual spawn zone manually it could work with any spawn zone from mods too, right?

Because one of those Louisville spawn mods makes my favorite place in louisville into a spawn zone so you can't make it a safehouse if you want to keep the mod.

Something like:
"If > safehouse = Remove > spawn zone
Else > keep living with the agony of this mod not existing"??

keen beacon
bronze yoke
#

i'd be surprised if it was complex at all

keen beacon
ancient grail
#

They will be teleported outside after i think

bronze yoke
#

i haven't seen the safehouse code but my guess is that the only check for spawn points would be in the ui - but i haven't really used that mechanic so i'm not sure if it would lead to strange behaviour if someone spawned inside one that you would have to fix

keen beacon
keen beacon
# bronze yoke i haven't seen the safehouse code but my guess is that the only check for spawn ...

Hmm okey yeah i figure that's an issue, maybe you could have some check that if you spawn in a building that has the safehouse tag on it, just spawn like 20 meters down the road or something... or just automatically remove the spawn zone tag from any building thats designated as a safehouse, that seems like the simplest solution? But i have no idea. I mean its not like you'd need to reinstate the building as a spawn zone afterwards if you release the safe house either, because that sounds like it could be trouble.

as long as its placed after spawn zone mods in the mod load order it would cover those as well i guess?

ancient grail
#

If a player that isnt part of a safehouse stands within the safehouse bounds they auto teleport outside
You can observe this by placing fence then make your character hop inside (shouldnt be an admin)

bronze yoke
#

the problems with that approach is buildings aren't linked to spawn points in code - spawn points are just sets of co-ordinates, the only way i can see doing this would be to scan all the spawn points to see which lie within the bounds of the building

ancient grail
#

I think the spawn points are determined by the map

bronze yoke
#

if glytch3r's right about that then it wouldn't be an issue

ancient grail
#

How does other mod add spawn points ? I bet panopticon knows

keen beacon
ancient grail
#

No im just saying vanilla behavior

#

Cuz there should be some failsafe and thats the telepprt
If you cant do the fence thing i mentioned you can also do this

Have a person logout on a building

Another person claim safehouse
Then person A logs back in

#

You will see what i mean

Since player a would be re spawning to a safehouse

unborn radish
#

I'm bumping this up again, still no clue how to fix it. Today i tested with literally just the two mods on. Here's singleplayer, then multiplayer. And yes, I double-checked the load order, I checked that there's no server file for the names, and at least I couldn't find it. I really need some help here, It brings me nuts that I literally created this mod just to not have my immersion broken by mixing fictional cars with real ones and every time i go into multiplayer it just happens anyway :(

#

I am wondering whether it could be something related to localization since I know zomboid is known to have some issues with that in servers and I'm spanish, but I don't know, and I'd really appreciate someone with more experience taking a look at it

faint jewel
#

@river tree you still around here?

drifting ore
minor snow
#

Who develop mods with Linux here?

fast galleon
#

you want to add linux to in-game computers?

merry storm
#

Does the IsoThumpable:addToWorld() method spawn the item from the isoThumpable in the game on the square that you used to create it?

fading horizon
#

Is it possible to create screen overlays somehow? For example, upon a certain condition I'd like to apply something like a tunnel vision / blacking out overlay

rancid panther
#

blind trait uses an overlay

torn igloo
minor snow
sand dagger
#

hey there,

is there a way to change single Zombie Speed, Strength ... without change the complete Sandbox setting ? by modifing the fields maybe ?

small topaz
open drum
#

hello guys~

#

i created a movable npc

#

which has tiledefiniton

#

and it works

#

but i created a script .txt with item

#

but it isn't working

#

i can pick it up

#

but when i spawn the item from debug item list

#

and press place, it doesn't work

#

two items have different properties , i don't understand why..

nova dome
#

i don't know how the mod info comes to be, but probably they were spawned in a different way or at a different time, even between versions

coarse basalt
#

I have a newbie question: A lot of the beginner tutorials I've found have code like this:


    local player = getPlayer()
    player:say("Hello, World!")

end

Events.EveryTenMinutes.Add(tutorialHelloWorld)```
#

But the game breaks on error every time, with Object tried to call nil in tutorialHelloWorld

#

what is messing me up here?

#

Solution: F me, it's Say not say

#

how do I get predictive code in VSCode? 😅

frank elbow
#

Microsoft has an extension for it. Rather than predictive code, though, I'd urge you to go the intellisense route

dusty wigeon
#

Good Morning

frank elbow
#

If you'd like to stick with Lua, you can utilize lua-language-server and a doc library generated with pz-zdoc to get intellisense recommendations. If you'd prefer TypeScript, you can use PipeWrench

frank elbow
frank elbow
open drum
frank elbow
#

So it's fixed now? By “your own name” do you mean Wuro or 우로? I can see why Korean characters wouldn't work in module names but I'm unsure why “Wuro” wouldn't

open drum
#

yea it fixed it by putting the moveables.tilename

open drum
#

but when i create on from TileZed, it saves by name Moveables.tilename

#

i wish to change that module "moveables" into my own

#

but can't figure out where i should do thtat

#

this is what i mean

#

and this is vanilla

#
                
{
    imports 
    {
        Base
    }


    item ivery_npcs_request_1__0
    {
        DisplayCategory = Furniture,
        Type            = Moveable,
        Icon            = default,
        Weight              = 0.5,
        DisplayName        = npc1,
        WorldObjectSprite    = ivery_npcs_request_1_00,
    }      

}```
#

so i had to do this to make it work

dusty wigeon
#

so im having an issue that is probably really simple and i may be overthinking it. How does the base game keep the cooking pot after using it? Do they use the oncreate thing for it?

#

i have the recipe that is to create the uncooked pot and then later the cooked pot is used to make the tray. I tried uysing keep pot in the recipe but the problem is that the recipe then makes the meth and i still have the pot in my inventory. I tried removing the keep and make it so that when the baking tray was created it had 2 results. with one being the pot.

#

I think i just figured out what i did wrong. I used / instead of , seperating the result

open drum
#

u put "keep"

#

for example if you want to keep "pot"

#

then do "keep pot,"

dusty wigeon
#

i tried that

#

is it possible to have 2 results from a reciope

#
function Recipe.OnCreate.MakeBowlOfStew4(items, result, player)
    for i=0,items:size() - 1 do
        local item = items:get(i)
        if item:getType() == "PotOfStew" then
            result:setBaseHunger(item:getBaseHunger() / 4);
            result:setHungChange(item:getHungChange() / 4);
            result:setThirstChange(item:getThirstChangeUnmodified() / 4);
            result:setBoredomChange(item:getBoredomChangeUnmodified() / 4);
            result:setUnhappyChange(item:getUnhappyChangeUnmodified() / 4);
            result:setCarbohydrates(item:getCarbohydrates() / 4);
            result:setLipids(item:getLipids() / 4);
            result:setProteins(item:getProteins() / 4);
            result:setCalories(item:getCalories() / 4);
            result:setTaintedWater(item:isTaintedWater())
        end
    end
    player:getInventory():AddItem("Base.Pot");
end
#

thats a snipet of code from base game

#
 recipe Make 4 Bowls of Stew
    {
       PotOfStew,
       Bowl=4,

       Result:StewBowl=4,
       OnCreate:Recipe.OnCreate.MakeBowlOfStew4,
       Time:80.0,
       Category:Cooking,
       OnGiveXP:Recipe.OnGiveXP.None,
       OnCanPerform:Recipe.OnCanPerform.SliceCooked,
    }
#

this is the recipe that goes to it

open drum
dusty wigeon
#

pot

open drum
#

or what you could do then

#

have AddItem

#

in the function

#

so giving a new Pot to the player inventory

dusty wigeon
#
function Recipe.OnCreate.MakeBakingTrayMeth(items, result, player) 
    player:getInventory():AddItem("Base.Pot");
end
open drum
#

yes

#

and it doesn't give the pot to the player?

dusty wigeon
#

i havent tried yet

#

i just did it

#

im missing something somewhere

pseudo heath
#

Found this Trait mod on the workshop, anyone know how I can edit it so It increases the perception range by XYZ? Like Eagle-Eyed/Keen-Hearing but more effective

local function initMagDrillsTrait()    
    local MagDrills = TraitFactory.addTrait("MagDrills", getText("UI_trait_MagDrills"), 2, getText("UI_traitdesc_MagDrills"), false, false);
        MagDrills:addXPBoost(Perks.Reloading, 3)
end

Events.OnGameBoot.Add(initMagDrillsTrait);
open drum
dusty wigeon
#

o i just figured it out i forgot to change something

#

in my recipes list

#

quick question though. Should i be creating these as local functions so as not to mess with anything

#

just whats in my mod

frank elbow
dusty wigeon
#
function Recipe.OnCreate.MakeBakingTrayMeth(items, result, player)
    player:getInventory():AddItem("Base.Pot");
end
frank elbow
dusty wigeon
#

thats all im doing so its really not calling out to anything outside my mod

pseudo heath
frank elbow
#

Shouldn't that be doable with "keep"?

frank elbow
#

It's java so you'd have to decompile the .class files to see it

dusty wigeon
#

it was not working as i intended as i would craft the object then i would have an empty pot still in my ionventory

#

as well as the resulting item

frank elbow
#

Oh, so you want to destroy it instead? I think the keyword for that in recipes is destroy

dusty wigeon
#

ok can i dm you so im not cluttering this up trying to explain what i did

frank elbow
#

I don't think cluttering this up is too much of a worry

#

You could always make a thread if that's a concern—don't want stuff getting lost in DMs

dusty wigeon
#

ok

#

so give me a few to figure out how to explain my madness lol

#

I have the first recipe to create meth and it works fine after removing keep pot which is what i wanted, Then after it is cooked i have another recipe that puts it in a baking tray, The last recipe is bagging the meth up. What i was running into was that i would try to add the pot as a result so i could get it back from the adding to baking tray recipe, the same with the baking tray from the bagging recipe. It wasnt giving the m back

#

sorry im bad with words

frank elbow
#

Ah, gotcha

#

No worries, makes sense

dusty wigeon
#

yea its been a long time i been working on this mod

#

i did 40 hrs in 2 days the i did roughly 12 hrs yesterday and im working on about 4 hrs today already

#

adding roughly 47 items

#

and too many recipes

#

any ideas why switching it to local would do this

frank elbow
frank elbow
#

That is, function x.y(...)end is equivalent to x.y = function(...)end, where x is a table. A table field cannot be local, or global for that matter, but a variable that references that table can be

dusty wigeon
#

ok

calm depot
#

the local keyword is for declaring a var within the scope of a block - be it the entire lua file, or an if/while/for/function block. When you declare a function as above, that's actually just syntactic sugar for setting a key in a table - in this case, a key called MakeBakingTrayMeth within the OnCreate table

grim lynx
#

Is there a way to get the coordinates of player made safe houses 🏚️ from the server directory ? Should I look in one of the database files?

fast galleon
# grim lynx Is there a way to get the coordinates of player made safe houses 🏚️ from the s...
grim lynx
frank elbow
#

If this isn't from the context of a mod—you may be in the wrong channel 😄 But you could very well decode the .bin files, it just takes a while and a lot of reading through the decompiled source to see the data sizes & what's in each location

red tiger
#

It would involve some programming but yes you should be able to view them.

#

I think this is the fourth time that I've seen this sort of request.

grim lynx
red tiger
#

I can write an unpacker for it.

grim lynx
#

My goal is to make a utility that identifies chunks where player safe houses are located and then deletes the chunks not near the safe houses.

#

But in order to do that I need the cords for the safe houses.

red tiger
#

You can do one of two things here:

  1. You can write a Lua mod that goes through SafeHouse.getSafeHouses() ArrayList and do the magic yourself or
  2. You can modify the files when the server is offline.
#

I believe that everything you'd need to do it in Lua is exposed.

grim lynx
#

What does exposed mean ?

red tiger
#

So you're not a modder?

grim lynx
#

Not yet no.

red tiger
#

Hmm ok that explains your wording.

#

Yeah it's definitely doable.

#

The problem is deleting chunks from files when a server is active.

#

Got to be really careful.

#

If you delete them from the game's code then it shouldn't be much of a problem.

grim lynx
#

So I need to learn Lua and some basic zomboid modding then dig into SafeHouse.getSafeHouses()

tawdry solar
#

@bronze sinew ask in here

#

this bracket leads nowhere

#

thats an issue

bronze sinew
#

How do I add a mask to the game? Heres what I have so far

tawdry solar
#

i think the model needs improving too

bronze sinew
tawdry solar
#

cause you need too like uh

#

i forget what its called

#

but its like hte skeleton mesh

bronze sinew
#

I havent added the model yet because i have no idea where to put it lol

tawdry solar
#

this could be of some help

#

it has some assets

bronze sinew
#

ah yeah thats gonna help, thank you! : D

tawdry solar
#

np man

#

i can help with file struct btw

#

so wheere the folders go and code

#

oh btw

#

remove some of the spaces in your code name

bronze sinew
#

alright, im gonna have to figure out the occupation thing eventually

tawdry solar
#

and its called .txt.txt

bronze sinew
#

OH I DIDNT EVEN NOTICE THAT-

#

Thank you!

tawdry solar
#

a normal text file is by default a .txt

#

btw i can help with melee items

#

if you ever need that

bronze sinew
#

alright!

red tiger
bronze sinew
#

Is it safe to get rid of these since I dont want any blood, dirt, or holes in it?

frank elbow
#

Also, you wouldn't necessarily need Java to read the .bin files—I've done something similar for GameTime & player data with Python before

keen beacon
#

So if you manage to make such a mod (or tool rather), include that functionality and/or automatic deselection of safehouses you'd have a unique selling point. Spiggo

gaunt thorn
#

is the IDEA intelliJ mod tool nessecary to mod?

frank elbow
grim lynx
# keen beacon https://grabofus.github.io/zomboid-chunk-cleaner/ https://lordikol.github.io/PZ...

I use that tool all the time. It's awesome. As far as I know it doesn't know where safe houses are.

Another limitation is that if you use a rented server you have to download your backup, uncompress it, run the tool, then upload the world again.

The server service I use will delete map chunks if given the string of file names. It would save a a lot of time to skip the downloading and compressing.

That's why I'm looking for ways to generate a file name string that excluded safe house locations.

tawdry solar
#

i would stay on the safe side

bronze sinew
#

alright

pseudo heath
frank elbow
pseudo heath
#

nvm

keen beacon
red tiger
#

The PipeWrench environment is for Typescript + Lua for modding. The ZedScript extension is for handling scripting files.

#

=)

#

Currently writing a passive tokenizer for formatting script files.

red tiger
#

I'm going to bet it's either a NoSuchMethodError, NoSuchFieldError, NoSuchClassError, or a stackdump because the error originated in the eden of the JVM.

#

Almost every person asking about Java patches not working is exactly that.

gaunt thorn
red tiger
fading horizon
#

what tools would be appropriate for a "lobotomize" action

#

screwdriver? needle?

#

metal pipe?

bronze sinew
#

icepick, hammer, screwdriver, needle, pretty much anything sharp as long as you have something to drive it in with

#

a needle may be to flimsy though

fading horizon
#

i didn't even know there was an icepick in game

#

that's perfect

#

well, its for a small thing

#

||its for stuart little||

bronze yoke
#

about time

bronze sinew
#

i dont know if there is one actually

bronze sinew
fading horizon
#

so much fun to be had

bronze sinew
#

im trying to figure out the mask stuff still ;-;

bronze sinew
fading horizon
#

vscode restarted and i lost my workspace that was all organized

bronze sinew
#

ah that sucks ;-;

#

I cant get the Richard mask to appear in game for me ;-;

fading horizon
#

oh wait i was able to recover it

#

based vscode

spark vector
#

Is there some way to modify the saveInfo during OnSave()?

bronze yoke
#

that's very vague

frank elbow
frank elbow
bronze sinew
#

what do the lines on these mean? its a stupid question but i wanna make sure im understanding it correctly

frank elbow
#

Each indentation level is a subfolder

#

That was a poor way to explain that, what I mean is every indentation level signifies that the above element (the one with a lesser indentation level) is the parent folder of that file or folder

bronze sinew
#

oh so L___ means the folder above it is the one it goes into?

#

this is my first time coding anything lol

frank elbow
#

Yeah, so SteamGuideClothing is within Workshop

#

No worries, it's not a stupid question if you're unfamiliar with those kinds of text representations of directory structure

bronze sinew
#

so preview.png and contents are in SteamGuideClothing?

#

alright thanks! : D

fading horizon
#

he is

frank elbow
#

He's a mouse in the film & a human (that looks like a mouse) in the original book

fading horizon
#

well the way he acts hes a rat

frank elbow
#

Fair enough

fading horizon
#

accurate

#

stuart little would definitely dip in your time of need

frank elbow
#

I think Stuart Little is trustworthy and kind 😇

fading horizon
#

i hope his stupid little boat capsizes in one of his stupid little boat races and he gets trapped inside while it sinks

#

🙂

bronze sinew
#

does vscode make all text file things in .xml?

#

i already did the mod stuff once but it wouldnt work so i restarted it

fading horizon
frank elbow
bronze sinew
#

im trying to make the masks from Hotline Miami and im having trouble understanding the code lol

frank elbow
#

If you want to make an .xml file you just need to add that to the end of the filename

bronze sinew
#

ah, no wonder why it didnt work last time lol

#

thanks for the help!

#

also the mask would go in "Static" and not "Skinned" right?

red tiger
#

Making progress on my formatter today.

bronze sinew
#

nice!

fading horizon
#

now you can light him on fire too

bronze sinew
#

YES

#

also have you made a clothing mod before?

fading horizon
#

now i just need to figure out how to make an option to flush him down the toilet

#

and I haven't, sorry

#

i'm not very good at blender so clothing mod scary

bronze sinew
#

I just learned how to use blender yesterday and its better then coding imo

frank elbow
#

Heresy

bronze sinew
#

im gonna get my mod working with the one mask, then do a fresh reinstall of pz to clean out some of my mods lol

fast galleon
#

I hate "this", proceeds to add "this" to the game 😅

bronze sinew
#

accurate

fast galleon
#

Any plans to make a Stuart costume?

#

Imagine using this with an NPC mod.

red tiger
#

Planning on getting a pet birds mod made for 42 when it becomes a thing.

bronze sinew
#

do I make those folders in my mod folder or put it in the base game folders?

red tiger
#

Cool. It seems like I have a controllable tokenizer and formatter setup to begin implementing the formatting options planned.

fading horizon
#

Perhaps

#

But I'm not too good at blender so I feel like it would come out poorly

#

But the option to skin him alive then make a costume out of his flesh seems like a good feature

bronze sinew
fading horizon
#

Just a really fucked up rat costume

bronze sinew
#

yeah, you got a bit mad while skinning him and it hurt his skin

#

also what do you guys think about this being the icon for the 50 Blessings Member occupation when i make it?

fading horizon
#

I would maybe add a drop shadow to the whole thing personally but I think it looks good

bronze sinew
#

alright, I wanna make it to where the mask traits are locked to the occupation and you are only allowed to choose one mask trait

fading horizon
#

Sounds like a cool mod honestly, looking forward to seeing it progress

#

Loved HM

bronze sinew
#

like Richard provides no stat boosts and Rasmus provides a foraging stat boost

fading horizon
#

You can make a local cached version of zomboidb

#

Which will be separate from your main game

bronze sinew
#

i didnt even think of that lol

fading horizon
#

So you can have different mods loaded (I only load the mod I'm developing or testing)

#

Makes it super fast

bronze sinew
#

i do need to clean out my mods though, i get like 100 errors before i even load my characterded

fading horizon
#

Oof

#

Iktf

#

My main file has like 350 mods

bronze sinew
#

least modded pz game

red tiger
#

I've only played vanilla PZ.

bronze sinew
#

also is a clothing item like a helmet or mask a "static" clothing item thing or a "skinned" clothing item thing?

#

also does anyone have a guide or template on custom occupations and traits?

fast galleon
gaunt thorn
#

is there a way for me to make a mod that removes parts of another mod?

red tiger
#

Formatting braces now in ZedScript.

#

Neato.

bronze sinew
#

do i turn "Skinned" to "Static" for a mask or do I leave it like how it is?

red tiger
#
<div>Hello, World!</div>
red tiger
#

Cool. I have nested scope formatting for inline brackets working.

#

Now onto the madness that is property-value whitespace fixing.

#

Also going to add my donation links to the extension when I update it today. =)

#

Going to include the very first formatter code most-likely.

#

Before:

#

After:

#

Now I'm working on the spacing between the = signs to get rid of the whacky and inconsistent spacing in the vanilla files.

#

The reason why the = spacing looks weirder in the formatted result as of now is due to \t.

#

This is a great sign. It means that I'm closer to writing diagnostics than I thought.

#

It means I can squiggle / underline things like deprecated or improper values for properties.

#

TIS could actually take this tool and clean the game's scripts with it.

#

=)

bronze sinew
#

so I cant get the mask to be added in game, does anyone wanna look over the code i have and tell me what im doing wrong?

red tiger
#

aaaaaaaaaaaaaaaaaaaaa

#

Looks like my formatter breaks recipes.txt however there's some really weird commenting in there..

#

Yeah. Looks like it's the fault of the file itself.

#

@tame mulch Bug report. Improper enclosure of comment block in recipes.txt. =/

#

Not sure if the parser for PZ scripts is treating comment blocks like nested brackets..

#

Which isn't the proper behavior for this asm-syntax comment-block structure.

#

It could also be causing unnoticed, undesirable side-effects.

bronze sinew
#

are helmets static?

#

or are they skinned?

#

nvm just figured it out lmao

gentle mountain
#

Hey folks, quick question.
I'm trying to adjust Brita's Armor Packs' insulation forthe GORKA 6 jacket. It has two models accessible through the context menu. These are the stats for the items as defined in the related scripts/clothing file

Jacket without hood on:

item Gorka6_Hoodie
    {
        Type = Clothing,
        DisplayName = BARS Gorka 6 Jacket,
        ClothingItem = Gorka6_Hoodie,
        BodyLocation = Jacket,
        BloodLocation = Jacket,
        Icon = Gorka6_Hoodie,
        RunSpeedModifier = 0.95,
        NeckProtectionModifier = 0.5,
        BiteDefense = 25,
        ScratchDefense = 30,
        Insulation = 0.35,
        WindResistance = 0.60,
        WaterResistance = 0.50,
        Weight = 2,
        FabricType = Cotton,
        ClothingItemExtra = Gorka6_Hoodie_ON,
        ClothingItemExtraOption = Gorka6_Hoodie_ON,
        clothingExtraSubmenu = Gorka6_Hoodie_Back,
        WorldStaticModel= W_Gorka6_Hoodie,
    }

Jacket with hood on:

    {
        Type = Clothing,
        DisplayName = BARS Gorka 6 Jacket (Hood On),
        ClothingItem = Gorka6_Hoodie_ON,
        BodyLocation = Jacket,
        BloodLocation = Jacket,
        Icon = Gorka6_Hoodie,
        RunSpeedModifier = 0.98,
        NeckProtectionModifier = 0.5,
        BiteDefense = 30,
        ScratchDefense = 30,
        Insulation = 0.70,
        WindResistance = 0.70,
        WaterResistance = 0.70,
        Weight = 2,
        FabricType = Cotton,
        ClothingItemExtra = Gorka6_Hoodie,
        ClothingItemExtraOption = Gorka6_Hoodie,
        clothingExtraSubmenu = Gorka6_Hoodie_ON,
        WorldStaticModel= W_Gorka6_Hoodie,
    }```
#

What I noticed is that the insulation for the hood doesn't cover the head, see the attached image.

bronze sinew
#

im having a bunch of confusion with my mod but I think those are the stats lol

#

I just sorta learned how to code today though so i dont think i can help that much ;-;

gentle mountain
#

I assume this has to do with the "BodyLocation" definition being "Jacket", and insulation settings being applied from there, right?

bronze sinew
#

that makes sense so that could be it

gentle mountain
#

If that is the case: Does the BodyLocation definition support multiple parameters so I can have the hood actually provide insulation for the head, if using the "Gorka_6_Hoodie_ON" item?

bronze yoke
#

bodylocation is just a 'slot' system to stop players from equipping conflicting items, i don't think it's where insulation is determined

#

i've worked with a lot of the body location code and i never saw anything about it

#

if it is (it might be hardcoded somewhere) then i do know that you definitely can't have two bodylocations on the same item

red tiger
gentle mountain
#

Hm, damn, so that might not be it... I've not dabbled with anything much, that might just give me an excuse to learn lua...

bronze sinew
bronze yoke
#

if it won't show up as a mod at all the issue is with your mod.info

#

either it's in the wrong place or it's unreadable

bronze sinew
#

oh

#

thats what my stuff looks like

bronze yoke
#

RichardMask should be in the mods folder

bronze sinew
#

so the RichardMask folder?

opal rivet
#

No it should be in a file called mods

bronze yoke
#

yeah, so the structure would end up being like contents/mods/RichardMask/mod.info

gentle mountain
red tiger
gentle mountain
#

Plus, wouldn't be much fun for anyone to parse that if I posted it in a single line.

bronze yoke
#

i've always seen Contents capitalised too but i don't know if you actually have to do that or not

bronze sinew
bronze yoke
#

sure!

gentle mountain
red tiger
bronze sinew
#

is any of this correct and gonna work?

red tiger
#

You can upload files or do this:

print('Hello, World!');
bronze yoke
bronze yoke
bronze sinew
#

alright thanks!

gentle mountain
#

Screenshots of code…
@bronze sinew, my man, don’t do that, please. Makes it hard to read, hard to diagnose, hard to everything.

If you wanna work with code samples here, try enclosing them in triple backticks. Formats the code in monospace font, makes it easier to read, etc.

bronze sinew
gentle mountain
bronze sinew
#

i just tested it and it sadly wont show up for me to enable it

bronze yoke
#

is the 50Blessings folder in User/(your windows username)/Zomboid/Workshop ?

bronze sinew
#

yeah

gentle mountain
# bronze yoke it looks like it's the BloodLocation that determines the insulation area, you ca...

BloodLocation now looks like this

        BodyLocation = Jacket,
        BloodLocation = Jacket; Hat,
        Icon = Gorka6_Hoodie,

and Zomboid throws the following error when loading a save after the change was applied:

ERROR: General     , 1681688765923> ExceptionLogger.logException> Exception thrown java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "<parameter1>" is null at ArrayList.addAll.
ERROR: General     , 1681688765923> DebugLogStream.printException> Stack trace:
java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "<parameter1>" is null
    at java.base/java.util.ArrayList.addAll(Unknown Source)
    at zombie.characterTextures.BloodClothingType.getCoveredParts(BloodClothingType.java:229)
    at zombie.characterTextures.BloodClothingType.calcTotalBloodLevel(BloodClothingType.java:606)
    at zombie.inventory.InventoryItem.synchWithVisual(InventoryItem.java:1492)
    at zombie.scripting.objects.Item.InstanceItem(Item.java:2257)
    at zombie.inventory.InventoryItemFactory.CreateItem(InventoryItemFactory.java:68)
    at zombie.inventory.InventoryItemFactory.CreateItem(InventoryItemFactory.java:150)
    at zombie.inventory.InventoryItem.loadItem(InventoryItem.java:1119)
    at zombie.inventory.InventoryItem.loadItem(InventoryItem.java:1089)
    at zombie.inventory.CompressIdenticalItems.load(CompressIdenticalItems.java:299)
    at zombie.inventory.ItemContainer.load(ItemContainer.java:2891)
    at zombie.characters.IsoGameCharacter.load(IsoGameCharacter.java:5524)
    at zombie.characters.IsoPlayer.load(IsoPlayer.java:972)
    at zombie.iso.IsoObject.load(IsoObject.java:987)
    at zombie.iso.IsoCell.LoadPlayer(IsoCell.java:6131)
    at zombie.iso.IsoWorld.init(IsoWorld.java:2654)
    at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268)
    at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225)
    at java.base/java.lang.Thread.run(Unknown Source)```
bronze yoke
#

don't use a space

#

Jacket;Hat

red tiger
bronze yoke
#

i don't think so anyway

#

i only looked over it briefly but i only saw a split

red tiger
#

That's very bad if true

gentle mountain
red tiger
#

Then I'll need to adjust the format code I just wrote for semi-colons to not use clean spacing.

#

Just let me have access to the script Java files. I'll immediately clean up a lot of the issues with parsing.

#

x_x

#

Throw me some stupid NDA lol

#

I didn't spend ~200 hours on a project that'll format script text to be ugly.

bronze yoke
#

i don't see a Hat bloodlocation

#

try Head

gentle mountain
#

FML, I misread "Blood" and "Body" when grabbing the definition for head gear. Thanks!

#

I either need sleep or coffee. But it's already 2am, so sleeping ain't gonna be enough. More coffee!

red tiger
gentle mountain
# bronze yoke try Head

HAH!! That did it, many thanks, albion!

Time to patch the jackets with hoods to they reflect accurately.

red tiger
#

@bronze yoke Guess I'll need to create a list when I finally write my mega-thread.

late hound
winter thunder
#

If there is a creator that I want to talk to about their mod, and have not gotten a reply on steam- Do yall think it would it be better to drop an @ in an open channel like this? Dm them directly in disc? Or just assume they think I am too stinky 🥸

Actual question tho, bc I know how annoying it can be to get a bunch of notifs or dms about a mod you make, but also don't want to miss out on the potential to work with / learn from someone if they just don't have their steam notifs on or whatever lmfao

ancient grail
#

Spiffo

#

@winter thunder

#

If it's abandoned mod you can adopt but contact spiffo

winter thunder
#

Not abandoned, it is currently in dev. Just figure it is better to talk to people working on same/similar mods to things I have been working on too- Either to make sure that they will be unique, get tips from each other, or even collaborate. No sense having multiple different people pouring the time and energy into seperate projects when collaboration could lead to a project that is much much better in the end. If that makes sense

ancient grail
#

Team Orbit looking to recruit 1 Modder
Specifically for Code related projects
Pls dm me and join the discord server (links on my profile) if you havent yet
.thank you

frank elbow
red tiger
frank elbow
#

I remember seeing it when looking into the script parser; comments are stripped by matching starting from the end (i.e., last index of */) then looking backwards, so /* /* */ results in /*

red tiger
#

That should be rewritten.

#

I scan through them left->right on a 1-dimensional string.

#

The behavior there is not how ASM block comments behave.

frank elbow
#

Yeah it's certainly odd

red tiger
#

It's bad to scan and move backwards unless you are destructively / invasively formatting.

#

Tokenizing you go forward as much as possible.

mossy steeple
#

i am definitely doing something wrong in this code, most likely in the vehicle part of it. fails on line 31 and things don't spawn in any of the places i've tried to assign them to. but hey, to be expected with my first time touching lua

bronze yoke
#

VehicleDistributions.list[MP5TrunkDistribution[i]].items should be VehicleDistributions[MP5TrunkDistribution[i]].items

mossy steeple
#

ahh, gotcha

#

yeah i'm just sorta... looking at what other mods do and frankensteining it into my own thing at the moment to learn, i must've looked at the wrong thing for this part

bronze yoke
#

the rest looks good, i'm not sure why it wouldn't be spawning

#

is your item in module Base? if you don't put the module it assumes base

mossy steeple
#

oh, no, it isn't! yeah that's it, i forgot to add that to this one

#

that's just a
module EaMP5 {
//code here
}
right?

bronze yoke
#

oh, code doesn't go into script modules, but you should reference your item as "EaMP5.MP5" instead of "MP5"

red tiger
#

ZedScript is a storage / settings format.

#

"Script" is a misnomer here.

#

Nothing executes in ZedScript.

mossy steeple
#

hm, gotcha

red tiger
#

A lot of progress today.

#

My third attempt at writing a less aggressive formatter is doing well.

#

Going to wait on releasing the next version of my extension until I get my formatter more rounded out from things like bugs or technicalities.

#

Can't wait to show off diagnostics when I get there.

mossy steeple
#

hmm, the game seems to be crashing whenever it tries to spawn something in the loot table. log says it's something about getting a null value instead of what it should be?

bronze yoke
#

ERROR: unknown WeaponPart type "null"

#

the stack trace seems related to that too

mossy steeple
#

yeah, i saw that but i'm not sure what it's referring to

#

weaponparts are attachments, but i'm testing now and there are attachments spawning just fine

bronze yoke
#

it looks like the related code is to do with spawning the weapon with a random attachment, does it work okay if you cheat in your item and add attachments?

mossy steeple
#

hm... all of them work except for the red dot sight

#

well, the laser just sort of floats in the air since i apparently got the positioning wrong on that, but it attaches just fine

#

red dot doesn't show in the menu

mossy steeple
#

ooh, hang on... looking at another mod and it seems like it has a file listing out what attachments a weapon can spawn with; i probably need that, huh?

bronze yoke
#

oh that might be it!

primal remnant
#

Question about modifying an existing mod:

We have a dedicated server with the "Blacksmith" mod. It uses item tweaker to adjust the "metal values" of items that can be melted down in a stone furnace. The problem is there there are many metal items in the game that can not be melted down. If I decided to modify this mod, would I simply modify the existing .lua file which tweaks the items, or should I create a separate file and add that to the same folder in our server?

Follow up question, when a mod updates does it remove extra files from its folders or does it only modfy files where changes have been made (leaving our custom file alone)? Thanks in advance.

cosmic condor
#

just create a new mod that requires other mods that you would like to modify

primal remnant
#

Thank you, I was trying to be lazy but even our guys suggested we do that. Preciate the validation!

cosmic condor
#

I hope you understand what I meant correctly and not making a standalone mod

#

Also, lots of people suggest not using Item Tweaker

#

better go with DoParam

#

as far as I know, your additional files won't be deleted

#

The mod folder might be missing when you unsubscribe from the mod, but when you resubscribe, the folder structure will come back and your additional files will be there.

red tiger
#

Good night.

umbral bolt
#

Hi All, is there a way to access (read/write) nutritional values( cals, carbs, ...) for items via lua ( not inventoryItem). What I'm trying to do is to copy those for consistency from closed to open cans without duplicating the values in the scripts.txt file . Thanks.

fading horizon
#

i'm not sure how you could do it without accessing inventory item. Maybe you could try accessing modData on the nutrition parameters?

#

i was actually just writing something that uses inventoryItem

#

one sec

#
require "TimedActions/ISEatFoodAction"

local base_eat = ISEatFoodAction.perform          --    make a copy of the vanilla function

ISEatFoodAction.perform = function();             --    override vanilla function
    local carbs = self.item:getCarbohydrates();   --     variable containing item carb count
    local o = base_eat();                         --    let vanilla function run to create "o" object
    return o;               --     returns o object so that the rest of the vanilla functions perform
end
#

How can I make a characters stat decrease over time? I tried looking for the vanilla pill functions but couldn't find anything other than the timed action which doesn't have anything relating to stats.

Basically, I want the character to either craft a recipe or start a timed action that will then reduce a certain stat by 5% every 20 minutes or something. How can I do that time calculation? I don't want the stat change to be instant

#

my only guess is setting a bool that the everyTenMinutes events checks and changes it based on that

#

but there might be a better way?

bronze yoke
#

pill effects are handled in java

#

it's a bodydamage thing, i don't remember exactly how it works but you might be able to set the same values it does?

fading horizon
#

problem is that its not using a default moodle like stress or something

#

i'm using a custom modData parameter

bronze yoke
#

then your other idea is probably the only way

ancient grail
fading horizon
#

yep, that's what i'm doing rn actually

#

almost have it working

#

very close

ancient grail
#

Then just add a checker first saying if its zero then nill that noddata and remove the event

#

When Taking the pill check using ontest
If the playyer has the moddata already
If it has then

getPlayer():Kill(nil)```

Hehe
fading horizon
#

ERROR: General , 1681720797257> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getEmitter of non-table: null at KahluaThread.tableget line:1689.

#

this is what i'm running into rn

ancient grail
#

Shw code

fading horizon
#

i'm getting there

#

one sec haha

ancient grail
fading horizon
#
local base_perform = ISEatFoodAction.perform

ISEatFoodAction.perform = function()
    local carbs = eatItem.item:getCarbohydrates();

    if carbs and carbs > 0 then
      isBloodRising = true;
      local glucoseIncrease = carbs * carbToGlucoseRatio;        
      glucoseDelta = glucoseIncrease / 6                        
      maxBloodSugarFromFood = ((eatItem.character:getModData().bloodSugar) or 80) + glucoseIncrease
    end



    local o = base_perform();                                     
    return o;                                                                    
  end
ancient grail
#

Initiate the moddata upon spawning maybe

#

Initialize i ment

fading horizon
#

its an issue with the sound though according to the log

#

not the modData

ancient grail
#

Maybe remove the sound?

fading horizon
#

that would remove it from literally every item though

#

since it's a problem with the vanilla function

ancient grail
#

Right

fading horizon
#

wait

ancient grail
#

I wouldnt use on eat if possible

fading horizon
#

i wouldn't know what else to use

#

making a diabetes mod