#mod_development

1 messages · Page 125 of 1

sour island
#

Authors get inundated with comments that aren't always useful - and not everyone is inclined to set up a discord server or GitHub to better manage reports.

flat cipher
#

I obviously don’t want to create work for people helping in mod_support, but I’m not sure this is the way to do it

thick karma
#

shrug up to you, haha, as I said, no pressure

sour island
#

Configs can have comments if there's a default version shipped with the mod

thick karma
#

I get that your mod is not hard to set up

#

I mod, I can add, I get that

sour island
#

Unless I'm mistaken

thick karma
#

But unfortunately, many users... cannot add.

#

And don't read well

#

No hate

#

But that's just reality.

flat cipher
#

I could maybe, instead of generating a red box error, have an obnoxious custom message in the middle of the screen

sour island
#

Most users don't know how to read the red box errors

thick karma
#

I mean instead of crashing people you could just warn them that their values do not add up to 100

#

And let people disable that warning if they prefer to use relativistic weighting.

flat cipher
#

Yes that’s what I mean by obnoxious message

thick karma
#

I can send you a gamepad-friendly modal command that is very convenient for this

dull moss
#

Updated, thanks @thick karma

sour island
#

Is this a config in sandbox?

flat cipher
#

And I don’t want to add logic to fallback to relative weighing. I want to believe that people can add up 3 values to 100

thick karma
flat cipher
#

Yes, I meant obnoxious in a good way btw

thick karma
#

haha fair

flat cipher
#

Like they cannot ignore it and they can fix things on their own

thick karma
#

I do not perceive obnoxious messaging as positive haha

sour island
#

I had to change my sandbox options because people couldn't handle start and end days

dull moss
sour island
#

Changed it to start and duration...

dull moss
#

math hard

flat cipher
#

If you have code to display user friendly error message (aka not redbox errors), I’m interested! @thick karma

thick karma
#
WGS.createCenteredModal = function(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, source, destinationYes, destinationNo, playerIndex, arguments)

    widthModalIncoming = widthModal
    widthModal = math.max(widthModalIncoming, getTextManager():MeasureStringX(UIFont.Small, message) + 10)
    xModal = xModal - (math.max(0, getTextManager():MeasureStringX(UIFont.Small, message) + 10 - widthModalIncoming) / 2)

    arguments = arguments or {}

    local modal = ISModalDialog:new(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, playerIndex, arguments[1], arguments[2]);

    modal:setWidth(widthModal)
    modal:setHeight(heightModal)
    modal:setX(xModal)
    modal:setY(yModal)

    modal.yCenter = modal.height / 2

    modal.ui = source;
    modal.destinationYes = destinationYes;
    modal.destinationNo = destinationNo;
    modal.moveWithMouse = true;
    modal.backgroundColor = WGS.wookieeBackgroundColor

    -- modal.onLoseJoypadFocus = function(self, joypadData)
    --     self.onclick = nil
    --     self:onJoypadDown(Joypad.BButton, joypadData)
    --     ISModalDialog.onLoseJoypadFocus(self, joypadData)
    -- end

    modal.prerender = function(self)
        if not getSpecificPlayer((self.player or 0)):isAlive() then return end
        self:drawRect(0, 0, self.width, self.height, self.backgroundColor.a, self.backgroundColor.r, self.backgroundColor.g, self.backgroundColor.b);
        self:drawRectBorder(0, 0, self.width, self.height, self.borderColor.a, self.borderColor.r, self.borderColor.g, self.borderColor.b);
        self:drawTextCentre(self.text, self:getWidth() / 2, self.yCenter - WGS.fontHeightSmall - 10, 1, 1, 1, 1, UIFont.Small);
    end

    modal.onJoypadDown = function(self, button, joypadData)

        local playerIndex = self.player or 0

        if button == Joypad.AButton then

            local destination = self.destinationYes
            
            if self.yesno then
                self.yes.player = playerIndex;
                self.yes.onclick(self.yes.target, self.yes);
            else
                self.ok.onclick(self.ok.target, self.ok);
            end

            self:destroy();
            
            if WGS.getJoypadData(playerIndex) then
                setJoypadFocus(playerIndex, destination)
            end
        end

        if button == Joypad.BButton then

            local destination = self.destinationNo

            if self.yesno then
                self.no.player = playerIndex;
                self.no.onclick(self.no.target, self.no);
            else
                self.ok.onclick(self.ok.target, self.ok);
            end
            
            self:destroy();
            
            if WGS.getJoypadData(playerIndex) then
                setJoypadFocus(playerIndex, destination)
            end
        end
        
    end

    modal:initialise()

    if modalYesNoMode then
        modal.yes:setY(modal.yCenter + 10)
        modal.no:setY(modal.yCenter + 10)
    else
        modal.ok:setY(modal.yCenter + 10)
    end

    modal:addToUIManager()

    playerIndex = playerIndex or 0

    if (source and source.playerIndex and WGS.getJoypadData(source.playerIndex)) then
        setJoypadFocus(source.playerIndex, modal)
    elseif WGS.getJoypadData(playerIndex) then
        setJoypadFocus(playerIndex, modal)
    end

    WGS.magicalWookieeModal = modal

    return modal

end
#

You'll need to remove the WGS stuff from this @flat cipher

#

It depends on my mod

#

You'll need your own getJoypadData function

thick karma
#

But basically this is a one-function-call modal that can send you to whatever focus destination you prefer when it's finished.

sour island
#

A soft warning API would be nice for the community patch

thick karma
#

I use it like this in my rewrite of Safehouse UI:

        WGS.createCenteredModal(self.x, self.y, self.width, self.height, getText("IGUI_SafehouseUI_ReleaseConfirm", self.selectedPlayer), true, self, ISSafehouseUI.onReleaseSafehouse, self, nil, self)
sour island
#

I've seen people make the player say() warnings onPlayerUpdate lol

dull moss
thick karma
#

It's available through WGS, the singular global I add (sorry Browser)

#

@flat cipher

flat cipher
#

Thanks I’ll check it out and push an update

thick karma
#

for sure, good luck!

#

(I should really rewrite this function to make it easier to share with people without a dependency.)

ancient grail
#

@sour island i sent u a reply

thick karma
#

@flat cipher
Single-function call, gamepad supported modal dialogue that can be used in yesno or ok mode.

local FONT_HEIGHT_SMALL = getTextManager():getFontHeight(UIFont.Small)

local getJoypadData = function(playerIndex)
    playerIndex = playerIndex or 0
    return JoypadState.players[playerIndex + 1]
end

local createCenteredModal = function(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, source, destinationYes, destinationNo, playerIndex, arguments)

    widthModalIncoming = widthModal
    widthModal = math.max(widthModalIncoming, getTextManager():MeasureStringX(UIFont.Small, message) + 10)
    xModal = xModal - (math.max(0, getTextManager():MeasureStringX(UIFont.Small, message) + 10 - widthModalIncoming) / 2)

    arguments = arguments or {}

    local modal = ISModalDialog:new(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, playerIndex, arguments[1], arguments[2]);

    modal:setWidth(widthModal)
    modal:setHeight(heightModal)
    modal:setX(xModal)
    modal:setY(yModal)

    modal.yCenter = modal.height / 2

    modal.ui = source;
    modal.destinationYes = destinationYes;
    modal.destinationNo = destinationNo;
    modal.moveWithMouse = true;

    modal.prerender = function(self)
        if not getSpecificPlayer((self.player or 0)):isAlive() then return end
        self:drawRect(0, 0, self.width, self.height, self.backgroundColor.a, self.backgroundColor.r, self.backgroundColor.g, self.backgroundColor.b);
        self:drawRectBorder(0, 0, self.width, self.height, self.borderColor.a, self.borderColor.r, self.borderColor.g, self.borderColor.b);
        self:drawTextCentre(self.text, self:getWidth() / 2, self.yCenter - FONT_HEIGHT_SMALL - 10, 1, 1, 1, 1, UIFont.Small);
    end

    modal.onJoypadDown = function(self, button, joypadData)
        local playerIndex = self.player or 0

        if button == Joypad.AButton then
            local destination = self.destinationYes
            
            if self.yesno then
                self.yes.player = playerIndex;
                self.yes.onclick(self.yes.target, self.yes);
            else
                self.ok.onclick(self.ok.target, self.ok);
            end

            self:destroy();
            
            if getJoypadData(playerIndex) then
                setJoypadFocus(playerIndex, destination)
            end
        end

        if button == Joypad.BButton then
            local destination = self.destinationNo

            if self.yesno then
                self.no.player = playerIndex;
                self.no.onclick(self.no.target, self.no);
            else
                self.ok.onclick(self.ok.target, self.ok);
            end
            
            self:destroy();
            
            if getJoypadData(playerIndex) then
                setJoypadFocus(playerIndex, destination)
            end
        end        
    end

    modal:initialise()

    if modalYesNoMode then
        modal.yes:setY(modal.yCenter + 10)
        modal.no:setY(modal.yCenter + 10)
    else
        modal.ok:setY(modal.yCenter + 10)
    end

    modal:addToUIManager()

    playerIndex = playerIndex or 0

    if (source and source.playerIndex and getJoypadData(source.playerIndex)) then
        setJoypadFocus(source.playerIndex, modal)
    elseif getJoypadData(playerIndex) then
        setJoypadFocus(playerIndex, modal)
    end

    -- latestModalInstance = modal, if you need a global reference.
    return modal
end

Only tested in lua/client.

#

I haven't tested, but I am pretty sure it'll work without my mod as a dependency

#

Removed my mod's variables / functions from the solution

chrome egret
#

My solution:

function PZISObjectUtils:getContainerName(container)
    return self:getContainerNameByType(container:getType());
end

function PZISObjectUtils:getContainerNameByType(containerType)
    return string.lower(getTextOrNull("IGUI_ContainerTitle_" .. containerType) or "");
end
thick karma
#

Oh wow, good find @chrome egret, what a headache that was

#

I took a look earlier and saw no functions

#

I wonder if that's truly the easiest way

chrome egret
#

Yeah, I really wish for an instance method on the container that would provide this info

thick karma
#

@flat cipher If you haven't yet solved normalization, I might have something useful for you.

#

About to test it real quick but I think it should work.

wheat kraken
#

hey, im trying to custom color, sprites

it works with setcustomcolor
transmitcustom color

but base color have too much influence

any hints to personalize colors and change color?

for reference im changing color from overlays bloods

--
im only be able to get shades of red, from original, dark red to black

digital moon
#

Is there any way to create a two tile wide container that doesn't register as two halves when clicked on? (Like one half is a container and the other half is a container in game)

#

So that it counts as one large container

split basin
#

Hey guys, is there a way to see what the values for the different stats like stress, pain, fatigue are. I mean like the max and min values

chrome egret
thick karma
#

@flat cipher Okay this one is fixed:

-- Expects a simple indexed list of data, e.g. {10, 25, 50, 25}
local normalize = function(arguments)
    local normalizedArguments = {}
    
    local total = 0

    for index, value in ipairs(arguments) do

        total = total + value

    end
    
    -- If user sets all weights to 0, they can cause a divide-by-0 error; this prevents that.)
    if total == 0 then 
        local weightRemaining = 100

        for index, value in ipairs(arguments) do
            -- Double friendly.
            normalizedArguments[index] = math.min(math.floor(arguments[index]), weightRemaining)
            weightRemaining = math.max(weightRemaining - math.floor(arguments[index]), 0)

            if weightRemaining > 0 and index == #arguments then
                normalizedArguments[index] = normalizedArguments[index] + weightRemaining
            end
        end
    end

    local multiplier = 100 / total
    local weightRemaining = 100

    for index, value in ipairs(arguments) do
        -- Double friendly.
        local normalizedArgument = arguments[index] * multiplier
        normalizedArguments[index] = math.min(math.floor(normalizedArgument), weightRemaining)
        weightRemaining = math.max(weightRemaining - math.floor(normalizedArgument), 0)

        if weightRemaining > 0 and index == #arguments then
            normalizedArguments[index] = normalizedArguments[index] + weightRemaining
        end
    end

    return unpack(normalizedArguments)
end

-- Examples:

-- Command:  a, b, c, d = normalize({1, 1, 1, 1})
-- Result:   a = 25, b = 25, c = 25, and d = 25.

-- Command:  a, b, c, d = normalize({11, 1141, 122, 143})
-- Result:   a = 0, b = 80, c = 8, and d = 12.
#

Can give it any number of args... will work for both of these conditions:

chrome egret
#

Looks like a will effectively be turned off in that last case, is that the desire?

thick karma
#

Yes, because the weight of A is insanely small

#

That would be a consequence of terrible user decision making

#

But it would not crash

#

11 / (11 + 1141 + 122 + 143) is too close to 0 for the randomizer to tell it's not 0

#

The randomizer takes integer weights afaik

chrome egret
#

Ahh

#

So you're limited on precision

thick karma
#

Correct.

#

Hence the flooring

#

And the leftover clean-up

#

(If I'm wrong about that, surely belette can remove those parts.)

chrome egret
#

I getcha

split basin
chrome egret
chrome egret
split basin
frank lintel
#

when should one init a keybind/press trigger event? found an odd bug/quirk/error but the code comment explains more.


    if(getSpecificPlayer(0)) then
    
        --print("keyNum: " .. tostring(keyNum))
        --57 = space
        --23 = "i"
        
        -- Some nonsense going on here needs to be worked can spit error(s) after player load. Need to check for nil on
        -- myQuestInfoWindow and myDialogueWindow as these can be called before pressing 'click to start'
        -- Possible QuestManager starting before client is actually ready to do anything UI related?
        -- And why even all the hardcoding of keyNum if there a setting to open the quest window
        -- Like what is going on here and why...?
        -- Sycholic

        if( keyNum == getCore():getKey("Open Quest Info Window")) then -- i key
            myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible())
        elseif( keyNum == 57) then -- space key
                
            if(SSQM and SSQM.BannerMSG) then
            SSQM.BannerMSG:removeFromUIManager()
            SSQM.BannerMSG = nil
            SSQM.ShownBannerMSGCount = 0
            end
            
            myDialogueWindow:skip()
        
        elseif( keyNum == 199) then -- home key
        
            myQuestInfoWindow:setVisible(true)
            getSpecificPlayer(0):Say(tostring(getSpecificPlayer(0):getX()) .. "," .. tostring(getSpecificPlayer(0):getY()))
            
        elseif( keyNum == 200) then -- up key
        
        
        elseif( keyNum == 208) then -- down key
        --[[
        local player = getSpecificPlayer(0)
        player:Say("teli")
        player:setX(10816)
        player:setY(10060)
        player:setZ(0)
        player:setLx(10816)
        player:setLy(10060)
        player:setLz(0)
        ]]
        end
        
    end

end ```
Any ideas let alone why all the hard coded binds?
#

stares at the non collapsed code block.

#

I know how to fix the error triggering just by adding a Nil check but before I do anything just wanted some feedback as to the hardcoded and seemingly mostly do actually nothing... or just print a coordinate (if you dont happen to bind the variable to the same key)

chrome egret
#

To what event do you add this handler?

frank lintel
#

believe its this? Events.OnCreatePlayer.Add(QuestManagerInit)

#

prob just easier if I drop the Git page

#

but yeah if I hit space or home or open quest window before 'click to start' pops errors.

thick karma
#

@flat cipher Just in case your code would find it easier to work with a table of returned values, here are two versions of the function I offered earlier.

thick karma
frank lintel
#

yeah I dunno but its ugly atm and Im trying to correct that

thick karma
#

Yeah I do agree lol

#

I would not do it that way

#

I respect rebinds

#

If people rebind their keys, I assume they know what they rebound them to

#

And can handle that.

#

I would also reference Keyboard class though I expect neither the Keyboard class nor the numbers used for its keys are likely to change.

frank lintel
#

I'd hope so since its just in the settings menu.

thick karma
#

e.g. Keyboard.KEY_HOME

frank lintel
#

lemme look might already be up higher

thick karma
#

But that's just me, I'm a constants guy

frank lintel
#

oh for that yeah

thick karma
#

I like named things.

#

If I want to add a 2 pixel padding, I will write + padding instead of + 2 and make a variable, extra characters be damned.

spring zephyr
#

is any way to get "what day is it today in game"??
i mean in perspective of code. not watching your digital clock..
like in excel = today() something like this

frank lintel
#

you dont see any issues I totally yank that up/down stuff I'll fix space and home plus add the nil checks

thick karma
#

that might protect you.

#

i assume quest stuff exists by the time player is alive.

#

Maybe not, though, I don't know that mod.

#

Also at the very least it'll save you from having to write getSpecificPlayer(0) 5 times lol

frank lintel
#

me either, but if I hit one of those hotkeys before click to start the quest window def not ready to open

thick karma
#

Got it.

frank lintel
#

but thanks another option.

thick karma
#

Right on!

#

Good luck

#

I usually just check whether my player is alive for my keyboard shortcuts

#

(when necessary)

frank lintel
#

well this is during loading and right as soon as one is ready to click start and jump IG is where this odd one was happening.

thick karma
#

I don't think you are alive at that point but I could be wrong

#

I think you're alive after game start.

frank lintel
#

dunno I can find out quick thats not a big change

thick karma
#

lmk! I will relay it to the people

frank lintel
#

lmk? sorry Im old :P

#

and since it seems the GH for this mod is not even remotely kept up to date likely just gonna fork it

thick karma
#

Oops let me know

frank lintel
#

@thick karma so replace if(getSpecificPlayer(0)) then ?

thick karma
#

if you declare player at the top, if player then

#

Oh yeah

#

I see

#

You got it

frank lintel
#

?

thick karma
#

Let me show to be clear

frank lintel
#

thanks sorry still waking up work day.

thick karma
#
function QuestManagerKeyDownHandle(keyNum)

    local player = getPlayer()

    if not (player and player:isAlive()) then return end

    --print("keyNum: " .. tostring(keyNum))
    --57 = space
    --23 = "i"
    
    -- Some nonsense going on here needs to be worked can spit error(s) after player load. Need to check for nil on
    -- myQuestInfoWindow and myDialogueWindow as these can be called before pressing 'click to start'
    -- Possible QuestManager starting before client is actually ready to do anything UI related?
    -- And why even all the hardcoding of keyNum if there a setting to open the quest window
    -- Like what is going on here and why...?
    -- Sycholic

    if( keyNum == getCore():getKey("Open Quest Info Window")) then -- i key
        myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible())
    elseif( keyNum == 57) then -- space key
            
        if(SSQM and SSQM.BannerMSG) then
        SSQM.BannerMSG:removeFromUIManager()
        SSQM.BannerMSG = nil
        SSQM.ShownBannerMSGCount = 0
        end
        
        myDialogueWindow:skip()
    
    elseif( keyNum == 199) then -- home key
    
        myQuestInfoWindow:setVisible(true)
        player:Say(tostring(player:getX()) .. "," .. tostring(player:getY()))
        
    elseif( keyNum == 200) then -- up key
    
    
    elseif( keyNum == 208) then -- down key
    --[[
    local player = player
    player:Say("teli")
    player:setX(10816)
    player:setY(10060)
    player:setZ(0)
    player:setLx(10816)
    player:setLy(10060)
    player:setLz(0)
    ]]
    end

end 
#

Notice the nesting is reduced

#

You just break out of the function if the player is not alive.

#

then return end

#

breaks the function

#

harmlessly breaks

#

Not like, throws an error

#

Just ends it

frank lintel
#

yeah just jumps out does nothing

thick karma
#

Yeah sorry wasn't sure if I was clear

#

Value returned in Lua will be nil

#

(Irrelevant here.)

frank lintel
#

no it was clear I just wasnt sure if that was on top of or replacing

thick karma
#

Cool

#

lol just noticed this:
if( keyNum == getCore():getKey("Open Quest Info Window")) then -- i key
What are they even on? i is inventory...

frank lintel
#

exactly!

thick karma
#

(Unless you use dhert's SpiffUI or change it yourself.)

#

Yeah Idkwtf they're talking about there lol

frank lintel
#

the keybind has options to change it in the mod so why all the hardcode...

#

let alone the empty ones doing nothing... like wth

thick karma
#

Wait is the quest window built into vanilla somehow?

#

Or you mean

#

OH

#

Wait

#

The MOD actually added keybind options?

#

But doesn't use its own options?

#

But... why

frank lintel
#

yes there a complete settings that you can set your hotkeys for. why Im lost as to this nonsense

#

which clearly needs work also in its own right...

split basin
#

Hey, i want to add a custom stat to players, in this case a duration for a buff. Could anyone lead me in the right direction, maybe someone has a guide or mod who does that?

thick karma
#

Gooooot it.

#

Wow how did they mess that group up so much lmao @frank lintel

#

lol jfc

#

Some people barely try istg

frank lintel
#

shrugs.. and no you called it

thick karma
frank lintel
#

why Im trying to work on this mod cuz I think it has potential Im even thinking MP stuff for it already

thick karma
#

player = getPlayer(), or perhaps self.player or self.character, or perhaps playerObj, or perhaps getSpecificPlayer(index)

#

@split basin

thick karma
#

Clean that up and let me know when you rerelease it!

wheat kraken
#

what trail looks better A or B?

split basin
thick karma
#

Both.

split basin
#

Ah

thick karma
#

player:getModData().buffDuration is what they call syntactic sugar (prettier formatting) for player:getModData()["buffDuration"]

#

It does the exact same thing in the end. @split basin

split basin
#

Sugar sounds good, going with that one

thick karma
#

getModData() returns a Lua table of the form { key = value, key2 = value2 . . . }

#

You can access such a table in multiple valid ways

frank lintel
#

there a lua thing for a comment block? instead of having to put -- on every line like /* */

thick karma
#

You could even add indexes and loop in the ipairs of the table.

#
--]]```
#

iirc

frank lintel
#

ty

wheat kraken
#

i think i found an optimal result, the A was value 5, and this one G have a range between 3 to 5

#

do you agree?

frank lintel
#

Im gonna leave the original stuff just comment out it. G looks best of all so far

#

it doesnt look square...

thick karma
split basin
#

blood?

thick karma
#

Oh blood?

wheat kraken
#

xDD i was trying to achieve liquid

#

but i can work only with red, dark red, brown and black

thick karma
#

Ohhhh sorry I saw the gas can as a watering can

#

Thought maybe you were farming

#

That was my bad

split basin
#

i thought you dragged a dead body there

wheat kraken
#

xDDD

thick karma
wheat kraken
#

gasoline, fuel

thick karma
#

Ahhhh

#

Gas is pretty clear where I live.

wheat kraken
#

yeah, here too, but i cant manage to make it clear in zomboid

#

im using tile sprite overlay_blood

thick karma
#

Mmmm... I see. What if you just made the ground wet?

#

Let it look like water?

wheat kraken
#

maybe with custom tile sprite i can achive

#

but im not an artist

#

overlay_blood_floor_01_

#

im working with this tileset

#

i have this one too, i will try it

#

its water

#

but only one tile :(

thick karma
#

Mapping works in tiles a lot afaik

#

I still don't know which tiles I need to tap into to add Ladder support 😭

split basin
#

What would be the best way to reduce the timer? Just reduce it by one in the EveryOneMinute lua event?

thick karma
#

If you want the rate of losing the ability to be proportional to the user's game speed, that seems like a good way to do it.

#

Or faster or slower depending on how long you want it to last.

wheat kraken
#

i post a video on #mapping without visuals, with the mechanic of pour gasoline on ground and set it on fire, with chain reaction when intersects

thick karma
#

/ minutes

split basin
#

Thats what i'm thinking about at the moment, its a Stimulant for Carryweight

thick karma
#

2 hours seems fair enough but that'll go subjectively REAL fast if their game speed it high

#

You might want to adjust it based on game speed, but of course that is up to you.

split basin
#

I think i have to play with it a bit, to see whats good

thick karma
#

Reasonable

split basin
#

The problem is, i only have 12h in Zomboid lol

#

i think i modded more than played the game

frank lintel
#

No luck @thick karma still pops...

#

so apparently that logic block still fires before clicking to start also... hmm

#

was gonna say might get quicker answer in modeling since thats related to explain how to copy/edit vanilla titlesets

thick karma
#

Can you post that file @frank lintel

#

I might be able to figure it out but I'm on Fort lol so not trying to go sub

thick karma
frank lintel
#

I'll be the same way Im gonna try just doing the nil checks like I was thinking put it back to original but lemme get the original version (I basically made a copy of the mod and just added the game version # on the end to make the mods unique and I keep my original untouched)

#

ah thats how get get a collapsed codeblock...

#

here is what I decided to try since the player logic block still allowed it so trying this but Im out of time gotta get ready for work.

            if(myQuestInfoWindow) then
                myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible())
            end
        elseif( keyNum == 57) then -- space key

            if(SSQM and SSQM.BannerMSG) then
            SSQM.BannerMSG:removeFromUIManager()
            SSQM.BannerMSG = nil
            SSQM.ShownBannerMSGCount = 0
            end
            if (myDialogueWindow) then
                myDialogueWindow:skip()
            end```
rustic garnet
#

Any tips or guide for naming and other things to make a mod more compatible?

split basin
#

Is Events.EveryTenMinutes.Add(functionName) a server event?

#
local function reduceDurations()

    local player = getPlayer()
    player:getModData().durationMule = player:getModData().durationMule - 1;
    print(player:getModData().durationMule)

end

Events.EveryTenMinutes.Add(reduceDurations)```

Am i missing smth?
wheat kraken
#

this prevent function names conflicts

faint jewel
frank lintel
#

gas honestly just looks like a pool of water on the ground basically wet.

#

maybe put an effect on it that can look like vapor?

rustic garnet
#

Also, to test my mod in multiplayer I need to host a server?

frank lintel
#

would be suggested you running it in MP, yes to test that game mode.

#

and yay got spacebar to stop triggering an error, but questwindow hotkey still does and actually some more indepth errors. but thats okay its progress. BBL

wheat kraken
#

im using this
self.color = ColorInfo.new( 0.5, 0.0, 0.0, 1.0);
spriteObj:setCustomColor(self.color)
spriteObj:transmitCustomColor()

#

im missing something to work properly? @faint jewel

faint jewel
#

that 1.0 is your alpha

#

it's better to edit it in the texture

wheat kraken
#

i change 1.0 to 0.7, and 0.4

wheat kraken
faint jewel
#

external program.

#

mtgiri made you an edit

thick karma
#

@frank lintel

#

He DOES in fact create that missing dialogue OnGameStart:

function DialogueWindowCreate()
    local FONT_HGT_SMALL = getTextManager():getFontHeight(UIFont.Small)
    myDialogueWindow = DialogueWindow:new(400, 270, FONT_HGT_SMALL * 6 + 290, FONT_HGT_SMALL * 10 + 150)
    myDialogueWindow:addToUIManager();
    myDialogueWindow:setVisible(false);
    myDialogueWindow.pin = true;
    myDialogueWindow.resizable = true
    
    
    
end

Events.OnGameStart.Add(DialogueWindowCreate);```
#

Why it doesn't exist after the game has started, I cannot say

#

But you could do if not (player and player:isAlive() and myDialogueWindow) then return end

frank lintel
#

K at work now play with it later

thick karma
#

If you use debug console to check whether myDialogueWindow exists after game start and it does NOT, then most likely that file is not being loaded for whatever reason.

#

Maybe someone overloaded it by making another file with the same name that loads later.

#

And theirs doesn't include the creation of the dialogue on the event

frank lintel
#

No clue find out later

upbeat spindle
#

Asking again for it still is a mystery to me:

Where can one find code related to heating elements (stoves, campfires, fireplaces) ? Pondering whether I could make a custom sprite with heating functionality, wood or electric.

#

And another question:

Where can one find and edit the functionality of the siren and emergency lights used in for example police cars? Wondering whether I could make additional light textures into a car in addition to the usual head- and taillights.

drifting ore
#

#mapping contains most of the tools (in pins) and people who can help accomplish this. here is fine but they use the software more so you may have more luck

faint jewel
red tiger
#

=/

faint jewel
#

thos e are vanilla sir

red tiger
#

Probably placed way before vehicles were a thought.

#

Probably should update mailboxes to reflect the current era of PZ.

#

The mod is awesome. I'd be a little frustrated having to go into each driveway as a mailman to give mail to players.

#

=/

faint jewel
#

oh trust me. i am. you'll see me hit a hydrant.

#

XD

red tiger
#

It looks like the vehicle black-holed the hydrant. lol

faint jewel
#

lol

cunning canyon
#

If I wanted to add mod data to items as they are added to the world, weather as lootables or spawned in a players inventory, is there a sensible hook to intercept that?

#

(server side)

bronze yoke
#

could you be more specific about what you're trying to do? there's easier and harder ways depending on what you're doing

cunning canyon
#

I want to make certain items get consumed after some time by wearing them, and my first approach was to add a "durationRemaining" float to each items modData entry

#

If items have unique ids per instance, then i can track these values in a seperate table, I don't have a huge preference

bronze yoke
#

if it's specific items, any unknown parameter in the item script will be added as moddata to that item when you create it - but i think what you're trying to do can be done with drainables anyway?

red tiger
cunning canyon
bronze yoke
#

you can do this with DoParam

#
local item = ScriptManager.instance:getItem("Base.Apple")
if item then
    item:DoParam("Parameter = Value")
end
cunning canyon
#

interesting

#

if the param doesn't exist already what happens if I trie to get it?

#

or is this run on initialization, and all objects will then have it

bronze yoke
#

all new items will have the moddata, i don't know what will happen if an item was created before the mod was added

cunning canyon
#

that's ok, i don't need backwards compatibility

#

ok so doing this in Events.OnGameBoot then makes sense?

#

thank you so much, this is so much less hacky than what i was thinking

sand dragon
#

was just coming to post the code i was working with and see if anyone knows if its right or what i need put for the item to spawn.

table.insert(ProceduralDistributions.list["SchoolLockers"].items, 5);```
bronze yoke
#

you don't need to do it in an event at all

#

it's not really a big deal since it's not runtime but there is a bit of a performance cost with events, so when it's unneeded it's best not to

cunning canyon
#

so item scripts are loaded before lua then?

#

ok cool

sand dragon
bronze yoke
#

that looks right to me

sand dragon
#

oh yea just came to say nvm xD i wasnt finding the cards before but its working now

#

capital letters matter in code yea?

bronze yoke
#

usually!

sand dragon
#

okay thats what i was thinking

thick karma
#

Glad you got it solved

sand dragon
#

anyone know where i can find all the option for procedural distribution?

thick karma
#

Sorry, I was tied up.

#

I got you

#

@sand dragon

#

Good luck!

sand dragon
#

yaaay sweet, thank you!

thick karma
#

That is the list you're adding to

#

It's a global

#

It is structured exactly like that

#

As you can see, item is a 1-dimensional array where every even element is a number.

sand dragon
#

sweet! exactly what i needed. Im going make the Spiffo Card Packs spawn in the Spiffo's restaurants as like toys for kid meals and also in the Spiffo HQ they will spawn the most.

wheat kraken
sand dragon
#

hmmm trying find stuff, found how make them spawn in the Spiffo's restaurants but anyone know if the Spiffo HQ has anything specials to the location i can have them spawn in?

#

like the spiffo kitchen or dinning counters

bronze yoke
#

if you enable LootZed you can see what type a container is, as well as the chances of items spawning in them

sand dragon
#

okay sweet, ill prob look into that. also for my code when setting up spawning are the values 0-100? or like what is the max?

thick karma
sand dragon
#

same honestly lol

#

seems to be working good tho, but doesnt seem the items spawn in a world if you add the mod to the already saved world. so only works with new saves

fast galleon
#

Did you find something? I'm looking for this too.

bronze yoke
#

well if the area has already been explored the loot is already generated and it's too late

#

but if players haven't been there before it should work even if it's an old save

fast galleon
wheat kraken
#

did you know how to get the square behind player, using getCurrentSquare?

solved: getLastSquare

sand dragon
cunning canyon
#

If I wanted to add an additional status bar to this tooltip, which function am I overriding?

#

or is there parameter magic to make it show it

fast galleon
red tiger
#

Good afternoon.

pulsar heath
red tiger
pulsar heath
#

still having issues with the vehicles?

red tiger
#

I plan on fixing it this week

pulsar heath
#

nice, im thinking about making a gui for your parser as an addon for my app

#

thinking about a mod maker app for newbies

red tiger
#

I'm doing the same thing

#

The parser is a library so you can do it too.

pulsar heath
#

i only want to add basic stuff on the app, but if you have a parser done i only need to make the gui inside the app

#

can you give me the link again?

red tiger
#

Look up ZedScriptParser in my chat history. You'll get the repo link

pulsar heath
#

i need to relax... so ill mess around with it a bit

#

kk

red tiger
#

I'm the UI guy

#

I have no CLI as of right now.

pulsar heath
#

im gonna make a dll extension out of your parser for use in vstudio

#

i think that will be a fun way to relax and forget about sql...

#

i think i had ts support on vstudio

#

so even better

#

direct clone from the repo... awesome

red tiger
#

I use vscode for ts

#

I'm doing the parser the hard way

frank lintel
#

ts?

pulsar heath
#

typescript

frank lintel
#

ah

#

didnt think ya meant teamspeak

red tiger
#

Manually defining each property with types and deserializing array contents..

#

Makes the API easy to read and modify

pulsar heath
#

from what im seeing... very easy to read indeed

red tiger
#

I can transcribe documentation for the properties

#

Also I'm taking liberties on changing property names to camelcase and pluralizing for array contents.

pulsar heath
#

pipewrench ui and zeparser updated yesterday... you dont sleep 😄

red tiger
#

Heh

pulsar heath
#

im so old im gonna print the zedparser project code to read while i have some tea

#

dunno why, my brain absorbs things faster if i read it from paper

#

must be an age thing 😄

red tiger
#

All I need is a box with a PC and internet and I am happy.

pulsar heath
#

i get distracted very often on a pc

#

so if i wanna read the code and start working on using it to make a dll lib

#

it has to be on paper or ill get distracted after a few lines

#

but yeah this is a good thing to add to my future "general" use app for pz

frank lintel
#

thats what hardcore or jumpup tunez are for

red tiger
#

I knew a few coders like that.

pulsar heath
#

@frank lintel i dont hear music while coding... it annoys me 😛

#

it reminds me of work

red tiger
#

I wish I could have more time

frank lintel
#

why I use hardcore or jumpup or trance ie. repeatative lyricsless for the most part

#

plus gets my half century old arse moving.

pulsar heath
#

doesnt work with me, im a dj... so outside work i rarely listen to music

frank lintel
#

same

pulsar heath
#

only when i have to add music to my library

frank lintel
#

well was havent done dj'n in like 5 years. heh Im at almost 2k in songs on my rig

pulsar heath
#

and until the 15th i dont need to do that so ill just leave it be till the last minute 😄

red tiger
#

I worked on a parser because it was a higher priority for the modding community

frank lintel
#

I do need to break out my traktor out havent used it in awhile

pulsar heath
#

dont use traktor for ages... rekordbox ftw

red tiger
#

PZ needs a program for script management

pulsar heath
#

script management? how so?

frank lintel
#

no it be pioneer they were too much, also anyone with UI experience scroll up 8 hrs ago and give any feedback on what Im doing be much appreciated

pulsar heath
#

need to change the toner... damn it

red tiger
#

If you watch this chat you'll see that most of the questions are about caveats in ZedScript.

pulsar heath
#

i havent dealt much with script on pz

red tiger
#

I don't script at all.

frank lintel
#

if it was java I could help out...

pulsar heath
#

so im not aware of the problems when scripting

frank lintel
#

or regex (ducks the incoming slaps)

red tiger
#

I work on what people are of need for modding.

frank lintel
#

why Im working on this mod cuz its buggy but its well liked

pulsar heath
#

im not that good of a guy... i work on the things i need... and if it might be helpful for anyone else i just make it avaliable and easier to use if possible

barren junco
#

you dont even need an specific reason to mod

pulsar heath
#

to mod? yes to code nop

barren junco
#

well coding is to resolve a problem

#

i believe modding can be anything you want, as long as you like it

#

i personally mod for the community and to learn new concepts

#

and languages ofc

pulsar heath
#

moding a game doesnt mean coding... it depends on the mod support of the game

barren junco
#

you got a point

pulsar heath
#

coding for me is something i do to relax, and to make some extra money

barren junco
#

it generally involves coding

red tiger
#

Time to play some pool.

barren junco
#

noice

frank lintel
#

depends what

frank lintel
#

talking snooker? 8 ball 9 ball?

red tiger
#

You guys are my players basically haha

barren junco
#

wdym

#

am i a ball

red tiger
#
  1. I rapidly shoot pool with both hands
pulsar heath
#

i have my old man paper printed with jabs zedparser, time to have a cup of tea

#

bbl

frank lintel
#

I tend to only play 8 on bar tables if its full sized I prefer 9, and the very rarity of finding a snooker table if someone has one

#

sorry not trying to be offtopic trying to avoid staring at code atm ^_^

#

wish I could talk to whomever coded this so I could ask wtf is going on... lol

red tiger
#

Cool to see someone read my code on paper again

frank lintel
#

why I really miss my 2nd monitor which I would have vertical so 9:16 nice full page viewing of code

drifting ore
#

i'm ready to ditch all monitors and give the neo a try

frank lintel
#

neo-geo?

drifting ore
#

i couldnt even imagine using a second with 55 inches

frank lintel
#

my main is ultrawide

drifting ore
#

workflowriffic

#

yea i think ultrawides are great for improving workflow in general but i didnt prefer it for gaming

frank lintel
#

oh if ya into FPS that or doublewide are a must...

#

plus with VR tracking works awesome with it also

drifting ore
#

haha hell yea

worldly olive
#

Hello! some days ago I asked if somebody knew where the code for annotated maps were and I was looking into some of the suggestions but there's one thing I can't find. Does somebody knows if annotated maps stops spawning after X amount of time in the game? can't find something related to that but happens to me everytime

fast galleon
#

I can see this stashMap.daysToSpawn = "0-30"; but it's not used often. Out of curiosity, how many kills did you get without any annotated map spawns?

frank lintel
#

I almost never find them on a Z but more like just random loot laying around

fast galleon
#

Annotated maps, generally need double random success. One to get the map item and another to make the map annotated.

worldly olive
#

So when I have noticed this is in game with 6+ months survived

#

On early game they always spawn

#

Also, there's somebody doing streams in the spanish community that currently has 1 year and 6 months alive and haven't found any annotated map for months and months now

sand dragon
#

does anyone know how to change or add items to spawn inside of paper bags, like the spiffo paper bags specifically

worldly olive
#

So what I assume but can't prove because I can't find the code is that the longer the game, the less they spawn to simulate there are less survivors?

willow estuary
#

I would assume, without investigating, that there is some check to prevent more than one copy of each map spawning, because otherwise things would get pretty weird.

frank lintel
#

search the src for any refs to annotated map object name (which I dont have a clue) find out anywhere its called upon?

worldly olive
worldly olive
frank lintel
#

you lose the map you SOL regardless its not like it marks your character map

#

you got the object name they use for it?

fast galleon
willow estuary
#

Also there's a check to prevent them spawning when the building has been visited by a player.

#

Visit all the buildings, no maps spawn.

worldly olive
#

Oh, that's an interesting data 🤔

#

A really interesting data actually

frank lintel
#

well nothing should unless you have 'loot respawn' on.

willow estuary
#

Well, people would be pretty mad if their bases were ovewritten with stash map stuff.

fast galleon
willow estuary
#

I'm not going to look up any of this (because I already work full time, boundaries, etc) or prove any of this in internet court, but I can think of all sorts of reasonable reasons, to prevent players from being upset or undesired weird results, why they don't spawn forever?

#

Just make a million of stash maps and have them spawn stuff in areas of the map where players never go if you need a server to spawn them forever I guess?

fast galleon
#

well you explained pretty well without looking it up anyway 🙂

frank lintel
#

oh Blair quick ? how do you know a player is actually in world and loaded up. ie. after clicking 'click to start'

willow estuary
#

I'm an idiot and it's champagne time.
This was just easy to answer.

#

But I assume that if getPlayer() works then there's a player.

frank lintel
#

oh that very well can be true before clicking

#

why I asked.

worldly olive
#

No no it makes entirely sense actually. I'm pretty sure that I have obtained maps from locations I already visited but no loot at all on them. But it makes totally sense what you said about their spawn to be unique and that they should not affect an undesirable place (like a player base)

willow estuary
#

Obviously they're finite and can't generate forever anyways, since they're from a limited pool.

#

Or shouldn't anyways, ideally.

frank lintel
#

yeah they should just be unique items

worldly olive
#

I was thinking that unless you open them, thay can keep spawning but wouldn't make much sense because you could end up having duplicated ones that were not open

willow estuary
#

Since players are gonna loot goblin any server in negative five seconds flat I'm surprised any spawn.

frank lintel
#

its a hand drawn comment on a map wouldnt make sense there more then a single copy really.

sand dragon
worldly olive
#

Well, this explains a lot of things

willow estuary
#

Loot can spawn that players never find as well.

#

"containers spawn loot in a ~150 tile radius around the player and not when containers are looked at, for the 98374382900347th time"

wheat kraken
#

the mod Fire a trail of fuel got released today, please let me know performances issues, on stress test, maybe i will put an option to disable a costly block of code on it, but overall, with your own trail is pretty optimized

with this mod you can pour gas on ground while walking, make as many trail you want, intersect then, and light it with chain reaction
it adds a new dynamic to fire and gas, and is a better alternative to some Campfire materials usages (trying to make it temporary and moving it to many places to reuse it), now it get a competitive alternative to cheap ways to light a fire on ground, and it gives more realistic possibilites that players can do
https://steamcommunity.com/sharedfiles/filedetails/?id=2940908294

fast galleon
#

weird thing is, if you read a map then the building can transform in front of your eyes, but if you have visited it and are far away then it will never change

worldly olive
#

Yeah it is kinda strange how they work. But is clear the spawn now at least xD

lunar carbon
#

hi, i have question about if is possible check when a evolved recipe is cooked for crafting
i dont see anything about that a.a

willow estuary
#

I don't think anything special happens when an evolved recipe product is cooked that doesn't happen to any other food item?

#

I've been seeing people ascribe all sorts of functionality to evolved recipes that don't exist at all however lately, so maybe some weird misinformation?

cunning canyon
#

Is there a quick utility function for getting the condition/insulation/etc colors, like here:

willow estuary
#

I turned off my work computer and it's champage time 🤷

sand dragon
willow estuary
#

I think those are just based on the good/bad color presets but I don't even have the b41 code on my computer.

cunning canyon
#

yeah @fast galleon

#

just looking for something to match the vanilla colors

fast galleon
#

rgbBad.ColorInfo:interp(rgbGood.ColorInfo, item:getCondition()/100, NewColorInfo), something like this

lunar carbon
sand dragon
#

anyone know how to add items to the Paperbag_Spiffo?

willow estuary
sand dragon
#

I tried this code but didnt work

table.insert(ProceduralDistributions.list["Paperbag_Spiffos"].items, 80);```
willow estuary
#

If it's cookable, it's cookable. If it can have ingredients added when cooked, it can have ingredients added when cooked.

#

If there's no paramters in the file for what you are looking for, then it probably doesn't exist..

#

They definitely shouldn't have any functions or abilities outside what the existing vanilla evolved recipes do.

lunar carbon
#

thats my idea

#

but i think i found something

hot patrol
#

How do you make a clothing item non repairable? I am looking throught the clothing scripting and can't seem to find anything

wooden vapor
#

Quick question: anybody know where a lot of the trait textures located in the files? Trying to make a stupid texture replacement mod.

lunar carbon
sand dragon
# sand dragon nvm it didnt work lol

I cant figure it out still, if anyone knows how to make an item spawn inside of the Paperbag_Spiffos would be awesome, tried a few dif codes but they didnt work

lunar carbon
#

so the diff is fabricType if you dont put it probably its not repairable

hot patrol
red tiger
#

Forgot that I was chatting in here.

#

Was in a flow state shooting pool earlier.

frank lintel
#

you ever get a peek at that code I posted earlier today?

red tiger
frank lintel
#

UI stuff trying to figure out why able to keybind trigger errors prior to clicking the start button

#

why I was asking about if there any method to know for fact the client is in world.

red tiger
#

Oh

#

InGame() ?

frank lintel
#

hmm have to check that. yeah cuz apparently player is valid prior to clicking it (guessing soon as it shows up)

red tiger
#

I have so much to work on

#

I really think that this game needs a script editor.

frank lintel
#

yeah I got nothing but sympathy for those trying to basically translated one format to another.

red tiger
#

I have a good lexer / tokenizer too so syntax highlighting support is possible.

frank lintel
#

intellij working fine for me in that respect

#

albeit do find major diffs in .class files vs source.

red tiger
#

ZedScript is a custom format.

frank lintel
#

why I would never touch it

#

its like arma script

red tiger
#

There's no official support for ZedScript.

#

So that's what makes it worth working on. =]

frank lintel
#

well to me Lua isnt my choice either woulda just stuck with what they natively using already but meh. and only thing I found close is? isIngameState() ?

frank lintel
#

Im not by choice either ^_^ but I like this mod so Im debugging and fixing some seriously wack coding

#

ignoring the hardcoded keybinds... (which wont exist much longer) apparently you can call the quest window before clicking 'start'

red tiger
#

On mobile so I can't see code

frank lintel
#

ah np.

red tiger
#

I mod PZ using Typescript.

#

I know Lua pretty well but see it as too primitive a language to use.

frank lintel
#

oh even so if you seen it its not that complicated but clear mess.

#

okay glad Im not alone there

red tiger
#

I prefer a strongly typed environment.

frank lintel
#

heh right now I feel like when I was reverse engineering and overwriting code for MC/craftbukkit

red tiger
#

Nms modders since classic.

#

I knew and was a part of the 1st gen of modders there.

frank lintel
#

heh well personally I think I have a good spot in history on that given I made arrows able to be picked back up

red tiger
#

I made Hmod support freezing the time of the day. Also reverse engineered for research in community projects. There's also the first mod that added an additional world instead of rewriting the nether that I made that got me into closed alpha testing the aether mod project. =]

frank lintel
#

ah nice

red tiger
#

Hung out in Risugami's IRC on Esper.

frank lintel
#

I started with CB/bukkit then spigot but I just got bored of MC after so long

red tiger
#

Old times.

#

I saw PZ as an opportunity to do what people did with Minecraft. Ended up writing a bukkit for PZ.

frank lintel
#

nice

#

and dang almost been 8 years now

red tiger
#

I wrote the first versions of it 8 years ago

frank lintel
#

dies inside after just having a very bad image of a PZ in MC...

red tiger
#

It wouldn't be good for me to update it right now since the server does way less now than it used to before build 41

#

PZ is more of a p2p now

unborn linden
#

yo guys i dunno if this is the right channel to ask this but

#

correct me if im in the wrong place

#

is anyone doing something in regards to adding more semis and trailers to the game? like a mod that adds more variety?

#

i wanted to do something like that but i dunno if someone is doing it already

sand dragon
#

anyone know how to add an item to the Paperbag_Spiffos?

#

cant figure out how to make items spawn inside of them

#

tried a few dif codes but idk if needs be done in a dif file or if im using the wrong code, any help would be awesome!

faint jewel
unborn linden
#

can i ask you is it complicated to add different trailers to the game? or is it more straightfoward like cars?

faint jewel
#

exactly like cars?

#

those are all the trailers i have

sand dragon
#

those are cool

sand dragon
faint jewel
#

paperbag spiffos is what?

sand dragon
#

it an item, its the paper bags in the Spiffo Restaurants normally spawns with food in them

#

youll find them in crates and cabinets

faint jewel
#

okay... so you have to look up the distributuion list for the bag.

sand dragon
#

I found all that, one sec

sand dragon
#

    Paperbag_Spiffos = {
        rolls = 1,
        items = {
            "cardpack", 100,
        },
        junk = {
            rolls = 1,
            items = {
                
            }
        }
    },
    
    }


table.insert(Distributions, 1, distributionTable);

--for mod compat:
SuburbsDistributions = distributionTable;```
#

also tired that but didnt work either

#

that was the original code but tried put that section in its own file with the changes above but didnt work

unborn linden
unborn linden
#

is it on the workshop or is it private?

faint jewel
#

Not released yet

ancient grail
wheat kraken
drifting ore
#

i'll end up testing also but how was the performance on that? the test seemed heavy, or you play on a potato connected to a lemon?

#

one of the cooler mods i've seen in a bit btw also

wheat kraken
#

i dont have video card (anymore, sadly, miss my geforce 1050ti), im using only non-gamer notebook, when recording video its only the cpu i5 and integrated

drifting ore
#

oh damn in that case kudos lol

#

was running better than i would expect for integrated lol

ancient grail
wheat kraken
#

i will send an optimization soon, to the heavy part

#

hahaha

#

a whole 1 day and 3/4 i got insomnia while doing it

drifting ore
#

that's how you know it's a good idea

#

😄

wheat kraken
#

xD true

#

i found a bug here when i hit the molotov directly, on current version

drifting ore
#

i've spent almost a month just learning how to code and put this mod together. i've gotten broken up with, disowned by 3 family members, and lost my house

#

jk on that 😄 but spent WAY too much time lmao

wheat kraken
#

xD

#

i have more coding time than playing time in zomboid, i do modding outside steam to dont messy up my playing time

drifting ore
#

and my lady wasn't the happiest but was surprisingly cool about it haha. i'll take it!

#

i can see how man. it's addicting really

wheat kraken
#

when i go try my hardcore collection, find out that a mod bow that i was using was breaking too fast and stop to create a mod for that, the rebalance items yourself,
in another time i will go try my collection again,

and bro, i even havent an mp experience on it yet, invite me to a mp server plz, i need to have an mp enviroment to test my mods, and to see if they are compatible, or let me know it

#

i try run a mp server here once, to test mod mp compatibility, got a forever black screen program,
i think is not enough ram

#

if have an mp server out there great to test mp mods compatibility let me know

frank lintel
#

yay I actually still remember how to use git

drifting ore
frank lintel
#

now 38 years later so glad I know VI by heart.

drifting ore
#

if you use nosteam and throw the mod into the mods folder, both host and client run from same folder 😄

wheat kraken
#

my notebook have 8gb ram lmao

drifting ore
#

yikes thats def pushing it

#

well even more kudos lol

frank lintel
#

just make sure you use a static page file...

ancient grail
frank lintel
#

server wise?

wheat kraken
#

do
local statisticsData = getMPStatistics()
statisticsData.clientFPS

works?
solved: getAverageFPS()

now who ever are looking to get current fps, to do better optimizated mods can use it

#

im trying to get current fps

#

in SP

#

or both

frank lintel
#

I havent touched the dedi server only reason I ask

cunning canyon
#

Having trouble figuring out if the player has the well fed or stuffed stats...

#

seems like the hunger stat bottoms out at zero. Any ideas on where to look next?

frank lintel
#

check moodle code seen when they are shown would think its 0-100 scalar 50 being middle (no hunger)

#

prob some table somewhere that defines all that

cunning canyon
#

Oh it's in body damage not stats

#

thanks

frank lintel
#

np not sure how but glad it helped

#

if you push a mod to steam is it basically just taking a copy of the mod directly exactly as is or something I havent touched yet just wondering why this repo only has the folders from the media/lua dir.

#

ie the current mod vs the github repo look nothing alike in layout

wet sandal
#

Git doesn't let you upload empty folders, might be the reason

frank lintel
#

folder in a folder isnt empty?

#

its been awhile but I sure dont remember that ever being an issue esp dealing with MC and java.

wheat kraken
drifting ore
#

nice!

wheat kraken
#

thanks @glass basalt :))

drifting ore
#

very nice actually

wheat kraken
#

and it fix molotov bug too

glass basalt
#

You should add a function to check for bombs in the tiles that have fuel and detonate them if you light the gasoline trail

#

it'll add compatibility with any remote detonation-like mods, like maybe C4? lol

wheat kraken
#

its amazing, i like the approach that i use, to deal with heavy processing,

just queue the work, and use Events.EveryOneMinute to release it on little steps, if the game is not struggling with fps

#

xD imagine one day i implement a round-robin to prioritize the work tasks

#

in - a - mod

#

hahaha

#

(its possible by the way)

#

and it can be done on superb survivor, it is willing for that

frank lintel
#

heh guess what repo Im working on atm...

#

Superb-Survivors (main)
$ git add test
warning: in the working copy of 'test/test2/test.txt', LF will be replaced by CRLF the next time Git touches it

wheat kraken
#

the superb survivor? hydrocraft?

#

loool

#

nice!

frank lintel
#

and yes you can add empty folders

#

yeah Im working on fixing some bugs and stuff I forked it tonight and just got done uploading all the source in media/lua to the fork

wheat kraken
#

i release some addon for it, and i initially try to make some PR too

#

but to get a steam workshop release on the PR`s will take too long to happen

frank lintel
#

oh I know why Im just fixing the code and made a unofficial fork of it

wheat kraken
#

make some addons too

frank lintel
#

the original repo is way out of date

wheat kraken
#

when get somethings working

#

maybe it will be the next hydrocraft continued

frank lintel
#

its all using ryuu's name so I dont doubt its legit plus the mod even calls the wikipage on SSR

wheat kraken
#

if npc update comes too late on vanilla

#

the addon that i did, was to add a radial menu, alternative to context menu

frank lintel
#

oh Im actually eyeballing to making it maybe MP'able

wheat kraken
#

and sir the controllers users love it

#

and the other one, is a spawn limiter

#

i was using myself, and release to public as addon

frank lintel
#

for what surivors?

wheat kraken
#

you are working on what part?

frank lintel
#

right now Im on the keybind trigger insanity code that deals with the quest window

frank lintel
#

I thought they already got that in superb

wheat kraken
#

it can be optimized in many parts, in multiple parts of the code

wheat kraken
frank lintel
#

just a spawn limiter

#

I mean I havent even thought of like tweaking or stuff Im flat out tracking errors down

#

eg. hit space bar when ya sitting at your 'click to start'

wheat kraken
#

in what file? just in github?

#

i did a way to users customize it, ones prefer less, ones prefer a bit, and ones get overwelm with too many

#

you can live you and your wife only if you want to

frank lintel
#

oh in that sense got it

#

yeah right now Im just digging into QuestManager.lua and that mess

wheat kraken
#

i got interested to know what are the ceiling to alives, and the limiter

frank lintel
#

dunno there is a global for it...

wheat kraken
#

nice!

frank lintel
#

plus control of # of hostiles etc

wheat kraken
#

it will be amazing if you release a addon for that soon

frank lintel
#

ratio of hostiles to friendly etc there bunch of options for superb survivors

wheat kraken
#

i got feedback that raiders are not spawning (there is a bug in the base mod)

frank lintel
#

I can look at that

#

be next thing I do

#

or try to...

#

only reason I got into it was I like the mod myself but I had the unkillable survivor bug and a hostile and my whole group wouldnt stop fighting lol

#

which is another thing gonna check cuz I got it to stop but not exactly sure as to why but I think its related to the pvp on/off flag and in settings having pvp off maybe making break dunno.

wheat kraken
#

this bug are on mp right?

#

i hear that is not working properly in mp

wheat kraken
frank lintel
#

on Surivors is not even MP at all far as I know

#

which is my end goal to maybe change that.

wheat kraken
#

can someone link them here? i didnt know, it will be nice to get in touch with their devs, i didnt know/try any explosives mods atm, detonation-like

vapid hearth
#

Hey so I want to make a true music add-on for the artist blacklite district, how would I go about this

wheat kraken
#

while developing using tiles, i found a bug for me that can be userful to you,

if you declare the isobject in a global variable, in my experience i was be able to spawn only one, even if i try to spawn more, i didnt go any further than this, and use local isoobjects to solve that "bug" (setSquare only works once for me, when it was a global variable)
and maybe using
getNew() too

i didnt try delete it and try spawn again @fast galleon

ancient grail
#

This is for developing mod u are asking about another mods feature. The addon for true music is players concern not develppers

glass basalt
wheat kraken
# ancient grail <@612063478433185937> <#919609757168468028>

did you try the Fire a trail of fuel v1.1 update?
i need people to stress test that
@drifting ore @glass basalt

the hard lift happens when external fire triggers any gas puddle,

and when is not yours gas puddle, and when is a gas puddle that you place and gameboot again

and tell me if its working nice in mp, the way the code is it should be working

and its possible that the map gas puddles updates are being doing by shared processment along clients (all users that are less than 30fps do not process it, this enviroment processes)

ancient grail
#

I didnt it looks tho

#

Nice

#

Mind sharing the code

wheat kraken
#

using global variables fix it for you?

#

wow, who manage the emoticons near the nick? i got some fast updates here, from no where, got from recruit to builder faster then i was expecting

#

cloned using getNew() ?

#

amazing

sand dragon
#

everything else works fine, but also the last two lines are new a dif code from the other ones.

#

trying add my SpiffoCards.cardpack to spawn in with the Paperbag_Spiffos

wide oar
#

Heya all, I've a question. How do you create poster mods? is there a tutorial for that? ._.

#

i tried looking into azas posters mod and i dont understand wtf im looking at. how do you do this :_:

sand dragon
#

i feel the same, first time modding and its working for the most part but so confusing. cant add my items to spawn in these bags either is annoying

sand dragon
drifting ore
#

watch daddy dirkies video on making tiles to learn how, then replace with poster pngs you made and profit

wide oar
#

Okay! ty

drifting ore
#

should require little to no lua to make that mod

drifting ore
#

i can't translate sense

wide oar
#

????? what?

drifting ore
#

your comment doesnt make sense to me

#

watch video and learn to make tiles

#

now you know how to turn a png file into a poster

wide oar
#

This one right?

drifting ore
#

it's the exact same concept as making any other tiles

#

yes this teaches you how to generally make it

#

there is other tools and whatnot in mapping

#

also #mapping will be a better place for information on it minus if you need any code. can still ask anything here but people use those tools like tilezed more in that channel, also know more about tiles

wide oar
#

okay ^^ tysm

sand dragon
#

does anyone know how to make an item spawn inside another item? like how u can find backpacks and bags with other items in them

true vault
spring zephyr
#

which code do i need to add on recipe.txt file to give a custom sound (ogg file) when server player is crafting certain item?

fast galleon
#

the problem with this, everybody says the object isn't there if the square wasn't loaded when you do that and then go to that square.

fast galleon
wet sandal
#

Equipment UI is like 95% functional, just needs to show held items and hotbarred items as well.

I'm pretty happy with how it works, but I'm not sure about how it looks... Is it too cluttered?

drifting ore
#

it's really good. considering how cluttered it is already this is still going to be really good lol

#

what determines the amount of physical slots each bag/ clothing items with storage you have

fast galleon
#

these trigger when the object exists on the square already but the problem is that they don't.

Do you mean you can combine these two in some way?

Separate issue is that trees have special logic and are not like normal tiles.

#

The test is: use the spawn code to add item in Riverside when you are in Rosewood. Then teleport to Riverside and find the new tile. Does your solution pass this test?

wet sandal
drifting ore
#

nice

fast galleon
#

ah so you wait for them to load the square, and you use LoadGridsquare event?

#

It just wasn't in the snippet up there

#

I'm just puzzled because this is very different from the code you actually shared so far.

#

I will try to reconstruct this from what you posted because I need it sometimes.

#

Another question: would they still spawn if you quit to main menu or do you rerun the logic?

#

So you do it every time, what if they cut it, do you just replace it?

#

ok but that doesn't answer the question about quitting to menu, do you add the placeholder every time you load in to the game? Does it stay there if you add it once or you add it again, and if you add it again does the tree reappear if it was previously cut.

chilly garnet
chilly garnet
drifting ore
#

haha

#

we are looking into lights coming from candles and other things while holding them

#

glytcher was messing around in a call earlier. i think it will be fruitful there. next step makin em crazyyy

glass basalt
drifting ore
#

yea lol finally

#

i ran into a million issues

#

gonna chill on hardcoded stuff

#

EXCEPT i will do extended generators range probably at some point

#

found a quazi solution for that one haha

fast galleon
#

tested and that logic doesn't work in SP or MP.
Only items near player appear, and MapObjects functions were called only when coming back to those items that did spawn already. Test item was not a tree, just regular tile.

ancient grail
#

If u guys want a venue to like go vc with other modders
Join our discord server. We shall hang out and discuss stuff etc.
The link is on my profile
Orbit Modding Team

split basin
#

Did anyone mess with the Playerinventory and carryweight? I want to increase the carryweight of a player, but i'm kinda lost

tardy wren
#

@frank elbow @drifting stump Do you know if I can make a new ArrayList in Lua and initialize it with some content, without using :add() several times after making it
I can do ArrayList.new() to make a new list, but it starts empty. I want to quickly populate it with predefined strings

drifting stump
#

you could have a pre initialized arraylist and then clone it or addAll to the new one

#

other than that no

tardy wren
#

I need to have several lists, so... shame

#

I found the Arraylist:hashCode(), which lets me turn the arraylist into a table index, essentially, to more quickly identify the wrong arrays

#

Because I can't convert a lua table to a type that the ArrayList:addAll() can swallow, right?

undone elbow
#
LOG  : Lua         , 1677755829163> Loading: C:/Users/user/Zomboid/Workshop/SimpleReadWhileWalkingMod/Contents/mods/SimpleReadWhileWalking/media/lua/client/!_SearchModeAPI.lua
LOG  : General     , 1677755829164> SearchModeAPI: registered a new mod with ID     unknown

LOG  : Lua         , 1677755829201> Loading: C:/Users/user/Zomboid/Workshop/SimpleReadWhileWalkingMod/Contents/mods/SimpleReadWhileWalking/media/lua/client/fix_read_walking.lua
LOG  : General     , 1677755829202> SearchModeAPI: registered a new mod with ID     read_walking

"unknown"? ThinkEyes

tardy wren
#

Unless I do a crazy thing, and presume that ArrayList:hashCode() will return the same number, regardless of the amount of mods and items loaded, no matter the OS and arches, that my
[Base.KitchenKnife, Base.Machete, Base.FlintKnife, Base.HuntingKnife, Base.MeatCleaver]
Will turn into a 76907929

drifting stump
#

again you could have prefilled lists

#

but ughhhhh

#
ArrayList.new(Arrays.asList("Base.KitchenKnife", "Base.Machete", "Base.FlintKnife", "Base.HuntingKnife", "Base.MeatCleaver")
#

try this

tardy wren
#

thanks, that is cleaner... But I am loading the modpack now, and seeing if the hash remains the same... it should, but... It is zomboid

fast galleon
#

Arrays is nil

split basin
#

Is it possible to make an item hidden in the player inventory?

drifting ore
#

Does anybody know how I could add a description to my server spawns?

jaunty marten
spare burrow
#

Anyone knows how to restrict an specific item from a recipe? Like, you get all the hammers for doing something but you restrict the clubhammer (something like [Recipe.GetItemTypes.type]-itemid or alike?)

thick karma
fast galleon
#

You can also call the original function inside your function and remove the item from the array.

spare burrow
#

yeap but its better to keep it dynamic

#

in this case i want to fix gas masks from "duping" gas mask filters when scrap armor creates a rebreather

#

guess i'll just add a gas mask filter to the recipe

fast galleon
#

[...] is a lua function that is called to populate the source items. Sorry I can't explain more atm, doing other stuff and will mistype all commands.

spare burrow
#

dw! ty for the insight ^^

long cloud
#

anyone know what category does VHS tapes fall under?

lusty marsh
#

man I love modding, one moment your chilling making good progress and the next the random outfit generator doesn't give females pants

hollow shadow
#

@dark wedge Do you happen to know how i can slow down animations? i made an idle animation but its going wayy to fast

red tiger
#

Good morning.

#

It's nice to see people DM'ing me lately about having a ZedScript linter to check their scripts for errors. =)

wet sandal
thick karma
#

I was considering the prospect of needing to do it myself for other people who will inevitably like that mod.

thick karma
# wet sandal Whats 4x?

4x is 4x font size. I would recommend you handle that part... A lot of people need things to be legible in 4x font.

#

A lot of mods overlook that need and then the mod looks like crap in 4x.

wet sandal
#

Is that a setting in game?

thick karma
#

Yes

#

In the Display settings

#

or first tab, whatever it's called, idr

frank lintel
#

options/display/fonts/font size > default, 1x, 2x, 3x, 4x

wet sandal
#

Chonky text

#

I should probably use this on my desktop monitor tbh

#

Need to consider text height I guess

#

Kinda weird having such large text but unscaled UI

lunar carbon
#

hi, anyone have idea if import modules like base generate lag because it need to load all the base again or not?.

faint jewel
#

so nice.

thick karma
#

And of course getFontHeight

wet sandal
#

Ye, I did get the width for the slot labels, but not the height

thick karma
#

Right on right on

#

Also... You may wanna check for compat with a mod I made that fixes the header information in that inventory title bar.

#

A lot of 4x users need it to read their container weights

#

Called Legible Container Headers

#

Allows you to e.g. hide your name in the Inventory header string

#

So stuff fits a lot better in 4x

#

That stuff isn't you obv but it would be nice for others if it were compat I'm sure (and I suspect it can be)

glass basalt
#

Noob question: where do I find the server terminal on a locally hosted server? I need to debug a multiplayer mod

#

Or is it only visible on a dedicated server

drifting ore
#

i just run it from the .bat file to watch live logs. in debug you can see it, bottom left if you mean the console

split basin
#

Hey guys, currently working on my first mod to make the First aid skill more relevant. How do you like the feature set so far, any feedback is welcomed. The orange number, is the skill requirement

deft falcon
#

how do i access this

hoary ore
frank lintel
#

my guess make a local object from the Helicopter class then just call the func with your local object

deft falcon
#

im dumb so how would i do that

frank lintel
#

sorry cant help ya more then that, Im not native in Lua myself. finding just easier debugging existing code and learning it as Im reading thru it all

#

I mean it could be as simple as just Helicopter:isActive() no clue

split basin
deft falcon
frank lintel
#

more like ya trying to add Ace combat to PZ

hoary ore
frank lintel
#

is the Helicopter a valid object? dunno how the helo even works like it exists always then appears or is created on teh fly

fallow crescent
deft falcon
#

yikes

modern hamlet
#

I failed to change the drunkenness value of the character, can anyone show the correct function?

fallow crescent
#

you would need to reimplement the heli in lua, which would not be hard to do

#

if you're a beginner, it'd be a neat learning experience, it's not super complicated

#

just depends if it's something you want to bother with

#

best bet look at other mods that already did it

deft falcon
#

i wouldnt say im a lua beginner but idk how reimplementing works

#

from java to lua ro smth

frank lintel
#

I'd rather see an API call so you can...

fallow crescent
#

game is not gonna update for a while so he's out of luck on that front

hoary ore
fallow crescent
#

well several months and I just assumed he'd want a solution for something fairly promptly

frank lintel
#

odd I must got something wrong then cuz IntelliJ not crying over if (Helicopter:isAlive()) then break end

fallow crescent
#

with the class not exposed, you'd have a hard time doing it in lua

frank lintel
#

that is in a lua file

fallow crescent
#

ah

#

maybe I'm just out of the loop and they exposed it then

#

would have saved me a lot of work a year or two ago lol

frank lintel
#

I could have my env setup wrong but...

deft falcon
#

why isAlive() tho

#

it should be isActive

bronze yoke
#

Helicopter:isAlive() doesn't even exist

frank lintel
#

wait wtf that come from that was autofilling

bronze yoke
#

i don't think the pz libraries thing accounts for exposure

frank lintel
#

goes back and looks

fallow crescent
#

oh yes that'd be it

#

doesn't

deft falcon
#

wait actually i wrote Helicopter() but not Helicopter

bronze yoke
#

but even if it was isActive(), this code still isn't valid because you never grabbed an instance

deft falcon
#

but i think i already tried that

red tiger
frank lintel
#

shrugs shoulda seen all the api's I had to add so just the java code doesnt cry on imports

fallow crescent
#

wasn't it the expanded heli mod that had to do its own thing too because the heli class wasn't exposed

bronze yoke
#

yeah, it's a total reimplementation

deft falcon
#

what about this

bronze yoke
#

you can grab a helicopter instance from there, but it's not exposed so you can't really do anything with it

fallow crescent
#

still no due to lack of exposer

bronze yoke
#

and reading from fields is inconsistent so i couldn't even say for sure you can grab it from there

fallow crescent
#

maybe you can cheat it with the sound event

#

since there must be an emitter for that but it's been too long for me

red tiger
#

@pulsar heath How was that reading of my code yesterday? =P

#

Coding while Ragnarök is approaching my area of this tiny world.

#

:D

#

Also lurking here from time to time.

dark wedge
worldly olive
#

Btw is there any guide to work with animations? I was just able to play some of them through the playEmote function but it doesn't work for everything

#

I assume later this will exist but to play already existing animations? 🤔 any guide/tutorial?

drifting ore
worldly olive
#

Thanks!! much appreciated

cunning canyon
#

On the topic of animations, anyone have an epi-pen style animation I could use? Like jabbing oneself in the thigh?

faint jewel
#

not off hand.... could make one though

#

would probably be better in an arm though.

#

as you would need a specific one for standing and for crouching.

#

would you like me to make you one?

frank lintel
#

if there is a weapon stabbing ani could use that as starting point to make it for the leg just have to change the direction maybe?

faint jewel
#

there's no easy way to import animations to edit them. they have to be recreated.

frank lintel
#

well thats what I meant a copy to start from I never even used a short blade yet so honestly I dunno what even animations there are for it could just be a poke one not a closed fist, or slice etc

glass basalt
drifting ore
#

yea it will show server logs in command with if you start with .bat

#

on the host side

#

not sure if debug is required but i wouldnt think so. doesn't hurt to run in debug though in this case

#

if it's only server side it may only run in a server only setting as well but i also believe you can see in host console logs. could setup dedicated from host, quit game and then run the server64.bat as well to test. as long as you are subbed to the mods it should auto download them from steam and run the server as well

#

it's only an extra two steps from hosting

#

Hello. Anybody willing to make me a quest pack for SSR: Quest System? If anybody has experience and is up for it I could pay.

sand dragon
wheat kraken
stone garden
#

please make an pack i can suggest an pack theme

drifting ore
#

?

#

don't mind this guy

#

he always does this

drifting ore
drifting ore
#

don't worry reifel i'm just messing around. at this point it's funny 😄

wheat kraken
drifting ore
#

@stone garden true? you are goin gto work on your own mod now?

#

if you do i will try to help you with anything i can haha

wheat kraken
#

i give him all instructions for that

drifting ore
#

it would be nice to see him attempt

stone garden
drifting ore
#

heck yea man

wheat kraken
#

this ssr is almost text based

drifting ore
#

glad to see you are attempting now

wheat kraken
#

and in the end have a little part of code, that i can help to finish it

stone garden
wheat kraken
#

the hard part are produce many texts and dialogs and deal with many maps coordinates

that im not into

drifting ore
#

i look forward to seeing it if you do

stone garden
wheat kraken
#

Viper are wanting to do similar to you, an extra quests for use ssr in it

again, this is 80% 90% text based, and the rest code to integrate to ssr,

he mentioned paid for that, so if you practice it while being paid for that, it can give more experiencie to you achieve your own ssr extra quests idea

i can help with the ending code part integration for free btw (or 5% if it is a great payment)

weary knoll
#

when category in scripts/sounds_n.txt matters? I've been trying to notice a difference or get the set parameters to not work on purpose, but so far the parameter always apply to the emitter as long as the file path is correct.

sand dragon
weary knoll
runic creek
#

setting spawn points requires returning professions so if I have profession framework that has a list of professions that you can see right?

how could I use that to return a spawn point for every profession