#mod_development
1 messages · Page 125 of 1
I obviously don’t want to create work for people helping in mod_support, but I’m not sure this is the way to do it
shrug up to you, haha, as I said, no pressure
Configs can have comments if there's a default version shipped with the mod
Unless I'm mistaken
But unfortunately, many users... cannot add.
And don't read well
No hate
But that's just reality.
I could maybe, instead of generating a red box error, have an obnoxious custom message in the middle of the screen
Most users don't know how to read the red box errors
I mean instead of crashing people you could just warn them that their values do not add up to 100
And let people disable that warning if they prefer to use relativistic weighting.
Yes that’s what I mean by obnoxious message
I can send you a gamepad-friendly modal command that is very convenient for this
Updated, thanks @thick karma
Is this a config in sandbox?
And I don’t want to add logic to fallback to relative weighing. I want to believe that people can add up 3 values to 100
I mean I feel crashing is more obnoxious than a warning, but obviously this is subjective.
Yes, I meant obnoxious in a good way btw
haha fair
Like they cannot ignore it and they can fix things on their own
I do not perceive obnoxious messaging as positive haha
I had to change my sandbox options because people couldn't handle start and end days

Changed it to start and duration...
math hard
If you have code to display user friendly error message (aka not redbox errors), I’m interested! @thick karma
WGS.createCenteredModal = function(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, source, destinationYes, destinationNo, playerIndex, arguments)
widthModalIncoming = widthModal
widthModal = math.max(widthModalIncoming, getTextManager():MeasureStringX(UIFont.Small, message) + 10)
xModal = xModal - (math.max(0, getTextManager():MeasureStringX(UIFont.Small, message) + 10 - widthModalIncoming) / 2)
arguments = arguments or {}
local modal = ISModalDialog:new(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, playerIndex, arguments[1], arguments[2]);
modal:setWidth(widthModal)
modal:setHeight(heightModal)
modal:setX(xModal)
modal:setY(yModal)
modal.yCenter = modal.height / 2
modal.ui = source;
modal.destinationYes = destinationYes;
modal.destinationNo = destinationNo;
modal.moveWithMouse = true;
modal.backgroundColor = WGS.wookieeBackgroundColor
-- modal.onLoseJoypadFocus = function(self, joypadData)
-- self.onclick = nil
-- self:onJoypadDown(Joypad.BButton, joypadData)
-- ISModalDialog.onLoseJoypadFocus(self, joypadData)
-- end
modal.prerender = function(self)
if not getSpecificPlayer((self.player or 0)):isAlive() then return end
self:drawRect(0, 0, self.width, self.height, self.backgroundColor.a, self.backgroundColor.r, self.backgroundColor.g, self.backgroundColor.b);
self:drawRectBorder(0, 0, self.width, self.height, self.borderColor.a, self.borderColor.r, self.borderColor.g, self.borderColor.b);
self:drawTextCentre(self.text, self:getWidth() / 2, self.yCenter - WGS.fontHeightSmall - 10, 1, 1, 1, 1, UIFont.Small);
end
modal.onJoypadDown = function(self, button, joypadData)
local playerIndex = self.player or 0
if button == Joypad.AButton then
local destination = self.destinationYes
if self.yesno then
self.yes.player = playerIndex;
self.yes.onclick(self.yes.target, self.yes);
else
self.ok.onclick(self.ok.target, self.ok);
end
self:destroy();
if WGS.getJoypadData(playerIndex) then
setJoypadFocus(playerIndex, destination)
end
end
if button == Joypad.BButton then
local destination = self.destinationNo
if self.yesno then
self.no.player = playerIndex;
self.no.onclick(self.no.target, self.no);
else
self.ok.onclick(self.ok.target, self.ok);
end
self:destroy();
if WGS.getJoypadData(playerIndex) then
setJoypadFocus(playerIndex, destination)
end
end
end
modal:initialise()
if modalYesNoMode then
modal.yes:setY(modal.yCenter + 10)
modal.no:setY(modal.yCenter + 10)
else
modal.ok:setY(modal.yCenter + 10)
end
modal:addToUIManager()
playerIndex = playerIndex or 0
if (source and source.playerIndex and WGS.getJoypadData(source.playerIndex)) then
setJoypadFocus(source.playerIndex, modal)
elseif WGS.getJoypadData(playerIndex) then
setJoypadFocus(playerIndex, modal)
end
WGS.magicalWookieeModal = modal
return modal
end
You'll need to remove the WGS stuff from this @flat cipher
It depends on my mod
You'll need your own getJoypadData function
Thanks!
But basically this is a one-function-call modal that can send you to whatever focus destination you prefer when it's finished.
A soft warning API would be nice for the community patch
I use it like this in my rewrite of Safehouse UI:
WGS.createCenteredModal(self.x, self.y, self.width, self.height, getText("IGUI_SafehouseUI_ReleaseConfirm", self.selectedPlayer), true, self, ISSafehouseUI.onReleaseSafehouse, self, nil, self)
I've seen people make the player say() warnings onPlayerUpdate lol

If you add Wookiee Gamepad Support to your server, you can just use that function.
It's available through WGS, the singular global I add (sorry Browser)
@flat cipher
Thanks I’ll check it out and push an update
for sure, good luck!
(I should really rewrite this function to make it easier to share with people without a dependency.)
@sour island i sent u a reply
@flat cipher
Single-function call, gamepad supported modal dialogue that can be used in yesno or ok mode.
local FONT_HEIGHT_SMALL = getTextManager():getFontHeight(UIFont.Small)
local getJoypadData = function(playerIndex)
playerIndex = playerIndex or 0
return JoypadState.players[playerIndex + 1]
end
local createCenteredModal = function(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, source, destinationYes, destinationNo, playerIndex, arguments)
widthModalIncoming = widthModal
widthModal = math.max(widthModalIncoming, getTextManager():MeasureStringX(UIFont.Small, message) + 10)
xModal = xModal - (math.max(0, getTextManager():MeasureStringX(UIFont.Small, message) + 10 - widthModalIncoming) / 2)
arguments = arguments or {}
local modal = ISModalDialog:new(xModal, yModal, widthModal, heightModal, message, modalYesNoMode, self, onResponseFunction, playerIndex, arguments[1], arguments[2]);
modal:setWidth(widthModal)
modal:setHeight(heightModal)
modal:setX(xModal)
modal:setY(yModal)
modal.yCenter = modal.height / 2
modal.ui = source;
modal.destinationYes = destinationYes;
modal.destinationNo = destinationNo;
modal.moveWithMouse = true;
modal.prerender = function(self)
if not getSpecificPlayer((self.player or 0)):isAlive() then return end
self:drawRect(0, 0, self.width, self.height, self.backgroundColor.a, self.backgroundColor.r, self.backgroundColor.g, self.backgroundColor.b);
self:drawRectBorder(0, 0, self.width, self.height, self.borderColor.a, self.borderColor.r, self.borderColor.g, self.borderColor.b);
self:drawTextCentre(self.text, self:getWidth() / 2, self.yCenter - FONT_HEIGHT_SMALL - 10, 1, 1, 1, 1, UIFont.Small);
end
modal.onJoypadDown = function(self, button, joypadData)
local playerIndex = self.player or 0
if button == Joypad.AButton then
local destination = self.destinationYes
if self.yesno then
self.yes.player = playerIndex;
self.yes.onclick(self.yes.target, self.yes);
else
self.ok.onclick(self.ok.target, self.ok);
end
self:destroy();
if getJoypadData(playerIndex) then
setJoypadFocus(playerIndex, destination)
end
end
if button == Joypad.BButton then
local destination = self.destinationNo
if self.yesno then
self.no.player = playerIndex;
self.no.onclick(self.no.target, self.no);
else
self.ok.onclick(self.ok.target, self.ok);
end
self:destroy();
if getJoypadData(playerIndex) then
setJoypadFocus(playerIndex, destination)
end
end
end
modal:initialise()
if modalYesNoMode then
modal.yes:setY(modal.yCenter + 10)
modal.no:setY(modal.yCenter + 10)
else
modal.ok:setY(modal.yCenter + 10)
end
modal:addToUIManager()
playerIndex = playerIndex or 0
if (source and source.playerIndex and getJoypadData(source.playerIndex)) then
setJoypadFocus(source.playerIndex, modal)
elseif getJoypadData(playerIndex) then
setJoypadFocus(playerIndex, modal)
end
-- latestModalInstance = modal, if you need a global reference.
return modal
end
Only tested in lua/client.
I haven't tested, but I am pretty sure it'll work without my mod as a dependency
Removed my mod's variables / functions from the solution
My solution:
function PZISObjectUtils:getContainerName(container)
return self:getContainerNameByType(container:getType());
end
function PZISObjectUtils:getContainerNameByType(containerType)
return string.lower(getTextOrNull("IGUI_ContainerTitle_" .. containerType) or "");
end
Oh wow, good find @chrome egret, what a headache that was
I took a look earlier and saw no functions
I wonder if that's truly the easiest way
Yeah, I really wish for an instance method on the container that would provide this info
@flat cipher If you haven't yet solved normalization, I might have something useful for you.
About to test it real quick but I think it should work.
hey, im trying to custom color, sprites
it works with setcustomcolor
transmitcustom color
but base color have too much influence
any hints to personalize colors and change color?
for reference im changing color from overlays bloods
--
im only be able to get shades of red, from original, dark red to black
Is there any way to create a two tile wide container that doesn't register as two halves when clicked on? (Like one half is a container and the other half is a container in game)
So that it counts as one large container
Hey guys, is there a way to see what the values for the different stats like stress, pain, fatigue are. I mean like the max and min values
To just get a reference, you can launch the game in debug mode and check out the admin/cheat menu
@flat cipher Okay this one is fixed:
-- Expects a simple indexed list of data, e.g. {10, 25, 50, 25}
local normalize = function(arguments)
local normalizedArguments = {}
local total = 0
for index, value in ipairs(arguments) do
total = total + value
end
-- If user sets all weights to 0, they can cause a divide-by-0 error; this prevents that.)
if total == 0 then
local weightRemaining = 100
for index, value in ipairs(arguments) do
-- Double friendly.
normalizedArguments[index] = math.min(math.floor(arguments[index]), weightRemaining)
weightRemaining = math.max(weightRemaining - math.floor(arguments[index]), 0)
if weightRemaining > 0 and index == #arguments then
normalizedArguments[index] = normalizedArguments[index] + weightRemaining
end
end
end
local multiplier = 100 / total
local weightRemaining = 100
for index, value in ipairs(arguments) do
-- Double friendly.
local normalizedArgument = arguments[index] * multiplier
normalizedArguments[index] = math.min(math.floor(normalizedArgument), weightRemaining)
weightRemaining = math.max(weightRemaining - math.floor(normalizedArgument), 0)
if weightRemaining > 0 and index == #arguments then
normalizedArguments[index] = normalizedArguments[index] + weightRemaining
end
end
return unpack(normalizedArguments)
end
-- Examples:
-- Command: a, b, c, d = normalize({1, 1, 1, 1})
-- Result: a = 25, b = 25, c = 25, and d = 25.
-- Command: a, b, c, d = normalize({11, 1141, 122, 143})
-- Result: a = 0, b = 80, c = 8, and d = 12.
Can give it any number of args... will work for both of these conditions:
Looks like a will effectively be turned off in that last case, is that the desire?
Yes, because the weight of A is insanely small
That would be a consequence of terrible user decision making
But it would not crash
11 / (11 + 1141 + 122 + 143) is too close to 0 for the randomizer to tell it's not 0
The randomizer takes integer weights afaik
Correct.
Hence the flooring
And the leftover clean-up
(If I'm wrong about that, surely belette can remove those parts.)
I getcha
How do i open the cheat menu in singleplayer?
Did you launch the game in debug mode?
When you launch in that mode, there will be a bug/mosquito icon overlayed on the left side of the screen
Ah got it thanks 😄
when should one init a keybind/press trigger event? found an odd bug/quirk/error but the code comment explains more.
if(getSpecificPlayer(0)) then
--print("keyNum: " .. tostring(keyNum))
--57 = space
--23 = "i"
-- Some nonsense going on here needs to be worked can spit error(s) after player load. Need to check for nil on
-- myQuestInfoWindow and myDialogueWindow as these can be called before pressing 'click to start'
-- Possible QuestManager starting before client is actually ready to do anything UI related?
-- And why even all the hardcoding of keyNum if there a setting to open the quest window
-- Like what is going on here and why...?
-- Sycholic
if( keyNum == getCore():getKey("Open Quest Info Window")) then -- i key
myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible())
elseif( keyNum == 57) then -- space key
if(SSQM and SSQM.BannerMSG) then
SSQM.BannerMSG:removeFromUIManager()
SSQM.BannerMSG = nil
SSQM.ShownBannerMSGCount = 0
end
myDialogueWindow:skip()
elseif( keyNum == 199) then -- home key
myQuestInfoWindow:setVisible(true)
getSpecificPlayer(0):Say(tostring(getSpecificPlayer(0):getX()) .. "," .. tostring(getSpecificPlayer(0):getY()))
elseif( keyNum == 200) then -- up key
elseif( keyNum == 208) then -- down key
--[[
local player = getSpecificPlayer(0)
player:Say("teli")
player:setX(10816)
player:setY(10060)
player:setZ(0)
player:setLx(10816)
player:setLy(10060)
player:setLz(0)
]]
end
end
end ```
Any ideas let alone why all the hard coded binds?
stares at the non collapsed code block.
I know how to fix the error triggering just by adding a Nil check but before I do anything just wanted some feedback as to the hardcoded and seemingly mostly do actually nothing... or just print a coordinate (if you dont happen to bind the variable to the same key)
To what event do you add this handler?
believe its this? Events.OnCreatePlayer.Add(QuestManagerInit)
prob just easier if I drop the Git page
but yeah if I hit space or home or open quest window before 'click to start' pops errors.
@flat cipher Just in case your code would find it easier to work with a table of returned values, here are two versions of the function I offered earlier.
Probably didn't know about Keyboard? And perhaps concerned about players who rebound Open Quest Info Window wouldn't know what key to press, so they made it inevitably associated with the original key?
yeah I dunno but its ugly atm and Im trying to correct that
Yeah I do agree lol
I would not do it that way
I respect rebinds
If people rebind their keys, I assume they know what they rebound them to
And can handle that.
I would also reference Keyboard class though I expect neither the Keyboard class nor the numbers used for its keys are likely to change.
I'd hope so since its just in the settings menu.
e.g. Keyboard.KEY_HOME
lemme look might already be up higher
Javadoc Project Zomboid Modding API declaration: package: org.lwjglx.input, class: Keyboard
But that's just me, I'm a constants guy
oh for that yeah
I like named things.
If I want to add a 2 pixel padding, I will write + padding instead of + 2 and make a variable, extra characters be damned.
is any way to get "what day is it today in game"??
i mean in perspective of code. not watching your digital clock..
like in excel = today() something like this
you dont see any issues I totally yank that up/down stuff I'll fix space and home plus add the nil checks
You could do this at the top:
function QuestManagerKeyDownHandle(keyNum)
-- This is keyboard player, and this is keyboard input, so might as well use this.
local player = getPlayer()
if not (player and player:isAlive()) then return end
-- Everything else . . .
end
that might protect you.
i assume quest stuff exists by the time player is alive.
Maybe not, though, I don't know that mod.
Also at the very least it'll save you from having to write getSpecificPlayer(0) 5 times lol
me either, but if I hit one of those hotkeys before click to start the quest window def not ready to open
Got it.
but thanks another option.
Right on!
Good luck
I usually just check whether my player is alive for my keyboard shortcuts
(when necessary)
well this is during loading and right as soon as one is ready to click start and jump IG is where this odd one was happening.
I don't think you are alive at that point but I could be wrong
I think you're alive after game start.
dunno I can find out quick thats not a big change
lmk! I will relay it to the people
lmk? sorry Im old :P
and since it seems the GH for this mod is not even remotely kept up to date likely just gonna fork it
Oops let me know
@thick karma so replace if(getSpecificPlayer(0)) then ?
?
Let me show to be clear
thanks sorry still waking up work day.
function QuestManagerKeyDownHandle(keyNum)
local player = getPlayer()
if not (player and player:isAlive()) then return end
--print("keyNum: " .. tostring(keyNum))
--57 = space
--23 = "i"
-- Some nonsense going on here needs to be worked can spit error(s) after player load. Need to check for nil on
-- myQuestInfoWindow and myDialogueWindow as these can be called before pressing 'click to start'
-- Possible QuestManager starting before client is actually ready to do anything UI related?
-- And why even all the hardcoding of keyNum if there a setting to open the quest window
-- Like what is going on here and why...?
-- Sycholic
if( keyNum == getCore():getKey("Open Quest Info Window")) then -- i key
myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible())
elseif( keyNum == 57) then -- space key
if(SSQM and SSQM.BannerMSG) then
SSQM.BannerMSG:removeFromUIManager()
SSQM.BannerMSG = nil
SSQM.ShownBannerMSGCount = 0
end
myDialogueWindow:skip()
elseif( keyNum == 199) then -- home key
myQuestInfoWindow:setVisible(true)
player:Say(tostring(player:getX()) .. "," .. tostring(player:getY()))
elseif( keyNum == 200) then -- up key
elseif( keyNum == 208) then -- down key
--[[
local player = player
player:Say("teli")
player:setX(10816)
player:setY(10060)
player:setZ(0)
player:setLx(10816)
player:setLy(10060)
player:setLz(0)
]]
end
end
Notice the nesting is reduced
You just break out of the function if the player is not alive.
then return end
breaks the function
harmlessly breaks
Not like, throws an error
Just ends it
yeah just jumps out does nothing
Yeah sorry wasn't sure if I was clear
Value returned in Lua will be nil
(Irrelevant here.)
no it was clear I just wasnt sure if that was on top of or replacing
Cool
lol just noticed this:
if( keyNum == getCore():getKey("Open Quest Info Window")) then -- i key
What are they even on? i is inventory...
exactly!
(Unless you use dhert's SpiffUI or change it yourself.)
Yeah Idkwtf they're talking about there lol
the keybind has options to change it in the mod so why all the hardcode...
let alone the empty ones doing nothing... like wth
Wait is the quest window built into vanilla somehow?
Or you mean
OH
Wait
The MOD actually added keybind options?
But doesn't use its own options?
But... why
yes there a complete settings that you can set your hotkeys for. why Im lost as to this nonsense
which clearly needs work also in its own right...
Hey, i want to add a custom stat to players, in this case a duration for a buff. Could anyone lead me in the right direction, maybe someone has a guide or mod who does that?
Gooooot it.
Wow how did they mess that group up so much lmao @frank lintel
lol jfc
Some people barely try istg
shrugs.. and no you called it
player:getModData().buffDuration = 100
why Im trying to work on this mod cuz I think it has potential Im even thinking MP stuff for it already
player = getPlayer(), or perhaps self.player or self.character, or perhaps playerObj, or perhaps getSpecificPlayer(index)
@split basin
Hell yeah I respect seeing the potential in stuff that isn't done
Clean that up and let me know when you rerelease it!
what trail looks better A or B?
Thank you! I found this online player:getModData()["mmBurnTreatment"] = nil, is it with the brackets or like you said with the .
Both.
Ah
player:getModData().buffDuration is what they call syntactic sugar (prettier formatting) for player:getModData()["buffDuration"]
It does the exact same thing in the end. @split basin
Sugar sounds good, going with that one
getModData() returns a Lua table of the form { key = value, key2 = value2 . . . }
You can access such a table in multiple valid ways
there a lua thing for a comment block? instead of having to put -- on every line like /* */
ty
i think i found an optimal result, the A was value 5, and this one G have a range between 3 to 5
do you agree?
Im gonna leave the original stuff just comment out it. G looks best of all so far
it doesnt look square...
What is the stuff on the ground intended to be? Just soil the player put down or what?
blood?
Oh blood?
xDD i was trying to achieve liquid
but i can work only with red, dark red, brown and black
Ohhhh sorry I saw the gas can as a watering can
Thought maybe you were farming
That was my bad
i thought you dragged a dead body there
xDDD
What kind of liquid is it supposed to be?
gasoline, fuel
yeah, here too, but i cant manage to make it clear in zomboid
im using tile sprite overlay_blood
maybe with custom tile sprite i can achive
but im not an artist
overlay_blood_floor_01_
im working with this tileset
i have this one too, i will try it
its water
but only one tile :(
You should ask #modeling if anyone has recommendations for a tile that could simulate gasoline.
Or #mapping
Mapping works in tiles a lot afaik
I still don't know which tiles I need to tap into to add Ladder support 😭
What would be the best way to reduce the timer? Just reduce it by one in the EveryOneMinute lua event?
If you want the rate of losing the ability to be proportional to the user's game speed, that seems like a good way to do it.
Or faster or slower depending on how long you want it to last.
i post a video on #mapping without visuals, with the mechanic of pour gasoline on ground and set it on fire, with chain reaction when intersects
How many in-game hours do you want it to last?
/ minutes
Thats what i'm thinking about at the moment, its a Stimulant for Carryweight
2 hours seems fair enough but that'll go subjectively REAL fast if their game speed it high
You might want to adjust it based on game speed, but of course that is up to you.
I think i have to play with it a bit, to see whats good
Reasonable
The problem is, i only have 12h in Zomboid lol
i think i modded more than played the game
No luck @thick karma still pops...
so apparently that logic block still fires before clicking to start also... hmm
was gonna say might get quicker answer in modeling since thats related to explain how to copy/edit vanilla titlesets
Can you post that file @frank lintel
I might be able to figure it out but I'm on Fort lol so not trying to go sub
lol I 100% definitely have modded insanely more than I have played this game.
I'll be the same way Im gonna try just doing the nil checks like I was thinking put it back to original but lemme get the original version (I basically made a copy of the mod and just added the game version # on the end to make the mods unique and I keep my original untouched)
ah thats how get get a collapsed codeblock...
here is what I decided to try since the player logic block still allowed it so trying this but Im out of time gotta get ready for work.
if(myQuestInfoWindow) then
myQuestInfoWindow:setVisible(not myQuestInfoWindow:getIsVisible())
end
elseif( keyNum == 57) then -- space key
if(SSQM and SSQM.BannerMSG) then
SSQM.BannerMSG:removeFromUIManager()
SSQM.BannerMSG = nil
SSQM.ShownBannerMSGCount = 0
end
if (myDialogueWindow) then
myDialogueWindow:skip()
end```
Any tips or guide for naming and other things to make a mod more compatible?
Is Events.EveryTenMinutes.Add(functionName) a server event?
local function reduceDurations()
local player = getPlayer()
player:getModData().durationMule = player:getModData().durationMule - 1;
print(player:getModData().durationMule)
end
Events.EveryTenMinutes.Add(reduceDurations)```
Am i missing smth?
a tip: always use
YourModUniqueName = {}
and create your functions with that
function YourModUniqueName:func1()
or
YourModUniqueName.func1 = function()
this prevent function names conflicts
recolor those to be light brown and a little more transparent. tada gas!
gas honestly just looks like a pool of water on the ground basically wet.
maybe put an effect on it that can look like vapor?
Thank you!
Also, to test my mod in multiplayer I need to host a server?
would be suggested you running it in MP, yes to test that game mode.
and yay got spacebar to stop triggering an error, but questwindow hotkey still does and actually some more indepth errors. but thats okay its progress. BBL
i try to modify alpha to make more transparent, but didnt work,
im using this
self.color = ColorInfo.new( 0.5, 0.0, 0.0, 1.0);
spriteObj:setCustomColor(self.color)
spriteObj:transmitCustomColor()
im missing something to work properly? @faint jewel
i change 1.0 to 0.7, and 0.4
in game or external program?
Made this to help people do that to some degree. Has some examples of safe decoration and such.
Yes, and if you need to test mods for interactions between players, you can launch two instances of Project Zomboid from your command line by adding -nosteam after the call to the program.
@frank lintel
He DOES in fact create that missing dialogue OnGameStart:
function DialogueWindowCreate()
local FONT_HGT_SMALL = getTextManager():getFontHeight(UIFont.Small)
myDialogueWindow = DialogueWindow:new(400, 270, FONT_HGT_SMALL * 6 + 290, FONT_HGT_SMALL * 10 + 150)
myDialogueWindow:addToUIManager();
myDialogueWindow:setVisible(false);
myDialogueWindow.pin = true;
myDialogueWindow.resizable = true
end
Events.OnGameStart.Add(DialogueWindowCreate);```
Why it doesn't exist after the game has started, I cannot say
But you could do if not (player and player:isAlive() and myDialogueWindow) then return end
K at work now play with it later
If you use debug console to check whether myDialogueWindow exists after game start and it does NOT, then most likely that file is not being loaded for whatever reason.
Maybe someone overloaded it by making another file with the same name that loads later.
And theirs doesn't include the creation of the dialogue on the event
No clue find out later
Asking again for it still is a mystery to me:
Where can one find code related to heating elements (stoves, campfires, fireplaces) ? Pondering whether I could make a custom sprite with heating functionality, wood or electric.
And another question:
Where can one find and edit the functionality of the siren and emergency lights used in for example police cars? Wondering whether I could make additional light textures into a car in addition to the usual head- and taillights.
you can do this but i believe some of the properties are hardcoded via Isotypes. someone may know more about this but surprisingly when it comes to editing tile properties, that hardcoded stuff can be assigned using lua, but easier to give it "stove" properties via TileZed in the tile property editor
#mapping contains most of the tools (in pins) and people who can help accomplish this. here is fine but they use the software more so you may have more luck
ooo, thanks a plenty!
thos e are vanilla sir
I know. I'm pointing out a flaw with vanilla.
Probably placed way before vehicles were a thought.
Probably should update mailboxes to reflect the current era of PZ.
The mod is awesome. I'd be a little frustrated having to go into each driveway as a mailman to give mail to players.
=/
It looks like the vehicle black-holed the hydrant. lol
lol
If I wanted to add mod data to items as they are added to the world, weather as lootables or spawned in a players inventory, is there a sensible hook to intercept that?
(server side)
could you be more specific about what you're trying to do? there's easier and harder ways depending on what you're doing
I want to make certain items get consumed after some time by wearing them, and my first approach was to add a "durationRemaining" float to each items modData entry
If items have unique ids per instance, then i can track these values in a seperate table, I don't have a huge preference
if it's specific items, any unknown parameter in the item script will be added as moddata to that item when you create it - but i think what you're trying to do can be done with drainables anyway?
If items do have unique IDs (UUID pls), anti-cheat would be so much easier along with networking.

need to add these values to vanilla items
you can do this with DoParam
local item = ScriptManager.instance:getItem("Base.Apple")
if item then
item:DoParam("Parameter = Value")
end
interesting
if the param doesn't exist already what happens if I trie to get it?
or is this run on initialization, and all objects will then have it
all new items will have the moddata, i don't know what will happen if an item was created before the mod was added
that's ok, i don't need backwards compatibility
ok so doing this in Events.OnGameBoot then makes sense?
thank you so much, this is so much less hacky than what i was thinking
was just coming to post the code i was working with and see if anyone knows if its right or what i need put for the item to spawn.
table.insert(ProceduralDistributions.list["SchoolLockers"].items, 5);```
you don't need to do it in an event at all
it's not really a big deal since it's not runtime but there is a bit of a performance cost with events, so when it's unneeded it's best not to
what need to go where the "SpiffoCards.cardpack" goes? im trying spawn in that item and thought its right but do i need remove the spiffocards part or something else?
that looks right to me
oh yea just came to say nvm xD i wasnt finding the cards before but its working now
capital letters matter in code yea?
usually!
okay thats what i was thinking
Glad you got it solved
anyone know where i can find all the option for procedural distribution?
yaaay sweet, thank you!
That is the list you're adding to
It's a global
It is structured exactly like that
As you can see, item is a 1-dimensional array where every even element is a number.
sweet! exactly what i needed. Im going make the Spiffo Card Packs spawn in the Spiffo's restaurants as like toys for kid meals and also in the Spiffo HQ they will spawn the most.
thanks :))) its complete, amazing teamwork with artists from #mapping mtgiri ty for tileset
#mapping message
hmmm trying find stuff, found how make them spawn in the Spiffo's restaurants but anyone know if the Spiffo HQ has anything specials to the location i can have them spawn in?
like the spiffo kitchen or dinning counters
if you enable LootZed you can see what type a container is, as well as the chances of items spawning in them
okay sweet, ill prob look into that. also for my code when setting up spawning are the values 0-100? or like what is the max?
Nice work!
Looks a lot better.
Yeah sorry idk any more than what albion told you... I just read through the categories and threw stuff where it made sense to me
same honestly lol
seems to be working good tho, but doesnt seem the items spawn in a world if you add the mod to the already saved world. so only works with new saves
Did you find something? I'm looking for this too.
well if the area has already been explored the loot is already generated and it's too late
but if players haven't been there before it should work even if it's an old save
here's some more pasta, untested
did you know how to get the square behind player, using getCurrentSquare?
solved: getLastSquare
im going test it again bc thats what i thought too
If I wanted to add an additional status bar to this tooltip, which function am I overriding?
or is there parameter magic to make it show it
ISToolTipInv.render, examples can be found in eris food freshness, eggon's have I found this book, Mutie's Bait Tooltips
sweet ty ty
good evening... hows the parser project going? Need something to mess around to unmelt my mind after so many sql query building
I parse everything except vehicles atm
still having issues with the vehicles?
I plan on fixing it this week
nice, im thinking about making a gui for your parser as an addon for my app
thinking about a mod maker app for newbies
i only want to add basic stuff on the app, but if you have a parser done i only need to make the gui inside the app
can you give me the link again?
Look up ZedScriptParser in my chat history. You'll get the repo link
im gonna make a dll extension out of your parser for use in vstudio
i think that will be a fun way to relax and forget about sql...
i think i had ts support on vstudio
so even better
direct clone from the repo... awesome
ts?
typescript
Manually defining each property with types and deserializing array contents..
Makes the API easy to read and modify
from what im seeing... very easy to read indeed
I can transcribe documentation for the properties
Also I'm taking liberties on changing property names to camelcase and pluralizing for array contents.
pipewrench ui and zeparser updated yesterday... you dont sleep 😄
Heh
im so old im gonna print the zedparser project code to read while i have some tea
dunno why, my brain absorbs things faster if i read it from paper
must be an age thing 😄
All I need is a box with a PC and internet and I am happy.
i get distracted very often on a pc
so if i wanna read the code and start working on using it to make a dll lib
it has to be on paper or ill get distracted after a few lines
but yeah this is a good thing to add to my future "general" use app for pz
thats what hardcore or jumpup tunez are for
I knew a few coders like that.
@frank lintel i dont hear music while coding... it annoys me 😛
it reminds me of work
I wish I could have more time
why I use hardcore or jumpup or trance ie. repeatative lyricsless for the most part
plus gets my half century old arse moving.
doesnt work with me, im a dj... so outside work i rarely listen to music
same
only when i have to add music to my library
well was havent done dj'n in like 5 years. heh Im at almost 2k in songs on my rig
and until the 15th i dont need to do that so ill just leave it be till the last minute 😄
I worked on a parser because it was a higher priority for the modding community
I do need to break out my traktor out havent used it in awhile
dont use traktor for ages... rekordbox ftw
PZ needs a program for script management
script management? how so?
no it be pioneer they were too much, also anyone with UI experience scroll up 8 hrs ago and give any feedback on what Im doing be much appreciated
need to change the toner... damn it
If you watch this chat you'll see that most of the questions are about caveats in ZedScript.
i havent dealt much with script on pz
I don't script at all.
if it was java I could help out...
so im not aware of the problems when scripting
or regex (ducks the incoming slaps)
I work on what people are of need for modding.
why Im working on this mod cuz its buggy but its well liked
im not that good of a guy... i work on the things i need... and if it might be helpful for anyone else i just make it avaliable and easier to use if possible
you dont even need an specific reason to mod
to mod? yes to code nop
well coding is to resolve a problem
i believe modding can be anything you want, as long as you like it
i personally mod for the community and to learn new concepts
and languages ofc
moding a game doesnt mean coding... it depends on the mod support of the game
you got a point
coding for me is something i do to relax, and to make some extra money
it generally involves coding
Time to play some pool.
noice
depends what
cool
talking snooker? 8 ball 9 ball?
You guys are my players basically haha
- I rapidly shoot pool with both hands
I tend to only play 8 on bar tables if its full sized I prefer 9, and the very rarity of finding a snooker table if someone has one
sorry not trying to be offtopic trying to avoid staring at code atm ^_^
wish I could talk to whomever coded this so I could ask wtf is going on... lol
Cool to see someone read my code on paper again
why I really miss my 2nd monitor which I would have vertical so 9:16 nice full page viewing of code
i'm ready to ditch all monitors and give the neo a try
neo-geo?
i couldnt even imagine using a second with 55 inches
my main is ultrawide
workflowriffic
yea i think ultrawides are great for improving workflow in general but i didnt prefer it for gaming
oh if ya into FPS that or doublewide are a must...
plus with VR tracking works awesome with it also
haha hell yea
Hello! some days ago I asked if somebody knew where the code for annotated maps were and I was looking into some of the suggestions but there's one thing I can't find. Does somebody knows if annotated maps stops spawning after X amount of time in the game? can't find something related to that but happens to me everytime
I can see this stashMap.daysToSpawn = "0-30"; but it's not used often. Out of curiosity, how many kills did you get without any annotated map spawns?
I almost never find them on a Z but more like just random loot laying around
Annotated maps, generally need double random success. One to get the map item and another to make the map annotated.
So when I have noticed this is in game with 6+ months survived
On early game they always spawn
Also, there's somebody doing streams in the spanish community that currently has 1 year and 6 months alive and haven't found any annotated map for months and months now
does anyone know how to change or add items to spawn inside of paper bags, like the spiffo paper bags specifically
So what I assume but can't prove because I can't find the code is that the longer the game, the less they spawn to simulate there are less survivors?
I would assume, without investigating, that there is some check to prevent more than one copy of each map spawning, because otherwise things would get pretty weird.
search the src for any refs to annotated map object name (which I dont have a clue) find out anywhere its called upon?
Thought the same. But again, without researching wouldn't it make sense to have that check ONCE the map is read? otherwise you may lose a map on a corpse and it never spawn again? 🤔
Yeah tried to find it by annotated map but couldn't
you lose the map you SOL regardless its not like it marks your character map
you got the object name they use for it?
you can mod this by doing StashSystem reset
Also there's a check to prevent them spawning when the building has been visited by a player.
Visit all the buildings, no maps spawn.
well nothing should unless you have 'loot respawn' on.
Well, people would be pretty mad if their bases were ovewritten with stash map stuff.
I thought this only stopped it from applying the effect? I have a lot of maps from buildings I visited in start of game.
Makes sense.
I'm not going to look up any of this (because I already work full time, boundaries, etc) or prove any of this in internet court, but I can think of all sorts of reasonable reasons, to prevent players from being upset or undesired weird results, why they don't spawn forever?
Just make a million of stash maps and have them spawn stuff in areas of the map where players never go if you need a server to spawn them forever I guess?
well you explained pretty well without looking it up anyway 🙂
oh Blair quick ? how do you know a player is actually in world and loaded up. ie. after clicking 'click to start'
I'm an idiot and it's champagne time.
This was just easy to answer.
But I assume that if getPlayer() works then there's a player.
No no it makes entirely sense actually. I'm pretty sure that I have obtained maps from locations I already visited but no loot at all on them. But it makes totally sense what you said about their spawn to be unique and that they should not affect an undesirable place (like a player base)
Obviously they're finite and can't generate forever anyways, since they're from a limited pool.
Or shouldn't anyways, ideally.
yeah they should just be unique items
I was thinking that unless you open them, thay can keep spawning but wouldn't make much sense because you could end up having duplicated ones that were not open
Since players are gonna loot goblin any server in negative five seconds flat I'm surprised any spawn.
its a hand drawn comment on a map wouldnt make sense there more then a single copy really.
i think i figured it out actually
Yeah it makes sense. Maybe he just lost it in a corpse that didn't check.
Well, this explains a lot of things
Loot can spawn that players never find as well.
"containers spawn loot in a ~150 tile radius around the player and not when containers are looked at, for the 98374382900347th time"
the mod Fire a trail of fuel got released today, please let me know performances issues, on stress test, maybe i will put an option to disable a costly block of code on it, but overall, with your own trail is pretty optimized
with this mod you can pour gas on ground while walking, make as many trail you want, intersect then, and light it with chain reaction
it adds a new dynamic to fire and gas, and is a better alternative to some Campfire materials usages (trying to make it temporary and moving it to many places to reuse it), now it get a competitive alternative to cheap ways to light a fire on ground, and it gives more realistic possibilites that players can do
https://steamcommunity.com/sharedfiles/filedetails/?id=2940908294
weird thing is, if you read a map then the building can transform in front of your eyes, but if you have visited it and are far away then it will never change
A Wizard made it
Yeah it is kinda strange how they work. But is clear the spawn now at least xD
hi, i have question about if is possible check when a evolved recipe is cooked for crafting
i dont see anything about that a.a
I don't think anything special happens when an evolved recipe product is cooked that doesn't happen to any other food item?
I've been seeing people ascribe all sorts of functionality to evolved recipes that don't exist at all however lately, so maybe some weird misinformation?
Is there a quick utility function for getting the condition/insulation/etc colors, like here:
I turned off my work computer and it's champage time 🤷
nvm it didnt work lol
only color that changes?
I think those are just based on the good/bad color presets but I don't even have the b41 code on my computer.
rgbBad.ColorInfo:interp(rgbGood.ColorInfo, item:getCondition()/100, NewColorInfo), something like this
i see things like: cookable: true
and AddIngredientIfCooked: true
but nothing related to cooked
its weird a.a
anyone know how to add items to the Paperbag_Spiffo?
What are you imagining that evolved recipes do? They don;t have any fuinctions that vanilla doesn't use.
ok sweet thanks
I tried this code but didnt work
table.insert(ProceduralDistributions.list["Paperbag_Spiffos"].items, 80);```
If it's cookable, it's cookable. If it can have ingredients added when cooked, it can have ingredients added when cooked.
If there's no paramters in the file for what you are looking for, then it probably doesn't exist..
They definitely shouldn't have any functions or abilities outside what the existing vanilla evolved recipes do.
but i need check if its cooked
to make other recipe
thats my idea
but i think i found something
How do you make a clothing item non repairable? I am looking throught the clothing scripting and can't seem to find anything
Quick question: anybody know where a lot of the trait textures located in the files? Trying to make a stupid texture replacement mod.
here you have
right is the original
left is the mod repair all clothes
I cant figure it out still, if anyone knows how to make an item spawn inside of the Paperbag_Spiffos would be awesome, tried a few dif codes but they didnt work
so the diff is fabricType if you dont put it probably its not repairable
I see. I suppose that makes sense, Thanks 🙂
you ever get a peek at that code I posted earlier today?
No. What was it for?
UI stuff trying to figure out why able to keybind trigger errors prior to clicking the start button
why I was asking about if there any method to know for fact the client is in world.
hmm have to check that. yeah cuz apparently player is valid prior to clicking it (guessing soon as it shows up)
yeah I got nothing but sympathy for those trying to basically translated one format to another.
I have a good lexer / tokenizer too so syntax highlighting support is possible.
intellij working fine for me in that respect
albeit do find major diffs in .class files vs source.
ZedScript is a custom format.
There's no official support for ZedScript.
So that's what makes it worth working on. =]
well to me Lua isnt my choice either woulda just stuck with what they natively using already but meh. and only thing I found close is? isIngameState() ?
Probably.
I don't mod PZ in Lua.
Im not by choice either ^_^ but I like this mod so Im debugging and fixing some seriously wack coding
ignoring the hardcoded keybinds... (which wont exist much longer) apparently you can call the quest window before clicking 'start'
On mobile so I can't see code
ah np.
I mod PZ using Typescript.
I know Lua pretty well but see it as too primitive a language to use.
oh even so if you seen it its not that complicated but clear mess.
okay glad Im not alone there
I prefer a strongly typed environment.
heh right now I feel like when I was reverse engineering and overwriting code for MC/craftbukkit
heh well personally I think I have a good spot in history on that given I made arrows able to be picked back up
I made Hmod support freezing the time of the day. Also reverse engineered for research in community projects. There's also the first mod that added an additional world instead of rewriting the nether that I made that got me into closed alpha testing the aether mod project. =]
ah nice
Hung out in Risugami's IRC on Esper.
I started with CB/bukkit then spigot but I just got bored of MC after so long
Old times.
I saw PZ as an opportunity to do what people did with Minecraft. Ended up writing a bukkit for PZ.
I wrote the first versions of it 8 years ago
dies inside after just having a very bad image of a PZ in MC...
It wouldn't be good for me to update it right now since the server does way less now than it used to before build 41
PZ is more of a p2p now
yo guys i dunno if this is the right channel to ask this but
correct me if im in the wrong place
is anyone doing something in regards to adding more semis and trailers to the game? like a mod that adds more variety?
i wanted to do something like that but i dunno if someone is doing it already
@faint jewel
anyone know how to add an item to the Paperbag_Spiffos?
cant figure out how to make items spawn inside of them
tried a few dif codes but idk if needs be done in a dif file or if im using the wrong code, any help would be awesome!
I added a bunch of trailer types.
can i ask you is it complicated to add different trailers to the game? or is it more straightfoward like cars?
those are cool
anyone able help me figure this out?
paperbag spiffos is what?
it an item, its the paper bags in the Spiffo Restaurants normally spawns with food in them
youll find them in crates and cabinets
okay... so you have to look up the distributuion list for the bag.
I found all that, one sec
here is the code i tried but didnt work, tried a couple others too but couldnt figure it out. im also super new to modding
Paperbag_Spiffos = {
rolls = 1,
items = {
"cardpack", 100,
},
junk = {
rolls = 1,
items = {
}
}
},
}
table.insert(Distributions, 1, distributionTable);
--for mod compat:
SuburbsDistributions = distributionTable;```
also tired that but didnt work either
that was the original code but tried put that section in its own file with the changes above but didnt work
i see, im still new to this, only made 1 mod atm lol
Not released yet
LITeraly lit! Youre on fire! What a hot mod.
thaaanks!
i'll end up testing also but how was the performance on that? the test seemed heavy, or you play on a potato connected to a lemon?
one of the cooler mods i've seen in a bit btw also
i dont have video card (anymore, sadly, miss my geforce 1050ti), im using only non-gamer notebook, when recording video its only the cpu i5 and integrated
oh damn in that case kudos lol
was running better than i would expect for integrated lol
How many days did it took for you to complete that mod
i will send an optimization soon, to the heavy part
hahaha
a whole 1 day and 3/4 i got insomnia while doing it
i've spent almost a month just learning how to code and put this mod together. i've gotten broken up with, disowned by 3 family members, and lost my house
jk on that 😄 but spent WAY too much time lmao
xD
i have more coding time than playing time in zomboid, i do modding outside steam to dont messy up my playing time
and my lady wasn't the happiest but was surprisingly cool about it haha. i'll take it!
i can see how man. it's addicting really
when i go try my hardcore collection, find out that a mod bow that i was using was breaking too fast and stop to create a mod for that, the rebalance items yourself,
in another time i will go try my collection again,
and bro, i even havent an mp experience on it yet, invite me to a mp server plz, i need to have an mp enviroment to test my mods, and to see if they are compatible, or let me know it
i try run a mp server here once, to test mod mp compatibility, got a forever black screen program,
i think is not enough ram
if have an mp server out there great to test mp mods compatibility let me know
yay I actually still remember how to use git
ahh. i normally just host and then run another client also. shouldnt take more than 7 gigs to do that with 1 mod
now 38 years later so glad I know VI by heart.
if you use nosteam and throw the mod into the mods folder, both host and client run from same folder 😄
my notebook have 8gb ram lmao
just make sure you use a static page file...
You can just go -nosteam
And open up 2 game instances
For MP testing
server wise?
do
local statisticsData = getMPStatistics()
statisticsData.clientFPS
works?
solved: getAverageFPS()
now who ever are looking to get current fps, to do better optimizated mods can use it
im trying to get current fps
in SP
or both
I havent touched the dedi server only reason I ask
Having trouble figuring out if the player has the well fed or stuffed stats...
seems like the hunger stat bottoms out at zero. Any ideas on where to look next?
check moodle code seen when they are shown would think its 0-100 scalar 50 being middle (no hunger)
prob some table somewhere that defines all that
np not sure how but glad it helped
if you push a mod to steam is it basically just taking a copy of the mod directly exactly as is or something I havent touched yet just wondering why this repo only has the folders from the media/lua dir.
ie the current mod vs the github repo look nothing alike in layout
Git doesn't let you upload empty folders, might be the reason
folder in a folder isnt empty?
its been awhile but I sure dont remember that ever being an issue esp dealing with MC and java.
Congrats 
now even the heavy lift are well optimized, will only do if upper 30 fps, and did more optimizations tweaks
nice!
thanks @glass basalt :))
very nice actually
and it fix molotov bug too
You should add a function to check for bombs in the tiles that have fuel and detonate them if you light the gasoline trail
it'll add compatibility with any remote detonation-like mods, like maybe C4? lol
its amazing, i like the approach that i use, to deal with heavy processing,
just queue the work, and use Events.EveryOneMinute to release it on little steps, if the game is not struggling with fps
xD imagine one day i implement a round-robin to prioritize the work tasks
in - a - mod
hahaha
(its possible by the way)
and it can be done on superb survivor, it is willing for that
heh guess what repo Im working on atm...
Superb-Survivors (main)
$ git add test
warning: in the working copy of 'test/test2/test.txt', LF will be replaced by CRLF the next time Git touches it
and yes you can add empty folders
yeah Im working on fixing some bugs and stuff I forked it tonight and just got done uploading all the source in media/lua to the fork
i release some addon for it, and i initially try to make some PR too
but to get a steam workshop release on the PR`s will take too long to happen
oh I know why Im just fixing the code and made a unofficial fork of it
make some addons too
the original repo is way out of date
its all using ryuu's name so I dont doubt its legit plus the mod even calls the wikipage on SSR
if npc update comes too late on vanilla
the addon that i did, was to add a radial menu, alternative to context menu
oh Im actually eyeballing to making it maybe MP'able
and sir the controllers users love it
and the other one, is a spawn limiter
i was using myself, and release to public as addon
for what surivors?
you are working on what part?
on any survior that uses spawnSurvivor or ondeath SuperSurvivorManager
i think is anyone
I thought they already got that in superb
it can be optimized in many parts, in multiple parts of the code
got that which one?
just a spawn limiter
I mean I havent even thought of like tweaking or stuff Im flat out tracking errors down
eg. hit space bar when ya sitting at your 'click to start'
in what file? just in github?
i did a way to users customize it, ones prefer less, ones prefer a bit, and ones get overwelm with too many
you can live you and your wife only if you want to
oh in that sense got it
yeah right now Im just digging into QuestManager.lua and that mess
i got interested to know what are the ceiling to alives, and the limiter
dunno there is a global for it...
nice!
plus control of # of hostiles etc
it will be amazing if you release a addon for that soon
ratio of hostiles to friendly etc there bunch of options for superb survivors
i got feedback that raiders are not spawning (there is a bug in the base mod)
I can look at that
be next thing I do
or try to...
only reason I got into it was I like the mod myself but I had the unkillable survivor bug and a hostile and my whole group wouldnt stop fighting lol
which is another thing gonna check cuz I got it to stop but not exactly sure as to why but I think its related to the pvp on/off flag and in settings having pvp off maybe making break dunno.
nice! i will check that, and see the compatibility and support
on Surivors is not even MP at all far as I know
which is my end goal to maybe change that.
can someone link them here? i didnt know, it will be nice to get in touch with their devs, i didnt know/try any explosives mods atm, detonation-like
Hey so I want to make a true music add-on for the artist blacklite district, how would I go about this
while developing using tiles, i found a bug for me that can be userful to you,
if you declare the isobject in a global variable, in my experience i was be able to spawn only one, even if i try to spawn more, i didnt go any further than this, and use local isoobjects to solve that "bug" (setSquare only works once for me, when it was a global variable)
and maybe using
getNew() too
i didnt try delete it and try spawn again @fast galleon
@vapid hearth #mod_support
This is for developing mod u are asking about another mods feature. The addon for true music is players concern not develppers
I think you can just check for the tag "Weapon" or "Bomb" or whatever it is for explosives and then call it to explode. But idk the function for making them explode on command
did you try the Fire a trail of fuel v1.1 update?
i need people to stress test that
@drifting ore @glass basalt
the hard lift happens when external fire triggers any gas puddle,
and when is not yours gas puddle, and when is a gas puddle that you place and gameboot again
and tell me if its working nice in mp, the way the code is it should be working
and its possible that the map gas puddles updates are being doing by shared processment along clients (all users that are less than 30fps do not process it, this enviroment processes)
using global variables fix it for you?
wow, who manage the emoticons near the nick? i got some fast updates here, from no where, got from recruit to builder faster then i was expecting
cloned using getNew() ?
amazing
would someone be able look over my code and tell me what is wrong with the last two lines?
everything else works fine, but also the last two lines are new a dif code from the other ones.
trying add my SpiffoCards.cardpack to spawn in with the Paperbag_Spiffos
Heya all, I've a question. How do you create poster mods? is there a tutorial for that? ._.
i tried looking into azas posters mod and i dont understand wtf im looking at. how do you do this :_:
i feel the same, first time modding and its working for the most part but so confusing. cant add my items to spawn in these bags either is annoying
this is what the code looked like before worked fine. But now with the new code wont work at all, im guessing the new code is poopoo but idk how I would write the code for spawning for this item bc its not the same as the other two codes i have already.
poster are just png tiles made by someone and turned into a tile sheet with tile properties
watch daddy dirkies video on making tiles to learn how, then replace with poster pngs you made and profit
Okay! ty
should require little to no lua to make that mod
that doesnt really make sense tho
i can't translate sense
????? what?
your comment doesnt make sense to me
watch video and learn to make tiles
now you know how to turn a png file into a poster
Quick video on getting custom tiles in the project zomboid editors (buildinged, tiled and worlded)
If you like what im doing please consider donating to my Patreon.
https://www.patreon.com/DaddyDirkieDirk
This one right?
it's the exact same concept as making any other tiles
yes this teaches you how to generally make it
there is other tools and whatnot in mapping
also #mapping will be a better place for information on it minus if you need any code. can still ask anything here but people use those tools like tilezed more in that channel, also know more about tiles
okay ^^ tysm
does anyone know how to make an item spawn inside another item? like how u can find backpacks and bags with other items in them
@wide oar
This is what I learned from to make posters; it's from Aza herself. There's three parts; part one is here: https://youtube.com/watch?v=YGi5E86fDeU&feature=shares
You need Tilezed for this and probably an image editor such as photoshop gimp or paint.net
https://imgur.com/BgkGdGY this is the template I use to ensure everything lines up correctly.
which code do i need to add on recipe.txt file to give a custom sound (ogg file) when server player is crafting certain item?
the problem with this, everybody says the object isn't there if the square wasn't loaded when you do that and then go to that square.
same as all things, but if it's inside another container it checks if the item can fit inside both. This is probably not your case but my item was a bit too heavy to spawn on zombie with toolbox.
Equipment UI is like 95% functional, just needs to show held items and hotbarred items as well.
I'm pretty happy with how it works, but I'm not sure about how it looks... Is it too cluttered?
it's really good. considering how cluttered it is already this is still going to be really good lol
what determines the amount of physical slots each bag/ clothing items with storage you have
these trigger when the object exists on the square already but the problem is that they don't.
Do you mean you can combine these two in some way?
Separate issue is that trees have special logic and are not like normal tiles.
The test is: use the spawn code to add item in Riverside when you are in Rosewood. Then teleport to Riverside and find the new tile. Does your solution pass this test?
Calculated based on the containers weight limit and % reduction. Ensures mod support.
I will manually override a few sizes to make certain containers more interesting.
nice
ah so you wait for them to load the square, and you use LoadGridsquare event?
It just wasn't in the snippet up there
I'm just puzzled because this is very different from the code you actually shared so far.
I will try to reconstruct this from what you posted because I need it sometimes.
Another question: would they still spawn if you quit to main menu or do you rerun the logic?
So you do it every time, what if they cut it, do you just replace it?
ok but that doesn't answer the question about quitting to menu, do you add the placeholder every time you load in to the game? Does it stay there if you add it once or you add it again, and if you add it again does the tree reappear if it was previously cut.
Leaked rust beta alpha demo version
Even though I can't remember what game it looks like it's cool as hell
haha
we are looking into lights coming from candles and other things while holding them
glytcher was messing around in a call earlier. i think it will be fruitful there. next step makin em crazyyy
Oho, its now out
yea lol finally
i ran into a million issues
gonna chill on hardcoded stuff
EXCEPT i will do extended generators range probably at some point
found a quazi solution for that one haha
tested and that logic doesn't work in SP or MP.
Only items near player appear, and MapObjects functions were called only when coming back to those items that did spawn already. Test item was not a tree, just regular tile.
If u guys want a venue to like go vc with other modders
Join our discord server. We shall hang out and discuss stuff etc.
The link is on my profile
Orbit Modding Team
Did anyone mess with the Playerinventory and carryweight? I want to increase the carryweight of a player, but i'm kinda lost
@frank elbow @drifting stump Do you know if I can make a new ArrayList in Lua and initialize it with some content, without using :add() several times after making it
I can do ArrayList.new() to make a new list, but it starts empty. I want to quickly populate it with predefined strings
declaration: module: java.base, package: java.util, class: ArrayList
you could have a pre initialized arraylist and then clone it or addAll to the new one
other than that no
I need to have several lists, so... shame
I found the Arraylist:hashCode(), which lets me turn the arraylist into a table index, essentially, to more quickly identify the wrong arrays
Because I can't convert a lua table to a type that the ArrayList:addAll() can swallow, right?
LOG : Lua , 1677755829163> Loading: C:/Users/user/Zomboid/Workshop/SimpleReadWhileWalkingMod/Contents/mods/SimpleReadWhileWalking/media/lua/client/!_SearchModeAPI.lua
LOG : General , 1677755829164> SearchModeAPI: registered a new mod with ID unknown
LOG : Lua , 1677755829201> Loading: C:/Users/user/Zomboid/Workshop/SimpleReadWhileWalkingMod/Contents/mods/SimpleReadWhileWalking/media/lua/client/fix_read_walking.lua
LOG : General , 1677755829202> SearchModeAPI: registered a new mod with ID read_walking
"unknown"? 
Unless I do a crazy thing, and presume that ArrayList:hashCode() will return the same number, regardless of the amount of mods and items loaded, no matter the OS and arches, that my
[Base.KitchenKnife, Base.Machete, Base.FlintKnife, Base.HuntingKnife, Base.MeatCleaver]
Will turn into a 76907929
again you could have prefilled lists
but ughhhhh
ArrayList.new(Arrays.asList("Base.KitchenKnife", "Base.Machete", "Base.FlintKnife", "Base.HuntingKnife", "Base.MeatCleaver")
try this
thanks, that is cleaner... But I am loading the modpack now, and seeing if the hash remains the same... it should, but... It is zomboid
Doesn't work
Arrays is nil
Is it possible to make an item hidden in the player inventory?
Does anybody know how I could add a description to my server spawns?
why do u need that
oh god that's nice.
Anyone knows how to restrict an specific item from a recipe? Like, you get all the hammers for doing something but you restrict the clubhammer (something like [Recipe.GetItemTypes.type]-itemid or alike?)
Dang... gamepad support will be especially hard to implement for that one...
Tested in 4x?
use a different function and add any item you want.
You can also call the original function inside your function and remove the item from the array.
yeap but its better to keep it dynamic
in this case i want to fix gas masks from "duping" gas mask filters when scrap armor creates a rebreather
guess i'll just add a gas mask filter to the recipe
how would this be done?
[...] is a lua function that is called to populate the source items. Sorry I can't explain more atm, doing other stuff and will mistype all commands.
dw! ty for the insight ^^
anyone know what category does VHS tapes fall under?
man I love modding, one moment your chilling making good progress and the next the random outfit generator doesn't give females pants
@dark wedge Do you happen to know how i can slow down animations? i made an idle animation but its going wayy to fast
Good morning.
It's nice to see people DM'ing me lately about having a ZedScript linter to check their scripts for errors. =)
gamepad support!?
I'll see about it later, but this is definitely a kb/m first mod
Whats 4x?
Lmao I could tell from your design.
I was considering the prospect of needing to do it myself for other people who will inevitably like that mod.
4x is 4x font size. I would recommend you handle that part... A lot of people need things to be legible in 4x font.
A lot of mods overlook that need and then the mod looks like crap in 4x.
Is that a setting in game?
options/display/fonts/font size > default, 1x, 2x, 3x, 4x
Chonky text
I should probably use this on my desktop monitor tbh
Need to consider text height I guess
Kinda weird having such large text but unscaled UI
hi, anyone have idea if import modules like base generate lag because it need to load all the base again or not?.
so nice.
Agreed... a UI that allows chonky text kinda oughta scale imo lol. For what it's worth to you, my UIs attempt to scale based on the text they need to fit using getTextManager():MeasureStringX(UIFont.theoneyouchose, inputString)
And of course getFontHeight
Ye, I did get the width for the slot labels, but not the height
Right on right on
Also... You may wanna check for compat with a mod I made that fixes the header information in that inventory title bar.
A lot of 4x users need it to read their container weights
Called Legible Container Headers
Allows you to e.g. hide your name in the Inventory header string
So stuff fits a lot better in 4x
That stuff isn't you obv but it would be nice for others if it were compat I'm sure (and I suspect it can be)
Noob question: where do I find the server terminal on a locally hosted server? I need to debug a multiplayer mod
Or is it only visible on a dedicated server
i just run it from the .bat file to watch live logs. in debug you can see it, bottom left if you mean the console
Hey guys, currently working on my first mod to make the First aid skill more relevant. How do you like the feature set so far, any feedback is welcomed. The orange number, is the skill requirement
It looks really cool! You could also put in an antizin type injection that pauses the infection timer (dying light inspiration). Could be fun to have to worry about turning if you don't find the medicine and could start with a trait that leaves you infected but gives antizin recipes
my guess make a local object from the Helicopter class then just call the func with your local object
im dumb so how would i do that
sorry cant help ya more then that, Im not native in Lua myself. finding just easier debugging existing code and learning it as Im reading thru it all
I mean it could be as simple as just Helicopter:isActive() no clue
Thank you! Thats a cool idea, the unknown substance has a chance to heal your infection and should be really rare. A way to pause the timer to give your more time would be really nice

i tried that and it didnt work
more like ya trying to add Ace combat to PZ
Hope it works!
I'll definitely be using that mod if I see it pop up. ^
is the Helicopter a valid object? dunno how the helo even works like it exists always then appears or is created on teh fly
the class is not exposed so you can't
yikes
I failed to change the drunkenness value of the character, can anyone show the correct function?
you would need to reimplement the heli in lua, which would not be hard to do
if you're a beginner, it'd be a neat learning experience, it's not super complicated
just depends if it's something you want to bother with
best bet look at other mods that already did it
i wouldnt say im a lua beginner but idk how reimplementing works
from java to lua ro smth
I'd rather see an API call so you can...
game is not gonna update for a while so he's out of luck on that front
Thought update 42 was not too far away. Guess I could've been wrong 😅
well several months and I just assumed he'd want a solution for something fairly promptly
odd I must got something wrong then cuz IntelliJ not crying over if (Helicopter:isAlive()) then break end
with the class not exposed, you'd have a hard time doing it in lua
that is in a lua file
ah
maybe I'm just out of the loop and they exposed it then
would have saved me a lot of work a year or two ago lol
I could have my env setup wrong but...
Helicopter:isAlive() doesn't even exist
wait wtf that come from that was autofilling
i don't think the pz libraries thing accounts for exposure
goes back and looks
wait actually i wrote Helicopter() but not Helicopter
but even if it was isActive(), this code still isn't valid because you never grabbed an instance
but i think i already tried that
So that's what the fancy Lua lookup stuff looks like..
shrugs shoulda seen all the api's I had to add so just the java code doesnt cry on imports
wasn't it the expanded heli mod that had to do its own thing too because the heli class wasn't exposed
yeah, it's a total reimplementation
you can grab a helicopter instance from there, but it's not exposed so you can't really do anything with it
still no due to lack of exposer
and reading from fields is inconsistent so i couldn't even say for sure you can grab it from there
maybe you can cheat it with the sound event
since there must be an emitter for that but it's been too long for me
@pulsar heath How was that reading of my code yesterday? =P
Coding while Ragnarök is approaching my area of this tiny world.
:D
Also lurking here from time to time.
Your animation's XML file can have the following parameter:
<m_SpeedScale>1.0</m_SpeedScale>
Can adjust this to make the animation slower/faster. Looks like vanilla Idles have a 0.48 speed scale, so probably need lower than that.
If needed, you can also set this to a variable like:
<m_SpeedScale>MyAnimSpeed</m_SpeedScale>
This can then be set in Lua:
player:setVariable("MyAnimSpeed", 1.0)
Btw is there any guide to work with animations? I was just able to play some of them through the playEmote function but it doesn't work for everything
I assume later this will exist but to play already existing animations? 🤔 any guide/tutorial?
Thanks!! much appreciated
On the topic of animations, anyone have an epi-pen style animation I could use? Like jabbing oneself in the thigh?
not off hand.... could make one though
would probably be better in an arm though.
as you would need a specific one for standing and for crouching.
would you like me to make you one?
if there is a weapon stabbing ani could use that as starting point to make it for the leg just have to change the direction maybe?
there's no easy way to import animations to edit them. they have to be recreated.
well thats what I meant a copy to start from I never even used a short blade yet so honestly I dunno what even animations there are for it could just be a poke one not a closed fist, or slice etc
The live logs from the .bat and the debug console in-game don't have the server per say. Unless my mod is not even working...
yea it will show server logs in command with if you start with .bat
on the host side
not sure if debug is required but i wouldnt think so. doesn't hurt to run in debug though in this case
if it's only server side it may only run in a server only setting as well but i also believe you can see in host console logs. could setup dedicated from host, quit game and then run the server64.bat as well to test. as long as you are subbed to the mods it should auto download them from steam and run the server as well
it's only an extra two steps from hosting
Hello. Anybody willing to make me a quest pack for SSR: Quest System? If anybody has experience and is up for it I could pay.
what code would I use? bc all the code I tried gives errors and breaks the rest of the spawning code i have
@stone garden you was looking or try to do ssr mods addon, maybe it can motivate you even more to do it
yes i really want
please make an pack i can suggest an pack theme
haha why you would tag the only person who begs for mods consistently ahhaha
:Dd
don't worry reifel i'm just messing around. at this point it's funny 😄
he tells me one day that are trying to do or wanting to do a ssr quest mod
@stone garden true? you are goin gto work on your own mod now?
if you do i will try to help you with anything i can haha
i give him all instructions for that
it would be nice to see him attempt
i will try make my own map
heck yea man
this ssr is almost text based
glad to see you are attempting now
and in the end have a little part of code, that i can help to finish it
yeah but the idea part will still happen
the hard part are produce many texts and dialogs and deal with many maps coordinates
that im not into
i look forward to seeing it if you do
#mod_development message
something like this
can we talk in mapping
Viper are wanting to do similar to you, an extra quests for use ssr in it
again, this is 80% 90% text based, and the rest code to integrate to ssr,
he mentioned paid for that, so if you practice it while being paid for that, it can give more experiencie to you achieve your own ssr extra quests idea
i can help with the ending code part integration for free btw (or 5% if it is a great payment)
when category in scripts/sounds_n.txt matters? I've been trying to notice a difference or get the set parameters to not work on purpose, but so far the parameter always apply to the emitter as long as the file path is correct.
yea i tried that but didnt seem to work
There must be a good reason for setting the category, but what is it defining? or is it only used in a situation where the game needs to differentiate the same sound applying to two different categories with the need for different parameters?
setting spawn points requires returning professions so if I have profession framework that has a list of professions that you can see right?
how could I use that to return a spawn point for every profession
