#mod_development

1 messages · Page 277 of 1

copper abyss
#

whoops

#

uno momento

teal nacelle
#

I'mma also try to find out how to make sound replacers for the zombies to make them sound more like people with a superinfection of tuberculosis like my mod is supposed to make the zombies into lol

copper abyss
#

This is exactly where my attatchment point for my muzzle is

finite scroll
#

how did you fix the rotation issue?

copper abyss
copper abyss
finite scroll
#

hm

copper abyss
#

like this:

#

(this is not my own attatchment data)

#

I took this from another mod's attatchment data for 42

#

hoping it would give insight on my own issue

finite scroll
#

so the muzzle flash rotates with the attachment

#

the bullet effect originates from the attachment

#

but the muzzle flash doesn't move with it

#

that's so goddamn weird

sonic needle
#

you used things from another mod. each gun mod,
should be from scratch with its own Zero'd out attachdata.

tacit mauve
#

How do you zero it out then?

#

I'm having about the same issue, displaced and wonky muzzle flash

sonic needle
#

rotate = -0.0000 0.0000 0.0000, <---

tacit mauve
#

as for the offset...?

#

Or is that not an issue

sonic needle
#

you can zero all. while starting out yes

#

as you edit it in the attchment editor. it will adjust.

dawn shuttle
#

Good to know about slashes for the mod ID! Both points makes sense. Thanks 🙂

latent fractal
#

trying to update a mod with a author who doesn't seem to come back. Any thoughts on where to address issues in stack trace? Specifically opening car hood, and mechanic ui window

dawn shuttle
sonic needle
#

i would personally not steal someones mod as the default, reach out first.

tacit mauve
#

i will be the sufferer

copper abyss
#

I am going to scream

#

then cream

sonic needle
#

it will reset it to 0, and then you use the editor to re fi its new position

copper abyss
#

;[

sonic needle
#

yep thats 0

#

now go move it. in the editor

latent fractal
#

credit is not my goal, just working functionality for another mod i love that is waiting for this mod to be updated

tranquil reef
#

is it possible to add additional clothing layers / allow the player to wear two of one item type

#

so two pairs of pants at the same time (one being some sort of accessory but still defined as pants)?

copper abyss
#

this is so fucking annoying

#

Why is it doing this..... augh..

#

The displacement of the actual muzzleflash and where the bullets are coming from is jarring

pulsar pagoda
#

does anybody know where the new voice files are? and what scripts they use?

iron siren
#

I would like to get to know the shaders like the drunkenness and shortsighted shaders, but I don't know where to find the code that triggers and controlls them. Does anyone know where they are and if they can be acccessed?

fast galleon
#

Anybody knows if sandbox vars are indeed better in b42? How soon can they be used reliably? I'll be looking to update the distributions for my mod later.

bronze yoke
#

from looking at the code i don't think it has been moved much if at all

#

i see what they did

#

they didn't make sandbox options load earlier, they moved ItemPickerJava.Parse() to be after sandbox options load

#

but the thing is there's no events between them, so it doesn't actually change anything unhappy

#
// 41.78.16
LuaEventManager.triggerEvent("OnPreDistributionMerge");
LuaEventManager.triggerEvent("OnDistributionMerge");
LuaEventManager.triggerEvent("OnPostDistributionMerge");
ItemPickerJava.Parse();
VehiclesDB2.instance.init();
LuaEventManager.triggerEvent("OnInitWorld");
if (!GameClient.bClient) {
    SandboxOptions.instance.load();
}

// 42.0.0 rev25072
LuaEventManager.triggerEvent("OnPreDistributionMerge");
LuaEventManager.triggerEvent("OnDistributionMerge");
LuaEventManager.triggerEvent("OnPostDistributionMerge");
VehiclesDB2.instance.init();
LuaEventManager.triggerEvent("OnInitWorld");
if (!GameClient.bClient) {
   SandboxOptions.instance.load();
}

ItemPickerJava.Parse();
#

it turns out i was always wrong about OnInitGlobalModData being the earliest event with sandbox options available, it's technically actually OnLoadedTileDefinitions, but it doesn't really change anything

ashen crane
silver plover
#

mods, crush his skull

calm mason
#

Hi, is there any way to open a https communication in lua mod?

tranquil reef
#

Is there an event for when the player unequips something or more specifically takes off clothing

opal temple
winter bolt
tranquil kindle
#

Also i assume its happening with all backpacks, or only yours?

opal temple
#

This is B42.
It seems that all backpacks have this issue.

#

This mod has been upgraded from B41 to B42.
I haven't made any changes to the XML part.

tranquil kindle
#

Can you try inserting this ine into that XML and see if it changed? It should work even when your game is running:
<m_MasksFolder>media/textures/Clothes/Hat/Masks</m_MasksFolder>

crystal canyon
#

is there a thirst multiplier? I tried using getThirstMultiplier but it seems it doesnt exists

opal temple
tranquil kindle
willow briar
opal temple
willow briar
tranquil kindle
tranquil reef
opal temple
#

Ok, I'll give it a try.

hidden compass
#

Hello! I am confused because the recipe script has changed drastically. Is there any information anywhere that summarizes the script specifications? I have no choice but to look at the vanilla implementation, but I am at a loss, for example, I can no longer specify Sound or StopOnWalk...

winter bolt
opal temple
tranquil kindle
#

I meant that you can use vanila bodylocation for your fullbudy outfit that should also allow to wear backpack.

tranquil kindle
opal temple
#

Like this?
tem wz1
{
Type = Clothing,
DisplayName = wz1,
ClothingItem = wz1,
BodyLocation = FullSuitHead,
BloodLocation = Head;Neck;Trousers;Jumper;Hands;Shoes,
NeckProtectionModifier = 1,
Icon = pr1,
CanHaveHoles = false,
BiteDefense = 0,
Insulation = 0,
WindResistance = 0,
}

tranquil kindle
#

Yes

tranquil kindle
opal temple
#

It still doesn't work.VALMEME1

tranquil kindle
opal temple
#

No, now the backpack cannot be equipped with the outfit at the same time.

tranquil kindle
#

Okay i see the issue

spiral egret
#
    if self.item:getFullType() == "Base.NutritionistMag" then
        local traits = self.character:getTraits()

        if not traits:contains("Nutritionist") then
            traits:add("Nutritionist")
        -- Remove the trait if sandbox option to remove is enabled
        elseif sBvars.ReadRemove == true then
            traits:remove("Nutritionist")
    end
            
    if sBvars.ReadDelete == true then
        getPlayer():getInventory():RemoveOneOf("Base.NutritionistMag")
        end
    end

Hello! Tried searching for info on removing items but couldn't find much. This is my current code for removing a magazine after it is read. I've tried DoRemoveItem but it keeps returning nil, RemoveOneOf seems to work but it causes another mod that affects reading speed to throw errors. Is there a better way to do this?

tranquil kindle
#

I just want to see if it will make backpack visible since custom bodyparts can act funny sometimes

opal temple
#

It worked

tranquil kindle
#

Yay

#

Thing is, now if you wear certain clothes, those might show though...

#

Unless you would add more exclusive things to that body location, but then it can mess with vanilaclothes that use it too

opal temple
#

So only using the vanilla BodyLocations for clothing positions will prevent this kind of issue?

tranquil kindle
#

You can try again creating your own and coppying everything from lua>shared>NPCs>Bodylocations and getting every "BodyCostume" and just make your own version with everything but back hidden?

opal temple
#

I'll try

#

Thank you very muchchickenAmitabha3

#

Delete all group:setExclusive("BodyCostume", "xx") and create the corresponding group:setHideModel("BodyCostume", "xx") Is that correct?

tranquil kindle
opal temple
#

I understand, thank you!

mellow frigate
#

Has anyone already increased their sneaking perk by moving around zombies ?

severe crane
#

Idk if this is right channel for suggesting mods but it would be cool (funny) to be able to play guitar hero in project zomboid. Or just a guitar whihc can be used by guitar hero guitar with adjustable tunes so you can use it to play music.
I get that its/maybe impossible but would be funny

rustic garnet
exotic wedge
#

Does anyone know what the format is in there?

#

i tried using the possible format ,buy not all wokring

placid river
#

The DrainableComboItem class changed and now its not possible to access the delta of it for some reason...? How is one supposed to check if a item like a battery has charge now?

#

there is only some new getter called "GetEnergy" but thats not implemented, and "getUseDelta" just returns the amount that gets used from the delta of that item

#

like, usage per tick or something like that

#

following that "getEnergy" function, i see that there is a new class just called "Energy" which seems to define different types of possible energy storage, like thermic, mechanical, electrical and so on... so is it just best to assume that i have to wait until they finish implementing that?

mint hawk
#

Trying to figure out why this clay making mod isn't showing up in the workshop. The folder structure seems to be accurate, but it refuses to show up in the mod list. Any ideas?

placid river
#

are you 100% sure the structure is correct? i had to fiddle a ton around with it too

willow briar
mint hawk
#

I double checked - set it up exactly the same as I did with my whetstone crafting mod. But never hurts to have extra eyes look

placid river
#

wait is the common folder inside 42.0

mint hawk
#

I'm realizing I didn'tt go far enough up into the folder structure - but that's within the contents/mods/claycraft folder

willow briar
#

I put poster and mod info into common and just use 42

placid river
#

(i hate folder trees)

mint hawk
willow briar
#

The new structure is rlly confusing

placid river
#

yeah, and the huge trees that show it off dont make it easy to understand

placid river
#

dont know if its case-sensitive or not

willow briar
placid river
#

yeah i am really confused about that right now

#

since... i cant access the delta from batteries or any drainable item really

#

which makes my rechargeable batteries mod, impossible on the current build

willow briar
#

the class seems very unfinished

#

with the drainable and IUpdater interfaces just empty

placid river
#

well, the changes seem unfinished at the very least

placid river
#

yeah and there are functions that just return null hardcoded

willow briar
placid river
#

gonna guess i just have to wait until they finish that - or remember to put the getDelta() function back in

mint hawk
#

I would ping the mod author but I don't know what his discord is. At least his mod works now (:

#

But hey I learned something new 😄 the file structure is super picky.

placid river
#

it sure is

#

i was so confused when i copied a workshop mod into my workshop folder just to see if it would be able to load

#

and of course it didnt

mint hawk
#

I may just... Hang on.

dawn sparrow
#

Anyone know how I can get my mod to show an Icon?

rustic garnet
winter bolt
#

same as the poster image

dawn sparrow
#

oh right, doy

mint hawk
#

Yea add 'icon=CrudeWhetstoneIcon.png' in your mod.info (or whatever you want it to be) has to be 80x80

dawn sparrow
#

80 to 80?

#

I thought it was 30x30

#

or 32x32

#

I cant remember

willow briar
#

From what i understand DrainableComboItem has default 32 uses by default and each use subtracts 1

public float getCurrentUsesFloat() { return (float)this.uses * this.useDelta; }

#

so getCurrentUsesFloat calculates how much percentage there would be left

#

uses 32 * 0.032 would be 1

#

so 100% usage

placid river
#

i'll give that a try in a moment

willow briar
#

if the item would have 16 uses
16 * 0.032 you would get 0.512 so around half percentage

mint hawk
ocean venture
#

Hello everyone,

I have a piece of code that allows following a specific angle. However, when I input values, my vehicle ends up stuck to the ground. I suspect this issue is related to getAngleY, but it seems I'm required to provide a value, and I don't fully understand why.

Does anyone know exactly why this happens or how to fix it?

Thank you in advance for your help!

dawn sparrow
#

idk, i used 32x32, looks nice

dawn sparrow
ocean venture
#

-- Function to adjust the vehicle's orientation
function restrictVehicleMovement()
local player = getPlayer()
if not player then
print("Error: No player found.")
return
end

local vehicle = player:getVehicle()
if not vehicle then
    return -- No vehicle, nothing to do
end

-- Check if the vehicle is on a rail and retrieve the angle
local isOnRail, angles = isVehicleOnRailAndAngle(vehicle)

if isOnRail and angles then
    -- Apply the angles only if necessary (small adjustment)
    local currentAngles = {vehicle:getAngleX(), vehicle:getAngleY(), vehicle:getAngleZ()}
    local tolerance = 5 -- Tolerance in degrees

    local shouldAdjust = false
    for i = 1, 3 do
        if math.abs(currentAngles[i] - angles[i]) > tolerance then
            shouldAdjust = true
            break
        end
    end

    if shouldAdjust then
        vehicle:setAngles(unpack(angles))
        print("The vehicle follows the rails with angles: ", table.concat(angles, ", "))
    end
else
    print("The vehicle is not on a rail.")
end

end

willow briar
#

Wdym by required to provide a value

#

getAngleY does not take in any parameters, if thats what you are asking

ocean venture
#

Sorry for the confusion! Let me clarify:

In my code, I’m using getAngleY() to retrieve the Y-angle of the vehicle, but I noticed that when I apply the angles (via setAngles), the vehicle gets stuck to the ground.

I suspect the issue might be related to how I'm handling getAngleY() or the angles in general. Could it be that getAngleY() is returning unexpected values or that I’m misinterpreting how to use it in conjunction with setAngles?

#

local currentAngles = {vehicle:getAngleX(), vehicle:getAngleY(), vehicle:getAngleZ()} vehicle:setAngles(unpack(angles))

rustic garnet
#

Why is my mods in my Zomboid/mods not showing up? it seems to work on Zomboid/workshop

what did you guys get info on the new mods changes?

placid river
#

delta was already a percentage after all

#

or well

#

a delta percentage, which you could easily use to calculate

willow briar
#

Seems like theyre changing stuff, I havent worked with the old system

#

Glad i could help

placid river
#

yeah thanks alot

#

i guess i somehow looked over that function

ocean venture
#

I don't understand anything about the coordinate system in the game, I have to put the 3 coordinates otherwise it's not in the right direction. I can't tell him to just do a 180 rotation.

#

Don't you know of a function that allows me to follow the position of a Tille on the map to be able to align my vehicles?

dawn sparrow
#

I'm trying to create better photo examples, am I able to use -debug to slowly dictate the moodles?

dawn sparrow
#

aughhhh

#

God damnit.

ocean venture
#

Edit images directly on software

dawn sparrow
#

I guess I need to do that

ocean venture
dawn sparrow
#

I've been using paint.net for all of my stuff lmfao it surprisingly comes out well.

ocean venture
dawn sparrow
#

Yeah I used it to make my Mod's thumbnail

ocean venture
#

If you are looking for or find moodles textures, it's here ProjectZomboid\media\ui\Moodles

mellow frigate
#

Mod publication is a pain these days. Can you thumb up if you also have frequent errors uploading to the workshop ? Can you thumb down if you don't ?

ocean venture
#

Weird errors 🧐

dawn sparrow
#

Why didn't I start modding before, this shit is fun asf lmao

#

Does anyone know the colour values for each moodle background or where I can find it?

strange burrow
#

Hello

#

Im new here, I wanted to know how to mod weather

mellow frigate
strange burrow
#

My idea is to modify the snow climate to have a probability to kill the player, which increases with each hole in the equipped clothes. And if there are any body parts that are not covered, the probability is 100% of instant death. The "lore" is that each snowflake can kill you if it gets in contact with any part of your skin, based on the argentinian comic "El Eternauta"

hidden compass
dawn sparrow
#

I just realized, is there seperate positive moodle translate file?

mellow frigate
rustic garnet
#

How can we make sure that the mod can have a b42 and b41 compability? It's its just by adding the b42 and common folder and leave the rest as it was?

rustic garnet
#

Also another build where they have not fixed BasedHandler class to just allows us to add custom actions..

#

override time

languid badger
#

Hey there, I'm trying to figure out how to Override a vanlla script file with another script file.

If you wanted to do that in 41 you would just have to add Override:true but that doesn't seem to work.

Is there a specific area to read into when looking into how scripts work in the decompile?

Thanks

stiff brook
#

I'm trying to update my mod to build 42, but my mod menu is now completely blank after restarting the game

rain thunder
#

I really hope that someones working on a mod that removes breaking furniture while picking them up. It's ridiculous

#

I don't wanna risk losing the gun lockers bud but even with the recommended carpentry level i still have a 52.5% chance to destroy it.
Idk what y'all usually do in here cuz i have never talked in here but i desperately need someone to make this mod lol. I'd appreciate it a lot, and so would others. I don't have much modding experience but i think you just had to change some of the values for picking up furniture, then it should be fine right?

fast galleon
rain thunder
#

What's it called

#

I personally haven't found anything

fast galleon
rain thunder
#

Hmm no results

#

Rebalanced in the search bar, i only get a katana mod

hot void
#

aw shit

#

b42 changed how recipies work?

rain thunder
#

Well the mod is for B41, however the author has mentioned something about making a new mod for B42

hot void
#

i kind of got my mod to show but ehhhhh i still need to fix context menus and well

rain thunder
#

Damn

hot void
#

recipies too

rain thunder
#

Well idk anything lol, i just translated some items and actions for a friend who made a mod

hot void
rustic garnet
stiff brook
#

Regarding the mod i want to update. The game used to use these textures for the moodle background. They now seem to use different textures, which I can't seem to find, since my .pak file is no longer overwriting the moodle background. (Also they look different, so it's in fact likely in a different place)

#

This is the structure that seems to let me load the mod, but the moodle backgrounds are unaffected

#

Pretty sure that is not the one on the right (since the color is different), so it has to be somewhere else??

warm yacht
#

What is causing the pan to dupe, and using all the rice?

dusk saddle
#
    fluid PIOrangeStuff
    {
        Color = 255 : 253 : 135,
        DisplayName = Fluid_Name_PIOrangeSportsDrink,

Is this the correct format for a custom color for fluids? It seems to be what Zomboid's fluids folder showcases, although I can't seem to get it to work

warm yacht
#

I want the rice to use the action that yeast would use on the right most image, any help would be awesome.

dusk saddle
#

I know that yeast is set to be a drainable item and rice isn't. Looks like in the new recipe codes there's this snippet for rice:

item 1 tags[RiceRecipe],
warm yacht
#

God i love coders thank you, it's seems rice flour and pasta all have this line :/

rustic garnet
#

Trying to update by mod to B42? help a bit ;_;

#

Why does it says that contents have unrecognized files?

dusk saddle
#

Show us your contents folder and what's inside

rustic garnet
#

first image

dusk saddle
#

Oh sorry my bad

rustic garnet
#

preview is outsides contents btw even if ti desnt look like it

dusk saddle
#

Try removing the poster

rustic garnet
dusk saddle
#

I think only modinfo should be in there

#

I put my posters and such into the version subfolders

rustic garnet
#

poster is inside the 42

warm yacht
#

King can you help me find the prepare bread recipe after you helped that gentleman

rustic garnet
#

and the previow is inside the top folder, outside of contents

rustic garnet
dusk saddle
#

Common, my apologies

#

I just woke up

rustic garnet
#

no worries ˆ^

#

It doesn't work, still the same error

#

it's quite weird

dusk saddle
#

That's odd indeed, here's mine

dusk saddle
# warm yacht King can you help me find the prepare bread recipe after you helped that gentlem...
    craftRecipe MakeBreadDough
    {
        timedAction = MixingBowl,
        Time = 50,
        NeedToBeLearn = True,
        category = Cooking,
        Tags = AnySurfaceCraft;Cooking,
        xpAward = Cooking:10,
        AutoLearn = Cooking:7,
        inputs
        {
            item 1 tags[MixingUtensil] mode:keep flags[MayDegradeLight],
            item 1 [Base.Bowl] mode:keep,
            item 1 [Base.RollingPin] mode:keep flags[MayDegrade],
            item 1 tags[Flour],
            item 2 [Base.Salt],
            item 1 [Base.Yeast],
            item 1 [*],
            -fluid 1.0 [Water],
        }
        outputs
        {
            item 1 Base.BreadDough,
        }
    }

Here's the bread dough recipe

warm yacht
#

Hmmm the yeast is the same, but only drains

dusk saddle
#

Yeast is a drainable item, so if you put 1 it'll only use one 'UseDelta' (so say if an item had 5 uses, it'd only use 1 of those 5), rice isn't set as a drainable so I believe if you put a 1 it'd default to using the whole thing

#

I'm still trying to figure out food recipes myself so I can update Pomp's Items, but it's a long ways away

rustic garnet
warm yacht
#

Ahh nice that you also working on it too

vague marsh
crystal canyon
#

its in the scripts folder

vague marsh
dusk saddle
#

steamapps\common\ProjectZomboid\media\scripts\recipes

#

I found it in the recipes_baking file

crystal canyon
#

/steamapps/common/ProjectZomboid/projectzomboid/media/scripts

#

yeah

#

up there lol, Im on linux and the folder is different

dull moss
#

are they like not using ISFixAction for repairing anymore at all

#

I'm not getting any prints niehter when repairing cares or weapons

local original_ISFixAction_perform = ISFixAction.perform;
---Overwriting ISFixAction:perform() here to insert ETW logic catching player doing any kind of repairs
---@diagnostic disable-next-line: duplicate-set-field
function ISFixAction:perform()
    if detailedDebug() then print("ETW Logger | ISFixAction:perform(): caught") end;
    local conditionBefore = self.item:getCondition();
    original_ISFixAction_perform(self);
end
#

like it never prints

#

oh wait it might have been moved from client to shared

dull moss
bright fog
#

Just move the file with the decoration in shared

#

It will be the exact same thing

dull moss
#

ye that's what i meant

bright fog
#

Aaaah

#

Well that's not an overwrite

#

That's a decoration

dull moss
#

true

bright fog
#

You connect a function to another function or intercept a function

#

Just for the future so you have the word for it

dull moss
#

how come when I do the same for ISRepairEngine:perform() in client folder it works KEKL

#

even thought that's also shared

bright fog
#

Bcs client folder loads after shared

viral spire
#

Is there a mod for B41 or B42 that randomizes your look and inventory load out for later date runs, like 1 year after the apocalypse?

Doesn't make much sense to be a year late into the apocalypse and somehow appear as if it's the first day.

ancient grail
#

been busy irl

i havent read much of dev chat so im replying to a random code block

this i believe is related brush tool
dont have much info other than that but i believe this also has the ability to set certain tile properties when executed properly ( just a theory)

north rain
#

Does anyone know if gendered texture choices is possible? I want to make a male and female version of a piece of clothing but their models are completely different, causing the UV maps to be different

ancient grail
#

on the clothing xml there are models for male and female thats how you do it

but this is b41 knowledge

sly gazelle
#

is possible to reduce garbage bags weight reduction without dependencies in build 42?

#

in b41 i needed to use itemtweakerapi

ancient grail
north rain
#

like use two different uv maps but same texture

ancient grail
north rain
ancient grail
#

pretty sure if you learn how to then you will see what i ment

ancient grail
north rain
#

Yes, the pic i sent was the clothing xml

ancient grail
#

sorry my friend im using mobile

#

couldnt see it

north rain
#

It references one texture, but I would need 2 for both genders because their uv maps are madly different

ancient grail
#

anyway could you paste your clothing xml

#

so i can properly show you

north rain
ancient grail
#
<m_MaleModel>skinned\clothes\hoodiedown_m</m_MaleModel>
    <m_FemaleModel>skinned\clothes\hoodiedown_f</m_FemaleModel>
north rain
#

those are the models, it works

#

but the textures need to be different

ancient grail
#

hoodiedown_m
and _f should point to 2 different models yes?

north rain
#

they do

ancient grail
#

got it

#

heres how you solve the situation

teal nacelle
#

I got permission to use a different B42 compatible reskin mod as a base, so maybe my mod will actually function now lol

#

I'm probably gonna redo these textures but this is the general idea for my reskin, based on tuberculosis

#

Idk why 2 of them are spoilers

ancient grail
#

choice 1 (bad choice but quick success)

you make 2 items 1 for male 1 for female using 1 model per item with texture that matches the thing (since you already have all the asset setup)

option 2
you sync the models UV

ancient grail
#

also this topic is better discussed #modeling

its welcomed here but there you will get better feedback

north rain
ancient grail
#

that a modeller question im afraid

north rain
# ancient grail i dont

Ok thanks, ill go to modeling channel to see. The first option is a no imo, I want the one itme to be found and be used on both genders

ancient grail
north rain
ancient grail
#

then thats what you should do bud

north rain
#

I cant do that, I need two models!!

ancient grail
#

no
just remodel the first one

#

pick one
then reshape a new model based from the first working one

north rain
#

Oh you give me an idea though...

#

I'd have to redo the female model, but just move the vertices around so it keeps the same faces

#

So i take the male and move things to be more female

ancient grail
#

goodluck

winter bolt
#

theres no way to have gendered textures afaik

north rain
#

:(

tranquil kindle
#

Unless youre willing to go with clothingExtraoption just for that

finite scroll
#

seen some mixed implementations, is it better to name the build 42 folder "42" or "42.0"?

#

is there even a difference?

winter bolt
#

i just do 42.0 because i know some people have had issues using 42

finite scroll
#

alr i'll update my stuff to that then

rustic garnet
#

has anyone have had this issue?

It adds a question mark to my mod name

dry lichen
rustic garnet
rustic garnet
#

Yeah its weird af lmao

#

Rip

finite radish
rustic garnet
#

Also do you guys work directly of Zomboid/mods or Zomboid/workshop?

finite radish
#

mods, iirc workshop folder is for generated content after you publish through the menu.

finite scroll
#

i work entirely out of workshop, idk about others

rustic garnet
#

BEcause I got github set up and IDE specific shit in mods. but I wanted to just build to workshop for updates

quasi kernel
#

I work out of workshop too to my knowledge.

rustic garnet
finite radish
rustic garnet
quasi kernel
#

I'm probably a bad coder for this, but I don't really use that stuff at the moment, I kinda wing it.

#

It works out well enough, though I would definitely recommend your route. I think .git files are just kinda left there though

finite radish
#

workshop folder is like a final staging point for the mod, so imo the setup Sioyth has is preferable. winging it is fine for smaller projects with not a lot of need for updates though

quasi kernel
#

I could be wrong but I'm like 2% sure you can just leave them sitting there

rustic garnet
#

I use IntelJ Idea and Vscode so thats strange

quasi kernel
#

And most of my projects are smaller anyhow

rustic garnet
finite radish
rustic garnet
#

specially with like 3dmodels and bigger files

quasi kernel
#

Yeah that makes sense, .git files are version control..

finite radish
#

generally I wouldn't want people seeing the wild shit I name my commits sometimes either LMAO

quasi kernel
quasi kernel
#

Are you really programming if you don't have some aggressive file names / comments somewhere?

finite radish
#

real af

thin bronze
#

The new recipe system is killing me
trying to update my mods has not gone well lol

finite scroll
#

this is one of my favorite comments i've written before

#

so descriptive

quasi kernel
#

Mood

rustic garnet
#

tbf

quasi kernel
#

I forgot what some of my better comments were, some were typically me complaining about some insanity going on

rustic garnet
#

project zomboid code is pretty shit

#

this guys were wilding

#

we gotta do pretty fucked up hacks sometimes

quasi kernel
#

It's getting better, though do keep in mind that I believe the game was made by college students at the start(?)

finite scroll
#

i still refuse to comprehend they have a manually set arbitrary list of what classes are exposed to lua

finite scroll
#

like surely there's a better way of doing that

quasi kernel
#

I get severely disappointed about using Kahlua sometimes because I'm so used to Luau (so many nice features are missing,,,)

rustic garnet
#

Also the whole reason BaseHandler class always needs to be overrided is because they have one variable set to false 😦 which is the list to add new actions lmao

quasi kernel
#

Sometimes I feel like I have imposter syndrome but y'all have made me feel a little more comfortable, thank y'all.

#

I just get embarrassed when I'm around some of these legendary programmers that seem to know everything and I'm just kinda.. here.

rustic garnet
quasi kernel
#

True

rustic garnet
#

unless their ego is off the charts

quasi kernel
#

Ah.. I still remember my first Roblox scripts being literally stitched together pieces of code that I ripped from other scripts.

rustic garnet
#

but then they write bad code anyway, because they write code to show how smart they are and ends up being complicated af

teal nacelle
#

How would I edit infection symptoms? I want to make a companion mod for my reskin once it comes out that changes how the infection works

quasi kernel
#

It was like weird Legos for a while before I started learning what the Legos actually meant.

finite scroll
#

one thing i've just had to learn when making computer-related shit is you'll never fully know what you're doing

teal nacelle
quasi kernel
#

Are infection symptoms Java side..?

teal nacelle
#

It'd make stealth and combat more difficult, but especially stealth because the coughing and screaming would attract zombies

rustic garnet
#

Anybody had these yet?

quasi kernel
#

I suppose you could always check if the user is infected and do your own symptoms.

finite scroll
#

yeah you'd have to check and do them yourself

teal nacelle
finite scroll
#

but it's defo possible

teal nacelle
#

I've heard it's spaghetti code personified lol

quasi kernel
#

It's both better and worse in B42 so far

rustic garnet
#

spaghetti is being nice haha

#

True that

quasi kernel
#

Like, a lot of my code is cleaner thanks to new exposed methods

rustic garnet
#

I need to decompile the libs ;_;

quasi kernel
#

But there's also some methods that just aren't exposed that really need to be

rustic garnet
#

It seems most methods are outdated

#

Maybe they have fixed this BaseHandler issue

quasi kernel
#

Lemme see if I can find it..

rustic garnet
quasi kernel
rustic garnet
#

I figured so ;/

quasi kernel
#

@rustic garnet

#

Link is there

#

I can't copy it rn for some reason

#

There's a whole tutorial over in their discord that worked for me

#

Lots of neat people there too

finite scroll
#

idk how to do the text above the head tho

rustic garnet
#

Damn, thank you!

#

Where was this 3 years ago when I made my mods lmao

winter bolt
finite scroll
#

yes, preview should be in folder above contents, not in contents

#

should be in same dir as workshop.txt

bronze yoke
#

yeast as a drainable can do it, but food items can't use a portion of their hunger like they used to be able to

warm yacht
bronze yoke
#

this is why i recommend always working out of workshop, if you start in mods and move there later it'll mess up your git repo

dawn ferry
#

hey everyone, i've just started to get into the modding and wanted to create a simple mod for the game, i've followed some instructions but when i put my mod into Zomboid/mods file, i can't see it on the mod list in-game, i've properly made mod.info files and other stuff

#

for b42

quasi kernel
#

Did you make the 42 folder and common?

dawn ferry
#

42 one i created but i think i didn't create the common file

quasi kernel
#

Common is required iirc but doesn't need to have anything in it(?)

winter bolt
#

yeah it just needs to exist

rustic garnet
rustic garnet
#

otherwise it wont even appear

bronze yoke
#

i don't mean to open the entire workshop folder, just the Workshop/ModName folder

finite scroll
#

does anyone know where the textures for occupation icons are located? I might be blind but i genuinely cannot find them

bronze yoke
#

have you looked inside the texture packs?

rustic garnet
dawn ferry
#

Thank you everyone now i can see my mod on the list gura_heart

finite scroll
frozen patio
warm yacht
stark cape
#

Hey everyone, couple of questions, if someone knows:

  1. How to add tag which allows mod to be is visible after filtering in ingame mods menu (the dropdown map,features,modpack,...)?
  2. I can't seem to get working mod id/workshop id:
    id=966221273/SmartStack results in screenshot
warm yacht
#

Just eat them as they are which sucks ass

winter bolt
frozen patio
#

Dang, that means saphs cooking or whatever it’s called is gonna need a complete rework/rewrite from the sounds of it, unless it’s all a bug

warm yacht
#

Cooking mods are all going to be broke, probs why we have not seen any.

finite radish
warm yacht
#

Won't be fixed for atleast 2 weekss as the indie stone are on hoilday

finite radish
warm yacht
bronze yoke
#

yeah, it's just not implemented in the new crafting system yet

frozen patio
bronze yoke
#

cooking has used a separate system from regular crafting since b41 which doesn't seem to have been touched in this update but you still need to go through regular crafting to create the 'base' item for use in that (in this case the pot of rice)

ancient grail
winter bolt
#

nothing that really needs updating

#

they just added some new stuff for the kneepads and armour

teal nacelle
pulsar pagoda
#

does anybody know where these sounds are at?

pulsar pagoda
teal nacelle
#

They're inspired by advanced tuberculosis since it can manifest in the skin and cause huge sores that are prone to infection

bronze yoke
#

media/sound/banks/Desktop/

teal nacelle
neat herald
tacit plover
pulsar pagoda
teal nacelle
teal nacelle
#

I'm thinking of making it so not only does the infection cause the character to cough and wheeze randomly, but also antibiotics can slow it down but not cure it because the infection is a resistant form of TB on crack that also drives you crazy basically

dawn shuttle
#

Haven't seen another modder faced with this issue. I have an fbx which attach itself to the bone Bip01_Head to get placed on the head like described in the picture. Instead it gets flipped backwards for some reason. Anyone has insight on this?

tranquil kindle
winter bolt
winter bolt
pulsar pagoda
#

i would only need to make a media folder in a mod with the correct folders and .bank file name for the game to read it first?

winter bolt
#

the mod loader doesnt load bank files so you have to replace them in your install folder manually

dawn shuttle
pulsar pagoda
random finch
#

(B41) Any tips on going from IsoSprite to ScriptItem or vice versa?

bronze yoke
#

you can probably just redefine the sound scripts

#

as long as they're actually being triggered that way anyway

thin bronze
#

Im trying to update my mod were the player dies after crafting somthing but B42 changed somthing and im not sure what
my old code was function EatNailsAndGlass() getPlayer():getBodyDamage():getBodyPart(BodyPartType.Head):AddDamage(100); getPlayer():getBodyDamage():getBodyPart(BodyPartType.Neck):AddDamage(100); getPlayer():getBodyDamage():getBodyPart(BodyPartType.Groin):AddDamage(100); end
anyone know what i need to change for it to work?

teal nacelle
#

Seems like my mod still isn't appearing even though I'm using a reskin mod that's been updated to B42 as a template (with permission ofc)

pulsar pagoda
mortal oasis
#

don't know if this is the right place to ask, but is anyone able to help me with making some personal edits of a mod? its the reupload of shark's military and police uniform improvements and i personally really don't like the ALICE pack replacements and am wanting to remove them, but have absolutely 0 clue how. any help would be super appreciated!

placid river
#

quick question, does anyone else also have issues with using TimedActions?
for some reason, the one i created and ported to 42 now causes issues with the car dashboard... even though i dont touch any of that?

#

like, i am erroring on the "setVehicle()" function of the vanilla game, even though i dont do anything with vehicles

finite scroll
#

traits are 18x18???

#

that's the most random resolution ever 😭

#

why not just use 16x16

random finch
bronze yoke
old ginkgo
placid river
#

yes

old ginkgo
#

Have you updated your recipes for b42s new format?

placid river
#

ah.

#

that explains it.

#

i have in fact not.

old ginkgo
#

Try removing them and see if the error still occurs. If it does; you’ve found your problem. 😉

#

Don’t ask me why a crafting recipe causes an error with vehicles. I could not tell you.

random finch
bronze yoke
#

yeah, those functions are what it relies on internally, the library just caches some stuff to do that as performantly as possible + it messes with the metatables so you can access it without doing a bunch of weird crap

#

you'd just do item.worldObjectSprite instead of a bunch of loops and function calls

random finch
#

Which is what I tried todo in the first place. Of course, I was mistaken.

crystal canyon
#

Is it okay if I run everything under shared? Or do I need to run things individually on server and client. Im asking in general terms. If not, then what type of functions should I put under which?

bronze yoke
#

yeah, the goal is to just make it work how any normal person would expect it to work 😅

bronze yoke
crystal canyon
#

what is the load hierarchy? client first?

bronze yoke
#

shared -> client -> server

crystal canyon
#

thanks

bronze yoke
#

for the future ui stuff should go in client, most other things are kind of up in the air until we actually get multiplayer since it seems like a lot of things are moving around from where they were in b41

queen oasis
#

is there any way to access "self" when overwriting a part of a timed action?

local old_ISGrabCorpseAction_waitToStart = ISGrabCorpseAction.waitToStart
function ISGrabCorpseAction:waitToStart()
    local ret = old_ISGrabCorpseAction_waitToStart(self)
    local stillDropping = ret.character:getVariableBoolean("grappleanim")
    ret.character:faceThisObject(ret.corpseBody)
    return ret.character:shouldBeTurning() and not stillDropping
end
bronze yoke
#

that is correct

#

or

#

just do self like you do on the first line

winter bolt
#

any function that starts with ISGrabCorpseAction: will have access to self i think?

bronze yoke
#

lua's oop is a lot less abstracted than in some other languages, self is literally just an argument that is passed to each function - if you define a function with : instead of . that adds an invisible self argument

queen oasis
#

I thought so, maybe I'm bungling it somewhere else

winter bolt
#

it looks like ret.character:shouldBeTurning() is wrong?

queen oasis
#

I've done this a almost million times with other actions

winter bolt
#

ret.character is trying to access "character" from the original ISGrabCorpseAction:waitToStart() it looks like?

bronze yoke
#

you should be doing self.character instead of ret.character

#

ret would be whatever the original waitToStart returned (which i think is supposed to be a bool)

crystal canyon
#

Im going insane with this new Fluid code. It was so easy to block drinks back in b41. I've been working on this damn thing for more than 12 hours and nothing seems to work!!! angry angry angry angry angry

queen oasis
#

saving me from myself again

#

my tunnel vision is something to behold. thanks so much!

bronze yoke
#

if isAlcoholic(self.item) but i don't see isAlcoholic defined anywhere?

undone flax
#

where do i find the recipe for "break large stones into small ones" would like to try and addthe metalworking chisel. its some sort of masonry

bronze yoke
#

isAlcoholicFluid itself looks like it should work, but i might nitpick its optimisation 😅

crystal canyon
#

ive rewritten this in so many ways that some extra junk might still be there

bronze yoke
#

if you put the primary fluid name into a lookup table of alcoholic drinks it would be O(1) instead of O(n)

#

but the function looks like it should work either way

#

it's probably just that you call the non-existent isAlcoholic so it errors out before it ever gets to do its thing

crystal canyon
#

This is the best version of the code so far. It detects the fluid type as alcohol and disables the drink option. But i can still drink by choosing 1/4 1/2 or All

vague marsh
#

will an item still show up in the new crafting menu even without this:

#

category and tags, or is it required?

#

no categ goes to general?

bronze yoke
#

it needs a tag to tell it where it can be crafted, otherwise it won't show up

#

either AnySurfaceCraft or InHandCraft (iirc)

vague marsh
crystal canyon
#

I even added this debug option to see if I could intercept those sub menus under drink but it appears they are dynamically created and I cant block them

bronze yoke
#

AnySurfaceCraft means you need a surface (table, counter, big rock, whatever) to craft it on, InHandCraft means you can craft it anywhere

crystal canyon
vague marsh
#

okay thanks

crystal canyon
iron siren
bronze yoke
#

but it's called by isAlcoholic(self.item) which isn't the same

iron siren
#

good point and maybe the point? 🙂 which just shows one should not stop by the computer on the way to get the first cup of coffee in the morning

mystic vessel
#

I don't know if anyone has messed with this recently, but my clothes don't have properties that improve vision like glasses.

tranquil reef
#

Any way to add a tag to an item type without overwriting the full file

crystal canyon
#

imagine carrying a petrol jerrycan full of vodka and just sipping every now and then lol

#

hahaha omg it is possible to do

winter bolt
#

i guess that disguise system for multiplayer that they mentioned in a blog a while ago is gonna be in b42

tranquil kindle
#

So thats what this tag is about. I've been wondering whats the use for it.

vague marsh
#

how do I check if the player needs atleast one of the following? what's the correct way to implement 'or'? is this the correct way to do it?

inputs
        {
          item 1 [Base.PaintGreen,Base.PaintRed, Base.PainBlue],
        }
tranquil kindle
#

Also its in your best intrest to not have spaces between*

tranquil kindle
#

It might cause issues

tranquil reef
#

Sorry for replying to this 8 months later lmao, but do you know if it's possible to add a tag like that to vanilla items without overwriting the script entirely? Could it just be forced through lua or something?

bronze yoke
#
local item = ScriptManager.instance:getItem("Module.Item")
if item then
    item:DoParam("Tags = MyNewTag")
end
tranquil kindle
#

Also it might be worth knowing that if you do it in other way than do param it might add multiple instances of same tag. For example i used to add tag each time player equiped certain item and it meet conditions for it and if it didnt, it was supposed to remove it. Turns out each equip literally added it so i could have plenty of same tags. (It was gun that when added attachment was supposed to add tag and be removed when there is no attachment on it).

iron siren
mellow frigate
#

Is there any way to use a modded (old school) Timed Action as a craftRecipe timedAction ?

bronze yoke
#

yeah, if you wanted to be safe you could do:```lua
local item = ScriptManager.instance:getItem("Module.Item")
if item then
local tags = item:getTags()
if not tags:contains("MyNewTag") then
tags:add("MyNewTag")
end
end

iron siren
#

Does anyone know how or even if it is possible to trigger/activate a shader from Lua code? I have a mod that gives the player concussion, and I would really love to use the new drunkenness effect in the screen.frag shader.

crystal canyon
#

that sounds interesting

dull moss
#

anyone tinkered with repairing yet? I was decorating ISFixAction:perform() in b41 but it doesn't seem to be doing same thing it was in b41 as my code just doesn't fire on events it was firing before (aka any kind of repairs)

iron siren
# crystal canyon that sounds interesting

Thank you - it is quite imaginatively called "Rick's MLC Concussion". It also adds drunk effects (stagger and fall, and say random things) depending on the drunkenness moodle. Oh, and if you fall down while holding a firearm there is a chance to shoot yourself (or a nearby zombie if you are Lucky)

crystal canyon
#

hahaha that reminds me of the scientist in world war z... Slipping and offing himself

bronze yoke
elfin stump
brittle geyser
#

hey all, I think I have a B42 bug. I have a static item for hat head, but it seems to be randomly switching between backwards and forwards. Like you can see the backwards heads here

#

I want these to remain statically in the right direction, and they were correct in B41

#

even on the pause screen you can see them shift

random finch
#

lol thats creepy

brittle geyser
#

it kinda fits the creepy factor lol

random finch
clear wedge
#

is there a way to reload mod lua from in game now? I could reload the file from the error debugger but not sure how to do it with the debug menus. i have --debug on (b42)

bronze yoke
#

if you're in b42 the lua global instanceItem("Module.ItemType") is used instead

random finch
#

Interesting thanks you sir

dull moss
jade musk
#

Im trying to write a quick and dirty mod to increase the storage capacity of furniture, (with the help of Chatgpt). did the API change at all for the use of getcontainers), getCell ), or change at all?

random finch
#

ChatGPT sucks at Zomboid Kahlua

#

I am doing something similar but it requires you changing sprite properties since most containers are moveables such as lockers. You can run DoParam on ScriptItems such as backpacks.

vague marsh
#

considering they walk around a lot, they messed up their mascot😅

finite scroll
#

yall how do i decompile .pack files?

small topaz
#

Hi everyone! Did they change something about the items of the "drainbale" type? It seems to be the case that the command "item:getRemainingUses()" is not usable anymore (at least for me - I also cannot find the command anywhere in the vanilla lua code). Is there an equivalent of "getRemainingUses()" now?

random finch
finite scroll
#

ah, thanks

random finch
#

np

finite scroll
#

haven't had to mess with that side of modding much yet

random finch
#

got yuh, yah its a tool provided by TIS

finite scroll
#

yeah it's bunched in w the zomboid modding tools iirc

#

think i used it once before

random finch
#

I dont see an option for decompiling though

finite scroll
#

it's pack viewer

#

don't think you can fully decomp

#

but you can look at em at least

random finch
#

yup

bronze yoke
#

you can decompile them but i don't remember how

#

i haven't done it since around the time b41 last updated

#

it was in one of those tools though

winter bolt
finite scroll
#

ooh that's convenient

#

where's that option?

#

oh, probably extract images

winter bolt
#

yeah

finite scroll
#

thanks!

humble cosmos
#

Can anyone help me understand how the zombrand function works?

#

if ZombRand(5) == 0 then
local item = instanceItem("Base.Worm")
self.character:getInventory():AddItem(item);
sendAddItemToContainer(self.character:getInventory(), item);

#

so if the zombrand (5) == 1 instead of 0 is that somehow less likely?

#

from what I read it returns basically as 0 or 1

#

and I assumed that meant it was either 50/50 or maybe like 1 in 5?

bronze yoke
#

ZombRand(5) returns one of the numbers 0-4 with a roughly equal chance each

#

so ZombRand(5) == 0 means a 1 in 5 chance

ancient grail
bronze yoke
#

you can do things like ZombRand(4) == 0 to make it a 1 in 4 or ZombRand(5) <= 1 to make it a 2 in 5, etc

ancient grail
#

where did you get InstanceItem syntax?

#

is this new

bronze yoke
#

yes

#

InventoryItemFactory is not exposed in b42

#

instanceItem is the new equivalent

ancient grail
#

better?

humble cosmos
#

so a few people keep asking about my mod saying they're not getting enough clay when they dig, but the function is ZombRand(5) == 1

winter bolt
#

its easier to remember at least lol

humble cosmos
#

and I just don't know if I should have the value also at 0 because its an elseif after the getworm

bronze yoke
#

it doesn't really matter what number you check it against, it has a (roughly) equal chance of each

humble cosmos
#

I would think so! could be just people getting unlucky, but I wanted to make sure because even in my own testing it seemed kind of spotty

ancient grail
humble cosmos
#

but it maybe because if the worm rolls the clay doesn't roll

#

since its elseif right?

bronze yoke
#

yeah, that's right

#

so the actual effective chance is multiplied by the chance of not getting a worm

humble cosmos
#

so if I replace elseif with if

#

it doesn't exclude clay when the worm rolls?

bronze yoke
#

yeah

eager imp
#

its not anything but my modding experience is less than amateur so im kinda proud i got a set up to show an icon and steam thumbnail

humble cosmos
#
            local item = instanceItem("Base.Worm")
            self.character:getInventory():AddItem(item);
            sendAddItemToContainer(self.character:getInventory(), item);
        elseif ZombRand(5) == 1 then
            local item = instanceItem("Base.Clay")
            self.character:getInventory():AddItem(item);
            sendAddItemToContainer(self.character:getInventory(), item); ```
#

and it's not a problem that there are two ifs?

ancient grail
humble cosmos
#

I knew nothing about lua until a few nights ago and did this in one night

eager imp
#

thats cool as hell

humble cosmos
#

it was still preferable to foraging but

#

I see that some people are having worse luck

#

and want to fix that

#

the hardest part was learning how to upload haha

kindred grove
#

Trying to F11 and reload lua for ReducedWoodWeight75p41 but it's missing in the list despite working in the server.. How strange. Just wanted to change the values.

pulsar pagoda
#

hello im trying to modify pz sound files, i got the .bank file decompiled but i dont know where the script is getting the sounds from, because this looks like folders and the sounds are all .wav files

ancient grail
#

you could also just do

local toSpawn = {"item", "item2}

local item=[toSpawn[ZombRand(2)]

humble cosmos
#

At some point i'm going to figure out how to just call the original function with the edit so it doesn't interfere, currently i just have it patching the og code which from what I read can break other mods

#

but again my literacy is approximately 0 with regards to programming

ancient grail
ancient grail
finite scroll
#

it feels icky

ancient grail
#

also adds flexibility since you can just add as many items as you want

you just need to set the
ZombRand(1, #toSpawn+1)
spawn

bronze yoke
#

for this usage though i think it's overkill

humble cosmos
#

yeah I think I broke it by removing the elseif

pulsar pagoda
#

can anyone help me with this?

ancient grail
#

ye i guess just suggesting stuff for flexibility incase they decide to add more items

bronze yoke
pulsar pagoda
#

where is the script getting these folders? the bank file only has wav files

finite scroll
winter bolt
bronze yoke
pulsar pagoda
grizzled fulcrum
winter bolt
#

i dont think its possible?

pulsar pagoda
#

the .class files in fmod folder are unreadable

bronze yoke
#

lua 5.3 (or 5.4 maybe) introduces a sort-of-distinct integer type which i think is a signed long but we're on 5.1

winter bolt
#

ive not messed with sound stuff outside of replacing some sound banks

crystal canyon
finite scroll
#

i am absolutely baffled

#

i am distraught

bronze yoke
#

well, if we assume we're only going to have one numeric type, i guess a double makes sense

finite scroll
#

i need to write a strongly worded email to whatever organization is making the lua standards

silent zealot
#

LUA is not the language to use if you care about the exact type of your variables.

finite scroll
#

yeah i've been like majorly c-pilled

bronze yoke
#

i love c++, but nobody can get between me and lua

silent zealot
#

I suggest C for nightmarish brilliance like this: taking a float, using the bits as an integer, shifting bits and throwing in a magic number for good measure before trating it like a float again.

finite scroll
silent zealot
#

I prefer C++/C#, because strict typing will find a lot of my mistakes at compile time.

finite scroll
#

i just use c cuz i like being able to mess around with shit at low-level while still like being able to look at what's going on

#

like wtf is this shit

#

i have no idea how chris sawyer made rollercoaster tycoon in assembly

#

most impressive thing ever

silent zealot
#

Get into C# modding and start doing ILCode patches.

#

Like aseembly, but easier.

#

Speaking of which, is there any LUA equivalent for changing one line in the middle of a big function?

humble cosmos
#

I just went ahead and plut clay first and the worm as the elseif because I figure people don't give a shit about getting worms as much as they do clay. also made the zombrand (2) so I think it's now 33% chance for clay?

crystal canyon
#

create a c wrapper for lua that reads the code you wrote in c and make mods using c lmao

silent zealot
#

I'm working on a mod to allow you to store stuff in your underpants and it needs to either change the item type to container (which deletes all underpants from the world every time you enable/disable the mod) or I think I found the line I need to change to make underpants show up on the container list... but it's one line in the middle of a huge function.

humble cosmos
#

what's the reduction factor on those going to be

bronze yoke
#

there are a lot of fun hacks you can sometimes do but no straight up ways to do this

#

if it calls another function you can hook the function to mess with that function, call the original, and put it back afterwards

finite scroll
silent zealot
# bronze yoke no

I thought so, but was hoping I was wrong... I'm going to stare at the function really really hard and see if I am magically inspired with a way to do a pre/postfix patch.

crystal canyon
finite scroll
#

i swear

crystal canyon
#

I'm happy that although Zomboid runs in java, Modding is done in Lua. I HATE java XD

silent zealot
#

But if I can't, which do you think is more acceptable: "this mod will delete all underware (and contained items) from the world if you ever load a game after the mod is enabled/disabled (including any bugs that cause it to not work on load)" or "this mod may conflict with other mods that affect the inventory system"?

finite scroll
finite scroll
winter bolt
#

everything in lua being made out of tables is simultaneously really cool and really mind breaking

silent zealot
#

I think the function I'll edit is only used to change what items get shown as bags in the inventory window, so it probably won't conflict with much

crystal canyon
silent zealot
#

I deal with that rubbish at work, at least all I need to do is keep our over complicated tomcat cluister going and point to the devs when java is a problem

crystal canyon
#

I tried modding for Minecraft. Only managed to make some improvements to a japanese mod and abandon it after 1.6.4

quasi kernel
#

Odd request, but is anyone able to check my generator range mod and see if frames are tanking horrendously or if this one person is just having an odd issue in B42?

silent zealot
#

"there's an error in teh new build and because it is java it logs 37MB of stack trace every time it happens and now the hard drive is full" AAAAAAAAAAAAAAAAAAARGH

silent zealot
small topaz
#

does anyone knows something about the new structures about the TimedActions? I have a custom action allowing to shave beard stubble using a razor. Everything works so far but when the action is completed, the razor is still marked as green in the inventory. Instead it should only be green while the action is taking place. This worked for my code in B41 out of the box somehow and this is also the way it works for a lot of vanilla items. Anyone an idea what part in the code manages this green markings of items?

quasi kernel
silent zealot
#

It made the ground red

quasi kernel
#

I just wanna make sure, because this is literally the only report I've received in like a week.

silent zealot
#

Instead of the circle I remember

bronze yoke
#

you needed to do this in b41 too though

quasi kernel
#

Perfect then, not.. entirely sure why it's lagging them when it should be caching the data though?

silent zealot
#

I only used it briefly (too much time with modding, power is still on in my "real" playthrough)

bronze yoke
#

item:setJobDelta(0)

silent zealot
#

But I didn't see any performance drop.

crystal canyon
#

Im trying to get a hold of Monkey because I updated their nomad scenario and wanted to ask them if I could share it but hasnt responded on discord

bronze yoke
silent zealot
#

This is really nice.

#

Makes me feel like I helped code B42. 🙂

quasi kernel
#

My Better Batteries mod seems to have partially made its way into vanilla which makes me happy

#

The main purpose of it was to allow you to remove dead batteries from stuff like flashlights without it just deleting it

#

Then you could recharge it with a hand crank

silent zealot
#

Does the recharge still work? I'm fidning a lot of dead batteries.

#

I just picked up a box of 12 shiny new batteries, but once teh poiwer goes out and I need a torch for all exploration...

quasi kernel
#

I haven't ported it to B42 but someone else beat me to it anyways lol

#

No point in updating it at this point

crystal canyon
#

pwr your grow medicinal plants made it to the game too 😄

quasi kernel
iron siren
#

I like to think I had a small part in the new B42 - In the ISEatAction there is a comment saying eating with a spoon or fork will improve happiness and boredom, which is mosly what my Cutlery mod does... Mind you, I could not find any code that actually implements said improvement...

quasi kernel
silent zealot
#

I might go with my old plan of making a battery charger you can put batteries in to charge, which you woudl then use in your generator powered base.

quasi kernel
#

I wish magnet fishing or generator range was vnailla tho

small topaz
bronze yoke
#

and in perform?

crystal canyon
silent zealot
#

That looks like a scene from a horror movie.

#

The ground covered in blood.

crystal canyon
#

XD

rancid barn
#

so what needs updating so mods can be B42 compatible?

#

dunno what to change with my mod since its just a small VHS mod

crystal canyon
#

depends on the mod, some work right out of the box by just adding the 42 and common folders

quasi kernel
crystal canyon
#

just try it then see what the console throws at you

small topaz
crystal canyon
#

I have a few mods that havent updated working just by moving the folder. Woodcutting skill mod and Explorer trait being 2 of them

crystal canyon
#

also the OSRS xp bar mod. Im too impatient to wait

silent zealot
#

That is my Reddit post on how to try a super easy B42 conversion, no code changes.

crystal canyon
#

one I have to wait for Is fluffy hair sadly. It loads but has error with missing textures

silent zealot
#

Fluffy hair has an "fluffy hair aPI" doesn't it?

#

I have Spongies Hair and it works in B42 (without fluffy's hair API, which is not needed for the B42 version)

crystal canyon
#

spongies hair works great (waiting on them open jackets ;)) but I think Yakis hairs need fluffy

#

cant wait to see new tailoring with yakis clothes

tranquil reef
#

Is there a way to copy errors to clipboard

#

I'm assuming not

silent zealot
#

I use C:\Users\<username>\Zomboid\console.txt

#

Because I'm a terrible programmer who debugs by throwing print statements into the problem area 😂

random finch
#

(B41)
Anyone know why ContainerType doesn't show up in properties:getPropertyNames() for an item?

Nor does it pull a value although the sprite has a tiledef for ContainerType.
properties:Val("ContainerType")

pulsar pagoda
#

anyone know how to use my own mods in b42? files in zomboid/mods dont show up in b42 mod menu

crystal canyon
#

you need to change the folder structure

#

theres a pinned comment with the structure

pulsar pagoda
#

i dont mean updating a mod, i mean testing a mod

#

like putting it in the mods folder and it showing up in mods from the menu

crystal canyon
#

yeah, you still need to create some folders for 42 to load them

crystal canyon
#

oh right, Dr shared a reddit link with how to do it

pulsar pagoda
#

yes, but when i put any mod in the local mods folder, in zomboid/mods they dont show up

silent zealot
#

And the pinned comment has more detail

crystal canyon
#

its not updating, but 42 cannot read the files from the current folder structure

silent zealot
#

Are they formatted for B42?

pulsar pagoda
#

i literally took the files i uploaded to workshop and put it in mods folder and it doesnt show up

silent zealot
#

So C:\Users\User\Zomboid\mods\modename\42\ (or common) has the mod.info file and associated stuff?

crystal canyon
#

you need to change the folder structure...

#

like this

silent zealot
#

And in 42 or common, you have those same mod.info etc?

#

Because B42 won't read any files in the top directory, to allow for back compatibility with B41.

pulsar pagoda
#

aaah now it works

#

great, thanks for the help guys

crystal canyon
#

😛

pulsar pagoda
#

its weird because i already had 42 folder and stuff with another mod

#

but it just didnt wanna load

#

took the example mod and made the folders

#

and it showed up

silent zealot
#

It's a slightly confusing system due to legacy decisions (like not including any "for version X" in mod.info)

#

And the whole Workshop folder structure makes it more confusing because each workshop mod can have multiple zomboid mods

#

So you get lovely paths like this:

pulsar pagoda
#

im new to modding and its a little confusing, but fun

silent zealot
#

Zomboid is pretty unique when it comes to modding - you don't have the advantage of "it's a unity game, so I'll use my unity skills" or "it's an unreal engine game, so I'll use my unreal engine skills"

pulsar pagoda
#

it'll help with something tho im sure

#

reading lua or something

silent zealot
#

General skills will help

#

Definitely

#

But for things like the way to structure files in your mod, you'll learn the zomboid way... it's not hard, except for me never remembering when lua is meant to be in client vs. server.

#

Good part is the vanilla game has easily accessible files just like a mod, so you can see where original scripts/lua/etc are placed

pulsar pagoda
#

now i know where to go look for specific files and such

molten yew
#

If I knew how to code I would code the climb ladder b42 mod myself

worthy sparrow
pulsar pagoda
#

like zombies should be able to tear them down or something

#

or god forbid climb them

bronze yoke
#

it feels weird for them to add climbing ladders right after a massive sheet rope nerf

silent zealot
#

What happened to sheet ropes?

#

I've not needed to make an emergency escape in B42 yet

old ginkgo
pulsar pagoda
#

they said it couldnt be done!

silent zealot
bronze yoke
silent zealot
#

Good to know. And also accurate to my very limited experience trying to climb a rope.

crystal canyon
#

everything I know i have gained by looking at the code of other mods

pulsar pagoda
pulsar pagoda
silent zealot
#

There's a lot of scope for mods that don't need complicated lua.

pulsar pagoda
#

humble 1,748 Unique Visitors

654 Current Subscribers
(Public number)
42 Current Favorites
(Public number)

silent zealot
#

Something simple like "I want this weapon to have more durability and damage" is a good start

molten yew
silent zealot
#

I hate dealing with UI stuff in code, that's a good idea but probably overly ambitions for a first mod.

rancid barn
#

how do you cheat in specfic vhs tapes with the debug menu?

crystal canyon
#

little by little i'm adding unique traits for each of the professions. One of the coolest things I did was add a trait to the Priest profession named In God's Hands

Grants a new Pray action via the context menu.
Gradually reduces stress (0.002 per tick) and unhappiness (0.05 per tick).
Increases morale (0.001 per tick) and sanity (if applicable).

molten yew
silent zealot
#

Start with a gold bar and lots of money

crystal canyon
#

thats a great Idea! try to implement it to start messing with modding.

silent zealot
#

How about rich is a cheap negative trait, you get stressed if you don't have enough money/jewlery

crystal canyon
#

😮

#

I like it

#

I wouldnt call it rich though, maybe Vain?

silent zealot
#

Greedy?

silent zealot
#

Former Millionaire?

elfin stump
#

I think you are looking for the word 'Gaudy'

silent zealot
crystal canyon
#

hahahaha

#

gonna try that trait idea later. right now im training chatgpt to help me convert b41 recipes to b42

rancid barn
#

Mod is now updated!

pulsar pagoda
#

hey guys just so you know in the local mods folder you can only have one mod active at a time

#

at least thats my case

#

like b42 only loads one from the folder, no more

#

even if there are 2 perfectly fine mods in there

silent zealot
#

I have lots of local mods

crystal canyon
#

you need to move those 2 mods out and treat them as individual mods

silent zealot
#

Oh, you mean like how under workshop you can put multiple mods together? Yeah, seperate them if they are in mods.

finite scroll
#

mine's been working fine with it just in 42

pulsar pagoda
crystal canyon
#

I do it just in case, dont like it without it lmao

finite scroll
#

fair enuf

pulsar pagoda
#

all 3

finite scroll
#

maybe it has to be there for b41 compatability or sum

#

cuz i saw some people saying to do it

#

but i haven't had issues

crystal canyon
#

yeah, 41 does need those files there

finite scroll
#

ic

crystal canyon
#

b41 doesnt know anything of the new folders so needs the files in the old locations

silent zealot
finite scroll
#

so b41 can't read files from common then?

silent zealot
#

And 42.0, and 42.0.1.... so you can have different code for different patch versions if you want

#

Common then 42

#

B42 will use the more speciic file

#

So when it's build 42.8 the game will look in common, then 42, then 42.8 and if a file is in more than one of those use the one that best matches

#

Right now if you put the same file in common and 42 the 42 version will get used.

crystal canyon
#

with maps, it doesnt want to read from 42 and reads from common

#

strangely

silent zealot
#

Sounds like a bug

#

unless maps are special somehow

finite scroll
#

how do I make a recipe in b42? i presume the process is different to b41.

silent zealot
#

Look at the vanilla recipes

#

I don't know what changed, but copying one of those will give you the correct structure

finite scroll
#

that would make sense yeah

#

should've thought of that lol

silent zealot
#

Easy to forget the starting points when it's been years since you had to do things that way!

finite scroll
#

would I be correct in assuming that the OnCreate term is for an event that gets called on item creation?

crystal canyon
#

sounds like it

bronze yoke
#

yeah

heady ember
#

Hello! Is there a way to get access to full list of "flags" that you can use for items in craftRecipe?

silent zealot
#

like "tags = AnySurfaceCraft,"?

#

oh wait, flags[SharpnessCheck;IsNotDull],?

bronze yoke
silent zealot
#

real ugly way to get flags:

#

that's every line with flags from vanilla recipes, sorted and exact dupes removed (still lots of dupes from other differences on the line)

heady ember
crystal canyon
#

Bought food and snacks. ready for another long night coding

heady ember
bronze yoke
#

i was just posting it unrelatedly because i got it done, i didn't think it would even be in there 😅

zealous iris
#

with the addition of animals I assume modders could theoretically make their own custom creatures from it now?

silent zealot
#

Should be possible.

zealous iris
#

gimme da special infecteded

zealous iris
#

imagine this mf dragging you towards a horde or tanks that can break walls like a sledgehammer, the spitter would be neat too, making a surrounding floor damage you

unreal copper
#

hey, my vhs isnt showing up ingame. i dont know if theres an error i should show or what im doing wrong specifically. i got it formatted the way it should.

crystal canyon
#

I wish it told me what script failed

java.lang.RuntimeException: java.io.IOException: Script load errors. at GameWindow.mainThreadInit(GameWindow.java:705). Message: Unhandled java.lang.RuntimeException thrown by thread MainThread.
Stack trace:
    zombie.GameWindow.mainThreadInit(GameWindow.java:705)
    zombie.GameWindow.mainThread(GameWindow.java:599)
    java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Script load errors.
    zombie.scripting.ScriptManager.Load(ScriptManager.java:1566)
    zombie.GameWindow.initShared(GameWindow.java:156)
    zombie.GameWindow.init(GameWindow.java:1442)
    zombie.GameWindow.mainThreadInit(GameWindow.java:701)
    ... 2 more

LOG : General f:0, t:1734925900723> GameThread exited.

silent zealot
#

If you just added a script it's probably that one.

bronze yoke
#

Script load errors.

crystal canyon
#

well. yeah lol meant to say what part of the script failed. Is there a way to validate them?

bronze yoke
#

Stack trace:
There was a problem.

#

not really, we had an extension for it but obviously it doesn't work anymore

bronze yoke
#

IOException is weird because that usually has to do with actual file reading/writing and not parsing - i noticed all of the new script parsing code i saw threw plain Exception when it didn't like something

silent zealot
#

Exception in "mainThread" is the java equivilent of a "check engine" light that gives no hint as to which part of the engine you should check.

elfin stump
wheat blade
#

does the appearance of corpse dragging mechanics mean that it is now possible to make rig for items, and animate them in your hands? As an example, animated weapons, tools, etc 🤔

silent zealot
#

Shopping carts are what I want.

elfin stump
#

Zombie Ballroom Dance Competition Mod.

silent zealot
#

So when all the cars are dead I can be a hobo wth a shotgun walking down the street with my shopping cart of looted supplies, hoping the noisy wheels do not attract zombies.

elfin stump
#

I want a zombie sleigh and I want it now!

silent zealot
#

If a normal human is 60% water than I am 700% water.

crystal canyon
#

hahahaha