#mod_development

1 messages ยท Page 371 of 1

tough oxide
#

can we get a side-by-side and hold court?

bright fog
#

Black Moon can send his code, if I remember right he retrieves the current list of items, and reloads a part of script

#

But he needs to format that script from Lua

tough oxide
#

i do a lot of crazy shit but ive been doing my best to stress test and have decent results

bright fog
#

While the one I documented on the wiki, you just directly add the items to the correct ArrayList of inputs

tough oxide
#

that reminds me.. i need to add support for ArrayLists

#

seemlessly

willow tulip
bright fog
#

Who told you the one on the wiki isn't about non mappers ?

willow tulip
#

infact if anything, mine isn't really for mappers at all.

bright fog
#

Neither is the one on the wiki ๐Ÿง

willow tulip
bright fog
#

๐Ÿง

#

That's two different sections

#

Both explaining two different things here

willow tulip
#

yea the 2nd method only does mappers via lua

#

and the first method can only add things

#

you can't override lines

bright fog
#

But if you want to override ... just override ? ๐Ÿ’€

willow tulip
tough oxide
#

im pretty sure you can cherry pick

willow tulip
#

if you override an 'entire recipe' via .txt, all PZ does is merge the two recipes together into some unholy abomination

bright fog
#

Nah nvm I forgot "overriding" a specific block doesn't override the block

willow tulip
willow tulip
tough oxide
#

pull request

bright fog
#

Ah jeez I really hope they use fucking json in the future

tough oxide
#

that sounds like an annoying problem

willow tulip
#

thats why my code scans the inputs/outputs for the correct line to delete

#

so it can override instead of just.. add

tough oxide
#

is that behavior able to be changed via lua?

willow tulip
tough oxide
#

im happy to dig in and try to figure something out

bright fog
#

Tbf you should just document on your method on the wiki anyway

willow tulip
#

Heres the code I use for replacing inputs/outputs

willow tulip
bright fog
#

What's the problem with making an account ?

#

Also "argueing", your method is still a valid one

manic swift
#

do I have to put this Oncreate thing in? im not trying to start messing with lua. the recipe now works but it does not give me the output, which is listed

bright fog
#

There's shit that's worth argueing and imo adding yours is completely fine too, considering how fucked it is to edit recipes

willow tulip
#

that I don't feel like doing it, just to argue with people over stuff on the wiki not being 'clear enough' or whatever.

bright fog
#

Good thing I'm here to smooth things out

#

Just go straight to the point, show code used, show example, explain what it does, done

willow tulip
#

Oncreate is optional extra code to execute to mess with the item

manic swift
#

then it not giving the output is weird, it takes the inputs and even has the timer and animation. then it just.. gives nothing and takes the inputs

bright fog
#

Yea but again, why don't you add that in ?

tough oxide
#

recipe is a table here, right?: local recipe = getScriptManager():getCraftRecipe(recipeName)

#

or is it ArrayList?

tough oxide
#

gotcha - so you find the recipe in memory or wherever then replace each line?

bright fog
#

Adding new inputs really needs an overhaul, reflection isn't needed at all
then
Mine works on all recipes not just mappers
I'm sorry but if you're going to that extend to tell me about these and brag about it, but not even willing to put any effort in adding your methods to the doc, why do you even say these to me ?

willow tulip
# bright fog Yea but again, why don't you add that in ?

Because I assumed you did want to edit the wiki and work on all that. Im not going to bother adding stuff myself because iv already tried that on wikipedia only to get into arguments with people who immediately reverted my corrections and I just don't care for that drama.

#

and honestly iv seen you arguing with someone today over their contribution so Im just like meh.

tough oxide
#

that arguing excites me

#

for the sake of proving why your approach is better

#

or learning otherwise

willow tulip
# tough oxide that arguing excites me

Yea honestly just wanted to talk more about the different approaches then care about the wiki getting updated. The mapper approch prob works better for multiple mods adding things to the same mapper.

#

I saw some code.. somewhere? where they used reflection though, seems to be gone now? dunno.

#

it was crazy lol.

#

passing items to test functions just to confirm if it was the right line or not or something like that.

bright fog
#

Because I assumed you did want to edit the wiki and work on all that.
I have expressed many times now that as time passes and the further I get through my thesis, the less time I'll have to work on any of these
I've set up a pretty good base for anyone to expand things without me having to be full present. And now I don't have that much time to do any documentation these days, i'm too occupied and I still try to find time for things but I don't have time, and I'm fucking tired

And then I get this kind of attitude from you, of course you had to be THE GUY to be annoying about such a new system. Of course there had to be someone complaining. You brag about your stuff, I confronted you about it because I thought it was just about editing inputs, now you've easily convinced me that this wasn't just about that (also because I remembered a bit more what it was about). And now you're basically going crying that I argued your method ?

tough oxide
#

like im doing my own thing based on frameworks ive used in other langauges:


local collection = MerlinCollection:new({
        { id = 1, type = "Base.Axe",    tier = "High" },
        { id = 2, type = "Base.Hammer", tier = "Mid" },
        { id = 3, type = "Base.Nails",  tier = "Low" },
        { id = 4, type = "Base.Screwdriver", tier = "Mid" }
    })

-- Scenario 1: Standard Table Exclusion
local forbiddenTypes = {"Base.Axe", "Base.Hammer"}
local filtered = collection:whereNotIn("type", forbiddenTypes)
bright fog
#

Now about Tcherno, I argued with him, and at the end I was also convinced about the arguments that were brought up, but the way it is written is arguably bad, it confuses people and makes them think activating mods in the main menu is the bane of humanity. Go more in depth about it, like they did when arguing with me

#

Now the ball is on your side to understand that in fact arguing with others about X Y Z methods is the best way to handle this, and that's why the Wiki works like that, because arguing brings up debates about what is best in general, how things should be brought up to the reader and it will at the end makes things better

#

No arguing = everyone's right and we get fucking idiots posting random ass shit like that bitch about animal mods who doesn't know jackshit about it, and this pisses me off

#

Then they talk about ethics and brag about knowledge they don't have or don't understand

tough oxide
#

man, you're gonna love where im heading lol

#

please keep this energy with me when i actually release properly

bright fog
#

Anyway stop being like that Black Moon seriously, you already pissed of a dev in the modding Discord constantly complaining about butchering, when you just had a fucking convo with him about it and he told you they are aware of it

#

The guy even made the effort of contacting QA during week-end outside of work, got a response, and yet you still pissed him off

willow tulip
#

And this is why I have no interest in touching the wiki, because it would inevitably mean more hostile arguments with you.

tough oxide
#

albion - just so you know i decided i was going to use starlit* as a refactor target with what im doing

#

im gonna put in a pull request (without any expectation of adoption) so you can see what im trying to do

bright fog
#

Go read that again please if you haven't yet

manic swift
#

alright ive been messing around and i still cant get this to actually give me the thing

bright fog
#

Missing comma

#

In the outputs

manic swift
#

when i put the comma in outputs it breaks the game

#

and pops up the unexpected error screen

bright fog
bright fog
#

When referencing items you need to use the full type

manic swift
#

so thats when I put PBC.?

bright fog
#

Yup

manic swift
#

aaaa i see

bright fog
#

If the item is in the PBC module of course

manic swift
#

they all are, ill try this out

tough oxide
#

you are talking about in the output section cause the output could be any type - right?

bright fog
#

Wdym by "could be any type" ?

tough oxide
#

sorry - when i say type i mean module

bright fog
#

type usually refers to the ID, full type is module + type

tough oxide
#

yeah, namespace.class or namespace.item

bright fog
#

It's a bit of a fucked up way to call it which is used by the game so we use it ๐Ÿ˜…

#

Yea needs full type

tough oxide
#

that might be an intereting aside in the wiki

#

sort of cross-referencing terms to common terms

bright fog
#

Yea, that'll be handled when I rework the item script page

#

But it's a bit of a monster to edit ....

bronze yoke
tough oxide
#

to help people understand scoping and expectation - especially those with some experience

tough oxide
#

those are triple underscores and dont feel like fighting discord markdown atm

bright fog
#

Code blocks

tough oxide
#

fair

bright fog
#

Also I'm curious about what your stuff is about

tough oxide
#

double not triple

#

let me make it actually PZ structured and ill write appropriate docs

#

and, like i said, starlit is gonna be a target i use for seeing if it actually makes coding life better

#

thats my goal, but i dont want to create too much overhead obviously

bronze yoke
#

these days i'm more concerned about style than performance

tough oxide
#

for sure - this is some of the newer stuff im working on:

local data = {
        { id = 1, type = "Weapon", weight = 5,  broken = false },
        { id = 2, type = "Food",   weight = 1,  broken = false },
        { id = 3, type = "Weapon", weight = 10, broken = true  },
        { id = 4, type = "Food",   weight = 2,  broken = false },
    }
    
    local collection = MerlinCollection:new(data)

    print("Lazy chain")
    local results = collection:query()
        :where("type", "Weapon")
        :where("broken", false)
        :get()
#

expessive and efficient because the query builder turns this into a single loop

#

so when you read it later it makes sense

#

nothing actually happens until :get

#

and also - as the modder - what the hell is a for loop

bright fog
#

Hmm

tough oxide
#

needless to say - i dont like the for loop structure

#

in lua

bright fog
#

Why ?

tough oxide
#

the reason i dont like indents in python

#

no good reason - it just doesnt sit well with me

bright fog
tough oxide
#

i dont like it

#

also, why not abstract it and reduce the things you actually need to know to code

manic swift
#

from my view this has NO REASON to not be working, its got commas, modules, everything. inputs and outputs, modes, names even

bronze yoke
#

i also dislike indentation as syntax

tough oxide
#

thanks

#

i was talking to a young programmer the other night (a son of a close friend) and he was complaining about something and i just said "if you can do it better - then do it"

bright fog
#

It uses an array like listing

#

I heavily suggest you use my extension ZedScripts

tough oxide
#

i also have ZedScripts installed

manic swift
#

alright

tough oxide
#

even if i havent dug into that yet

bright fog
#

It should activate automatically for script files

tough oxide
#

i spend all my time cursing Emmy and thanking her too

bright fog
#

Ah wait I thought it was Zain telling me that lol mb

#

That confused me a bit

tough oxide
#

yeah, im a chatty cathy tonight

bright fog
#

And I'm sicky tired tonight

#

Good mix

tough oxide
#

yeah, im not sure which stage of sick i am - i was "call out sick" tuesday and felt worse friday

#

but i have (young) kids in school so there is no telling

manic swift
bright fog
manic swift
#

got cool colors though so thats a bonus

bright fog
#

UnPackSack, is that a vanilla timed action ?

manic swift
#

yeah one sec

bright fog
#

Your item does appear in-game right ?

manic swift
manic swift
#

AHA! I got it

#

however pots have 30 uses so I have to edit the amount...

manic swift
#

everything is working.. aside from it actually being able to be used on plants

#

alright so new major issue, I even copied and pasted the base game fertilizer and compost and just edited it to fit mine but it wont work, in game the item also has no weight for some reason

#

if i can fix these the mod is done and unloadable

bronze yoke
#

for some reason items are weightless if they don't have a translation

manic swift
#

ah great..

#

time to reread that part of the wiki

#

where am I supposed to put that line? it says nothing about where

#

or is this a completely different file

willow tulip
manic swift
bright fog
manic swift
#

yeah it wants a file for it

#

and then a text file

bright fog
#

You need to read stuff we're sending you dude

manic swift
#

I am plus im looking at the game files

bright fog
#

I literally can't see anything in your last screenshot

manic swift
#

hang on

#

should be better

bright fog
#

What's the problem then ?

manic swift
#

The Zedscript is freaking out about it not being a thing though

bright fog
#

That's normal

#

Like I said it's in active dev, that's something I'm working on, rn it doesn't support translation files

manic swift
#

so do I need to add the module PBC or does it just want that and nothing else and itll be happy?

bronze yoke
#

translations aren't scripts, they don't have concepts like modules

manic swift
#

interesting

#

alright ill fill these out and test the items.. again

bright fog
#

Actually the item names translations need the module yes

#

What you wrote is fine

manic swift
#

okay so that goes for the recipe translations too right?

bright fog
#

Nop

#

Yes, it's inconsistent drunk

manic swift
#

that makes ZERO sense

#

for why

bright fog
#

Yea, don't worry about it ๐Ÿ˜ญ

manic swift
#

I just wanted to make a silly bone to bonemeal mod and its spiraled so fast

#

welp adding the files didnt do anything other than change the display names

#

they are still weightless and dont actually add the things to the crops or get used

willow tulip
#

(for certain values, like weight)

manic swift
#

you have GOT to be kidding me

willow tulip
#

nope, though I do have a refresh mod that lets you update items to the latest spawn version of them

#

but for debugging its easy enough just to use the item spawner :0

manic swift
#

i just wanted a use for bones why has the mod gods forsaken meronseesall

paper ibex
manic swift
#

okay weight exists but it throws me errors when I actually try to use it

#

I cant see anything wrong anywhere

willow tulip
#

(or compost?)

manic swift
#

literally copied this

#

and tweaked values

#

Zedscripts also isnt saying anythings wrong

#

I know its still being developed but I fixed what it wanted earlier (a comma)

willow tulip
manic swift
#

Id love to figure it out, the game pops up the red error box and throws about 100 each time

#

no fert is used from the item and nothing is given to the plant

#

side note I think my spacebar is dying

manic swift
willow tulip
#

search for 'trace' and it will bring you to the errors soon enough

manic swift
#

this what im looking for?

willow tulip
manic swift
#

i have no idea what any of this means but im gonna look at line 22

#

which is just a bracket?

willow tulip
#
function ISFertilizeAction:start()
    self.item:setJobType(getText("ContextMenu_Fertilize"));
manic swift
willow tulip
manic swift
#

I havent touched lua

#

weird

willow tulip
#

yes it means vanilla code sucks

#
ISFarmingMenu.onFertilize = function(worldobjects, handItem, plant, sq, playerObj)
    -- close the farming info window to avoid concurrent gorwing phase problem
    if not ISFarmingMenu.walkToPlant(playerObj, sq) then
        return;
    end

    if not isJoypadCharacter(playerObj) then
        if playerObj:getInventory():containsTypeRecurse("Fertilizer") then
            handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);
        end

        ISTimedActionQueue.add(ISFertilizeAction:new(playerObj, handItem, plant, 100));
    end

    ISFarmingMenu.cursor = ISFarmingCursorMouse:new(playerObj, ISFarmingMenu.onFertilizeSquareSelected, ISFarmingMenu.isFertilizeValid)
    getCell():setDrag(ISFarmingMenu.cursor, playerObj:getPlayerNum())
end
#

this is the function that calls the function that is dying

#

Im pretty sure its failing at handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);, its trying to equip an item called Fertilizer instead of being a good boy and looking at tags and stuff.

manic swift
#

greattttttt

willow tulip
#

Yea, you'll need to make your own fertilization code

manic swift
#

wait

manic swift
#

use while equiped = false

willow tulip
#

its cause the vanilla code was never designed to handle other fertilizers except ones explicitly named base.fertilizer

#

(and base.compost or whatever)

#

you could prob hook/replace ISFarmingMenu.onFertilize to fix it.

manic swift
#

Ive never coded before so I have zero clue as to how to do that, and then make it overwrite the game if people subscribe on the workshop

#

can I like just copy paste the existing lua and alter it in the mod lua? that will overwrite the vanilla one right?

willow tulip
#

you can also make a backup variable of the old LUA and call but, but for such a short function I would just overwrite it all for now.

#

I would recommend starting with something like:

function ISFarmingMenu:onFertilizeSquareSelected()
    local cursor = ISFarmingMenu.cursor
    local playerObj = cursor.character
    if not ISFarmingMenu.walkToPlant(playerObj, cursor.sq) then
        return
    end
    local plant = CFarmingSystem.instance:getLuaObjectOnSquare(cursor.sq)
    local handItem = playerObj:getPrimaryHandItem()

    if playerObj:getInventory():containsTypeRecurse("Fertilizer") then
        handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);
        print("Handitem was ",handItem)
        if handItem == nil then
           handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "PBC.BoneSlop", true);
           print("Handitem became ",handItem)
        end
    end

    ISTimedActionQueue.add(ISFertilizeAction:new(playerObj, handItem, plant, 100))
end
#

I dunno if thats correct or the best idea, but its an idea to try.

#

make sure to place it in \lua\shared\

#

in a file with a .lua extension

#

the 'prints' will leave some text in your console/console.txt file about whats going on

manic swift
#

do I have to copy paste the whole fertilizer section or just that one and it will overwrite that one vanilla section?

manic swift
willow tulip
#

the above function should do something like "Handitem was nil" "handitem became isozomboidblahblahblah pbc.boneslop" (or maybe nil again)

willow tulip
#

note im not 100% sure how ISWorldObjectContextMenu.equip works, or if it will accept that itemname with module (TIS, why are you using items without modules?!?)

manic swift
#

they have modules!

willow tulip
#

Yea but they should be doing handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Base.Fertilizer", true); not handItem = ISWorldObjectContextMenu.equip(playerObj, handItem, "Fertilizer", true);

manic swift
#

thats true..

#

alright ive copy paste.. gonna boot and pray

willow tulip
#

see this is why modules don't work well for mods: TIS doesn't use them, so the code that works with non default modules doesn't get tested -_-

#

so many things are just hardcoded to assume Base

manic swift
#

silly bone to bonemeal mod has become an entire overwrite of the games code

#

okay uh that seems to broke it more

#

back to the console I go

manic swift
#

which technically means it was overwritten

#

so that works...

willow tulip
#

so thats. something...

#

did any of the prints execute above that error?

#

@manic swift

manic swift
#

uhhhhh on sec

willow tulip
#

weird

#

what folder is the file in?

manic swift
#

it threw 1 error when it loaded me into the main game menu itself as well

willow tulip
#

Dunno whats going on if none of the prints occured

manic swift
#

looking at the base game file

#

its only got like..

#

91 lines for that file

#

so where on earth is line 1182

willow tulip
#

don't do that unless your replacing the entire files code (And even then, in LUA there are generally better ways to do that)

manic swift
#

I did..uh

willow tulip
#

yea, when you name a file the same as vanilla, the game goes "oh, ignore the vanilla file.. COMPLETELY, and use the mods'

#

so its whining about you not copying ALL the code over

#

instead, give it a unique name

#

and when it sees function ISFarmingMenu:onFertilizeSquareSelected() ... it goes "ok, we're assigning the variable ISFarmingMenu.onFertilizeSquareSelected to the function that is the following code

#

and LUA is kinda special in that function names.. are just variables

#

so assigning them a 'new value' 'just works'

manic swift
#

so I can namethe file anything and it will look at the start of your code and go "oh just do this"

willow tulip
#

yep

manic swift
#

yeah my spacebar is broken

#

good lord

willow tulip
#

mod code is always run after vanilla code, so it will always run after vanilla code and 'reassign' this function to your code

manic swift
#

mkay im gonna test this out again

willow tulip
#

try to name the filename 'unique' however.. because you can also conflict with other mods by accident!

#

and just randomly override one of their files if your filename matches -_-

manic swift
#

theres no like... guards in place for that?

#

so thats why some mods blow up others..

willow tulip
#

just allowed to do it all willy nilly

willow tulip
manic swift
#

uhhhh

#

..one sec

#

okayyyyyy so bad news and good news

#

good news is the red box wont pop up

#

bad news is the game closes on the loading lua screen

willow tulip
#

lol. check the console.txt

manic swift
#

console.txt here I come

#

messing with lua has made this turn from a spiral to a rapid decline

#

damn you lua!

#

i feel like messing with a fertilizer thing should not be setting everything else on fire

willow tulip
#

lol. No idea

#

sometimes PZ just.. does that thought, so maybe try again?

manic swift
#

I tried 2 times

#

ill try a third..

willow tulip
#

what did you rename your file?!?

#

yฬตอ—อŒฬŸฬฎoฬธอƒฬ‰ฬฝฬŒuฬดฬˆฬ†อ†อ›aฬทอ€ฬ•ฬฬ€rฬดฬŠอƒฬˆฬ•eฬตฬฝอ…ฬ™ฬผdoomฬ‡อ„eฬตฬพอŠฬ‰ฬ‰dฬถอ ฬ‹อ„ฬ‘.ฬตฬอƒอŒอ—lฬทอ‘ออ อ›ua?

manic swift
#

aaaaaaa

willow tulip
#

I was close.

manic swift
#

that shouldnt be causing issues right??

willow tulip
#

no thats looks fine

manic swift
#

it like..

#

does this mean it fried the textures?

#

that list goes on for agesbtw

willow tulip
#

I mean, maybe? But more likely its something like: your gpu leaked memory or something.

#

Or, you added one too many... ,'s somewhere and exploded the lua compiler

#

Id first rename your .lua to .bak, justincase...

manic swift
#

.bak? what is even that

willow tulip
#

you didn't edit any .txt files recently? because small errors in those can blow up unrelated systems

#

.backup

manic swift
#

ah

willow tulip
#

aka file that PZ will ignore

manic swift
#

renamed.. ill try a reboot

willow tulip
#

yea well its not that file then lol

#

reboot might be a good idea

manic swift
#

im gonna reboot this pc

#

brb

willow tulip
#

"I have no idea whats going on, so try turning it off and on again"

manic swift
#

I mean it usually fixes it dont it

willow tulip
#

Often yes, especially if the error makes no sense whatsoever.

manic swift
#

DAMMIT

#

it broke at loading scripts

#

but

#

it gives me a place to look

willow tulip
#

so are you crashing before main menu or?

manic swift
#

im crashing loading the game itself

willow tulip
#

yea.. so look at your .txt files next

manic swift
#

I altered a textue name that seemed odd

#

attempting start

#

annnnnnd it broke

willow tulip
#

lol... what texture name? in your mod or?

manic swift
#

the texture png I made for the boneslop

willow tulip
#

ahhh.

#

there ya go.

manic swift
#

it uh

#

it aint happy

#

console.txt save me..

#

same exact errors

#

changed that entire item to be a copy of seed paste, so bone meal will be the only fertilizer

#

gonna see if that fixes it

#

it didnt..

#

you know what im gonna verify the integrity of the steam files in case I deleted something

#

O H

#

that uh... that would do it

#

it didnt actually

#

it crashed again after fixes and fried 11 files again

#

im at a loss

#

I got scripts and everything but lua is broken and any changes set it on fire

willow tulip
#

weird

#

your not saving files to the zomboid dir right?

manic swift
#

the huh?

willow tulip
#

like your using the mods dir right? or workshop dir?

#

not saving things to projectzomboid\media right?

manic swift
#

everything is saved to MY mod

#

which is here

#

annd that didnt censor personal info

#

one sec

#

myuser\zomboid\workshop

willow tulip
#

k, dunno why validating would keep coming up with files

manic swift
#

which then goes there

willow tulip
#

you don't have other files open in your text editor or something?

manic swift
#

nope

#

im gonna verify again real fast

#

all the files are good

#

but it implodes at scripts still

#

im gonna remove the lua stuff from the mod entirley and see if it can boot

#

silly bone mod went from simple to very not real fast

#

I have a newfound respect for modders who do the insane stuff

#

..I may have to wait for them to make a mod like this instead at this rate good god

#

reinstalled the game and its alive

#

im going to insert the mod again, it has no files that mess with lua and is just scripts

#

gonna take this slow.

tame lily
#

where is recipes_blacksmithing

manic swift
#

without the lua file in my mod everything works fine, if you equip my bonemeal bag in your primary hand it uses some of its capacity, though you cant see if a plant is fertilized or not which is dumb

#

however if its in your inventory it wont put it in your hand,it throws errors, uses no capacity and since you cant see if it adds anything to the plant i dont know if it works

#

this is what console says about it

#

so what if instead I just.... get rid of the bonemeal item and make that crafting recipe just make actual base fertilizer

#

itll take from my ideas for the mod a bit but would guarantee compatibility which is mainly what I want

willow tulip
#

yea making base fertilizer is a good idea for now

#

you SHOULD be able to override the LUA to take other items, but that'll take some more research

manic swift
#

bone slop can be composted now as well so boom both fertilizer and compost can be made

willow tulip
#

nice

tame lily
#

where's the blacksmithing recipes

willow tulip
#

in the forge.

manic swift
#

ill update on how this goes

willow tulip
manic swift
#

changed recipes and translations

#

just tested...

#

ladies and gentlemen...

#

we got em

willow tulip
#

lol

manic swift
#

now I need to figure out how to upload to the steam workshop

#

oh it seems easy

tame lily
tame lily
willow tulip
#

use a text search for the recipe your looking for

vivid imp
manic swift
#

im using the zomboid inagame uploader

willow tulip
manic swift
#

alright

willow tulip
#

poster=poster.png icon=icon.png

#

oh, workshop\modname\preview.png

#

mines 256x256, I think its what appears on steam

manic swift
#

yeah I have a 256x256 image

#

hm

willow tulip
#

so mine is in C:\Users\Black Moons\Zomboid\Workshop\Bug Zapper 9000 with workshop.txt

willow tulip
#

maybe you encoded it wrong somehow?

#

Heres a 'working' preview.png

#

on mac/unix it may also be case sensative.

manic swift
#

thanks

#

now I wait for steams automation

#

the war is over

willow tulip
manic swift
#

I started this yesterday and said "oh im sure this will be quick, two hours max"

#

it has been 13 total.

#

am i allowed to post a link to it anywhere?...

#

im quite proud of it

willow tulip
manic swift
#

ill post a link here once then

tranquil kindle
#

Protos? My life for Aiur!

silent zealot
manic swift
#

This was so much more than I expected

silent zealot
#

That's true of absolutely every form of programming ๐Ÿ˜‚

#

Did you end up with 500 other mod ideas while working on it?

manic swift
#

โ€ฆโ€ฆyes

#

Ive had this great idea for a cart like thing specifically for corpses so you dont use as much endurance when moving mass amounts of them. Would be faster to.. but im nowhere NEAR making that

silent zealot
#

It's worth keeping track of those ideas... I've got a OneNote full of mod ideas and random bits of code that may come in useful

manic swift
#

I know how to make scripts but no idea what any of the lua means, so ill be making more Qol mods if I do make more

silent zealot
#

It's an easy way to get started, and you can gradually do some minor stuff with lua as you need to

#

If you've doen any programming or scripting before you'll pick up the basic of lua easily... then you just have to deal with Zomboid jank.

manic swift
#

I have absolutely never touched a line of code. This was the first time I did anything

native fable
#

moderatorr can u make shaders for project zombid

bright fog
#

So it should only detect actual script files

worthy pawn
#

Has isRanged changed? I'm getting an error with my Mod Handlebar's Preppers everytime it is called.

#

I'm throwing an error everytime I hit this line

      -- For every weapon attached, get the ammo and magazine
      for i=0, weaponsNum - 1 do
          local item = attachedWeapons:getItemByIndex(i)
          if item:isRanged() then
              local bullet = item:getAmmoType()
              local box = item:getAmmoBox()
              local mag = item:getMagazineType()
              table.insert(bulletList, bullet)
              table.insert(ammoBoxList, box)
              table.insert(magazineList, mag)
          end
      end
      ```
#

For example if zombie has a shotgun, it is pulling base:shotgun_shells

However from what I can gather it is now base:shotgunshells

#

If an M14, it is will call for base:bullets_308 when the item is now called Base.308Bullets

worthy pawn
#

My error seems be with it calling incorrect item names on ammunition. This is my B42 I've been working on to move everything over. (what a mess)

Also, it is counting WalkieTalkies as ranged items!?

worthy pawn
#

So I've narrowed it down to when the getAmmoType is running it is just pulling the wrong information. I don't know where it is pulling it from as none of these match up to the official wiki and I can't find changelogs where the name of the ammo type was changed in the wiki either.

bronze yoke
#

base:bullets_308 is the AmmoType, not the item key

#

call item:getAmmoType():getItemKey() to get the actual item key

worthy pawn
#

Is this something new with B42 the way that works?
My apologizes as I info dump here. I just loaded up B41 and getAmmoType() pulls the item key, I'm not sure why it is handled differently but I will try what you have said and report back.

worthy pawn
bronze yoke
#

yes, it was changed in 42.13

thick lark
#

Where can I find the backpack stuff in the B41 files

#

Like duffel bags and stuff

#

Nvm just found it

#

๐Ÿคฆโ€โ™‚๏ธ

fresh isle
#

I'm struggling to make a clothing item spawn with something in its attachment slot, I thought I would reference the weapons but I'm not sure it works the same way-- not sure if it's possible to do with clothes? I thought I could do an OnEquip and have it spawn in the slot, and disappear if unequipped, but I think I'm lost.
Essentially I'm trying to make a clothing item that glows, I thought the easiest way to do that would be to mimic the mining helmet from Better Flashlights, but the hat/light are totally separate objects that you find and put together to work

bronze yoke
#

clothing gives an attachment slot to the player, but it doesn't really have an attachment independent of that

#

for example you can't have a holster with a gun in it unequipped

fresh isle
#

Ahh, yikes fair enough

#

Is there a way to directly attribute light to a clothing? I was basically repurposing the vest code that holds a flashlight but I want it to just be holding the light, or tying the two totally together

silent zealot
#

There are other places with similar code, like LightingJNI.java calling IsoGameCharacter:getActiveLightItems()

#

I poked through the lighting stuff a lot when working on better headlights, there is so much hardcoded in java.

silent zealot
#

What about an item of clothing that adds an attachment slot, and some lua magic so when you put on the clothing a "clothingLight" gets spawned in your inventory and equipped in that slot? Then you have to disable removing/dropping it, and make it vanish when the clothing is unequipped... which might be possible if you use the "hidden cosmetic item" trick but that was never intended for attached items so it might go weird.

mellow frigate
#

Does anyone know by heart the Z elevation size of the mouse cursor ?

bright fog
mellow frigate
#

afaik the mouse cursor represents the z elevation between the tile (z=0) and the head of a typical humanoid.

fresh isle
silent zealot
#

there's an OnClothingUpdated event

#

You could also add code to the timed actions for putting clothes on/off

bright fog
#

I probably have that constant in one of my previous projects wait

distant inlet
#

Hello, modders! Does anyone know if objects/items have IDs in latest release?

distant inlet
#

Another piece to my question is how to retrieve objects/items by ID

bright fog
#

Bcs items use what is called a full type (shitty name, ik), which is the module.ID of the item

#

If you're talking about identifiers of unique objects, it depends

distant inlet
#

identifiers of unique objects and items that exist between reloads, like a specific vehicle ID or weapon ID. An analogy is car VIN as an identifier (not make+model+trim)

bronze yoke
#

items have a mostly unique id, objects don't

distant inlet
bright fog
#

I suggest looking through the JavaDocs

#

For InventoryItem

willow tulip
#

You also need to know what container the object is in, to get the object again, IIRC

#

You are however free to add modData to any item

willow tulip
#

Good news: they fixed the inventory bug

#
public int getCapacity() {
        int capacity = this.capacity;
        if (this.isOccupiedVehicleSeat()) {
            capacity /= 4;
        }

        if (this.parent instanceof BaseVehicle) {
            return Math.min(capacity, 1000);
        } else {
            return this.containingItem != null && this.containingItem instanceof InventoryItem ? Math.min(capacity, 50) : Math.min(capacity, 100);
        }
    }
#

Bad news, they left in all the stupid limits like 50 for inventory containers, 100 for furniture and 1000 for vehicles.

#
public int getCapacity() {
        int capacity = this.capacity;
        if (this.isOccupiedVehicleSeat()) {
            capacity /= 4;
        }
        return capacity;
        }
    }

Sometimes less is more TIS!

#

And setCapacity's warnings are still uhh....

#
public void setCapacity(int capacity) {
        if (this.parent instanceof BaseVehicle && this.capacity > 1000) {
            DebugLog.General.warn("Attempting to set capacity of " + this + "over maximum capacity of 1000");
        } else if (this.containingItem != null && this.containingItem instanceof InventoryItem && this.capacity > 50) {
            DebugLog.General.warn("Attempting to set capacity of " + this.containingItem + "over maximum capacity of 50");
        } else if (capacity > 100) {
            DebugLog.General.warn("Attempting to set capacity of " + this + "over maximum capacity of 100");
        }

        this.capacity = capacity;
    }
#

.. dependant on the previous value before you call setCapacity :p

shy mantle
#

Someone could make a single large container with 300, guess not

willow tulip
#

2, technically.

#

copy pastes function, changes 2 function call.. names

#

impulseFromHitZombie->impulsesFromHitObjects
impulseFromSquishedZombie->impulsesFromSquishedBodies

#

boring stuff like that.

#

(TBF, I agree with the above two variable name changes, as they make the true usage of those variables a lot less confusing)

#

I wonder if they actually fixed deer/cows flipping your car when you drive over them slowly.

#

Or changed any of the values my mod depends on to seperate plant impacts vs zombie impacts -_-

shy mantle
#

They said they fixed the damage, nothing about physics, but they usually don't tell us everything so

willow tulip
#

.corpseSize is still insanely high for cows and stuff (7 vs a zombies 1) so I doubt it.

#

(Realistic car physics already fixes running over cows/etc flipping your vehicle)

#

Lets test.

#

Random mod idea: Sort KI5 last. A mod that just puts your 100 KI5 mods that all start with 2 digits <name of car> to the end of your mod selection page instead of at the top so you don't have to constantly scroll past them to enable/disable any mod

#

I think the running over zombie ragdoll physics got some changes lol

#

they now go flying instead of falling ontop of the car so often

#

or maybe its just the vehicle im using today

#

Cool game, a zombie fell ontop of car, over my tire, and now that tire is hovering in the air :p

#

yea they did not fix driving over cow corpses flipping your vehicle even at low speed -_-

knotty stone
#

its not a bug, its a feature... abraxsDerp

willow tulip
#

someone had just set cows/deer/etc corpsesize far too high and never tested it.

knotty stone
#

improved the headlights of the w900, i think thats fine and more realistic

willow tulip
willow tulip
knotty stone
#

yea you could do that

willow tulip
knotty stone
#

sure, i just tweaked a bit the horsepower weight and capacity

willow tulip
#

this allows it to only be active when the beta overhauls are enabled in realistic car physics

knotty stone
#

ah ok

#

just remembered i have to get rid of the payload lua for the submod, i forgot that

willow tulip
#

Mainly was just trying to make an example of how the overhaul values work

knotty stone
#

so with that file i dont need an extra submod

#

shared folder?

upper moat
#

did new update broke your mod @willow tulip ? ๐Ÿ˜›

willow tulip
upper moat
#

I jad to delete the zombie folder ๐Ÿ™

willow tulip
#

Yep.

upper moat
#

ait so I know its that

#

btw

willow tulip
#

Every PZ update, delete the zombie folder and await java mod updating

upper moat
#

ever tried pulling one of those containers from.ki5 ?

#

seems.you csnt pull them.with your horsepower addon on

willow tulip
#

and thats crazy high

upper moat
#

ow yeah I haven't tried without your mod tbh

willow tulip
#

yea, in vanilla they don't tow with anything in them

upper moat
#

so we need a flatbed mod to laod em?

#

no to think of it I think in b41 you could load them on with other mod that also let's you load cars

#

but I think that's not on b42 yet right

willow tulip
willow tulip
upper moat
#

I think it was a empty gasoline one

willow tulip
#

also, even when they are off, realistic car phyiscs will let trunks of over 1000 capacity still work

#

(B42.14 allows trunks up to 1000 again)

upper moat
#

-time was def not full

upper moat
willow tulip
upper moat
willow tulip
upper moat
#

it was my fix also to just get the trailer hehe

#

but I like the bee skin ๐Ÿ˜›

#

fkn devs I need all capacity unlocked ๐Ÿ™

willow tulip
#

yea realistic car physics just deletes all the capacity limits because they are dumb

#

Total Capacity Override too (also needs update)

upper moat
#

too bad that other dude never implanted your maybe fix

willow tulip
#

the LUA capacity override dude?

#

yea that would have been cool

upper moat
#

yeah that one

willow tulip
#

he rewrote ALL the transaction code -_-

upper moat
#

cant u fix it? ๐Ÿ˜›

willow tulip
#

All he needed to do was some reflection to getCapacity() without using getCapacity()

upper moat
#

I mean it would save everyone a headache that mod

willow tulip
upper moat
#

maybe we should make a petition to scrap that cap lock

#

๐Ÿ˜›

#

ic happy the cars got fixed tho

willow tulip
#

Iv already told a dev its dumb to have a capacity limit in a game with 9000 other sandbox variables, where every item/car already has its OWN capacity limit

upper moat
#

atleast something we can use to hoard hehe

willow tulip
#

they shrugged and just fixed the 100 trunk bug.

upper moat
#

true

#

well in the end capacity lock got hacked anyway so what's the point right

#

BTW I also.loved your car sounds hahaa

#

inwas speeding with a semi and empty cattle trailers and I went full on the turn and the trailer drifted 90ยฐ haha

#

was awesome

#

as it did the trick in the turn hahaha

#

the sounds in the wheels went bananas

knotty stone
upper moat
#

haha that looked funny tho

knotty stone
#

best strategy to kill zeds with a car ^^

upper moat
#

hen again the container is also heavy right

upper moat
knotty stone
#

mustang and taxi are about the same weight

upper moat
#

or a 100k round minigun ๐Ÿ˜›

knotty stone
#

ะ•ั‰ะต ั€ะฐะท ะผั€ะฐะทัŒ ะทะฐ 5 ะผะธะฝัƒั‚ ะพะฑะฝะพะฒะธัˆัŒ ัะฒะพะน ะผะพะด ะผั€ะฐะทัŒ ั‡ั‚ะพ ะฑั‹ ะผั‹ ัะตั€ะฒะฐะบ ะฟะตั€ะตะทะฐะฟัƒัะบะฐะปะธ, ั‚ะพ ั ะฟั€ะธะตะดัƒ ะฒ ั‚ะฒะพัŽ ัั‚ั€ะฐะฝัƒ ะธ ะฟั‹ั€ะฝัƒ ั‚ะตะฑั ะพะฑะดั€ะพั‡ะตะฝะฝะพะน ะฑัƒั‚ั‹ะปะบะพะน Such comments are really sweet ๐Ÿ˜‚ maybe i just just delete the mod๐Ÿคช

mellow frigate
#

thats report & game ban material

#

Steam does not hit lightly on such things

knotty stone
#

yea i reported to steam

willow tulip
knotty stone
#

@willow tulip i tried messing around with the sounds, but they dont seem to loop? and when the custom crank sound is done playing you still hear the last part of the standard sound

                    exhaustSound = "IdleEngine", exhaustSoundBias = 0.2, exhaustSoundMultipler = 0.8,
                    crankSound = "vehicle_start", startSound = "RCP_Engine2Start",}```
#

i used the vanilla sound files, they have new car sounds that sound rly good

willow tulip
#

Mainly the Loop = true for some, false for others (like startup sounds)

willow tulip
#

I kinda recommend using a sound script and extracting the sounds from the .bank file, I have no idea how it works if you use the files directly.

#

Oh crap I forgot to update the sound names in that file.

#

oh well.

upper moat
#

the other Java dude is also busy ๐Ÿ˜›

willow tulip
willow tulip
willow tulip
#

ah ๐Ÿ™‚

upper moat
#

need thay for my mod

#

cause that lua dude doesn't fix his ๐Ÿ˜›

willow tulip
#

Ah lol.

#

Realistic car physics/Total capacity override have similar files

upper moat
#

its all good I still have my trusty Java dudes ๐Ÿ˜›

#

yeah but does your also work for items

#

my mod is a non physical.item like a bag

willow tulip
#

it now just limits you to 100,000 because I thought that'd be good enough to store most of the game in one item and crash it

upper moat
#

so your mod fixes everything that has a container type

willow tulip
#

Yes

upper moat
#

100k dude

#

wtf

#

10 would even be enough

willow tulip
#

TCO also then lets you override everything with a container, from the player, to the floor, to furniture and cars (No backpacks yet..)

upper moat
#

10k

willow tulip
#

yes but what is the point of rasing the limit to sane amounts?

upper moat
#

oow

#

didn't k ow that so I just need your files and that's it?

upper moat
willow tulip
#

lol.

upper moat
#

100k logs would work maybe

willow tulip
#

depends on the size of item, but yea

upper moat
#

cause either just 1 item

#

but we dumped everything in it haha

#

and hydrocrsft also had a shit ton

#

havent tested it on b42 tho

#

cause you also lagged with item cheat menu and now you don't

mellow frigate
#

Is there a mod that adds a perk and works in B42 I can take example on ?

knotty stone
#

learn to read? but perks are broken in mp

willow tulip
#

yea its pitchbent, the EngineSoundRPM is what the sound files RPM should be

knotty stone
#

for science i added the same sound to all steps and it only sounds right when starting

willow tulip
#

startup isn't pitch bent

knotty stone
willow tulip
#

adjust EngineSoundRPM

#

I dunno why you set it to 6000 -_-;

knotty stone
#

its 3000 in the vid

willow tulip
#

yea that file sounds more like a 1500 idle lol

knotty stone
#

6k sound kinda good lol

willow tulip
#

But yea, it has to be pitch bent based on RPM

#

vanilla cross fades(?) between multiple sounds.. and hence why it sounds like a dozen indistict sewing machines playing at once

#

@knotty stone Just updated all the LUA and readded the RPM files properly for vanilla vehicles -_-

#

also fixed startup sound being too loud

knotty stone
#

the exhaust sound is just a super short stutter, does it have any purpose?

willow tulip
#

they both get pitchbent

#

but at low throttle settings, Engine sound is loudest

#

at high throttle, exhaust sound becomes loudest

#

thats what engineSoundBias = 0.4, engineSoundMultipler = 0.5, does

#

Bias = starts at 0.4 volume, multiplier = increases by throttle * 0.5

#

vs:

#

exhaustSoundBias = 0.2, exhaustSoundMultipler = 0.8,

#

also, mod just updated, try some of the vanilla vehicle sounds now that iv overhauled their names and stuff -_-;

knotty stone
#

k

willow tulip
#
["Engine1"] = {engineSound = "RCP_Engine_1_Engine", engineSoundRPM = 3000, engineSoundBias = 0.4, engineSoundMultipler = 0.5, 
                    exhaustSound = "RCP_Engine_1_Exhaust", exhaustSoundBias = 0.2, exhaustSoundMultipler = 0.8,
                    crankSound = "RCP_Engine_1_Crank", startSound = "RCP_Engine_1_Start",},
#

Basically though that is how my mod makes the engine sound different when you apply throttle, instead of just getting louder

#

IRL at idle, the exhaust tends to be rather quiet while you get a lot of 'engine' noise of all the moving parts

#

but when you floor it, the exhaust gets a LOT louder while the moving part noise tends to be somewhat similar (aside from increased intake noise)

#

Also with just 2 sounds instead of... 10+ required, it might be possible for people to record vehicles without a studio+dyno

mellow frigate
willow tulip
#

(plus there is just no way to add extra engine sounds in vanilla due to how fmod and bank files are set up)

#

@knotty stone example of exhaust vs engine sound

#

engine 1 is maybe a better example

knotty stone
#

so its like idle vs 3000 rpm like

willow tulip
#

no

#

its basically like a recording from under the hood vs behind the vehicle, same RPM

#

Engine noise = Cams, lifters, valves, fanbelts, alternators, power steering pump and intake

#

Exhaust noise = Exhaust

#

or ELI5: Engine noise = high pitched noises, Exhaust noise = low pitched noises

knotty stone
#

had to set horsePower = 150, it was a bit to fast xD

willow tulip
#

Hehe, yea if it has a horsepower 'overhaul', the horsepower -> 4x vanilla horsepower

#

I gave it like 400HP in my overhaul because it was also like 8000kg

#

cause thats what google say its specs would be abut lol

#

400 was a bit extreme (1600hp vanilla), though didn't feel too bad with a trailer

#

also, would be basically untowable by anything else lol

#

especially offroad

#

but would also tow and shove other vehicles like they where nothing

willow tulip
silent zealot
willow tulip
#

haha

silent zealot
#

Probably far more effort than it is worth, but damage based sounds? A THUMP-THUMP-THUMP-THUMP scaling with speed when a tire is damaged, etc.

willow tulip
#

There actually is a damage track played when your engine is very low condition (vanilla even)

silent zealot
#

I'm going to pretend this is because they loved my Foldable Survival Rifle mod that could load both .223 and 5.56, and it made them realize that the two calibers were redundant. ๐Ÿ˜‚

bright fog
fresh isle
# silent zealot there's an OnClothingUpdated event

Would you know how to print the value of an object to console instead of the memory address? I am trying to print the values of character:getWornItems() into console, it gives me wordscramble rather than the clothing items

noble dock
#

Hey all! Just starting to dip my toe into the modding PZ world - basically I'm trying to take a 3D asset and add a context menu option to "add to map" that then places the object onto that tile. I tried creating both a B41 and B42 mod the other day with the help of AI [before reading the modding wiki/resources and then seeing the note on AI and feeling like an idiot after it not working after hours lol] so want to now dive into how to actually build/develop the mod. I'm finding that alot of the guides for importing assets (either vehicles or clothing or stuff) are out of date - where would be a starting place to, well, start figuring this out lol? Thanks!

willow tulip
#

Why the hell is vehicle:getId() and vehicle:getID() valid and return different values -_-. I hate this ever so much.

#

in vehicle, its getId() you want, while in inventoryItem its getID(), cool -_-

silent zealot
#

Remember java ArrayLists start at 0, not 1 like Lua. Because Lua is an abomination.

fresh isle
#

Thanks for the quick response๐Ÿ™Œ

willow tulip
#

(At least, thats what most getWornItems() return)

fresh isle
willow tulip
#

yea, so something like

local wornitems = character:getWornItems()
for x = 0, wornitems:size()-1
  local item = wornitems:get(x)
  -- do thing with item
end
#

also looks like it might be of some use

#

depending on what you want exactly.

willow tulip
#

... Damnit! Sorry. Fixed now.

#

Keep swapping between java and Lua and I keep mixing those two up

fresh isle
cinder storm
#

panik

willow tulip
willow tulip
#

lol they fixed havingf a flashlight on in the car

#

flashlight is still wayyyyy brighter then vanilla though

#

flashlight is nearly obnoxiously HDR bright lol

#

heavy duty flashlight

#

at least they have more distance then the flashlight now in B42.14 lol

#

though thats also at 100% condition, they drop to half intensity/distance/focus at 0%

#

thats better.

#

... Ok maybe too much.

#

There.. thats not too bad.

#

Next need to add code to make rear lights turn white/brighter when backing up

tough oxide
#

i keep ending up in rabbit holes as i build something that hope will make people's lives easier while modding - but i do have a decent testing system now:

#

that testing output and coverage was one of the rabbit holes

#

or one of many
EDIT: (i committed to near zero outside dependences) which i normally hate, but i think the PZ community needs to agree on a package manager.

shy mantle
manic swift
pliant cypress
#

Question did build 42.14 ruin guns again

pliant cypress
#

And how do I transfer my hosted server to the newest update if it's not ruined

tranquil kindle
#

So it might be that if you have gun that uses that round, it might cause issues

pliant cypress
restive sinew
#

Hi everyone, I'm updating a mod for B42, and I need to know when a player has dealt damage to another player.

Old events like OnPlayerHitPVP / OnWeaponHitCharacter seem to be no longer used. Is there a new event or API method in B42 to get the attacking player's object when a player takes damage?

willow tulip
#

suggests (Client) OnWeaponHitCharacter: Triggered when a non-zombie character is hit by an attack from a local player.

#

PS: Thank you whoever added (Client) and (Server) to the events page!

#

@restive sinew You might also want the 'hook' WeaponHitCharacter

#

(though likely gets called for zombies and players vs zombies and players)

#

Do note: Not all events/etc are called on both client and server.

#

(most only one or the other)

grizzled fulcrum
shrewd tundra
# willow tulip

Hey this looks amazing. Are you modding the car lights? Is there any chance I can help you with that mod? I have an idea to improve some light sources but I have no idea how to modify them with code

willow tulip
#

Also kinda tempted to make another patch to turn down flashlights though -_-;

shrewd tundra
shrewd tundra
#

Like the car lights should be better than a normal flashlight and equal to a heavy duty flashlight

willow tulip
#

its like, DAYTIME bright, and even those 'heavy duty' flashlights are like 10W bulbs

willow tulip
shrewd tundra
#

Id like to improve the flood lights ilumination distance

willow tulip
#

Heavy duty flashlights where 1x 10W bulbs, I know because I had one as a kid I repurposed to run off a 18v drill battery with a 12v regulator that maxed out at 1.5A at best

shrewd tundra
#

Do you remember that mansion on 28 days later? The one the soldiers were using as safehouse

willow tulip
#

IMO this is what flashlights should look like:

#

that would have been nice and moody for flashlights

#

basically just need to swap flashlight and headlight brightness LOL

shrewd tundra
#

Do you have any file example on how to modify the illumination from the flashlights?

willow tulip
#

uh, just use doparam or load and change

#
        LightDistance = 15,
        LightStrength = 1.5,
        TorchCone = true,
        TorchDot = 0.53,
shrewd tundra
#

All right it looks "easy"

tough oxide
#

anything we should know about lua and mods in the new version? my simple one stopped working and cant get a damned error unless i force one.

shrewd tundra
tough oxide
# shrewd tundra Whats your mod about

its not really anything - took the Simple Stats and updated it for 42.13 cause it wasnt working then went on a tangent doing other things - either way it completely stopped working. i cant even get print statements to drop in the damned console.txt

willow tulip
#

ie: search for 'trace' in your console.txt and see if any stack traces exist

shrewd tundra
#

@willow tulip So I found the flood lights on the game files but im not able to find the lighting values

#
    {
        DisplayCategory = Furniture,
        ItemType = base:moveable,
        Icon = default,
        Weight = 0.5,
        WorldObjectSprite = lighting_outdoor_01_49,
    }```
#

I wonder if its possible to modify those values since this is not an item but a tile or "moveable object"

#

Also some methods for modifying the lighting

willow tulip
willow tulip
#
// lighting_outdoor_01_49
    tile
    {
        xy = 1,6
        BlocksPlacement = 
        CustomName = Lights
        Facing = S
        GroupName = Flood
        HasLightOnSprite = 
        IsMoveAble = 
        LightRadius = 24
        PickUpWeight = 150
        lightB = 200
        lightG = 255
        lightR = 255
        lightswitch = 
    }
faint pond
#

Hi, I'm working on my first mod which is supposed to be a simple retexture for the vertical american flag to a different flag texture but am having issues. I used TileZed to find the sprite in the correct Tiles1x.pack file and exported it as a png, edited it, then put it in a mod folder with the path FlagMod/media/texturepacks/Tiles1x/Tiles1x32. I'm not even sure that that's the correct way to do it but that's what I understood from online. Unfortunately after enabling the mod and testing it the model has not changed in game and I'm not sure what I'm doing wrong. Any help is appreciated and I apologize if the way I described it is unhelpful I'm new to this

tough oxide
#

whats a good event for when a player loads into the game fully? OnGameStart doesnt seem to be firing for me

#

or something else is going wrong

paper ibex
tough oxide
#

Iโ€™m just having a weird issue where my mod is loaded within the main menu Lua Debugger but not in the game

paper ibex
#

normally OnGameBoot for server. OnGameStart for client

tough oxide
#

Also - note for others - in the Lua Debugger change Lua to noise if you have debug prints

#

Thanks eScape

#

Thatโ€™s certainly going to come in handy

#

Is a tick a frame?

paper ibex
tough oxide
#

Right and no it wouldnโ€™t be a frame

bronze yoke
#

some systems have their own tickrates that are separate from that

#

'tick' ticks are just frames, entity ticks are 100/s, iirc climate ticks are one per 10 in-game minutes

dire oracle
#

Hey there, can somebody please tell me, Is there any way to grant 0x food and water consumation need by applying clothes?
Or constant food/water regeneration, idk

paper ibex
#

better not call /frame/ because we have OnRenderTick for game render , confuse

bronze yoke
#

they're the same tickrate so it doesn't matter

#

render frames and game ticks are the same thing in pz

paper ibex
#

is that from same thread or diff? i tot two different thread

tough oxide
#

yeah, thats what i was thinking too eScape

bronze yoke
#

rendering is in a separate thread but it's still synchronised to the main tick rate

tough oxide
#

right, which is why naughty mods doing too much kills frames - right?

bronze yoke
#

basically at the start of every tick the game tells the render thread to render one frame, and the game thread to simulate one tick, and the tick is done when both are finished

tough oxide
paper ibex
paper ibex
tough oxide
#

No apology needed - the other discord I frequent is a lot of ESL people

#

โ€œEnglish second languageโ€

pulsar stag
#

is TreeDamage a multiplier of the weapons damage applied to trees, or is it a flat number applied to trees?

cinder storm
#

alright im trying to update my mod but even with all mods disabled whenever i even select a mod the game crashes with zero exception in the console

shrewd tundra
#

Sometimes it goes black, sometimes the game just closes and boom straight into desktop

cinder storm
#

im gonna try verifying the integrity of the game files

#

ill see what modding changes ill need to make based on stuff i find around and my own findings

willow tulip
bronze yoke
#

i think they're 48/s

willow tulip
#

Hmmm, Might be right I recall there being some weird stuff with 48 and the time system

willow tulip
#

Physics runs at 100/s too

#

(even if server somehow lags, it will tick away for lost time)

#

another cursed concept in ticks: Not all ticks always occur.

#

Or in lockstep with other ticks -_-

modern mulch
#

Hey i was wondering what do y'all use to mod ? I'm used to intelij idea for minecraft but what about pz?

rain cloak
#

hello there ! if you wish to help me please ping me or send a DM ! i'm willing to make my first mod to experience the whole thing, more over willing to make a vehicule that will suit me ! i went through a lot of mods and didn't find the type of heavy duty vehicle i'm looking for, but i absolutely know nothing about how to make it, can anyone help me please ?

shrewd tundra
#

I was checking the files of the M998 HWMVV from KI5 and I was surprised by how many details this game has when creating a vehicle

rain cloak
#

to read them and to make a mod

#

thank you for your help though !

manic swift
#

Ay anybody know what the item โ€œBase.โ€ Of an empty bottle of cleaning liquid is?

rain cloak
manic swift
#

Yes

#

Nothing specifies empty

bronze yoke
#

an empty bottle isn't a different item

rain cloak
# manic swift Nothing specifies empty

found this: Base.CleaningLiquid2
but doesn't seems empty, is there any other info input that specifies empty or not ? are you supposed to use/find an empty one for your mod ?

manic swift
rain cloak
rain cloak
manic swift
#

Well I dont want to be converting anybodies plastic bottle into a different kind

#

I suppose i can put a warning in the mod description

rain cloak
rain cloak
manic swift
#

Im just making cleaning liquid

rain cloak
manic swift
#

Uhhhhhh maybe?

rain cloak
#

oh you're suggesting me to make it ? i don't know how to make a mod, i'm trying to though..

manic swift
#

Ive only made one previous mod so like

#

I am not much help here

rain cloak
#

you do ! at least you know where to begin

#

how to input a crafting recipe and combine items

manic swift
#

Kinda ish

#

I went to test this mod and it blew up zomboid so

#

May not be the best inspiration here

rain cloak
manic swift
#

Well it didnโ€™t even let me see

#

โ€œSorry, an unexpected error occurredโ€

rain cloak
#

you burned you pc ?

manic swift
#

Just refuses to open zomboid

rain cloak
#

have you checked files ?

manic swift
#

Im going to le console

stiff vessel
#

Is it just me, or does overriding basegame outfits in clothing.xml no longer work in B42.14?

#

If you add the outfit with a different name and different GUID it still shows up

#

But if you try to add the same name/GUID as a basegame outfit (i.e. to make a new item spawn on a basegame outfit) it no longer seems to work

#

It worked in B42.14

tough oxide
#

Iโ€™m not gonna lie Iโ€™m about to pitchfork this release but I still have some hours of testing and troubleshooting first but Im soaking my torches

arctic flicker
#

I hope this isn't a super silly question but I can't find much info about it. I have the sandbox options for my mod setup and working, but I want to put them under their own headings rather than just having one big list.
For example, something like the bellow

Headingname
option 1
option 2

Headingname
option 3
option 4

vast pier
#

What would be the best way to go about doing distributions of an item ?
There seems to be multiple files for distributions, but I'm not sure what ones are most up to date

paper ibex
# willow tulip Physics runs at 100/s too

It actually differs depending on the hardware. A server can run at 100โ€“150 FPS, which means 150 ticks per second. A low-end PC can be locked to 30 FPS (FPS lock).

This is based on my experience and research.

willow tulip
#

and this:

#
        int int0 = 0;
        this.localTime = this.localTime + GameTime.instance.getRealworldSecondsSinceLastUpdate();
        if (this.localTime >= 0.01F) {
            int0 = (int)(this.localTime / 0.01F);
            this.localTime -= int0 * 0.01F;
            for (int int1 = 0; int1 < int0; int1++) {
                (do physics things with cars)

...
latent pagoda
#

What is the best way to remove a vanilla recipe and replace it with a modded one? I am trying to to remove it but the other craft recipe shows up still

arctic flicker
#

You would just overwrite it, using the same structure and names as the vanilla lua for it.

willow tulip
latent pagoda
willow tulip
#

Bullet.stepSimulation(0.01F, 0, 0.0F);

#
            this.time = GameTime.getServerTimeMills();
        } else {
            this.time += (long)(10.0F * int0);
        }```
#

Hmm, I guess that might actually introduce an instability

#

oh, if over 10 physics frames occur it will drop... the remainder? lol

#

but yea, it basically will try and run 100 updates per second reguardless of how anything else is going

#

and will try to catch up even if a lag spike occurs

#

at least, for car physics

shrewd tundra
pastel wolf
#

Alright so, I've got my item made, textured, and rigged now, whats the most up to date guide for making a clothing mod?

shrewd tundra
#

You can type CTRL + SHIFT + O and search any file by name, or you can click the search icon and search for any item

pastel wolf
#

because I have no earthly idea where to go from here

shrewd tundra
pastel wolf
#

would be nice if it went over basic mod file structure stuff as well, oh well

shrewd tundra
#

Hold on theres another well explained guide here..

#

I would also recommend you seeing other mods structure to get a reference

rain cloak
willow tulip
#

lol I saw that ๐Ÿ™‚

pastel wolf
#

i realized I was wrong

willow tulip
#

I mean your free to put everything into common if you like to.. live dangerously ๐Ÿ˜‰

#

But most of us just put the translation keys and media in there.

vast pier
paper ibex
#

that is the best way ๐Ÿ™‚

#

by the best way maybe you mean just matching your workflow, so I can use that link as a ref

pastel wolf
#

now for the fun fun joy of me troubleshooting my mod and figuring out what the hell is broken in it as i go along... The first issue, the item exists! it has its icon, but mousing over it causes errors and its tooltip box is completely blank

#

And it oddly is using a tinted version of the icon despite me specifying it shouldnt be tintable in the clothing.xml

#

problem two, I didn't have a file guid table, fixed that! lets see if that was an issue

#

Issue one is definitely the tooltip issue

#

okay! progress has been made

#

the tooltip is showing up... but its giving constant errors now and not rendering on my character

vast pier
#
attempted index: list of non-table: null
function: Distributions_ImpRifle.lua -- file: Distributions_ImpRifle.lua line # 40 | MOD: Salty's Modular Weaponry
java.lang.RuntimeException: attempted index: list of non-table: null
-- Drug Lab Guns
table.insert(ProceduralDistributions["list"]["DrugLabGuns"].items, Schematic_PipeRifle);
table.insert(ProceduralDistributions["list"]["DrugLabGuns"].items, 1);```

I see zero reason why this should be returning null?
DrugLabGuns is in the procedural distributions, and I have ```require 'Items/ProceduralDistributions'``` at the top of the file ?
pastel wolf
# pastel wolf

Weirdly it has no encumberance despite me specifying it in the scripts... unless I messed something up of course

#

I'll come back around in the morning when more folks are around to help me out here!

pastel wolf
bright fog
#

There's quirks studying workshop mods won't teach you

pastel wolf
#

Will do!

worn fable
#

I've been attempting to look it up to no avail, but I've been wanting to make a custom model of my own for my character after having a mod of the such while playing with friends
is there any documentation on how I could do that here?