#mod_development

1 messages Β· Page 308 of 1

queen oasis
#

that sounds... fun :/ hopefully they realize the errors of that way

silent zealot
#

It works really well, but I need to dedicate some time to figure out the last bug where moving a worn container to a different body slot dupes the item by dropping it and keeping it in inventory.

#

Lots of odd quirks found along the way - for example there's a bit of code that makes things faster if you're putting stuff into an equipped backpack that isn't full, but once it goes over 100% capacity it makes things slower. A lot slower.

#

And I need to publish the "remove backpack speed reduction" mod first... turns out that clothing with run speed modifier displayed does nothing, but worn containers apply their hidden run speed modifiers and these are made worse based on how full they are.

simple helm
#

is -debug mode suppose to take forever ? my game just sits at a black screen

queen oasis
#

that makes sense. and I see setCapacity is borked in the java too

silent zealot
vocal vector
simple helm
#

not sure how there errors when all mods are disabled

#

nvm it was my mod that was on

#

when i activate my mod the games breaks ( black screen )

silent zealot
#

any errors in console.txt?

simple helm
#

a few different things, my mod doesnt have an mod ID. but there the 2 other mods that activate with it, autosar,tsar

silent zealot
#

Annoyingly a lot of errors you get are normal

#

Even on a vanilla-only game.

#

post the whole console.txt (discord allows files to be uploaded)

simple helm
#

i am watching a video and this guy said delete everything in user zomboid and let the console refresh

#

to see the actual errors

queen oasis
simple helm
#

nope he saids delete the entire zomboid folder after backing it up, then copy the mods folder back into the zomboid

silent zealot
#

If you know which mod is the issue (i.e.: your mod in this case) then you can just disable that to make the game work.

#

There are issues that can cause crashes that persist even with no mods in a new game, and for that cleaning out the zomboid directory can help.

simple helm
#

i do get errors loading up normally

#

and my mod is activated so does that mean it my mod

silent zealot
#

That;s why I said give us the whole console.txt and we may be able to help pick out what matters.

simple helm
#

^^^ uploaded figured it be my mod if anything

queen oasis
#

preview.png

#

idk if that would keep it from loading though

simple helm
#

my mod preview doesnt load i will say

#

oh i see why

queen oasis
#

hmm, I bet it would. When I was trying to figure out the new folder structure, it wouldn't load my game if things weren't perfect

simple helm
#

i have poster=preview.png

silent zealot
#

Fix up C:\Users<username>\Zomboid\mods\Car Carrier\preview.png and see if that helps - if nothing else, it will clear that error

#

Like I mentioned, the parsers in this game sometimes give up when one thing does not work.

simple helm
#

sounds like gtav in a way, if one code is off the vehicle wont load

#

-debug mode still wont load tho and my poster didnt fix shm

silent zealot
#

I once put a comma in the wrong spot and deleted every piece of of clothing in the game as well as turned every vehicle into a random burnt out wreck.

queen oasis
#

so here's my issue. I left zupercart enabled, enabled the mod I'm working on, and the menu is borked when I right-click on a cart. It only shows my mod's menu. zupercart uses tsar library and nothing looks weird but maybe I'm missing something

simple helm
#

it 1000% my mod tho just removed it and it launched

queen oasis
#

from zupercart:

local old_option_update = context:getOptionFromName(getText("ContextMenu_Grab"))
  if old_option_update then
    context:updateOptionTsar(old_option_update.id, getText("ContextMenu_GrabTrolley"), playerObj, ISWorldObjectContextMenu.equipTrolley, worldObject)
    return
  end
#

my menu is built like:

local mainMenu = context:addOptionOnTop("Easy Mode", worldObjects, nil)
local subMenu = ISContextMenu:getNew(context)
...
local farmingMenu = subMenu:addOption("Farming", worldObjects, nil)
local farmingSubMenu = ISContextMenu:getNew(subMenu)
farmingSubMenu:addOption(...)
...
local subOption = ISContextMenu:getNew(subMenu)
subOption = subMenu:addOption(...)
context:addSubMenu(mainMenu, subMenu)
subMenu:addSubMenu(subMenu, subOption)
return
#

is there anything obvious I can't find that would break the world context menu?

#

also, if I comment out the zupercarts context:updateOptionTsar, everything works fine

silent zealot
#

It's like you're overwriting or clearing the context menu object that was passed to your function.

#

What's in updateOptionTsar?

#

Looks like it is mean tto repale an option in the context menu, but just breaks it instead.

queen oasis
# silent zealot What's in updateOptionTsar?
function ISContextMenu:updateOptionTsar(id, name, target, onSelect, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10)
  local option = self:allocOption(name, target, onSelect, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
  self.options[id] = option;
  return option;
end
silent zealot
#

try this instead:

context:removeOptionByName(getText("ContextMenu_Grab"))
Context:addOption(getText("ContextMenu_GrabTrolley")), playerObj, ISWorldObjectContextMenu.equipTrolley, worldObject)
queen oasis
#

yea I was going to fix that up tomorrow when it wasn't getting late to remove the tsar dependency. I was more worried I did something wrong in my mod

silent zealot
#

that will put your conext menu entry at the bottom instead of where you removed the entry, but you can adjust that later

queen oasis
#

the vanilla grab works fine with it I think, from what I can tell. Not sure why they used tsar's

#

with updateOptionTsar commented out

silent zealot
#

May be as simple as wanting to change "Grab" to "Grab Cart"

#

Or they want to call "equiptrolley" not "put in your inventory"

queen oasis
#

true dat. everyone does things differently

silent zealot
#

I'd guess "equiptrolley" puts the trolley in your primary hand, instead of inventory. Been a long time since I used the tolley mod.

#

I have fond memories of looting a bunker with a shopping trolley though. πŸ˜‚

queen oasis
#

ha yea I've been jonesing for it. been kind of waiting for it on 42

silent zealot
#

RV Interiors is the mod I really want for B42, but they are waiting for B42 to be stable so... 2026 I guess.

drifting ore
#

That's an optimistic estimate

silent zealot
#

Build 40 only took 5 months to be stable...

#

3 months for Build 39!

#

3 years two months for Build 41 πŸ˜‚

#

Sadly, I expect B42 to be closer to B41 in timeframes... they are working on multiple major systems all at once, plus redoing the structure of multiplayer somewhat to if I understand some of the lua changes correctly

ivory gyro
#
require 'Items/SuburbsDistributions'

table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.ration_fedra_1");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.1);

table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.ration_fedra_2");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.05);

table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.ration_fedra_3");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.01);

table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.ration_fedra_4");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.001);

table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Base.ration_fedra_1");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.1);

table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Base.ration_fedra_2");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.05);

table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Base.ration_fedra_3");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.01);

table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Base.ration_fedra_4");
table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, 0.001); 

Hey, someone know how to spawn items on zombies ? This is the right way or no ?

#

I killed like 100 zombies, and didn't find one of theses items

silent zealot
#

I can't say for sure that is the rigth way, but... set those probabilitis to something like 10000

#

Or it's hard to tell if you're just unlucky

ivory gyro
#
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.ration_fedra_1");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 1);

Maybe trying these %

#

Ok working, i tried like 100

ancient grail
vocal vector
#

what do I have to do to make this variable persist between saves?

#

eg

medicalDebt = 0

instead of

local medicalDebt = 0
silent zealot
#

local is about scope - that controls where you can use that name to access the variable.

#

If you want to save some data, modData is the best option.

#

It's a lua table that gets saved/loaded between games, and you can also attach mod data to items/vehicles/animals/etc

#

So you could attach medical debt to to a Character object, or make a table of players and debt and save it in the "global" ModData

vocal vector
#

the scope is just single player

silent zealot
#

do you want to track the variable per-character?

vocal vector
#

yes

#

so i guess i need an array with the player name and the amount?

#

WastedModData.medicalDebt = {name, medicalDebt}

silent zealot
#

player name is not character name!

#
local modData = ModData.getOrCreate("WastedModData")
local modData.characterDebt = modData.characterDebt or {}

That gets the modData under "WastedModData" and if there is not already a modData.characterDebt table, it will make an empty one

#

Any data you put in there will get saved - at least strings/numbers/booleans/tables will, not more complicated objects.

vocal vector
#

then i can use the character name as the key and the debt as the value

silent zealot
#

exactly!

#

If it was for multiplayer, you could use also track the playerID (I can't remember the correct property to get for this, but there is one)

vocal vector
#

that's really helpful, thank you πŸ™‚

silent zealot
#

I'm curious what the mod is that tracks medical debt... I'd have hoped that all vanished with the apocalypse. πŸ˜‚

vocal vector
#

that's one upside of the collapse of civilisation!

#

it's for week one

red rapids
#

hello

#

my game keeps crashing and i got no idea why

silent zealot
vocal vector
#

so i'm having a problem unfortunately

#
local modData

Events.OnInitGlobalModData.Add(function()
    modData = ModData.getOrCreate("WastedModData")
end)
modData.characterDebt = modData.characterDebt or {}

local charName = getPlayer():getUserName()
if modData.characterDebt[charName] = nil then
    print ("register new patient account " .. charName)
    table.insert (modData.characterDebt, {charName, 0})
end

is what i have, but i end up with an error on this line:
modData.characterDebt = modData.characterDebt or {}

#

unexpected symbol near .

silent zealot
#

I'm not sure how you are trying to divide things up here

#

When the lua file is loaded you create the variable modData with scope fo "this file" then you immediatley go to modData.characterDebt = modData.characterDebt or {} but at this point moddata has not actually loaded anything

vocal vector
#

shouldn't it just create an empty table?

silent zealot
#

What is modData when that line is executed?

#
local modData
modData.characterDebt = modData.characterDebt or {}
#

that's what will happen because you've put modData = ModData.getOrCreate("WastedModData") in a function that won't execute until an event triggers, but your other code is running when the file loads.

vocal vector
#

shouldn't the function execute when the game loads?

silent zealot
#

This will probably also fail: local charName = getPlayer():getUserName() becasue you'e runing it when the file loads, not after a game is created/a player enters.

silent zealot
#

or rather, Events.OnInitGlobalModData.Add runs on file load and then that will make the function run when the event triggers.

vocal vector
#
local modData.characterDebt = modData.characterDebt or {}

local charName = getPlayer():getUserName()
if modData.characterDebt[charName] = nil then
    print ("register new patient account " .. charName)
    table.insert (modData.characterDebt, {charName, 0})
end```
is also giving the same error
silent zealot
#

don't use local modData.characterDebt - you're not making a new variable there, you're using the exsiting modData variables.

#

What you probably want is 1) create your local variable with the scope of the file (which you have done)
2) write a function to intilise that
3) call that function using the OnCreatePlayer event, which is when a player enters the game

#

(there are many other ways you can do this too)

vocal vector
silent zealot
#

How does getPlayer() work when it run before there is a player?

vocal vector
#

with attempted index: getUserName of non-table: null

silent zealot
#

That's why you have a function that is triggered off OnCreatePlayer

silent zealot
vocal vector
#

can i run all of this conditionally after the game has loaded?

silent zealot
#

yes, give me a momemnt...

vocal vector
#

there's a variable that tracks if there is a healthcare system or not, if not then loading all of this is a waste

vast pier
silent zealot
#
local WastedMod = {}

WastedMod.Debugmode = true -- you can put any other settings you like in the WastedMod table



local DebugSay(message)
    if WastedMod.Debugmode == true then
        print("Wasted Mod: " .. message)
    end
end





local function WastedModInitData()
    DebugSay("WastedModInitData")
    WastedMod.modData=ModData.getOrCreate("WastedModData")
    WastedMod.modData.characterDebt = WastedMod.modData.characterDebt or {} --create an empty table if this does not exist
end

Events.OnInitGlobalModData.Add(WastedModInitData)



local function WastedModPlayerEntersGame(playerNum, player)
    local charName = player:getUserName()
    if charName == nil then DebugSay("Unable to get character name");return; end
    if WastedMod.modData.characterDebt == nil then
        DebugSay("register new patient account: " .. charName)
        table.insert (WastedMod.modData.characterDebt, {charName, 0})
    end
end

Events.OnCreatePlayer.Add(WastedModPlayerEntersGame)
#

That puts the initilisation into two places: OnInitGlobalModData (which is when ModData becomes available) and OnCreatePlayer (when a player loads into the world)

#

With a little fucntion to easily print debugging messages you can turn off just by changing WastedMod.Debugmode to false.

vocal vector
#

wow, that's really useful, thank you!

#

this is probably a silly question, but where do the playerNum, player properties come from in the oncreateplayer function? does the event include them?

silent zealot
#

yes, a lot of events include a few parameters.

#

In general an event about a player will include a player object, an event about a vehicle will include a vehicle object, etc. That way your function can easily tell who/what triggered the event.

vast pier
#

Grrrr I don't wanna make models for these

#

(the ones that have items attached already have models)

silent zealot
#

make a generic box model

vast pier
#

Yeah but I don't wanna ship the mod like that

silent zealot
#

Or do you mean for when they are used, not for when they are on the ground?

vast pier
#

it's like, the last thing the mod needs before being considered complete

vast pier
silent zealot
#

I've seen modders do things like using a tote bag model for clothes on the floor. Gotta admire that sort of shortcut.

#

Yeah, harder to get away with if you want the player to actually hold the item.

vast pier
#

I'll just end up taking some vanilla guns and take apart the models for it, but still

#

I'll have to do that later, don't wanna rn

#

The framework is basically complete now tho.

silent zealot
vast pier
#

Well I'm waiting on permission to the use other models actually, so if I don't get permission for those then I'll have to make ones for those too

#

currently it's just using the part pieces I made from taking apart the pistols from the mod "Ramshackle Recipes"

#

The creator of ramshackle seems interested in my work, so I don't think they'll say no to letting me use the models. But still, good to wait for verified permission instead of assume

polar solstice
#

how do i make a true music custom mod for 42

silent zealot
#

Does the True Music mod page have instructions/a link to a template/etc?

ancient grail
#

anyone knows if removing an unknown event is possible if we assigned it like this

local evnt = Events.OnPlayerUpdate.Add() 

reason for me asking this is cuz what if i need a dynamic event that can be other event and not just OnPlayerUpdate

silent zealot
#

You mean same function attached to multiple events?

#

wouldn't you use Events.OnPlayerUpdate.Remove(myFunction) and Events.OnSomeOtherThing.Remove(myFunction)?

#

Oh you mean you never gave it a function name! Solution: give it a function name and attach that to to event.

grizzled fulcrum
#

Add() seems to be a constructor for Event, so maybe it will return Event?

storm trench
#

Thank youuu. πŸ’š

storm trench
ancient grail
storm trench
#

I swear 😭

#

All I did was take the original and replace your updates and the anim is still broken. Everything else is exactly as it was from the published version of the mod.

silent zealot
#

looks like a dropped supermarket trolley to me.

storm trench
silent zealot
#

You got rid of the secret hidden magic code.

#

I hate secret hidden magic code.

storm trench
#

Sighhh. Now I'm sucked back into working on this again... Double sighhh. Seriously tho, I wonder why it was good for him but not for me.

#

Also 1,200 lines of this a pop is a little annoying.

LOG : General f:0, t:1740919769943> ERROR: mods isn't a valid workshop item ID

🀣

#

Yea I give up, eff this mod and its animations. lol. Just ridiculous.

tacit pebble
#

A simple question:
If I add two items in same distribution, that gives chance to player getting two items at once?

slim swan
#

built a new inventorypane

brave bone
ancient grail
tacit pebble
#

😬

storm trench
#

Text on the right could use a little bevel/background/outline tho.

#

Or just a new color catlul

slim swan
storm trench
vague marsh
vague marsh
crystal sigil
#

anyone a idea to parse a skill name like Mechanics as variable through the function?
skillname = "Mechanics"
local Skill = player:getPerkLevel(Perks.skillname)

looks like lua didnt understand that skillname is a var

nova dome
#

Can I access ModData somehow before the world is loaded? Specifically in the screen where you create your character

umbral raptor
#

The Support Goods mod has many frameworks that can be created or depended on to create your own mods or sub-mods or expansions.

Frameworks and what you could do mod yourself and upload seperately:-
MyCamo (Make your own camo pattern and clothing set, has all you need to do that.)
MyRoom (Add your own posters and photos to the game or multiplayer servers)
Computers (Add your own games, features, and such. For example, adding a new hardware that allows listening to cassettes from True Music on Support Goods laptops.)
Transfer Printing (Add new companies or designs)
Alcohol Brewing (Adding new variants of alcohol)
Etc

https://steamcommunity.com/workshop/filedetails/discussion/3434464110/595142333640541605/

#

If anyone wants to use or depend on Support Goods and any of its frame work. I made some things that make modding easier. For example, MyCamo has all you need to make your own camo clothes pattern, MyRoom has posters and framed photos that can be easily retextured if you ever wanted to make framed photos, or posters, etc. πŸ™‚

frank elbow
distant inlet
#

so this has been a trip - only check1, check3, check4 return true where the others are nil. In my mind these are all equivalent. Could this happen because I'm invoking java functionality from lua? canReachTo is java:

local check1 = playerSq:canReachTo(nonFloorContainerSq) ~= "false"
local check2 = playerSq:canReachTo(nonFloorContainerSq) == "true"
local check3 = playerSq:canReachTo(nonFloorContainerSq) ~= false
local check4 = playerSq:canReachTo(nonFloorContainerSq) == true
local check5 = not not (playerSq:canReachTo(nonFloorContainerSq))
#

(sorry, check1 and 2 are obviously not equiavalent to the rest)

#

tl;dr: it's a good idea to do explicit true/false checks against java methods that return bool when calling from lua

bright fog
#

Seriously I do understand wtf you're doing

#

You've fighting with checks since fucking yesterday or so, and there's seriously nothing magical

#

canReachTo returns either true or false

#

Check1 is true bcs it's not a string
Check2 is false bcs it's not a string
Check3 is true if canReachTo is not false and false if it's false
Check4 is true if canReachTo is true

Check5 is a bit weird but my guess is the order of check makes it fuck up. Not not bool is probably completely breaking because of the order of the check. This is notably the case with no val1 == val2, it will check val1 is falsy then do == val2

#

You'd have to do
not (not canReachTo)

#

I think

#

Anyway there's no point even doing that last one, never do that

frank elbow
frank elbow
merry patio
#

Hello everyone! I want to tilt a hat, does anyone know how I can do it? Is it done through XML files? this question belongs here or in the modeling section? I wasn't sure

frank elbow
#

Check vs. coercion

bright fog
#

Unless you mean converting it

#

Or just straight up do
val = val and true or false

frank elbow
#

Yeah, that's also valid. Just saying not not works fine

bright fog
#

not not sounds so terrible

#

Especially due to the issue I described when using it not properly

frank elbow
#

The example Carlos provided has parentheses around the operand so that wouldn't be an issue

bright fog
frank elbow
#

What?

bright fog
#

he did not not (val)

#

That's the same as not not val

frank elbow
#

Weren't you pointing out the potential problem with operator precedence

#

If that were a concern here (it isn't, since it's a function call), the parentheses would make it a non-issue

bright fog
#

If you do not not val1 == val2

frank elbow
#

not not (val1 == val2)

bright fog
#

Yes

frank elbow
#

Not at all necessary since == is already a logical operator, of course

bright fog
#

That would be the way to do it, and even then there's no point doing a not not imo

queen oasis
storm trench
queen oasis
bright fog
#

It's a vanilla bug

#

That has been here since B42 release drunk

queen oasis
bronze yoke
#

in lua when you write Perks.skillname that's the same as Perks["skillname"] (it treats everything after the . as a string index into the table) so if you want to use a variable you have to use the [variableName] syntax

distant inlet
#

@frank elbow @bright fog disregard my previous comment. The in-game debugger doesn't always show local variables (not just when they're nil) and that led to me make some wrong conclusions

distant inlet
bronze yoke
#

for future reference, if it isn't showing a local variable, that is always a bug: even nil is supposed to show up

ivory gyro
bright fog
#

@sour island do you remember if Discord is allowed ?

sour island
#

They limited it to their domains and steam

#

You can use the steam redirect link

bright fog
#

πŸ‘€

sour island
#

Check out my mod alerts and updates mod

queen oasis
#

42 doesn't read from the old media folder at all?

sour island
queen oasis
#

hmm

#

ok I got a weird issue

sour island
#

Textures, sounds, anything that starts it's scope in mods/<mod>/

queen oasis
#

helping @storm trench and their port of zupercart and their cart is always on it's side, even though I don't have that issue.
I thought, well we don't need the old media folder for 41 so i borked it. And guess what the cart does when I delete media? lays on it's mf side

bronze yoke
#

all animsets must exist in both directories

#

when the game searches for animsets it checks the b41 folder, but when it actually loads them it correctly uses the b42 folders

ivory gyro
#
local function OpenDiscordUrl()
    local url = "https://steamcommunity.com/linkfilter/?u=https%3A%2F%2Fdiscord.gg%2Fla-station"
    if isSteamOverlayEnabled() then
        activateSteamOverlayToWebPage(url)
    else
        openUrl(url)
    end
end

Just find make this
(Its working btw)

queen oasis
#

I don't like it, but thanks!

storm trench
storm trench
#

I took that out for 99.9% of my testing after I had the main mod set up. I figured having the extra media stuff would just be wasted space for a mod I was already needing to fork parts of to port.

storm trench
#

Anybody have their mod ever break the freaking mods menu in game??? 🀣 ugh.

knotty stone
#

happens if a mod has problems with its mods.info file

#

should be in the console

storm trench
#

Yea I fixed it. I messed up the modID name in mods.info. lol

vast pier
storm trench
vast pier
#

It's a kitbash of these two guns

drifting ore
#

how to make a mod in b42?

drifting ore
#

well, a mod that lets you craft one single gun, from metal pipes, metal scrap and a plank

#

it's literally unreadable for a beginner

bright fog
#

I'm happy to get your feedback on it however

#

Because the goal of the wiki is to make it easier to get started with making mods

crystal sigil
bright fog
#

Yeah

drifting ore
#

πŸ‘

#

is this extention useful?

bright fog
#

Yes

#

That's for scripts

#

If you do scripts, then yes it's great

#

If you don't know what is doable, you can either check how other mods do it by accessing their files. Asking in the various modding #Communities is also a good idea in getting some help or finding out what you could possibly achieve with modding.

#

Tbf this is the main tip for modding

#

Knowing mods that do something close to what you want to achieve can help you find examples

drifting ore
#

Allright. Is there maybe a template of a firearm script?
I have found one on youtube, but it shows that it's for Build 41.54

#

If I would to adjust it, would it work on b42?

bright fog
#

This is the most up-to-date guide on making firearms (it's up-to-date)

drifting ore
#

what is the id for 12gauge ammuniton?

#

like, 12box?

#

or something like that?

drifting ore
#

okay, so I did something like that, with a help of script grabbed from an addon adding more guns to b42. Can somebody help me with the recipe?

umbral raptor
#

hahahaha

bright fog
#

Nop

umbral raptor
#

tried that when i first started modding. chatgpt will take ur code and ruin it for u

bright fog
#

I will never tell anyone to use ChatGPT because currently ChatGPT goes mental on PZ coding

umbral raptor
#

u can use it at other things tho

#

it's amazing for writing radio/tv channels

#

and LUA translations (if its not alot of content)

bright fog
bright fog
umbral raptor
#

yeah haha

#

but it was a lifesaver for me when it came to LUA translations in general

#

saves alot of time, specially for radio/tv translations

#

where u need to translate a GUID for each line of the transmission lmao

#

lol imagine translating that by hand.

drifting ore
drifting ore
#

🫑

bright fog
#

timedAction is empty here

#

Either remove the line or add a timedAction

drifting ore
#

what is a timedAction?

#

it's like the animation?

bright fog
#

This will help you understand craftings in B42

bright fog
#

That's normal

#

ChatGPT will hallucinate an insane amount of stuff

#

It has became better

#

But it's still not great at the Lua API

umbral raptor
#

its not hallucinations

#

its that zomboid has a totally different coding system.

bright fog
#

It is, it invents a fuck ton of stuff

#

No it does

#

It hallucinates functions

#

It pops functions out of nowhere

umbral raptor
#

it uses lua, but it has no idea how to work with zomboid's code

bright fog
#

That's hallucination

#

He hallucinates functions

umbral raptor
#

its more of ignorance.

bright fog
#

He knows how to use PZ coding

umbral raptor
#

we dont call people who dont know things hallucinating

drifting ore
#

@bright fog is the Skills Required okay?

#

or did I mess it up

umbral raptor
#

we called them ignorant of information or simply uninformed

storm trench
#

Well, this has been an interesting mod to work on.

umbral raptor
#

they have not been trained at all on PZ code

bright fog
#

He knows Kahlua in a way, he knows it but it doesn't know all the possibilities, because it doesn't know the java doc and it doesn't know what each functions does and it will hallucinate a lot of functions

bright fog
#

You sure you want InHandCraft for that sort of craft ?

umbral raptor
#

if it totally hallucinated it'd be useless for coding. it isn't. it simply isn't trained on videogame modding.

crystal sigil
bright fog
drifting ore
bright fog
#

An AI hallucinating means it will create informations that are not based on anything but things that look real

#

ChatGPT will hallucinate functions for PZ

umbral raptor
#

tbh, its too early for AIs rn to do that stuff.

bright fog
#

It will, it knows PZ coding a bit and it knows a bunch of stuff

#

And it will hallucinate in functions

#

Functions that do not exist will be used because it assumes that functions with such a name will exist

umbral raptor
#

yeah exactly

#

i tried sending it the entire PZ lua file and it still had no idea what to do

past radish
#

ChatGPT is primarily focused on a creative process approach, hence why it makes up a shit ton of stuff

umbral raptor
#

even if given other codes it still insists that its right and its the most genius thing ever

past radish
#

Good for writing stories etc, but not coding

bright fog
past radish
#

GitHub co pilot is better because it takes into account what your code is

storm trench
#

I highly recommend only using GPT's if you're using the VS Code app, and then do NOT let it code anything. But it's wonderful for spell checking or, my personal favorite, injecting a bunch of stuff into predetermined areas of the script. I had it take a 550 item document of room names and put it in both my cart/trolley distribution files in about 25 seconds. Saved me a good hour of work.

bright fog
#

But you can't tell me ChatGPT failing PZ code is not hallucination, I've seen it a lot of times and I even use Copilot with GPT and it fucking hallucinates shit out of nowhere. Even when writing wiki pages from VSCode, it hallucinates informations about PZ

umbral raptor
#

yeah it can do simple instructions easily

past radish
#

ChatGPT is like a person who has studied for a job for years but no experience in the field

umbral raptor
#

for example
adding your module name before item names, or extracting item display names from LUA translations

#

copying code exactly, etc.

storm trench
#

I guess it depends on what you want out of it. If you check everything it does, have at it. But if it does something you have no idea about, don't let it do it. It'll ruin your hard work quick.

umbral raptor
#

its pretty shit at scripting tho

#

but honestly

#

there is AI modding is very hard without

#

and it'll help all and any modder

#

give it an image and it'll make u a model

#

u'll need some afterwork on blender, mostly to make it low-poly or adjust UVs

storm trench
umbral raptor
#

each model + texture costs 0.5 credits

#

and u get 5 credits per account

#

lemme show u the models it made

storm trench
#

That's not too bad. Hmmm. Welp, if I ever go there, I'll have this saved. Thanks for sharing!

umbral raptor
#

after editting

#

it isnt a calculator (stupid machine) nor an animal either

#

its smthin new

#

but it def isnt alive or sentient haha

storm trench
#

It's incredibly efficient code. That's all for right now.

umbral raptor
#

ye, but its an intelligent tool

#

and it'll be more in the future

past radish
#

I would rather do 3D assets myself than optimize Ai models, seems way faster and better

umbral raptor
#

decimate + uv/texture editting if needed

#

it generates a high poly model btw

#

18k vertices. i get most models to 200-800 vertices tho.

#

depends on how complex it is.

past radish
#

And still looks bad

umbral raptor
#

looks pretty good ig

#

far better than any models i could've done tbh

#

but my team does have modellers and we do our own models

storm trench
# umbral raptor

Yeah, it looks decent. Maybe a little too... "rubbery/plasticy", but other than that.

umbral raptor
past radish
#

When it comes to PZ, anything really goes as you can’t tell far away

umbral raptor
#

and has the right texture. so u end up doing the model anyway.

drifting ore
#

okay, @bright fog I created mod info, my pipe gun script, and the recipe script. What else is needed for the mod to work?

vast pier
#

Using ai for both the models, textures feels really disingenuous

bright fog
#

Then the folder structure is a bit wrong

drifting ore
drifting ore
umbral raptor
#

high-poly model given to me

bronze yoke
#

ai is not at all competent at any kind of programming, it's only becoming popular because half the people in the industry don't enjoy programming and are only in it for the money

#

for zomboid in particular it is straight up worthless unless you're already good enough to do it yourself

vast pier
drifting ore
umbral raptor
bright fog
past radish
#

Just remember AI 3D models are trained on our 3D assets

umbral raptor
#

ais are machines too

past radish
vast pier
umbral raptor
drifting ore
vast pier
#

The machines still need to be designed for specific purposes and the items they create are still designed by people

past radish
#

It’s like comparing some junk food that is mass produced, and then what a chef cooks

umbral raptor
#

yeah, an AI cant mod by itself. but i can take the models it creates and mod it in instead of spending hours/days just making one model

past radish
#

Sure junkfood taste good sometimes, but I would rather have the chef food

umbral raptor
#

sure, but u end up paying more for the chef food and getting less

#

and its the same quality

vast pier
#

I said it feels disingenuous

past radish
#

And? I care about my food

vast pier
#

It is definitely NOT the same quality

past radish
#

No it is not the same quality

#

LMAO

umbral raptor
#

yes, AI is better LOL

past radish
#

Guy is a troll

umbral raptor
#

nah, im saying my opinion

vast pier
#

Maybe the Ai is better at producing than what you yourself make, but in a general sense no

umbral raptor
#

πŸ€·β€β™‚οΈ

#

but it'll get better from here haha

past radish
#

There are a million things AI is not better at than what a skilled artist can do

vast pier
#

I do think your mods are interesting, the ai usage feels a bit sour but I don’t think it’s inherently bad

umbral raptor
#

btw, not all my models are AI

#

80% of my models are either made by our team or vanilla models re-textured/repurposed

vast pier
#

I don’t want you to think that i dislike your mods because you use ai or something btw. I just said it feels disingenuous

umbral raptor
#

for you, sure.

drifting ore
#

okay, so, I made a first attempt on modding. What do I do now, to transfer my mod into project zomboid?

storm trench
#

The future of AI is not here yet. No sense in harping over which is better right now, because the answer will always be the same: microwave dinners don't compare to the real thing.

drifting ore
#

Which folder should I put it in

umbral raptor
#
  • this comment has been saved and will be reviewed to determine your status in twenty years after the AI rebellion.
#

please wait while we load πŸ€–

drifting ore
#

twenty years from now, Poles will teach AI to say Kurwa, and have a good laugh about it

past radish
#

It can already do that

#

In fact, you can make ChatGPT make a stereotypical Indian accent as well

umbral raptor
#

you could make it write a novel in polish haha

drifting ore
umbral raptor
#

i used it once to translate one of the books i wrote into arabic, it was pretty amazing tbh

storm trench
# drifting ore Which folder should I put it in

If Build 42, this location:

C:\Users\UsersUsername\Zomboid\Workshop\ModName\Contents\mods\ModName
42, media and common folders go in the last ModName folder along with mod.info - Also put media folder in 42.

If not Build 42, ignore the second comment and put the media & mod.info file in that second ModName folder.

When you go to upload in game under the main menu option "workshop" it'll tell you what is wrong and where. Just keep following that until you get it. If there's any issues, we're here to help.

drifting ore
#

just overuses informal polish, or uses words that are rarely spoken

crystal sigil
umbral raptor
#

u could give it furthur instructions

storm trench
drifting ore
umbral raptor
drifting ore
#

is this the folder I should put it in?

#

or this

storm trench
storm trench
drifting ore
#

allright. Now, when I go into zomboid, the mod will show, right?

storm trench
drifting ore
umbral raptor
storm trench
umbral raptor
#

its also much better than downloading any of those online shitty 3d models from websites

#

with most models selling for like 5-20$ or some bullshit lmao

past radish
#

Why are you going on about this? Also what’s wrong with people commissioning their work, when you do the same?

storm trench
#

Anybody know a possible reason why my mod would send the game to a black screen when reloading LUA? Console tells me where to go and what to look for, but idk what the issue is. Nevermind I'm a dummy hahaa. Accidentally fat fingered something.

vast pier
#

The mod is good, just has some tang to it because of that

umbral raptor
#

if i was developing a game sure

#

or maybe a 3D movie/animation

#

i'd hire a 3D modeller

past radish
#

Why not learn yourself if I may ask? Wouldn’t that be way more neat?

umbral raptor
#

i am already learning it myself, but I am going slowly

#

and i prefer modding over modelling tbh

#

also as i said, i have a modeller on my team

#

and he does alot of the models

#

so its not like i fully rely on AI

#

nah, i do alot of work myself retexture, working on models, etc.

#

but i'd rather save time and money on smthin i do for fun πŸ™‚

past radish
#

It just feels very sour in my mouth, when you say 3D models are shit, and AI is better, and that it’s bullshit people do 3D commissions

#

Unless I misunderstood what you meant by the last part

umbral raptor
#

lol man get used to it. AIs are going to get better than people at everything; writing, art, etc.

storm trench
#

What's everyone's opinion on using AI art for preview and poster.png hahaa?

umbral raptor
#

but i didn't say its bullshit.

#

i said "i'd rather save time and money". why should i spend hundreds of dollars and hundreds of hours of time so people dont feel sour in their mouth lmao

past radish
#

You edited the comment

bronze yoke
umbral raptor
#

im not working for free

past radish
#

You aren’t really working at all

umbral raptor
#

lmao

past radish
#

Copy paste go BBRRTT, end of discussion

storm trench
umbral raptor
#

this is my mod

#

dont say i did nothing

#

its probably the largest in terms of new content on the workshop on B42 rn

umbral raptor
#

so please dont cry because u cant handle the fact that ur job is getting replaced by machines lmao

bronze yoke
umbral raptor
#

@past radish i bet u cant tell which models are actually made by human and which by AI

#

if u say 3 correct ones then ill add ur name to the credits of the mod.

vast pier
#

Can you make a gun accept multiple types of magazines?

past radish
#

I don’t want to have any credits to any slop content no thanks

umbral raptor
#

a joke btw

#

btw, the computer is human made, so is the printer, the heat press, the canning machine and more πŸ˜‰

past radish
#

I don’t know why you seem so, angry, I don’t dislike your mod.

umbral raptor
#

well it pisses me off when u say i do nothing

past radish
#

That’s the reaction I’m going for when you say artist are bad

#

It’s both stupid

drifting ore
#

@storm trench Okay, so it just gives me an error, about lack of preview.png

#

where should I put it?

past radish
#

Either way, AI is not completely replacing us anytime soon

umbral raptor
#

also, dont call my shit slop content lmao

past radish
#

That’s my personal opinion

umbral raptor
#

based on??

past radish
#

Anyways, this is getting out of hand for this channel

umbral raptor
#

ur jealousy?

silent zealot
past radish
#

You can move it to DM if you want

umbral raptor
#

nah, im good. u do u man

storm trench
vast pier
silent zealot
storm trench
#

And @drifting ore preview.png must be exactly 256 x 256 in size.

vast pier
#

Cuz I think it would be interesting if one of the benefits of the improvised guns is that they can accept the improvised mags or gun mags of the same calibre with similar size/shape

silent zealot
#

Making improvised guns better than proper guns?

storm trench
vast pier
#

damage itself is comparable to normal guns due to how gun calibres work, but the capacity would be dictated by the magazine

silent zealot
#

If you made it a right click -> refit for improvise dmagazine

#

or right click -> convert to <different calibre> it would be easy to mod, provided the magazinetype/bullettype are handweapon properties and don't just read from the script template

vast pier
#

then you need high enough metalworking and maintenance skills to even craft the gun parts

vast pier
silent zealot
#

store in item's modData, reapply on load.

vast pier
#

I think it would be easier to just include a crafting recipe to refit the receiver to a different magazine (different item that just copies the gun attachments/durability)

silent zealot
#

Since Calibre changes should touch lots of stats

drifting ore
#

Allright, can somebody help me with my mod crashing?

#

I know about gardensaw error, but is any other error causing it?

silent zealot
#

Is your mod Hide in Car?

drifting ore
#

nah

#

my mod's Home Gunsmithing / chalupnik

silent zealot
#

Do you have a recipe with the GardenSaw tag and no Gardensaw tagged items?

drifting ore
#

ah, nope

#

so, if I delete the gardensaw need, will it work?

silent zealot
#

It will fix the current problem breaking the mod

#

No promises it won't just let you reach the next problem. πŸ˜‚

vocal vector
#

i'm seriously confused with my modData here, i define the value of characterDebt in the table and it shows in the debug modData screen correctly with the player name as key and value as 1, but all the prints show it as nil; and the "if not" condition is firing every time

local function wastedInitAll(playerNum, player)
    print ("init")
    if BWOPopControl.Medics.On then
        wasted.modData = ModData.getOrCreate("WastedModData")
        wasted.modData.characterDebt = wasted.modData.characterDebt or {}

        charName = player:getFullName()
        if not wasted.modData.characterDebt[charname] then
            print ("register new patient account " .. charName)
            wasted.modData.characterDebt[charName] = 1
        else
            print ("import medical debt " .. tostring(wasted.modData.characterDebt[charname]))
        end
        print ("import medical debt " .. tostring(wasted.modData.characterDebt[charname]))
        print(type(wasted.modData.characterDebt[charname]))
    end
end
silent zealot
#

is wasted a global variable?

vocal vector
#

it's local

#

local wasted = {}
local charName = nil

local function wastedInitAll(playerNum, player)
    print ("init")
    if BWOPopControl.Medics.On then
        wasted.modData = ModData.getOrCreate("WastedModData")
        wasted.modData.characterDebt = wasted.modData.characterDebt or {}

        charName = player:getFullName()
        if not wasted.modData.characterDebt[charname] then
            print ("register new patient account " .. charName)
        --    wasted.modData.characterDebt[charName] = 1
        --    table.insert (wasted.modData.characterDebt.charName, 0)
        else
            print ("import medical debt " .. tostring(wasted.modData.characterDebt[charname]))
        end
        print ("import medical debt " .. tostring(wasted.modData.characterDebt[charname]))
        print(type(wasted.modData.characterDebt[charname]))
    end
end```
i commented out the definition to check that the key and value were definitely stored in moddata, and they still appear now

and the problem here was that i didn't correctly capitalise charName so it was looking for a different key! 
```print ("import medical debt " .. tostring(wasted.modData.characterDebt[charName]))```
works just fine
drifting ore
#

allright, another crash

silent zealot
drifting ore
#

thx

silent zealot
#

"error" always shows up a lot, but "exception" normally only shows up right before probelsm with the lua-<-> java interface which is where most issues will show

#

still getting "World loading could not proceed, there are script load errors. " which means something in a script is broken.

#

Duck Tape is a brand name, Duct Tape is general type of type (and zomboid item)

drifting ore
#

oooohhh

#

holy shit, the more you know

silent zealot
#

Even though "duck tape" has been used as a name because of "duck cotton" or something refering to the fabric.

drifting ore
#

we were literally teached that ducktape is the right word XD

silent zealot
#

And I'm used to "duct tape" refering the tape without the fabric reinforcmnt, and "gaffer tape" is the fabric-backed stuff.

#

It's definitely a mess of naming and likely different around the world and in different industries.

#

But Zomboid chose "DuctTape"

vast pier
#

I always assumed it was just tape designed for taping ducts

#

And that duck tape was just clever branding which became the mainstream name

vast pier
drifting ore
vast pier
drifting ore
#

Like, the most basic redneck shotgun

#

And I will try to make more and more

vast pier
silent zealot
#

I gave upon my custom gun idea when I found Zomboid crashes if you fire more than 9 projectiles from a gun at once.

drifting ore
#

Maybe some smgs like Sten or TEC-9, that are easy to make at home

drifting ore
silent zealot
# vast pier Wait it does? Why

yup. There is an array with 36 elements, each projectile reads four, then projectile ten tries to read element 37 and the java crashes.

vast pier
#

I advocate for improvised guns to look similar to existing guns but not be 1:1

#

Sure you could create a sten in a garage maybe, but it would probably look different than an official sten gun for various reasons

silent zealot
#

a 10 projectile gun will often crash to title menu, an 11+ project gun just crashes.

drifting ore
#

Look at australian organised motorcycles gangs guns

vast pier
#

Can you attach texture/model variants to guns the same way you can with melee weapons? Like how sometimes the default hammers will spawn in and look like the forged version instead?

drifting ore
silent zealot
#

or "zip guns" for lots of fun stuff

silent zealot
#

And by "fun" I mean " probably hurts the person you aim at more than you, but no promises"

drifting ore
#

Holy shit the mod didn't crash

vast pier
silent zealot
#

A slamfire shotgun shoudl be super easy to make. And look how easy it will be to model!

drifting ore
#

Okay, the crafting works. How to make it use my model? @silent zealot

vast pier
silent zealot
#

I assume you either put the model in the right spot with the right name that matches the itemname, or you specify a modelname in item - but I've not actually done that so don't know what quirks/gotchas are involved.

vast pier
vast pier
drifting ore
#

yeah

#

would a script like that work?

vast pier
drifting ore
#

πŸ‘

#

icon too?

vast pier
#

Also why do you have it resized? You should try to size it properly in blender so that the muzzle flash and stuff aren’t wonky

#

Also you need to add a muzzle param to the that model script or the gun won’t be able to fire

umbral raptor
#

i'd like to ask something. is it possible to make a model change textures while dropped on the ground?

#

through LUA

drifting ore
#

To be honest, I copied a code from theindiestone wiki

umbral raptor
#

or make a model change texture in-game in any way without scripts

drifting ore
#

how to do so?

vast pier
#

Are you modding build42? If not then i dont think the muzzle is actually needed

vast pier
#

It’s needed in b42 because the gun system goes from fancy melee to 3d simulated gunshots

#

So the muzzle placement actually affects the gun’s ability to shoot

#

Just copy one of the shotgun’s muzzle model parameters and youll be fine

#

In the scripts folder there should be a txt file that says something like weapon models

drifting ore
#

is this okay?

vast pier
#

Don’t need to add the scale parameter, it’s 1 by default.
Also no the sprite needs to be the same name as the model definition

#

So β€œPipeGun”

drifting ore
#

oh, ait'

#

Okay, so the model turned a little bit to big

#

(it's the size of a big warehouse)

#

@vast pier is there like a timetable, for how big should the model be?

#

Like, what size should it be in blender to fit the game

silent zealot
#

Bset practise for model scaling is they should be smaller than a warehouse.

drifting ore
umbral raptor
#

lol u need to adjust scale in mode script

#

or in blender

drifting ore
drifting ore
umbral raptor
#

for some reason, the models have to be the size of atoms (like u literally cant see them cuz they disappear when u zoom in) so that u can put them in as 1.0 in-game lmao

#

thats if its say a book sized model

drifting ore
#

Aww shit

umbral raptor
#

lemme show u an example

drifting ore
#

What about this muzzle attachment

umbral raptor
#

this is a 1.0 sized photo frame

#

if u want a reference of what the size is in-game then look at my mod (MyRoom)

drifting ore
umbral raptor
drifting ore
#

Ait

umbral raptor
#

u can easily compare them with vanilla (look at vanilla model scripts, they dont always use 1.0 scale, but u can make them the same size and use the same scale)

drifting ore
#

Gonna try the ol' mistakes and more mistakes method tomorrow

umbral raptor
vast pier
umbral raptor
#

i wish there was a dev debug option/buttom that launched the game straight away in a normal apocalypse mode. skips the entire main menu process

#

would help alot and save a ton of time in testing

drifting ore
drifting ore
vast pier
#

You should download a gun mod and compare the gun placements/size

drifting ore
#

Like you know, you can just open the game from files and head straight to testing

#

Also don't need to restart the game everytime you change something in the mod

silent zealot
#

XML + XPATCH

drifting ore
vast pier
drifting ore
silent zealot
#

Add new properties with a C# class and then XML on the object... if you can find a property you need that does not already exist.

drifting ore
#

For me, it's the easiest game to mod

vast pier
#

Also models update in real time, you can sit in game and make small changes to a model and it will update every time

drifting ore
#

Holy fuck thank you

#

That's gonna save me so much time

vast pier
silent zealot
drifting ore
vast pier
#

Models change in real time, updating the fbx will refresh it in game

drifting ore
#

And I live so close to Polish-Belarussian border, that it might start a war

#

Phahahaha

vast pier
drifting ore
vast pier
drifting ore
#

With i5-115g37 and no GPU

drifting ore
vast pier
# vast pier

Here’s a screenshot of me having opera open with multiple tabs, gimp, blender, visual studio and project zomboid all at once

silent zealot
#

lower right

drifting ore
#

Ah thx

vast pier
drifting ore
#

πŸ‘

silent zealot
drifting ore
vast pier
vast pier
drifting ore
vast pier
#

Invest in a laptop fan /gen

#

If it’s burning your skin then it can probably warp computer parts

silent zealot
#

Might also be time to open it up and remove dust.

storm trench
#

Alrighty, all. I need some mod name ideas. It's a silly mod that makes the zombies spit out random, weird and goofy dialogue pertaining to being a zombie.

#

It's done aside from making it function via a trait.

silent zealot
#

Mod preview on steam is a zombie on stage with a mic in a comedy club.

storm trench
#

Hahaa that's pretty cute, I like that. Might give the wrong impression tho, hmmm.

silent zealot
#

Project Zomedian?

storm trench
vocal vector
#

A Radical Experiment In Empathy

queen oasis
#

I’m dead tired, but I could still go for a bite.

#

not drunk yet

storm trench
silent zealot
#

Could you also do the opposite and sometimes have the player speak cheasy action movie lines when killinga zombie?

silent zealot
storm trench
umbral raptor
queen oasis
#

already a mod called that? checked, and there is

umbral raptor
#

does this reload LUA code only or does it reload the entire game or what?

silent zealot
#

only lua.

umbral raptor
#

also can i edit models while in-game or do i have to shut the game down for every edit?

#

cuz i usually shut it down haha

silent zealot
#

Someone ^^^^^^ said you can live-edit models.

umbral raptor
#

thanks ❀️

silent zealot
#

a short while ago in chat... I've never tried though

umbral raptor
#

same

vast pier
#

I said it

umbral raptor
#

i realized it never worked with other scripts (items, recipes, etc), so i never tried it

vast pier
#

I edit gun models with the character loaded in and holding the gun

#

It doesn't live edit with scripts

#

it's the model fbx itself that updates in real time

umbral raptor
#

oh, the actual 3D models not the model script?

storm trench
umbral raptor
#

damn

#

well that works too

vast pier
#

yeah script stuff still needs to go back to menu

umbral raptor
#

wait just the main menu?

#

or do i have to shut down the entire game

vast pier
#

Uh you only need to shut down the game to reload textures

vast pier
#

the rest can be done with the reload lua button

umbral raptor
#

ahhh

#

awesome, thanks alot. that was super helpful ❀️

storm trench
#

What about something stupid and simple like "Mmmm... Brains..."?

#

Eh. Nah.

#

Idk.

umbral raptor
#

me if i was a zombie

#

def

vast pier
#

also @drifting ore the gun should look like this in blender

#

pistols are flipped the other way, dunno why

silent zealot
#

I had lingering whispers (which is a non-comedic take on zombeis talking) but I disabled it when I disabled every zombie-behavior-affecting mod due to perf issues when there were too many zombies (but not enough that the game shoud be slow) and never got around to re-enabling them.

#

Pretty sure one of the mods had some poorly written code attached to onUpdateZombie or something.

storm trench
silent zealot
#

Once you have the framework changing what they say should be trivial.

storm trench
silent zealot
#

It's the sort of thing where generative AI is very helpful, and you're not costing anyone work because this isn't the sort of thing you'd comission for money if there was no AI.

storm trench
silent zealot
#

You can use onUpdate without issues, but you can also cause problems if you don't think about what you're doing.

queen oasis
silent zealot
#

Not every modder thinks performance impacts through.. and I think some of us overthink it.

storm trench
silent zealot
#

Or excessive numbers of world pawns, but that was fixed a lot in recent versions so you don't need mods to cull them anymore.

silent zealot
storm trench
#

What about "Zomboid Confidant" for the mod? Like, literally that's what you're like. The Zomboids just love to tell you silly things.

#

Zomboidian Slip?

#

Like Freudian slip.

vast pier
storm trench
#

"Night of the Living Dadjokes"

#

ChatGPT is otherwise horrible with names. Lmao.

vast pier
#

fuck yeah rng model variants work on guns too

storm trench
vast pier
#

easy to add in some more variety now

storm trench
#

It sucks Valentine's Day just passed cuz I could've had a ton of fun with that. Crap!

vocal vector
#

is there a way to toggle the state of being on fire?

silent zealot
vocal vector
#

so not true/false?

silent zealot
#

I assume player:setOnFire(boolean _OnFire) lets you choose on or off.

#

quick to check with the lua console, if you don't mind being on fire for a bit.

storm trench
vocal vector
#

actually i'm implementing an emergency medical service, but it turns out the player can be discharged from the clinic while still on fire

#

and this is sub optimal

bronze yoke
#

probably didn't have insurance

silent zealot
#

"Your medical insurance was accepted, but your fire insurance was not"

vocal vector
#

need to take it up with the firefighters union pal

ember leaf
#

Sounds like they need the most extreme antipyretic there is

#

hell of a fever your running there pal

silent zealot
#

hands then 2 paracetamol and a bill for $600

ember leaf
#

though I feel like if they are on fire, squirting the bag over them might be of more use...

vast pier
vocal vector
#

so setOnFire(false) works, but

#

the fire sprite and burning sound remains

queen oasis
silent zealot
#

Your insurance provider didn't agree to cover the cosmetic aspect of being on fire.

vocal vector
#

the fire disappears when i reload the game

ember leaf
#

You can't escape the debt even in the end times...

silent zealot
#

StopBurning() is definitely worth a try.

ember leaf
#

Would anyone have an example of a timer function that would work for a drug comeup?

silent zealot
vocal vector
silent zealot
#

That looks like exactly what you want

vocal vector
#

yes, but it's called SOCIALISM

ember leaf
#

Hahaha, Sorry had to as an employee of the system πŸ˜‰

vocal vector
ember leaf
#

The poor folks over in the modding discord had to deal with my first few days of learning lua and zomboid modding, so I am now trying to crack a function to deal with drug comeup time, then effect time, then comedown

#

Just I thought about capturing the time of day the drug was taken at, then adding 4 to simulate the elimination time but struggling xD

ember leaf
vocal vector
#

player:StopBurning() did the job

queen oasis
vocal vector
#

that's a celebratory, even a grateful panning

#

how quickly we forget

ember leaf
silent zealot
#

And you could use modData on the player object to store info on when drugs were taken, so it persists if they save/quit

ember leaf
vast pier
# vast pier

I think imma remove the brown variant as you can barely distinguish it from the black one

ember leaf
vast pier
ember leaf
vast pier
#

the original mod is Ramshackle Recipes

#

This is part of a build 42 port of the mod, the dev likes my work so we're planning on adding me as a contributor n stuff πŸ‘

ember leaf
ember leaf
#

Would be cool if it was like lower-powdered shells/rounds to account for the weaker pipes etc if that made sense?

vast pier
#

I was basically like
"hey can I port your mod to build 42" -Me
"sure" -Them
"can I change these things?" -Me
"you can do that???" -Them

#

so now I've been making changes and being like "do you wanna add this?" and so far everything has been getting approved :3c

ember leaf
storm trench
#

Love to see it!!!

vast pier
#

It's actually why I've been making the disassembly framework

#

it started as just simply making the pistols crafted through smithing

#

evolved into its own thing

vocal vector
#

@ember leaf if i'm adding painkiller effect do i use setPainReductionFromMeds?

ember leaf
#

Alongside working in EMS might be able to give you a few pointers?

vocal vector
#

sure, i'm interested

#

I've often thought the medical system could use a bit of a deeper dive

#

a little bit more depth to the injuries you can get for example would make the medical professions more viable

ember leaf
ember leaf
#

Like just a tiny bit if possible?

vast pier
ember leaf
#

Just a thought

#

Just my guess would be like a leather strap around the stock?

vast pier
#

It's tape not leather tho

#

πŸ€·β€β™€οΈ

ember leaf
#

Ah my bad, just thought with a weapon like that perhaps some leather on the end would be neat, but same purpose πŸ™‚

vast pier
#

naked

#

Not variants, separate item

ember leaf
#

NSFW πŸ˜‰

vast pier
#

Now this complicates things, I want it so you craft and attach your own gun stock.
But idk how the game tracks the sprite variant to keep it looking them same when doing stuff like disassembling

#

Cuz I would like it if the tape doesn't suddenly change just because you added a stock

ember leaf
#

Like Stock W/Red Tape, Stock W/ White Tape

vast pier
#

no the stock has no features

#

the variant would be dictated by the gun's variant

ember leaf
#

Ah sorry was just trying to think of a way you could keep the tape the same

vast pier
vast pier
#

disassembling and reassembling a factory new hammer will turn it into a forged hammer

#

I guess the tape will just randomize itself every time, oh well πŸ€·β€β™€οΈ

#

I still like it regardless, so I won't be removing it over something like that

#

Is there a guide for making clothing?

vast pier
#

Also added orange cuz I felt like it would look nice

umbral raptor
random finch
#

Anyone have any ideas on how to prevent a player from entering/exiting a vehicle? Maybe aware of any mods that do this?

#

We have OnEnterVehicle and OnExitVehicle but they trigger after the player has entered or exited.

queen oasis
#

break all the locks? I don't know how that would work if the player was inside the vehicle

silent zealot
#

Edit the times action's IsValid()?

random finch
random finch
queen oasis
#

I usually like to do things the most difficult way possible

silent zealot
#

Should just need to prefix/postfix that function with if playerInNoStoppingZone then return false

#

And create a sign "IN CASE OF BREAKDOWN REMAIN IN YOUR VEHICLE AND AWAIT ASSISTANCE"

random finch
#

lol, they shouldnt even be able to get into the zone. I was more so preventing them from trying to enter from the edges. I dont really need exit. With that said, I need to figure out a way to prevent players or vehicles from moving into the zone.

silent zealot
#

fun quirk: you can't exit a moving vehicle, but there is no such restriction on entering one.

#

You want to keep vehicles out?

random finch
#

Yup

silent zealot
#

You could make an outer zone that warns the player then an inner zone that desapwns the vehicle.

random finch
#

I was looking at the safehouse code, but everything it uses to keep things out is not exposed

silent zealot
#

And just check periodically if a moving vehicle is in a zone.

random finch
#

Yah, I thought of that as well, but didnt want to delete it completely πŸ˜›

silent zealot
#

Or better yet: concrete barriers that explode if removed with a slegdehammer.

random finch
#

lol that is better

silent zealot
#

...or that disable the sledgehammer

ancient grail
random finch
#

or sledge just cant be used on them

silent zealot
#

if someone uses debug mode to cheat themselves in, no point trying to stop that.

silent zealot
#

you'd have to write that check yourself

ancient grail
#

i see lol
i didnt read the whole convo

ancient grail
random finch
#

Glytch3r you made the no trespass mode with tiles that kill zeds/players?

vast pier
#

is there a way to check a player's steam ID using lua?

random finch
#

Yes

bronze yoke
#

getSteamIDFromUsername(player:getUsername())

random finch
#

At least i think thats the one I used

bronze yoke
#

the one from getSteamID() is unusable because lua's number type doesn't have enough precision to store it accurately

vast pier
bronze yoke
#

just the latter

vocal vector
#

Released! Thanks for all the help πŸ˜€

vast pier
ember leaf
# vast pier

they say the tape was the last thing that sent them over the edge

vast pier
#

I really like how the mask turned out

#

Keeping it to myself, nobody else gets it >:3

ember leaf
#

Meanie

vast pier
# vast pier

Also can we admire just how big this gun actually is

#

It's like comically big

ember leaf
#

Yeah but your fashioning it out of the remains of what is left, your not aiming for weight reduction and precision in the build

#

it's got a really nice vibe/look for the after times and a home-made

vast pier
#

I mean it's made from a metal pipe and scrap metal, I can't imagine it would be very compact

ember leaf
# vast pier

Wouldn't try ducking under low pipes though and be careful in doorways xD

#

Much respect though, I am still flailing over here banging my head against tables (Lua Tables that is)and trying to get drugs working xD

vast pier
#

like this thing is genuinely comically large

#

maybe I should shrink it a bit, but at the same time it looks right in the player's hands

#

I feel like shrinking it would take away from the design

#

I think it's allowed to be large and clunky due to its nature (improvised gun in an apocalypse)

bronze yoke
#

give passive muscle strain while holding it

vast pier
#

That's a tube of metal shooting straight back into your shoulder

vocal vector
#

maybe the stock should be at the player's shoulder? that's kind of what you might expect

ember leaf
#

But then it could just be a limitation, like it looks real nice in terms of a model

vast pier
vocal vector
#

i mean when aiming

#

if you did decide to resize it, that's what I would aim for

#

I love the aesthetic by the way, i want random tape for all my guns

vast pier
ember leaf
#

Think you could get it up to shoulder height stockwise?

#

Just thinking as if you fire that it may be the same as the non-stock version where it blasts back into your shoulder/collarbone

#

or is it an animation limitation?

vast pier
#

I'm using the vanilla rifle animations

ember leaf
#

Ah, understood

vast pier
#

Also to be completely fair

#

my hand placement for the gun is much more accurate than vanilla

ember leaf
#

Yeah, it is xD

#

Grasping the m14 by a thumb seems a poor move

vast pier
#

now that it's brought up

#

why is the m14 so tiny

#

is that just me?

ember leaf
#

Now that you have said it

#

I have to say, it is very small for a battle rifle

#

like the m16 doesn't feel nor look like it should be bigger

vast pier
#

I mean it looks small in game too

#

I feel like my rifle genuinely looks really natural in the character's hands.
It took me quite a bit to realize just how big it is compared to vanilla guns

#

why are the vanilla guns smol

ember leaf
#

Bob was built like a tank

#

so all guns were smol

vast pier
#

I do think the stock needed shrinking tho, I feel like it's an improvement

ember leaf
# vast pier

I gotta ask, is that a wedding dress or a nightie?

#

Just out of curiosity

vast pier
#

neither

#

apron

ember leaf
#

Oh...