#mod_development

1 messages ยท Page 516 of 1

frank elbow
#

I'm trying to create a sound dynamically

#

So that wouldn't really help

calm depot
#

what do you mean by "dynamically"

#

you're trying to generate the bytes of a wav file at runtime?

frank elbow
#

Programmatically

#

Yes

calm depot
#

heh, you'd need filesystem access is my bet

frank elbow
#

Yeah, I figured. Asked about temporary files for that reason but, again, I doubt we can do that

calm depot
#

I'm not so sure

#

I see there's a getFileWriter

frank elbow
#

Oh yeah, I remember someone asking about writing files not long ago ๐Ÿคฆ๐Ÿพโ€โ™‚๏ธ maybe that is viable then

faint jewel
#

why would that recipe not work?

frank elbow
calm depot
#

a command line and grep are your best friend

#

@frank elbow the Java code uses a PrintWriter class, give it a try but I bet you're gonna have a bad time

#

specifically because PrintWriter works on text so I bet it's going to corrupt any binary data you pass in

frank elbow
#

I searched this channel & people seemed to have had luck with FileWriter, but I'm concerned that when I try to play a sound it will accept only a filename and not a path

#

Considering mod sound files are expected to be in the sound subfolder

#

Only one way to find out though

calm depot
#

sure, I'm sure it will, which is why you'll need to write it to your mod's media\sound path or whatever it is

#

that is, if using an arbitrary path doesn't work, anyway

frank elbow
#

I figured the game would've loaded those in beforehand, huh. If not, that would be the way to do it

calm depot
#

have you looked at SoundBanks.lua?

#

that seems to have logic for managing them

glossy sequoia
#

I would LOVE to have something similar to the mod "Fear The Sun" where zombies during the day are slow and easy, but during the night, that's when they become hard, sprinters and there's many many more of them

#

It would make it feel more like Dying Light

faint jewel
#

sigh

frank elbow
mint sphinx
#

is there a easy way to get a single item all its properties?

undone crag
#

Hello is there a way to get a list of the players on the server?

faint jewel
#

okay so recipe is working.... now i need to get it to actually SHOW my sprite

#

the recipe works and gives me the furniture item. the world sprite does not.

junior flame
#

is your .tiles file in the root of media?

faint jewel
drifting ore
#

Hello, I'm 1 step away from finishing my mod, but I got stuck in a detailer that involves multiplier. Can someone help me?

junior flame
#

double check that your worldobjectsprite name is correct in the .pack viewer in tilezed

i'm not seeing anything obvious that's jumping out at me as a problem

faint jewel
#

what do you mean?

#

the gid is 0 so it should be basemovable_0 but alas no love.

mint sphinx
#

go into tools -> .pack files -> pack viewer

#

and then see what the spirte name is called

junior flame
#

yeah, what tiba said, at least this way you can rule that out

faint jewel
#

omg. THAT'S WHERE IT SHOWS THE NAME?

#

thanks a ton. that is SUPER helpful lol.

#

(was something COMPLETELY different there.

junior flame
#

some things that should be easy are obscure, zomboid modding in a nutshell

mint sphinx
#

^^ also there is a way to rename them kind of but yea i spends tons of hours around that tileeditor my self and not lot of the error form that xD

junior flame
#

hehe

faint jewel
#

hmmm it placed it, but it wont rotate.

drifting ore
#

Please, I'm trying to make a mod I made for single player, also work in MP.

How do I inform the server, and all other players, that a change has been made to an object's parameters, for example door:setIsLocked(true)?

faint jewel
#

it has all 4 sides. y u no rotate?!

junior flame
# faint jewel hmmm it placed it, but it wont rotate.

this is a tiledefinitions problem - make sure your four sprites have the same customname and groupname, but change their facing to the correct direction, and then make their item(full name) to something like boxcrapNorth, boxcrapSouth, etc. for each of the four sprites

faint jewel
#

they all have the same group and custom name...

#

no no item full name okay....

weary matrix
drifting ore
#

ty

#

lemme try it

weary matrix
#

@drifting ore if not locked with a key you might want to try 4 instead of 3

ripe warren
#

Hey. Trying to make my first mod, I am looking at other peoples mods to understand how its done and the modding wiki

#

I have one question so far. Theres a list on the wiki for item variables

#

but I have not found a list for vehicle item variables

#

I am looking at this one mod that adds a Buss that you can upgrade. I am trying to figure out how these upgrade items work

#

for example there is a front armor piece and it has a variable "ataProtection" set for Engine door

#

is this is a variable made by the mod or is this something that comes with the game?

#

the 3 main things I want to do that I am not sure is possible so far:

Make armor plating for cars that will get damaged before the car parts its covering

Make a snow plow for a car that will lower the slowdown when hitting zombies and protect the front of the car

Front spikes and side spikes that will deal stab damage (damage would be relative to car speed, would need its own hitbox, at least for the side blades)

#

can I do these things out of the box or will I need lua scripting for any of this?

ripe warren
#

As I am studying this mod I noticed the way they do protection is that whenever a car bodypart gets damaged beyond 50% it gets repaired back to 100% and the "armor" gets its condition lowered

#

thats a very interesting way of doing it but I guess it saves a lot of trouble with hitboxes and stuff

#

now I just need to figure out how they did that

drifting ore
upper junco
#

Is there a way to remove certain crafting recipes from a mod? Don't want to reupload it just overwrite what's there a little if possible

drifting ore
upper junco
#

Right, but I guess I would like to make a mod to tweak the other mod. I have done it for distributions but when I try to do recipes the same way it doesn't seem to work for me

drifting ore
willow estuary
#

It's not the most elegant solution, but I've resigned myself to using an altered version of the original recipe .txt file for such patches.

#

You can patch mods using the require field in mod info, it's pretty simple.

#

Well, you could also modify the recipe script to make it impossible to know/perform ๐Ÿ˜„

upper junco
#

I think thats what i'm missing then so if i require the original then rename the the modified recipee file the same name as the oringinal then it should overwrite

willow estuary
upper junco
#

Nice, thanks again Blair and MrBounty

mint sphinx
#

is there an easy way to get an item and see all its properties / settings ?

#

i mean attributes?

drifting ore
#

There goes another 2 hours of pure frustration.
I think I completely missed the class on how client/server communication is done...
Other modders make it look so easy that little is found on the subject.
All I need is to communicate to other clients the changes being made to an object.
So that everyone is "synchronized" with the parameters of such

mint sphinx
#

i know what fiiling lina

long grove
#

look at the item code tiba?

mint sphinx
#

i do in few ways

mint sphinx
autumn torrent
#

Does anybody know how to update the sandbox settings while in-game in realtime? I know there's a mod, "Change Sandbox Settings", that lets you change the sandbox settings while in-game, but it doesn't update until the save is reloaded.

mint sphinx
#

@willow estuary do you know if you can give an item a custom attribute? like this

item foo{
foobar = "bar",
}
faint jewel
#

foo=bar item is foobar always ๐Ÿ˜›

mint sphinx
echo leaf
#

Just havent updated it yet.

#

Was waiting for Blacksmithing to be fully functional on MP (furnace doesnt update correctly quite yet) before I updated the patch to work with latest Smithing and BRITAs.

bitter frigate
#

can anybody point me toward a tutorial that would help with creating a new need/status? i've found lots of tutorials for new professions and traits, but nothing like what i'm looking for

faint jewel
#

hmmm getting there... just gotta make it so it can be powered and the be required to be near to craft.

mint sphinx
#

@quasi geode when you here plz pm me got a huge problem

faint jewel
#

okay so i can craft it and place it but i can't pick it up??

mint sphinx
#

add modData moveable = true

faint jewel
#

it goes through the whole pickup and then nothing.

#

where would that be?

mint sphinx
faint jewel
#

is that in tiles or the script?

mint sphinx
#

tile i think

#

you can find it in the properties

faint jewel
#

i dont see pickable= true :/

mint sphinx
#

blockplacement

faint jewel
#

yeah that's checked.

mint sphinx
#

hmm

#

can i see you properties?

faint jewel
#

this stuff?

mint sphinx
#

good question hmm

oak rover
#

i'm willing to hire a modder for a small project. i'm not sure if anyone here is interested, but DM if so

faint jewel
north junco
#

Question; What do you guys consider the easiest type of mod to make, and why?

mint sphinx
north junco
#

I'll look into it! I've wanted to contribute to the mod scene, but I've found it difficult to start, and I want to kind of dip my toes into it.

#

What about recipes? It'd be fun to make a Chicken Nugget recipe using flour, eggs and chicken.

faint jewel
#

recipes would be pretty easy provided the ingredients are already ingame. you would just need an item icon then.

north junco
#

There is already a Chicken Nugget item, so it'd just be adding the recipe itself.

#

Might be a good place to start ๐Ÿ˜›

mint ledge
#

look y'all idk where i go but im tryna make a true music addon but it literally requires itself

viscid elbow
cold burrow
#

How to name context menu string to get access to it in ContextMenu_EN so it will be possible to translate it later?

rich obsidian
#

Trying to get a food item that has a couple of uses per item
Do ya'll know if you have can a type Food with multiple uses. Seems like ol' Bob wants to eat the whole thing rather than the use UseDelta portion. So I'm guessing the UseDelta is not for when you snack on it, or is for a particular type of food.

lyric jungle
#

something is amiss

mild pond
#

Nope man its just how its supposed to be

vapid wind
#

Would it be possible to create a mod that audobans people for a set time from a multiplayer server for a set time?

mild pond
#

Yea its called hiring an actual person to do it for ya

#

Nah just kidding

#

I think it should be posible to mod the server layout so it counts user play time or inactivity, and a simple ip blocker

#

Mixed maybe it can do what you expect

drifting ore
vapid wind
#

would it be easer to use an ip blocker or to build a little program that will type the /whitelist command after a set time set but a human

mild pond
vapid wind
#

what do you mean by mod the server layout?

mild pond
#

Maybe i explained it wrong

#

Im sorry im not that good with english

cold burrow
vapid wind
#

no worries, going to try to ask everywhere and see if i can even pay someone to make the mod

mild pond
drifting ore
cold burrow
unborn radish
drifting ore
#

Hmmmmm, ok

drifting ore
cold burrow
faint jewel
#

argh i still can't pick this bastard up.

#

i can craft it and place it, b ut when i got to pick it back up,,, it does the pickup bar and then nothing happens

autumn torrent
faint jewel
#

nope

fair frost
#

Don't drive under influence in West Point kids

faint jewel
#

oh god that cop taxi.

fair frost
faint jewel
#

oh i know. it's a popular gimmick.

terse heron
#

Hey, I started making my first mod and I added a new item, and script to spawn the item on start, but the item doesn't get added, no errors in console

#

I checked my code and everything seemed ok

#

Do you know any reasons why items might not get loaded?

tardy plaza
#

In the game there is a function for searching shelves quickly using shift+scroll wheel with your mouse cursor over your inventory window with shelves to browse. Can I get that function without requiring the mouse over the inventory window? Basically: Shift+scrollwheel=scroll through nearby containers.

#

The number of times I've wished for this QOL feature is maddening.

undone crag
faint jewel
#

that should be good for a new microwave right?

lyric jungle
#

btw, are there any good tool belt mods??

#

I want room for my saw and wrench

faint jewel
#

dual fannypacks./

lyric jungle
#

I love the fannypacks, I usually put my cigs in it

#

but then the lighter has to be redragged in

#

I code for a living, I should make mods

drifting ore
#

If I were to modify/make a custom zombie NPC

#

where would I find some references for it?

opal wind
#

guys you know the mods that add bow? like when you shot you see the arrow, i wanted to make a laser pistol, any ideas of how i could do it?

#

i mean just the projectile thing the weapon is ready

faint jewel
#

copy the bow an arrow, change the art, make the arrow disappear when it hits.

#

tht's how i would do it at least.

opal wind
#

the bow and arrow of what mod?

faint jewel
opal wind
#

cool i will check it out thanks

drifting ore
#

dont

#

iirc the sprite of the arrow is literally like

#

50+ different sprites

#

of the arrow in different orientations

#

Its so inefficient lol

opal wind
#

what you recomend me ?

opal wind
icy aspen
#

Any idea why tilezed / worlded keep closing randomly with no warning?

hidden estuary
#

odd question: what vibe this giving off? -6 points? -8?

lyric jungle
#

anyone else like to horde jewelry?

faint jewel
#

all of it.

lyric jungle
#

like a dragon

#

oh shoot wrong chat sorry

#

so which coding languages does project zomboid work in?

quick hornet
viscid elbow
drifting ore
#

I think its actual Java and not JS

#

JS is easier to learn but imo its kinda buggy

opal wind
#

hey kaise you told me not to use that mod as reference, and i agree, but what is the alternative?

drifting ore
#

No clue

#

I have very surface level knowledge of how PZ Lua and Java works

hidden estuary
drifting ore
# hidden estuary

woman drives into horde, breaking the car, and possibly all the loot her team mates put into the car.

hidden estuary
#

anyone knows if I can override the player's gender on spawn? or a way to lock the gender option on the character creation

zenith smelt
#

How do I check if a fileExists in lua folder?

plucky oxide
#

Hi ! What does isClient() mean? It's a solo game ?

#

opposite of isServer() ?

split rune
#

Where is the world is the documentation for scripting in PZ with LUA

split rune
#

thx

tulip valve
split rune
#

also where would I look for vision related stuff?

mint sphinx
#

anyone know how to get the defaultModData from an item ?

west crane
#

Does anyone know where the player faction is stored in the IsoPlayer?

sudden maple
#

I had a idea today, just wanted to share. It would be so cool if there would be a mod that adds a big bunker or something like the nest from resident evil 2. But would that be even technically possible to make something so big underground in the game?

mint sphinx
drifting ore
#

someone floated the idea of a basement system

#

that used a special "hatch" tile that would teleport you to a room off the map

#

but idk if it got any further then an idea

mint sphinx
#

ohh so that how he did it ^^

#

but spirit if htey could make it so it could go - y then i might be able to to it esier but just lot of work.

#

anyone know how to make an fake inventory and then spawn items into for the only reason to be able to call inventoryitem()getmoddate() ? ^^

molten elk
#

how hard would it be to change the color of the aiming outline?

mint sphinx
#

do any one know how i can make a IMMAGINARY_PLAYER in zomboid ? i need to have a player obj for 2 like 2 sec in my code but he dont have to be a real person.

pseudo thunder
#

whats the difference between min/max range and weapon length on a melee weapon?

drifting ore
#

Could someone please help me with importing weapons into the game? i have the models, and they are textured (in blender) and I did properly scale them and everything. I have not converted them to an X file yet but I know i have to. What would my next step be? Thank you!

fathom hare
#

Hey

#

Would it be somehow possible to spawn static npcs ingame?

#

Just plain characters that does nothing, just staying

#

Kinda like superb survivors, but without interacting etc.

#

Are there somewhere models that u can actually spawn in?

crisp fable
drifting ore
drifting ore
#

also does anyone know how to go about making a profession/occupation mod?

hidden junco
#

Question here: I'm making a zombie disposal feature for when the player is near a campfire. "Kick nearby zombies into the fire". An alternative to putting each corpse in a trash bin and clicking "delete"

The idea is that the zombie IsoObject is removed from the world at this action.
For this I'm trying to getPlayerLoot() , fetching all inventoryPane.inventoryPage.backpacks and then trying to get the zombie IsoObject from the each backpack:getParent().

But it's not working ๐Ÿ˜ญ
Can anyone maybe point me in a better direction?

-- Update: I found similar code on the NecroForge mod. In case anyone's interested, it involves isoDeadBody:removeFromWorld() and isoDeadBody:removeFromSquare() .

bleak grotto
#

Hello

#

local function getInstanceOf(_type, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10)
local args = {_1, _2, _3, _4, _5, _6, _7, _8, _9, _10};
for _, v in ipairs(args) do
if instanceof(v, _type) or type(v) == _type then
return v;
end;
end;
end

hidden estuary
bleak grotto
#

what does it mean

hidden estuary
#

you can use that framework to easily add new professions

frank elbow
#

This may fit better as a bug report forum post, but I'm not certain because it's not really a game bug & more of an unexpected behavior. I'm trying to write arbitrary bytes to a file, and I accomplished this by using string.char with the integer values of those bytes. However, when I actually write them to a file (with the file writer returned by getModFileWriter), the file has extra null bytes. That is, certain strings of characters are copied as expected, but others have a trailing 0x00 byte

#

This is likely an encoding issue (both Lua and Java strings are not null terminated, so I don't think it would be anything related to that), but it has me perplexed considering it only happens to some substrings in the bytestring. I've already ruled out it being an issue with the bytestring generation by checking its length before writing

#

Anyway, what I'm really asking is: is anyone familiar with this issue? If so, is there a workaround? It seems like I'm probably just stuck until this is fixed or an extra method to write a byte array directly is added.

frank elbow
drifting stump
zenith smelt
#

how to get real world time?

wheat cloak
#

where are available skin/clothing colors stored?

undone crag
# opal wind hey kaise you told me not to use that mod as reference, and i agree, but what is...

That bow and arrow mod changes the model of the arrow item to a different model variant of the same model file for each angle. It uses the same model file for each, but it is used a lot of times. I do not know how efficient this is. I imagine you could do a test to see if loading a high-file size model into the RAM takes up ram proportional to the number of times the model file is references. I think Kaiser was probably just guessing when he said it was inefficient.
You could instead look at how the game renders the items when you are choosing where to place them on a table. You can specify the rotation of the model rendered. One way to get the render function called is to attach it to the UI, but then it moves with the screen slightly which may not be what you want if you want it anchored to the world instead of the UI. You may or may not find something anchored to the world of tiles that has its render called.

oak rover
#

i've been looking but i can't imagine there's a guide out there to navigate Profession Framework. i'm trying to add a couple basic professions to my server but this lua can be really daunting.

rain pumice
#

@drifting ore your github has a repeated link in your FAQ section btw

rain pumice
undone crag
undone crag
# fathom hare Would it be somehow possible to spawn static npcs ingame?

On a recent version of the game, yes. On a more recent version, yes but you and the npc go invisible. In the most recent version, not tested by me. You can look at the superb survivor code to see how it creates an NPC and gives it orders. Some advice, you should give it orders in its own update rather than the player's update.

undone crag
undone crag
willow estuary
# mint sphinx do any one know how i can make a IMMAGINARY_PLAYER in zomboid ? i need to have a...

This is how I spawn in npcs to test stuff, it does not work for MP or testing MP features, entering test_npc_spawn() into the debug console will spawn a npc test to the player in SP however.

function test_npc_spawn(square, outfit)
    if not square then square = getPlayer():getSquare() end
    local isFemale = false
    if ZombRand(2)==0 then isFemale = true end
    local desc = SurvivorFactory.CreateSurvivor(SurvivorType.Neutral, isFemale)    
        local outfits = getAllOutfits(isFemale)
        local nameOutfit = outfits:get(ZombRand(outfits:size()))
        desc:dressInNamedOutfit(nameOutfit)
    if outfit then desc:dressInNamedOutfit(outfit) end
    local npc = IsoPlayer.new(getWorld():getCell(), desc, square:getX()-1, square:getY()-1, square:getZ())
    npc:setSceneCulled(false)
    npc:setNPC(true)
    npc:setGodMod(false)
    npc:setInvisible(false)
    npc:faceThisObject(getPlayer())
    return npc
end
undone crag
hidden estuary
#

I could probably try that but its probably not worth the effort

#

I just wanted to make a Valkyrie profession, figured it would be funny if the profession required a female character

#

but that would be purely fluff, u know?

undone crag
#

(You might also want to hook something on to a random button if it randomises the gender too)

rain pumice
#
{
    sound HeadSmash
    {
        category = Zombie,
        clip
        {
            file = media/sound/smash2.ogg,
        }
    }```
#

will this work?

#

I'm trying to replace the headsmash sound but also keep the OG one

#

should I just add other lines with the pz_headsmash one

undone crag
#

@hidden estuary
Code like this (plus something for random, plus testing in case initial randomisation happens after this point) might work.

do
    local CharacterCreationHeader_create = CharacterCreationHeader.create
    function CharacterCreationHeader:create()
        CharacterCreationHeader.create(self);
        self.genderCombo:setVisible(false);
        MainScreen.instance.avatar:setFemale(true);
        MainScreen.instance.desc:setFemale(true);
    end
end
hidden estuary
#

oh damn

#

thank you, I'll try that

undone crag
#

Lua coding for me has a lot of debugging my failed code though so this may not work if some of it is being called at the wrong time :d

rain pumice
#

I'm new to this modding thing and I'm just trying to figure out where can I find the "module Base"

#

I just see all sound mods referring to it but I just wanna find out what else I can use it for

undone crag
#

do
    local CharacterCreationHeader_onOptionMouseDown = CharacterCreationHeader.onOptionMouseDown
    function CharacterCreationHeader:onOptionMouseDown(button, x, y)
        CharacterCreationHeader_onOptionMouseDown(self, button, x, y)
        if button.internal == "RANDOM" then
            MainScreen.instance.avatar:setFemale(true)
            MainScreen.instance.desc:setFemale(true)
        end
    end
end

Also this should or may work for the randomise button changing the gender.

hidden estuary
undone crag
#

Module base is the base game, not a mod.

rain pumice
#

I figured but then it just means that I'll be replacing base game stuff by calling the base module

undone crag
#

What do you mean by calling the base module?

#

Ohhhh

rain pumice
#

module Base

undone crag
#

Did you accidentally module base?

rain pumice
#

no no

#

I was just trying to add new headsmash sounds

#

but I ended up replacing the OG one

#

I don't hear it anymore lol

#

maybe I used a wrong file name

undone crag
#

What do you mean by call though? I know what module base is but not what you mean when you say you call it, also what is OG what do you mean eeeeeeee

rain pumice
#

original

#

lol

undone crag
#

Oh sounds. I have not looked into the new sound system. :s

rain pumice
#

yeah no no worries

mint sphinx
undone crag
#

What is defaultModData? o_o

mint sphinx
#

something the java code doing for one ^^

mint sphinx
undone crag
#

Is that always an empty table, like {} in lua?

mint sphinx
#

but it does get generated just trying to find a way to get that data

undone crag
#
foo = bar,
}```Is this in a text file in \scripts?
mint sphinx
#

yea

undone crag
#

Oh apparently there are these things I did not know of too. void copyConditionModData(InventoryItem other)
void CopyModData(KahluaTable DefaultModData)

mint sphinx
#

copy moddata to the inventory. hint why i ask fot imagenary inventory

undone crag
#

Is this for a schizophrenia mod? :O

mint sphinx
#

if the item is in the iventory

#

no

undone crag
#

:o

bitter frigate
#

i'm BRAND NEW to LUA so this is a really basic question BUT i want to create a new variable that causes the player to take damage when it falls outside of a predetermined range. i can figure out the damage part i THINK but the beginning is perplexing me. is it as simple as starting with

NewVariableFunctions = {}

and then going on to create a block WITH the functions?

mint sphinx
#

its for a framework im doing

undone crag
#

What do you mean by a variable that causes something?

bitter frigate
undone crag
#

Oh, when the variable falls outside of the range. I thought you meant when the player falls from too high up. :d

undone crag
#

Hmm well to avoid increasing the namespace you could do something like this

NewVariableFunctions = {}
local NewVariableFunctions = NewVariableFunctions
NewVariableFunctions.Your_Variable = 1337
NewVariableFunctions.OnPlayerUpdate = function (player)
--some lua code here
end
--Something adding your function to an event

(Farewell)

faint jewel
#

anyone know how to make a recipe require you to need to be near a movable?

#

NearItem:ABench_Smelter, that was easier than i thought lol.

willow estuary
#
function CanFindKeyCuttingMachine(recipe, playerObj)
    local KeyCuttingMachine = nil
    KeyCuttingMachine = FindAppliance(playerObj, "Duplication Machine")
    if KeyCuttingMachine then square = KeyCuttingMachine:getSquare() end
    if square and (getGameTime():getNightsSurvived() < getSandboxOptions():getElecShutModifier())  and not square:isOutside() then
        power = true
    end    
    if square and square:haveElectricity() then power = true    end
    if (not KeyCuttingMachine) then    power = false    end
    if power then return true end    
    return false    
end
function FindAppliance(player, Appliance)
    local station = nil
    local CustomName = nil
    local cell = player:getCell() 
    local x, y, z = player:getX(), player:getY(), player:getZ()
    local xx, yy, zz
    for xx =-1,1 do 
        for yy =-1,1 do
            local square = cell:getGridSquare(x+xx, y+yy, z)
            if square then
                local objects = square:getObjects()
                for index=0, objects:size()-1 do
                    local object = objects:get(index)  
                    if object:getProperties():Val("CustomName") then
                        CustomName = object:getProperties():Val("CustomName")
                        if CustomName:contains(Appliance) or Appliance:contains(CustomName) then
                            station = object
                            return station
                        end
                    end
                end                
            end
        end
    end
    return station
end
faint jewel
#

?

willow estuary
#

I use the above lua with this script, which uses OnCanPerform which was added as NearItem is broken, to "fake" how NearItem is supposed to work,

    recipe Duplicate House Key
    {
    Sound:Metalwork1,
    keep Key1/Key2/Key3/Key4/Key5,
    BlankHouseKey,
    Result:Key1,
    Time:500,
    OnCanPerform:CanFindKeyCuttingMachine,
    OnCreate:Duplicate_Key,
    Tooltip:Requires a Powered Key Duplication Machine.,
    Prop1:Source=1,
    Category:Welding,
    SkillRequired:MetalWelding=1,
    }
#

Sorry, it's disorganized as I was pulling files up and copying the relevant lua.

rain pumice
#

I'm starting to give up on actual modding because it seems you need to know java too

faint jewel
#

oh hell.

willow estuary
#

I don't know java? ๐Ÿคท

rain pumice
#

really?

#

I learned lua for 2 weeks but when I try to reverse engineer a mod I don't understand anything I'm looking at and I get frustrated lol

willow estuary
#

Technically, I don't even know lua? ๐Ÿ˜„

rain pumice
#

damn

faint jewel
#

i don't know how to luau?

willow estuary
#

I just play with the lego pieces until it works the way I want it to really? ๐Ÿ˜„

crisp fable
#

if you feel overwhelmed maybe start with smaller mods, i dont think you need java unless you're making some really big gamechanging mod - which you shouldn't so soon

bitter frigate
rain pumice
#

It is just so overwhelming at first lol

#

I'm doing simple stuff like just adding new sounds and stuff

crisp fable
#

thats normal. sucking at something is the first step to being sorta good at something

bitter frigate
winged lotus
#

Good evening fellow modders, I have a question for you: Is there a way easily add a simple checkbox option without relying on a dependency with "ModOptions"?
I know you can easily add keybindings in a few code lines like that:

table.insert(keyBinding, { value = "[MyMod]" } );
table.insert(keyBinding, { value = "Text for Option", key = 24 } );
Events.OnKeyPressed.Add(MyMod.handleKeyPressed);

I was wondering what is the equivalent of this table.insert to add boolean checkboxes?

rain pumice
#

just trying to see what does what

oak rover
#

same here, i download lots of mods and try to replicate the code and i still can't figure it out. the modding community is great but the support is bad.

rain pumice
#

Support is fine, people here are really helpful

#

it's just that there's not a lot of resources for like "beginners"

oak rover
#

correct, i should have clarified that. the tools are there, but not much explanation on using them.

crimson hull
#

i tried starting my server and it said, workshop version is different from hosts or something like that

sour island
#

What mod are you trying to reverse egineer?

crimson hull
#

id like to know which mod at least???

oak rover
#

it tells you in the error usually

#

upon login

crimson hull
#

it doesnt

sour island
#

Lua is pretty straight forward, unless the person writes everything on one line

oak rover
#

regardless, just verify your game files on steam library and/or restart the server to update whichever mod is outdated

sour island
#

if you're the host you need to also delete your ACF file

crimson hull
#

thats it

oak rover
#

try that same solution i mentioned above. i use a dedicated server, so that might be the difference here

sour island
crimson hull
#

host

sour island
#

Do you have any mods youve written yourself?

crimson hull
#

nah

sour island
#

Go to your workshop page for subscribed items

#

sort by last updated

crisp fable
#

https://theindiestone.com/forums/index.php?/topic/42925-how-to-fix-updated-mods-in-build-41-multiplayer/
this seems more about using mods than making them tho, you might have better luck in other channels

sour island
#

and resub to anything that's updated in the last week

#

if the issue isn't your end, then your server may need to get it's ACF deleted and rebooted

oak rover
#

on a dedi server, you still have to verify your game files to push the update that Steam never does appropriately even if you're the host/owner

crimson hull
#

ill try

oak rover
#

resubbing works but less effective IMO

#

sometimes it doesn't push

sour island
#

resubbing works for players/self-hosts

crimson hull
#

ill try it

sour island
#

I think dedis would need the ACF deleted

crimson hull
#

if i resub a mod

#

and i had something of that mod in the inventory

#

before

#

is it gone now?

sour island
#

only if you load the save inbetween

crimson hull
#

okay

#

ill try if it worked

sour island
#

you should not have the game running to update files anyway

#

same applies for a server

crimson hull
#

hm?

#

how to disable?

sour island
#

?

crimson hull
#

or what do u mean

oak rover
#

close the game before you resub mods

sour island
#

you shouldn't have the game running while resubbing either way

crimson hull
#

ah

oak rover
#

with regards to the lua discussion earlier, i'm trying to use the profession framework mod to create my own professions, however, the issue with people unfamiliar with lua, even with what is explained in the notepad, it's literally programming gibberish. i have no idea how to tailor it to myself specifically without a coherent guide. that's the biggest hurdle i have every time i want to modify a mod

crimson hull
#

it worked

#

thank you

bitter frigate
#

are there any mods (off the top of your head) that create custom moodles beside immersive medicine??

oak rover
#

there's one that spreads zombie infection to nearby players when someone is infected if that's similar

bitter frigate
oak rover
#

true. i have a tendency to just replicate/modify code from mods that already exist, but even then, i still can't seem to understand what i need to do specifically, unless explained plainly

sour island
#

Also a perk/trait/profession API

#

might be easier than the framework?

bitter frigate
sour island
#

It's what I linked above

bleak grotto
#

attemped index: new of non-table: null

sour island
bleak grotto
#

how do i solve this problem

sour island
#

You're trying to access something that isn't there

#

X.new() or X:new() - what ever X is, it's not there

bitter frigate
glad portal
#

does hydrocraft lags the game every 5 seconds due to 55 milions items it adds?

faint jewel
#

is it possible to feed a variable to a lua function via OnCanPerform ?

sour island
sour island
#

OnCreate is ran once when completed

#

fyi

faint jewel
#

yeah, i'm trying to make a generalized function but i need to know if i can feed a variable to it.

#

function CanFindWantedMachine(recipe, playerObj, WantedMachine)

#

i need to be able to feed it the WantedMachine

sour island
#

uh, depends on what the wanted machine is suppoosed to be?

faint jewel
#

i'm modifying Blair Algol's function to fix the NearItem to be a generalized one.

sour island
#

there's a specific set of parameters for oncanperform - you can't feed it your own without editing the java side of things afaik, but you can search for something in oncanperform

faint jewel
#

so the lua fuction has to be specific.

sour island
#

wasn't nearItem replaced by something?

sour island
#

I assume you want recipes to check for nearby objects for crafting?

faint jewel
#

yeah, basically a z corrected nearitem.

sour island
#

iirc scrap armor/weapons has benches - maybe check out how they do it

bitter frigate
sour island
#

so the project isn't released yet - so you'd have to actually just copy the moodle API's functions

bitter frigate
#

no no i get that! i just. can't find it.

faint jewel
sour island
#

Yeah, always a good idea to search for your idea first lol

faint jewel
#

i just wanted to make art. and then make it work :/

sour island
#

in game painting?

faint jewel
#

made a home sized smelter.

sour island
quasi geode
sour island
faint jewel
#

he does. industrial sized.

#

red is the smelter. blue is what i was doing next :/

sour island
sour island
faint jewel
drifting stump
#

well speaking of frameworks i just released one XD

drifting stump
#

everything is documented in the pinned post

sour island
#

Yeah but if you have a variation for smelters that might be easier / different I'm sure it'd be good

drifting stump
#

currently extends the base radial menu and the vehicle one will keep extending all the games radial menus

faint jewel
#

i'm looking through his... and it's actually VERY good.

drifting stump
#

emote radial probably next

rain pumice
#

I thought you couldn't

#

couldn't call a lua function that way

crisp fable
#

@drifting stump that seems really interesting! I was just the other day wondering why there isn't an removeSlice in ISRadialMenu, does this mean i could get that behavior by using your mod?

drifting stump
#

depends

#

i havent added removeSlice yet

#

thinking about how to make it as efficient as possible with the given vanilla limits

#

but depending on the behavior you likely can already

crisp fable
#

ah okay, i saw the "Deleting Slices More Effeciently" disclaimer and assumed there is an inefficient way already ๐Ÿ˜„

drifting stump
#

there is

#

the vanilla way is wiping the whole menu and filling it again with everything

crisp fable
#

ah, figures

drifting stump
#

if you wish to disable something permanently the api already allows that

#

just unregister it

#

you could also override the slice

faint jewel
#

man that sucks. why'd he have to make it SO well.

#

@hollow shadow quit being so damned good.

#

well in that case. anyone need any art for a project?

weary matrix
#

Hum so when I run this code:

local function addSheetRopeTop(square)
    print('Adding sheet rope!')
    local sprite = IsoSprite.new()
    sprite:getProperties():Set(IsoFlagType.climbSheetTopW)
    square:getProperties():Set(IsoFlagType.climbSheetTopW)
    object = IsoObject.new(getCell(), square, sprite)
    object:setName('SheetRope')
    square:transmitAddObjectToSquare(object, -1)
end``` I can see my object is correctly added and has the properties `climbSheetTopW` set, but it's not set for the square. What I can't figure out is if I run this in the Lua console then the square gets the properties set correctly:
```lua
local cs = getPlayer():getSquare(); local s = getSquare(cs:getX(), cs:getY(), cs:getZ() + 1); s:getProperties():Set(IsoFlagType.climbSheetTopW)``` Any clue what am I missing?
#

@sour island any clue?

mint sphinx
#

how is it agian i can make the getModData() ?

sweet drum
#

How can i add animations ? or change animations attacks ?

distant mirage
#

Anyone know where to put the mod.info file on multilayer servers?

sour island
weary matrix
#

we'll see for MP later ๐Ÿ˜‚

hollow shadow
#

did i miss something

faint jewel
#

lol no. was a sideways compliment.

#

i was working on a simple smelter/ammo bench (all using ingame materials) and you beat me to it and it's very well done.

mint sphinx
#

@sour island do you know any why how you would get the item attribute called defaultModData out? im so stuck with that thing right now ^^

hollow shadow
#

lol thanks

faint jewel
#

now i have to find a new project and have no ideas.

sour island
mint sphinx
# sour island ?

have have some custom attributes in my items.txt on my items and i try to find a way to get them out. from the item but keep failing

weary matrix
sour island
#

hmmm

#

you may have to call save()

weary matrix
#

and on the sprite too?

#

hum but IsoGridSquare.save() takes a byte buffer

#

and IsoSprite.save() takes a DataOutputStream

abstract raptor
#

my best mod poster yet

#

XD

mint sphinx
#

is it possible to get any moddata from an item or on an item in a backpack ?

sour island
mint sphinx
sour island
#

I mean, you'd have to iterate through their inventory

mint sphinx
#

right now the backpack only have one item in it. but i just know the class Item dont have the :getModData() call on it

weary matrix
sour island
#

I assumed you may be able to but I guess not

#

When you build furniture/floor is it updating the square sprite?

weary matrix
#

well I just add an empty sprite, so I don't see it but I can see it's there with chunk debugger

sour island
#

I only mention the furniture/floor to ask if there's something in the lua callin for save()

weary matrix
#

oh

mint sphinx
#

hmm so is it only on physical objects you can call getModData?

weary matrix
#

in fact it's when I try to climb that it removes the flag ๐Ÿค”

#

but if I add the flag from Lua console, then it stays ๐Ÿค”

crisp fable
#

what's the story behind "missing" texture files, for example i see in a lua file a reference to a texture "media/ui/vehicles/icon_trunk_light.png" but when i open that folder, common\ProjectZomboid\media\ui\vehicles" in explorer the file isnt there? searching the entire folder doesn't show any files with that name either

mint sphinx
sour island
#

I have

#

I do it for skill recovery journal?

mint sphinx
#

can i see you gethub for that?

sour island
#

If your modData isn't saving you should know you have to store simple variables

#

string, numbers, tables of strings/numbers, etc

mint sphinx
hazy urchin
#

๐Ÿ‘‹ New player and no experience modding. I have an idea for a hygiene mod that adds a new buff, consumables, and traits. I'm really excited to learn how to make this thing a reality. I'm not sure the best place to get started learning. Any tips would be appreciated!

gray kelp
#

Almost everyone here is asleep

hazy urchin
#

๐Ÿคฆโ€โ™€๏ธ lol I shoulda have checked that first. Ty!

gray kelp
#

K

faint jewel
#

anyone have a mod idea i could try?

#

sotherwise i'm gonna make movables out of ALL of the tiles i can find. and make a crazy crafting mod to craft all thier furniture.

quasi geode
# mint sphinx but i guess you never tried to getModData from item before ?

theres a big difference between the Item.class and InventoryItem.class that causes confusion sometimes
Item.class (the script item) doesnt have ModData specifically, only a "default mod data" which gets applied to InventoryItems as they're created
unfortunately theres no 'getDefaultModData' method for Item.class, but you can get it from the field value

-- find the specific named field in a java class object
local function findField(object, field)
    local count = getNumClassFields(object)
    local i = 0
    while i < count do
        local f = getClassField(object, i)
        if tostring(f) == field then return f end
        i = i+1
    end
end

-- fetch default mod data table for a script item
local function getDefaultModData(fullType)
    local scriptItem = getScriptManager():FindItem(fullType)
    if not scriptItem then return end
    local field = findField(scriptItem, "public se.krka.kahlua.vm.KahluaTable zombie.scripting.objects.Item.DefaultModData")
    if not field then return end
    return getClassFieldVal(scriptItem, field)
end

is what i was using previously to fetch it

agile lily
mint sphinx
abstract raptor
#

Mwahahah

quasi geode
bitter frigate
#

so i've written my first bit of code but i don't think i'm actually doing anything correctly.

NewVariableFunctions.firstRunTimer = false

NewVariableFunctions.CalculateSugarValue = function(specificPlayer)
    local sugarIncrease = 0.5 + SugarValue

    if (SugarValue >= 400) then
        setBodyDamage(specificPlayer:getBodyDamage() + (0.5))
    end

    if (SugarValue < 40)
        setBodyDamage(specificPlayer:getBodyDamage() + (0.8))
    end
end```

im TRYING to set up a new variable (sugar) that is added to by .5 every 10 minutes (which ignores the very first 10 minutes that pass after a load). i'm trying to have the variable cause damage when it's below 40 or 400 or higher. will this do that? does anyone have any tips about how would i ACTUALLY go about accomplishing that?
crisp fable
#

@bitter frigate i'd first break it down into smaller parts, see what i actually have to figure out before it works.

  1. see if the function for tracking and adding/substracing sugar works - probably want to add some debug button to trigger it whenever i want
  2. find out how timers work and how to get a method to get called every 10 minutes
  3. probably have to start this timer on some event that kicks off when game starts
  4. then last, go around doing damage to player
#
  1. probably need to keep track of this value between saves too
tired hedge
#

so i've seen some "anime" faces mods but they always seem to make eyes to big (example:)

#

so i made my version what do you guys think

cold burrow
bright acorn
bright acorn
bright acorn
sweet drum
#

fragMotion?

bright acorn
weary matrix
#

@cold burrow thanks I've been looking at it, but it's not doing the part I need for my stuff

#

my problem is really about understanding why the properties I set on the square get lost when I move away to another square

timid plume
#

Hello everyone

#

someone can tell me if moddata are only server side?

drifting ore
timid plume
#

theres someway to save global data for all players?

drifting stump
#

you can send to the server and the server to all clients

rain pumice
crisp fable
oak rover
#

does anyone know where there's a list of the functions/variables that are created by the game to refer to? for example, I'm trying to find "getClimateManager"

crisp fable
oak rover
#

oh yea, that's top tier

#

thanks

undone crag
#

When I tried transmitModData on the player's character, it said it failed, and the modData did not seem to have been transmitted. Maybe there was something forbidden in it like an isoplayer.

drifting ore
#

No wait I'm talking nonsense, that was my first idea but it never worked. I never put the items in the list by changing the function that retrieves all items from the inventory

#

But a mod creates problems with this new function so I'm going to change it I think

crisp fable
#

i tried it a bit and it works really well! if i had one small issue with it it's that the window feels too small for all these buttons, i'd personally prefer it as a separate popup i can resize, but that's just me. other than that it's great, its nice to have the inventory cleaned up finally

drifting ore
#

And I changed the function to hide the equipped objects, it works as I said in the first message now. Like 3 lines of code

cold burrow
#

What lua methods to add specific amount of items to current character? Like "Base.ExampleItem".

faint jewel
#

any lua boys want a REAL challenge?

willow estuary
faint jewel
faint jewel
#

it's just a mock up ๐Ÿ˜ฆ

#

I, too, would pay for something along those lines.

nimble spoke
#

I was thinking about something along those lines last week, more as a new character management window than actually an inventory window

olive zinc
#

any mods yall recommend for making the game a stealth night time is death kinda vibe. the zombies hate sun mod dosnt seem to work very often so i wanted to see if yall know any good ones to look out for

olive zinc
#

thank you

olive zinc
#

ooh thats nice

#

yeah i want to load these up and make a horror game to scare my buds

low crest
#

Hello guys! i am working on making a small concealable gun that can be worn on the wrist like a watch without occupying your hands. Technically its a mix between a clothing item and a weapon, does anyone know how would i implement bones with animations into an item that can be worn?

olive zinc
#

pitch black nights with night sprinters that can smell blood

#

sounds like alot of fun

calm depot
#

dunno if anyone else here's tried it, but I swapped out Hotspot for OpenJ9 and the game seems to be a lot snappier since then. Could just be imagining it, give it a try though if you find the game is a bit laggy, who knows

faint jewel
#

someone saids omething about a map editor so you can save part of the map, and the clear the rest.

lapis mantle
#

does anyone know if steam workshop mods are updated cleanly? for example if you rename a file and publish that update - will the previously-named version continue to exist on a subscriber's machine after they download the update?

willow estuary
quasi geode
#

why i generally leave blank files as placeholders for deleted ones (least for lua stuff)

willow estuary
lapis mantle
weary matrix
#

I guess it's even more of an issue on the server side

sour island
#

You can just delete the file after a while

#

even if users don't delete the old ones- if they're blank there's no real harm

abstract raptor
#

I wonder if there's something I could use for the playable guitars out there

sharp fern
#

is there a way to change cars horsepower numbers?

opal wind
#

hey guys is there any game clothing that makes noises as you walk? if not, anybody think its possible to create noises as you walk with a certain outfit?

long grove
#

how can I draw to the zombie population map?

night briar
#

Wanted to start doing animations in my downtime before work for Project Zomboid, how does one actually get that going?

long grove
#

you mean like 3d animations?

night briar
#

Yeah

long grove
#

learn how to use blender

#

you basically have to become a 3d artist

night briar
#

been animating in blender for over 13 years - I want to know how to get the Animations that are already made into blender

long grove
#

oh sorry

#

lol no idea

night briar
#

right now they are XML (X) Fiiles. i have no idea how to import the animations or what program can actually use it

long grove
#

I guess they are like animation files? A set of movement positions?

#

is it for the humanoid models?

night briar
#

yeah. Bi-pedal

#

Players and Zombies lmao

#

not exactly good at 4 leggo creatures lmao

long grove
#

maybe the model and the animations are separate not sure how tho

night briar
#

Havent even considered that. might have to hit up Spiffo to get in touch with the dev team lmao

long grove
#

can you ask him how to draw to the zombiepopulation map? Lol

night briar
#

i can. lets see if we can obtain the info we both need ๐Ÿ˜„

shut valley
# night briar Wanted to start doing animations in my downtime before work for Project Zomboid,...
night briar
#

Super Appreciate that!

drifting ore
#

And that .x is outdated af and idk why PZ uses them

night briar
#

yeah i thought about downgrading to 1.8 for the X File format

#

but i didnt know PZ uses FBX. Something i found out thanks to An ๐Ÿ˜„

faint jewel
#

HERESY!

sinful vessel
#

Is there a bloodlocation that gives protection to both groin and neck without hands and head?

opal wind
odd notch
#

i accidentally made an entire building system for my admins to spawn in trees and stuff

faint jewel
#

you know.... if someone added "connection points" to all the vehicles...

#

it would be easy to attach things like armor and plows and what not.

lusty sierra
#

is there a mod or way to spawn items in the middle of a multiplayer gameplay map in 41.65 IWBUMS? the server has crashed a couple of times and me and my friend have lost car keys and some items each time, we just want to replace them

#

we've tried necroforge 2.7b, Cheat Menu [Multi-Language], and using the -debug in options on steam feature

drifting stump
#

car keys should be quite simple in debug or admin

#

open the mechanics menu and right click anywhere -> get key

#

as for items there is an item list you can use in admin and debug

lusty sierra
#

the -debug in steam options thing made it so my friend couldn't start the server

#

how do you do the admin thing?

drifting stump
#

admin is not a launch option

lusty sierra
#

yea, mistyped

chrome agate
#

Hi everyone! I'm hunting some mod incompatibility for my new play and had an idea for a checker; would grepping for "function (Name)" and showing mods that override/use same functions work as a rudimentary way to find those conflicts quick and in bulk? I have like ~150 mods by now, so it's a mess to find which ones work together by trial and error... ๐Ÿ˜ฆ

drifting stump
#

in the server terminal type setaccesslevel "player name" admin

lusty sierra
#

what does server terminal mean?

drifting stump
#

how are they running the server

lusty sierra
#

i think i need an ELI5 LUL

drifting stump
#

through the ingame host or dedicated

lusty sierra
#

just through the host button on the main page

#

ingame yea

#

then he invites me through steam to join

drifting stump
#

from what i see he needs to type /setaccesslevel "Name" admin in chat

#

only ever used dedicated server so im not 100% sure

lusty sierra
#

doesn't seem to work for some reason

#

but he just realized one of the mods he downloaded works from the right click menu so there's that ><

#

thanks for the help browser nicenya

drifting stump
#

does the server have the default name?

lusty sierra
#

i don't think so, no

drifting stump
#

when he hosts is it called servertest

lusty sierra
#

i guess not, no

drifting stump
#

mhhh not sure if it will run but try running ProjectZomboidServer.bat in the game folder

#

it should launch that same save as a dedicated server

lusty sierra
#

nice, thank you

drifting stump
#

and in that terminal type setaccesslevel "player name" admin after its done loading

drifting ore
# faint jewel

Not cool, that was my next project. xD
Is it in game or is it just an image?
Otherwise don't you think that the menu at the top deserves a menu just for him? We don't need it every time.
Also the problem with this kind of interface is mods. For the mod I'm doing which add an equipment menu, I could have chosen a similar interface but the problem is that if a mod adds bodylocation (like srap armor which is very popular), it's screwed up everything

faint jewel
#
  1. image
  2. he could yes.
  3. i had designed it so you mouse over a part and it shows you things connected to it. (helmet and mask for the head for instance)
  4. do a base version first. then work past that to each mod. release multiples. go insane. eat a pigeon.
odd notch
#

aw well it turns out trees dont sync in MP

#

when you spawn them via a new isotree

faint jewel
#

written no, designed, yes.

crisp fable
#

i actually don't think making an UI like is that that hard, it's basically just a prettier version of PZ-clothingUI.
the inventory grid is also easy to do in a new window, but would probably hard integrating with the existing one. the bigger issue is preserving all the vanilla functionality like drag-select, shift-click-select, item transfers by dragging, etc

drifting ore
# faint jewel written no, designed, yes.

Ok how do you explain that. It's super annoying. There are lots of little things to constantly remember otherwise you have lots of little bugs (especially in this game). And your project is far from being the simplest. Honestly it seems like too complex to start.

drifting ore
faint jewel
crisp fable
#

i wouldn't put it in isinventory pane though, i'd create it as a separate component and then integrate the existing inventory pane in it. or just not use the existing inventory pane altogether, but that would be more work

#

but yeah, all the little things like drag and drop i don't know yet, and they are pretty important

faint jewel
#

that was more a culmination of ideas. some diablo some dayz some stuff hat i liked.

drifting ore
#

Or else redo a whole list class so that it is square, that would be the simplest. But it's still complex I think

crisp fable
#

i've manually built a dynamic list for the radio frequency manager, making it into squares wouldn't be that big of a change. but then the ultimate question is whether the grid system is superior anyway, i kinda like sortable lists

drifting ore
crisp fable
#

yeah, if possible i wouldn't use it at all, seems easier to create new components from scratch ๐Ÿ˜„

drifting ore
#

You really feel the inventory system has been there since the beginning of the game and they added patch after patch until it was unreadable. It's a real spaghetti dish

crisp fable
#

a cookie to the first person who sees what's new here

#

(unrelated to current discussion)

drifting ore
#

Just hidden items already equipped took me 5 tries and about 1 hour

faint jewel
#

the van has a grey door?

#

or the vehicle ui outside the vehicle?

drifting ore
#

You out the car with the UI ?

crisp fable
#

that's a zombie, intentionally added there to mislead you, so no ๐Ÿ˜„

#

but it's related to the dashboard, yeah

faint jewel
#

foglights?

drifting ore
#

The volume icon ?

crisp fable
#

dunno if you meant the same thing but yeah! the speaker icon for the radio

#

here ya go๐Ÿช ๐Ÿฅ 

drifting ore
faint jewel
#

huh?

drifting stump
#

@lusty sierra did it work?

crisp fable
#

changes color based on whether the radio is on or off and clicking it opens the panel so you dont have to use the radial ui

lusty sierra
drifting stump
#

np

drifting ore
#

My only suggestions is to put the bar in the middle, so that it is centered like the other. Because it stresses me out ๐Ÿ˜‚

crisp fable
#

yeah i know, i first added it between the fuel and speed indicators as a separate button, trying out different positions now. i can't move the existing elements at all however, otherwise i'd center it

#

maybe left of the engine would be better but it doesn't fit thematically there

paper tartan
#

Hey does some1 know if I can make a lua or a command for any mod that would remove a certain item ftom the game & world completely? Not just loottables but also existing stuff? Like arsenal/britas remove shotgun silencers etc?

crisp fable
#

maybe i add another icon on the right so it balances it out

odd notch
#

does anyone have the link to that guide on how to launch and connect to your listen server? as two clients

#

ahhh nvm i found it

crisp fable
#

is there any way to modify the z-level of elements besides just creating them in the correct order?

drifting ore
#

Someone would be available 10-20 min in the hours that follow to test my mod on a server? It would help me a lot

#

me

bitter frigate
drifting stump
#

@bitter frigate is this what you needed?

bitter frigate
drifting stump
#

should mention the print will output to the lua debug console

#

so make sure youre running the game in debug mode

bitter frigate
wary vapor
#

does anyone know what mod is this

#

if so please send me a link

#

oh wait nvm i found the mod

cold burrow
#

๐Ÿค” how to query all items with specific Type and SubCategory? Probably all guns.

lavish rampart
#

how do you tell if any of your mods loaded up because i enabled them and they didnt activate

#

oh do i have to manually put them all in the mods folder?

bitter frigate
#

is there any way to get your mods in game without submitting them to the workshop?

bitter frigate
#

i havent yet put my mod folder anywhere. don't wanna put it in the wrong place and break everything. otherwise everything is steam default

drifting stump
#

you can put it in User/Zomboid/mods

bitter frigate
drifting stump
#

how do you have the files setup

#

inside the mods folder you should have a folder for your mod

#

inside that a media folder, mod.info and poster.png

#

inside media a lua folder

#

and inside lua client, server and/or shared depending on where you want the code to run

#

for the code i sent it should be client

#

your .lua files go in there

bitter frigate
drifting stump
#

it should not be a .txt

bitter frigate
#

i had it as an .info but switched it when i was checking it against the mod template in the folders orz

bitter frigate
# drifting stump how do you have the files setup

i have my mod folder (Diabetes). inside of it is another folder (media) which has a .info and a poster.png, Inside of (media) are two more folders (lua) (scripts). (scripts) is empty. (lua) has a folder (client) inside of it, and inside (client) lives my code (a .txt file named "working")

drifting stump
#

where is the .info and poster.png?

#

inside Diabetes or media

bitter frigate
#

Diabetes

drifting stump
#

only issue is the working file

#

its not a txt

#

its a lua

bitter frigate
#

OH

#

well NOW i feel silly

#

lemme fix that and see if it works

drifting ore
#

On the server side, how do I get the isoPlayer of a specific player to use with sendServerCommand ? I try getSpecificPlayer but that not seem to work. I tried with the playerNum and playerIndex

bitter frigate
#

my mod is still not showing up, unfortunately

drifting ore
#

I have a command that is sent from the client to the server like this:

function Ask(player)
    local arg = {}
    arg["From"] = getPlayer():getPlayerIndex() --Or getPlayerNum
    arg["To"] = player:getPlayerIndex() --Or getPlayerNum
    arg["command"] = "SendOriginal"
    sendClientCommand(moduleName, "SendServer", arg)
    getPlayer():Say("Asked to " .. player:getUsername())
end

But arg["From"] and arg["To"] are the same

#

Then on the server side:

Commands["SendServer"] = function(player, arg)
    print("To: ", arg["To"])
    print("From: ", arg["From"])
    sendServerCommand(getSpecificPlayer(arg["To"]), "TOC", arg["command"], arg)
end
drifting stump
#

are you trying to ask another player?

drifting ore
#

normally not precisely, because I call the function only if getPlayer() ~= player

drifting ore
#
if self.character ~= self.otherPlayer then
    print(self.character:getPlayerIndex())
    print(self.otherPlayer:getPlayerIndex())
    Ask(self.otherPlayer)
end
drifting stump
#

are those 2 prints showing different things?

drifting ore
#

no, both 0

#

but it's maybe because both game are on the same PC

#

But it shouldn't, the server must know the difference

drifting stump
#

try doing the if check with the indexes

#

i suspect they are 2 different java objects pointing to the same player

drifting ore
#

Ok and now when I try to call print(self.character:getPlayerIndex()) I get an error

#

Object tried to call nil

drifting stump
drifting ore
#

And otherPlayer and character is well 2 different isoPlayer

drifting stump
#

im not sure you can get another player as a client unless its a local coop

drifting ore
#

like the object ?

drifting stump
#

yes

bitter frigate
drifting stump
#

again im not sure about this havent messed around with it much but as a client unless its local coop i think there only exists on player

#

other indexes will just return a nil player

drifting ore
#

I don't think, like in ISMedicalCheckAction otherPlayer is an obj and the use function on it

drifting stump
#

true need to look how that player is obrained

#

might be sent by the server

drifting ore
#

But I use that otherPlayer variable, I don't need to find it. I have both player obj, that not the issue

bitter frigate
drifting stump
#

ill have to mess around with it

drifting ore
#

That my question

drifting stump
bitter frigate
drifting stump
#

it did show up in the mod section

#

C:\Users\[Your User Name]\Zomboid\mods\Diabetes

bitter frigate
#

i mean it's meant to show up in the mod panel within the game right? so i can enable it? or is it automatically enabled because it's in the mod folder?

drifting stump
#

yes it is meant to show up

drifting ore
#

When I check the debug, PlayerIndex are the same for both obj, username not (so it's 2 different object) but OnlineID is different so it must be it

bitter frigate
leaden dew
#

Hi guys! Can I made a mod that preventing some items (listed) to spawn? Letโ€™s say it is item blacklist.

drifting stump
#

but again you have your mod in C:\Users\[Your User Name]\Zomboid\mods\ right

#

not in the mods folder in the game install folder

bitter frigate
#

........................oh lord

bitter frigate
#

it's working. thank you so much

hollow shadow
drifting stump
#

yes

#

didnt touch anything that conflicts

hollow shadow
#

yes but better lockpicking adds a hotwire minigame

#

does the mod remove that minigame or keep it?

drifting ore
#

That not onlineID either because I get 0 and 4, and 4 give an error when use with getSpecificPlayer because we are 2 on the server. God damn it, I will never get my mod work in MP

drifting stump
#

only thing with that mod is the hotwire action duration setting doesnt do anything because well better lockpicking doesnt have the action

drifting stump
drifting ore
#

With what do we need to use getSpecificPlayer ? PlayerNum ?

drifting stump
#

think so

#

@hollow shadow

timid plume
timid plume
#

thanks

copper grotto
# weary matrix my problem is really about understanding why the properties I set on the square ...

Are you workin on ladders using some kinda sheetrope trick? (hope ping response was ok) Thats Awesome if so!! Truth be told I'd much prefer this to any teleporting hackery, I took a brief look into attempting that but didn't see a clear avenue without diving deeper than I felt willing to at the time. Great idea, would love to see this functionality added! Not sure if I'd be able to assist but feel free to DM me if you need a second pair of eyes, might be able to help with the square not saving the property. That being said for others in the meantime there is some teleporty hacky ladder use coming with the next elevator update, but actual climbing with animation sounds way cooler

lavish rampart
#

so i have to put the mod from the directory from like steamapps common and then to like the string of numbers etc drag and drop that into the zomboid mod spot right

copper grotto
#

hmm, I'm sorry I don't quite understand the question, missing some args

weary matrix
#

@copper grotto hey, thanks. Yeah I'm still stuck on the square losing its properties :/

lavish rampart
copper grotto
#

Oh, you mean like is there a way to craft sheets from something else? or just like can you spawn in sheets, sorry I'm thick I still dont quite understand what you mean. but I suppose the answer is yes?(or it would be easily possible to make a recipe like that)

#

co` my wife is summoning me to do some shoveling but I'll take a peak at the code you pasted yesterday when I'm back around and hit you up if I have anything helpful

lavish rampart
lavish rampart
sharp mango
crisp fable
prime frost
#

Longshot but does anyone know if the lootable map window is capable of being resized & if so, where's the ref to it?

undone crag
#

Hello what is the function to tell what player number you are?

crisp fable
#

local player = getPlayer();
local playerNum = player:getPlayerNum();

#

if thats what you mean

undone crag
#

:o

#

thx m8

frank elbow
# chrome agate Hi everyone! I'm hunting some mod incompatibility for my new play and had an ide...

A few hours late, but this is where the channel loaded in for me so: Lua functions can be defined like that, but can also equivalently be defined as Name = function(...). Just something to look out for if you do that. If it's a function in a table, you may also have to consider the edge case that someone may have assigned the table to their own local variable. So, a grep wouldn't be a perfect approach (the ideal approach would be an analyzer, but I assume that's out of scope), but it would catch most of the common cases

steel whale
#

Looking for a mod that makes spawn locations to be able to be safehouses

orchid notch
#

I am currently working on making some new WorldItems, any idea why the textures are being read like this?

#
#

(model is currently scaled up to show issue better)

junior flame
#

I had that issue when my model's texture filepath wasn't set correctly

orchid notch
#

yeah, I felt like that might be it

#

ah just happened to glance and see #mod_support, this definitely should've been there lol.

#

unless thats support for people who use mods, not make them ๐Ÿ˜‚

#

anyhow, I am a bit puzzled for sure. The path seems correct, but the problem could lie elsewhere maybe

mint sphinx
#

a fast question is it possible to say this in a list

mylist = { foo or "bar", foo2 or "bar2" } ?

crisp fable
#

probably, but what do you expect to get in that list afterwards? i think it will just be booleans

mint sphinx
#

sprites

quasi geode
#

its valid

#
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> x = {nil or "ok", "ok2" or nil}
> print(x[1], x[2])
ok      ok2
orchid notch
#

got it

crisp fable
#

ah nice, so its like a js or, a coalesce

orchid notch
#

alright so good note to make

#

even though the mesh = and texture = pulls from two different folders in the game directory

#

if the fbx & png are named the same

#

it won't pickup the texture

#

even though, I believe this is how it's done with Vanilla world models, such as mesh = Book, then texture = Book

#

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

#

now onto other missing 3D models ๐Ÿคฃ

#

funny enough, rooting around in the PZ directory

#

there is actually already a mesh/textures for WalkieTalkies, including each variety of them. They are completely different than the sprites used in the Inventory

#

they're inside the 1handed weapons textures

#

also found a reference to the mesh for them as well

#

so at one point the walkies were able to be held as a 3D model, and most likely swung as a makeshift blunt weapon too

#

here they are in "media\textures\weapons\1handed"

#

idk if that is common knowledge or not, but I found it interesting

#

๐Ÿ˜Ž

rain pumice
orchid notch
#

now to turn that pesky NPK Fertilizer bag right-side up ๐Ÿคฃ

fair frost
#

Silent Hill themed cars time

orchid notch
#

These are so awesome ๐Ÿ‘Œ

fair frost
#

thanks

mint sphinx
opal wind
unkempt kettle
#

Hello everyone
Does someone know a place, channel or somewhere I can find a tutorial or even learn how to combine mods and make a modpack for a server?

Tried the whole net, even reddit, but couldn't find.
People dont even want to sell their service

drifting ore
#

It workiiiiiinnnnnnnnnnggggggggggg !!!!!! My mod finally work in MP. Thx everyone who help me !

mint sphinx
quasi geode
#
> print("test " .. (nil or "") .. "done")
test done
#

i'm assuming you ment with strings

mint sphinx
#

what i wanted is like like this

x = { "hey " .. (str) .. " nice" or "default string", }

quasi geode
#

not sure what your trying to achieve there, but if you look at the example i show, it hits the nil and replaces it with a empty string "" to concentrate

mint sphinx
#

i did but problem is if the string is nil i would cast it to a whole other string obejct instead... hmm also i use to java where null is = false by default

quasi geode
#
> print("test " .. (nil and "x" or "y"))
test y
> print("test " .. (true and "x" or "y"))
test x
opal wind
#

mods should work with each other, if they dont, its a mod problem not a server problem, plus you prb need the mod owner 'go ahead' to mess around on his coding anyway

#

i recomend u test your modpack on SP first

#

if it works move to MP

unkempt kettle
#

No, you didnt get it
I mean, many servers nowadays have all the mods into a single file
so no need to keep restarting the server when a mod gets updated

opal wind
#

well again, i dont think this is right, each modder should take care of their own mods not letting other people mess around on their coding

#

MP is a mess anyway

#

and its not the modders fault

opal wind
#

yes i know

#

i just dont agree with these 1file half-put measures

#

people are messing around to much MP to 'fix' mods when we all know the real problem is the vanilla game engine on MP

#

the day they manage to fix cars from teleporting around i will deal with MP

mint sphinx
opal wind
#

yeah you are right on that

mint sphinx
#

also it his problem if he get a DMCA or not for doing it ^^

opal wind
#

Steam is a disgrace, thats the truth; they wont let me make my mod public while i dont spend money with them...

#

all my steam games are gifts i pay my friends and they send me; i dont like to put my credit card on the internet

#

because of that i cant even Add Friends on steam

#

thats how pathetic, greedy and incompetent they are

#

Steam is Pathetic

drifting ore
#

I mean

#

Gift cards count as payments

opal wind
#

'pay me to give free stuff'

opal wind
#

and i spent hundreds on dollars with steam, they just dont know it lol

crisp fable
#

technically from their perspective, you didn't spend any - the games are gifted

drifting ore
#

I think the whole "pay to get access" thing is to stop botting

crisp fable
#

its a valid security measure imo

opal wind
#

yeah so if i dont pay i cant give a free mod? thats their 'logic' ?

#

yeah super valid... to NOT allow u to give a free mod LMAO

drifting ore
#

Not wanting people to bot their service is pretty valid

crisp fable
#

well, yeah. otherwise you'd have tons of free accounts posting various crap on the workshop

mint sphinx
opal wind
#

Kaldo just drop on your 4 and milk steam

#

really

autumn holly
#

The problem with MP is mostly in that Steam Workshop is the modding domain for the game

#

There's no version control on Steam

drifting ore
#

^

opal wind
#

yes because steam SUCKS

crisp fable
#

i have plenty of issues with steam's workshop. being a legitimate customer as a requirement to use their cloud storage is not one of them...

autumn holly
#

So you can't make sure everyone grabs the right version, and steam itself sometimes doesn't even get the right versions

drifting ore
#

Steams the best platform there is

drifting ore
#

There is literally no other comparable platform for purchase of games and having a community in 1

mint sphinx
opal wind
#

just give it a time

#

and u will change your mind about them

drifting ore
#

I got an account with $500 worth of CSGO items stolen and wasnt able to recover it

autumn holly
#

Because steam automates the download and update process

mint sphinx
#

@opal wind what if one of your friend make a workshop mod and then give you the owner ship of it ?

drifting ore
#

I have been screwed, I just recognize the trivial nature of the platform

opal wind
mint sphinx
drifting ore
#

Regardless they only require a 5 dollar purchase to get full access and you can buy 10 dollar steam giftcards

autumn holly
#

The author has to make the explicit decision not to update their mods whenever they fix things

opal wind
autumn holly
mint sphinx
# opal wind nah its ok Tiba i will pay those greedy bastards bums, so i can public my mod

This bundle contains: -Deployment -Timelock VR The short decription: Deployment is an intense competitive top-down shooter game. Infosoldiers, made of pure information, fight in an endless war between governments and megacorporations to rule over the digital systems that control the world.

drifting ore
#

I mean I'd rather have people pay five dollars to use a platform where you buy video games

#

If it means stopping botting

opal wind
#

you should Not have to PAY to make coments or add friends dude, how come you suport this RAPING of the consumer??

#

really kaiser

mint sphinx
opal wind
#

u disapoint me

autumn holly
#

I don't publish any mods I make

drifting ore
#

You're right, I should be able to bot their website and friend everyone on the platform automatically

#

That totally wont be used for malicious reasons

opal wind
#

why would someone do that?

drifting ore
#

Because we're human beings??

mint sphinx
crisp fable
#

@opal wind can you just let it go? this is not the channel for your anti steam rants, nobody cares

drifting ore
#

If some dude in Russia realizes he can make bank by phish scamming people on Steam he's going to scam people lol

opal wind
#

you know what? im 42 yo and i dont want to get into a discussion on a sunday afternoon; if you are a steam lover, thats your problem, i hate them to my guts, and i will keep hating them no matter what excuses you give to them

#

so dont waste your time arguing with me on that

#

i despise them. period, its my right.

#

yeah sure kaiser, blame the russians lol

mint sphinx
#

but how do the mod goes btw?

opal wind
#

tbh im thinking in uploading it just on curseforge or some other mod plataform, the idea of having it on steam with taht pathetic 'subscribe' button sicks me to no end

#

they cant even install mods right

#

'subscribe'... lol

#

they create numbers (steam ID) for our mods, they wont even keep the darn mods names IDs...

#

anyway, like i said before its a waste of time to argue

#

i remember the first time i was trying to find this mod on my computer, its like steam hides them