#mod_development
1 messages ยท Page 93 of 1
I'm confused... Not sure why it would work sometimes and not others
welcome to my world
When do you call the code that initializes the ArrayList?
Wait errors are reported during gameplay right?
this persone got the errors preloading the map. I've never noticed the error playing with it
Okay then yeah when do you populate that arraylist?
I have no idea. Where would I look?
lol this is why I get mods commisioned now. I am not cut out for this
If I had to guess. Whenever you load in an area with a viable double bed that can spawn the item. That is what the spawn pillow code is supposed to do
idk where to look but here is the whole thing
this is the array list
You init DakimakuraWeapons here: local DakimakuraWeapons = require("DakimakuraList")... that initializes it and pulls it into DakiArmor
How do I translate a mod that doesn't have the "translate" folder in lua>shared?
Someone will need to go into the code and implement a translation file
yea ok I see that.
However this is not clarifying why it isn't loading for me... Are these files in the same mod folder?
I understand, I thought I could create these folders as they did not exist in the mods
Nah that require could grab from shared afaik
Or other mods entirely
oh well they are in the same mod folder
and yea that makes sense since my mod allows addons from others
So no other ideas what might be causing the issue?
DakimakuraWeapons = {}
for i=1, 30 do
local item = ("Dakimakura"..i)
table.insert(DakimakuraWeapons,item)
end
just trying if i can do the table not sure if mine will work tho
doesn't really matter if he uses an array or table
although it doesn't seem like using an array offers any benefits here
the array as far as i understand is so other people who choose to make addons that add their own dakimakra get put in the spawn list
you can do the same with a table
Not a huge deal - just caught my eye as odd
that being said which line is causing issues? local item = ... ?
Are you able to recreate the error btw?
like personally?
this one
Haven'y had the chance to try but I play with this mod and everything seems to work fine for me. Pillows spawn and I haven't noticed errors.
If you can't recreate the error I'd ignore it
given you have the same mods as the guy
and try to do what he did with 'preloading'?
yea ive never even used a map preloader
Is there any easy way to set a vehicle's engine quality or loudness? I've only seen it done with the debug function which can only set quality to 100.
@jaunty marten I threw all the uielements under going my genericOpenPanel with these
local function genericRestoreLayout(self, name, layout)
ISLayoutManager.DefaultRestoreWindow(self, layout)
end
local function genericSaveLayout(self, name, layout)
ISLayoutManager.DefaultSaveWindow(self, layout)
ISLayoutManager.SaveWindowVisible(self, layout)
end
Works like a charm, but I'm wondering would I be able to call on restore-layout to get them to be opened when the game boots?
Right now when you click on them they appear where you last moved them, even across sessions
@sour island I'm using the map loader the guy was using rn and so far no errors
so idk
yeah better to just ignore it tbh ๐
'I was not able to replicate these errors'
also the line with and item should prevent the error
Is there a quick guide on rewriting/altering vanilla Lua?
I'm trying to figure out how to instantiate and place in world a new IsoObject. ๐
Reeeee
Been working on this for too long
O/ @sour island
Not that I know of
Am legit buzzed ATM. Thought I'd stop by and see what people are up to modding wise.
If you are allowed to instantiate Java objects, the format in Lua is usually ClassName.new(parameters)
Say I'm trying to rewrite certain methods in ISFixGenerator.lua, I would copy/paste the original code into a file also called ISFixGenerator.lua (within lua\client), changing what I need - right? Or does this also need to be added to an event as well
I'm not sure tbh haven't tried that with a simple IsoObject
I did it with a light source from javaside though and it worked fine
.new
I'll try that but I'm almost sure I did that already. Plus new is a method methink.
Or maybe it is a function.
hh
hey o7
:new passes the stuff before : as self. You cannot send IsoTrap as self to its own constructor in Java.
Right.
IsoTrap has two constructors:
IsoTrap(HandWeapon weapon, IsoCell cell, IsoGridSquare sq)
IsoTrap(IsoCell cell)
I'm almost certian I traid but y
How are you?
Sorry I ran the debug scenario and instantly heard zombies. Grammar be damned.
Good, just chipping away at these debug tools. Mostly making vanilla UI behave more consistently ๐ - and finding ways to refactor stuff to work with less lines of code
Are you getting an exception here?
Yeah.
Nice. Glad to see you optimize
Someone asked for a viewer for java fields - so I might work on that
You can expand the error window in F11 menu FYI @idle dawn
You should send a screenshot of the error
Static fields are the only exposed fields in Lua
cough errorMagnifier cough
Let me try.
Oh? I wasn't aware - I was hoping to grab all the getters info with out having to type them all out
Something new is happening now with that change.
Take that from someone who has to know when making the Typescript for PZ.
Yes
Static fields
@idle dawn Chuck is trying to be helpful while also being humble https://steamcommunity.com/sharedfiles/filedetails/?id=2896041179
the getters are static fields? ๐ค
Breakpoint isn't being hit, but player+zombie becomes invisible. there is an error though.
He's not linking you because he made it, but it is awesome
Anything else requires a getter setter
you have breakpoints?
It's set to break on error.
So you are not getting an exception?
If you have it set to break on error and the game throws an exception in -debug mode, it will pause...
exactly why I say it's weird.
for anyone coming by later, the answer is that MyUI.instance = o; ended up being the one that properly tracked the instance of the window to check :isVisible(), properly referenced the window, etc. Thanks again albion!
I didn't read up on the discussion and will do shortly in case there's a nuance I am missing.
But no, taking a commission is not against the TOS. The owner of a mod can absolutely give away ownership as they see fit.
2.4. Commercialisation. Unless any arrangements to the contrary have been made with us, mod creators cannot sell access to a mod and/or mod content. Mod creators are permitted to work on commissioned mods provided such mods are not sold. Please see section 4 of the Terms & Conditions for more information on this.
Selling mods means selling it to players, i.e. a modder telling ***players ***"want to use my mod? pay me".
What it doesn't mean is paying someone to make (and maintain) the mod.
๐ There was some confusion regarding the 1:1 transaction being technically a private distribution
ye
chinese characters under that - but don't display
๐
That's why the older Change Sandbox Options appears at the end
See Dec https://www.asciitable.com/
Ascii character table - What is ascii - Complete tables including hex, octal, html, decimal conversions
Want a real mindbork?
~ comes after everything but alphabetizes first in Windows explorer
It loads last (in alphabetical load sequences) and appears first
xP
Thanks for clarifying this clause.
Nah, if A pays Modder B to make a mod exclusively for them, that's perfectly fine.
What A is not allowed to do is sell that mod to people, that's the only concern we're having. We're not out to deprave modders of commissions ๐
When people in DND mode are typing, it looks so scary...
Impending DOOM
nasKo's thoughts incoming in the color of a bloody battlefield
I don't know you but it just says fear you
Thanks for clarifying further.
I've no idea on this.
Thanks for keeping the door open for rewarding works for modders that makes player's who are willing to reward said modder to make their improved experience with PZ possible.
Fucking win in my book.
That makes it worth continuing to work on PZ for me.
Basically, once the code runs, no error on errormagnifier, and some objects visually dissappear like trees, player, zombies. They come back seemingly random soon. Errors look like they're popping up in the log on the bottom left.
But it's too much and they're not showing up anywhere else.
So there's no error?
Recorded it, one sec.
See how the trees and zombies flicker out?
And any "errors" are showing up in the console.
Not in F11 or errorMagnifier.
that's odd
Nasko used to do freelance works which us why he knows the struggle and all that crap..
Holy crap and that happens 100% of the time?
The. A horde will blind you lol
I usually make something easy when starting out modding.
Also I have a feeling I know what it is.
Even more funny @thick karma The game decides to do this after restarting a scenario without exiting the game.
One sec
Not doing it anymore. ๐
It did a spooky: "Mod is causing the game to die check the console exit to windows"
There it is. Only happens when I change maps after the above happens.
In game bsod
lmao
You should post console.txt
Oh I have an idea. Maybe since you never assigned a sprite or anything to the trap you created, it bugs out when it tries animating it.
You're getting a missing sprite error in your console in that video
ERROR: General , 1674530090714> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: can't create player at x,y,z=10596,8818,0 because the square is null at IsoWorld.init line:2799.
ERROR: General , 1674530090715> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: can't create player at x,y,z=10596,8818,0 because the square is null
at zombie.iso.IsoWorld.init(IsoWorld.java:2799)
at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:268)
at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:225)
at java.base/java.lang.Thread.run(Unknown Source)
LOG : General , 1674530090715> LuaEventManager: adding unknown event "OnPreUIDraw"
LOG : General , 1674530090716> LuaEventManager: adding unknown event "OnPostUIDraw"
LOG : General , 1674530094081> EXITDEBUG: Core.quit 1
LOG : General , 1674530094081> EXITDEBUG: Core.quit 3
LOG : General , 1674530094085> EXITDEBUG: Core.quit 4
There's that.
And yeah lemme try.
I'm assuming the isometric map code just got killed by my code.
And it hit the bucket on new load.
can't create player at x,y,z=10596,8818,0 because the square is null
That's nowhere near my code luckily, and it's happening when it starts a new map after the above video happens.
You can't load into the game now?
I can if I restart the game entirely.
This might be dumb cuz im sure its nots possible but what the heck ill ask anyways
Theres the
instanceof(obj, 'isoSomething')
I was wondering if you can do the reverse
Like directly ask what isoobj is this
Instead of if its thiskind the
iirc you can but only in debug
i might be misremembering that though, i never messed with the debug-only reflection stuff
Ow ok .. cuz i was wondering
Why most functions
Gather stuff then filters em
Instead of choosing what to gather
If that makes sense
you can do type(object) unless I'm misunderstanding the question/request
He's trying to do the equivalent of ObjType = type(obj) // returns "isoSomething"
From the above he posted.
It's not it though afaik
You can kinda get this with:
object:getObjectName()
It doesn't use the same names as instanceof(), so IsoDoor will just be Door and such. can filter using that.
:getClass():getSimpleName()
gets 'IsoPlayer' from getPlayer():getClass():getSimpleName()
@ancient grail
keep in mind this won't work outside of debug mode, so it's no good for anything except debug tools/testing
I'm trying to get the user to shout something & while it seems to display a message above their heads, it isn't in the shout text color + it doesn't seem to attract zombies, regardless of whether it is done via Say or SayShout
getPlayer():SayShout("This seems like the spot...")
Does anyone know the additional command that is necessary to attract zombies?
sorry for barging in like this I just had a quick question i'm sure someone's had to deal with before
oh? that sucks
yeah, a couple of the reflection-y things are locked behind debug mode by the exposer
calling Method objects or writing to Fields are debug only, is getClass() the problem here?
i see code for exposing getName and getSimpleName only if debug mode is enabled
i imagine getClass() is always fine, but that none of its methods are exposed normally
(and those are the only two methods that are exposed even in debug mode)
if (Core.bDebug) {
try {
this.exposeMethod(Class.class, Class.class.getMethod("getName"), LuaManager.env);
this.exposeMethod(Class.class, Class.class.getMethod("getSimpleName"), LuaManager.env);
} catch (NoSuchMethodException var3) {
var3.printStackTrace();
}
}
rip
I believe using tostring on an object returns the class name @ ref #
you could string manipulate it to remove everything after with the @
Might not look like it but this is what peak debugging looks like
All debug panels now undergo process that makes them save layout (position and if opened or not)
as well as changes their button behaviors to close open windows
going to make right clicking the button reset position and move onto another feature
if anyone has ideas feel free to share / post it on the github ๐
Having one more small issue.
local trap = IsoTrap.new(null, zombie:getCell(), zombie:getSquare())
Where null is, I have to grab an instance of a HandWeapon.
While it literally doesn't matter where or what, without it it won't work.
I can use the other constructor that only needs that zombie:getCell() part but trying to move it in place with AddTileObject(trap) is throwing errors.
Let me try again now that I fixed things up.
after searching through the code it seems like it was
AddWorldSound(getPlayer(),radius,volume);
no idea if this is in fact correct but it has the intended effect
God I
LOVE
This documentation
It's so detailed
N shit
I know exactly what n5 does.
Or what it is.
Probably volume.
Might also be able to do something like WorldSoundManager.instance.addSound(ObjectSource, X,Y,Z, Range, Volume)?
But why?
it is only exposed in debug mode
You can refer to one of my mods
It doesnt have a good audio which people complain ant it. But its a working model of what you are after https://steamcommunity.com/sharedfiles/filedetails/?id=2879848416
Thats so godly
One better way is to delay the explosion just slightly.
So it looks like it's chaining between all zombies, and not doing it all the time.
Too late to record that but will post it tomorrow.
Or like call a thunder from above then explode
overscope.
Nyahaha
That being said, ngl, I might make some "special" zombie mods or something.
Where there's a small chance to spawn some absolute gamers.
That will be nice
personally, the one above would have to glow red and sizzle or some shit.
Overscope
I need some visual indicator either way.
๐ค
I saw some of the code and there's a few ways now that I know a lot of the java is accessible.
My issue is the lack of documentation, and the fact I have to flip flop between lua+java and dive into example code just to figure things out.
I genuinely might end up having to make my own.
To have a way to have everything in one.
Makes me also want to make a flamethrower.
Lmao
Most ssrver dont allow firespread tho
Because fire spread is OP for various reasons.
honestly that sounds like a plus
flamethrower would be annoying as hell with fire spread
I don't know exactly how flame works.
But it's like a parasite. Every time it spreads, it attempts to split it's intensity to spread more.
The kicker is, you can simply just tweak the initial intensity.
And it shouldn't spread too much.
Other kicker?
Zombies that are lit on fire don't give a fuck.
And they take too little damage from it and it lasts so long.
They effectively are burning torches that simply set the ground on fire over and over with no ill regard.
That's my theory anyways.
pretty spot on
Nice.
Honestly, a mod or tweak to how long zombies are on fire for, (and damage to compensate), and maybe limiting intensity on the fire they spread themselves, might help.
Then some server variable to modify how much intensity lowers over time.
As long as zombie damage is consistent that would help wonders.
I'm actually not primarily a programmer, am a game designer. Have a degree and everything. Looking to join a studio atm actually.
So this sort of thing is quite literally my profession.
honestly. a lot of people focus on player related mods so it would be cool to see some zombie related ones. as much is there is some already. like the ideas
so many more good ideas to come to life yet
I've honestly wanted to focus on combat related ones. This game doesn't focus on combat, which is by design of course, but I had some brainstorming on another discord for a resident evil esque conversion.
I think the only two things were.
1: Like uhh... combat stance movespeed set minimum to nimble 4, and nimble affects some sort of dodge roll move.
2: Wesker runs around the map and if he finds you he immediately one shots you and "gibs" your body, all the items on you disappearing.
tostring(OBJECT):match('[^.]+$'):match("(.-)@")
```This will pull apart the tostring for object's classes - dependent on how tostring is defined in java though
And his theme song plays if he is anywhere remotely around.
Neat.
Imagination on pop culture is always fun.
Feel free to @ me for anything fam. Night.
I made Inventory Tetris' UI much prettier and pixel perfect.
Just need to figure out an equipment UI now...
that looks good dude
Has anyone seen this before?
WARN : General , 1674539805377> 46,873,619> MeshAssetManager.loadCallback> Failed to load asset: AssetPath{ "WorldItems/natojerrycan" }
{
mesh = WorldItems/natojerrycan,
texture = WorldItems/natojerrycan,
scale = 1,
}```
{
DisplayCategory = VehicleMaintenance,
Weight = 1.6,
Type = Normal,
DisplayName = Empty Nato Jerry Can,
Icon = 20L_nato_jerrycan,
SurvivalGear = TRUE,
WorldStaticModel = NatoJerryCan_Ground,
Tags = EmptyPetrol,
ReplaceTypes = PetrolSource NatoJerryCan,
}```
Exception thrown java.util.concurrent.ExecutionException: java.io.IOException:
this looks sick ๐
I'd take notes from neoscav
could even make those grids smaller
Grid render settings are gonna be user settings
cool, but to clarify I meant the nxn
Oh like the grids themselves?
Yea, they are definitely gonna shrink. I haven't finsihed stack support and equipped items still take space.
I'll shrink them once I resolve those problems.
interesting
settings.TEXTURE_SIZE = 16;
settings.TEXTURE_PAD = 0;
Gonna have these in an options menu
Those are the micro settings lol, default is 32 / 4
Looks real nice. Will the available grid slots be hard-set for bags and whatnot, or will it dynamically grow as needed?
It will be set
I'm gonna see about making some bags "TARDIS"s, bigger on the inside.
Like, a medkit will be 2x2, but hold 5x5, but only take med items
Same idea for gun cases and stuff
To make this not a huge pain, double clicking a container will open a popup window for it, and you can drag and drop its items without needing to equip it
that makes sense. however, this might make looting very hard if bags are set in size, especially for the smaller items. the choice between keeping a paper clip or a pencil would become a real one. unless smaller items that just weigh about nothing are handled in a different way. like a "general pocket" or something
Without bags I don't want the player to be able to carry much. I guess the default pocket size can be a sandbox setting though.
i for sure support that part. I strongly dislike that we can go crazy on some zombies while "carrying" a few gallons of milk on our person. lol
Also the end goal has equipped items not taking up pocket space
So if you find, say a 4x4 item, you could equip it in your hands instead of a weapon.
So risk reward decisions if a player wants to be greedy
I definitely get that. However, there are a lot of just small items, especially if we include modded items, that are just really small but are useful. So, if i have a backpack that has 10 set slots but can carry 12 pounds, i can only put 10 small items in it that even if combined the items weigh a total of, say, 1 pound?
Good backpacks will probably be in the range of like 8x8
I might have missed it, but in case nobody's explained this to you, the lack of doc and vaguely named variables is due to the fact that the code is decompiled. Not in its original state. Local variable names (e.g. param names) get lost.
O right
Compiling all of it in one page and place would help wonders imo.
Like I said might end up doing it.
I got you. I'll leave you to it then. ha
Its all future work, balancing the size of items and packs. But I'll make sure players can reasonably loot large amounts of small items. Its a valid concern.
Item stacking will probably play a roll too
item stacking will definitely help. possibly based on item weight or something, so you can stack 10 paper clips but only 2 cans of peas.
Does anyone have a guide for opening 16262 properly? P sure I tried following one but friend today told me he is still getting the warning about it being closed.
do you have full control of your router?
Yes
Windows firewall / Antivirus Firewall / Router Port Forwarding with local IP check - what else?
Anyone got the id for the high visibility vest?
Base.Vest_HighViz
Ty, never would have guessed it was Viz
I'll double check all three later
Hey folks, modding for the first time here. I was looking into doing a small balance change for my first mod, but it turns out it's a bit more difficult than I expected.
I was looking to increase the effectiveness of Spare Engine Parts when repairing an Engine. It fixes like 1% of the engine atm and I wanted to put a 10x modifier on that so they repair more.
I noticed that vehiclesfixing.txt doesn't actually contain the Engine fixing requirements, and I thought that'd be the place to make the change, but I'm clearly wrong.
Where is this particular bit of code handled? How would I go about finding it?
okay i give up, dont care if anyone makes fun of the code, is using sandboxVars fora value in a DoParam arg not possible?
local bookItem = ScriptManager.instance:getItem("Base.Lightswitches_fordummies")
local player = getPlayer()
local bookLevel = SandboxVars.Nipswitch.Booklevel
local skillLevel = bookItem:DoParam("SkillTrained = Electrical")
local isLevel = bookItem:DoParam("LvlSkillTrained = bookLevel")
local zapLevel = player:getPerkLevel(Perks.Electricity)
local correctLevel = zapLevel >= isLevel
function nipboxOptions()
local pageLength = (60 * SandboxVars.Nipswitch.Pagelength)
if bookItem then
bookItem:DoParam("NumberOfPages = pageLength") else
if pageLength == nil then
pageLength = 8
end
end
was too lazy to cut out the locals from other functions
Hey. Wanted to know if there's any documentation about the render engine out there.
there are some guides in general. one sec ill try to find big link
#mod_development message most of what is out there
Thanks
np
fenris and mr bounty guide are good starting points and the libraries also helps because you can search thru decompiled code
also not sure about how to make engine parts more effective, but the code for taking engine parts can net you more engine parts per mechanic level and condition level of engine
That's a good way to look at it - instead of making engine parts more effective, make them more common. I could increase the spawn rate, that seems like it'd be easy. The part about getting more engine parts when dismantling an engine may take some digging to find, but good idea. Thanks.
function ISTakeEngineParts:perform()
ISBaseTimedAction.perform(self)
self.item:setJobDelta(0)
local cond = self.part:getCondition();
local skill = self.character:getPerkLevel(Perks.Mechanics) - self.vehicle:getScript():getEngineRepairLevel();
local condForPart = math.max(20 - (skill), 5);
local args = { vehicle = self.vehicle:getId(), skillLevel = skill }
sendClientCommand(self.character, 'vehicle', 'takeEngineParts', args)
Make lots of parts
Gears tube pipes shafts cylinder belt etc
You'll have to do it during an event like OnGameBoot or something. should be able to access Sandbox vars then
thats how i have it ๐ฆ
er, game start
Nipswitch = Nipswitch or {};
Nipswitch.Commands = Nipswitch.Commands or {};
local bookItem = ScriptManager.instance:getItem("Base.Lightswitches_fordummies")
local player = getPlayer()
local bookLevel = SandboxVars.Nipswitch.Booklevel
local skillLevel = bookItem:DoParam("SkillTrained = Electrical")
local isLevel = bookItem:DoParam("LvlSkillTrained = bookLevel")
local zapLevel = player:getPerkLevel(Perks.Electricity)
local correctLevel = zapLevel >= isLevel
function nipboxOptions()
local pageLength = (60 * SandboxVars.Nipswitch.Pagelength)
if bookItem then
bookItem:DoParam("NumberOfPages = pageLength") else
if pageLength == nil then
pageLength = 8
end
end
local old_isValid = ISReadABook.isValid
function ISReadABook:isValid()
if bookItem and skillLevel and bookLevel >= zapLevel or player:getAlreadyReadBook():contains(player:getFullType()) then
local txtRandom = ZombRand(3);
if txtRandom == 0 then
player:Say("You just don't get it...")
elseif txtRandom == 1 then
player:Say("You go cross-eyed when you try to read...")
else
player:Say("You feel like a complete potato...")
return false
player:forceStop()
end
elseif bookItem and skillLevel and bookLevel >= zapLevel then
if bookLevel == nil then
bookLevel = 8
end
end
end
end
Events.OnGameBoot.Add(nipboxOptions)
don't mind the second function atm i'm not done lol but thats entire thing atm
What do you mean
as the value
you can do it during OnGameStart is what i meant. my bad
The problem is theres no event for when u click save on sandbox so you have to have another function that reloads the var
This is what @fast galleon and wre discussing
oh the hot update thingy
Ye but then she has to restart server everytime for the vars to take effect
You can make it everyhr i guess
But you know doparam only changes future instances right
i thought it just updated the same value from scripts
if you remove
like if i have no page length for my book? i do have failsafe number in place in case it doesnt get the sandbox but im going to have to figure out that event
and apparentl DoParam
lets be real. im actually clueless about way more than that ๐
local script = getScriptManager():Find('Katana')
If ticks % 1 then
script:DoParam('Icon = apple')
end
if ticks % 3 then
script:DoParam('Icon = orange')
end
if ticks % 5 then
script:DoParam('Icon = potato)
end```
Not sure but this could work on tick
Make the icon animate
lol i just want to set a variable page length via sandbox options
so you can set from 10 seconds to 10 mins
Yeah i know i just remember wanting to do something like this
that icon thing would be trippy lol
Yeah haha
Should be used for weeds
Weeds item
Lol iterate all the items snd make their icons jumbled up by random any other icon ingame
Imagine how broken your invontory would be
Probably a good negative trait mod
Ow its not going to work cuz everyone else will be affected
So its just another way to break the game
also i am reading back and i only see mention of how DoParam just overwrites the value permanently?
same effect as item script
yes, for new items after activated the mod
time to test again lol
oh shit i got it so it wont let it use the item haha
sick
never though i'd figure that one out
Figured what out
well nothing anymore lol...... it's borked atm
it wasn't allowing me to read the book via context menu tho
supposed to check Perks.Electricity and if it's less than or equal to the sandbox option, it's supposed to trigger
cool 
Website made for see all stats from a Steam User in every game
Popout containers done!
full container of keys will fill all cells? or are they dynamic?
possible for a key to close all inventory container or left clicking in nothing could possibly do that please.
Because to much containers to close x)
There will be a hotkey to close the active popups. Closing the window the popups are from, or changing what container is being viewed in the main window, will also close them.
Containers will have limited space. The sizes seen here are not final.
niiiice
Is there a way to see how many items of a given type are present on the map? Or is the loot distribution not generated when the world starts but instead somehow "dynamically", while the players are exploring?
im trying to use sendclientcommand to change the animation of the playerr and make it visible for other too
my question is on the anim xmls can i use integer as a condition
so like instead of using boolean ill just input integers that represent diffrent action
there its currently working as booolean but what if i have number of possible states
I think you can use STRING and just put "1", "2", "3", etc
<m_Type>STRING</m_Type>
๐
Thank you thank you
how can you craft a moveable through a recipe or rather what do i have to parse as the result?
while that IS dope af. you are gonna run into the "bag of holding" issue. try not to let them hav stuff in bags at like layer 2 ish
The plan is for bags to take up as much space as they hold.
Special containers, like lunch boxes, gun cases, medkits will be bigger on the inside, but placing containers into them will be forbidden.
I haven't made the bags huge on the outside yet because it would impact testing too much until I get the equipment ui done
well i get that, but technically, you could collect small bag and infitie loop them into each other and still have room in each bag for stuff.
that happened in another game i worked on.
my record was 237 small backpacks inside each other.
take a look at ISMoveableSpriteProps.OnDynamicMovableRecipe, should give you a good starting point
Thanks but i already figured it out
No idea if its correct but it works
๐คทโโ๏ธ
I don't really have an issue with that, the weight system is still in play.
well like i said, it LOOKS great, and i hope you do get them working right ๐
just remember if users CAN abuse it, they WILL lol.
When are yall gonna make the super ultra duppa omega incredibly amazingly rare loot chances mod? ๐ค๐ค๐ค
super ultra rare loot mod
Just deletes distributions
Loot this, you filthy casual
Was going to say the same thing
Then just have admins place loots
Zombies drop 1 tin can each, and you have to craft your way up
An XML schema would be useful for editors like VSCode to let you know what's supposed to be in a tag.
Thank you sir jab
I might make an xml style spread sheet of documentation if I do end up going for that project.
So it can be turned into a vscode linter.
Which would make things so much easier.
vsextensions though uaaaaa
Go for it. I was eventually going to.
just finished this
https://steamcommunity.com/sharedfiles/filedetails/?id=2922940329
I meant like a skyblock system - where it just arbitrarily needs stuff to keep going
Basically turn looting into grinding
Or better yet borrow the (please God change this) fraction system some furniture uses
Oh you found a sledgehammer? No it's sledgehammer (1/2), sucks you already found (1/2) and not (2/2).
This would be a pretty good April fool's mod ๐ค
Everything is split in to multiple pieces.
You need an IKEA manual for each item and a turning tool to assemble them.
Craft time scales to relevant skills as well
Truly a hard core experience, tarkov has nothing on this
bookItem:DoParam("NumberOfPages = " .. pageLength)
also, you want this block
if pageLength == nil then
pageLength = 8
end
```before the doparam, not after
and to get around sandbox options not being loaded i would do it on OnInitGlobalModData, not game boot or anything
haha did fix that part but it still not working for some reason
it's okay to use it that way though? with a local keyword for the arguement?
with the sandbox option
yeah you can do that, many of my mods do it
okay i figured. i'll try that and see. i couldnt get the page number to update also after a couple of restarts. ill use your method like i did for loot . even tho i changed the code a little the method you gave me works well
i got the spawn rate at min to be .001 and at max to be 68%
thats about as perfect as it gets id say
OnInitGlobalModData is usually the best event for sandbox option stuff, it's called after sandbox options are loaded but before most things get set in stone
that itempicker thing was neat also
i saw it working its little magic
i love visual feedback lol
thank you also. appreciate. hoping to get all these options done today. i think doing recipe material amounts has to be easier than these options
is the goal of forceStop() to cancel timed action? seemed like it but using it was inconsistent for me . i'll keep messing around with it either way for now
it def is... i wonder why it's being weird for me. just wanted to test it to see if i can stop any timed action using it. got a couple ideas with random text
im still getting this callframe error for improper usage of LvlSkillTrained
local isLevel = bookItem:DoParam ("LvlSkillTrained = bookLevel")
local bookLevel = SandboxVars.Nipswitch.Booklevel which is an integer
isn't LvlSkillTrained the required level to use the book? or did i catch that wrong..
You're setting it to the string "bookLevel" that way
do i .. ? lol dammit im going to have to hit the lua manual
You'd want to concat the string with the intended value
ahhh alright
"variable = "..value
.. is like + for strings
You can concat strings and numbers onto strings
Can't use booleans without toString()
oh perfect im about to use a boolean here shortly too ty
really appreciate that insight
No problem
any idea how to add evolved items recipe using vanilla items
imean im currently speaking with saph and shes got this error and looking at her code ithink its cuz of the item tweaker
You can use doparam for evolve recipe right
doParam is exclusive to item scripts afaik
You can use recipe manager to manipulate recipes - I'm not sure about evolved
evolved recipes are created from the item scripts
items define which recipes they go into, not the other way around - kind of weird
so if i wanted to use sandbox option to change the amount of each item to craft, i'd have to figure out a workaround through items?
page length working now also, whew
Ah, that's interesting
ayt so the thing is solved...
for discussion purposes heres what happened
--BaseItems
TweakItem("Base.Soysauce", "Tags", "Soysauce")
--Thermos
TweakItem("Coffee2", "EvolvedRecipe", "SapphCooking.ThermosBeverage:5")
TweakItem("Teabag2", "EvolvedRecipe", "SapphCooking.ThermosBeverage:5")
TweakItem("Sugar", "EvolvedRecipe", "SapphCooking.ThermosBeverage:1")
TweakItem("SugarBrown", "EvolvedRecipe", "SapphCooking.ThermosBeverage:1")
TweakItem("SugarPacket", "EvolvedRecipe", "SapphCooking.ThermosBeverage:1")
TweakItem("CocoaPowder", "EvolvedRecipe", "SapphCooking.ThermosBeverage:1")
TweakItem("CannedMilkOpen", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("Milk", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("SapphCooking.AlmondMilk", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("SapphCooking.PopbottlewithMilk", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("SapphCooking.BottlewithMilk", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("SapphCooking.ColaBottlewithMilk", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("SapphCooking.ColaBottlewithProteinShake", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("SapphCooking.BleachBottlewithProteinShake", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
TweakItem("SapphCooking.PopBottlewithProteinShake", "EvolvedRecipe", "SapphCooking.ThermosBeverage:2")
thats her original code
local Script = ScriptManager.instance:getItem("Base.RedRadish")
Script:DoParam("EvolvedRecipe = Soup:3;Stew:3;Stir fry Griddle Pan:3;Stir fry:3;Burger:3;Salad:3;Roasted Vegetables:3;YOURITEM:int")
we modified it
by doin this instead
sharing it here so other modders that encounter the need to modify evolved recipe can do this method
this is what i learned from the great albion
DoParam
this is exactly what i'm looking for so thank you
Sorry i didnt know you needed the same thing
no worries! i'm working on a slew of sandbox options so it changes as the days go on lol
has anyone tried reading binary with the BufferedReader returned by getFileReader()? kinda curious if the call from Lua would mangle it or not
i don't have a specific use case in mind, just curious
Thats useful
Sorta likr erosion
hey, does anyone know how high is the overhead when having the -debug mode on?
Whats the overhead
as in, how much it slows down things
Not much just for running in debug
If you are having performance issues. The difference between debug and not, will not be your fix
it's mostly for benching to subtract the difference in a more meaningful way
Ahh fair enough. It shouldnโt make a drastic difference
Hey if I wanted to create a mod that teleports someone after they right click on an object to another location. How would i go about doing that?
I mean, this isn't that drastic of a difference as I'm making out to be, but still
There are a few mods you can find as an example Wilson
Like bus ticket. Interiors. Basements
I looked at some of them but it didn't really help me out. Do you have any specific mods I can look at to get reference.
if u want to bench 2 or more functions then u just want to know which func is faster so doesn't matter even if debug is a bit worse than debug-off cos ur benchmark tests will in same condition
Those are names of mods on workshop
true that, but I'm mostly testing for stutters more than average performance
and I can't really account for how and when a stutter because of something random will occur
wdym?
during normal gameplay, some stutters can occur even on vanilla, I guess when some stuff is not cached
If I wanted to change as an example the Bus Ticket to an actual object how would I go about doing that. Without having to use an item
Itโs map pao
now I'm testing a mod that changes stuff during the generation of the world
Save chunks
thank you
in vanilla code 90% not optimized one
Lol
like this XD
still, that's what I was asking, if debug added some overhead over it inducing more stutters
yeah ew
just use basements as your reference then because it does exactly what you are asking
Goodi.
it's well documented on its usage as well i just seen
I remembered one thing that might be useful for someone
*however, I am not certain if this is the same for kahlua
https://gitspartv.github.io/LuaJIT-Benchmarks/
LuaJIT Benchmark tests page. Made for understanding the results and for optimization solutions.
This gives me the yanderedev elseifs vibes
That's vanilla?
yeah
legacy code ha-ha
I am pretty sure that as bad as LUA is you can do a simple for loop
it can be done by 1 line and 1 function
they have self created function perk:getTotalXpForLevel()
LMAO

Not sure where to ask, post ignored in main channel. I'll try here.
Any opinions on best map mods that seems most balanced? Also crafting and item mods ? Looking for more depth..like mods that could add resource mining for metals like copper etc, smelting, manufacturing metal weapons.. or even mods that just add more weapon variety to loot tables?
I think Firearms B41 or something like this is well regarded as a mod that adds extra guns while being balanced
more positive feedbacks on mod page > good mod
so just search by any words and check feedbacks
map/craft/crafting/tools/metalworking/firearms and etc
Fair enough guess I'll just try a few random ones with good feedback. ๐
๐
my process tends to go like this for a game I'm not familiar with:
- find very popular, highly acclaimed mod that I think I'll like from the sounds of it, or that I've tried and know that I like
- click the button that says "in X collections" on the right side
- sort collections by popularity
- pick through any number of collections to find mods that seem similar in quality or that seem like they create the kind of gameplay i wanna have
tl;dr someone has probably already done a lot of the heavy lifting for you in the form of a collection, just piggyback off of their efforts and tweak as needed
@finite radish oooh thanks never knew about the collections button ๐
Anything related to characters and or old enough has some less than ideal stuff - but if it works it works
I'm looking forward to the polish update
Does anyone know if zpopSpawnNow() respects all player's locations in a chunk
I know it safely spawns zombies inside a chunk around the person that called it in debug mode but I was just wondering if it will spawn zombies on other players by accident
but works poorly 
btw 4 days before played in mp with my friend we ran along the road and game spawned zombie exactly on our position > death in 0.1 sec
what the fuk...
Yeah, there's a section in addXP that is a giant if or which could be if category = combat or = aiming instead it's if blade if blunt if stab if if if
My guess is it was an old thing changed or in progress work that got pushed to the back burner
Same for the XP if chains
ยฏ_(ใ)_/ยฏ
Yep
I think the UI stuff creating new instances without needing to is probably something worth tracking down
I haven't checked the rest of the UI but debug stuff is pretty bad for that
But debug stuff isn't really a priority to optimize either ๐คทโโ๏ธ
when i lowered the spawn rate i received an exponent and the % is def not 5%. anyone have experience, as long as it shows, even if showing as exponent, it's correct? guess i could kill a crap ton of zombies to see if it still spawns
i lowered the roll from .001 to .0001 and it went from .01% to this
so even though its showing 5% you think it's just not right
i'm guessing it's like a tens of thousands decimal
It's not showing 5%
5.030429209432094
Note the E
ahhhhh well thats exactly what i want
5 to the power of -5
No worries, not something you'd know as common - the scientific notation that is
time to kill 500 zombies and see the chance and if this roll is just a facade lol
If you spawn with no zombies in the world the loot chance goes up by 40% if Im not mistaken
I think higher pop is more loot? But no zombies changes the formula
I could be wrong as the math gets thrown around a bit
yea for sure. nothing some testing cant clear up
thanks for that lol thats actually good ass info
lua needs switch statements 
congrats on making the mod!!
i saw it pop up in a different channel being sung praise
Typescript has switch tables.
const vitamin: string = "A";
switch(vitamin.toLowerCase()) {
case "a":
console.log("Spinach, Carrots, Sweet Potatoes, Mango");
break;
case "b":
console.log("Meat, Fish, Milk, Cheese, Eggs.");
break;
case "c":
console.log("Oranges, Kiwi, Lemon, Strawberries, Tomatoes");
break;
default:
console.log("No sources available.");
break;
}
Switch tables.
for lua can do it
local op = {
[1] = ...,
[2] = ...,
...
}
op[any_key]
Lookup table.
Lua is fun.
lua is powerful 
Lua is wieldy.

lua is life

btw idk why in ur typescript guide said lua have no oop, in my mind metatables is good for it
You need to apply OOP. It is not provided out of the box.
You can absolutely write OOP Lua.
I did this for many years while PipeWrench wasn't a thing.
so there's oop 
No. It's implementable, not implemented.
๐ฅบ
metatable is basically prototype from JS, ignoring the nuance.
Lua acts a lot like ES5 JavaScript conventions.
nah, anyway u can create oop so it's fine
This I'd recommend for the smaller projects for sure.
You don't need Typescript to do simple mod works.
If you're writing an API or framework of sorts, I'd recommend TS over Lua.
Since I almost always write utilities that scales, I'd need TS probably more than anyone.
At least I'm realistic about how I market my stuff. xD
but for pz u can't run exactly ts cos as Ik u anyway re-comp it to lua, it isn't?
You compile to Lua using TSTL with my solution.
so on output it's lua anyway
They provide a conversions / operations library alongside the compilation of their own OOP implementation with Lua.
exactly for pz don't see any reason to use ts only if u originally ts developer and it's easier for u
As a note, I'm writing my nifty little HTML project in TS because it obviously needs to keep a consistent design.
I'd openly recommend, support, and even help the devs if say they used Typescript to rewrite their ISUI library.
Oh you meant a TS dev in general.
I am one btw.
People do struggle with Lua and functional design.. I've had C# and Java heads come through and use TS.
I got why u using ts instead lua
"Having options" is the ultimate goal.. not specific options. =)
didn't work with ts but I think with ts it's much easier to code than on lua
if to select between them
It's nice to have a compiler layer to yell at you when you do something wrong or the API updates with PZ and the call errors out. (You won't waste time figuring out where and what changed)
due to code structure
AH, yea
I forgot about it
This is the biggest win for me if I were to win myself over with TS.
for pz it's crazy thing
That and docs.
I had the silly idea of implementing an entire Electron app designed to write out JSON data for baking in third-party documentation for missing documentation in PZ API.
Got that all working.. but never announced it. xD
50-60 hours of work gathering dust.

sounds cool
wow
๐ x3
mb I'll do same thing for lua cos it's really speed up modding by several times
already have some ideas for it but sadly can't spend time for it yet
when u have a few projects and can't select which of it to do it's killing 
You can use my common document JSON format.
sure it will be done by json way
Yeah I'll need to write the schema for it.
Here's my current example.
still waiting to someone make my mod idea happen
im waiting for like 1 months or more
what's the idea?
i will tell in dm
why don't you make it yourself, then? 
because im alot busy
yea, yea
why not just post it public. lol
ooh where?
I'm probably not the first to suggest it, but it would be amazing if there was a mod that adds the clickers from the last of us to zomboid, with their respective characteristics of being blind, with great hearing and super strong.
I leave the idea here but surely it is not the first time that someone suggests it
best to search the workshop before giving up hope :D
wow honestly i searched a lot and found nothing about it.
thank you
is there a guide on how to add custom sounds?
Anyone made a speedhacker zombies mod yet?
Where they animate like 3 times faster and just ZWOOP to their destination?
as I remember Chuck said there's no way to do zombies faster than runners
does anyone have any idea how one would go about adding hand pain to swinging long blunt weapons e.g Baseball bats?
u can to slow them but don't faster
thanks

You guys are gonna make me take on this challenge, especially if Chuck is someone good.
He is
he is good
just the image to don't ping him heh
extremely bizarre to expect some random person here to make your mod for you for no reason. Especially when you try to keep what the idea is secret for some reason. Thats all I'm gonna say cuz I'm busy and passive aggressive
(obvs not talking about thegandalf)
I don't understand, I have this server side
And this client side
But it doesn't print the receive part, i'm in single player it driving me crazy
u sending servercommand from client
u have to send clientcommand
and receive clientcommand too
I'm sending servercommand from server
whoops
in singleplayer, for these purposes, it is considered only a server
sec will think then
it's a little frustrating really
Does it mean servercommand don't work in SP ?
Anyone know where the descriptions for professions come from? Like when you make a character and it gives the the stats like "+2 Cooking" and also a short description?
I have a profession working right now, it has a working icon, it actually gives the stats I assigned and free traits, but the description is totally blank
u in sp? u need to send command in mp. is sp u is the server and have 1 realm for all
it seems send client command work tho
u can use it to check realm #mod_development message
it's still annoying that client commands do work, and server commands don't: ideally you wouldn't have to write different code for singleplayer
Okk ty
if sp just do it, if mp send to client/server and just do it there
increasing the animation speed should enough via AnimSets
random question, how much faster is running a local func compared to a global one?
I'm not sure about kahlua but in pure lua 5.1 is x1.1 faster
Figured it out, you can do it in the lua via the "setDescription" method
oh right it's a different flavour of lua
Tempting to go into Kahlua and improve it lol
(again)
it wasn't really a scientific test, but i tried some of my code with all used functions pulled into local against my normal code and i found about 20% faster
that's not bad at all
if your code runs a lot i strongly recommend it
I'm trying to rewrite generator repair functions to allow repairs to greater than 100 condition. Changing generators' initial condition was fairly easy but holy crap I'm out of my league with overriding vanilla functions. https://github.com/genchadt/improvedgeneratorlongevity/tree/alpha/improvedgeneratorlongevity/Contents/mods/improvedgeneratorlongevity/media/lua/client
Gonna leave this up and hope for someone with a bigger brain to critique because mine is exhausted ๐ฉ
your timed action is derived from the original? don't you want to override it?
Hello there
I need to change the radius of pipebombs in game to one cell, and I need it to work in multiplayer, could someone help me maybe?
local t = type
t()
-- faster x1.1 than
type()
local string_format = string.format
string_format()
-- faster x1.2 than
string.format()
even just referencing standard methods help?
wdym?
nothing special about standard lib, it's all global
mh
so pulling it into local is faster
coming from "normal" compiled languages this seems so unconventional
but I guess it makes sense
btw local string_format = string.format "greedy local" way is not always better exactly for big file cos lua have limit for local variable and in big file with much localized vars u can beat this limit
the biggest problem i foresee with this is that you can't give a generator more than 100 condition even if you change the lua
the java setCondition() will limit it anyway
The game seems to allow 100 condition as I've run my mod before to set gennies to 200
They show up in-game as 200 condition and run down from there, but as soon as I attempt to repair them they reset to 100 :/
So that tracks I suppose. Thanks for saving me more headaches from this. Hopefully the devs will add a feature to change genny longevity as they have done with lightbulbs
error 

local aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,ea,eb,ec,ed,ee,ef,eg,eh,ei,ej,ek,el,em,en,eo,ep,eq,er,es,et,eu,ev,ew,ex,ey,ez,fa,fb,fc,fd,fe,ff,fg,fh,fi,fj,fk,fl,fm,fn,fo,fp,fq,fr,fs,ft,fu,fv,fw,fx,fy,fz,ga,gb,gc,gd,ge,gf,gg,gh,gi,gj,gk,gl,gm,gn,go,gp,gq,gr,gs,gt,gu,gv,gw,gx,gy,gz,ha,hb,hc,hd,he,hf,hg,hh,hi,hj,hk,hl,hm,hn,ho,hp,hq,hr,hs,ht
The fact that programmers here know these nuances with Kahlua makes it worth randomly popping in and reading chat.
max locals in a lua file is 200 or 256
Can't remember.
200
per single file?
yes
Per lua unit yeah
I think loadstring() operates the same as a file in that limit.
I like this limit because you shouldn't ever need 200 variables in one unit.
I think without any manipulation it can depends on OS but not sure
It's a real Lua thing. (I'm sure you of the people here know this one)
I wouldn't touch it.
I'd make it 100 tbh.
yeah, 200 locals in the same scope sounds like you're not doing things right
(My rule is that if a Java file is over 1000 lines long without documentation or over 2000-2500 lines with full documentation, it's too large and has to be divided up)
brita's weapon in single file with all functions greedy localized 
I'd have a field-day with classes like GlobalObject and GameServer.java xD
i think having more files looks cool LOL
that's why i do it... it definitely makes things more readable but i just think it's cool
what's the meaning of "greedy locals"? I'm not sure I understand
i don't work on a scale for it to matter too much anyway
local string = string
string.format()
-- greedy way
local string_format = string.format
string_format()
it's greedy cos with first way u can local only string global table but with second one u need to cache each function that u will use
1 local < 1+ locals
isn't that a better approach if you're gonna use that func frequently?
I mean, for performance
better performance with greedy way
but messier
as I said problem is 200 limit of local vars but it's not real problem cos idk when u will have more than 200 locals in single file 
so better always do second way
u can to local class methods too
local item_base = getmetatable(InventoryItem.class).__index
local item_getName = item_base.getName
item_getName(item) instead item:getName()
there's a getmetatable ๐
sure
i didn't know and wrote my own :(
XD
?
getmetatable = function(class) return __classmetatables[class] end
or did you do smth else?
it took class name as a string
so like
local IsoPlayer = Starlit.getMetatable('IsoPlayer')
what's the source?
like it?
sorta
sure, best to rename it anyway if there's already one

Hello all, I have a question - is it possible to write a mod that skips the main screen and immediately starts a single mode?
sp runs all
Oh
and sp and mp runs all folders
in mp client won't run server folder as Ik
but server will run client one
correct me if I'm wrong
client and singleplayer runs all three folders, server runs shared and server only
i'm stumped. i'm trying to get the current electrical level
using ```
getPlayer():getPerkLevel(Perks.Electricity)
am i using this wrong?
that looks right
okay it must be the way im using it i guess lol
i tried using your method of global overwrite or psuedo overwrite or however and i couldnt get it working
so then i went even crazier
for book context menu
local bookItem = ScriptManager.instance:getItem("Base.Lightswitches_fordummies")
local player = getPlayer()
local bookLevel = SandboxVars.Nipswitch.Booklevel
local zapLevel = player:getPerkLevel(Perks.Electricity)
local lowLevel = "bookLevel <="..zapLevel
local goodlevel = "bookLevel >="..zapLevel
local menus = {
player.invMenu.context:addOption(getText("You just don't getit..."+self.invMenu, nil )),
player.invMenu.context:addOption(getText("You go cross-eyed when you try to read..."+self.invMenu, nil )),
player.invMenu.context:addOption(getText("You feel like a complete potato..."+self.invMenu, nil ))
}
if lowLevel or player:getAlreadyReadBook():contains(player:getFullType()) then
local txtRandom = ZombRand(3);
local selectedMenu = menus[txtRandom + 1]
selectedMenu()
for _, menu in pairs(menus) do
menu.notAvailable = true
end
selectedMenu.notAvailable = false
end
if goodlevel then
for _, menu in pairs(menus) do
menu.notAvailable = false
end
end
this is where i ended up LOL
its just saying it's nil table for zaplevel
is this code outside of a function? if it is getPlayer() is running on the main menu, where there is no player
oh oops lol im blind
yes it is thanks LOL i knew it was something silly to start at least
this stuff is making me go crosseyed at times it feels lol
Anyone have a nice set of (freely usable) transparent background PlayStation 4 button PNGs preferably at 32x32? I feel like this has to be an extremely common need in modding, so I'm hoping... haha
https://opengameart.org/content/free-controller-prompts-xbox-playstation-switch-pc
Will need to scale them down, but these are public domain
Contains a full set of prompts appropriate for Xbox Series, Xbox One, Xbox 360, PS5, PS4, PS3, and Switch (Pro, single joy-con, handheld and tabletop), english keyboard & mouse.ย These should be fully certification compliant if you're shipping a console game for the listed platforms. The artwork is in a high-contrast style and includes both vect...
do u mean button with ps logo?
Whats the difference between
Scriptmanager.instance:getItem()
getScriptManager():getItem()
@dark wedge Thanks, I found these:
Do you guys know any good events to catch if a zombie attacks a player
Thats the one
in mp it's working for players too so u'll need to add
if not instanceof(attacker, "IsoZombie") then return end
That works for zombies? Didn't know a zombie claw counts as a "weapon" lol
But thanks, I'll give it a try
used this one too, but forgot where did I get it ๐
forget it, there have to be weapon object
In the models_items.txt, some items don't have a "texture" entry like this
model EggPoached_Ground
{
mesh = WorldItems/EggPoached,
scale = 0.4,
}
It only has a mesh. Does anyone has an idea how the game knows which texture it should apply? (Also asked this in the modelling section a few days ago but no answer so far. So tried here again.)
maybe it's in the model?
Ithink ive encountered this too. Its baked on the model.
You could try and open it up using 3d dev software of choice
model know his textures
it's common sense I'm not sure if pz does it smth else way
but it's pz.. they can do anything 
Hmm, OnWeaponHitCharacter doesn't seem to work
And with disabling the player check, it would only call if the player attacks a zombie
But not the other way around for some reason
worked for me
off topic but mod related:
anyone tried arma 3? its on sale i was wondering about its workshop and why it has so many dlc.. how does that work
what do you mean? it's just a normal dlc system
dlc is a thing that always works
if you're wondering why people would pay for content when there's free mods, mostly it's just the prestige of being 'official'
Can anyone make me less confused please? ( ๐คช )
In JoyPadSetup.lua, we have:
Joypad.Texture = {}
Joypad.Texture.AButton = getTexture("media/ui/xbox/XBOX_A.png")
Joypad.Texture.BButton = getTexture("media/ui/xbox/XBOX_B.png")
Joypad.Texture.XButton = getTexture("media/ui/xbox/XBOX_X.png")
Joypad.Texture.YButton = getTexture("media/ui/xbox/XBOX_Y.png")
Joypad.Texture.LBumper = getTexture("media/ui/xbox/xbox_lb.png")
Joypad.Texture.RBumper = getTexture("media/ui/xbox/xbox_rb.png")
Joypad.Texture.DPadLeft = getTexture("media/ui/xbox/XBOX_dpad_left.png")
Joypad.Texture.DPadRight = getTexture("media/ui/xbox/XBOX_dpad_right.png")
Joypad.Texture.DPadUp = getTexture("media/ui/xbox/XBOX_dpad_up.png")
Joypad.Texture.DPadDown = getTexture("media/ui/xbox/XBOX_dpad_down.png")
Joypad.Texture.DPad = getTexture("media/ui/xbox/XBOX_dpad.png")
Joypad.Texture.LStick = getTexture("media/ui/leftstick.png")
Joypad.Texture.RStick = getTexture("media/ui/rightstick.png")
Joypad.Texture.LTrigger = getTexture("media/ui/xbox/xbox_lefttrigger.png")
Joypad.Texture.RTrigger = getTexture("media/ui/xbox/xbox_righttrigger.png")
Joypad.Texture.Menu = getTexture("media/ui/xbox/XBOX_Menu.png")
Joypad.Texture.View = getTexture("media/ui/xbox/XBOX_View.png")
Joypad.Texture.Back = Joypad.Texture.View
Joypad.Texture.Start = Joypad.Texture.Menu
This runs before all mods. Then loaded mods happen. One of my loaded mods, which confirms that it is working by writing correct output to a file, does this immediately:
Joypad.Texture.AButton = WGS.PlayStation.AButton
Joypad.Texture.BButton = WGS.PlayStation.BButton
Joypad.Texture.XButton = WGS.PlayStation.XButton
Joypad.Texture.YButton = WGS.PlayStation.YButton
Joypad.Texture.LBumper = WGS.PlayStation.LBumper
Joypad.Texture.RBumper = WGS.PlayStation.RBumper
Joypad.Texture.DPadLeft = WGS.PlayStation.DPadLeft
Joypad.Texture.DPadRight = WGS.PlayStation.DPadRight
Joypad.Texture.DPadUp = WGS.PlayStation.DPadUp
Joypad.Texture.DPadDown = WGS.PlayStation.DPadDown
Joypad.Texture.DPad = WGS.PlayStation.DPad
Joypad.Texture.LStick = WGS.PlayStation.LStick
Joypad.Texture.RStick = WGS.PlayStation.RStick
Joypad.Texture.LTrigger = WGS.PlayStation.LTrigger
Joypad.Texture.RTrigger = WGS.PlayStation.RTrigger
Joypad.Texture.Menu = WGS.PlayStation.Menu
Joypad.Texture.View = WGS.PlayStation.View
Joypad.Texture.Back = WGS.PlayStation.View
Joypad.Texture.Start = WGS.PlayStation.Menu
Where all of those are new icons (they work, not the issue).
The issue is that in the Main Menu of the game, when I first connect the controller, the game seems to reload JoyPadSetup.lua, or at least does something that causes it to reinitialize the values of Joypad.Texture, such that it shows Xbox buttons until I enter and exit the Options menu to trigger a refresh in a different way.
Does anyone know exactly where this happens so I can perhaps intervene immediately after?
~~I dont understand your problem clearly but im assuming you are having problems with refresh thats related to loadorder
Something like your mod getting overwritten by vanilla cuz vanilla re initialize ~~
Yes, that is what I am saying, but no worries if you don't know. Just asking the community in general in case someone spotted a relevant thing recently
If thats the case you might have to hook on the function when it refreshes itself ๐ค
My question above is asking if anyone knows when that happens.
If I knew what to hook, I wouldn't be asking. ๐
Mmmmm I'll try that, not a bad idea, thanks.
there're more events
I'll try a couple. Been hooking Lua functions directly to no avail.
No dice.
this event calls only in main menu
OnJoypadActivateUI - menu
OnJoypadActivate - in-game
I am trying to use it in Main Menu before joining any servers.
Not in the start menu
(Nope, I know nothing.)

Aha!
I DID know a thing!
self.abutton = ISImage:new (self.controllerLabel.x + 31, 17, 32, 32, Joypad.Texture.AButton);
This little weasel is my problem.
A moving a-button that gets initialized BEFORE joypad even EXISTS
With the original texture, of course
gonna try to hook the end of initialize and fix it...
No wait
Gonna have to just call it via MainScreen object
little shit 
wdym?
Okay that did not fix it
btw u can don't hook end of it but just put delay with 1 tick to ur event function
I mean that function uses the crurently stored Joypad.Texture for the button being set, so if they WERE using it, it would already automatically apply my textures when joypad gained focus on the menu.
Potentially revealing anomaly: 3 buttons appear to be set (improperly) before my custom textures load into the game, but the back button does not. When I start the game, it prompts me to press (A), and when I first enter Options menu, it prompts me to press (Y) or (X) as usual to apply stuff, but it actually shows Circle to go back
At THAT point, when I EXIT Options, A becomes Cross, X becomes Square, and Y becomes Triangle.
But B is already Circle.
So weird.
I don't think it's a timing issue I can fix that way. I am beginning to suspect that the texture is hardcoded into the initialise of something that initializes before any mods load.
I'm not about timing issue
Of course it reinitializes moving from Options -> Main Screen
I feel like that's gotta be a big hint as to how this happens
I mean if it's called before set variables and if u set ur variables in this event then they will override anyway
so u can wait 1 tick and set variable exactly after vanilla set
The problem is I don't know where it's set.
And I may be wrong about when.
I don't need to delay at all after it's set if I know when it is set
There would be no need to wait any ticks...
wdym where?
I mean I do not know the name of the variable
u know but it can be done like
triggerhook
setvariables
so event actual before
it's just my mind cos idk where's event trigger placed
in start or in end
Someone asked me to help them with sandbox options so I wrote a small guide, thought maybe someone could use it here eventually
#sandbox #sandboxoptions #sandboxoptionstutorial #tutorial
Ok, so to make sandbox settings you'll need 2 files and then obviously a way to reference those in your lua files. On picture one you'll see 2 files you'll need for sandbox stuff to show in-game. _EN.txt is obv translation file, options.txt is where you put stuff. options.txt looks something like this (same in all mods) - picture 2. 'Page' dictates on which sandbox page will show up. translation is your translation string, Type can be integer, boolean, double and enum. Haven't used enum (dropdown menu) so idk how that one works. Picture 3 on how values in options.txt are linked to _EN.txt (or any other translation file). Once you done stuff in first 3 pictures, you got yourself a sandbox page and some adjustable variables in it. Now you need a way of getting those values from the code. To reference value that you set up in sandbox settings, you call it by option name. So, for example, if I'd want to call my
{
type = boolean,
default = true,
page = EvolvingTraitsWorldSimplePerks,
translation = EvolvingTraitsWorld_Mechanics,
}```
option I'd call for `SandboxVars.EvolvingTraitsWorld.Mechanics` and it returns a boolean. I have a personal preference of using a local variable (picture 4) at the start of the file to skip using `SandboxVars.yourModNameHere` every time I need to grab a sandbox variable. So (on picture 4) numbers 1+2 are same as number 3. That's pretty much all there is to sandbox options.
what the solution?
Borky and incomplete lmao
Basically, when I detect a gamepad button press, if it's the first button press, I do something that I know will reliably fix the prompts: I open options and close it. The user cannot see this happen, but by doing so, it creates the illusion "Press X -> Gamepad Active With PS4 Buttons"
The problem now is that this solution is also firing in the character creation menu when trying to join a server
And that is causing a problem
So I need to better distinguish when the player is in fact in that initial menu state.
(Additionally, I have to hook the setISButtonForA / setISButtonForB functions and whenever I detect them trying to set something wrong, I fix the buttons before they set them. But this does not intervene in time to load buttons immediately after starting game, so I need both things together on that front.)
Omfg wow I just found the dumbest mistake that actually explains my headache... I was accidentally using a mod option where I meant to be using a local variable... oof.
i noticed the x_extends on the xml refers to file that also has m_BlendTime
do i need to have both ... for the file that i trigger and the extends?
also if i do getPlayer():playEmote("testt") testt is the m_Name or the m_StringValue???
ill add this to my guide list
Iirc setting zombies sight to poor in sandbox setting just reduces the chance of them spotting you, but is there any way to modify their sight range? So for example zombies would see you only if you were x tiles away from them?

Any fixes for the LuaManager.getFunctionObject. no such function "recipe_recipename" error? Had a look through the Discord but couldn't find a fix. This is from my mod and is the only mod installed while testing. Functions still work as intended yet this error appears for every recipe. Cheers
Does anyone have a screenshot showing the [gamepad] start or back button on screen by any chance? Not even sure when the game shows you that...
not sure what do you mean lol
Sorry, I mean start and select
a.k.a. Options and Share, + and -
But presumably Start and Back iirc in Xbox world.
I know what the A button prompt looks like but thank you nonetheless
maybe only in the survival guide
also, there is no start button in the ProjectZomboid\media\ui
but it appears in ProjectZomboid\media\ui\xbox
can't think of scenario to show the button
Thaaaaank you! Amazing find!
I was trying to determine whether people would be likelier to see that on a dark background if they ever did see it
Nice work
Does someone here has experience with the profession framework? I used it for my professions and trait mod and, for some reason, the game always freezes completely whenever I select a profession/trait preset... I can't pin down the source as there is nothing about it in the console.txt.
have you tried this https://steamcommunity.com/sharedfiles/filedetails/?id=2896041179
I can try it but if the game doesn't writes anything into the console.txt file (because it freezes completely) I don't think this will help. I'll try it out tho
check if you forgot { }
A complete freeze likely indicates a loop that never ends
A while loop, perhaps, or a do repeat until, or a very weirdly written for loop
Even suspected infinite loops will throw an error
What could be the source when the freeze is related to the character preset selection though? ๐คจ Are there even any loops related to it?
I can send you the link to my mod if you want to take a look yourself. I really just need to know whats the source of this problem.
I've tested other mods that use the profession framework and they don't have this problem
Maybe. If adding the profession triggers something that needs to be done and will wait forever to finish.
I don't know about in vanilla
I figured you did something unique with your profession
I did some unique things with my trait yeah but I can't say if one of those special functions is the source without the logs telling me lma
So I seeked helped from more experienced folks
๐ฎโ๐จ
Did you check the log when the crash happens?
@solid dawn
Nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
๐ญ Whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy, Indie Stone? Why this ONE prompt!???!? Do not waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaant!
Uuuugh.
I was so close...
meanwhile: while true do end

How do I check whether my game is single player or multiplayer? Can I simply use if not isClient() and not isServer() then to check whether I am in single player mode?
.
yes, but
if not (isClient() or isServer()) then
is slightly shorter lol
sometimes is Client isn't the same what any type from joining to game?
haha! logic!
And another question: ModData.transmit(String key) sends data to every client. Will the player who actually hosts game also receive those data?
Yeah if you are a host player you're a client too iirc
never google it but I think when lua creates bytecode it will should be same
yes ist just stops logging. Take a look yourself
yeah I'm sure lol I mean written it's 1 character shorter.
pointless lol but whatever
Writing "not" twice feels awk to me
it's shorted but first way more easier to get what is real condition
Subjective
If you know your DeMorgan's law well, it's identical
Also, some conditions read more naturally as "if not (this and that)"
if not (poor or stupid) then increaseOddsSuccess() end
Pretty sure that condition is easy to follow
I'm sometimes getting confuse when creating a bit big condition by second way ๐
yea, Ik
Fair fair


