#mod_development

1 messages · Page 156 of 1

neon bronze
#

I dont suppose there is a way to keep the checksum in check while creating/overwriting a file?

#

Unless you have an event that deletes the file at the end maybe?

bronze yoke
#

use the normal filewriter, not modfilewriter

#

that one writes to Zomboid/Lua/

neon bronze
#

Hmm doesnt it get checked when connected to mp server?

bronze yoke
#

nope

#

nothing in there executes so it doesn't really need to be checksummed

neon bronze
#

Hmm really? I seem to recall getting denied cause some of my vanilla luas were edited

bronze yoke
#

as in User/username/Zomboid/Lua/

#

not the ProjectZomboid/media/lua/

neon bronze
#

Ahh

#

I switched ok

mellow frigate
neon bronze
#

But i should just call the pathing then with Zomboid/Lua then right?

lone nest
sour island
#

This repo automatically uploads to the workshop weekly

#

The only thing in it atm are debug tools

nimble spoke
#

Feel free to PM and discuss your idea

foggy lion
#

Hey uh, dumb question here. I'm juuust getting started learning about this stuff so um.
Am I going to need programs to edit XML and Lua...files? And if so which ones would be ideal for an absolute novice who has no idea whatsoever what they're doing?

#

I googled "xml editor" and "lua editor" respectively and got an overwhelming torrent of various paid services that I'm afraid to go anywhere near. 😰

#

Would Notepad++ be enough?

bronze yoke
#

i'd recommend vscode

#

notepad++ is common too but imo not that great

foggy lion
#

OK I'll check that one out too, thank you!
Hopefully what I'm trying to do shouldn't be too exceptionally complicated, so I won't necessarily need a super powerful program... So, probably whichever one is more immediately simple to use would be my preference.

sturdy salmon
#

Good evening, is the capacity of an item defined in the sprite? My intention, is to add new contextual menus, with the item crafting, but I can not modify the amount of weight, that can save the same ones, and my consultation was, if it is possible, to modify that capacity. From the .txt, I can modify it, but my problem is that from lua, I don't know how to modify it or I don't know how to access to that txt later.

gaunt meteor
#
    local zData = zombie:getModData()
    local square = zombie:getSquare()
    
    local NoZedSq = isNoZedSquare(square)
    if NoZedSq == true then
        zombie:removeFromWorld()
        zombie:removeFromSquare()
    end
end

Events.OnZombieUpdate.Add(onZombieUpdate)```

Removes zombies that are inside a set zone, but ingame it doesnt really work, the zombies are flashing in/out and still exist, chasing the player. Is there a better method?
#

Goal was to create a safezone where no zombies will spawn

trim mist
#

anyone have any idea why lua doesn't like this hook?

#

it just says that the colon is unexpected

foggy lion
#

I think I'm learning. I see the files these instructions are telling me to rename, but what does "best mod id" mean? How do I choose that number?

bronze yoke
#

the colon only has meaning when defining and calling functions

#

it creates/uses an implicit 'self' parameter

trim mist
bronze yoke
#

oh, you're doing it backwards too

sour island
#

It is underlined lol

bronze yoke
#

local atoneatperform = iseatfoodaction.perform

sour island
#

also you should be re-defining iseatfoodaction.perform

#

then call your stored version

trim mist
#

bet. now i'm getting intellisense! thank you

trim mist
#

further down I call the original and write code to be run after. Is that not correct?

bronze yoke
#

the idea is that you save the original into your variable and then redefine it with a new one that calls the old one stored in your variable

#

maybe this example would be clearer:```lua
local old_perform = ISEatFoodAction.perform
ISEatFoodAction.perform = function(self)
-- code to run before
old_perform(self)
-- code to run after
end

sour island
#

the arguments should also match the original at least (usually)

#

doing this you can add additional arguments given you account for calls to the original

bronze yoke
#

how do you add additional arguments and maintain compatibility?

sour island
#

very carefully

#

but basically you provide a default to the argument within the function if it's not present

#

arg = arg or X

#

that way calls made by other mods or other points don't have an impact

#

That's what I did when I decorated the addXP method

bronze yoke
#

but if two mods both add arguments, won't that clash?

sour island
#

yes but the overlap to that should be minor

#

it's compatible to uses which share the same arguments as the original atleast

drifting stump
bronze yoke
#

i think there was a post on the pz wiki with all the number codes, but it's better to use the variables anyway

ancient grail
#

is it possible to

during daytime

sound FemaleZombieCombined
    {
        category = Zombie,
        clip
        { file = media/sound/sprint_00.wav, } 
        clip
        { file = media/sound/sprint_01.wav, }
        clip
        { file = media/sound/sprint_02.wav, }
    }```
during night time
```lua 
sound FemaleZombieCombined
    {
        category = Zombie,
        clip
        { file = media/sound/mod_sprint_00.wav, } 
        clip
        { file = media/sound/mod_sprint_01.wav, }
        clip
        { file = media/sound/mod_sprint_02.wav, }
       
    }
#

trimmed that down*

bronze yoke
#

you mean is it possible to have different zombie sounds at day than at night?

ancient grail
#

yes exactly albion

#

scriptmanager?

#

onzombieupdate?

bronze yoke
#

i would try scriptmanager

ancient grail
#

ayt so you havent tested

red tiger
#

What am Iooking at??

ancient grail
#

right ill test now

bronze yoke
#

not sure if live messing with sound scripts is okay or not

red tiger
#

You must be a masochist with a format like that.

lone nest
red tiger
drifting stump
#

one is officially published by tis and the other is from decompiling the game

bronze yoke
#

the official one is generally a lot more useful, but when we start getting updates again it'll probably fall behind again

drifting stump
#

the official one only has docs for the zombie package

#

decompiled has docs for all packages

lone nest
#

Hm... I see that is where all the Java backend is for all the in-game stuff, I'll probably avoid the Java since I don't want to deal with compiling and decompiling.

#

I wished LUA stuff would were in JS or TypeScript instead pain

bronze yoke
#

oh jab...

fossil sail
red tiger
#

How badly do you want that to be true?

lone nest
#

very, especially with TypeScript defined interface to Java backend.

drifting stump
#

jab currently experiencing pure bliss

bronze yoke
drifting stump
#

i will not depart back to the void

lone nest
fossil sail
red tiger
trim mist
#

does the player have... a calorie stat....?

#

even with a decompiled zomboid, I can't find things like that

bronze yoke
#

yeah, it's part of their Nutrition

#

player:getNutrition():getCalories()

ancient grail
#

i think i found it

#

pretty sure this will work

mellow frigate
#

Hi, is it me or all work from dislaik has disappeared from the workshop ? 😦

blazing vine
#

Yep

#

I wonder if I’ll get dmca’d from him if I reupload his guides

sour island
#

If he wishes to remove his work it is his choice, going against his wishes would be up-to him to enforce it or not

#

I don't know anything about the situation- but if it's 'I don't want to deal with these people' then maybe he won't care

red tiger
#

People did this to my guides like crazy and helped a lot of people.

#

IMHO it should be very frowned upon to do that with something like guides.

keen silo
#

https://steamcommunity.com/workshop/filedetails/discussion/2950750587/3821906878988541035/

Hey, I just released an Update to my Voiced Radio and TVs mod, Adding the LBMW programming.

I'm planing to turn it into 2 mods, a framework, and the part that has voicelines and all that to make it compatible with other mods like that (specially @abstract raptor mod, Surviors Radio).

I was wondering if anyone has experience with that.

Also, for my framework, I was wondering if there was a way to get the Filename of the .xml file that generated the text line that appears on the Radio/TV (That way I'll be able to know for instance that line "You are watching woodcraft" belongs to RadioData.xml for instance, meanwhile "You are listening to Custom Radio" belongs to CustomRadio.xml)

#

I Know that I can get access to the GUID and the text line, and with that I could do a search of all the XML files to get a match of both, but I believe this could be slow (?) (since I would have to open N files at runtime, search for the GUID, and then close them once it's found) and was wondering if there is a more direct aproach.

sour island
#

To clarify

faint jewel
#

Who?

sour island
faint jewel
#

OH

#

yeah

#

lotta drama there

red tiger
sour island
#

Don't tell me this is still about the damn skateboards and bikes

bronze yoke
faint jewel
#

I wont tell you that, but it is. 😦

sour island
#

Rip I guess

keen silo
#

@red tiger @bronze yoke I was wondering if you knew how to split a mod in 2 parts (A framework and the mod) where I can update each part independently and it is updated on the workshop.

Also, if there is a way to get the Filename of the .xml file that generated the text line that appears on the Radio/TV (without having to search for it in all the possible .xml files under the radio folder)

bronze yoke
#

for the first part, splitting it is pretty specific to how your mod works, you'd need to make your mod modular if it isn't already

for the latter, i don't think the game keeps track of that and i don't think you're able to mess with any of the xml code to make it keep track, so there isn't really a clean way to do that except parsing the xmls yourself and keeping record i guess?

keen silo
#

To be more precise about the splitting part, My mod currently has 4 folders, mostly independent from eachother:

lua: where the magic happens and plays the sounds from script (currently it has to write in the LUA files the sounds of the scripts, I'm planing to change that to an external file)
radio: where the .xml files with scripts are
scripts: Where I generate the sound files to be played in the game
sound: Where the .ogg files are to play the lines

My plan is to split the mod into

Lua

And

radio
scripts
sound

ancient grail
#

Definitely didnt work

keen silo
#

My idea is that with the framework (that only has the Lua that takes care of how the audio should be played) other people can add their own radio, scripts, and sound files without having compatibility issues.

#

currently, what causes compatibility issues is that I have hardcoded into the LUA script ids of my lines, so no one can add their own, since they would have to change the LUA script to do so

#

everything else can be avoided just by having a coherente naming convention (for instance, each mod that uses the framework has the files with their names)

bronze yoke
#

you should make your code modular so people can insert their own lines into your tables with lua, otherwise you can use a custom script format but that usually seems like overkill

keen silo
#

how can I do that?

bronze yoke
#

if your file returns something, people can get that value using local whatever = require "filename"

#

the most common usage of this is to put all the functions, variables, tables, etc in your file into a single local table and return it at the end

#

then other mods can require that file and edit whatever they need to

keen silo
#

I'll show you a part of my mod because i dont really understand :v

#

My lua has this

RadioWavs.files = {}
-- Example
-- RadioWavs.files[1] = "ZenitramJrMuricanaNumber"
-- add RadioWavs.files here
--BEGIN RadioWavs
RadioWavs.files[1] = "aece616a-4883-4e09-bd35-39aed89fe655"

... Code..
End

and a broadcast in the xml file has the following:

<LineEntry ID="d3e99611-97b3-4ac2-bc8a-cf9641b470c8" r="0" g="176" b="80" codes="DRU+1">${t:1.40}Y'all are watching Woodcraft!</LineEntry>

Where the DRU code is what is being used to get the RadioWavs.files

#

what I was thinking was adding the name of the xml file to the mix, and an external txt file that has the sound names instead of inside the Lua

That way, If someone also uses the DRU+1 tag, it differentiates the file using the xml name, and knows that if its from RadioData.xml, go to RadioData_dru.txt and get the first line, if its from CustomRadio.xml, go to CustomRadio_dru.txt and get the first line.

thin hornet
#

Hey there, friends! 😊

I've put together a fun and easy-to-follow tutorial to help you create your very own Project Zomboid mods using PZPW.
Get ready to unleash your creativity and take your PZ experience to the next level!
Check it out here: https://github.com/Konijima/pzpw/wiki/Tutorial:-Creating-Project-Zomboid-mods-using-PZPW

Can't wait to see what you come up with!
Happy modding! 🎉

GitHub

Node command-line tool to create and manage PZPW projects. - Konijima/pzpw

bronze yoke
keen silo
#

not necessarily. I used the GUID for an easier convention, but since this mod is based on the Survivors Radio Mod, it can have any name you want

#

I'm trying to make it compatible for them, so I dont want to have to tell them "Hey, you have to change every name in your /script/sound to the guid instead of the names they currently have"

#

RadioWavs.files is just a list of strings, each string is the name of a sound to be played, defined in /scripts/{mod}.txt

bronze yoke
#

wouldn't it be easier to use a lookup table of line GUIDs to sound names instead of using the drunkenness code?

keen silo
#

I didnt make the mod :v but probably yes

bronze yoke
#

oh!

keen silo
#

im using it as a base for the one i made, but im trying to add compatibility without making an extreme overhaul

bronze yoke
#

and you have permission and everything right?

abstract raptor
#

drunkeness code was disabled, so i used it to call to a table of strings that match the name based on the value of the drunkeness. might have been easier to use GUID back then too, but i didn't know what i was doin 😛

bronze yoke
#

when was 'back then'? the GUID wasn't actually passed to the event i assume you're using a while back, so it might have been the best way anyway

abstract raptor
#

when did survivor radio add music? i can't remember lol, I had to take the original version down cuz of some dmca thing, that wound up being a whole bunch of dumb bullcrap

#

cuz true music gets away with it now

#

but i was the first mod to add music like that so

#

they had to pick on me : (

bronze yoke
#

ooohh yeah that's unfortunate

#

if it's older than true music then it probably does predate the change i mentioned

keen silo
#

@bronze yoke heres where @abstract raptor allowed me to use the mod, i was searching for this :v

bronze yoke
#

hehe i assumed from her responding to this conversation but not addressing that that everything must be fine

abstract raptor
#

😎

#

I'd go back and fix everything but it's an assload of thankless work plus if I updated it 60K + people would have broken radio saves XD

keen silo
#

wait

#

I was wondering

abstract raptor
#

suppose that's a bandage that gets ripped off eventually but I just can't think of adding a whole bunch more content it's so time consuming

keen silo
#

if we used look up tables instead of changing the names of the sound files, all you would have to do is go to every line, remove the DRU tag and change it for the _guid

#

if you want, I can make you a pythong script to do that

#

I been working with that since I started my mod to not have to keep track of all the DRU tags im making :v

abstract raptor
#

lol i did it all by hand ha

keen silo
#

lol

#

I cant imagine what it must have been, I've completely automated the generate script, tags, DRU and LUA process to save time

#

if not, i would have gone insane

abstract raptor
#

(is already insane)

#

uwu

#

probabaly from doing it by hand

keen silo
#

@bronze yoke how could we make the look up tables, such that anyone can add to them from the mod?

bronze yoke
#

as long as they're global (cold) or the file returns them or a table containing them (if you decide to go modular)

keen silo
#

mmm

bronze yoke
#

here's an example of a module structure:

----------------
myModule.lua
----------------
local myModule = {}

myModule.data = {}

-- probably some code that actually uses this data!

return myModule
----------------
otherFile.lua
----------------
local myModule = require "myModule"
myModule.data[5] = "osodgkjdspgjgspdgj (real uuid btw)"
keen silo
#

yes, this would probably work, but i guess i'll have to change some things

#

because I dont want to have the people insert values by writing like that, they should use an insert function.

bronze yoke
#

yeah, by intentionally not including things in the module you can control how people can access your data

#

like keeping the data local but putting functions to insert stuff into it for example

keen silo
#

so i should make

local myModule.data = {}

public function myModule.data.insert()

?

#

i dont know Lua sintax that well :p

bronze yoke
#

something like```lua
local data = {}

function myModule.addData(a, b)
data[a] = b
end

#

of course with whatever checks and stuff you want to put in there

keen silo
#

yes, i'll probably have a data structure where i have the _guid that gets called, and the sound that has to be played, both as string values

#

then, I search for the _guid and then get the sound

#

tomorrow I'll start work on it. then I'll make a script to translate the DRU tags (and remove them) into an otherFile.lua

oak cipher
#

Hello! Any modders here open for commissions?

faint jewel
#

of what?

gaunt meteor
#

Why is Recipe.GetItemTypes used? For e.g. [Recipe.GetItemTypes.SourCream] in a recipe.txt, but the ingredients underneath don't use that format and are instead just IDs

#

Is it because it's not Base module?

minor pumice
#

I'm building a map on Tiled and when I press "tools>WorldEd" there's nothing on it. any ideas what's going on?

fast galleon
drifting ore
#

``
local Scoped = 0;
local hasScope = getPlayer():getPrimaryHandItem():getScope():getType();
if hasScope then
Scoped = 10;
end

``

Okay now I have this and it works, but it gives me some error when the scope is NOT installed or the wepon with scope is not equiped.

neon bronze
#

You are accessing a member of nil which will give you an error

#

you'd need to write something like ```lua
local weapon = getPlayer():getPrimaryHandItem()
if weapon and weapon:getScope() then
local scope = weapon:getScope():getType()
Scoped = 10
end

drifting ore
neon bronze
#

if you start to run into 100 errors you start to pick up on things

torn igloo
#

is there any mods that modify the global object UI to include a teleport shortcut to the object location?

fast galleon
frank elbow
# neon bronze you'd need to write something like ```lua local weapon = getPlayer():getPrimaryH...

This is a very minor nit that doesn't matter all that much: I think it's preferable to move calls for checks like that to a variable to avoid double calls (in this case, to getScope). The vanilla code does this repeated call pattern a lot so I can't blame mods for doing so as well, but it's unnecessary. What I mean is:

local weapon = getPlayer():getPrimaryHandItem()
local scope = weapon and weapon:getScope()
if scope then
  scope = scope:getType()
  Scoped = 10
end
ancient grail
neon bronze
#

well i have a rule thumb of if i call a thing more than 2 times i make it a local otherwise i just use the function call

#

sometimes i lose track of what the variable does especially when i start changing it a lot

frank elbow
#

I think that ought to be just 1—in the case where any of those calls are expensive, that's extra work for the code. To each their own, though

frank elbow
neon bronze
#

i doubt the pay for such calls is that hardfelt

frank elbow
neon bronze
#

well to each their own

#

i have a shitty laptop so performance issues will be mostly dealt with

ancient grail
#

Wait speaking of getters
We can use our own get function to act as boolean too
If im not mistaken

function getCar(player)
    local car = nil
    if player:getVehicle() then car = player:getVehicle() 
    elseif player:getNearVehicle() then car = player:getNearVehicle()
    elseif  player:getUseableVehicle() then car = player:getUseableVehicle() 
    end
    return car
end

if getCar(getPlayer()) then  ...
neon bronze
#

Yea that would work either way

#

I would just criticise that you used 4 times getPlayer() instead of making it a local lol

ancient grail
#

Yeah this is from my debug code

#

Snippet
I usually do this so i can copy paste a line whenever needed

#

There fixed it for ya

neon bronze
#

I mean technically we can even test if a function exists if we declare it as a table member

#

I dont think you need to even make a table first for that just declare it as a member

#

I actually like that about lua, almost everything can and will be made a table member

dusk kite
#

Howdy, im try to reskin a vehicle, KI5s 92' CVPI to be exact. While I managed to get the reskin to work with the texture being 512x512, if I upscale it, the texture doesnt get applied properly. Is there a way to upscale vehicle textures without that happening? Or are vehicles limited to that size

frank elbow
frank elbow
#

Note that this message is from nearly a year ago so the situation may have changed

dusk kite
#

sound, cheers

drifting ore
#

How do I randomize nutrition values on food items created with InventoryItemFactory.CreateItem

#

I only know how to do it when created via recipe

neon bronze
#

There is probably a getter and a setter for that

drifting ore
#

``
local animal = "Base.DeadRabbit";
local RandomNut = ZombRand(0.5,1.5);
animal:setCalories(animal:getCalories() * RandomNut);
animal:setLipids(animal:getLipids() * RandomNut);
animal:setCarbohydrates(animal:getCarbohydrates() * RandomNut);
animal:setProteins(animal:getProteins() * RandomNut);
local item = InventoryItemFactory.CreateItem(animal);

``

#

Tried something like this.

patent lichen
#

Hello, I wanted to know if anyone is willing to answer a few questions in regards to exercise fatigue? (trying to put together an item mod)

#

I promise it won't take long.

red tiger
#

Wheee

#

More PipeWrench activity.

ancient grail
#

Sure show where the problem is

patent lichen
#

its more of a basic question

patent lichen
#

my bad that wasnt meant for me

ancient grail
#

ZombRand()
Is for integers

drifting ore
ancient grail
#

Ah sorry skipped the exercise fatigue question

What are you planning to do? I believe this is stored as time actions

patent lichen
#

oh no worries, mind if I DM you?

drifting ore
#

God damn you are a lifesaver Glytch3r!

upbeat spindle
#

anyone in the know of editing lootable maps, such as "muldraugh map" and "annotated map"?

#

was wondering if it is possible to tinker with those in any way

nimble spoke
fast galleon
drifting ore
fast galleon
#

all of that can be customised

upbeat spindle
fast galleon
#

there's also in-game debug tools for map edit and stash houses respawn

prisma grove
#

anyone know why this mod doesn't work? its just supposed to be like a wearable prosthetic robo arm but it doesn't work at all, i load forever whenever i try and open it

sour island
#

Was thinking of adding a (i) button API for tools tips and stuff to some UI

ocean sphinx
#

where can I find the function for installing and uninstalling vehicle parts?

merry storm
#

Hi, i need some help here. When im trying to add items to a container, sometimes i cant see them but they are inside, i need to restart server so they appear inside the container. Is there any way to refresh its state or something?

for i = 1, quantity do
  local item =             InventoryItemFactory.CreateItem(itemName)
  print(item)
  container:addItem(item)
end
bronze yoke
#

are you adding them from the server side?

#

you can use sendItemsInContainer(object, container) to send added items to clients

merry storm
#

ohhh, that was what i was missing

#

i was trying now using
requestServerItemsForContainer()
or
requestSync()

merry storm
bronze yoke
#

it's global

#

the first argument should be the object the container belongs to

merry storm
#

i see. thank you!

bronze yoke
#

if it's important to know for your case, sendItemsInContainer won't remove items, only add them

#

as far as i could tell when i was looking into this there literally isn't any way for the server to synchronise removing items from lua and i ended up implementing it myself

merry storm
#

Wow! that had to be so annoying... luckily in my case i only want to add them but its nice to know that

#

the thing that getting me stuck its trying to spawn an zombie horde from a trigger. They use to be on the floor and then "remove stale zombie 5000" and all of them dissapear until i reset the server

undone tapir
#

Looks interesting. Tchernobill makes very interesting mods

white quest
#

Hello, does anyone have experience with adding custom parts to vehicles?
I'm adding seperate parts to my vehicle, they get detected and added to the mechanic screen, but they aren't visible in 3D.

I've tried changing the base mesh of the vehicle to see if it's an issue with the meshes, but after displaying individual objects one after one they appear with no problem as a base mesh, it's just the parts that are being difficult.

bronze yoke
#

can you show the script for one of these parts?

bronze yoke
#

huh?

ancient grail
#

Oops sorry

#

Idk why i tagged that

#

Ghost touched

white quest
# bronze yoke can you show the script for one of these parts?
module Base
{
    model Wheels1
    {
        mesh = vehicles/Vehicles_c1|Wheels,
        texture = c1,
        scale = 1,
        shader = vehiclewheel,
    }

    
    template vehicle c1
    {
        part Wheels
        {
            model Wheels1
            {
                file = Wheels1,
            }

            area = Engine,
            category = c1Parts,
            specificItem = false,
            mechanicRequireKey = false,
            repairMechanic = false,
        }

    }
}
bronze yoke
#

try```
model
{
file = Wheels1,
}

#

iirc naming the model like that is used for when a part has multiple models that can be swapped out, and that might make it start not visible by default..?

white quest
#

Testing

white quest
#

oh also I should note, for my vehicle script I'm simply doing

        template = c1/part/Wheels,
#

if that matters.

bronze yoke
#

yeah, my models have also been stored in a template and worked fine, so that should be okay

white quest
#

Yeah I've been trying to figure out what's wrong with this since yesterday it's been a pain

#

pretty much went ahead and replicated what I saw on other mods for parts in the same format but no avail

#

it finds the template since it's visible in the mechanic view, so it's pretty weird.

bronze yoke
#

sorry, no idea - your models seem to be done just like mine are

#

i didn't have any issues with models at all so i don't know any 'common issues' or anything either

white quest
#

Damn, alright. thanks anyways

ancient grail
earnest fiber
#

yes sorry guys

ebon apex
#

how to read the map that is in the inventory?

red tiger
#

Welp... It's been a week since I looked at my vscode extension code..

mellow frigate
balmy river
#

Can anyone teach me how to make custom jobs with special crafts?

undone tapir
# mellow frigate Thanx mate, I am stuck on this because I am too bad at making animations. If som...

Really like your mods. You're a creative person.

I really wanna fiddle with the battle moyale map.

How exactly does it work, like what happens when you use the manhole cover and you goto the safezone, does it tp you somewhere or just take you out of "game mode"?

Can you move the circle to a specific region if you wanted a specific town to be a play zone?

Does it work on non muldraugh, ky maps like daegu or desert_base?

mellow frigate
#

to move the circle to a specific region you need to mod the mod (it has been designed for this)

#

to make it work with other maps, you need to mod the mod (it has been designed for this)

undone tapir
#

When you say die and still play, does it remove the zone and you just play like normal or you can enter the safezone and still die by being outside the zone?

mellow frigate
#

when you exit through the manhole, nothing changes on the world (currently).

#

the only thing is the star next to the player (and the removal of the manhole)

undone tapir
#

I gotcha

mellow frigate
#

so you gonna die 🙂

#

unless you disconnect or get admin invulnerability ..

#

I'm currently working on making it solo compatible

undone tapir
#

It's really really creative mod. I thought about pairing it up with a mod that enabled brush tool for people, could be fun. I love mods and maps that completely changed things like this.

mellow frigate
#

thank you.

#

I did not think of that 🙂

#

I was more thinking on pairing it with vehicle mods when the zone moves fast

undone tapir
#

That's also wonderful you made it so it can be modded for other maps. Like I've seen some hunger games arena maps that this would be amazing on or specifically made pvp maps.

mellow frigate
#

Awesome I never diged into maps I did not know there was PvP ones

#

I want the mod to be used and I cannot adapt it to all maps by myself so the modularity was required

undone tapir
#

Not a lot but there's definitely a couple I've seen. I think there's at least 2 hunger games ones, a stalker zone one and then some other random ones. Shit there are even island maps it could be fun on.

#

Or the Elysium map would be pretty fun with it too, really well made peninsula island thingy

mellow frigate
#

🙂 It's all in the hands of server owners now. (well and then it will be on me to maintain it because it is likely to be bugged)

undone tapir
#

Another interesting variation I thought of would be if the outside zone worked like the toxic fog/anomalous storm where you could go into it with a mask. It's so creative I really hope to see people go crazy with it

mellow frigate
#

the mask is a good idea. can I borrow it ? 😄

undone tapir
#

Brother it's your mod and your world we're just living in it 😁

red tiger
#

A sight for sore eyes.

#

Learning the diagnostics API for VSCode extensions.

hollow lodge
#

hey

#

how can I dlete an item from a mod? I'm trying to delete the bomber jacket from clothesbox, it conflicts with the spongie's one

#

I erased most of the lines in the scripts, lua, and .xml but I still have that option shown in the character creation menu

#

so far the item doesn't load and picking it just get's you to the none option

undone palm
hollow lodge
#

can you simplify it?

#

I'm not into coding, I just want a clean modlist

#

I'm also revamping clothesbox textures, I'll appreciate some guidance

undone palm
#

I write code to test your scripts with all PZ libs)

#

And mock file (with instruction)

#

If anyone has any ideas for improvement, write

magic edge
#

I made a mod that modifies client/TimedActions /ISEatFoodAction.perform. Is there any way to modify the server-side handling of eating to make this mod multiplayer?

bronze yoke
#

what serverside handling of eating?

magic edge
#

Is it completely handled client side?

bronze yoke
#

probably?

magic edge
#

😓

bronze yoke
#

player stuff usually is

magic edge
#

hmmmm. Working in SP but not MP. back to debugging...

#

btw, it turned out the issue was InventoryItem.getUnhappyChange vs InventoryItem.getUnhappyChangeUnmodified. Anything with a modifier wasn't "resetting" properly, causing the drift. Now that I'm subtracting the two values and inverting it resets properly.

fast galleon
#

I see a number of people working with ISEatFoodAction.perform, please remember to patch both perform and cancel.

drifting ore
red tiger
ocean sphinx
modern hamlet
#

I tried to add a new recipe but its not working, any idea?

recipe Make GunPow Test
{
keep [Recipe.GetItemTypes.Hammer],
Sparkles,

    Result:GunPowder,
    Time:150.0,
    CanBeDoneFromFloor:true,
}
#

Also, I couldn't get this to work either:

recipe Make Glue Test
{
WaterPot;5,
keep Spoon/Fork,
Vinegar=2,
HairGel=2,

    Result:Glue=1,
    Time:300.0,
    Heat:-0.22,
    CanBeDoneFromFloor:true,
}
signal ibex
#

Is there a way to change the player character VOIP distance? Like having whispering and yelling?

#

I haven't seen much about it, wondering if I can change the distance a player's direct VON can be heard

cunning kestrel
#

Hey Coding buddies, funny question:
Ingame my mod is marked as [ERRORS] in red in the active mod list (bottom right).
How ever my mod doesn't actually throw any errors.
And i have 100k+ lovely test subjects that have not come back with anything soo ... Why is my mod getting flagged as having errors ???

fast galleon
#

check logs 👍

gaunt meteor
#

Is there a way to prevent a zombie costume from showing up in it's inventory loot when it dies?

#

I vaguely remember something about not including the item in an xml or txt, I can't remember

neon bronze
#

There is an event if im not wrong that fires on zombie death maybe try using that although that would be costly probably

cunning kestrel
# fast galleon check logs 👍

Not "👍 ". like I said, there are no errors in the logs. it has nothing to log about if there are no errors ...
unless its mad about 1 missing translation which I highly doubt. which is not even a "hard" error more a warning.

fast galleon
sour island
#

People keep mentioning mods marked as having errors -- where is this on the UI?

#

Cause I've had people say one of my mods is marked red -- with no errors either

#

Also @cunning kestrel if you're playing in MP the clientside errors go to console.txt -- the host side goes to coop-console.txt.

fast galleon
sour island
#

I guess I missed that then

#

But it doesn't show the actual errors?

fast galleon
#

No, just marks it in red with an error tag I think.

sour island
#

I could probably rig up errorMag to work inline with that maybe

cunning kestrel
#

nope not a single error pop up just marked red

fast galleon
#

Please check logs, just because it doesn't pop or throw doesn't mean much.

sour island
#

Also, check what I mentioned about MP if that's applicable

#

Alot of people, especially modding, don't know to check coop-console. Making stuff work right in MP is already hard enough 😅

cunning kestrel
#

coop-console only has "LOG"' 's no error/ warnings ...

sour island
#

When errors occur they're printed as "stack trace"

#

Or "exception" in some cases

#

That's also not the co-op console - I'll assume you're on SP then

#

What is your FWO mod? Cause there's a bunch of errors about salvage cars having messed up recipes

cunning kestrel
#

ow thats the wrong one

#

yeah that mess is not mine 😄 "Fitness & Workout Overhaul" (FWO) is my mod

sour island
#

Your error is a missing translation

#

Which is more of a warning

fast galleon
#

I don't think translations throw errors.

cunning kestrel
#

yeah but thats even just a warning.. idd. so I highly doubt thats flagging it

fast galleon
#

But failed require or missing sound. might?

frank elbow
#

Have you tested your mod in isolation?

cunning kestrel
#

hmmm oke so in single player its not marked as red

sour island
#

There's a few less than ideal things going on

#

Nothing really to worry about

cunning kestrel
#

well thats the translation and calling / starting a sound (no idea why/how to preload it), never been an issue ...

sour island
#

I would have to check how that list marks things as red -- including ERROR in a print does do something but I don't think it counts as an exception

sour island
#

I'm not sure what's throwing the conversion thing with string and boolean

cunning kestrel
#

i believe thats just and "if exercisestared then" call so dont see the big harm

sour island
#

Also translations can take in variables using the %1 macro as an argument to getText()

fast galleon
#

try hosting with only your mod and see if it makes it red

sour island
#

I've just never seen that kind of message before - unless that's you printing it lol

#

I'm pretty convinced it's the translation thing

#

It's thrown pop-up red errors for me in debug mode before

cunning kestrel
#

hmm really ???

sour island
#

Way back when I used getText() instead of getTextOrNull() for conditional speech, yes

cunning kestrel
sour island
#

I abused the translation system to operate independently between languages for cnd speech

#

So I had something check if the phrase existed or not - would throw an error for each moodle

#

But in preBoot

#

I've since changed that- so maybe flagging it as a pop-up was changed(?)

#

Are you also in debug mode?

cunning kestrel
#

my translation error comes from an context menu item thats defined inline instead of with translate var ..

sour island
#

If you use getText("ContextMenu_treadmill", 100)

Where "ContextMenu_treadmill" = "Use Treadmill fitness (%1)" it will replace %n with the given parameter

#

Try removing getText() and seeing if your mod still turns red

#

I'm really curious how that modlist feature works now

cunning kestrel
#

it does seem like a strange thing to fail on, especially since it knows and marks it as warning and not error..

fast galleon
# cunning kestrel I did sadly

You said it wasn't marked in SP, was it marked when you tried hosting? And do you have logs from that instance? - console/coop-console

sour island
#

It says ERROR though, I was saying it should be a WARNING for the sake of idk technicalities (?)

cunning kestrel
sour island
#

Unfortunately I'm not home, but if it's not the getText idk lol

#

Actually... I uploaded the Lua to GitHub

#

Can you screenshot the UI that's red?

cunning kestrel
#

i can, say what would be the best way to test this on dedicated server without uploading it ? copy paste to the dir?

sour island
#

Best way to test?

#

The red text appears in SP?

fast galleon
#

Local host is good enough for testing things.

red tiger
#

^

sour island
#

Unless you need to test with others 😩

cunning kestrel
fast galleon
sour island
#

If the mod turns red in SP you don't need to check MP tbh

cunning kestrel
red tiger
sour island
fast galleon
sour island
#

I've asked that noSteam still load local Workshop folders for this reason

red tiger
#

Sounds like another guide that I'll need to write.

sour island
#

Also one of the things I want to do for comm proj, is display duplicate modIDs in the mods list and if possible let people control which directory is getting enabled

cunning kestrel
#

i have mine under user\Zomboid\Workshop\ never been an issue ... atleast in solo

sour island
red tiger
#

I usually use mods/ but that's because I'm old.

#

I only toss into workshop/ to upload.

#

Found that to be the easiest setup for modding MP.

sour island
#

For MP yeah

fast galleon
#

I upload from workshop, so they are there. But I also have a symlink to the mods folder in ZomboidDev.

sour island
#

So like the sub-directory is "linked" too?

#

:0

#

I kind of wish the local mods folder could just accept workshop structured mods too

#

Would make explaining stuff much easier

#
  • keep the file structures for modding to one thing
#

They could still support the old method too

#

@fast galleon the UI is in ISPauseModListUI

#

Seems like it's just adding to a global list of modIds

#

The addition to the list isn't in Lua though

#

So I can't track it further

#

My best guess is there's something scanning coroutines and prints for the phrases "ERR" or "ERROR"

#

Would be cool to have one to change it to yellow for warnings 😮

fast galleon
sour island
#

Yes, but there doesn't seem to be any uses outside of that and the define

#

Git repo is just the Lua folder for tracking changes

#

Not home to check if there's java sided stuff

fast galleon
#

hm, could be in a DLL somewhere?

sour island
#

Could be - but that seems like a waste... Shouldn't the java be able to put onto the table?

#

Actually it's kind of odd it's a table and not an array 🤔

cunning kestrel
#

-_- oh great, its one of those ghost bugs... I saw it being flagged, even had a user report this aswel.

sour island
#

Yellow is "not available"

#

Looking at the UI code rn

red tiger
#

Going to have to revise my layout for linting ZedScript however..

#

Saying what scope is missing will go away but essentially working on diagnostics.

sour island
#

Actually, modID yellow but name is white is "not found"

#

But it should display [not found] apparently

#

Both your mods have the same modID?

#

@cunning kestrel

cunning kestrel
sour island
#

The yellow portion is meant to be the modID unless my Lua is old or I'm misreading

cunning kestrel
sour island
#

Oh ... Lmao

cunning kestrel
#

😄

sour island
#

I was so confused why it was missing stuff too

cunning kestrel
#

nah nah all good

fast galleon
#

nice

sour island
#

The error would have to occur first before it turns red though

cunning kestrel
#

hmm.. truue... brb 😛

mellow frigate
#

Hi, I am currently trying to save data in the current game world save folder. For solo game I got the path right, but I am unsure what I should use for writing / reading files in that case. Do you have an exemple of mod that does it ? (I am not talking about Zomboid/Lua folder.) If it is a bad idea can you tell me why ?

sour island
#

You can't write to save folders afaik

#

Your options are mod installation folders or the cache's Lua folder

#

Would be nice to be able to write into a directory within the respective save tho

mellow frigate
#

For solo I can use my player mod data to store instead. but for MP how do you save world related data ?

sour island
#

You can use globalModData

#

It's a special modData with a few of its own methods

fast galleon
sour island
sour island
#

But if all your operations occur on the server-side it should be fine

#

The issue is clients don't have access to the hosts'

#

So you'll have to set up update events

mellow frigate
cunning kestrel
#

So, Good news is it doesnt give a S@#T about the translation errors, nor anything from the benchpress excercise... its doesnt seem to like the treadmill though... although still no errors ...

sour island
#

I think the next step would be to see whats added to the flagged mods list

fast galleon
#

it's in the function that returns the string of "function ... | MOD Modname" for the error to print the stack trace.

sour island
#

Well.. then it has to be in the coop-console

fast galleon
#

Or somebody really wanted to highlight that mod.

sour island
#

Should also be noted the console logs reset when the game is booted up, and obviously errors only get printed once they occur

#

You could try my mod errorMagnifier

#

But I didn't write it to work in MP

cunning kestrel
#

i ran it on dedicated this time, ill try in SP ..

#

NOPE SP is fine, unaffected. white.

sour island
#

Check coop-console after the mod turns red

cunning kestrel
#

euh so in-game hosted server > no issues ...

sour island
#

You may not see the pop up

#

You need to check the logs

cunning kestrel
#

didnt even turn red

sour island
#

So the issue is only dedicated?

cunning kestrel
#

its looking like it...

sour island
#

The error should be in coop-console

fast galleon
#

there should be a log with "..." + " | MOD " + modName when it happens. Otherwise somebody else might set it manually.

cunning kestrel
sour island
sour island
#

SS's second dev added cross mod error reporting and thankfully Nolan removed it

#

Also if there's no other mods that'd eliminate that

cunning kestrel
#

Oke, dont ask me how, but im pretty sure my mod is getting falsely flagged .. xD
Dedicated server, just my mod, no issues , white.

#

how is that even possible ...

sour island
#

Do you use intelliJ?

#

You could search your entire Workshop folder for uses of your modID

cunning kestrel
#

currently VS

sour island
#

But I can't imagine someone else is adding your mod to that list

cunning kestrel
#

aaah thats an idea

sour island
#

Is there no coop-log or server-log?

#

It's coop when hosting from the main menu

cunning kestrel
sour island
#

At the end of the day if nothing is getting impacted - does it matter?

#

You could remove your mod forcibly if you want lmao

#

From that list

red tiger
#

I'm surprised that TIS hasn't merged the mods/ and workshop/ stuff.

#

Only creates confusion for newcomers.

cunning kestrel
red tiger
#

non-steam can get over having to use the workshop packaging for mods.

sour island
#

I agree

cunning kestrel
mellow frigate
cunning kestrel
cunning kestrel
red tiger
#

I currently work on User-Interface / User-Experience for a living so I'm constantly thinking about how to simplify and remove the wasteful, needless actions to perform tasks.

#

I see mods/ and workshop/ as needless distinctions.

#

Technically there're three of these folders.. the third being the workshop folder workshop/108600 in the Steam install folder.

sour island
#

The thing is most people would I assume are downloading workshop mods and having to pull out the internal mods/ folder

#

So it would be less work for them as well

red tiger
#

Keeping things the same format or folder structure would reduce time having to transform and package mods to upload to the workshop.

#

This would reduce time working on MP mods moreso since non-steam mode is friendlier for MP modding.

cunning kestrel
mellow frigate
#

How do you stop properly a server ? I've always closed their window with the top right cross till now but I need to test the save function.

merry storm
#

Any idea about how to spawn a zombie horde from a trigger?
Im trying this but for some reason zombies spawn on the ground, lying around and then the message remove stale zombie 5000 appears and the are gone. If you reset the server they are there.
I have this file on the client folder and i call it from the server side

ServerCommands.SpawnZombies = function(args)
    print("RECEIVE SPAWN HORDE")
    local coordinates = args.coordinates
    local amount = args.amount
    local radius = args.radiusw

    SendCommandToServer(string.format("/createhorde2 -x %d -y %d -z %d -count %d -radius %d -crawler %s -isFallOnFront %s -isFakeDead %s -knockedDown %s -health %s ", 
        coordinates.x, coordinates.y, coordinates.z, amount, radius, tostring(false), tostring(false), tostring(false), tostring(false), tostring(100)))
            
end
cunning kestrel
cunning kestrel
merry storm
cunning kestrel
cunning kestrel
merry storm
#

wdym with the "/"?

sour island
#

Wait ... Even with symlink wouldn't that cause issues as there's a priority for the mods folders(?)

#

Iirc steam contents > workshop > mods

cunning kestrel
merry storm
#

you mean add the / instead of the - like /crawler %s /isFallOnFront...?

cunning kestrel
#

but maybe that's only for self published mods ?

cunning kestrel
mellow frigate
#

is OnSave event called on a dedicated server ?

#

is the following error normal when I quit a dedicated server ?

cunning kestrel
#

thats fine.

merry storm
red tiger
#

isn't there a saveall command?

cunning kestrel
merry storm
#

not exactly

cunning kestrel
merry storm
# merry storm

so they are not knocked or fallonFront or anything, it looks like the server cant process them and removes them. if i restart the server, they are all ther

sour island
cunning kestrel
sour island
#

If you updated often you wouldn't really notice

#

Or if you reload Lua mid game maybe(?)

#

I've stopped subbing to my mods cause it's a pain to unsub

cunning kestrel
sour island
#

There's a pin explaining how to setup an extra cache folder

#

I use that for deving

cunning kestrel
#

@sour island no, thats the crazy thing, ive done nothing special. I can just start editing, load up a game and see the change ... while subbed somehow

merry storm
drifting ore
#

Does anyone know what happened to the mod Equipment UI - Tarkov Style Interface ?Because the developer said that the update would be released in April and nothing has been released yet, nor have I seen any announcement.

ancient grail
#

Thats notloc

#

The moder for that ui

drifting ore
#

ok

cunning kestrel
drifting ore
#

I am most interested in the grid inventory system. but i talk in #mod_support

red tiger
#

Hmm.. I suddenly have two spare towers on my hands.. Going to probably wipe them on my lunch break.

#

"Recycled" from work.

ocean sphinx
unreal oriole
#

Has anyone so far found a way to use custom fbx for player/zombie model? I seem to be able to define block from model parameters just like for regular world item, and then pass the name of it into

player:getVisual():setForceModelScript("moduleName.modelName")

and it shows up in getModelScript, as well as has correct values in it.. but character model remains the same even after getPlayer():resetModel() ... and player:getVisual():getModel() itself doesn't seem to want to cooperate on anything for some reason

ancient grail
#

I use x file

#

Dang this tempts me to post all my zeds

timber river
unreal oriole
unreal oriole
#

that does look interesting, how did you achieve it?

ancient grail
unreal oriole
#

ah so it's not a character model replacement but rather a non-item costume model.. I see..

ancient grail
#

Yes

unreal oriole
#

It does sound great but sadly not for the purpose I am looking at.. the models I want to use won't be that great as costume

ancient grail
merry storm
merry storm
timber river
#

How odd

ancient grail
#

You just have to mask everything

#

You can be anything u want aslong as the number of joints doesnt change

unreal oriole
ancient grail
#

Thats the limitation

ocean sphinx
frank elbow
ancient grail
#

Ugh not really i guess
But you could look for the clothing mod and the clothing mask guides on the threads

#

Mod resources

#

Yeah its the same
Thing peach does but his using fbx and its clothing mod
He wears the model
I attach it

#

Different method same result

#

He enanles player to collect the skin

unreal oriole
#

wish there was a 3rd option of just replacing the mesh

ancient grail
#

That will replace everything

#

Everyone will look like that

#

Whatever it is youre modeling

#

Whats your model anyways

#

Also #modeling
Is a better venue for your needs

unreal oriole
#

I mean not everything, but like specific zombie that I spawn with a specific fbx model

ancient grail
#

Btw im only using vanilla files
Peach does his own model

#

Thats what i did on my last mod

#

Vampiric

#

Turns the zed into that at night time

#

And turns em back to normal when its morning

unreal oriole
#

nice banner in code

ancient grail
#

Huh?

#

Wdym

unreal oriole
#

the commented ascii art on top before links.. in VampHandler

ancient grail
#

Ahhhh

#

You referring to my signature

unreal oriole
#

so you are basically using media\models_X\Skinned\MaleBody.X as clothing, masking everything else

ancient grail
#

Thank you no one ever noticed that

#

Yes!

#

Like i said of youre a modeller then the limit is the rig
You cant change anything

#

But other than that youre good to go

unreal oriole
#

what's m_GUID there in those xmls?

#

not sure I've seen this id referred anywhere before

ancient grail
#

You have to provide unique guid for all clothing
It should match the clothing item and the compiled guid.xml

#

Fieldguid i think the name was

unreal oriole
#

do I generate it somehow or just random as long as it's unique?

neon bronze
#

i think there is a guid generator online

unreal oriole
#

ah ok

merry storm
neon bronze
#

i used that one

unreal oriole
#

ThumbsUp thanks

#

to all of ya

unkempt dragon
#

anyone knows an guide to make mods?

merry storm
#

anyone knows what each number means?
public static void spawnHorde(float x,
float y,
float x2,
float y2,
float z,
int count)

unreal oriole
#

probably a region from (x,y) to (x2,y2) on z elevation, and count is number of zombies to spawn

nimble spoke
bronze yoke
#

you can google a guid generator

sleek saffron
#

Quick question guys, how would you mark a food item so that its distribution is controlled via the Canned Food rarity setting from Sandbox Options?

For example in this scenario, I have rarity settings **Non-canned = None **and Canned = Rare.
I also marked **TomatoPaste **with CannedFood = TRUE.

But LootZed still says 0% chance.

bronze yoke
#

it should just be cannedfood = true

#

no idea why that isn't working for you, that's what it's supposed to do

sleek saffron
#

Hmm I see. I'll go through the item script again, probably I missed something there. Thanks for confirming how it is supposed to work.

nimble spoke
#

How are you adding that value?

red tiger
#

Surprised that you aren't posting the full file.

red tiger
#

I think that I'm ready to revise my linter for ZedScript now...

drifting ore
#

Are there any modders willing to do commissions?

red tiger
drifting ore
#

Sweet.

#

Anywhere I should look specifically for it? Prefer discord since negotiations can occur way quicker.

red tiger
#

Here or some market, possibly.

#

I have my market but it's been inactive for months.

#

(Too busy writing tools to focus on it)

#

Feel free to post the commission here too. Other modders may want to bid on it.

ancient grail
#

Ah you take it

thin hornet
#

hey @ancient grail did you try pzpw yet?

pulsar heath
#

yellow!

tawdry moss
#

so im trying to make a thing that will use code from inconspicuous trait to function but i cannot find the lua file related to the trait functionality. i found the code that adds traits but it didnt have anything about the functionality

bronze yoke
#

it's not implemented in lua

#

it'd be java

tawdry moss
#

any idea where id find the files

bronze yoke
#

maybe isozombie.class? i would expect attraction logic to be handled there

tawdry moss
#

honestly quite incredible

bronze yoke
#

you'd need to decompile it

tawdry moss
#

im too tired for this rn

bronze yoke
#

i'll warn you that there's basically no way you're going to be able to hook into this stuff with a normal lua mod

mellow frigate
lone nest
#

you can think of LUA as the frontend and Java is the backend.

#

you'll need a java decompiler... it's been over 10 years since i touched that stuff... but "Eclipse IDE" should still be around.

#

lua you can mess around with any text editor, it's also absolutely horrifying to work with beyond 10-20 lines of coding

#

mostly because the syntax doesn't have curly brace brackets (then and end) and needing weird workarounds for most built-in things I have taken for granted in the last 8 years.

ancient grail
#

where is the zed tripping codes located is it java?

ancient grail
tardy wren
ancient grail
#

oh yeah thnx for the reference

#

wait this is monkeys

#

lol

tardy wren
#

which one

ancient grail
#

first one

#

our monkey

#

his afk atm

#

but i guess he added the tripping on the mod he did. cuz otherwise he would know cuzs the no trip thing is his current project

#

im experimenting on something

#

wonder how dislaik did it with the dog

thin hornet
#

Been updating pzpw, we are working on improving it alot

#

the intellisense on this is crazy, cover both java and lua, and allow usage of clean classes structure. I will be starting a video serie soon to show how to use it in live session

nimble spoke
sour island
#

Does it handle inherited methods? PzDoc does not

bronze yoke
#

the old one fails on some files too, is that resolved?

sour island
#

PzDoc? Oh yeah

#

I wonder what that was about

sour island
#

Is there anything that could auto encode files for translations based on the directory they're in?

#

Anytime I touch translations files I seem* to break encodings

#

I like to take people's translated reupload of my mods 🙂

kind fossil
#

Hello there, I am trying to understand if it's possible to use an external software for PZ Voip, like they are doing in Red Dead or GTA.
I know SaltyChat works well, but how is it possible to add to Project Zomboid.

Right now I think that I need to get

  • the coordinates of players (can be accessed)
  • the frequencies and microphone state of talkies (should be accessible too?)

Have anyone tried something similar previously?

sour island
#

New idea: people uploading to the workshop whos "mods" have over 5+ modIDs should at the very least see a pop-up informing them unlisted mods can still be accessed by players.

fiery dirge
#

Hey guys, I'm a random who can't read/write lua to save his own life, but I have a semi-functional mod that can switch voices for different voice reactions via lua (instead of the replace stuff in script method which has some drawbacks).
Right now, it's really primitive, and it'll produce a voice reaction when: a zombie dies (I don't know how to restrict this to specific weapon types); when stomping; when shoving; when attacking with buttstock.
Originally, this was for calling 'hits' when using a firearm, since the script method emits sound from the zombie when they're hit. I have no idea how to proceed from here.

#

Also, don't know how to make it call hits. RIP

#

Or should I just wait for Build 42 since there's gonna be voice updates then.

autumn garnet
bronze yoke
kind fossil
#

I believe it can be done yea

#

I need to check how tools like saltychat access the data from the game

#

is there a cache file that is written from the game and then read by TS3

bronze yoke
#

i think the most common way is, using a lua mod, just write the data to a file and have an external program handle everything else

kind fossil
#

somthing like that

kind fossil
#

The question is how the data writing rate is handled?

#

You would need to have the coordinates of every players updated every server ticks

sour island
#

Apologies to whoever runs the workshop page for PZ. Im in a several hours zoom long meeting, and I reported quite a few mod packs using skill recovery journal.

#

Anyone know of a way to file DCMAs with out doxxing yourself? Filing for a representative/LLC seems excessive...

bronze yoke
#

generally just threatening to dmca is enough

sour island
#

Some of them are months old with DCMA warnings in the comments by modders who are inactive I assume

#

The uploads themselves are p inactive

#

Just seems like a good garbage sweep is needed, and afaik DCMAs take down the content unless it's counterclaimed

bronze yoke
#

scary if true

#

but being forced to dox yourself to dmca is also scary, so i guess it balances out 😅

sour island
#

I think if they don't care they can put fake info

#

DCMAs are all about plausible deniability for Steam

#

"we did the thing 🤷‍♂️ " -Steam

bronze yoke
#

yeah pretty much

#

i mean any kind of manual review process would probably be kind of impractical on steam's scale, but i'm kind of surprised we don't see more harrassment through that method

sour island
#

It isn't spoken about, but I know of a recent case where the person didn't want to counter claim for privacy reasons

turbid gale
#

Harassing through DMCA is a hella big legal problem

#

I remember that happened in a big stink in Arma 3 modding scene where someone got salty and DMCA'd RHS

#

and the guys at RHS were nice enough to not press charges so....

sour island
#

It is more serious than people think but at the same time it's also easily avoidable

#

As far as I know - outside of moderator intervention - the only way to get your mod relisted from a bogus claim is to counter-claim

#

Not sure if you get the claimants information before counter claiming

#

Just seems like a big stink to deal with

#

Hence I just reported the listings for now

#

And that's just cause of bug reports from people using modpacks while also subbed to the original mod

turbid gale
#

time to figure out what attachmentNameSelf means as a parameter for weapon attachments. 🤔

sour island
#

Probably what's used to identify the part type?

#

I feintly recall the term when trying to make spears use attachments instead of tipped spears acting as whole other items

#

But alas, the hammer spear was not meant to be

turbid gale
#

maybe. All the other parameters make sense

#

one thing I've noticed is when placing guns on the the ground with attachments they sometimes don't line up. Is this a me or a zomboid thing?

neon bronze
#

Might be a zomboid thing

bronze yoke
#

attachments have always been a little iffy

turbid gale
#

zomboid moment 😔

neon bronze
#

I don’t know how zomboid uses models but there are WorldStaticModels and StaticModels

#

So maybe one uses the other

turbid gale
#

guns don't use a world model, they use their only model

#

and I know attachments don't suddenly use their world model because one the attachments, because I haven't done it yet, has a totally wrong world model

bronze yoke
#

yeah, weapons use WeaponSprite no matter what

#

(which is a model stressed )

visual island
#

hello everyone! is there any way to read, create and write files with Kahlua scripts? since Kahlua does not support io library

bronze yoke
#

use getFileWriter()

#

e.g.```lua
local writer = getFileWriter("test.txt", true, false)
writer:write("test")

sour island
#

The biggest culprit is there isn't an universal way to adjust models when they're rendered

bronze yoke
#

there's a getFileReader too

sour island
#

Even on-ground and in-hand are two separate files when they need not be

#

I think on world has an attachment that can be modified

#

But if the model is designed for floor, there's no easy way to make it line up in hand

#

Would be a good deal of work I imagine to reposition all the floor models for being held

#

Unless there's a way to reposition the models for in-hand via scripts that I'm not aware of

bronze yoke
#

the vanilla weapons don't even have WorldStaticModels set so i assume there is some workaround for that

turbid gale
#

aaaaaaaaaaaaaa

#

it's like the attachment goes from being Z up to Y up. But the choke doesn't do that

#

I think the vanilla choke has inverted normals too now that I look at it...

bronze yoke
#

oh yeah it does

#

that's a known issue iirc

turbid gale
#

eh then I just won't worry about it

visual island
bronze yoke
#

use :close() when you're done with it

#

i *think* they always write a valid file regardless of what you do

#

oh, sorry, i think i misinterpreted your question

#

ready() on the reader will tell you if it can continue reading, so usually you just loop reading until that returns false

#

getFileInput isn't usually used so i don't really know how to use it specifically

cloud plaza
#

im trying to make a trait that will spawn players in with weapons from the Vanilla Firearms Expansion mod. Is there any example of how you would go about referencing an item from a mod? Like the item reference can't be "Base.MP5" right?

tardy wren
bronze yoke
#

e.g. in vanilla you'd see module Base {

#

you'd reference it as (for example, i did not check if this is actually their module name) "VFE.MP5"

cloud plaza
#

thanks. also how do you force a mod dependency? like my mod won't be useable without VFE

bronze yoke
#

if you have multiple required mods separate them with commas but no spaces

turbid gale
#

VFE's weapons are all in base, so yeah "Base.MP5" will get you it

visual island
bronze yoke
#

java int and lua number are interchangeable

#

most 'basic' types like that are

turbid gale
#

So, when mounted on the weapon it takes its rotation in the scene when it was exported. On the weapon on the ground it uses the mesh's local space

#

so by applying rotation it started making sense.

sour island
tepid shoal
#

sup fellas
im gonna cut it short
I want to find out how to correctly take a player model from the game, unfortunately the .X files seem outdated or I'm exporting them wrong
what way have you guys taken the player models in a way that actually works?

#

by exporting wrong, I mean the mesh will turn out like this

#

probably the most noobish question if you're used to working with pm's

visual island
turbid gale
#

Are you exporting through new or old blender?

tepid shoal
#

the file viewer itself is, let me see

#

DxViewer

turbid gale
#

New blender doesn’t really support .x well in any the plugins. Old blender has a native .x exporter, and it needs to export Z up. So expert from new blender as FBX, import into old blender then export as .x

#

It’s a bit headass but it works perfectly for me. At least with weapon models.

#

I dunno what you’re doing as your screenshot won’t load.

tepid shoal
#

I'm assuming the dress-like effect is normal in DxViewer then?

#

Ah, it's a screenshot of a file viewer used for .X files

#

the mesh itself has a dress-like thing for the male mode, instead of it just being two legs.

turbid gale
#

Oh is it clothing?

tepid shoal
#

That's what I was mainly curious about

#

Seems like it

#

but clothing shouldnt be applied as it should be the base model

#

as in only the base model, yet, like I said has this clothing effect like it's wearing a dress. So I don't know if it's a weird bug or whatever

turbid gale
#

Did you export only selected?

#

It might be a turned off visually but still getting exported model.

tepid shoal
# turbid gale Did you export only selected?

Ohhh you think I exported it, okay I'll explain this more clearly.

So I'm looking into the Project Zomboid dir, I needed to grab the male model. So I found it and viewed it with a model viewer on my pc.
However, though, the male model in the directory has a dress-like mesh problem to it and I can't figure it out why - which I want to solve before I import (just to make sure it's the right thing)

#

I guess my struggle is trying to find out why this model straight from the directory has a weird clothing bug

#

I technically could import it and delete the problematic mesh parts but it'd still be nice to know why this happens

bronze yoke
red tiger
#

Why is #modeling discussion going on in here a lot lately?

bronze yoke
#

but i don't recommend using that one, it'll lead to checksum issues

tepid shoal
red tiger
#

I mean in the last couple weeks.

#

I flip around in Discord and read here every so often. Seen it a lot. Noticeable.

tepid shoal
#

I'll be out of everyones hair soon lol

red tiger
#

It makes sense if we're looking at Lua code with models not working sure.

visual island
tepid shoal
#

In-order to work with modding playermodels you need to understand modelling them as well, makes sense to me in a way at least someone here would know something

red tiger
#

I'm stating an observation, not convicting or attempting to moderate the chat.

tepid shoal
#

I was just stating my perspective when I joined

bronze yoke
#

i don't think you'll be able to read from there

visual island
tepid shoal
#

java and lua?

red tiger
#

You'll need to core-mod PZ to support additional API.

#

Take a look at zombie.Lua.LuaManager.class

visual island
#

alright. i'm gonna give up.poblems solved.

#

i also considerd using windows system dll, but it seems too difficult and i wonder whether kahlua support it

red tiger
#

From how you're wording this, it sounds like you don't understand or know the environment. You can support DLLs in Java using JNI.

#

Kahlua is a reverse-engineered pseudo Lua 5.1 runtime library at the end of the day. All it cares about is interfacing with Java and Lua closures.

visual island
#

ok. thank you anyway

tardy wren
#

But his model just refuses to display in game

tepid shoal
#

have you tried downloading mods off the workshop and comparing their structure vs yours? probably already did this but still that'll help

#

crowbar is good for decompiling mods

sour island
drifting ore
#

Is there a way to disable the base game clothing choices for spawns? i am developing a spawn mod and none of the choices are what I have in mind for the new professions

bronze yoke
#

fbx and x should be perfectly interchangeable

wet sandal
#

Is there an easy way to save mod data beyond a save?

#

Want to save some settings for a dev tool I made that should persist across all saves.

bronze yoke
#

no

#

there are ways but not easy ones 😅

wet sandal
#

File writing / parsing it is

sour island
#

Dev tool? @wet sandal

red tiger
#

Makes life easier when you can read/write Lua tables as a string.

sour island
#

Reminds me I need to rewrite easyConfig

red tiger
#

Woops. Meant to tag @wet sandal

#

This could make your IO stuff easier. There's TypeScript code but it shows you the same calls you can do in Lua.

#

Let me know if you'd like me to write these IO functions in Lua.

tardy wren
# bronze yoke no

hello, I think I asked you about Metatables before... Did I write this code correctly?

local metatable = __classmetatables[SandboxOptions.class].__index
local old_SendToServer = metatable.sendToServer
function metatable.sendToServer(self, item)
    old_SendToServer(self, item)
    if isServer() then
        Daikon.SandboxOptionsSyncing.UpdateGlobalModData()
        Daikon.SandboxOptionsSyncing.ForceClientsToUpdate()
    end
    if isClient() then
        Daikon.Commands["RefreshModData"]({})
    end

end
bronze yoke
#

that looks correct to me

tardy wren
#

okay then... Hmm

#

I got a report that it broke changing the sandbox settings via the admin panel

bronze yoke
#

does it work for you?

wet sandal
wet sandal
tardy wren
bronze yoke
#

SandboxOptions.sendToServer doesn't seem to take an item parameter?

#

that's probably the issue

tardy wren
#

Oh, so I just pass the self parameter, then?

bronze yoke
#

yeah

tardy wren
#

alright... Still, I hope this doesn't create a race condition...

#

I may want to delay the update of my data by a few seconds

#

But I don't even know how to approach that

turbid gale
#

it was drawing on the correct side and rotation of the shotgun... upsidedown

#

so in annoyance I scaled the whole thing by -1 on Z axis, applied the transformation, then mirrored the Z axis again and now it's totally correct. Brain hurty

tardy wren
#

progress?

#

getting a different error than before is still progress

turbid gale
#

it's finally... correct

#

and because I'm... built incorrectly I made it so having the shellholders causes the shotgun to be placed shellholder up instead of chamber up

#

and the fiberglass stock still changes the model

tardy wren
turbid gale
#

and yes it's for VFE

#

as in, I'm actually helping update VFE because I want to

tardy wren
#

great to hear

#

how did you make gun appear

turbid gale
#

appear as in?

tardy wren
#

well, all of my and my friend's attempts ended up in the zomboid man doing his mime impression killing zombies

turbid gale
#

interesting

#

how were they exported?

tardy wren
#

from blender to fbx, all I know

#

@nocturne canyon

#

we got someone who knows here

sour island
#

Has a favorite system and reload all UI

faint jewel
turbid gale
#

the original point was fixing a problem

#

was just showing off that the solution was found

#

as attachments being rendered on guns on characters and on the ground the same has been arcane and troubling me for a while

faint jewel
#

you did correct the export settings right?

turbid gale
#

I mean it's fixed now, it was related to local and global transformations

#

was fine on character, not on ground. I figured out the oddity as to why

faint jewel
#

yeah the bottom part there

#

and make sure your ctrl-A-> all transforms before export

#

weapons are a pain like that.

ancient plume
#

i need Distributions.lua

#

vanilla pls

#

i have it but i have a loot of mod and it's 11k long

#

so if you can give me one with no mods instaled

nimble spoke
#

The things you do for money.....

faint jewel
#

kill it with fire?

nimble spoke
#

Fire is not very effective

#

</joke>

opaque ore
#

hello, anyone got a moment to look at some simple lua?

sour island
opaque ore
#

this is probably trivial to you guys, but I'm trying to appropriate the fall damage module from the old Sandbox+ mod (for my own personal use only)

#

I've manage to excise it from the rest of the mod, but i'm getting an error on the line that changes zed speed (to slow shamblers)

spice saddle
red tiger
#

I'd love to be Kermit and the others being zombies and I'm playing the mall challenge.

opaque ore
#

you know I expected to be insulted before being outright ignored

#

thanks for nothing, jerkwads

red tiger
# opaque ore thanks for nothing, jerkwads

Hey asshat, if you want us to be kind to you, you just lost that opportunity. You won't be instantly helped. No one is paid here. You could be patient and if need be repost your question.

#

Otherwise good luck.

lone nest
#

the expectations of instant gratification

turbid gale
lone nest
vast palm
#

I'm not sure "chilling" is the thing to do exactly

#

the more people who expect results instantly and act like jerks if they don't get it AND get away with acting like jerks, the more of them out there we'll have. We need to teach people that is not appropriate behavior

#

while I don't condone the WAY it was called out, it still needs to be addressed.

red tiger
#

Expect some dad energy though if that happens.

bronze yoke
#

if somebody doesn't respond to your question, they probably just don't know the answer

vast palm
#

or you know.. have things in their lives taking up their time

#

this isn't most people's job. this isn't their first priority.

bronze yoke
#

and if they don't respond to a vague plea for help, they probably just don't have time to dedicate to helping with something they might not know anything about

vast palm
#

I'm still waiting on a response from Blair Angol from over a week ago, but I didn't flip out like you did

ancient grail
#

If you go and tell them directly they wont listen anyways im trying to negate the intesity be able to provide the needed assistance and then tell em its better to wait since people will come and answer eventually
I dont want be hostile to a person whos already hostile
And i think theres a reason why they act this way
Just wanted to help people even if they are acting inappropriately

Otherwise no one would maybe
And if thats the case then theres no reason for them to change

Well this is my opinion

#

Im not tolerating anything . Im just ignoring the thing ..

And Yeah my advice is if you ask for help you should provide more detail
For people to understand the situation cuz what you said doesnt mean anything if we cant see whats under the hood @opaque ore

vast palm
#

I mean he popped onto the server, asked 2 quick statements in the middle of an already existing conversation, and when he didn't immediately get addressed, took it as an attack. that's really aggressive behavior

#

while it'd be nice to help him, it's hard to want to help him when he treats people like that. Especially without apologizing after being called out

wet dune
#

would the best way to create custom zombie models be hazmat suits?

red tiger
#

This chat has some real Redditor parenting energy right now.

vast palm
#

I still need to figure out how zomboid outfit creation even works

ancient grail
#

Theres an xml file where you can decrlare the outfits

#

Clothing.xml
Iirc

vast palm
#

you know, assuming I ever start modding again -.-