#mod_development

1 messages ยท Page 22 of 1

marble lynx
#

Isnt this more for adding a separate tab of options?

#

Or is it linked

marble lynx
#

Ah awesome, thank you sir ๐Ÿ™

#

Should've asked here soon

ancient grail
#

how do you check that on console?

shadow geyser
#

wrote more explaining it in a couple messages below it

#

or is it still confusing?

ancient grail
#

got it

#

sorry i havent reached that part as i read i proceed to reply early hehe

marble lynx
#
local key_data_NarakaStance = {
    name = "NarakaStance", --just id (user won't see this name)
    key = Keyboard.KEY_APOSTROPHE,
}

if ModOptions and ModOptions.AddKeyBinding then
    local category = "[Combat]";
    ModOptions:AddKeyBinding(category, key_data_NarakaStance);
end

local function NarakaStance(keynum)
  if keynum == key_data_NarakaStance.key then
    print("Hello! You've pressed 2 on the numpad!")
  end
end

Events.OnKeyPressed.Add(NarakaStance)```
#

I managed to get the keybinding to show up in the mod options and all but I can't get it to do anything in the game itself

#

what am i doing wrong

#

i needed to fully restart my game

marble lynx
#

Fellas, how do I do an If statement check for a custom weapon property

#

Something like:
if (NarakaWeapon:IsSupported()) then

#

cause i tried that and it broke

quasi kernel
#

A custom weapon property?

#

You mean like ModData or something?

marble lynx
#

Yes, I think

quasi kernel
#

item:getModData().isSupported

marble lynx
#

(i am not good at lua, i am literally getting by from referencing existing mods)

quasi kernel
#

Something like that would probably work

marble lynx
#

Let me try, thank you

quasi kernel
#

I havent personalyl dabbled with weapons yet but that's my best guess

#

(keep in mind you've have to set the mod data first otherwise it'll return an empty table, and isSupported will be nil)

marble lynx
#

Oh awesome, yeah that didn't break

quasi kernel
#

gaming!!

marble lynx
#

now i just need to figure out why transferring the condition also breaks

shadow geyser
#

because the tag you can attach to the item script, and then it will be on all instances of that item

ancient grail
#

when i have a function called by recipe create
and it doesnt consume any items it will create a subcontext saying one or all

how do i remove this?

i figured i can destroy the item and result the same item
but it will change position on the ground

this is not ideal since im doing doing this for my wormhole mod

marble lynx
#

Hmm, how do I create a custom tag? Do I just list it under the Tags =?

shadow geyser
#

yeah you can just write them into that list

marble lynx
#

In that case, how do I phrase the If statement for tags? (again, completely new to Zomboid lua)

#

Call the modData again?

hidden jungle
#

does anyone know how to control the player's vision cone?
i found the ViewDistance variable that seems to match the size of the cone in half degrees. but setting it does nothing because it updates its own value before using it.
anyone have any ideas? im pretty sure i need a PreRender event to make this work which as far as i know doesnt exist.

annoyingly, the Ambient light value can be changed during player updates or OnTick() and it works just fine

shadow geyser
#

there is also a getTags, which should give you a list of them too

shadow geyser
marble lynx
shadow geyser
#

yeah

hidden jungle
# shadow geyser probably will need to dig into the decompiled code yourself to check. there are ...

i think thats what is happening here.
the annoying thing is that the ClimateManager seems to be what handles the player vision. but no matter when or where you call setViewDistance() it always seems to self update the number before it uses it. you can see it by calling ClimateManager:update() and then checking the value.
i've burnt like 3 hours poking around so im calling it a night.
however. since i've never seen this used anywhere else. and it has usefulness. the ClimateManager's Ambient value determines how dark the game is. you can also pull the ambient color and a few other things from there.

marble lynx
#

I see ๐Ÿค”

marble lynx
#

But I like the whole "your variant will work too if you tag it like mine" thing

shadow geyser
#

well, so the issue with moddata, is that it belongs to that one item. so if you make one spear, and set in the moddata give it a flag "isvalid" for whatever check you are trying to do, it will persist on that item. however if you make another spear, that spear has it's own moddata table. so it won't have the flag in it, until you set it.

#

so unless the flag you want to set is going to vary for different instances of the same item or vary during playtime, i.e maybe it isn't compatible for the first 2 months, but then after researching some tech, it becomes suitable. Those instances it might be better to use modData. but if the item is forever going to be either compatible or incompatible, tags work nicer.

marble lynx
shadow geyser
#

if you make another of the same item. so if you make two vanilla wooden spears, they each have their own moddata

marble lynx
#

๐Ÿค”

#

interesting

#

So if im getting this right,

Custom variables/flags in weapon moddata (from the scripts txt) don't actually "stay" on each individual weapon, they're only manually called. While tags are always attached?

#

This is pretty confusing mb

#

๐Ÿคฃ

#

Like, aren't tags also part of moddata?

#

Or have i misunderstood what a moddata even is

bright heron
#

Hi, does anyone know how to create a custom outfit in project zomboid?๐Ÿค”๐Ÿค”

hardy flint
#

i just did some testing and getUrlInputStream works perfectly ๐Ÿ‘

sand citrus
#

Hello, I have been trying to make my first mod with just a custom bag. I wanted to use some custom audio for the bag closing and putting items in the bag.

While the audio works for the "CloseSound = " bit it does not work for the "PutInSound = " portion. I have tried swapping the sounds between them and they both work when attached to the CloseSound but not with PutInSound.

I have looked through a lot of different mods so see how other people do it but I have only run across people using the default PutInSound "PutInSound = PutItemInBag," Any ideas what I am doing wrong? I have tried copying the entire bag definitions from other places just incase it was some silly formatting thing but no luck

empty cove
#

have you tried looking for the sound definition? not sure if i remember it correctly though

#

adding new sound file might not be enough if they require sound definition? ๐Ÿค”

#

i have vague impression that player sound emitter require those definition

sand citrus
#

Would that be like a sounds.txt or something under the scripts? Like this?
sound TestsoundPutInBag
{
category = Item,
clip
{
file = media/sound/CustomPutInBag.ogg,
volume = 1.0,
}
}
if so I have already tried that sadly. Both sounds do work for the record when attached to the "CloseSound" but not the "PutInSound" If you mean something else by sound definition then I don't know. Where would that be located?

calm depot
#

PutinSound? sus.

empty cove
#

have you tried looking for the vanilla putiteminbag definition and see the difference?

sand citrus
#

sound CloseBag
{
category = Item,
clip
{
event = Character/Foley/Bag/Close,
}
}

sound PutItemInBag
{
    category = Item,
    clip
    {
        event = Character/Foley/Bag/StoreItem,
    }
}
#

That is from the sounds_item.txt from the game files

empty cove
#

i have no idea what does that event means, someone might be able to help you understand that part

sand citrus
#

Mhmm, I don't think it is an issue with the sound definition at this point since
"CloseSound = TestsoundPutInBag" plays the custom sound but "PutInSound = TestsoundPutInBag" plays the default sound. I am honestly starting to wonder if "PutInSound = " even works

empty cove
#

eh? it plays the default sound?

sand citrus
#

Mhmm. It plays the default put in bag sound regardless of what I put in "PutInSound = "

#

I have even tried putting in random other sounds defined in the base game

empty cove
#

i'm not coming back home for few days so i can't look into it or help you any further. so, you might want to wait for someone with better experience

sand citrus
#

Mhmm. Thank you for trying to help regardless

empty cove
sand citrus
#

Uuuuugh. Thank you. I need to get better at googling issues.

sand citrus
#

Okay I have another unrelated question. Does anyone know what script/lua file/class adds the delete functionality to trashcans? I want to see how that is implemented and I have been unable to track it down.

zenith smelt
#

Is using font size option to change the size of modded ui something that makes sense?
Or would people not understand ๐Ÿ˜„

sand citrus
zenith smelt
#

Would people assume that the custom ui size is based on font size?

sand citrus
#

Doesn't the game already use a few different font sizes for different parts of the ui?

zenith smelt
#

Yeah, I think it's annoying if I relate it from that because...
It needs a custom size

#

I'll just add a button to change size or sth

weak sierra
#

trying to find a way to get the zones in a cell

#

any ideas?

young orchid
weak sierra
#

i ended up using getZonesIntersecting and setting it to the size of the cell at the cell origin

#

not sure what the zone stack is

#

haven't read the source for that, might be faster if it does the same in the end

#

but new thing, trying to get gridsquare 0,0,0 for a cell to shove some moddata into

#

and it comes up nil

#

so i made a little function to ensure it exists (as i understand) and it throws an exception from the createGridSquare call with no details

#
local function getOrCreateGridSquare(cell, x, y, z)
    local square = cell:getGridSquare(x, y, z)
    if square == nil then
        square = cell:createNewGridSquare(x, y, z)
    end
    return square
end```
#

currently operating under the assumption that i have the wrong coordinates so ima test with a print statement to validate

#

is it expecting world coords..?

sick saffron
#

Anybody here know if it's currently possible to define multiple "texturelights" fields in a vehicle script, based on the skinIndex???

weak sierra
#

well looks like createNewGridSquare already returns retrieved one so my method is redundant

#

but not sure why it's failing

undone elbow
#

How to walk to a point between tiles (squares)?

jovial bough
#

not sure if this is the right place to ask but is there a mod that lets me pan my camera while driving

#

without rolling the window down?

weak sierra
#

lol

jovial bough
#

oh dont tell me it doesnt exist

#

i thought my search skills were just garbage

willow estuary
jovial bough
#

i guess ill just stick to rolling the window down for now...boo

weak sierra
willow estuary
#

Well, as an example, some of the popular mods on the workshop exist because some random not-modder popped in here with an idea and asked if it existed or if anyone thought it was a good idea for a mod, and someone thought it was a good idea and made the mod?

zenith smelt
#

Yeah it's cool that so many people only have 1 mod, that means that it's probably easy to mod

wet osprey
#

what is the item id name of the empty propane torch?
want to add recipe but keeps crafting a propane full one

#

@willow estuary based on that, in the off chance someone sees this and makes it a mod, simple weather shelter

#

hell even just being able to build above you would solve this

random finch
#

What other factor am I missing in getting a melee weapons total distance?

local totalWepRange = _weapon:getMaxRange(_player) * _weapon:getRangeMod(_player);

This used to calculate distance where a given melee weapon hits reveals the range to be slightly longer. (On the same z-plane)

local dist = IsoUtils.DistanceTo2D(_player:getX(), _player:getY(), anObject:getX(), anObject:getY());
weak sierra
#

i want to get a complete list of vehicles in a cell, but it seems cell:getVehicles() only yields loaded vehicles, and so is not a complete list unless someone runs around the whole cell first, causing them to all load in.

#

how can i either get a more complete list, or trigger all vehicles in the cell to be loaded in

weak sierra
#

probably other useful bits in that class

lusty nebula
#

It happens only at the beginning of a new created world/character. If I press one of the hotbar keys ( let's say I press the number 2 key on my keyboard ) my character switch to a surrender position ( hands raised ). Any idea why this happens or how to possibly fix it?

vast veldt
#

Good evening. I'm new to modding PZ and could do with a pointer if anyone could help. I've got my mod file loading but I have no idea how to access the Java object underlying the (player) parameter passed in. If I print (player) I get a zombie.character.IsoPlayer#(OBJECTID) type message, but I cannot concatenate it to anything and/or access any properties. Where am I going wrong?

vapid plover
#

Hey guys i messed up big here with a city mod.. change my spawnregion.lua file.. anyone has the deafault text that comes inside of it?

zenith smelt
#

use the methods on this sight for this object type like isoplayer is player

vast veldt
#

Thank you, will try that now

#

Yes, it worked, thank you!

#

Should I generally be calling methods on objects rather than trying to access properties then?

#

(For the benefit of other readers: code that worked)

zenith smelt
#

properties? like the Field Summary on that website?

vast veldt
#

I'm just struggling a little with the java/LUA mashup. I've written a lot of Java, but very little LUA, although have worked on projects across C, C++, C#.NET, PHP, Java, etc... but I just couldn't intuitively grasp how to access the username from the (apparently available, according to the debugger) field "username" on the object "player"

zenith smelt
#

Yes you should be calling methods generally.
You can however get that data too, by using getClassFieldVal
Also if you open the game in a text edtior like vscode or notepad ++ to look for examples of the code
\steamapps\common\ProjectZomboid\media\lua\

vast veldt
#

Thank you. I'll look through more of the LUA files but this was a really useful insight, appreciate it

keen stratus
#

Can someone tell me why the workshop version of my mod fails to load? (mod.info has the same name)

zenith smelt
#

I think you need a unique name in mod.info and a unique folder name?

keen stratus
#

I thought they needed to be the same?

name=You are infected Trait
poster=poster.png
id=YouAreInfected
description=Giving you a more challenging start by having the Nox infection. 
description=Intended to be used allongside another mod that provides a cure for Zombification
icon=logo.png
zenith smelt
#

this is my steam game.

#

this is my -nosteam game

#

the steam version clearly doesn't have 2 copies of the same mod (from local mod folder and steamworkshop)

#

So it only displays 1 of them

#
%USERPROFILE%\Zomboid\Workshop\ModTemplate

This is where your custom workshop mods should be

keen stratus
#

I do remember clearing out my local files after i uploaded, it could just be me. Im going to ask a friend to try it out

keen stratus
#

Nope no luck on their end. Need to see why being on the workshop makes it not work (even though it follows the same file structure as other mods)
I removed the local versions so i know for sure that the workshop one just hates me

zenith smelt
keen stratus
#

I just found that out ๐Ÿ˜ฆ

zenith smelt
#

๐Ÿ˜„

keen stratus
#

I was about to message that

zenith smelt
#

Nice, works now?

keen stratus
#

Brain does not work but the mod does (ok cut of Media on the bottom of the image but you get the gist)

keen stratus
zenith smelt
#

nice, I'm glad it works!

sly goblet
#

Is there a mod that adds something to stave off zombifacation for awhile?

frosty estuary
#

Is there some way to control or mod that control the zombie population of individual cities or areas on a MP server. Like to increase the population and spawn of Westview but decrease on riverside??

strange sequoia
#

is there a mod to allow dual wielding? I wanna dual wield night sticks, because if one bonk stick good, two bonk stick better!

mystic rampart
#

I'm making a map. It loads into game without issue. It's not showing up on the in game map though, just looks like the vegetation that I put there. Anyone got advice for this?

#

(the vegetation that was replaced I mean)

empty cove
#

Any idea how disable vanilla zombie respawn? and also spawn it using script? if possible, how to get zombie list. It's for my custom meta event.

bright heron
empty cove
#

nah, just like player list, im looking for zombie list to mess around like setting their targets, position and stuffs

deft vector
#

Does anyone here mess with discord bots for pz? Ive been re-doing one of the bots from github to work with pzservertools and never really messed with the help menus much but its ugly af... didnt know if anyone knew where to start or what to look into. Thought about switching it over to hikari but was just asking first... right now the menu is ugly af https://imgur.com/ytDQhwL

zealous wing
#

Does anyone remember the name of a mod that automatically takes things out of your bags while doing a recipe and puts them back in after its done? My monke brane can't remember its name.

zealous wing
#

Never mind, it was Tidy Up Meister. ๐Ÿ˜›

young grotto
#

hello there, do I need to add anything else besides my script for crafting recipe of existing items to function on dedicated server?

#

it's just a simple increased uses script for stuff like cement,gravel, etc

young grotto
#

and crafting stuff

pulsar niche
#

Do we have a mod that tells us the condition of a wound? Like, how many percentages it has healed?

deft vector
#

It says a message based off your moodles but only your character can see it in mp

pulsar niche
deft vector
#

You can look at the Lua file itself. In the translations English folder. Should be in like steam/workshop/10800/2398253681. Folder (this probably isn't 100% correct cause I can't look. On my phone)

#

After you subscribe of course

#

I know it tells you when your full and stuffed etc it tells you as your wounds get worse dunno about healing for sure. You'd have to look

#

Speaking of mods.. anyone know of one that let's you shoot yourself? For rp purposes

pulsar niche
quaint mirage
#

Congrats dude, ill be installing onto my server later. Looks amazing

vivid imp
#

Hello! I found an event when a player press the button to reload a firearm, but that event is not fired when the player do the same action using context menus. Do you know what can I use to also catch that case?
Or even better , something like a onBeforeShoot to prevent to fire a weapon based on a condition

weak sierra
#

does anyone know what's up with the vehicles.db file? it has an sqlite3 header but it's not valid

#

oh

#

turns out the db browser was sandboxed

open abyss
#

Minor Theory:
Would it be possible to make Clothing that also has pockets (basically: containers that doubles as clothing) ?

#

bah, i got no patience, i'll just go and give it a try ๐Ÿ˜›

#

If possible, i just need to figure out how to make "patches" for other items, so i can make all clothing have pockets (unless someone already beat me to it lol)

#

Okay i find no mods which have converted clothing into "Clothing - Bag" items yet... The extra pockets would be nice for sorting purposes.

sour island
#

I'm the author of conditional speech -- it's mostly tied to Moodle changes - increases in Moodle severity plays a message thats procedurally generated. I did not think of wound healing but that is actually not a bad idea.

#

The only messages outside of Moodle changes rn are for sunrise/sunset and ammo.

#

Also I can make it work in MP but honestly got swamped.

#

I use the vanilla say() function I was honestly surprised it wasn't natively handling MP.

noble pumice
#

Has anyone got a good tutorial on the Zomboid coding language?

lusty nebula
lusty nebula
open abyss
#

I'm currently looking into it, i'm a total noob, no idea what world of hurt i'm getting into. Would love to make several clothing items into clothing with pockets...

At the moment, i first need to find the clothing i wish to dupe, then work my way from there... i doubt success, but might be fun to at least mess around with.

open abyss
# lusty nebula Easy to be done playing with attachments. The part that requires more time and e...
    {
        DisplayCategory = Clothing,
        Type = Clothing,
        DisplayName = Padded Jacket,
        ClothingItem = Jacket_Padded,
        BodyLocation = JacketHat, ------ Seems like it already has it's location set, i just need to add the data for a container (i assume)
        Icon = JacketPadded_White,
        BloodLocation = Jumper;FullHelmet,
        RunSpeedModifier = 0.89,
        CombatSpeedModifier = 0.96,
        ClothingItemExtra = Jacket_PaddedDOWN,
        ClothingItemExtraOption = DownHoodie,
        clothingExtraSubmenu = UpHoodie,
        BiteDefense = 10,
        ScratchDefense = 20,
        Insulation = 0.95,
        WindResistance = 0.95,
        WaterResistance = 0.60,
        Weight = 3,
        WorldStaticModel = Hoodie_Ground,
    }```
#

or are you talking about CanBeEquipped = Back, @lusty nebula ?

#

Okay i got no idea what i'm doing, lol

tepid spoke
#

i run a small listen server with known friends. Language of the server is german. Do you have some nice recommendations for mods that I could add tothe server? Everything that makes the game more interesting, w/o breaking the vanilla game. I also wanted to avoid a language mesh-up. I thought about nice map additions, more loot possibilities, but I dont know what else is possible. Maybe more starting jobs ๐Ÿ™‚

#

is this the right channel for the question? ๐Ÿ˜„

hearty forge
#

ฤฑ cannot find HD moodles ฤฑmage anywhere somebody can help me

random finch
#

Can anyone else confirm whether range for melee weapons only comes into play when attacking players or zeds? Attacking objects seems to consider all weapons to be the same range.

glacial flicker
#

Does anyone have a guide or a mod I could use as reference to add a use for a tile that is just decorative? I want to right click it, do something with it

deft vector
#

So does anyone know anything about discord bots. Modifying my help menu that is that I asked earlier

shadow geyser
weak sierra
#

my lived experience says that even for a gun you have to be in melee range to hit a door

#

u can tell u hit when it plays a sound

#

if all objects follow the rules of doors, then i think you're right on that, @random finch

#

that said i have not read the code that governs it, so take with a grain of salt

wooden lodge
#

Is there any way to copy a set of tiles in a servder live?

#

Or can someone help me with a script / admin tool for this?

wooden lodge
#

Like for example I just want to copy an 8x8 tile selfmade house to another 8x8 tile location without having to copy each tile... Any possible way for this? โ™ฅ๏ธ

tranquil reef
#

In the vanilla VHS file it mentions that it was generated, is there a way to use a tool to make VHS tape mods easier to make or does it 100% have to be done manually

polar canopy
#

seen a streamer playing with a mod where he could upgrade his vehicles was wondering if anyone knew the name of it

zenith smelt
#

maybe one of these

polar canopy
#

yeah thats similar that will def work for now thanks

vivid imp
#

Hey, what property can I use to know if a weapon is charged?

#

I tried isRoundChambered but always get true

knotty abyss
#

Helloo, I decided to venture out to make a mod but I didn't imagine it would be so difficult... hahah I think my problem is lua file, someone could help me ?

#

I want the item to work like a vitamin, but instead of reducing drowsiness it will increase endurance.

#
{
    imports
    {
        Base
    }
        item PillsGinseng
    {
            DisplayCategory = FirstAid,
                 EnduranceChange = 20,
         Weight = 0.2,
         UseDelta  = 0.1,
         Type = Drainable,
         UseWhileEquipped    = FALSE,
         DisplayName = Ginseng Pills,
         Icon = PillsGinseng,
         Tooltip     = Tooltip_PillsGinseng,
         StaticModel = PillBottle,
         WorldStaticModel = PillsGinseng_Ground,
         Medical = TRUE,                 
    }
}```
#

What I need to do in lua file to this item work like a vitamin works ? How can I import context menu for that ?

glad ridge
#

dont think you need lua for just creating an item

knotty abyss
glad ridge
#

if you just create the item like that in the txt it should load into your game just use the debug mode to spawn it in and see if it works

#

for context menu

#

name the file whats at the top of this v ContextMenu_EN = { ContextMenu_ExampleMenuItem = "Example Menu Item", }

knotty abyss
#

I did, the problem is context menu. When a take a pill, the char use that and show ERROR 1 because context menu not works properly

#

I will try thanks!

glad ridge
#

also i'd try and put this in instead of tooltipCustomContextMenu = ExampleMenuItem,

knotty abyss
#

ISUI folder or not ?

glad ridge
#

media/lua/shared/translate/en is where the ContextMenu_EN.txt should go if english

knotty abyss
#

my context menu was like that ContextMenu_EN = { ContextMenu_Take_Pills_Ginseng = "Take Ginseng Pill", }

glad ridge
#

Take_Pills_Ginseng should match what the CustomContextMenu = in the item file

knotty abyss
knotty abyss
glad ridge
#

post both here

knotty abyss
glad ridge
#

lowercase en

#

and translate too

knotty abyss
#
    ContextMenu_TakeGinsengPill = "Take Ginseng Pill",
}```
glad ridge
#

and the items txt

knotty abyss
#

ContextMenu_EN.txt lowercase too ?

#

contextmenu_en.txt

glad ridge
#

no capital

#

just the folders

#

lowercase

knotty abyss
#

ok

glad ridge
#

you cut off the folder names but im just gonna assume you made them lowercase already

#

and post the txt where you make the item

knotty abyss
glad ridge
#

my boi

#

post the txt where you make the item

#

in scripts

knotty abyss
#

ohh sorry hahahaha

#
{
    imports
    {
        Base
    }

        item PillsGinseng
    {
            DisplayCategory        = FirstAid,
                 EnduranceChange    = 20,
         Weight                 = 0.2,
         UseDelta            = 0.1,
         Type                    = Drainable,
         UseWhileEquipped    = FALSE,
         DisplayName            = Ginseng Pills,
         Icon            = PillsGinseng,
         Tooltip         = Tooltip_PillsGinseng,
         StaticModel         = PillBottle,
         WorldStaticModel     = PillsGinseng_Ground,
         Medical         = TRUE,    
         CustomContextMenu    = Take Ginseng Pill,             
    }

}```
#

in scripts folder

glad ridge
#

should make the CustomContextMenu have no spaces so it matches the one in your en folder

glad ridge
#

CustomContextMenu = Take Ginseng Pill,

knotty abyss
#

here >> CustomContextMenu = TakeGinsengPill,

glad ridge
#

has spaces

#

yeah

knotty abyss
#

But how this item will work like vitamins works ? I didnt nothing to do that

glad ridge
#

i'm only using base for my reference so just test if it needs the GodigodMod. part in the en folder files

#

is EnduranceChange and actual thing?

knotty abyss
#

ye

#

But vitamins have a rule that is "take a pill" and idk if will works properly if I dont tell to the PZ that .. lol

glad ridge
#

but i guess just test it

#

i think i've seen some ginsing mods on the workshop you may be able to use as a reference for yours as well

knotty abyss
#

Lets do it work ! hahaha

glad ridge
#

noice!

#

weird i swear i saw a ginseng mod last night but i was just looking at random ones for like an hour lol

drifting ore
#

Man i really wish there was an up to date landmine mod. Only one ive found was in a huge mod and therefor wont work right with other mods.
Playing on a S.T.A.L.K.E.R. server and it would be nice to have just an independent landmine mod to keep players out.

drifting ore
knotty abyss
#

What difference between "newitems" and "items" inside scripts folder ? Im trying to figure out ..

calm depot
#

it contains newer items that they added to the game

#

script file names are arbitrary

covert summit
#

Wanna make qol fixes for Hydrocraft, like holding magazines in hands or books, or similar with food or drinks.

Can it affect current walkthrough or i need to start new game even for such things?

stuck carbon
#

Any mods about more logs in discord?
The only discord log that is vanilla is /all chat

zenith smelt
#

events system is unreliable and when I reload the script with debug, it does not re-add the event

#

Any good alternatives yet?

#

I haven't tried it fully, but seems like because i used

Events.OnTickEvenPaused.Remove

It won't work, so this might even have a conflict without debug?

#

Seems like it won't be able to re-add the same function to same event, even though I used the remove command

slow graniteBOT
#
peterpuncher69#9863 has been warned

Reason: Bad word usage

humble ermine
#

we need a mod that allows you to gut zombies to get guts and then have an option to put it on worn clothing to walk amongst large hordes without a problem (the only down side is a gas mask has to be worn to avoid corpse sickness)

weak sierra
#

isn't that already a mod?

#

or very nearly

weak sierra
#

it's not always enough to reload one file,

spark comet
#

brand new to modding pz but have a lot of experience in lua, how hard would it be to implement new character animations such as weapon swinging

vivid imp
#

Hello, anyone know if there's a way to know if a firearm is already loaded with ammo?

#

or an event before the player shoot a firearm?

weak sierra
#

it is displaying the icon for this item instead of the model

#

and any others assigned either of those models

#

any idea?

vivid imp
#

Try to rephrase your question, I can help but I'm not english native speaker

weak sierra
#

2d icons

vivid imp
#

check console.txt to see if the game is not finding the models

weak sierra
#

nope, this is all that shows in that section

#
WARN : Script      , 1662578771241> ModelScript.check> no such model "???.DisposableRazor" for Base.Razor
WARN : Script      , 1662578771244> ModelScript.check> no such model "???.Nettles_Ground" for Base.Nettles
WARN : Script      , 1662578771247> ModelScript.checkTexture> no such texture "WorldItems/Crayfish" for Base.Crayfish_Ground
WARN : Script      , 1662578771247> ModelScript.check> no such model "Chainsaw" for Base.Chainsaw```
#

none of that is related

#

oh wait

#

nevermind

#

there's a second section

#

it is having trouble locating the meshes for some reason

#

..why though

#

does it need some special folder structure?

vivid imp
#

should be in models_x

#

or something like that

weak sierra
#

oh, fucking derp ๐Ÿ˜‚

#

you're right

#

i just did "models"

vivid imp
#

haha well, you got it

weak sierra
#

it's always something tiny and dumb when i break something in pz

#

one symbol, misnamed thing, etc

#

every time ๐Ÿ˜‚

#

can't be mad at anyone for this one tho that was my fault

#

waits for game to load

vivid imp
#

yeah, btw, did you create your icons? they look really good

weak sierra
#

yeah i made those out of renders of the models

#

the ammo can ones

#

the others i did as pixel art

vivid imp
#

the pixel art ones are nice

weak sierra
#

:)

#

thanks

#

i did a bunch of magazines in another one of my mods too

#

drew all the guns pretty quick, i was surprised it turned out that nice

vivid imp
#

oh, I wish I can do that for my mods

weak sierra
vivid imp
#

nice

weak sierra
#

the lighting is a bit weird, the textures are flat so im not sure why it's got such soft shading with gradients going on

#

probably should ask about that in the modeling channel tho

winter bolt
#

is the model set to shade smooth?

vast veldt
#

Hi - I'm attempting to keep my mod's data and methods cleanly in a single table, and organized into separate components. When attempting to do so, I am hitting an issue accessing the "self" variable when nesting. I've illustrated this in the attached example - Example 1 works and self is a table, but Example 2 does not work in Zomboid, where it otherwise does work if I try in other LUA environment's (i.e. https://www.tutorialspoint.com/execute_lua_online.php). Is there any known issue here or am I doing something wrong?

weak sierra
#

i think it is, but i thought that was just a preview thing in my modeling program

winter bolt
#

nah it changes how lighting affects the mesh

vast veldt
weak sierra
#

is there a lower bound on ProceduralDistribution item chances?

#

or can i just decimal it up as hard as i want

#

e.g, .0001, .0003

#

the java decompile doesn't indicate any limitation

#

at least in the parsing..

#

looks like they're doubles

#

guess no limits

#

tiny tiny chances at ammo can spawns it is hue

honest aspen
#

anyone know how i would replace music or sounds in game

shadow geyser
#

take a look at any sound or music mod on workshop, and you can find it from there

honest aspen
#

alr ty

glad ridge
#

Man I wanted to add audio to the urination mod like how defecation does.. but the sounds I came up with.. didn't sound like someone needing to pee

honest aspen
#

nvm

wooden lodge
#

Does anyone know where the translation file is for GM, Overseer etc

#

To make the ranks of staff called different?

#

I'm digging but I'm unable to find the right one

vast veldt
# vast veldt (Ignore me for now, somehow I now *can* get both examples working!)

I've worked out that this was because self. doesn't play nice with events. code runs fine called directly, but will not reference self as expected when called via an event handler. I can work around it by calling my library directly, but something about that doesn't seem quite "correct". If anyone knows how to make self and event handlers play nice, would be good to know.

empty cove
#

oh fk i've just noticed i made a fking big mistake after proper resting.
whoever is using my radar mod please get ready to update the utility mod 'simplify' in 10 mins.
i introduced a god forsaken security issue with the latest update last week. oh my god

zinc prairie
#

hey! Brand new to this, any tutorials on how to start making custom occupations?

empty cove
#

fix uploaded. the mistake i made is that players can replace matching files with modified files from cache/lua and root mod dir. i've restricted it to server feature only. feels like bashing my head against the wall now.. was wondering where the hell is the mistake i made.

wooden lodge
#

And does anyone know where the death logs are for people in a MP server

vivid imp
#

Hey, do you know where I can find updated methods and props for the classes of PZ?

#

I'm trying to detect if a firearm is charged, but roundChambered I get false even if weapon is charged. I tried getting weapon.ActualWeight or weapon.Weight and then do the math, but those props return nil ๐Ÿ˜ฆ

spring shard
#

Anyone know if there is a mod that makes zombies sprinters in darkness and normal shamblers in light? Like during the day is everything fine, and at night you wanna have your flashlight on you to slow down zombies

vivid imp
#

Ok, isRoundChambered does return the correct value, but there's something I didn't know about firearms. Can someone explain me this, please? I'm creating a weapon with only 1 round, but in the weapon info I can see something like this: Ammo name: 1+1/1 or Ammo name: 0+1/1

#

what is that +1?

glad ridge
#

chambered round?

knotty abyss
#

Hello, someone knows why the character is using the item but "UseDelta" and "EnduranChance" not working ?

#
{
    imports
    {
        Base
    }
        item PillsGinseng
    {
            DisplayCategory = FirstAid,
                 EnduranceChange = 20,
         Weight = 0.2,
         UseDelta  = 0.1,
         Type = Drainable,
         UseWhileEquipped    = FALSE,
         DisplayName = Ginseng Pills,
         Icon = PillsGinseng,
         Tooltip     = Tooltip_PillsGinseng,
         StaticModel = PillBottle,
         WorldStaticModel = PillsGinseng_Ground,
         Medical = TRUE,                 
    }
}```
vivid imp
#

Do you get any errors?

knotty abyss
#

nope

vivid imp
#

weird, the same props as the vitamins, only EnduranceChange is diff

empty cove
#

just a question while you guys solving the issue. what's the difference between staticmodel and worldstaticmodel?

vivid imp
#

world is the one when the item is placed
the other one, is when is being held by the charcter

#

that's how I see it, after playing with mods for a while

empty cove
#

thanks, i didn't know that ๐Ÿ‘

vivid imp
#

๐Ÿ‘

knotty abyss
empty cove
#

did you restart the game after adding the item? just in case. ๐Ÿ˜“

glad ridge
#

question where can i find all these methods? or variables? ex: player:getBodyDamage():setFoodSicknessLevel

#

is there a website i can check em out at

vivid imp
#

but version is outdated

glad ridge
#

i've been looking in there just wasn't sure if there was another place, thanks for input

quasi kernel
#

This can help. Remember to not redistribute your decompile or anything.

glad ridge
#

@knotty abyss you'll probably have to decompile and search for how setEndurance works following this guide ^ and create the lua for it

vivid imp
#

maybe only works for Food

knotty abyss
knotty abyss
knotty abyss
glad ridge
#

pwr posted a link to a guide on how to decompile

#

you could, alternatively create a single pill in which they eat as a type = food, that will change the endurance and remove the drainable from the item.txt

knotty abyss
glad ridge
#

using the code you gave me

knotty abyss
glad ridge
#

well i set the endurance to -100 so i could see if it works and then i can just reverse it back to = 20 once i know it works

#

i didnt have your models so its a placeholder icon but it works for all purposes

willow estuary
#

The current system for how pills work is based on java hardcoding for the most part as far as I understand?
For modders, yes, this isn't the ideal state of affairs.
But the two options would be:

  • make your pills food items instead
  • code an override for the take pills? timed action to affect the character's endurance state directly
#

Yes, I would like to make drainables/pills work more smoothly for modding in these circumstances, but that, if it happens, would be build 42 or later unfortunately.

glad ridge
#

is this take pills in the context menu in pic above popping up because it's still labeled as DisplayCategory = FirstAid

willow estuary
#

I think having "Pills" in the script name is what triggers it?

glad ridge
#
        item GinsengPill
      {
         DisplayCategory = FirstAid,
         EnduranceChange = 20,
         Weight = 0.2,
         Type = Food,
         Count = 20,
         UseWhileEquipped = FALSE,
         DisplayName = GinsengPills,
         Icon = PillBottle,
         StaticModel = PillBottle,
         WorldStaticModel = PillsGinseng_Ground,   
         CustomContextMenu = TakeGinsengPill,    
         CantBeFrozen = TRUE,         
      }
}
``` this is basically what i reworked his code to as a food
#

okay good to know i'll check it out

knotty abyss
willow estuary
#

As I say, I think, I haven't tangled with the pills stuff in a while, but I know it just doesn't work like food?

knotty abyss
#

But now I understand that is more complex ๐Ÿ˜ฌ

willow estuary
#

The substance of how vanilla pills work is all java side off the top of my head, but there may be an exception or two.

#

The game is nowheres near close to being alpha, so yes, these things happen?

glad ridge
#

okay yes i believe you are right, it's because it had pills in the item name

#

Rodrigo you can use the reworked code i made if you want

knotty abyss
willow estuary
knotty abyss
willow estuary
#

Item types can be remarkably inflexible vs modder expectations all told?

glad ridge
knotty abyss
willow estuary
#

That's all between you and the distro code you make for them, but if they spawned before they should still spawn?

glad ridge
#

you'd prolly still have to make the distribution lua if you want it to be found in the world while playing though

knotty abyss
willow estuary
#

How to make your mod objects spawn.
Caveat: it's very profane and grouchy because I am profane and grouchy
#mod_development message

knotty abyss
#

Very delicate in the explanations over there AhAHUAHua

glad ridge
#

ah it is you who makes those cool mods but leave the comments off lol i never know if they still work or not on newer builds but i'm going to assume they do now

glacial flicker
#

How does one add a right click function to a tile that doesn't have any?

calm depot
#

take a look at client/ISUI/ISWorldObjectContextMenu

#

as for adding it yourself, I believe there is an event hook now for when that menu gets populated

gray sable
#

Hello, sooo i have a problem. For a solid 3 days i was trying to find a way to import x files that pz using for models into Blender. First ive found out about some kind of code that you should use to do that. But at the end i wasnt able to do a thing bcs im too stupid at coding. Than i found out about some 3-rd party program which was also a failure. Then some kind of blender addon that stuck at 2.79 version. And thaaan im here, asking how in the living hell i can import those damn x files into blender. I was trying to find some messages about that here but im too tired after all of that so please. Help me. Also thx beforehand. (im not native at english so yeah)

calm depot
#

Google for an X to FBX converter

#

Also, your own model can just be FBX. So just use the latest version of blender

lime hedge
#

can you make recipe that resulted in 2 items?

#
  recipe Example
  {
     scrappedItem=1,
     keep thisItem,
     keep gotThis=50,

     Result:resultedIntoThis=1,
     Result:resultedIntoThisAswell=1,
     Time:10.0,
     Category:Test,
  }
#

it will override the above

#

or it can interpret arrays?

#

Result:[a=1,b=2]

gray sable
#

Also i need those x files that already exist in game

#

Can you please give a link to properly working converter?

calm depot
#

are you sure it didn't? did you check the objects list on the right? it could simply be tiny

calm depot
#

try asking in #modeling for a recommended converter

gray sable
#

Also i tried another two and one of them did this

lime hedge
calm depot
#

@lime hedge I don't think the recipe script syntax directly supports it; you can however have one item created via Result and the second one via code by defining an OnCreate function

lime hedge
#

im coming from typescript so lua pretty new to me...

calm depot
#

script syntax looks like lua, but it isn't lua

calm depot
#

don't confuse game scripts with lua scripts

lime hedge
#

yep

#

ill do a research abt it

#

thanks

surreal raft
#

Hello everyone! How hard would it be to change multihit so that it only affects push, not melee attacks? I've searched the workshop but couldn't find anything of that sorts, for me that would be the perfect balance, being able to push multiple zombies, but hit only one. I've never really done any mod work or learnt any code for that matter, so I thought if this is maybe possible in a simple way or I would need to learn something new, or, maybe someone would just like to make it for me and the community? ;D

nocturne adder
#

The best thing would be to push a Zombie and have this Zombie fall on the other Zombies to create a jostling effect.

surreal raft
#

true, i did find a mod that makes zombies trip if they bump into other zombies, but it didn't seem to work in multiplayer

gray sable
#

Is there a way to make a custom clothing slot? Just need a little of advise to where i can find file that controls that

late flax
#

hello , is mod able to send servermsg?

ancient grail
ancient grail
surreal raft
#

alright! do you know where to look for the weapon multihit variable?

bright heron
#

Hi, does anyone know how to put custom loot in a zombie's backpack?

open abyss
#

I have an old script that partly works, but some help would be wonderful;

It's a recipe to create a schatel that then is filled with a ton of materials, however, it does not appear to add everything for several reasons:

  1. it will only add ONE of any item, even if i set to to make 40 it will only ever make 1 and put said one item in the shatchel,
  2. the script is very old, and was given to me 2 years ago, and more then likely needs an update.

Anyone willing to help fix the code correctly?

function onCreate_AGCMDupeDeluxe(items, resultItem, player)
    --                                  Misc
    resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy", 10);
    resultItem:getInventory():AddItem("TinOpener");
    resultItem:getInventory():AddItem("Battery");
end``` (This is just a snippet of the start, the rest of the code is just repeated until the "end" it hit.
radiant venture
#

i was thinking, would a mod that adds napalm be a cool idea? like i had a general idea of adding more features to engineer to make him suck less

pine fiber
gilded hawk
#

I'm in vacation and I'm missing modding, miss you guys hughug

shadow geyser
# pine fiber Is there no search box on the Java documentation site?(https://projectzomboid.co...

use this instead.https://zomboid-javadoc.com/41.65/. still outdated in that it is missing some stuff, but it is more up to date than https://projectzomboid.com/modding/ tmk and it has the search functionality. Not sure exactly which version the projectzomboid.com/modding is but it is older than 41.65. one example is the tag stuff is missing. obviously having a decompile would be the most up to date, but its convenient to be able to use the web browser

open abyss
#

... wot?

late flax
#

Hello, is the official integrated dc bot able to be edited?

shadow geyser
#

from the java

   public boolean AddItem(String var1, float var2) {
      this.drawDirty = true;
      if (this.parent != null && !(this.parent instanceof IsoGameCharacter)) {
         this.dirty = true;
      }

      InventoryItem var3 = InventoryItemFactory.CreateItem(var1);
      if (var3 == null) {
         return false;
      } else {
         if (var3 instanceof Drainable) {
            ((Drainable)var3).setUsedDelta(var2);
         }

         var3.container = this;
         this.Items.add(var3);
         return true;
      }
   }
open abyss
#

i honestly don't understand what i'm reading there

#

Guess i'll just repeat the item another 2 times

#

like:

    --                                  Misc
    resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy");
    resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy");
    resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy");
    resultItem:getInventory():AddItem("TinOpener");
    resultItem:getInventory():AddItem("Battery");
    resultItem:getInventory():AddItem("ToiletPaper");
End``` Which will be MORE then enough for what i need
#

10 times is overkill

shadow geyser
#

the second parameter you are using in Additem is var2 in the javacode. and you can see that var2 is only used in setUsedDelta inside the java function

open abyss
#

heck, if adding it 3 times like that, gives me 3 Odd Thingies, then i'm happy enough

shadow geyser
#

also, don't call getInventory so many times. you can just do

local invent = resultItem:getInventory()
invent:AddItem()etc...
open abyss
#

I didn't write the script... i don't know how to script, this is a 2 year old script that sorta works still... so telling me what to do and what not to do is not awefully helpful since i don't know what to do...

shadow geyser
#

i mean, i literally put in example code there

open abyss
#

i was told, when i was given the script that i just need to repeat the lines resultItem:getInventory():AddItem("AGCMCheatItems.AGCMOddThingy"); replacing the Item Id of the item with what i want to add to the inventory of the container.

pine fiber
#

I am trying to access a Constant Value from zombie.iso.objects.IsoBarricade (METAL_HEALTH & PLANK_HEALTH) but I get stuck.

https://zomboid-javadoc.com/41.65/zombie/iso/objects/IsoBarricade.html

local barricade = object:getBarricadeForCharacter(player)
local numPlanks = barricade:getNumPlanks()
print(numPlanks)

I can access the methods without problems, for example to count the number of planks on a barricade, but how can I access the static fields?

shadow geyser
#

if they aren't public, you can't access them. you need a getter function

#

what field are you trying to access?

#

actually I think all the fields are "private" with respect to lua. I don't think you can access anything outside of a getter method, but I might be confusing this with something else

pine fiber
#

I'm trying to catch PLANK_HEALTH of each planks on a barricaded window

shadow geyser
#

from what I can tell, PLANK_HEALTH is a constant. and if you want the health, you need to look at the plankHealth array, as that contains the health of the planks. unfortunately it is private and I don't see any getters for it.

tawdry moss
#

Is it possible to make it so one specific zombie always knows the location of the player? Iโ€™m working on a mod where thereโ€™s one specific zombie that is unkillable and constantly following the player, but I donโ€™t know how to make sure the player canโ€™t simply outrun or outmaneuver it or simply drive away and the zombie loses interest. Only thing I can think of is have the player make a sound that covered effectively the entire map but I donโ€™t know how to make only the one zombie hear that sound.

shadow geyser
#

you could try setting the target of the zombie to be the player in OnZombieUpdate. I know before that it wouldn't work when trying to set the target to noone, because the zombie would set the player as a target if they were visible, but maybe that won't be an issue as in this case, the zombie does have a valid target. although that would be an issue with vitual zombies. I don't know if you can manipulate the movements of a virtual zombie

lusty nebula
# open abyss ``` item Jacket_Padded { DisplayCategory = Clothing, Type...

Quick sample using the SMUI Mod items and attachments:
item Jacket_ArmyCamoGreen { DisplayCategory = Clothing, Type = Container, DisplayName = Woodland Pattern Jacket, BodyLocation = Jacket, Icon = ShirtCamoGreen, BloodLocation = Jacket, RunSpeedModifier = 0.94, CombatSpeedModifier = 0.97, Capacity = 5, ClothingItem = Jacket_ArmyCamoGreen, ClothingItemExtra = SMUIClothing.Jacket_ArmyCamoGreenRolled, ClothingItemExtraOption = WearIt, CanBeEquipped = Jacket, BiteDefense = 20, ScratchDefense = 30, Insulation = 0.4, WindResistance = 0.3, WaterResistance = 0.4, Weight = 1.0, FabricType = Cotton, Tags = Military, WorldStaticModel = JacketCoat_Ground, AttachmentsProvided = SMUIWebbingLeft;SMUIWebbingRight, }

You will notice that in the hotbar now you have two slots available when you select the Woodland Pattern Jacket ( Webbing Left and Right ). The Webbing Left and Right can be changed editing the file " SMUI_HotbarAttachDefinition " ( String: Name = ; Line 10 using Notepad++ ). Sample: Name = Pocket Left. The part that you have to check carefully is the string " Body Location " because any other item using the same one ( Jacket in this sample ) will be equipped only one a time. For example if you select the Jacket but then you equip too the Jacket_TPattern ( Just as sample ) that share the same body location ( Jacket ) only the one equipped as last will be worn and the other will be uneqipped and put in the inventory.
Here you can find a list of body locations as reference and what they affect: https://mega.nz/file/DkpmmI5Z#IIFKIYgOFarMQNbwHz6hqSaEgv3hT1ZNuitdX6DnY48

gray sable
#

Thats kinda strange question but... Would it be safe for my life account to post mod with nazi and other countries uniforms? Like ww2 ones. Kinda love that concept so i really dont want to poure too much life-time into something that will end up be banned

lusty nebula
# gray sable Thats kinda strange question but... Would it be safe for my ~~life~~ account to ...

My suggestion is to avoid the words " Nazi, Hitler, etc ". You can use something that let unnderstand what the mod is about but without using the words listed above.
Samples: WW2 Uniforms mod, WW2 German uniform mod, WW2 German Pattern Uniforms, etc
Obviously no swastika, SS or nazy symbols on the uniforms in any case ( Take in mind that in some countries they are banned! )
Just my 2 cents, I hope it could help ๐Ÿ˜‰
*Note: If you check the workshop there's a mod about the Tiger II tank LOOL ๐Ÿ˜„ ( REF LINK: https://steamcommunity.com/sharedfiles/filedetails/?id=2791076769&searchtext=tiger+tank )

gray sable
#

Thank you!

upper matrix
#

Hey! I didn't play the game since January and there have been a bunch of updates since. Is it still recommended to copy the workshop directory to .../steamapps/common/ProjectZomboid/steamapps in order to lock the mod versions on the server?

#

Also is there currently a way (external program or otherwise) to set up the mods on the server without having to manually insert all WorkshopIDs and ModIDs into the ini file by hand?
Because if there is none, I might make one. This was so tedious for my ~50 mods that I wrote a script to just parse the singleplayer modlist and cross reference it with the workshop directory to get all needed IDs

#

Just realized that #mod_support is probably better suited for these questions, sorry about that

lusty nebula
#

Do you think there's a way to have books really readable page per page instead of the process of reading just simulated?

wooden lodge
#

Does anyone, please, have a script to copy multiple tileS??

weak sierra
#

so the question isn't really answerable

#

if u mean can u edit the hook to provide different data, then.. i don't think so? but im not sure. i think that part is in java.

#

if it is editable it's likely in ISChat.lua somewhere but i don't recall seeing it there.

#

lmk if u find something tho

shadow geyser
coral lotus
#

So, I'm trying to make a simple mod that adds a flag that can be crafted, and I'm looking at some mods on the workshop that do that to know how to do it, I tried to replicate it but I don't know what program use to open a .pack file, is it any specific program for zomboid modding? if so is there any useful video or guide that I can follow? It's my first time trying anything like this (the mod is for personal use, for a co-op server with my friends)

sudden depot
#

Having a problem with the steam work shop and mods

#

a few hours ago i turn off the game it was working fine i log back in and the workshop is removing workshop items from my pc

#

but keeping me subscribed to each item

#

at the same time if i go to subscribed item tab its removing mods from that tab

#

ive lost well over 200 mods i was using on a save (the mods and sub mods)

#

now if i try and click on subscribed or Favorited the tabs dont open

#

and opening the game and clicking on mods saids the mods are all missing

open abyss
# lusty nebula Quick sample using the SMUI Mod items and attachments: ``` item Jacke...

You missunderstand what i was looking for; i wanted to create a container like the backpacks, not another hotbar. I wanted to be able to sort my inventory into more containers that my character wears having only 4 inventories when such a thing as pockets exists yet apparently not usable seems.. weird to me, so that is what i was trying to do.
What i currently are doing is putting Food int front Fannypack, medical supplies in the back, and mostly everything else in my backpack. Would love to have an extra worn container without taking up the hands slot, such as pockets for jackets or the like where i can put my tools.

My own mod comes with an "odd Thingy" which has -100 weight, so i could just plop that into the jacket's pockets and suddenly i have plenty of room for a ton of tools there.

Would love some pants with pockets, a vest, maybe some other "invisible" items that can be worn to give more inventory slots.

fiery pecan
#

ok, so. I've got this concept in my head, right? But no proper know-how to implement it. The Trimble power station mod's power lines don't connect to the vanilla map, so that's off the table....
The idea:

  • Either connect Trimble power station's powerline tiles to the main map somehow, or make a standalone version that does.
  • place a special tile within the station that works as a control board, allowing electricity to be routed throughout the vanilla region, using general areas/towns as a starting point for the grid.
  • Add a tile for fuel input, allowing the plant to run on... Some combustible (I'm not sure what type of plant Trimble is?).
  • Add a substation for each sector in the grid.
  • Add code for the control tile to send data to substations through the powerlines. (The powerlines would transfer modData through eachother maybe?).
  • Add code/invis-tiles to simulate generators in a powered-up area. Also make the substations control these invisi-tiles/code.
  • When a substation control board tile receives the modData, it needs a player input to toggle the on/off state, when it's not getting the data, it is forced to an off state.

I could probs figure this out myself, if I knew mapping....

lusty nebula
open abyss
lusty nebula
open abyss
lusty nebula
#

Note that some body locations use 2 slots ๐Ÿ˜‰ ( Like jumpsuits and coveralls for example )

#

To guess how to use body locations think about how you dress in real life. For example, in PZ, you can't wear 2 shirts at the same time, the tank top is always worn below the shirt and so on ( Just to give you a rough idea about how the system works ). The exceptions are particular clothes/items that uses 2 slots instead of one or ones that hide items in the second location when an item is in the first location ( Check well the additional file and you'll see what I mean )

open abyss
#

i'll try again in a bit, my mind is in multiple places at once...

#

find myself re-reading you messages several times right now...

#

so, i think i'll take a break until tomorrow. Thanks a lot, however. Very nice of you to try and help me out ^_^

lusty nebula
#

No problem mate when needed just ask ๐Ÿ˜‰

shadow geyser
ancient grail
#

is it possible to make the players animation same as the zeds?

glad ridge
#

you could probably use the ukraine flag in workshop as the ref for it. Looks to be the simplest on there to follow

coral lotus
#

thank you

ember edge
#

Any mod suggestions to clear floor tiles of dropped items from zombie destroying doors, to me dropping things?

alpine timber
#

My external hard drive died and that meant my custom maps and buildings are on life support as I send the affected hard drive to data recovery labs. ๐Ÿ˜ฆ

covert summit
#

How can i find Hydrocraft Continued discord channel?

#

Is it really exist?

glad ridge
#

does anyone know how I could make it so my backpacks I created in my mod are compatible with authentic-z's attachment system? just not sure where to start

covert summit
#

Nvm found it

ancient grail
alpine timber
ancient grail
weak sierra
#

so this is the load order on an SP test save of the relevant mods im working on

#

ponchos first, base mod, then my mod, then a new tweaked submod

#

somehow ponchos is overriding my mods for the ones it adds out of the box

#

is this list in reverse order..?

#

says top to bottom in mod manager

#

maybe it's lying

#

also says the nerf mod is introducing the items, and that its not overriding anything

#

which is odd too

#

shud be like.. ponchos -> expanded -> nerf

#

order irrelevant it seems

#

wth

#

maybe the item script name is coming before the base mod's

#

really wish load order took precedence over naming sometimes

#

we will seeeee

chilly shell
#

Anyone have any idea how to use "IsoGameCharacter:Say()"? I get an exception when doing that. I checked a few mods that use it and can't seem to figure out how they're specifying the character (it seems like that's what it's talking about - although from the documentation it doesn't look like it needs to specify the character). I get this exception when calling it:

Object tried to call nil in EDN_Display at KahluaUtil.fail

vivid imp
#

You want the character to have a text bubble on top of his head?

chilly shell
vivid imp
#

I use this function:

    getSpecificPlayer(0):addLineChatElement(text)
end```
#

I found it in a mod, don't remember which one

chilly shell
#

Hmm, let me give that a shot, makes sense though.

weak sierra
#

getPlayer():Say("Hello") on the client will do what you'd expect

#

IsoPlayer inherits from IsoGameCharacter

#

anyone help on my issue? it's the kind of thing that should have a ton of people who know how this works

#

:|

chilly shell
#

Thanks that worked nicely. Can I ask where GetPlayer() is from? I don't see it in the documentation under IsoPlayer or the parent classes. Sorry though, I'm still relatively new to modding so I don't have much of any answer for you problem ๐Ÿ˜ฆ

weak sierra
#

i think it's in the "global object"

#

yeh

#

this stuff is essentially always in scope

covert summit
#

How can i find script that works with variety of furniture textures? White old fridge as example have some "notes" on the door but when you reinstalling it all this just disappeared.

I want to make mod that adds more variety in textures depends on stuff or category of items inside. Is it a cool idea for Qol mod? Im really struggling to do it :]

weak sierra
#

i would like that if it existed

#

i do not know how it works tho

small topaz
#

Is it possible do use the DoParam command to change stats of an item while in-game? For example something like item:DoParam("Weight = 0.5"). When I try this, I get the "Object-tried-to-call-nil" error.

weak sierra
#

load order:

#

result

#

can someone explain

weak sierra
#

it edits the item script in memory

#

not an individual item

#

and once the item is instantiated

#

it is not possible to do it anymore

small topaz
weak sierra
#

yeah

#

look at the code that works in the admin/debug ui to edit a particular item

#

probably some hint there

small topaz
tame mulch
weak sierra
#

even on a dedicated server with an explicit load order

#

?

#

so require=XXX,YYY lines don't even change load order

#

they just make sure it's enabled

#

hmm

weak sierra
#

cuz by mod ID they're already in the correct order

#

MilPoncho
MilitaryPonchosExpanded
MilitaryPonchosExpandedNerf

#

unless it's case insensitive maybe..

#

realizes load order only matters for overrided *files*

willow estuary
#

I think people have cargo cult esque expectations re mod load order from other games.
But in PZ the files load alphabetically by filename, aside from cases where file names conflict/dependencies.
Now the mp server stuff is a precious little hothouse flower in that you need the mod order list set up properly re dependencies, which isn't the ideal circumstances to say the least.

#

Mod load order is a big deal when people use skyrim to run 200 mods, or rimworld, I guess from what people say?

#

But if you look at the console itself you'll see exactly what order files load in?

weak sierra
#

except when it doesn't tell ya for item scripts, yeah?

#

i think it only logs overrides

#

but yeah i definitely was under some assumptions from the way things work other places

#

knowing it's by filename is the key to all this, thank you a lot for that

tame mulch
weak sierra
#

i knew it worked that way for lua

#

but for scripts i was unsure if it was the same

#

places online kept saying how it didn't matter the filename

#

๐Ÿ™„

#

i had tried matching their filename, but my mod was loading after theirs due to alphabetical mod IDs then

#

hehe

#

lot of potholes to fall into

#

hm

tame mulch
#

I am not sure, but maybe for script files if file with same name loaded already, it will not load script file with same name in same directory

weak sierra
#

well it should be working now but it isn't

tame mulch
#

Try just change name of script file with your items

weak sierra
#

their script starts with "A", mine starts with "M"

#

so mine should load after theirs

#

i changed my mod IDs so that they come after theirs too

tame mulch
# weak sierra

I have some time. Can you send me this 3 mods in PM (I will check how it loads)?

weak sierra
#

that's the original save i was testing with, i guess the removal of the old mod id left it "unknown".. on a fresh one:

#

two are in one mod (mine, unreleased version) and sure

#

my only guess now is that it's alphabetical by mod name not ID

#

since P comes after M

#

tries

#

other possibility is alphabetical by folder name of mod

#

ill try that next :D

#

that would make sense if by "filename" we mean "full path"

#

the mod name did not matter, so here's hoping this last attempt does it

#

otherwise that aiteron figures something out

#

still does it, wow

#

well i got it to override by overriding the file with the same name on the same path, but i'd prefer to not have to fall back to overriding the whole file..

#

but perhaps that means the load order is correct now, too, so i don't need to

#

hm.. only overriding the file seems to work

#

perhaps the fact that it is in a folder.. gives it precedence over a file that is not in a folder..?

#

media/scripts/X
media/scripts/clothing/X

#

that alphabetizes that way

#

so

#

maybe that's the key for filepath

tame mulch
#

Order:

weak sierra
#

yeah i just figured that out

#

lmao

tame mulch
#

๐Ÿ™ƒ

weak sierra
#

it would be nice if there was a way to see that info as a modder

#

like there is for lua loading

#

makes it real easy then!

#

xD

#

is there anywhere that we have access to that?

#

or is that just 'cuz u can inspect data w/ a debugger attached

#

well, i know that's what im looking at, but i mean is there a way we can get at it

#

also, while i have you: what determines whether the game shows the overrides in the item info popup?

#

like this is working now after putting my scripts in a folder

#

but it just says

#

when it was the other way around it talked about overriding things

tame mulch
weak sierra
#

any idea on the other question? any time i override anything the game just acts like i put the item in and didn't override anything in that display xD

#

doesn't say "This item overrides: Ponchos"

#

but when it was overriding me it did

#

is that a bug? or is that something im doing

weak sierra
#

so in my case i had to rename the folders for my mods to alphabetically come after theirs as well as add the "clothing" folder their script was in since "/" seems to come alphabetically after all the letters, and thus anything in a folder is loaded after anything in the root

#

wish it would say "This item overrides: Ponchos" but at least it works lol

weak sierra
#

huh

#

im on linux if that makes a difference, perhaps

#

but

#

im using wine to run the client

#

so it's the windows version

#

hm

#

wonder why that works for you, odd

tame mulch
#

@weak sierra I am on unstable

weak sierra
#

so am i

#

๐Ÿ˜‚

tame mulch
#

Strange ๐Ÿ˜„

weak sierra
#

yeah

#

thanks for your help, btw, appreciate it

tame mulch
#

You turned on default mod Ponchos?

weak sierra
#

even if we figured it out around the same time

#

hehe

#

default mod?

#

ponchos is on tho yeah

#

mine won't work without it since i don't repackage the models or icon

#

i changed the mod IDs and names back and loaded only the non-nerf version and it shows it

#

tries loading the nerf version on top

#

huh so now it shows that

#

but it doesn't show it overriding the other expanded one

#

maybe cuz it's in the same mod

#

anyway that.. somehow sorted itself out

#

have run into that before, will try to figure it out (if i run into it again in the future)

radiant venture
#

so question, i'm trying to make a mod that adds more improvised explosives and maybe some new additions to engineer, i just want to make sure on one thing which is, Firepower = x means the damage the fire doesor what does this line refer to?

prime frost
radiant venture
#

Ah alright

#

Thanks man

bright heron
#

Hi, does anyone know how to add parts to a certain gun like modified their own gun parts?

radiant venture
#

you mean like an attachement or changing the actual gun model?

bright heron
#

What I mean is you are just gonna add the parts not reconstruct all the codes just to put a single modified parts

radiant venture
#

elaborate?

bright heron
#

pardon my grammar.

I'm modifying the brita's suppressor pistol and it actually works, but my problem is the modified suppressor is not showing in the attached pistol like it's an invisible, so I digged arsenal26 and find out you need to put the modified base name of the suppressor.

radiant venture
#

so where lies the issue? also dw man grammar isn't needed in the online world

bright heron
#

The issue is I will copy paste the whole arsenal26 code and insert a single piece of modified suppressor

radiant venture
#

why would that be needed? all you'd need to do is copy the code of the single item you want to change and make it insert itself into the arsenal 26 fileso it replaces the item(in this example the pistol supressor)

bright heron
#

Here's is the original

radiant venture
#

atleast that's how i understand how this works

bright heron
#

And this the modified one

bright heron
radiant venture
#

Always ready to help. Just not sure if that's how it will work but it's the only thing i can come up with rn

bright heron
#

It worked, but I want to separate it from different .txt :c

empty cove
#

Hi, I would like to ask if is there a way to detect game's debug mode is enabled or not in lua script?

#

nvm, i found it
getCore():isInDebug()

radiant venture
sudden tree
#

Does anyone have an experience with Storm project for lua-to-java event translation?

bright heron
# radiant venture is there and specific reason why? that would be much more inconvenient to implem...

The reason for separating it on different .txt files is to quickly identify which line has an error and of course to minimize the structure.

I just wanted to see what parts I just modified. That's all, I'm not going to publish it on workshop. It's for my own sp gameplay, since other guns in brita like ak47 aim is sucks, you can waste up to 15+ bullets and still can't kill it even though you have maxed aiming.

#

Also, what I mean earlier is like inserting items in a loot table, I just want to insert a modified part and not copy and paste the entire structure of guns

radiant venture
#

hmm i understand but don't know how to help with this, if there is anything else i could do to help i'd be happy to try tho!

hot patrol
#

Any chance anyone knows who created the waifu zombie mod or if they are in here? I'm curious as to what happened to it since it is no longer on the workshop.

bright heron
glad ridge
bright heron
radiant venture
#

if it was distribution i could easily help xd

glad ridge
#

ah my mistake

bright heron
#

Yeah, I already did that. I expanded the loot table and goods and items can now spawn in backpacks

bright heron
radiant venture
#

oh shit backpack spawns? give me that knowledge right now xd

#

i have a diffrent project that's gonna add those military water canteens but never found a way to add them to military backpacks

bright heron
#

Sure, but it's still not incomplete i'm gonna add items in authentic z backacks

radiant venture
#

not incomplete?

bright heron
bright heron
radiant venture
#

ah alright

bright heron
#

I'm still having errors in some backpacks like in Undead Survivor, the nomadbackpack

#

Items in there aren't spawning at all

radiant venture
#

huh weird

bright heron
#

Yeah, and I also think they have different rolls when spawned in other outfits

radiant venture
#

how even

bright heron
#

Compare to ArmyCamoGreen and PrivateMilitia, more like PrivateMilitia have more spawnrate items in their backpacks even though they are wearing the same backpacks, the "Bag_ALICEpack_Army"

radiant venture
#

??????? but why?

#

i mean wouldn't turning the weight of the item down accordingly help?

#

or do you mean it spawns in the backpack yet the zombie itself has a higher amount of rolls

bright heron
radiant venture
#

that's cursed

bright heron
#

I already tried the mysterioussatchel in TheyKnew and items were spawning on it

radiant venture
#

but hey i'm convinced pz's code changes every 15 minutes just to fuck with modders anyways so i was already under the conception that it's cursed

radiant venture
bright heron
open abyss
#

Hopefully someone knows and can answer me what the following data points in weapons mean:
SplatNumber = 3,
PushBackMod = 0.3,
KnockdownMod = 2,
ToHitModifier = 1.5,
RecoilDelay = 17,
MinAngle = 0.95,
StopPower = 9,
and
HitChance = 75, This one seems to be a flat value? (1 to 100 ???)

I'm making an OP gun for an insane zombie count world for the heck of it, stress relief if you like...
Because sometimes, instead of being nervous, you just wish to turn a town muddy red and make river crimson.

hidden jungle
#

can you not call item:getConditionLowerChance()??
just having the line in the script causes an error
"java.lang.ArrayIndexOutOfBoundsException: Index 7946 out of bounds for length 31"
update:
i have no idea what was causing the parse error. the text was copy pasted from here
https://zomboid-javadoc.com/41.65/zombie/scripting/objects/Item.html#getConditionLowerChance()
and that was causing the issue i think. after retyping the command manually the parse stopped failing.
confused_dog

#

before it even runs. its a parse error

royal gull
#

Hey friends, Iโ€™m brand new to PZ and havenโ€™t tried a single mod yet. I was wondering if thereโ€™s a simple mod that keeps the time alive on screen and maybe amount of kills? ๐Ÿ˜Š

hidden jungle
#

both of those exist in vanilla in the character info pannel
its the heart icon on the top left

royal gull
#

Yea I saw those, but is there a mod to have them on screen somewhere thatโ€™s not in a menu?

hidden jungle
#

you can just leave the menu open..?

worldly hatch
#

will shit despawn if you place items around in modded multiplayer?

weak sierra
#

mm im not seeing one

#

odd

hidden jungle
#

i did not mean to reply to my own message lmao

#

thanks though PepoCheer

weak sierra
#

mhm

weak sierra
hidden jungle
#

what in the.. it started doing it again.
i restared the game and now its fine. can java have a bad boot?

weak sierra
#

41.76?

radiant venture
#

ERROR: General , 1662743187429> GameWindow.uncaughtException> Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General , 1662743187432> ExceptionLogger.logException> Exception thrown java.lang.OutOfMemoryError: Java heap space at Arrays.copyOf. Message: Unhandled java.lang.OutOfMemoryError thrown by thread MainThread.
ERROR: General , 1662743187433> DebugLogStream.printException> Stack trace:
java.lang.OutOfMemoryError: Java heap space

i only added my mod and somehow this happened- how even

covert summit
#

Is there a tool that can unpack Tile1 / Tile2 rpacks??

Existing one ends the process with errors. Its just blank zero weight file as output.

sand dagger
#

anybody here who can call me who i sync IsoFlagType.taintedWater to all clients?

What i do:


local spirte = tileIsoObject:getSprite()
local properties = spirte:getProperties()
properties:Set(IsoFlagType.taintedWater)

tileIsoObject:transmitCompleteItemToClients();

set modData with transmitModData works to modify the waterlevel but the tainted water is not on a sink.
The script is executed serversided only

#

These are the methods i tried already

tileIsoObject:transmitModData()
tileIsoObject:transmitUpdatedSpriteToClients()                        tileIsoObject:transmitCompleteItemToClients()
zenith smelt
#

What is that for?

#

It's not an object?

sand dagger
#

i try to change the water of sinks to tainted water for a Hard mode challenge

#

changing the waterlevel is working

zenith smelt
#

Did you check the 2 mods that do that on steam workshop yet?

#

Ohh I like that, I always found it weird that everything has water in it ๐Ÿ˜„

sand dagger
#

you mean "Dont drink Tap Water" this is where i got the idea from but its not working in MP cause of missing the tainted water

sand dagger
#

oh well then i do not need to create my own oO

#

thanks i will test it

midnight mica
#

anyone got experience with "SuburbsDistributions" list, i've managed to add a mod item to the list, and it drops, but i'd like to understand how i can manipulate the drop chance and drop amount

zenith smelt
#

Like you can always get some water from toilets

#

The upper tank holds a bunch

#

But normal sinks, they would depending on how plumbing is setup, usually just drop a small squirt of water and that's it

#

plus lose that over time as well

narrow urchin
#

Perhaps someone knows how to override method in ancestor class?
For instance - bringToTop() but only for ISHealthPanel
It seems, whatever I do - it doesn't affect base class method.

sand dagger
zenith smelt
#

Yeah, I would really like that too ๐Ÿ˜„
Literally been in my ideas list for weeks ๐Ÿ˜„

weak sierra
#

you enter two entries to the table

#

one is the name of the item

#

one is the rarity

#

higher number more likely to spawn

#

most items have "1"

#

many have small decimal chances

#

many have higher

#

you can manipulate chance of more spawning by either changing "count" on your item (do not recommend, makes recipes messy) or adding it to the list multiple times

midnight mica
#

how much does 1 stand equal to in terms of drop chance? and is it affected by any of the settings rarity?

weak sierra
#

it depends on how many items are in that loot table

#

so it's dynamic and depends on number of mods, etc

#

it's relative rarity, like a weight

#

and yes

#

rarity settings come into play with it

#

my understanding comes from using it and playing, though, i must say

#

i haven't read the loot table code (yet)

midnight mica
#

i was told every item in the list gets rolled on, so i'd think the amount in the list shouldn't matter, or was i told wrong?

weak sierra
#

yeah

#

every item gets rolled on but there's a limit per container

#

so the more items in the list

#

the easier it is for the total items to roll for gets full

#

if i put toiletpaper with a chance of 1000 and put it in the list 30 times

#

all the non-toiletpaper items will almost never show up

#

:p

midnight mica
#

alright, thanks for ur answer, looks like it will be trial and error ๐Ÿ™‚

weak sierra
#

generally u shud balance it around the vanilla loot

#

and let a user/server owner worry about the loot balance on their particular server imo

#

if everyone does that then it will work out to be roughly as everyone intends

midnight mica
#

cool, this will be used for one server only that doesn't have other mods, just would be nice if i had a formula to get a fairly accurate % drop chance

undone elbow
#

How to check if player is zombified?

#

:isZombie() doesn't work

zenith smelt
#

IsInfected from getBodyDamage from isoPlayer

dawn lintel
weak sierra
#

hey there

#

where from?

lusty nebula
#

I was trying to experiment with a thing...Do you think there's a way to display only UI/Inventory panels on a second monitor? ( I mean...Main monitor = Game displayed, Second monitor = All UI panel displayed )

dawn lintel
weak sierra
#

ah yeah

#

im bad with names, who were u on there

#

i do remember someone named Penny, had a camo lada iirc

#

but my memory is a bit wonky heh

dawn lintel
weak sierra
#

:D

#

well hi

#

u still play on there?

dawn lintel
weak sierra
#

modding now i guess, what are u making? :o

dawn lintel
weak sierra
#

ive done a bit of that

#

if u do importing make sure the models are low enough poly to be appropriate for pz

covert summit
#

May be interesting for Hydrocraft users. Lots of updates for magazines, books and recipes, as well as almost all drinks.

azure rivet
#

Hello, does anyone know the name of the player push animation file?

dawn lintel
#

any good qol mods to add mid game?

radiant venture
warped galleon
#

I am returning to zomboid after 8 or so years away and I cannot seem to figure out how modded load order is determined, or if it matters. I have figured it out for single player, or at least I think I have with the mod menu mod. My brother and I have been workshopping a modpack just for the two of us to play. But I assume there to be a bunch of incompatibilities that make it so we load into the world but cannot even pick thing up from dead zombies or take items out of cabinets.

cedar anvil
#

Does anyone know where I could find the Tooltip script? Tooltip = Tooltip_item_RainFromGround,

#

Oh nvm I found it in the translate folders

zenith smelt
deft falcon
#

how to check if the save/game is a multiplayer or singleplayer

radiant venture
#

i love how for the mod i want to make i have to research which is definetly getting me on to some sort of list

radiant venture
#

hmm, is there a way to change the damage types of explosives- like determining what kinds of wounds they make?

zenith smelt
radiant venture
#

i more mean the research of "hey is there bombs i can make with household items that exist in zomboid"

sage bluff
#

hi

craggy furnace
sage bluff
#

does anyone know how i can make a clothing mod

#

?

sage bluff
craggy furnace
#

ty

#

finishing it up now

sage bluff
#

how many people can fit in the car?

craggy furnace
#

6 total

sage bluff
#

next vehicle you should make is a 20 seater

eternal garnet
high citrus
#

hi, do you know if there's a way to dynamically change the actions associated with items? For example what if I want to execute some code whenever a player eats something?

zenith smelt
#

You'd have to edit the eating function and add your code to it

#

I accidentally addSound with 20000 range

high citrus
#

thanks, but what if I want to do it for all the food items though?

radiant venture
#

have fun writting long code

zenith smelt
#

You edit the eating function and you add your code to it

#

You can check in the eating function what item is being eaten

radiant venture
#

hey hamster do you now anything about damage type adding?

zenith smelt
#

Or you can just not check so it will do it every time you eat

high citrus
#

oh ok sorry. I thought you meant all the OnEat functions defined in the items info

zenith smelt
#

Ohh, I mean the ISEatFoodAction

#

damage type, like new damage type?

radiant venture
#

more just i'm trying to make a bomb that gives glass shard wounds but how would i give the item that function?

#

basically an improvised fragmentation grenade

zenith smelt
#

You can spawn glass shards to players

#

generateDeepShardWound

radiant venture
#

ah alright so would i just add that as a line to the "grenade"?

#

basically just

zenith smelt
#

I don't know, can you havea script that executes when it explodes?

#

media\lua\client\XpSystem\ISUI\ISHealthPanel.lua
The debug options for health panel have generateDeepShardWound which creates glass in wond

radiant venture
#

item glassshardbomb
{
DisplayCategory = Explosives,
OtherHandUse = TRUE,
MaxRange = 7,
WeaponSprite = glassbomb,
Type = Weapon,
MinimumSwingTime = 1.5,
SwingAnim = Throw,
UseSelf = TRUE,
DisplayName = Glass shard bomb,
SwingTime = 1,
SwingAmountBeforeImpact = 0.1,
PhysicsObject = ,
MinDamage = 15,
Weight = 1.5,
MaxDamage = 20
MaxHitCount = 3,
Icon = GlassShardBomb,
EquipSound = MolotovCocktailEquip,
ExplosionSound = MolotovCocktailExplode,
SwingSound = MolotovCocktailThrow,
OnExplode = generateDeeoSHardWound
}

#

think this would work?

no idea if OnExplode is a thing i'm just guessing

zenith smelt
#

I don't think that's a thing

radiant venture
#

god i wish it was

#

i don't have the coding skill necessary for my ideas and it sucks

zenith smelt
#

I don't think you can even do that

#

Maybe in project zomboid 2...

radiant venture
#

okay but like- there has to be a way since the game doesn't just assume the damage type, they literally have to have a file somewhere tedermining damage types

zenith smelt
#

java?

#

probably

radiant venture
#

damnit

zenith smelt
#

You can't have a throwable bomb

#

But you could probably make a plantable bomb

radiant venture
#

well it's suppost to be a grenade which is why i "borrowed" the molotov code as a base

#

all i need is to somehow figure out the glass shard part

zenith smelt
#

Maybe you can find that object that's flying?

#

Maybe it's an object or something and you can search for objects on a IsoGridSquare or something

radiant venture
#

hmm might be an idea but i'd have to look more into how it works then

#

i'll see what i can figure out

zenith smelt
#

Yeah, could just look at the JAVA and see how the throwing works
or just throw a bunch of things and try some scripts in lua while the game is paused to see if yu can detect them

topaz pasture
#

Anyone have experience with editing Britta's config files directly? I have no idea what half of these numbers mean, but I assume that they're all somehow spawn chances

topaz pasture
#

I'm trying to remove the spawn chances of some guns so that they never show up in the loot pool

radiant venture
#

hmm alright, best bet is to make a backup of the brita files and then remove the guns from the code entirely

topaz pasture
#

I don't want the guns gone from the code, I just don't want them naturally spawning

radiant venture
#

why would they still be needed in the code if you don't want them to naturally spawn?

topaz pasture
#

For events and the like

radiant venture
#

ah i see, hmm that would be a bit more difficult but i could look into the code some time to see if i can help

#

just don't feel like reading code rn xd

topaz pasture
#

If you could figure out what Britta's is using these numbers for, that'd be great. If I can set them to 0 for what I don't want and leave it as that, that's really all I need to know

#

I'd like to decrease ammo spawn chances as well, but that's a whole other ballgame in of itself

radiant venture
#

okay so i can say rn those are probably the "weights" of the weapons if that says anything to you

#

not in game weight but coding weight

topaz pasture
#

Ah, so 2 is weighted higher than 1?

#

And those spawn chances are independent of the overall spawn chance?

So a 25% loot spawn would have an 870 Breaching 2x more likely to spawn in it if it spawns loot?

radiant venture
#

in coding if you say weight in a loot table it would mean the % chance out of 100

topaz pasture
#

Ohhhhhhhhhhhh

#

So it's a 2% chance?

radiant venture
#

but yes it could very much also mean what you said since im not too sure on this since brita does a lot diffrent especially with distribution

#

best bet is to set it to zero and just test it

topaz pasture
#

Gotcha

open abyss
#

run into a bug that seems to hit my Dupe script for my mod: OnFillInventoryObjectContextMenu
Konijima who was the original creator of my dupe script has been awol for a while, and haven't been able to fix this "bug"/conflict.
It seems the default/vanilla script for loading bullets into mag/gun somehow causes a conflict... weird.
Anyone willing to look into the code of the script and maybe find some way to fix this?

#

The error i get:

attempted index: getDisplayName of non-table: null

LOG  : General     , 1662824889904> -----------------------------------------
STACK TRACE
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: createMenu -- file: ess.merger.main.lua line # 99 | MOD: ExtraSauce Instant Consolidate
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla

ERROR: General     , 1662824889905> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getDisplayName of non-table: null at KahluaThread.tableget line:1689.
ERROR: General     , 1662824889905> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: getDisplayName of non-table: null
    at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
    at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
    at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
    at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
    at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1458)
    at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1416)
    at zombie.ui.UIManager.update(UIManager.java:903)
    at zombie.GameWindow.logic(GameWindow.java:261)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:764)
    at zombie.GameWindow.run_ez(GameWindow.java:680)
    at zombie.GameWindow.mainThread(GameWindow.java:494)
    at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1662824889907> -----------------------------------------
STACK TRACE
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: createMenu -- file: ess.merger.main.lua line # 99 | MOD: ExtraSauce Instant Consolidate
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla

LOG  : General     , 1662824895661> null```
radiant venture
#

how in the-

#

well i don't know what you did but it definetly broke something

#

is this done over java or lua?

open abyss
#

lua

#

the script works fine for everything, except bullets.

#

Bullets throws this error

radiant venture
#

what is the script suppost to do, just so i can make sure i'm understanding this correctly

open abyss
#

But for bullets, the script goes bananas

radiant venture
#

hmm that is odd

open abyss
#

Konijima - AWOL at the moment, is the creator of this script.

radiant venture
#

this does seem a little beyond me sadly so best bet is probably waiting for konijima to return, his codes never make sense to me but normally always work

open abyss
#

I just use it... but apparently the "ISInventoryPaneContextMenu" seems to be the culprit somehow? I don't know enough of lua to figure out what the hoot i can do to fix

radiant venture
#

weird

open abyss
#

looking at the code, i'm none the wiser, tried to add "Dupe" at the end of ISInventoryPaneContextMenu just to see what that would do... somehow the script still worked... but again, not for bullets...

#

The alternate thing i can do is make some recipes until a fix for this bug is made...

#

at least i will only need to make recipes for 1 kind of ammo, not all of 'em ๐Ÿ˜„

lusty nebula
#

Quote " if not getSpecificPlayer(player):getInventory():contains("AGCMDupeListRecipes.AGCMDuplarino2Half") then return; end "
Shouldn't be ?


end```
open abyss
#

if your talking about the "end" thing, i don't think the lua script language cares THAT much where the "end" is located.

#

i only guess

lusty nebula
#

Not sure about that....never saw an " end " in that position so far...

open abyss
#

i moved it down unto it's own line, will test, but i HIGLY doubt that has anything to do with it.

lusty nebula
#

what's the error you get in the console .txt file?

open abyss
#

scroll up in chat, look for the large block of text

#

can't miss it..

#

moving the "end" did nothing...

lusty nebula
#

ExtraSauce Instant Consolidate is the name of your mod or of one in the workshop? If is another mod did you try running the script with it disabled?

#

where do you get the error? When the game is started in the main menu or when a new world is launched?

open abyss
#

I'll try disable Extra Source mod, could be the issue.

I get the error only when in-game and right'clicking Bullets for the sake of duplicating them.

lusty nebula
#

TRy disabling the above mentioned mod then run the game but before doing it delete the console file ( a new one will be created when you'll launch the game ) so we can check easily if something changed

open abyss
#

I just did that and test it

#

one sec, checking the log

lusty nebula
#

ok

#

red error still there?

open abyss
#
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla

ERROR: General     , 1662828696293> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getDisplayName of non-table: null at KahluaThread.tableget line:1689.
ERROR: General     , 1662828696293> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: getDisplayName of non-table: null
    at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
    at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
    at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
    at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
    at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1458)
    at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1416)
    at zombie.ui.UIManager.update(UIManager.java:903)
    at zombie.GameWindow.logic(GameWindow.java:261)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:764)
    at zombie.GameWindow.run_ez(GameWindow.java:680)
    at zombie.GameWindow.mainThread(GameWindow.java:494)
    at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1662828696295> -----------------------------------------
STACK TRACE
-----------------------------------------
function: doReloadMenuForBullets -- file: ISInventoryPaneContextMenu.lua line # 1312 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 604 | Vanilla
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla```
#

yeah, that didn't work

#

it seems to me, that the reload script and the dupe menu somehow conflicts.

lusty nebula
#

give me a sec checking your script for a thing...