#mod_development
1 messages ยท Page 173 of 1
I'd go to the workshop, download a mod that has a working custom model, and see how they did it
and then compare and contrast it with my mod to see what's wrong
oh I already have a model
right, but you said it's not showing up right?
right
so if you find a mod that has a working custom model you can see how they did it
if it's identical it's something wrong with the model file probably
right, and comparing and contrasting with your current mod, how are the following things different
- Location of model declaration
- Model declaration
- Spawning model
check the context of all 3
see if it's identical
if it isn't see what's different and see if there's a problem along the way
otherwise it's probably something wrong with the model itself
when I drop it shows up as the icon
okay, and you've included your mesh file in the mod?
I'm not sure how model creation works I'm just debugging
I am confused about mesh and texture and stuff
like mesh is the model and texture is the 2d thing
like just on what they are?
yea
Okay so think about it like this right
one sec, is texture the icon?
Like there, is the texture you've set the icon for the actual item?
(just for my own context)
eg: Worlitems/CookieBoxFitted, is that the file for the icon
wait no
my bad
my misunderstanding
okay from the top lmao
the icon is item_CookieBoxImage
right, okay
thats correct
so a mesh is your typical understanding of a 3d model, the only caveat is that it does not store the actual colors/textures on it
so essentially you have a plain white model
these models typically have material data, these materials are associated with a "texture"
these materials grab parts of the texture and apply it to the surface of the mesh
right
is that an image?
png
so no
editin this mod https://steamcommunity.com/sharedfiles/filedetails/?id=2991010328&tscn=1687280930 (i wont publish but i will (i can publish if original owner allows me to)) also how do i make so you can turn on and turn off retextures?
oh wait I thought you meant
that would be the texture
you need to point to the model in the mesh field
@bronze yoke what types of models does PZ use? Like extension
multiple types of fbx and x
also what do you mean I did it
I did WorldItems/CookieBoxModel
you were showing the texture
so much trouble over cookies
oats and rasins
yea lol
๐ญ
I guess I will test if it works later
Having a weird issue with my LUA script
function slamDoor()
print("Smash Window event")
local player = getPlayer()
local building = player:getBuilding();
if (building ~= nil) then
print("Smash Window: Player is in building")
--- @type IsoWindow
local randomWindow = building:getRandomFirstFloorWindow()
randomWindow:smashWindow()
print("Smashed Window")
end
end
I am getting a nil value for randomWindow
but building is not nil
does the building have a first floor window?
I believe so, let me send a sc
yep
it seems like this call isn't actually working
I'll see if I can print some info about the building
yeah this is strange
try calling building:CalculateWindows() first
i don't think the windows list actually gets populated at all normally
I think this channel needs some specific rules regarding asking for help.
- Be clear about your issue and provide relevant information when asking. (Nicely)
- Refusing to share mod code or content that lets others look deeper into issues shouldn't be repeated for the same problems with the same mods.
Posting this because I've seen an uptick in this rude behavior here lately. People don't get paid to help and volunteer it. I'm seeing this issue come up again and figured this would be worth discussing.
dude what
I was just saying
that was random
If anything, a guideline on how to propose or ask questions / ask for help would really help keep things cleaner and more formal in here.
@bronze yoke I figured out what I was doing wrong last night. (in about 3 minutes of course)...
I had this
function HaveEmptyItem()
local playerInv = getPlayer():getInventory()
local item = playerInv:getFirstEvalRecurse(predicateEmpty)
if item then
print("found an empty `dirt` bag in player inv")
else
print("no empty bag")
end
print("haveemptyitem run")
end
local function predicateEmpty(item)
return item:hasTag("HoldDirt") and item:getInventory():isEmpty();
end
Events.OnPlayerAttackFinished.Add(HaveEmptyItem)```
the problem is that I needed to define my local copy of predicateEmpty before I called it... So I moved the local declaration up and it's working as expected. ๐
oh yeah, local functions don't get hoisted for some reason
hoisting. I swear even when I figure my problems out you all teach me something new. I never knew hoisting was a thing in any language.
yea so does anyone know the problem about the model
LOL i've only heard the term a couple times myself
yeah some dude dmed me and right and when i told him that he shouldnt dm people he blocked me
i was gonna tell him to come here to ask
i was somewhat familiar with the concept but not the term for it
he wasnt even willing to learn
@red tiger any idea why this wouldn't be working? I'm thinking windows aren't being loaded properly but I can't really put my finger on why that would be happening
ik
you told him to go to to tutorial for guns
did you try this?
It's not like we don't have productive discussions in here or that everyone here is at each other's throats. Sometimes I can read how people ask in here for help as demanding and honestly talking to us like we're an AI prompt. That feels terrible.
I also tried calling player:getCurrentSquare():getBuilding() to see if maybe the building reference was wrong
same issue
- Sneaky with braces to play like Lua is a c-syntactic language. I like that.
Is this in MP or SP?
Hmm
Anyone here knows how to transform a fresh dead body into a skeletton old body ? (from a mod)
It should be straightforward with client-side.
right that's what I was thinking
Are you checking if the random window isn't smashed?
Print the object too.
Umbrella should also expose a few things.
so the issue isn't that the window is smashed
Maybe the object needs to broadcast itself updating?
whats that
sendObjectChange("becomeSkeleton")
whats what
Yeah that's likely a defunct method. Either that or the first floor might not have any windows.
I see I see
why is there an item
There's an arraylist IIRC for windows in IsoBuilding.
the method is real and implemented and the first floor does have windows
Do it the normal coder way.
i think there's a non-obvious logic error in the method
most getRandom.. functions do not garantee results
All you need is a int range and a random instance.
yeah looking at the java sources the method does exist and has functionality
@tawny depot I come from the "Assert everything" tribe in coding.
yes null can be the result
Saves me hours of debugging.
hahaha real
maybe windows on the first floor don't actually have z 0 like the method expects
model bushcraft
{
mesh = weapons/1handed/Bushcraft,
texture = weapons/1handed/Bushcraft,
scale = 0.01,
attachment world
{
offset = 0.0000 -0.1660 0.0070,
rotate = -180.0000 0.0000 0.0000,
}
}
@deft plaza this is what my item code ussally looks like
Hey coolroo are you the one trolling newbies ?
Those two seconds to perform an if check with error throwing saves lives.
because I thought thats how it works
or maybe certain windows don't get added to the windows list
here's the implementation for the code
public IsoWindow getRandomFirstFloorWindow() {
windowchoices.clear();
windowchoices.addAll(this.Windows);
for(int var1 = 0; var1 < windowchoices.size(); ++var1) {
if (((IsoWindow)windowchoices.get(var1)).getZ() > 0.0F) {
windowchoices.remove(var1);
}
}
if (!windowchoices.isEmpty()) {
return (IsoWindow)windowchoices.get(Rand.Next(windowchoices.size()));
} else {
return null;
}
}
i'm wondering if maybe certain facings don't get added to the building's list because they're technically on the outside squares
it is
depending where you live, first floor might be z 1
that's a good point
I think it is a z issue
That is a format yes. An ancient one but is formatted. I can read that.
I'm gonna see if getWindows actually returns a list
what would be a new format then?
That pasted code though terrified me.
actually shit no can't use getWindows
that's a room call
and I can't get all the rooms of a building ๐ญ
Here. I'll format it my way. I do inline but you can do allman bracing too. (CSharp uses allman, Java uses inline)
because thats how it works right?\
try to replace my shit with yours
dude
?
oh my god you're not kidding, there is no method to get rooms from a building except getrandomroom
isnt item always supposed to be there
you might be able to grab the rooms vector with the weird field stuff?
it thought it was just the model code
model bushcraft {
mesh = weapons/1handed/Bushcraft,
texture = weapons/1handed/Bushcraft,
scale = 0.01,
attachment world {
offset = 0.0000 -0.1660 0.0070,
rotate = -180.0000 0.0000 0.0000,
}
}
but im sleepy so i forgot
yeah that would work better
I would just grab the window vector in that case
any good info on how I can grab fields? Like what the process is to actually get those
it's a nightmare
So, fun fact: I wrote the vscode extension.
I will finish the formatter to use inline and allman as two options.
What does that mean?
use my code as a baseline
Any info would be appreciated, even if it is hell ๐ญ
It'll be my excuse to yell at people who throw wild, all-over-the-place ZedScript in here. =)
@red tiger which extension are you referring to?
you have to loop through getClassField(object, index) from 0 to getNumClassFields(), doing tostring until you find the which index corresponds to the field you want, then getClassFieldVal(object, index)
ZedScript, on VSCode extensions market.
you can hardcode the index but it might explode when the game updates
Until there was my extension on the market, ZedScript never had any support from modern IDEs.
so you'd have to posix it or generate the correct string to compare
Thank you so much for the info
atleast knowing I can do it is anice
iirc the tostring basically returns package.package.class NameOfTheField
/(please|support|regex|kthx)/
Hey @bronze yoke, I have a function hooking question
local oldCCPOOMD = CharacterCreationProfession.onOptionMouseDown
CharacterCreationProfession.onOptionMouseDown = function(self)
oldCCPOOMD(self);
refreshTraitCosts();
end
Why does this run immediately after my mods load, and why does it give a
attempted index: onOptionMouseDown of non-table: null
```?
I know you and @novel barn have been collaborating a little bit on variable function costs. I'm trying to implement it in my code w/o bugs
the code to hook that function runs immediately, in this case you are hooking it before it exists
Require the lua file first?
lmao
move your code to the client folder or put it behind OnGameBoot
You can also do OnGameBoot and perform the operation then.
requiring vanilla doesn't do anything, it's forced to load in a specific order
thank you both
My hatred for this game just grew.
I entirely eliminated the need for Lua require for PipeWrench because it's so crazy and such a mess.
it's shared -> client (if applicable) -> server, vanilla loads first then mods for each stage, and trying to force a file from another folder to load in an earlier stage does nothing
PipeWrench literally re-inits itself using a custom event with padded code on rendered Lua.
Yeah. I've had problems with require basically forever. =/
Thanks for the info.
i still don't really know quite how cross-folder requires behave, all i know is it's annoying
the client/shared/server folders that is
is only lua used for modding or can java be used too ?????
java mods are not popular at all but yeah you can java mod
they require manual installation
I still don't see what's wrong with this code only thing I know is its showing the icon when dropped
also, you should note that you're going to break the game with this hook, because you're deleting the parameters
if you don't care about the parameters you can just grab and pass them with ...
these need to match
would something like this work?
-- Function to find the index of a specific field in a class and retrieve its value
function findFieldAndGetValue(object, fieldName)
local numFields = getNumClassFields()
for i = 0, numFields do
local fieldStr = tostring(getClassField(object, i))
local packageName, className, fieldNameStr = fieldStr:match("(%w+)%.(%w+)%s(.+)")
if fieldNameStr == fieldName then
return getClassFieldVal(object, i)
end
end
return nil -- Field not found
end
-- Example usage
local object = -- Your object here
local fieldName = "NameOfTheField"
local fieldValue = findFieldAndGetValue(object, fieldName)
if fieldValue then
print("Field value:", fieldValue)
else
print("Field not found.")
end
which should match which
looks like it would to me, only one way to find out for sure
Should I change Model cookiebox to cookie box model
they do?
it doesn't matter which way around it is, they just need to match
WorldStaticModel is you telling the game which model script you want to use, it needs to be the name of a model script
ooh
his model script is inside the code
All three folders are roots so you'd pretend like all three are the same folder.
I have physical deadzones in my brain from learning all of this for TS support.
sometimes you can't require files from other folders though
and i'm not really sure what the rules are
things like 'what if there are files matching the path in multiple folders' need to be examined at some point too
A rule for everyone in here is do not put anything other than constant, primitive values outside of an event wrapper. If the code isn't fired from an event, you're setting yourself up for grief and a lot of time figuring out this is the reason why.
@bronze yoke when I'm calling getClassField, what am I calling that on?
If I have a reference to ISOBuilding, it doesn't have a method with that name
so I imagine it's something different?
wait, can you even tostring a field without debug mode 
nous allons voir
fields are only exposed when debug is on, you can still pass the object itself but i don't know if it'll like tostring
you might be forced to hardcode it if so
how to create clothing mods without melting my brain in the process?
that is a broad question
What part of this is giving you trouble? It'd be better to ask about that step in the process.
public final Vector Windows
So this field is a vector, what is the equivalent lua type?
is it just vector?
I've seen a lot of Vector2 but this is just a straight vector
vector
i did check when we were initially discussing it because i'd never seen it either, and it is exposed
Awesome! thanks
so this is odd lmao
When I load the windows, I get an object which is []
I call computeWindows() before
and this is in the console
guys how do i make so player cant move and play animation
oh oops I thought I passed them with "self"
instance:method() === Class.method(instance)
Does anyone know what isUseless is meant to do? I'm trying to make docile zombies based on a time bound set of rules, but i'm making an assumption about what isUseless does.
is it that useless is just useless? https://projectzomboid.com/modding/zombie/characters/IsoZombie.html#isUseless()
declaration: package: zombie.characters, class: IsoZombie
Could be a defunct flag in IsoZombie.
I'm guessing it's like this?
How to break the game (cannot start) 101 1/ Add a custom mod to your default start. 2/ In its sandbox options create a double parameter with a default value out of its min/max valid range. 3/ Realise how stupid I am.
Yeah that was the very first error I had coming into here lol
I wonder.. Would TIS get mad if I made a MCP but for PZ?
(Minecraft Coder Pack)
Asked myself this question for around 7 years but never asked it out loud)
one of us ๐
Basically is a decompiler that applies patches to that to make it compilable. When done, the coder pack compiles only the changes files and forms a patch.
That's next level stuff
I've built a patcher like this in the past for other work so I'd know the way to make it.
Also was around the MCP devs back then and watched it be made.
I'd refuse to make it if I was handed a statement saying there'd be legal trouble for doing it, even though the method to make this is gray-zone territory modding.
:D
Like MCP had to make statements and IIRC a agreement thing when running MCP to not use it to pirate or maliciously cheat on SMP.
does anyone know how to make like so your character cant move and it plays an animation
that's the sort of thing i was hinting at in the sledgehammer server
i think it's perfectly legal, but when you can't afford a lawyer, everything with even the weakest argument of copyright is illegal 
in a timed action?
ig
i want to make so player fakely dies and then gets up
Gotta fight the system. x)
if you had a timed action you would do
self.character:setBlockMovement(true)
self:setActionAnim("UtaCast")
you use same command to block movement but need to know when to start / stop
for animation depends, don't ask me how ๐
self.character:setBlockMovement(true)
self:setActionAnim("Zombie_HitDeath_Cue01")
timer:Simple(3, function()
self:setActionAnim("Zombie_GetUp")
InfPla.setInfected(isoPlayer,true)
if InfPla.Verbose then print ('InfPla.updateInfected'..p2str(isoPlayer)); end
self.character:setBlockMovement(false)
end)
end)```
like this? and dont mind other stuff, and it fails for some reason
Here are some links with resources to get familiar with making mods for Project Zomboid.
https://pzwiki.net/wiki/Modding
https://github.com/FWolfe/Zomboid-Modding-Guide
https://www.lua.org/pil/contents.html
I don't think you have same self or self.character in your case
wait there is a player and character and not just player?
for some reason when i used the thing that i copied from working script i still get error
Hi again! It looks like I've found a solution for teleporting the car. But I am faced with a new issue
getCell():getVehicles() shows only vehicles nearby player. How do I get vehicles from another cell? I have the coordinates
Check all loaded cells.
If you need to check a coordinate with an unloaded cell, load it and check it.
can anyone explain why my script dosent work
How to do it?
idk
InfPla.setInfected(isoPlayer,true)
if InfPla.Verbose then print ('InfPla.updateInfected'..p2str(isoPlayer)); end
InfPla:setActionAnim("MedicalCheck")
timer:Simple(3, function()
InfPla:setActionAnim("MedicalCheck")
end)
end)``` medical check is a placeholder anim
If you use Umbrella, you can check to see if there's a getWorld() api call.
I think you get active chunks from that object.
Oh thanks!
:l i'm trying to organize my code, so I moved my event hooks into a new file under the client folder. I'm trying to reference to file and I don't understand what i'm doing wrong lol
local ATCreation = require("..shared/NPCs/AnthroTraitsMainCreationMethods")
so will ya help?
i've also tried to make it a module
idk what it means
here's my folder structure
ok
local world = getWorld();
local cell = world:getCell();
local wx, wy = 1000, 1000;
local chunk = cell:getChunk(wx, wy);
local ATCreation = require("NPCs/AnthroTraitsMainCreationMethods")
I think that you're looking for chunks.
huh. I thought the root folder was different--let me try that
you can test from console, if it's wrong it prints a message
!! thank you--I hadn't thought of that
I need BaseVehicle list. I will try IsoCell:getGridSquare(x, y, z) and IsoGridSquare:getVehicleContainer(). Thanks!
what Vanilla action is an infinite action ? (timer never ending)
I think this is action with o.maxTime = -1
What is the id of the gas mask?
I tried Base.GasMask but it didn't work
Try "Base.Hat_GasMask"
man i fucking love making mods
this is the way
who can help me pls, my code for some reason dosent work timer:Simple(30, function() InfectedPlayer:setActionAnim("MedicalCheck") InfPla.setInfected(isoPlayer,true) if InfPla.Verbose then print ('InfPla.updateInfected'..p2str(isoPlayer)); end timer:Simple(3, function() end) end)
common w aiteron
there is only one loaded cell
isocell is a singleton representing the loaded area
the 300x300 mapping cells don't seem to be relevant to runtime
So it seems like window loading in buildings is completely unreliable
The windows list isn't filled it seems
will anyone help me please
Help typically needs more context, not just this doesn't work
You should say what's happening, if you're getting an error post it
so, maybe it wasn't me after all. I'm getting an error on leaving the occupation and traits page by pressing back or next. Maybe it's a UI thing i'm not aware of?
entering the page seems fine. But also the code I'm running seems to not work
Thanks!
What about Dog Tags?
for some reason the animation thing breaks and dosent work even if i used one from here
Breaks as in doesn't work?
Or breaks and throws an error?
Or does it just not do anything
What does the error say?
look at left down
Hey small quick question, i wanted to know if theres a way to extract the player 3d model into blender so i could create a few animations for it
InfectedPlayer:setActionAnim("MedicalCheck")
Is InfectedPlayer the name of the variable?
Because I see InfPla
In other places in your script
i made it infpla now
im actually editing a script btw
not making it from scratch
i'm hoping this is just an outdated screenshot, but in your require your module is refered to as ATCreation but in your code you refer to it as AnthroTraitsMainCreationMethods
Right, just make sure the variable references are valid
Are you reloading the Lua?
yup
yeah it's outdated haha. I had that up and was trying to reference it directly
what ide you using??
IntelliJ
There's usually an error that gets posted above the screenshot you sent
Like java. ...
no fkin way u can code lua in intellij
And then a message
plugins required?

ya there's a lua plugin
jetbrains ides my beloved
IntelliJ is awesome for java & kotlin
hate kotlin
Other than that, I typically stick to vscode
Why?
idk, i find it very odd. have only used it so far in mobile programming and im not a fan so far with my course.
Have you done much java?
in second semester java currently. i love it. most my class love JS, but i cant stand it
i think we just havent really been taught well with the kotlin/mobile. most of it we've just been instructed to follow along so i feel really confused with it
nah, 2nd year currently. we did python all first year
That'll do it
Idk Kotlin was nice when I used it
It's simpler java
Less boiler plate
Inferred types
maybe ill have to give it a shot in my free time. im not a fan of mobile programming either way, not what i want to do with my career
any good tips for getting into / learning lua? ive pondered trying modding. i look thru here every once in a while
so will you help? me
Once you post the full error, it typically tells you at the top of the stack trace like I said
so where is it
Lmao idk I'm not on your machine, you need to look for the part where it sounds like it's explaining what went wtong
IsoCell:getGridSquare(x, y, z) and IsoGridSquare:getVehicleContainer() not working. After area unload cell:getGridSquare(x, y, zPos) return null. Any idea how to force load this?
you cannot get vehicles that are not in the cell, the objects do not exist
is this the right part? (in the output)
How can i force load another cell? Maybe there is a hidden java method?
there is only one cell
the cell is a singleton, it does not represent a fixed area, it represents the entire currently loaded area
you cannot force squares to load
Thank you for explaining
in mapping and i think in the save format there are also cells which are 300x300 areas but these don't seem to have any relevance to runtime
But the cars are stored somewhere in the world. So somehow they can be accessed
on the server they only exist when a player is near enough, and on the client they only exist when you are close enough
Looks like the reference is null
The player reference
It is sad. And I can't change the entry in the database?
entry about vehicle
so player is like null like he dosent exist for game
Seems like it
Maybe try printing the player variable before the call
See if it's null
it isnt null ig, it says fullname:(playername) or smthn like that
Sorry. Leaving the office. Was in a meeting.
@mild venture
@tawny depot I kid you not I scrolled so far through the chat history to catch up and I spotted you saying kotlin and freaked out.
I'm like who tf is talking kotlin in pz chat?
xD
Hahahaha
Do you have any idea how to get unloaded vehicles? I think i need load bytebuffer of IsoGridSquare using IsoGridSquare:load but i dont know how to get it before ๐
you probably can't load unloaded squares
it's something a lot of people are very interested in and nobody has worked it out
it's best to write your code to expect things to be unloaded and cache data you might need
I'm going to try. Thanks
Base.HolsterSimple
Thank you!
Can I configure somewhere that my admin new character does not spawn aumatically with GodMod and Invisible ? flags ?
no
i save BaseVihicle[] to cache but teleport magic doesnt work when cell is unload. I think i need to load unloaded squares. Tomorrow i'll try to deal with bytebuffer for IsoGridSquare:load
Is there someone here on who knows and understands the TimedActions?
I am trying to figure out how to make an IsoPlayer run rather than walk.
If said person also knows how to do pathfinding, that's even better.
i've done pathfinding
it's been a while so give me a second to look over the project that was in
walkToAction for pathfinding. And if you want modded version you can look at Auto MoveTo mod. the run toggle and sprint toggle are handled on java side
ya you just use ISPathFindAction it looks like
i think there's some luautils to simplify it
you can extend the action if you need to modify the behaviour but most of it is handled java side
luautils is only for adjacent squares
in my usage i just needed to remove the ability to cancel it which luckily was lua side
Yeah that is what I wanted to avoid :(
IsoPlayer:getPathFindBehavior2():update() seems to override the setRunning() flag
it looks like player update resets the flag anyway
Hm? did you meant Events.OnPlayerUpdate?
the player's update method, but that calls the event yeah
Interesting... I wonder if I can toggle the flag continuously like that...
wonder what it will mean for the game performance though
I'll try Events.OnPlayerMove later and see if its better.
https://pzwiki.net/wiki/Modding:Lua_Events/OnPlayerMove
it's the same except that it's only if they moved that tick
i think it's even called in the same method
ya, it is, but this is much better because this one is called after the flag gets reset
if you did it onplayerupdate it would actually be reset immediately afterwards
made a sample of how my mod works
oohhh that's fun
it's good with horror mods, and can create urgency before the permanent blackout in other types of runs
you can even customize it to be anywhere between a minor inconvenience to a sudden panic
how frequent is it?
by default, 24 hours after a blackout you have a 10% chance of another blackout happening every hour
and blackouts last 30+ minutes, with a 25% chance of the blackout ending every 10 minutes
i actually recommend lower blackout chance and a really low recovery chance so you have infrequent long blackouts, but the default feels more comfortable for vanilla settings
that sounds fun! have you considered perhaps an option to make them more frequent the closer it is to the power shutoff?
i was imagining it'd be fun if you started getting blackouts as a warning sign that it was coming
that would be cool. it sounds pretty doable, by just weighing the current date with the permanent date, but i havent worked on it in months. i just uploaded it so it doesnt remain abandoned forever
well thank you for releasing it! i think i'll probably adopt it whenever i next actually play the game
that would be like a boolean option where if checked, then blackout chance just becomes (current date / shutoff date) or something right?
yeah, i was imagining maybe having it ramp up or something instead of linear but it'd have to be seen how exactly it would work
probably would add a ^2 somewhere for that
im sure someone could be inspired by my code to make something similar but less scuffed
when i have less projects i wouldn't mind taking a look at it
and maybe it works better as it is, i shouldn't be coming up with 'improvements' before i've even tried it ๐
who knows! i made it for use with perma night so it can be a bit scarier without having the power off at all times, cuz i like the ambient noises of electronics
so i never really tested it with normal settings
how to construct java ByteBuffer from lua?
not exposed
another cool thing about the mod is that the power turning on sound comes from the nearest building, so if you are lost in the forest but there is a building nearby, it could be a lifesaver
u can hear it faintly from like 30 tiles away
ooohh that's fun
the odds of that happening are so slim tho. usually u already know there are buildings nearby if you are that close to one during a blackout
another idea i had originally, that i ended up not doing, was making light flickering stuff
oooh yeah that'd make it so smooth
i cut it out so i could upload the mod as-is, but hopefully someone releases a mod that does that so i can recommend it as a pairing
i'm a big fan of pitch black nights so being vulnerable to that even in city centres pre-shutoff would be fun
yep! i did add a flashlight trait for 1 point so those who take it wont be left completely in the dark
https://steamcommunity.com/sharedfiles/filedetails/?id=2992009278
and here is the mod link if anyone wanted to check it out
Why do they expose methods that cannot be used? I'm already in a kind of frenzy. Not much more and goodbye zomboid 
the methods aren't deliberately exposed, they just happen to be public
oh another thing i wanted was a setting to make everything that produces light a little dimmer. that would go well with this in a horror-type run as well
that sounds like an undertaking
flashlights, building lights, etc. they r a little too bright for horror sometimes
i havent played or modded the game in ages, so now im just putting my ideas out there
If you look at it with highly intellectual perspective you wont understand anything..
You have to dumbify yourself then you will be able to understand
And then build the logic from there
Not everything makes sense
And in reality
Not everything has to makesense
Imo
Such as humor
Not everyone gets it
Stop figuring out the "why"
And start learning the "how"
You will then be able to understand they "why" i think
Well not eveything
For me xml still doesnt make sense
Its probably easier for me than for you cuz im already dumb

pz isn't so crazy once you understand its structure
and sometimes you have to accept that some things just weren't made for modders
If that may be of any use to anyone, for translation/encoding.
.gitattributes
**/Translate/AR/*.txt encoding=windows-1252
**/Translate/CA/*.txt encoding=iso-8859-15
**/Translate/CH/*.txt encoding=utf-8
**/Translate/CN/*.txt encoding=utf-8
**/Translate/CS/*.txt encoding=windows-1250
**/Translate/DA/*.txt encoding=windows-1252
**/Translate/DE/*.txt encoding=windows-1252
**/Translate/EN/*.txt encoding=utf-8
**/Translate/ES/*.txt encoding=windows-1252
**/Translate/FI/*.txt encoding=windows-1252
**/Translate/FR/*.txt encoding=windows-1252
**/Translate/HU/*.txt encoding=windows-1250
**/Translate/ID/*.txt encoding=utf-8
**/Translate/IT/*.txt encoding=windows-1252
**/Translate/JP/*.txt encoding=utf-8
**/Translate/KO/*.txt encoding=utf-16
**/Translate/NL/*.txt encoding=windows-1252
**/Translate/NO/*.txt encoding=windows-1252
**/Translate/PH/*.txt encoding=utf-8
**/Translate/PL/*.txt encoding=windows-1250
**/Translate/PT/*.txt encoding=windows-1252
**/Translate/PTBR/*.txt encoding=windows-1252
**/Translate/RO/*.txt encoding=utf-8
**/Translate/RU/*.txt encoding=windows-1251
**/Translate/TH/*.txt encoding=utf-8
**/Translate/TR/*.txt encoding=windows-1254
**/Translate/UA/*.txt encoding=windows-1251
It would be awesome if there was a way to change a textures magFilter from lua (and I suppose minFIlter as well for completeness)
I see the method sitting there on TextureID locked in Java land ๐ฆ
I highly doubt that was the issue considering I was trying to test it on a server locally and I was unable to repro the issue, and setCustomName wasn't being used
Owell just thought it could help .
that was something i suggested when the issue was being discussed
i don't really understand why it saves without that flag being set, but if it ain't broke don't fix it
while you guys are here I have another issue to be discussed
lemme send summarization which I already wrote up previously instead of having to write it up again
My mod adds a search button for sorting these items in the container according to search criteria based on how close the search term is to the items, for example, I have M4, AK47, 9mm ammo, duck, canned food in the container, and my search term is "cann", it'll iterate over all items in the container, and sort them according to how closely they match the search term, in this instance, it'll sort canned food as first. If there's 0% match with the rest of items, it'll sort them alphabetically.
Anyways that's all just technicalities. My mod was finished and tested and logic works perfectly fine
the current issue is if the container has too many items (which is kinda the point since the mod is only useful if there's a container with too many item), and you use the search function implemented by the mod, the game becomes awfully laggy.
It only gets fixed if you switch back to default sorting mode. I'm not sure if that's a logic issue/optimization issue due to the way I made the code or not
if the game becomes laggy, does that mean you're sorting it every frame instead of just when the search term changes?
ISInventoryPane.itemSortBySearchContainer = function(a, b)
local sortedItems = ISInventoryPane.sortedItems
local sortedIndex = {}
-- Create a lookup table for the sorted items
for i, item in ipairs(sortedItems) do
sortedIndex[item:getName()] = i
end
-- Compare the positions of the items in the sorted table
local aIndex = sortedIndex[a.name]
local bIndex = sortedIndex[b.name]
if aIndex and bIndex then
return aIndex < bIndex
elseif aIndex then
return true
elseif bIndex then
return false
else
-- If both items are not in the sorted table, use the default sorting function
return ISInventoryPane.itemSortByNameInc(a, b)
end
end```
I believe this is the part where things get actually sorted
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
This is the whole code
now that I look at it I think it might make do with some more organisation tbh
yeah i'm having a little trouble reading this
if it lags the game as long as it's active it seems very likely that it's sorting the container at all times
I don't see or recall having anything in the code that makes the function being executed each frame
unless it is there by default in one the functions I am using
self.itemSortFunc = ISInventoryPane.itemSortBySearchContainer```
maybe this idk
well it's not really possible to cause lag on frames when your code isn't running, so...
true
it wouldn't be caused by the tables being created would it? I've thought maybe because I am using too many tables or sth but idk I highly doubt it its just around 2/3 tables being created or used
i can't spot it, maybe throw in some breakpoints?
or a print or something
there must be some part of the code that's running when it shouldn't be
Dang, doesn't look like the Running flag is kept for whatever reason.
the character would run for 1 square then reverts to walking.
was that with setting running on every playermove?
Yeah
that sucks
The only way I ever found to programatically control player speed while pathfinding was calling update on the pathfinder multiple times per frame 
tbf, I'm trying to determine if its its an issue because of the isNPC() flag.
then again, I shouldn't push too hard on this cause come b42, I expect the stuff to be completely revamped.

I suppose, my last resort is simply to fake the "running" by adjusting the move speed multiplier...
lags may be caused by filling sortedItems each time: difficulty is O(N*K)
u need to fill it only single time when u add new item and after use it in it sort func
and extra question how much items do u have?
it can cause lags too and will need to use lazy fill
I have a total of 50-something items in the container. Some items are stacks, so around 20-something unique items. I tried to add a print function to the code as follows:
for i, item in ipairs(sortedItems) do
sortedIndex[item:getName()] = i
print(i .. "\n")```
The console is literally spammed by numbers 1-51 being repeated countless times
throw a breakpoint in there so you can see what is calling it all the time
i have a feeling this is a bad vanilla logic moment that is being made much worse by a more expensive sorting algorithm
i guess its not being called all the time. Its just being called once (?)
the process isn't the same for a container of 3 items, it just prints
1
2
3
1
2
3
no hundreds of lines
so i think i may have found something -- the sorting function is called each time you move around, even if its one step
probably explains why its so laggy when you're continously moving around the container
but looks normal when I just stand still
what's event do u use?
it's hooked into inventory functions

^
Hi everyone ๐ฆ I'm back on my bullshit and I'm stuck on something that has already been answered. If anyone is willing to take a look at what might be obvious it would be greatly appreciated. I'm following a template to intercept a function that Albion already provided here #mod_development message. I'm trying to do exactly what she suggested but I'm getting the following error on game startup. attempted index: GetEmptyItem of non-table. This fails on line 2 of the provided code.
This is all of my code. Right now literally all I'm trying to do is interrupt ISShovelGroundCursor.GetEmptyItem() to print a line and prove the original function still works as expected.
1 local old_SGC_GetEmptyItem = ISShovelGroundCursor.GetEmptyItem
2 ISShovelGroundCursor.GetEmptyItem = function(self, playerObj, groundType)
3 local oldValue = old_SGC_GetEmptyItem(self, playerObj, groundType)
4 print("attemping to intercept SGC.GetEmptyItem")
5 return oldValue
6 end
My leading theory is that the player doesn't even exist on game start, so of course there's no player table. However I get the same error in game with a valid character.
Thanks in advance to anyone who takes a look ๐โโ๏ธ
Sorting is bad, if you have ~10000 items with same name, the item list viewer gets overflow error.
#truemusicaddons
Is this hook in client folder?
Yes!
Cursors are usually in server
๐ฎ I'll give that a shot!
Well, that gave me an idea... it kind of works
the floating point is what's killing it though from what I can tell; the pathfinding is precision to the thousandth(?) and a "run" animation is far less precise.
Anyone who finds this in the future - try searching for setUseless, based on what Iโve found it does turn Zombies docile - pillows FearTheSun mod uses it well as setUseless.
hey guys. for distributions that aren't procedural like outfits, shotgun bags, caches, etc. does table.insert(Distributions.list.blahblah.items, "item") work?
hi guys where can i find any modding documentation? i cant find a single video on youtube
cant find anything on google either
Hello, welcome to PZ mod development!
Here are some links with resources to get familiar with making mods for Project Zomboid.
https://pzwiki.net/wiki/Modding
https://github.com/FWolfe/Zomboid-Modding-Guide
thx
Check the Distribution.lua file to see details for what you want.
yeah but can I insert into those roll tables using that table insert
yes, as long as it is not a procedural table.
If it has rolls and items it will work.
yeah like I can just delete procedural or vehicle from table.insert(ProceduralDistributions.list. or table.insert(VehicleDistributions. and put it in?
ok thanks
or am i supposed to use table.insert(Distributions, 1, distributionTable);
There's some famously bad mods that will break your mod if you use that. You should use the Suburbs table and insert to the existing tables of your choice.
Would be nice to make my own tutorial environment.
hey is there any template for a flying vehicle
i want to make a jetpack
like the one from GTAO
like that
also, i made a melee weapon earlier and i cant seem to figure out how to get it to be positioned correctly in game. like the rotation is all fucked. could any one help me find the thing to tweak that?
never mind my last msg
my stupid ahh was editing the files that weren't in the right folder
hey, does anyone know where the file is that defines what the different in-game pills do? i can't seem to find it.
hardcoded in bodydamage
ah, figured. thanks.
Anyone know if anyone created a automated test framework of some sorts?
Getting anxiety everytime I update Inventory Tetris now...
anyone here use this ? https://studio.zerobrane.com/ is it worthwhile or should i just stick with the intellij lua plugin?
ZeroBrane Studio is a lightweight Lua IDE/editor/debugger for Windows, Mac OSX, and Linux
Hello! What does BaseVehicle:update method?
much love my brother
also
i just uploaded my first ever mod
feelin proud of my garbage
garbage is only in the eye of the beholder.
if you feel your work is trash, don't upload it
if you don't feel your work is trash, be prepared for other people to trash it because trashy people.
if you're feeling proud then it's not garbage x3
I don't want to be mean to users, but it really do be like this
They find every little issue.
Its best to ignore them, you'll drive yourself mad if you care too much.
^
Or fix everything in a mad flurry of rage
Depends on whether or not said things is up to your standard and you have the constructive feedback you needed.
the ignorant fools don't understand how hard it is to work with PZ Events, never mind APIs
the better people learn to ask questions, which can be helpful and put another perspective on problems you ran/run into.
My own wish is that people could better differentiate between, "this mod is literally broken" and "Oh, I have a mod conflict"
tried PZEventStubs yet?
Whats this?
no, I'd like a look
I'm using Candle already
as far as i know it's the only up to date event dataset, there's a text version linked in the readme if that's more your style
:V
I can have autocomplete
I looked at Jabs stuff before and somehow missed this completely
now hes gonna come out and flex
I lurk..
umbrella is huge for lua modding
I'm present a lot more times than you'd think.
OK, thanks, i'll look at the EventStubs; though I'm unsure if it does anything Candle doesn't do already.
there's no overlap really, unless you mean umbrella when you say candle
Events is PZEventStubs
Oh dang, thanks for clarifying
umbrella is a collection of tools like this
if anyone finds any detail that would've been helpful to know about events let me know so i can add it to the dataset, or send a pull request
I'm working on the application that allows patching PZ-Rosetta for additional documentation.
it's more detailed than the wiki was, and a lot more up to date, but i still come across 'oh, it should really mention this' moments regularly
This is an example of me patching PZ-Rosetta for ISUIElement:drawTexture():
that overload
i gotta convert it over to the rosetta schema at some point
We've got to come up with a schema for events in Rosetta that suits your needs.
honestly the one i saw already in rosetta looks fine, it does need me to go over some things again but added detail is always good
Yeah. We're setting the standard for it.
I'm also setting the standard for ZedScript at the same time.
There's no official support for ZedScript from TIS so it's the closest thing we've got.
When I have software to easily patch Rosetta from a UI, modders should start jumping in and document what they know. (If they want to contribute)
Means we can handle ourselves with documenting for others to see through Umbrella.
yeah, my hope is that the projects survive us
we've at least made it possible, which wasn't really the case with stuff like capsid
It's not my biggest concern. The code is open, documented, and clean. My big concern is will it be used at all.
they're growing in popularity
I've built many solutions directly off of the concerned and complaints of people in here and other areas of the community over the past near decade. Most of them continued to bitch and not use the solutions given to them.
I'd rather focus on projects that people use.
Thats fair, regardless thank you for everything you've made.
It's why I'm a shorter fuse than most.
Modders can set the standards for modding just as much as the devs can. =)
I'm planning to walk through the entire ISUI codebase and self-document it.
when the tool is in place i'll make a habit of documenting whatever i end up having to work out
Awesome. That's the end-game for Umbrella. (My goal)
i spend a lot of time crawling the source working out what methods actually do, might as well write it down for everyone else
A self-improving tool.
for example you can add info about OnPlayerUpdate and OnTick fires with the same frequency. The only difference is that the first one gets the player's object
OnPlayerUpdate could potentially fire 4 times per tick
yeah, it's per-player
i will try to clarify that
i gave it a pretty useless description originally
Thanks for your work guys. It helps a lot
It also doesn't fire on the server side(?)
Not positive about that, probably might be worth clarifying the mp behaviour on the events as well.
it's mentioned in there
Ah, sorry
most events have client/server only tags
You can always use commands.
additionally in a lot of places i use the term 'local player'/occasionally 'local zombie' but i don't define what that means anywhere, there isn't really a place to unfortunately
local players are the 1-4 players on the specific client, not players from other clients who are in the loaded area, and local zombies are the zombies that this client has authority over (which is much harder to explain)
Might be a good idea to write basic summaries with context with technical tips below.
needs verification but i think it's specifically walking
i think it even fires if you're walking into a wall, you don't actually have to move
I'll check it out soon. I will inform you about the results
how cursed would it be if I wrapped my scripts in a
ScriptName = {
...
}
return ScriptName
?
I want to access functions from a different file but it's proving really difficult
or should I just make said function global?
some people choose to do that, i think it's fine if you can accept your entire script being indented
You realize that this is industry standard Lua modules right?
i will never say yes to this question x3
I do this so as not to produce global variables. Only I use local ScriptName
local myModule = {};
-- ...
return myModule;
exactly
nope! PZ is my first and only exprience using Lua
ya, that's the usual method
so I really have no idea how it's supposed to look
I have to say this so many times.. Do not use PZ as a standard.
i saw someone who used fenv to sort of do it the way you're doing but imo just do it the normal way
Always conform to industry standards.
i got most of my lua knowledge from zomboid and it's always great finding out some massive optimisation or some trick that makes the code 100x prettier and it's just... a completely standard lua thing everyone does
okay ๐ฅบ
yeah i guess this is the first time i'm running into specifically that lmao
It seems to me that using as few global variables as possible is best practices for any language
Yes.
Using global like PZ is very cheap and prone to collisions, deep issues, etc.
requiring modules as variables keeps things clean.
It's basically namespaces.
the world if lua variables were local by default
please, use other screenshot, I can't see this again and again 
Because I wrote it as an example? xD
local element = ISUIElement:new(0x0, 0x0, 0x400, 0x300);
OnPlayerMove only is for walking
running, etc
Might be learning Rust, @jaunty marten
Am getting impatient with Electron.. and all the tutorials out there being out of date.
whats rust
@bronze yoke ReuseGridsquare fires only when you exit from game? I can't catch this event when I move around the world. Maybe there is some other event fires when IsoCell or IsoGridSquare or BaseVehicle is unloaded?
yea, rust is a cool thing 
programming language
ah
@wet sandal hey, it still errs for me when i start up the game and whenever i check for loot. im using search mode and gravity if that helps
Might be good to do this convo in #mod_support But I don't see anyone actively talking here.
oh whoops
Just try resubbing to the mod, forces Steam to redownload it
Hm, cant find method to get coords for IsoPlayer, can anyone help?
player:getX() :getY() :getZ()
Oh,. thanks. It iherited from IsoObject. I didn't guess
Is my theory correct that when "Events.LoadGridsquare" is triggered, then some other IsoGridSquare is unloaded?
Is it weird to reference a mod in a portion of a module like this?
in my experience, yes, that is indeed the case.
also idk if "this" would work in this situation
this is self?
usually they are reused and the same object can be pulled
i've seen this done before
and 'this' does not work, 'this' is usually 'self' in lua, but your function doesn't have a self anyway
self must be arg or you must use syntax sugar -- ":"
you can always do local self = ... or local this = ...
self is a special param that is handled in the function header internally but passed either explicitly via Class.function(self, ..) or classInstance:function(..).
:func() === .func(self)
I know, that's what I was trying to say ๐
I said it for people in here who might not know.
I might be useless in here when people ask questions about implementing API but I know the rules of the language.
xD
any chance you made the guide, because I only the see the functions but there is no information about them
Explain pls. Not sure what you mean.
Did you install the vscode extension `Lua Language Server"?
I use Intellij, so I need a guide for vscode to see if it's worth changing programs.
emmylua is fully compatible
in vscode its not working for me
But I reinstalled since there was an update and seem to get more information now, not sure if you updated something.
yes
what information is missing?
for me it only said std apis before, now it show this
My default installation works so I'm not sure if this is due to changes to something I'm not aware of, such as limits to execution of tasks in extensions.
Do you have a weak computer?
This is all I can think of atm.
Either:
- Your vscode is very out of date (Which is not an issue since it's so easy to update it)
- You aren't loading the right extensions
- Some setting is preventing fully loading the typings (Files too large?)
- Something else
this is what you should be seeing
is it vscode? looks like idea
This is what I see.
I have to let the Lua extension load all the typings first.
You can see it in the bottom-left when loading the project in VSCode.
Its for me? I have very large project. All mods of server. I think it is some limitation in Lua Language Server, but i cant find how to config this limit. I use emmyLua now, but I don't like it
Wish I could reproduce your situation so I can write a solution Q&A for it.
there's no reason to use vscode's emmylua
the LLS extension is way better but something is preventing your typings from loading fully.
it's just worse than lua language server, but for intellij we don't have anything better
(3 months later) "Hey so I just rewrote EmmyLua for IDEA and.."
LOL
interesting, this now shows but getPlayer doesn't, it only says global now
there is a fork that looks promising but when i tried it it refused to load umbrella whatsoever
IDEA should support language server.
reaseon is Lua Language Server not woking with Candle in my project
Could repackage LLS for IDEA.
hm, how do I stop a temporary patch from replacing annotations of the function
it finally made sense why it said prevFn ๐
adding it to _G seems to work
any tips how I would see information about the events?
Type the event listener out normally and IntelliSense should show you.
just type Events. and it'll show a dropdown
you can see the event description by mousing over either the event name or the .add(), and the .add() will tell you the parameters
Reason: Bad word usage
In previous versions of Umbrella I got warnings about circular loops but I never tracked down the issue.
that's nice, but how do I get that? ๐
idk! i don't really know what could be different between our setups
the setup is just 'download umbrella, add it as a library', it seems like you did that part right so i don't get why yours is behaving so differently
I have the file and can find the information, but there is no intelliSense ๐ฆ
are you using emmylua?
i was trying some forks the other day but the ones i tried completely refused it
How do I get an item's id from a mod?
Either search in the script directory or find the item in the debug Item List, this will give you the type, for the full type you can right click the spawned item and there should be some debug buttons like edit.
that is in the full type
if you're looking in the script the module will be declared at the top of the file
What software do I need to view all the code?
Hello, what should I call from lua to activate the sound of the vanilla file "PZ_MaleZombieEating.wav"
getSoundManager():PlayWorldSound() I think
Hi guys, I'm trying to add a new "animation" when an object is equipped, I'm studying how the "Cuffs" mod does it and everything works good until I try to actually change the pose of the model in my custom one and export it in .fbx (the original file is fbx too). I get an **Anim Clip not found **Error so the problem should be how the file is exported. Somebody knows how to export it successfully? (I'm using blender)
thanks I'll check that
thx mate, I used getSoundManager():PlaySound();
I want to work on my own PZ music again. =( Just reminded me of those feels...
Are contributors not allowed to update workshop items? Every time I try I get an error code of 8 and I'm at a complete loss as to what could be causing it.
contributors are not allowed to update workshop items
damn this makes things a bit annoying. oh well.
ya, steam does not really support multi-developer projects that well
The only way to do it is unsecurely through GitHub actions on a repo.
and switched to isoGameCharacter:playSoundLocal()
Been doing some syntax today
Somone should make a mod that removes the stunlock when pvp
@tame mulch is there a way to get informed in lua of an animation event ? I have hard time synchronizing my Player zombie Banging on a door animation with the sound and door animation effect.
I think only in Action possible:
awesome ! animations from lua are mostly actions anyway. It looks like animations must be Action or State and states are java only.
you can check for animation monitor code
it does not push the events
I think events and actions are independent of each other.
it works
whenremoveFromWorld() is called, does it also remove the object from the square? removeFromSquare()
I wonder..
I wonder if I should stay up tonight.
And mod the shit out of this game.
@jaunty marten I'm liking Tauri so far. No issues.
Am using sass, typescript, and tauri.
I was gonna work on my mod again until it crashed my game
I guess I'll post my code
fingers crossed no one gets butthurt over it
oh my god
just found this in the source code
this function goes on for like 1k lines
which is almost entirely if else statements

hey coolroo may I ask and am I allowed to ask what your making
so an } too much and the world is out.
wait what
can you explain
oh man
Hello, i've got a new problem if anyone is so inclined to help.
I'm looking for a way to store data to a specific item. Say you've got a gasmask, and you are recording + 1 for every ten minutes its worn, then is there a way to tie that recorded data to that specific gasmask? Not every instance of hat_gasmask, just that single one the player is wearing.
I am under the impression modData will do what I want here, im just not 100% sure how to go about it, since there isnt a lot of reading material about it
Learning about weapon stats
Can someone please explain how CriticalChance and ConditionLowerChanceOneIn work?
The Baseball Bat has a CriticalChance = 40, while the Spiked Baseball Bat has CriticalChance = 30
So which one is more likely to strike a critical hit?
Is a lower number better here?
there are SO many of these
item:getModData().record = item:getModData().record + 1
Cant say for certain on critchance, but I believe the higher the better
What I can say is, ConditionLowerChanceOneIn, is the chance it lowers its total condition
so ConditionLowerChanceOneIn = 15 is a 1 in 15 chance its condition gets lowered
higher is better
Thank you very much, ill try this out.
there's a lot of factors that affect critical chance so know that a crit chance of 30% doesn't mean you get crits as often as 30% on most characters
what is import
I was hoping to make a mod called Supernatural Occurences!
it lets you reference items from that module without using their full type
sounds fun!
Essentially, you have a "haunted" level, this increases when you kill zombies, and decreases over time
you usually only need to import things when you're making recipes
oh okay so no recipes for me
delete the imports line and it might start working
the more haunted you are, the more likely a supernatural event is to take place, EG: Window smashes in the building you are in, door slams, etc...
okay
will there be any special sounds
this explains the performance issues 
?
I hope so! I'm essentially learning the mod tools and anything I can learn will. be used
the main ones i've seen are in the script loading methods so they're not *too* bad
it seems like it's more annoying to write and it does run slower but at least it's during load time
You often use DoParam?
Lmao can't say I do, I just like programming horror
given that it's primarily a load time thing the performance difference isn't that significant
I have a idea but I'm not sure how that would work
how about you make some figure run across the screen or something
like a sprinter
Yeah I figured when you said there are SO many of these it was that they were littered throughout the codebase
instead of just at load time
dang.. apparently my blackouts mod does not work properly in multiplayer
there's definitely some inappropriate usages but the big scary ones i've seen are in script loading methods
i guess it makes sense since it changes the shutoff date directly in order to get the actual blackout effect. that probably doesnt update real time in servers except for the host
okay guys we have a problem albion it stopped crashing but I try placing a model
my only issue with it really is:
- why do you want to write your code like this, switch cases are prettier ๐ฅบ
- the calling of trim every single time bugs me
and there is nothing there
^^^^
I was thinking that
so many string operations
nothing is there I even selected the place option
maybe it is under the grass tile
maybe
check if the model path is correct, otherwise it might be too big or too small
on the magnitude of 500, and keeping in mind this is called in a for loop which is a loop for a list of strings
alright one sec
for every parameter for every item in the game 
i am not working on modding anymore (at least for the forseeable future) so i wont be making a multiplayer fix for my mod anytime soon
load times are quite good for me so i can't say it's a big deal but it is a little bothersome
oh well
maybe someone will play with the idea in the future and make a better mod
LOL
also I just wanna shout out to @novel barn for helping me out with my trait sorting code, he was a huge help. Thank you!
Glad I could help! I'm far stronger at testing things than writing them myself ๐
Normally I hate QA people for that, but turns out when I'm invested in a project it's a huge help! Who knew!
okay what's wrong here I'm looking at blender stuff
lmao
thanks I guess
I think need apply scale for model
Can you tell me how so I write it down for the morning
Hey all! I've got what I hope is a simple question. I have the following override function:
local old_SGC_GetEmptyItem = ISShovelGroundCursor.GetEmptyItem
ISShovelGroundCursor.GetEmptyItem = function(playerObj, groundType)
print("attempting to intercept SGC.GetEmptyItem")
local oldValue = old_SGC_GetEmptyItem(playerObj, groundType)
return oldValue
end
I set a breakpoint on the first line of the original ISShovelGroundCursor.GetEmptyItem() and somehow my print statement fires three times before the original function fires? Logically that doesn't make any sense at all to me. Does anyone have any ideas what might be going on?

Scratch that... I killed PZ, verified game files, and relaunched and now it's behaving. I'mma just sweep that problem under the rug and pretend I never saw it.
LOL
ยฏ_(ใ)_/ยฏ
sometimes the answer is simply 'it's haunted'
yes
So that means the Baseball Bat with Nails has worse Crits and it's more likely to break than the normal Baseball Bat?
i suppose it would, yes
๐ I've got one more question for the night if anyone feels like ghost hunting with me. The above function override seems to be "working" in the sense that it can carry on to call the original ISShovelGroundCursor.GetEmptyItem. I have a break point inside the original to look at the playerInv variable it writes. I want to see what is in my player's inventory in the debugger. However when I click on the playerInv object and then click on items, it appears to be empty? Maybe I'm misunderstanding how the debugger works?
My ultimate problem is that even though I'm not changing anything at all, somehow my inventory gets lost between the start of my override function and the oldValue it returns.
So i've learned to take what the debug console says with a grain of salt. Especially after reloading my mod without restarting the whole game
sometimes it will say things are nil without them actually being nil
I've been restarting so much ๐ This is after a restart unfortunately.
it won't display certain datatypes if I click on them, and then throw an error every action afterwards
i've had the former happen though before first restart
idk if lua is compiled or interpreted, but i think if a var gets declared but not used the game ignores it
alllllso depending on the datatype it might not error out and instead everything that it is, is in the name
that might be happening with the inv?
especially if you have "trainer" shoes lol

