#mod_development
1 messages ยท Page 95 of 1
yeah that's kinda 
Its a game
Lol
oh for sure. nothing big, but it just made me scratch my head
U still cant hear the world tho
you can hear some weather still

its all good and whatnot but overall it's not consistent. im going to look into it
Damn i know what to do!
Can you just mute his volume onTick
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
What random context
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
So your character gets smarter? Something like that?
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
Or am i just geting dumber
Ahhh the readorNot code
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))
}
best approach would be to add one option that gets its text from a variable
i did see it add all three
U know how to disable contextmenu? From. vanilla?
i thought it was the way i was using pairs
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
ooo yea i knew i was being stupid about my approach. i also am trying to become more familiar with coding so just kinda winging it when i test stuff. not the best way to learn but it's been fun lol. thank you yet again, already got your workshop link ready to go when i push next upload
thank you also for the insight
i don't know if making a submenu notAvailable works
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
I saw a remove last option or something
It fan delete everything but i dont want that
ahh
I tried spamming it like 7x it almost removed all the context options
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
You don't need all the options to delete a context menu option, you just need to know what it's called. @ancient grail
we're trying to delete all options from a sub context menu
Yep
just loop through the options table?
Is there an array? Ill check docs
for k,v in pairs(drinkOption.options) do
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?
i was thinking making them unavailable would be better
I see
i pointed out deleting the context menu as an alternative
Sorry, I'm wasting time lol I'll go read
a for i loop would be better, unsure if deleting options can create holes though
no mods should really mess with that menu ever but in theory it could cause a compatibility issue
this would be immune to that
ISContextMenu is a lua object
GetChildren
it's not on javadocs
If you want the function it's ISContextMenu:removeOptionByName(optName)
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
Cuz before it says i shall not commit sin
Cuz the trait is believer
And he cant drink alcohol or smoke stuff
One second
I have code for finding and replacing existing entries
World context entries but still
Same base functions
it's all iscontextmenu
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
you should use getText() or it won't work in other languages
if menu:getOptionFromName("Drink") then
menu:insertOptionAfter("Drink", "Dump", player, function() Glytch3r.dumpOutAlcoholBecauseIAmLame() end)
menu:removeOptionByName("Drink")
end
@ancient grail
I was about to point this out. My example uses raw text because I am doing an English-language spelling correction
You will want yours to be based on getText("UI_whatever_the_drink_translation_variable_is")
the context menus are so inconsistent with that
no matter what i make my mod use it feels wrong LOL
Meditation "brings balance" to these basic spelling inconsistencies lol
Because I hate them
I need to fix more
But I fix a couple already
"fix"
"subjectively improve"
"by accommodating my own OCD"
This is also what cosmic told.me
Im not going to name a function like that despite the temptation
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
Idea being a nondrinker could pour out the drink instead Idk
Wait maybe that option already exists
idr
I thought of that too. Or maybe chance that it will do it
that option already exists
All I can hear are groaning zumbebs.
its done thnx guys!
interesting
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?
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.
it doesn't
Alright, gotta use the event then. Thanks!
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???
\
Like the sandbox option?
yeah, but like scripting it in where server owners don't have to do this part
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)
this is probably a problem. only one texture can be used afaik
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??!???/
yes
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
C:\Users\%USERNAME%\Zomboid\Workshop
thanks!
Anyone know how to access the vanilla game sandbox variables via code or where to find these variable names?
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/
Hi all, I have the below for my server with the explanations I know, Please can someone fill in the blanks?; SandboxVars = { Zombies = 4, (1 is insane amount, 5 is none) Distribution = 1, (1 is urban, 2 is uniform) DayLength = 3, (1 is 15 minutes, 2 is 30 minutes, 3 is 1 hour, 4 is 2 hours, 5 is ...
Can you have a drainable spawn with no contents via the distribution system?
Question
any tutorials on vehicle mod creation? i'd like to make a custom bike mod (the SDS Fenrir from FFXIV)
not sure exactly what you are looking for but this should get you going https://theindiestone.com/forums/index.php?/topic/24408-how-to-create-new-vehicle-mods/
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?
I was wondering, is it possible to skip "Click to Start" when you join a server?
u can use link sent by Nippytime and these ones
https://theindiestone.com/forums/index.php?/topic/28633-complete-vehicle-modding-tutorial/
https://theindiestone.com/forums/index.php?/topic/24278-how-to-edit-vehicle-skins/
Hello and welcome to my tutorial. It covers full workflow of vehicle creation for PZ. If you are a complete beginner in 3D modelling, you'll have to watch/read additional tutorials, I won't cover every aspect of model creation and 'where this button is located'. I divide vehicle creation in these...
- First create a folder structure for your mod, call the first folder something like "MyCarReskinMod". Inside that create a "media" folder, inside your media folder create 2 more folders, one called "textures" and one called "scripts". Inside the texture folder create a folder called "Vehicles" ...
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.
That is a pretty neat idea.
anyone knows if this will work
better paste as texts
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)
owell the code isnt working
You set too much in string)
Only in setVariable need write like "2"
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>
u guys all sound smart to me ๐
Is this your first mod if ever?
He also had a mismatch in module names.
I showed him in DM
CloseQuarterCombat ~= CombatAnimation (he fixed it above I believe)
Here you can see he's trying to call Commands.CloseQuarterCombat.AnimCombat but the function's name is Commands.CombatAnimations.AnimCombat. @cosmic condor
i may have found the culprit
sendClientCommand('CloseQuarterCombat', 'AnimCombat', {ModeCQC = true } , {CombatStance = stanceRoll})
sendClientCommand('CloseQuarterCombat', 'AnimCombat', {ModeCQC = true, CombatStance = stanceRoll})
Is there a way to make it so when someone presses a button, it puts an item into a compatible empty hotbar slot?
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```
i have a holster mod that adds magazine slots, and would like to make it so when a someone reloads it puts the empty magazine in the holster after they reload
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?
guten tag, is there's any tools to open up pz model format?
blender?
hello everyone now its my turn
i need help with overwritting a sound file
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?
that's what she said HAAA so funny
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 
You heard her say that to her friend? Bummer
Yeh thats doable
awesome, next question: got any pointer on how? ๐
I kinda did that just now, have two versions together.
First time modding?
Others have done a separate Beta Beta Beta mod
and others use users for beta testing
cool, think i'll try that too
i havent done a lot with lua before, yeah
gib link so i can glance at the mod
I expect a number of people to enable both mods together and report errors 

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
Ugh tfw when you move a chunk of code to a different file and for no apparent reason it stops working.
oh hey i know that one
Whats your goal
I dont know where but i know there is some stuff for translation related things
much appreciated, I'll check the links out and see where i end up ๐
do you do any additional shenanigans? or literally nothing else but having 2 mods?
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.)
overwritte explosion sounds
because for now i am doing it but it cuts off
Sanity check ๐ค
and bassicly is janky
Use ogg
it is ogg
no this is literally double mod
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.
I'm just thinking how to version it now 
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

do it like this 3.1.1-beta
I use GitHub to switch branches
The beta branch has an uncommitted workshop.txt that's different ID/name
Published to a unlisted mod
Increasingly confused... ๐ญ
What is reality
I thought you just pushed stuff to users to test.
Only for minor stuff that I 'test' when writing it
Using a beta for the EHE update
Trying out new approaches overall
and who's testing that for you?
I put it up as an issue on the GitHub using the 'need testing' tag
๐ Easter egg for GitHub users
I doubt anyone from players checks my github so i don't think that'd work
My steam page links to my GitHub 6 times and has no comments/discussion on steam
Only got 1 reply so far tho

@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?
I'm familiar with the idea of this and I'm using pretty much similar approach
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
I always wonder how to submit properly, but I'm too tired to open gimp.
whats EHE btw
expanded helicopter events
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
Reminds of a post I was reading in past, a mod to improve performance but it errored and thus disabled all mods.

well it did what it was meant to... mods off = better performance ๐
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?
Omg it's baffling.
same folder?
lua goblins?
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
Doesnt game load luas alphabetically?
I believe so
folder -> alphabetically
I do not think this is a load order issue
oh then idk
ofc bananas are fine, potassium and shit, good stuff
Quick => Not fine
(sorry Bananas actually not fine that was bad memory)
Quack is fine though
Quick is not fine
Aw shit bananas are not fine
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
check that mod is enabled, files loaded, test print, etc?
f11 and print still work
Heheh.. load order is a hell of a problem when dealing with scaled solutions.
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?
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
I had to get rid of load order restrictions for PipeWrench entirely.
I just thought maybe some of those test files were in Trash Talker mod.
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.
reading big code blocks from mobile is hard
@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.
is there any chance QuickerListNavigation.lua is being overwritten by other mod lua?
well then fuck knows
I'm scrolling up and down with triggers... that's a QLN feature...
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 
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```
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.
both enabled
@dull moss

C it is!

What is the id of the mod checking for EvolvingTraitsWorldBeta?
@dull moss instead of throwing error make it return
EvolvingTraitsWorld
EvolvingTraitsWorld would load first
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"
And if it's not nil there's an issue
WAIT
I know
im r-word
Nonon, my beta overwrites everythting
facepalm
Aha
yeah presumably
unless they go and change load order
but who the fuck does that 
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
I think you can actually just call an error if I'm not wrong
๐
is there an event For pre game start or similar ?
trying to setup a sandbox option without using the ongameboot event


btw guess how did I know about it
answer:
can group:getOrCreateLocation be run when the game is running?
or is it only during init?
try Davinci model, and train it with a fine-tuned model on PZ 


@zinc pilot I'm guessing you need to getAttachedLocationGroup() on your player object and then getOrCreateLocation on the object returned by that
I would still add a print inside create as I said before
print("replacing ui",self==instance)
getPlayer():getAttachedLocationGroup():getOrCreateLocation(locationId)
@zinc pilot https://projectzomboid.com/modding/zombie/characters/AttachedItems/AttachedLocationGroup.html
declaration: package: zombie.characters.AttachedItems, class: AttachedLocationGroup
declaration: package: zombie.characters, class: IsoGameCharacter
I'll try that, thanks
also @sour island, is ECC alright to use for mods other than yours?
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)
man i am aboot to get mad.
classic modding experience
Crazy ChatGPT, wondering where this journey will end in some decades
doesn't seem like it works in game, I guess it can be done only during loading
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
A big ol' stinky "Tried to call nil"
I haven't done anything with those functions so I am not sure on the details
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
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```

Nothing compared to TF2 changelogs
"fixed a server crash caused by sniper trying to eat his gun"
new question, when are shared lua files loaded?
Yes, it should be fine to use it. I forget why I initially didn't want to use modOptions - but it works off a similar idea.
Also, settings in MP are set to hosts/admin. Will be working on a refactoring to make it easier to use/ allow for settings to be toggled for SP/MP/admin-only etc
Yeah that's why I didn't wanna mess with mod options too much, doesn't seem too mp friendly
perfect then, thank you
mod options is for client side configs
for server side settings use sandbox options
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
is there some way to see models origins ingame?
I cobbled together ECC when I didn't really know much - so it needs some lovin'
my static model is just INVISIBLE and it will not show up
Looks neat, what's a spec?
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
reminds me of WPF
in sp?
but declaratively
finally im done with the ui for the mod update...
survival time and zed kill meters? that's nice
yup, the old one used a window
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
yeah
I use that space for Health Panel so you better make it draggable

it is
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
thats a good idea
cuz now it'd look weird
but... i hate ui so much... ill get right into it ๐
so i have to detect... damn
so in theory, get the screen size, if the ui position
hmmm
just make it right clickable and boolean toggle there
allignedOnRight
if true text is on right side of icons
if false on left

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
yea idk a thing about UI
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?!
sounds reasonable
sounds to simple... i have a feeling im gonna rage in a bit ๐
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
just make a panel
then overwrite the render function
no need for child elements
that sounds like a good idea, but no clue of how to do that
i know next to nothing about ui in pz
local StatsPanel = ISPanel:derive("StatsPanel")
function StatsPanel:render()
self:drawTexture() --etc look at the available functions in ISUIElement
if self.leftMode then
self:drawTextRight() --etc
else
self:drawText() --etc
end
end
my previous attempt was around something like that, didnt go very well
ill give it a go again based on your info, thanks
THIS IS GONNA DRIVE ME NUTS
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
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
I mean that's the case with almost everything
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
Go dig in code of mods that add guns 
lol! this stupid static model WILL NOT SHOW UP. and i have no idea why.
i only do super models.
Lmao
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?
PZ my beloved

I need that emote right now
Yea dude I feel bad you been workin on getting that down. I hope it pans out lol
you can love something and still want to punt it into traffic, I have 5 kids, trust me i know.
Lmao does it show the discord? I just use that server for the emojis
Hahaha I feel you there
i finally finished
Crowbar could have more support for rendering 3D stuffs. :D
@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. ๐
Have you tested this?
{
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?
Ye it throws error, why?
i mean ive done this a bunch of times. and now i can't get the dumb ass model to work.
that would be lovely man
oh btw, since you've likely got a lot more experience with me especially with animations, how hard would it be to translate animations made for the right hand onto the left one?
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)
You will need to use something like FragMotion to mirror the animation to play on the other side. Will likely require some cleanup too, as its not perfect. I have not gotten the mirroring to work in blender, but it might be possible. You're looking to get the saw animation to use the left hand?
@drifting stump done... thanks for the tips ๐
not really that, mostly making the secondary hand as useful as the principal one
with TOC basically when you lose your right hand, you're done, and that doesn't really make too much sense
ohhhh true. the game really wants you to be right-handed.
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.
dooooccuuummennnttattiioonnn
yaaayyy
Glad to see it.
Ha. I try on things I release for others.
But if its just for me, the only thing that is there are my crappy jokes and ramblings. 
You'll forget your code eventually. Nice to have it there.
finally... a usecase for hooks
I hook into the Attack hook now. But the way it is used still only does the primary hand. unless there is a whole side to Hooks I don't know yet. ha
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
Oh I am well aware. Ha. I was mostly being facetious, definitely have notes but not actual luadoc syntax and stuff.
LuaDocs.
Yeah.
yea, i meant that. ha
I document with my Typescript code.
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?
Attacking (even melee and stuff) is done from ISReloadWeaponAction.attackHook
kind of a weird spot, but ok i guess. has to be somewhere.
it's because reloading was originally a mod
ahhh. i got this game with b41 so am still a noob i guess
i wasn't around for that either, don't worry
do you guys have any clue if we can implement custom opacity masks in the game?
instead of the base 15 implemenented
i've heard of it being done before
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?
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?
like mod-options?
yeah
if it's a server/save setting using sandbox options, if you want it to be per-user use 'mod options' mod
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.
@sour island
CE need API for intercept of addTrait to change cost easier instead of making a new trait and overwrite?
*PZMC / PZ-CP?
I'm not sure I've ever seen it break from that. Only because of vanilla changes.
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
THE DEVIL BE IN THIS MODEL!

can't wait!!
okay do EVEN IF I CHANGE THE MODEL to a working on it DOES NOT SHOW IT.
I'm referring to the main mod as projects atm - still trying to figure out a better name to avoid "CP"
Project Zomboid Community Modding Projects - PZCMP seems too long
As for the issue, that's a good candidate I suppose
Would intercepting the method work?
It should, can also easily block traits from being added.
well found out what I was missing,
<m_MasksFolder>none</m_MasksFolder>
i'm a dum dum
ok not easily because it needs to return a trait
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?
TP house?
maybe just lose the P? PZCM? Project Zomboid Community Modding?
Hmm
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
the 4 letters feels good tho. drastically better than 5 lol just one letter
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
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
nice man
just need to test it a bit longer and ill push the update for the stats mod tomorrow
hell of an update to the original lol
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
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 patch for garbagetruck is working?
it appears so. no complaints yet!
cool
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.
what's problem there?
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.
more than one vehicle right? u will spawn second and in first vehicle freezer stop working
pretty much?
it's super weird.
i tried to fix it but people lost their shit.
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
Sounds like toxic
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
@faint jewel yea, their really works by strange way
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
you are wonderful
?
mp work now?
the new carryables
i love that mod so much
was so excited when i saw u post the first ss of a box being carried, heh
awesome, have held off on that cuz.. mp.. but that'll be fun
:D
ill test that out next time i roll mods out
I have a new carryable in the works. iut's been requested for our rp server because someone keep stealing them
makes me curious what it is lol
@ancient grail grats on the chainsaw mod's popularity btw
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
sigh
LOL
XDDDD
LOL
google.. lulxd
WHO STEALS TOILETS?
please no.. how to poop now

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.
you can write files
I can write files!?
to the Zomboid/Lua folder and the mod's folder
No way! I was expecting the sandbox would totally disallow that.
I assume there's a specific API for that?
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
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.
stealing them from other players, or just random houses?
lol
players
that's hilarious
they stole one guys THREE TIMES
u can't... remove ur mod NOW
he tried to find out who did it but HE HAS NOTHING TO GO ON
yeah, most objects have a getModData() method, and there's global moddata ModData.getOrCreate(string key) - both return regular lua tables that get saved to the file
Thank you so much. ๐
Inspired by what actually happened at krp? They say some really does wteals toilet 2 of his toilet got stolen
that's who i made it for lol.
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
it's the sims lol.
yeah i get the concept, i'd like to see it in action tho
i run an RP server i can handle it ๐
lol
Zedless
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
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
probably, he did that a few times even in my time
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
oh FFS it will not place this toilet right.
Ss
Toilket (n,): An anti-theft device for porcelain toilets, inspired by the bear trap.
Lol.
Who ever stealing those toilet seats knows how to HARDCORE RP
How come the sheriffs couldnt catch him i wonder
they have nothing to GO ON
yeah it's the opposite tbh
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
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
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
check the githuib for "SimpleUI API"
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 ^_^
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
ahh, ok I'll check along those lines then, thank you ๐
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.
thanks
run the game with the -debug launch parameter for an in-game console
it also goes into console.txt, or coop-console.txt for the serverside in multiplayer testing
beautiful, thank you
thereโs also the writelog function
I see that in LuaManager.GlobalObject.
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
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?
you can test that with not (isClient() or isServer())
should isClient() should always be false in a media/lua/server/Foo.lua file?
no, server folder still runs on clients
oh. ty
@real sierra will useful to u for other things in future
#mod_development message
Handy, ta.
its just a name because its original use was for uis with items
again its just a name
it stores that var in a table
getOnlinePlayers was hobbled recently for security concerns (i don't agree with the logic) so it only returns a complete list for admins now, and for regular users just those loaded in having been in their 150 tile reality bubble.
just fysa
Is there a list of all props that can be used in recipes anywhere?
evelyn is best girl
Give us example
{
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
just items
Is it possible to have a drainable item spawn with 0 delta?
Any items?
sure why not lol for the most part
https://theindiestone.com/forums/index.php?/topic/15188-item-and-recipe-script-variables-brief-description/
https://theindiestone.com/forums/index.php?/topic/53019-details-on-the-improved-modding-tag-system-in-4169/
Type = Normal,There are various types of items in Project Zomobid, below you will se each of them with a short description. Normal โ A basic item. Drainable โ An item that has a certain amount of uses before it's destroyed Food โ An item that can be consumed by the character Weapon โ An item that...
New Tag Info! - Several new Tags were added to the item scripts, and their functionality added to the lua code. - This allows for modders to add new items that seamlessly work with the game in several places, such as adding new fully-functional Sledgehammer items, or adding new Gasoline container...
thanks bossman
any model afaik
Ow prop you can input anything that has staticmodel
yea tagging i think is pretty important to get used to also
of course if it's not set up to be held it won't work well
makes using them way easier in the long term
Can you require someone to have a Welding Mask on or at least show it on their face?
keep [Recipe.GetItemTypes.WeldingMask],
Or source 2 for second line forsnt really matter what.. if u use the tag the. Thats even more possible items to show up
Yeah but in that case they can just have it in their inventory, I would like it to be displayed on their face.
See without example or proper context we would never have known that prop is from the recipe . Cuz i was thinking like moveables
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
as Ik only for object disassembly (exactly not crafting) we can force player to equip mask
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 ๐ฆ
Only with timeaction afaik
item:isAlcoholic()
Ye thats not the whole case. And i checked for that
You like moonshine? Have a mod to distill it coming soon
That sounds interesting.
agree with u 
amazing
still messing with model sizes
Include prison wine
๐ฝ
๐ฅฃ yes pls
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? 
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
our biogas digester to make "propane" does have a modifier based on temperature

cool models
yea, @versed viper does excellent work.
@versed viper ๐ 
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
cool
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...
yea, I just tweak numbers until it looks right in vanilla lol
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
Looks Epic
when it gets too small it stops mattering
that's what i figured out
that makes sense really lol
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
You could tap into onFill and just nuke it there
but fills of containers can stack on top of each other
so u could delete stuff that existed successfully last time
lol
You can set a flag on the item
how can i get the submenus
For context menus? You add a sub menu header and add options to it
get submenu of option?
ye of the drink
didn't we talk about this yesterday
the suboptions are stored in a table (submenu option).options
this is from a while ago but a couple days ago i had someone call me a slur in the comments of my music mod because it was 'unoriginal' and basically complained that it wasn't specifically made for him
it's incredible how insane steam commenters are
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
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...
lol
project zomboid has plenty of references to real life culture...
i guess everything is fictionalized in pz, it's never so direct, but
that's just so picky lol
my immersion immediately vaporising upon finding a copy of moby dick
zombies could never have come about in a world where moby dick was written .
"Kentucky isn't real"
we swapped ammo cans from spawning boxes of ammo to just x number of bullets in britas
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
ah, got ya
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
we have it nerfed into the ground and it's def still too much
i think what im gonna do is make a mystery box type thing, since that's easy
isn't there something about values in lua basically ignoring everything after 0.000
but if i ever need a more wide-ranging solution chuck's seems good
just use my loot box mod and make your own art
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
Sealed Mystery Box
Please pay Udderly 1 UdderlyBuck to get a key to open
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.
I've seen people like that they can see books they know - and try to find whole series
I considered pushing the titles through a thesaurus lol
Can I use onFill to set the delta of an item to 0 when it spawns in?
uff done... second mod tested and updated
Only if you also set a boolean in modData to not run your function again
onFill is ran every time a container is viewed iirc
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%
I feel like it runs everytime the container is viewed - I'd have to check
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
why? I already have a few in my basement ๐ค
What is the point to use that mod if they don't want the book they know irl
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);
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]
im asumming the workbench is a tile and not an item right
yeah a tile
Recipes have the OnCreate method, and you have access to the player making the recipe. You'll likely have to just re-get the tile with the object in that function so you can do things to it. I haven't played with making my own objects, but probably the best would be to destroy the current object and replace with the new object and its fancy new sprite in that function.
you can check my safecracker, functionalatm and beartrap mod.. they all have sprite changing functions
you also to need to add a checker if you are near the tile by adding an oncreate
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.
are there already mods giving all the books individual titles? (not only skill books)
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
Use OnFillContainer
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.
it will run on tick tho if its onfill.. unless maybe you add pauses
I didnt have any issues using it for changing weapon conditions
That is a very wrong misunderstanding.
It runs when a container is filled with loot or items, which is ordinarily when a container is first within approximately 150 tiles of the players.
I dunno why there's so much misinformation about that event in his channel.
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
i just tested it now yep youre right thnx again
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?
That sounds like something that could cause disasters.
I mean if something were misflagged perhaps
But there are already a lot of misuses that cause disasters in Zomboid... what's one more!? ๐คช
Still sounds like something that people could mistakenly ruin saves with.
But if code is entirely clientside... it should be safe in theory, right?
Fair enough
Understandable resistance
We want less of that stuff, not more.
Have you tried drinkOption.options = {} just before local toolTip = ....?
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
They dug their own hole.
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.
I think he's past the drink thing he was stuck on... I helped him in DM
Ah, good
Can we at least get the media/lua/shared/translate folder removed from the checksum calculation or whatever so updates/additions to translations don't require a server restart?
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.
some servers solve this problem by creating a modpack, which creates another problem
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.
funny how it's making modders afraid to update their mods
update schedule is good idea
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
"Workshop Wednesday"
I imagined it being once a day or once every eight hours lmao
Anyway... Has anyone here worked with Moodle Framework?
it's an utopia lol
I need to make my moodle-dependant mod compatible with those
no steam, no cry servers
Friday Updates, following Thursdoid
||FU or f...ups for short||
nsfw
its done
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
why does pz hate items that are either real heavy or containers that have a bit more capacity than they should?
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?
need everything after client/server/shared e.g. folder/file.lua

self-dox


