#mod_development

1 messages ยท Page 58 of 1

quasi geode
#

depends on what you mean by 'get vanilla traits', but yes mutually exclusive disables other traits when that one is chosen (note: if trait A and trait B are to be mutually exclusive, only set mutually exclusive on one of them - it auto applies to the other, and vanilla bugs out if they both have it set)

void fractal
#

i mean like

quasi geode
#

you mean the list of all the vanilla ones?

void fractal
#

no more like

#

holdon lemme make copy

#
nyctophobia:MutuallyExclusive({TraitFactory.Traits.Brave});
#

could i do smth like this

#

like where's the traits stored so i can exclude them

#

cause im new to all this trait stuff

quasi geode
#

should just take strings, vanilla has them as:
TraitFactory.setMutualExclusive("SpeedDemon", "SundayDriver");
as listed in shared/NPCs/MainCreationMethods.lua

void fractal
#

oh so thats where that is hiding

#

couldnt find anything about traits in the game files

#

been looking at the wrong place

quasi geode
#

if you look at the github page for the profession framework (even if you dont use it) it lists where everything related to profession and traits are defined in the vanilla files (as part of the example)

#

actually, i should fix that example to include the full paths to the files, not just the file names

void fractal
#

i actually wanted to use profession framework but like

#

my mod which isn't centered around traits would add 1 trait and that'd need a dependancy

quasi geode
#

and dependencies suck lol

void fractal
#

well idm dependencies as long as there aren't 4 of them

#

cough true music

quasi geode
#

PF was only made because i'm a lazy ass git, and dont like redundant code, the vanilla methods for adding traits and profs was too effort, and i wanted a crapload of phobias for our server (wasnt actually meant to become some dependency for all the other trait/prof mods out there) ๐Ÿ˜

#

but here we are. lol

void fractal
#

how did i not notice

quasi geode
#

ya

bronze yoke
#

dependencies are a nightmare for maintaining your mod, people *will* fork the dependencies in a way that breaks your mod

#

even with good intentions

quasi geode
#

because i dont upload it to the workshop, so its not under my name

void fractal
bronze yoke
#

pretty much yeah, there's been some pretty famous incidents with dependency forks and i just want to stay clear of all that

void fractal
#

fair point

quasi geode
#

PF's workshop status is a pretty good example of a dependency fork nightmare

void fractal
#

idk i can't use dependencies anyways

bronze yoke
#

i like to use the framework if i'm doing something complicated (i would not want to rewrite occupational clothing to not use it), but recently i've mostly used stuff that would just be a single vanilla function call anyway

void fractal
#

i just started out modding i have a LONG way to go

#

but hey now i can finally actually make the trait work

#

time to scratch my head and see if it's possible to detect if the player is standing in the dark or not

#

wooo

bronze yoke
#

yeah, better to stay clear of dependencies when you can (particularly because some of the popular ones are literally pointless)

ancient grail
#

Cuz u might try to code with lua functions that arent available on for pz

#

Such as random

void fractal
#

dawg my code looks so stupid rn but yeah

#

gonna make do

quasi geode
#

worry about functionality first, then looks XD

void fractal
#

exactly

#

so far it works

#

do u wanna see how bad the code looks rn

quasi geode
#

i can guarantee i've seen worse?

void fractal
#

hmmm

#

maybe

#
function initGame()
    local daysPassed = 0;
    function countDay()
        local player = getSpecificPlayer(0);
        if daysPassed >= 7 then
            print("7 days have passed");
            local function timeCheck()
                if nil then -- check if it's 18:00 here
                    -- play siren sounds in certain cities so everyone hears it
                    
                elseif nil then -- check if it's 20:00 here
                    -- never make it go daylight ever again muahaha
                end
            end
            Events.EveryOneMinute.Add(timeCheck);
            Events.EveryDays.Remove(countDay);
        else
            print("it has not been 7 days");
        end
        daysPassed = daysPassed + 1;
    end
    Events.EveryDays.Add(countDay);
end

Events.OnGameBoot.Add(initTraits);
--Events.OnGameBoot.Add(initOptions);
Events.OnNewGame.Add(initGame);
#

pretty bad tho

#

everything, even the traits are in the same file

#

i mean it works so i don't really give a damned but yea

quasi geode
#

yep...i've seen worse. might want to turn those 2 functions local though, they're kinda generic named (thus may cause conflicts) and only getting passed into events anyways

void fractal
#

oh i did not notice they weren't local

#

my bad

#

if you've seen worse that's a good sign for me

#

maybe i'm not the worst worst

#

don't believe adding this mod mid-game will still do the event though

#

seeing as it's onnewgame

#

i should also move this code cause

#

it's all in client

#

wouldn't work on the server

quasi geode
#

well OnNewGame doesnt trigger on server side anyways.

void fractal
#

it don't?

lapis gorge
#

can someone help me with installing the true music mod

quasi geode
#

its strictly a client event. it also doesnt trigger when the player dies in SP and clicks the new character button... though i believe it still triggers if they exit to menu, load the save and creates a new character then (it used to, i need to recheck though)

void fractal
#

well it's good that it doesn't trigger on new character

#

as i want this to fire when the world gets created

#

but yeah if it doesn't work on a server i'll have to find a different way

bronze yoke
#

isn't that a bad idea?

#

if it only fires when the world gets created, you'll need the server to stay online for the whole seven days, right?

void fractal
#

oh?

#

i mean i guess so

#

maybe this is a bit harder than i thought

#

is there not a way for a server to save a variable?

#

cause if i could save the variable it wouldn't matter cause it'd remember the time, and i could use a different event to just start ticking on world load or something

bronze yoke
#

you can save variables to global mod data, but you can probably just use something like getGameTime():getDaysSurvived() for this

void fractal
#

getdayssurvived is for a character's survival time though right?

bronze yoke
#

although i remember that not working exactly how i wanted it to when i was doing something similar, i think i ended up rounding getHoursSurvived() / 24

#

i think it was getWorldAgeHours() actually

#

i think on gametime the x-survived stuff is basically just how old the save is, on a character it's how long they survived

void fractal
#

ah

quasi geode
#

ya getWorldAgeHours

void fractal
#

let's see

#

this may be a lot better yeah

#

cause then the server wouldn';t have t obe up for 7 hours straight

bronze yoke
#

iirc getDaysSurvived only increases every 24 in-game hours after the game started, which doesn't line up with EveryDays firing at midnight, so i used worldagehours instead

void fractal
#

ah

#

that makes sense then

bronze yoke
#

there's also getNightsSurvived, but whatever the difference is that didn't work for me either

void fractal
#

aw man you guys have been super helpful

#

it works exactly how i needed it to work

#

thank you guys so much <3

tribal jolt
#

anyone here using Brita's know why you I can't make a suppressor?

#

I have a bottle and tape, tape is showing as ready to use, but the bottle, no matter where I have it in my inventory, won't highlight in the crafting

void fractal
#

this is for making mods not getting help with them

deft falcon
#

can you put " in a translation line

#

for example, UI_trait_test = "if you "XYZ" then ",

#

would that work or not

void fractal
#

i doubt

#

what if you do

#

UI_trait_test = 'if you "XYZ" then ',

void fractal
#

knowing normal progrmaming, you cannot use more than 2 " else it'll mess up

bronze yoke
#

as a devout single quote user, i can tell you single quotes don't work in the translation files

deft falcon
#

ye thats why i asked

void fractal
#

there may be a special thingy just like /n is new line

#

might be one for adding quotes

#

i've seen it before

deft falcon
#

im going to test

#

brb

bronze yoke
void fractal
#

how long is 2 ingame hours irl?

deft falcon
void fractal
#

lol

bronze yoke
#
var9 = var9.substring(var9.indexOf("\"") + 1, var9.lastIndexOf("\""));
```as far as i can tell it tells where the string is by looking for the first and last quotation mark, it probably won't care about any in the middle
crimson lava
#

earlier I asked a question about setting exterior climate colours :'). I just wanted to say that I fixed it after checking client\DebugUIs\DebugMenu\Climate\ClimateOptionsDebug.lua. My brain wasn't ready for the fact that the Color class takes RGBA values from 0 to 1, instead of my 0 to 255. My bad

deft falcon
#

1 hour irl = 1 day in game

#

so the next step would be uh

bronze yoke
#

five minutes

void fractal
#

5 minutes?

#

hmm alrightr

bronze yoke
#

an in-game hour is two and a half minutes by default

void fractal
#

so i'd have to make my audio cue like 5 min long to make it sound good

#

atleast 5 minutes*

ancient grail
void fractal
#

not bad i suppose

deft falcon
#

:)

void fractal
#

heck you're right

#

nooo

#

damn

#

but don't sounds speed up too?

#

i could swear some sounds speed up in-game

bronze yoke
#

i don't think so

void fractal
#

crying

bronze yoke
#

i can't say i know for sure because most sounds aren't five minutes long but

void fractal
#

in a server it'd be fine but singleplayer

deft falcon
void fractal
#

heck it ill just make the sirens go for a while rather than tryna sync with nighttime approaching

deft falcon
#

some do some dont

#

yea the quote thing works

#

you can do = " "" "

void fractal
#

damn that's the first time i've ever seen that allowed

#

ever

#

i still have to make my trait do something too

deft falcon
#

do what

deft falcon
void fractal
#

make players scared when they're inside/near too much darkness

#

nyctophobia moment

deft falcon
#

infact i already did it for cowardly

#

gimem a min

void fractal
#

well keep in mind i started modding like an hour ago

#

so easy for you is harder for me

deft falcon
#
local function GameSpeedMultiplier()
    local gamespeed = UIManager.getSpeedControls():getCurrentGameSpeed();
    local multiplier = 1;
    if gamespeed == 1 then
        multiplier = 1;
    elseif gamespeed == 2 then
        multiplier = 5;
    elseif gamespeed == 3 then
        multiplier = 20;
    elseif gamespeed == 4 then
        multiplier = 40;
    end
    return multiplier;
end

local function NameOfFunction(player, playerdata)
    if player:getCurrentSquare() == nil then return end
    if player:HasTrait("name") then
        if player:getStats():getFatigue() < 0.9 and player:getStats():getPanic() < 55 then
        if player:getCurrentSquare():getLightLevel(0) < 0.35 then
            player:getStats():setPanic(player:getStats():getPanic() + (0.1 * GameSpeedMultiplier()));
        end
        end
    end
void fractal
#

i'm just glad i got experience with lua

deft falcon
#

imma strip all the unwanted things

void fractal
#

there's a ...

#

getlightlevel thing..?

#

darn.

woeful plover
#

Does anyone know if there's a bug with loot tables on zombies right now? We noticed the loot levels dip a whole lot

#

We have a custom table for them, it's working, just not dropping much

void fractal
#

that's super useful

deft falcon
#

then when u call that functio u do NameOfFunction(player, playerdata)

ancient grail
#

Has anyone seen the Advanced trajectory mod

Havent tried it or seen the code. Any thoughts about it?

ancient grail
deft falcon
#

wdym embed

bronze yoke
#

i think you've misread that glytch3r

deft falcon
#

no i mean like

bronze yoke
#

they're just sending moddata as a variable

deft falcon
#

yea that

ancient grail
#

Ow ok haha

#

Ow ok

bronze yoke
#

for grabbing the player, it's better to use

for i=0,3 do
    local player = getSpecificPlayer(i)
    if player then
        -- do stuff to player
    end
end
```otherwise you're not supporting splitscreen for basically no gain
deft falcon
#

who tf plays pz in splitscreen

#

but sure lol

bronze yoke
#

it's just rarely much harder to support splitscreen, so no reason not to

rancid tendon
#

hey question

#

are mod ids case sensitive?

deft falcon
#

uhhhh probably

ancient grail
#

I think so

rancid tendon
#

drat

ancient grail
#

Why

#

Whats wrong if they are?

rancid tendon
#

i wanted to alter the case on the mod id of one of my mods for consistency but doing so would cause it to drop out of the mod lists of servers it's in

#

just me being fussy about pointless details

ancient grail
#

Hmmm try it do a modtemplate thing and try it

#

Cuz u know what .. steam might have something that auto changes the files on the client aslong as the workshop doeant change cuz thats the real address

#

Ow also i rember on the workshop page u can rename the mod.. but maybe u just rename the title ... Idk might want to test it if u still feeling obsessive

deft falcon
ancient grail
#

Ye thats what i thought ehhehe

deft falcon
#

mod name is for workshop and in mods tab

#

mod id is for other mods

#

say, if getActivatedMods():contains("ModID") then

bronze yoke
#

add it to a local save, change the modid capitalisation on your local copy, see what happens

deft falcon
#

or just do

void fractal
#

im about to do somethign stupid

#

i doubt it will work

#
local function nyctophobiaPanic()
    local player = getSpecificPlayer(0);
    local playerData = player:getModData();
    if player:getCurrentSquare() == nil then return end
    if player:HasTrait("nyctophobia") then
    if player:getStats():getFatigue() < 0.9 and player:getStats():getPanic() < 55 then
        if player:getCurrentSquare():getLightLevel(0) < 0.35 then
            player:getStats():setPanic(player:getStats():getPanic() + (0.1 * GameSpeedMultiplier()));
        end
    end
end
Events.EveryTenMinutes.Add(nyctophobiaPanic)
#

would this stack

#

the effect

#

cause if so that aint good

deft falcon
deft falcon
#

otherwise you will get no panic at all

void fractal
#

oh probably cause it will go away instantly

#

wouldn't it

ancient grail
#

Iprinted this table and returned a bunch of functions most probably they are functions. Can i check that using type() ?

ISWorldObjectContextMenu
deft falcon
#

also put this function above that function

local function GameSpeedMultiplier()
    local gamespeed = UIManager.getSpeedControls():getCurrentGameSpeed();
    local multiplier = 1;
    if gamespeed == 1 then
        multiplier = 1;
    elseif gamespeed == 2 then
        multiplier = 5;
    elseif gamespeed == 3 then
        multiplier = 20;
    elseif gamespeed == 4 then
        multiplier = 40;
    end
    return multiplier;
end

ancient grail
#

This isnt rhe whole list

bronze yoke
#

the way panic in pz works is your character has a constant decrease rate based on a few factors and any source of panic just gives you an impulse of panic

void fractal
#

ah

bronze yoke
void fractal
ancient grail
#

Its so long albion very long. Probably the longest of all lua. Its hard to event start diesecting it

ancient grail
void fractal
#

oh

bronze yoke
#

client/ISUI/ISWorldObjectContextMenu

ancient grail
#

Yes that

bronze yoke
#

what are you trying to do?

deft falcon
#

are u trying to do new context function

#

i already did one

ancient grail
#

ISWorldObjectContextMenu.setTest is probably the one i should look at

deft falcon
#

what r u trying to do

ancient grail
bronze yoke
#

you're totally on the wrong track

ancient grail
#

Heres my plan so i can properly undderstand
1 corpse
2 container
3 specific tile
4 item
5 character
6 other player
7 vehicle

deft falcon
#

are you trying to do new context function

ancient grail
#

I just want those to react to click and invi the context menu if (condition)

deft falcon
#

oh

ancient grail
void fractal
#

ruh roh

bronze yoke
#
---@param player number
---@param context ISContextMenu
---@param objects ArrayList
function onFillWorldObjectContextMenu(player, context, objects)
    context:addOption('text', first arg, function name, second arg, etc...)
end

Events.OnFillWorldObjectContextMenu.Add(onFillWorldObjectContextMenu)
ancient grail
#

Hopefuly

void fractal
#

i think i did an oopsie...............

ancient grail
#

Ye i see alot of mods do that idk why

deft falcon
#

oh

#

yea i forgot

#

you did onplayerupdate

#

lemme fix the thing

void fractal
#

is that why my trait magically dissapeared and it errors?

#

thing is

#

whenever i comment out everything but what i had before u even helped me

#

it's still gone

deft falcon
#

oh wait nvm

void fractal
#

so i prob did smth wrong

deft falcon
#

wait

#

where is your trait

#

file

#

like for the trait

ancient grail
#
addConMenu(player, target, title, conditions, func)

addSubCon(player, target, title, parent, condition, func)

and for context menu same thing

contextMain:(target, moddataARG, condition, title, function() 

end)

contextSub:(target, moddataARG, condition, title, parent function() 

end)

void fractal
#

i only have 1 file

#

for everything rn

#

life of someone whos tryna learn what everything means

ancient grail
#

Something like this @deft falcon

void fractal
#

lemme dm u it

deft falcon
#

i have no idea

bronze yoke
#

i don't understand what you're trying to do

ancient grail
#

To give an example

addConMenu(player, "household_tables_01_12", "check for fingerprints" ,someTestfunc, function() 

print("insert code here")

end)
#
addConMenu(player, "Base.Corpse", "identify cause of death", isSometest, function() 

print("insert code here")

end)
bronze yoke
#

loop through the objects passed from the event and see if the object is there, then add the context option

ancient grail
#

Yup i want to make a function that automatically does that thing

bronze yoke
#

store a table of [object type] = function and then look up every object in the table i guess?

ancient grail
#

Probably its missing another arg..
Maybe
isoplayerobject
MovingObject
isoObject
Etc idk

ancient grail
bronze yoke
#

you'd probably need different tables for different things, like a sprite table and a class table

#

wait was getting class names debug only

ancient grail
#
print(tostring(identifythis).." : ".. Type(identifythis) .." : ".. identifythis)```
#

Well im going add to this as time goes..
but i dont think i need to loop thru all the sprite just for the type
Ill just let it return string

bronze yoke
#

i don't know, unless you really need a *lot* of them i think automating it would just make it more complicated overall

ancient grail
#

If its a sprite then i jist need to loot thru the location if ita close. But then i think it already has the locatipn cz of the right click

bronze yoke
#

it only gives you the objects on the tile you right clicked on

ancient grail
void fractal
#

looking at other mod's code is really nice

#

dayum

#

didn't expect to be able to throw together sandbox settings so soon

astral dune
#

the vanilla code calls a texture I want to change with

public void setTexture(String var1) {
  if (var1 == null) {
    var1 = "dir_arrow_up";
  }
this.texture = Texture.getSharedTexture("media/textures/highlights/" + var1 + ".png");
}

but I've put a file called crash_arrow.png in my modname/media/textures/highlights/ folder and called setTexture("crash_arrow") but it continues to use the old textures. Is there something else I have to do to make a new texture work?

bronze yoke
#

you should check where this.texture actually gets used

astral dune
#

in what sense

bronze yoke
#

well i don't see anything wrong in this function so it's probably not the problem

astral dune
#

I think I found it.

#
var10.setTexture(var5);
var10.setTexDown("dir_arrow_down");

my texture only gets shown in certain contexts, otherwise it shows the dir_arrow_down instead

astral dune
#

there we go, that works. Just need to make an arrow texture that isn't terrible now

finite owl
#

Oh, good point about deleted-but-still-lingering files triggering a checksum mismatch. Hmm.

bronze yoke
#

it might not though

#

it *should* only really checksum loaded mods...

#

but it might checksum the entire workshop item, i don't know

finite owl
#

Yeah. I guess we can always tell users to unsub/resub. That cleans up the whole thing.

void fractal
#

wondering if i should keep my workshop description short or make it big and very descriptive

#

having tons of info

fast galleon
void fractal
#

hmmm

quasi geode
void fractal
#

i mean i usually do

#

even if people don't

#

it's useful to have

#

like a faq or something in the desc

quasi geode
#

some people do... but i've watched the whole first page of comments one of my items asking the same question (which is clearly stated in the short description)

#

which is why i stopped replying on steam XD

void fractal
#

if they do that on mine i'll just kill them

#

send a hitman to their location

#

ban them from using my mod

#

die puppet die

bronze yoke
#

i don't think most people read the descriptions, but i do and i like an elevator pitch followed by actual explanations

void fractal
#

oo

ancient grail
#

Annyone knows how to return a table containing isWeapon and isRanged

#

All of em

serene zenith
#

How does one get into making a mod? Wouldn't mind trying to make a van interior mod.

winter thunder
#

also, when pulling info from literature- I am trying to make an OnCreate function that will take the information from a written piece of paper, and transfer that to the resulting item from the recipe. I think I would just need to look for: getLockedBy(), getBookName(), and getCustomPages() from the paper, and set them onto the resulting item- Is that correct?

bright roost
#

is there a way of checking for another mod in lua?

worldly olive
#

Hello!!
Is there any tutorial on how to interact with objects of the world like trees? Or any mod that could be useful to read its code?

serene zenith
#

Found this: https://theindiestone.com/forums/index.php?/topic/28643-vehicle-cutaways-a-solution-to-the-camper-conundrum/
So I'm not the only one who's thought of it, and it's a basic idea of what I wanted to do.

sonic mountain
#

How does one mod a MP server

winter thunder
sonic mountain
karmic fog
#

I am going to use the getSquare() function pretty often.
Does it make sense to put the function in a local variable then? Is it better for the performance? I want to create a mod for a server, but that one has already a lot of mods, so I want to make mine as fast as possible.

quasi geode
#

its always going to be faster calling a local function vs doing a lookup in the global table and then calling

karmic fog
#

Thank you very much

winter thunder
#

if I post some lua i am working on, can someone spot check it for me rq?

#
--[[
  This function copies the information from literature, and applies that to the result of the recipe.
 ]]--
function Recipe.OnCreate.KeepText (items, result, player, selectedItem)
     for i=0,items:size() - 1 do
     local item = items:get(i)
     if instanceof (item, "Literature") then
         result:setBookName(item:getBookName());
         result:setCustomPages(item:getCustomPages());
         result:setLockedBy(getLockedBy());
         end
     end
 end
atomic crow
#

Hmm... Would it be viable to make a mod that adds like thermoses for soup and stew? I think that would make a lot of sense, to have a way to carry soup or stew on you without it going cold or stale for longer.

#

I'm not too familiar with the code of PZ so I'm unsure of the viability of a container like that as an alternative to putting soup in bowls and such. Would probably be easier with the upcoming liquid system rework from what I know of it.

grave delta
#

Did anyone else notice GetOnlinePlayers() is returning empty for non-admin players? Apparently this is happening since 41.78.12. Any suggestions on an alternative?

gilded hawk
pastel storm
#

Is there any monetary incentive to making mods? I want to join the mod scene but I would also need a donation incentive to trade my time. (Whether people dono/support or not)

opal rivet
#

Wut?

astral dune
#

I see people doing commissions sometimes, but modding is largely thankless for the most part

pastel storm
#

gotcha

bronze yoke
#

unless your mods get hugely popular, i wouldn't expect tips at all

#

commissions are another story though

opal rivet
#

U don't do it for the money

#

U do it for the Hobby

#

And your enjoy of it

faint jewel
#

no shit. i made a ko-fi and it's dry af.

#

XD

bronze yoke
#

i mean, how many times have you donated to a modder? probably never right? that's why

astral dune
#

I've been making mods for games for 20 years now and never made a dime, haha. Not that I've ever asked for money or tried to take commissions

serene zenith
# deft falcon already exists tho

Really? And your sure it's a van? Because I searched earlier, all I found were the Bus, RV, and Unimog interiors. I'm specially looking for a van.
You know, like Chris Farley.

#

"Living in a van down by the river."

opal rivet
astral dune
#

haha, I don't want money, I mod because I like games and like to add feature I like to them. As for commissions, thats too much stress.

serene zenith
# deft falcon oh nvm

Damn. Hoping I wouldn't have to. Like "oh! Did it just drop on steam while I was away from my computer."
But I guess I could try out the camper trailer in the mean time.

opal rivet
trail lotus
opal rivet
#

I think mods shouldn't be paid

#

It's kinda unnecessary

trail lotus
#

my mods.....

opal rivet
#

It really depends

trail lotus
#

they require pay

opal rivet
#

How much?

trail lotus
#

i ask for some wild shit...

opal rivet
#

10 cent?

faint jewel
opal rivet
#

10 p?

trail lotus
#

well skizot made a good bit for his last thing from me haha...

trail lotus
# opal rivet 10 p?

i try to do like 20 dollars to 100. i think glytcher made a mining mod for me it was like 200 dollars. all depends on what all is needed. skizot albion and glytcher work together pretty well so like normally i try to give out money to each of them at the end of the week.

opal rivet
#

Hell no

trail lotus
#

sometimes people donate like on the server i break it up even between them and just send them money.

opal rivet
#

How about a kidney?

trail lotus
opal rivet
#

Well it really depends

trail lotus
#

My mods dont really fit like in normal pz and are specific to my server so i make sure i pay. otherwise people make those mods cause it fits in the game.

#

that's probably the main difference.

opal rivet
#

What's your mods about?

trail lotus
#

we have a no zombie rp server. its kinda like gta5 rp.

opal rivet
#

No zombie RP

trail lotus
#

so we needed mining and a refining process to get resources and sell them to make money.

opal rivet
#

Basically life RP?

trail lotus
#

yeah

opal rivet
#

Doesn't need mining

trail lotus
#

why not lol

opal rivet
#

I think the professions you have is fun to be honest

#

Doing your Job as a Cop sounds fun

trail lotus
#

yeah we have a cop database mod, and licensing. all stuff created by RJ another guy on our server.

opal rivet
#

I see

trail lotus
#

so cops can issue tickets and what not.

#

albion is making a bad ass mod so cops can arrest people.

opal rivet
#

Sounds cool

trail lotus
#

skizot made a animation for cuffing and stuff.

opal rivet
#

That actually sounds legit cool

trail lotus
#

we got tons of custom stuff.

#

an atm on the server that actually counts money and stores it.

opal rivet
#

Wait isn't that you in the Knox County Police Car?

trail lotus
#

rn i think glytch is working on a industrial mod, where players drill for oil and create gas for the gas stations.

opal rivet
#

In the picture in showcase?

trail lotus
#

yeah i posted some pics in it.

opal rivet
#

I see

trail lotus
#

i posted those most recent pics. thats skizots hand cuffing.

opal rivet
#

Yeah I saw those pics he sended looks cool

#

I think it's something that look interesting

trail lotus
opal rivet
#

Maybe I might join

trail lotus
opal rivet
#

I mean the server

#

Nice

#

I'm like texturer so I'm not that handy

#

Or good at coding

trail lotus
#

yeah alot of my server is ui, or coding. albion normally does all the coding but glytch does alot as well.

opal rivet
#

These lua stuff confuses me

#

I see

trail lotus
#

albion does alot of the main super important stuff. cause shes pretty refined with it

#

looking at maybe doing power grids? like each house needs electricity ran to it, and plumbing.

#

maybe during storms power could be knocked out and stuff. and power companies would need to go fix it.

pastel storm
opal rivet
#

My this is a lot

trail lotus
#

oh yeah i've got tons of random cool little things i have planned.

bronze yoke
#

there's always work to be done, it's a huge project

opal rivet
#

Well he needs funding basically for the server's

#

I see

ancient grail
#

I dont think i can swnd disc links here kentuckyroleplay

trail lotus
#

nah

trail lotus
opal rivet
#

Just send it to me on Me DM

#

Could give my mates to have a little fun

ancient grail
trail lotus
# pastel storm Im not familiar with what server you are talking about

well i was actually looking at an idea i had, where players could play each other in pool and wager money? i know its hard in pz so likely i'd just want it to be simulated. so like you and your friend click on the table add our currency into it and who ever wins gets the money? we could open it up to other cool games like darts and what not. just a cool little idea i had if you're interested.

trail lotus
pastel storm
#

I gave you a dm William

opal rivet
#

That's gonna be a lot of work tho

opal rivet
#

Oh nvm

#

I give this a go tomorrow

opal rivet
#

Maybe I bring my mates

faint jewel
#

couldn't you just have it open a pool game website or something for both players?

trail lotus
faint jewel
#

it sends the winner back to the game.

#

it could POSSIBLY done via ingame ui.

robust briar
#

Hey there beautiful people. How do y'all debug lua running on the server?

finite owl
#

I'm just using diagnostic print statements ๐Ÿ˜…

robust briar
#

Like, the regular print(x)?

quasi kernel
#

Oh, @ancient grail is this the guy?

finite owl
#

Yup

robust briar
#

Where do they log to? I am not seeing them..

quasi kernel
#

I'm in the server now but I'm admittedly a bit busy ATM and haven't finished verification

finite owl
robust briar
#

Windows, I have the debug text log open

finite owl
#

When I host locally on Windows, the logs go to C:\Users\Rob\Zomboid\Logs

robust briar
#

Yeah, same

#

I have that open, so if I am not seeing the logs clearly I have bigger problems.

vernal vale
#

yall i was playing with the meme jumpscares and i shit my pants at this one fucking guy just screaming

finite owl
#

There are a few files, I think my output was going to the (timestamp)-DebugLog-server.txt file

trail lotus
finite owl
robust briar
#

Okay.... this may be a really stupid question... does isServer() return false on SP?

bronze yoke
#

or server-console.txt if it's dedicated

robust briar
#

So, I am working on my mod. If isServer() always return false on SP, then I need to rethink some stuff haha. I need to test.

bronze yoke
#

isServer() returns false in singleplayer

#

not isClient() is usually preferred

robust briar
#

UHHFFF

#

Okay, changing all the references

#

thank you

trail lotus
bronze yoke
#

openUrl doesn't work, so unless you want to write an in-game web browser with html5 support i don't see how that'd work

trail lotus
faint jewel
#

huh?

finite owl
ancient grail
quasi kernel
#

Neat!

lavish umbra
#

Hey guys, I'm currently working on a mod that involves EXP values and such. I was wondering if anyone could tell me where I might locate the file that sets vanilla exp values and such? My guess is vanilla sets "exp groups" that are effect by exp multipliers, I was originally going to set a flat exp gain amount but realised that it probably wouldn't be effected by any multipliers. Any idea where I can find the vanilla exp settings?

weak sierra
#

nothing u talked about would have told me ur talking about that sort of xp giving function that u show in the pic

#

but if u mean those

#

they are called "recipecode"

#

iirc the file is just recipecode.lua but im gonna double check that

lavish umbra
#

Yeah, I'm referring to the GiveXP.DismantleRadio.. what is the file that its pulling the value from

weak sierra
#

those are functions

#

sec..

#

media/lua/server/recipecode.lua

#

:P

#

u can feed any function in there tho

#

all it does is programmatically give the xp

lavish umbra
#

I can see the variable loot in there now, but not how it's deciding exp gain

#

Oh, I think I see it

undone elbow
#

Guesses, on how long it will take after animals comes out, for someone to make a rideable horse mod.
We have a horse track... we could have horse races ๐Ÿ˜›

quasi kernel
#

Me when my horse gets bit

#

No more horse!

finite owl
#

For anyone with experience using Mod Options to add configurable key bindings: my key binding label in the Options menu isn't matching up with the key in the shared/Translate/EN/IG_UI_EN.txt file. The other keys in that file are working fine if I use e.g. getText with them, just not the auto-generated key from Mod Options.

#

Client code:

local keyData = {
    key = Keyboard.KEY_X,
    name = "RV_INTERIOR_ENTER", -- Maps to UI_optionscreen_binding_RV_INTERIOR_ENTER in Translate files
}

if ModOptions and ModOptions.getInstance then
    ModOptions:AddKeyBinding("[Vehicle]", keyData);
end
#

shared/Translate/EN/IG_UI_EN.txt file:

IG_UI_EN = {
(stuff)
    UI_optionscreen_binding_RV_INTERIOR_ENTER = "Enter or exit interior.",
}
#

console.log shows the mod loading, but then later on:

LOG  : General     , 1670131457625> ERROR: Missing translation "UI_optionscreen_binding_RV_INTERIOR_ENTER"
#

... and sure enough, the "Enter or exit interior" text is not showing up in the Options menu, just the key UI_optionscreen_binding_RV_INTERIOR_ENTER.
I'm at a loss to see why it's going wrong.

bronze yoke
#

the prefix in the translation string needs to match the file

#

i.e. UI_... needs to be in UI_EN.txt

finite owl
#

Ah, ok. Thanks - I'll give that a try! So we'll either need a second file, or need to rename the files and change all the other keys to start with UI_.

trail lotus
#

truthfully, the second animals come out ill be commisioning a horse mod immediately so anyone whos gonna do it ill be paying them for it.

finite owl
bronze yoke
#

are you sure the b42 horses aren't going to be ridable anyway?

weak sierra
#

if they add rideable horses are you gonna make oblivion dlc horse armor

#

:p

finite owl
#

Has to be purely cosmetic, not actually protect the horse...

bronze yoke
#

maybe some fancy saddles would be fun

#

the world is safe only because even i think making the horses into my little pony characters would just look garish

weak sierra
#

im sure someone will do it either way tbh

bronze yoke
#

probably... i've been very disappointed with the lack of pony mods though

#

this isn't how things used to be...

astral dune
#

Could have sworn I saw a horse-drawn carriage mod on here a while back

astral dune
#

lel, ya thats the one

#

perfect

novel nebula
#

Hey guys, is there a preferred/easy way to get all cells?

bronze yoke
#

what exactly are you trying to do?

novel nebula
#

I wanted to get all the cells to access things within them, like potentially moving zombies across cells which I heard they don't do on their own? Under most circumstances outside of meta events. Not entirely sure how feasible that is though.

ruby urchin
bronze yoke
#

i'm not sure how possible this is, cells aren't really very well exposed at all

#

and zombies definitely do move between cells

dark arch
#

Do you guys think there would be a way to change the possible zoom levels with Lua? I was able to do by changing on float in the java, but thats not really convient to share.

bronze yoke
#

many have tried...

#

never looked at it myself but i've seen more than one person convinced it's impossible

dark arch
#

that really seems dumb, because its just in a list of constants

#

also is there a way to change the java without using bytecode? im not much of a programer

finite owl
#

Not sure what you mean by that. Java is a language which compiles to bytecode, which is what the JVM (Java Virtual Machine) executes. Java bytecode is just a form of binary machine language which is designed to be executed by the JVM instead of a physical CPU.

#

So, any changes to what actually executes on the Java side of things requires you to change the actual bytecode in the .class files.

#

But as I understand it, the terms for Zomboid modding are more restrictive about what you can do to the .class files. I gather that mods available in the Steam workshop can only customise the lua scripting side of things.

astral dune
#

it really just comes down to java mods not being easily distributed through the workshop atm. There seems to be a couple different java toolchain projects, but they don't get discussed much around here, maybe there is a bunch of it going on in a forum somewhere

fast galleon
#

Is it possible to place item in world and rotate as you want? Specifically I want to flip an item bottom up.

update: script models can be rotated.

rain iron
fast galleon
#

I mean we already have the horsing around mod, famous for putting things in the "horse's back compartment".

safe sinew
void fractal
#

anyone know the precise tile width that yyour "hearing" circle is from ur character

#

is it like 1 tile away from ur character?

pastel storm
#

Is there a way to reload mod scripts without reloading the game

#

I have debug enabled

fast galleon
pastel storm
#

I just need to be able to update my lua scripts without exiting client to save time

fast galleon
#

lua or scripts?

#

for Lua press F11 and filter for your filename and reload

pastel storm
#

Theres a filter?

fast galleon
#

yep, select box and type

pastel storm
#

ye I got it

#

Does getSpecificPlayer(0) always return the client player?

rugged flicker
#

But what if we want to execute some function when the player creates a character not for the first time? This thing can be bypassed by simply going to the menu instead of pressing the respawn button in the game. What needs to be changed for this behavior?

#

Thank you right away, ye

fast galleon
#

or make bucket a vehicle or smth, how do vehicles get flipped? Using setAngles?

pastel storm
#

How would I use the require function? I have a module I want to load.

fast galleon
#

to require lua client/ISUI/myLua.lua
require "ISUI/myLua"

pastel storm
#

Its my own files

#

I assume that it would be without client/

#

And it would just be the file name

#

Is there a way to multilog to test multiplayer things

ruby urchin
#

for modules, you can use this

---main.lua
local myModule = require 'myModule';
print(myModule.test()) -- Prints "A test"
--myModule.lua
local myModule = {};

myModule.test = function()
    return 'A test';
end

return myModule;
pastel storm
#

ok sweet

exotic hornet
#

Hello im new here and i want to play with my friends on my DEDICATED SERVER.... so i dont know how i can setup my own BRITAS WEAPON MOD like changing the spawnrate can someone help me out because no one in youtube shows it... like i know that i have to setup my own mod but yeah i dont know what i should put in there... anyone have time for a call ?

fast galleon
#

probably ok for defacation mod

safe sinew
#

Is it possibel to add a carry capacity bonus to clothing items?

hot patrol
pastel storm
#

Bruh I can't find a file in the lua/server folder of my mod in pz lua debug

fast galleon
rancid tendon
#

question: if i wanted to change the model of an item based on a sandbox setting, is that possible?

#
    {
        Type            =    Normal,
        Weight            =    0.05,
        Icon            =    TCTape10,
        DisplayName        =    Cassette 2Pac - I Get Around (1993),
        WorldStaticModel = Tsarcraft.TCTape10,
    }```
#

let's say i've got this entry--can i change WorldStaticModel based on a sandbox setting somehow?

safe sinew
#

Okay, looks like I can't just try to change clothing to wearable containers with capacity and clothing stats unhappy

fast galleon
fast galleon
safe sinew
#

Basically I want something like Fallout 76 power armor functionality with both protection and high carrying capacity

rancid tendon
#
    {
        category = True Music,
        master = Ambient,
        clip
        {
            file = media/yourMusic/TCBoombox/A Silver Mt. Zion - 13 Angels (2000).ogg,
            distanceMax = 75,
        }
    }```
#

like this one

tardy wren
rancid tendon
#

yeah i was curious if it would work the same way

tardy wren
#

However, replacing the assets while the game is loading in the save... Well, I dunno how well that will work

rancid tendon
#

replacing the assets wouldn't be the idea

#

i'd just want to change the distanceMax

tardy wren
#

Ah, I see... It may work

#

Still, make sure to test it thoroughly

rancid tendon
#

yup yup

tardy wren
#

Now... I remember there was some kind of a post or guidelines for translations somewhere?

#

Does anyone happen to have a link?

rancid tendon
#

hm, i don't see it in the pins--not sure!

#

also, this is probably very basic but i'm not a coder and my googling hasn't turned up much: is there a way for me to run DoParam once for a list of items?

#

this might be what you're looking for?

tardy wren
rancid tendon
#

darn

hollow current
#

Any particular guide for with modding (adding) traits and using them within the script?

#

Could probably reverse-engineer a mod that already does that but would prefer a straight-up guide if one exists

hollow current
#

Nvm, figured it out. Another question -- Is there a way to lock the player's character into a timed action? I.e. just start the timed action and forbid the player from cancelling/controlling his character until the timed action is done

tardy wren
#

I think the idea for these is that the player can cancel them at any time...

#

Because, you know, Zombies and whatnot

hollow current
#

Yea, I however am trying to add to my mod a negative trait that locks the player into an action

#

so you know, its not something I am trying to do over all timed actions, just one of them

fast galleon
#

Best way might be a weird animation lock.

rancid tendon
#
local item = ScriptManager.instance:getItem("Tsarcraft.Cassette2PacIGetAround(1993)")
if item then
 item:DoParam("Weight = 1 * SandboxVars.MFTEOTWC_cassetteWeight")
end
ItemPickerJava.Parse()
end)```
#

would this work, do y'all think? any glaring errors?

#

and, if this tries to check for the item but the item doesn't exist, will it produce an error or simply move on?

hollow current
fast galleon
rancid tendon
#

gotcha! thank you poltergeist :)

fast galleon
# hollow current How'd that work?

from lua I've seen
setPlayerMovementActive(player, false)
I'm no good with animation, but some of them lock you, I just thought It'd look better.

rancid tendon
#

will it throw errors if it tries to check for an item that doesn't exist?

rancid tendon
#

ok good

#

perfect

rancid tendon
#

so should it be uhhh

fast galleon
rancid tendon
#

item:DoParam("Weight = " .. 1 * SandboxVars.MFTEOTWC_cassetteWeight)
or
item:DoParam(Weight = "1 * SandboxVars.MFTEOTWC_cassetteWeight")

#

i was kinda confused by point a haha

hollow current
viral notch
#

samall question

#

that is correct or i missed something

table.insert(VehicleDistributions["TrunkStandard"].items, "Base.TIREFIX");
table.insert(VehicleDistributions["TrunkStandard"].items, 1);
#

im not getteing any error and dont see item to spawn (on snadobx option loot all MAX)

#

but self item can normal spawn

rancid tendon
#

yet more questions from me:

if item then
 item:DoParam("Weight = 1 * SandboxVars.MFTEOTWC_cassetteWeight")
end``` 
am i able to do getItem as a list like this, or does it have to be a single item?
hollow current
#
function BreakIntoTears_TimedAction:start() -- Trigger when the action starts
    local player = self.character:getPlayerNum()
    setPlayerMovementActive(player, false)
    self:setActionAnim("BuildLow")
    --Some not so relevant code
end```
Doesn't seem to disable character controls
hollow current
rancid tendon
hollow current
# rancid tendon yet more questions from me: ```local item = ScriptManager.instance:getItem("Tsar...

I am not really quite sure how it works but an easy (and lazy) way to do this is just

local item1 = ScriptManager.instance:getItem("Tsarcraft.CassetteYasuhaFlydayChinatown(1981)")
local item2 = ScriptManager.instance:getItem("Tsarcraft.CassetteTomokoAranSlowNights(1984)")

if item1 then
  item1:DoParam("Weight = 1 * SandboxVars.MFTEOTWC_cassetteWeight")
end

if item2 then
  item2:DoParam("Weight = 1 * SandboxVars.MFTEOTWC_cassetteWeight")
end```

Inefficient? yes. Probably best way to do it until you figure out the more efficient way or until someone with more experience than me has a better answer
rancid tendon
#

inefficiency is a bit of a notable concern at the scale i'm working at

#

i'll have to do this for about 2000 items

hollow current
#

ah. Definitely the worst way to do it then.

rancid tendon
#

hehe, thank you though!

hollow current
#

my pleasure!

fast galleon
fast galleon
#

and have some table based on type or something

hollow current
fast galleon
#

probably can set one check, if module == "Tsarcraft" then

#

you might even be able to gel all items from a module

bronze yoke
# hollow current Nvm, figured it out. Another question -- Is there a way to lock the player's cha...
local old_isPlayerDoingActionThatCanBeCancelled = isPlayerDoingActionThatCanBeCancelled
---@param playerObj IsoPlayer
function isPlayerDoingActionThatCanBeCancelled(playerObj)
    if not playerObj then return false end
    local queue = ISTimedActionQueue.getTimedActionQueue(playerObj)
    if queue then
        for _,action in ipairs(queue) do
            if action.Type == 'ISPrisonerForceMove' then return false end
        end
    end
    old_isPlayerDoingActionThatCanBeCancelled(playerObj)
end
#

in your specific use case you might only want to check queue[1], but this is the general idea

hollow current
bronze yoke
#

it's probably a tiny bit more compatible with other mods i guess

#

are you sure that blocks them from cancelling the action with escape?

#

the mod i wrote this for actually uses setBlockMovement as well, but i wrote this before i put that in, so i'll be pretty annoyed if that works LOL

hollow current
#

HMM gonna have to give it a go

#

nope, doesn't work with escape. You can pretty much cancel it using escape

bronze yoke
#

well my one does get around that

#

so i guess you need both after all

#

oh i just remembered, with my one you can cancel the action by attacking, as my mod stops you from attacking anyway i didn't look into whether that would be easy to fix

hollow current
#

i could probably get around that somehow

#

i'll let you know if I can figure out a way to totally disable all controls that may cancel the action

#

actually blockmovement does disable attacking if I remember correctly

#

i think with a mix of both blockmovement and your code, it'd work

bronze yoke
#

it does, block movement just bans you from doing anything basically

#

but pressing escape is allowed

hollow current
#

yup, which your code would fix

#

okay ye

#

a mix of

BreakIntoTears = BreakIntoTears or {}

local old_isPlayerDoingActionThatCanBeCancelled = isPlayerDoingActionThatCanBeCancelled

function isPlayerDoingActionThatCanBeCancelled(playerObj)
    if not playerObj then return false end
    local queue = ISTimedActionQueue.getTimedActionQueue(playerObj)
    if queue[1] then
        for _,action in ipairs(queue) do
            if action.Type == 'BreakIntoTears' then return false end
        end
    end
    old_isPlayerDoingActionThatCanBeCancelled(playerObj)
end```
and
```lua
function BreakIntoTears_TimedAction:start() -- Trigger when the action starts
    self.character:setBlockMovement(true)
    --more irrelevant code
end

function BreakIntoTears_TimedAction:perform() -- Trigger when the action is complete
    self.character:setBlockMovement(false)
    --even more irrelevant code
end```
#

that did that trick

#

Thanks!

#

.. i think. I may have screwed sth up haha

rancid tendon
#

i have a final question before i think i'd be ready to implement my thing (once i have my internet back anyway...)

#
    {
        category = True Music,
        master = Ambient,
        clip
        {
            file = media/yourMusic/TCBoombox/2Pac - I Get Around (1993).ogg,
            distanceMax = 75,
        }
    }```
#

asked before but no one knew:

#

is there a way to alter a sound file like this using DoParam or something similar?

bronze yoke
#

i don't see a getGameSound(), but i do see a getAllGameSounds() - you could loop through that array and modify matching sounds

rancid tendon
#

there's getSound

bronze yoke
#

i couldn't see how to access the object it belonged to, unless it's a static

#

that gives a GameSound, not a GameSoundScript, the difference being... who knows

rancid tendon
#

omg.. of course

bronze yoke
#

okay actually, GameSounds only have a setUserVolume(), otherwise everything they have is just a bunch of getters, so i don't know if it'd work for you even if we can get to them

rancid tendon
#

curses... being able to modify that distanceMax via sandbox settings eludes me

bronze yoke
#

i think we can do it with getAllGameSounds, as that gives us a script

#

actually, i don't see any way to actually identify which sound is which from that array...

#

what a pain

rancid tendon
#

drat!!

bronze yoke
#

we can get their module, that'd work if there's no unwanted sounds in that module

rancid tendon
#

hmm.. that'd be a gamble sadly

#

the module is Tsarcraft and that module also applies to all of tsar's other mods

bronze yoke
#

ah yeah that's no good

rancid tendon
#

you try to increase cassette audible distance and end up making boats louder on accident without even noticing

#

lmao

bronze yoke
#

looks like we're messing with something we're not supposed to

hollow current
#
local old_isPlayerDoingActionThatCanBeCancelled = isPlayerDoingActionThatCanBeCancelled
function isPlayerDoingActionThatCanBeCancelled(playerObj)
    print("test")
    old_isPlayerDoingActionThatCanBeCancelled(playerObj)
end```

When you start a timed action, and press escape, test will be printed, then the escape menu will appear instead of cancelling the timed action. (Unless this is the way its supposed to be?)
bronze yoke
#

return old_isPlayerDoingActionThatCanBeCancelled(playerObj) ๐Ÿ˜…

#

that mod... may not be thoroughly tested

hollow current
#

haha np
mb for not even noticing that considering I've fiddled around with such functions before ๐Ÿคฆโ€โ™‚๏ธ

hollow current
bronze yoke
#

? this is the exact same code with different variable names

#

oh! no it isn't

#

i'm going to choose not to question why my code is working when it doesn't make sense... i'm happier this way

#

oh probably because i last tested it when the return was fucked anyway

hollow current
#

Haha I'm not sure why it didn't work either but I had to go into game files and apparently there was an extra .queue

hollow current
#

I'm not sure then tbh

alpine scroll
#

Just want to share something

#

To be fair I am not sure if this code is right, but it seems a good start

jade chasm
#

does anyone know if you can trigger a door/gate with a vehicle collision

#

i'm trying to make a mod that will open/close if a gate is driven through

deft falcon
#

this is gonna be very useful

#

recommend this to you all

trail lotus
#

looking for a mod, that will fully allow a player, to construct a house. including placing interior lighting and running light switches that work with the rooms light, anyone interested? we have more builds and stuff so you can already do alot of construction. but if you wanted to do a big mod where we revamb it and all all kinds of different crafting for walls. i've got a awesome team that works on mods on my server so they can always help as well. and also i was looking at making one power hub center and allowing power lines to be ran to each house. its a weird server and hard to describe but if you're interested let me know will for sure pay good for a working mod with that stuff.

#

i think glytcher has a mod already that kinda messes with the power and allows you to craft power lines and stuff or fix them, i can ask him if we could build off of it.

#

or maybe glytcher wants to build the power mod himself idk hes working on my gas stuff right now i think.

fast galleon
deft falcon
#

wat

fast galleon
#

the icon is intrusive

#

@deft falcon

modest ermine
#

Anyone willing to share proper way to add customUI class?

lusty marsh
modest ermine
#

@lusty marsh maybe I wrongly stated my question, I meant proper way to register it within the game, just with events?

#

Key pressed for example - render?

fast galleon
modest ermine
lusty marsh
#

Does anyone have any tips for adding controller support to a UI mod? I'm working on adding support but I have no idea how it works

astral dune
#

@thick karma is probably the regular poster with the most controller experience at this point

thick karma
#

If your UI element is an ISPanelJoypad it'll be prepared to take user input

#

You can also decorate onPressButtonNoFocus (or whatever it's called), just be sure to store the original function so you can pass signals to the original function when your UI is inactive

#

And be sure to include all the vanilla checks that come before that function does stuff with its input, because otherwise you might cause bugs, especially alongside other mods.

karmic fog
#

This is more of a lua question, but I'm currently trying to add the contents of an Array to another array.
For example, I have the array local bodylist.
Now, I want to add the contents of the array local bodies one by one to the array. Is there a shortcut command like in Java collections.add() or do I have to program an foreach?

alpine scroll
#

In Lua, you can use the table.insert() function to add an element to the end of an array. This function takes the array as its first argument, followed by the value you want to insert.

Here is an example of how you can use this function to add the contents of one array to another:

local bodies = {"head", "chest", "legs", "feet"}

for _, body in ipairs(bodies) do
  table.insert(bodylist, body)
end

In this code, the table.insert() function is used in a for loop to iterate over the elements in the bodies array. For each element, it is added to the end of the bodylist array using the table.insert() function.

Alternatively, you could use the table.move() function to move the elements from one array to another. This function takes the source array as its first argument, the index of the first element to move as its second argument, the destination array as its third argument, and the index of the first element in the destination array as its fourth argument.

Here is an example of how you could use this function to move the contents of the bodies array to the bodylist array:

local bodies = {"head", "chest", "legs", "feet"}

table.move(bodies, 1, bodylist, #bodylist + 1)

In this code, the table.move() function is used to move the elements in the bodies array starting from the first element (index 1) to the end of the bodylist array. The destination array is specified as the third argument, and the index of the first element in the destination array is specified as the fourth argument. The # operator is used to get the length of the bodylist array, and the result is incremented by 1 to specify the index of the first element in the destination array.

karmic fog
#

This is a very detailed response. Thank you very much. I will read into table.move to understand it more and to properly use it.

astral dune
#

I don't believe table.move exists in PZ

alpine scroll
astral dune
#

PZ is based on lua 5.1, I think table.move was added in 5.3

alpine scroll
astral dune
#

just for confirmation

alpine scroll
#

Yea, sorry. I was dealing with something else recently in Lua and just jumped in

lusty marsh
#

@thick karma Okay thanks! Yeah it derives from ISPanel so not a big change, thanks!

robust briar
#

Hey you beautiful peoples. Does anyone know if modData (which is a KahluaTable) sync between client and server automatically for InventoryItems? From my testing it doesn't seem so, but I am probably doing something wrong.

karmic fog
bronze yoke
astral dune
#

I only know about how I think inventories work, so I'm going to keep my musing to myself. I can say two things for sure though

  1. inventory items used on a vehicle as parts, like brakes, have to be manually synced if you mess with them on the client
  2. your personal inventory doesn't exist on the server
robust briar
bronze yoke
#

yeah, items are generally handled by the client

#

so server often doesn't know about them

#

obviously it needs to know what items are in containers and stuff but the client is where you want to do item stuff

robust briar
#

Maybe I need to rethink how I am approach this then. basically, I have an item which can interact with the world. My thought process was the server should do the actual interactions, because if the client does it, then the latency between the "holder of the item" and the server + the latency of each user could be over 200+ milliseconds easy. If the server originated the events, then it theoretically would cut that delay in 1/2

alpine scroll
bronze yoke
#

i'd have to know more specifically what you're trying to do, but it probably would be best to do anything like that on the client

robust briar
#

Demo of it working on single player. On my multiplayer tests though, the delay would cause the timing of the light shows to be all over the place. To make sure it was a good test I am renting a server on the opposite side of the world to do my testing lol.

#

The implementation shown here works in MP, but the delays are a bit annoying

bronze yoke
#

how are the lights synchronised? does zomboid do that for you or is it manually done?

robust briar
#

Zomboid does it, I set the lights state on server

bronze yoke
#

that's a shame... if it weren't done automatically you could just send the sequence to the clients and have them run it

robust briar
#

Oh I can do that too

#

I did that for a minute, it could be a better way then the server is just passing messages

bronze yoke
#

it won't strictly be synchronised between each player's screen, but the timing will look good for everyone

#

i don't think it being synchronised is actually that important from what i can see

robust briar
#

It's wayyy more work tho

#

I have to worry about players connecting, moving into or out of the area, etc

shy hollow
#

yo anyone here happend to know where the meta/helicopter event files is ?
i found the 5 chopper.ogg files and also the zombie_meta.txt , replaced it with my owned files and it isnt working as i intended

robust briar
#

Okay, one more question (let's be honest probably not but I can hope lol). Is there a globally universally unique id on InventoryItems? I see a "getKeyId" but even looking at the decompiled java I can't tell if that's going to be unique across all clients and the server

hollow current
#

How do I run a code when a specific moodle reaches a certain level?
To clarify, I am trying to make it so that when a unhappiness reaches 80% or more, a certain code is run. What's the function to use for such event?

ancient grail
#

how do i add tooltip on context menu?

#

Or os it possible that thr name of the context option changes if its a varable?

ancient grail
bronze yoke
hollow current
#

I am trying to find the event handler that checks for certain conditions I can define every second, or as long as the game is running, or however its done in PZ, or better yet, when a specific moodle reaches a certain level

ancient grail
#

onPlayerUpdate?

hollow current
# bronze yoke ```lua local tooltip = ISWorldObjectContextMenu.addToolTip() tooltip:setName('ti...
local cryOption = context:addOption("Cry", worldobjects, BreakIntoTears.OnCry, player, currentUnhappyness, currentStress, canCry);
local tooltip = ISToolTip:new();
tooltip:initialise();
tooltip:setVisible(false);
description = " <RED>" .. "You have already cried today. Try again tomorrow.";
tooltip.description = description
cryOption.toolTip = tooltip

This is how I did it for my mod. Is initialise even needed? Thought it was important for the tooltip but seeing as you didn't include it, I am not sure now what it does lol

ancient grail
#

Is this what u ment?

bronze yoke
#

i've never used initialise for a tooltip, and i originally grabbed my code from vanilla

hollow current
bronze yoke
#

so vanilla doesn't use it either ๐Ÿคท

hollow current
#

hmmm not sure where I got it from lool

ancient grail
#

Hmm maybe initialize is used for heavy to load computations so before you right click its been processed...
And woops i spelled that correctly tho the syntax is spelled with s

robust briar
bronze yoke
astral dune
#

and some just bad spelling. brekingObjects comes to mind

bronze yoke
#

oh yeah there's a fair few straight up typos

astral dune
#

blegh, I've somehow managed to break intellij, it just completely hangs after loading my project. wtf

bronze yoke
#

i'd start with reinstalling emmylua

#

that plugin causes freezes a lot

astral dune
#

I suspect as much, trying to disable it now

#

ya, things work fine with it off, completely break with it on. All I did was move a couple functions from one file to another, but I can only guess that broke something

rancid tendon
#

question: is there an easy way to make items renamable like backpacks are? in the item script or otherwise?

astral dune
#

Mx's Quality of Life Pack has his mod "Rename Everything", if you're just looking to have that feature. If you want to implement it yourself for something you're making, you'll find the answers in there too

rancid tendon
#

hmm, ok

#

i do indeed want to implement it for something myself

#

i had the cute idea of introducing an optional mode to my true music mod that makes all music you find unlabelled

#

so you would bring it home, sort through it, play it to confirm what it is, and then rename it

fair frost
#

Pre Woodland M151 MUTT Livery test

next marlin
#

Okay so I have a question

I want to make a mod that just changes the numbers of the weapons from another mod.

I've already made a duplicate version of the .txt file that I want to replace with the numbers and stuff edited, but how do I make it so that the game uses the file from my mod instead of the file from the original mod?

bronze yoke
zealous wing
#

Is there a way to get a in item to spawn in a container only if another item spawns there? E.g., a 9mm pistol magazine or bullets only spawning in said container if a Pistol spawns.
I figure you'd need complicated lua for it, but I was hoping someone had or knew of an example I could look at.

bronze yoke
#

no previous example, but i think you could just try something like

local function onFillContainer(room, type, container)
    if container:getFirstType('Base.Pistol') then
        container:AddItem('Base.9mmClip')
    end
end

Events.OnFillContainer.Add(onFillContainer)
#

of course if you only want it to have a chance to spawn, you need to add randomisation in there, and if you only want it in certain rooms or containers you need to fork it based on those

zealous wing
#

@bronze yokeHey there! I am working on a mod that made military loot in military vehicles more immersive. Am I correct to assume though that if I were to plug that into my mod, a magazine would spawn anywhere a pistol does, regardless of container?

bronze yoke
#

that's correct

zealous wing
#

Ah.

bronze yoke
#

i actually don't think OnFillContainer even fires for vehicle containers, so i don't think this is what you're looking for

zealous wing
#

๐Ÿ˜ฆ

bronze yoke
#

editing vehicle loot with lua is really annoying...

zealous wing
#

@bronze yoke I have learned that recently, yes. ๐Ÿ™‚
Maybe it'll help if I explain a bit? I'm trying to define some proper military-themed loot tables of some of the military vehicle mods I have. Just about all of KI5's mil stuff uses the same basic vehicle loot. I was trying to figure out how to remove some of the randomness of the game's RNG in favor of something more realistic, if that makes sense? E.g., a Rifle or a pistol could spawn with compatible magazines and ammunition.

#

I thought Brita did something like that, but I was wrong. Hence my question here.

bronze yoke
#

i've been too busy to do it yet, but i'm supposed to do some vehicle loot trickery for str, and my plan was to use something like this:

local function onRefreshInventoryWindowContainers(inventoryPage)
    if not inventoryPage.inventory then return end
    local vehiclePart = inventoryPage.inventory:getParent()
    if not instanceof(vehiclePart, "VehiclePart") or vehiclePart:getModData().lootEdited then return end

    -- code to actually modify items here

    vehiclePart:getModData().lootEdited = true
end

Events.OnRefreshInventoryWindowContainers.Add(onRefreshInventoryWindowContainers)
#

this basically checks every time we open an inventory page if that inventory page belongs to a vehicle, and if it hasn't been modified yet

#

since iirc vehicle loot doesn't get filled until you actually look at it? otherwise we could just hook the part being created

zealous wing
bronze yoke
#

honestly needs checking, if it is created when the vehicle is it doesn't need to be nearly this complex

#

i don't really remember where i heard that

quasi geode
#
Rifle or a pistol could  spawn with compatible magazines and ammunition.
I thought Brita did something like that, but I was wrong. Hence my question here.```
not sure about britas. orgm did, not with vehicles though
zealous wing
#

It not working with vehicles would make sense - it predates B39 ๐Ÿ˜„

quasi geode
#

last update was 2019 for build 40.43 lol

#

but used OnFillContainer as suggested above, didnt parse previously spawned items though since all the loot handling was done with the event instead of using distribution tables

zealous wing
#

Would the above bit of code work with distro tables? E.g.:

    if not inventoryPage.inventory then return end
    local vehiclePart = inventoryPage.inventory:getParent()
    if not instanceof(vehiclePart, "VehiclePart") or vehiclePart:getModData().lootEdited then return end
      if getActivatedMods():contains("Brita") then
        table.insert(VehicleDistributions["MilitaryGearTrunk"].items, "Base.M9");
        table.insert(VehicleDistributions["MilitaryGearTrunk"].items, 3);
      end
    vehiclePart:getModData().lootEdited = true
end```
Or am I getting it wrong?
bronze yoke
#

no, you need to manually spawn the items and stuff

#

so basically, you need to write your own item spawning system ๐Ÿ˜…

zealous wing
#

Neat!
I don't know how to do that yet though. zombie

#

I barely understand if and then logic.

#

I'm learning though, slowly.

bronze yoke
#

the simplest thing you could do with this would be something like this:

local function onRefreshInventoryWindowContainers(inventoryPage)
    if not inventoryPage.inventory then return end
    local vehiclePart = inventoryPage.inventory:getParent()
    if not instanceof(vehiclePart, "VehiclePart") or vehiclePart:getModData().lootEdited then return end

    if container:getFirstType('Base.Pistol') then
        if ZombRand(3) == 0 then -- 1 in 3 chance to spawn
            local item = container:AddItem('Base.9mmClip')
            container:addItemOnServer(item)
        end
    end

    vehiclePart:getModData().lootEdited = true
end

Events.OnRefreshInventoryWindowContainers.Add(onRefreshInventoryWindowContainers)
```although if you want to redo all ammo/weapon spawning, it would much better to do this with tables and stuff
unreal zealot
#

Does anyone know where I can find the texture for the moodles cause I want to make a custom texture for them

bronze yoke
#

so you basically also need to write your own distributions tables ๐Ÿ˜…

zealous wing
# bronze yoke so you basically also need to write your own distributions tables ๐Ÿ˜…

@bronze yoke I've basically been doing that already, no worries. I'm scratch writing custom distro stuff for KI5's military vehicles. Not hard, just time consuming.
Plus some internal patches for mods... yeah. Brita's stuff is a particular headache there.
Am I correct in understanding that the 0 in ZombRand(3) == 0 corresponds to the clip being guaranteed to spawn? Or as close to guaranteed as the RNG would allow?

bronze yoke
#

no, ZombRand(x) rolls x random values (between 0 and x-1), so ZombRand(3) == 0 means a 1 in 3 chance

zealous wing
#

All right, that makes more sense. I was probably thinking it was a boolean for some reason? ๐Ÿ˜…

#

One other question. "VehiclePart" corresponds to a given container id right? E.g., "TruckBed"?

bronze yoke
#

it just checks that it is a vehicle part at all

zealous wing
#

All right.

bronze yoke
#

if you want to check which container id it is, you can use vehiclePart:getId()

#

i.e. ```lua
if vehiclePart:getId() == 'TruckBed' then

round stump
#

Does anyone know where the game has the information where it defines how a tile/sprite can be destroyed?
E.g.: Where does the game defines which tiles can only be destroyed with a Sledgehammer?

pastel storm
#

oi

#

Who goes there with a meerkat image

#

Such a handsome meerkat indeed tho

#

@round stump

#

I am at a point where I need to use custom events. How do I register an event and fire it?

finite owl
willow estuary
#

Vehicle loot used to not call the OnFillContainer event, but should currently.
If people need to test loot spawning they can use this code, a variant of a debug feature I made for b42.

local insert = table.insert

local function  LookAtLoot(roomName, containerType, itemContainer)
    local items = itemContainer:getItems()
    local list = {}
    if items:size() > 0 then
        for i=0,items:size()-1 do
            insert(list, items:get(i):getFullType())
        end
    end
    list = table.concat(list, ", ")
    local square = nil
    if itemContainer:getParent() and itemContainer:getParent():getSquare() then square = itemContainer:getParent():getSquare() end
    if square then 
        if list ~= nil then
            print("Loot spawned in container type " .. tostring(containerType) .. " in room type " .. tostring(roomName) .. " at x:" .. tostring(square:getX()) .. ", y:" .. tostring(square:getY()) .. ", z:" .. tostring(square:getZ()) .. ", and consists of:")
        
            print(tostring(list) .. ".")
        else
            print("No loot spawned in container type " .. tostring(containerType) .. " in room type " .. tostring(roomName) .. " at x:" .. tostring(square:getX()) .. ", y:" .. tostring(square:getY()) .. ", z:" .. tostring(square:getZ()) .. ".")
        end
    else 
        if list ~= nil then
            print("Loot spawned in container type " .. tostring(containerType) .. " in room type " .. tostring(roomName) .. ", and consists of:")
            print(tostring(list) .. ".")
        else
            print("No loot spawned in container type " .. tostring(containerType) .. " in room type " .. tostring(roomName) .. ".")
        end
    
    end
end

Events.OnFillContainer.Add ( LookAtLoot )```
#

Yes, it is very spammy, but it's a brute force tool ๐Ÿคช

finite owl
#

Sweet. And vehicle loot should be generated when the vehicle is generated in b41?

bronze yoke
#

yeah, i'm unsure where i heard it wasn't, and i definitely haven't actually tested it myself, so it may still be

dark arch
finite owl
#

Ok, so I have no experience with hacking Zomboid's Java side, but from my previous (quite rusty) Java experience, it's pretty hard to go through that decompile-edit-recompile process. As you've noted, the decompiled Java usually has issues.

#

If you're just trying to edit some constants, you might do better with a binary editor, although finding the constant values you want to change in there would be non-trivial.

dark arch
#

thanks! i think the main issue is importing the resources, but I guess I can keep doing stuff with the bytecode

#

I had already done this with just editing the byte code, because the zoom levels were just constants

rancid tendon
#

folks seemed to think it was impossible earlier but i'm just gonna put out a feeler in case someone has some Arcane Knowledge:
does anyone know if there is a way to alter a sound script with sandbox options?

#
    {
        category = True Music,
        master = Ambient,
        clip
        {
            file = media/yourMusic/TCBoombox/2Pac - I Get Around (1993).ogg,
            distanceMax = 75,
        }```
like, is there some way to DoParam the distanceMax here? the problem we were having is in actually _getting_ the sound and modifying it, because it doesn't seem like there's a way to do that in lua
finite owl
#

Or even GameSounds:getSoundsInCategory(string)

rancid tendon
finite owl
#

Hmm, that's true... GameSoundClip seems to be a better match for the data you have above.

#

GameSoundClip has distanceMin and distanceMax fields, at least.

bronze yoke
#

we couldn't find setters for anything we needed

finite owl
#

A GameSound has a getRandomClip() method, so if there's only one clip associated with it the "random" clip would be the one...

bronze yoke
#

we could use Load on the GameSoundScript, but the only function we could find to get those returned an array of all of them, and it doesn't have any getters at all so we can't actually identify them

finite owl
#

Hmm, ok. It looks like GameSoundScript is used by GameSounds to load the scripts, but GameSounds does build up a HashMap soundByName that getSound uses to look the sound up by (via getOrCreateSound)

rancid tendon
#

[me quietly nodding in the background while two people who know way more than i do about anything talk]

finite owl
#

I have no idea, I'm just poking around in an area of the engine I've never looked at before, so take anything I say with several handfuls of salt ๐Ÿ™‚

winter thunder
#

So- anyone know if there is an event called when throwing an item? I imagine something has to trigger the noise/effect, just not sure if there is an accessible code for it

manic spoke
#

Hey guys, is there any way how to have two people as a mod creator in a workshop? Contributor cannot upload updates, which sucks.

ripe warren
#

Yeah I was about to say. Use git for version management

tardy wren
#

Can I somehow... affect the execution of Java code via Lua?

tardy wren
#

Any way I can see what parameters are available to functions called by events?

round stump
fast galleon
fast galleon
#

lua side checks get the sprite properties and check values

ancient grail
#

@hollow current sorry to ping you but i have a question.. so basicaly the tooltip worked with no problem whatsoever.. the thing is if need to have more tooptips on each context option do i really have to do the whole code block you gave or just a piece of it and which one?

thn xin advance

rugged flicker
#

Hey lads.
What do two boolean arguments mean in the context of setScratched?

ancient grail
rugged flicker
#

from BodyPart

#

What args do?

quasi kernel
#

oooooh my gosh

#

I just got a heart attack because I forgot there were zombies in project zomboid

#

i've been working on a farming mod for so long I forgot this was a zombie game

ancient grail
rugged flicker
#

thx

rugged flicker
ancient grail
#
        if bodyPart:isCut() then
            bodyPart:setCut(false)
            bodyPart:setCutTime(0)
        else
            bodyPart:setCut(true)
        end
rugged flicker
#

but


setCut(boolean boolean1, boolean boolean2)
ancient grail
#

cut seem to have only one bool

#
chr:getBodyDamage():getBodyPart(BodyPartType.LowerLeg_R):setScratched(true, true);
chr:getBodyDamage():getBodyPart(BodyPartType.LowerLeg_R):setCut(true);
rugged flicker
#

got all i need in DMs, thx

quasi kernel
#

For future reference of anyone that needs it, variable one of setScratched determines if the wound bleeds, and variable two determines if it wasn't a zombie scratch.

#

I.E, true, false is a bleeding zombie scratch.

#

false, true is a non-bleeding, regular scratch.

robust briar
#

So, maybe a silly question and I am pretty sure I already know its not possible... but.. is there a way to have two zomboid clients running to test multiple player support for my mod? Would I need two computers? Do I need to buy PZ twice on separate steam accounts?

quasi kernel
#

Unsure since I just pray that my stuff works in multiplayer LOL

#

I'm sure someone knows though, just ask every once in a while throughout the day and I'm sure someone will have a more proper answer for ya.

robust briar
#

I am pretty sure what I wrote will work, but I need to test some edge cases to make sure I don't crash out clients and stuff haha.

ruby urchin
worldly hatch
#

anyone know why the extended stack mags are not working in guns they should be for britas weapons

#

like an extended 9mm mag isnt going into my glock or my extended 45 isnt going in my sig

robust briar
mighty cypress
#

anyone aware of a mod that makes light switches, lamps, and strangely enough, bushes much larger than they should be? Not necessarily an issue but I can't figure out what is causing it.

mighty cypress
#

When you're having trouble with Brita, make sure you check Arsenal and it usually has the answer

hollow current
hollow current
hollow current
#

So in summary the main block you'll need is something like

local tooltip = ISTooltip:new()
tooltip.description = 'the actual tooltip'
option.toolTip = tooltip

Rest are additional optional stuff

ancient grail
#

Like skip one of the lines

bronze yoke
hollow current
ancient grail
#

Ow ok

#

Anyways ill just do a single liner for this
Using ;
Hehe thnx alot ๐Ÿ™‚

hollow current
bronze yoke
#

there's technically greater compatibility with other mods, but i'm not sure there'll be many mods that ban you from moving but still let you do timed actions, lol

hollow current
lusty marsh
#

How does joypad focus work? I've been trying to understand it by reading the game's code but I'm at a loss there's just too much going on to see how it works. I have an ISPanelJoypad that I'd like to take control of the joypad when it's moved on to then pass focus back to the parent when moving out again

bronze yoke
#

@thick karma must know

fast galleon
lusty marsh
fast galleon
#

is it in-game or out?

lusty marsh
#

out, it's in the character customisation screen when starting a new run

fast galleon
#

I haven't tested that, wonder how controller would work without player.

#

the player in examples is a number, so you can try with 0

thick karma
# lusty marsh How does joypad focus work? I've been trying to understand it by reading the gam...

I am not sure how the game tracks joypad focus before you actually join a game... But in general the game knows what the joypad is focused on by checking joypadData.focus, and joypadData is obtained in different ways in different contexts (you'll see if you search for joypadData in the vanilla Luas). I suspect game creates a joypad player for the main menu when you first press A after launch or Lua reload, in which case Poltergeist's suggested functions would work fine.

The focus is generally a panel or nothing at all. When you are in the game playing normally in the world, your focus is nil. When you open inventory, the game sets a player's joypadData.focus equal to the inventory pane itself.

I believe you could catch NoFocus events in the Main Menu by decorating onPressButtonNoFocus. If you do that, you can pretty flexibly define the behaviors you want to see.

pale cradle
#

Is it possible for mods to interact with the voice chat system? Like apply filters and add mechanics and stuff? ๐Ÿ‘€

bronze yoke
#

i really have my doubts about the possibility of it, but if someone adds voice modulation for gas masks you are my hero

merry kelp
#

how does UseDelta work? I have a recipe that uses 10 units of the Propane Torch and the wiki says it has 100 total, so i expected to use 10% of the torch. but it uses the whole thing up. is the wiki just wrong because the UseDelta for the torch is 0.1

pale cradle
bronze yoke
merry kelp
#

alright then just updated it thanks

faint jewel
#

is it possible to place a tile at a certain location via lua?

ruby urchin
#

yep

lone plume
#

Are there any cannibal mods out?

faint jewel
#

any chance you have an example @ruby urchin?

unique harbor
#

Can I somehow block the player from getting xp for a hit? OnWeaponHitXp

#

in other games I would simply return false in the event, but sadly ain't that easy here

ruby urchin
faint jewel
#

that would be great.

#

๐Ÿ™‚

#

just wanna spawn some signs and maybe set some variables on them ๐Ÿ™‚

faint jewel
#

ooh lol. i'mma need that in a function form. XD

rancid tendon
#

anyone know why this code isn't working? everything about it works... except for the last bit, the blindMode bit

#

it just doesn't work, it doesn't change the display names of the items at all, but everything else works

#

it doesn't produce errors either, just silently doesn't work

opal rivet
#

I need a vote for this please help

#

On Which is better

#

God I suck at deciding

#

Alright

#

I make that one

#

If I can't decide I will add them both

weak sierra
#

i like the black one more, heh, something more pleasing about it to my eyes

opal rivet
#

Okay That's good

rancid tendon
opal rivet
#

We see

last flax
opal rivet
last flax
#

nice

opal rivet
marsh dew
#

yeah that one looks nice

fast galleon
#
local blindMode = SandboxVars.MFTEOTWC.blindMode
    for i=1,#itemList do
        local item = ScriptManager.instance:getItem(itemList[i])
        if item then
            item:DoParam("Weight = " .. 1 * SandboxVars.MFTEOTWC.cassetteWeight)
            if blindmode then item:DoParam("DisplayName = Unlabelled Cassette") end
        end
    end

that might be better, this can be further improved obviously...

rancid tendon
#

ooh i'll give that a try, thank you

#

also, is there a way for me to use DoParam on a model script?

#
    {
        mesh = WorldItems/TCCover,
        texture = WorldItems/TCVinylrecord5,
        scale = 0.0012,
    }```
like, say, if i wanted to change the mesh here
bronze yoke
#

yeah, they use Load which has slightly different syntax but it's the same

#
local model = getScriptManager():getModelScript('Tsarcraft.TCVinylrecord5')
if model then
    model:Load('{mesh = WorldItems/DifferentModel,}')
end
#

off the top of my head

rancid tendon
#

thanks!!

rancid tendon
#

it seems that.. neither of the things i did in this update worked ;w;

#

blind mode still doesn't change the display names of the items, and also the attempt i made to change the meshes doesn't seem to have any effect either

#

absolutely vexing

fast galleon
#

@rancid tendon
how are you testing the change, do you spawn a new item