#mod_development

1 messages · Page 370 of 1

knotty stone
#

yea animal trailer has this stupid bug i never got rid of that you have to access the animal interface from the tires, when you stay at the back its buggy

#

you may want to delete the payload lua stuff if you want no influenced data

willow tulip
#

just got hung up by a weird collision bug where cars hitting cars you've previously been in would be like hitting a brick wall... but seems vanilla -_-

knotty stone
#

PayloadDamping.lua,PayloadDamping_Server.lua,MassUtil.lua

lusty drift
#

what would i need to call for a zombie to interact with things like a door, Windows maybe?

willow tulip
#

@knotty stone yea so something your mod is doing is preventing the semi truck from being a street clearing monster

#

I set a step van to 8000kg and 400hp and it actually had half decent acceleration, and could plow the hell outta traffic jams

knotty stone
#

So it's working now without the files?

willow tulip
#

didn't try deleting them yet.

#

just disabled the mod and made a stepvan with the same settings

#

stepvan is like 3 seconds to 30mph

knotty stone
#

The lua stuff should only reduce weight of the trunk when it's filled so it should not interfere.

#

But you never know abraxsDerp

willow tulip
#

Hmm, Seems to be like its at 1/4HP what it should be, so Im thinking I might have screwed up my overhaul (it multiplys 'overhauled' HP's by 4...)

#

Oh, I forgot to add Base.....

#

that mighttt help lol

#

yea that helps

#

reaches about 58mph after 11 seconds or so without a trailer now

#

and just plows through traffic jams

#

(even with many of the other vehicles being 1000~2000kg now)

strong hinge
#

Hi everyone! I'm currently updating some mods for Build 42 (42.13) and I’ve run into some issues with deprecated functions (like the old BodyDamage methods). Is there an updated API documentation, a wiki, or a spreadsheet where I can check the new function names and changes for B42? Any help would be greatly appreciated. Thanks in advance!

bronze yoke
willow tulip
#

I also find it funny how the semi doesn't even notice the little car that got stuck on it

knotty stone
willow tulip
#

Pretty much

#

I don't supposed you have any engine sounds you wanted to use?

#

I just need 1 solid RPM tone of an engine noise, exhaust noise, and ideally startup/shutdown (but thats kinda optional I guess)

#

Else i'll just assign one of the 4 iv already made up

knotty stone
#

Don't have anything like that.

willow tulip
#

Ah k np

#

I should prob figure out a way to add the 8 speed PSC transmission to the patch too. -_-;

#

but that'd mean removing it from PSC -_-...

#

Oh well. Maybe another patch some other time.

#

(project summer car actually makes W900's spawn with a unique 8 speed transmission)

#

So yea, if I don't include engine sounds, the patch is just:

#
local carData = require "Realistic_Car_Overhaul_Data"

--Kenworth W900
carData.vehicleValues["Base.SemiTruck"] = {horsePower = 425, weight = 8164, cargo = 100, engineSound = "Engine1"}
carData.vehicleValues["Base.SemiTrailerVan"] = {horsePower = 1, weight = 3140, cargo = 5000, engineSound = "Engine1"}
carData.vehicleValues["Base.SemiTrailerCistern"] = {horsePower = 1, weight = 4140, cargo = 100, engineSound = "Engine1"}
#

Oh, I forgot the other semi truck

#

But yea. :0

#

I'll work on dressing it up with requires and/or tollance of the mod not being installed

#

Next I need to work on an example dash for project summer cars dashboard system at some point -_-;

whole bolt
#

@willow tulip What's the tooling/env you use for modding PZ?
I gave up on the whole thing because I was trying to read the scripts (with the Lua extension on VSCode) and mess around with the in-game debugger and it was slow and frustrating.

whole bolt
#

jump to definition, find usages, etc. never worked and it was hard for me to figure out what was doing what

willow tulip
#

the ingame debugger is.... Kinda meh with how often locals are just.. missing

willow tulip
#

with directories for the games lua and java.. I honestly should just make a single folder with a copy of all that.

whole bolt
#

so you're basically reading the scripts with Notepad++ and just looking through files and FAFOing?

willow tulip
#

yep

#

generally trying to see how things are used in vanilla and immitate that

#

Or just outright copy/pasting large chunks of vanilla code and then go to work butchering it

#

My engine menu is the mechanics menu, after much, much butchering

whole bolt
#

Alright thanks

willow tulip
#

Don't entirely recommend programmers notepad but whatever, lots of looking up how vanilla does it since the docs are sparse

whole bolt
#

I recently switched to VSCodium because I hated the constant prodding to use AI
I'm sticking to that because of familiarity

willow tulip
#

lol.

whole bolt
#

though if I ever feel masochistic I might try vim/vi for the hacker cred

frank elbow
#

I've only used vim here and there but it really isn't so bad

#

Using vi for development does sound masochistic, but vim would probably be alright

willow tulip
#

wait

#

how little sleep was the guy who coded this have?

#
        @LuaMethod(name = "addPhysicsObject", global = true)
        public static BaseVehicle addPhysicsObject() {
            int ID = Bullet.addPhysicsObject(getPlayer().getX(), getPlayer().getY());
            IsoMovingObject obj = new IsoPushableObject(
                IsoWorld.instance.getCell(), IsoPlayer.getInstance().getCurrentSquare(), IsoSpriteManager.instance.getSprite("trashcontainers_01_16")
            );
            WorldSimulation.instance.physicsObjectMap.put(ID, obj);
            return null;
        }
#

it.. only returns null?

#

and why is its return type.. BaseVehicle...

bronze yoke
#

it could be that it used to return something and this avoided breaking API changes

willow tulip
#

for the function that adds trash cans at the players position? Yea im sure so many mods are using this.

#

its like some weird debugging function gone wrong lol

frank elbow
#

Technically, since any object can be null in Java, no lie was told (/hj, of course it is misleading lol)

whole bolt
willow tulip
#

also, IsoPushableObject?

#

leads me to IsoWheelieBin

#

someone was uh, having fun

bronze yoke
#

go easy, that's pre-steam code 😅

willow tulip
#

lol.

whole bolt
#

Wait now I'm angry

#

why is it calling Bullet?

#

Why is it "PushableObject" when neither a bullet nor a vehicle are pushable? Do they mean pushable over the wire? Why not call it serializable?

#

Why does the obj not need an ID on creation? why isn't the ID generated by the constructor or a factory or an injector? Why does the call to physicsObjectMap need both the obj and ID as args?

willow tulip
willow tulip
whole bolt
#

oh that's probably a third party lib

#

wait, the library itself has a singleton that you call to do everything

#

...Ok I wanna forget all this

willow tulip
willow tulip
#

Sorta like how there is a singleton for 'everything in fmod' except it hardly lets you do shit either

severe ore
#

I definitely found a buggy world. Probably caused by some of the mods i am using. It has almost no hammers!
Onky found 2 hammers, onde of them worn, and i visited at least 6 hardware stores and warehouses, and several garage storages. I am actually using debug mode to teleport and visit many different places.
So i wonder.... when do hammers (or any intentoryitem) materialize? When i touch its container? When i enter that building? When i enter that cell?
I know there are tables with ´loot´ odds for every item, but i wonder when do the actual items are created

#

I want to find out which mod is f*** my game

severe ore
#

makes sense! Now i just need to find which event it triggered on that moment and try to debug it

#

I could also apply some "binary search" to see which mod is supressing most of the hammers.
I keep a savegame just before teleporting to a new cell with a hardware store. Disable half of the mods, teleport and see what happens

#

then i restore the samegame and try again

#

Finally found another hammer. The first hammer i find in a crate. The other good one was inside a toolbox

tough oxide
#

so i created this table that acts kinda like an abstract class - what features would you want on a class that doesnt extend a PZ object/table?

severe crow
#

how much does map size affect the performance of the game?

willow tulip
severe ore
#

I have a deep fascination for procedural generation. I think maps are not procedurally generated (yet). The loot is.
I would expect a good implementation of the PG in zomboid would generate always the same objects in the same locations.
So if inventoryitems are ' materialized´ when we enter a cell... i expect each cell to have a predermined seed of its own, based on the original seed. The moment/order in which the player enters a cell is not predermined, so the (sub)seed for that cell is fixed.

#

This makes even more sense for multiplayr games. We don't know who and when enters a cell for the 1st time, so we have to reserve seeds for each cell when the game starts

whole bolt
severe ore
#

hmmm didn't even know there were areas out of map bounds

whole bolt
#

AFAIK, loot generation isn't deterministic.
With the exact same seed you may find loot in a building, or you may not. It may be already ransacked. It may have different loot. It's pseudo random

#

pseudo because it still depends on location flags and sandbox settings

severe ore
#

it can be ransacked later, of course, but i was expecting the generation to be the same

#

yes, there are settings that affect loot generation

whole bolt
severe ore
#

but can we say that for the same seed and settings the loot location is the same for tht cell?

severe ore
#

its the solution that makes more sense, from a design point of view

whole bolt
#

because the loot isn't generated when the run starts, but when the map chunk loads

severe ore
#

Yes, i know i can test this.
I was playing around with this as a found a world with almost no hammers! and i want to know which mod is causing that.

#

Yes, its lazy generated, on demand. When the cell is entered, it seems

whole bolt
severe ore
#

But that´s why i say each cell should have its own seed assigned in the beginning.
A pseudo random generates always the same sequence of results for each seed.
So to make sure the items are the same in that cell for that seed and settings, we would need to make sure that cell loot starts from a fixed seed, which is not picked up randomnly. Its picked always the same way in that world

severe ore
#

Yes, its a mistery. I will probably never discover what the problem is.
But... now i am going to generate a new game, with the same seed as the buggy one, without mods, debug mode and will teleport to that hardware store, and see if at least one hammer shows up

#

I migth never discover which mod, but i want to confirm it was a mod. And i might also check my theory about loot generation

severe jay
severe ore
willow tulip
#

Pretty sure it already is more or less undeterministic.

shy mantle
#

What about pre-looted buildings? Would the windows and doors break when you enter?

#

I don't think they have it seperated

willow tulip
#

the pre-looted status can be generated before, im just saying the container contents could be generated later

#

less lag when just driving around in new areas

severe ore
#

what makes procgen amazing is that capacity of reproducing a world exactly given the same seed and properties

willow tulip
#

(the loot tables are IMMENSE)

shy mantle
#

It's true, there needs to be a solution for that

#

Slow load was a cool debug feature, they could render in chunks smarter

willow tulip
#

also not sure if loot even is deterministic atm. that would require synced random number generator seeds.

#

pretty sure iv reloaded a save and gotten new loot and vehicle spawns/etc in an area too

#

so yea, PZ is not deterministic, other then world seed defining a few things like basement spawns IIRC

shy mantle
#

Yeah, seeds do basically nothing

#

basements and voronoi noise

#

such wow

#

I feel like they could do better with that

#

Keep in mind you can see the seed of a MP server you're in, so maybe they should fix that before having seeds to more

severe ore
#

good point... public seeds in MP games could be exploited, if loot is fully deterministic

#

i think the seed of the MP game should not be public, ot at least have a private part

#

Why am i running all the time and bumping into walls? i must have hit some key before...

#

its normal now

#

so... i have good news and bad news...

#

good news is.... MP game seed knowledge cannot be exploited

#

and that causes also the bad news.... not only the loot is totally unrelated to the seed, but even the player spawn location is not determined by that

#

I am disappointed tired

#

It would be a nice improvement to have a truly deterministic loot generation.
I think its possible, and for debugging/troubleshooting is useful

mellow frigate
torn igloo
#

Hello modding guru, is listFilesInModDirectory recursive?

bronze yoke
#

no

thin reef
#

Hello! I'm attempting to make mod for the first time, its a simple recipe mod to be able to craft spare engine parts using vanilla materials.

So far the mod has worked in SP and self-hosted MP environments, however I am struggling at getting the mod to work on a dedicated server. I've double checked that the mod line in the server.ini file is formatted like \modname and that the workshop id has been copied into the workshop line of the ini file. When attempting to the join the server without being subscribed to the mod, it does force me to subscribe before joining, however when loaded in game, despite meeting all the requirements, the recipe does not appear in the crafting menu.

Any pointers or guidance would be greatly appreciated, and if you need any additional information, please let me know! Thank you!

mellow frigate
bright fog
#

It's a bug

thin reef
bright fog
thin reef
bright fog
#

I need to add diagnostics for these it seems

thin reef
queen prairie
#

Is it possible to use a c library in a mod if that library has a luaopen_* function?

bright fog
#

idk how tf your recipe worked in the first place tbh haha

bright fog
#

Or at the very least you'll need some kind of manual installation at any point if I had to guess

queen prairie
bright fog
#

You can test it out tbh

#

If it does work tho, that's a bit of a huge discovery, but yea I doubt it 😅

queen prairie
#

Ok thanks, would be nice to just use existing code for mods instead of reinventing everything in lua...

bright fog
#

C libs loads by Lua mods are likely security flaws tbh ?

#

Else there's plenty of Lua libraries out there

queen prairie
bright fog
#

Will require manual installation of something

#

There's tools out there that were made by some servers to communicate with the game

#

Tho I don't know any links to any, but you can definitely find some projects like that

thin reef
bright fog
thin reef
bright fog
#

Show what it looks like now ?

thin reef
#

The in game menu?

bright fog
#

You say it works in SP but not in MP ?

thin reef
bright fog
#

MP is so fucked rn when it comes to recipes it's insane

thin reef
#

in game crafting menu in sp for reference

bright fog
#

I have no idea sorry

#

Maybe try to add a recipe translation ?

#

That's the only thing I see missing

thin reef
#

I shall give that a try, thank you for all your help though its really appreciated 😊

mellow frigate
#

and maybe ensure your MP player has the right prerequisites to know the recipe 😉

torn igloo
#

I have spent hours figuring out why MP -debug doesn't work for my MP mod and realize the game simply doesn't like having craftRecipe as a sub mod. Then, eventually figure out that the game simply doesn't like having craftRecipe calling for output items that does not exist within the sub mod. I am not sure if said behavior applies to vanilla items as well but you might want to try, by having the said items script in the mod.

bright fog
frank elbow
#

The game uses Kahlua, running on Java

cinder cedar
#

So, if i have a dream of a mod, a mod that does 1 thing out of 10+ i am wishing for, and no idea about scripting or editing, how would I go about sweet talking one of you smart people into doing a quick hack and make a branch of the mod in question? There is no need to make new sprites, basically jsut copy the existing sprites ten times over, and link them to other things... I think...

frank elbow
frank elbow
#

Huh?

bright fog
#

We don't have such a channel

#

mod_ideas

frank elbow
#

There's a thread here

bright fog
#

Ah

frank elbow
#

I realize I phrased it in a potentially misleading way now that you say that, though

bright fog
#

I doubt anyone looks at that thread anyway

frank elbow
#

Yeah I wouldn't imagine many of them got picked up 😅 but it's something

cinder cedar
#

welp, thanks, i think. Answer seems to be to try a thread nobody seems to use, learn to do it myself, or hope for a miracle.

frank elbow
#

Learning it can be quite fun, if commissions are off the table 😄 and you can always ask for help here or in the modding discord

#

The pins have resources on how to get started with modding, if you decide to go that route

cinder cedar
#

And whom would I be talking to, and where, about a commission?

frank elbow
#

There's a link to the discord there, you'll need to opt-in to see commissions

cinder cedar
#

Many thanks for the link. Very much appreciated

queen prairie
#

Anyone knows how to send a message to all clients in server side lua, like "server restart in 10 minutes"?

mellow frigate
#

I guess, I did not test

queen prairie
mellow frigate
queen prairie
sour island
#

You have to tell the server to do something generally through a network command

#

sending that even as a host would most likely send that from your 'client'

thin swan
# cinder cedar Many thanks for the link. Very much appreciated

Also, you said the c-word in a public pz channel, you will be getting a lot of dms from people saying they can help you lol, don't trust them

Sometimes they also hang around the modding discord, and reply to threads, so make sure to search their name in the server or something to make sure they're an active member and not someone trying to scam you

patent lichen
#

anyone willing to help me resolve an issue Im running into (I have recipe consuming the proper items and producing the results item wise however the OnCreate hook defined within the recipe is triggering this warning "WARN : CraftLogic f:70987, t:1770568091841, st:64,517,144,886> CraftRecipeData.initLuaFunctions > Could not find lua function: CashToServerzPoints.GiveServerzPoints10 "

#

and fails to perform the defined sendClientCommand (despite the function being defined in a lua file inside the client folder)

willow tulip
#

Id assume they would run on the server.

#

at least in B42

patent lichen
#

I am trying to use the sendClientCommand opposed to sendServerCommand

#

but maybe I should use the servercommand

#

sendClientCommand(getPlayer(), "ServerShop", "add", { getUsername(), 10 })

#

using the sendClientCommand just sends a request to the server for the change to be made

#

oh well I'll try using both and see what happens xD

willow tulip
#

then slap a print("UNIQUE STRING NEVER USED BEFORE") in there

#

and see whose console.txt it shows up in

bronze yoke
#

oncreates are server-sided

patent lichen
#

so using the sendClientCommand wouldnt be advised opposed to using something like sendServerCommand?

bronze yoke
#

the server can't send a client command to itself

patent lichen
#

in game the money is consumed and the receipt is generated however OnCreate call throws a warning in console and the player doesnt receive the zPoints

#

and from what I read if the OnCreate is defined in the recipe the function doesnt need an event right? b.c it should fire after the recipe is completed, however it isnt happening like that xD

#

I also have the Recipe_EN.txt file in translate folder

bronze yoke
#

the server can't see a function in the client folder

patent lichen
#

yeah I tried it in the server folder and shared as well

#

but same error

#

wasnt sure if I need more logic to initialize the recipe or something

#

or maybe I need to add an Override = true to the recipe?

#

thanks for the pointers tho much appreciated!

willow tulip
#

Instead.. just call functions.. on the server.. from the server.

#

... without sendanythingcommand()

#
    giveThePoints(100);
end```
patent lichen
#

gotcha the sendClientCommand isnt needed

willow tulip
#

though I believe oncreate gives you a few parameters.

#

function Recipe.OnCreate.OpenCannedFood(craftRecipeData, character)

#
    giveThePoints(character,100);
end```
#

is likely what you want

#

(craftRecipeData lets you muck around with the outputs IIRC)

#

Like you could have it give you an item with <X> uses by mucking around with craftRecipeData instead of a full item

patent lichen
#

thats the recipe for both

willow tulip
#

Yea, you could do something silly like make Base.Receipt renamed based on how much money they donated or something.

#

heres some sample code:

#
function Recipe.OnCreate.OpenCannedFood(craftRecipeData, character)
    local items = craftRecipeData:getAllConsumedItems();
    local result = craftRecipeData:getAllCreatedItems():get(0);
    local jar = items:get(0);
    local aged = jar:getAge() / jar:getOffAgeMax();
    result:setBaseHunger(jar:getBaseHunger())
    result:setHungChange(jar:getHungChange())
...
patent lichen
#

with you adjustments to the lua it should work

#

and I shud throw it in server or shared?

willow tulip
patent lichen
#

so the client folder was okay xD

willow tulip
#

Client gets access to client, shared and server

#

Server gets access to shared and server.

willow tulip
patent lichen
#

gotcha

#

xD

willow tulip
#

But make sure to wrap any code you don't want the client trying to compile/etc with if not isClient() then

#

(Note: this allows it to execute in SINGLE PLAYER, as isClient is false in single player)

patent lichen
#

will do thanks again!

outer crypt
#

Is it still possible to pass a string through a timed action now that it needs to go through the server? I used to send a string through the process but now the server does not see that value when it runs.

#

works fine in single player of course and I have the actions in the shared directory, etc.

#

called from the client like this: ISTimedActionQueue.add(UseHotDogMachine:new(player, HotDogMachine, soundFile, foodType, squareToTurn))

#

function UseHotDogMachine:new(character, machine, sound, food)
local o = {}
setmetatable(o, self)
self.__index = self
o.character = character
o.machine = machine
o.soundFile = sound
o.foodType = food
o.stopOnWalk = true
o.stopOnRun = true
o.gameSound = 0
o.maxTime = 240
o.lightSource = nil
return o
end

#

food is the string I am trying to use as a switch in the complete later on

bronze yoke
#

when creating the timed action on the server, the server just calls new() with the values of the fields with matching names from the client

outer crypt
#

okay so I should have done foodType on both or food on both

#

Thank you, I guess that should have been obvious but I was missing it. I appreciate you 🙂

fast sparrow
#

heya, i would like to know how to add custom radio and tv transmissions

analog mesa
#

Keep getting this error, not sure what exactly is causing it. Happens on new game so I believe its my code but I still seem to get my items

silent zealot
#

Removing entries while iterating through a list with a for loop will cause issues.

analog mesa
#

Unless its some kind of mutability problem I dont think so

#

Only seems to happen on the server as well

#

Believe it happened even when I didn't have two add items, not sure which ones working

silent zealot
#

what does the print line show?

#

shoudl give a clue, unless it prints on teh client and errors are on teh server

#

Also, does it give errors in single player?

analog mesa
#

No errors in single player

#

Doesn't seem to print to console.txt, error does though

silent zealot
#

add more print statements until you can figure out exactly which line triggers the error (unless it's in the error message below the section you pasted)

#

though... that error being in gameclient update...

#

makes it very weird.

#

as if teh server sending the "new item here" command to the client causes the issue somehow

#

like it's sending a broken array as data?

willow tulip
#

Hmmm

#
function recalculateItemHappyness(baseItem, cookingLevel)
    local data = baseItem:getModData();

    local ingredientBonus = 0;
    -- Ingredients first
    for key, value in pairs(data.cookingData.foodList) do
        local compensatedValue = value*0.1;
        ingredientBonus = ingredientBonus + math.min(compensatedValue,compensatedValue^0.5) 
    end
    -- Next, add in spices. 
    local spiceBonus = 0;
    for key, value in pairs(data.cookingData.spiceList) do
        spiceBonus = spiceBonus + value ^ 0.5; -- 0.5 exponent of deminishing returns on each spice, but unlimited amount counted.
    end
    ingredientBonus = math.min(ingredientBonus,ingredientBonus ^ 0.7); -- keep exponent from increasing tiny meals bonus
    spiceBonus = spiceBonus ^ 0.7;
    
    -- Should we add? Or something where spices have a bigger influence on an already good meal?
    baseItem:setUnhappyChange(data.cookingData.baseUnhappyness + ((spiceBonus + ingredientBonus) * (cookingLevel+1) * -1))
    baseItem:setBoredomChange(spiceBonus * (cookingLevel+1) * -4)
end
#

Kinda feels like it needs some RNG... lol. or that minigame to manipulate the results some..

#

Basic idea is, you want to add (up to) 10 hunger of multiple ingredients 'for ideal minmaxing' and 1 hunger of each spice, but you can add more with diminishing returns. Cooking level also multiplies the resulting happiness/boredom buff by level+1

analog mesa
fervent wraith
#

anyone know what the b42 replacement for getGameTime():getWorldAgeSeconds() is, cant seem to find it in any of the websites ive gone too

silent zealot
#

maybe getWorldAgeHours()*3600?

#

Lazy sods can't even be bothered to check sandbox variables for the starting time:

fervent wraith
#

Lol thanks u read my mind

paper ibex
#

if you need irl time

--- [SHARED]
--- Return a numeric timestamp (seconds) for real-world (system) time
--- Returns an integer (math.floor)
function Utilities.GetIRLTimestamp()
    return math.floor(os.time())
end
fervent wraith
shy minnow
#

Im trying to port an fallout armor to the game, I managed to get the helmet but the chestplate doesn't work, when I "All Transform" the chestplate on blender, it does a tiny little line in-game look

#

Can someone help me please ?

silent zealot
#

Is the chestpiece rigged to the skeleton? (eg: like a jacket that moves and deforms with the player model)

#

Or is it a single static non-flexible model piece? (e.g.: like a backpack that is stuck to a specific bone)

shy minnow
#

Here's the original chesplate that Is mounted on

#

And when I replace the model of this chestplate by mine (just replacing the models, the names are still the same)

#

It despawns

#

I don't remember yesterday how I managed to get this little line between the character legs

#

But today I just remplaced on blender the original chestplate model with mine, I used ctrl + l to link object data and ctrl + a to all transform

#

Idk whats wrong

silent zealot
#

Maybe something with needing to export bones/links/transformation? I can't recall details, but I can recall things being very fussy with the exact object structure when I did some very simple clothing modding

#

There was a nice tutorial linked from the wiki that went through it

shy minnow
#

Because when I put my models It despawns

#

But I putted vertex groups and armature

#

Litteraly the same

shy minnow
#

Can someone explain to me how I can attach/rig my chestplate to the character ?

queen prairie
#

Can a mod send a global message like \servermsg does?

#

sending the message with processGeneralMessage() seems to pick a random player as sender even in server lua code

knotty stone
#

@karmic elk do you remember which 1 story house you wanted to bulldoze and the roof was not getting deleted?

karmic elk
knotty stone
#

i only found these trailer park houses not working

karmic elk
#

Yes, those are broken, good find. I think that will fix many, but If you go to Riverside, there is a hotel 'Riverside Aparments' or something, near the river where it has a double story roof (which gets removed) but there is a drop down section of single story and that won't delete and causes a collision.

#

Same with some houses in Westpoint.

#

Also, if you dont' mind, do you think you could add 'street decorations' and 'road signs' to the delete list please?

knotty stone
#

i have, just doing the roof stuff you mentioned right now

karmic elk
#

I know there is a flat roof that has a corrigated metal undulating effect as it's texture. That doesn't get deleted either... just trying to think where that is. I'm sure it's on the Riverside hotel...

white imp
#

guys all mods work for me other than clean ui and clean hotbar can someone help me fix this ?

frank elbow
#

If it was picking a random player in “server Lua” then I imagine that code was actually running on the client

queen prairie
#

to print an alert modders can use in the client lua ISAlert.instance.servermsg = message ISAlert.instance.servermsgTimer = 10000;

frank elbow
#

Worth noting that this won't create a chat message like typical server messages do

queen prairie
#

yes

frank elbow
#

But if that's alright for your use case then that's certainly simpler

queen prairie
#

but the chat message caused some headache, like the message gets sent by multiple users multiple times even if only one processGeneralMessage() in the server lua code was used

frank elbow
#

That's likely because your code is not actually limited to the server

#

The Lua in the server directory runs on the client too

queen prairie
frank elbow
#

It's certainly odd 😅 the server doesn't run anything in client, but the client runs everything

willow tulip
#

yea I hated when I found that out lol

frank elbow
#

You can use the isClient and isServer functions as guards

#

You'll see a lot of if isClient() then return end at the top of Lua scripts intended only for the server (and if it shouldn't run on singleplayer either, if not isServer() then return end)

shy minnow
#

='m trying to make an additional mod for Fallout mod power armor, and I'm having trouble changing the chest plate, for example. To test it, I took the original chest plate and merged it with mine, but in-game, only the original chest plate spawned. I then cut out the original breastplate in Blender and kept only a small part of it with my breastplate model. As a result, in-game you can only see the small part of the original breastplate. I conclude that pz only spawns the original breastplate, but why not mine? Can anyone help me? Thank's in advance

grizzled citrus
#

Might be the wrong chat, but is there a mod that makes your character hold a rifle in the low ready position and a sidearm in close retention? Or one or the other?

tranquil kindle
shy minnow
#

Never heard of that

#

How can I do it ?

tranquil kindle
#

Here is guide, but if you don't know blender much, it might be tad difficult

shy minnow
#

Oh yeah I see but the parts that is showed is not weight painted

#

I don't quite understand

#

This part surrounded is shown in-game but in blender the weight is full black like mine

tranquil kindle
#

i only assume its left over from other armor you mentioned deleting

shy minnow
#

Thanks a lot

#

It was the weight paint

#

But I got a question, what it means the color of the weight paint ?

tranquil kindle
#

I suggest watching tutorials about that, they will explain it far better than few messages from me

shy minnow
#

Do you know maybe why it does that ?

#

How can I fix it ?

tranquil kindle
#

Have you even attempted to read my guide at all?

#

I do know why it does it, but if you'd follow the guide (especially part with doing hat and weightpaint) you might've got it first try

shy minnow
#

I'll follow it thanks tho

tranquil kindle
#

Apply transforms to armor

shy minnow
#

And when I walk the whole chestplate is moving as if the chestplate isn't connect to the bones

tranquil kindle
shy minnow
#

<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
<m_MaleModel>media\models_X\Skinned\Clothes\PFO_PA_FRAME_X_O1_BodyArmorPlate.fbx</m_MaleModel>
<m_FemaleModel>media\models_X\Skinned\Clothes\PFO_PA_FRAME_X_O1_BodyArmorPlate.fbx</m_FemaleModel>
<m_GUID>1bd64751-193e-41c6-9d54-d9e51710bc61</m_GUID>
<m_Static>false</m_Static>
<m_AllowRandomHue>false</m_AllowRandomHue>
<m_AllowRandomTint>false</m_AllowRandomTint>
<m_AttachBone></m_AttachBone>
<textureChoices>PA_Frame\X_O1\X_O1_BodyPlate</textureChoices>
</clothingItem>

tranquil kindle
#

And to which bones you parented it?

#

weighted it*

#

Armor like this you don't really wanna weight to single bone

#

Torso would probably be weighted with Spine and Spine1 bone, where panty part would probably be pelvis with some Spine weight to even out

shy minnow
#

I didn't understand that you need to weight paint all vertex groups like pelvis etc..

#

I just did transfer weights from the weights menu from the original to the new one

#

and its perfect

#

Thanks !

#

Do you know by any chance how to move the head position ?

#

Because the head is too far ahead

shy minnow
#

Nevermind I figured out

paper ibex
#

it will cause fewer headaches when you modularize all the files and control what calls them with events.

paper ibex
frank elbow
#

If it's at the top of the script, that isn't really a problem since it'll only run where the statements indicate

#

i.e., an if isClient() then return end at the top of a script in server doesn't really make the code more difficult to debug, it just prevents it from running on the client

#

Not that I'm against modularization. I think writing modules by default is ideal. I just don't think if statements that use one of two clearly-named functions are at all problematic

paper ibex
#

It will just add some noise to read those files. On top of that, they normally have multiple require() calls, global variables, and local variables. Adding an extra guard is like band-aids of "well, idk whether the client will run this file or not-just to be safe."

frank elbow
#

You do know whether it runs it, though

#

The guard is specifically to prevent the content of the file from executing on the client because the behavior of which files runs is well-defined but counter-intuitive

#

So it isn't just noise, it's an intentional prevention of running code intended to be server-only on the client. Such checks would likely exist in the code regardless unless you're exclusively relying on events running on one end only

paper ibex
#

btw, this is an architectural design problem, maybe related to when TIS ports SP to MP

frank elbow
#

What do you mean by “ports SP to MP”?

tough oxide
#

man, completely hijacking a bit here, i've been knee deep in writing a lua library for better OOP stuff...

paper ibex
#

from here

bronze yoke
#

i don't feel the 'noise' argument is strong when talking about something that serves a clear, irreplaceable, and very basic purpose

#

it is a shame that we have to do it, but i wouldn't ever argue against doing it

tough oxide
#

it seems to be pretty good, but are there anything that you guys wish you had but dont feel like implementing? right now i feel like i have a pretty good inheritance system with some utility and have been working on a "collection" class

frank elbow
#

Nothing comes to mind—if I want something I typically either implement it or add it to a list of TODOs lol

tough oxide
#

fair

#

how do you guys feel about like.. fluent collections?

frank elbow
#

What sort of collection class?

#

Fluent 👀

tough oxide
#

yes

frank elbow
#

As in, project fluent?

#

Or the design principle

tough oxide
#

like instance.method.chaining

#

you do calls to reduce a collection and each call return a new instance of a collection until you get what you want

frank elbow
#

Any examples specific to collections? Honestly I find that a simple table meets most of my use cases but I'm interested

#

Ah, I get you

tough oxide
#

so your code reads a little nicer*

#

regardless - i feel like i have to do it, but it'd be cool if it^ was also wanted

frank elbow
#

I'm not in the target audience necessarily but it certainly sounds useful

tough oxide
#

imagine getting rid of the for calls

#

im literally just spinning my wheels learning lua and this kinda hooked me in

paper ibex
frank elbow
tough oxide
#

ill update my current repo and if you feel like it - take a look and feel free to be brutally critical - the one question i cant fully answer is why.. lol

bronze yoke
#

if you're worried about files having multiple isClient()/isServer() checks e.g. in functions, i do find that complicates things and is something to be avoided in typical cases

tough oxide
#

its a full on tinker project so im not totally attached, but i do have high hopes of making it more if theres anything interesting that people like

paper ibex
tough oxide
#

like properly hooking into the event system easily with all of the considerations considered for you

#

but this is like the baseline im starting from to build out

#

also i wanted to add some level of type safety that people could have for "free" *

#

while also adding some types that PZ doesnt have natively

#

Well pz and lua

#

again, im happy with any butal honestly and if you wanna really yell at me - my dm's are pretty open

willow tulip
#

Maybe im doing it wrong but playing sounds from server code (aka timed actions) is cursed:

#
        if isServer() then
            playServerSound("PZ_MetalSnap", playerObj:getCurrentSquare());
        else
            playerObj:playSound("PZ_MetalSnap");
        end
#

(also why there are missing sounds for mechanic install/removal failure in SP)

sour island
#

I made a github issue interface (supports steamOAuth) for bug reports to my mods https://chuckleberry-finn.github.io/issues/ looking for feedback from my fellow modders. I plan to expand a bit more on the form section.

rich reef
#

Hey everyone, I've got a question in regards to caching data.

If I use something like player:getStats(), can I cache the Stats object, or does it change constantly?

What about player:getBodyDamage() ?? Does that data change, or can I cache this once and pull from it constantly?

I'm trying to optimize my code and clean things up, and am wondering what is/isn't able to be cached safely.

I'm assuming if I cached this data, that I'd have to check if the player/character died/doesn't exist and then reset the values if so?

Please let me know if anyone has any insight on this, thank you!

sour island
#

I've heard/understood that setting it as a local earlier in a function and calling on that down the line is better (not sure if it's even registerable performance wise, but it does help reading the code months later when you've forgotten it all)

#

creating references to objects shouldn't cause any issues generally

rich reef
#

Alright. So, for instance, if I use local stats = player:getStats(), will that data change over time? Or is this caching the reference to the object itself that stays updated? I guess that's what I'm trying to figure out. If I have to constantly 'grab' the stats data on each function call, or if I can just set it as a local variable and use that.

sour island
#

Not sure if Im being pedantic, but that's just a reference - and is safe to reuse as a reference 😅

#

Not sure I'd call that cacheing, but I could see an issue if you keep a table of references but you generally won't ever have to do something like this

#

the local being within a function for repeated referencing is the usual

rich reef
#

Hey no worries, I appreciate the corrections and information!

sour island
#

storing it in a module (table of functions and other variables) might be riskier(?) Someone with more knowledge on the garbage collection of PZ would have to chime in

rich reef
#

I was reading into "weak tables" and setting that to allow garbage collection, but I think thats far beyond the scope of what I'm doing.

I'm mostly just trying to get this information/reference called once at the beginning of the player's game session, and then be able to use that unless they die/object changes. Trying to figure out the safest way to do that and not have to constantly call stuff I don't need to.

bronze yoke
#

and yes, those objects are all safe to cache, as far as i know they never change, and they definitely won't change within the scope of a function or something like that

rich reef
#

Say for instance, I have this code, and then a player dies/respawns. What would occur? Would this point to an incorrect reference? Or would it retain the reference still and continue to work?

local player
local stats
local body

local function OnStartCacheFunction()
  player = getPlayer()
  stats = player:getStats()
  body = player:getBodyDamage()
end

local function SomeFunction()
  print(stats:getFatigue())
  print(stats:getEndurance())
  print(body:getOverallBodyHealth())
end
#

I guess the real question is, when is the best/safest time to cache a player reference, or other references? Are there Events that always get called when a player spawns/creates a new character after death that would be valid for this?

bronze yoke
#

that would be an issue, a new player will have a new object/stats/bodydamage

#

there is really no need to cache on this scale, getting stats or body damage is not expensive

rich reef
#

I am making a Sleep Deprivation mod, that causes issues for players that try to push past sleep on fatigue enabled servers by using copious amounts of energy drinks, coffee, eating uncooked tea bags (...rolls eyes...)..

I currently have the mod update every 1 minute once they reach past a certain threshold, and I was worried about having to constantly get this data so often and if it'd cause unnecessary usage over time.

#

If a player does die, how can I check against that to halt my code from running and throwing errors?

I'm assuming I can hook into an OnCreateCharacter or similar event to change those variables if/when a player starts with a new character?

bronze yoke
#

i really just wouldn't cache it, it adds a lot of work and mental overhead for what is really a micro-optimisation

#

if your code does end up causing noticeable lag it won't be because of a couple getters

rich reef
#

Okay, thats a fair point.

In the case of a larger more complex mod where I may need to cache values, do you know of any that do this type of thing effectively that I can reference?

And in the case of an Event that's runs every 1 minute, I guess I should just check if player is nil and return from there to stop errors in case the player dies?

bronze yoke
#

it won't become nil if they die

#

objects can't really be destroyed in java (they are garbage collected once there are no more remaining references to it), your variable will always point to that object even if the game stops using it

#

we use isExistInTheWorld() to check if an animal is still 'real' for the horse mod, i don't necessarily know if that works as well for players but it probably does

rich reef
#

Hmm.. im still working on B41 stuff. Is that function available, or is it new?

#

Is there an isNotDead() type of method to use to determine if a player is dead but not exited to the creation menu?

sour island
#

I wouldn't worry too much about usage in this kind of case tbh

#

Also isn't there an event for like every minute or every ten minutes (in-game) ?

rich reef
#

Yes, I am using Events.EveryOneMinute.Add(UpdateSleepStatus) to run my code.

But it is going to try to call code on the player/stats/body objects of that player if they die, and trying to stop the errors from propagating if that happens, unless I am mistaken.

tough oxide
#

like 100,000 iterations stress testing stuff

sour island
#

as eyeOhScream says - you have to be doing something very wrong to see any impact

rich reef
#

Yeah, I don't suspect this mod will have really any performance loss, being how it works. But mostly just want to avoid errors popping up and having players on my server constantly mention it. Trying to fail early if the player is dead/doesn't exist in this case. I'll just go back to my normal getPlayer() within each function I need it for, or just pass it along to the functions instead to keep things stable.

sour island
#

Again update player is the perfect event

#

Utilizing timestamps and isdead

#

Would give you more granular control over timing

rich reef
#

Do you have a reference for this? I'm not sure exactly what method you are recommending.

#

I currently run the SleepDeprivation check every one minute, which is often enough to avoid players trying to bypass the fatigue/health restrictions I have set. But I figure if I did it on update, it would be overkill.

sour island
#

You can use something like getTimeStampMS (you should check the spelling in the java docs) + however many MS you want and store that somewhere

In player update which is an event that trigger every tick, you can check if the current timestamp is more than the stored (which was then current + however many MS) you can also check if they're dead, + other stuff

#

The less checks or a return the better though - you can have multiple checks all returning in a row rather than a giant if and or statement

#

I do wish objects had a temporary data list tied to them like modData though 😅

#

But you could store the timestamp in the players modData (it would be saved for what it's worth)

#

@bronze yoke this actually gives me an idea -- if you generate an array list and drop it into the modData you could use that as a temp data list tied to the object right? As objects aren't saved thunk

rich reef
#

Hmm. I'm currently using timestamps for syncing client/server time for a couple of my mods. I hadn't thought about using it this way. I'm just so afraid of using any type of OnTick event to avoid bloat and delays.

I currently calculate the time since they last slept, and then the current time, and use that to determine just how sleep deprived they are. This is saved in the player's modData on each update, and then referenced when the game restarts so they can't just bypass the system by logging out/logging in again.

sour island
#

You'd have to be doing something obscenely poor for even on tick to have an impact

#

The game is fairly hardy

#

Just don't print on tick

rich reef
#

I know when using print statements to debug, that they absolutely butcher the game if it's ran OnTick, like some of the Recipe Scripts constantly checking OnTest, etc. So I'm hesitant to do nearly anything in OnTick style events unless it's bare bones lol

sour island
#

Print is an expensive as hell call, as is parsing tiles around the player for objects -- like you'd have to make cascading calls on stuff to see any lag

rich reef
#

So gathering objects in a cell around a player is super expensive? Is it like a recursive call or something?

sour island
#

Well again, using the timestamp method would only allow one "heavy" calculation through

sour island
rich reef
#

I do have a couple mods where I use deltaTime timers to increase a counter for timing things, and that's about the extent I've used OnTick for to avoid issues.

sour island
#

Yeah that's the same idea - I just prefer time stamps over ticks

rich reef
#

Do you have any examples of your mods that use that method? Curious how you do it.

sour island
#

I can think of a few, let me check

rich reef
#

Thanks!

sour island
#

I'm blanking on a good example 😅 but I did come across this:

newCoolDown = GameTime.getServerTimeMills()+5000

rich reef
#

No worries hehe. So that's just a 5 second delay, and then you check onTick if the current getServerTimeMills > newCoolDown?

sour island
#

Yes

rich reef
#

Alrighty

sour island
#

Or rather < then return

rich reef
#

Ahh, yes.

#

Then do your stuff, and reset the newCoolDown, gotcha

#

so on player:isDead() that is once they have gotten killed by something, but have yet to hit respawn, or close out?

#

This is what I expect to use to not run my code if the player doesn't exist or is dead.

local player = getPlayer()
    
    if not player or instanceof(player, "IsoPlayer") then    
        print("FILE:  GN84-FDB.lua  |  LINE:  244  |  FUNCTION:  UpdateSleepStatus()  |  ERROR:  Player is nil or Invalid")
        return        
    end

    if player:isDead() then
        print("FILE:  GN84-FDB.lua  |  LINE:  231  |  FUNCTION:  UpdateSleepStatus()  |  INFO:  Player is Dead, returning")
        return
    end
#

I've got into type checking things when I was making custom tables for data and needed to validate things, because large tables had potential for errors which I couldn't let pass. But I'm not sure if I need to do this kind of type validation or not. I suppose it couldn't hurt though.

sour island
#

Basically after the < coodown return, you'd do if is dead then also return

rich reef
#

Alrighty. Thanks Chuck!

willow tulip
#

Espeically since in your logging, line 244 occurs before line 231...

bronze yoke
#

there is not

willow tulip
bronze yoke
#

well you might be able to do it at runtime with kahlua-specific reflection apis

willow tulip
#

Oh well, I recommend just tagging them all with unique words then!

#

Beefcake is mine, get your own!

#

制作期間: 3週間

作詞・作曲・編曲・プロデュース:AnythingBecomeMoe

絵コンテ・キャラデザ・イラスト・動画:AnythingBecomeMoe

Vocal: 初音ミク & 重音テト

インスト: https://drive.google.com/drive/folders/1eUHL6_mkW2ZFKdsze_qfwN0GjNjQYzNp?usp=sharing

---------------------------------------------...

▶ Play video
#

a tragic tale of a print statement trying to talk to their friend but their friend gets depressed and disappears 😢 All told through flag signals... and japanese.. and subtitles.

#

Protip: Never read the comments on a vocaloid song, they only ruin good things.

rich reef
# willow tulip Fancy logging but I can't help but believe there must be the equivilent of #line...

Yeah, this is just a VSCode Snippet to create INFO, WARN, and ERROR prints really quickly.

It just inserts the line number as I do it, which usually means it's completely off later on. I go back and fix these for debug prints I leave in the mod once its finished.

Usually the filename/function name is enough to get me where I need to be at least, and they are a whole lot more useful than just basic print statements with no details. print("player is nil) could literally be anywhere in code. haha

willow tulip
#

sure, thats why you specify function or something unique like mod name

rich reef
#

Yeah, I was getting driven nuts by multiple print statements that meant jack shit every time I looked at them. So I took a few moments to make some code snippets to use, and made simpler ones when I didn't need all the details either. Has absolutely improved my time programming stuff.

#

In fact, if anyone wants some useful VSCode Snippets like this, here they are. Figure they might be helpful!

Includes a Basic and Full Print Statement for Info, Warning, Error, and Debug with Filename / Line Numbers. Enjoy!

"PINFO": {
    "prefix": "PINFO",
    "body": [      
      "print(\"FILE:  ${TM_FILENAME}  |  LINE:  ${TM_LINE_NUMBER}  |  FUNCTION:    |  INFO:  \")"
    ],
    "description": "Insert a print statement with current line number and INFO"
  },


  "PWARN": {
    "prefix": "PWARN",
    "body": [      
      "print(\"FILE:  ${TM_FILENAME}  |  LINE:  ${TM_LINE_NUMBER}  |  FUNCTION:    |  WARN:  \")"
    ],
    "description": "Insert a print statement with current line number and WARN"
  },


  "PERROR": {
    "prefix": "PERROR",
    "body": [      
      "print(\"FILE:  ${TM_FILENAME}  |  LINE:  ${TM_LINE_NUMBER}  |  FUNCTION:    |  ERROR:  \")"
    ],
    "description": "Insert a print statement with current line number and ERROR"
  },

  "PDEBUG": {
    "prefix": "PDEBUG",
    "body": [      
      "print(\"FILE:  ${TM_FILENAME}  |  LINE:  ${TM_LINE_NUMBER}  |  FUNCTION:    |  DEBUG:  \")"
    ],
    "description": "Insert a print statement with current line number and DEBUG"
  },



  "BINFO": {
    "prefix": "BINFO",
    "body": [      
      "print(\"LINE: ${TM_LINE_NUMBER}  |  INFO:  \")"
    ],
    "description": "Insert a print statement with current line number and INFO"
  },

  "BWARN": {
    "prefix": "BWARN",
    "body": [      
      "print(\"LINE: ${TM_LINE_NUMBER}  |  WARN:  \")"
    ],
    "description": "Insert a print statement with current line number and WARN"
  },

  "BERROR": {
    "prefix": "BERROR",
    "body": [      
      "print(\"LINE: ${TM_LINE_NUMBER}  |  ERROR:  \")"
    ],
    "description": "Insert a print statement with current line number and ERROR"
  },

  "BDEBUG": {
    "prefix": "BDEBUG",
    "body": [      
      "print(\"LINE: ${TM_LINE_NUMBER}  |  DEBUG:  \")"
    ],
    "description": "Insert a print statement with current line number and DEBUG"
  },
paper ibex
rich reef
paper ibex
rich reef
#

Is this just print logging? Or does it save to a .log file of sorts as well?

paper ibex
#

zul use writeLog instead of print, so you can check the file Logs/mymodule.txt instead of Logs/DebugLog.txt
MyDefensiveMod.lua wrap to check if zul mod is installed and using it, or default print

rich reef
#

So this will create a log based on the module that called it? That's awesome. I've wanted to do something like this for a while just to make debugging and logging easier.

paper ibex
#

yup, so DebugLog.txt is used only for mod loading and checking require failures, while your mod runtime logs (most of them, hope so) go to your own defined log files

rich reef
#

Thats great. I'll have to add this to some of my more important mods that I would like to actually log stuff. Is there a file size limit, does it create new files, or just keeps one keeping added to?

paper ibex
rich reef
#

Gotcha. So this would be good for debugging a specific session of testing vs logging data over time?

#

Oh, nevermind, I see what you wrote now. It appends the log. Is it timestamped by chance, or datestamped?

paper ibex
rich reef
#

I think at the very minimum, a datestamp at the beginning of a new day of logging would be very helpful. But full timestamps would be nice for certain things.

#

I think the simple prints I use for my own stuff are more than enough for just programming/debugging. But for logging and saving data for some more complex mods would definitely be nice to have a better logging with date/times and constantly save as you play. I've got an economy mod that I've built that I'd like to track data on this way.

paper ibex
#

Good catch. Actually, print already has something like LOG : Lua f:0, t:1770706231347, where t: is the timestamp.

TL;DR
I just checked and saw that writeLog already adds the time at the beginning of the line ||(like whattt, how could i forget that detail while reading the log file?)||
So there is no need to manually implement adding additional timestamps.
like [02-02-26 01:28:51.086] [SERVER] [INFO] [init:success]
the file name 2026-02-02_01-18_MyMod.txt

rich reef
#

Ahh, nice. is the timestamp for lua just the time since server start in seconds? Or is it an actual formatted timestamp?

paper ibex
#

for the case in zul, it's os time

rich reef
#

Awesome. That's perfect then.

#

What is the line of code that you used to present that info in the logs? Curious how you set it up.

paper ibex
#

use TRACE log, i dont print the log with line at all, line can be different after edits

rich reef
#

I mean, if it says [SERVER] [INFO] [init:success], what exactly are you typing to present that in the logs?

paper ibex
#

-- media/server/test.lua
...
logger:info("[init:success]")

rich reef
#

Does it always preface everything with [SERVER] [INFO[?

paper ibex
#
side = SERVER|CLIENT|SINGLE_PLAYER
log_levels = TRACE|DEBUG|INFO|WARN|ERROR|FATAL

[os date time string] [side] [log_levels] your_log_line
rich reef
#

This is uniform with both the print statement, and the writelog statement?

Lets say I want to do Writelog > Client > Info > Message, what does that look like?

paper ibex
#

zul uses no print() here, but MyDefensiveMod.lua, which uses print() as a fallback if zul is not installed

rich reef
#

Gotcha, that makes sense now.

#

So this is definitely more useful for detailed/long term tracking of debug info. I'll be adding this soon.

Is it a module that you have to require to use this, or is it all global?

paper ibex
rich reef
#

Ahh, I just realized this is B42. I'm using B41 still for our servers last season before we transition over. Bummer!

#

Well, this will definitely be one of the first mods I install when it comes to that time. I'll be doing a lot of debugging then.

mellow frigate
#

I need an eye with a brain, can someone tell me what I am doing stupid wrong here ? ```lua
local function getEvalTagCallBack(tagName)--I use the eval just to insert the print, but I have the same result with getAllTag
local callback = evalCallbacks[tagName]
if not callback then
local tag = tagName and ItemTag.get(ResourceLocation.of(tagName))
if tag then
evalCallbacks[tagName] = function(inventoryItem)
print('callback '..tostring(tagName)..' '..tostring(tag)..' '..tostring(inventoryItem and inventoryItem:getFullType())..' '..tostring(inventoryItem and inventoryItem:hasTag(tag)))
return inventoryItem and inventoryItem:hasTag(tag)
end
callback = evalCallbacks[tagName]
end
end
return callback
end

--actual call. itemCont is the player inventory, getAllEval "should" include the blowtorch but is an empty array
local array = tag and itemCont:getAllEval(getEvalTagCallBack(itemTag)) or itemCont:getAllType(fullType)
local count = 0
for i=0,array:size()-1 do
local itemFromInventory = array:get(i)
local availableUses = itemFromInventory:getCurrentUses()
print('getAvailableItemsType drainable '..tostring(i)..' '..tostring(availableUses)..' '..tostring(itemTag or fullType))
if availableUses > 0 then
count = count + availableUses
end
end
print('getAvailableItemsType drainable '..tostring(itemTag)..' '..tostring(tag)..' '..tostring(fullType)..' '..tostring(itemCont)..' '..tostring(count))
Log with a single full blowtorch in player inventory:callback BlowTorch base:blowtorch Base.BlowTorch false
getAvailableItemsType drainable BlowTorch base:blowtorch Base.BlowTorch ItemContainer:[type:none, parent:IsoPlayer{ Name:null, ID:102 }] 0

torn igloo
#

Hello modding gurus, how do you set the sandbox value through lua?

mellow frigate
mellow frigate
#

To tsarlib users, you can now use vanilla tag names in tuning recipes for use & tools. modded tags have not been tested. ```
install = {
use = {
MetalPipe = 10,
Screws=4,
BlowTorch = 7, /tag suffix, vanilla tag only/
},
tools = {
bodylocation = "weldingmask", /tag suffix lower case, vanilla tag only/
primary = "base:wrench", /tag full name, works for vanilla. untested for modded/
secondary = "Screwdriver", /tag suffix, vanilla tag only/
},
skills = {
MetalWelding = 4,
},
recipes = {carRecipe},
requireInstalled = {"EngineDoor"},
time = 65,
},

silent zealot
#

I really hope the big changes in 42.13 indicate I'm wrong and it's all getting fixed up soon.

shy minnow
#

Anyone know why the arm mesh at the right is glitchy ?

tranquil kindle
#

Messy weights, probably caused by using AUTOMATIC weight

mighty radish
#

Hi guys, do you know why I have my mod in pz? I will add it to users/"user"/Zomboid/Workshop. but it's not in the game at launch.

bright fog
mighty radish
bright fog
willow tulip
willow tulip
short pumice
#

yo

#

anyone know how to make interactions?

#

ive been trying to find that but i dont see any info about it

bright fog
short pumice
#

yea

bright fog
#

What do you mean by interactions ?

short pumice
#

like these

short pumice
bright fog
short pumice
#

Thanks so much!

dull moss
#

1 hidden message
-# ⓘ Discord now requires ID verification in order to see certain messages. Learn more.

bright fog
#

🧐

sour island
#

kek is that real?

shy mantle
#

This channel isn't marked for 18+, so no lol

#

Someone should test the link for us

bright fog
#

It's a discord official link

#

He's just trolling

shy mantle
#

Sounds like a trick to get me to click it... I WON'T FALL FOR YOUR GAMES

sour island
#

I thought hiding links was not allowed though?

willow tulip
#

its part of markdown

bronze yoke
#

i thought this discord had a bot that deleted your messages if you did it though

silent zealot
torn igloo
#

hello modding guru? Is there a way to check if a player is fully connected from server side?

dull moss
dull moss
#

Just woke up PepeLaugh

crystal pollen
#

Been trying to get an item to spawn with a random random names and tooltips but been having issues. Tried modeling it after the writtenletters item, with both luas(function and list of names) , and setup translation files and no luck. It is almost like either the item isn't calling the function or setting the item name or tooltip.

mellow frigate
bright fog
#

math.random isn't a thing no ?

#

Do you get any errors ?

willow tulip
#

pretty sure math.random is a thing in lua

#

But yea, check your console.txt for errors

pliant cypress
#

Does anybody know how to fix maps Because for some reason mine's not showing up on the multiplayer

silent zealot
#

Also... make sure math.random works by testing with the in game lua console.

#

I have a feeling it's Math.random with a big M, and I also have a nagging feeling it does not work and you have to use one of the ZombRand functions.

willow tulip
bright fog
willow tulip
#

ah. yea I recall a bunch of stuff about what random is best but forgot most of it..

bright fog
willow tulip
#

yea that

willow tulip
paper ibex
#

oh nice, slide to cut the cabage image 🤣

robust locust
#

hey peeps. Does anyone know how/if it's possible to use the Extended Placement transformations within a function, so that when an object is spawned it can be moved into a particular place in the square?

frank elbow
#

And close, to see how to sync

robust locust
frank elbow
robust locust
dull moss
#

I am slightly confused, say i have ETWModOptions.lua

local etwOptions = PZAPI.ModOptions:create("ETWModOptions", "ETW - Evolving Traits World")
etwOptions:addTickBox("EnableNotifications", getText("UI_ETW_Options_EnableNotifications"), true, getText("UI_ETW_Options_EnableNotifications_tooltip"))

and I'm trying to fetch the option from it in other lua

require "ETWModOptions"

local modOptions

---Function responsible for setting up mod options on character load
---@param playerIndex number
---@param player IsoPlayer
local function initializeModOptions(playerIndex, player)
    modOptions = PZAPI.ModOptions:getOptions("ETWModOptions")
end

Events.OnCreatePlayer.Remove(initializeModOptions)
Events.OnCreatePlayer.Add(initializeModOptions)

---@return boolean
local notification = function() return modOptions:getOption("EnableNotifications"):getValue() end

local function something()
    if notification() then ...
end

~~and I'm getting

ERROR: General      f:9625, t:1770823529611> ExceptionLogger.logException> Exception thrown
    java.lang.RuntimeException: attempted index: getOption of non-table: null at KahluaThread.tableget(KahluaThread.java:1447).

so my mod Options for some reason are not initialized? I checked wiki page for mod options and everything looks fine?~~

#

Yea ok nevermind, it works, the classic case of "have you tried turning it off and on again"

#

Even thought I reloaded luas

#

Gonna leave the snippet, maybe someone will need it

torn bough
#

~~Hi, I'm looking for a way to make a bodylocation that hides all items on the face, but still lets you keep them equipped. think of it like wearing the spiffo head over a helmet for example.
So far I've registered the Bodylocation, and I think the setHideModel function might what im looking for, but I cant get it to work. any pointers what to look for?

edit: using setHideModel expects a Bodylocation, but im providing an Itembody location. weird.~~
Nvm. im an idiot.

dull moss
#

The classic cycle

#

Have a problem -> Try to figure it out -> Can't -> Ask for help -> Figure it out 10 min later

torn bough
#

sometimes all it takes is having to phrase the question

willow tulip
nimble elbow
#

I need some help with a mod I'm making, it's somehow caused the crafting menu to not open, and I can't figure out why...

bright fog
#

You're also likely getting errors in your console, read those

nimble elbow
#

I assume it has something to do with

attempted index: 1.0 of non-table: null

but I can't figure out what's the cause

frank elbow
#

The error has a stack trace with it; reading it may help

hasty iron
#

Can I just copy a workshop mod folder and create a 2nd copy of the same mod under a different name?
What I want is a 2nd copy of the Auto Loot mod configured differently, one set up to auto loot, the other set up with auto drop and configure different items in both so that specific items are auto looted and others are auto dropped.

nimble elbow
#

the stack trace refers only to the vanilla functions, but not to what list was null

#

if you want, I can send you that section of the logs

bright fog
#

And it also depends on exactly what this mod adds and does

#

But you'll have file name clashes, ID clashes, and a bunch of other problems

#

It's not impossible, but if you're not familiar with modding ... o7

hasty iron
#

Ok thx

tough oxide
#

btw - anyone have a somewhat small library i can refactor with something* im creating - im not looking to change or take over the original code - i just want something* i can use to make sure what im writing makes sense

#

right now im just tinkering, but if i can prove my code can make mods just a little better i wanna dive in deeper

silent zealot
#

You want to use an automated refactoring tool?

#

Just test it on appropriate mod - there's no harm in that if you don't upload them again.

bright fog
sonic needle
#

show him a cassette mod addon, /s

silent zealot
#

Visual representation of my code.

sonic needle
torn bough
#

regarding reuploading. how am i supposed to hande a mod that hasnt been updated to 42+ which i made the effort to fix?
is there way to "patch" things or do i make a completely new mod and upload it to the workshop?

sonic needle
hoary rover
#

Guys what do you think about adding gorillas? They could use basic weapons against zombies and sharing the similar genes the could be infected and be "superzombies"
Only would spawn at a zoo or smth though

tight peak
#

In the 90s I think they already have some chemistry knowledge already, we can as well make bleach from electrolysis of salt water, which is a new kind of water that can be found on various of place, or can be crafted using salt and water (can be tainted), hydrogen and chlorine are output gas, so if we let the electrolysis indoors, it will have the same effect as generator fumes. Hydrogen can be collected using water bottle as explosion that attract zombie. Irl the explosion is really loud so it would be equivalent to a gunshot. Or can be turned into fuel with some extra steps I think. We can add one more trait like "Chemist" or something like that. Just electrolysis of water alone isn't enough, so other chemistry reaction like styrofoam + gasoline = hydrocarbon glue, potassium nitrate (found mainly in fertilizer and tree stump removal) + sugar = smoke bomb that help player escape from horde of zombie, gunpowder can be made using potassium nitrate, charcoal, sulfur (popular in these day as fertilizer),... and other useful reaction could make the game more realistic in the apocalypse world.

proper crown
#

Is there a guide somewhere on how to make a mod? like the file structure and whatnot for B42?

mellow frigate
tough oxide
wind fjord
#

Looking for someone, that hosts a dedi mp server on 42.13 to help with mod testing. I launched my first mod lastnight, Tested locally in a hosted mp, it worked fine. Moved it to my dedi server and patched it, got it working for myself and bud on our server. Would like to have one more person load it up just to make sure everything works right and get a little feed back on it if possible.

mellow frigate
wind fjord
#

Yeah, i can see how it could be so.

wind fjord
#

Suite yourself, im not here to defend anything, nor placate to your insecurities. I offered an oppertunity for someone to help with a project. Take it or leave it. The mod is public, on the workshop and has passed steams validation. Id like to get it up and going and have some small amount of feedback on it before spewing it out to everyone, to get spammed with bugs at all once. Or have the idea stollen right out from under me first go at modding. Do with that as you will.

buoyant violet
#

real bayonets

buoyant violet
#

oh shit

#

was not aware

#

did you replace any animset to achieve this?

past trout
#

Friends, can anyone help with water... if there's a way to hook drinking water, from sinks? from new bottles?, or maybe there's a way to hook Auto Drink?

ancient grail
buoyant violet
ancient grail
jade echo
#

how would i make a mod that adds a new setting "blind" in the world setting, where it makes zombies completely blind and only go off sounds

ivory atlas
#

hmm. been looking at docs and having a really hard time wrapping my head around any of this 😔 so the main mod idea i have atm is literally just editing the tired moodle's damage debuff: what's the best way to do that? doable in lua i hope?

willow tulip
#

(Without making a java mod)

ivory atlas
#

😭 Noooo, no wonder nobody's adjusted it

#

hmmm

#

how painful is java

willow tulip
willow tulip
ivory atlas
#

this would largely be for my personal usage so hmm

#

if i wanted to look into direct java tweaking where'd be the best place to start?

#

i guess decompiling and looking for where the moodle code is

willow tulip
#

theres a zomboid decompiler script that works quite well, lemme find it

#

I think you want java 25 or something for the current zomboid?

#

You can then use a pretty simple command line to recompile your .java files into classes and drop them into the zombie folder (you'll need to create one, but it overrides the .jar for you)

ivory atlas
#

yeah i got that already, was tryna run the decompiler but it said command not found in the terminal uuh

willow tulip
#

did you install java?

ivory atlas
#

yep

bronze yoke
willow tulip
#

did you set the path thingy?

bronze yoke
#

for decompilation context it will use the jdk from the game files

willow tulip
#

ah.

willow tulip
ivory atlas
#

thats all i get

willow tulip
#

PS: zombie\CombatManager.java, line 978ish, just look through the file for all instances of MoodleType.TIRED

ivory atlas
#

ty :> now if i can just get it decompiled lol

willow tulip
#

Im half tempted to actually make some more java mods that change random stuff like that, that just really annoys the hell outta me lol...

#

too bad its a pain to update them

#

maybe someday I'll learn how to use leaf -_-;

ivory atlas
#

v curious as to why it's saying command not found cuz i Just installed java katded

#

to make sure it wasnt version issue

willow tulip
#

read file

ivory atlas
#

ohh

#

hang on lemme

willow tulip
#

it has some stuff about shells and such in there that makes no sense to me but might to an actual *nix user.

ivory atlas
#

LMAOO

willow tulip
#

(I decompile on windows so)

ivory atlas
#

i'm new to linux so katded trying here lol

willow tulip
#

yea I dunno.

frank elbow
#

Oftentimes if you've installed something and it can't find it a new shell session does the trick

ivory atlas
#

ok yay ksh worked

#

pc fans taking off 🔥

willow tulip
#

we have liftoff, lol

bright fog
#

If I remember right

ivory atlas
#

i got it but ty

bright fog
#

👌

ivory atlas
#

im sure i'll have more questions later katloading

bright fog
bright fog
tough oxide
#

is there a certain thing i should follow for git projects to help other modders extend work? - from what i can tell just following the base "mod" file layout should be good enough

#

it would be cool to see some sort of auto-dependency download/install

tough oxide
#

fine. starlit is gonna be my target. prepare for pull requests (:madge: - too spoiled by other discords)

celest cloak
#

hi guys im trying to make a mod to resound all the vanilla guns and a gun mod for project zomboid can anyone help me further? i've done quite a bit of work but some of the guns i've done so far keep using other gun's sounds

#

B41

celest cloak
#

This is what i originally wanted to do with the colt python, its a success but i wanted to expand across all the vanilla guns before for some weird ass reason that the small pistols are sharing sounds with the desert eagle??

#

Still needing help if anyone can help me

lusty drift
#

dont think it will run without execute perms

quiet socket
#

Hey i made a mod and i was aiming to replace some of the in game tracks, everything is ready but the game doesnt see the mod i made. I have given it to a proper id inside of the mod.info file but idk what im doing wrong. Its my first mod ever btw. Any ideas what i might be doing wrong?

frank elbow
#

Presumably also set on the relevant files in the repo (if there are any, although maybe not since you'd have to build it anyway), so a clone would likely work too

lusty drift
#

still feel it is useful if people know of the chmod cmd and at least to grant execute perms just incase theyre one of those people who might randomly run into such an iissue

#

you just dont know tbh nor do i

#

but igu

quiet socket
frank elbow
lusty drift
bright fog
#

Don't mix both

quiet socket
bright fog
#

Make sure you have a common folder

quiet socket
#

ah nvm

#

got it

bleak remnant
#

hello @bright fog , listem dude, you probably don't remember me, i am that guy that was making a mod with customs zombies from plague inc. The thing is, this mod is finally done and i will soon release it on the Steam workshop. I would like to publicize it somwhow, make it more visible to people since it took me 8 months to make it and now i want people to see it. any tips?

mellow frigate
bleak remnant
#

nhum... ok, i will do that

#

can i ask you a personal opinion on my mod?

#

Have you ever played plague inc?

#

anyway, the thing with this mod is, it is not that fun to play. i tried to recreate the necroa from plague inc, so i didn't really made it to be fun. At this point, this mod is more to a simulation on how would that virus behave in the game. It is hard, very hard, i have almost a thousand hours in this game and i was starting to struggle to survive after 2 weeks. Now i fear that people will find it way to difficult to play and quit.

#

it is unique and well made, that is it's main selling point tho. I was going to release it today, but after what you said i will make the video and wait a bit.

shrewd basin
#

making a melee weapon pack for project zomboid again after 2 years, feels good to be back.

marble folio
celest cloak
bright fog
#

I do remember you yes
It's nice you managed to do it ! To share your mod I suggest sharing it in various servers, on Reddit, have good visuals on your mod page. You can use the supportive saturday of the modding Discord too
A video is a bonus

bleak remnant
shrewd basin
#

If anyone has cool melee weapons they wanna see in project zomboid dm me your melee weapon and i make it happen (It needs to be realistic and vanilla friendly)

quiet socket
#

i was able to make the mod appear on my mod list i enabled it but i couldnt manage to make the songs play in the game...

#

i have been struggling with this for hours. Now mod doesnt come up on my mod list once again. When it appeared, it was installed on mods folder instead of workshop folder. Whenever i try to install the mod here it always giving me that error.

#

😭

#

this is the scrips i wrote and the overall look of the folders and sound files. The 42 folder only contains a media sub folder, and inside there are only scripts and a media/music folder, nothing else.

#

I have no idea what i am doing wrong at this point.

bronze yoke
#

using ai seems like a likely problem here, what is a musiclibrary script, this mod will not work even when you get it to show up

#

but regardless, your mod.info seems to be in the wrong place, it should be in 42 or common

#

(and common should be lowercase, capitalising it will cause issues for linux users after you upload it)

shrewd basin
#

(Fieldcraft BOB Knife) melee weapon request from @gilded crescent

#

dm me if you guys have a melee weapon request that you wanna see in pz

bright fog
#

And where did you put the file ?

bright fog
shrewd basin
#

Camillus Machete

quiet socket
quiet socket
quiet socket
quiet socket
#

If not well... I can fix that easier than writing a damn code i suppose 😆

bright fog
quiet socket
#

im learning slowly ig 😄

#

Damn i didnt know its that hard to make mods with 0 knowledge.

bright fog
#

Before there was 0 documentation

quiet socket
quiet socket
# bright fog Read the wiki docs we provide

yeah it seems like i gotta learn more before attempting something big like that it was one of my biggest dreams to make a one or two mods to this game i tought working with audio stuff would be easier. It seems i was wrong 😄

bright fog
bright fog
#

You're trying to replace game musics ?

quiet socket
#

i wanted to change some of the musics if not all of them with few of my all time favorites.

quiet socket
#

I recorded this like 3 years ago cant believe its still there 😄

#

I wanted to make assault rifle weapon sound overhaul and combat music change and stuff. That was kind of a experimental fantasy thing of mine.

#

Im sure you can notice huge difference on weapon sounds.

manic swift
#

As a guy with no coding knowledge or even much knowledge on modding in general, is a mod with 2 crafting recipes and maybe one item too much to handle as a first mod?

bright fog
#

Musics aren't just sound files

#

They are in bank files and in B42 are even dynamic music which plays based on current situations

#

Like some instruments get added based on conditions and stuff like that

marble folio
# shrewd basin Camillus Machete

Do you ever plan on making like a timelapse making a weapon model? I'd love to see the process behind making a full one, texture and model

willow tulip
manic swift
#

Which produces a unfinished fertilizer in a pot, that you have to pour into a sack to get the fertilizer item

shy minnow
#

Is it possible to make a texture glow in the dark ? Like for example a crystal helmet that glows at night ?

crude sage
#

Hi guys. I'm trying to get a little niche mod working. Initially was just a little thing I wanted to use myself after noticing how people are fond of using Zomboid for roleplay even on Singleplayer (making marked maps, using certain Rp mods, that kinda thing). I'm a bit nervous to say that I kinda completely lack any coding experience and mostly been trying to use some ai prompts to see what could be done but as expected that hit a bit of a wall. The mod idea is just something to add a simple chat window to Singleplayer mode, so that if people wanna have their character say/emote things, they can. The chatbox and text inputs have worked decently but it hit a wall on the point where after sending a text or emote, it doesn't automatically focuses back on the game, so you have to manually click the screen to regain character control. Anyone with coding knowledge/experience that may share a common interest in this?

#

What it presently looks like.

quiet socket
# bright fog That's not easy to do

Yea i made some research and also downloaded and unpacked few mods to learn how its done. I understand the basics and general stuff but its not enough. I will try from the scratch when i see myself capable enough to give it a another try at least. I have been reading bunch of modding stuff its not easy at all 😄

manic swift
#

Guys, question about crafting recipes. If I want to use a certain amount of uses from a compost bag (2) would I have to put item 2 or would that want 2 full bags

#

Do I have to put item 0.5 instead?

#

I am unable to find a clear answer on the wiki

manic swift
#

I attempted something and am now trying to test it in game… however it does not show up in the mod selection menu, I have the mod.info file fully and correctly filled out

bright fog
#

I believe the default uses "uses" (durability in a way) instead of the whole consummable

#

You can also just test it

bright fog
manic swift
#

I just went with normal item 2

#

I would test it but the game isnt registering the mod folder’s existence, either workshop or mods

shrewd basin
#

Workshop Preview Image

cinder estuary
#

how to add a new weapon to game? I can just change game files but when i trying to make a mod the game didn't even try to read anything from there.

For example i tried to add new axe.
I created folers mods/mymod/media/scripts/axe_items_weapons.txt
I copied axe only from game files. Something like that
module Base
{
item NewAxe
{
...

Why i can't find the axe in game debug?

mellow frigate
gritty remnant
#

Question. I'm unable to get my mod to show in the select mods window in project zomboid is there a reason for that it's a custom made one and uploaded and everything?

gritty remnant
mellow frigate
gritty remnant
gritty remnant
#

I'm missing the common folder.

robust locust
#

Hiya peeps, do you know how to have your mod work for both 42.12 legacy and 42.13? Some users can't update to 42.13 and have asked for a legacy version.
Is there a particular folder structure? Or should I just create a separate 42.12 legacy mod?

mellow frigate
robust locust
mellow frigate
robust locust
cinder estuary
#

Why i can't to change weapon MaxRange? It works for braking windows, but doesn't work for attacking. For example if i make maxrange of axe 20 it can break windows of house across the street but can't attack a zombie on same range.

Same with bags. For some reason there is a limit of capacity

Game version 42.13

bronze yoke
#

also steam lets you download older versions of your own mods on the change notes page

willow tulip
willow tulip
#

(realistic car physics also deletes the limit)

bright fog
#

@mellow frigate wdym by that ?

mellow frigate
# bright fog

I am referring to the thouthands of reports of people starting the game in B42.13 with mods from B42.12 and no start menu because of it

#

things that will happend with every new version

bright fog
#

That's not a thing every version

#

What your comment implies is that there's a problem with starting mods from the main menu, but the problem is in fact that they shouldn't activate mods made for the wrong version

mellow frigate
#

So I really recommend to have NO mod active at start, as a rule a thumb. Obviously ModManager-like stuff and other mods that apply on main menu need to be active there with the mods affected by the Meatballing

bright fog
#

That you activate those mods only to get in-game is stupid

#

The mod isn't for that version, don't use it

#

It's an unstable build, things breaking are to be expected and it should be users to learn to verify the versions the mods are made for

#

And no, not every versions are going to break mods

#

Mods are broken for current version, stop using them and wait for them to update, or find alternatives

#

Also a mod breaking the main menu is not something common, I've never heard of outdated mods breaking the main menu ?

willow tulip
bright fog
#

Has nothing with loading mods from the main menu

willow tulip
#

I mean, it enables mods options on the main menu and crashes it there...

#

I think there was a few other things mods can do to crash on main menu... As well as some stuff that won't crash main menu but will crash debug mode

bright fog
bronze yoke
#

the wording he put on the wiki might be a little off, but i completely agree with the message

bright fog
bronze yoke
#

nearly every major patch some popular mod breaks and makes the game unable to launch

#

for the vast majority of mods there is zero benefit to enabling it on the main menu and it inevitably causes serious issues like that

cinder estuary
willow tulip
bright fog
#

The wording on the wiki needs to be fixed then to clarify this with a note template, I'm removing that from the wiki, make it clearer to the users why that is the case

willow tulip
#

Most people just.... give up when the game crashes on load lol

willow tulip
mellow frigate
willow tulip
#

so make sure your spawning new items after enabling those mods and copy the zombie files over

bright fog
#

You're serious right now ?

mellow frigate
#

I can put it back as I made it

bright fog
#

I'll check out a bit later

manic swift
#

Is the common folder supposed to have anything in it? I added it and the 42 folder but it still refuses to be recognized by the game for testing

bright fog
#

Make sure your mod.info file is in the right place and has the right content

manic swift
#

Its god the name, description, poster and id

#

Its name is mod and its a info file

manic swift
bright fog
#

No point doing that

#

Only one should exist

#

In the versioning folder or the common folder

manic swift
#

So just the 42 folder?

bright fog
#

You need the versioning folder and common folder

#

I invite you to read carefully the page about Mod structure

manic swift
#

Oh I didn’t see this thanks

manic swift
manic swift
#

alright ive run into further problems with a few things, most items work fine but the crafting recipes I added wont even show up, ive done everything the wiki said I believe so i have no idea why these wont work. anybody got any ideas? heres one recipe and the only broken item

#

Ah I missed a C for the item, ignore the item issue. The crafting recipe is still very much an issue and is not a missing C

mellow frigate
#

Your item does not match item syntax.

manic swift
manic swift
mellow frigate
#

for ItemType take example on some vanilla, and the line should end with a comma. Icon has no png extension, WorldStaticModel is not a png either, you have to define the model node.

manic swift
tough oxide
#

do you lua heads use luarocks? i was looking into getting some test coverage and saw that as a package manager

bright fog
bright fog
# manic swift

Why are you putting your module in front of the item and recipe IDs

tough oxide
#

not to answer for them - but isnt it a good practive to reduce collisions?

willow tulip
tough oxide
#

or is that scoped

#

fair enough

willow tulip
#

some of the game code looks for . on purpose in ID's and does things differently if it exists or not btw.

manic swift
willow tulip
#

so I highly recommend not having . in itemID's or recipeID's or any other ID's

tough oxide
#

got it - i didnt fully look at the provided code - its scoped to module PBC

willow tulip
#

btw, in multiplayer, crafting items in modules other then base. doesn't work

#

(IIRC)

pastel wolf
#

would there be any like, all inclusive video guides for making clothing mods? I've got the outfit meshed and textured and Now I'm onto rigging and getting it into the game I guess?

bright fog
tough oxide
#

yeah, if you understand namespacing - it seems like module PBC defines the namespace

bright fog
#

PBC in the item ID doesn't make any sense, when you define an item in a module, it already has the PBC in front of it

manic swift
#

I wasnt aware. I have never done this before and wanted to make sure it would make sure it knew it was from the mod,ill go and remove em then

bright fog
bright fog
manic swift
#

good to know

tough oxide
#

i guess pz/lua heads dont mess with luarocks - which i guess makes sense due to the version restrictions

bright fog
#

What's luarocks ?

tough oxide
#

lol - a package manager

#

like npm

#

i was just trying to find the lowest amount of friction so i can have visual test coverage (in the IDE)^

willow tulip
#

@manic swift So not sure if you missed my warning but here it is again: Crafting in multiplyer, IIRC fails if the item isn't in the base. module.

manic swift
#

im just trying to get it to work for singleplayer before I even try multiplayer

bright fog
#

In general go read this page

manic swift
#

ive been up and down that page...

bright fog
#

What's the problem ?

tough oxide
#

did you do like me and speed read it or give it the time and really read it?

willow tulip
bright fog
manic swift
bright fog
#

Just tbf with you about it, modifying directly the list of items ensure no one can fuck it up imo

#

The main problem with it is typings