#mod_development

1 messages Β· Page 90 of 1

drifting ore
#

i'm having troubles using this setHaloNote

#
    local roomID = square:getRoomID()
    if roomID ~= previousRoomID then
        player:setHaloNote(getText("Room ID = ", roomID))
        previousRoomID = roomID
    end
``` it's not actually adding in the room id in the halo text. i though this is proper usage?
#

local player = getPlayer()
local square = player:getCurrentSquare()

#

just for reference

#

and yes im a noob

tame mulch
drifting ore
#

oh i need the wildcard?

tame mulch
#

You need write in UI_EN: Room_ID = "Room ID = %1"

#

And in code:

...
player:setHaloNote(getText("Room_ID", roomID))
...
#

*Maybe need also tostring

player:setHaloNote(getText("Room_ID", tostring(roomID)))
drifting ore
#

since you are here. i made the lightswitches tile moveable and craftable in a mod. if you are able to answer. is there anything exposed, and what would need to be set in a player structure to flag it as a defined room? lol thats really what im working on this for

#

not even sure if im asking it the right way

#

i thought i saw something about assigning a room id. but i wasn't even sure if that would do it

#

i been digging all week though. and also thank you for that. this is perfect

tame mulch
drifting ore
#

ahhhh i was so close

tame mulch
#

Maybe in 42 I will create tool for do this dynamically

drifting ore
#

hahaha thank you though appreciate everything

tame mulch
#

You can write request on forum. Then I will not forget about this πŸ˜„

drifting ore
#

i will absolutely. thank you. haha just started learning any code like last month so this is big help for me

#

time to start working on my left handed attack animation and mod so we can still attack when the only cure is amputation of right arm πŸ˜„ since this is dead end i can start working on this!

#

i thought of some trickery to work this so here's hoping

neon bronze
#

does anyone know if you can access the server distributions tables after you joined it once? or are they server bound?

jaunty marten
#

but seems after reload the map game will set default roomid

#

@tame mulch think about #waywo channel for modders pls pancakes_hedgehog

ancient grail
#

Sup vishnya

#

Whacha workin on? @jaunty marten

ancient grail
jaunty marten
jaunty marten
#

redoing logic already for 4 time

#

it's a shit..

#

and u?

rancid tendon
#

is there an easy way to translate RGB values to the colors used for hair definitions on zombie outfits?

jaunty marten
rancid tendon
#

i actually am not sure what the system it uses is called which is part of my issue :P i'll show you:
0.97,0.71,0.79
it seems that it's RGB where it's 1 = 100% and 0 = 0%, but if there's like a name for this system that i can look up a converter for that'd be useful haha cuz i'm too dumb to do the math myself

jaunty marten
rancid tendon
#

ah ha, a simple explanation for my high brain

#

thanks!

jaunty marten
#

yep spiffo

sour island
#

"He's helping"

neon bronze
#

Can anyone help out with spawning in containers? We currently can refill containers with LootZed except for Wardrobes which remain empty everytime

crystal terrace
#

Hey, is there a quickstart guide or something like that to get started with modding pz or any resource? thanks πŸ™‚

quiet bramble
ancient grail
crystal terrace
ancient grail
neon bronze
#

but i also think something may happen with SeenHoursPreventLootRespawn

ancient grail
#

Ouch thats a whole diffrent pain to fix

neon bronze
#

yea : (

golden sparrow
#

Is there an in-game way to visualize sprites ?

neon bronze
#

but luckily its only that one closet so people dont complain that much

ancient grail
#

Maybe tilepicker?

#

Or sprites like weapon?

golden sparrow
#

Like i'm trying to create a new wall build option but there's only one sprite working

ancient grail
#

Attachment editor

golden sparrow
#

So i'm wondering if I'm using the wrong sprite name or something

ancient grail
#

Could be. The tiles start with 0

#

It auto adds a delimiter _ suffix

#

So

yourTile_0

#

Thats the first on the list

#

Hope this helps

golden sparrow
#

Oh i thought it started at one

#

I'm trying to use Dylans Custom Tile

golden sparrow
#

It works πŸ˜„ Had to re-set the object sprite using :setSprite and :setNorthSprite option on the wall, I don't understand why it isn't done properly when a new object is created but good enough

calm depot
#

(I know, it's a wrench, but now, you can't un-see it)

drifting ore
#

It’s true lol

#

Didn’t even cross my mind until you said it lol

calm depot
#

bonus: that isn't the toolbox handle, it's a moustache

viral notch
#

is there option for debug mode or command to reload textures of item ?

#

without restarting game

calm depot
#

-debug is the command-line arg

#

as for reloading textures, it usually does this automatically whenever it sees the file change

viral notch
calm depot
#

however, I've found it, and other things to be occasionally unreliable.

If something is not as you expect, first verify it by restarting your game, 'lest you take yourself on a wild goose chase

viral notch
#

for test changed color from red to blue and it still reload with red

calm depot
#

why would a game reload from its cache when you change the texture file? that would clearly be pointless πŸ™‚

viral notch
#

like for vehicle you have in debug option to reload it... for items there is option too ?

#

like by hand /reload ITEM_NAME

ancient grail
#

th OnWeaponHitTree doesnt have an arg that lets me capture the tree? oshiiiizzz

sour island
#

Crab hands, mustache, and wizard hat

pulsar heath
#

does anyone know if the alarms duration in cars can be modified?

small topaz
astral dune
ancient grail
#

how do i make a looping sound follow the player

#
getSoundManager():PlayWorldSound('chainSawIdle', getPlayer():getSquare(), 0, 5, 5, false);  
addSound(getPlayer(), getPlayer():getX(), getPlayer():getY(), getPlayer():getZ(), 5, 1)
#

and how to i stop it

ocean skiff
#

I have a request for a mod: is it possible to create a mod controlling the Max Zoom limit for entire server?

drifting ore
#

i don't see where i can find it being used. now i wonder

ocean skiff
sour island
#

This requires some tricky stuff for MP and looped sounds tho

calm depot
#

speaking of EHE, I don't suppose you got around to making an AEBS function that adds just the heli lines returnable?

#

...yes you did, should have checked GitHub before asking. Thanks again!

sour island
#

Its fine on server as long as you don't need the sound to loop

#

At least from what I see

ancient grail
#

but thats the thing

#

the plaeyr is carrying a chainsaw

#

it has to produce sound all the time

#

can i add usedelta on a weapon?

sour island
#

You could play a short sound over and over

#

That is how I do flares

ancient grail
#

ok

#

thnx

#

and it ownt over lap?

sour island
#

You have to time it

#

A chainsaw would be a good candidate to allow some overlap

#

You can do a var countdown on every tick

#

Hits 0, resets to n, and plays

drifting ore
#

just to make sure i am reading this right. if i use this

if self.character:getSecondaryHandItem() and weapon:getSwingAnim() and not weapon:isRanged() then
self.character:PlayAnimUnlooped("Attack_" .. weapon:getSwingAnim())
``` in theory can I use this as a base for adding in custom animation on swing for off hand?  with some small changes to animation, should in theory let me use animation for left handed attack? if i replace with a custom left handed attack animation. that looks about right?
sour island
#

That's what I do for flares - might have to do it for helicopter flights if this update to syncing doesn't work

#

Yes, you can also set conditions for anims btw

drifting ore
#

like what? haha sorry i'm reading a ton to get more understanding

#

just a simple example would do if you are willing

#

i'm not familiar with animations barely at all. but i will test this also just wondering what kind of conditions

ancient grail
#

its better if i could stop it or check if its playing

sour island
#

You can use isPlaying and stopSoundByName

drifting ore
#

all good i got plenty of time to mess around with it and find some more examples. thanks for the input still

pulsar heath
#

can someone point me to the right way of getting all objects in the player location?

worldly stone
#

I'm having issues with a mod because "onloadgridsquare" is fired and uses my moddata before it has time to receive data from the server. Is there an event that is earlier than onloadgridsquare where I would be able to .remove my local data ?

#

Also is there a point in having multiple Lua files? Are they running on different threads ?

ancient grail
#

thats an expensive event

north junco
#

Hey everyone. Would it be incredibly complicated to create a mod that replaces zombie sounds? I wanted to experiment a bit with modding and thought that might be a good place to start.

worldly stone
#

Everytime it detects the mods item on the floor (a heater), it getscreates and puts a heat source if it finds its id but I don't even have time to load the servers data if I spawn on it

dark wedge
# drifting ore just to make sure i am reading this right. if i use this ```lua if self.characte...

you got the spirit, but no that will not work. Animations do not start with Attack_$WEAPONANIM where $WEAPONTYPE is something like "bat". Also, calling the PlayAnimUnlooped function does not sync the animation in multiplayer i have found, so you would need to do that yourself. I've been playing with my own off-hand attack mod for the last few days, and also have found that nothing in the player's base class takes into consideration the offhand weapon in how it calculates damage, swing speed, etc. Using the values directly on the weapon is op, as it doesn't take into consideration your player's current status and such.

weak sierra
#

which depends on path and name

weak sierra
#

take care doing stuff with loadgridsquare, anything that doesn't quickly do a coord lookup and bail before acting is gonna be a performance hog

dark wedge
weak sierra
#

if you need your code to run before a certain mod on that event, though, make sure your code is added to the event before the other mod's

#

or patch the other mod's if possible

#

more performant that way too

worldly stone
#

Hmm ok I'll try to think of something other than onloadgridsquare

#

Because even if I prevented the code from running the event would have to fire again on the same cell

ancient grail
#

ow nvm

#

need get emitter

dark wedge
ancient grail
#
if not pl:getEmitter():isPlaying('chainsawLoopsfx') then
    getSoundManager():stopOrTriggerSound('chainsawLoopsfx', csq, 0, 5, 5, false);  
    addSound(pl, pl:getX(), pl:getY(), pl:getZ(), 5, 1) 
    end
#

yep heres what i did

#

about to test it now

drifting ore
#

no idea how player data is handled in that regard

#

i'm going to mess around a ton tonight with it because you make me believe that even though it's complex, it's potential is there

#

Does anyone know if I can just edit the RadioData.xml and if it will change the radio dialogue in the game ?

dark wedge
pulsar heath
#

dual wield?!

dark wedge
pulsar heath
#

uhhuhuuh thats awesome!

#

pz akimbo mode πŸ˜„

drifting ore
#

this is def the proper way to do it for sure, looks so clean. if you are planning on releasing this publicly then i dont think i'll end up working on it as you are already so much further along than myself. i havent even attempted the animation and it's been years since i've done one.

pulsar heath
#

a cell is what? 100x100 tiles?

drifting ore
#

300?

#

chunk 175

pulsar heath
#

i know nothing about the mapping in pz, so a lot of dumb question... but i need to know the size of a cell so i can do my frankenstein code work properly

#

so you say is 300x300 ?

drifting ore
#

yes

ancient grail
#

instead of swinging the chainsaw i can probably use a very fast animation to loop the swing so that it looks like he is not swinging it would that be possioble

ancient grail
pulsar heath
#

so roughfly a cell would be 900 square meters?

#

im gettin' my math all wrong today i think

drifting ore
#

90k?

golden sparrow
drifting ore
#

300 x 300 is 90k

drifting ore
drifting ore
pulsar heath
#

hmmm i only find 3 cars in 90k

#

weird

golden sparrow
pulsar heath
#
LOG  : General     , 1674241891699> zombie.vehicles.BaseVehicle@741e2f62 at x:6768.29443359375, y:11262.9462890625, z:0
LOG  : General     , 1674241891700> zombie.vehicles.BaseVehicle@549352e5 at x:6694.48681640625, y:11260.7626953125, z:0
LOG  : General     , 1674241891700> zombie.vehicles.BaseVehicle@7fa1213a at x:6672.01318359375, y:11327.396484375, z:0```
golden sparrow
#

If it does you should probably just copy the one you want to override rather than copying the whole file to have better compatibility

drifting ore
#

I sure hope it overwrites it

ancient grail
#

is it possible to hook the sound on the idle animation then loop it

pulsar heath
#

ok, done... thanks @dark wedge

#

can finally get a list of all cars in the area, choose the closest to the player and trigger the alarm

#

next, building alarms πŸ˜„

dark wedge
pulsar heath
#

i keep forgettin' that the helis from EHE count as vehicle... and if it crashed and broke in two, each part counts as a vehicle as well

#

so a crashed heli = 2 vehicles...

#

was thinking something was wrong with the function...

drifting ore
#

lol

#

getting it all sorted tho?

pulsar heath
#

hmm i wonder if the heli has an alarm as well?

#

ill try it out later... friday night = get out and socialize a bit

#

so hf and cya later, going out for a change

agile vigil
#

Enjoy!

drifting ore
#

sounds good have fun

agile vigil
#

So, unrelated. I'm working on a mod I call "Bulk Storage"

It's dedicated to things like tubs for dried goods (transfer all your beans from their bags into a big stackable tub for weight savings), crates for bottles, and all that kinda good stuff.

As a bonus feature, it also lets you 'pack' some items in vanilla that could use it, like packing a suitcase to make it a lighter-weight item full of clothing, or packing a first aid kit to make it a light-weight thing you can safely carry in your main inventory.

Without me giving an exhaustive list of all the items I've already got planned, does anyone have anything they'd love to see in a mod like this?

Current implementation has Chinese takeaway boxes (for leftovers), plastic wraps (to wrap up sandwiches, burgers, and burritos), tubs (for dried goods like sugar, flour, beans, pasta, nuts, and more), and first aid kits (which hold bandages, disinfectant/alcohol wipes, and painkillers).

dark wedge
agile vigil
dark wedge
#

Would be happy to provide an animation mask or something for that crate/box item while carrying it. πŸ™‚ kinda like:

sour island
#

That man is strong

drifting ore
#

lol

ancient grail
#

whats <m_Priority> </m_Priority>

drifting ore
fast galleon
#

I had an idea.
sandbox-options.txt

option SandboxChanged
{
    type = boolean,
    default = true,
    page = SadisticAIDirector,
    translation = Change_Me,
}
--add event and trigger function
local checkSandboxVars = function()
    if SandboxVars.SandboxChanged then
        triggerEvent("OnSandboxChanged")
        SandboxVars.SandboxChanged = false
    end
end

if not Events.OnSandboxChanged then
    LuaEventManager.AddEvent("OnSandboxChanged")
    --You can edit this into OnClientCommand / OnServerCommand but account that you might need to wait a few ticks because of networking
    Events.EveryHours.Add(checkSandboxVars)
end

--set it to false at start, after options are loaded and preferably before the check function has a chance to run
local function setInitial()
    --Events.OnInitGlobalModData.Remove(setInitial) --do not remove from events during loading in v.41.78 
    SandboxVars.SandboxChanged = false
end
Events.OnInitGlobalModData.Add(setInitial)

--Events.OnSandboxChanged.Add(function() print("OnSandboxChanged") end)
#

This is theoretical, only changes lua sandbox value.

dark wedge
fast galleon
#

me trying to figure out what Kali Linux real estate means

@ "securities license exam and cali real estate license"

drifting ore
#

lmao

rain shard
#

Hello, is anyone familiar enough with WordZed to answer this question?

drifting ore
#

look at the toxic fog mod or save our station for usages. literally 0 idea what wordzed is but i know that both of those mods utilize a math formula to determine something like that

#

someone may know more but this should get you in a direction at least

agile vigil
wet sandal
#

Does anyone know how to render 3d models in the UI?
So far I've only found ISUI3DModel, but its specialized for player avatars, not any model you want. (I'm specifically looking to render items)
Someone told me a while back they'd seen it done in some mods before, hoping it wasn't only characters that they saw.

#

Otherwise, if that's a no go, I'd be looking for a way to create new textures in lua using the existing ones.

Haven't explored creating new textures as I'm still stuck on reading the pixel data of the existing. Whenever I try to read the texture data (using getData() to access the wrappedBuffer), Zomboid CTDs...

wet sandal
#

My last resort would be to override all the default item textures and ship it with my mod πŸ₯². Which leaves modded items unaffected.
I can't seem to find them in the media folder though, are they compressed in the binary.dat file?

fast galleon
#

Item_ images should be in the UI.pack(s)

ancient grail
faint jewel
humble oriole
#

What's the best way to check if an item or square has power. The ones I've tried always return false even if in a house.

dark wedge
ancient grail
#

SandboxVars.SandboxChanged = false

#

does this exist in vanilla

fast galleon
#

it's above

faint jewel
#

weeeeeeeeeeeee

fast galleon
drifting ore
dark wedge
wet sandal
faint jewel
#

current private but i am planning to do a house cleaning sweep on it and rerelease as public.

#

the current one has some rp items in it that the public dont need.

dark wedge
faint jewel
#

fun part.... mine doesnt use lua.

dark wedge
#

yea, has to be done from the item's script definition. you can't set the animation mask on an item in lua from what i've found, unless you brute force set it by setting the character's lefthandmask/righthandmask directly

faint jewel
#

yeah that;s hoodrat i just do it the way god intended.

drifting ore
#

Hello

dark wedge
#

i had no choice. drunk

drifting ore
#

Am not gonna ask something about development but is it possible us to check a wiki of brita's armory ?

#

Idk which attachment goes where

#

It's a bunch of mixed stuff

drifting ore
# faint jewel

Wait is that you who already has a mod of this but with only power supply and corpses

faint jewel
#

no, that was blair

drifting ore
faint jewel
#

pretty much.

drifting ore
#

Okay give me your address appreciated

faint jewel
#

it jsut seemed weird to hold a generator with your wang lol.

devout flint
#

Hey,

so I'm trying to create a movable lamp, i've got my tile and item ready but I don't know how to place it

Which scripts are necessary for such mod?

I'm new to modding and can't find any resources for such a basic mod

faint jewel
#

This item is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).

#

oh lorb

#

WTF

devout flint
dark wedge
wet sandal
#

LOL

faint jewel
#

lol yeah. the stupid bones are in the wrong ass spots.

#

took me ages to figure it out.

dark wedge
#

yea, mine was built with the "Visible Generators and Bodies" mod items specifically.

ancient grail
ancient grail
dark wedge
faint jewel
drifting ore
#

also probably some translation as well depending on what you are doing

faint jewel
#

@devout flint I'll lt you try it... but there is a REASON my tvs are marked as "broken"

devout flint
drifting ore
#

did you do the rest of what i said?

devout flint
#

what else did you said?
I see tiles properties and item script. Both are done
i don't think I need translation for now.
But maybe "everything it needs" is a bit too vague, I may have missed something

drifting ore
#

lol fair enough. i shouldn't assume you know already. here is what mine looks like working

humble oriole
#

Does anyone know the best way to check if an item or square has power? The methods I've tried always return false even if in a house.

devout flint
drifting ore
#

no im just doing 5 things at once haha sorry

#

bad habits

devout flint
#

np

drifting ore
#

also, the tiles are custom right?

devout flint
#

yeah, but it's a very simple recycling of existing tiles

fast galleon
viral notch
#

what is different between BodyLocation= Hat and BodyLocation= Head ?

humble oriole
drifting ore
# devout flint yeah, but it's a very simple recycling of existing tiles

so my main placeable is (keep in mind i am overwriting vanilla on purpose, but should still work the same.

{        
    item lighting_indoor_01_0
    {
        DisplayCategory = Furniture,
        Type            = Moveable,
        Weight              = 3,
        Icon            = lighting_indoor_01_0,
        DisplayName        = Right Side Light Switch,
        StaticModel     = lighting_indoor_01_0,
        WorldObjectSprite    = lighting_indoor_01_0,
    }``` also you may want to import base and make your own module
#

if not overwriting vanilla

devout flint
#

also you may want to import base and make your own module
already done

drifting ore
#

and for anyone who cares, my long term goal is to only overwrite the tiles but this is working for now since i made them craftable

fast galleon
devout flint
#

Imissed a "," on :

WorldObjectSprite = lighting_indoor_01_0,
Maybe that's the issue I had... idk

drifting ore
#

yes

#

that will mess it up

humble oriole
#

Thanks again

dark wedge
#

I would assume the isHydroPowerOn should work, but I don't see the base game doing that. They check switches and stuff with:
(SandboxVars.ElecShutModifier > -1 and getGameTime():getNightsSurvived() < SandboxVars.ElecShutModifier) or square:haveElectricity()
combine that with an inside check should work too.

fast galleon
wet sandal
#

Working on the equipment UI for my inventory overhaul. It makes items take space on a grid instead.

#

Need to make equipped items not take space though, so I can significantly shrink the player's default inventory to almost nothing.

#

Any thoughts on this ROUGH mockup

versed viper
#

siiiick

wet sandal
humble oriole
#

dayz style, could be cool

versed viper
#

can you systematically determine the grid size of objects based on any particular properties

wet sandal
#

Thats how it is right now, I'll manually override certain things later

#

but for now the whole game is done using weight/type hueristics so I can play without spending hours sizing all the items

#

And auto mod support

faint jewel
#

waiut we're posting mockups?

versed viper
#

yeah i personally think you'd want to create a forumla to auto-size

faint jewel
#

do this one!

wet sandal
#

Nani

#

this exists?

versed viper
#

that's hot

humble oriole
wet sandal
#

Oh, its still 1x1 items

faint jewel
#

it's a mockup.

wet sandal
#

it looks clean

#

I like it

drifting ore
#

i was about to say if you are able to make it smaller...

humble oriole
#

UI design is tuff

wet sandal
#

It looks a bit ugly i know, but it FEELS better big

faint jewel
#

i would reccommend you do them on the smaller squares though. or at the LEAST give a scale option for the mod.

#

small medium large.

wet sandal
#

Ye I'll have scaling

drifting ore
#

very nice

faint jewel
#

yours would be the large

wet sandal
#

Ye, im on a 4k monitor

#

Probably one reason I needed it so large

#

Is there a list of all body slots anywhere?

#

Or does that mockup cover it?

faint jewel
#

my mockup covers it but they can stack in some slots

versed viper
#

eekum bokum

dark wedge
wet sandal
#

Lol

#

Yea I'll take it

#

Thank you

dark wedge
wet sandal
#

Wow

humble oriole
#

107
pain

wet sandal
#

This is why I though of that tab system, I'm gonna need to combine slots in the UI somehow'

#

Hide uncommon ones unless used, etc

wet sandal
undone crescent
#

hey guys, quick question: we are using items on the server that shouldnt be picked up by players (only by admins) we used to fix that with giving the items a weigth of 1000 but we cant place them like this anymore if they are that heavy. would there be any line of code i could throw into the item script that prevents a player from being able to pick it up, but allows him to interact with it (for crafting)? thanks in advance! πŸ™‚ πŸ‘

wet sandal
#

Just realized my UI was at 20fps

#

This feels so much better at 30

dark wedge
wet sandal
#

And here's a pic with the UI at small scale since that was the biggest feedback lol

versed viper
tawdry solar
#

where did #modding go?

#

as i need help

wet sandal
tawdry solar
#

if i dont want a 3d model for my item (lighter) what do i do

wooden bluff
#

How do I find code

#

I want to find the code governing generator fuel usage

wet sandal
#

I recommend getting an IDE, I use VS Code, use the IDE to open your Zomboid install's media folder

tawdry solar
#

dont use this EXACT one

#

but the wiki has code

wet sandal
#

Then use the IDEs global search to search around

wooden bluff
#

Alright

versed viper
wooden bluff
#

where do I find the media folder

tawdry solar
#

i dont want 3d model for my item can i just NOT have one

#

and have just the texture

wet sandal
#

I see it now, the checkbox name didn't make sense to me at first

#

This is fantastic feeling now

versed viper
#

without a 3D model

tawdry solar
#

how?

wooden bluff
wet sandal
versed viper
# tawdry solar how?

not sure lol I just do art, but I know it's possible because some items have it. I think if there is no model, it renders the item's icon as the ground object

rancid tendon
#

an item's ground sprite will just be its icon as long as it has no associated 3d model

wet sandal
#

Right click on Zomboid in the steam library
right click -> manage -> browse local files

drifting ore
tawdry solar
#

not a bad lighter tbh

wooden bluff
wet sandal
#

ctrl + shift + f is VS Code's global search

wooden bluff
#

oh hey that worked

#

I think I was using the find all thats local to whatever file is open

#

thanks

wet sandal
#

Lastly, Ctrl + T lets you search file names.
It opens with a # is the box for some reason, just delete that and type to search file names specifically

tawdry solar
#

anyone got a guide on how to start on the folders?

#

no clue on where to put it

wooden bluff
#

wait

#

this is in lua!

#

yessss

drifting ore
#

use structure link

#

even without any coding knowledge whatsoever, this guide allowed me to start writing stuff that works and also has given me a plethora of insight into tons of stuff. i'm currently reading through the knowledgebase of the lua docs to understand better but this is extremely "new to pz" user friendly thank you

fast galleon
#

IsoGenerator.java would be for generator related code

wooden bluff
#

am I crazy

#

it looks like lua

drifting ore
#

the lua exposes the java lol

wooden bluff
#

oh

tawdry solar
#

this just looks like a wall of nothing to me

drifting ore
#

focus more lol. because there is no video that will make it more clear than this, which takes less than 5 minutes to read

tawdry solar
#

its not that i cant read it

drifting ore
#

i know i get it

#

im a visual learner also

tawdry solar
#

yeah

#

i think i get it

drifting ore
#

just limited in what's available so you gotta make due here

tawdry solar
#

i made my media folder

drifting ore
#

just focus only on the stuff you want to change

#

you dont need all that

tawdry solar
#

ah

drifting ore
#

i honestly didnt add a folder until i knew i needed it tbh

#

like you dont need texturepack folder if you have no texturepack to add to it

#

same with ui. if nothing to add then no reason to have it

tawdry solar
#

yeah

#

i got lua texture and models rn

drifting ore
#

you will need scripts also

tawdry solar
#

as im making a lighter and i wont need any ui stuff

tawdry solar
drifting ore
#

scripts is for items and item related stuff

tawdry solar
#

like the code and tooltip

drifting ore
#

where your models file goes also

tawdry solar
#

i have played with some of this before

drifting ore
#

with locations to where your models are

#

what my scripts folder looks like with models, recipes, literature item (didnt need to be seperate from items but i wanted) and items

tawdry solar
#

lightswitch>

drifting ore
#

most of the rest should be in that guide

tawdry solar
#

?

drifting ore
#

its my own mod on workshop lol

tawdry solar
#

yeah ik

#

im confused what it does

drifting ore
#

yea i made lightswitch moveable

#

and craftable

tawdry solar
#

oh thats a great mod

drifting ore
#

it will be better when aiteron makes that tool that lets us update playerbuildings with room definitions

#

super looking forward to it. i can use it to allow lightswitches anywhere

wooden bluff
tawdry solar
#

wtf this is the e.g and this is the code im using

#

idk what one would work

drifting ore
#

bottom makes more sense for you because it matches what you are tyying to do

tawdry solar
#

ahhh

#

im adding an item so

drifting ore
#

it's going to be like a lighter which has specific properties. like drainable which will drain it's "fuel" value
and ticksperrequipuse is how fast it runs out of that "fuel"

#

or at least something like that

tawdry solar
#

hm?>

drifting ore
#

i never messed with lighters but all items are the same really. just find one similar to yours and good to go. i will share an item from smoker mod which has refillable lighters

#

and you can use a recipe to mix two items to make the item

#

or more than two

tawdry solar
#

what would i put the code in?

#

the txt file

drifting ore
#

yes. you really gotta read the guides lol

tawdry solar
#

what would i call the txt

drifting ore
#

noone is gonna help you if you dont put a little effort

tawdry solar
#

im in scripts and it dont say

drifting ore
#

anything

#

you can name anything

tawdry solar
#

so i can put like lighter_mod.txt to put the code in

drifting ore
#

read how the guide shows. you can either use base module of game which will make your item go into pool of base game items. or you can use your own custom name module and import base module that uses vanilla items

#

yep. if you really are a visual learner than go get smoker mod

#

and open the files

#

you will find literally everything you need to figure out a lighter, and it should give you enough info to go from there with others

#

see how they create an item for empty lighter

    item SMEmptyLighter
    {
        Type        =    Normal,
        UseWhileEquipped    =    FALSE,
        DisplayName    =    Empty Lighter,
        DisplayCategory = Smoking,
        Icon        =    Lighter,
        StaticModel = Zippo,
        WorldStaticModel = ZippoGround,
        MetalValue = 1,
        Weight        =    0.05,
        Tags = HasMetal,
        
    }```
#

as things happen you can have them turn into others, and then use recipes to "fill them" which essentially will eat a number of items to procure another

#

use wolfs guide and smoker mod to learn the lighter and you will be able to go from there. im stepping away.here but it's a great starting point

tawdry solar
#

i feel like an ass when i say i dont understand ANY of what you just said

drifting ore
#

because you havent taken the time to figure out the basiccs

#

if you dont have the basics down then you are going to struggle the entire way

#

i will share one more modding guide

tawdry solar
#

i dont even know where to look to put a txt file with the code in

drifting ore
#

wolfs guide literally tells you about folder heirarchy

tawdry solar
#

where

drifting ore
#

like in perfect detail

#

you were looking right at it lol

tawdry solar
#

oh

drifting ore
#

structure

tawdry solar
#

yeah

#

i found it

drifting ore
#

that tells you what each folder does and where it's located. how it loads all that

#

here is two others that will help you if you get off the ground here

tawdry solar
#

mine will be drainable

drifting ore
#

Is someone able to explain what im doing wrong here?

player:setHaloNote(getText("Room_ID", tostring(roomID)))

i have my translations set to

"Room ID = %1"

#

it shows the Room ID, but not the string

#
player:setHaloNote(getText("Room_ID", roomID))

also didnt work

#
    local player = getPlayer()
    local square = player:getCurrentSquare()
local roomID = square:getRoomID()
``` for reference
wet sandal
#

Does getText() have a 2 arg option?

wet sandal
drifting ore
#

ill try. but i only saw say or sethalonote and say was 1 arg

finite radish
#

just a guess though. could be totally off with that

#

try inlining it, see if it works then

drifting ore
#

ahhh as much as i have no idea what im doing, that kinda makes sense. although aiteron got me to this point lol with the tostring

#

ill let ya know

finite radish
#

tostring isn't the right move there, the method already calls .ToString() on whatever object is passed in

#

try player:setHaloNote(getText("Room_ID", square:getRoomID()))

drifting ore
#

so player:setHaloNote(getText("Room_ID", roomID))

#

oh

#

okay trying both. this is good thank you

#

okay so yea if what you are sayting about tostring is right then i will leave that

#

wasn't aware but also no errors

#

i figured that would cause one

#

wait top one did kinda work

#

not for room name or building id but working for room id

finite radish
# drifting ore ill let ya know

okay so, I did a little more digging bc i was curious
turns out the issue is actually that yes - there are two getTexts (there's actually like 4) in the Translate class

but they actually do different things entirely LMAO thanks devs
the normal, single argument getText is used for localization getting, like you were wanting to use it
the two argument one however, is only used for substituting text inside the first argument. so you'd need to do like... player:setHaloNote(getText("Room ID: %1", roomID)) for it to work

drifting ore
#

oh

#

also halo isn't going to work

#

it's only doing 1 at time

finite radish
#

or - even more ridiculous - you could do player:setHaloNote(getText(getText("Room_ID"), roomID))

drifting ore
#

i am trying to get it to show all three. say worked but it cant pass the string

#

another option besides halo note that does same thing?

#

i just dont think it will do all three same time

#

im using event onplayermovement

wet sandal
#

does HaloNote work with newlines perhaps?

finite radish
#

not sure, haven't looked at halo notes before

wet sandal
#

\n

finite radish
#

true, you could append it to the current halonote if it does

drifting ore
#

here is the whole thing currently. no laughing. i literally dont know how to code. learning

#
local previousRoomID, previousRoomName, previousBuildingID
local function checkCurrentRoom()
    local player = getPlayer()
    local square = player:getCurrentSquare()
    if not square then
        return nil
    end
    local room = square:getRoom()
    if not room then
        return nil
    end
    local roomDef = room:getRoomDef()
    if not roomDef then
        return nil
    end
    local roomID = square:getRoomID()
    if roomID ~= previousRoomID then
        player:setHaloNote(getText("Room_ID" .. tostring (roomID)))
        previousRoomID = roomID
    end
    local roomName = roomDef:getName()
    if roomName ~= previousRoomName then
        player:setHaloNote(getText("Room Name:  ", tostring(roomName)))
        previousRoomName = roomName
    end

    local buildingID = square:getBuilding():getID()
    if buildingID ~= previousBuildingID then
        player:setHaloNote(getText("Building ID:  ", tostring(buildingID)))
        previousBuildingID = buildingID
    end
end

-- creates event that updates as the player moves
Events.OnPlayerMove.Add(checkCurrentRoom)

#

i tried to name everything so i or anyone would know what i was doing

wet sandal
#

That's exactly how you should name things, good job. This isn't bad code at all.

drifting ore
#

thanks just used logic to split only when needed to access seperately

#

coding is addicting i hate it

#

can't even imagine when i start to figure it all out

finite radish
#

I was looking at what Notloc suggested, I don't think you'll be able to do it that way unfortunately. haloNote is private without an accessor (there's only setHaloNote(), no get counterpart)
but if the only data that's getting overwritten is data that you have access to, you could add it in that way instead

drifting ore
#

itr worked

#

just not for the other two

wet sandal
#

Just build the whole message in lua

drifting ore
#

ignote that random space also in roomiod

finite radish
wet sandal
#

Assuming newline even works

drifting ore
#

omg i didnt

#

well im dumb i thought i fixed it but missed that spot

wet sandal
#

Just to explain what I sent you does:
getText("Room_ID" .. tostring (roomID))

The .. is essentially + for strings

drifting ore
#

just want the space, but my only prob with halotext is it only does one at a time. i saw suggestions for others but not sure how to use newline in this example

#

it seems to only display next after first disappears

wet sandal
#

So, you're not trying to read out of the translation files?

drifting ore
#

i am it still has the string wildcard guy in it

#

sec

#

although this would only get it if it had a 1? not too familiar with its usage

#

oh i fixed it i think

#

after seeing this

#

lets see

#

and those other two lines ugh

#

late night = potato moves sometimes lol

#

so i can just change it right in the code, no translation needed here

wet sandal
#

lmao, this is gonna read poorly based on the API Crater posted

drifting ore
#

yea i didnt need translation anymore

wet sandal
#

This double getText that Crater posted would be translation plus replace the wild card
getText(getText("Room_ID"), roomID)

drifting ore
#

oh this is working perfect atm. except for room id, no space

#

also need it to show all three so i guess ill have to keep trying each one and see which best fits

#

space fixed. just added space after the text lolol

#

thanks yall. once i get the multi line text, this will be exactly what i am trying to do

wet sandal
#

Wait, so rooms and buildings have ids?

drifting ore
#

yes

drifting ore
#

i made mod to overwrite vanilla lightswitch to be moveable and craftable

#

i wanted to make it possible to use in player structures

wet sandal
#

Thinking of what this could mean for Susceptible...

drifting ore
#

soon as aiteron does that dynamic roomdef tool then we should have an option to essentially allow for that intergrated stuff and also let people set player bases to safehouse without tricks

wet sandal
#

Ah, player structures don't get ids automatically yet, dang

drifting ore
#

yep

#

thats why i cant craft lightswitch and place into player base

#

does squat lol

#

there might be a way to do it still but it's not seeming so

#

he mentioned it requires map change, not fully sure what that meant

#

i actually assumed it just wouldnt stick after a restart. no way to hang onto data

#

there is something to set roomid though

#

i'm like 99% sure

wet sandal
#

Yep, I see it on IsoGridSquare

#

Neat, I will have to play with this system later. Maybe add lingering airborne infection to rooms for my mod Susceptible

drifting ore
#

oh thats a very good idea

#
local previousRoomID, previousRoomName, previousBuildingID
local function checkCurrentRoom()
    local player = getPlayer()
    local square = player:getCurrentSquare()
    if not square then
        return nil
    end
    local room = square:getRoom()
    if not room then
        return nil
    end
    local roomDef = room:getRoomDef()
    if not roomDef then
        return nil
    end
    local roomID = square:getRoomID()
    if roomID ~= previousRoomID then
        player:Say(getText("Room ID:  " .. tostring( roomID)))
        previousRoomID = roomID
    end
    local roomName = roomDef:getName()
    if roomName ~= previousRoomName then
        player:Say(getText("Room Name:  " .. tostring(roomName)))
        previousRoomName = roomName
    end

    local buildingID = square:getBuilding():getID()
    if buildingID ~= previousBuildingID then
        player:Say(getText("Building ID:  " .. tostring(buildingID)))
        previousBuildingID = buildingID
    end
end

-- creates event that updates as the player moves
Events.OnPlayerMove.Add(checkCurrentRoom)

if you ever wanna be lazy. just need a better way to print the text. and print works perfect btw

#

just want another way

#

or just use chunk debugger but this is faster lol

wet sandal
drifting ore
drifting ore
#

i'm dumb btw. Say worked also

weak sierra
#

@drifting ore oh hey it's u, please take down your duplicate copy of my mod.

crystal terrace
#

Hey, managed to generate jar files for lua and java code. Im currently looking at unofficial docs from 41.78, how can i use it effectively to search through code?

weak sierra
#

even if i was ok with it being reposted, it's certainly not OK to do it just to slap instructions on it

#

that could be a discussion post on my mod

#

it doesn't have to be a repost.

drifting ore
#

sorry was my first attempt at figuring everything out. when i saw where you sourced it from open source. i assumed to only have to give you credit for your additions to the original and add my own from there. meant to change what was in here sooner. but i will just release a new one for auto restart.

north junco
#

Hi there. Does anyone here have any idea of how to replace zombie sounds? I'd love to get into modding, but it seems awfully complicated. Maybe replacing sounds could be a good place to start.

drifting ore
north junco
#

Are there any particular parts related to replacing sounds, or is this more of a general thing?

drifting ore
#

there is some specifics. check them out and see for yourself

jaunty marten
drifting ore
#

there we goooooo

#

thanks

#

thanks great

jaunty marten
#

yup

north junco
#

I mean, that's an awful lot of links. Where the hell do you even begin?

drifting ore
#

begin where you are interested in modding lol

#

if sounds, start there

north junco
#

I see nothing about sound.

drifting ore
#

oh shoot maybe you are right lol

north junco
#

Is it under something like "global modData" or "custom timedAction" or something?

drifting ore
#

no lol.

north junco
#

I mean, these are very extensive links, but I'm being thrown into the deep end here.

jaunty marten
north junco
#

I can code, yeah.

drifting ore
#

i think wolfs guide is good to start at least

#

gives all basics

#

just literally start at the beginning. its 30 min read total maybe

jaunty marten
#

my start of modding gone via looking into code of interesting mods and getting how it works

#

u can check some mods that doing custom sounds and way how they using it

#

as I think it's faster way if u already can code by urself

north junco
#

Didn't realize replacing existing assets would require custom code.

#

I had an idea of a more complex mod later down the road, but wanted to start with something simple just to get acquainted with the mod structures.

faint jewel
#

I need a code monkey

ancient grail
jaunty marten
jaunty marten
#

it's exists on lua side

drifting ore
#

When a trait is equipped how do you give it starting gear?

ancient grail
jaunty marten
#

it's working

#

I want to know how to remove in-building light without light switcher obj, still can't find..

ancient grail
#

Ow nice ... If we can set and get
Im curious if we can change the loot just by room id

#

RemoveLampPost or Lightpost or something forgot the exact thing

jaunty marten
#

lamppost is a out-building lights

ancient grail
#

Thats what burryaga did for his darkvision mod
He spawns and despawns light

jaunty marten
#

I tried to get all lamppost in my chunk and tp to it and there was real lamppost on wall

#

not like in-room light

ancient grail
#

I see

jaunty marten
#

when searched in pz source seems in-room light linked to light switcher and only to it

#

I hope it's wrong

#

and I'm just blind

ancient grail
#

Ah so you saying without it ubcant despawn it?
Perhaps its like the glitch i do with the generator vehicle
Spawn jt turn it in then remove it as a tile not( vehicle despawn)

Pls share to us if u figure it out cuz i have no idea too

#

It will provide unli power

#

Maybe thats the same case

jaunty marten
ancient grail
#

Try using delete everything but floor

#

Theres a thing like that

ancient grail
jaunty marten
ancient grail
#

Isolight ?

jaunty marten
#

literally no obj on any square in room

#

only walls 🦧

#

I creating tool to completely remove building (roomid and light) after destroying walls and etc but if don't turn off the light then I can't remove light so my tool will have condition to turn off light before destroying the building

#

I don't want any conditions

#

it's a shit

ancient grail
jaunty marten
#

sounds like a way

#

not so clean but crutch

ancient grail
#

Unless you can switch it off while u iterate the objs

jaunty marten
#

I can't

#

there's literally no light obj

#

it's just exists

ancient grail
#

So weird

jaunty marten
#

like rendered thing

ancient grail
#

What is it your are doing anyways?

ancient grail
#

Ah ok does it includes cars
And zeds and corpses

And LOL players

jaunty marten
#

but until I find a good way this mod is going into a trash bin for me

jaunty marten
#

it's all objects

ancient grail
#

Could be useful for builders

jaunty marten
#

I want to use it to destroy useless buildings next to my base

ancient grail
#

Like the one i did was just for trees but if you could remove everything cleanly then you can open up a shit ton of possibilities for servers who likes building stuff

jaunty marten
#

cos RoomID > 0 drawing fucking shade on square

ancient grail
#

U play SP or on a server?

jaunty marten
#

both

ancient grail
#

No floor above but theres a black thing when u enter

jaunty marten
#

yeah

#

:setRoomID(-1) fixes this

#

but I want to add feature to remove light shit too

ancient grail
#

Yeah and it was in the middle of a race track that my friend built lol

#

How do i do that?
getCell():setRoomID(-1)

Like that?

jaunty marten
#

getPlayer():getCurrentSquare():setRoomID(-1)

#

didn't test in sp but for mp it will drop to default value after relog

#

so need save in moddata and use it again after connect

drifting ore
#

How do you give a trait starting gear?

drifting ore
jaunty marten
#

omg, didn't see this msg

drifting ore
#

he made it up. not real

jaunty marten
#

looks crazy

drifting ore
#

just a mock up

#

yes a super sick concept

#

someone is working on something like that now if you look above that post

#

similar at least

#

also aiteron said last night for me to post on forums

#

i did and they said they will try to make tool for dynamic room id change

#

and for save on restart

#

for 42 tho

jaunty marten
# wet sandal

yea, I see, but seems it's not linked with real weight otherwise it will so complex to compare container capacity with it

jaunty marten
drifting ore
#

i think it will be a little more complex than that tbh. i'm just a dummy

#

goto my post dude

#

in forums

#

speak more on it. enlighten more so it can be better

jaunty marten
#

can u link it?

drifting ore
#

yes

#

lmao this link size

#
jaunty marten
#

XD

#

thx

drifting ore
#

np ty. i'm sure they will most likely do this feature for 42 in one way or another so this post will help remind. love the devs though all of them are pretty great

#

at least the ones i've interacted with lol

jaunty marten
#

yh

vast nacelle
#

In my mods I'm using Sandbox options to control the chance of items in the loot distribution. I was told to that OnInitGlobalModData was the earliest event that fires after Sandbox options are loaded and testing in SP with LootZed, everything works as intended. If I set them do my disabled setting, the items don't appear in LootZed. However I've noticed that even though I have them disabled in MP, they still can appear as loot.

Do Sandbox Options get loaded from the server to the client after the OnInitGlobalModData event in MP?

ripe basalt
#

I was wondering if anyone knows where the line for corpse removal is and if it can be manipulated outside of the sandbox options

humble oriole
#

Do lua files with the same name get overwritten as well?

rain shard
drifting ore
#

ah did you check out those mods i mentioned?

#

i swear they made some table or something to do that quickly

#

anyways just saw it and remembered

ancient grail
# drifting ore How do you give a trait starting gear?

This isnt related to modding at all..
#mod_support would be appropriate for questions not related to developing a mod

But to answer the question
Theres a check box on the server option to add the default items to spawn with and a textbox that lets you configure what items to spawn in additional to the default itemspawns

I may be mistaken and it might be on the sandbox option so check both just to be sure..

ancient grail
thick karma
# faint jewel do this one!

Lol please make sure there's a mod option to turn that off if you aren't going to do gamepad support, because most servers probably gonna want that, and then my people will join and be unable to use inventory lol.

viscid steeple
vestal geode
#

Does anyone happen to know in which class the logic of specific vanilla clientCommands is located?

#

More precisely from "plaster"

golden sparrow
cosmic condor
#

shattered dreams...

fast galleon
#

oh same time, jinx

vestal geode
#

Oh, it's missing in my annotations lib, no wonder I didn't find them. Thank you guys!

#

Hm, that sucks. Plastering my custom DoorFrame works if placed with north sprite, but not if its placed with sprite. ClientCommand will receive correct args, but transmitUpdatedSpriteToClients() won't transmit any object change... Creepy

ancient grail
#

Any ideas (easy to do) to make like a fuel system for the chainsaw mod im currently working on

drifting ore
#
table.insert(ZombiesZoneDefinition.Default,{name = "Generic01", chance=200000});
table.insert(ZombiesZoneDefinition.Default,{name = "Generic02", chance=0}); ឡ```
#

Would this work on zombiezonedefinitions ?

#

Its an example, I just want to make sure only one type spawns, but to also block others from spawning with the chance=0

#
ZombiesZoneDefinition.CountryClub = {
    Tourist = {
        name="Tourist",
        chance=0, ```
#

As well as something like this, the lines will still be there but the chance is 0

thick karma
#

Does the modder behind Aquatsar's Yacht Club (specifically its gamepad input) live here?

vestal geode
drifting ore
thick karma
#

Okay I guess 4 people made it... Not sure who did the gamepad hack.

drifting ore
vast nacelle
thick karma
#

I seeeee... Does Aiteron mind being pinged? I was going to offer code that it would be nice to see in Aquatsar.

#

I know he's a pro now, so I don't want to bother him.

#

(Not a request for code to be written... literal working code.)

#

(If Aiteron sees this: I dgaf about credit, I just use the mod and I am currently making a mod to adjust something in a way that probably most gamepad players will prefer).

drifting ore
#

Custom traits

ancient grail
drifting ore
#

It’s fine

#

We all make mistakes

ancient grail
#

You have to check if the person has trait after they first spawn
Check it using events

Then yeah if they have the traits give them their stuff

vestal geode
ancient grail
#

Ye his answer are specific. Enough
Just missing the add item part

getPlayer():getInventory():AddItems(item, qty)```
thick karma
#

Has anyone written a guide for the very basics of installing and using Project Zomboid mods? Such as how to check for and obtain dependencies, and how to enable access to the sandbox options when you're hosting?

oak folio
#

In vanilla can recipe magazines spawn in zeds' inventory? If so, does anyone know which vanilla file do that?

mint helm
#

Hey guys, so I'm a bit curious about how people go about starting to make mods. What software do you guys use to make these models, how do you integrate them into the game, how much coding is involved

ancient grail
#

@jaunty marten yo vishnya have you seen line 894 of ISWorldContextMenu.lua ??
idk i just saw it and it might help but im sure you ahve seen this already
but just to be sure

drifting stump
thick karma
#

Word, I looked around but it was all very high-level, verbose stuff aimed at modders. @drifting stump

#

I may write one up soon, but didn't want to waste time reinventing the wheel.

drifting stump
oak folio
#

yeah i checked that

drifting stump
#

how much coding depends on what you want to do

oak folio
#

the base loot table in Distributions.lua doesn't have recipe magazine

#

I'm having this weird problem in my server. A recipe magazine that isn't included in the container loot table & zombie loot table somehow still spawn

#

some player were able to get it and they said they got it from zeds' corpses

drifting stump
#

got mods?

oak folio
#

yeah but I checked every mods that mess with zeds loot tables (inventorymale & inventoryfemale ones), and they don't add that magazine

#

so i'm guessing the only way for that magazine to spawn in zeds inv was through a special loot table for special zeds?

#

but I don't know if special zeds have additional loot table or not

#

Is this something that exist in vanilla?

#

like hunter zeds have special items that spawns in their inv? Like hunter magazines?

jaunty marten
#

but on lua side even no IsoRoomLight class

#

so it's unreachable x)

ancient grail
#

stressed
I tried

ancient grail
oak folio
#

I'm talking about recipe magazines, like "How to use generators".

ancient grail
ancient grail
oak folio
#

I know how to add stuffs to the inventorymale & inventoryfemale loot tables.
The problem I'm having is somehow an item that isn't in these 2 tables managed to spawn in zombie corpses

#

and I'm trying to find out how it did that

#

So you know how Police zeds have guns and holsters on them right?

#

How does the base game add those items to police zeds?

#

Correct me if i'm wrong, but they aren't added through the Distribution.lua, ProceduralDistribution.lua or SuburbsDistribution.lua right?

ancient grail
#

It has the "outfits" and it is there that they define what zeds carry

#

If this helps

#

Let me know if found it otherwise ill look for it for u

oak folio
#

If you don't mind, can you find it for me please?

sour island
#

You can also just spawn stuff when the zombie dies

#

If the only items are those magazines I'd suggest figuring out a way to search all of your downloaded mods at once

#

For the phrases of the item's ID

drifting ore
#

hey. say i wanna make a patch for a mod that removes the magazine you learn skills from. Do i just import it and comment it out? how would i override it

sour island
#

(although it sounds like an odd thing to just add magazines)

oak folio
#

is that a thing in vanilla?

sour island
#

Not that I'm aware of

#

It may not have the items IDs then but maybe an indirect call to them

#

You said the magazines are themed to the zombie?

#

Are any of the magazines not vanilla?

ancient grail
oak folio
#

I think so cause I think i saw recipe magazines in zombies corpses in vanilla game before

sour island
#

Saw recipe?

oak folio
#

as in past tense of see

sour island
#

Oh haha

ancient grail
sour island
#

Clothing XMLs would be for outfits not loot

ancient grail
#

Ahh didnt know that

#

Ok so you have to spawn em via lua

#

Events.OnZombieDeath

oak folio
#

are guns treated as clothing or loot in vanilla game?

sour island
#

They're handled as weapon attachments

#

For embedded as well as equipped weapons

#

Readable magazines wouldn't be there either

#

There's also loot distribution lists for outfits

#

None of those have magazines added to them via a mod?

oak folio
#

what is the name of those list?

sour island
#

It's under all.outfit. I believe

#

Under the main loot table

ancient grail
#

If you are stuck with this i have a shotty proposal for you to be able to do this in a hacky way

Just use the clothing xml and add a clothing piece that can be converted into the magazine u want

drifting ore
#

to overide an item do you do module base { item magazine {stats}}?

ancient grail
#

Or when they die they spawn worlditem

sour island
#

The outfit ID is used to identify the list header

oak folio
drifting ore
#

same lol

sour island
#

Off the top of my head it should be suburbDist.all.outfit.OUTFITID

ancient grail
#

From zeds?

drifting ore
#

everywhere

sour island
#

If you add the OBSOLETE parameter it should prevent spawning

ancient grail
sour island
#

Oh that's handy

#

If you also want to remove existing copies you can change it's item type to something else and still OBSOLETE it

#

But that would break the items

ancient grail
#

Make it OnPostDistributionMerge

oak folio
#

oh wow thanks guys, i'll try that.

ancient grail
#

I made a version of this but for vehicles
I was able to remove it from the dsitrib via debug
But we need to run it before the game starts so i tried ongamestart well idk why it wont work
The vehicles still spawn

So what we did was just open then world travel to spawn the wanted vehicles then install the vehicle nods we dont want to spawn. It was a shitty alternative but we didnt have a choice

drifting ore
#
function RemoveItemFromDistribution()

    RemoveItemFromDistribution(Distributions[1], "Greenfire.CannaMag1", nil, true);
    RemoveItemFromDistribution(SuburbsDistributions, "Greenfire.CannaMag1", nil, true);
    RemoveItemFromDistribution(VehicleDistributions, "Greenfire.CannaMag1", nil, true);
    RemoveItemFromDistribution(ProceduralDistributions.list, "Greenfire.CannaMag1", nil, true)

end``` just this?
drifting stump
#

that is a terrible idea

#

infinite recursion

drifting ore
#

alright so just the one ```function RemoveItemFromDistribution(Distributions[1], "Greenfire.CannaMag1", nil, true)

end```

drifting stump
#
RemoveItemFromDistribution(Distributions[1], "Greenfire.CannaMag1", nil, true)
#

why are you declaring a new function

#

and youre also calling it from within making an infinite recursion

drifting ore
#

so the "RemoveItemFromDistribution" is the function?

high bramble
# faint jewel

tell me when u release this and the name of the mod itstsu6Luv looks so good

high bramble
#

oh nice

high bramble
faint jewel
#

nah an existing world will work fine. though i do not currently have a way for you to get the items other than spawning them in

vast nacelle
faint jewel
#

corpses and generators yes. I am still working on the rest to replace the world items.

#

it's just if they are containers it does NOT like to make them carryable.

vast nacelle
#

I actually wrote code that does it funnily enough for someone else.
Someone I think was doing exactly what you were doing but they seem to have gone MIA.

#

Want the code? Feel free to use or not.

faint jewel
#

sure?

#

who was it by chance?

vast nacelle
#

SEDDOWS

faint jewel
#

LOL i was working wiht him.

#

OH NICE.

oak folio
faint jewel
#

this ..... this could work

#

do i have to define for each angle of the tv?

vast nacelle
#

Better it have some use even if its just as a reference than being stuck in the shadow realm.

#

Yeah

faint jewel
#

oofda

#

so it's gonna be some work. BUT... i think it's possible.

drifting ore
faint jewel
#

are these clientside luas?

#

i mean they READ like it but just wanna make sure

vast nacelle
#

Yes

faint jewel
#

mind if i DM you?

vast nacelle
#

Sure, go ahead

strange sequoia
#

Hello hello, does anyone know if there's a way to alter the spawn of special zombies like Cops, Firefighters etc... I'm trying to make a mod where all zombies spawn with tattered clothes and i managed to do it but special zombies still spawn with their clothes

winter bolt
acoustic dust
#

in which pz script, can i find things like duct tape, glue, wood glue and adhesive tape?

acoustic dust
#

thx

strange sequoia
winter bolt
#

you dont need to overwrite the file i dont think

#

you can make your own lua file and then remove entries from the zonedef table

strange sequoia
#

That's what i did at first, but then special zombies would still spawn

#

I'm going to try to overwrite but instead of deleting the outfits, change the spawn chances to zero

#

Alright that seems to work for now πŸ™‚

fast galleon
#

loaded save, 20K errors, thanks EHE. I thought my game a crashed for a moment stressed

#

I bet I can't reproduce it with normal save, this was my copy for debug.

sweet gust
#

uuuh I am new to this game and tried to open the lua debugger with F11 like it says in the options but it doesnt seem to do anything neither does the console

do I need to enable something to use it during a solo game?

fast galleon
sweet gust
#

ah, my bad, sorry, forgot about pins

thick karma
#

Anyone on gamepad? Anyone?

#

Somebody celebrate with me 😭

dark wedge
sour island
#

Preposterous :0

raven spoke
#

is it possible to temporarily hide my name?

thick karma
#

Yeah, it has no gamepad support until my latest mod goes live.

#

Also tbh it just looked and worked like crap a little (especially the headers above the boxes, which would overlap on larger fonts), so I'm cleaning that up.

#

@dark wedge

#

New error messages / sealed offer feedback

thick karma
#

@dark wedge

#

I don't want to jinx myself but I think I'm done.

dark wedge
keen haven
#

Is this where I would ask about a mod idea I have and if it's a good idea/feasible

sweet gust
#

no ones gonna stop you since since the description of the channel is so vague

bronze yoke
#

go for it, it suits the channel's purpose well enough

keen haven
#

Furby you strap onto your back that screams and it's eyes flash red and blue like a police car siren.

#

Based off a bootleg I own in real life

bronze yoke
#

this nightmare creature is real??

cosmic condor
#

lol

keen haven
#

I had this idea before I heard of the mod that just lets you put a flashlight on your belt and because of that I never looked further into making it a reality but seeing as a viable strategy is to turn on ambulance sirens to attract hordes, i feel like such an item would be useful to some players

#

Also. He's my son

dark wedge
#

having a furby just go off when you walk in a room as a kind of mini alarm would be horrifyingly hilarious

sweet gust
#

imagine it going off when you get attacked and then just get horded

keen haven
#

The possibilities are endless. All of them aren't good possibilities, but there sure are a lot

#

My hope is I could just steal a bit of code from the ambulance lightbar. Will this work out? Who knows.

bronze yoke
#

i know burryaga just made something to do with a light attached to the player so that aspect is certainly possible

#

i've heard there's some difficulties to do with audio sources based on clothing, but i've never looked into that - i don't really see why it'd be troublesome

keen haven
#

Good to know that's an issue people have so if I test and my nightmare abomination is silent I won't go 'how did this happen'

thick karma
#

Or you can pull it from Darkvision on the Workshop.

#

Note that I did not send my light data serverside and it may not be exactly what you're looking for... you may want to take the light object and attach it directly to an item, in the same way the game does that for flashlights. My light gets attached to an invisible lamppost on the players x, y, z.

keen haven
#

Also πŸ“ noted. One way to find out

cosmic condor
#

it's gonna be LIT 🚨

jagged kraken
#

A while back, I came with an unusual question, and I'm still not really sure about the facts surrounding it, but hopefully someone can help me take off with it...

#

Can a worn item be coded to have special animations played when worn, sort of overriding certain "normal" game animations?

thick karma
#

@dark wedge

#

@keen haven Hey just saw this, sorry. Let me post it.

#

Been working on the screenshots you're seeing

keen haven
#

Pog!!!!!

thick karma
#

@dark wedge All fonts will be served

robust briar
#

So looking around I am seeing a few different ways to add a setting to the settings menu.

Is there an "official" way to add a checkbox to the menu. I need to add a "I have epilepsy, dont give me a seizure" mode to my mod for MP servers and I want to make sure I do it right.

#

Like, if someone could just point me to a mod which does it the right way, I'll figure it out from there.

bronze yoke
#

a few different ways? that surprises me

robust briar
#

Well, there are some mods which rely on other mods, and some which roll it themselves. I just want to make sure since its someones health that I am 100% it will work

bronze yoke
#

hmm well

#

as far as 'official' there's just sandbox options

#

i think the 'mod options' mod might suit your use case better since an option like that should really be per-client

robust briar
#

Well, this would need to be per client

bronze yoke
#

i've never used it so i can't tell you how to set it up but that's where i'd look

robust briar
#

Okay, ty ❀️

robust briar
bronze yoke
#

glad that worked out ^^

thick karma
# robust briar Wow, that was REALLY easy to setup. Thanks again

If you're curious about strategies for setting up mod options, I have mod options in the Darkvision code I posted above. I like to build the SETTINGS table as mod inside the main module of my mods, so options will read e.g. Darkvision.mod.options.optionName

#

Obviously purely a style thing but if you care, you care lol

robust briar
#

So simple seems to be the way to go

thick karma
#

Hell yeah. 🀘

robust briar
#

I was hoping there was some PZ option for this I could piggy back on, but seems not.

thick karma
#

I use the same mod albion told you to use, just to be clear.

#

I just use a slight variation on the way it's set up

#

Very slight, purely for legibility

robust briar
#

Nice. I think I got it well modularized but checking out Darkvision now

thick karma
#

Lovely

humble oriole
#

So, I'm trying to reuse a bit of vanilla code, any idea why this wouldn't be working?

        -- our item can store fue, but doesn't have fuel right now
        if item:hasTag("EmptyPetrol") and not item:isBroken() then
            return true
        end
        -- or our item can store fuel and is not full
        if item:hasTag("Petrol") and not item:isBroken() and instanceof(item, "DrainableComboItem") and item:getUsedDelta() < 1 then
            return true
        end
        return false
    end)```
#

I have a empty gas can, a half full gas can, and an empty water bottle in my inv, and none of them get added to pourInto

drifting ore
#

maybe because it needs

        return
    end
fast galleon
#

print(item,condition1,condition2)

humble oriole
drifting ore
#

last try lol. please forgive me as im trying to understand some things and as long as noone else is responding i feel it doesn't hurt too much lol
is it assumed you already are using local player = playerObj:getInventory() also?

humble oriole
#

ahah, yea

#

it parses through the inventory, and even returns true when it hits the Drainable Combos, but for some reason it's not passing the array list to pourInto. I was hoping to use TIS' code to ensure future compatibility, but I may not be able to.

sour island
#

getAllEvalRecurse requires a secondary argument

#

try , ArrayList.new()

#

also for the sake of readability, I'd suggest pulling out the function as a local

jaunty marten