#mod_development

1 messages ยท Page 318 of 1

deft sentinel
#

well okay then this makes it much less painful

thin swan
#

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

deft sentinel
#

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

thin swan
#

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

deft sentinel
#

wow nice

thin swan
#

Some day soon I'll make a guide on how to use paddlefruits rig in blender to make multi-stage animations

deft sentinel
#

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

thin swan
#

That's good, happy to help! ๐Ÿ˜„ I have a few years of tech support experience which helps for sure

deft sentinel
#

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

broken kayak
deft sentinel
#

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

storm trench
small topaz
#

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??

thin swan
# small topaz By just researching the wall building system more, I have the impression that sm...

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

small topaz
# thin swan I haven't really dug into the wall building, but making the better building mod ...

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.

thin swan
queen oasis
#

I'm not sure that'll work now. dang. Gotta be the moodle

broken kayak
#

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

storm trench
#

(wrong comment, my baddd Albion... never mind hahaa).

broken kayak
thin swan
queen oasis
#

"illegal access" - I don't ask for much, just let me change the heavy load level please

broken kayak
broken kayak
small topaz
thin swan
# broken kayak But I've been wondering, do 3D world objects have sprite ?

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

broken kayak
#

I've looked up that a bit, but I think this system may be java only

small topaz
# queen oasis "illegal access" - I don't ask for much, just let me change the heavy load level...

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.

thin swan
thin swan
queen oasis
distant inlet
#

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")?

distant inlet
#

it was :setName() ๐Ÿฅฒ

stable yew
sonic needle
#

ill have a look..

queen oasis
#

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!

drifting ore
#

What is that

main pasture
#

a scam

queen oasis
#

<@&671452400221159444>

#

aww, you win

drifting ore
#

Beautiful

left plank
#

thanks

main pasture
#

BTW, is that link with a custom text a new feature to discord? Because I only found out about it few days ago

bronze yoke
#

it's been here a good few months now

main pasture
#

Ah ok, but semi recent any way

storm trench
#

I need y'all to be honest... this looks like crap, don't it?

queen oasis
storm trench
#

What is that supposed to be??? lolll. And I'm going to try to make it look a little bit more... weathered... I guess?

queen oasis
#

you can't tell from the AAA professional texture?

storm trench
#

I truly have no idea hahaa.

queen oasis
#

it's a metal detector ๐Ÿ™‚

storm trench
queen oasis
#

it looks ok-ish in the game tho, except when the player is walking with it between their legs for whatever reason.

thin swan
storm trench
thin swan
# storm trench 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

storm trench
queen oasis
#

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()
main pasture
main pasture
#

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?

thin swan
thin swan
main pasture
broken kayak
main pasture
broken kayak
main pasture
#

Only limitation currently is that you can't have two different plates in a single vehicle

bronze yoke
#

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

main pasture
#

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

thin swan
thin swan
main pasture
#

They are all currently in the same format of 3 letters and 3 numbers, but it can be changed

storm trench
thin swan
#

I'm not at my computer, but does anyone know if player:setIgnoreMovement(true) mean that your character stops accepting new input?

main pasture
#

It would be trivial to also add plates of different countries etc

storm trench
queen oasis
thin swan
sonic needle
silent zealot
#

that looks great

storm trench
#

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.

sonic needle
#

i excel at that type of rust age processing

storm trench
sonic needle
#

pixels are fun

thin swan
queen oasis
#

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

storm trench
queen oasis
#

only 3 cups, but really it depends on the size of the cup

storm trench
#

They were large cups... which for me is a lot... hahaa.

silent zealot
#

And the type of coffee/

queen oasis
silent zealot
#

Turkish?

#

No filter to get rid of teh grounds,

queen oasis
#

dark souls and wonderbrew

#

no filter for my coffee, my cigs or my mouth, please

storm trench
#

100% Colombian here with cappucino mixed in...

silent zealot
#

just choose between "very potent" and "insane" by how carefully you avoid drinking the last few drops

queen oasis
#

Jim's quit selling columbian. that stuff was the bomb

dense junco
#

Anyone know how the vanilla traits are stored in lua? Or if they even are?

storm trench
#

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.

silent zealot
#

Not certain where it gets stroed which traits the player has, I assume the player object

dense junco
#

I saw, and the CharacterTraits class, but when I decompiled them they didn't store much in the way of trait descriptions or values

silent zealot
#

descriptions will be in the tranalation files

#

In terms of the traits doing stuff, it just gets added to code whenever it comes up.

dense junco
#

oh. oh no

silent zealot
#

there's an example

#

There's no elgance to it.

queen oasis
#

not sure what you're needing but it's not too bad to check them
player:getTraits():contains("Trait")

silent zealot
#

Just... check for the trait whenever the trait would matter

queen oasis
#
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)
distant inlet
#

not sure about stored in lua but you might want to see BaseGameCharacterDetails.DoTraits in MainCreationMethods.lua

silent zealot
#

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.

vast pier
#

Are player moodles, health, wounds, and various other stats tracked serverside or clientside?

storm trench
#

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.

open drum
#

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

tacit pebble
#

setWidth & setHeight doesn't work?

open drum
#

need to shrink it down

open drum
#

xD

#

b right back after trying

tacit pebble
#

i used them when I had to adjust item's icon size

open drum
#

i guess this isn't proper way to code it?

#

got it

#

thank you @tacit pebble

tacit pebble
#

oh that's great
tbh i didn't know what was wrong from your first code tho ๐Ÿคฃ

open drum
#

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

distant inlet
distant inlet
#

is there any documentation for using sendClient/ServerCommand and are there any common pitfalls to avoid?

open drum
#

there is

#

search on google

#

project zomboid Event OnClientCommand

#

or OnServerCommand

distant inlet
#

i've seen the pz wiki for those

open drum
#

i believe there was github page of it as well

distant inlet
#

I must test

#

actually doesn't have sendServerCommand (it's on the lua api and not an event)

silent zealot
#

I should learn this stuff before the multiplayer release of B42 triggers the next modpocalypse.

queen oasis
#
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

queen oasis
#

I just went with item weight * item weight for now. I'll think more about it tomorrow.

open drum
#

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);```
silent zealot
#

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

bronze yoke
#

getSpecificPlayer(playerNum)

silent zealot
#

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.

bronze yoke
#

there's more than enough ways to cheese zombies already

#

people who want to play that way will with or without the mod

silent zealot
#

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,

bronze yoke
#

i was really perplexed when they announced b42 would make crops take LONGER to grow ๐Ÿ˜…

silent zealot
#

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.

sonic needle
#

12 Volts Of Ava Power! stars_orange โšก

silent zealot
#

Power armor?

sonic needle
#

chinese stealth suit

silent zealot
#

Will you add the stealth ability to it?

#

Good way to drain all your spare batteries

sonic needle
#

would be fun, i can code, but myu skill is "Theoretical Lua" so its random

silent zealot
#

hahaha

sonic needle
#

im a fashion designer foremost, these are my V0.2 hairs

silent zealot
#

There's a "invisble" cheat in the debug cheat menu, if that is not locked to debug mode you can just toggle that on.

sonic needle
#

experimental haircut shows the new lovelyness feature of many hairs

silent zealot
#

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.

sonic needle
#

it is indeed only for ava. yes

silent zealot
#

I mean unhappy

sonic needle
#

:D i call it, 'Monkey Paw' modding. as its every hair you ever could wish for.
but all for ava

silent zealot
#

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

sonic needle
#

i try to do many styles, even grow-out unkempt style ones

silent zealot
#

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.

sonic needle
#

at this point ava will have the 'theoretical' World record for available content ๐Ÿ˜› which is my goal

open drum
#

@sonic needle can I suggest something?

sonic needle
#

sure?

open drum
#

since you are a designer

#

can you make "masks" of difference faces?

sonic needle
#

yeah that is rather easy to implement

open drum
#

like players can change face shapes & expressions using makeup items

#

as "masks"

#

would b a nice feature

#

since PJ has different emoji animations

sonic needle
#

shape isnt really... possible as easy, when combined with makeup at the same time. but seperately stacked, it can work

open drum
#

but no facial animations

sonic needle
#

remember that any suggestion i do is Monkey Paw'd to Ava tho.

open drum
#

yea, it's just an idea. think about it

silent zealot
open drum
#

thought it only makes u change faces during creating

#

creation**

silent zealot
#

Yes, you can change the choices

open drum
#

though i might b wrong, since i never used it

#

i see

silent zealot
#

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.

sonic needle
#

indeed, i am aware makeup can be meme'd to revert to clothing in this manner, as its based on it

open drum
sonic needle
ancient grail
broken kayak
silent zealot
#

It's from Kink it Up!

#

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.

silent zealot
#

I'm 10 months into the apoocalypse... gotta keep things interesting by changing up your outfit regularly.

broken kayak
broken kayak
sonic needle
#

im Doing a massive Outfit Patch for Ava for Kattaj MilPack, and addons

#

significantly better fitment, model fixes, uv fixes, etc

silent zealot
#

Looks better to me (also better base body)

sonic needle
#

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

silent zealot
#

Swicthing to the beter body will be a lot easier knowing there are already plenty of clothes working with it.

sonic needle
#

Project fallout armory, is built for ava

#

3 games, fo3, fo4. and NV worth of outfits planned ^ and being done

silent zealot
#

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

sonic needle
#

ah you mean for armory, which outfit?

#

the one when you first tried i mean

silent zealot
#

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

sonic needle
#

ah, that would of been early B42.0 to B42.2

#

i solved that issue for all body mods ๐Ÿ™‚

silent zealot
#

yeah, looooooooooooooooooooooooooooong time ago (in Zomboid weirdness terms)

#

Thank you! What was the problem?

sonic needle
#

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

silent zealot
#

hahahaha

#

I'm enabling her now, will see how well it goes

sonic needle
#

make sure you have texture res set to 2048x! in settings, and restart after enabling in main menu
and load game, mod load screen

silent zealot
#

I'll have to disable a few other mods, since I don;t want to be loading other skin textures over this

sonic needle
#

it is unfortunate that body models & the textures for them, collide with all others with no exception ๐Ÿ˜ฆ

silent zealot
#

Project AVA version

sonic needle
#

Aww ๐Ÿ™‚ thats cute

silent zealot
#

Much cuter, in face and body.

#

I've been serious face long enough lol

sonic needle
#

Check her butt. its Lovely ^_^ Spent atleast 1k hours there over the last 2 years aha

#

Perfect Peach Level ๐Ÿ˜„ which im happy with

silent zealot
#

Can't see it behind all the gear

sonic needle
#

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

silent zealot
#

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.

sonic needle
#

she is due for another patch soon to update her eyelashes to the new design as well

#

they are 3D and very real now

silent zealot
#

impressive

#

actual 3d objects for eyelashes... definitely pushing the bountries of ZOmboid character design here.

sonic needle
#

go use the Pixel hair pack, it gets more wild

#

Marionette Style hair Physics, using heavy broken levels of rigging

silent zealot
#

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!

sonic needle
#

the mod page should have current art for 90% of hairs on each hair pack

silent zealot
#

I'll have a look tomorrow, I need a break

#

and "tomorrow" might be "in 90 minutes after midnight" ๐Ÿ˜›

sonic needle
#

i noticed you enjoyed my TWD cav hat too, it was my first clothing model years ago actually

silent zealot
#

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.

sonic needle
#

i make armor / addons fulltime now

thin swan
#

Oh hell yeah, now we're cooking! Just gotta make some attack animations and polish a few things

sonic needle
#

i look forward to the bike ^_^ i have something very special planned for it!

thin swan
sonic needle
#

i marked it NSFW willingly, bit its really just Cute Dresses with a little cleavage, and some bra's etc

brave bone
sonic needle
#

if he adds an ambient noise play feature when riding that will help my bike mod aha

thin swan
sonic needle
#

modoptions toggle for a generic sound, means it can be off by default, and replaceable via Addons

broken kayak
brave bone
thin swan
icy night
#

Is snow considered rain?

#

Under isRaining

gilded crescent
#

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?

sonic needle
thin swan
# storm trench Omggg WHAT???!!

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

sonic needle
#

i can make animations already, have done plenty, but busy ish atm to use the new rig for things yet

thin swan
#

I've been kinda wanting to make a dual wield mod with custom animations for having two katanas/two knives, brass knuckles etc.

thin swan
storm trench
fiery pecan
#

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.

silent zealot
#

I compiled a java mod!

#

Look at how nice and bright those headlights are.

broken kayak
#

How it'd be nice to be able to make some actual extensions with java

silent zealot
#

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

broken kayak
#

Oooh you made high beem, haven't tried 2.0 yet but nice mod !

silent zealot
#

If I can access the values in mod options from within java I can so an even better job...

broken kayak
#

Maybe you could read it from a file ?

#

(Idk i have yet to do a java mod)

silent zealot
#

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?

broken kayak
#

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

silent zealot
#

Instructions unclear, grabbing coffee liquor from cupboard and making a Black Russian.

#

No idea how this helps modding but I'm willing to try. drunk

ornate basin
#

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?)

silent zealot
#
  1. Are you in Debug mode?
#
  1. Have you set up a folder for the upload under C:\Users\<username>\Zomboid\Workshop\Mod Name with 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.

ornate basin
#

oh it's the game that uploads the mod, I see

#

I was looking under the steam workshop page

#

thanks oke

silent zealot
#

No probs!

#

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

grizzled fulcrum
#

well its doing the exposing from java to lua

grizzled fulcrum
silent zealot
#

What does that do?

grizzled fulcrum
#

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

sonic needle
#

its code translation over updates yeah?

grizzled fulcrum
#

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

silent zealot
#

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

grizzled fulcrum
#

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

silent zealot
#

Hahaha

grizzled fulcrum
#

so you just subscribe to workshop mod and you get the mod jar loading alongside the lua and stuff

silent zealot
#

What if you could do it in lua except some fool hard coded it in java instead?

#

Nice! Is it on the workshop already?

grizzled fulcrum
#

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)

silent zealot
#

That's a very reasonable limitation

grizzled fulcrum
#

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

silent zealot
#

I'll have a go at that over the weekend

#

Where do I download it from?

sonic needle
#

spent over an hour repairing an n64 hair pain

silent zealot
#

Nintendo 64 models in Zomboid?

sonic needle
#

i have repaired this. Profesh/10

grizzled fulcrum
# silent zealot Where do I download it from?

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

#

keep in mind I wouldn't recommend installing production environment to your actual game yet, as im polishing some stuff still for it

silent zealot
#

I installed to C:/games/steam so I'll need to specify

#

Thanks, this will be fun

grizzled fulcrum
#

add a loom_game_install_path="C:\\games\\steam\\......."

#

so it points to the ProjectZomboid folder basically

brave bone
grizzled fulcrum
#

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

sonic needle
#

Smash Bro Ver Tho,

grizzled fulcrum
echo fiber
#

is MilitaryBase still the correct zone name in B42?

craggy nacelle
#

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

thin swan
#

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

craggy nacelle
#

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. ๐Ÿ˜•

thin swan
craggy nacelle
#

uhm, how do you do that?

#

that pack viewer desnt seem to have buttons to use anything

thin swan
#

And then here

craggy nacelle
#

im blind for not seeing the file XD

thin swan
#

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)?

craggy nacelle
#

Sir, yes Sir! ๐Ÿซก

#

^^

#

also im using a 4 digits id

thin swan
#

Damn, that really should work then ๐Ÿค” Do you have an item script? Could you give it a recipe and try to build it?

craggy nacelle
#

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?'

thin swan
#

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

craggy nacelle
#

hm, ill try to cobble together some test item, brb

craggy nacelle
#
    {
        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.

queen oasis
#
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

craggy nacelle
#

๐Ÿคช

queen oasis
craggy nacelle
fiery pecan
#

has anybody gotten the "registerZone" function to work for lua-based container overrides in B42 yet?

#

Sorry to just barge in, btw...

craggy nacelle
#

Sry,, didnt try .42 modding till now. Are you saying the registerzone command doesnt work anymore or that the forcezone isnt working?

fiery pecan
#

might be both?

queen oasis
#
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

fiery pecan
#

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"

craggy nacelle
#

im using getWorld():getMetaGrid():registerZone( in b.41 for zone registry and forceforzones in the distributions.ua

fiery pecan
#

one sec

queen oasis
#

it wants (name, type, x, y, z, width, height)

fiery pecan
#

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

queen oasis
#

forceForZones seems to be intact in 42

fiery pecan
#

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?

craggy nacelle
#

cant see anything missing from his register of the zone honestly

craggy nacelle
queen oasis
#

try without getMetaGrid

#

in 42

fiery pecan
#

k

#

same issue

bronze yoke
#

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

fiery pecan
#

hmmm

#

when does OnPreDistributionMerge fire, in regard to the forceForZones thing?

#

too early? Too late?

bronze yoke
#

it triggers way before, should be fine

#

i don't think there's a too early here

fiery pecan
#

hmm

echo fiber
#

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?

small topaz
#

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?

bronze yoke
#

in b42 you need a common folder (even if empty) and mod.info should be in 42/

echo fiber
#

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

tardy condor
echo fiber
#

im struggling to size my model ๐Ÿ˜„

fallen knot
#

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?

broken kayak
#

When the AdjacentFreeTileFinder returns tiles that are not free, I love modding

fallen knot
#

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

bronze yoke
#

you should read/edit the files in the zombie/ directory, you only need zombie.jar to recompile

fallen knot
#

let me know if i'm doing something wrong but this is what pops up when i try to open the jar file

fallen knot
#

sorry if i'm being too dumb with some stuff, i'm completely new to java

#

gamemaker coder to the core lol

broken kayak
#

also throw eclipse in the trash

#

where it belongs

fallen knot
#

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

broken kayak
#

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

fallen knot
#

Do I need to use something in particular to edit the code now that I have it like this, or...?

fallen knot
#

it's not fun but it works

#

GML is very similar to java anyways

broken kayak
#

never head of that xd

bronze yoke
#

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

broken kayak
#

well intellij is so MUCH better

fallen knot
#

i did find out about intelliji idea but i saw the "30 days trial" and instantly left lol

broken kayak
#

but idk if theres a free version ?

bronze yoke
#

the trial is for their paid version, they have a free community version too

fallen knot
#

oohhh

#

thank god

#

im trying that out, thank you

bronze yoke
#

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

broken kayak
#

Well with school I got a nice discount on the whole Ultimate pack

fallen knot
#

man, it was just below

#

i need to have more patience

#

thanks a lot

bronze yoke
broken kayak
#

Well no I actually didn't know there was a student thingy

fallen knot
#

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

bronze yoke
#

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

fallen knot
broken kayak
fallen knot
#

i saw a python script around but i think it'd be better to make it an in-game feature

broken kayak
#

Something that watches the save files and saves the changes elswhere

fallen knot
#

and i have this policy of doing things myself if they dont exist in a first place

broken kayak
#

Well yeah but a Java mod has some HEAFTY limitations

#

It will probably break in some spectacular way at every updates

fallen knot
#

all it should be is saving the game to a different directory

#

hopefully, it shouldnt be hard

bronze yoke
#

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

fallen knot
#

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

broken kayak
fallen knot
#

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

broken kayak
#

Man

#

You don't want to do that

#

Executing shell code from a software is like

#

One of the worst thing you can do

bronze yoke
#

it's intentional that you can't do things like that

fallen knot
#

it's definitely not the fanciest way but there werent much other options out there

fallen knot
#

otherwise we'd get like

#

virus mods lol

broken kayak
#

we already get those

bronze yoke
#

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

fallen knot
broken kayak
#

problem with shell exec is turning sane mod into virus

fallen knot
#

in fact i used it as a base

#

but it only creates files in 'em

#

that's about it

bronze yoke
#

oh man, you're using that mess as a base ๐Ÿ˜…

broken kayak
#

but with Kahlua, every java member is exposed in the lua

fallen knot
#

only for the fact they managed to create a folder, don't worry

#

that thing's code is a complete mess

broken kayak
#

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

bronze yoke
#

the base game's code is messy but superb is actually a lot worse

broken kayak
#

yeah I'll trust you on that xd

bronze yoke
#

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

fallen knot
#

meaning

#

each time you start a new world

#

it just creates another folder

#

doesnt matter if you delete a world

bronze yoke
#

yeah, actually it's impossible to fully delete files through lua tired

fallen knot
#

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

bronze yoke
#

we have ways to store per-save data without creating files now so the real issue is that they never transitioned to that

fallen knot
#

lol

#

whats even the point

bronze yoke
#

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

fallen knot
#

you can actually play as the NPCs

#

if you use the ultra super unkown choose player option on the start menu

bronze yoke
#

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

fallen knot
#

guess i'll check tomorrow

bronze yoke
#

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

fallen knot
#

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

icy night
#

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

thin swan
#

Alright, that'll do for now, there's still some animations that needs to be done, but it works well enough!

bronze yoke
#

very cool!

queen oasis
#

you did the kick flip ๐Ÿ™‚

thin swan
queen oasis
thin swan
#

Don't want to seem like I'm just wanting donations or holding off on updates

queen oasis
thin swan
#

Haha alright man, will do! ๐Ÿ˜„

craggy nacelle
#

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? stressed

thin swan
bronze yoke
#

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

craggy nacelle
#

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

craggy nacelle
#

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

bronze yoke
#

happens to all of us ๐Ÿ˜”

thin swan
#

Oh yeah been there! ๐Ÿ˜„

open drum
#

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?

queen oasis
#

if valid and valid:getHealth() then

open drum
#

still same

icy night
#

Does anyone know if a campfires fuelAmt = 10 then does that equate to the hours it has left? Or how is it measured

queen oasis
#

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 ๐Ÿ™‚

open drum
#

hahah yea

queen oasis
#

is there a specific object you're looking for? not much has getHealth

open drum
#

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

queen oasis
#

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

open drum
#

xD

#

so what's the issue?

queen oasis
#

I think if you check the instanceof you'll be ok

open drum
#

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?

queen oasis
#

yes

#

Wuro.object -- is object defined somewhere before this is called?

#

like Wuro = { object = {} }
or if not Wuro[object] then Wuro[object] = {} end

shut pulsar
#

hey im not sure where i can give ideas but they should add greenhouses in game that you can make

icy night
#

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

open drum
queen oasis
open drum
#

at least in build 41

queen oasis
open drum
#

yea?

#

what did i do wrong then..

queen oasis
#
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

open drum
#

oh?

#

it works..

#

wtf...

#

why didn't it work before?

#

thank you jim

queen oasis
#

might be you're only checking the first object in the worldobjects table?

open drum
#

yea

queen oasis
#

no worries, sorry I'm a little slow on the uptake right now

open drum
#

u saved another day @queen oasis

#

i was about to bomb the world , out of stress

queen oasis
open drum
#

is instanceof() function a native lua function that checks for given parameter variable to a class name?

queen oasis
#

it is. basically it's cast to class, like IsoPlayer, ItemContainer, etc

open drum
#

gotcha

#

thanks

#

learned a new thing today

queen oasis
#

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

open drum
#

{ item } or item.items

#

what is this checking?

#

if it has item within an item?

queen oasis
#

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

open drum
#

ahh

#

understandable

brave bone
#

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.

bronze yoke
#

you can use file instead of event

brave bone
split plover
#

Does anyone know how I can access the Raven creek mod file? Like what number ID is it?

brave bone
ancient grail
granite ginkgo
#

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?

main pasture
#

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

granite ginkgo
#

Thanks!

slim swan
#

U can get some idea from here

#
Game UI Database

The ultimate tool for Game UI and Interface designers. Explore over 1,300 games and 55,000 UI screenshots. Browse and filter by category, animation, colour, material, layout, game genre, and more.

tardy condor
silent zealot
# granite ginkgo But what about this?

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.

sonic needle
#

Cute Blood Replacer

violet atlas
sonic needle
#

awwh. thanks! ^_^

#

Project Ava https://steamcommunity.com/sharedfiles/filedetails/?id=3387041427

#

photo to show the vanilla facial area with blood, odd results that hide things

thin swan
#

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...

silent zealot
sonic needle
#

nice.

silent zealot
#

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.

topaz tangle
#

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?

main pasture
fiery pecan
#

I'd also like to ask if anyone else is having issues with loot distributions, specifically with "forceForZones="?

topaz tangle
fiery pecan
#

do you have attach points in the trailer and truck scripts?

topaz tangle
#

yes

#

i can attach it but it just tows it around like a car would for another car

fiery pecan
#

hmmm

#

like this?

topaz tangle
#

yes

fiery pecan
#

and you did name the attachment point on the trailer like the image above, right?

#

with the canAttach matching as well?

topaz tangle
#

yes

#

i copied it from the vanilla script for trailers

#

no

#

dont touch that

left plank
#

thanks

silent zealot
# topaz tangle holy crap thats bright

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.

fiery pecan
#

a spam bot hit while I was afk?

topaz tangle
#

yup

fiery pecan
#

ouch

topaz tangle
fiery pecan
#

so, uhm

#

trailer stuff

main pasture
fiery pecan
#

could it be a case sensitive issue?

main pasture
#

It seems to be always tested as capitalized

topaz tangle
#

ah that may be it then

fiery pecan
#

every instance I've seen was lowercase?

topaz tangle
#

first letter

fiery pecan
#

first letter lowercase

main pasture
#

B42.6 every contains("trailer") (case insensitive)

fiery pecan
#

hmmmm

topaz tangle
#

aye the capitol T worked!!!

#

thanks so many!!

granite ginkgo
#

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)

silent zealot
#

You mean so the panels look damaged as the van is damaged?

silent zealot
#

I think you should, makes it look better than having a perfectly pristine veicle that is 1% away from non-existence.

granite ginkgo
#

yeah, how to do the hood damage tho?

#

the front should be mapped only as front, it literally has no hood, right?

silent zealot
#

I don't know how, except in some places the Hood is called EngineLid

#

Which amuses me

granite ginkgo
#

lol

#

What is the script to have the vanilla van mechanics UI?

topaz tangle
topaz tangle
topaz tangle
#

np!
i had issues changing mine when i did my first vehicle mod

topaz tangle
# topaz tangle

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

topaz tangle
#

I use paint.net
The mask is what always annoys me because of my sloppy texture files

topaz tangle
#

Do show

granite ginkgo
#

Map for windows

#

damage looks better

#

My van can carry 138 beer cases

topaz tangle
topaz tangle
granite ginkgo
fallen knot
#

yipee, i'm finally ready to start

#

is this normal or am i missing something out...?

topaz tangle
# granite ginkgo Thanks

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

fallen knot
#

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

bronze yoke
fallen knot
#

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

bronze yoke
#

zomboid decompiler gathers them for you, you just need to go to project structure and select the output/dependencies folder as a java library

fallen knot
#

ohhh gotcha, i knew it had something to do with that folder but had no idea how to set it up

#

thanks a bunch ๐Ÿ™

bronze yoke
#

after this there'll likely still be a couple errors per file because decompilers suck

fallen knot
#

yeah, makes sense

#

but it's definitely better than 1000 errors lol

fallen knot
#

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

frail yarrow
#

anyone working on anything to handle disassembling some of the other items like ATM machines, cash registers, phones?

queen oasis
#
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

main pasture
#

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) ..",}}}")

fallen knot
queen oasis
bronze yoke
#

javac -cp "dependencies/*";"zombie.jar" FileToRecompile.java

fallen knot
#

gotcha, thanks a lot

#

i'll try it out

#

it worked!

queen oasis
#

breaking it in more helpful ways at least

fallen knot
small topaz
#

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()
??

fallen knot
#

hmph

#

i'll try something

main pasture
# queen oasis breaking it in more helpful ways at least

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

fallen knot
#

guess i'll try out different decompilers until one magically works

#

could it be because i'm using the wrong JDK version????

tardy condor
#

not sure

fallen knot
#

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 ๐Ÿ™

tardy condor
fallen knot
#

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

fallen knot
bronze yoke
#

over the last few years i've spent an insane amount of time trying to get my computer to stop using java 8

fallen knot
tardy condor
#

@fallen knotis work now ?

fallen knot
#

testing that right now

#

modified the file and compiled it

#

we'll see if game crashes

tardy condor
#

yes ^^'

fallen knot
#

we're back

#

okay FINALLY i'm done setting up

#

everything should be easier from now on

orchid quiver
#

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.

fallen knot
#

maybe you're setting it on client and not on server? sorry if that sounds stupid i'm not experimented with server modding

bronze yoke
#

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

fallen knot
#

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

icy night
#

Trying to test an adjustment to the sleeping options. How do I change the players fatigue in debug mode?

fallen knot
icy night
#

Ty

queen oasis
# main pasture This works for me when it's run at game boot (only up to 1000 capacity and requi...
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

main pasture
queen oasis
#

ha, omg thanks

#

didn't fix the issue I was hoping it would fix though

main pasture
#

The trunks are formated like this: part TruckBed { container { capacity = x, } } So should the partName be "container"?

queen oasis
#

ye it works fine after fixing that
carScripts:get(i):Load(carScripts:get(i):getName(), s)

main pasture
#

Nice

queen oasis
#

I'm going to have to grab the vehicle mechanics ui anyway

main pasture
#

Ah didn't notice it doesn't show it in mechanics. That's weird

fallen knot
#

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?

uneven stratus
main pasture
queen oasis
#

hmm

fallen knot
#

man i'm starting to give up

#

this feels like i wasted a saturday completely

queen oasis
fallen knot
#

wdym lol

queen oasis
fallen knot
#

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

craggy nacelle
#

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.

queen oasis
#

whoops... I think that means it's nap time

fallen knot
#

yoooo!

#

i'm getting there!!

fallen knot
#

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

broken kayak
#

Timestamp maybe ?

fallen knot
#

i think this might just do it

#

oh wait i'm stupid

#

there we go

#

oh wait

#

no this wont work

broken kayak
#

Theres also LuaManager.GlobalObject.getTimestamp which would get you the time passed since the start of the game in seconds i believe

fallen knot
#

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

broken kayak
#

Why the boolean guard ? is this just to only save once every two call ?

fallen knot
#

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

fallen knot
#

nothing happened

#

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?

gilded crescent
# fallen knot yipeee!!

This is definitely going to be a staple in my load order, and I feel like that's not only going to be me

fallen knot
#

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

gilded crescent
fallen knot
#

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

gilded crescent
fallen knot
#

max speed up is 1000.

#

if i set up day length to 25 minutes maybe it shouldnt be so bad

gilded crescent
#

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

fallen knot
#

Thanks for the hype!! I'll do my best

gilded crescent
#

You're very welcome!! I'm sure it'll go well

brave bone
#

๐Ÿ˜ 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

craggy nacelle
ancient grail
#

the invisible head part on one of the zeds.

ancient grail
fallen knot
#

ohh i see, thanks

icy night
#
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

queen oasis
#

does player have a getWeapon()?

queen oasis
icy night
#

42

#

and ig not

queen oasis
#

maybe getPlayer():getPrimaryHandItem() then check if it's a weapon and if it's ranged?