#mod_development

1 messages ยท Page 95 of 1

drifting ore
#

back to outside the box concept haha thanks for the suggestion

#

killed me inside when i found out you can hear people with deaf

bronze yoke
#

yeah that's kinda ded

ancient grail
#

Lol

drifting ore
#

oh for sure. nothing big, but it just made me scratch my head

ancient grail
#

U still cant hear the world tho

drifting ore
#

you can hear some weather still

ancient grail
drifting ore
#

its all good and whatnot but overall it's not consistent. im going to look into it

ancient grail
#

Damn i know what to do!
Can you just mute his volume onTick

drifting ore
#

hahaha

#

only one way to find out. gonna finish these options here. about to scrap the random context menu idea for later

#

seemed so simple in concept lol

ancient grail
#

What random context

drifting ore
#

right click to read book. red text but with 3 potential outcomes for the text instead of the word "read"

#

based on skill level

#

also never using the previous outcome

ancient grail
#

So your character gets smarter? Something like that?

drifting ore
#

if you care to see. all my stuff is free use public stuff

local lastSelected  = nil

local function readOrNot(player_num, context, items)
    local item = items[1].items and items[1].items[1] or items[1]
    local player = getSpecificPlayer(player_num)
    local bookLevel = SandboxVars.Nipswitch.Booklevel
    local zapLevel = player(ISLightActions.perkLevel..bookLevel)
    local lowLevel = bookLevel <= zapLevel
    local goodlevel = bookLevel >= zapLevel
    if item:getType() ~= "Base.Lightswitches_fordummies" then
        return
    end
    local menus = {
        context:addOption(getText("ContextMenu_One", item)),
        context:addOption(getText("ContextMenu_Two", item)),
        context:addOption(getText("ContextMenu_Three", item))
    }
    local txtRandom = ZombRand(3);
    local selectedMenu = menus[txtRandom + 1]
    if lowLevel then
        while selectedMenu == lastSelected do
            txtRandom = ZombRand(3);
            selectedMenu = menus[txtRandom + 1]
        end
        lastSelected = selectedMenu
        selectedMenu()
        for _, menu in pairs(menus) do
            menu.notAvailable = true
        end
    elseif not lowLevel then
        local totally = context:addOption(getText("ContextMenu_Four", item))
        totally.notAvailable = false
        local tooltip = ISInventoryPaneContextMenu.addToolTip();
        tooltip.description = getText("ContextMenu_Five");
        totally.toolTip = tooltip;
    end
end
Events.OnFillInventoryObjectContextMenu.Add(readOrNot)
#

no

ancient grail
#

Or am i just geting dumber

drifting ore
#

just chance for 3 different text to appear

#

each time you right click

ancient grail
#

Ahhh the readorNot code

bronze yoke
#

you're adding all three to the context menu here

    local menus = {
        context:addOption(getText("ContextMenu_One", item)),
        context:addOption(getText("ContextMenu_Two", item)),
        context:addOption(getText("ContextMenu_Three", item))
    }
drifting ore
#

yea LOL

#

it wont run thru them and use one one at a time?

bronze yoke
#

best approach would be to add one option that gets its text from a variable

drifting ore
#

i did see it add all three

ancient grail
#

U know how to disable contextmenu? From. vanilla?

drifting ore
#

i thought it was the way i was using pairs

ancient grail
#

Cosmic B helped me with the code he manage to turn the thing red and used a diffrent word but then people discovered it can still be clicked

#

And it will show the drink all, half, 1/4

drifting ore
#

thank you also for the insight

bronze yoke
ancient grail
#

Thats a problem
Can i just remove the parent menu

drifting ore
#

i did it on accident so i know its possible LOL

#

just no idea what i did at this point

#

it was when i was trying to use the global function way. but i dont understand how to do that fully yet

ancient grail
#

I saw a remove last option or something
It fan delete everything but i dont want that

drifting ore
#

ahh

ancient grail
#

I tried spamming it like 7x it almost removed all the context options

bronze yoke
#

treat drinkOption as a context menu

#

make all of its options notAvailable or delete them or something

#

maybe even delete it and replace it with a notAvailable drink option, might be tidier

ancient grail
#

I would but i dont know how to get all the option

#

Ill try to figure it out

thick karma
#

You don't need all the options to delete a context menu option, you just need to know what it's called. @ancient grail

bronze yoke
#

we're trying to delete all options from a sub context menu

ancient grail
#

Yep

bronze yoke
#

just loop through the options table?

ancient grail
#

Is there an array? Ill check docs

bronze yoke
#

for k,v in pairs(drinkOption.options) do

thick karma
#

All options from a sub context menu... why not just delete the context menu?

#

If it has no sub options?

#

Does it do something by itself?

bronze yoke
#

i was thinking making them unavailable would be better

thick karma
#

I see

bronze yoke
#

i pointed out deleting the context menu as an alternative

thick karma
#

Sorry, I'm wasting time lol I'll go read

bronze yoke
#

no mods should really mess with that menu ever but in theory it could cause a compatibility issue

#

this would be immune to that

ancient grail
#

Itsays debug option

bronze yoke
#

ISContextMenu is a lua object

ancient grail
#

GetChildren

bronze yoke
#

it's not on javadocs

thick karma
#

If you want the function it's ISContextMenu:removeOptionByName(optName)

bronze yoke
#

yeah the prettiest ways to deal with this are either that and then create a new option with the same name that's unavailable, or loop through the submenu and make all of its options unavailable

ancient grail
#

Cuz before it says i shall not commit sin

Cuz the trait is believer
And he cant drink alcohol or smoke stuff

thick karma
#

One second

#

I have code for finding and replacing existing entries

#

World context entries but still

#

Same base functions

bronze yoke
#

it's all iscontextmenu

thick karma
#

Here's a very simple example:

    if menu:getOptionFromName("Sit on ground") then
        menu:insertOptionAfter("Sit on ground", "Sit on Ground", player, function() ISWorldObjectContextMenu.onSitOnGround(playerIndex) end)
        menu:removeOptionByName("Sit on ground")
    end

@ancient grail

#

You could do something like this

ancient grail
#

Got it

#

๐Ÿ™

bronze yoke
#

you should use getText() or it won't work in other languages

thick karma
#
    if menu:getOptionFromName("Drink") then
        menu:insertOptionAfter("Drink", "Dump", player, function() Glytch3r.dumpOutAlcoholBecauseIAmLame() end)
        menu:removeOptionByName("Drink")
    end

@ancient grail

thick karma
#

You will want yours to be based on getText("UI_whatever_the_drink_translation_variable_is")

bronze yoke
#

the context menus are so inconsistent with that

#

no matter what i make my mod use it feels wrong LOL

thick karma
#

Because I hate them

#

I need to fix more

#

But I fix a couple already

#

"fix"

#

"subjectively improve"

#

"by accommodating my own OCD"

ancient grail
ancient grail
sand harbor
#

I think i've asked this before but does anyone know how you could set an engine's quality? (not condition) there's a debug function but it only sets it to 100

thick karma
#

Wait maybe that option already exists

#

idr

ancient grail
#

I thought of that too. Or maybe chance that it will do it

bronze yoke
#

that option already exists

idle dawn
#

All I can hear are groaning zumbebs.

ancient grail
#

its done thnx guys!

weak sierra
#

interesting

late hound
#

On the modder's side, has anyone figured out how to add dropped clothing items from zombies (such as hats, glasses) to the despawn list?

idle dawn
#

I found a relevant gif from the game jam I was in a bit ago.

#

Zombie game too. Stoomp

limber oar
#

Does anyone know offhand whether server lua (specifically Distributions/ProceduralDistributions) loads after sandbox options?

#

Wondering whether I can query the sandbox options immediately from those files or if I need to use the OnInitGlobalModData event.

bronze yoke
#

it doesn't

limber oar
#

Alright, gotta use the event then. Thanks!

wide oar
#

Ok i need hep

#

my gun appears but its all smashed into one weird rectangle

limber oar
wide oar
#

mesh = Weapons/Firearm/s_10mm,
texture = Weapons/Firearm/pistol,
texture = Weapons/Firearm/mag,
texture = Weapons/Firearm/grip,
texture = Weapons/Firearm/barrel,

#

maybe its because i listed multiple texture???

#

\

wide oar
#

it looks like its just rendering the magazine

#

i dont udnerstand why

late hound
#

yeah, but like scripting it in where server owners don't have to do this part

sour island
#
local function HelicopterSandboxOptions()
    print("EHE: Disabling vanilla helicopter. Adding items to WorldItemRemovalList.")

    SandboxVars.Helicopter = 1

    local typesForRemovalList = {"EHE.EvacuationFlyer","EHE.EmergencyFlyer","EHE.QuarantineFlyer","EHE.PreventionFlyer","EHE.NoticeFlyer"}
    for k,type in pairs(typesForRemovalList) do
        if not string.find(SandboxVars.WorldItemRemovalList, type) then
            SandboxVars.WorldItemRemovalList = SandboxVars.WorldItemRemovalList..","..type
        end
    end
    
end

Events.OnGameStart.Add(HelicopterSandboxOptions)
Events.OnGameBoot.Add(HelicopterSandboxOptions)
Events.OnLoad.Add(HelicopterSandboxOptions)
small topaz
wide oar
#

i removed all the materials in blender but one and thenn that worked and the mdoel appeared

#

what the hell.

#

So i have to fuck with UV's to get it to work??!???/

sick umbra
#

have a question, what path do I use to put my mod folder?

#

asking because there's the steam workshop folder, the users/user/Zomboid folder and the folder where zomboid is installed

cosmic condor
#

C:\Users\%USERNAME%\Zomboid\Workshop

sick umbra
elfin stump
#

Anyone know how to access the vanilla game sandbox variables via code or where to find these variable names?

elfin stump
# elfin stump Anyone know how to access the vanilla game sandbox variables via code or where t...

For anyone else who might be looking for this info, I found it here: https://theindiestone.com/forums/index.php?/topic/20771-sandboxvarslua-file-explanation/

humble oriole
#

Can you have a drainable spawn with no contents via the distribution system?

faint jewel
wide oar
#

i got it to work, so ty all ^^

#

was a texture problem

wide oar
#

Question

#

any tutorials on vehicle mod creation? i'd like to make a custom bike mod (the SDS Fenrir from FFXIV)

lime pawn
#

What is the exact purpose of everyone making their own Arsenal26 gunfighter mod? Is it so people can run their own adjusted settings for their dedicated server? And if so, where do I go about learning how to do it?

raven spoke
#

I was wondering, is it possible to skip "Click to Start" when you join a server?

jaunty marten
# wide oar any tutorials on vehicle mod creation? i'd like to make a custom bike mod (the S...
unkempt bronze
#

Does any mod exist that enables XP boost/multiplier while PVP is enabled on an MP server?

Additionally PVP enabled only allows to attack other PVP enabled.

If not figured it would be an cool idea.

agile vigil
#

That is a pretty neat idea.

ancient grail
#

anyone knows if this will work

cosmic condor
ancient grail
#

it wont fit

#

iu think the int should be converted to string

#

Client:

-- original code by Dislaik  modified by Glytch3r
-- original code by Dislaik  modified by Glytch3r
local Commands = {};
Commands.CloseQuarterCombat = {};
local counter = 0

Events.OnPlayerUpdate.Add(function(player)
    if not (player:getPrimaryHandItem() == nil and 
    player:getSecondaryHandItem() == nil) then 
    return
    end
    local stanceRoll = tostring(ZombRand(1,5-1))
    
    if player:getVariableBoolean('ModeCQC') == false then
        player:setVariable('ModeCQC', 'true');
        print(player:getSecondaryHandItem())
        player:setVariable('CombatStance', tostring(stanceRoll));
        if isClient() then
            sendClientCommand('CloseQuarterCombat', 'AnimCombat', {ModeCQC = true}, {CombatStance = stanceRoll})
        end
    else
        player:setVariable('ModeCQC', 'false');
        player:setVariable('CombatStance', "0");
        if isClient() then
            sendClientCommand('CloseQuarterCombat', 'AnimCombat', {ModeCQC = true}, {CombatStance = "0"})
        end
    end
end)

Events.OnTick.Add(function(ticks)
    if not (isDebugEnabled() and getPlayer():getModData()['dbg']) then return end 
    local monitor = getPlayer():getVariableBoolean('CombatStance')
    if ticks % 15 then 
        getPlayer():setHaloNote(tostring(monitor),255,127,100,100) 
    end
end)
#

Commands.CloseQuarterCombat.AnimCombat = function(args)
    local source = getPlayer();
    local player = getPlayerByOnlineID(args.id)
    if source == player then return end
    --if args.ModeCQC then 
        player:setVariable('ModeCQC', 'true');
        if args.CombatStance >= "1" then
            if    args.CombatStance == "1" then 
                player:setVariable('CombatStance', "1")
            elseif args.CombatStance == "2" then 
                player:setVariable('CombatStance', "2")
            elseif args.CombatStance == "3" then 
                player:setVariable('CombatStance', "3")
            elseif args.CombatStance == "4" then 
                player:setVariable('CombatStance', "4")
            elseif args.CombatStance <= "5" then
                player:setVariable('CombatStance', "5")
            elseif args.CombatStance == "6" then 
                player:setVariable('CombatStance', "6")
            elseif args.CombatStance == "7" then 
                player:setVariable('CombatStance', "7")
            elseif args.CombatStance == "8" then 
                player:setVariable('CombatStance', "8")
            elseif args.CombatStance <= "9" then
                player:setVariable('CombatStance', "9")
            elseif args.CombatStance <= "0" then
                player:setVariable('CombatStance', "0")
            end
        end
    --else
        player:setVariable('ModeCQC', 'false');
    --end
end

Events.OnServerCommand.Add(function(module, command, args)
    if Commands[module] and Commands[module][command] then
        Commands[module][command](args)
    end
end)
#

Server:

-- original code by Dislaik  modified by Glytch3r

if isClient() then return; end

local Commands = {};
Commands.CloseQuarterCombat = {};

Commands.CloseQuarterCombat.AnimCombat = function(player, args)
    local playerId = player:getOnlineID();

    sendServerCommand('CloseQuarterCombat', 'AnimCombat', {
        id = playerId,
        ModeCQC = args.ModeCQC,
        CombatStance = args.CombatStance
    })
end

Events.OnClientCommand.Add(function(module, command, player, args)
    if Commands[module] and Commands[module][command] then
        Commands[module][command](player, args)
    end
end)

idle dawn
#

I'm gonna mod in zombies.

#

Also goodnight fellows.

ancient grail
#

owell the code isnt working

tame mulch
#

Only in setVariable need write like "2"

ancient grail
#

I dont get it

#

Its cuz each number should represent an animation

#
    <m_Conditions>
  <m_Name>ModeCQC</m_Name>
 <m_Type>BOOL</m_Type>
 <m_BoolValue>true
</m_BoolValue>
 </m_Conditions>    

 <m_Conditions>
<m_Name>CombatStance
</m_Name>
<m_Type>STRING</m_Type>
 <m_StringValue>0</m_StringValue>
 </m_Conditions>
sleek citrus
#

u guys all sound smart to me ๐Ÿ˜„

ancient grail
#

Is this your first mod if ever?

thick karma
#

I showed him in DM

#

CloseQuarterCombat ~= CombatAnimation (he fixed it above I believe)

thick karma
ancient grail
#

i may have found the culprit

sendClientCommand('CloseQuarterCombat', 'AnimCombat', {ModeCQC = true } , {CombatStance = stanceRoll})
sendClientCommand('CloseQuarterCombat', 'AnimCombat', {ModeCQC = true, CombatStance = stanceRoll})
chilly beacon
#

Is there a way to make it so when someone presses a button, it puts an item into a compatible empty hotbar slot?

pulsar heath
#

so after messing around a lot...


TWS_UI = ISUIElement:derive("TWS_UI")
TWS_UI.iconSize = 50
TWS_UI.clickableSize = 45

function TWS_UI:initialise()
    ISUIElement.initialise(self)
    self:addToUIManager()
    self.moveWithMouse = true
    self:setVisible(false)
end

function TWS_UI:new(posX, posY, player, screenX, screenY)
    local o = {}
    o = ISUIElement:new(screenX, screenY, 1, 1)
    setmetatable(o, self)
    self.__index = self
    o.player = player
    o.x = screenX
    o.y = screenY
    o.posX = posX or 0
    o.posY = posY or 0
    o.width = TWS_UI.clickableSize
    o.height = TWS_UI.clickableSize
    o.opacity = 255
    o.opacityGain = 1
    o.enabled = true
    o.visible = true
    o.title = ""
    o.mouseOver = false
    o.tooltip = nil
    o.center = false
    o.bConsumeMouseEvents = false
    o.joypadFocused = false
    o.translation = nil
    o.textureBG = getTexture("media/ui/eventMarkerBase.png")
    o.icon = getTexture("media/ui/calendar.png")
    o:initialise()
    return o
end

function TWS_UI:render()
        print("---- rendering TWS UI -------")
        self:drawTexture(self.textureBG,TWS_UI.iconSize/2,TWS_UI.iconSize/2, 1, 1, 1, 1)
        self:drawTexture(self.icon,TWS_UI.iconSize/2,TWS_UI.iconSize/2, 1, 1, 1, 1)
        ISUIElement.render(self)
end

function drawui()
    myUI = TWS_UI:new(65, 0,getPlayer(), 800, 100)
    myUI:addToUIManager();
    myUI:setVisible(true);
end
function stopui()
        myUI:setVisible(false);
end```
chilly beacon
pulsar heath
#

now from what i can tell from ehe i need to add functions to react to mouse events so that i can move it around?

quaint fiber
#

guten tag, is there's any tools to open up pz model format?

grim rose
#

hello everyone now its my turn

#

i need help with overwritting a sound file

high cloak
#

If there's not really a suitably named existing translation file to add your mod translation to, is there a goto? or does it not really matter?

dull moss
#

anyway

#

Anyone ever tried of making something like experimental branch of mod and rolling it out as submod that should be ran instead of main mod if ppl want to test stuff? That'd save troubles of catching bugs cuz you can just merge it onto main mod branch after fixing bugs that get reported on it

#

Cuz imma be honest, I'm at the stage where I don't want to test stuff and just rolling out update without a bit of testing seems inconsiderate KekW

ancient grail
chilly beacon
fast galleon
fast galleon
#

Others have done a separate Beta Beta Beta mod

#

and others use users for beta testing

dull moss
chilly beacon
#

i havent done a lot with lua before, yeah

dull moss
fast galleon
dull moss
ancient grail
#

You need to learn the following:
How to be able to hook to button press
You need a checker for your inventory
You need to know the pz syntax to be able to get the right mag thats appropriate for the weapon as well as the ammo
U can find this on so e of the links i gave
You need to also know time action so that u can make your character swap the stuff
I guess thats about it

thick karma
#

Ugh tfw when you move a chunk of code to a different file and for no apparent reason it stops working.

dull moss
#

oh hey i know that one

ancient grail
ancient grail
chilly beacon
dull moss
thick karma
#

Trash Talker (works):

Trash.ServerSettingsScreen = {}
Trash.ServerSettingsScreen.create = ServerSettingsScreen.create
Trash.ServerSettingsScreen.unfocused = true
function ServerSettingsScreen:create()
    Trash.ServerSettingsScreen.create(self)
    local oldShowFunction = ServerSettingsScreen.instance.pageEdit.aboutToShow
    ServerSettingsScreen.instance.pageEdit.aboutToShow = function(self)
        Trash.ServerSettingsScreen.unfocused = true
        oldShowFunction(self)
    end
    local oldGainFocusFunction = ServerSettingsScreen.instance.pageEdit.onGainJoypadFocus
    ServerSettingsScreen.instance.pageEdit.onGainJoypadFocus = function(self, joypadData)
        oldGainFocusFunction(self, joypadData)
        if not Trash.ServerSettingsScreen.unfocused then return end
        Trash.ServerSettingsScreen.unfocused = false
        joypadData.focus = self.listbox
        self.listbox:setJoypadFocused(true, joypadData)
    end
end

Quicker List Navigation in Wookiee Gamepad Support (doesn't work):

WGS = WGS or {}
WGS.ServerSettingsScreen = WGS.ServerSettingsScreen or {}
WGS.ServerSettingsScreen.create = ServerSettingsScreen.create
WGS.ServerSettingsScreen.unfocused = true
function ServerSettingsScreen:create()
    WGS.ServerSettingsScreen.create(self)
    local oldShowFunction = ServerSettingsScreen.instance.pageEdit.aboutToShow
    ServerSettingsScreen.instance.pageEdit.aboutToShow = function(self)
        WGS.ServerSettingsScreen.unfocused = true
        oldShowFunction(self)
    end
    local oldGainFocusFunction = ServerSettingsScreen.instance.pageEdit.onGainJoypadFocus
    ServerSettingsScreen.instance.pageEdit.onGainJoypadFocus = function(self, joypadData)
        oldGainFocusFunction(self, joypadData)
        if not WGS.ServerSettingsScreen.unfocused then return end
        WGS.ServerSettingsScreen.unfocused = false
        joypadData.focus = self.listbox
        self.listbox:setJoypadFocused(true, joypadData)
    end
end

๐Ÿ˜ญ Anybody mind glancing and sanity checking me?

#

๐ŸŽต One of these things is not like the other... ๐ŸŽต

(Note: Both mods are enabled in MODS and on the server. I am subscribed to neither mod. Both are in Workshop. All I did was move the code from one place to another and change the containing module.)

grim rose
#

because for now i am doing it but it cuts off

grim rose
ancient grail
grim rose
#

it is ogg

fast galleon
#

you can make it like a patch if you wanted
I just kept the old version to not break saves

#

also since I make new id it means I remove the issue of same id with old old mod that people still install even though it has obsolete in name.

dull moss
#

I'm just thinking how to version it now PepeThink

#

cuz I have my own system in mind that I use

#

and like

#

Do I create separate versioning for beta branch

#

ugh

#

why cant there be 2 changelogs

#

on steam page

#

decisions, decisions

fast galleon
#

do it like this 3.1.1-beta

dull moss
#

hm

#

I like the idea of that

fast galleon
sour island
#

I use GitHub to switch branches

#

The beta branch has an uncommitted workshop.txt that's different ID/name

#

Published to a unlisted mod

thick karma
#

What is reality

fast galleon
#

I thought you just pushed stuff to users to test.

sour island
#

Only for minor stuff that I 'test' when writing it

#

Using a beta for the EHE update

#

Trying out new approaches overall

dull moss
sour island
#

I put it up as an issue on the GitHub using the 'need testing' tag

#

๐Ÿ˜Ž Easter egg for GitHub users

dull moss
#

I doubt anyone from players checks my github so i don't think that'd work

sour island
#

My steam page links to my GitHub 6 times and has no comments/discussion on steam

#

Only got 1 reply so far tho

dull moss
pulsar heath
#

@sour island im trying to make markers like you did for ehe, so far so good... only need to figure out how you made it movable, i see some mouse logic in ehe markers... is that the only way?

dull moss
#

except that I use 1st number a bit more often that usual practice with app dev

#

simply cuz almost everything is backwards compatible with traits

#

so i'd forever sit on 1.x.x

fast galleon
dull moss
fast galleon
pulsar heath
#

expanded helicopter events

dull moss
#

you guys should really include EHE somewhere

#

so you can get hits on EHE if u search for it

#

problem with this approach

#

is that average mod user is not willing to go extra steps

#

of creating github account

#

@fast galleon I came up with solution on how to prevent users from running both mods at same time, make a check in main mod if player is running both and if they do, crash the main mod luas

#

lmao

fast galleon
#

Reminds of a post I was reading in past, a mod to improve performance but it errored and thus disabled all mods.

dull moss
pulsar heath
#

well it did what it was meant to... mods off = better performance ๐Ÿ˜„

dull moss
#

I'll actually do it

thick karma
# thick karma Trash Talker (works): ```lua Trash.ServerSettingsScreen = {} Trash.ServerSetting...

Y'all can someone explain to me why the filename matters so much when I run this code? I am just not seeing why it would, but, after a LOT of testing, I have concluded that it DOES, which is confusing me endlessly. And it's not an alphabetization thing! Data:

Filenames in which the WGS code works as expected:

Quack.lua
QuitIt.lua
ServerSettingsFocusTweak.lua
TrashTalker.lua

Filenames in which the WGS code does not work as expected:

AServerSettingsFocusTweak.lua
Bananas.lua
QuickerListNavigation.lua
Zebras.lua

I am well aware how crazy this data may sound, but assuming it's not user error, is there anyone who can speculate intelligently about a possible explanation for this?

dull moss
#

No

thick karma
#

Omg it's baffling.

fast galleon
#

same folder?

pulsar heath
#

lua goblins?

thick karma
#

All in same folder EXCEPT Trash Talker

#

I can run the code in Trash Talker mod as well

#

But most of these files were tested in the WGS mod folder

dull moss
#

Doesnt game load luas alphabetically?

thick karma
#

I believe so

dull moss
#

folder -> alphabetically

thick karma
#

I do not think this is a load order issue

dull moss
#

oh then idk

thick karma
#

Or the alphabetization would explain more.

#

Look at the data

#

Quack => Fine

dull moss
#

ofc bananas are fine, potassium and shit, good stuff

thick karma
#

Quick => Not fine

#

(sorry Bananas actually not fine that was bad memory)

#

Quack is fine though

#

Quick is not fine

dull moss
#

Aw shit bananas are not fine

thick karma
#

And then Zebras is fine again

#

Since Quack < Quick < Zebras and the pattern is Works - Doesn't - Works, I think we can rule out alphabetization

fast galleon
#

check that mod is enabled, files loaded, test print, etc?

thick karma
#

I'm using it from the Main Menu @fast galleon

#

It's for the Host settings screen

fast galleon
#

f11 and print still work

red tiger
#

Heheh.. load order is a hell of a problem when dealing with scaled solutions.

dull moss
#

um, anyone can give me a simple way to disable lua file by throwing error at the start of it? If I put this

if getActivatedMods():contains('EvolvingTraitsWorldBeta') then
    -- something that throws error here
end

at the start of the lua, it'll break it and wont run it, right?

thick karma
#

Oh I see. I can confirm the mod is loaded because its other functions are active. E.g., in QuickerListNavigation, I have code that lets me quickly scroll up and down lists.

#

Let me double-check right now for you

#

Yeah

#

QuickerListNavigation loads

#

But the code I pasted above is doing nothing when it's in that file

red tiger
#

I had to get rid of load order restrictions for PipeWrench entirely.

fast galleon
#

I just thought maybe some of those test files were in Trash Talker mod.

thick karma
#

No. For context, I was testing Trash Talker's new features, got annoyed one last time by the focus transition on gamepad when entering the edit settings menu of Host, and decided to fix it

#

I drafted the fix in Trash Talker originally because I was working there anyway

#

I got it working in Trash Talker, I copy-pasted it to WGS -> QuickerListNavigation, I replaced "Trash" (Trash Talker module) with "WGS" (Wookiee Gamepad Support module), I tested it, and wtf it no longer worked.

#

So then I scratched my head awhile, reread the code, made sure I pasted it right...

#

When I was convinced I had, I moved the code from QuickerListNavigation to its own new file to experiment. A file in WGS. I called that first test file "ServerSettingsFocusTweak.lua". THAT worked.

#

That's when I started trying random file names.

#

I KNOW, right?

#

Someone else out there has to find this as weird as I do.

fast galleon
#

reading big code blocks from mobile is hard

thick karma
#

@fast galleon This is the entire code if zooming on a photo is easier on mobile and you're bored enough to try:

#

That's legit all it needs to do

#

and I can change nothing about that code, move it to Zebras.lua (beside it in the photo above), and it works.

#

Completely baffling.

dull moss
#

is there any chance QuickerListNavigation.lua is being overwritten by other mod lua?

thick karma
#

No

#

Because I'm using it's features

dull moss
#

well then fuck knows

thick karma
#

I'm scrolling up and down with triggers... that's a QLN feature...

dull moss
#

um, can anyone help? I've put this at the start of lua, expecting this to throw error (I remember getting errors when trying to use concat operator .. on some string and nil) but it won't throw one when I reload the luas from main menu PepeThink

if getActivatedMods():contains('EvolvingTraitsWorldBeta') then
    print("YOU LOADED MAIN MOD AND BETA BRANCH OF THE MOD AT THE SAME TIME, ENABLE ONLY 1!!!"..nil);
end```
thick karma
#

Then A) you didn't enable your mod in MODS, B) you didn't enable EvolvingTraitsWorldBeta in mods, or C) I am too dumb to help you.

dull moss
#

both enabled

thick karma
#

@dull moss

dull moss
thick karma
#

C it is!

dull moss
thick karma
#

What is the id of the mod checking for EvolvingTraitsWorldBeta?

fast galleon
#

@dull moss instead of throwing error make it return

dull moss
thick karma
#

EvolvingTraitsWorld would load first

dull moss
#

oh

#

me pepeg

thick karma
#

Beta may not be activated.

#

At that point

dull moss
#

that'd explain

#

hm

#

how do I bypass that

thick karma
#

I'm not sure... perhaps you could try requiring it? Maybe lua would wait as long as possible to load you before returning nil?

#

EvolvingTraitsWorldBeta = require "EvolvingTraitsWorldBeta"

dull moss
#

but i dont want to require it

#

OH

thick karma
#

And if it's not nil there's an issue

dull moss
#

WAIT

thick karma
#

I know

dull moss
#

im r-word

thick karma
#

Nah

#

I don't know if that would work for sure but it may

dull moss
#

Nonon, my beta overwrites everythting

thick karma
#

facepalm

dull moss
#

it uses same lua names

#

then i dont need to bother if user enables both

thick karma
#

Aha

dull moss
#

it'll just use code from beta

thick karma
#

yeah presumably

dull moss
#

unless they go and change load order

#

but who the fuck does that KekW

#

Like last time i checked load order in PZ was like 2 y ago

#

I wish ModManager added support for incompatibleMods so it highlights if you enable incompatible mod

#

would make stuff easier

sour island
#

I think you can actually just call an error if I'm not wrong

dull moss
#

ye, jsut did

#

nice

sour island
#

๐Ÿ‘

dull moss
#

that's nice

#

MonkaS self-dox
jk my name is on stem page anyway KekW

uncut meteor
#

is there an event For pre game start or similar ?
trying to setup a sandbox option without using the ongameboot event

dull moss
dull moss
#

answer:

zinc pilot
#

can group:getOrCreateLocation be run when the game is running?

#

or is it only during init?

cosmic condor
dull moss
fast galleon
#

๐ŸŒ ๐Ÿฆ“ drunk

#

๐Ÿ’ป๐Ÿ”จ

#

maybe it needs intimidation

dull moss
thick karma
#

@zinc pilot I'm guessing you need to getAttachedLocationGroup() on your player object and then getOrCreateLocation on the object returned by that

fast galleon
#

I would still add a print inside create as I said before
print("replacing ui",self==instance)

thick karma
#

getPlayer():getAttachedLocationGroup():getOrCreateLocation(locationId)

zinc pilot
#

also @sour island, is ECC alright to use for mods other than yours?

red tiger
#

Modifying PZ's Lua code to wrap all containers as modules would probably solve a lot of issues I see arise in projects and load-order.. however my thought assumes a lot about how mods initialize their code in general...

#

(Thinking about the earlier convo)

faint jewel
#

man i am aboot to get mad.

dull moss
#

classic modding experience

vestal geode
zinc pilot
thick karma
#

It may also be that the info gets used down the line, and you need a few more functions to fully utilize the updated data.

#

Unless you're getting errors of course

zinc pilot
#

A big ol' stinky "Tried to call nil"

thick karma
#

I haven't done anything with those functions so I am not sure on the details

zinc pilot
#

doing it while it's loading works just fine

#

in game, nada

#

but I just thought of an easier way to do what I want so nevermind, that was a crappy idea anyway

dull moss
#

ofc

#

AI always right

#

This changelog is gonna be funny
- Fixed FearOfOutside counter not changing unless players had debug enabled (oups).

#

OUPS

#
if debug() then modData.FearOfOutside = resultingCounter; print("ETW Logger: modData.FearOfOutside: " .. modData.FearOfOutside) end

instead of

modData.FearOfOutside = resultingCounter;
if debug() then print("ETW Logger: modData.FearOfOutside: " .. modData.FearOfOutside) end```
tardy wren
#

Nothing compared to TF2 changelogs

dull moss
#

Oh ye I remember those

tardy wren
#

"fixed a server crash caused by sniper trying to eat his gun"

zinc pilot
#

new question, when are shared lua files loaded?

sour island
zinc pilot
#

perfect then, thank you

drifting stump
#

mod options is for client side configs

#

for server side settings use sandbox options

sour island
#

That would be ideal if you could change some sandbox options on the fly without another mod ๐Ÿ˜…

#

Having a simpler way to add more game options would be nice tbh

faint jewel
#

is there some way to see models origins ingame?

sour island
#

I cobbled together ECC when I didn't really know much - so it needs some lovin'

faint jewel
#

my static model is just INVISIBLE and it will not show up

drifting stump
#

@sour island hows this looking for creating a ui

sour island
#

Looks neat, what's a spec?

drifting stump
#

hmm then description isnt good enough

#

its meant to define all the variables used to create the ui

#

a specification

#

im doing away with initialise and instantiate completely

#

they never made any sense in the first place

#

and overwriting new is also gone since everything is defined by the spec

weak sierra
#

reminds me of WPF

weak sierra
#

but declaratively

pulsar heath
#

finally im done with the ui for the mod update...

weak sierra
#

survival time and zed kill meters? that's nice

pulsar heath
#

yup, the old one used a window

weak sierra
#

i've been kicking around the idea of a zed kill ui bit myself, tho it's gonna be ages before i get to it lol

pulsar heath
#

i think this one is better

#

less intrusive than a window

weak sierra
#

yeah

dull moss
pulsar heath
#

it is

dull moss
#

nice

pulsar heath
#

double click to close the ui

#

cant make it simpler than that i guess

dull moss
#

can u make it right-clickable so you can mirror where text is?

#

if u want it to be on leftside for example

#

so yo ucan have those on right edge of screen

pulsar heath
#

thats a good idea

dull moss
#

cuz now it'd look weird

pulsar heath
#

but... i hate ui so much... ill get right into it ๐Ÿ˜„

dull moss
#

suffer

pulsar heath
#

so i have to detect... damn

#

so in theory, get the screen size, if the ui position

#

hmmm

dull moss
#

just make it right clickable and boolean toggle there

#

allignedOnRight

#

if true text is on right side of icons

#

if false on left

pulsar heath
#

dunno if that will be possible with my frankenstein code

#

a sec

dull moss
pulsar heath
#
    ISPanel.createChildren(self);
    self.AliveWindow = ISRichTextPanel:new(60, 15,self.getWidth(self)-15, self.getHeight(self)-5);
    self.KillWindow = ISRichTextPanel:new(60, 70,self.getWidth(self)-15, self.getHeight(self)-5);
    self.AliveWindow.background = false
    self.KillWindow.background = false
    self.icon = ISImage:new(10, 15, 50, 50, getTexture("media/ui/calendar.png"))
    self.iconk = ISImage:new(-13, 50, 50, 50, getTexture("media/ui/zedkills.png"))
    self.AliveWindow.text = "alive";
    self.AliveWindow:paginate();
    self.KillWindow.text = "kill";
    self.KillWindow:paginate();
    self.AliveWindow:initialise();
    self.KillWindow:initialise();
    self.AliveWindow.moveWithMouse = true
    self.KillWindow.moveWithMouse = true
    self.icon:initialise()
    self.iconk:initialise()
    self.icon.moveWithMouse = true
    self.iconk.moveWithMouse = true
    self:addChild(self.icon)
    self:addChild(self.AliveWindow);
    self:addChild(self.KillWindow);
    self:addChild(self.iconk)
end```
#

since i create them in this order

dull moss
#

yea idk a thing about UI

pulsar heath
#

so ill have to make a check for alignLeft or whatever

#

and when creating the objects in the panel if true do one, if false the other?!

dull moss
#

sounds reasonable

pulsar heath
#

sounds to simple... i have a feeling im gonna rage in a bit ๐Ÿ˜„

drifting stump
#

why do it that way?

#

you could just do your own render

pulsar heath
#

why this way? 'cause i know no other way to do it ๐Ÿ˜„

#

its still an improvement, even if its not the best way to execute it

drifting stump
#

just make a panel

#

then overwrite the render function

#

no need for child elements

pulsar heath
#

that sounds like a good idea, but no clue of how to do that

#

i know next to nothing about ui in pz

zinc pilot
#

fucking hell

#

is resetLua asynchronous or what?

drifting stump
pulsar heath
#

my previous attempt was around something like that, didnt go very well

#

ill give it a go again based on your info, thanks

faint jewel
#

THIS IS GONNA DRIVE ME NUTS

dull moss
#

classic modding experience (x2)

#

beta branch out

#

Now I don't need to test shit besides initial run to see if character loads

#

Leave it up to people

#

ez

drifting ore
#

a ton on the workshop lolol

#

there is a few guides though to get started, but not some template you can just add a few things and good to go

dull moss
#

I mean that's the case with almost everything

drifting ore
#

so true.. doing guns minus coding features is mainly just having the textures and whatnot, using correct anims and item parameters. amogst a few other things. but i'd say gun modding has to be a decent undertaking

dull moss
#

Go dig in code of mods that add guns shrug

faint jewel
dull moss
#

I'd help but I don't do models

drifting ore
#

says almost all gamers KEKWlaugh

#

LOL

#

yes im so punny

dull moss
#

took me 1.5s to get it

faint jewel
#

i only do super models.

drifting ore
#

Lmao

dull moss
#

^ IRL pic of Skizot

drifting ore
#

Ahaha not when heโ€™s working on this mod of his

#

Lolol

dull moss
#

^ IRL pic of Skizot working on his mod

faint jewel
#

it's just pz being a pain in the ass lol.

#

the model WORKS if i set it as a world model but NOT as a static model. it's like wtf?

dull moss
#

PZ my beloved

drifting ore
dull moss
#

I need that emote right now

drifting ore
#

Yea dude I feel bad you been workin on getting that down. I hope it pans out lol

faint jewel
#

you can love something and still want to punt it into traffic, I have 5 kids, trust me i know.

drifting ore
grim rose
#

i finally finished

red tiger
dark wedge
#

@zinc pilot Thanks again for adding compatibility for Fancy Handwork! I had actually written a small module so other mods can easily query the status of arm amputations and such. Did you want this? That way other modders can just local TOC_COMPAT = require('TOC_Compat') and use those functions if needed. ๐Ÿ™‚

faint jewel
#
    {        
        mesh = KYRP/PA_Microwave1,
        texture = KYRP/Microwave1,
        scale = 0.000275,
    }

    model W_Microwave1
    {        
        mesh = KYRP/W_Microwave1,
        texture = KYRP/Microwave1,
        scale = 0.0275,
    }

    item Microwave1Carry
    {
        DisplayCategory = Container,
        Weight    =    2,
        Type    =    Container,
        DisplayName    =    White Microwave,
        Icon    =    Microwave1,
        EquippedNoSprint         = TRUE,
        WeightReduction    =    65,
        RequiresEquippedBothHands = true,
        ConditionMax = 100,
        Capacity    =    10,
        OpenSound   =   OpenBag,
        CloseSound   =   CloseBag,
        PutInSound   =   PutItemInBag,
        Tags = HeavyItem,
        StaticModel = KYRP/PA_Microwave1,
        primaryAnimMask = HoldingCarryGrabRight,
        secondaryAnimMask = HoldingCarryGrabLeft,
        WorldStaticModel = W_Microwave1,
    }```
#

am i missing something here?

dull moss
faint jewel
#

i mean ive done this a bunch of times. and now i can't get the dumb ass model to work.

zinc pilot
dark wedge
# zinc pilot that would be lovely man

Here you go! should be enough in there for modders to get what they need. I really only focused on if the hand was there or not, since that's probably all that matters condition wise. Cutting off higher on the arm seems to propagate down anyways (as it should)

dark wedge
pulsar heath
zinc pilot
#

with TOC basically when you lose your right hand, you're done, and that doesn't really make too much sense

dark wedge
zinc pilot
#

exactly

#

but that seems like a pretty big thing to change

dark wedge
#

Attacking with the left arm takes a bit of work, as its in the Java to only attack using the right hand with the DoAttack function. All the attack speed/damage calcs are done with the primary hand item too in Java. I've been (slowly, haven't touched it in like a week, lol) working on an offhand attack mod, would definitely be compatible with TOC. For other actions, would need to mirror the animation and have it use the left hand, create action files, etc. which is a bit of work too.

red tiger
#

yaaayyy

#

Glad to see it.

dark wedge
red tiger
bronze yoke
dark wedge
bronze yoke
#

hooks are generally kind of pointless since they generally require you to reimplement a lot of vanilla java to actually be useful, but this mod sounds like it can actually make use of them in a way that makes sense

dark wedge
dark wedge
#

yea, i meant that. ha

red tiger
#

I document with my Typescript code.

fast galleon
#

ow you're not talking about captain's hook (weapon).

Currently a Hook is just the same as an Event though, what's the difference?

dark wedge
#

Attacking (even melee and stuff) is done from ISReloadWeaponAction.attackHook
kind of a weird spot, but ok i guess. has to be somewhere.

bronze yoke
#

it's because reloading was originally a mod

dark wedge
#

ahhh. i got this game with b41 so am still a noob i guess

bronze yoke
#

i wasn't around for that either, don't worry

zinc pilot
#

do you guys have any clue if we can implement custom opacity masks in the game?

#

instead of the base 15 implemenented

bronze yoke
#

i've heard of it being done before

zinc pilot
#

I really don't remember this happening before, but bags are getting chewed out if I've got something set with m_masks 3 and 4

#

i checked a bag on the only cure beta og and it happens there too, can anyone else confirm?

cursive junco
#

Thinking of revisiting an old workshop mod I made, is there a way to make aspects of a workshop mod disable-able in the main menu?

cursive junco
#

yeah

bronze yoke
#

if it's a server/save setting using sandbox options, if you want it to be per-user use 'mod options' mod

cursive junco
#

because it is a client side mod I'd probably go with something similar to the latter

#

With mod options would I need to update my mod with each mod options build? I made my mod about a year ago and it still works so I'm hoping that adding mod options doesn't break it every build.

fast galleon
#

@sour island
CE need API for intercept of addTrait to change cost easier instead of making a new trait and overwrite?
*PZMC / PZ-CP?

fast galleon
golden sparrow
#

There's a bug in the code to build object on 2 tiles code only check for one of the two tiles so you can stack them or build them through walls

faint jewel
#

THE DEVIL BE IN THIS MODEL!

faint jewel
#

okay do EVEN IF I CHANGE THE MODEL to a working on it DOES NOT SHOW IT.

sour island
#

As for the issue, that's a good candidate I suppose

#

Would intercepting the method work?

fast galleon
#

It should, can also easily block traits from being added.

zinc pilot
#

i'm a dum dum

fast galleon
#

ok not easily because it needs to return a trait

pulsar heath
#

well, i like when ppl that use my mod take the time to report a bug and provide the logs to fix it

#

1st bug fixed... onlye around 223782476 to go ๐Ÿ˜„

#

so i've added car events. zombie spawning, temp traits, air events via EHE, items to add to players inventory, weather control ( storm, blizzard, normal rain, tropical rain )
Any suggestion to add next?

fast galleon
#

TP house?

pulsar heath
#

tp?

#

as in toilet paper?

#

or teleport? ๐Ÿ˜„

pulsar heath
sour island
#

Hmm

drifting ore
#

is it essentially supposed to be a toolbox so to speak? i see the debug and the intention to create standardized api's for specific usages. maybe PZMT pz modders toolbox

drifting ore
#

rhyming conventions tend to have a catchy tune to saying them and somehow instantly makes things more popular. i can't help but have a marketing mindset to everything

pulsar heath
#

this was a good day... pushed an app update for the mod with 1 bug fix, and a mod update with 2 bug fixes and finished the update for the twitch stats UI

drifting ore
#

nice man

pulsar heath
#

just need to test it a bit longer and ill push the update for the stats mod tomorrow

drifting ore
#

hell of an update to the original lol

pulsar heath
#

well, i've learned a lot here...

#

so a major update was needed on both mods

fast galleon
#
local TraitFactory = TraitFactory
TraitFactory.overwriteDef = TraitFactory.overwriteDef or {}

util.patchClassMetaMethod(TraitFactory.class,"addTrait",function(addTrait)
    local obsoleteTrait
    return function(traitID,name,cost,description,prof,removeInMP)
        local def = TraitFactory.overwriteDef[traitID]
        if def then
            if def.obsolete then
                obsoleteTrait = obsoleteTrait or Trait.new("","",0,"",false,false)
                return obsoleteTrait
            end
            cost = def.cost or cost
            --etc
        end
        return addTrait(traitID,name,cost,description,prof,removeInMP or false)
    end
end)

util.patchClassMetaMethod(TraitFactory.class,"addTrait",function(addTrait)
    local obsoleteTrait
    return function(...)
        local arg = {...}
        local def = TraitFactory.overwriteDef[arg[1]]
        if def then
            if def.obsolete then
                obsoleteTrait = obsoleteTrait or Trait.new("","",0,"",false,false)
                return obsoleteTrait
            end
            for i,v in ipairs({"name","cost","description","prof","removeInMP"}) do
                if def[v] then arg[i+1] = def[v] end
            end
        end
        return addTrait(table.unpack(arg)) --pz uses unpack(arg)
    end
end)

I might be overthinking this

drifting ore
#

util.patchClassMetaMethod(TraitFactory.class,"addTrait",function(addTrait) this is correct? only asking because i'm learning also ๐Ÿ™‚

#

such a smart idea though. haha my first deaf trait fix was an embarrassment

faint jewel
#

more carryables for more rp.

jaunty marten
#

@faint jewel patch for garbagetruck is working?

faint jewel
#

it appears so. no complaints yet!

jaunty marten
#

cool

faint jewel
#

you can take a look at the icecream truck if you want lol

#

wanna get all the small ones done before i throw you into the cess pit that is the trucking mod.

jaunty marten
faint jewel
#

well only one will freeze.

#

if yiou have one icecream truck the freezer MOSTLY works.

#

if you have more than one it's a crap shoot.

jaunty marten
faint jewel
#

pretty much?

#

it's super weird.

#

i tried to fix it but people lost their shit.

#

because i updated it.

odd notch
# faint jewel because i updated it.

i just delete those comments. thereโ€™s always someone thatโ€™s going to send you a virtual death threat for fixing bugs in your mod/adding new features

drifting ore
#

right, imagine someone being entitled enough to believe that your mod was made for their entertainment specifically. as much as most are for fun for all. it's crazy to see some comments lol

jaunty marten
#

@faint jewel yea, their really works by strange way

ancient grail
#

Ye there are skme that doesnt know anything abt the back end part of the game they think its all part of TIS or something they dont know most modders are seeking to do the mods for their own or as hobby

weak sierra
faint jewel
#

?

weak sierra
weak sierra
#

i love that mod so much

#

was so excited when i saw u post the first ss of a box being carried, heh

faint jewel
#

oh!

#

yeah the garbage truck is mp friendly and works now!

weak sierra
#

awesome, have held off on that cuz.. mp.. but that'll be fun

#

:D

#

ill test that out next time i roll mods out

faint jewel
#

I have a new carryable in the works. iut's been requested for our rp server because someone keep stealing them

tawdry solar
#

anyone know any websites to download music?

#

i want to make a music mod

weak sierra
#

@ancient grail grats on the chainsaw mod's popularity btw

ancient grail
#

I wasnt expecting that kind of question. I think you are the first dude to ask that here

#

Trying to fix it

#

Theres a bug on the last version parched it but now it has different bug
I have the fix for that ready to upload but theres still another one i can seem to fix

faint jewel
weak sierra
jaunty marten
bronze yoke
#

LOL

jaunty marten
faint jewel
#

WHO STEALS TOILETS?

jaunty marten
#

please no.. how to poop now stressed stressed stressed

real sierra
#

Is it possible for a mod running on an MP server to contact other processes running on the same server, please? Like write a file or open a TCP connection or a unix socket or anything?
At the moment I'm kind of assuming the answer is probably no and my best bet would be to print() something to the server console and then have a separate process scrape the output of the server console.

bronze yoke
#

you can write files

real sierra
#

I can write files!?

bronze yoke
#

to the Zomboid/Lua folder and the mod's folder

real sierra
#

No way! I was expecting the sandbox would totally disallow that.

#

I assume there's a specific API for that?

bronze yoke
#

getFileWriter(String filename, boolean createIfNull, boolean append) for the Lua folder and getModFileWriter(String modId, String filename, boolean createIfNull, boolean append) for the mod folder

real sierra
#

Thank you very much!

#

Also second question, is there an API for writing stuff down that will be tracked in the current save game? I want to persist some counters and stuff.

weak sierra
#

lol

faint jewel
#

players

weak sierra
#

that's hilarious

faint jewel
#

they stole one guys THREE TIMES

weak sierra
#

no safehouse protection?

#

xD

#

haha

jaunty marten
faint jewel
#

he tried to find out who did it but HE HAS NOTHING TO GO ON

weak sierra
#

xD

#

i love it

bronze yoke
ancient grail
faint jewel
#

that's who i made it for lol.

weak sierra
#

install a tile protector mod

#

literally just protect toilets

#

profit

#

u have me curious about this server, more than i already was - i run one so i won't be able to play on another server regularly but i'd love to come see what ur doing if that's ok

#

xD

faint jewel
#

it's the sims lol.

weak sierra
#

yeah i get the concept, i'd like to see it in action tho

#

i run an RP server i can handle it ๐Ÿ˜Ž

#

lol

ancient grail
#

Zedless

bronze yoke
#

we do have tile protection, so i don't know what's going on there, but i'm pretty happy that the toilet thieves are thriving regardless

weak sierra
#

i remember the guy who was starting it coming in here with enormous plans trying to hire modders iirc

#

if that's the same one

bronze yoke
#

probably, he did that a few times even in my time

ancient grail
#

Hahahaa

#

Albiond still serious face on .. the tile protect thing i mean the author never took accoubt of toilet as it doesnt seem oike anyone will do stuff to it

faint jewel
#

oh FFS it will not place this toilet right.

ancient grail
#

Ss

weak sierra
#

Toilket (n,): An anti-theft device for porcelain toilets, inspired by the bear trap.

ancient grail
#

Lol.

#

Who ever stealing those toilet seats knows how to HARDCORE RP

#

How come the sheriffs couldnt catch him i wonder

faint jewel
#

they have nothing to GO ON

weak sierra
#

a really good RPer would leave some kind of way for them to RP about it after the other failing to engage with the topic

#

but

#

in lieu of evidence they should post in some kind of public space, get people buzzing about the toilet thief

#

have a stake-out

#

etc

#

keep the RP alive

#

haha

ancient grail
#

Omg ๐Ÿ˜ฑ we are in different realms . I only know pvp stuff despite the game not being pvp worthy we still try to make it so

#

Im making a closequartercombat mod
And thats anothing i forgot to test.. damn.. i forgot to upload the atm2 update too .. i need to sleep whatver

rustic grove
#

what goes into ISScrollingListBox:addItem? It says (name, item) and name clearly adds some text to a scrollistbox line, but what is item? A separate panel? Game item? I'm confused lol

faint jewel
#

check the githuib for "SimpleUI API"

rustic grove
#

I'm specifically avoiding a 3rd party library like this in favor of learning the vanilla components if possible, so does anyone happen to know what the item in ISScrollingListBox:addItem(name, item) refers to? Thanks ^_^

bronze yoke
#

i think it just keeps track of whatever the entry is supposed to represent?

#

so that it has something to call back to when you click on it or something

rustic grove
#

ahh, ok I'll check along those lines then, thank you ๐Ÿ™‚

real sierra
#

Oh I have the dumbest question. When I'm testing a mod locally, where does print() output go, please?

#

I'm uh used to working on Linux where there's always a tty, there's no obvious tty hanging around when I launch the game from Steam, and "ProjectZomboid64.exe" always seems to detach itself from the terminal window as soon as I run it.

tawdry solar
bronze yoke
tawdry solar
#

im dumb

bronze yoke
#

it also goes into console.txt, or coop-console.txt for the serverside in multiplayer testing

odd notch
real sierra
#

I see that in LuaManager.GlobalObject.

odd notch
#

writeLog(โ€œfooโ€,โ€hello worldโ€) will make a file in your serverโ€™s log folder called foo if one isnโ€™t there already

#

and put hello world on a new line

#

err

#

writelog might be the client sided one

#

iโ€™m too tired rn let me check

#

hereโ€™s when i learned about it

#

writelog is client side, server side is a diff thing

real sierra
#

It seems like you have to do things differently for MP and SP mods? I'm wanting to iterate a list of all the players in the game and I'm seeing that getConnectedPlayers() returns [] and getOnlinePlayers() returns nil when I'm in SP

#

I would have kinda hoped for both of them to return a list with a single element, being the SP player

#

should I be calling something to detect if the game is singleplayer or multiplayer?

bronze yoke
#

you can test that with not (isClient() or isServer())

real sierra
#

should isClient() should always be false in a media/lua/server/Foo.lua file?

bronze yoke
#

no, server folder still runs on clients

real sierra
#

oh. ty

jaunty marten
real sierra
#

Handy, ta.

drifting stump
#

again its just a name

#

it stores that var in a table

weak sierra
#

just fysa

real sierra
#

I only need it on the server, not the client

#

that's a useful heads up, ta

vague raven
#

Is there a list of all props that can be used in recipes anywhere?

odd notch
#

evelyn is best girl

vague raven
#
    {
       Headphones,
       keep [Recipe.GetItemTypes.Screwdriver],

       Result:ElectronicsScrap,
       Time:30.0,
       OnTest:Recipe.OnTest.DismantleElectronics,
       OnGiveXP:Recipe.OnGiveXP.DismantleElectronics,
       Category:Electrical,
       AnimNode:Disassemble,
       Prop1:Screwdriver,
       Prop2:CDplayer,
    }```
#

Prop 1 and Prop 2

drifting ore
#

just items

humble oriole
#

Is it possible to have a drainable item spawn with 0 delta?

vague raven
#

Any items?

drifting ore
#

sure why not lol for the most part

jaunty marten
# vague raven Prop 1 and Prop 2
vague raven
#

thanks bossman

bronze yoke
#

any model afaik

ancient grail
#

Ow prop you can input anything that has staticmodel

drifting ore
#

yea tagging i think is pretty important to get used to also

bronze yoke
#

of course if it's not set up to be held it won't work well

drifting ore
#

makes using them way easier in the long term

jaunty marten
ancient grail
#

U can can also indicate source=1

#

Which is the first line you added

vague raven
#

Can you require someone to have a Welding Mask on or at least show it on their face?

bronze yoke
#

keep [Recipe.GetItemTypes.WeldingMask],

ancient grail
#

Or source 2 for second line forsnt really matter what.. if u use the tag the. Thats even more possible items to show up

vague raven
#

Yeah but in that case they can just have it in their inventory, I would like it to be displayed on their face.

ancient grail
#

See without example or proper context we would never have known that prop is from the recipe . Cuz i was thinking like moveables

bronze yoke
#

you can check if they're wearing it with OnTest, don't remember if there's one you could use to force them to wear it

jaunty marten
#

as Ik only for object disassembly (exactly not crafting) we can force player to equip mask

ancient grail
#

I wasnt able to remove the drink submenu context entries that i needed yesterday.. cuz when i jist rrmoved the drink context it removed all of em including from non alcoholic items ๐Ÿ˜ฆ

vague raven
#

Damn.

#

Oh well that's ok.

ancient grail
#

Ye thats not the whole case. And i checked for that

jaunty marten
#

what's the problem with isAlcoholic?

#

alcohol is alcohol drunk drunk drunk

humble oriole
#

You like moonshine? Have a mod to distill it coming soon

vague raven
#

That sounds interesting.

jaunty marten
humble oriole
jaunty marten
#

amazing

humble oriole
#

still messing with model sizes

sour island
#

Include prison wine

humble oriole
#

๐Ÿšฝ

sour island
#

๐Ÿฅฃ yes pls

jaunty marten
#

can we put it literally on the stove to get max performance in production and the chance that our house will burn to the ground? ded

humble oriole
#

hahah, no, I just made it electricity based. First mod so I didn't want to dive too hard into swapping sprites and doing it with a propane burner

jaunty marten
#

he-he

humble oriole
#

our biogas digester to make "propane" does have a modifier based on temperature

jaunty marten
humble oriole
jaunty marten
#

cool models

humble oriole
#

yea, @versed viper does excellent work.

jaunty marten
#

@versed viper ๐Ÿ‘ spiffo

humble oriole
#

We're going to have some guys test the ever living shit out of it and we're tweaking distributions before releasing it. Probably be out in a week or two

jaunty marten
#

cool

drifting ore
#

i had a hard time with figuring out distributions. surprisingly .0000001 * .00000001 is where i ended up on the low end with that *500 as the high end. i still don't feel like i get it fully lol

#

using a variable but still its crazy. i sat with lootzed for 3 hours

#

testing...

humble oriole
#

yea, I just tweak numbers until it looks right in vanilla lol

drifting ore
#

i made it changeable by server own via sandboxvar so it can be silly rare or like 65% chance at max

#

on low end is like .00005

#

cant even use bookstore... it will spawn every time

opal rivet
weak sierra
#

that's what i figured out

drifting ore
#

that makes sense really lol

weak sierra
#

like i can't make ammo cans rare enough for myself

#

it's not doable

#

one way to get around it is to make a mystery box item

#

instead of a bunch of types of X

drifting ore
#

seemed like i just had to take away some room defs and change to others

#

oooo

sour island
#

You could tap into onFill and just nuke it there

weak sierra
#

but fills of containers can stack on top of each other

#

so u could delete stuff that existed successfully last time

#

lol

sour island
#

You can set a flag on the item

weak sierra
#

good point

#

yeah

#

that'd work

sour island
#

For context menus? You add a sub menu header and add options to it

jaunty marten
ancient grail
#

ye of the drink

bronze yoke
#

didn't we talk about this yesterday

ancient grail
#

im back to square 1

bronze yoke
#

the suboptions are stored in a table (submenu option).options

rancid tendon
#

it's incredible how insane steam commenters are

bronze yoke
#

isn't your music mod like

#

*the* most original music mod LOL

rancid tendon
#

his complaint was that it contained too many tracks like other mods because it had all the 'pop rock' and etc that you see in every other pack

#

but like. bro. there's 1000 songs in there. there's fucking bauhaus and godspeed you black emperor. what the fuck are you talking about

vast nacelle
#

Some people are just needlessly picky.
Currently doing a "scenario" where my group is trying to gather all books and such to archive the pre-apocalypse.
Wanted to use Named Literature but one of them adamantly refused to use it since "there are real books he would recognize".
Would only accept the mod if it used fictionalized names.
... All 5000 of them...

rancid tendon
#

........... huh??

#

but...

ancient grail
#

lol

rancid tendon
#

project zomboid has plenty of references to real life culture...

ancient grail
#

have em put everything on a list

#

randomize the names of books that spawns

rancid tendon
#

i guess everything is fictionalized in pz, it's never so direct, but

#

that's just so picky lol

bronze yoke
#

my immersion immediately vaporising upon finding a copy of moby dick

rancid tendon
#

zombies could never have come about in a world where moby dick was written .

cosmic condor
#

"Kentucky isn't real"

humble oriole
weak sierra
#

im talking about my own ammo crafting mod

#

i kept turning down the spawns by 100x and they kept being too common

#

after a certain point i think it was just rounding up

humble oriole
#

ah, got ya

weak sierra
#

for a while we just disabled them spawning entirely

#

ammo already spawns loose

#

these were supposed to be super rare caches of lots of an ammo

#

for flavor/luck

humble oriole
#

we have it nerfed into the ground and it's def still too much

weak sierra
#

i think what im gonna do is make a mystery box type thing, since that's easy

rancid tendon
#

isn't there something about values in lua basically ignoring everything after 0.000

weak sierra
#

but if i ever need a more wide-ranging solution chuck's seems good

humble oriole
weak sierra
#

i mean i can write a random ammo can giving recipe

#

lol

#

thanks tho

bronze yoke
#

swapping the dummy item onfill might be prettier

#

players will never know

weak sierra
#

but they'll get the dopamine hit from opening every ammo box

#

and it'll make ammo looting slower and more deliberate

#

that might actually be good

#

xD

#

ill think about it.

#

i took a screen of what chuck said cuz i do like that approach

#

anyway im off to bed

#

gn

vast nacelle
#

Sealed Mystery Box
Please pay Udderly 1 UdderlyBuck to get a key to open

humble oriole
#

yea, we sell loot boxes like that on our in game store

#

Random guns/ammo and an armor set.

#

people love em, we also use the code to do like random book boxes, we did a Halloween and Christmas box.

sour island
#

I considered pushing the titles through a thesaurus lol

humble oriole
#

Can I use onFill to set the delta of an item to 0 when it spawns in?

pulsar heath
#

uff done... second mod tested and updated

sour island
#

onFill is ran every time a container is viewed iirc

bronze yoke
#

only when it's filled

#

so first load + loot respawn and stuff

humble oriole
#

I'm just looking for a way to set those industrial propane tanks to 0 when they're distributed or even a random number that's not just 100%

sour island
#

I feel like it runs everytime the container is viewed - I'd have to check

bronze yoke
#

it's possible - i was pretty sure it was how i said but my code wouldn't actually care if it is that way or not so i could have missed it

jaunty marten
cosmic condor
#

What is the point to use that mod if they don't want the book they know irl

ancient grail
#

i cant seem to make it work im still stuck here

#
local function BelieverContext(player, context, items)
        local playerObj = getSpecificPlayer(player);         
        if not playerObj:HasTrait("Believer") then  return end
        items = ISInventoryPane.getActualItems(items)
        for _, item in ipairs(items) do 
                local drinkOption = context:getOptionFromName(getText("ContextMenu_Drink"));
                if drinkOption then            
                        if item:getCustomMenuOption() == getText("ContextMenu_Drink") and item:isAlcoholic() then                        
                        local toolTip = drinkOption.toolTip or ISInventoryPaneContextMenu.addToolTip();
                        toolTip.description = getText("I shall not Commit Sin");
                        drinkOption.toolTip = toolTip;
                        drinkOption.notAvailable = true       
                        --ISContextMenu:removeOptionByName()
                        break
                        end
                end
        end
end   

        
Events.OnFillInventoryObjectContextMenu.Remove(BelieverContext);
Events.OnFillInventoryObjectContextMenu.Add(BelieverContext);
flint beacon
#

Is it possible to change the sprite of and existing one, when crafting a recipe? [Say i had a workbench, i wanted to upgrade it to a workbench lvl2 with a different tile that has some noticable changes like tools on the workbench now]

ancient grail
dark wedge
ancient grail
#

you also to need to add a checker if you are near the tile by adding an oncreate

dark wedge
#

optional things are not immersive. 0/10. unsubscribed.

#

huzzah. forward progress. first pass on cleaning up the animation, but still needs more "oomph". fixed the hit detection, your offhand takes durability damage, and the attack animation now dictates how long the attack action is so its all based on the calculated offhand attack speed.

ancient grail
#

faster shove lol

#

accidentaly made this

small topaz
ancient grail
#

you just need 1 item which already exists in game
You can just item:setDisplayName()

Idk what event
But if i would do it ill probably use
DoParam that runs every minuite so that it sorta randomize loots too an expensive method but it will get the job done no sweat

nimble spoke
#

Use OnFillContainer

agile vigil
#

Oh hell yeah, I can just programmatically update recipes instead of having to create patches for things that don't use the "GetRecipeTypes" style of ingredients.

ancient grail
nimble spoke
#

I didnt have any issues using it for changing weapon conditions

willow estuary
ancient grail
#

ahh ok then thnx for the clarification

#

this is a pretty useful lesson .. ive always thought its supposed to be that way but there was a time that the i saw the menu with nothing written and it was blinking thought its cuz of that i mean thought is cyz running it on tick

ancient grail
thick karma
#

Since you're coming back to that ping, anyway, Blair, quick question: have y'all ever considered letting modders flag mod updates as "soft" in the sense that it's okay if two clients are running different versions? Is that feasible?

willow estuary
#

That sounds like something that could cause disasters.

thick karma
#

I mean if something were misflagged perhaps

#

But there are already a lot of misuses that cause disasters in Zomboid... what's one more!? ๐Ÿคช

willow estuary
#

Still sounds like something that people could mistakenly ruin saves with.

thick karma
#

But if code is entirely clientside... it should be safe in theory, right?

#

Fair enough

#

Understandable resistance

willow estuary
vast nacelle
thick karma
#

Reason I ask is because I see a ton of people with 400-500 mod servers complain about the need to reset frequently on updates

#

Often those updates don't strictly require other clients to have the same code

willow estuary
#

They dug their own hole.

thick karma
#

Haha fair

#

I was thinking it would solve a lot of headache in an easy way, but, yeah, it would provide one more way for people to bork their own stuff.

#

Or the stuff of others.

thick karma
vast nacelle
#

Ah, good

vast nacelle
willow estuary
#

Servers choose to use lots of mods that uodate frequently in a fashion that is inconvenient to said servers operations.

#

Servers that run 400-500 mods are always going to have problems with mods.

#

Playing whack a mole with the corner case inconveniences is just Duct taping the symptoms, not actually addressing the disease.

cosmic condor
#

some servers solve this problem by creating a modpack, which creates another problem

hot patrol
#

Plus there are already mods that exist to make server resetting for updates pretty hands free. As someone who has played plenty of modded DayZ restarts come with the territory. If anything I think with MP being more of an element in The game modders should try to better set update schedules.

#

Unlisted mod packs are also a good idea. I know some modders don't like their stuff being repacked but I imagine so long as it is unlisted there is no need for concern.

cosmic condor
#

funny how it's making modders afraid to update their mods

#

update schedule is good idea

tardy wren
#

It would require like... The workshop to have a schedule instead, since you can't really coordinate modders from around the world to update at the same hour

cosmic condor
#

"Workshop Wednesday"

tardy wren
#

I imagined it being once a day or once every eight hours lmao

#

Anyway... Has anyone here worked with Moodle Framework?

cosmic condor
#

it's an utopia lol

tardy wren
#

I need to make my moodle-dependant mod compatible with those

fast galleon
#

no steam, no cry servers

#

Friday Updates, following Thursdoid

#

||FU or f...ups for short||
nsfw

ancient grail
#

slr

#

burryaga and albion helped me

#
local function BelieverContext(player, context, items)
        local playerObj = getSpecificPlayer(player);         
        if not playerObj:HasTrait("Believer") then  return end
        items = ISInventoryPane.getActualItems(items)
        for _, item in ipairs(items) do 
                local drinkOption = context:getOptionFromName(getText("ContextMenu_Drink")) 
                if drinkOption and item:isAlcoholic()  then   
                        local toolTip = drinkOption.toolTip or ISInventoryPaneContextMenu.addToolTip()
                        toolTip.description = getText("Believer: I shall not Commit Sin");                
                        local drinkOption = context:insertOptionAfter("Drink", "Drink")
                        drinkOption.toolTip = toolTip;                 
                        drinkOption.notAvailable = true
                        context:removeOptionByName(getText("ContextMenu_Drink"))                       
                end
        end
end   

Events.OnFillInventoryObjectContextMenu.Add(BelieverContext);

#
local function BelieverContext2(player, context, items)
        local playerObj = getSpecificPlayer(player);         
        if not playerObj:HasTrait("Believer") then  return end
        items = ISInventoryPane.getActualItems(items)
                for _, item in ipairs(items) do
                    local smokeOption = context:getOptionFromName(getText("ContextMenu_Smoke"));            
                       if smokeOption then
                        if item:getEatType() == 'Cigarettes'  or item:getFullType() == 'Base.Cigarettes' or item:getOnEat() == 'OnEat_Cigarettes' then    
                                local toolTip = smokeOption.toolTip or ISInventoryPaneContextMenu.addToolTip();
                                toolTip.description = getText("Believer:  I shall not Commit Sin");
                                smokeOption.toolTip = toolTip;
                                smokeOption.notAvailable = true
                                end
                        end                        
                end       
end   
Events.OnFillInventoryObjectContextMenu.Add(BelieverContext2);
#

incase anyone needs similar function

acoustic dust
#

why does pz hate items that are either real heavy or containers that have a bit more capacity than they should?

drifting ore
#

so i succesfully was able to remove vanilla magazines from the game distribution but now theres one thing im stuck on with doing it for other mods. I think i have to add a require for something but i dont know what exactly. ```require "Items/ItemPicker"
require 'Items/Distributions'
require 'Items/ProceduralDistributions'
require 'Items/SuburbsDistributions'
require 'Vehicles/VehicleDistributions'

---Base Game

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

#

so like for example require "Greenfire"

#

just the module?

fast galleon
drifting ore
#

oh ok

#

thanks

#

just to be sure. require "Server/GreenfireDistributions.lua"

#

oh after