#mod_development
1 messages ยท Page 318 of 1
So if you make it equipped in for example the same slot as necklace, but you attach it to the foot bone, then it will stick to your foot even if you have shoes on
hmm yeah I guess I could but I think I wanna stick to it having its own slot
otherwise someone will complain he cant wear his precious crucifix necklace

That's how I'm able to do trick animations with the skateboard, there's a free floating prop bone that I can move around, and then I make the skateboard "clothing" attach to that bone, so however I animate it, it will make the skateboard do the same thing
wow nice
Some day soon I'll make a guide on how to use paddlefruits rig in blender to make multi-stage animations
I think it will turn out great
you managed to explain coding to someone who has no bloody idea about math
;D
and the words were not alien so I guess you will nail the explanations
That's good, happy to help! ๐ I have a few years of tech support experience which helps for sure
definitely
but I will still apologize in advance that I will probably get to repeat the same questions
because it will take a while to get it all in my head
lol
but so far I remember most of the stuff you guys said
After finish my QoL crusade I wanna try my hands at some animations
yay
this will be fun
also I just realised that the bug where you dont equip a hammer to nail stuff has been fixed
finally realism again instead of using the weapon I have in my hand
If you get any good then lmk. I might want to hire someone to make some.
By just researching the wall building system more, I have the impression that smth more is wrong with it. For example, high level wood walls have higher durability as high level brick walls. Also didn't notice any HP increase for the brick walls as my masonry increases (it always has HP 500). Does anyone knows more about how this system is supposed to work??
I haven't really dug into the wall building, but making the better building mod I definitely realized that the building system is not fully baked. Lots of weird stuff and inconsistencies. Did you check to see if there are any other properties or something that changes?
Could be that there's durability + some other modifier that affects the final health maybe. Or it could be an oversight, both are completely possible haha
I tried all this in debug mode without any traits on my character (so pbbly nothing affecting it negatively).
Here is a summary of weird things I found out:
- metal walls always have health -1, no matter of your welding skill and whether it is a lvl1 or lvl2 wall
- wooden walls on lowest lvl have health -1 (but it increases with higher carpentry skill)
- highest lvl wooden walls have higher HP than highest lvl brick walls
- brick wall health is always 500, no matter of the lvl or your masonry skill
- stone walls also have -1 health at lowest lvl (but I didn't try them for higher levels)
The health=-1 walls are also immediately destroyed by one hit of a baseball bat. Not yet tried how they behave under zombies damage though.
It's for sure something weird with the code then, sounds like they just haven't really polished it at all
I'm not sure that'll work now. dang. Gotta be the moodle
Is there a way to get an object that's directly under the mouse ? Like someone would do with a raycast or something of the like ?
For now all I can manage is to detect objects in a radius around the mouse and the efficiency is quite low
If you get a good answer on this, let me know. I've been struggling with context menus for weeks lolll and could maybe use this if it's something we're able to do.
(wrong comment, my baddd Albion... never mind hahaa).
I'll let you know if I find a satisfying solution
You mean so you can target an object that is on the same square as another object? For example two hats on a shelf next to each other and you want to be able to target one of the hats using the mouse?
It seems vanilla just goes by the square to determine which items can be picked up from context menu, so I feel like you'd probably have to mess with targeting the sprite itself
"illegal access" - I don't ask for much, just let me change the heavy load level please
Yeah that's what I'm currently looking into, but yeah I'd want to add better interaction with world object like picking them up, moving them and or placing them in containers without having to go through a thousands clicks
But I've been wondering, do 3D world objects have sprite ?
It's such an annoyance for me. I am working on a mod and one of the features should be that wall durability is increased (under certain circumstances). But with this situation in the vanilla code, the whole enterprise could be more complicated than I thought. ๐ Maybe I make my mod to temporarily "fix" those things until it gets a suitable vanilla patch.
Ah yeah good point! Maybe see if you can figure out how the aiming works? Since when you're aiming and you hold it directly on a zombie the reticle color changes, so they are somehow able to target the zombie model itself it seems, unless they're doing some clever tricks that makes it look like thats the case
I've looked up that a bit, but I think this system may be java only
You might try some commands from here for changing stuff about the player's inventory weight: https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/inventory/types/InventoryContainer.html#getCapacity()
Not sure whether it will help you but might be worth to look at in case you haven't done already. There are at least some commands which can manually change smth about the inventory weight system.
declaration: package: zombie.inventory.types, class: InventoryContainer
Yeah it probably is tbh
Haha well yeah sounds like your mod would be good for two things, fixing the bug and then making the walls more upgradeable ๐
my issue is I can fix the weights in lua but that only does so much. the stuff I need to mess with to fix the sprint issue is stuck in java from what I can see
it seems like it should be simple, but I'm struggling with this: how do you change the name of a Notebook (from "Empty Notebook")?
it was :setName() ๐ฅฒ
For all anime lovers - anime shader with true cell shading for B42
https://steamcommunity.com/sharedfiles/filedetails/?id=3457364806
ill have a look..
I just didn't even think that some of these bags are going to have 100's or 1000's of items in them. I really appreciate you for the help with that!
What is that
a scam
Beautiful
thanks
BTW, is that link with a custom text a new feature to discord? Because I only found out about it few days ago
it's been here a good few months now
Ah ok, but semi recent any way
I need y'all to be honest... this looks like crap, don't it?
It looks fine. Way better than I can do.
What is that supposed to be??? lolll. And I'm going to try to make it look a little bit more... weathered... I guess?
you can't tell from the AAA professional texture?
I truly have no idea hahaa.
it's a metal detector ๐
Oooh. All I could think of was those EMF readers from Phasmophobia hahaa.
it looks ok-ish in the game tho, except when the player is walking with it between their legs for whatever reason.
WTH hahaa.
Way better than my skateboard lmao
Oh that's not bad lol.
Haha but it's also not good ๐ I need to learn how to do it properly instead of just exporting the UV layout and going at it with the brush tool in photoshop
Hahaa well... I mean... you don't need to do much to it.
I'm ashamed how long it took me to realize this error
srcContainerIsPlayerInventory = srcContainer == f.character:playerInventory()
oh wow, look, it works now
srcContainerIsPlayerInventory = srcContainer == f.character:getInventory()
One very easy way to do simple texturing is just to use the materials in blender and bake it to another model (duplicate) as a texture. Then you can also use procedural effects in the materials
Got randomized/unique license plates "fully" working. They are now automatically added to every vehicle. It was fun to make, but would anyone else actually be interested in using something like this?
Do you mean so you can see the texture and paint directly on the model? Or is it a different thing? Because I tried that one, but my topology is not great and I'm lazy with the UV seams, so it hasn't worked out too well so far ๐
That's cool! Can you uninstall them? Could be a fun collector's item for late game survivors
I mean the actual blender materials. You can just select faces and assign different materials to them. For finer detail you have to add actual texturing
Well if we could change them I'd definitely be interested
Yes. You can remove both front and rear plates separately
Okay I am definitely interested
Only limitation currently is that you can't have two different plates in a single vehicle
oh now i'm interested
i'm not particularly concerned about cars having different license plates but if i can seek out a funny one for my car i see the appeal
Yes. You can collect them from random cars and swap to any other, but sadly the only way to display them is in a vehicle (besides the name in inventory)
One benefit could be also naming keys with the plate number so they are recognizable
Ooohh, I get what you mean, that makes sense! I'm still very fresh to blender, I'll have to give that a try, thanks for the tip!
That's perfect, I'm sure theres a bunch of collectors that will be happy to have a new item to hunt.
Do you have random vanity plates too?
They are all currently in the same format of 3 letters and 3 numbers, but it can be changed
Absolutely. Consider me subscribed.
I'm not at my computer, but does anyone know if player:setIgnoreMovement(true) mean that your character stops accepting new input?
It would be trivial to also add plates of different countries etc
And you wouldn't have to worry about 2 different plates on the same vehicle! :p
just tried it and it appears yes
Fuck yes, thanks for checking!
Proud AF of my tex work
that looks great
Better than my simple textures, hahaa. Although I am working on more detailed ones. Not sure what I like more.
The red is maybe a tad too red tho. But I want to do a more rustic look instead of the basic bland style the original had.
i excel at that type of rust age processing
Teach me everything!!! Hahaa. Jk, it's all good, I'll get there, but you do great work for sure.
pixels are fun
That's super clean, great work!
vs code literally shows me what's wrong and I still stare at the screen sometimes like, what's wrong? wym, you forgot "end" bruh
also, I accidently doubled up on the coffee in my french press so I'm a little wired
I feeel you hahaa. I was like that all day and I still am smh... only 3 cups of coffee today hahaa.
only 3 cups, but really it depends on the size of the cup
They were large cups... which for me is a lot... hahaa.
And the type of coffee/
the kind that makes hair grow on your toes
100% Colombian here with cappucino mixed in...
just choose between "very potent" and "insane" by how carefully you avoid drinking the last few drops
Jim's quit selling columbian. that stuff was the bomb
Anyone know how the vanilla traits are stored in lua? Or if they even are?
Crappp. Am I able to have the game just randomly choose between the textures without having to do LUA nonsense? I don't want to add bloat because of different cart/trolley textures, especially with my future plans to add new cart types.
there's a "traitfactory" class
Not certain where it gets stroed which traits the player has, I assume the player object
I saw, and the CharacterTraits class, but when I decompiled them they didn't store much in the way of trait descriptions or values
descriptions will be in the tranalation files
In terms of the traits doing stuff, it just gets added to code whenever it comes up.
oh. oh no
not sure what you're needing but it's not too bad to check them
player:getTraits():contains("Trait")
Just... check for the trait whenever the trait would matter
if chr:getTraits():contains("Organized") then
return math.max(effinCapacity * 1.3, self:getCapacity() + 1)
elseif chr:getTraits():contains("Disorganized") then
return math.max(effinCapacity * 0.7, 1.0)
not sure about stored in lua but you might want to see BaseGameCharacterDetails.DoTraits in MainCreationMethods.lua
I expect this is the actual storage, in IsoGameCharacter:
But to back up... what do you want to do with traits?
Adding a trait is easy:
require('NPCs/MainCreationMethods');
local function initOverdriveTrait()
local cost = 3 -
local NepOverdrive = TraitFactory.addTrait("NepOverdrive", getText("UI_trait_NepOverdrive"), cost, getText("UI_traitdesc_NepOverdrive"), false, false);
TraitFactory.setMutualExclusive("NepOverdrive", "SundayDriver")
TraitFactory.setMutualExclusive("NepOverdrive", "SpeedDemon")
end
that trait gets used here:
function CheckOverdriveTrait(player)
--DebugSay("CheckOverdriveTrait()")
local hasOverdrive = player:HasTrait("NepOverdrive");
local hasSpeedDemon = player:HasTrait("SpeedDemon");
if hasOverdrive or not(SandboxVars.NepOverdrive.RequireTrait) then overdriveAvailable=true end
if hasSpeedDemon then overdriveActive=true end
end
and that is the only place the trait does anthing directly
But anywhere you can write code, you can check for a trait and do anything that you can do with lua.
Are player moodles, health, wounds, and various other stats tracked serverside or clientside?
Ughhh. Now I've really messed the tires up lmao. Oi vey. I feel like it looks much better, and a little less... "pristine"... but tire modeling stinks for these lolll.
It would be fine if the tires moved... but they don't, ha.
Red is absolute fiiire tho.
Getting rid of the pristine look is going to do wonders, imo. Especially for players doing runs like... 10 years later, or whatever.
hey guys? this could b stupid question
but is there any way to "edit" the size of images you bring by using getTextre() ?
i want that "crate" texure to fit into that window
setWidth & setHeight doesn't work?
need to shrink it down
ummm haven't tried
xD
b right back after trying
i used them when I had to adjust item's icon size
oh that's great
tbh i didn't know what was wrong from your first code tho ๐คฃ
haha
yea i expected it to work since i made into a new object
but it didn't.. weird
new problem
after doing setHeight, setWidth to the crate texture
all objects in the map are like that
XD not just the texture in the info panel
XD
i made it local... not sure why it does that
I'd think it's server-side since you need an authoritative source for that kind of info. player clients self-reporting on their own health sounds cheats-prone
is there any documentation for using sendClient/ServerCommand and are there any common pitfalls to avoid?
there is
search on google
project zomboid Event OnClientCommand
or OnServerCommand
i've seen the pz wiki for those
i believe there was github page of it as well
I must test
actually doesn't have sendServerCommand (it's on the lua api and not an event)
So sendevent handling is just a bunch of stuff attached to OnClientCommand/OnServerCommand Events that says if command="commandIcareAbout" then <do the needful end>?
I should learn this stuff before the multiplayer release of B42 triggers the next modpocalypse.
if item then -- kludge to fix error when filling gas bottles out of backpack
print("Before: ", f.maxTime)
local w = item:getActualWeight();
if w > 3 then w = 3; end;
f.maxTime = f.maxTime * (w) * destCapacityDelta;
print("After: ", f.maxTime)
print(f.maxTime, " * ", w, " * ", destCapacityDelta)
print(" ")
end
seems excessive
should be 120 * 3 * 1 obv
I just went with item weight * item weight for now. I'll think more about it tomorrow.
[can't find it atm though](#mod_development message)
still having a problem
here
anyone help? ๐ฆ
texture:setHeight(50)
texture:setWidth(50
local htexture = texture:getHeight();
local wtexture = texture:getWidth();
self.TextureImage = ISImage:new( 0, 0-htexture, 20, 20, texture);
self.TextureImage.internal = "Image";
self.TextureImage:initialise();
self.TextureImage:instantiate();
self.TextureImage.borderColor = self.buttonBorderColor;
self:addChild(self.TextureImage);```
nvm, fixed it i think
Here is the fix code for those who wants to know
local texture = Texture.new(getTexture("carpentry_01_16"))
texture:setHeight(texture:getHeight()/4)
texture:setWidth(texture:getWidth()/4)
local htexture = texture:getHeight();
local wtexture = texture:getWidth();
self.TextureImage = ISImage:new( wtexture/2.2, htexture, 0, 0, texture);
self.TextureImage.internal = "Image";
self.TextureImage:initialise();
self.TextureImage:instantiate();
self.TextureImage.borderColor = self.buttonBorderColor;
self:addChild(self.TextureImage);```
Which of these is the correct way to get form playerNum to an player object? My brain has melted.
...I shoudl probably not be trying to code lol
getSpecificPlayer(playerNum)
I want to make a mod that lets you use a shovel to make little ponds and water features, but I know it's going to end up being used like this:
I think I'll do it anyway, good way to learn more about dealing with tiles
If people make invulnverable moats in single player, that's fine. Or if server admins are crazy enough to enable it, I guess.
there's more than enough ways to cheese zombies already
people who want to play that way will with or without the mod
True, sandbox -> player construction invulnerable is enough to be 100% safe.
BTW> Having a little pond in your yard & 10x crop growth speed makes farming actually enjoyable.
5x growth speed is probably better actually, but 1x is crazy,
i was really perplexed when they announced b42 would make crops take LONGER to grow ๐
Crops? realistic times, same stupidly high yields per plant
Animals? realistic times to grow, drops half a stake on death
Trapping? More rabbit meat than you can use
Fishing: SO. MUCH. FISH.
Last fishing trip, in half a day I had 97 kilos of fillets.
12 Volts Of Ava Power!
โก
Power armor?
chinese stealth suit
Will you add the stealth ability to it?
Good way to drain all your spare batteries
would be fun, i can code, but myu skill is "Theoretical Lua" so its random
hahaha
im a fashion designer foremost, these are my V0.2 hairs
There's a "invisble" cheat in the debug cheat menu, if that is not locked to debug mode you can just toggle that on.
I saw there was a new hair mod out, but I wasn;t sure if it was only for use with Project Ava character model.
it is indeed only for ava. yes
:D i call it, 'Monkey Paw' modding. as its every hair you ever could wish for.
but all for ava
Side note: I like the way the really long detailed styles look like elaborate hairdos on the player but long messy unkept hair on zombies.
Like their hair just kept growing after they died
i try to do many styles, even grow-out unkempt style ones
Good to have some "realistic for an apocalype" styles as well as "she just stepped out of the salon with perfect hair and makeup" movie-accurate styles.
at this point ava will have the 'theoretical' World record for available content ๐ which is my goal
@sonic needle can I suggest something?
sure?
yeah that is rather easy to implement
like players can change face shapes & expressions using makeup items
as "masks"
would b a nice feature
since PJ has different emoji animations
shape isnt really... possible as easy, when combined with makeup at the same time. but seperately stacked, it can work
but no facial animations
remember that any suggestion i do is Monkey Paw'd to Ava tho.
yea, it's just an idea. think about it
Spongies's character customizer does that that, you can choose from a few different faces (and it's easy to add more with an extra mod)
does that allow you to change during the game play?
thought it only makes u change faces during creating
creation**
Yes, you can change the choices
give me a sec and I'll screenshot it for you...
Behind the scenes. every face/scar/texture addon is a piece of clothing, done in a way that does not show up in the UI.
True smoking does the same thing to put a cigarette in your mouth.
So you could do primative animation by swapping the "face clothing"
Or have a few for normal/scared/sad/sleepy.drunk/etc and swap those in.
indeed, i am aware makeup can be meme'd to revert to clothing in this manner, as its based on it
nice
i just want to add to this
my special zeds uses the same thing
they are just 1 clothing item
i choose to make them zedDmg so that they dont appear in the players inventory when admins want to play as the zed
Is that corset vanillia ? ๐ค
It's from Kink it Up!
I think everythig I'm wearing in that shot is from https://steamcommunity.com/workshop/filedetails/?id=2898847521
Or from one of the Frockin' Splendor mods: https://steamcommunity.com/profiles/76561198087493411/myworkshopfiles/?appid=108600
And the Mask from KATTAJ1 Military Pack
I question the authenticity of items like "military off the shoulder crop top", "military stockings" and "military leotard" but it's a fun mod for camo-textured clothing.
Oh... goodness...
I'm 10 months into the apoocalypse... gotta keep things interesting by changing up your outfit regularly.
That would have been my guess xd, thanks for the answer !
I get ya, I started modding to make it easier handling outfits xd
yeah KIU, and Kattaj-MilPack specifically
im Doing a massive Outfit Patch for Ava for Kattaj MilPack, and addons
significantly better fitment, model fixes, uv fixes, etc
Looks better to me (also better base body)
its a ton of work, but my goal is that if i make or patch enough stuff people will see the ludicrous effort thats already been done
Swicthing to the beter body will be a lot easier knowing there are already plenty of clothes working with it.
Project fallout armory, is built for ava
3 games, fo3, fo4. and NV worth of outfits planned ^ and being done
I think I had issues with the outfit I was wearing when I first tried... I should retry, since this current outfit is all textures on body other than modded boots.
I like seeing the raider gear on zombies, makes it look like they survived a shile before they died
No, porject AVA new body
though maybe I got rid of if when I was trting to work out if teh Java crashes when aiming were due to having a modded body
ah, that would of been early B42.0 to B42.2
i solved that issue for all body mods ๐
yeah, looooooooooooooooooooooooooooong time ago (in Zomboid weirdness terms)
Thank you! What was the problem?
modified Skeletal detection, due to XML failure,
custom animations can also fry the same issue, and result in infinite 'Open Ki5 car door anim'
Ava looks Significantly different Now in V3001 compared to back in B42.1/.2 ver's
her smile is perfect, and designed to look that good, no matter what viewing angle you see her in,
char creator, UI, or ISOmetric angles are all different
shse is also designed to maintain the look of cuteness, at any 360 angle
make sure you have texture res set to 2048x! in settings, and restart after enabling in main menu
and load game, mod load screen
I'll have to disable a few other mods, since I don;t want to be loading other skin textures over this
it is unfortunate that body models & the textures for them, collide with all others with no exception ๐ฆ
Project AVA version
Aww ๐ thats cute
Check her butt. its Lovely ^_^ Spent atleast 1k hours there over the last 2 years aha
Perfect Peach Level ๐ which im happy with
Can't see it behind all the gear
be careful taking clothes off in images. she is far too Nice to be SFW if you take too much off aha
if you have any issues, my discord for help is in my profile :)!
feel free to bug me for fixes and suggest things
That's fine, I assumed so
Not sure if teh oversized eyes will weird be out after a while, but I'm going to see how it goes. Then I'll spend 3 hours hours sortingthrough my huge collection of clothes to design a new outfit lol.
she is due for another patch soon to update her eyelashes to the new design as well
they are 3D and very real now
impressive
actual 3d objects for eyelashes... definitely pushing the bountries of ZOmboid character design here.
go use the Pixel hair pack, it gets more wild
Marionette Style hair Physics, using heavy broken levels of rigging
I installed that, haven't checked it out yet since need to go to new character creation to easily view hairstyeles... the "cut hair to <style>" menu is all guesswork!
the mod page should have current art for 90% of hairs on each hair pack
I'll have a look tomorrow, I need a break
and "tomorrow" might be "in 90 minutes after midnight" ๐
i noticed you enjoyed my TWD cav hat too, it was my first clothing model years ago actually
Yes, I do have your hat!
And the pretty dess too
I was going to line up mannequins in that dress outside the Echo Creek All-in-One Apocalypse super-shop before B42.6 nuked it.
i make armor / addons fulltime now
Oh hell yeah, now we're cooking! Just gotta make some attack animations and polish a few things
i look forward to the bike ^_^ i have something very special planned for it!
Haha awesome! I'll probably have it done this weekend!
Kink stuff tho??? Hahaa.
My Mod addon DateNight ๐
i marked it NSFW willingly, bit its really just Cute Dresses with a little cleavage, and some bra's etc
does it play the tony hawk game songs? haha
if he adds an ambient noise play feature when riding that will help my bike mod aha
Haha would be cool but feels like a good way to get a cease and desist ๐ I'm planning on adding sound effects though, while skating and when doing tricks
modoptions toggle for a generic sound, means it can be off by default, and replaceable via Addons
This is taking form
this is so cool. no more clicky clicky,
I love this, will make it so much more immersive to swap clothes around
Is RainFactor what I would need to make a bottle fill up from rain or is that the level of which rain water dirties the water?
Consider me interested hahaa.
Omggg WHAT???!!
i dm'd it to you ๐
I'll put out a guide hopefully this weekend on how to make animations ๐ If more modders get into it we could see some really really cool mods
i can make animations already, have done plenty, but busy ish atm to use the new rig for things yet
I've been kinda wanting to make a dual wield mod with custom animations for having two katanas/two knives, brass knuckles etc.
The rig is super solid, very fun to work with
I would love you forever for that. Seriously. Hahaa.
did something change with getWorld():registerZone() in B42?
Like, it registers the zone. But if anything tries to use this zone, it blasts in the logs about "Can't find ID for customZoneName", and does nothing.
worked perfectly fine in B41
Tried all these events. No dice.
How it'd be nice to be able to make some actual extensions with java
So much so!
I've hit the limit for non-java with High Beams 2.0, but I can make an optional java class file
Oooh you made high beem, haven't tried 2.0 yet but nice mod !
If I can access the values in mod options from within java I can so an even better job...
2.0 is a lot better but some vehicles are really janky, and I've worked out it's because when the vehicle rocks forward/backwards any lighst that are too far ahead dip under the ground.
I can think of a few ways to do it, and sandbox variables definitely work because lots of java stuff reference them.
Next thing to test will be if I add a new method to the java class will lua be able to call it, or is the list of classes and methods pre-made?
Its khalua doing the java reflection
But I have no idea if there are extra steps needed for new methods, probably so
I've never used Khalua but you can probably find something out there, can't be that much harder then recompiling the bytecode
And its kahlua not khalua
Instructions unclear, grabbing coffee liquor from cupboard and making a Black Russian.
No idea how this helps modding but I'm willing to try. 
I can't find anywhere on the wiki any information on how to upload mods to the steam workshop
and the wiki points to here (specifically, to the "Workshop" channel, which doesn't seem to exist?)
- Are you in Debug mode?
- Have you set up a folder for the upload under
C:\Users\<username>\Zomboid\Workshop\Mod Namewith the mod in...\Contents\mods\Mod Name here
And put a workshop.txt in the Wokshop\Mod Name folder, I think it can be blank to start with
then you use the Workshop option from the main menu -> upload a new item.
oh it's the game that uploads the mod, I see
I was looking under the steam workshop page
thanks 
No probs!
It works!
The setter complains about the Argument:
But adding new methods does have them automagically get added to Kahlua.
I have no cola and can't find a shot glass so my black Russian looks like black coffee
yes
well its doing the exposing from java to lua
If you continue doing java modding, maybe i'll get you to test out ma fabric port for zomboid
What does that do?
its a java modding thing originally created for minecraft modding, but since zomboid is similar to minecraft i've ported it over
so like, no need for manual patches and stuff
its code translation over updates yeah?
that's one thing it allows, but i've removed its functionality for now
yes yes I know big sad, but changes arent that bizarre between minor updates for zomboid unlike minecraft, and maintaining intermediate mappings (which allow same class names over different versions) would be just straight cancer full time job.
that and it starts to become a big mess when TIS starts renaming classes to different things more than once
I'm feeling to have a look at that
If we get a commonly accepted java mod thingy that will open up a lot of scope
Especially if it can load the java mods from mod folders
but do know that I while I dont limit people's creations, I wouldnt recommend java modding for anything you cant already do in lua
Hahaha
yes! its very buggy so I gotta test it lol but that is a feature
so you just subscribe to workshop mod and you get the mod jar loading alongside the lua and stuff
What if you could do it in lua except some fool hard coded it in java instead?
Nice! Is it on the workshop already?
only limitation is that you'd have to restart your game after subscribing (or subscribe to the mods then start the game) because java mods cant be hot-reloaded (techniccally theres a slim possibility but its fucking chaos)
That's a very reasonable limitation
no, you will never be able to just install java stuff from subscribing to workshop
thats why the only user interaction apart from workshop is the installer itself
obviously the user has to conciously choose whether they want it or not, so ye
they just pick the version of the game, hit install, and add a launch option (specifically so you can toggle between vanilla and modded easily, and also its the only simple method that I found haha)
think of it like a -modded launch option but its not named that lol
but for example this is in the example mod:
@Mixin(LuaEventManager.class)
public class ExampleMixin {
@Inject(method = "triggerEvent", at = @At("HEAD"))
private static void triggerEvent(String event, CallbackInfo ci) {
System.out.println("Lua event " + event + " fired!");
}
}
so thats all the code you need really for hooking triggerEvent (gets called when send event from Java to Lua)
Adding methods to be exposed is slightly difficult as it requires some brainpower instead of just adding the method to the mixin class, but it can work too
dedicated server support is experimental, only because I am doing uni stuff at the same time (grrr if only I was rich right now) but since the classes are exactly 1:1 the same from client and server, it wont be the hardest
spent over an hour repairing an n64 hair 
Nintendo 64 models in Zomboid?
so the development environment is on maven as a normal gradle plugin, so you can just include it like any normal dependency. Id recommend using the example mod though. https://github.com/aoqia194/leaf-example-mod
Remember that if your game is anywhere but the default install (on steam it's C:\Program Files (x86)\Steam\...) you will have to specify it manually (lmk if you need to do this or not, I dont have docs written right now for anything)
updated the link, I sent the wrong one lol
for the retail environment, you run the installer found here: https://github.com/aoqia194/leaf-installer and get it from the github releases or maven central
keep in mind I wouldn't recommend installing production environment to your actual game yet, as im polishing some stuff still for it
add a loom_game_install_path="C:\\games\\steam\\......."
so it points to the ProjectZomboid folder basically
this looks sooooo much better and looks so eerie. a horror scene. lol
and update the mod to the version you are on so it runs, just search for 41.78.16 in project files and oyu'll find the json files that contain it, in the leaf.mod.json and some other thing
right now I just need tester, because since everything is working mostly fine on my computer, other people might not
Smash Bro Ver Tho,
and keep in mind most of the fabric docs you can use for reference, like these https://wiki.fabricmc.net/tutorial:mixin_introduction
is MilitaryBase still the correct zone name in B42?
Hey, did anyone of you ever make a tile for texturepacks and ended with an empty sheet? I searched with the mappers and the question was asked 2 times before and left unanswered - and when asking myself i also didnt get an answer, so i hope you wont stone me for asking it here. XD
Here, thats what i mean. Get the sheet in the mod, but the sheet is empty O_o
I've never checked that menu in-game, but when you load your .tiles file in tilezed, does it show your tiles properly and in the correct positions? Because if so it should work, if your texturepack is packed correctly and placed in the correct folder and you added the .tiles and the .pack files to your mod.info so they're loaded
If you want something to reference you can check the files in my first mod where I made custom tiles
https://steamcommunity.com/sharedfiles/filedetails/?id=3445913478
you mean like this? i simply followed the tutorial/s i could find. i even put in more then one tile, because i thought it might be a problem with only one being there. used settings from the example property sheet, but nope, doesnt want those too. and when i test for it with code, i get null pointer, so there is that. ๐
Hmm that is odd. If you view your .pack file, do they all show up in there?
uhm, how do you do that?
that pack viewer desnt seem to have buttons to use anything
Haha yeah it's super sneaky
Okay so it's showing properly. And you have your .tiles file directly in \media? And your .pack in \media\texturepacks?
And in your mod.info you added something like
pack=yourPack
tiledef=yourTiles 999 (a random number for ID purposes)?
Damn, that really should work then ๐ค Do you have an item script? Could you give it a recipe and try to build it?
no, havnt done anything further yet since i was getting a null pointer, so i was thinking to use the tile picker and check if i did something wrong with the name i was using
then ive seen the sheet is empty unlike the others, and iwas like 'wtf?'
Oh yeah it is very sensitive naming wise, I can't remember the exact rules, but I just used existing names and added my own suffix
hm, ill try to cobble together some test item, brb
{
DisplayCategory = Furniture,
Type = Moveable,
Icon = default,
Weight = 0.1,
DisplayName = Goddess_Statue,
WorldObjectSprite = drakes_erc_tilepack_0,
}
Tryed all kinds of naming sheems for the object, but meh, it really doesnt like to be. I can summon the 'item' just fine, but no placing possible. Also to be fair, i didnt do any custom items with tiles or stuff till now.
when the game does the same with:
item Mov_PlasticChair
{
DisplayCategory = Furniture,
Type = Moveable,
Icon = default,
Weight = 0.5,
DisplayName = Plastic Chair,
WorldObjectSprite = furniture_seating_outdoor_01_17,
}
it works just fine. can add the item to the inventory and then put in on the floor.
function ISInventoryTransferAction:new(character, item, srcContainer, destContainer, time)
local f = OG_ISInventoryTransferAction_new(self, character, item, srcContainer, destContainer, time)
if f.maxTime <= 1 then
return f
end
local oldMaxTime = f.maxTime
local timeOverride
--print("OG maxTime: ", oldMaxTime, " for ", item:getDisplayName(), " - ", item:getActualWeight(), " kgs")
local function getTransferTime(container)
-- for testig
local magicFactors = {
weightFactor = 1.0,
capacityFactor = 1.25,
timeMultiplier = 10
}
local itemWeight = item:getActualWeight()
local containerMaxCapacity = container:getEffectiveCapacity() == 0 and 3 or container:getEffectiveCapacity()
local containerCurrentWeight = container:getCapacityWeight() == 0 and 3 or container:getCapacityWeight()
local backpackModifier = getPlayerInventory(character:getPlayerNum()).inventory == container and 1.2 or 1
local transferTime = (magicFactors.weightFactor * itemWeight) * (backpackModifier + magicFactors.capacityFactor * (containerCurrentWeight / containerMaxCapacity))
return transferTime * magicFactors.timeMultiplier
end
local function getOverrideType(container)
-- if container in player inventory, should use it instead?
return JB_MaxCapacityOverride.CONTAINERS_TO_OVERRIDE[container:getType()]
end
local overrideType = getOverrideType(destContainer) or getOverrideType(srcContainer)
if overrideType then
if overrideType.transferTimeModifier then
timeOverride = overrideType.transferTimeModifier
end
f.maxTime = getTransferTime(overrideType == getOverrideType(destContainer) and destContainer or srcContainer)
end
local dextrousModifier = character:HasTrait("Dextrous") and 0.5 or 1
local clumsyModifier = (character:HasTrait("AllThumbs") or character:isWearingAwkwardGloves()) and 2.0 or 1
f.maxTime = f.maxTime * dextrousModifier * clumsyModifier
if oldMaxTime < f.maxTime then
f.maxTime = oldMaxTime
end
if timeOverride then f.maxTime = timeOverride end
--print("maxTime ", f.maxTime, " for ", item:getDisplayName(), " - ", item:getActualWeight(), " kgs")
return f
end
When your code starts looking this convoluted, it means it's nap time
youre just missing a goto jump command to get perfect spaghetti code.
๐คช
I was always a gosub kind of guy
Oh, a man of taste and culture. ^^ ๐
has anybody gotten the "registerZone" function to work for lua-based container overrides in B42 yet?
Sorry to just barge in, btw...
getWorld():registerZone(...) ?
.
Sry,, didnt try .42 modding till now. Are you saying the registerzone command doesnt work anymore or that the forcezone isnt working?
might be both?
public Zone registerZone(String string0, String string1, int int0, int int1, int int2, int int3, int int4) {
return this.MetaGrid.registerZone(string0, string1, int0, int1, int2, int3, int4);
}
idk about forcezone
like, I got the zone to appear in-world.
BUT, the item picker's blasting to the logs about "ID not for for zone CustomZoneName"
im using getWorld():getMetaGrid():registerZone( in b.41 for zone registry and forceforzones in the distributions.ua
one sec
it wants (name, type, x, y, z, width, height)
Distributions.lua
-- Police
local LockerPolice = {name="PoliceLockers", min=0, max=99, forceForZones="PoliceLoot"}
table.insert(SuburbsDistributions.changeroom.locker.procList, LockerPolice)```
zoneCreationFile.lua
``` getWorld():getMetaGrid():registerZone("PoliceLoot", "LootZone", 2033, 5983, 0, 1, 4)```
it worked fine in B41
forceForZones seems to be intact in 42
the log warns kinda lead me to believe it's an issue with register zone
would locking the zone registry behind a function/event cause issues?
cant see anything missing from his register of the zone honestly
at least not in b41, cant see why that would change in b42?
it looks like any one of those events should be fine
this log message happens if the zone is not registered in ItemConfigurator, item configurator parses all zones shortly after OnLoadedMapZones
hmmm
when does OnPreDistributionMerge fire, in regard to the forceForZones thing?
too early? Too late?
hmm
someone please tell me what im doing wrong here, so i am working on a mod but when i go in game to try to turn said mod on it does not show up in the mod list, do i have the structure wrong for B42?
In B42, does anyone happen to know some lua code which I can use to turn on the light in room where the player character is in?
okay cuz i was looking at other mods and this is how they had theres and yea all the same info is in the 42 folder lol
thank you ill try that now
does that common folder go in the 42 folder or just free in the CodeRed folder
got it thank you so much for your help albion! trying to get back into this and they changed stuff on me XD
my progress on my panel for achievements
im struggling to size my model ๐
Okay so, originally i wanted to do this by myself but after going crazy over like 5 hours i felt that i could do myself a favor by asking for help here
i'm trying to make an auto-save mod but i noticed that it is pretty much impossible to copy files through lua modding
so i figured java was the way out, right?
When the AdjacentFreeTileFinder returns tiles that are not free, I love modding
well, i uninstalled java, re-installed it, installed eclipse (java project manager) but for some reason it shows errors everywhere
why i used eclipse and not just normal java? for some reason, java can't open zombie.jar
I used the ZomboidDecompiler linked in the wikipage, so right now i'm pretty much lost
you should read/edit the files in the zombie/ directory, you only need zombie.jar to recompile
let me know if i'm doing something wrong but this is what pops up when i try to open the jar file
hmm, i see. that does make more sense.
sorry if i'm being too dumb with some stuff, i'm completely new to java
gamemaker coder to the core lol
i figured...
it's a shame i uninstalled all java related stuff thinking that was the issue, i'll have to set it up again for older MC versions haha
But yeah you need to decompile, edit code then recompile and replaced the compiled files
I must admit, I wouldn't try something like that If I wasn't at least a bit familiar with java and how things work
Do I need to use something in particular to edit the code now that I have it like this, or...?
oh trust me, I've learned like 3 coding languages already with bruteforce
it's not fun but it works
GML is very similar to java anyways
never head of that xd
you'd want to edit the .java files ideally with a java ide, eclipse is one but most people would recommend intellij idea these days
well intellij is so MUCH better
i did find out about intelliji idea but i saw the "30 days trial" and instantly left lol
but idk if theres a free version ?
the trial is for their paid version, they have a free community version too
i used the paid version while i was still in school and switched to the free version and cannot even work out what features are different
Well with school I got a nice discount on the whole Ultimate pack
have you looked into github's student pack? i was getting it for free from there
Well no I actually didn't know there was a student thingy
I really wanna make an Auto-save mod because while I love challenges and absolutely freaking love this game, I feel that after you've got 600+ hours and you know pretty much every mechanic, losing feels rather like a complete waste of time and you didn't even learn anything at all
I wanna make it fully customizable though, so if you wanna save once per month that should be fine
yeah, github has a student thing, if you send them proof of enrollment (or just give them a school email i think?) they give you an absurd amount of free software
to not make it so broken, of course
To be honest, I think the best way to do that would maybe to make a script that doesn't live inside Project Zomboid
i saw a python script around but i think it'd be better to make it an in-game feature
Something that watches the save files and saves the changes elswhere
and i have this policy of doing things myself if they dont exist in a first place
Well yeah but a Java mod has some HEAFTY limitations
It will probably break in some spectacular way at every updates
all it should be is saving the game to a different directory
hopefully, it shouldnt be hard
the most usual solution to an issue like this is to write a lua mod that writes instructions to a file, and then something like a python script running outside the game that checks that file for changes and does things based on them
a java mod is a fair solution too though
just keep in mind you won't get much help with java modding since nobody really does it, and the ones that do exist are extremely basic
i spent all the evening reading through and experimenting with the game's lua library functions but all of them were about creating or deleting files, not copying
Damn, well I don't know if there was such a thing when I was still a student
i was even able to create a "test" folder world inside another game but that's completely useless as the folder is empty
the good thing about doing it via java is that i have actual documentation
i'm not exactly criticizing the game but its lua misses many stuff like executing shell code, which is the reason why in a first place i couldnt copy paste a folder
Man
You don't want to do that
Executing shell code from a software is like
One of the worst thing you can do
it's intentional that you can't do things like that
it's definitely not the fanciest way but there werent much other options out there
i mean, yeah
otherwise we'd get like
virus mods lol
we already get those
for copying files you'd be expected to read them and then write new ones with the same data
however i don't think you'd be able to do this in lua either way
i don't think there's a way to get at the save files from lua
i wonder how do they even work given the fact zomboid's lua is kinda limited
problem with shell exec is turning sane mod into virus
you can, superb survivors mod does it
in fact i used it as a base
but it only creates files in 'em
that's about it
oh man, you're using that mess as a base ๐
wasn't talking about PZ specificaly
but with Kahlua, every java member is exposed in the lua
i knoww right
only for the fact they managed to create a folder, don't worry
that thing's code is a complete mess
well from what I'm seeing, Zomboid code is a complete mess
and from what I saw, every codebase out there is a complete mess
the base game's code is messy but superb is actually a lot worse
yeah I'll trust you on that xd
mostly owing to surviving multiple different game versions and being passed through multiple different maintainers but also just doing some straight up bizarre/insane things
the mod indefinitely creates a folder per save inside its mod folder
meaning
each time you start a new world
it just creates another folder
doesnt matter if you delete a world
yeah, actually it's impossible to fully delete files through lua 
of course they weigh basically nothing but on a long term it could accumulate an insane amount of unnecessary folders
i'm surprised it has no warning on the mod's page
we have ways to store per-save data without creating files now so the real issue is that they never transitioned to that
it's weird because they both create files in the mod folder and save folder
lol
whats even the point
i took a quick look at it and it looks like they just save players to the save folder
the method for saving a player is one of the few file writing methods that isn't sandboxed to specific directories
yeah
you can actually play as the NPCs
if you use the ultra super unkown choose player option on the start menu
i think this means that if you delete the save that character data will also be deleted, which i imagine is the bulk of the size of the data the mod writes
i'd check what's the folder created in the mod folder for then, but i aint home
guess i'll check tomorrow
literally anything they need to store that isn't characters will probably be there, i'm not aware of many other ways to write data to the save folder and the ones i do know are too limited
huh, makes sense
Anyways, I guess the "hardest" challenge I'll face when making this mod is adding options for autosaving in certain intervals, but I'll see this weekend
Thanks for the help! I was actually losing my head over that simple thing
So it looks like some people want me to update my "Rain Kills Campfire" so that it doesnt kill the flame if it has a certain amount of fuel. What do yall think?
I could probably add a delay of 10 minutes for every 10 fuel it has
Alright, that'll do for now, there's still some animations that needs to be done, but it works well enough!
very cool!
bruh
you did the kick flip ๐
Haha just an ollie for now, but more tricks will come! ๐
I'm old, it looks like a kick flip to me.
you got a ko-fi or something?
I don't no, figured I would wait a bit and get a few mods out before doing that
Don't want to seem like I'm just wanting donations or holding off on updates
I get it, just send me a message if you set one up, aight
Haha alright man, will do! ๐
Ok, thats just crazy and i need to know if someone run itno something like that: So i spend the whole day (and yesterday evening) on trying to get my custom tile to work.
They didnt and didnt. So now by chance, i made a new mod and since i got fed up, called it test123... and it worked. Its the same mod as before, with one, singular difference: it doesnt contain 'drake' in its folder name. O_o
I can call my mod drakesbumbelbee and it works just fine, except for loading tiles, thats a nono, and i cant figure out, why that is. Did i make to many mods that contained 'drake' in them or what? 
iirc the naming is super strict for the sheets and packs, it has to start with a specific name, test is one of them, so I believe you can do test_drake_your_tile
have you tried renaming the working one to the name you wanted
it feels unlikely to actually be the name and just something weird and not obvious about how you did it the first time
Uh, no, thats an interesting idea
but its content and .info are the same, except the main folder name and the mod entries of said info file. but ill try it out, brb
didnt do anything with the tiles @alex - only the folder name XD
youre right @bronze yoke - changing the names (multiple ways containing drake) of the working mod, but it didnt do anything. O_o i cant figure out whats going on here.
its literally the same down to the id of the packs definition O_o
and now it even has the name of the not working mod, including its poster.png
as in -> not a copy but the cut out thing
... got it. o damn,
more then 24 hours for a freaking typo in the folder name. texturepacks, not texturespacks... ๐ฅณ
let this be my personal highlight in the hall of shame XD
happens to all of us ๐
Oh yeah been there! ๐
hey guys
could someone look at my code
and see how i should fix this?
the problem is
I tried to get getHealth() of an tile object
but if i right click a tile , for example, "floor"
then of course since it doesn't have health() it calls nil
so i put condition to return if it called "nil"
but still throwing error
function Wall_Check_Wuro(playerIndex, context, worldobjects, test)
local valid = worldobjects[1]
if valid:getHealth() then
healthP = tostring(valid:getHealth())
ObjectTexture = valid:getSprite():getTextureForCurrentFrame(N)
Wuro.object = valid
if healthP then
local ico = "Roll_Container"
local wuroiconmenu = context:addOption(getText("Check Durability"), worldobjects, ThumpableInfoPanel, player);
local iconPath = "media/ui/"..ico..".png"
wuroiconmenu.iconTexture = getTexture(iconPath)
end
else
return
end
end
Events.OnPreFillWorldObjectContextMenu.Add(Wall_Check_Wuro)```
could someone tell me what im doing wrong?
if valid and valid:getHealth() then
Does anyone know if a campfires fuelAmt = 10 then does that equate to the hours it has left? Or how is it measured
on my phone let me get to my computer it's hard to follow on this little screen
no getHealth on floor maybe?
ok, I re-read it. stupid question ๐
hahah yea
is there a specific object you're looking for? not much has getHealth
exactly that's the problem.. ther'es no getHealth() function in isoObject class
like walls, crates
anthing that's thumpable
which falls under object class
i just don't understand why it keeps throwing error when i told the code to exit the function if there's no "getHealth()" data available in isoObject
maybe if instanceof(valid, "IsoThumpable") and valid:getHealth() then would work for you?
it errors because it's still trying to call it but it doesn't it
wait a minute
I really shouldn't try to help when I'm drinking
I think if you check the instanceof you'll be ok
well ur code got rid of the error but stopped making the function to work in general
is instanceof(valid,"isothumapble") a function
to check if the valid is a thumpable class?
yes
Wuro.object -- is object defined somewhere before this is called?
like Wuro = { object = {} }
or if not Wuro[object] then Wuro[object] = {} end
hey im not sure where i can give ideas but they should add greenhouses in game that you can make
Do y'all think I should expand my Functional Ear Muff mod to make it override the "Not safe to sleep, zombies nearby" when they wear the ear muffs to bed?
Players requested it
my wife said the same thing yesterday
thought they already has greenhouse mod
at least in build 41
function Wall_Check_Wuro(playerIndex, context, worldobjects, test)
local Wuro = { }
local valid = worldobjects[1]
if instanceof(valid, "IsoThumpable") and valid:getHealth() then
healthP = tostring(valid:getHealth())
print(valid:getHealth())
ObjectTexture = valid:getSprite():getTextureForCurrentFrame(N)
Wuro.object = valid
if healthP then
local ico = "Roll_Container"
local wuroiconmenu = context:addOption(getText("Check Durability"), worldobjects, ThumpableInfoPanel, player);
local iconPath = "media/ui/" .. ico .. ".png"
wuroiconmenu.iconTexture = getTexture(iconPath)
end
else
return
end
end
Events.OnPreFillWorldObjectContextMenu.Add(Wall_Check_Wuro)
that what I used
might be you're only checking the first object in the worldobjects table?
yea
no worries, sorry I'm a little slow on the uptake right now
that could be fun if they forget to take them off before sleeping
is instanceof() function a native lua function that checks for given parameter variable to a class name?
it is. basically it's cast to class, like IsoPlayer, ItemContainer, etc
my favorite right now is
-- look at that code below... combo stacks can eat me
for i = 1, #items do
local item = items[i]
local comboItems = instanceof(item, "InventoryItem") and { item } or item.items
for j = 1, #comboItems do
-- do your thing with the item
end
end
wish I could get the same to work for world inventory context menus
the inventory pane items, what you click on, can be a single item or a stack of items, which would be item.items here
that function just rolls it all together
quick question:
{
category = Player,
clip
{
event = Character/Survival/Whistle/Blow,
}
}
event = Character/Survival/Whistle/Blow, <- how do i change this to my own audio.
does it follow file = media/sound/AEBS/Float/VoicedFloat_-39.7.ogg or that is a different thing.
you can use file instead of event
thank you. ๐
Does anyone know how I can access the Raven creek mod file? Like what number ID is it?
I would like to share my nonesense mod.. ๐
https://steamcommunity.com/sharedfiles/filedetails/?id=3458275139
~~youre setting thumpable object's sprite using ~~
nvm i realized youre changing the icon and the sprite lol
Greeings, A subscriber of my truck has an issue where he left my car at his base then when he came back it was upside down, any idea if it's an issue with my mod?
It never happened to me with any vehicle
Also, is there any way to make the hood accesible from inside the vehicle instead of outside?
Yes. You can make your own version of Vehicles.Use.EngineDoor(Vehicles.lua) that only checks if you are in a vehicle currently. You just need to decide how you want it triggered because you can't use areas inside the vehicle
If you want to have the mechanics menu open from the radial menu, inside a vehicle, without debug mode cheats, you have to edit ISVehicleMenu.onMechanic (ISVehicleMenu.lua) as it currently forces you out of the vehicle and in front of the hood before opening the menu
Thanks!
But what about this?
U can get some idea from here
oh ty i go look it
Was the mod updated between him leaving & returning? Other than that I don't see how that happened, since vehicles just sit still not moving (i.e.: no physics calcs) when not in use/being rammed
And it's not likely anything called setAngles().
So I'd just ask if they can reproduce the issue, if it's a weird one-off then it's not worth investigating.
Cute Blood Replacer
this model is soo cute ngl
awwh. thanks! ^_^
Project Ava https://steamcommunity.com/sharedfiles/filedetails/?id=3387041427
- [NPDM] Cute Blood
https://steamcommunity.com/sharedfiles/filedetails/?id=3458395621
photo to show the vanilla facial area with blood, odd results that hide things
Noooice!
Fucking hell, spent a bunch of time making a convoluted system to detect fences so I can stop the hop over fence from running while on the skateboard.
Completely missed that player:setIgnoreAutoVault(true) is a thing...
High Beams 2.0: Java Edition
nice.
High Beams 2.0: Java Edition: Pretend It Is Day mode.
Now I need to redo to lua to link up with the new Java features, but the good news is this is approximately 27 times easier than doing it all in lua was as well as 95% less janky.
holy crap thats bright
Iโve been doing a bit of work on trailers for a mod Iโm making and I cannot for the life of me figure out why they wonโt attach properly
does anyone perhaps know why why this would be?
Is there "trailer" in the vehicle name, because that is how the game determines it should work like one?
I actually saw through a discord VC stream that this indeed happens. Trailer was fine. Walked away, came back. Trailer's upside-down.
I'd also like to ask if anyone else is having issues with loot distributions, specifically with "forceForZones="?
yes, i also added it infront of the vehicle name and this has changed nothing
do you have attach points in the trailer and truck scripts?
yes
and you did name the attachment point on the trailer like the image above, right?
with the canAttach matching as well?
thanks
The 360ยฐ high beam mode is certainly excessive and I hate it, but I'll leave it as an option.
I'm going to try 360ยฐ mode for normal lights, so you can drive with high beams then switch to normal to light up the immediate area around your car.
a spam bot hit while I was afk?
yup
ouch
its very interesting, quite funny aswell
As far as I have tested, the only thing determining whether it's towed as a car or a trailer is the "trailer" in the name. Not sure why it's not recognized
could it be a case sensitive issue?
It seems to be always tested as capitalized
ah that may be it then
every instance I've seen was lowercase?
first letter
first letter lowercase
B42.6 every contains("trailer") (case insensitive)
hmmmm
'Low Ready' Handgun Civ-Tac Anim Replacer
https://steamcommunity.com/sharedfiles/filedetails/?id=3458493457
Should I even make body damage to my van? (I only did the windows, also it does not have a hood and it makes it harder)
You mean so the panels look damaged as the van is damaged?
yeahh
I think you should, makes it look better than having a perfectly pristine veicle that is 1% away from non-existence.
yeah, how to do the hood damage tho?
the front should be mapped only as front, it literally has no hood, right?
I don't know how, except in some places the Hood is called EngineLid
Which amuses me
lua>client> mechanics overlay, then change "image prefix" to "van_"
Appreciate it
np!
i had issues changing mine when i did my first vehicle mod
just need to model some new wheels, and do all the other texture files that i hate so much i hate them i hate them i hate them
to photoshop we go
you have to see mine...
Do show

Map for windows
damage looks better
My van can carry 138 beer cases
Actually fairly well organized tbh
Nice custom damage textures
Thanks
yipee, i'm finally ready to start
lol
is this normal or am i missing something out...?
Np!
I always use the vanilla ones, but thatโs mostly because I do not have the patience or artistic skill to do it custom
sorry to bother a day after, but is it normal that the project's full of errors everywhere or...?
i mightve done something wrong ๐ค
i'd not care about it given the fact it's just a red marker but i heard these errors will stop me from recompiling the project
you'll want to add the dependencies to the project
hmm, figured that could be the case
is it this by any chance?
saw the link above
oh never mind this is all full of lua files sorry lol
zomboid decompiler gathers them for you, you just need to go to project structure and select the output/dependencies folder as a java library
ohhh gotcha, i knew it had something to do with that folder but had no idea how to set it up
thanks a bunch ๐
after this there'll likely still be a couple errors per file because decompilers suck
definitely better
thank you!
gotcha!
this is EXACTLY waht i was looking for
thank god this file has no errors
i'll be able to recompile it easily
anyone working on anything to handle disassembling some of the other items like ATM machines, cash registers, phones?
if getScriptManager():getItemsByType(containerType) then
local items = getScriptManager():getItemsByType(containerType)
for i = 0, items:size() - 1 do
if instanceof(items:get(i), "VehiclePart") then
if items:get(i):isContainer() then
items:get(i):setContainerCapacity(capacity)
end
end
end
end
I tried the easy and nope
If you can't edit something in vehicle scripts that way, you can try the alternative way VehicleScript:Load(). I used this to edit scales of vehicle parts model because they don't have setters
Basically something like this script:Load(scriptFullName, "{part ".. partName .. "{container ".. containerName .. " {capacity = ".. tostring(capacity) ..",}}}")
hopefully this'll be the last time i need to ask for help before finishing my mod!!
now that i've finished setting up a prototype for my mod, how do i recompile the files back? can i recompile just some of them or is it necessary to recompile the project as a whole?
if I can't figure it out, I'll have a look at it. thanks!
javac -cp "dependencies/*";"zombie.jar" FileToRecompile.java
breaking it in more helpful ways at least
hmm, game crashes on loading on lua
Hi! In lua B42, is it possible to get the light source of the room the player is currently in? Something like
player:getRoom():getLightSource()
??
even when i recompile the file with no changes
hmph
i'll try something
This works for me when it's run at game boot (only up to 1000 capacity and requires at least reloading the vehicle script?) ```if script:getPartById("TruckBed") ~= nil then
script:Load(script:getName(), "{part TruckBed{container{capacity = 1000,}}}")
end
nope
guess i'll try out different decompilers until one magically works
could it be because i'm using the wrong JDK version????
I think you need JDK 11
not sure
i looked up online and it says latest B41 uses 17.0.1
so i just installed and setup that one
we'll see
thanks though ๐
i see it too but here say 19 https://steamcommunity.com/sharedfiles/filedetails/?id=2748451514 ^^'
wait
in order to use the javac -cp command
i must have java installed, obviously
it may be that what is using the wrong java version
gotta change the path variable i guess
i had already done this. just tried compiling this java file instead of the other decompilation and it magically worked
over the last few years i've spent an insane amount of time trying to get my computer to stop using java 8
guess this one is somehow better
i went thru the same lol
@fallen knotis work now ?
testing that right now
modified the file and compiled it
we'll see if game crashes
yes ^^'
we're back
okay FINALLY i'm done setting up
everything should be easier from now on
Is there any way to set the time of day and for Zomboid to continue after that hour in a server? I'm using
getGameTime():setTimeOfDay([number]);
But it always reverts back to the past hour value after 10 minutes in-game pass.
maybe you're setting it on client and not on server? sorry if that sounds stupid i'm not experimented with server modding
yeah, if you're in multiplayer that'd do it
i've used this in the debug console in singleplayer and it hasn't reverted
so far so good, this code miraculously did not crash
now i'll check if i can actually call my own Lua method
darn it
Trying to test an adjustment to the sleeping options. How do I change the players fatigue in debug mode?
Ty
local carScripts = getScriptManager():getAllVehicleScripts()
for i = 0, carScripts:size() - 1 do
if carScripts:get(i) and carScripts:get(i):getPartById(containerType) then
local partName = carScripts:get(i):getPartById(containerType):getId()
local s = carScripts:get(i):getName() .. "{part " .. containerType .. "{" .. partName .. "{capacity = " .. tostring(capacity) .. "}}}"
carScripts:get(i):Load(s)
end
end
no idea what I'm doing wrong
I tried subbing "TruckBed" in for the containerType and id but no dice
Load takes two arguments, the name of the script and the script string
The trunks are formated like this: part TruckBed { container { capacity = x, } } So should the partName be "container"?
ye it works fine after fixing that
carScripts:get(i):Load(carScripts:get(i):getName(), s)
Nice
I'm going to have to grab the vehicle mechanics ui anyway
Ah didn't notice it doesn't show it in mechanics. That's weird
man my head's starting to hurt
every java file i need to make what i want doesnt work
GameTime? doesn't work
Core? doesn't work
LuaManager? doesn't work
i'm stuck at IngameState.java
sure i managed to define the function but what's the point if i can't call it anywhere?
guide thumbnail tuff asf ๐ฅ
Wait it is updated, at least in a new vehicle. But the capacity also didn't revert after disabling the editing
hmm
I'm already mucking around with everything else, no reason I couldn't muchk with getContainerCapacity either. And it would take care of a couple issues with vehicles
wp
wdym lol
I usually just take a shot and a nap when I feel that way
not a bad idea, other times i've fixed things i had been dealing for hours just a couple of minutes after i've taken a rest
Hm, does anyone know if i can just add a command to an item and get it to work as a constant light source? Tried to find an example by going throu existing light sources from vanilla, but their commands dont seem to work?
Uh, just to say, i dont want to have to solve it with lua. Just thought it might be a nice addition to the item standing around.
whoops... I think that means it's nap time
does anybody know how to get seconds?
i wrote this
if (GameTime.instance.getHour() == 0 && GameTime.instance.getMinutes() == 0 && GameTime.instance.getGameWorldSecondsSinceLastUpdate() == 0) {
createAutoSave();
}
but
now it doesnt create an auto save anymore
it worked with
if (GameTime.instance.getHour() == 0 && GameTime.instance.getMinutes() == 0) {
createAutoSave();
}
but it'd execute every frame until a minute passed
so that was overwhelming
Timestamp maybe ?
i think this might just do it
oh wait i'm stupid
there we go
oh wait
no this wont work
Theres also LuaManager.GlobalObject.getTimestamp which would get you the time passed since the start of the game in seconds i believe
ohh, that's what you meant
well, in case this doesn't work i'll try what you suggest
thanks
lmao i'm so stupid
Why the boolean guard ? is this just to only save once every two call ?
gethours survived returns only hours, so it'll execute createAutoSave until another hour happens until i add this boolean check
or that's my theory to solve it, at least
testing it rn
guess it's not a 1 digit number
nothing happened
hum
is there any way i can debug java variables?
you know, to see how do they look like
yipeee!!
this worked like a charm
yup, looks about right
alright, this mod's 100% done on the technical side!
now onto customization lol
thanks a lot @broken kayak and @bronze yoke, both of you were of great help. if you don't mind and you want, may i credit you once i release this to the workshop?
This is definitely going to be a staple in my load order, and I feel like that's not only going to be me
Thanks!! I got the idea to do it about 3 days ago because I was complaining about losing progress and therefore time
then i realized the solution was simply to make an auto save feature
Yeah, I'm surprised the game doesn't have one built in and also surprised that no one else has made this yet, I had the same issue, too many things happening that reset progresss a bit
I hope eventually they implement it, but for now, I'll try to do my best at doing it for myself lol
right now it only auto saves daily
but I'll make many versions so you can also autosave weekly, monthly, and even yearly
the last one will be definitely hard to test out though lol
yeah lol, you could probably use the game speed debug option, I think it's under general debuggers, just crank it. that is if it uses in game time like I think it does based off the code
max speed up is 1000.
if i set up day length to 25 minutes maybe it shouldnt be so bad
yeah that might be the best option, might be hard to track if it's actually one year or not depending on how fast that would actually go
either way, I'm sure you'll figure that part out, I can't wait to see this on the workshop
Thanks for the hype!! I'll do my best
You're very welcome!! I'm sure it'll go well
๐ so apperently .pack don't need tile definitions cause it kinda act like a packager as so the file extension says it is a "pack", i really thought that was a requirement. been fidling with tile definitions for a few days now. ๐
unless you are making tiles
yeah, tricky stuff. in essence, the pack file is the tilesheet with the tile graphics, while teh tiledefinition is... well the definiton of what the tile does. did try to find my own way into those for the last few days (all begining with the innocent tought of: oh wouldnt it be nice to have your own item for this code... XD ).
yeah lol. funny stuff.
print(Calendar.SECOND )
ohh i see, thanks
local totalRadius = 0
local function trackSoundRadius()
local player = getPlayer()
if not player or player:isDead() then return end
local weapon = player:getWeapon()
if weapon and weapon:isRanged() and not player:isDoShove() then
local radius = weapon:getSoundRadius()
if not player:isOutside() then
radius = radius * 2
end
table.insert(attackRadius, radius)
totalRadius = totalRadius + radius
end
end
local function onPlayerAttackFinished()
trackSoundRadius()
end
Events.OnPlayerAttackFinished.Add(onPlayerAttackFinished)```
I keep getting errors that my counter wont work
"Objects tried to call in nil in trackSoundRadius"
So I tried to simplify it to just track the amount of attacks: ```local shotsFiredTotal = 0
local function countAttacks()
local player = getPlayer()
if not player or player:isDead() then return end
local weapon = player:getWeapon()
if weapon and weapon:isRanged() and not player:isDoShove() then
shotsFiredTotal = shotsFiredTotal + 1
end
end
local function onPlayerAttackFinished()
countAttacks()
end
Events.OnPlayerAttackFinished.Add(onPlayerAttackFinished)```
But even that one wont work
does player have a getWeapon()?
41 or 42 I should ask that first
maybe getPlayer():getPrimaryHandItem() then check if it's a weapon and if it's ranged?
