#mod_development

1 messages · Page 351 of 1

modest apex
#

This makes me so happy 🙂
This is the goal that finally got me off my lazy butt and into modding... being able to add abilities to the Spinning Wheel 🤣

#

Yes, I spawned one in a bathroom 😆 🤷‍♂️

frank elbow
#

Prime wheel spinning location

bright fog
#

Regarding a proper Hello World example, if you mean simply setting up a mod this is what my first video guide is about:
https://youtu.be/MUGQ647o5M4?si=qXtP2JAaJjsHyvyN
If you mean a Lua mod or specifically a script mod, I will make a video about it in the future but I'm the start of video guides rn
If you mean specifically something inside the wiki for that, yea that could be done too, but that'll have to wait for me to find time for it to do it too

You have to consider that there will be more in the future but that there wasn't even a single generalized documentation like that until I came along and shaped up the modding wiki to what it is rn at the start of this year. Before like you REALLY had no choice in term of learning than ask others or check inside existing mods on how they work

This guide goes in detail on setting up a basic mod to work on for Project Zomboid.

WIP: this is currently my first ever video guide for PZ modding and serves mostly as a concept currently. It's likely I'll rework this video in the future.

Relevant Wiki pages:
https://pzwiki.net/wiki/Mod_structure
https://pzwiki.net/wiki/Mod.info
https://pzwik...

▶ Play video
#

More will come but it's normal that the documentation is imperfect rn

#

Especially as I'm basically the only one writing Wiki pages rn

modest apex
#

I mean, rather than digging up a weapon, a simpler example could be used, just to get something/anything showing up in the mods...

This isn't as simple as "Hello World" (sorry, I'm busy writing mods now! 😆 ), but point being, rather than digging around in files and pulling up long weapon definitions. IDK.

module JimsUpholstery
{
craftRecipe RagsToThread (SpinningWheel)
{
timedAction = Sew,
Time = 3,
Tags = SpinningWheel;
category = Tailoring,
xpAward = Tailoring:5,
inputs
{
item 1 [Base.RippedSheets],
}
outputs
{
item 10 Base.Thread,
}
}
}

bright fog
modest apex
#

It's not lost on me that you're the only one working on the wiki and videos ... and thank you for doing it. Sorry if I started off on the wrong (grumpy) foot.

bright fog
#

Yea 😅
My problem with your early remarks was that it sounded a lot like "this is bad" without any explanation of what/why it's bad, which really doesn't help anyone here to improve things

modest apex
#

Yeah, that's on me and I'm sorry.

#

Late night assholery... sorry.

bright fog
#

Np happens to me too sometimes, thankfully I was in a good mood 😅

It's important to bring up what is wrong, and to not hesitate to say what works and what doesn't

#

You had mentioned that Mod structure is long to read and has a lot of information, but the page really is the most optimized that it has ever been, it went through different reshapes to improve things, to give information in a very concise way without removing any information

#

Tho of course it's not perfect

#

And in reality the page is really short compared to a lot of other pages out there imo

modest apex
#

I think a lot of that was probably me thrashing around cuz I was in the wrong Zomboid directory... going WTF??? I've got this the way they said????

bright fog
#

Something I was thinking about is making a sort of difficulty indicator to reading pages, so like "this page is: red (hard), orange (medium), easy (noob level)"

#

This could ease new modders going in and realizing they can't understand jackshit

bright fog
#

Usually this ends up as notes

modest apex
#

The moment I searched for the example mod and it didn't show up, it was a lightbulb ... "Oh... something's changed in the structure of things".

bright fog
#

Yeaaaaa

#

Video guides will tend to age badly, especially in B42 unstable where there's a lot of different changes that can happen to some systems

modest apex
#

Once I had my "Hello World" mod up, then it was happy times... cuz I wasn't trying to fix something, but rather "try something and see if it breaks".

bright fog
#

Even worse, there's constantly new information being discovered about some stuff, from me or from the modding community

modest apex
#

Yeah, you're dealing with a changing environment... very hard to keep "up to date"

bright fog
#

And I have to make pages about new stuff, pages to document various stuff that aren't documented yet

#

Like for example, if you look up entity scripts in the script files of the game, you'll see this is a massive rabbithole

modest apex
#

Yeah, cuz this is your full time job... right? Right?

bright fog
#

I'm trying to map it to properly document it but it's actual fucking hell

bright fog
# modest apex Yeah, cuz this is your full time job... right? Right?

Worst thing is that I'm slowly having less and less time to do all of this, the deeper I go in my thesis the less time I have to give to my passions like modding. Like the past month has been rouuuugh lol, I felt September was already really light in terms of modding wiki, but this one is going to have barely anything in it I feel like (tho I say that every month and realize I actually did a lot)

I make summaries every end of the month for the wiki about the modding wiki section, so that next one should be light

modest apex
#

And then you get some random asshole coming in and complaining about it all [looks around avoidantly]

bronze yoke
#

people do still stumble on mod structure a lot (but it's far less bad than before sim's work on the wiki), do you think a 'mod structure checklist' could help? it'd be an easy thing to point to for any issues and the full detailed explanations can be elsewhere

bright fog
#

Wdym by a checklist ?

willow tulip
bronze yoke
#

something like

Help! My mod won't show up

  • Mod is in the cache directory (NOT the game directory)
  • mod.info exists and has an id
  • mod.info is in the right place (b41: mymod/mod.info, b42: mymod/42/mod.info)
  • common folder exists
#

the full explanation is good, but a lot of people just assume they already know everything and don't read it and then complain to us when they're wrong

willow tulip
#

Pointing out a few of the common windows/linux case sensativity pitfalls would be nice too (Iv still randomly struggled with those)

bright fog
#

I did think about this, like I experimented with a page about "common mod problems", but I realized the page would be so fucking massive that it would be unreadable
But listing it in the pages of the unique subjects could maybe help yea

bright fog
#

Like I know one or two that's it

#

Maybe a checklist could work

#

I need freaking post-it on my desk, I have too many ideas here and there I feel like I'm going to forget half of those lol

frank elbow
#

Obsidian.md and Trello are two tools that have been very helpful for me to not have all the ideas just bouncing around in my head

bronze yoke
#

expect nearly everything to be case sensitive, the major exception is things that are checksummed (lua and scripts), that was fixed because otherwise it was basically impossible to play modded multiplayer on linux

bright fog
#

One thing I'm bad at, which is why a getting started page is really hard for me to properly make, is list every common things to do

modest apex
#

Mod is in the cache directory (NOT the game directory)
[link to what the "cache directory" is]

bright fog
# frank elbow Obsidian.md and Trello are two tools that have been very helpful for me to not h...

I do have Obsidian and while I think it's a great tool, I think it's not good, for me personally, to note things to do later

I had started to do that, as a replacement to me sending my to-do list inside the modding Discord wiki channel back then, to have a better tracking of things to do, but I haven't gone back to it in ages

One thing I do for my thesis however is use post-it, and that works really well for me, where I have post-it of ideas and things to do and I cross them when I'm done

bright fog
bronze yoke
#

honestly it would be good to leave some guidance somewhere to say treat EVERYTHING as case sensitive, because if it isn't, it doesn't matter either way, but if it is, it obviously causes major issues

frank elbow
bright fog
#

Proof with the horse project lmao

#

We haven't updated that shit in ages I think no ? @bronze yoke

frank elbow
#

Interesting, I find that easier to check personally

bright fog
#

Our new task tracking is now Github issues hahalol

modest apex
#

Yeah, Trello fan too... but any way that skins the cat... post its get it done just as well for small independent things.

bright fog
#

Post it does it better to me bcs writing it takes more effort on my side I'd say, since I don't write that often compared to typing on a computer that I do almost constantly everyday

frank elbow
#

That makes sense

#

I used to swear by physical writing and never do any digital notes

#

But I've given up my unc status for syncing

bright fog
#

I even have a tiny note book for my thesis that I try to carry around to write things in too, tho it's usually more temporary notes I'd say

bright fog
frank elbow
#

What are you studying, if you don't mind my asking & care to share?

bright fog
bronze yoke
#

i don't think trello was the issue with the horse mod's organisation, i think we were just quite poor at using it consistently

bright fog
#

Yea

frank elbow
bronze yoke
#

personally i'm more at home with github issues anyway, they make more sense for most code-related tracking which was all i needed to worry about

bright fog
frank elbow
#

I see, makes sense

frank elbow
#

My issues are proofread, my notes-to-self are “implement Thing in This Way no punctuation stream of thought you'll know what you meant by this later”

bronze yoke
frank elbow
#

I could never (even if the title alone is absolutely sufficient)

nocturne kiln
livid haven
#

do i want Base.Vest_Hunting_Khaki (item name) or Vest_Hunting_Khaki (clothing name) when giving an item to the player. ive tested

Base.TentGreen,Base.WalkieTalkie3,Base.Bag_HydrationBackpack_Camo, and these work. but not sure what path for the vest.

#

also Base.TentGreen is wrong as it gives an unpacked tent that takes up a ton of space. not a packed tent.

bronze yoke
#

you want the item name

livid haven
bronze yoke
#

yeah

livid haven
# bronze yoke yeah

i def need to mess with it more. i dont like how im using player:getInventory():AddItem("Base.Hatchet")

#

and such

livid haven
modest apex
#

😁
I already have a Portable Sewing Machine that can sew sheets from rags, but only when placed on a surface. It acts as a container, but not for liquids and thread for it can be spun at the spinning wheel. And I've got it up on the Workshop so that my crew can use it on our dedicated server in B42.

Still need to work on some sounds and 3d models, but we're away laughing already.

I'm over the moon here.
Thanks again for putting up with my shit and getting me started.
😁

livid haven
#

eg item:setCondition(2)

livid haven
willow tulip
livid haven
willow tulip
#

I don't see any 'giveItem' global function used in PZ, so no?

livid haven
willow tulip
#

giveitem != additem

#

See the API.

#

See what variables the API takes.

willow tulip
#

Do note there is like 10 different addItem(s)/AddItem(s) (yes some are capitilized because reasons)

icy night
#

That script puts a bunch of clothing inside of a suitcase and puts the suitcase in the players hand

bright fog
#

And improved the explanations a bit

livid haven
#

seems fine.

willow tulip
#

I meant to just replace the workshop version

#

workshop id: 3559765660

livid haven
willow tulip
#

But yea, test the towing, and offroading

#

and running over zombies... the vehicle mass is now dynamically scaled so ragdolls should work 'good enough'

#

New super smooth towing based on rolling friction/aerodynamic drag, with slight 'autosteer' of the towed vehicle

#

Oh, and offroad efficency now affects offroad rolling friction (and traction)

willow tulip
proven chasm
#

i give up

livid haven
willow tulip
#

thats weird, didn't change steering except for towed vehicles, do you have a trailer?

#

(shouldn't have affected trailers, but dunno)

#

is your power steering pump bad/fanbelt?

willow tulip
#

Hm should be fine

#

do you have a trailer attached?

livid haven
willow tulip
# livid haven

that looks pretty much how the game normally has bad understeer?

livid haven
willow tulip
#

I dunno how you'd accelerating offroad like that with the latest version though..

#

I think you copied the wrong zombie folder over or something

livid haven
willow tulip
#

wtf at 200

#

and yea, please don't mix with mods like that for beta testing lol

livid haven
willow tulip
#

wut?

livid haven
willow tulip
#

Anyway, just alter offroad rolling friction/plant impulse instead -_-;

#

and offroad traction if desired..

#

but try default values first

livid haven
willow tulip
#

and yea there is zombie impact impulses now too (adjustable in sandbox)

#

Can't wait for some car modders to put out some heavy duty trucks for it

#

like the W900 semi truck, but with 4000kg weight and 1000hp+ or something.

livid haven
# willow tulip and yea there is zombie impact impulses now too (adjustable in sandbox)
local function giveHatchetOnCreate(playerIndex, playerObj)

    local player = playerObj or getSpecificPlayer(playerIndex) or getPlayer()
    if not player then return end

    local inv = player:getInventory()
    if not inv then return end

    local item = inv:AddItem("Base.HandAxe")
    if not item then return end

    if item.setHeadCondition and item.setHandleCondition then
        local headMax   = item.getHeadConditionMax and item:getHeadConditionMax() or 10
        local handleMax = item.getHandleConditionMax and item:getHandleConditionMax() or 10
        item:setHeadCondition(math.floor(headMax * 0.80))
        item:setHandleCondition(math.floor(handleMax * 0.35))

        if item.getHeadCondition and item.getHandleCondition then
            local usable = math.min(item:getHeadCondition(), item:getHandleCondition())
            if item.setCondition then item:setCondition(usable) end
        end
    else
        if item.getConditionMax and item.setCondition then
            item:setCondition(math.floor(item:getConditionMax() * 0.50))
        end
    end
end

Events.OnCreatePlayer.Add(giveHatchetOnCreate)

hand axe fired item was given.

handle condition worked great.

head did not.

willow tulip
#

A: hooking wrong event, going to test every crafted item ever, if a lot of mods did this it would be horrible, override the recipes onCreate callback instead

#

B: Telltale signs of AI is checking for functions existing before they exist. if vital functions don't exist... Well, you have REALLY horrible problems, and checking if they don't exist is masking hallucinations the AI is having.

#

You would be honestly better off erroring due to functions not existing, because at least then you'd know they didn't exist.

bronze yoke
#

ai writes code that detects errors in advance and gives up before trying to do anything so that you don't get an error instead of writing code that actually works

willow tulip
#

instead of just.. some code silently not executing, or being randomly set to the value of '10' instead of the value you expected.

bronze yoke
#

it literally tries to 'fix errors' instead of any flawed logic

willow tulip
bronze yoke
#

protip: you can fix every bug in your entire codebase by starting every line with --

willow tulip
#

Even the first 2 lines are amazing dubious

#
local function giveHatchetOnCreate(playerIndex, playerObj)

    local player = playerObj or getSpecificPlayer(playerIndex) or getPlayer()
    if not player then return end
#

So its got a function.. that takes both the index AND player obj?

#

is that how that callback works?

#

Interestingly, it is how that callback works

#

however... Neat description on that event

livid haven
# bronze yoke it literally tries to 'fix errors' instead of any flawed logic

ive tried using getHeadCondition() / setHeadCondition

using my own code with https://demiurgequantified.github.io/ProjectZomboidJavaDocs/zombie/inventory/InventoryItem.html#getHeadCondition() as the referance.

but its not valid.

    local HandAxe = player:getInventory():AddItem("Base.HandAxe")

    if HandAxe then
        HandAxe:setHeadCondition(3)
        HandAxe:setHandleCondition(8)
    end
end)```
#

it should be valid

livid haven
#

been srewing with this for hours.

#

last resorts go burr.

bronze yoke
willow tulip
#

Oh, your adding things to a new player?

#

I thought you where overriding a crafting recipe for some reason

livid haven
willow tulip
#

Still, the first line:

#

local player = playerObj or getSpecificPlayer(playerIndex) or getPlayer()

#

... why not just.. playerObj?

#

surely thats valid, or would defeat the entire point of the function

livid haven
willow tulip
#

Yes

#

so whats your error in the console.txt?

bronze yoke
#

i see these kinds of nil checks even in human written code 😅

livid haven
#

wait two ints?

willow tulip
#

No

#

what is the error

#

in your console.txt

#

the stack trace

#

because, you have one

bronze yoke
#

it has a single int parameter called int0

willow tulip
#

and if you look at console.txt it will tell you that.

livid haven
willow tulip
#

Yes, on what line?

livid haven
willow tulip
#

...

#

On what line of your code... paste the actual line

livid haven
willow tulip
#

Are you sure?

#

And that its not... maybe the very next line?

livid haven
# willow tulip And that its not... maybe the very next line?

ERROR: General      f:0, t:1761869810232> ExceptionLogger.logException> Exception thrown
    java.lang.RuntimeException: Object tried to call nil in Add at KahluaUtil.fail(KahluaUtil.java:97).
    Stack trace:
        se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:97)
        se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:769)
        se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:166)
        se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1754)
        se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1582)
        se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:60)
        se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:131)
        zombie.Lua.Event.trigger(Event.java:62)
        zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:317)
        zombie.gameStates.GameLoadingState.exit(GameLoadingState.java:430)
        zombie.gameStates.GameStateMachine.update(GameStateMachine.java:70)
        zombie.GameWindow.logic(GameWindow.java:346)
        zombie.GameWindow.frameStep(GameWindow.java:790)
        zombie.GameWindow.mainThreadStep(GameWindow.java:552)
        zombie.MainThread.mainLoop(MainThread.java:68)
        java.base/java.lang.Thread.run(Unknown Source)
LOG  : General      f:0, t:1761869810232> -----------------------------------------```

```function: Add -- file: Oncreateplayer.LUA line # 6 | MOD: hatchettestb42

ERROR: General      f:0, t:1761869810232> ExceptionLogger.logException> Exception thrown
    java.lang.RuntimeException: Object tried to call nil in Add at KahluaUtil.fail(KahluaUtil.java:97).
    Stack trace:
        se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:97)
        se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:769)
        se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:166)
        se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1754)
        se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1582)
        se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:60)
        se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:131)
        zombie.Lua.Event.trigger(Event.java:62)
        zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:317)
        zombie.gameStates.GameLoadingState.exit(GameLoadingState.java:430)
        zombie.gameStates.GameStateMachine.update(GameStateMachine.java:70)
        zombie.GameWindow.logic(GameWindow.java:346)
        zombie.GameWindow.frameStep(GameWindow.java:790)
        zombie.GameWindow.mainThreadStep(GameWindow.java:552)
        zombie.MainThread.mainLoop(MainThread.java:68)
        java.base/java.lang.Thread.run(Unknown Source)
LOG  : General      f:0, t:1761869810232> -----------------------------------------```
#

both lines are wrong?

shy mantle
#

Have you guys ever experienced steam successfully updating your item, doing the whole review process thing and hiding the mod for a minute, but then just... not updating the mod page at all?

livid haven
willow tulip
# livid haven both lines are wrong?

Ok weird, im pretty sure it should only error on the 2nd line, on account of setHandleCondition not being a real function but an AI hallunication]

shy mantle
willow tulip
# livid haven both lines are wrong?

You also can't have it error on a line and then error again o nthe very next line, so now your looking at errors from multiple versions of the same script?

#

so your likely looking at the wrong line and/or error entirely

#

save your script file, restart zomboid, cause the error, look at zomboid log for the exact line

#

it will point out that I have wasted the past 5 minutes trying to explain to you why using AI code is bad because it hallucinate functions and then you wonder why they don't exist.

#

was trying to explain it in a way that would let you figure this out again in the future but...

#

now go check every function call the AI gave you against the actual API docs and stop using functions that don't exist.

bronze yoke
#

in most cases umbrella will also just tell you if a function you try to call doesn't exist

willow tulip
#

that'd be the real big brain move too

bronze yoke
#

ignore HandAxe being underlined, forgot to turn off nil check inspections

bronze yoke
shy mantle
#

Is there a thing where steam will block your updates (or review them longer) if you put out too many updates too quickly?

#

That's the only thing I can imagine, I'm shadow banned or some shit

bronze yoke
#

how many updates did you realise in what time period?

#

i wouldn't be shocked if there was something like that but i feel like it'd have to be really excessive

willow tulip
#

I mean iv done like 10+ updates of my description in an hour that each trigger that 'review' (for like 30~60 seconds)

shy mantle
#

Well, it was 3, but technically one was a revert for the other and the next was to fix that. The fourth is the one not going through and this was spread out from 12am to 8pm now (US EST)

willow tulip
#

My bugzapper mod description is now an excercise in 'how many forum links can I have in one mod description before steam worries?'

bronze yoke
#

oh no way, that's not spam at all

willow tulip
bronze yoke
#

when i was a baby modder i updated a particularly broken mod several times in like thirty minutes and it was fine

shy mantle
#

I hope steam is just down

#

I can only imagine the worst situation

willow tulip
drifting ore
#

It’s not brother

shy mantle
bronze yoke
willow tulip
#

"I only made the tinyest of changes! I don't need to test if they work!" - famious last words

bronze yoke
#

no matter how simple the change is, if it's 'one last thing before i upload', you somehow fucked it up for sure

willow tulip
#

yeep

bronze yoke
#

is this happening with More Car Features? it says it last updated about two hours ago for me

shy mantle
willow tulip
#

Not only will you have fucked it up but you'll have somehow bricked the entire game in the process lol.

shy mantle
#

EXACTLY

shy mantle
willow tulip
#

its never 'oh no, I screwed this up and this thing is 10% off'

shy mantle
#

The worst part about my situation is I think steam is so desynced that people have different versions of my mod rn lol

willow tulip
#

nah, its 'oh no, I screwed this thing up, and now this healing spell is instant kill and then erases your savegame'

willow tulip
bronze yoke
#

this just happens even if you do everything right

#

steam just sometimes doesn't feel like updating them

willow tulip
#

yea lol

#

validate files in steam, randomly re-downloads like 5 files from various mods, wtf?

shy mantle
#

I stopped after the 5th where I just put "STEAM PLEASE UPDATE THIS" in the patch notes lol

#

I'll look again tmrw

bronze yoke
#

that's why i always clearly mark mod version in-game, have some in-game pop warning about mismatched library versions, and when i fix a major bug i leave a comment telling people not to report it unless the mod has actually updated -- because otherwise people will have the wrong version inexplicably and report a bunch of stuff that isn't actually relevant anymore

livid haven
#

mmmm

    local HandAxe = player:getInventory():AddItem("Base.HandAxe")

    if HandAxe then
        HandAxe:setHeadCondition(5)
        HandAxe:setSharpness(5)    
    end
end)```

is error free. but does nothing. 

the same with just HandAxe:setHeadCondition


yet ```void
setHeadCondition(int int0)``` 

maybe 

```void
setHeadConditionFromCondition(InventoryItem item0)``` is a better option.
willow tulip
drifting ore
#

Ya lol

willow tulip
#

did you mean: setCondition, for the handle/main condition?

livid haven
#

not sure.

#

also not sure what i did to get that encumberance lol.

#

sticks weigh more ?

willow tulip
willow tulip
livid haven
willow tulip
livid haven
willow tulip
#

You could maybe try SpawnItem instead of AddItem? Dunno.

#

Something not quite right that it has 0 sharpness/head condition

#

does it have 0 if you don't try to set them?

willow tulip
drifting ore
#

It works for me, I did put sharpness above head condition though

willow tulip
#

Hu.

drifting ore
#
local HandAxe = player:getInventory():AddItem("Base.HandAxe")
        if HandAxe then
            HandAxe:setSharpness(5)
            HandAxe:setHeadCondition(5)
        end```
#

Not sure if that was a problem, in my brain it made sense

willow tulip
drifting ore
#

Yes

willow tulip
drifting ore
# livid haven mmmm

I do also check for the player at the start of the function but besides that and the other stuff I add for my mod, everything else should be the same

#

Sorry didn't mean to ping

livid haven
drifting ore
#
local function ReeferMadness_OnCreatePlayer(playerNum, player)
    if not player then return end
    local modData = player:getModData()
    if player:HasTrait("Stoner") and not modData.ReeferMadness_StonerSpawnItemsGiven then
        local HandAxe = player:getInventory():AddItem("Base.HandAxe")
        if HandAxe then
            HandAxe:setSharpness(5)
            HandAxe:setHeadCondition(5)
        end

        modData.ReeferMadness_StonerSpawnItemsGiven = true
    end
end
Events.OnCreatePlayer.Add(ReeferMadness_OnCreatePlayer)```
#

That is the whole function with the extra items I add for my mod removed, in case the other stuff would make a difference somehow

willow tulip
# livid haven

the fact even the mass is wrong makes me believe something has screwed up your handAxe item. try it with Katana or something?

#

(and make sure no other mods are loaded?)

#

like if the max sharpness/head condition was also 0...

#

it would always set to 0

drifting ore
#

Weird

willow tulip
#

Weird.... also still the weight

livid haven
drifting ore
#

Yeah I was gonna say, why tf is it so light

livid haven
#

pretty sure i messed up something i shouldnt have when i was digging through the files last night.

willow tulip
#

always a good idea

#

im 99.99% sure my mods have nothing to do with it, but doesn't hurt to do your tests before reinstalling java mods

livid haven
willow tulip
#

ah lol

livid haven
willow tulip
#

nice

livid haven
willow tulip
#

there we go

livid haven
willow tulip
#

lol

#

what we need: customizable melee weapons.

#

Screw addons for guns, I want lead weights for my crowbar.

#

and spikes.

#

Unironically this but melee:

livid haven
#

then again 1 handed crowbar would be pretty op

willow tulip
#

Crowbar fan attachment: -10% less endurance used to swing as it propells the crowbar (and cools you off with a nice breeze)

#

Oh yea, try towing a vehicle @livid haven with my mod :0

#

I think iv made it both realistic and terrifying (as towing another uncontrolled car with a rope should be)

#

I really need to have someone upload a youtube video of my realistic car physics vs normal or something..

livid haven
willow tulip
#

Nice

#

Incidentally, the new high rolling friction means some low HP vehicles (especially those with tons of weight) might end up stuck offroad, or vehicles with very poor tires

#

but somehow I feels thats fine too

#

(as opposed to vanilla, EVERYONE gets stuff offroad)

#

feel free to adjust plant impulse down too if your gonna do much offroading (its the slowdown thing when you run over trees and stuff)

#

Also made it so the towed vehicle now slightly turns towards you so it will follow directly behind if you drive in a reasonably straight line

#

Iv also removed the stupid bull where towed vehicles are magically super light (yet have a ton of drag)

silent zealot
# livid haven and mini crowbars.

That's easy to make in B42, now that you can tag the item as "crowbar, pliers, hammer" instead of everything being hardcoded to specific items only.

#

I don;t think there would be any way to adjust those tags based on attachmnets though, since (from memory) the tags just falls back to the item script rather than being saved with each item, and you can't override the various getTag functionsthat used by other java functions.

willow tulip
#

in that, as long as we are stuck in SP, we can actually do completely horrible things like changing the fabric of reality (item script definitions) to meet the needs of what the player is currently doing

#

ie: there is technically nothing wrong with adding a 'crowbar' definition to a 'gun with crowbar bayonet' or whatever your plan is so long as the player has one of said guns

#

though the other flip side of that, is recipes that depend on tags are cached on game load

#

so while changing the item script will satisify things using hasTag, it won't for recipes.

silent zealot
#

Yeah, that caching is a problem and I'm not sure there is any way to rebuild it.

#

The new recipe system has a lot of promise but is very lacking when it comes to mod interactions

willow tulip
#

yea if they could just move the cache till after initglobalmoddata

muted garnet
#

How can I add my tile to my custom entity? How can I set default flags for my tile, for example, making it a door or setting hasDurability = false?

bright fog
#

It's likely I'l mistaken

#

I would ask in the mapping Discord linked in the pinned messages of #mapping

muted garnet
livid haven
#

@bronze yokehow do i correctly give a packaged tent? Base.TentBlue gives the unpacked tent. and ive had some real trouble working out how the game handles items with different states.

livid haven
drifting ore
#

Are you running in debug mode? The "items list viewer" (item spawner) shows the types of all the items, their display names, a lot of useful info

livid haven
#

that and the wiki.

#

i just mentioned this in that channel.

drifting ore
livid haven
drifting ore
#

So you can launch in debug with no mods?

livid haven
drifting ore
#

Ah yeah, I don't actually play the game anymore so I only ever have the mods I'm working on installed/enabled lol

muted garnet
# bright fog Yes you need a pack file

Yes, I added a .pack file, but as far as I understand, it also needs .tiles and .tiles.txt files to work, right? If so, could you please tell me how to create them correctly?

shy mantle
#

@bronze yoke Just wanted to let you know that I think that reverting an update using steam's button breaks updates. I had to revert it a second time and THEN update it for it to work again.

bronze yoke
#

i seeee, i've never used that

#

but i'm glad it sounds like you've got it sorted out now

shy mantle
#

Also as a side note, during that entire time, my mod was not on the workshop page, even though people with the link or the mod already installed could still visit it.

#

Such a weird situation

#

Never using that button again

drifting ore
#

has anyone used this before?

isPlayerAllowedOnSquare(IsoPlayer player, IsoGridSquare sq)

I'm trying to add some sort of fix to harvest action where if it's a safehouse player does not belong to, then the action is blocked

willow tulip
placid tulip
#

huh?

willow tulip
# placid tulip huh?

Never tested, but I suspect it shows similar in B41 if your mods min version is set to B42?

#

Before I just had my mod set to requires=\Build42

#

but someone was like 'omg you can't do that, use minversion instead!'

#

Now im wondering if that bug has existed since B41 and its actually clearer to do 'require=\Build42'

willow tulip
#

... Doh!

bronze yoke
#

it won't show anything in b41, b41 can't find b42's mod.info

willow tulip
#

@placid tulip Sorry. misping.

willow tulip
#

just because I got tired of B41 users going 'I subscribed to your mod but can't find it, help its broken'

#

(generally with no mention of what version they are on)

bronze yoke
#

that message was added in b42

#

it probably doesn't show anything interesting in b41 but idk

willow tulip
#

meh i'll go check myself...

#

Nope, People are just... really.. thicc.

#

Im not sure how I could make this any clearer except maybe coding in some kind of jumpscare sound effect when they click it that screams it at them?

topaz tangle
#

i havent had comments or anything about it yet, but seeing people add my mod into collections labled "b41" makes me so upset

frank elbow
# willow tulip

Have you considered changing the title on the workshop to “[B42] Project [B42] Summer [B42] Car [B42] for B42”?

knotty stone
willow tulip
frank elbow
#

Maybe throw a couple hundred [h1]B42 ONLY. THIS IS ONLY FOR B42.[/h1] in there

willow tulip
nova ridge
#

Boy got that zomboid 2 action

shell holly
#

hi guys. Do you have a doc for link vscode & pz functions ?

shell holly
#

I would like VS Code to recognize the game's functions

shell holly
icy night
#

Hi all, does anyone know how to create a proper explosion? Like the type that makes ragdoll zombies go flying. I thought IsoFireManager.explode() might but it just creates a square of fire.

#

Would I have to spawn a pipe bomb or something

willow tulip
icy night
#

unfortunately I havent seen any mods that do it via pipe bombs

#

so idek

willow tulip
#

I meant maybe see what the code behind it exploding is

elder tree
#

I think I hate curbs

fringe pasture
#

how u make mods

topaz tangle
#

Depends on what kind

topaz tangle
oblique star
#

out of curiosity, noone has made a mod to put in a clothing/hoodie add on for the pz makeship hoodie yet right?

#

i didn't see anything specific in the workshop for it, so i figured it either hasn't been made yet or it's in a clothing pack somewhere

elder tree
#

anyone know why my windows look like this (in reference to that strange top bit)

bright fog
#

Access the container, access its current distri table. I think you should be able to do something like that

#

@willow tulip

willow tulip
#

Im not seeing a function to get a containers distro table?

bright fog
#

Ah

#

I'd have to check it out but I can't rn

willow tulip
#

np

bright fog
willow tulip
bright fog
#

I'd be surprised if the distri table isn't stored somewhere. Unless the loot respawn doesn't always spawn the same distri table

willow tulip
#

Ok but I don't need to do it right now

bright fog
willow tulip
#

im just saying, passing that to onCreate or whatever would be magical

#

onCreate already exists, it just doesn't get any cool parameters about why the item was created.

bright fog
willow tulip
#

shrugs

#

almost 2am. need sleep. cya

bright fog
#

Gn

frank elbow
icy night
#

Can someone tell me what I'm doing wrong here: ```local function hasLastLaughTrait()
local player = getPlayer()
if not player then
return
end

local modData = player:getModData()
modData.hasLastLaugh = player:HasTrait("LastLaugh")
end

Events.OnPostMapLoad.Add(hasLastLaughTrait)
#

The goal is simply to register if the player, upon creation has the trait LastLaugh. That way, I can call upon it in a secondary function that triggers an explosion OnPlayerDeath (since onplayerdeath seems to not be able to check traits)

#

but the problem is modData.hasLastLaugh always returns false

bright fog
#

Maybe use a different event

#

Also did you make sure that your code actually reaches the point of checking the traits ?

#

Add a print in this code to test things out

icy night
#

I tried OnCreatePlayer too. And many others that load after the player has been created and the prints show it has checked traits but then always registers that the player doesnt have the trait

icy night
bright fog
icy night
#

ok, stupid me. I figured it out

#

In the code I was using, hasTrait wasnt capitalized tired

#

I went with OnGameStart event and now everythign works

modern flare
#

Hey guys! Is the anyone who comissioned some vehicles from ki5?

nova knot
#

Does anyone know if you can control a bot on a server without actually loading the game? So, just the server would be running and the bot could interact with the game

slow thunder
#

what do all you think of my hot lap mod?

#

records players lap times around the races tracks in knoxx, well functioning Redstone Raceway currently

#

need to work on the ui icon

nova knot
wicked ruin
#

Hi dudes. Does anyone know how to properly upload soundtracks to the ".bank" format so that they work properly and replace the vanilla music?
If anyone knows, please write to me. I would be happy to hear any ideas from those who have already done similar work)

bright fog
bright fog
#

A majority of actions require UI interactions

#

So you'd have to somehow manage to make the game work without a UI and add some interface to replace all the UI interactions with proper Lua scripts

#

There's a project of people that worked an AI agent

spring geyser
#

Is this game mostly made using 3D modeling?

#

I asked if the house was built using a 2.5D sprite sheet because I noticed it was partially obscured.

nova knot
# bright fog https://pzwiki.net/wiki/PZ_AI_agent

damn, this isn't quite what I was looking for. I wanted to train an rl agent using PZ as the environment, but I need it to run headless and in parallel. I don't imagine I could mod the game to run headlessly either. thanks anyways though, saved me a bunch of time

wicked ruin
wicked ruin
wicked ruin
# bright fog Maybe a bank file viewer then ?

I have already used the fmod extractor to look at the packaging code. He skips sorting through folders and unpacks all the soundtracks completely. the txt file with the supporting information seems to dissolve into it... (all scripts and renames should be written in it). In the same way, for the sake of the test, I unpacked the folder of original music and packed it back in the form it was given. as a result, she did not earn. The bank file is a source of both problems and solutions)

bright fog
#

But did you straight up extract or used an app to view the content ?

#

Bcs that app in the comment link I shared allows you to view the content without extracting

wicked ruin
wicked ruin
bright fog
#

Yea check what I sent, maybe that could do it ?

earnest remnant
#

Is anyone ever mentioned or contemplated a mod to introduce basic automation? There is real life and the lore justification for basic Ethernet or phone line. You could essentially create a system similar to Redstone or it can be more complex since technically in phone wire there's four wires in an basic ethernet there's eight you could do basic message passing or you could utilize the various channels (cables) to essentially maintain state or use it for sending timers or ticks or things. For the automation part I think that it would be relatively straightforward to essentially create things like buttons, pressure plates, switches, etc that are programmable to set a specific wire or to send a pulse or things like that. The ideas are on my head and in the basic programming is in my head but I don't have the time because I have kids, and a job, And I always get stopped at the very beginning where I'm trying to scope it out and I weigh overscope things.

bright fog
#

Definitely doable

bright fog
wicked ruin
earnest remnant
#

I'm up for collaboration the idea if anyone wants to be the primary brainchild. Life's too busy for me to have hobbies

willow tulip
#

we're missing everything that might be an input or output.

bright fog
#

I guess yea

#

In terms of resources for sure

willow tulip
#

Like, we need traps, power doors, remote controllable lights.. maybe some kinda crafting factory system, dunno

bright fog
#

So if you wanted to make such a mod, like factory like stuff, you'd have to basic make multiple submods to implement resources to actually automate, for example ores, tree farming

willow tulip
#

As a canadian, the lack of warcrime level traps annoys the hell outta me.

#

Wheres the giant spinny blade thingys from 7d2d?!?

#

or electrozap traps

small osprey
bright fog
#

Tiles are 2D, and they a depth map which is used for pseudo 3D

earnest remnant
#

There is the factory parts mods, automated doors has a precedent and wouldn't be difficult as it's just a matter of "receive a signal, trigger door open", traps are little more nuanced but I have seen some psuedo traps such as a spike trap mod and a mod that makes barracades hurt zeds

willow tulip
#

we don't even have landmines!

#

prox pipebombs are about best we can do -_-

earnest remnant
#

My thought is if the framework existed that have the transport, other folks could build the end points

bronze yoke
bright fog
#

Like the key for the distribution table to easily access the loot which can spawn in a container

bronze yoke
#

unfortunately so do i 😅

bright fog
#

💀

#

So loot respawn rerolls the container type being used basically ?

bronze yoke
#

yeah

bright fog
#

When they spawn loot they pick one of the distribution and just rolls for loot and then ditch it

#

I guess that makes sense, so you can't just have full medicine containers in the military containers and be stuck with it forever

earnest remnant
#

Just to put it out there if anyone decides they like the idea. For speed I organized my thiughts with Gemini I to a concept/design doc for a connectivity framework that could open up some possibilities for automations and inter-device communication.

Use it or don't, just want to punt it out there so it's no longer in my head!

bright fog
# earnest remnant Just to put it out there if anyone decides they like the idea. For speed I organ...

I might be interested in making an electronic mod tbf, a mix of UI and object connections. My main problem is making anything which is tiles and art, but I've got some ideas for an interactive electronic system, where players can cable things together in a workshop UI. If there's actually a sort of internet thing being implemented, of having an interface to view their connected devices, and maybe customize their interactions

#

That sounds fun to code in

bronze yoke
#

i've been working on something sort of like this, i don't think it'll meet your specifications exactly though

bright fog
#

My idea is more towards electronic tho, not electrical wiring and machines

bronze yoke
#

the basic concept of my mod is to rework power generation and consumption to require wiring between devices

bright fog
#

Yea so it could live outside of my mod concept easily, or even have direct compatibility in a way

bronze yoke
#

originally i wasn't planning to include signals and just consider adding them later, but i've come to realise that power is basically just a signal anyway and trying to leave support for them later would require me to redo most of the work

earnest remnant
#

Just glad it seems something even remotely like it is on someone else's mind lol. Y'all the real MVPs. I'll actually contribute once I don't have so many kids under 5 lol

willow tulip
#

Yay, I have now completely fixed running over zombies randomly sending your car outta control with excessive impulses

#

(the impulses had no cooldown and would get triggered between 1~5 times over several 10mS physics timesteps when you ran over a zombie)

bright fog
#

👀

willow tulip
#

Also the issue with animals was they had a corpsesize as big as a car.

#

And the collision code took offense to that.

bright fog
#

uh wdym ?

willow tulip
#
The Indie Stone Forums

Version: 42.11.0 Mode: Singleplayer Mods: None Reproduction steps: Run over deer. A debug spawned whitetail buck was used for this test. Then run it over. Then try to place the tire directly over the body at slow speed and this happens: It has uh... a forcefield... that violently ejects your car ...

#

Running over a deer at 10mph

#

Yep, thats definately what is supposed to happen when running over an animal at low speed.

#

... My bug zapper mod has run out of room in its description for all the bugs it fixes. sigh

willow tulip
bronze yoke
#

a steam guide isn't scoped to a mod

bright fog
willow tulip
bright fog
#

I'm talking actual workshop page discussion, not Steam discussion

bright fog
bronze yoke
willow tulip
#

Ahh k

#

is there a post length limit?

bronze yoke
#

i think there is a length limit so if you're really anxious you can reserve a couple posts

willow tulip
#

yea iv literally run outta character limit for my steam description is the issue :p

bright fog
bronze yoke
#

if you lock the discussion (maybe creating another one for comments if you want) then you can just keep adding posts as long as you want

bright fog
bronze yoke
#

you can pin anything you want

bright fog
#

I mean if you pin, but lock, it won't pin

#

I'll test

bronze yoke
#

pretty sure you can pin locked threads

#

i'm pretty sure i did that with starlit before i moved to sphinx

bright fog
#

But I remember having to reserve posts bcs there was a specific limitation that didn't allow me to lock properly

#

Yup

#

That's the problem

#

This works

#

But then if I lock

#

Doesn't appear anymore

bronze yoke
#

weird

bright fog
#

Bcs when you "lock" it means you "close" the thread

bronze yoke
#

well, worst case you can just delete people's comments

bright fog
#

Yea tho if he doesn't do that constantly, he'll be fucked

willow tulip
#

Yea I think I'll just make a guide and link it to huge print/image

#

like 36pt "CLICK HERE FOR BUGFIX LIST WITH FORUM REPORTS" and just reduce the description to a simpler list of important bugs fixed with no citation links/etc.

bright fog
#

You can do even better

#

some things I have done is this

willow tulip
bright fog
#

But you could even take a screenshot of a Steam guide embed in other Steam things like comments, which nicely embeds it

#

Let me find an example of that

bronze yoke
#

ah, you already use a guide for your mod anyway

willow tulip
bronze yoke
#

i'd consider hosting a wiki at a certain point

#

you can do it easily on github and you'll have far more control of presentation

bright fog
#

If you paste a guide in a discussion, you get a nice embed

#

You can take a screenshot of that, and use it for your own stuff

#

I think I have an example of that wait

willow tulip
#

Nice

#

what does .bank files let you do that the sound scripts don't btw?

bright fog
#

Adaptative sound in a way

#

Firearm sounds changing based on if you're inside or outside

#

Automatic sound volume based on conditions (zooming in/out decreasing volume)

willow tulip
#

is that the tiny soundparameter java class stuff littered throughout the codebase?

bronze yoke
#

yeah

willow tulip
#

@bright fog So the issue is, the vanilla game won't load arbitary soundbank files?

bright fog
#

Basically

bronze yoke
#

there has never been any modding support for them whatsoever

bright fog
#

You need to manually install it AND you need to replace the whole .bank file which holds every single sound in the game

willow tulip
bright fog
#

Same for game musics with another bank file

bronze yoke
#

fmod is a sound engine that takes in events and parameters from the game and then internally decides what audio to play, effects to put on it etc

bright fog
#

Any mod which modifies the same bank file (aka the only bank file that matters) will be incompatible by default

willow tulip
#

If devs would just open up.. loading .banks from your mod folder...

bronze yoke
#

we don't have a way of sending those events or changing those parameters from lua

willow tulip
#

and ideally had some kinda override system

willow tulip
bronze yoke
#

except sound emitters' playSound methods, which just trigger an fmod event with no parameters

bright fog
#

I have mentioned them adding fmod support as a suggestion, in fact I believe it was one of my first suggstion in #1318920979581501502

bronze yoke
#

so it would only really allow a couple very limited things the vanilla sounds already do

willow tulip
#

new gunshot sounds

#

etc.

bright fog
#

Actually nah that was somewhere else I think

bronze yoke
#

engine sounds are the only thing i've seen proof actually need it

willow tulip
#

I feel like for the amount of work needed by TIS (load banks found in mod folders), it would be worth it to support that amount of it.

bronze yoke
#

i don't remember what the thing with zombie sounds was, sim knows about it though

bright fog
#

Lots of things

#

If you don't use FMOD, you need to manually control and time the zombie sounds

#

And adjust volume

willow tulip
#

the whole soundparameter thing might be more work then its worth ATM, but at least let us have the most basic of 'add a .bank file' support.

bright fog
#

And sound won't adapt to inside outside, so no inside effect for sounds

#

You need to calculate the zoom level to adjust volume

#

I went with a manual control of sounds in my Zomboid Forge rework for B42

#

Tho I only realized recently that sounds volume change based on zoom level, so uh that's not a thing rn

bronze yoke
#

i see, so zombie sounds just don't use events? they're triggered entirely within fmod?

bright fog
#

and it probably never will since I no longer works on that

bright fog
#

Actions in the game ? They kind of do, like hit reaction and shit like that

#

Unless you mean something else

willow tulip
#

I'll support it for what its worth.

bright fog
willow tulip
#

(God I hate the vanilla engine sounds after 1000 hours of listening to them)

bronze yoke
#

it's been requested several times already

#

they have a thread for modder requests and it's about as active as the discord one

willow tulip
bronze yoke
# bright fog Wdym by events ?

like lua events, FMOD events are just saying 'a thing happened, do something' and FMOD uses that information to work out which sound to play what effects to apply etc -- most sound triggers are just an event

bright fog
#

Tho I'm really not familiar at all with how any of it works internally

bronze yoke
#

footsteps should be events yeah, i wonder if their idle groans are though

#

it would make more sense for fmod to handle those

bright fog
#

They make different sounds based on agro or idle

#

Maybe when they get close to the player too idk

bronze yoke
#

basically not all sounds have to be manually triggered by java code

bright fog
#

Hit reaction triggers specific sounds

#

Or I mean, a set type of sound for zombies

bronze yoke
#

music for example is controlled entirely by fmod, the game just provides context about what's going on in the game and fmod decides what music to play

bright fog
#

They also have 6 sound types, male and female and A B C

bronze yoke
#

the game might just say 'there is a zombie here, it has sound type male A' and fmod periodically plays sounds whenever it wants rather than on a timer sending events in the java or something

#

basically just rationalising why it doesn't go through sound scripts, that's the only way i can imagine why

bright fog
#

There are sound scripts for zombies

bronze yoke
#

but they don't work fully right?

bright fog
#

Never understood how they work tbh

#

I know I've seen examples of replacing the zombie sounds by changing the scripts

#

But the control is basically zero

willow tulip
#

I never got too deep into fmod during my time using it -_-

bright fog
#

And the sounds I believe just get constantly spammed

#

And you can't change A B C type in the sound scripts if I remember right

bronze yoke
#

ahhh, that would do it actually

#

fmod would use one event for all sound types and pass the sound type as a parameter

small osprey
#

1/ Heya Sim 🐕 and also @bronze yoke both whose opinion about good APIs I value. Related to the past feedback and due to my own need to "manifest stuff in the world" I am close to start implementing something.

Given that

The modder wants to change or create something in the world.
They know exactly what they want to change/create and have the code for it.
They either know exactly where/when in the game that should happen or they are flexible and may indeed wish to set dynamic rules.
Problem They cannot change/create it yet because the world isn't ready (chunk load or any other condition, world-time etc. ..)
Vision So they ask a system that tracks their wishes and fulfills them when and where the world is ready for them.

#

2/

Solution (pre-implement)

Single world change at precise location, when location is ready

local PromiseKeeper = require("PromiseKeeper")

--- User provided function to serve as fulfiller: called once per roomDef
---@param roomDef RoomDef
---@param meta { id:string, fulfiller:string, tag:string|nil }
function LabScene.makeForRoomDef(roomDef, meta)
  -- build with SceneBuilder ...
end

PromiseKeeper.registerFulfiller("destroyed_lab_scene", LabScene.makeForRoomDef, "Scene")

---@type RoomDef
local LabRoomDef = MyFinder.pickRoomForLab()  -- your own resolver
-- or local LabRoomDef = getCell():getGridSquare(10677, 9783, 0) -- example coords

PromiseKeeper.ensureAt({
  id        = "intro-destroyed-lab-A",
  fulfiller = "destroyed_lab_scene",
  target    = LabRoomDef,
})
#

3/

Permanent promise that affects all chunks

local PromiseKeeper = require("PromiseKeeper")

--- User provided function to serve as fulfiller: called once per roomDef
function KitchenScene.makeForRoomDef(roomDef, meta)
  -- build with SceneBuilder ...
end

PromiseKeeper.registerFulfiller("kitchen_oddity_scene", KitchenScene.makeForRoomDef, "Scene")

-- Matcher: receives both chunkCtx and optional matchParam table
local function matchKitchens(chunkCtx, matchParam)
  local results = {}
  local chance = (matchParam and matchParam.chance) or 1.0

  for _, roomDef in pairs(chunkCtx.roomDefs) do
    if roomDef:getName() == "kitchen" and ZombRandFloat(0.0, 1.0) < chance then
      local key = tostring(roomDef:getID())  -- stable keys avoid double-spawning
      results[#results+1] = { type = "roomDef", key = key, ref = roomDef }
    end
  end
  return results
end

-- PromiseKeeper ensures these scenes exist as often as requested
PromiseKeeper.ensureMatchingForChunk({
  id          = "global-kitchen-oddities",
  fulfiller   = "kitchen_oddity_scene",
  matchFn     = matchKitchens,
  matchParams = { chance = 0.2},  -- every 5th kitchen
  maxFulfillments = 999999        -- GLOBAL cap to this promise ID. For "permanent promises" set > total chunks on the map
})
#

4/

Questions 🙂

  1. Do you know if something like this already exists? I tried and researched but found nothing that came close enough in my book
  2. Do you think its a good idea? "meh"? 😄
  3. I have an implementation plan but I won't bore you with details, suffice to say I think I'll use starlit events for the first time under the hood. In case there is any other advise I'd be glad to hear

🫶 Thank you for the attention and the screen-space.

#

p.s.: I would love to not need to register fulfiller functions but pass them directly, however promises and who filfills them need to be persisted in modData so I guess string is safer. Now that I say that I think I also need to do that for the matchFn 🫠

shy mantle
#

Found this cool bug where if a vehicle is facing ~perfectly~ NW, NE, SW, SE you cannot use the V radial menu from a distance without using combat stance (or a controller I'm assuming). getNearVehicle fails to find the vehicle at those specific angles for whatever reason. Discovered it while testing climbable vehicles, just thought I'd bring it up here if anyone else was having issue idk

shy mantle
#

Yeah I will in a bit, it's very easy to replicate so it should be a quick bug fix (if they see it)

shell holly
#

Hi, I have a general question. In my mod, I want to spawn objects on the map. I understand the logic of chunks, squares, etc., but i have questions.
**I'm thinking about these steps : **

  1. I create my objects in a ModData table (server)
  2. Every time a player moves (Events.OnPlayerMove), I check if the object is in the chunk (client -> server)
  3. I force the creation of the object on the server side (server)

My question is: do I need to synchronize something with the client, and if so, what? How?
To be clear, I'm looking for multiplayer compatibility on B41.

Thank you very much in advance.

muted garnet
#

Could you please explain what exactly each of these files is used for and how to use them correctly?

seams, seating, spriteModels, tileDepthTextureAssignments, tileGeometry

And could you also please tell me how to add 2x tiles, like in vanilla — tiles and tiles2x?

bronze yoke
#

1x sprites are no longer used in build 42, your sprites are almost definitely already 2x

shy mantle
#

Discord's time stamps had me confused, forgot today was the end of daylight saving.

#

Anyways, is there a proper way to just play an animation without doing anything else, just the character doing the animation.

#

I tried PlayAnim, but literally nothing happened

bronze yoke
#

yeah not really, any API like that is ancient from before the game was even 3d

#

animations are basically controlled by xml animation scripts

#

there's a state machine that transitions between animation nodes based on the parameters set in those animation scripts

#

i think the easiest way to just play an animation is to copy how emotes work but i don't really know the details of that

silent zealot
#

That means if you were fast enough you might have the tile on screen when the stuff spawns, but in practical terms you'd have to time it really well and make a deliberate effort to do so. Would be different if the mod was spawning things on the highway so you could just drive up to them easily.

muted garnet
#

If I understood correctly, I need to modify the tileset and tileGeometry files, right?:

tileGeometry
{
    VERSION = 2,

    tileset
    {
        name = uo_tiles,

        /* uo_tiles_2 */
        tile
        {
            xy = 2x2,

            box
            {
                translate = -4684x0x262,
                rotate = 0x0x0,
                min = -315x0x-5262,
                max = 315x24494x5262,
            }

            properties
            {
                OpaquePixelsOnly = true,
            }
        }

        /* uo_tiles_3 */
        tile
        {
            xy = 3x2,

            box
            {
                translate = 234x0x-4682,
                rotate = 0x0x0,
                min = -5235x0x-317,
                max = 5235x24494x317,
            }

            properties
            {
                OpaquePixelsOnly = true,
            }
        }
    }
}
#
version = 1
tileset
{
    file = uo_tiles
    size = 8,16
    id = 1
    // uo_tiles_0
    tile
    {
        xy = 0,0
        BlocksPlacement =
        MaterialType = Metal_Large
        alwaysDraw =
        attachedFloor =
        solid =
    }
    // uo_tiles_1
    tile
    {
        xy = 0,0
        BlocksPlacement =
        MaterialType = Metal_Large
        alwaysDraw =
        attachedFloor =
        solid =
    }
    // uo_tiles_2
    tile
    {
        xy = 2,2
        CanScrap =
        Material = MetalBars
        MaterialType = Metal_Light
        SpearOnlyAttackThrough =
        WallWTrans =
        makeWindowInvincible =
        wall =
    }
    // uo_tiles_3
    tile
    {
        xy = 3,2
        CanScrap =
        Material = MetalBars
        MaterialType = Metal_Light
        SpearOnlyAttackThrough =
        WallNTrans =
        makeWindowInvincible =
        wall =
    }
}
cursive veldt
#

I need more practice

knotty stone
bright fog
#

You're using the lighting debug option right ?

knotty stone
#

isWearingNightVisionGoggles()

#

its the only thing i found 😄

#

was going to enable nv for my b42 brita googles, so i had to dig around

bright fog
#

I mean that's probably why modders don't use it then

#

I think @sour island might know more since he worked on a nightvision framework

knotty stone
#

maybe some more noise or grain

bright fog
#

Nice

#

Is the red light supposed to be a red laser ?

knotty stone
#

the red light is from escape from kentucky(not working in their mod atm, fixed that myself), its a supposed to be a thermal sight

bright fog
knotty stone
#

only problem iam stuck with is that the context menu is not rly working with the overlay, the mouse is not registering the options

bright fog
knotty stone
#

cant click the options and inventory also isnt opening when hovering

bright fog
#

Most likely bcs the green effect is actually a UI then

#

So the cursor is registered as inside that UI

#

And since it takes the whole screen, the majority of other stuff can't be clicked since your cursor is in that UI

knotty stone
#

left and right mouse button click works fine, just the hover is broken

bright fog
#

Bcs there's no right and left click functions in the UI

#

But I guess there's still a hover one in the UI

knotty stone
#

yea was because it used ui manager, doing manual render fixed it

bright fog
#

In the render events ?

knotty stone
#

dont ask me such complicated questions, claude is doing all the hard work here 😆

bright fog
#

💀

knotty stone
#
function BritaNV.Overlay.ManualRender()
    if not BritaNV.Overlay.isActive then return end
    
    local screenWidth = getCore():getScreenWidth()
    local screenHeight = getCore():getScreenHeight()
    
    -- Create temporary panel for rendering without adding to UI manager
    if not BritaNV.Overlay.panel then
        BritaNV.Overlay.panel = BritaNV.NVPanel:new(0, 0, screenWidth, screenHeight)
        BritaNV.Overlay.panel:initialise()
    end
    
    -- Manually call render (bypasses UI manager mouse handling)
    BritaNV.Overlay.panel:render()
end``` 

```-- Initialize on game start
function BritaNV.Overlay.Initialize()
    BritaNV.DebugPrint("Advanced NV Overlay system initialized")
    Events.OnPlayerUpdate.Add(OnPlayerUpdate)
    Events.OnPostUIDraw.Add(BritaNV.Overlay.ManualRender)  -- Manual rendering to avoid mouse blocking
end```
#

neither time nor patience atm to learn all that stuff, just have to feed him with all the info you can get and set the metadata up right

frank pike
#

Been working on alittle submod for expanded helicopter events for personal use. I've been changing the flight sounds of the aircrafts depending on their types. For example, the common military helicopters using blackhawk audio. I've also made some things like the civilian use bell206 audio and the gunship use apache sounds, and so on.

willow tulip
#

sucks so much backing up at night

knotty stone
#

what button did i press?was in vehicle editor xD

willow tulip
#

do note that several of the buttons now turn on cheats like god mode.

willow tulip
knotty stone
#

Smashed like you said in vehicle editor and worked but still not sure which button it was 😅

willow tulip
#

oh I don't even think you have to be in vehicle editor to turn on wireframe mode?

#

shrugs

knotty stone
#

a bit sad that physic boxes only work for ragdolls and work subpar lol

#

basically stuck due to the weight or downforce they apply

willow tulip
#

Guess I never bothered to check if it applies reguardless.

knotty stone
#

yea for collision you still have to use the extents box

willow tulip
#

(Can't promise improved ragdoll action, but will absolutely plow through other (non burnt wreck) cars

knotty stone
#

lol, would be nice if you get that to work

knotty stone
#

already using that, but 2800 wouldnt move, any suspensions recommendations? ^^

willow tulip
knotty stone
#

ah ok

willow tulip
#

You'll need to do the manual install again

knotty stone
#

but making it a require for the super bulldozer is not a smart move i think, many ppl just play vanilla physics

willow tulip
#

Yea at some point I need to make system where mod authors can supply an alternative HP/mass/aerodynamic drag for their vehicles

knotty stone
#

i mean i could just make a submod with a different, vehicle script file and thats it

willow tulip
#

Yea

#

Or alter your vehicle script at runtime with LUA if realistic physics is installed

knotty stone
#

i tried a speed limiter when bulldoze mode is on, no chance, or it was your mod interfering, havent tested it vanilla 😄

willow tulip
#

I believe you can access it with stablib on the vehicle script..

#

I really need to play with reflection more from the LUA side.

#

Using Load() might also work

knotty stone
#

i had setMaxSpeed running in bulldoze mode and it didnt change a thing sadly

willow tulip
#

(changed my code to use getMaxSpeed on the vehicle object for next update)

#

Anyway, other then that bug 😛 tell me what you think of the new realistic physics update with a high weight vehicle 🙂

knotty stone
#

will have to test that on the w900 box truck, i had implemented a function to manipulate its weight to have it behave better^^

willow tulip
willow tulip
knotty stone
#

i think i had it read the script mass, the rest will be reduced by x%

willow tulip
#

Yea, I change what mass is submitted to bullet physics, so the mechanic UI/etc still shows the 'correct' mass

icy night
#

for anyone who might've been wondering, pushing a zombie who has spiked armor on, does not damage you. Was doing some testing and nothing happened

bright fog
icy night
#

Yea

#

I was only invisible

#

Pushed 2 zombies in full spiked armor like 30 times and it did nothing to me

bronze yoke
#

invisible has a lot of unexpected side effects, i would try it without

pearl prism
knotty stone
#

i was going to make a killdozer in the next weeks and using your track system, but will have to change the layout of the tracks, how difficult will it be? 😄

pearl prism
knotty stone
#

yea i thought so, well if its not reasonable doable it will have to stay that way

small osprey
#

True labor of love of firepower. Amazing.

elder tree
#

I can't seem to delete these curbs, or copy them... I can also for some reason place other tiles on them now. Has anyone else experienced this big?

delicate solar
drifting ore
#

Did you make the tetriZ one?

#

That shit is so damn cool

bright fog
delicate solar
#

yes with friend

bright fog
#

Cool shit anyway

small osprey
knotty stone
#

needs some fine tuning but hey i can power annex buildings ^^

vast hedge
#

hello! i'm starting out with steam workshop icons, so for anyone that'd like a handdrawn piece for their mod:

my rates start at 40 USD for rendered stuff and 25 usd for anything for simple and flat ^^

caard in bio, contact through dms for inquiries and other samples of my work :D
-# character is a spiffo-sona because i thought it would b funny

frank elbow
vast hedge
#

thanks ^^

still hamlet
#

Hi, I don't think I'm in the right place, but anyway...

I've developed a mod manager for dedicated Project Zomboid servers in docker.
It allows mods to be disabled or re-enabled without uninstalling them.

Mods are added automatically using their Workshop ID.
The site includes a filtering and sorting system.

Changes to variables in the world.ini file are applied instantly.
There's also an integrated server restart system via Docker.

I've tailored the script to fit my own setup, and I don't think I have the skills to handle every possible case.
What I can say is that it's fully functional.

That's all from me.

thin swan
#

Anyone tried using Events.OnAddForageDefs to remove an item from showing in search/forage mode?

#

Or wait a minute, there's canBeForaged for items, let's see if it works

rich reef
#

Hello, I've got a question.

I would like to cache the IsoPlayer object at the start of the game for later use in multiple local functions.

Is there a safe way to do this and make sure it doesn't lose scope throughout the program? I've got numerous calls in different functions requiring a player object, and I just want to tidy things up if possible.

Thanks!

mellow frigate
#

if you do not want MP nor split screen, use getPlayer(). that's the point of it. Else, you need to understand what is the contextually correct IsoPlayer to use in each situation.

rich reef
# mellow frigate if you do not want MP nor split screen, use getPlayer(). that's the point of it....

Thanks for the response Tchernobill.

I've used a variety of the methods, and I know there are results when ran from server vs client. I'm just trying to figure out all of those contexts so I can apply them without second guessing things.

I'm not worried about split screen at all, but I've seen that getSpecificPlayer() is used for that context?

getPlayer() seems to be client and server side, is that correct?

getPlayerByOnlineID is for Multiplayer, and I've used that in one of my mods to send client commands to specific players, if I recall.

I know functions can be similar but give different results, so mostly trying to pick everyone's brains about use cases.

Thanks for any insight you may have!

bright fog
#

When you talk about client and server side stuff it's MP

#

It cannot be SP

#

Imo there's no point caching the player

#

Most relevant events give you the player when needed, and if they don't just run a getPlayer, or iterate from 0 to 3 and get players with getSpecificPlayer to run the code for every players if you want to add support for splitscreen

#

If you don't give a shit like most of us, then just go with getPlayer

#

And cache the player locally in your function when it runs do you don't retrieve the player with getPlayer everytime

#

But imo no need to bother caching getPlayer like OnGameStart or smthg like that

rich reef
#

Thanks, thats pretty much exactly what I was thinking. Refactored a bunch of my code, especially OnCreate from recipes, to just use the player from that, instead of re-getting the player constantly.

thin swan
muted garnet
#

I tried adding my own tiles by taking vanilla sprites and putting them into a .pack. Could you please tell me how to make the sprite appear in high quality? And also, how can I make the sprite have collision on all sides?

frank pike
karmic elk
#

Does anyone know, if it's even feasible, to increase the distance and volume of all zombie footsteps in the game? I was just killed by a bloody sprinter that made no sound until it was 1 square away behind me. That's ridiculous.

Is this even possible?

willow tulip
#

Iv even seen car engines randomly mute

#

Super hard to reproduce too -_-

karmic elk
#

Yeah, I've had that too. But is it possible to address in a mod and make the volume and range something changable in Sandbox Settings?

willow tulip
#

No, its the game bugging out and not playing sounds it should.

karmic elk
#

Oh. :/

#

Thanks anyway.

willow tulip
#

there is a huge volume override mod with like volume settings for everything, but its seriously just the game not playing the sound at all at random

#

And its the kinda bug Im VERY glad im not getting paid to fix, lol

karmic elk
#

Unless you get paid by the hour! 😉

willow tulip
#

Because like.. screw trying to track down a bug with 1% reproduceability lol

willow tulip
karmic elk
#

lol. Depends how much hair you have to start with! 😉

willow tulip
#

LOTS. somehow.

#

somehow because every time I brush it, theres like, a small cat worth of hair that comes out and im like... wtf?

bright fog
#

How lucky, he's got hair

wicked glade
#

Are you able to modify vanilla game items, such as a generator to change it's behavior? Or would I have to create my own generator item to craft & use?

bright fog
#

Nor can you modify the vanilla one

bronze yoke
#

you can add new generators but you can't really change their behaviour

#

different generators can have different durability and noise radius but that's it

wicked glade
#

Oh gotcha, was looking to see if I could make a generator that powers the entire building - rather than the default 20 squares or however many it is.

wicked glade
#

Oh awesome

#

Thank you!

broken briar
#

I wonder if there'll be a modern day mod

#

or maybe uh late 2000s mod

#

that shifts the year from 1993 to 2009 maybe?

bright fog
#

But the reason I'm mentioning this mod is bcs I've seen Beathoven's work being shared around here, and his mod is legit

#

But I can only agree that the AI preview will hurt your mod @knotty stone

#

Bcs that's the reason most people have: AI preview = AI bullshit mod

#

It's also one of the reasons we tell modders not to use AI preview, bcs it can seriously hurt their mod popularity, very notably

knotty stone
#

well you want me to draw something like some 5year old, i cant draw shiaat 😄

bright fog
#

Even an in-game image is good, you can ask @willow tulip, he was in your situation and yet now he makes mod previews that does make people want to click his mods

knotty stone
#

well i could just take a screen of the info window or smth

#

dont get all that ai bullying lol

bright fog
topaz tangle
topaz tangle
#

beathoven makes cool stuff from what ive seen

bright fog
# knotty stone dont get all that ai bullying lol

Tbf, it does make your mod look terribly worse than if you had a shitty screenshot, that's the thing
And it's not about "NOOOOO AIIIII BAAAAD", it's just a fact, people do not click AI mods as often, it's not hard to notice this behavior. Does it mean an AI preview can't make your mod work ? No of course not and I think where it works the "best" is with those sort of pixelated images, of like items, a room etc (just check the current mod list you'll easily find one or two)

AI preview also screams to people "AI mod", and we are literally the first ones that notice how AI is become very present in modding, as we get constantly new modders coming here for help but their entire stuff is AI so it's just impossible to help them since everything they made is bad

bronze yoke
#

it has a more subtle affect on how most people view your mod: AI doesn't take any effort, if the first thing they see is AI they're probably going to think your mod is low effort and be much more likely to skip it

bright fog
#

That

topaz tangle
#

ai also like IS one of the things that are demolishing our society right now
it takes away the humanity of stuff, and its LITERALLY ruining lives
(also again: at least one person has DIED because of ai datacenters)

bronze yoke
#

i already knew about your mod from you posting it here, but i can tell you with confidence that if all i saw was that image on the workshop, i would not check out your mod

knotty stone
#

yea humanity and its prejudice

#

xD

#

but i get it, will take a look to make it different

bright fog
#

And it would be so much better and in fact I would argue it conveys better what your mod is about

#
  • character thumbs up: good stuff
  • generator next to a building alongside the name: we clearly understand what it is about

In your AI preview it's not the case, you just have a building with a generator, that's not on scale too, with zombies around, it doesn't convey the same thoughts

willow tulip
#

Generator, barrel, MS paint a pipe between the two, im already downloading it.

bright fog
#

Most likely, but they are probably server specific

#

It's definitely doable however

muted garnet
#

I tried adding my own tiles by taking vanilla sprites and putting them into a .pack. Could you please tell me how to make the sprite appear in high quality? And also, how can I make the sprite have collision on all sides?

wicked glade
#

Attempting to make a B41 mod with a custom item. I'm able to get it to spawn - however when I dismantle it, I get an error. Any ideas? Not too familiar with Zomboid modding yet.

    at zombie.inventory.RecipeManager.PerformMakeItem(RecipeManager.java:1191)```
`MOD/media/scripts/Recipes_DismantleElectricityBooster.txt`:
```module Base
{    
    recipe Dismantle Electricity Booster
    {
        ElectricityBooster,
        keep [Recipe.GetItemTypes.Screwdriver],
        destroy ElectricityBooster,
        Result:ElectronicsScrap=2,
        Time:20.0,
        Category:Electrical,
        AnimNode:Disassemble,
        Prop1:Screwdriver,
    }

    recipe Dismantle Used Electricity Booster
    {
        ElectricityBoosterUsed,
        keep [Recipe.GetItemTypes.Screwdriver],
        destroy ElectricityBoosterUsed,
        Result:ElectronicsScrap,
        Time:20.0,
        Category:Electrical,
        AnimNode:Disassemble,
        Prop1:Screwdriver,
    }
}```
`MOD/media/scripts/Items_ElectricityBooster.txt`:
```module Base
{
    item ElectricityBooster
    {
        DisplayName = Electricity Booster,
        Type = Normal,
        Icon = RemoteCrafted,
        Weight = 0.2,
        ReplaceOnDeplete = ElectricityBoosterUsed,
        UseDelta = 1.0,
    }

    item ElectricityBoosterUsed
    {
        DisplayName = Used Electricity Booster,
        Type = Normal,
        Icon = RemoteCrafted,
        Weight = 0.2,
    }
}```
thin swan
muted garnet
#

I copied the same sprite def

thin swan
noble summit
#

do i understand it correctly that the HeadConditionLowerChanceMultiplier in item code means the multiplier for standard durability reduction chance, and that all weapons burn more durability on tool heads than handles?

noble summit
#

also, can someone tell me what does the Sharpness line in weapons do specifically? all weapons that have it are set at Sharpness = 1.0, so i am kind of confused

thin swan
#

But I haven't tested it, just basing it on the java

noble summit
#

i figured as much, but judging from the weapon stats code all weapons but the glass tipped spear have HeadConditionLowerChanceMultiplier at 1.0 or above, meaning their tool heads are supposed to degrade faster than handles
which is weird since handles generally break faster during actual gameplay, and logic-wise all tools aside from brittle glass spear should have more durable tool handles
could it be that HeadConditionLowerChanceMultiplier is inverted and higher values decrease degrade chance instead?

muted garnet
noble summit
#

are you sure that sharpness prevents the condition loss? i am mostly sure that a hatchet ive been using was losing both handle and tool head durability, although the latter was much slower

thin swan
#

As far as I can tell Мепсель is correct, the sharpness basically acts as a buffer and stops condition from being lowered until it reaches 0. It also affects damage done and crit chance as sharpness drops

#

But sometimes things don't work the way it looks like they should from just reading the code lol

#

There's so many factors at play that there could be something I missed

noble summit
#

also, do i understand correctly that the sharpness has the same amount of "durability" as the tool head durability?

willow tulip
wicked glade
#

Could someone please give me an example of their recipe (B41) for dismantling a custom item? I can't seem to get it to work properly.

drifting ore
#

Anyone know of a way or reference mods where an existing perk is edited?

Will PerkFactory.AddPerk override an existing perk?
For ex. I want the exp needed to level 10 for Farming increased

cursive veldt
#

They should add a drone mod for aerial back up

cold skiff
#

Hi everyone, I need a little help. Since version 42.12, it seems the weapon repair system has changed. I used to be able to repair katanas in my mod with codes like this:
fixing Fix LegendaryKatana
{
Require = LegendaryKatana,
GlobalItem = BlowTorch=5,
ConditionModifier = 1.5,

    Fixer = SheetMetal=1; MetalWelding=8; Maintenance=4,
    Fixer = ScrapMetal=3; MetalWelding=8; Maintenance=4,
}

But this doesn't seem to work anymore. Can someone tell me how to do it now?

knotty stone
#

maybe you need to declare the module on the items

#
    {
        Require = Base.LegendaryKatana,
        GlobalItem = Base.BlowTorch=5,
        ConditionModifier = 1.5,

        Fixer = Base.SheetMetal=1; MetalWelding=8; Maintenance=4,
        Fixer = Base.ScrapMetal=3; MetalWelding=8; Maintenance=4,
    }```
cold skiff
#

I've tried using a separate module called lk_fixing.txt and within the recipes module, but I think you can no longer repair by right-clicking on the object; you have to do it through the crafting console -> repair.

knotty stone
#

the repair system was kinda standardized, you can use tags in your items now to use the standard fix recipes, maybe you can use that

knotty stone
#

something like that i guess ``` item LegendaryKatana
{
tags = RepairKatanaSheet;RepairKatanaScrap,
}

craftRecipe RepairKatanaSheet
{
    time = 180,
    AllowBatchCraft = false,
    Tags = InHandCraft,
    category = Repair,
    timedAction = CraftWeapon1H,
    SkillRequired = Maintenance:3;MetalWelding:8,
    xpAward = Maintenance:15,
    OnCreate = CraftRecipeCode.GenericFixing.OnCreate,
    Tooltip = Tooltip_Recipe_CanFailAndDamage,
    inputs
    {
        item 1 tags[RepairKatanaSheet] mode:keep flags[Prop2;IsDamaged],
        item 5 [Base.BlowTorch] flags[Prop1],
        item 1 [Base.SheetMetal]
    }
    outputs
    {
    }
}

    craftRecipe RepairKatanaScrap
{
    time = 180,
    AllowBatchCraft = false,
    Tags = InHandCraft,
    category = Repair,
    timedAction = CraftWeapon1H,
    SkillRequired = Maintenance:3;MetalWelding:8,
    xpAward = Maintenance:5,
    OnCreate = CraftRecipeCode.GenericFixing.OnCreate,
    Tooltip = Tooltip_Recipe_CanFailAndDamage,
    inputs
    {
        item 1 tags[RepairKatanaScrap] mode:keep flags[Prop2;IsDamaged],
        item 5 [Base.BlowTorch] flags[Prop1],
        item 3 [Base.ScrapMetal]
    }
    outputs
    {
    }
}``` but i think you would have to check the on create function for the condition modifier dont think that will work in a craft recipe.
drifting ore
cold skiff
cold skiff
knotty stone
#

item 1 tags[RepairKatanaScrap] mode:keep

#

you have to change the tags there to match them from the item

cold skiff
#

try again, thx a lot

cold skiff
# knotty stone i just saw that i had an error and corrected it

Thank you so much for your help, it's working as it should now. I just added a small correction to your code because otherwise it wasn't using up the materials and allowed repairs without having them.
item 1 [Base.SheetMetal] mode:destroy,
item 3 [Base.ScrapMetal] mode:destroy,

cold skiff
tranquil kindle
cold skiff
#

i think gets the first item with tag=repairkatanascrap... in items.txt

cold skiff
#

😆

knotty stone
cold skiff
#

Amazing 😉

summer jolt
#

Hiya.

Is there some sort of project zomboid clothing mod implementation guide? From having a blender Model into converting it into code and as a steam mod?

drifting ore
mellow frigate
ancient grail
#

what loads first?
OnGameStart
OnCreatePlayer

i assume gamestart

topaz tangle
bright fog
#

Just test it with a print

night summit
#

trying to get the decompiler working and feel like i'm pulling teeth

#

anyone had this issue? i can't find anything useful on it and none of the fixes seem to work

#

i've tried installing different versions of java, clean installing them, etc

#

not very familiar with java

#

okay somehow i got it working and i have no clue how

#

fuck you java

#

oracle is a bitchass company

#

satanic black magic shit

shrewd patrol
#

Hello, I have a problem, so I'm asking for your help.
The problem is that when you finish the drink, the item has to change to an empty bottle and an empty can
It remains the same. ReplaceOnUse = does not work.

module Base
{
item LetsBeCan
{
DisplayName = Let's Be Can,
DisplayCategory = Food,
Type = Normal,
Weight = 0.1,
CustomContextMenu = Drink,
Icon = LetsBeCan,
Packaged = TRUE,
StaticModel = BeerCan,
WorldStaticModel = BeerCan_Ground,
ReplaceOnUse = Base.LetsBeCanEmpty,
Drainable = TRUE,
component FluidContainer
{
ContainerName = LetsBeCanEmpty,
Capacity = 0.3,
CustomDrinkSound = DrinkingFromCan,
Fluids
{
fluid = LetsBe:0.3,
}
}
}
item LetsBeCanEmpty
{
DisplayName = Let's Be Can (Empty),
DisplayCategory = Trash,
Type = Normal,
Weight = 0,
Icon = LetsBeCanEmpty,
CanStoreWater = FALSE,
StaticModel = BeerCanEmpty,
WorldStaticModel = BeerCanEmpty_Ground,
component FluidContainer
        {
            ContainerName = LetsBeCanEmpty, 
            Capacity = 0.3,
        }
}

drifting ore
#

If you are using the base module you don’t need to/shouldn’t define Base before each item

#

I’m not sure if that will fix your problem or not though

shrewd patrol
#

Unfortunately, it is still unresolved. T^T

knotty stone
#

i dont rly get what you want to achieve you said "change to an empty bottle and an empty can" so you want 2 items back?

#

if you have a fluid container you dont need an empty item, only for spawn purposes if you rly want.

shrewd patrol
#

I want it.
First drink item code: LetsBeCan
After drink item code: LetbeCanEmpty

But now, the item code is the same.

knotty stone
#

i cant really read your can item in the screen but it should have the empty prefix already, if you look at the vanilla recipe for break glass you cant use a bottle with fluid remaining. maybe try working with that. else you would have to create your own drink timed action to replace the bottle/can

knotty stone
thin swan
frank elbow
#

By issues I just mean multiple things happening on key press to be clear, not a huge deal

thin swan
thin swan
#

@knotty stone I see you have a heating feature in your generator powered building mod, would you mind just giving me a quick rundown on how you implemented it? I'm not at my computer right now so can't download and check. I want to see if it's likely to be compatible with my realistic temperature mod which adds heat transfer for buildings.

knotty stone
#

iam just checking room tiles and place one heatsource in the middle(roomsize<50 tiles), needs some special case handling like U and L shape.

thin swan
bright fog
#

That just gave me an idea

#

I've been meaning to do my own take on the push furniture mods, and I could add a new button to that menu

bronze yoke
#

<@&671452400221159444>

dreamy birch
#

wow, slipped through our new bot

#

thanks

finite dune
bronze yoke
#

it was the usual four images only financial scam thing, i didn't look closely at it

finite dune
#

hmmm... 4 images with nothing else should have gotten swatted by the bot

#

was definitely 4 images though?

#

yeah mine got swatted

bronze yoke
#

i only looked at it briefly so it might have been fewer images or something, it didn't look like the exact images i'm used to seeing

finite dune
#

okay... they might be changing up... sigh

sour island
finite dune
willow tulip
#

Nice work! I was hoping someone would.

willow tulip
#

Mmm, weather/offroading affecting vehicle traction feels quite nice

#

I have no idea why TIS disabled per-wheel friction -_-;

shy mantle
#

The B43 car update is gonna go crazy

#

Not to overhype it too much, but vehicles are lame in vanilla rn lol

shy mantle
#

I know I know

#

But when multiplayer comes around I'll be double disappointed without the mod lol

willow tulip
#

Iv heard tell from unofficial MP players that it works fine in MP 😛

shy mantle
willow tulip
#

My new dynamic friction stuff will be a little borked, but id hope that TIS would see it in their infinite wisdom to let me do that per-vehicle instead of per-vehicle-type.

willow tulip
shy mantle
willow tulip
#

In theory to maintain a fair and balanced game? yes

#

In practice? id have to add code to enforce you install it or have it fallback to vanilla behavior if its not enabled on the server.

shy mantle
#

I just don't think a lot of servers would want to do that

#

I dunno, maybe there will be

willow tulip
#

Then they can enjoy towing cars at 15mph, with GTA2 level vehicle physics.

shy mantle
#

Yep, and that sucks, I will GLADLY bring up your mod every time a sever is thinking about adding mods

willow tulip
#

Thanks.

#

I mean ideally TIS would just adopt all my changes (and revert back some of the things they hardcoded for MP testing that directly breaks freatures in Project Summer car)

shy mantle
#

2029

willow tulip
#

Yeaaa

#

Tis why I didn't bother waiting after reporting said bugs...

#

Only to find out one of them was actually just purposefully hardcoded and commented on in the java code...

shy mantle
#

The only "bug fix" I did in mine was removing a singlular line in lua that tbh I don't even know what it does, it just broke transfering items into other car seats from the outside to enter automatically.

#

gah the phrasing

willow tulip
#

Like if I wanna sit on a seat?

shy mantle
#

Yeah

willow tulip
#

.... WHY WAS THAT NOT VANILLA

#

pain

#

does it do a cool timed action and everything for the transfers?

shy mantle
#

It was at some point, I remembered it, looked into it, bam

shy mantle
willow tulip
#

Like that sounds like a feature id want, having been blocked before

shy mantle
#

I dunno what you mean by cool though lol

willow tulip
#

I bet they disabled it because of people reporting getting locked out of seats (apparently due to the limit not counting fluids in containers?)

shy mantle
#

That could be it

willow tulip
#

(that fluids part only recently found out in B42.13)

#

they maybe thought it was stuff getting moved around causing it

#

or people not realizing stuff auto-moves as needed

shy mantle
#

I honestly did not test the side affects of removing that line, all I know is that nothing bad happened immediately and no one has commented on it after nearly 6 months now

willow tulip
#

lol

shy mantle
#

problem solved

willow tulip
#

lol

#

I also kinda wanna rebalance all the vehicles to real world stats now

#

but I don't feel like looking up said stats of every vanilla vehicle since I have no clue what most of them even are, not being that big of a car guy..

#

Some of the vehicles should feel.. totally different lol.

#

Like apparently step vans are really 3000kg+, not 1300 or whatever they are ingame..

#

And yea, Not every 1993 car had a 400hp+ engine lol

#

But the 400hp thing is a matter of scaling HP to ingame impulses (ie, retain the existing forces, but have the UI show like 100hp for a typical car) while the HEAVY ass cars get 200~400hp engines

#

and maybe a few of th muscle cars get like, 200hp engines