#mod_development
1 messages Β· Page 513 of 1
hello, anybody knows a mod for comparing current equiped gear with what I find? would be help comparing stats for clothes with protection and current durability
Those are known as 'placeables' and (I hear) they're one of the more difficult things to mod in Zomboid. I haven't actually tried creating any. I would suggest you start by looking at one of the (hopefully) more basic ones, the composter. Compost returns quite a few results in the files:
And there's a few files with 'Compost' in the filename - it isn't a simple change, unfortunately.
For anyone trying this in the future, it doesn't work by default with the 'Host' option in game, but it will work for dedicated servers. Unfortunately, @upbeat wolf isn't telling me how to fix that for some reason.
Thanks. I'll dig into that and see what I can work out.
I put the wiki tables with item variables back on github and added variables that I found:
https://github.com/MrBounty/PZ-Mod---Doc/blob/main/Items variables.md
I do this in parallel with test of my mod because it takes time
can someone help me understand how to edit class files?
What you mean by class file ?
i want to change something in this file
Javadoc Project Zomboid Modding API declaration: package: zombie.iso.objects, class: IsoFireManager
you're talking about java modding - you'll wanna catch co` or someone else into java modding - vast majority of us are lua modding
some things just can't be accessed/done with lua
Okay thanks
o/ newb question, on a whim i decided to try making a mod for PZ, my building shows up in game and im trying to figure out how to get the road to have lines painted on it and I just found a post about using BuildingEd to finish it, but google is not my friend today trying to search "project zomboid BuildingEd" would someone help point me in the right direction?
sort of a question for #mapping , but BuildingEd is a part of TileZed, one of the tile/mapping tools that's a part of the official Project Zomboid modding tools (TileZed -> Tools -> Building Editor)
π» derp, i see it in that menu now, thx
Does anyone know what program I need to load .X model files? I want to import some as an FBX to blender
how are the puddles rendered?
is it possible to change their appearance?
Two words: BLOOD OCEAN
XD
Try the #modeling channel, I think they use an addon to blender 2.x
Anyone know how I could ask the player to write something (enter a string)? It's to name a thing
any opinions on this? more specifically the Gourmet Revolution mod within it
I don't know but I would check the context menu "Edit", the one where you can change an item name
didn't know about that. It's for all items ?
you can use https://www.meshconvert.com/ to convert .X to .OBJ
Free online Mesh converter. We convert almost every available 3D Model data format to collada, obj, stl or ply.
woops, forgot i went to .obj first and then to .fbx
So converting to OBJ, then to FBX doesn't screw anything up and works fine?
seems like it, i converted a .x to a .obj, imported that, and exported as .fbx - i wasn't too specific with checking uv mapping since my purposes were fairly basic, so you might have to tinker a bit
Alright, thanks
Is there a mod that adds pausing to multiplayer
good shit, your life will be better if you know how to read spanish
thankfully I do lol
is the whole mod in Spanish or just the description?
Some parts of it, is English, but some or all of the guilds I think are in spanish
Can I redo a drawing of Spiffo for the cover of my mod? No copyright issue?
So, I would release this fella right now, if only the damage overlay textures worked(blood)! Correct reference, textures are in the correct folder, UV in two channels, shaders are fine. Any ideas what might be wrong?
Best modpack you'll ever find
The main features are in english, anyway the idea is that the community help to translate it to other languages
Btw
I keep with the same problem π¦ I need to run the applyTraits function inside the IsoGameCharacter.lua to see if I can make the game recalculate the XP boost of the perks based on the current traits. So the thing is that it receives an ArrayList<String> (I assume all the traits of the player) but I'm not being able to pass that from Lua, does somebody knows how can I make an ArrayList<String> from lua with the traits a player has to pass it to the function?
how do you actually do the hunting lol
I assumed it was just finding animal tracks using the foraging system, maxed myself out to test it
dunno if it's a mod incompatibility issue or if I'm doing something wrong (really I should've just enabled the mod pack by itself without anything else to test it but oh well)
Two ways:
Binoculars + Slingshot + Small rocks = Small animals hunt
Having that in your inventory you go to a forest area and right click a tree and an option of "observe" the tree will be there, click on that and the player will start to observe the tree and an image will appear that may be a simple tree, or an animal image, also two buttons will be available asking about Shooting yes or not, if an animal (unless you want to simply waste rocks) press yes, it you are success with the shot, the animal corpse will appear under the tree
Similar with the Rifle
Rifle equipped with a sight of x8 or more + a silencer (not necessary but recommended due to zombies)
Right click the tree and you will face the same situation of observing the environment until an animal appear. If you decide to shoot and you are success, the animal corpse will be there
The Hunting skill affects in the chances of seeing animals while the Shooting skills affects in the chances of making a success shoot.
Also for Rifle hunting the accesories of the weapon helps to do a success shoot and the greater the sight the better the chances of spotting an animal.
This is super helpful, thank you!!!!
local traits = player:getTraits()
local array = ArrayList.new()
for i=0, traits:size()-1 do
array:add(traits:get(i))
end
player:applyTraits(array)
should work but havent tested
local playerTraits = player:getTraits();
local array = {};
for i=0, playerTraits:size()-1 do
local trait = playerTraits:get(i);
array[i] = trait;
print(array[i]);
end
player:applyTraits(array);
Had something similar but I see you have specifically ArrayList.new(), will try that!!
Hope it works π€π»
heh ya close but with {} you're just getting stuck with a KahluaTable instead of a ArrayList
quick question about distributions: is 1 = 100% chance? on every container? or is it chunk-based?
how exactly does the number interact with the world
With this line, right? local array = {};
ya
Makes sense, will try that other code
rolls are done per container
and 0.03 would be a 3/100 roll, right?
cant really say for sure. havent looked at the new procedural distributions roll code
while I'm here tho, anyone know how can I make the "chat overhead"?
is it an echo?
kinda like how print prints to chat
Weird, the game get stuck in the loading screen when adding that piece of code
going to have to test that out
Tried to remove that part of code, started a new game with the mod but without that code, it initialised, added the code again and ran the game (it worked), but as far as I used debug to level a perk it started to throw tons of errors
I think that the reason why it got stuck at the loading screen is because I have that code inside a function that runs with the Events.LevelPerk.Add and that one runs when a character is created because of the strength and fitness. It simply crashed
ERROR: General , 1642643143002> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: No implementation found at MultiLuaJavaInvoker.call line:112.
ERROR: General , 1642643143002> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: No implementation found
ah ya must be when your calling it then
Also Chuck helped me with this
player:applyTraits(getWorld():getLuaTraits())
But it also crashes the same way
OnNewGame = function(player, square)
local traits = player:getTraits()
local array = ArrayList.new()
for i=0, traits:size()-1 do
array:add(traits:get(i))
print("*** Added " .. array:get(i) .. " to ArrayList")
end
player:applyTraits(array)
print("Post apply. all good")
LOG : General , 1642643431017> *** Added Clumsy to ArrayList
LOG : General , 1642643431018> *** Added FastReader to ArrayList
LOG : General , 1642643431018> *** Added Brave to ArrayList
LOG : General , 1642643431019> Post apply. all good
didnt have any issues calling OnNewGame event
Hmm it is maybe related to the event then π€
Jefferson County FD Engine
Yeap... it is related to the event
function testFunction()
for playerIndex = 0, getNumActivePlayers()-1 do
local player = getSpecificPlayer(playerIndex);
local traits = player:getTraits()
local array = ArrayList.new()
for i=0, traits:size()-1 do
array:add(traits:get(i))
print("*** Added " .. array:get(i) .. " to ArrayList")
end
player:applyTraits(array)
print("Post apply. all good")
end
end
Events.EveryHours.Add(testFunction);
It worked
And it did applied the XP boost (it also applied the perk level damn haha)
But I think I can manage it somehow
But at least it is running now
And recalculating the boost
nice
Maybe I don't have to pass the whole traits the player current has, maybe I just need to pass the trait which I want to recalculate
Whatever, I will work with this!! but this is a lot of progress compared to how I was before haha
Thank you so much!
huh looks like its only called twice in the java (applyTraits) basically when the player is added to the world, shortly before OnNewGame. never really looked at or used that function before
Yeah! but as I'm giving traits during the game, I needed (or wanted to) recalculate the XP boost
hrm wonder if theres a cleaner way. though as far as i remember the boost is in a hashmap which can sometimes be a pain dealing with from lua (least if you need to insert values)
Yo guys can we reload spawnpoints and spawnregions mid game?
Hi guys I got a mod concept to save gears. Gears are sets of clothing to equip automatically. It would look like this, what do you think?
I want to make virtual hordes that move across cells and spawn when in contact with a player. I've looked at VirtualZombieManager.java. Can someone explain roughly how the spawning currently works?
I know that when zombies are cleared of a cell it will spawn more zombies depending on the cells population from the heatmap etc. But I want to know things like what are the "reusable" zombies? I guess the zombies that are spawned are classed as "reusable" meaning I guess they are recorded as part of the population as they have already spawned? Is it possible to load and unload these "reusable" zombies to keep them persistant? I was under the impression that every time you leave a cell and come back, the old zombies are despawned and new ones are spawned in?
Thanks in advance for anyone who reads the wall of text and clarifies some stuff.
Also any reason Indie Stone has not implemented this?
I actually was just messing around with a older mod that did this very same thing and got it working last night. its the Hordes mod from the workshop. While I'm not sure about how "Reusable" Zombies work I know that the hordes from this mod remain wandering even when unloaded from the players area.
I think performance is the reason they haven't implemented it into the base game. But its something thats been on the list of todo features for a long time.
There is a spwaner API, you should start with that
Check under community API
That's because that's the wrong way to do it.
@drifting ore Thanks.
Wait sorry maybe I misunderstood. You're saying the zombies wander the map and are loaded and unloaded as a player contacts them? Or they are still running when not in contact?
I think the way it works is by calculating zombies individually as they wander
Like, calculating their positions
thats stupid?
it should just keep track of where the groups are and spawn them in as required?
My suggestion would be calculating a node position and then when a player loads that node generate a hoard based on some factors
yeah but why haven't IndieStone done that?
I think its because of how the zombie spawns work
In map making it uses a weird grayscale heatmap
read this plz
I think reusable in the context of PZ is respawned zombies in a cell
But I'm actually not to sure, am not home atm to check how they are classed or what other code references the
Yes I've looekd at some ZombieGroupManager, VirtualZombieManager, and ZombiePopulation<anager
The mod makes them virtual rather than active "real" zombies. similar or perhaps the same to how the base game will occasionally make zombies wander from far off unloaded cells to other cells. from my experience the zombies spawn for the first time when the player draws close. then roams from there. From my experience it doesn't impact performance until the zombies become real when they get close enough to the player for the game to draw them as 3d models.
it seems that the zombies are spawned individually, and then the groupmanager organizes them into groups
Ok so I looked into it rq
Reusable zombies are ones that I assume have been created but unloaded?
Like created in a cell and then unloaded
Only way to test Ig would to be loading a zombie in an empty cell
I can send you my current edited mod files from the hordes mod. but I cant really explain my changes or how the original mod worked other than it spawns zombies based off of a script in locations based off of game cordinates. my edits were all just to make the game not shoot errors and crash anymore.
Then running into another one and seeing if its reclassed into Reusable
Yesplease
I also know that it can form a horde dynamically useing a custom manager that can combine a group of like 25 or more zombies into a temp horde to roam around
You use this for that?
https://github.com/MrBounty/PZ-Mod---Doc/blob/main/Useful links.md
So basically the mod already works as I intended - with your edits to stop it crashing
Is there a way to get a unique identifier for an InventoryItem or an IsoObject? Something that persists across client restarts
more or less
but zombies get stuck on the new curved roads and do all sorts of weird things around fences
so then the performane issue is from number of loaded zombies only - same as base game
yeah
what they shouldnt get stuck anywhere
as soon as unloaded they should become virtual and not do any collision detecting or even movement
they use some strange find roads navigate.roads script that I dont understand fully yet
I think its a tiledef issue
I literally mean zombies in cell A1, move to your cell A2. So they get spawned on the left of the screen, when they leave the cell they are despawned again etc
Thats what I was assuming yesterday
You dont want to calculate hoards walking across water for example
For obvious reasons
They specifically follow roads rather than wander into the woods or anything. if they get stuck far enough away from the player they tend to dispand into vanilla smaller groups and mill about
Yeah idk
The documentation on zombie spawns is pretty much non-existent
A big issue with it is like
In other games an issue like this would be handled in a way different way
IE spawn a hoard in an unloaded chunk/cell
And run a movement change on it every couple of seconds
Instead of tracking them 1:1 live
Which is how I would do it in PZ anyways
You dont really need them to be tile accurate at all
Like
If you have a 12x12 tile cell
doesnt the group "leader" kind of do that?
Theres no reason to calculate a zombie moving from tile 1:1 to tile 1:2
But there is a reason to calculate tile 1:11 to cell 2 tile 1:1
Its a weird performance issue to solve for sure
I mean you really only need to calculate them moving in unloaded cells, correct
yeah I thought that would be the only logical way
So just like "mask" the loaded cell
you just mean the cell boundaries?
If a hoard runs into a loaded cell boundary, stop their virtual movement
Idk
Its 2230 Its late to be talking about hoard logic
no you simply determine if a horde is in an adjacent cell or not
otherwise you don't care lol
When in doubt, revert to early age comp science solutions
I have no doubt PZ uses some equivalent of ant colony simulation lol
I just hate the current respawn mechanics. Zombies don't spread out like water on a heatmap lol.
you know I actually thought zomboid would use ya know... BOIDS
Wait so
If zombies like
Group together
What if you just set a numerical scale on groupd
If there isnt already one
As # of Zombies in Group increases, raise its hoard priority
Higher priority in a hoard = spawn less zombies overall in the cell that hoard is in
if that makes sense
no the point is that no matte where you are, there's a dynamic chance that a horde might just happen to path over you
Similar to how BOIDs works
they don't have to affect the spawning of zombies in the heatmap
well you could still use spawned zombies, and the game automatically will subtract from the cell's population as it does already
I dont think that the game itself allows for dynamic tracking of groups in a cell
and then maybe instead of just spawning them in, you could spawn them offscreen and have them wander in only when a player enters a low pop area
Like I think that zombies are assigned to a group and then the game just checks if they move from cell 1 to cell 2
Yeah the zombies actually seem to be handled individually which is horrible
And then another process handles spawning of "hoard" objects
but im not sure because zombie groups have a "leader"
iE 5 or more zombies clustered together
I assumed that the "leader" was the only one doing movement and the others just follow it boid style
I think they are
But I dont think its like
Tracking the leaders movement on tiles
actually eventually I want this to remedy the stupid spawning mechanics
But rather in cells
i.e no more clearing a cell, leaving for 2 seconds and coming back to a full cell
Like if Group A1 wanders into Cell 2 with 5 children
you have to wait for a "horde" to wander in and populate the cell. And if you are there when it happens they will spawn offscreen and wander in
Then Cell 2 has 5 zombies subtracted and then generates 5 around a leader
yes
And then they "move" into Cell 3
And repeat
But I dont think it actually tracks them crossing the cell
Only transitioning between them
And then it just spawns the group randomly in the cell based on its heatmap
If I had to guess, thats how it's done
It would make sense from a performance perspective
The base game
I'm fairly sure its just tracking movement between cells and nothing else
Works great for performance but it sucks for overall spawning
if (var1.getCurrentState() == ZombieIdleState.instance()) {
int var5;
float var10;
if (var1 == var1.group.getLeader()) {
var10 = (float)GameTime.getInstance().getWorldAgeHours();
var1.group.lastSpreadOutTime = Math.min(var1.group.lastSpreadOutTime, var10);
if (!(var1.group.lastSpreadOutTime + 0.083333336F > var10)) {
var1.group.lastSpreadOutTime = var10;
int var11 = SandboxOptions.instance.zombieConfig.RallyGroupSeparation.getValue();
Vector2 var12 = this.tempVec2.set(0.0F, 0.0F);
for(var5 = 0; var5 < this.groups.size(); ++var5) {
ZombieGroup var13 = (ZombieGroup)this.groups.get(var5);
if (var13.getLeader() != null && var13 != var1.group && (int)var13.getLeader().getZ() == (int)var1.getZ()) {
float var7 = var13.getLeader().getX();
float var8 = var13.getLeader().getY();
float var9 = IsoUtils.DistanceToSquared(var1.x, var1.y, var7, var8);
if (!(var9 > (float)(var11 * var11))) {
var12.x = var12.x - var7 + var1.x;
var12.y = var12.y - var8 + var1.y;
}
}
}
no the base game has no hordes I don't think. I think it simply spawns zombies until it reaches the threshold in the heatmap, by subtracting population values from the heatmap until there is a "hole" which then gets filled by adjacent population tiles. i.e it acts like water finding its level which I find stupid.
I mean there is a chance for zombies to spawn in "hoards"
In the proverbial sense
IE 5 - 10 zombies huddled in a group
I don't know how thats handled though
dear god, You've made an info sheet
hahah, I mapped the notes of guitar to the keyboard
you trying to make the guitar in game playable?
I just need to like figure out how to
1: Make it so pressing home overrides all the other hot keys till it's pressed again
2: Map each of the keys to the relevant sound file
3. After I establish each of the notes in the sound script
I think thats a great idea. but maybe you could go with how Starbound gave you the option to import midi to control the instrument would be simpler for the player lol.
Yeah, that's not how I want to do it, I want people to play the notes like the keyboard was a midi keyboard, but laid out like the guitar itself
Thats fair. I've seen that done before and it's always cool
The only problem I think is that keyboard only has room for three strings at a time
so
like it does restrict a lot in that you'd have to hold shift to access the other 3 strings
But I think people who are creative work around limitations and can still achieve a lot with 24 notes at a time
But this is only one out of two ways I want guitars to be playable.
I was also considering how to do chords
got it, you have to make it compatible with the RockSmith usb cable so I can plug in my Les Paul and play to people in Zomboid
hahahah
that'd be hilarious
Nah I think it's gonna be weird cuz the way I'm envisioning it
you'll have to hold like the Z key, then press Space to play "E1"
So
For guitars I would do it where each row is 1 string
If that makes sense
Although I think you're already doing thay
So nvm ignore me
Yeah that's the idea, and you can access the top 3 strings by holding shift
Help! How do I leave Raven creek?
raven creek is to the west of knox country, so go east
I've followed the road but there's no exit
for furture reference, this is not a question for #mod_development xD
more like just #pz_b42_chat to be honest
ok thanks again!
no problem
anyone know what line of code I can use to check if the player is wearing a specific item?
How do you edit your access level in a server you're hosting?
anyone know this?
Is there a good way to save a variable on the server which persists between server restarts?
Please let me know if anyone can help me.
I have prepared own PNG image and when I display it (by drawTexture function), the image is distorted.
Attached image is the example result of displaying vanilla's "FavoriteStar" in two different ways.
- case 1. display from texture.pack as in vanilla: OK
- case 2. display from file: NG
drawTexture(getTexture("media/ui/FavoriteStar.png"), x, y, 1, 1, 1, 1)
-- case 2
drawTexture(getTexture("media/ui/FavoriteStarFromFile.png"), x, y, 1, 1, 1, 1)```
Is there a solution to this problem?
After that you can check if the item is in it
Can anyone help suggest a way to uniquely identify an InventoryItem or IsoObject that will persist across client restarts and across multiplayer clients? Do items have anything like a world id?
I tried to follow the "one stop tilezed"-thread. When I'm trying to generate lots i seem to get no result. Any suggestions for what to look for, that could be wrong?
I've created a 1x1 where I've placed a building. The three inputs in the dialog window have been correctly filled as far as i know
Question, how do I read into what exactly each moodlet level does? I don't mean off the wiki.
Does anyone know how to make a recipe in lua? Or can link to an example
Hey there, I need to find out what is calling this function ISWorldMenuElements.ContextDisassemble but I can't find the place. When looking through the whole media/lua folder there's no other reference to it but the declaration. Also tried to check only for ContextDisassemble but same thing. Any clue?
just grab any mod that adds recipes and check how it's done
I would ask in #mapping
I've already looked through a lot and all are script based. I'll continue searching. π
I would read the java source files in zombie/characters/Moodles/
Ok, might have asked this in the wrong chat, do not know. I am wondering if someone has the LUA Extension libraries for Project Zomboid, that I can just install onto my IdealC or Visual Code π
also when you say recipe what do you mean with that there is like 2 form of recipe in like a "crafting in windows like make a spaer open a seedbag craft bandages." all that is one type of recipes. the other one is like building a cabinet in a metalworking and carpentry so which on is it ?
I mean crafting an item e.g a Bandage. Sorry! I should've been more specific.
is it possible to read the coordinates/offset and rotation of a placed item? IsoWorldInventoryObject has xoff, yoff, zoff but they don't seem exposed through getters
we had one yester day there wanted the other one ^^ but yea it could be in the the media/scripts folder
Ok, thank you, I'll start looking there again
scripts\recipes.txt look like the have most of basic recipes there
Yeah I know, I'm on the other hand trying to find recipes written in lua.
Anyone making mods that alter the weather?
Removing this morning mist would be great
If anyone can do it, hit me up, I'll pay for it it's so annoying
is there a clever way to use 3 different items?
atm my recipe uses:
A/B/C/D/E/F/G
A/B/C/D/E/F/G
A/B/C/D/E/F/G
can I use sth like
3x(A/B/C/D/E/F/G)
``` ?
because if there are more than 8 items and you use them several times the recipe page is quite long
Answering my own question: IsoWorldInventoryObject has getWorldPosX(), getWorldPosY(), and getWorldPosZ() exposed to lua.
reminder to use https://zomboid-javadoc.com/41.65/ for docs, not the official one
Javadoc Project Zomboid Modding API package index
Answering my own question in case this helps someone else: InventoryItem has getID() which seems to be what i'm looking for
Hi! me again. I continue with the damn perk boost.
With @quasi geode help I managed to ran the applyTrait function but it does looot of things so it is not an option anymore.
I'm now tring to run the
addXPBoost from the TraitFactory class.
The thing is that I'm not finding a way to get an specific trait from the player to apply the boost. Right now I do have this
function testFunction() for playerIndex = 0, getNumActivePlayers()-1 do local player = getSpecificPlayer(playerIndex); local traits = player:getTraits(); for i=0, traits:size()-1 do if traits:get(i) == "Formerscout" then print("PreBoost"); local traitString = traits:get(i); local trait = TraitFactory.getTrait(traitString); trait:addXPBoost(Perks.PlantScavenging, 1); print("PostBoost"); end end end end Events.EveryHours.Add(testFunction);
And that "works" but the boost of course is not applied to the player perk because this is not related to the player: local trait = TraitFactory.getTrait(traitString);
As far as I see in the TraitFactory the only function that returns a TraitFactory.Trait (I need this to run the (addXPBoost) is the getTrait, does somebody knows if I can access to that one from the player?
player:getTrait(String) does not work
Um you are just trying to add a new trait?
No, I'm trying to apply the XP boost during the course of a game. Let's say the player earn a new trait. I want to apply the XP boost that trait is supposed to give (and it does when picked from the start)
I see everywhere that if they use the player they use the getTraits, not the getTrait, that one is always used with TraitFactory, damn
have a qusetion about your testfuctions
why would you make the call local traitString = traits:get(i); if you already know its "Formerscout"
That's only because I'm testing how to run that and I'm using formerscout to test, then that line won't be there
Yeah actually I don't need it
Not even for test
i see some do struff like that in the real world and i never understod why a person would first do if statement and after that they would do the same opreations to get the string
okay so there was no point because you know it always true in that case ^^
function testFunction()
for playerIndex = 0, getNumActivePlayers()-1 do
local player = getSpecificPlayer(playerIndex);
local traits = player:getTraits();
local trait = TraitFactory.getTrait(player:getTraits():get("Formerscout"));
print("PreBoost");
trait:addXPBoost(Perks.PlantScavenging, 1);
print("PostBoost");
end
end
Events.EveryHours.Add(testFunction);
Like that
The for was there since I tested the arraylist thing xD no more sense to keep it
wait are you doing double loop before
also i even guess you could do a local trait = TraitFactory.getTrait(player:getTrais():get("Formerscout)) or nil
if trait ~= nil then
do stuff
end
and cant remmebr if lua make nil object as false as default if so
if trait then
do stuff
end
right now i cant remember the return other for the traitfactory if it not there btw but you get my point i guess
Yeah but my current problem is the "do stuff", I need a way to do that "addXPBoost" to a trait that BELONGS to the player, so I don't have to call TraitFactory, somehow I need to access to that trait from the player
In the applyTrait function inside the IsoGameCharacter.lua there's a line that is
this.getDescriptor().getXPBoostMap().put(var14, Math.min(3, var15));
Where var 14 is the Perk and the other is an int so I'm now thinking that maybe that line is the one that I need π€ to update the xpboost
i see hmm hmm i wonder if you just can check it on a list another way and save that list but yea dont mind that for the moment ^^
I tried with this too but I got a lua error from another vanilla function π€
function testFunction()
for playerIndex = 0, getNumActivePlayers()-1 do
local player = getSpecificPlayer(playerIndex);
print("PreBoost");
player:getDescriptor():getXPBoostMap():put(Perks.PlantScavenging, 1);
print("PostBoost");
end
end
Events.EveryHours.Add(testFunction);
Caused by: java.lang.ClassCastException: class java.lang.Double cannot be cast to class java.lang.Integer (java.lang.Double and java.lang.Integer are in module java.base of loader 'bootstrap')
at zombie.characters.IsoGameCharacter$XP.getPerkBoost(IsoGameCharacter.java:14531)
... 47 more
LOG : General , 1642689953060> -----------------------------------------
STACK TRACE
Callframe at: getPerkBoost
function: render -- file: ISCharacterInfo.lua line # 118
unction testFunction()
for playerIndex = 0, getNumActivePlayers()-1 do
local player = getSpecificPlayer(playerIndex);
local traits = player:getTraits();
for i=0, traits:size()-1 do
if traits:get(i) == "Formerscout" then
print("PreBoost");
local traitString = traits:get(i); <------ delete this
local trait = TraitFactory.getTrait(traitString); <--------- to local trait = TraitfactorygetTrait("Formerscout")
trait:addXPBoost(Perks.PlantScavenging, 1);
print("PostBoost");
end
end
end
end
Events.EveryHours.Add(testFunction);
what was i trying to say first time ^^ because you always konw when you inside that call it alwas the "formerScout" so you dont make random noice in the test code like traitString = a whole new call when you know it going to be the same as "Formerscout"
Yeah but that local trait = TraitFactory.getTrait(traitString); is no longer related to the player as I'm calling the Factory
Even though it doesn't throw a lua error and the trait:addXPBoost is executed, it doesn't affect the player
Because the trait is not related to the player
Hey friends, is anyone working on a solution to the workshop spam we have with server packs and carbon copied mods with non-unique images nor descriptions? I like to see what kind of cool stuff people are coming up with, but the noise is pretty annoying.
no that true because you never apply it to the player you only look do the player have this Trait yes he does and then you save the it as a variable and but never return the object to the player
Are mod bounties a thing in this community? I'd happily shell 20 dollars out for this (if it hasnt already been created)
Idk how you'd add pausing
To MP
Like from a fundamental standpoint
Who knows tho it might literally already exist as a disabled function
For some reason when I run this:
function testFunction()
for playerIndex = 0, getNumActivePlayers()-1 do
local player = getSpecificPlayer(playerIndex);
print("PreBoost");
player:getDescriptor():getXPBoostMap():put(Perks.PlantScavenging, 1);
print("PostBoost");
--[[ local traits = player:getTraits();
local trait = TraitFactory.getTrait(player:getTraits():get("Formerscout"));
print("PreBoost");
trait:addXPBoost(Perks.PlantScavenging, 1);
print("PostBoost"); ]]
end
end
Events.EveryHours.Add(testFunction);
I'm getting lua errors in the Callframe at: getPerkBoost
function: render -- file: ISCharacterInfo.lua line # 118
That line is
local xpBoost = self.char:getXp():getPerkBoost(perk:getType());
Does somebody has a clue? π€
What does the actual error say and not just the line?
Callframe at: getPerkBoost
function: render -- file: ISCharacterInfo.lua line # 118
ERROR: General , 1642695522452> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor385.invoke.
ERROR: General , 1642695522452> DebugLogStream.printException> Stack trace:
java.lang.reflect.InvocationTargetException
Caused by: java.lang.ClassCastException: class java.lang.Double cannot be cast to class java.lang.Integer (java.lang.Double and java.lang.Integer are in module java.base of loader 'bootstrap')
at zombie.characters.IsoGameCharacter$XP.getPerkBoost(IsoGameCharacter.java:14531)
thats resulting from player:getDescriptor():getXPBoostMap():put(Perks.PlantScavenging, 1);
Fenris_Wolf β Yesterday at 6:08 PM
hrm wonder if theres a cleaner way. though as far as i remember the boost is in a hashmap which can sometimes be a pain dealing with from lua (least if you need to insert values)
the problem is the boost map specifically is expecting a integer value, but all numbers are doubles in lua making it impossible to directly insert a value, kahlua wont convert them on map insertion
also,
local trait = TraitFactory.getTrait(player:getTraits():get("Formerscout"));
trait:addXPBoost(Perks.PlantScavenging, 1);
doing this is going to effect the trait across the board, not just for the player (addXPBoost is called when first defining the trait)
honestly i think i ran into this whole issue before when i made the Buyable Traits mod (using skillpoints to buy traits mid-game) but I didnt spend much effort on solving it since i wrote the mod as a joke for a friend (she was complaining about excess skill points and not being able to buy traits with them)
Looks like it is not possible to parse it to int then π€π₯
Hate this π€£
But the logic is ok? I mean if it was an integer it should have worked π€
I copied it from the applytraits
I think math.floor should return an int. Not sure how that's handled in Zomboid, though.
ya i tried half a dozen ways to force it to be a int but kahlua just wouldnt do it. kalua treats all numbers as doubles, even integer values, and a double is a perfectly valid entry for a hashmap so it doesnt convert it on insertion (unlike passing it to functions that expect integers where it will convert)....i even tried specifically casting and converting to a int but theres just no way. as soon as its in lua its a double
Ahh, yep, good ole kahlua issues.
math.floor wont. just a double that looks like a int
Ah okay, Zomboid must do something different to that then.
I remember the old skill system where you earn skill points
Damn... Stupid lua π₯
There is a AddXP event, you can maybe use that and when the xp is add, you just add more of it
really whats needed is a setXpBoost wrapper function for inserting into the map π
This. It would be awesomr
Or do I miss something ? That should be enough
the event is specifically triggered at the end of the AddXP method call after the xp has been added and transmitted. trying to add more xp while inside the event will trigger the event again (endless recursive loop). It could be done but it would be some pretty hackish dirty code
What check does a server make in order to determine that you have a mod and the mod is the right version?
I hadn't thought of that, would need a local boolean or something like that. Bad idea but could work
Hey there ! I was wondering, if anyone has an answer ofc, can I remove an Item from the vanilla loot list ? I'm making a mod to replace prisoners clothes. So far I got them to spawn on zombies, but boilersuits are still present in wardrobes in shelves π€
Any clue how to properly check if a player is currently inside its own safehouse?
try knocking?
ok answering my own question, I guess this should work:
local function isInsideSafehouse(player, worldobjects)
for _, object in ipairs(worldobjects) do
local safehouse = SafeHouse.getSafeHouse(object:getSquare())
if safehouse then
return safehouse:playerAllowed(player)
end
end
end
Guys, if I delete a file in my "workshop" folder and then update my mod on steam, will this file be deleted from the folder of the user who had already downloaded my mod?
imagine playing a tabletop RPG game in a ROLEPLAY server inside a RPG game
I want it so much now

it's live on my server rn, but the pretty dice icon won't be there until,., i mean ill probably wait another day to avoid the angry mob if i update too quickly
adding in /pm, whisper, whisperme, etc for ~subtle rp~
oooh
Your planning to do a RPG session inside Zomboid?
i have an entire RP server with dnd rolling features
whoa
could you send me the link please? Looks interesting
it's in my shortbio if you click my name 
I would recommend looking at Blackbeard's modding videos, you can find them on the pinned messages of the channel
ah, thank you!
https://www.youtube.com/watch?v=N6tZujOPnDw&list=PLwV27NP3RkJl27tveCa9EMMvAdjmGXZsf&index=4
this one in particular is what helped me
This tutorial video will show you how to make a simple drink in Project Zomboid. I will go into the steps involved from start to finish. Read more below.
0:00 intro
1:08 Start
1:44 Searching for images to use in game
2:30 Searching for the Sound Effect
3:06 Creating mod file directory
3:54 Creating mod.info
4:34 Creating a poster
7:14 Adding ne...
How do I put the contents of a ISPanel into two columns instead of just 1?
Hey everyone, I just started modding and I'm doing the typical babby's first mod (adding a new item that's just a retexture of the wine bottle for an inside joke). I copied everything from the basegame wine bottle, created the item, distribution, texture, world model all working... except that, following some stuff I read here, I tried to use the WorldItems/Wine.fbx for the StaticModel instead of modifying and re-exporting the obsolete Wine.X.
As it happened to @drifting ore last week, when drinking the bottle the model is flipped. How do you go around fixing that? Sure, I could try making a WineFlipped.fbx but that seems crazy inelegant. Looking at e.g. the Teacup Fix mod, they use a single .fbx for the HotDrinkTea's StaticModel and WorldStaticModel and theirs seem to work perfectly.
ill look into it
Anyone use or know of a mod that lets a player combine things easier? 1 click to combine all my thread. Maybe add more things that can combine into itself like salt or pepper?
any way to set .xml file load order?
oh yeah @brittle jewel i saw you made like a whole function for pruning the images from chat
were you pruning the [img=] stuff?
on your bubbly bubble typer mod thing
find the chunk via its coordinates in your world save folder
usually looks like map_coordx_coordy.bin where coordx and coordy are numbers
yea its all stored neatly so you can pretty much delete an entire area by just glancing at its coords
amazing
id backup the files beforehand for obvious reasons but that'll reset them as if noones visited them
Server Owner here, I just had a quick question regarding spawning in objects not in the default admin tools such as chairs, flags, flooring, etc.
How do I go about doing it?
Has anyone had success using ISTextEntryBox? I get one in my UI but when I change the text, it changes it in the box but in transparency it remains the original text and when I try to get the text with getInternalText() it always gives the same text, the original one. So it never updates, anyone an idea?
Yeah, I'm getting the message with the OnAddMessage, getting the text with message:getText(), checking if that matches the image texture:[img=media/textures/bubble1.png]. An if/else for 1.png/2.png/3.png is much quicker than string.find to check if the message matches what you want. Then, I'm setting a doDelete variable that is checked in OnPlayerUpdate so it's nearly instant.
Feel free to modify/take/whatever code from my mods!
i jsut did something similar with 1 line of gsub
That won't remove it for other players.
ISChat.addLineInChat = function(message, tabID)
local line = message:getTextWithPrefix();
line = line:gsub("%[img=" .. "(.+)" .. "%]", ""); --prune ugly img= nonsense from chat
when it goes to add the line into your chat, it'll scrub it out
though i wonder if it'll still remain as a newline

Yes, it'll start doing weird stuff after 250 lines, I think.
I set up a loop to output 250 messages in chat, then did testing.
Some people said it would scroll up randomly, some said it wouldn't move at all. I got some weird reports in the early stages of chat bubble.
oh yeah
pz's chat is awful;
when you reloadchatsettings sometimes itll just- zoooom you up
for no reason at all
I gave up trying to remove the chat lines when they toggle the prefixes/timestamps.
It's just not worth the hit to performance. And people rarely do that (I think) as I haven't received any complaints.
yeah very very rarely
i have it as a 'show authors' feature since i gsub out multiplayer usernames in my rpchat mod and reloadchatsettings just... does its thing
an accidental feature that i've just run with

Lol the best feature!
praying they release some form of update to the chat system because my god
the fonts especially kill me
for processsaymessage and the others its nearly as bad as comic sans imo
Yeah, they need to open more of that up to Lua.
my coauthor scraped the isoplayer.class to replace the 'Q shouting' callout stuff and is currently trying to find a way to rewrite the defaultchatsettings bytebuffer nonsense thats javalocked
if she can manage to adjust the defaultchatsettings in some way, we might be able to rewrite it our dang selves

Anyone have some experience with adding custom animations? I mirrored the 1H attack animation to the opposite hand but I can't get it to play
Got the thing done, enjoy. https://steamcommunity.com/sharedfiles/filedetails/?id=2726093638&searchtext=
Hey anyone know a mod I can make a safehouse anywhere? I wanna safehouse my huge warehouse
I think its a setting in the .ini files u need to edit. ^
Hi guys i've just arrived here.
I am a big ingame radio enthusiast, so my first question: could it be actually possible to make ingame radios that support the transmission on multiple frequency channels?
For now you need to be on the exact same frequency as the other person, but would it be possible to make HAM Radios i.e operate in a wider spectrum in the same time?
i.e you tune a spectrum of 117 to 118mhz on the HAM and everyone in that spectrum (117.2, 117.4, 117.6... 118MHz) would hear your transmision.
For now in roleplay MP its nearly impossible to find each other with all that frequencies (With military radios ranging from 0-1000MHz), so im just thinking of a way to make it more possible to actually be able to randomly bump on each other transmission on the radio.
Especially if u have a HAM
when you want to code an expanded acumulator in the style of cod zombies but you lack the skils to do it π¦
I have a question that might pertain to modding
Does anyone know if the corn vegetation stuff gets destroyed when ran over by a car?
Or do the cars just phase through it
And if they do, is there a reference for where that is handled in the code
When working with Tiled, what exactly is the difference between all of the "0_FloorOverlay"s? I don't see a difference when placing stuff down selecting any of the 4.
Very slight differences
Iirc every single blending tile is on a seperate layer based on its direction
Idk why
Its weird
And confusing
What should I be using for that?
Those aren't source files they're already compiled
where is this setting
does anyone have experience with adding mods to a dedicated server, and can we take it to the dms if you do
you can decompile .class file
And what would you recommend to do that?
I'm trying JD Ui but not working at all honestly
Online one seems to work
Wtf, I'm a survivor know ?
I did this quickly tonight, I have almost finished my mod to save sets of clothes, or gears. All that's missing is the button to equip everything and minor change, like the display name instead of item name and the name of part that is buggy
Don't hesitate if you have any suggestions or ideas.
Btw, it's my birthday! I say it only for praise π π
after months of waiting, i have returned from my hiatus
time to make crappy mods again
Waiting for Herobrine
hows things? is animZed available yet?
i think i recall a lot of things such as character meshes were being restricted by this
or has a new system been found?
like... i will legit make a minecraft mod for project zomboid if i can get my head around how the character rigging/skinning works
heard that AnimZed was the thing, i saw a dancing mod so i should look for that guy
hm... maybe i shouldnt ping without a reason so... @elfin bobcat
oh... he speaks russian...
There is some mod that add animations like, like you said, the one with dance and the one to sleep on a bed (true actions) but animation are in .x. I don't think there is any guide so good luck
dang.. im studying his mod right now (2648779556)
how the fck did they pull this off, fascinating
Any experienced weapon scripters, im finishing up some gun models and need help implementing them
check modeling to see them
its for models usually
from my experience i think fbx files in this case are just bone position data
or animations for specific models i use those in ue4
yeah thats right
oh... its using the default character models pz already has
dang so i cant make pz into minecraft yet...
unless...
no herobrine?
i can pull skin weight data from the original character models
and learn how to apply them to a new mesh, minecraft characters
it could be possible... i just need to find a good converter that preserves skin weight data
hm maybe this is too big
the only way id know of doing something like that is putting it in unreal since its also an animation too and exporting the file from it when im done doing that
sparingly has some decent covert options
but pz is java...? and currently is using dirext.x files for its 3d models
but its pretty crude i doubt its very efficient
hm alright.
aslong as java is reading .fbx files ue4 should too and whatever u export out of that should be compatible
I wouldnt take my advice tho i will find any means necessary to make things work lol
id also suggest using a app called "spin 3d" i just used to to convert a .x file to an fbx so i could work on it in maya
and then i don see why not convert the back into .x when done tinkering with the fbx version
mesh, skeleton? is this the rig being used?
usually from my experience the rig and mesh are one package, not separate
yeah that should be the skeletons for both genders, the thats what the mesh is gonna work off of and target too
sorry if i aint explaining to well im pretty young and new to this stuff still
fair enough, thank you for your input
np
hm... im thinking of doing something risky as hell
i might just ask the developers how the heck some of the mesh/bone structures interact
probably wont get a response
Do u have a 3d model software?
yes
which one?
blender, formerly maya
oh.. well at least i could make mods for more.. saucy poses for the mannequins
"Female_Body.X" in the models_X folder is this one above
Im currently using maya, but id use that spin thing was was talkin about and convert both the βfemale bodyβ and the βfemale skeletonβ and import it into a brand new scene so u can take a closer look at it
Convert them to fbx.
Found what I was looking for but do you have a decompiler suggestion I tried a few and none of them work. Currently this online one does but it doesn't accept multiple files also be nice to read it in VSC
maya no longer free, had to abandon it βΉοΈ
spin thing in maya? im having a hard time understanding
Spin 3d is its own software
oh
It litteraly just converts 3d files for u
ooh this might be what im looking for
Thats how i made for exmaple m14.x turn to m14.fbx
ive just been using online converters
Yeah i couldnt even get online converters to work
I have a question about a mod on a server I am playing on
would someone maybe jnow more about it
ah maybe this is the wrong channel
Don't ask to ask please
lol
well its the autostar bus tuning mod
maybe someone has some experience using it
we need a programmer in here
us artists cant help with this mate haha
@crude rover well ill ask some more questions
whats going on?
basically I have read the magazine you need to read
what is this issue related to/doing?
just no crafting recipes showing up for the items
I made this decompiler tool https://github.com/quarantin/beautiful-java
works beautifully!
and the discord server of the creators of the mod is locked to patrons and they have no guide on their workshop page
kinda dumb
hm for now it sounds like some kinda script issue, such as a missing file/missing or incorrect strings
im no programmer, so dont quote me
thats fine
im more asking to hopefully find someone that has used the mod
and if thats the case maybe they know what I am doing incorrectly
Seems all jar files I run open and close
I do have java 64 bit
not sure what you mean
have you read the README file?
Well that seemed related seems I'm a bit of an idiot. I still want to know why JD UI wouldn't work
I'm not installing all this crap just to datamine a bit
jd-gui is outdated. wont decompile newer stuff
And what about procyon
no idea
Used bytecode viewer seemed to work pretty well for my needs
Now I just gotta added it to a vsc workspace
thank you, this is actually sick, super handy
This reminds me of how I used to sit in my base and play guitar through my interface while reading books to pass the time, usually in a circle with other people. Super comfy
Playable instruments is what this game needs exactly
kinda little stalker vibe
and when all those novel books, comics, and tv magazines someday run out
thats your last way to stay at least a little more happy
yeah, and listening to someone play music/playing music decreases boredom and increases happiness
is the tilezed and worlded you get from steam up to date?
Yeah this decompiler is working well, found out any positive food moodlet increases carry strength by two and it doesn't go up with higher levels.
is there an event that ticks like, every ten minutes or so?
wish there was a list of these events 
There is a list of events. I believe there is such an event. Lemme check real quick
Yep, there's an event EveryTenMinutes
oh thank GOD
Also EveryOneMinute if you need it more often, and EveryHours or EveryDays if you need it less often
you're a blessing
i'm making an afk kicker and,, well it works! but i didnt want to be That Shitcoder who has ticking code on the main ticker
every hour will be splendid

I have a question. I need to store some moddata, so I get it like obj:getModData() which returns a table, but changes to that table don't seem to be remembered later. Is there some particular way in which I can ensure that this data is remembered by the IsoObject?
I may just be doing something wrong it it's supposed to be remembered, though. I can try to debug my code further, but I've been tweaking it for hours and I can't seem to get it to work.
...actually, I just figured out the problem, I think
I accidentally overrode a variable I needed from outside the function scope inside of it.
I was using the OnCreatePlayer event and I needed the second argument, so I just named the first unused one id not realising that's also my mod id. So I've been writing my data to 0 instead of my mod field
It's pretty common practice to use _ for unused variables - onCreatePlayer(_, player)
Yeah, I renamed it to that now
Maybe I should look into a VSCode extension that flags Lua syntax errors and warns about undeclared / duplicate variables and such
It'll save you tons of time, especially if your code is getting lengthy.
I just started getting into modding project zomboid, and I'm trying to add a soda for practice. However, I noticed that the documentation for how to setup an icon is no longer up-to-date. Where do I store the .png for an icon for an item? It says to store them in the media/texturepacks/ui.txt, but all the files in that folder are .pack files, and that doesnt really make sense
@autumn torrent a Good idea is to look how other mods have done it
Its media/textures for a icon .png
Alright, now I have a new problem. Namely, I'm doing some stuff in the OnServerStarted event that alters global moddata:
local function OnServerStarted ()
ModData.getOrCreate(id)
-- Do stuff
ModData.add(id, modData)
end
After this, I want to use it in the client, in the OnAddXP event, but the table I get there is empty. I'm not sure how to sync moddata between the server and client though. I've looked into the getServerModData function but it never triggers any event on the client when used? I've hooked into OnReceiveGlobalModData just to see if it fires, and it doesn't. Neither does onLoadModDataFromServer. And just calling getServerModData doesn't seem to do the trick. SendCustomModData fires just fine on the server's end so calling that function does do something but I'm not sure how to give the client access to moddata edits from the server.
Edit: Looks like I have to call ModData.request.
Yah i guess that probably wouldve been best lol ty
I'm not entirely sure why my icons aren't showing up ingame. I've tried looking at another mod that adds an item but our file structure and code are the same (at least regarding the icons)
there any guides for getting started with moddata? something as simple as saving a single variable to the client
I've just been working with moddata as well. I don't think there's a tutorial, but there is the following:
IMPORTANT TO NOTE: Project Zomboid IWBUMS beta update 41.51 contains significant optimizations to our save game system. As such any saved games played in 41.50 will NOT be operational. A separate Steam beta containing the previous 41.50 build has been provided so that you can continue and finish ...
There's a section about moddata in there, including networking
IntelliJ works pretty well for me, capsid (or however it's written) has a tool for decompiling but IntelliJ can also just show the decompiled class itself. The benefit of running a tool is that you can use utilities like "view references" a lot easier
Basically, how it seems to work is like this: if you have something on the server, you use ModData.request to pull it to the client, or ModData.transmit to push it to all clients. There are then events you can hook into to intercept that data
I'm managing fine for what I'm doing, finally found where health increases are from
I hate n1-999
e.g.
local id = 'MyModID'
local function OnReceiveGlobalModData (key, modData)
if key == id then
ModData.add(id, modData)
end
end
Events.OnReceiveGlobalModData.Add(OnReceiveGlobalModData)```
In all this crap theres this little call, https://i.imgur.com/QaYgfIw.png
AddGeneralHealth
Zomboid does a ton of tiny little things in places you can't access from Lua that you might wanna change. It's really quite a pain sometimes
I'm just datamining
Having the Java source is definitely a lifesaver though
Wiki is so bad for figure out specifics
I expected strength to increase with each level of being fed well but no not at all
Satiated is the exact same carry weight as Full to Bursting, https://i.imgur.com/zzGtIZI.png
Yeah, someone should write a more detailed guide on modding than we currently have. Though I'm just getting started with modding so I'm not really in any position to
Also what it means by strength is so weird
Having some specific knowledge about these things collected in one place would be good
Some times they give exact carry weight numbers other times its "Their strength is increased"
And when they mean strength I assume more than just healing and carry weight
But nooo
Thats all there is
Does anyone know where I might commission a mod or does anyone know of anyone accepting commissions?
what kind of mod are you wanting to be made? Just curious.
Figured out my issue. No one told me I needed to add _Items to the end of my items file name lol
Just a zombie graphics mod for now, one that turns the zombies into flood combat forms from halo
If the mod is good, maybe make marine armor and the MA5B
This is probably a stupid question but does anyone know how to access controller inputs in Lua?
I see the input class in the docs but I can't figure out how to access its methods.
There are global methods for it, I think
isJoypadPressed, isJoypadDown, isJoypadLTPressed, isJoypadRTPressed, etc.
I'd recommend decompiling the Java source if you haven't. You can look up exactly what they do in the LuaManager class
This is taking a lot of time but I'm getting the facts.
Moodlet Explanation:
Thirst:
Slightly Thirsty = Nothing (0.002+ Standard Regen)
Thirsty = -1 Carry Weight (0.0013+ Regen)
Parched = -2 Carry Weight (0.0008+ Regen)
Dying of Thirst = -2 Carry Weight, Slow Death (Regen Set to 0 and -0.0165 Health)
Hunger:
Satiated: +2 Carry Weight (0.015+ Regen)
Well Fed: +2 Carry Weight (0.015+ Regen)
Stuffed: +2 Carry Weight (0.015+ Regen)
Full to Bursting: +2 Carry Weight (0.015+ Regen)
Peckish = Nothing (0.002 Standard Regen)
Hungry = -1 Carry Weight (0.0013+ Regen) | Under 85 Hunger
Very Hungry = -2 Carry Weight, (0.0008+ Regen)
Starving -2 Carry Weight, Slowly Die (Regen Set to 0 and -0.0165 Health)
I have the decompiled file, I've been looking for controller instead of joypad though
lmao
Woops thirst has a different health loss
Come to find out that higher levels of stuffed don't increase regen rate...
Even more so running actually attacks those moodlets while they're active.
There's also stuff like getControllerAxisValue in the global functions. I think they're meant to be used together? But not sure.
Suddenly can't find if running does eat at it. Ignore what I said there I suppose for now.
https://github.com/MrBounty/PZ-Mod---Doc/blob/main/How to use global modData.md
@drifting ore has been compiling modding resources while he works
thanks!!
Checking again to see if there is any one experienced in weapon scripting
Does anyone know where the data on watched/read VHS/Books is kept in relation to the ISOPlayer object?
Hey guys! How to change the volume of the trunk of a car in your fashion?
@cursive roost
?
ah. taken care of already :)
π
Hello! Can I ask what is the Lua Command Console for and how to use it in DEBUG mode? I tried a few generic commands but it keeps throwing me errors... Could anyone provide me with an example?
What'd you try? I use it to test player specific things. For instance, if you do print(getSpecificPlayer(0):getUsername()) it'll print the player's username.
Is it possible to spawn items like that?
If you're already in debug, you can just use the item spawner. But yeah, you can get the player's square and then add an item to it.
getSpecificPlayer(0):getCurrentSquare():AddWorldInventoryItem("item", 0, 0, 0)
I would love to keep asking you how but you've already helped enough and I don't want to annoy you anymore. Thank you very much!
No worries! The more people that have modding knowledge the better.
1 thing, Can I use wiki items names for this?
ahh there are base ids like Base.Hat_BalaclavaFace i forgot
Exactly!
It worked!
Anyone have experience with dynamically adding server options? I just get a vague error about a java.lang.RuntimeException: at MethodArguments.assertValid if I try to create a new ServerOption.
e.g. lua DoubleServerOption:new(opts, optName, 0.0, math.huge, 1.0)
Like these settings?
Yeah, sort of. Not necessarily the UI part, though I guess that would be helpful, too. I want to have server settings that I can load when the server starts to do some stuff with it. Having them appear in that list too with as little effort as possible would be best.
That's not dynamic though
I can't do that at runtime from the looks of it, which is what would be ideal for my application
Ah, no you can't define new options at runtime. They would all need to be set up before that. You can get the values of course, and they can be changed whenever.
Or, I don't know how, is what I should say.
Hmm. Well, I'm just trying to figure out why the DoubleServerOption constructor throws an error for now, but I can at least try to look for another way.
Ah, I think I should use . instead of : on the constructor. That would explain why it complains about the method arguments.
this should not be the first argument in that call
something.func(something) should be the same as something:func()
Yes, I know the difference. I just messed up.
im just saying you could still use .
No, I have to use ..
: is incorrect
The DoubleServerOption.new function does not take DoubleServerOption as its first argument
because a constructor is static
I used the shorthand in a situation where I shouldn't have, rather than the long form in a situation where the shorthand is possible
It works now. I've succeeded in dynamically adding server options. Only to the ini for now, but the UI is next.
Yeah no : and . are different
: passes self implicitly, . calls it without self, or self needing to be passed explicitly
If the original method is defined with : then you should call with : as these will both pass self implicitly.
However if its defined with . and called with : , : will try to pass self as the first argument.
hey, I don't mean to interrupt but is there a way to create and spawn a new entity that isn't a zombie or a survivor.?I was wanting to work on Don't Starve style hallucinations that could appear and disappear depending on the sanity of a player
Theres like 4 different combinations of BS with it. However this is only active in metatables.
@carmine flume explanation here.
You passed the table DoubleServerOption in the first argument leading to that error.
Yes, I know how they differ. I just messed up, but I fixed it. I called a Java constructor with : which makes no sense because it passes the class as a first argument.
Wait this was in java?
I instantiated a Java class from Lua
mmm I unfortunately don't know how lua works at the interpreter side.
I'm not sure if meta tables are in use in connecting the languages
Point is, I do know how it works, I just made a mistake and fixed it
Alrighty
I can call it with : but that means the function signature doesn't match, leading to an error.
And I don't think any Java constructor takes its own class as a first argument. That's kind of silly.
No that doesn't make sense for the type of language java is
I can sort of see it if there's some templating going on but it's kind of wacky to put that in a constructor as the first argument
It would have to have a function signature like this to be able to call it with :
public SomeClass (final Class<?> c) {
// Do stuff
}
Mmhmm
anyone know how to repair windows with soul filchers building time?
Is there a way to know the wind & water resistance and insulation of a bodyPart with current equipment?
hey guys, does anyone know which file handles loot distribution on top of furniture etc please?.. I dont mean the .lua that handles the loot distribution inside containers. thank you β€οΈ
I would check how it' done in the health panel
But you can't see that in the health panel
There is only the health
There is tab with details about insulations etc
You mean the temperature tab ? There is insulation and wind resistance so I should be able to use that but oddly, no water resistance
Hi guys, I made a VERY simple mod for PZ, "Pee in a bottle" which basically makes your character able to drink pee and regain a very little amount of hydration, but gain unhappiness. It's meant to be able to push your character those extra miles before dying from dehydration, for example if you're stuck on the highway with no water. Someone explained it to me as "Bear Grylls Simulator", but now comes the question.
I am very bad at LUA coding etc, all the code I got so far are very simple and .txt based. So I am wondering if there is someone who might know a little that would like to collaborate a bit on it? Currently it got around 80 downloads since release 2 days ago, but I have gotten some awesome suggestions which I have tried implement, but just don't know how. Obviously you'll be added as a co-collaborator. PM me if you can help.
weird, I remember there was some "Water resistance" info in there at some point π€
You could still check on the clothing side, cloth have a waterResistance attribute, and you should be able to find out the corresponding body parts
you do know that pee would dehydrate you more right? ^^
also that a good amount of downloads π way more then what i have on my mod so far so π for that.
also the problem with some idears is they can be next to nothing need to code to a lot of coding depends on the idear. so are you trying to do? also people even might help you in bit of code over here ?
i wonder if it because the temperature advancemode ran out of space in the sub menu because i can see you can see how wet you body are ^^
Well the pee is meant to boost you for a limited time, thats why you get next to no hydration but enough to maybe make it back alive to a water source.
I wanna add a trait called "Happy Pee Drinker" (Name suggested to me), where you can drink pee without getting unhappy. Also I wanna add a timer between "peeing", so you can't make infinite pee bottles.
so look like you want to add a trait and then hook it into eating/drinking actions
wait, is there really people who enjoy drinking their pee? π
Who knows, might be. A lot of special people out there.
seems weird to add that trait if you're not sure
There is a wet menu but no water resistance. And I don't want to check all item because I'm not sure who it's work, like if I'm equip with a sleeveless coat that has a water resistant and a long sleeve t-shirt with another. What is the exact value? The average of the two? The one on top? No idea
well simple percentage addition would be a good start, isn't that what bite protection etc is doing anyway?
No idea, I use self.char:getBodyPartClothingDefense, like in the protection tab
I'd say the max is the value. I mean, so long as you got something covering a spot, wearing more clothing either over or under it won't decrease the time it takes for you to get wet in real life.
The most water resistant garment protecting a part of your body determines how wet it gets
So that's not always going to be the one on top necessarily
I haven't checked in the code, but that sounds like the most straightforward way
Hi, anyone know where the weapon tooltips in the inventory panel is coded from? I tried looking from ISInventoryPaneContextMenu.lua to ISInventoryPane.lua but no avail, anyone know where is it from?
I have now search all throught the LUA files and can't find any code that resembles the weapon tooltip, guess it's hardcoded in some where else? weird, any other tooltips are in lua files
Still looking a way to completely remove item from a game. I tried:
local item = ScriptManager.instance:getItem("Base.ExampleItem")
if item then
item:DoParam("OBSOLETE = TRUE")
end
Looks like this method works and prevents item distribution at all. But sadly it's not 100% solve my problem.
I also tried to do this one thing:
module Base
{
item ExampleItem { }
}
And it's works, like, item completely gone. But i'm getting error while i trying to use item from belt or holster.
I also found this method, but i still don't know how to make it works:
https://projectzomboid.com/modding/zombie/inventory/ItemContainer.html#Remove-zombie.inventory.InventoryItem-
Probably coz this is not lua.
Any help greatly appreciated. <3
How can I get the hotbar of the player to know items equip ?
I think the game take only one file with same name, so maybe if you copy/paste the vanilla .txt with the original item and remove it, it's gonna work
It's just a guess
Oh, I didn't think about that. Might work as a temporary solution. Thank you. :)
||whispers Happy B-Day! π ||
Find by myself:
local playerItemList = player:getAttachedItems()
for i = 0, playerItemList:size() - 1 do
local item = playerItemList:getItemByIndex(i)
end
Thanks ! ^^
Does anyone know how to check if an item is accessible? If the player can grab an it without moving. I look at the craft menu but if someone knows the answer, I take it
My new mod that I do in parallel with my other. It allows you to save sets of equipment, check the stats, compare them (not done yet) and equip everything quickly if everything is at hand. I will add another 2-3 things before putting it on the workshop.
I hope it will be useful to other. I did it because I'm tired of taking 5min to change my clothes when I return to base after an expedition.
This is amazing. Great QOL improvement.
Neat!
Anyone know of a mod that adds more facial hair options? Ive been lookin for something with a handlebar stache option but no luck.
if not question2, is there any resources for skinning in this game so i can do it myself?
No matter what I do I cannot get manage containers to work in multi-player anymore
I've tried everything and am prepared to go nuclear
What blocking you ?
I am only loading the server with manage containers and it doesn't work
Day 2 of trying to graft Kingsmouth into my existing map
I got half of it, which ain't bad
deleted the relevant cells in the server database
still won't gen anything where the existing north riverbank of the main map gens
there a way to clear the debug error log without rebooting?
maybe I have to delete associated isoregiondata files as well as the .bins
Don't think so
what is the type of a dropdown menu option in the sandbox menu? can't seem to find anything on this or an example in the base game files
Post a capture pls
Reapply Style?
I'm setting up a sandbox-options.txt file for adding options to the Zombie Lore page of the sandbox menu, in this case, I want a dropdown that mimics the Strength dropdown of the base game
Yah sorry, excuse my ambiguity
I'm getting an error when opening up the map where my modded UI resides.
It displays normally as intended, but the first time I open it I get a couple of errors once.
The log points to these lines in my code:
self.mapLegendWindow:drawTexture(colorCommunity, self.iconColumn, 10, 1, 1, 1, 1, 1)
self.mapLegendWindow:drawText(getText("UI_legendCommunity"), self.textColumn, 8, 1, 1, 1, 1, UIFont.Small)
Is there some sort of syntax error or something minor like that? Since the UI elements display just fine
I know how to do it in a new UI but not on the sandbox menu
what is the error
STACK TRACE
Callframe at: DrawTextureColor
function: drawTexture -- file: ISUIElement.lua line # 735
function: render -- file: MapLegendUI.lua line # 62.
[21-01-22 21:01:40.997] ERROR: General , 1642791700997> ExceptionLogger.logException> Exception thrown java.lang.IllegalArgumentException at GeneratedMethodAccessor227.invoke..
[21-01-22 21:01:40.997] ERROR: General , 1642791700997> DebugLogStream.printException> Stack trace:.
[21-01-22 21:01:40.998] LOG : General , 1642791700998>
STACK TRACE
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@cda45b41
function: drawText -- file: ISUIElement.lua line # 916
function: render -- file: MapLegendUI.lua line # 65.
[21-01-22 21:01:40.998] ERROR: General , 1642791700998> ExceptionLogger.logException> Exception thrown java.lang.IllegalArgumentException at GeneratedMethodAccessor200.invoke..
[21-01-22 21:01:40.999] ERROR: General , 1642791700999> DebugLogStream.printException> Stack trace:.
that doesn't look like the full error
Ok I'll try to get the full one, give me a minute
I only see these two errors in the log
I've updated my previous post with the new error log @odd notch
Hello, does anyone know any mod or have any tips that make me get the mouse coordinates on the screen?
getMouseX()
Just that, it's global
Thank you very much
you see the part where it says 'stack trace:' and then you're omitting that
if you aren't in debug mode you should be in debug mode
f11 -> errors -> screenshot whats there
from what i can see
you only have 8 arguments in your drawtexture proc
i believe it takes 9
Your tip helped me a lot, do you know the command to get the screen resolution ?if I set it only to mine it will give problems to my modπ¦
drawTexture(texture, x, y, a, r, g, b)
try following that syntax
Where do you add that exactly? Im having icon issues
In media>scripts, on the file that contains your item(s) info
Okay thanks
I'm still stuck on this. Cannot figure out for the life of me what the dropdown menu type is for the sandbox options and I can't find it anywhere. If anybody has any suggestions for words or knows what it's called, please help me lol the dropdown box is what im trying to code and the code is my own that doesnt work because the type isn't correct.
Words I've used so far are: dropdown, choice, table, combo, combobox, options, option, selection, select, tray, menu, list
There are two errors, virtually the same logs
I double checked my xyntax for the drawTexture and with it fixed I still got these errors
I'll try to bruteforce the errors tomorrow, throwing things at the wall and seeing what sticks (the only way I know how to code lmao)
Sure getCore():getScreenHeight()
I found all of this in lua\client\XpSystem\ISUI
These are the health, protection, information panels, ect
anyone here have any idea? #mapping message
Thanks man
Does anyone know what java object handles what RecordedMedia an player has/hasnt watched?
does distributions support decimals? like 0.5 or 0.05?
Do this to get a record of what I learned today, I would expand it as I go:
https://github.com/MrBounty/PZ-Mod---Doc/blob/main/Make an custom UI.md
and how exactly does it work? like 0.5 = 50% ? or 0.5 is half from 1%?
Any number means that number/100
So 1 means 1/100, 0.5 means 0.5/100 (1/200), 0.04 means 0.05/100 (1/2000)
bcz i have 3 items, one = 1% second = 0.3% and third = 0.1%, after killing 200 zeds i had 0 first items, and around 5 or so third items
I believe what I just said is the case, at least, it's either that or /10
strange, i also tested with 0.05 value, and they was dropping more often then those that has 1
That's strange if so, sledgehammers (for example) usually have values that are around that ballpark
well i just had another test it was #1 = 3, #2 = 2, #3 = 1
and after killing 500 zeds i got 12 of 1st item 10 of second and only 1 of third
while with value of 0.05 after 100 zeds i had 10 or so items
Checked here: https://theindiestone.com/forums/index.php?/topic/38165-quick-guide-how-to-mod-the-loot-distribution-system-distributionslua-proceduraldistributionslua/ & the /100 seems to be the case
This is a visual guide for mappers and modders who need to add or modify PZ's loot entries using the new ProceduralDistributions.lua approach. Whilst the ProceduralDistributions.lua file has been in the game for quite a while (i.e. the Gigamart shelves having distinct loot types), TIS will be eve...
FYI the spawn chances are not a percentage/%, the math is fairly complicated but that number isn't "X out of 100" odds.
Nevermind then, thank you
I use stuff like 0.001 all the time? Dunno what the minimum value is, but there's a lot of factors affecting the calculation, including the amount of zombies in the vicinity inflating the chances, and with that in the equation I believe that there may be a "minimum effective value" of table entries that is higher than really rare spawn chances?
When I test stuff that is supposed to be super rare, it never seems to be as rare as "0.001" should imply?
got it, ty, ill also try 0.001 and extr rare loot options
need to see if there will be a difference, coz as i said with 0.05, from ~100 zeds it was around 5 items... and that's not so rare
Any clue how this could be true in MP? I have debug mode disabled and I don't start the server in debug mode either:
CharacterCreationMain.debug = getDebug() and getDebugOptions():getBoolean("Character.Create.AllOutfits")```
@LuaMethod(name = "getDebug", global = true)
public static boolean getDebug() {
return Core.bDebug || GameServer.bServer && GameServer.bDebug;
}
yet I'm getting some error in a code block like:
if CharacterCreationMain.debug then
-- do something that leads to crash
end```
|| and && are null termininating
do you mean it to be Core.bDebug || (GameServer.bServer && GameServer.bDebug);?
What is the difference between getPlayerIndex() and getPlayerNum() ?
Because getPlayerIndex return a nil
it's not my code, it's from the game
but in that case the parenthesis don't change the logic
what do you mean exactly, I don't get it
null terminating means that the expression stops running as soon as it evaluates to true. Sometimes there is code run in accessors that is important, but obviously if its part of the core game that probably doesn't matter
but you are right parenthesis would not change the end value of the expression
Anyone happen to know where the sandbox settings for single player games are stored?
Can't find it in the saves folder
ah ok, but in my case I can't figure out why getDebug() is returning true, since I don't have debug mode on the client and it 's not enabled either on the server
but only way CharacterCreationMain.debug would be true is if getDebug() returns true
im not too familiar with lua but can you use a boolean operator on an assignment expression?
CharacterCreationMain.debug = getDebug() and
guys i notice my make ups cant be removed; you have to change it for a vanilla make up and then remove option is avalible
i put they like this on definitions:
local makeup = {};
makeup.name = "Wiz_HarleyQuinnMakeUp";
makeup.category = "FullFace";
makeup.item = "Wiz_HarleyQuinnMakeUp";
makeup.makeuptypes = {};
makeup.makeuptypes["All"] = true;
makeup.makeuptypes["Foundation"] = true;
table.insert(MakeUpDefinitions.makeup, makeup);
makeup = {};
makeup.name = "Wiz_MysticBodyMakeup";
makeup.category = "FullFace";
makeup.item = "Wiz_MysticBodyMakeup";
makeup.makeuptypes = {};
makeup.makeuptypes["All"] = true;
makeup.makeuptypes["Foundation"] = true;
table.insert(MakeUpDefinitions.makeup, makeup);
do i need something extra for them to be on the Remove List?
yes
How do I check if a KahluaTable is identical to another?
== doesn't work because it's not the same table, they just have the same values. If I can just check if the size of the two is different it would work but I can't do it strangely. I put the two tables for you to better understand
The code I tried:
if table1.len ~= table2.len then return nil end
for i,v in ipairs(table2) do
if not table1[i] == table2[i] then
return nil
end
end
return table1
I think that code is terribly wrong
first you never return true, but also if not table1[i] == table2[i] is probably not doing what you expect
I forgot the last line
Might sound silly, don't know the steps you have taken to debug are you sure that it's evaluating as true and stuff inside is causing a crash, or is calling CharacterCreationMain.debug causing the crash?
return nil if not the same, othewise return table1
@pine vigil the crash occur here function: disableBtn -- file: CharacterCreationMain.lua line # 1277
more specifically the code that crash is:
if CharacterCreationMain.debug then
for bodyLocation,combo in pairs(self.clothingCombo) do
fillCombo(bodyLocation)
end
end
line 1277 is the one with the for keyword
So what do it do ?
It's two string, I should be able to compare them
I don't think so because not table1[i] would evaluate to false I believe, unless the value is false or nil
why not use if table1[i] ~= table2[i] then?
Damn, beat me to it.
Yeah same shit, thx
Otherwise, you know how to find the lenght of a KahluaTable ?
for an array just use the # operator, otherwise you have to iterate the table to count the items
i'm surprised there's no __equals metamethod override done by kahlua π€
I don't know what is the # operator π
#table1
returns the number of elements in table1 assuming table1 is an array
theres a _eq
that really useful thx
also works for strings
@quasi geode @teal slate any clue about my problem with getDebug() that returns true even if I have debug mode disabled on both client and server side?
unless the stack trace is wrong π€
not offhand
but don't work xD
only if it's an array
So not a kahluaTable ?
depends what you put in there
if you only do table.insert(table1, value) to add items, then it's an array
how do you perform the insert?
When you say it doesn't work, how is it performing vs what you're expecting?
works fine on my side:
test = {}
table.insert(test, "test1")
table.insert(test, "test2")
table.insert(test, "test3")
print(#test)
``` prints 3
On my first post you have the 2 table, I want to return on of them only if they are identical
Yeah, I mean. What is #table1 reporting as the value?
hehe
Was poking around, utterly bizarrely I have debug enabled and CharacterCreationMain.debug evaluates to... false. π€
are you connected to a remote server?
also you'd need this in sandbox character page:
Ah yes, I'm stupid
How do I get all item of a type that is in a container ?
FindAndReturn(type) give only the first one and FindAndReturnStack too
Do I need to check all item in the container ?
FindAll(type) ?
I know there was something, thx !
also you could probably use getAllEvalRecurse
for example in my spear traps mod I do this to get the full list of spears fom player inventory, including from equipped bag:
local items = inventory:getAllEvalRecurse(function(item, player)
if item:isBroken() then return false end
if item:getScriptItem():getCategories():contains('Spear') then return true end
return false
end, ArrayList.new())
Don't get what you code do
getAllEvalRecurse takes a function as argument to decide what items should be included in the reult
@LuaMethod(
name = "getDebug",
global = true
)
public static boolean getDebug() {
return Core.bDebug || GameServer.bServer && GameServer.bDebug;
}
i wonder if this is a precedence thing
actually, no, hm
would still be fine
or rather, not return true if it's disabled
@teal slate I suspect "Allow Clothing Unlocked" might be enabling debug? π€
... weird
i can't uh
find where it's actually used in gettext
wait
{ name = "AllClothesUnlocked" },
blurgh
How do I get an element in a java.util.ArrayList ?
Overkill in my case
Never mind, I found getBestCondition witch is exactly what I need
public final SandboxOptions.BooleanSandboxOption AllClothesUnlocked = this.newBooleanOption("AllClothesUnlocked", false);
odd
seems fine
yeah I can't think of anything that would lead to the flag being true unless you have both debug mode enabled and AllClothesUnlocked=true
hmm
private void onTrigger_SetDebugOptions(String var1) {
try {
DebugOptionsXml var2 = (DebugOptionsXml)PZXmlUtil.parse(DebugOptionsXml.class, ZomboidFileSystem.instance.getMessagingDirSub("Trigger_SetDebugOptions.xml"));
Iterator var3 = var2.options.iterator();
while(var3.hasNext()) {
DebugOptionsXml.OptionNode var4 = (DebugOptionsXml.OptionNode)var3.next();
this.setBoolean(var4.name, var4.value);
}
if (var2.setDebugMode) {
DebugLog.General.println("DebugMode: %s", var2.debugMode ? "ON" : "OFF");
Core.bDebug = var2.debugMode;
}
} catch (PZXmlParserException var5) {
ExceptionLogger.logException(var5, "Exception thrown parsing Trigger_SetDebugOptions.xml");
}
}
this is all i can think of
unaccounted-for core.bdebug setting
humm could it be that if a client connects with debug mode enabled, it will enable debug on the server until the server restarts?
mmmmmaybe
would be easy enough to check
if it is, it's core.bdebug
also just found this gem
public static boolean IsDebugSave() {
return !Core.bDebug ? false : false;
}
I got another gem for your collection:
public static void sendZombie(IsoZombie zombie) {
if (!bFastForward) {
;
}
}
``` π
some of these could be because of the decompiler
like my gripe about this
if (var3 != null && this.isWallTo(var3)) {
return true;
} else {
return false;
}
when it's equivalent to return (var3 != null && this.isWallTo(var3))
How do I take an item to put it in an other container ? I tried that but no item:setContainer(self.char:getInventory())
I'm looking at the inventory UI but I think someone know the answer
It's probably a pretty common thing to do
function AM2_TransferBag(cont1, cont2)
local movedItems = {}
cont1Items = cont1:getItems()
if cont1Items:size() >= 1 then
for i = 0, (cont1Items:size()-1) do
item = cont1Items:get(i);
table.insert(movedItems, item)
end
end
for i, k in ipairs(movedItems) do
cont1:Remove(k)
cont2:AddItem(k)
end
local num = getPlayer():getPlayerNum()
local pdata = getPlayerData(num)
pdata.lootInventory:refreshBackpacks();
pdata.playerInventory:refreshBackpacks();
end
cont1:Remove(k)
cont2:AddItem(k)
I was thinking something like that, I just thought there was a vanill function in the game
Thx both of you
You don't even need to remove, AddItem is enough
Found it ISTimedActionQueue.add(ISInventoryTransferAction:new(playerObj, item, item:getContainer(), container)) just in case that interess someone in the futur
Man, I really wish there was a way to monkey patch Java functions from Lua.
Uhhh, I asked in the wrong place, but anyone good with making clothing mods able to take a comission?
very scary code
@urban geyser I could probably put something together for you, What did you have in mind? before I say Yes
I wanted to get a simple set of cargo pants done, theyβd probably look nearly identically to base game military pants
That and have them able to be bloused/tucked in
Like tucked into the shoes/boots? I can do that, do you want an untucked variation?
Yeah, honestly could probably just retexture the pants from sharks military uniforms, with his permission obv
I think I already have something made close to what you want, give me a minute
the right shoe is ok the left one ehhhh
its probably got weights painted on it from another joint on the body
ahh
Maybe a dark grey or something, I just want more pants I can tuck into boots tbh
what does specificPlayer:getWornItem() do? Does it grab the specific item name in the parentheses?
specificPlayer is also equal to self.character
getSpecificPlayer is use for the server side, if there are several players. If your code is on the client side, you can just use getPlayer() it will work
getWornItem(bodyLocName) gonna give you the item in a specific bodyLocation
So, if I put a body location name in the parenthesis, and then do if (bodyLocItem = "InsertClothesName") I can check for a specific item rather than any item within that area?
Do somthing like that
local item = getPlayer():getWornItem(bodyLocName);
if item:getType() == "MyType" then
--Do code
end
Alright, thank you
All vanilla body locations https://steamcommunity.com/workshop/filedetails/discussion/2695471997/3198117849820264621/
Thank you for that as well lol, I just tried looking for a list
well fixed it but
