#mod_development

1 messages · Page 141 of 1

fading horizon
#

it gets called when made by itemfactory

#

from a previous comment i found in here

sour island
#

hm, I didn't know such a function was a thing

bronze yoke
#

i never knew

fading horizon
#

.

#

this is where i got the knowledge from

indigo hemlock
#

watermelon ice
Omg it’s actually there ❤️

fading horizon
#

i told you i would haha

#

just fingers crossed I can get it working lol

frank lintel
#

its the normal tuesday update/auth nonsense

jaunty marten
#

OnCreate pass InventoryItem object and this obj have no setDisplayName method

fading horizon
#

dang

#

I guess i have to create individual items for each flavor then

#

that sucks

jaunty marten
#

u can check this mod

#

and do same thing

frank lintel
#

that and your random isnt the same length as your flavours?

fading horizon
#

🙂

jaunty marten
#

but problem is it will be same item and need to expand item panel each time

sour island
#

You can change item names

frank lintel
#

ah

jaunty marten
#

better to do a few items

sour island
#

it's just setName()

sour island
#

Items stack based on names

#

rather than types

jaunty marten
fading horizon
#

ohhhh

#

okay

sour island
#

hopefully this is changed when item variations are a thing

fading horizon
#

hmmmmm

sour island
#

I made some of my mods stack based on types

fading horizon
#

do I go with the flexibility of having it as one item with stacking issues or do i make 16 different flavors

#

i think i can live with the stacking issue

sour island
#

also I dislike handling vhs tapes for this reason lol

fading horizon
jaunty marten
fading horizon
#

well the random assignment idea was cool but I guess i'm gonna have to do different versions for each flavor then

#

damn

#

thank you for your help

#

oh shit

#

no it doesn't

#

it separates them automatically

#

lets GOOOOOOOOOOOOOOO

#

it changes the name in the spawn window too even though

#

and this makes it so users can't spawn their fav flavor

#

so individual items may still be better

#

is that important? What do y'all think

jaunty marten
fading horizon
#

player spawning is just for debug

#

and no, USB-C charging doesn't exist in 1990 so you can't recharge them

#

that's my lore and i'm sticking to it

#

when it's out of uses, it changes to an empty gnomebar

#

which i plan to make it so you can still vape it, but you'll audibly cough and not get the smoke effects

#

i know vanilla metal items explode in the microwave so i'm going to make it do that just in case you try

#

lmfao

#

also explodes for unknown reason

#

that's the fix

#

if theres a car battery charger within 50 tiles, just destroy it, whatever

sour island
#

yes, items regardless of types stack based on name

#

and the chat suddenly updated

#

Idk why discord keeps doing that to me 😅

steel delta
reef karma
fading horizon
#

i will

#

just getting base functionality down first

#

which i'm on the last part

#

making all the different icons right now

reef karma
#

kk making sure. Looks great so far btw! Congrats

fading horizon
#

thank you!!

reef karma
#

the server should add a SME role for people that know what they are doing lol

frank lintel
fading horizon
#

icons are done

reef karma
#

looking fresh. btw did you say that they are not rechargeable ?

fading horizon
#

indeed

#

i don't want to go down the rabbit hole of dealing with batteries and all that

#

they'll be common enough that you can just find another

reef karma
#

sounds good, i was gonna mention batteries but you beat me to it

#

also is there a way to have the f11 menu not take the entire screen so i can check out the changes live or it is just not supported

Edit: erase i even asked this. i can quickly f11 out of it, i thought it wasnt going to save my current stage

frank lintel
#

could just look at how flashlights do it

fading horizon
#

kinda just want to get a v1 out at least because i want to work on other stuff but feel like i need to finish this first

#

i feel like a different vape mod would be better suited for that anyways

#

a vape mod where you have one base vape item that can be recharged but theres different vape juice in the world

#

got the icons to change depending on the item name now

#

weird the icons don't persist through a game reload

#

this has been a pain in the ass, i'm just going to make different items for each flavor

#

more tedious but its easier and more reliable

reef karma
#

if you aint planning on adding more flavors it is probably better unless you want to troubleshoot it lol, the simplest way it usually the best way

lusty kindle
#

Could someone give me quick run down how the evolved recipes work?

#

Trying to add the ability to add some spices to marinating meat

frank lintel
#

someone was asking about making a sound for everyone just came across this lil thing... GameServer.PlaySoundAtEveryPlayer("Thunder"); lulz the thunder of the banhammer

#

and apparently that has a server option as well. nice.

#

hmmm bansteamID command doesnt use that at all.

rancid panther
reef karma
#

is there anything that i can follow on how to learn to use the console system ?

#

got the basics i guess for selecting and reloading, skipinto/skipover ( i think) just having a hard time watching local variable in the specific lua that i am working in

lusty kindle
#

cause that seems like a compatibility nightmare

ancient grail
fading horizon
#

last chance to get your fav elf bar flavor in game

#

finishing up the mod now

#

probably publishing tomorrow

#
"Tropical Rainbow Blast",
"Blue Razz",
"Watermelon Ice",
"Pink Lemonade",
"Black Ice",
"Cool Mint",
"Banana Ice",
"Grape",
"Lemon Mint",
"Strawberry Banana"```
#

current flavors

reef karma
#

Something cherry please 🥹

#

"Cherry Bomb"

fading horizon
#

theres a cherry one

#

ill add that

reef karma
#

what was it cherry cola?

lusty kindle
#

I was a sucker for kiwi passionfruit guava

fading horizon
#

just cherry

#

from what i saw

#

ive never had a cherry one

#

that sounds good tho

reef karma
#

i think i found the cherry cola one

#

anything cherry sounds good to me honestly. best ice cream flavor = amarena (which are cherries)

fading horizon
#

@indigo hemlock

#

its really happening

indigo hemlock
#

Noice!

indigo hemlock
#

Is there a way to unlock recipes added by mod with skill level? Like whenever player have metalworking > 5 then recipe unlocked

fading horizon
#

new flavor just dropped

fading horizon
#

models in game

fast galleon
fading horizon
#

suddenly the model now doesn't show during the animation

#

wtf

#

i was done

rancid panther
#

looking good

#

i really am tempted to get started on some other mod ideas but i've been holding back so i can spend my free time playing

fading horizon
#

putting comments on the same line as the statement is what messed it up

#

everything works now

#

now just to add the finishing touches and its ready

silent sapphire
#

Hello I was wondering if there is a way to run a function when a Literature item is being read? I want to check the proffesion and depending on the proffesion unlock different recipes

small topaz
silent sapphire
#

Ye rn I check on char creation for profession and give recipes like that but would like to link it to a literature magazine

#

Think the timedaction is what I am looking for tnx for the response

neon bronze
#

Yea you‘d need to overwrite the vanilla perform function and then check if its your book being read

#

Or you look into that wildlife magazine which gives you the herbalist trait

small topaz
neon bronze
#

I regularly mean overwriting if you alter the code in any way

#

Like that would be patching or adding to it

#

But id still call it overwriting

small topaz
#

oh ok. when I hear "overwrite" I always think about completely replacing the vanilla code with your own code (and not executing the vanilla code as in my example). but terminology here is probably not so precise...

chrome egret
#

Good morning, all

#

Just sucks that right now you're giving up VCS highlighting and all the other cool Visual Studio Code functionality

#

Offers a quick solution to my ask

#

Easier than discussing with a junior dev 😉

#

Although it's wrong about where that queueNext function is called

frank elbow
#

Not looking forward to the dark near-future of people making and revising bot-assisted code & then requesting help for code they don't understand

indigo hemlock
frank elbow
#

Requesting help wouldn't even be a problem were it not bot-assisted—something about that just rubs me the wrong way. At least understand what you're doing on some level first

chrome egret
#

eh

#

The bots are advancing faster than human ignorance

#

At work I'm playing with the idea of taking a model, fine-tuning it on our code repos, and making it explain the weird intricacies to new team members

frank elbow
#

Fair

frank lintel
#

talking about it in general I just ignore it but someone started doing what you said... yeah think thats fair.

#

if anything to me its dangerous... if ya understand it thats one thing doing it without any understanding of the language yeah... bad times coming. frog

ancient grail
#

if i have this

local container = {}
container.table = {}
#

then the global will still be local right

#

cuz you have no way of accessing the parent

#

?

frank lintel
#

actually a good ?

calm depot
#

there is nothing global in that snippet

ancient grail
calm depot
#

if you had a global called container then it would be shadowed by your local declaration

#

you would need to use _G.container in order to access it

frank lintel
#

here I was thinking table was the global in question...

calm depot
#

that's not a global, that's creating a key called table inside container

ancient grail
frank lintel
#

yeah the coloring was what had me

tribal summit
#

Can anyone help me with my nitrado server?

ancient grail
tribal summit
#

they are useless

#

Like no matter what they say it’s not on their end

#

I’m to the point I’m going to start pulling my own teeth out of frustration. I’d love to just be able to send my log files to someone who is more capable than I and have them sort it. But if not I’ll just give up

ancient grail
#

Switch hosting to someone who actually play pz
@crisp flicker

#

He offers hosting pz too

tribal summit
#

I actually play the game, just trying to switch to a dedicated server from a private host.

I would love help setting it up or having someone host

ancient grail
#

Yeah contact that dude
He will set u up

tribal summit
#

Thank you.

indigo hemlock
#

So i’m trying to make player automatically “learn” a recipe whenever player reaches certain level in fee different skills. What should i dig up in docs to make this happen? :)

ancient grail
#

look at how vanilla makes player slearn stuff on the lua

fervent bay
#

none of those make it clear about how to do what i want

frank elbow
#

There are existing NPC mods and you can look at their source to help figure out how to do what you want to do. @frank lintel has been poking at superb survivors(?) for a while

#

I don't want to dissuade you from trying, but it's worth noting that NPCs are a fairly lofty goal for a mod

frank lintel
#

Trying to... but can't talk I'm at work now

fervent bay
#

i prefer EBM over SS

#

that's my goal

#

i've accepted he will never update it

#

if not me, i'd request someone else do it

#

sounds like that wouldn't be allowed in the workshop

#

i tried, there are so many subfolders and files i didn't know where to start finding the information i need

#

i'm not smart

#

at coding, at least

#

i do have a basic lua understanding but when i don't know what to look for, i'm out of luck

#

and i can't find the mod you mentioned above

ancient grail
frank lintel
#

🚬

reef karma
#

Hey yall! Is there anything I can peak for some extra info on HotKeys menus? Trying to add a toggle for a menu

ancient grail
#

Hotkeys menu wdym? R u referring to the right click context menu?

reef karma
#

hotkey as in key binds under options

sour island
#

If you want a key to do a certain action you can use the key down event

#

But if you want it to be configurable there's a bit more to adding it to the menu

reef karma
#

i have added to the menu already. I am having issues actually using it if that makes sense

#

I have the HotKey.lua file (I think correctly) and i can see it under options

sour island
#

So the triggering event that I see a lot of mods use is simply key down -- then you check what key was pressed

#

There's a good example in vanilla with flashlights and shouting

fading horizon
#

Good afternoon everyone

reef karma
#

Good afternoon!

reef karma
#

@ maemento how is your mod doing?

fading horizon
#

Basically finished

#

All the models and textures are done

#

All the items are defined and added

#

I think it should be released today

#

Only things left are getting item distributions right, which I'm dreading because itemzed doesn't work on my pc

#

And also adding a cough animation / popup to hitting a dead vape

#

And adding an icon to the tool tip

reef karma
#

Makes them lose hp when hitting dead vape

#

You are going fast with this lol. I just added a little thing under the char info tab

fading horizon
#

Shouldn't be too hard. There's a weed mod that makes you cough and smoke half a joint sometimes so I just need to look at that code

reef karma
#

i have been using the workshop as stackoverflow in college. same thing

fading horizon
#

Hahaha

#

What did you add to the char info tab?

#

At this point with how many smoking mods I've made, I'm tempted to make a map with a smoke shop and custom tiles

reef karma
#

I could not find a counter that showed how "old" the map is, so i made it show how many days it has been since the map was started.
I wanted something that did not reset when you died. I played a bit too mch ARK and for some reason I like to see it

reef karma
fading horizon
#

Yeah

fading horizon
#

Does it reset on a map reset?

reef karma
#

the only way for it to reset is if the current time is changed

#

since it is current time - og time pretty much

#

and kinda neat, the game actually does not allow you to go before the start date as far as i could see/try

#

Kinda like that on the bottom for now. should be good enough, it was just to play around with things 🙂

red tiger
rustic garnet
#

Hey Neko! I will look into it I was already searching that, but are you sure it's not another mod since I can't actually seem to replicate it 😦

clever spruce
#

we do have an inventory hotbar mod or 2.

sour island
rustic garnet
#

Mhmm interesting 😦 would you mind dming me the list of mods at some points? I can check if it could be some weird imcompatibility. But the fact it's drawing certain at a darker color is really weird.

cosmic condor
#

🤔

#

got ideas, but have to check if someone already done that

#

Steam Workshop search is too literal

fading horizon
#

That's why I Google search sometimes instead

#

Identifier tags + project zomboid steam workshop

#

Sometimes it works better

#

You could even filter results to only show workshop links

sour island
#

There's another mod that adds tabs for bags -- maybe you have both on?

#

Darker textures are usually held by the sub item listings when they're expanded

#

Perhaps thats related?

sour island
#

But you can try to find it looking for the key down event

reef karma
#

Sure thing, thank you i appreciate it.
I will start looking and see if i can find it myself

fading horizon
#

I'm about to dig through some files too so I'll let you know if I spot anything

reef karma
#

Thank you both 🥹

reef karma
#

I have made the key binding menu in the options. next is to actually implement it

fast galleon
#

the you check if it's the right key number

modern hamlet
#

if i add lumberjack profession like this, does this override the vanilla?

local lumberjack = ProfessionFactory.addProfession("lumberjack", getText("UI_prof_Lumberjack"), "profession_lumberjack", 0);
lumberjack:addXPBoost(Perks.Axe, 2)
lumberjack:addXPBoost(Perks.Strength, 1)
-- lumberjack:addFreeTrait("Axeman"); this line commented out, rest is vanilla

fading horizon
#
UI_vape_cough0 = "*cough* *cough*",
UI_vape_cough1 = "This thing is out of juice...",
UI_vape_cough2 = "Nothing but burned cotton...",
UI_vape_cough3 = "I need a new vape...",
#

can anyone think of other good things to say when a vape is dead / out of juice

fading horizon
#

oml

#

💀

reef karma
#

Not very NPC like, I just thought it was funny lol

#

"Time to go find another..." could be one but it is very similar to your last one

fading horizon
#

you're still pushing for it

#

lmao

#

i guess i have to add that feature now

#

for those who missed it

#

putting the vape it the microwave should make it explode

#

like how vanilla does with metal items

#

i'm curious if this will even work because its not a food item

#

but then again in the lua i could try to set cookable to true

#

but that could lead to some weird results lol

reef karma
#

can you set it to only cookable only if in the container ?

fading horizon
reef karma
#

i am pretty sure that microwave allows for non food items to be placed in it, so maybe you can use that

fading horizon
#

that's a pretty good idea

#

i bet you can

#

ill have to look up how to do that

#

but first I should see if i can even find how the vanilla items explode

#

because if i can't find that, it's all for nothing

reef karma
#

i would hope the game has a way to see if an item is in a container (it has to so it can deal with weight reduction from bags and what not)

reef karma
#

microwave gets set on fire and vape deleted xD

fading horizon
#

oh wait

#

all vanilla does is just start a fire on that tile

#

(id actually never seen how vanilla works lol)

#

that shouldn't be too hard?

reef karma
#

yea that is what i thought. if you manage to get if the vape is in the microwave, you could get the location of that item and set its tile on fire and let it unfold.
Or you can just make it explode, which ever one is easier

fading horizon
#

the joys of learning modding

#

thank god for tab search

#

i need to start using tab groups more

#

but i'm just lazy

#

i used to be so organized

#

tab groups are amazing if y'all don't know about them btw

reef karma
#

i cant spam the x with tab groups.

#

i refuse

fading horizon
#

but then you can do this

#

its fun

#

like a slinky

reef karma
fading horizon
#

middle click the tab to close it

#

or right click the group to close all

#

oh shitttttttt

#

i just hit a milestone

#

i got over 1k subs on my mod

reef karma
#

loses satisfaction. but yea, group tabs are great, i lose them for work

fading horizon
reef karma
#

Congrats spiffo

#

dark patches ?

fading horizon
#

no actually

#

clove cigarettes took off for some reason

reef karma
#

Dark patches is right there too

#

931

fading horizon
#

ooo

#

i'm so happy that people are using my stuff

#

feels good to be able to provide a cool thing

reef karma
#

i think one of mine is at 400 or so but i only made it for my server and i didnt realize there were like 10 that did the same thing lmao

#

pz community has been great so far, cant say the same for most other games i play xD

fast galleon
#

I wonder if I can sneak in an update that will do weird stuff on saturday. and drive people crazy.

reef karma
#

No plz, i use your ladder mod

fast galleon
#

ah, more fall chance gotcha

reef karma
#

you can make the animation go sideways instead

#

so rotate the character 90 degrees

fading horizon
#

you made the ladder mod?

#

bless u

#

i use that in the doomsday RV for even more interior space and it's amazing

rancid panther
#

im waiting for the official ladder mod patch so i can go back to it

tribal shuttle
#

how do i structure an array like this is lua?: a = {[x1,y1],[x2,y2]}

fading horizon
#
local table = {
{x1,y1},
{x2,y2}
}
#

i believe

frank elbow
#

Tables can contain tables; you can just include them like that

fading horizon
#

a table of tables

frank elbow
#

Yup

reef karma
#

or also known as a 2d array

fading horizon
#

arrays in lua are only for stuff like lua {"Monday","Tuesday","Wednesday"}

#

with no pairs

#

so then you go array[1] for Monday

fast galleon
#

co` made the ladders mod actually

frank elbow
#

I would argue arrays aren't a thing in Lua but I just got back from work so I'll save semantic arguments for another time

fading horizon
#

Omar is correct

#

@tribal shuttle

reef karma
frank elbow
#

Just scrolled up and saw y'all's tabs and I'm sick to my stomach

fading horizon
reef karma
#

11.2 – Matrices and Multi-Dimensional Arrays 😛

frank elbow
#

Again, this is a semantic argument & not all that important—that section of PIL is discussing how to represent those well-known data structures with tables

fading horizon
#

how does my workspace make you feel

frank elbow
#

I would have a breakdown every time I turn on my computer

fading horizon
frank elbow
#

Two screens is quite enough for me lol

fading horizon
#

this is 3

#

not 1 big one

#

two vertical monitors on the side

frank elbow
#

Yeah I could tell, seems potentially useful but especially with multiple windows per monitor it'd be too much for me

#

I'm sure I could get used to it, but I like keeping it simple

fading horizon
#

i made a function that makes ctrl + right click make the topmost window go to the bottom so I can navigate stacked windows super fast

#

so that makes it more manageable

frank elbow
#

Such a programmer solution lmao

#

The workflow must remain, I CANNOT alter it. I will create a keyboard shortcut to make it better

fading horizon
#

i have ocd so efficiency is my jam

frank elbow
#

I've been there a couple of times too (so no judgment here)

reef karma
# fading horizon

i cant do vertical for some reason. i have 3 horizontal and i still complain

#

i would like one on top ngl

fading horizon
#

vertical is really only used for secondary things for me

#

references, chats, email, spotify

#

my main monitor is like 32in or something so its big enough for lots of stuff

frank elbow
#

I use my left monitor for secondary stuff, usually discord as a default

#

Idt I could do vertical either

reef karma
#

right is for discord only pretty much. middle is for actual things and left for all learning stuff. and work (diy work-pesonal setup) discord sometimes gets replaced by notepadd++

#

invest, you wont regret it

fading horizon
#

old pic but this is what my screen setup is

#

its comfy

frank elbow
#

You got the pink ditto and everything

#

Must admit, nice setup

fading horizon
#

i must mod the shit out of every game I play until it breaks

reef karma
#

I just realized that I do not have a light in here after I saw yours in the back

fading horizon
#

me playing skyrim in 15fps with like 400 mods

#

this frustrated me so much

#

i wanted cute characters

#

not big tiddy lewd ones

fading horizon
frank elbow
#

I usually go w lamp light because the ceiling light is too much for my hermit eyes

reef karma
#

who needs light when i have monitors to shine the way?

#

on dark theme.

frank elbow
#

Praying for your eyeballs

fading horizon
#

light w rgb bulb for maximum coding effectiveness

reef karma
#

I have Hue rgb on the only light i have xD

frank elbow
#

My bed has rgb lights that I didn't realize were there when buying it

#

I have never used them

reef karma
frank elbow
#

I'll save my eyeball prayers then

reef karma
#

yea better for someone else

fading horizon
#

But do you have them

#

under your bed

#

also say hello to my junior developer

#

helps me on all my projects

frank elbow
#

If they were under it then maybe I'd actually use them

#

I thought there were two animals in that picture bc my brain (poorly) pattern recognition'd the jacket

reef karma
#

very out of the bloom but here is what I think of my dog and bigger supported during work hours.

#

I think i have a dog at least

fading horizon
#

one is under the jacket lol

#

she likes to be tucked in and covered w things

frank elbow
#

I never should've doubted pattern recognition, thank you hunter brain

reef karma
#

I got the keybind to work 😄

fading horizon
#

I wonder if I should add a keybind for a vape button

reef karma
#

i was overcomplicating it so much.

#

it is honestly piss easy now that i know lol

reef karma
# fading horizon

Question, to make a dev launch of PZ did you just add a non steam game and added the -debug to that instance?

#

or is there an easier way? I am getting tired or removing it by hand every time

fading horizon
#

1sec

reef karma
#

kk

tribal shuttle
#

thanks for the help. can i ask one more? I'm just trying to do a couple nested for loops on
table.insert(SuburbsDistributions[x][y].items, [item]);
table.insert(SuburbsDistributions[x][y].items, [chance]);
but im still trying to figure out how to do that in lua.

#

i just dont know the syntax yet

fading horizon
#

-cachedir=H:\ZomboidLocal

You also need this

#

@reef karma

#

wherever you want it cached

#

then you would add -debug after that too

#

so my options for the non steam game are like this

reef karma
#

thank you! that is what i thought

fading horizon
#

it will be much more helpful than trying to get random snippets here

tribal shuttle
#

ive been doing that for days already and havent seen any

reef karma
#

Probably dumb question again but how do I add this?

sour island
fading horizon
#

ill get you the code

#

one sec

#

[h1]If you like this mod, check out my [url=https://steamcommunity.com/id/Meylmao/myworkshopfiles/?appid=108600]other mods![/url][/h1]

#

if you want a full rundown on how my description is laid out I can give that

reef karma
#

Wait you can do basic html in the description?

fading horizon
#

since there's lots of formatting

#

bbcode

reef karma
#

that is so cool

fading horizon
#
Tired of poopy looking clothing patches? This mod makes leather clothing patches a dark grey / black color.

This is my first mod, so it only includes leather patches for now. 

If there's further interest, I wouldn't mind altering the rest of the patch types as well. 

[h1]Compatibility[/h1]
[list]
[*]Safe to add or remove to any existing save. 
[*]Should be compatible with any mod
[/list]
[b]Game may need to be reloaded for texture to take effect.[/b]

[h1]Feedback[/h1]
Please leave any suggestions, comments, issues, or feedback that you have. It would be greatly appreciated. 

[b]Don't forget to like and favorite this mod if you enjoy it![/b]

[img]https://steamuserimages-a.akamaihd.net/ugc/1660101375273576639/0C12E325C464F5DC166E5FF2AB70A43581BED64F/[/img]

[h1]Permissions[/h1]
[code]This mod's permissions fall under TIS's policy [url=http://theindiestone.com/forums/index.php/topic/2530-mod-permissions/?p=36477]Credit Where It's Due[/url]

You are free to use the mod for personal use, in multiplayer servers, and even include it in mod packs! Just please do not redistribute or reutilize the files of this mod elsewhere without permission ❤. 

This mod can be added to and extended by anyone in the community, but credit must be given to the original author within the files of the mod - and posted alongside the mod wherever it roams.
[/code]

[code]Workshop ID: 2949818236
Mod ID: darkPatches
Version: 1.0[/code]
#
[h1]If you like this mod, check out my [url=https://steamcommunity.com/id/Meylmao/myworkshopfiles/?appid=108600]other mods![/url][/h1]
[url=https://steamcommunity.com/sharedfiles/filedetails/?id=2949818236][img]https://steamuserimages-a.akamaihd.net/ugc/2046362392225211607/72B0EBF6F283ADFEC058805DC437E6B06EEC21CD/?imw=150&imh=150&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=true[/img][/url][noparse]     [/noparse][url=https://steamcommunity.com/sharedfiles/filedetails/?id=2951287846][img]https://steamuserimages-a.akamaihd.net/ugc/2046363109997134551/25FB1A820B4AD7852AF82B879EE045769A79EC91/?imw=150&imh=150&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=true[/img][/url]```
#

theres the code for this

#

so you can see what the tags do

reef karma
#

Is it okay if i use your style ?

fading horizon
#

also this

#

note that the widgets do not work

#

at least on workshop pages

fading horizon
#

i love text formatting

#

lol

#

spreadsheets?

reef karma
#

Thank you again. I feel like i am getting baby sited in here lol

reef karma
fading horizon
#

i'm just happy to be able to help

tribal shuttle
# sour island You'd need to know what x and y would be

yes, thats because its a continuation of my nested tables question earlier. table ={ {x1,y1}, {x2,y2} }
normally id have something like: for i in table: table.insert(SuburbsDistributions[i[x]][i[y]].items, [item]);
i just dont know how to properly write a lua for loop

sour island
#

oooh

#

are x and y the same or are you trying to nest the items in multiple sublists?

#

distros are a bit of a tricky situation cause there's multiple levels

tribal shuttle
#

distribution tables are listed as a 'room' and a 'container'. like 'armysurplus' + 'clothingrack'

#

i can make a for loop to insert into every room/container type that i like without repeating hundreds of table.inserts

reef karma
# fading horizon i love text formatting

whenever you get the chance.
For the image part of other mods sections, the image has a steamlink, did you save it in the library or just snagged it from the mod preview?

fading horizon
#

mod preview

humble oriole
#

ok, I'm still up against a wall on this logging thing.

    {
        Base.Cigarettes=2,
        Result:NailsBox,
        Time:60.0,
        keep ATMReceiver/ATMReceiver3,
        NeedToBeLearn:false,
        CanBeDoneFromFloor:TRUE,
        Category:APA Camp Shop,
        OnCreate:Recipe.OnCreate.Logger,
    }```

```lua
function Recipe.OnCreate.Logger(items, result, player)
    print('[APA-ATM-Transaction] Player: '..player:getUsername()..' -- Recieved: '..result:getType())
end```
#

that on create is running on the server, why isn't it printing to the debug log?

reef karma
#

Got it thank you 🙂

fading horizon
#

@reef karma

#

heres some other info that's relevant if you need it

reef karma
#

I got it, now it does not look like crap anymore. thank you again

fading horizon
#

of course

#

for future reference, i'm always happy to help with text formatting

#

i seriously mean it when I say i enjoy it lol

#

things... must... look... pretty

#

time to test if all the new stuff i added to the mod will work

#

fingers crossed

tribal shuttle
#

okay, do i have this right?

for i=0, containerTable:size()-1 do
    for j=0, itemTable:size()-1 do
        table.insert(SuburbsDistributions[i[0][i[1].items, [j[0]);
        table.insert(SuburbsDistributions[i[0][i[1].items, [j[1]);
    end
end
reef karma
frank lintel
#

I prefer more something like this but minus the bg, it be something dark.

lusty kindle
#

Anyone know the resolution size for steam workshop images? The ones I'm using now got pretty distorted

frank lintel
#

as in for your mod?

reef karma
#

the preview ? isnt it 256x256

frank lintel
#

icon is 256x256

fading horizon
#

256 yeah

lusty kindle
#

not the preview, like the slideshow ones on the workshop

fading horizon
#

slideshow can be any size i think

frank lintel
#

no there is a limit I believe I ws just looking that up yesterday 1 sec

fading horizon
#

The usual display size in the Steam Workshop is 200×200 pixels.

#

Previews can be any size (they'll scale down to 636x358, however) which is... odd. However using a 16x9 screenshot should downscale close enough.

As for thumbnails, again they can be any size but they'll scale to 100x100 for the smaller versions and 268x268 on the page itself

frank lintel
#

thats like um 2106

#

600x900 atleast by 2019 might even be higher lemme look more

#

I was on some reference page that had a whole table of all that stuff

lusty kindle
#

hmm okay, I'm probably just using the wrong aspect ratios

#

tyty

frank lintel
#

still never found on steam like official documentation saying for community mods what is what, names etc cuz some sites talk about icon_sm lg huge etc

lusty kindle
#

yeah I'll have to play around with them I think. Thanks for the link tho, I'll try some of those

sour island
frank lintel
#

they all say for the icon square and then the poster or anything else pretty much is 16:9 long as you keep that in mind doubt ya'll have issues

#

ipairs Chuck right finally...

sour island
#

I was thinking he could use the keys as values technically

#

but if he wants specific items for specific places

#

then like... I don't know why he isn't just inserting them by hand(?)

frank lintel
#

dont mind me I was looking at the page I posted above... actually liking the minimal color scheme.

#

we pair'd up in topic ^_^

sour island
#
local yourList = {["armysurplus"]="clothingrack", ["a1"]="a2"}

---option #1
local itemsToAdd = {["item"]="chance"}
for roomID,containerID in pairs(yourList) do
   for item,chance in pairs(itemsToAdd) do
      table.insert(SuburbsDistributions[roomID][containerID].items, item)
      table.insert(SuburbsDistributions[roomID][containerID].items, chance)
   end
end

---or option #2
local itemsToAdd = {"item","chance"}
for roomID,containerID in pairs(yourList) do
   for i=1, #itemsToAdd, 2 do
      table.insert(SuburbsDistributions[roomID][containerID].items, itemsToAdd[i])
      table.insert(SuburbsDistributions[roomID][containerID].items, itemsToAdd[i+1])
   end
end
#

This would work if the items are the same for each container

#

You could also ditch the keys and for i=1, #items, 2 to use every other entry

#

could do an associative list too

#

if you want different item groups

frank lintel
#

yeah all depends what you trying to achive

sour island
#

Also, I don't think this saves on too much time/energy as oppose to just typing up the inserts lol

frank lintel
#

no but logic wise like your 50/50 split is like clean and FAF

sour island
#

I wonder if the [""] are needed

frank lintel
#

you could try that in the online compiler easy enough

tribal shuttle
frank lintel
tribal shuttle
frank lintel
#

interesting.

sour island
#

ah true the keys would match

#

then I guess you could make both for every other entry

#

that is if you want the same group of items to be inserted

frank lintel
#

still surprized it still ran on the top one... even though it sure didnt like it

sour island
#

why wouldn't it?

#

that'd break in game tho

frank lintel
#

I just dont get why the compiler underlining... thats all

tribal shuttle
frank lintel
#

empty then refill them?

#

or you talking script level wise mixing up

tribal shuttle
#

id considered it. but then i had the BRIGHT IDEA of doing semi randomization instead and here i am. leave the original loot tables intact so that containers still have a slant towards their original contents instead of building a new table from scratch

frank lintel
#

add a field 'opened' if it dont exist on containers. should be an on open event, clean it fill it if !opened

#

if thats even viable dunno honestly but if this was MC thats how I'd do it

sour island
#

Oh

#

I feel like I already wrote this for someone

#

It was to you @tribal shuttle

tribal shuttle
#

yep. im just a weirdo who wants finer control

sour island
#

You can add specifics to the code I gave

fading horizon
#

everything is actually working omg

sour island
#

"---Add extra exceptions here if needed"

#

"---Make changes to distro here as well if needed"

tribal shuttle
#

im just not a programmer

#

i dont have the base of knowledge to do creative things

#

but i am stubborn

sour island
#

What is it that you want to do outside of shuffling the loot tables?

reef karma
#

Make it blow yet?

tribal shuttle
#

have precise control over every value of every container in the game. no biggie

fading horizon
#

literally just tested microwave

#

unfortunately the metalvalue property doesn't seem to do the trick

#

😭

reef karma
#

that means you gotta do it the harder way..

sour island
#

I thought you wanted it to be randomized?

#

I believe you're over thinking this a bit 😅

tribal shuttle
#

thats my specialty

sour island
#

You could group the rooms in rarity categories

#

then shuffle those within their groups

#

But randomizing the loot won't be precise - the most precise you can be is to manually make those changes

tribal shuttle
#

which is why im brute forcing a for loop to do something like a million lines of code for me?

sour island
#

not really as you'd need to retype the entire distro

#

unless you're creating a giant list of items to give to every container

tribal shuttle
fading horizon
#

OH SHIT I DID IT

reef karma
#

it blows??

fading horizon
#

Tags = HasMetal,
This will allow an item to explode in the microwave

reef karma
#

ez dubs

#

congrats

fading horizon
#

video incoming

sour island
#
   local itemsOverride = {
      "item","chance",
      "item","chance",
   }

    for roomID,data in pairs(SuburbsDistributions) do

        for containerID,contData in pairs(data) do
            ---if room's container's data has an items list OR if it has a junk list with items
            if (contData.items and #contData.items>0) or (contData.junk and contData.junk.items and #contData.junk.items>0) then
                contData.items = itemsOverride
                contData.junk.items = {}
            end
        end
    end
#

@tribal shuttle ?

frank lintel
#

thought there already was a microwaveable tag/flag

sour island
#

This would override every loot table's items - you may also have to override the rolls for each container too

tribal shuttle
#

right. ive got it figured out at this point. i just came here today to figure out how to write a for loop in lua correctly

fading horizon
#

😈

reef karma
#

Ah yes, it is time

#

if you let it go, does it actually let the counter catch on fire and burn or does it stop

fading horizon
#

if fire spread is on yeah

#

just one more feature to add and its done

#

then i can get started on my next mod

#

which is a very small mod but it will be easy

reef karma
#

you are just rolling through them uh

fading horizon
#

its fun

#

i like making things

#

plus i'm bored of designing my website so this is a good side project

reef karma
#

I have another one I want to do as well, just gotta find some time for it

rich hazel
#

Would someone be willing to talk with me about a potential mod idea? I'm wanting to commission one but I'm not sure my idea is even viable so I'd like to figure that out before I go waving money around.

frank elbow
#

I looked into this before after someone else (maybe Poltergeist) mentioned that their mod calling Remove broke some other mods using the same event. The event in question was an OnInit handler. It seems to be a bug in the code that handles events

#

Since it removes the callback from the list of callbacks while the code triggering the event is iterating through it, it'll cause one of the callbacks to be skipped during that run. Should still fire for future triggers of the events (which is why it'd be noticeable for something like an OnInit~ event)

fading horizon
#

Custom context menu icon has been added

#

literally just want to change the position of the context menu and the mod is DONE ||for now||

frank elbow
#

Done for now is too relatable

#

"it's in a feature freeze now I will stop adding things I swear"

rain shard
#

Actually, I guess I should ask here. Do you have to modify lua for the starter kit or is it strictly server inis?

frank elbow
#

Pretty sure you can just set the items the player starts with in the INI (idt this is really a mod question?)

rain shard
#

Hrm, alright, so it is via the inis. If it doesn't involve lua back to the other place.

drifting ore
#

so i was trying to make a mod but idk how to make the player stressed for feel pain randomly can someone help plz

frank elbow
#

What have you tried so far? Where are you stuck?

drifting ore
#

so far

frank elbow
#

Well, I'm seeing setAdditionalPain on BodyPart, but I'm unsure whether you're looking for pain or stress

#

See ISCleanBurn.lua, ISDisinfect.lua, ISRemoveBullet.lua, ISRemoveGlass.lua, and ISStitch.lua for examples of that

#

Did you mean "stressed or feel pain"?

drifting ore
#

ya

#

like they feel like that at random times

frank elbow
#

Okay, stress can be set with setStress on Stats, which you can get from the character with player:getStats() (assuming you've defined player)

glass basalt
frank elbow
#

I did not realize that message was from almost a week ago lol, whoops

#

Showed up when I opened discord

fading horizon
reef karma
#

Amma take that too for my future mod ^

fading horizon
#

then just check the every 10 minutes event or something and make a random chance for it to add those stats

#

that's the basic structure at least

frank lintel
#

f'n steam rolling back my hours again

merry saffron
#

Is it possible to completely prevent burnt cars from spawning by modifying VehicleZoneDistribution?

shadow trench
#

i might be wrong on that, but i think there's a setting in the sandbox settings to not spawn burnt congestion

merry saffron
shadow trench
#

ah i see

glass basalt
#

You need to find the procedural distribution config that adds the burnt cars to trafficjamn, trafficjamw, trafficjame, and trafficjams

#

For each cardinal direction

merry saffron
#

I just managed to make it work by modifying VehicleZoneDefinition.lua directly. now I need to figure out how to override it in a mod

glass basalt
#

I definitely recommend making it a patch, not an override. Might break other mods

#

Look at the mod "Crashed Cars", it already does this functionality

merry saffron
#

That's what I did

#

I made a file similar to it's one, but it doesn't affect the vehicle spawning

glass basalt
#

If you make a mod that just removes burnt cars and nothing else, I'd use it tbh

glass basalt
#

Does Crashed Cars overwrite the default procedural vehicle distribution

merry saffron
glass basalt
#

No, I mean does it overwrite the file (have the same name)

merry saffron
#

The crashed cars mod has a file called CrashedCars.lua, so no I don't believe it override it

glass basalt
#

Okay great, that means its a clean patch

#

If you send me the file (because I want this mod to work), I can clean up the code and optimize it

#

For you to then publish

merry saffron
glass basalt
#

Good idea, although it is working as it is rn because the traffic jams are instead pulling other vehicles (the non-burnt ones)

merry saffron
glass basalt
#

The parking stalls each have a table of possible vehicles to spawn

#

What is happening is that you are removing the IDs of the burnt vehicles

#

And their weighted spawn rate

#

And so as a result the table is smaller but the rest of the vehicles have the same, if not higher, chance to spawn

#

Trying to add vanilla vehicles to the traffic jams won't quite work because they are already in that parking stall table

#

Although you could tweak their spawn rates, and that would work

merry saffron
#

When I was going through the world, I a couple of weird traffic jams, I thought something might be up

glass basalt
#

It is simply random and not guaranteed. Some traffic jams will be a bit weird

#

It is like that even with burnt vehicles

#

Unless the burnt vehicles have a table of their own, I haven't looked at the code in a while

merry saffron
#

Yeah, it's just when I spawned into this world, I got whole bunch of weird ones in a row

glass basalt
#

If you open up WorldZed or w/e its called, you can see the actual spawn zones, and you'll see what I mean

merry saffron
#

On further investigation, it seems it might have just been a very unlucky streak of strange looking traffic jams

glass basalt
#

There are some traffic jams that work as "parking stalls", and then there are the scenes, which are the ones that have two cars crashed and such

merry saffron
#

And I was looking at this and thinking maybe I should change the vehicle instead of changing the spawnChance to 0

glass basalt
#

Scenes are handled differently and are harder

glass basalt
#

Yeah okay, replace them with their non burnt variants

#

I would do it as = nil, it's the cleanest way

#

No semicolons either because lua doesn't need them

merry saffron
#

I copied this table from the game files

#

This is the one that currently need to be rewritten as a mod

glass basalt
#

Wait, the table has normal vehicle IDs? I thought the burnt vehicles have their own IDs

merry saffron
#

I already modified it somewhat in this image

glass basalt
#

Ahhhh okay

merry saffron
#

Including the IDs

glass basalt
#

Then you'll need to do this: keep the lines with the burnt vehicle IDs, but set them equal to nil (no index or spawnRate), and add your new lines with the normal vehicle IDs and set their spawnRate equal to the number the burnt vehicles have

#

Lol, i just realized something: you could set burntvehicle equal to a traffic jam table

#

And that would remove all the burnt vehicles for you and automatically add normal vehicles instead

merry saffron
glass basalt
shut oar
#

Hello, I was trying to make a simple zomboid mod to add a couple extra crafting recipes to another mod, and it worked fine, however it also seems to have caused other recipes to disappear, like sawing logs and such. This is the only file I have for the mod: https://pastebin.com/KeC95nXs

bronze yoke
#

is it by chance called recipes.txt?

#

you'll replace any file with the same name as your file, so it's important to give them unique names

shut oar
#

Yes it is called that, thank you

#

yup now it works perfectly thank you

fading horizon
#

ive been trying for hours to figure out a way to play the "cough" animation

#

ive tried with variations of playEmote but I can't get that to work whatsoever

#

has anyone done this before?

frank lintel
#

BodyDamage:setSneezeCoughActive(arg0) ?

fading horizon
#

can't get it to work

#

i don't know if i'm using it correctly though

#
self.character.BodyDamage:setSneezeCoughActive(1) 
self.character.BodyDamage:TriggerSneezeCough()```
frank lintel
#

you try it in console?

glass basalt
#

if you want to make it just coughing, for smoking, then you need to link the animation & sound, and manually do what that method does

frank lintel
#

been looking for the dang thing...

fading horizon
#

thank you for the explanation

#

i think I will simply omit the coughing feature for now

#

having the text on the screen is good enough

glass basalt
#

i got interested, so ill take a look after editing this vehicle distribution script

fading horizon
#

basically it's a new timed action for vaping

#

once the action is completed and its in the perform function

#

it checks whether the vape was dead or not

glass basalt
#

def needs the coughing lol

fading horizon
#

if dead, i want the player to cough

frank lintel
#

but the burnt is the best part!

fading horizon
#

i'd really like it to work, i'm just not sure how to make it work lol

#

but i will keep trying

frank lintel
#

sadly they didnt exist back then. they all smoked either camel no filters, marbs or newpors and green

fading horizon
#

am a stubborn bitch

fading horizon
glass basalt
#

time to do it ourselves

fading horizon
#

i don't know how

glass basalt
#

setActionAnim("whatever the fuck the animation name is")

frank lintel
#

self.player:getBodyDamage():setSneezeCoughActive(0); << is code that SS is using.

#

just happened to come across actual usage of it while searching

fading horizon
#

alright lemme give that a go

frank lintel
#

yeah its using self.player not character?

fading horizon
#

maybe its just a diff variable name

#

worth a shot

glass basalt
#

self.character. timed actions usually don't use .player unless you specified otherwise

frank lintel
#

thats not in an event so that would be prob why?

#

well who knows it is in update()

glass basalt
#

if you throw the lua file in here then we'll see

fading horizon
#

well

#

it did nothing

#

hmm

#

no errors or anything

#

that was using

self.character:getBodyDamage():setSneezeCoughActive(0);
        self.character:getBodyDamage():TriggerSneezeCough();```
frank lintel
#

well 0 is not coughing I would think

fading horizon
#

maybe it needs to be 1 instead of 0

frank lintel
#

honestly why its an int is beyond me for bool logic

fading horizon
#

still nothing

glass basalt
fading horizon
#

so i guess what i would do is make a copy of the default cough.xml animation file

remove the parameter permission it needs

make a new timed action that happens after a burned vape is smoked that uses the "new" cough animation with a custom sound of only coughing?

#

is that how it works

merry saffron
glass basalt
glass basalt
#

specifically I am now using LF endings instead of CRLF, and idk if PZ will like that lol

glass basalt
glass basalt
#

gonna look and see what the anim name is

fading horizon
#

media\AnimSets\player\ext

#

Cough.xml

#

is where the file is at least

glass basalt
#

Bob_EmoteCough is what you want

#

now to find how to call the anim

glass basalt
#

lol, van on top of cop car

merry saffron
#

Yeah, I noticed that as well lol

glass basalt
#

@fading horizon
yeah ok, just do setActionAnim("Bob_EmoteCough") in the perform() section of your timed action

#

have an conditional if statement if the vape is empty or not to do the anim

fading horizon
#

trying it

glass basalt
#

now, for the sound...

fading horizon
#

already have the conditional set up

glass basalt
#

god, so many sound files lol

glass basalt
#

🤔

fading horizon
#

Object tried to call nil in perform

glass basalt
#

ahhh, maybe its not bob_emotecough

#

try the other name, i forgor it

#

okay, just try "Cough"

fading horizon
reef karma
fading horizon
#

heres the code for the perform if you want to take a look

glass basalt
#

ahhh, remove the self.character: in self.character:setActionAnim()

#

you don't need that

#

or maybe you need something else, ill check my code

glass basalt
#

change it to "Bob_EmoteCough" or "Cough"

fading horizon
#

testing

#

lmao

#

it did something at least

#

character is just doing this now

#

just boolin

glass basalt
#

🤔 🤔 🤔

#

my character does the same shit after my animation

#

im guessing that's the placeholder

#

which anim name string did you use?

fading horizon
#

it didn't do the cough animation tho

merry saffron
# glass basalt awesomeeee

Wait not it's not working. I think the backup I had in my main zomboid folder of my modified VehicleZoneDefinition might have been affecting it

fading horizon
#

i did Bob_EmoteCough

#

trying just cough now

glass basalt
fading horizon
merry saffron
fading horizon
#

same with bob_emote

#

hmmm

glass basalt
merry saffron
fading horizon
#

oh

merry saffron
#

It had a different name, but I forgot that didn't matter

fading horizon
#

its looking in the player/actions folder

#

but cough is in player/ext

#

so i wonder if i put it in the actions folder

#

if it would work

glass basalt
#

hold on imma check actions

wheat kraken
#

there is a way to get username or steam name from the main screen?

glass basalt
fading horizon
#

fuck but it extends another file within that folder

#

so i might need to remake both

glass basalt
fading horizon
#

-<animNode x_extends="Ext01.xml">

#

so it depends on that file

#

which is also in that folder

#

that's in the cough animation

glass basalt
#

try both

merry saffron
#

How can I override the vehicle spawns defined in VehicleZoneDefinition with a mod?

merry saffron
glass basalt
#

the file I gave you overrides the vehicle spawns, by setting to nil

merry saffron
#

It doesn't work

glass basalt
#

🤔

#

where is the file?

merry saffron
#

I thought it did, but it was the copied file in the main zomboid folder that was prevent the burnt cars from spawning

#

I have the mod file in "C:\Users\Danny\Zomboid\mods\noBurntCars\media\lua\shared"

glass basalt
#

so, you aren't able to overwrite other vehicles you are adding, or the file is not working at all?

merry saffron
glass basalt
#

darn, that makes no sense. that file should work

fading horizon
#

no luck on my end either

glass basalt
fading horizon
#

tried several different configs

#

i'm okay with no coughing animation tbh

#

this is becoming a big big pain lol

glass basalt
merry saffron
#

For some reason, this file in this mod just seems to be incapable of changing anything. I don't get it

glass basalt
#

lemme try fixing that line ending I was talking about lolol

#

difference is line ending metadata

reef karma
#

@ Maemento you can always do an update later on when you get around to it. Sometimes the best thing you can do is step away for a bit and start looking at it fresh.

#

You didn’t release it yet did you?

fading horizon
#

nope

#

i still need to do the item distributions

#

but that's it really

reef karma
#

It would be great if you can get the animation to work but the mod is still great without it right now

#

Bruh how the fuck do I go to the line on mobile without having to send multiple messages ? Wtf

glass basalt
#

can't, sucks ass

reef karma
#

I swear it was a thing before

glass basalt
#

usually M+KB it's shift-enter

#

i checked, can't do it either

glass basalt
#

maybe it's the keyboard settings but my phone doesn't let me do anything related to lines

reef karma
#

When I was on android I don’t remember having this issue

#

Maybe Google keyboard had it

fading horizon
#

Phone

Test

reef karma
#

Wtf

glass basalt
#

witchcraft

reef karma
#

That is it. I am switching back to android

fading horizon
#

i just hit enter

#

pixel 6a

glass basalt
#

I am on android too, hold your horses lol

reef karma
#

Nha. Let me pull up my one plus phone

#

Hold YOUR horses lol

glass basalt
#

Phone

#

Test

#

Lol

reef karma
#

I knew you could.

#

iPhone gotta be special

glass basalt
#

My phone keyboard auto sends, doesn't let me shift lines

reef karma
#

Nha
Android
Just
Works

glass basalt
#

i guess discord hates my android phone then

reef karma
#

Google keyboard or Samsung keyboard ?

glass basalt
#

other keyboard, foss lmao

reef karma
#

Prob a setting you can enable

glass basalt
#

I already checked settings 😔

#

Need to switch to a proprietary keyboard to do one thing in discord, smh

#

anyway
@merry saffron let me know if the new file with CRLF endings works or not. I'll check it myself eventually over the weekend

#

ciao, I have an exam tomorrow I am not ready for

reef karma
#

Good luck, I don’t miss exams. Ciao ciao e notte

fading horizon
#

most important part of the mod is complete

#

the mod file ascii art

reef karma
#

Indeed a very important factor of the mod

rancid panther
#

looks like its own game

#

i cannot find the specific event that triggers a jumpscare anywhere

frank lintel
#

umm

rancid panther
#

it's no big deal. it's not really a priority of mine. i just felt like looking around for it at suddenly

frank lintel
#

I sworn I seen code that called it

rancid panther
#

i could only find the tutorial playing the sound, but not the actual conditions for the sound to be played in a normal game

#

cuz in the tutorial it just plays the sound when u open a specific curtain

fading horizon
#

final models

#

feel like i need one more just to have three even rows

fast galleon
rancid panther
#

that's what i searched for

fast galleon
# rancid panther that's what i searched for
         if (this.isAlive() && var9 > 0 && this.stats.LastVeryCloseZombies == 0 && this.stats.NumVisibleZombies > 0 && this.stats.LastNumVisibleZombies == 0 && this.timeSinceLastStab >= 600.0F) {
            this.timeSinceLastStab = 0.0F;
            long var25 = this.getEmitter().playSoundImpl("ZombieSurprisedPlayer", (IsoObject)null);
            this.getEmitter().setVolume(var25, (float)Core.getInstance().getOptionJumpScareVolume() / 10.0F);
         }
rancid panther
#

what file is this in

#

thanks

fast galleon
#

IsoPlayer

rancid panther
#

ah i couldnt find that file, where is it in the directory

thorny pollen
#

ProjectZomboid\zombie\characters

rancid panther
#

IsoPlayer.class?

#

i see. thanks

thorny pollen
#

yeah do you have it decompiled?

rancid panther
#

no i never used any of this folder

thorny pollen
rancid panther
#

thanks

thorny pollen
#

np

dreamy birch
shut oar
#

In scripts like for recipes, is there any documentation for the key/value options, and for a recipe result can I use a lua function to determine the item to be given?

shut oar
#

thank youu

old crescent
#

hello, I have a question, where does the clients information stored in server

hot patrol
# fading horizon

I had followed the discussion on this yesterday, did you ever manage to make them all list as one item or did you just end up making them individual items? Asking because I had wanted to do something similar but couldn't really figure out the named literature mod to do so.

#

Looks good btw

fading horizon
#

i gave up on doing the dynamic option

#

i got very close

#

i got the naming to perform correctly

#

i got the icons to set correctly

#

but when you reloaded the game, the icons reloaded and became random and i couldn't figure that out

#

i saved the code in case anyone else wanted to look at it

#

so i'm glad i did

#

one sec

#

then in the item definition you put the onCreate parameter to be onVapeSpawn

#

or whatever you end up naming it

hot patrol
#

I'll check it out when I get home. Thanks

sour island
fading horizon
#

too late now haha

#

it made it so you couldn't spawn each flavor anyway so it wasn't ideal

#

thank you for that info though

sour island
#

Np, but you could technically have both

fading horizon
#

i'm trying to learn how to do proper item distribution now

#

much fun

#
local itemNames = {
    "GnomeBars.GnomeBarTRB",
    "GnomeBars.GnomeBarBlueRazz",
    "GnomeBars.GnomeBarWatermelonIce",
    "GnomeBars.GnomeBarPinkLemonade",
    "GnomeBars.GnomeBarBlackIce",
    "GnomeBars.GnomeBarCoolMint",
    "GnomeBars.GnomeBarBananaIce",
    "GnomeBars.GnomeBarLemonMint",
    "GnomeBars.GnomeBarStrawberryBanana",
    "GnomeBars.GnomeBarCherryIce",
}

for _, item in ipairs(itemNames) do 
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, item);
    table.insert(SuburbsDistributions["all"]["inventorymale"].items, 99);
    print(value)
    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, item);
    table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 99); 
end```

I can just do something like this right
#

obviously not 99 but

sour island
#

Using the OnCreate for the item script you could create dummy items that just selfdelete and replace itself with the actual item + set the specific flavor

#

That way you can have the default be random but also have specific spawns

#

You don't even have to script these either -- you can have the game generate them on boot

fading horizon
#

how so

#

wait i think i get it actually

#

and that way only one item would have to be added to the distribution table

#

hmmmm

fading horizon
sour island
#

You can generate scripts using scriptManager

#

And parseScript()

#

It takes a string as an argument

#

What you'd need is a table with keys as item IDs and the values as the OnCreate functions

#

Then pass a template string replacing the ID with the key and the onCreate with the value

#

I'd be curious if one could load the script for the default item

#

Would make maintenance one point

#

I guess you could parse the default script as well 🤔

#

No script text file at all

#

Lmk if anything made sense 😅

rancid panther
fading horizon
#

i'm eating breakfast while trying to wrap my head around it haha

rancid panther
#

completely forgor the ppl who were asking for it before ded

fading horizon
#

woah

#

can i know the code for making the table / borders in your description?

#

didn't know you could do that

#

like here

rancid panther
#

yea

fading horizon
#

is it just th and tr

rancid panther
#

1 sec