#mod_development

1 messages Β· Page 524 of 1

lusty nebula
#

Don't want to be wrong but I think is:
isAdmin()

next glacier
#

not sure if it is
but there is one example
not isClient()

river tree
#

Is this a normal way for sending update to clients and server?

object:transmitUpdatedSpriteToClients()
  if isClient() then object:transmitUpdatedSpriteToServer() end
next glacier
#

if not isClient() probably?

#

am debating whether to try it for myself later

river tree
#

Yeah I can't decide if the syntax would register correct or not Lol

frank elbow
#

not isClient() might work, dunno, but it raises the question of "what does isClient/isServer return when the game is played on singleplayer/splitscreen?"

#

Which could be determined with a bit of testing, or answered by someone who knows (I don't)

next glacier
#

oh because modoptions put it into documentation

#

if mod is server only

frank elbow
#

Unsure what you mean

next glacier
#

in their examples under

#

server only mod

frank elbow
#

I was referring to this link

next glacier
#

oh sorry

#

im thinking of a different thing

#

I'm not sure how to do what I want to do

#

is making my mod work on both multiplayer and singleplayer

#

as simple as moving it to lua/shared

#

instead of lua/client?

sinful idol
#

lets say your mod allows your player to kill zombies in your immediate area by pressing the 7 button. that would work fine under lua/client

#

because the kill zombie button would work on server/client

next glacier
#

if i remove if isClient() It would work globally?

#

but what config would it follow

#

the config of the person who joins

#

or the config of the host

sinful idol
#

You can test it out for confirmation, but I think it should take server's options/settings (not the client/joinee's)

abstract raptor
#

Would it be possible to create 2 factions on game start and then also make the player have to choose the faction before spawning?

sinful idol
abstract raptor
#

I'm tryna work out a feasible way to do team death match for my server

#

But obviously we don't want the players to accidentally kill eachother on the same team

#

I already worked out good server settings to make it less "one hit kill- ey" and worked out server options so that you spawn with decent weaponry

sinful idol
#

with the better hair ui mod, i won't be surprised if this is possible, as it should just be a dropdown. hope you get it working, sounds like a fun server πŸ˜„

abstract raptor
#

Yeah just been doin setup for it

#

might launch Free For All tomorrow

#

maybe using SteamID to keep score of Kills and Deaths would also be cool

next glacier
#

is the isAdmin() for host?

sinful idol
next glacier
#

and admin is

#

what is an admin

sinful idol
#

it's an access type

#

if you try to host, you can check and grantadmin on yourself/other players

#

admin has special powers, kinda like debug mode

next glacier
#

oh so thats not gonna work

sinful idol
#

I believe there's an isOwner

#

that might be the host though im not sure

next glacier
#

ah

#

i finally understand what question to ask

#

what line of code allows me to change a line in sandbox_vars

#

or wait. does my mod already apply in multi?

#

i dont play multi

drifting ore
#

Unaware if its feasible with PZs LUA

next glacier
drifting ore
#

But def would be cool

next glacier
#

im tired

#

bloodlevel is 38.82
yet bloodAmount is 0.77

#

i dont even know

#

help

drifting ore
#

Isn't it because

#

BloodLevel is a 100-0 value

next glacier
#

what

#

so blood level 0 = max blood

#

and blood level 1 = no blood?

#

but dirt amount is 0 = there is no dirt

#

perhaps that is whats missing

drifting ore
#

No like

#

100 = Blood Level Maximum

#

0 = Blood Level Minimum

#

Since its a range value

next glacier
#

and bloodLevel is 77

drifting ore
#

Whereas bloodAmount

#

Is a ratio

#

1 being maximum blood and 0 being minimum

#

Iirc

#

I forgot the term for it in mathematics

next glacier
#

so what say you suggest for the math

drifting ore
#

It's not a boolean

#

Its a like

#

Fuck I forgot

next glacier
#

but do you know how to convert

drifting ore
#

Inclusive Interval

#

Thats what it is

#

Also idk

#

Its basically just 100-0

#

But in this case a decimal

#

So I think .77 is just equivalent to 77

#

You just tack on a leading zero

#

But its def weird

#

To have one measurement be a value of 100 to 0

next glacier
drifting ore
#

And the other to be a decimal of 1 to 0

next glacier
#

bloodLevel is 38.82

#

blood amoutn is 0.77

#

aint nowhere near to each other

drifting ore
#

I dont know why there is 2 values man

next glacier
#

bloodAmount is my local

drifting ore
#

Thats kinda confusing lol

next glacier
#

i set it so that it gets bloodLevel

drifting ore
#

W8

#

Wait so this is like

#

Covering

#

Like the object covered in blood?

next glacier
#

yes

drifting ore
#

Thats even more confusing

next glacier
#

item getbloodlevel

#

if it says 100/100 bloody

#

i want 100 bloodLevel

#

and 100 bloodAmount

drifting ore
#

Its a float value

#

BloodLevel is

#

And floating point arithmetic is

#

Confusing as fuck to me

next glacier
#

can u exlpain what i need to do?

#

convert the float into something?

drifting ore
#

Idk man

next glacier
#

maybw item:getBloodLevel isnt returning the correct values

lusty nebula
#

hallo all guys!

sinful idol
lusty nebula
#

I'm now experiencing that moment when you lose 2 hours to understand why your script doesn't work and then you notice that the script was not working due to one single typo... πŸ˜„
Life of a modder is really hard LOOL πŸ˜„

fair frost
lusty nebula
#

Nice work mate, they're amazing!

fair frost
#

thanks

lusty nebula
#

I was looking the last screen...the upper car...we need a Ghostbusters skin for it too πŸ˜„

next glacier
#

wot

#

damn thats hq

#

oh thats just a toy

lusty nebula
#

I presume a toy ( Image found on Google images ) πŸ˜„

next glacier
#

I thought the texture was so good it looked semi-realistic

#

like a toy

frosty falcon
#

is it possible to have an item (e.g. food) that only gives +unhappiness to certain players, rather than modifying the item properties themselves (so you can't trade the -unhappiness item, they would see it as normal)

next glacier
#

maybe you can

#

call for an event

next glacier
#

btw whats the difference between

#

item:getBloodyness()

#

and

#

getBloodyness(item)

#

are they the same?

#

are these examples of those

#

sugars

drifting ore
# lusty nebula

A person is making this car right now commissioned by SheriffEli

old blade
#

hey

#

who wants to make a house heater mod

#

i have a model i made for it and its just sitting here doing nothing

#

i can make it into a tile as well

drifting ore
#

I almost finish my UI API.
Here a small/easy example:

chrome egret
#

This is relevant to something I'm trying to understand. Once you create a new type of panel window, how do you construct or invoke it?

#

Trying to create an item searching mod - input a search item and induce the character to walk around searching nearby containers for it. The two points of understanding I'm missing are constructing/binding data into the new panel and figuring out how to scan for nearby containers.

drifting ore
chrome egret
#

Thank you very much! I will give this a look.

drifting ore
#

it returns all containers except the player's inventory

chrome egret
#

So things like nearby storage racks, etc., are contained within the backpacks object?

drifting ore
#

yep

chrome egret
#

Weird!

drifting ore
#

backpack of the loot inventory is like the backpack of your player inventory

chrome egret
#

ahhh

drifting ore
#

You see ? There is the base inventory (player inventory and ground) and after that you add backpack. Like real bag or container

chrome egret
#

Yes now I'm noting the variation to call getPlayerLoot

next glacier
#

item is a table right

#

and it has "Dirtyness" and "BloodLevel"

#

how do I get these values from the item table

#

in code

chrome egret
#

If I wanted to expand the searchable area to the entirety of a room (even the large warehouse), would I have to use a different method to grab nearby cells and search for containers?

next glacier
#

ive already attempted

drifting ore
next glacier
#
local function CalculateItemFilth(item)
    local bloodAmount = 0
    local dirtAmount = 0
    local blood = item:BloodLevel
    local dirt = item:Dirtyness
    if instanceof(item, "Clothing") then
        if (item:BloodLevel > 0) then
            bloodAmount = bloodAmount + blood
        end
        if (item:Dirtyness > 0) then
            dirtAmount = dirtAmount + dirt
        end
    else
        if (item:BloodLevel > 0) then
            bloodAmount = bloodAmount + blood
        end
        if (item:Dirtyness > 0) then
            dirtAmount = dirtAmount + dirt
        end
    end
    
    return bloodAmount + dirtAmount
end

local ISWashClothing_GetRequiredWater = ISWashClothing.GetRequiredWater;
function ISWashClothing.GetRequiredWater(item)
    local vanillaWaterAmount = ISWashClothing_GetRequiredWater(item);
    local filth = CalculateItemFilth(item)
    
    if filth > vanillaWaterAmount then
        return vanillaWaterAmount
    elseif filth < 1 then
        return 1
    else
        return filth
    end
end```
#

i dont think this is the right way

#

the functions getDirtyness() and getBloodLevel() return a different value from what it actually is

drifting ore
#

It's what I use

#

it's a %

#

so [0-100]

next glacier
#

if its a percent

#

if i dig into the debugger info

#

the item table shows it as 77.**

#

but bloodamount, the local i set, shows 38.**?

#

so..

#

item:getBloodlevel()*100

#

should i say

#

ill just try to make a new .lua file

#

just to get the values

drifting ore
#

I don't get why item:getDirtyness() is not working

#

Do you get an error ?

#

Because dirtyness and blood level is for clothing, so you need to be sure that item is a cloth before call item:getDirtyness(). Like that item:IsClothing() (Or item:IsWeapon() because weapon got blood level too)

gilded hawk
#

I was thinking, how can I add weapon/gear stashes spread out in the map?

fathom hare
#

Hello guys. I am trying to learn some Java and PZ Modding structure/basics, and to begin with learning I began to dig through some code while trying to suit a specific mod into my own needs. So digging through the mod code i wanted to add a property for an custom medical item, which apart from reducing pain, would also fully reduce cold/flu symptoms. Sadly it didnt quite work. I have tracked the same method which the author used to add the getReducePain function in the item, but i wasnt successfull. Could someone maybe take a look onto what I was doing wrong? Appreciate any help.

chrome egret
#

You might need to provide a little more information to get some assistance. Do you perhaps have a link to your source code, or at least a relevant snippet?

fathom hare
#

Of course!

#

So this is the code of the function in the item that reduces pain:

#
local normalEffect = function()
    if not Survivor:isInitialized() or Survivor:getBlood():getDrugs()[Alkagin.alias] == nil then
        return false
    end

    if not Survivor:getBlood():getDrugs()[Alkagin.alias].isActive then
        return false
    end

    if Survivor:getPainReduction() < 35 then
        Survivor:setPainReduction(35)
    end
    
end
#

I tracked the getPainReduction function back to the Survivor class:

#
---@return number
function Survivor:getPainReduction()
    return getSpecificPlayer(0):getBodyDamage():getPainReduction()
end

---@param value number
---@return void
function Survivor:setPainReduction(value)
    getSpecificPlayer(0):getBodyDamage():setPainReduction(value)
end
#

And I basically did the same by adding the get and setColdStrenght function to the Survivor class

#
    getSpecificPlayer(0):getBodyDamage():getColdStrength() 
end

function Survivor:setColdStrength(value)
    getSpecificPlayer(0):getBodyDamage():setColdStrength(value) 
end
#

and then adding a second local function to the medical item:

drifting ore
fathom hare
#
    if not Survivor:isInitialized() or Survivor:getBlood():getDrugs()[Alkagin.alias] == nil then
        return false
    end

    if not Survivor:getBlood():getDrugs()[Alkagin.alias].isActive then
        return false
    end

    if Survivor:getColdStrength() > 1 then
        Survivor:setColdStrength(0)
    end```
fathom hare
drifting ore
#

There are all the functions. Search "cold" on the page and you will find everything

fathom hare
#

getColdStrenght is specified there

drifting ore
#

So I miss understand the issue mb

fathom hare
#

But it doesnt sadly work in this code, at least at this moment when i am debugging it

#

It reduces the pain though, but not the cold. Thats why i am wondering myself what could ive missed.

drifting ore
#

Are you sure it's not reducing ? Maybe the max value of the strenght is higher that you think

fathom hare
#

I tried that also with other functions like get/setColdProgressionRate

#

Yeah i am sure. The cold is set in debug mode at 100.

drifting ore
#

Otherwise search in .lua vanilla game, to find exemple

#

I can't do more here, no idea

fathom hare
#

I tried using common mallow as my reference as it reduces in vanilla game the flu sympotoms as the only item.

#

But i didnt find anything in lua which could be related.

#

The only thing i found with common mallow was a parameter FluReduction =5

drifting ore
#

So I think it's not made for. Maybe make an food and make the player eat it

fathom hare
#

But it was stated in scripts/items

#

Sure thanks so much for the help anyways @drifting ore . If someone would have a clue or a little tip though It would be greatly appreciated.

drifting ore
#

The function is use one time in media\lua\client\LastStand\AReallyCDDAy.lua, line 112

#

That it

fathom hare
#

Wow, thanks

#

Il go take a look at it

daring palm
#

hey guys. How do I set perk level? I'm trying to use the function "setPerkLevelDebug" but nothing changes

fathom hare
#

Small question: whas is actually the difference between SpecificPlayer and playerObj? Does SpecificPlayer refering to a specific player in MP and playerObj to the single player character?

drifting stump
#

yes

#

getPlayer() always returns the first local player

#

with getSpecificPlayer() you can get other local players for example split screen players

sharp wind
#

I want to make a neckwear item, and have code running to modify their temperature if the item is wet

#

how do I modify only the player(s) wearing the item(s)?

fathom hare
lusty nebula
#

Guys a quick question so I can save a bit of time...When you start a new character in Apocalypse in one of the previous screens/menus before starting you can chose if your character will be naked/dressed and what kind (if any ) of clothes your character will wear. In that screen you can also save any preset you want ( ...and they are saved in the "Users " folder ).
Somehow by default the game assign a basic combo of random characther name, body style ( hairs,bear, etc ) and clothes.
Anyone knows where the vanilla file/s that control this is/are located?
( I guess somewhere in media-->lua )

gilded hawk
#

Is guns accuracy only calculated via Java? Cause I can't find any reference in .lua files

#

I found the Reloading in ISReloadWeaponAction ISInsertMagazine.lua and ISLoadBulletsInMagazine.lua

lusty nebula
#

Nope via file too

#

Check Brita's files for ie

gilded hawk
#

Oh, good idea, maybe I'll find some way to alter Nimble stats too

#

Thanks

lusty nebula
#

πŸ˜‰

#

@gilded hawk For the nimble stats you can alter them via the MainCreationMethods file IIRC πŸ˜‰

daring palm
#

ignore it. Just messing around trying to quote code

next glacier
#

and preceding image

#

i think i should keep backups before editing

lusty nebula
#

|gnore it. Just messing around trying to quote code
@daring palm Click on the + symbol you can link files/scripts or you can send the message as code ( Simply write the part of code of interest/the script part in the writing box then press enter the option will pop up )

sharp wind
#

what's the difference between ContextMenu_lang.txt vs IG_UI_lang.txt ?

frosty falcon
small topaz
lusty nebula
#

@small topaz Thanks mate !!!! πŸ˜‰

sharp wind
#

I'm reading ISInventoryPaneContextMenu.lua and I see local playerObj = getSpecificPlayer(player). Where is player being passed in or coming from?

#

Yes, is it really necessary to test that here?

lusty nebula
#

To reply to your question...ContextMenu_lang.txt will affect only the writings when you mouse over an item in the inventory for example

sharp wind
#

Yes, I sort of figure this out. The other one is for things placed in the world

lusty nebula
#

Yep correct + any other UI elements πŸ˜‰

frosty falcon
#

how do you guys reload your mods when developing ingame? just use the f11 menu? seems a bit buggy for me

lusty nebula
#

I personally restart the game but I set it in windowed mode ( Not the borderless one ) so I can close it in a click

frosty falcon
#

ah k

sharp wind
#

it only reload lua I think

frosty falcon
#

reloading save works well but it was a bit annoying, so I tried f11 reloading and it gave me stack errors after a few reloads on a simple print script

sharp wind
#

not .txt if you reload via F11

frosty falcon
#

so I don't trust it

lusty nebula
#

In addition if you want you should find around a scripts that let the game restart automaticallly every time you'll close it

#

So in brief I do so: One click in windowed mode to close it quickly then the script restart the game automatically

frosty falcon
#

its ok

#

it takes 10 seconds to quit save and load save

#

and it reloads my lua mod

#

slightly annoying but I can deal with it :D

lusty nebula
#

yep a bit more cumbersome but at least safer

frosty falcon
#

good idea on the game relaunch script tho, but my first mod isn't so big that I have to restart the game (yet) πŸ˜†

#

it reminds me I saw in passing a modification to zomboid startup script that enables debug launching by launching the game holding shift

lusty nebula
sharp wind
#

Is there an event for equipping items? Or is that the only way to run user-code ? From Wiki I see only two events, OnEquipPrimary and OnEquipSecondary

lusty nebula
#

At least for clothes I define them in the script located in the Client folder, for the weapons instead I define them directly in a lua file in the shared folder

#

Sample:

#
    for i , item in pairs(clothes) do
            clothes = inv:AddItem(item);
            pl:setWornItem(clothes:getBodyLocation(), clothes);```
sharp wind
#

You should use ``` code ``` for that

lusty nebula
#

For the weapons instead as said I place them in a lua file in the " Shared " folder ( or rather as per normal )

#

Sample:

        ["Base.M723"] = 1,               -- RIFLE
        ["Base.556Clip"] = 7,                   -- RIFLE CLIPS
        ["Base.556Box"] = 16,                   -- RIFLE AMMO BOXES            
        ["Base.Sight_Aimpoint"] = 1,            -- RIFLE PARTS```
sharp wind
#

It's backtick, not single quote, ` not '

lusty nebula
#

Yep but it's pita to use because on the ITA keyboard there isn't it ( I hope you'll get it somehow )

sharp wind
#

It should exist on any keyboard

lusty nebula
#

Unfortunately on ours there isn't... ( Like some others symbols like for example ~ )

#

That's the pain of the ITA keyboard layout. If I want them I have to switch to ENG language but then the keys don't match the keyboard ones, unfortunately

sharp wind
#

Either that or just copy and paste it from the character map application

lusty nebula
#

Yep but I have to remember them every time that's not exactly handy to be used...

sharp wind
#

The code is U+0060

lusty nebula
#

Thanks, I've made already a notepad file with all the special symbols written so I have only to copy/paste them when needed πŸ˜‰ ( At least when I'm not too lazy to do it LOOL πŸ˜„ )

lusty nebula
#

Life saving registry key LOOL πŸ˜„

hot patrol
#

So I need some advice. I am making an anime body pillow mod and each pillow has a different image on both sides. Now you can use it as a weapon but the main detail is it is meant to be a bit of a decorative item. I want to make it so that when you place it in the world you can choose which side is being showed. As of right now I can only think of one way to do so and that is by adding a recipe to transform it into and entirely different item that is just the same thing but flipped. Do you think this is worth it or should I just make it 1 sides?

sharp wind
#

On Linux, I just do Ctrl+Shift+u, then 0060

hot patrol
#

I really wish there was a way a way to rotate it when placing

sharp wind
#

that the only way I think

lusty nebula
#

@sharp wind I'm on the Windows shit here LOOL πŸ˜„

sharp wind
#

You can add context menu item for the pillow item to allow flipping the side

sharp wind
#

Ah, you'll have to blunder through code

lusty nebula
#

@hot patrol Do you think this is worth it or should I just make it 1 sides?
IMHO That's the best option

#

Keep it simple πŸ˜‰

hot patrol
#

lol

sharp wind
#

you'll have to look at example code in the game

#

for things like watches

#

to see how to add a context menu

lusty nebula
#

@hot patrol If it's not complicated there's no fun in scripting LOOL πŸ˜„

sharp wind
#

Like I have 20 files open right now

#

just reading code

hot patrol
sharp wind
#

No, like how you right click on a watch to set the time?

#

There's code to do that

hot patrol
#

ohhh

#

yea

sharp wind
#

so I would image you can do the same for the pillow

hot patrol
#

maybe

sharp wind
#

right click on the pillow, which is placed in the world, to transform

#

either while in world or in the inventory

hot patrol
#

the thing I was thinking of would require me to add the same item as an entirely new one and make a craft recipe to flip it

#

too much coding for that tho imo

sharp wind
#

both of that have examples, you have a wrist watch, and a clock (the one with the two big bells)

lusty nebula
#

If you want to auto randomise it you can even use a Events.OnTick ( So to have it flipping after a certain amount of time )

hot patrol
#

I will see if I can find an example

hot patrol
#

man everytime I say I am done working on this think I think of more work

sharp wind
#

There's already simple examples

lusty nebula
#

@hot patrol On the 20th of January I've started writing a script with the same thing in mind...Still working on it right now LOOL πŸ˜„

sharp wind
#

you'll need ISInventoryPaneContextMenu.createMenu

hot patrol
hot patrol
#

being able to hang stuff on walls and such

lusty nebula
#

You can already hang stuffs on walls...

hot patrol
#

like world items?

#

how?

#

I wanna hang my trusty katana up there

sharp wind
#

there's another mod that added a context menu that I know of is "They Knew"

sharp wind
lusty nebula
#

If it's in the game, you need simply to find the script/lua that generates it and then modifying it accordingly...

#

As reference take a look at the code of this mod ( give me a sec for the link )

hot patrol
lusty nebula
#

Change the camo net with the katana that's it πŸ˜‰

hot patrol
#

true but I meant for most every item. Right now if you want to place something you can only rotate it. I would love if you could do a little more like maybe rotate the other axis so that you can place certain items like cans so they look like they were knocked on their side

#

or stand guns against the wall

lusty nebula
#

feasible probably but that means that you have to play with the script/code/game coordinates

hot patrol
#

yea, figures. I wouldn't even know where to begin but if that was available in the game by default it would certainly fix my pillow problem pepeLaugh

lusty nebula
#

In game we can rotate any item on the X coord, that probably means that also the Y ones are available somewhere. If I would be you I would start looking into Media--> lua files...

#

( Just guessing)

hot patrol
#

I'll look at that two because that would be a lot more elegant than a context menu option anyways

sharp wind
#

It doesn't help to rotate in this case

#

unless the item you placed down is a 3D object

#

I guess you 3D model the pillow?

lusty nebula
#

If not you can grab the 3D model of the pillow directly from the game

#

In game the command to rotate a 3d object on the X coords is:
rolls =
I'm pretty sure that around there's also the command to rotate them on the Y coord...then finding it, it's another story LOOL πŸ˜„

#

maybe
flips=
?

hot patrol
#

it is a weapon

hot patrol
sharp wind
#

normally i see that when you place down a weapon, it prefers one side

#

so rotating it won't do you any good

#

unless you can place it down on the "edge"

#

then rotating it would work

hot patrol
sharp wind
#

but then it would need to be a furniture type

#

not sure furnitures are 3D objects

#

they look like sprite to me

lusty nebula
#

if the can is a 3D object ( it's placed vertically in game ) you can use it as reference...Somehow also vertical ones show only the same side but better than nothing no?

hot patrol
#

This is my item there is an image on the opposite side as well and I want to flip it the same way you can rotate 3d objects like guns

#

that is what I am talking about

#

you can rotate left and rigth on on the x axis but not on the y.

#

so either I add a context menu optiuon as Mice suggested to just flip the item or I find out if it is possible to make the Y axis also adjustable

lusty nebula
#

can you write you actual X coords command used in your script? Wanna try a thing....

hot patrol
#

attachment world
{
offset = 0.0000 -0.3620 0.0000,
rotate = 0.0000 90.0000 0.0000,
}

lusty nebula
#

do you have some local params in your script ( Send me via PM the script so I can see it if you don't want to post it publicly )

fair frost
zealous pebble
#

Hey idk if anyone is free to maybe just dm me some advice but the last week or so I've been wanting to learn the basics of modding and no one has really given me any advice. I want to make a profession mod and maybe two or so items

modest yarrow
thin hornet
fathom hare
#

Ok guys i try the whole day to make a function in a mod item work, which should reduce Cold/Flu if the character has a ColdProgressionRate higher than 0, but i keep constatly getting an error.

#
        return false
    end  
       if Survivor:getColdProgressionRate() > 0 then
          Survivor:setColdStrength(0)    
    end
         
       if Survivor:getPainReduction() < 35 then
        Survivor:setPainReduction(35)    
    end
end```
#

The getPainReduction is the code from the author of the mod which i try to suit for my needs - and it does work without problems.

thin hornet
#

@sharp wind
All timed action derive from ISBaseTimedAction class
Could hook the base action method to trigger an event.

local ISBaseTimedAction_start = ISBaseTimedAction.start;
function ISBaseTimedAction:start(...)
    ISBaseTimedAction_start(self, ...);
    triggerEvent("OnAction_" .. self.Type .. "_Start", self);
end

And then hook into any action this way:

local function OnAction_ISAddFuel_Start(action)
  -- do something after ISAddFuel:Start() executed
end
Events["OnAction_ISAddFuel_Start"].Add(OnAction_ISAddFuel_Start);
fathom hare
#

When im adding my lines (the getColdProgressionRate and setColdStrength are defined in the same way as the author defined getPainReduction) the code doesnt work and it spits the error:

#

With line #9 being :

#

if Survivor:getColdProgressionRate() > 0 then

#

If i add the same function like this though it does work, but it works constantly adding the value -20 per tick to the cold/flu level, which results then in something like -233.23992 cold/flu value. if Survivor:getPainReduction() < 35 then Survivor:setPainReduction(35) Survivor:setColdStrength(-20.0) end end

sharp wind
thin hornet
#

@sharp wind Yeah i could see this kind of basic event added into the source code but for now that could be done. Might want to use a prefix in that event name in case other people use the same concept

rare sleet
#

Honestly I've been considering making a library mod for more events and data-driven menus and systems, a ton of stuff is hardcoded and requires invasive rewrites meaning people will be super incompatible doing the same things

#

Like the good approach to that would be to add an event to the action for equipping/unequipping items

#

But having a lot of mods overriding files leads to problems with compatibility down the line, so a library would be better

hot patrol
#

@thin hornet do you know if it is possible to make a script that allows you to rotate placed items on the y axis along with the x? Me and @lusty nebula are trying to figure it out for my anime mod

#

My pillows are 2 sided and I want to be able to dispay either side

thin hornet
#

inventory\InventoryItem.java

   public void setWorldZRotation(int var1) {
      this.worldZRotation = var1;
   }
rare sleet
#

An approach could be to give items a fake list of world items which could have different models (and thus different model offsets/rotations, such as a can on its side or the flipped pillow), and which you cycle through using a hotkey?

#

Which is basically just a shiny version of adding a "flip pillow" context menu action to the item, really

hot patrol
rare sleet
#

It's definitely a lot of messing around, yeah

hot patrol
#

I mean my mod is already going to have a lot of the same item just for different image prints

#

but it is a good idea

rare sleet
#

I wonder if you could automatically generate the flipped variants using ItemTweaker or something similar?

hot patrol
#

now that would be perfect. Realistically it shouldn't need to be a new item.

#

just swap the rotation values

rare sleet
#

Actually I doubt you can define new items like the scripts from lua, but I'd have to research it

thin hornet
#

DoParam would only edit existing item, it cannot edit models or other stuff like recipe tho

hot patrol
#

that is what I was gona do originally

#

mind you I can't code so it's the best I could think of

rare sleet
#

there is ScriptManager.ParseScript(string) but no idea if that's exposed to lua or what would happen if we were to generate new items via it after scripts are actually loaded

#

or if it even works like that, I guess

thin hornet
#

ParseScript only do the parsing job

#

the actual part that add parsed item is
public ArrayList getAllItems() {

#

we do not have access to add to this variable this.itemTempList.add(var4);

rare sleet
#

Ah, neat

#

Little disappointing that DoParam is defined on Item instead of BaseScriptObject, looking at the javadoc

willow estuary
#

It works for script items

local item = ScriptManager.instance:getItem("Base.Hat_Army")    
if item then 
    item:DoParam("BulletDefense = 100")
end
hot patrol
#

all this is going right over my head

thin hornet
#

Also i think DoParam must be done in OnGameBoot to properly work

lusty nebula
#

Can't wait to have flipping objects on the Y axis so we can finally cook homelettes too LOOL πŸ˜„

willow estuary
#

It should be run in shared or server directories however.

thin hornet
#
   public Item getScriptItem() {
      return this.ScriptItem;
   }

   public void setScriptItem(Item var1) {
      this.ScriptItem = var1;
   }
#

we do have the method to change the script item tho

#

Maybe we can have different angled items and just change the current item ScriptItem

hot patrol
#

soo.. that can help me?

thin hornet
#
-- just a pseudo code to show the idea
local horizontalItemScript = getScriptManager():getItem("Base.HorizontalItem");
local verticalItemScript = getScriptManager():getItem("Base.VerticalItem");
local myItem = theItem; -- InventoryItem
if key == "UP" then
  myItem:setScriptItem( verticalItemScript );
else
  myItem:setScriptItem( horizontalItemScript );
end
sharp wind
sharp wind
#

A neckwear

thin hornet
#

Then its a clothing item

#

youll want to intercept it with ISWearClothing

sharp wind
#

Yes, but it will have context menu for soaking with fluid

#

before wearing

thin hornet
#

mhm

sharp wind
#

once worn, I track the item and the wetness

thin hornet
#

You can wear it normally and you add an new option wear with soaking?

sharp wind
#

Normal wear would be normal, no change, but if you soak it first, it will run code

hot patrol
thin hornet
#

Then yeah just make a OnFillInventoryObjectContextMenu and add your option if the selected item is that one.

thin hornet
hot patrol
#

ah.

#

if you do test it can you check back? I'm don't know how to do it myself so i'm lost on that one.

thin hornet
#

but want to have different angle other than the only one

hot patrol
thin hornet
#

that happen to be set into server\BuildingObjects\ISPlace3DItemCursor.lua

hot patrol
#

I want to be able to hot swap it. I know I could just make all the pillows 1 sided and save trouble but this would cut down on items I need to add if I can make it 2 images a model plus it is more realistic since dakimakuras are like that

thin hornet
#

Now from there gotta look what we can do

#

we still cannot change its rotation but maybe we can detect your item and add a key to switch it for a different one that would be the "other side"

hot patrol
#

that would work

thin hornet
#

item MyPillow1
item MyPillow1Reversed
something like that

#

something like that

drifting ore
#

Hello there. Just a question: HOW to extract the bank-files of ZomboidSound.bank and ZomboidSound.strings.bank?

hot patrol
drifting ore
#

the Fmod Bank Tools can't extract it. (throws errors)

hot patrol
#

not as elegant as proper rotation but it serves the purpse perfectly

willow estuary
#

You could just use a recipe as well

    recipe Flip Pillow
    {
        Pillow1,
        Result:Pillow2,
        Time:1,
    }
thin hornet
#

would be less of a headache

sharp wind
#

Recipe is what I would use

#

which you can trigger with a context menu

hot patrol
drifting ore
#

Has nobody any idea how to extract ZomboidSound.bank ? :/

thin hornet
#

all pillow use same model right?

hot patrol
#

but they are considered weapons

thin hornet
#

yeah i recall

hot patrol
#

so I think I need to make each one it's own item

#

I hadn't wanted to do that.

thin hornet
#

there a big chance that you do

#

unfortunatly

hot patrol
#

for the rotation or for different textures. I know for textures I do

#

would your script for flipping it also require another item made for it?

sharp wind
#

it's what brita does for their guns

thin hornet
#

well the rotation would be a recipe that switch between the regular and the reversed item

drifting ore
#

... i'm very annoyed ... the ZomboidSound.bank file can't be extracted. HOW i can replace the zombie sounds through mod? ... -.-

hot patrol
#

yea but I would still need to make a different item for it. That is 2 items per pillow for however many pillows I add. A lot of bloat there

thin hornet
drifting ore
thin hornet
drifting ore
#

thats why i'm here

hot patrol
drifting ore
thin hornet
#

Editing ISPlace3DItemCursor would still require duplicating your items

#

there is no way around this

hot patrol
#

ok so yea the crafting method is easier to go with

thin hornet
#

the game engine is not offering the possibility

hot patrol
#

sucks but gotta work with what you got I guess.

thin hornet
#

yep

hot patrol
#

thanks anyways.

drifting ore
#

ok. fixed ... the ZomboidSound.bank-File takes VERY MUCH TIME to start extracting ... regardless of errors ... what?

hot patrol
#

stupid question but I hate how rotation items in zomboid works so someone help a brother out here. If the roation for this item here is rotate = 0.0000 90.0000 0.0000, what do I change it to for it to be completely flipped on it's other side.

sharp wind
#

the z one ofc

#

assuming that's in degrees

#

and you are looking at rotating around x,y,z

#

but try 90 for each

#

and see how they rotate

#

I pressume it's 0,0,90

#

but could be 0,0,180

hot patrol
#

I think what you are saying would put the backside upside down. I think I want to change the middle value.

sharp wind
#

like I said, try 90 for each

hot patrol
#

ok will do.

sharp wind
#

If 0,90,0 is what's in the image, changing the middle value might just make it spin

hot patrol
#

ok I'll try that

thin hornet
#

So made this little piece of code not sure if that is useful to anyone or if it can be improved.
But that should allow to bind to any action start,stop,perform beforepre or afterpost its execution.

File: media/lua/client/ActionEvents/ActionEvents.lua

require 'TimedActions/ISBaseTimedAction';

local definedEvents = {};

LuaEventManager.AddEvent("OnActionStarted");
LuaEventManager.AddEvent("OnActionStopped");
LuaEventManager.AddEvent("OnActionPerformed");

local function triggerActionCustomEvent(action, method)
    local eventName = "On_" .. action.Type .. "_" .. method;
    if not definedEvents[eventName] then
        LuaEventManager.AddEvent(eventName);
        definedEvents[eventName] = true;
    end
    triggerEvent(eventName, action);
end

local ISBaseTimedAction_start = ISBaseTimedAction.start;
function ISBaseTimedAction:start(...)
    triggerActionCustomEvent(self, "PreStart");
    ISBaseTimedAction_start(self, ...);
    triggerActionCustomEvent(self, "PostStart");
    triggerEvent("OnActionStarted", self.Type, self);
end

local ISBaseTimedAction_stop = ISBaseTimedAction.stop;
function ISBaseTimedAction:stop(...)
    triggerActionCustomEvent(self, "PreStop");
    ISBaseTimedAction_stop(self, ...);
    triggerActionCustomEvent(self, "PostStop");
    triggerEvent("OnActionStopped", self.Type, self);
end

local ISBaseTimedAction_perform = ISBaseTimedAction.perform;
function ISBaseTimedAction:perform(...)
    triggerActionCustomEvent(self, "PrePerform");
    ISBaseTimedAction_perform(self, ...);
    triggerActionCustomEvent(self, "PostPerform");
    triggerEvent("OnActionPerformed", self.Type, self);
end

Usage Example:

require("ActionEvents/ActionEvents"); -- Require first

local function OnActionStarted(actionName, actionInstance) -- action param is equal to the actual action self
    print("Action " .. actionName .. " has started");
end
Events.OnActionStarted.Add(OnActionStarted);

local function On_ISTakeFuel_PreStart(actionInstance) -- action param is equal to the actual action self
    actionInstance.character:AddItem("Base.PetrolCan");
end
Events.On_ISTakeFuel_PreStart.Add(On_ISTakeFuel_PreStart);
sharp wind
#

looks useful

thin hornet
#

Of course its not the same as hooking directly as you cannot overwrite the process and change it directly. But it serve as an event emitter for action start,stop or performed and still give a direct reference to the action self.

sharp wind
#

Which is useful

#

as I imagine you can get the player doing the action

#

which is half the battle

#

to stick code onto the event

thin hornet
#

yep i just updated to have a more global trigger too

sharp wind
#

and to run code only on the right player

#

at the right time

thin hornet
#

well yeah you have access to anything the action instance has.

sharp wind
#

without having to run things OnTick, OnHour, or OnTenMinutes, or whatever

drifting ore
#

Ok ... and now? ...

hard hound
#

hello guys i have a question. how can I play the original knox county map in nomral singleplayer
without the zombie waves of the you have 1 day challenge.Is it a mod?

thin hornet
rare sleet
#

Truly hellish solution: override shared/ISBaseTimedAction.lua to hook into ISBaseTimedAction:derive and register events

gaunt swallow
#

anyone here could help me out with a mod called SimpleShop (Project Capitalism) ?
right now the mod allows you to buy stuff while a radio is inside your inventory but I would simply like
this to be able to check if the player is standing next to a HAM radio instead, not inside the inventory.
Creating a reason for players to come to the trading hub where there is a HAM radio present.

sinful idol
#

That feeling when you were making a mod and wokeup to realize someone made it as well

#

I was making a turret mod!

thin hornet
loud schooner
#

How would I go about removing an element from a combo box? I see AddOptionWithData, is there something that can remove a given option?

#

editing the Fashion Montage lua btw.

next glacier
#

sounds tough because fashion montage not work

modest yarrow
#

and replace all the instances of "keep" by:
keep HamRadio1/HamRadio2
if you only want the HamRadio

solemn marsh
#

whats the mod that adds the gas tank truck

fathom hare
#

Hey, could someone take maybe a quick look and tell me if this has a bad syntax or something which is the reason the debugger shoots out the error "__le not defined for operand"? Appreciate any help. ``` end

     if (Survivor:getColdStrength() >= 20.0) then
        setColdStrength(getColdStrength() - 20.0)
end```
frank elbow
rare sleet
#

It's likely using le as in 20.0 <= x rather than explicitly defining greater than

#

Try printing the value of Survivor:getColdStrength() and making sure it's what you expect

frank elbow
#

You're totally right, Lua doesn't even have metamethods for greater than & greater than/equal to πŸ˜… forgot about that

#

getColdStrength supposedly returns a float, though, which should be fine. If it were nil the error would've said that instead

modest yarrow
nimble spoke
#

Actually missing it before setColdStrength too

fathom hare
fathom hare
#

While those are the cold/flu settings for debbuging:

chrome egret
#

That's a type compatibility error because it's comparing to nil, no?

rare sleet
next glacier
#

does the game actually run on java?

#

because i have a few ideas

#

or its just the server

rare sleet
#

The game's core is built in Java, but the modding system is in Lua

next glacier
#

how do you run custom java arguments

#

if it doesnt already run using ZGC

rare sleet
#

I believe you can pass them to the executable, but I'm not sure what actual Java version it is or how to run the jars directly, so something like changing garbage collectors may or may not work

#

I haven't experienced anything that looks like GC hitching in PZ, though

fathom hare
# rare sleet You're building on Immersive Medicine and implementing `Survivor:getColdStrength...

That is totally right. I try to suit it a little to my needs and i had some success (at least with the blood loss function), but while im trying to add this cold/flu reducing function to one of the iMed drugs, defining the function the same like the author did the getPainReduction in the same drug, but without success. The whole function looks at this moment like this: ```local normalEffect = function()
if not Survivor:isInitialized() or Survivor:getBlood():getDrugs()[Alkagin.alias] == nil then
return false
end

if not Survivor:getBlood():getDrugs()[Alkagin.alias].isActive then
    return false
end  

        if (Survivor:getColdStrength() >= 20.0) then
        Survivor:setColdStrength(Survivor:getColdStrength() - 20.0)
end

end

local overdoseEffect = function()
if not Survivor:isInitialized() or Survivor:getBlood():getDrugs()[Alkagin.alias] == nil then
return false
end

if not Survivor:getBlood():getDrugs()[Alkagin.alias].isOverdose then
    return false
end

if not Survivor:getBlood():getDrugs()[Alkagin.alias].isOverdoseEffectApplied then
    if Survivor:getFoodSicknessLevel() < 80 then
        Survivor:setFoodSicknessLevel(80)
    end

    Survivor:getBlood():getDrugs()[Alkagin.alias].isOverdoseEffectApplied = true
end

end

Events.OnTick.Add(normalEffect)
Events.OnTick.Add(overdoseEffect)```

#

while the original normalEffect function does look like this:

#
    if not Survivor:isInitialized() or Survivor:getBlood():getDrugs()[Alkagin.alias] == nil then
        return false
    end

    if not Survivor:getBlood():getDrugs()[Alkagin.alias].isActive then
        return false
    end  
    
               if Survivor:getPainReduction() < 35 then
               Survivor:setPainReduction(35)
    end           
    
         
end```
next glacier
rare sleet
# fathom hare That is totally right. I try to suit it a little to my needs and i had some succ...

Ah, so if you haven't modified uhhhHHH media/lua/client/Component/Survivor/Entity/Survivor.lua to add the getColdStrength() function, while it is part of the base game's systems that the Survivor object is built on, it doesn't have that method. So you'll have to add it yourself, along with the other cold-related functionality:

function Survivor:getColdStrength()
    return getSpecificPlayer(0):getBodyDamage():getColdStrength()
end
function Survivor:setColdStrength(strength)
   getSpecificPlayer(0):getBodyDamage():setColdStrength(strength)
end
function Survivor:getColdProgressionRate()
    return getSpecificPlayer(0):getBodyDamage():getColdProgressionRate()
end
function Survivor:setColdProgressionRate(rate)
    getSpecificPlayer(0):getBodyDamage():setColdProgressionRate(rate)
end
next glacier
#

anyone know how to set server options

#

with lua

#
if isServer() then
    MinutesPerPage = 0.1
end
#

is this enough?

fathom hare
# rare sleet Ah, so if you haven't modified uhhhHHH `media/lua/client/Component/Survivor/Enti...

Well, the issue is I did modify the Survivor class and did add the getColdStrength function - that's the weird thing: ```function Survivor:setColdProgressionRate(value)
getSpecificPlayer(0):getBodyDamage():setColdProgressionRate(value)
end

function Survivor:getColdStrength()
getSpecificPlayer(0):getBodyDamage():getColdStrength()
end

function Survivor:setColdStrength(value)
getSpecificPlayer(0):getBodyDamage():setColdStrength(value)
end```

rare sleet
#

ah it was what I thought! You just forgot the return for the getColdStrength

#

I have done this many times in the last few days

next glacier
#

ples help

#

my mod doesnt work in mp xD

fathom hare
#

I am very sorry if this is a trivial question @rare sleet , but I am rather a noob in programming and Java - could u tell me how i should implement the return for the function correctly?

rare sleet
#
function Survivor:getColdStrength()
    return getSpecificPlayer(0):getBodyDamage():getColdStrength()
end

Basically to make a function output some value, you've gotta return the value you want, so you use a return statement for that. Without that, the function always returns nothing

chrome egret
#

Ah, no implicit returns in Lua

rare sleet
#

Unfortunately I've gotta head off so I hope this has fixed the issue and it works πŸ˜… good luck!

next glacier
#

you can do calculations in between

#

but what actually gives the function its value is

#

return value

#

if you do alot of code in between
but in the end its return 0

#

then Surviver:getColdStrength() will only give 0

#

i see you are trying to set cold strength

fathom hare
chrome egret
#

Howdy @drifting ore, your guide on UI handling is pretty helpful. However, in your full example you seem to have duplicate definitions for MyUI:new-- one of new(x, y, width, height) signature, and one of simply new() signature. Is that intended for some non-obvious reason?

fathom hare
next glacier
#

functions must return yeah

finite radish
#

Anyone have any info on how getSpecificPlayer interacts with network reproduction? I'm going to assume if you're passing (0) that it's just the player in clientside code, but I'm not sure on that (or how it relates to code that runs on the server, or if you'd have to fetch the player object through other means for shared/serverside code).

fathom hare
# next glacier functions must return yeah

yeah now i see that function Survivor:getPainReduction() return getSpecificPlayer(0):getBodyDamage():getPainReduction() does return a value too. One small detail did cost me nearly a day of digging through this - thats fascinating and frustrating at one time...

next glacier
#

because this
getSpecificPlayer(0):getBodyDamage():getPainReduction()

#

is also a function

finite radish
chrome egret
#

You're correct, but that's a different case of assigning to a variable outside the function scope

#

To get a return value from a function, you must call return within it

finite radish
#

just making sure I was getting that right, my lua is pretty rusty and I forget exactly how variable scope works

#

something something local and everything else is global iirc but it's been a while

austere ferry
#

Hey guys still new to modding, just would like to ask how do I code an item for me to be able to place it? I did a mod wherein the radio is used to craft but now I can't place the radio because it's considered as an "item"

next glacier
#

i thought that'd get a result of nil

sinful idol
#

He's printing the var x

#

The return is nil

#

x is 1

finite radish
#

as far as I understand you only need to return a value if you're actually setting something to the function itself

next glacier
#

ah.

finite radish
#

i.e. x = yourFunction() would need a return value

next glacier
#

did zomboid update?

#

my code that was running fine is now weird

slender mauve
next glacier
#

ah, but in the case of locals cant

#

if i make a local inside the function

slender mauve
finite radish
#

even if it was local, it should still work - the function is contained within the same scope
but yes, if it was local inside the function that's different

#

(at least, I believe that's how that'd work out)

next glacier
#

am getting an error on line 7

#

expected function near 'local'

#

i mean do I really have to do numPages = 0?
originally it didnt need to be like that?

#

or a typo elsewhere

#

im confused

chrome egret
#

Doesn't that stack trace say the error is in clothes.lua rather than the file you're showing?

next glacier
#

am dumb

#

found it

#

thanks

#

:/

#

probably got overloaded from coding

chrome egret
#

ain't no thang

next glacier
#

am concerned tho

#

people commenting on my mod

#

that it doesnt work in mp

#

and that it used to before

chrome egret
#

I can see how that would be concerning.

next glacier
#

old code i posted which is just a copy-paste of original game code with minor edits here
konijima said i had to use a throwaway to replace game code

#

i think that worked i guess?

modest yarrow
#

Do you know if there is a way to know the starting configuration of a save ?:

  • which playstyle is currently played ? (apocalypse, builder, a challenge (which one)
  • the traits and occupation set at the beginning
  • the character config

I would like to add a button when the player die to quickly do a restart (new save) with exactly the same config.
And also eventually delete the old save

next glacier
#

sort of like minecraft hardcore

sinful idol
#

But I think the problem there is if it's a new save then the mod won't know the data? Unless it's somehow saved to filesystem independent of the save

worldly stone
#

from my notes the file map_sand.bin in the save folder contains the world settings. (could be out of date) so you would want it to copy that

next glacier
#

so

#

does somebody know if i can edit Serveroptions.ini

#

with a mod?

#

specifically
settings MinutesPerPage value

#

if mod is installed, server automatically sets

#

I can only find getServerOptions()
I dont see a setServerOptions in the documentation

chrome egret
#

I was just reading about the global ModData functions. Would those be suitable for your purpose?

sinful idol
next glacier
#

MinutesPerPage is a setting in vanilla server

sinful idol
#

getServerOptions():set('sometjing')

#

Something like that

#

You have to check the code

next glacier
#

ah

#

i think i got it

#

but what is the syntax

#

if isServer() then
getServerOptions():setFloat("MinutesPerPage")
end

#

getServerOptions():setFloat("MinutesPerPage") = 0.1

#

or is it

#

getServerOptions():setFloat("MinutesPerPage", 0.1)

sinful idol
#

It's a method so the latter most likely

next glacier
#

or

#

getServerOptions():getFloat("MinutesPerPage"):setFloat(0.1)

#

looks like the most sense

finite radish
#

getServerOptions():MinutesPerPage:setValue(0.1)

may work?

sinful idol
next glacier
#

oh wait

sinful idol
#

But yes just look at the source to see how it is :)

finite radish
#

the ServerOptions object that gets returned by getServerOptions() has a MinutesPerPage child, which has setValue()

#

so ye that should work

next glacier
#

getServerOptions():MinutesPerPage:setFloat(ReadingIsAJokeOptions.dropdown1)

finite radish
#

setValue, not setFloat unless i'm missing something

#

it's a double not a float

next glacier
#

vanilla code is o.minutesPerPage = getServerOptions():getFloat("MinutesPerPage") or 1.0

#

so i just assume its a float

finite radish
#

the object MinutesPerPage is an object of type DoubleConfigOption

#

at least, according to the documentation

#

who knows

#

that's for 40.43 i just realized, so maybe it's a float now

#

in 41.xx

rare sleet
#

getServerOptions().MinutesPerPage is the option object, you can use getServerOptions():getFloat("MinutesPerPage") to get the value according to the current javadoc, but to change the value you use getServerOptions().MinutesPerPage:setValue(float) I think. would have to test it

finite radish
#

yeah i think that's correct

next glacier
#

not sure whether to use . or : here
do I have to reference self?

rare sleet
#

. is to access a value, : is explicitly for calling functions as methods

next glacier
#

ah

finite radish
#

yeah i missed that when i posted it first as well, but period first then colon second for setValue()

next glacier
#

in functions it calls self as parameter, i thought that was it

rare sleet
#

if you use someObject:someMethod() then self in that function will be the object before the :

finite radish
#

also i doubt it'll matter, but setValue takes a double as an argument rather than a float, but i think it'll handle the type conflict for you automatically?

rare sleet
#

Yeah, Lua only has a "number" type I think? All the java number types like int, float, double should be translated to it automatically

finite radish
#

ye

#

the only other issue i can think of is how early you'd need to set this value, because if the server reads the .ini file only once and then just rolls with it you're kinda fucked

#

but i'm going to assume it works similarly to SandboxOptions which can be set in-game by admins

rare sleet
#

I would assume that if you change it at runtime then most things will be getting it from the config as it needs it, rather than caching

#

but again, testing

finite radish
#

yeah for sure

next glacier
#

idk how to use the zomboid doc at all

#

to find what i want

#

like an event after server finishes load

#

i know Events.OnGameStart exists

#

but when i search it on site doesnt show up

finite radish
#

OnServerStarted I believe is a lua event

#

according to the wiki, at least

undone crag
#

@gilded hawk @hidden estuary It looks like this gets the profession in character creation MainScreen.instance.desc:getProfession()
For how I found it, I tell you to help you find things in future: There are the files CharacterCreationHeader.lua, CharacterCreationMain.lua, and CharacterCreationProfession.lua. One of them has somewhere where it stores the chosen profession. I looked in CharacterCreationProfession.lua, with a search for mentions of profession.

-- the profession list choice
    self.listboxProf = CharacterCreationProfessionListBox:new(16, self.topOfLists, self.tableWidth, self.bottomOfLists - self.topOfLists);
```This looks like it is it. `self.listboxProf:setOnMouseDownFunction(self, CharacterCreationProfession.onSelectProf);` looks like a function that happens when you click on it. The function says `self.profession` in it. So a search for mentions of `.profession` gets `desc:setProfession(self.profession:getType());`. There is a `setProfession`, maybe there could also be a `getProfession`. A search for `getProfession` got the answer.
next glacier
#
if isServer() then
Events.OnServerStarted.Add(function()
    local serverjoke
    if
        ReadingIsAJokeOptions.dropdown1 == 1 then
        serverjoke = 2.0
    elseif
        ReadingIsAJokeOptions.dropdown1 == 2 then
        serverjoke = 1.0
    elseif
        ReadingIsAJokeOptions.dropdown1 == 3 then
        serverjoke = 0.1
    elseif
        ReadingIsAJokeOptions.dropdown1 == 4 then
        serverjoke = 0.01
    else    
        serverjoke = 0.1
    end    
    getServerOptions().MinutesPerPage:setFloat(getfloat("serverjoke"))
    end)
    
end```
#

now would this work perhaps

#

testing

finite radish
#

and I'd just set it to serverjoke instead of getfloat("serverjoke") since setValue actually needs a double, not a float

#

if getdouble() is a thing then maybe that, but idk

#

I don't think you need to explicitly define type in this situation, but if you get type errors then obviously you'll need to figure something out

next glacier
#

woops

finite radish
#
getServerOptions().MinutesPerPage:setValue(serverjoke)

should work imo

next glacier
#

console works with code right

#

so it should work if i paste it

#

getServerOptions().MinutesPerPage:setValue(0.1)

#

to test

#

without the serverjoke first

finite radish
#

in theory, yeah. the only limitation i can think of is if getServerOptions isn't global and requries some sort of scope

#

but i don't think that's a thing

#

since it's a lua function

#

i'd try to get the value first though, and print it - then do setValue

#

just so you can actually see the changes in the console

next glacier
#

getServerOptions():getFloat("MinutesPerPage") or 1.0 works fine

#

because its vanilla code

#

and its just getting the value

#

setting tho? i dont think its possible now

#

or maybe with this method

finite radish
#

yeah you'd need to actually access the ServerOptions object, which is what getServerOptions() actually returns

#

so once you have the object itself, that's how you can use the properties (like <object>.MinutesPerPage)

next glacier
#

ServerOptions by itself is a class

#

does zomboid have getClass()?

finite radish
#

you're getting an object of that class

willow estuary
#

This may work

getSandboxOptions():set("MinutesPerPage",serverjoke)
-- or
getServerOptions():set("MinutesPerPage",serverjoke)
next glacier
#

oh is it actually a sandbox option?

finite radish
#

i think you're overcomplicating it when you could just do .MinutesPerPage:getValue() and .MinutesPerPage:setValue(x)

finite radish
#

it's in ServerOptions

#
print(getServerOptions().MinutesPerPage:getValue()
getServerOptions().MinutesPerPage:setValue(0.1)
print(getServerOptions().MinutesPerPage:getValue()
next glacier
#

it takes 2x as much time to debug server

finite radish
#

@next glacier if you run these lines one by one in the console, you should see it print the existing value, then you set the value, then you can print the value again to see if it changed

next glacier
#

brb

#

so its 1

#

2nd line errors

#
java.lang.RuntimeException: attempted index: setValue of non-table: null
    at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
    at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
    at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782)
    at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
    at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117)
    at zombie.ui.UIDebugConsole.ProcessCommand(UIDebugConsole.java:278)
    at zombie.core.Core.updateKeyboardAux(Core.java:1953)
    at zombie.core.Core.updateKeyboard(Core.java:2284)
    at zombie.core.Core.DoFrameReady(Core.java:3046)
    at zombie.GameWindow.frameStep(GameWindow.java:761)
    at zombie.GameWindow.run_ez(GameWindow.java:661)
    at zombie.GameWindow.mainThread(GameWindow.java:475)
    at java.base/java.lang.Thread.run(Unknown Source)```
willow estuary
#

You don't have your statements formatted properly
print(getServerOptions().MinutesPerPage:getValue()) not print(getServerOptions().MinutesPerPage:getValue()
and
print(getServerOptions().MinutesPerPage:getValue()) not print(getServerOptions().MinutesPerPage:getValue()

next glacier
#

what does

#

protectedcall

#

mean

willow estuary
next glacier
#

yea thanks for that

#

but though the real issue is setValue line

finite radish
#

yeah whoops, forgot to close those parentheses

next glacier
#

(for my other mod)

#

so instead of item:getBloodLevel()

#

i can use item.BloodLevel instead?

rare sleet
#

It depends on the object, it might be able to be done that way, but you should favor using the functions where they exist

finite radish
#

you might actually need : over . when dealing with lua functions that provide a java object rather than returning a table

#

so in this case, you might actually need getServerOptions():MinutesPerPage

#

but i'm not 100% sure on that

next glacier
#

the first question is if its possible or not (if hard-coded or modifiable)

finite radish
#

yeah all the functions/objects i listed are public, so it's 100% possible

next glacier
#

although I can completely override the function to not use minutesperpage at all

finite radish
#

the question of whether or not it's possible in the way you want is whether it can be set during runtime, which i'm still not sure about

#

just need to test in that regard using print

next glacier
#

can it be set during runtime without commands

#

or not?

finite radish
#

no idea, that's the part you need to use the console to test

quasi geode
#

getServerOptions():getFloat("MinutesPerPage") is the syntax for fetching the value

next glacier
#

i mean in vanilla you cant right

quasi geode
#

getServerOptions():getOptionByName("MinutesPerPage"):setValue(value) would be the syntax for setting a value, but dont expect it to properly work during runtime (never tested, so cant comment)

next glacier
#

thanks. will test later once im free

#

am doing something else atm

#

gonna go out

willow estuary
#

An alternate approach with "easier" coding, do this for every book in items_literature.txt

local item = ScriptManager.instance:getItem("Base.BookTrapping1")    
if item then 
    item:DoParam("NumberOfPages    =    1")
end
next glacier
#

i see now

#

getBloodLevel is for clothing

#

getBlood is for items

next glacier
#

btw whats the difference between

#

for j=0,coveredParts:size()-1 do
if self.noSoap == false then
self:useSoap(item, coveredParts:get(j));

#

for i=1,coveredParts:size() do
if self.noSoap == false then
self:useSoap(item, coveredParts:get(i-1));

#

cant find for j here

rare sleet
#

j is just a variable name; i is used normally for "iteration" but if you have multiple loops people just move forward to i, j, k and so on so they have different variables

drifting ore
next glacier
#

Btw
how do I get the number of items in an index
local coveredParts = BloodClothingType.getCoveredParts(item:getBloodClothingType())
for j=0, coveredParts:size()-1 do
local thisPart = coveredParts:get(j)
is it j

#

i=0 repeats until ends right

#

yeah cant seem to get only the BloodLevel in its table

#

its not the way

little vessel
#

So anyone knows the difference between getActivatedMods and isMod? I mean in terms of what they do.

fair frost
verbal ivy
#

@weary matrix Hi, sorry to bother you, but can you look into the code of "sendObjectChange" method for isoObject class? It seems to be a way to transmit object data from server to client, but I can't figure out the input for this method. It could solve so many MP modding issues if we can figure this method out, thanks

rare sleet
#

You can see a bunch of usage of it in media/lua/server/ClientCommands.lua - looks like it's used with the first argument being an explicit string from a list of defined commands (such as adding experience to a player, setting a sink to use an external water source, or "state" for things like adding fuel to or lighting a barbecue)
Also media/lua/server/Vehicles/VehicleCommands.lua for ones relating to vehicles and mechanics

wanton turtle
#

Does anyone know which parameter in the Arsenal (26) files is responsible for the rate of fire?
And what is the OAL?

drifting ore
#

Is there a function to check if an item can be equip ?

cosmic glen
#

Hi guys is there a way to open a console to see if there are any errors

hidden compass
#

When I display my own prepared PNG images, they always look messy. Is there a solution to this problem?

small topaz
cosmic glen
#

How do I open that file? What's debug mode? πŸ˜…

next glacier
#

how do I make close-up high res screenshots of my characters?

next glacier
#

ohh i see

#

make sure those pixels are 100% opaque

small topaz
# cosmic glen How do I open that file? What's debug mode? πŸ˜…

the console.txt can be found in your Zomboid folder. that is the same folder which contains the folder "mods" for example. don't know the exact location for you since it depends on the operating system (for ubuntu 20.04 it is /Home/Zomboid). to play in debug mode, go to your steam library, right click on Project Zomboid -> Properties -> General. in the Launch Options, simply add "-debug". the game will then always start in debug mode until you remove the -debug option.

hidden compass
next glacier
#

np

daring palm
#

Folks. I need some help with cloth rendering.

#

I'm making an exoskeleton mod.

#

The rendering works fine until I take off the clothes

#

wearing it

#

taking off the long sleeve shirt

faint jewel
#

the masks!

daring palm
#

wait what? I'm new to this

faint jewel
#

there are masks applied to certain clothings.

#

they hide pats of the body for rendering purposes.

daring palm
#

how do I set them?

faint jewel
#

taht i do not know... but the fact that her hands and chest are still there... tells me it's the masks

daring palm
#

well thanks

#

at least you gave me a clue to look for

drifting ore
#

<m_MaleModel>skinned\clothes\AstroSuit</m_MaleModel> <m_FemaleModel>skinned\clothes\AstroSuit</m_FemaleModel> <m_GUID>ab725954-15f2-4767-96bd-aad4a37b228a</m_GUID> <m_Static>false</m_Static> <m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomTint>false</m_AllowRandomTint> <m_AttachBone></m_AttachBone> <m_Masks>14</m_Masks> <m_Masks>15</m_Masks> <m_Masks>3</m_Masks> <m_Masks>5</m_Masks> <m_Masks>7</m_Masks> <m_Masks>9</m_Masks> <textureChoices>clothes\AstroSuit</textureChoices> </clothingItem>

#

I would simply remove these and it would stop masking over those and stop them from vanishing

#

Your .xml that will need to be changed is located in clothing\clothingitems\clothingname.xml

daring palm
#

It worked! thank you @drifting ore

#

I copied that file from the modding tutorial and you were right. There were a couple of masks enabled

drifting ore
#

masks basically make certain parts of the body disappear, e.g if i make a fat suit I would take most of the body part masks so I can make sure the body underneath vanishes

daring palm
#

yep

drifting ore
#

Here is all the masks

chrome egret
#

@drifting ore is it necessary to assign the button (or other) child elements to a property on self for the panel, or is that just a convention? I am thinking of using a makeButton convenience function to simply wrap the generation and return the element for the self.addChild(element) call

#

Like so:

function ItemSearchPanel:create()
    local function makeButton(x, y, width, height, title)
        local id = string.upper(title);
        local button = ISButton:new(x, y, width, height, title, self, ItemSearchPanel.onOptionMouseDown);

        button.id = id;
        button.initialise();
        button.instantiate();
        button.borderColor = self.buttonBorderColor;

        self.addChild(button);
    end
    -- Add entry box for item input
    local buttonHeight = SMALL_FONT + 2 * 4;
    local buttonWidth = 75;
    local padBottom = 10;

    local itemEntry = ISTextEntryBox:new("Search for what item?", 25, 40, 150, buttonHeight);
    itemEntry:initialise();
    itemEntry:instantiate();
    self.addChild(self.itemEntry);

    local close = makeButton(self:getWidth() - buttonWidth - 5, self:getHeight() - padBottom - buttonHeight, buttonWidth, buttonHeight, "Close");
    self:addChild(self.close);

    local search = makeButton(5, self:getHeight() - padBottom - buttonHeight, buttonWidth, buttonHeight, "Search");
    self:addChild(self.search);
end
#

tho I assume those locals probably can also be removed and the result fed straight into addChild

drifting ore
daring palm
chrome egret
# drifting ore

This is really useful! What is mask 11 though? Can't seem to pick out what's hidden in that shot.

chrome egret
#

haha at least I'm not the only one!

daring palm
#

back?

chrome egret
#

oh good thought

daring palm
#

I got one question about modding for MP. The basic idea is to send a msg to the server to sync state and validate some actions, right?

chrome egret
#

It depends on what you're doing. Some MP-capable mods only do client work, so they don't have to sync anything.

daring palm
#

For example, If I want to set skill points, I must send a msg to the server so that it validates it, right?

#

Suppose I wanna mod "Sprinter's sneakers" that sets the player 10 on sprinting skill upon wearing it

#

does the setting information must pass to the server to validate it or I'm free to set it locally in the client?

#

right now I'm doing locally, but I'm not sure if that would work in MP

chrome egret
#

I don't know off-hand, but I'm sure someone here knows

drifting ore
#

There's a good chance that you want to get the element from the window itself for anything (like changing the text of a button after clicking an other one). For simple menu it is useless but for more complex it is important.

#

But you can just put every element in a table or different table by type of element, as you want

chrome egret
#

Ah I see, I'm liable to want the reference for other things. Got it, thank you!

next glacier
#

I now present my new mod

#

got models to work

wet dune
#

I'm thinking of reviving the scp mod idea

#

However

#

Instead of scps already in the world

#

The player picks a trait and one scp will be chasing them

#

096, 106, and 1120

#

Each trait gives 12 points

#

I know 100% 096 and 1120 are possible

#

However

#

Idk about 106

#

How would I add custom zombies to pz? Something like soul's turning time

chrome egret
next glacier
#

forgot to edit mod description

#

from modtemplate xD

drifting ore
#

Can I add an event to an object ?
Something like that:

function ISSimpleUI:onCustomUIKeyPressed(key)
    if self.key and key == self.key then
        self:toggle();
    end
end

Events.OnCustomUIKeyPressed.Add(ISSimpleUI.onCustomUIKeyPressed)
chrome egret
#

There really shouldn't be anything different between doing it that way and wiring up a non-class function

#

Note, that's untested unrun code, but it's based on the example from Mr Bounty I've been following

pseudo pawn
quasi geode
drifting ore
quasi geode
#

uh no

drifting ore
#

I found a better way, just curious here

quasi geode
#

thats the same thing

drifting ore
#

So there is no way to make something like that work ?

quasi geode
#

not like that. the event will always be blind to the specific instance of ISSimpleUI, it will never pass a proper self variable

drifting ore
#

ok thats what I thought, just wanted to be sure thanks

frank elbow
#

You can probably add an event via LuaEventManager.AddEvent & then trigger it via triggerEvent in the same class (or via the global triggerEvent which presumably just calls the one in the class)

#

That's how the vanilla code does it (in Lua)

#

Just realized I misunderstood what you were trying to do, disregard that. Came to ask a question though:

Are sounds replicated to the server & other clients automatically? If so, how do I make them not be?

#

And if they aren't, is the standard way to trigger via client/server commands, or is there a more ideal way? (I know I could just check existing mods to determine this, but I figure if anyone knows the answer off the top of their head they could let me know)

lusty nebula
#

Anyone knows where the file that controls/lists the available face makeups is located?

small topaz
lusty nebula
#

thanks mate πŸ˜‰

frank elbow
#

Items are marked as makeup using a MakeUpType field on their item, & most (if not all; I only did a quick check) of them seem to be defined in scripts/clothing_others.txt*

#

I've mixed up the makeup items with the makeup "clothing"; the MakeUpType field isn't used, the DisplayCategory is

lusty nebula
#

What I'm basically trying is to find that file to change some makeups names

frank elbow
#

In that case, all you need to do is change the translation

lusty nebula
#

Also...good point...

frank elbow
#

I'm unsure about the exact process of overwriting translations, but I assume if you have the same translation string (that is, the same left side of the =) in your mod it'll overwrite it

lusty nebula
#

You can call the needed file anytime ( via script/lua)

small topaz
lusty nebula
#

Thanks all guys very much appreciated your help here! πŸ˜‰

#

As reference in case it could be of help for others makeup names are located in C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua\shared\Translate\EN

#

Always as reference: The file is very short so simply put it in your relavant mod folder ( Shared --> EN ) and make the necessary modifications, the mod then, when activated will overwrite them

willow estuary
#

FYI you only need to have, and should only have, your new/modified entries in a mod's translation files.

tropic granite
#

Anyone know how to have the giant wall of text that some servers like Project Apocalypse does when you login that you can write info and rules on?

hot patrol
#

does anyone have any idea how the attachment editor works. I'm trying to fix the way my model looks in the world and it is doing my head in

leaden dew
#

How can I address correct lua file (from other mod) via

require "PATH_TO_MOD/LUAFILE.lua"```
Which path should I use?
quasi geode
leaden dew
quasi geode
#

yep

tardy mural
#

Is it somewhat easy to make modded chat bots for servers?

#

We would like to have a chat bot which uses the /quit command on your server two times a day for restarts

zealous pebble
#

Can I use VS code to mod the game

drifting ore
zealous pebble
#

if hypthetically i coded something how would i apply it to test it

#

there is a ton of lua code on VS code which one do i get

#

nvm

#

how do i add skills to a profession

#

acording to one tutorial this is all I have so far

#
HEMAProfession.luarequire'NPCs/MainCreationMethods';
require'NPCs/ProfessionClothing';
-- HEMAProfession.lua
require'NPCs/MainCreationMethods';
require'NPCs/ProfessionClothing';

local function initProfessions()    

    -- Java: Create a new profession.    
    local hema = ProfessionFactory.addProfession("hema", "HEMA", "Prof_rm_Cheater");    

    -- Java: Add a custom trait called Undesireable (no one likes cheaters ).    
    hema:addFreeTrait("Brave");    

    -- Java: Add the vanilla trait Nightowl.      
    hema:addFreeTrait("ThickSkinned");
end```
#

i might have copied and pasted rn ill fix it soonm

#

sorry nvm i found a better reasource

hot patrol
#

My clothing items seem to magivcally be borken for no reason that I can see. would anyone mind taking a look at if for me? I get 1 error at start and all the clothing items don't show their icon nor do they apear when worn. When I drop them on the ground all the models including myslef also vanish.

zealous pebble
#

how do i find the names of icons in the game

#

how do you reference the names of the skills in the game anyway

#

idk

drifting ore
#

Hey, is there any way I could commission a mod?

fiery pecan
#

what type of mod?

small topaz
fiery pecan
#

also, speaking of mods...

#

how on earth does one force a zombie to update its rendering?

#

like.. I got code that dynamically replaces zombies wearing outfitA, with outfitB, yet...

#

they don't update their worn clothes until a world reboot

small topaz
# zealous pebble ``` HEMAProfession.luarequire'NPCs/MainCreationMethods'; require'NPCs/Profession...

not sure but it might happen that the way you add the "free traits" could be a bit buggy. the vanilla game distinguishes in the trait definitions between free traits and selectable traits. in case you simply assign selectable traits as you do, it might happen that the player can remove them during the profession and trait customisation. but not sure about it. just mentioned it so you could have a look at the issue when play-testing.

small topaz
daring palm
#

java is generating numerous repetitive exceptions: "Caused by: java.lang.NullPointerException: Cannot invoke "zombie.core.skinnedmodel.visual.ItemVisual.getTint(zombie.core.skinnedmodel.population.ClothingItem)" because the return value of "zombie.inventory.InventoryItem.getVisual()" is null"

#

@hot patrol

#

Callframe at: Render3DItem
function: render -- file: ISPlace3DItemCursor.lua line # 146
function: DoTileBuilding -- file: ISBuildingObject.lua line # 172

hot patrol
#

Not sure what any of that means

#

can you explain?

daring palm
#

@hot patrol It's hard to figure out exactly what's going on.

hot patrol
#

if you took a look at my mod do you think you could figure it out?

daring palm
#

I can try

hot patrol
#

I would say it could be because I redid the UV map but I had updated the models afterwards and I was having the issue with one of them before that anyways

daring palm
#

what issue?

hot patrol
# daring palm what issue?

the one I stated above about the models not showing up, no icon and having all models in the area vanish when I would drop the clothing

winged lotus
#

Evening all! I am having trouble with teleportation code, it is very wierd, I follow the same pattern as the teleportation from map but the character is not teleported like if something is preventing it. Maybe someone here could help me with that please? πŸ™

Here is the code ran at the end of a timed action :

    if self.doTp == true then
        print("Teleporting to " .. self.xValue .. "x - " .. self.yValue .. "y")
        self.character:setX(self.xValue)
        self.character:setY(self.yValue)
        self.character:setZ(0.0)
        self.character:setLx(self.xValue)
        self.character:setLy(self.yValue)
    end
#

And here are the print from console, 1. is the print from the teleportation and 2. is the print from the current coordinates of the player after teleport (or actuelly, after not being teleported). Am I missing something obvious here?

#

(teleportation is trigerred at the end of each timed action)

#

Weirdly, it centers the character to the nearest square instead of teleporting it away πŸ€”

chrome egret
#

Are you accounting for the difference between world coordinates and local coordinates?

winged lotus
#

I am not sure what it means? But in any case it should move my character away even if not to the coordinates I would like isn't it?
The character is in Muldraugh and I am giving it Louisville coordinates.

There it just refuse to teleport and get centered on the nearest square. But I am willing to try this world coordinates thing to see if it changes anything!

drifting ore
# fiery pecan what type of mod?

A radio mod, I don’t think itd be super complex I just want a custom extension to the existing radio channels to match some β€œlore” I had for a server of mine

wet dune
#

How do I make custom zombies?

#

I know it's possible

finite radish
wet dune
chrome egret
#

Have you tried looking at the code for those mods?

finite radish
#

^

wet dune
finite radish
#

Just look at the methods they use and then reproduce them.

wet dune
#

Don't wanna make shark feel hatred towards me, not that he already doesn't...

chrome egret
#

From my experience, you won't be liable to find enough information without looking at working examples. There simply isn't enough existing, complete, documentation.

finite radish
#

yup

wet dune
#

Wrong channel

#

Beat you to it advancedtrolling

finite radish
#

true

cold ginkgo
#

speaking of documentation. are you guys using cocolabs/pz-zmod project at this date and age?
trying to get at least some code completion running in lua, but so far only endless gradle tasks

chrome egret
cold ginkgo
#

hmm, i'm using emmylua, though maybe not in the right way. that seems to be another guide i've missed. thanks.

drifting ore
#

hi, how can i make a mod modifying the human characters in pz? i already have the models and they work in game but idk how to make a mod with them.

cold ginkgo
#

just to be clear. if i see this, that means autocomplete works as intended?

hot patrol
#

So I tested that flip pillow method we talked about yesterday and it doesn't seem to work. Changing the rotation seemingly does nothing even when I do it in the attachment editor in game

hot patrol
#

any coders in here know How I could go about adding a feature to flip the texture on my pillow wepon to show the texture on the back?

drifting ore
cold ginkgo
#

oh, well. i seem to get the gist of it.
god damn you, prototype chain...

#

i suppose one could say life didn't prepare lua for inheritance

fiery pecan
#

but yeahhhh... I've been metaphorically bashing my head against the rock that is forcing zombie visuals updates for a while...

drowsy needle
#

Hi. I want to create a new item using ItemZed, but i can't seem to figure out how, exactly?

cold ginkgo
#

alright, i seem to have underestimated lua type system
almost feels like home now

drowsy needle
#

This is what I've got so far and now I'm stuck. How do I give this thing the same stats as a scissor and modify them?

drifting ore
silent bloom
#

Hi all, does anyone know how the timestamps correspond to the day value? Timestamps for a channel seemingly continue to increase even as days tick up and I'm wondering if it's possibly a universal value. Or how it matches up to specific hours. Googling hasn't produced many good results, but it's possible I'm not googling the right terms

signal frost
#

What is IS short for?

drifting stump
#

infinite suffering

willow estuary
#

"Indie Stone"

chrome egret
#

I'm rethinking binding my custom UI to a certain key, since it looks like many are already bound, and I think I might want to use a solution like ModOptions to go down that route.

#

My new thought is to add a new entry to the right-click menu on the survivor which opens the menu. Am I correct that I would need to call Events.OnFillWorldObjectContextMenu to add this new entry (via a new function), or is that not the right place?

fair frost
chrome egret
#

Nice model!