#mod_development

1 messages ยท Page 164 of 1

frank elbow
#

Remove Key3 = Value,. See if it works. Do the same for Key2. Repeat

tawdry solar
#

these?

frank elbow
#

Not ideal, but if you've exhausted your avenues then yeah

#

Yes

tawdry solar
#

wouldnt that wreck the code

frank elbow
#

You're not removing them permanently, you're taking them out to see if something is causing issues

#

All it'd do it give them the default values unless it's a required value

#

You can surround them with /* */ if you're concerned about losing something

tawdry solar
#

how would i see if ms is causing issue

frank elbow
#
item X {
  Key = Value,
  Key2 = Value,
  /* Key3 = Value, */
}
#

ms?

tawdry solar
#

sm

#

somtin

frank elbow
#

If it's taken out and the item shows up, that was the problem

#

Which means you will have narrowed it down and can figure out what exactly was the problem with that value

tawdry solar
#

how do ik if its that vlaue

frank elbow
#

Remove Value 1. The item still doesn't show up
Remove Value 2. The item shows up

This implies that value 2 (or a combination of values 2 and 1, if you don't add 1 back) was the problem, because the item does not show up when it's included

tawdry solar
#

but why would that make the item not apear ingame

frank elbow
#

I don't know; as I said before, this is just a shot in the dark as a way you can debug it

#

Presumably it'd mean there's something wrong with the value which would cause it to not load

tawdry solar
#

i think i miscommunicated somt

#

the item doesnt apear

#

so if i try and spawn it

#

its not there

frank elbow
#

๐Ÿคฆ๐Ÿพ

#

In your defense, I suppose I could've asked that question better originally, but yeah "item spawner" isn't a super clear answer lol

tawdry solar
#

yeah

#

my bad

ancient grail
#

im looking for an event that has both zombie death and the weapon that kills it as param. this eevent doesnt exist so im thinking of using onzombiedeath then check if the player has equipped the specific weapon .
but then now if i do this, it will trigger the thing even if the zed died from other reasons

then i looked at
OnHitZombie
and thought this must be perfect except
idont know when if it can check if the zed is killed by the hit tho,.. does it?

can OnHitZombie
used to check if the zed is killed?

frank elbow
#

In that case it's probably just an issue with the model or texture; can you send the relevant item script?

tawdry solar
#

sure

#
item Shiv1
    {
    MaxRange    =    0.85,
    WeaponSprite    =    shiv_1,
    MinAngle    =    0.65,
    Type    =    Weapon,
    MinimumSwingTime    =    2,
    KnockBackOnNoDeath    =    FALSE,
    SwingAmountBeforeImpact    =    0.02,
    Categories    =    Improvised;SmallBlade,
    ConditionLowerChanceOneIn    =    6,
    Weight    =    0.4,
    SplatNumber    =    1,
    PushBackMod    =    0.3,
    SubCategory    =    Stab,
    AimingMod    =    0.8,
    ConditionMax    =    10,
    MaxHitCount    =    1,
    IsAimedHandWeapon    =    TRUE,
    DoorDamage    =    1,
    SwingAnim    =    Stab,
    DisplayName    =    Shiv,
    MinRange    =    0.61,
    SwingTime    =    2,
    KnockdownMod    =    0,
    SplatBloodOnNoDeath    =    True,
    Icon    =    dudclub,
    RunAnim    =    Run_Weapon2,
        IdleAnim    =    Idle_Weapon2,
        CloseKillMove = Jaw_Stab,
        BreakSound  =   BreakMetalItem,
        TreeDamage  =   1,
        EnduranceMod = 0.5,
        MetalValue = 5,
        CriticalChance    =    10,
        CritDmgMultiplier = 10,
        MinDamage    =    0.3,
        MaxDamage    =    0.7,
    WeaponLength = 0.19,
    HitFloorSound    =    BladeHit,
        ImpactSound    =    BladeHit,
    HitSound    =    BladeHit,
    AttachmentType = Screwdriver,
    Tags = Screwdriver,
      }


        model Kurki
                {
                mesh = weapons/1handed/Shiv,
    
                attachment world
                {
                offset = 0.0000 -0.1660 0.0070,
                        rotate = -180.0000 0.0000 0.0000,
                }
            }
}
#

its the same for 2 of my items

#

oh my god

#

i just

#

saw that the model and the item are differant

#

im gonna test it now

frank elbow
ancient grail
#

great so tehres no event for what i want to do....

tawdry solar
#

stil doesnt work

ancient grail
#

is there anywhrere i could hook?

#

i dont know when its triggered cuz its past tense then present

#

idk which is which

red tiger
ancient grail
#

ill try tho

tawdry solar
frank elbow
tawdry solar
#

i actually just used the script for the screwdriver

red tiger
tawdry solar
#

welp

#

im gonna give up for now

novel swallow
#

I've bloated my zomboid play hours by like 80% due to having it running in the background for testing/scraping when writing mods - anyway around this lol?

pearl citrus
fast galleon
#

nosteam, no hours

mellow frigate
novel swallow
#

not that there's anything wrong with that, I kinda just want it to reflect gameplay

novel swallow
novel swallow
#

Ooooh, thanks

still hill
#

Hi i need help with getVehicleById()
I Send from server this

   sendServerCommand("ProjectRP", "NPCSPAWNCARCOMMAND", { ARG1 = steamID, ARG2 = vehid})```
send 254. I checked
On Client i wrote this:

local function NPCBuyCARCmd(_data)
player = getPlayer()
local username = player:getUsername()
local steamID = getSteamIDFromUsername(username);
veh = getVehicleById(_data.ARG2)
if(steamID == _data.ARG1) then
if(veh == nil) then
player:Say(tostring(_data.ARG2))
player:Say("No") -- <- player says. This part of the code is executed
return
end

ARG2 = 254. I checked

But getVehicleById can't find the car. What is the reason for this
#

I buy a car from the NPC, I'll spawn it on the server side, and I'm trying to find it on the client side to give the keys to the player

mellow frigate
#

Hello there, is there a function in vanilla or in a mod that already duplicates a player ? My main objective is to reset the pathfinding from lua which is only ever done at IsoGameCharacter creation.

silent bloom
#

Does anyone have an idea where the graphics for the vehicle dashboard are stored? As far as I can tell, they don't seem to exist in media/ui like I assumed they would. Doing a ton of searching and they don't seem to exist at all. Is this constructed in the .class files maybe? I would think at least the icons exist somewhere, but I can't find them

thin hornet
#
    local textures = {}
    textures.texEngine = getTexture("media/ui/vehicle/engine.png")
    textures.iconEngine = getTexture("media/ui/vehicles/icon_enginetrouble_light.png");
    textures.iconAirCondition = getTexture("media/ui/vehicles/icon_airconditioning_light.png");
    textures.iconDoor = getTexture("media/ui/vehicles/icon_doorslocked_light.png");
    textures.iconLights = getTexture("media/ui/vehicles/icon_headlights_light.png");
    textures.iconHeater = getTexture("media/ui/vehicles/icon_heating_light.png");
    textures.iconIgnition = getTexture("media/ui/vehicles/ignition.png");
    textures.iconIgnitionKey = getTexture("media/ui/vehicles/ignition_key_off.png");
    textures.iconIgnitionStarted = getTexture("media/ui/vehicles/ignition_key_on.png");
    textures.iconIgnitionHotwired = getTexture("media/ui/vehicles/ignition_hotwired.png");
    textures.iconBattery = getTexture("media/ui/vehicles/icon_lowbattery_light.png");
    textures.iconTrunk = getTexture("media/ui/vehicles/icon_trunk_light.png")
    textures.iconSpeedRegulator = getTexture("media/ui/vehicles/speedregulator_light.png")
    textures.dashboardBG = getTexture("media/ui/vehicles/dashboard.png");
    textures.gaugeFull = getTexture("media/ui/vehicles/rj-vehicle_fuelguage-full.png");
    textures.gaugeLow = getTexture("media/ui/vehicles/rj-vehicle_fuelguage-low.png");
    textures.gaugeEmpty = getTexture("media/ui/vehicles/rj-vehicle_fuelguage-empty.png");
    textures.engineGaugeTex = getTexture("media/ui/vehicles/rj-vehicle_engineguage.png")
    textures.speedGaugeTex = getTexture("media/ui/vehicles/vehicle_spedometer.png")
#

something like
media\texturepacks\UI.pack
media\texturepacks\UI2.pack
media\texturepacks\Mechanics.pack

ancient grail
# frank elbow It occurs directly before the hit function is called

soulsteal={}
local damageBoost = 0.0009
function soulsteal.EvolvingWeapon(zed, _, _, wpn)
    ---TODO add weapon's moddata check  if wpn and wpn:getModData()['isSoulStealer'] == true then        
    zed:getModData()['isStoleSoul'] = true
end

function soulsteal.ZedDead(zed)
    local player = getPlayer() 
    if not player then return end    
    if zed:getModData()['isStoleSoul'] == nil then return end
    local wpn = player:getPrimaryHandItem()

    if wpn then 
        if wpn:getModData()['killCount'] == nil then 
            wpn:getModData()['killCount'] = 0
        end
    end
    wpn:getModData()['killCount'] = wpn:getModData()['killCount'] + 1
    print("killCounter")
    print(wpn:getModData()['killCount'])
    print("Zed Dead?")
    print(zed:isDead())
    if wpn:getMaxDamage() >= 12 then         
        wpn:setMaxDamage(wpn:getMaxDamage()+damageBoost)
        player:Say(tostring(wpn:getMaxDamage()))     
    end        
    zed:getModData()['isStoleSoul'] = nil
end
Events.OnZombieDead.Add(soulsteal.ZedDead)
Events.OnHitZombie.Add(soulsteal.EvolvingWeapon)


frank elbow
silent bloom
wet sandal
#

Anyone know how Global Moddata works online?

thin hornet
#

ProjectZomboid\media\lua\client\Foraging\forageClient.lua
ProjectZomboid\media\lua\server\Foraging\forageServer.lua
may have some example, but there are plenty if you search for ModData.getOrCreate

sick yew
#

Hello there people

#

You all are good number crunchers

#

How many zombies spawn indoors in Louisville?

#

@left plank

#

I'm pretty sure that's a scam bot man

#

OH FOR FUCK'S SAKE

drifting ore
#

@left plank - Scam spyware links

left plank
#

thank you!

fast galleon
#

<@&671452400221159444>

drifting ore
#

I don't like free stuff

left plank
#

thanks again

fast galleon
drifting ore
#

fuck

#

don't start, im taking the summer off

tame mulch
pseudo estuary
#

Newbie modder trying to make a new option for this wheel here. question is would it be a user interface mod?

muted cliff
#

Images only, apparently.

sour island
#

I know isoObjects can transmitModData but that seems to be for world objects

#

Having an issue with my shops code - where I have money able to stack values stored in modData - removes the other item

#

Someone was storing money in world and piling it

#

when they relogged half of it was missing

thin hornet
#

The client must send a command to the server which changes the data on the server and then transmit it to all clients if needed. At least from what i've seen it's how vehicles work.

sour island
#

That's what I was semi afraid of lol

#

Hopefully all this stuff gets ironed out with the inventory changes

thin hornet
#

The more things goes the more everything will or should become server sided.

#

It make sens to have the real value on the server and client that needs it request it

sour island
#

the thing is if items are in the inventory it already transmits the information once you place it on the floor

#

maybe I can just make stacking money force it into the player's inventory than back out

thin hornet
#

You mean to transmit the worldinventoryItem'item modData

sour island
#

Yes

#

In-hand the actions are fine, as it's client side in one person

#

They can drop it on the floor and the game knows to trasmit the information

#

To sync it up basically

#

The issue here is they can perform actions outside their inventory that seems to not trigger this syncing

thin hornet
#

@sour island did you try to isoWorldInventoryItem:transmitCompleteItemToServer()?

#

that would be for an item dropped on the ground

#

so if the item is inside a container i supose you can send the whole container back to the server or something

#

@sour island it seem that ItemContainer has a removeItemOnServer addItemOnServer, did you try that on the client

sour island
#

yes for removal

#

The issue is I made it so if you drag money onto other money items it combines the modData.value

#

so there is no isoWorldInventoryItem as I made it required to be in a container

#

going to make it so the container has to be a player

#

Going to just leave it as is

#

lol

#

cba to deal with network code rn

#

I had already made splitting only work in your own inventory

#

should've known to match merging

hidden jungle
#

when your creating traits using TraitFactory.addTrait() what are the 2 booleans at the end of the function?

local t = TraitFactory.addTrait("internalname","Display Name",Cost,"Description",DisableSinglePlayer?,DisableMultiplayer?)

i'm trying to make a trait that is only enabled in multiplayer. i know one of those values is for disabling it on multiplayer but im wondering if the other one is for disabling in singleplayer or if its for something else entirely

bronze yoke
#

boolean profession, boolean removeInMP

#

profession means it isn't selectable normally

hidden jungle
#

so theres no way to disable traits specifically in single player?

bronze yoke
#

no

pseudo estuary
#

looking for the location of the files where i can add options to this menu

thin hornet
#

You would add conditions to define when to show or not show the menu options you are adding.

#

There is also a context:addOptionOnTop(...) if you want to add the option on top of the menu options list.

pseudo estuary
#

interesting, im new to modding so i may need to find someone to walk me thru it, its a pretty simple mod i think

thin hornet
#

search for OnFillWorldObjectContextMenu in the game lua source code. Youll find so many example how to use it

#

here steamapps\common\ProjectZomboid\media\lua

pseudo estuary
wet sandal
#

Its finally done

#

ish

thin hornet
#

holy moly

wet sandal
#

Will probably need some balance patches

pseudo estuary
thin hornet
#

gotta try that

mellow frigate
# wet sandal https://steamcommunity.com/sharedfiles/filedetails/?id=2982070344

We take a deep dive in how to keep inventory management entertaining on a live stream.

#darkanddarker #tarkov #gaming
โ–บ Twitch: https://www.twitch.tv/thespudhunter
โ–บ Twitter: https://twitter.com/TheSpudHunter
โ–บ Discord: https://discord.gg/thespudhunter

๐Ÿ’ธ Patreon: https://www.patreon.com/TheSpudHunter

โ–ถ Play video
#

That said, I'm very impressed by the work !

thorn bane
pseudo estuary
#

anyone in here willing to walk me thru making my first mod? its a simple idea i think Lol

#

super new to modding pz but im a fast learner

thorn bane
pseudo estuary
# thin hornet what do you need help with

Lol Pretty much start to finish, someone to help me get a general idea of finding what i need and some minor stuff maybe. i got myself into a situation in game and been thinking of modding so i found the perfect mod to make when i got stuck if u would like to know more dm me

#

i really dont need all that, i can figure that out later but for this specific mod i do need some help as its my first one

tawdry solar
#

unhappy mod development

pseudo estuary
tawdry solar
faint jewel
weary matrix
#

Any clue how to get the current mod's workshop ID? I tried this but the workshop ID is null:

local mod = getModInfoByID('OutTheWindow')
print(mod)
print(mod.workshopID)```
#

and yes the target mod is available on the workshop

thin hornet
#

@weary matrix ```lua
mod:getWorkshopID()

weary matrix
#

Hello @thin hornet, thanks, let me try

#

my pz skills are a bit rusty ๐Ÿ˜‚

thin hornet
#

there is never any java field accessible only methods

weary matrix
#

yeah totally forgot and didn't check the permissions on the field

thin hornet
#

@weary matrix port your mod into pzstudio and youll get the whole intelisense for lua working ๐Ÿ˜›

weary matrix
#

sorry but I hate IDEs, and IntelliJ ๐Ÿ˜‚

thin hornet
#

oh right forgot you use vim

#

yo vscode is bomb tho

weary matrix
#

don't need all that crap

thin hornet
weary matrix
#

sweet it's working

thin hornet
#

You need it like everyone

#

you just stuborn lol

weary matrix
#

well if I needed it how come I was able to make mods without it?

thin hornet
#

Well it would boost your productivity thats all

#

its a plus not a negative thing ๐Ÿ˜›

weary matrix
#

no IDEs are only wasting my time to be honest

thorn bane
#

i programmed my previous mod mostly in notepad

thin hornet
lone nest
# mellow frigate Hello there, is there a function in vanilla or in a mod that already duplicates ...

in case you haven't gotten a response, you can probably try getPlayer()
https://zomboid-javadoc.com/41.78/zombie/Lua/LuaManager.GlobalObject.html#getPlayer()

and then create a "new" isoPlayer
https://zomboid-javadoc.com/41.78/zombie/characters/IsoPlayer.html

from that point, you might need to fiddle around with SurvivorDesc SetID()
https://zomboid-javadoc.com/41.78/zombie/characters/SurvivorDesc.html

Funny enough, I can't seem to find a delete(), so you'll have to come up with a new copy function that cleans up

weary matrix
thin hornet
#

yeah bud i know

weary matrix
#

@thin hornet also you're obviously not that much into efficiency or you wouldn't be running windows ๐Ÿ˜‚

thin hornet
#

I got my reasons and by the way I've been trying to reach you concerning your vehicle's extended warranty.

weary matrix
#

whaaat? ๐Ÿค”

pine patio
#

Where can I find the icon for hoodies in the game files? I'm talking about this image hoodie

thorn bane
thin hornet
#

@weary matrix so whats the plan new mod idea?

#

Throw your inventory through the window?

thorn bane
#

glorious hoodie

heady crystal
#

Anybody know any tools, guide or example for writing custom moodles?

weary matrix
#

@thin hornet nah, I'm making a tool for modders who want to protect their IPR. I'm trying to have the following features:

  • obfuscate lua code to prevent edits
  • possibility to blacklist a steam user ID
  • possibility to disable the mod when running from inside a modpack
thorn bane
#

^^^^^

heady crystal
#

Thank you!

weary matrix
#

Hum, so this should be enough to detect if a mod is running inside a modpack right?

local mod = getModInfoByID('OutTheWindow')
local workshopID = mod:getWorkshopID()
if workshopID == "2659216714" then
    print("No modpack detected")
else
    print("MODPACK DETECTED!")
end
heady crystal
#

I don't understand, how are you gonna force people's client to disable a mod?

thorn bane
#

i would imagine that if workshopID is true, run the mod, else, don't run anything

thin hornet
heady crystal
#

That seems extremely unethical

#

If at all possible

thorn bane
#

also it's not strong enough to consider using

heady crystal
#

"Yeah just gonna mess with your mods real quick"

#

Is that even legal?

weary matrix
thin hornet
#

Well i dont see anything wrong with it

heady crystal
#

Assuming it even works, you would be forcing the user to not use a mod they obviously want

weary matrix
bronze yoke
#

it's very possible and not at all illegal

heady crystal
#

When they could have no idea about the infringement

heady crystal
#

You're not punishing the modder here

thin hornet
#

The mod would not load if it was loaded from a different workshop id so it would work

thorn bane
#

^

weary matrix
thin hornet
#

at least if you stop it from loading

#
local mod = getModInfoByID('OutTheWindow')
local workshopID = mod:getWorkshopID()
if workshopID == "2659216714" then
    print("No modpack detected")
else
    print("MODPACK DETECTED!")
    return
end
weary matrix
heady crystal
#

That's your idea from what I understood

wet sandal
# faint jewel grats on the release homie

Thanks! I need get it working with your carry everything mod at some point. They seem like an obvious combo now that I think about it due to how I handle Moveables, doesn't seem to work out of the box though ๐Ÿ˜ฆ

faint jewel
#

let me know if you need anything.

pine patio
heady crystal
#

Nothing

thorn bane
thin hornet
#

well Co is making an obfuscator so that would be hard to remove it

weary matrix
#

@heady crystal Modpackers are stealing code basically, I'm just trying to give modders a tool to add some level of protection against that

thin hornet
#

its not bullet proof but it require some work from the reposter

heady crystal
#

And you're generalizing

bronze yoke
#

obviously this won't be applied to mods that are allowed to be in modpacks, and exceptions will be made for authorised modpacks U_U

pine patio
thin hornet
#

Well its not punishing the end user, when they join the server that include redistributed content it would just not work and they would find an other legit server to play into

thorn bane
# heady crystal By punishing the end user

There is a point to this. I don't enjoy having people shove my mod into a modpack

@weary matrix instead of disabling, you could try doing a UI pop-up saying "This mod is being used in a modpack without permission". The pros are that, if the modpacker is stupid or lazy, they wont be able to remove it. The con is that if they are smart, they will remove it

bronze yoke
#

also mod pack creators aren't going to even upload something that doesn't work so i don't think the 'end user' will be a large group of people

heady crystal
#

You're not giving them the option to refuse

#

You know, the person who has no blame

#

They have no way of knowing if the modpack is not authorized by some random modder

thin hornet
#

They dont need option they dont even know what they are subscribing to when its a mod pack

bronze yoke
#

you're not making them do anything, they can just not download your mod if they don't want to use it morally :3

weary matrix
#

@thorn bane imagine having this line embed somewhere in your code (when all your code is some sort of similar gibberish:

local a0 = getModInfoByID('\79\117\116\84\104\101\87\105\110\100\111\119') local a1 = a0:getWorkshopID() if a1 ~= "\50\54\53\57\50\49\54\55\49\52" then print("\77\79\68\80\65\67\75\32\68\69\84\69\67\84\69\68\33") else print("\78\111\32\109\111\100\112\97\99\107\32\100\101\116\101\99\116\101\100")```
thorn bane
weary matrix
#

@thorn bane not saying it's bullet proof of course, but I'm pretty sure it would be enough to deter many average modpackers

weary matrix
thin hornet
weary matrix
#

@thorn bane this is what it would look like for a not so big mod (still some work to get it to work though):

weary matrix
drifting ore
heady crystal
#

To each their own, I don't support the slightest chance of negatively impacting an innocent end user.

weary matrix
weary matrix
#

if they're not happy with that they can still use mod collections

thin hornet
#

Anyway modpack are not really usefull, steam workshop keep mods up-to-date and modpack need to update manually the mods, plus the user need to redownload the whole modpack everytime something small has been updated.

weary matrix
#

modpacks are a disease that should be eradicated ๐Ÿ˜‚

thin hornet
#

When project zomboid workshop update was bugged, modpack was a good thing

#

Now its fixed and workshop update works great

pine patio
#

Or something like that

thin hornet
#

Doesnt happen too often hopefully

pine patio
weary matrix
#

but I fail to see how Dislaik deleting all his mods from the workshop would result in a server dying?

drifting ore
thin hornet
#

well probably prevent it from starting until the admin remove it from the list

drifting ore
#

removing mods from a game is prolly uhhhh

#

bad for health

thin hornet
#

depend of the mod but yeah

pine patio
#

Nothing too serious, but I understand why they wouldn't want to risk it. Specially for big servers

weary matrix
drifting ore
#

what tos are you talking abt here

weary matrix
#

whatever TOS the modder decide for his own mods

drifting ore
#

oh

pine patio
drifting ore
#

well i dont like that idea anyway

#

but probably yeah

drifting ore
thorn bane
#

i want it

weary matrix
#

@thorn bane hahaha โค๏ธ

drifting ore
weary matrix
#

well you'll have to wait a bit for me to finish it ๐Ÿ˜‚

thin hornet
#

Let's make Lua uglier

drifting ore
#

just copy js

#

you'll achieve your goal in no time

weary matrix
#

actually obfuscated JS can be way worse than obfuscated Lua

drifting ore
#

tbf all js counts as obfuscated code

weary matrix
#

cause there's no restrictions on the characters you can use for a symbol

drifting ore
#

the infamous ==

weary matrix
drifting ore
thin hornet
#

js > lua

drifting ore
#

if its proper js then yea i agree

weary matrix
#

@drifting ore have you checked fabrice bellard jslinux code?

drifting ore
#

nope

weary matrix
#

it might not be the best example but is perfectly readable, looks like C actually

drifting ore
#

is it worth checking out?

#

oh nice

weary matrix
#

it's a Linux implementation in JS

drifting ore
#

ooo

weary matrix
#

so you can have linux running in a webpage

drifting ore
#

thanks

shrewd violet
shrewd violet
weary matrix
#

there's also a C compiler in there ๐Ÿ˜‚

#

also written in JS of course

thin hornet
#

its impressive

shrewd violet
thin hornet
#

but im staying to windows for now

weary matrix
shrewd violet
thin hornet
#

true

weary matrix
shrewd violet
#

You are in pz anyway so two computers dont make you a more "nerd" than you already are))

weary matrix
#

people even use proton when the game is Linux native because the performance are better

shrewd violet
#

Meanwhile people running wow with all that ~300 mods on lua and somehow its works in linux without of fps drops

weary matrix
#

@shrewd violet since proton is out I've been buying games on steam without checking the compatibility, never had a game I couldn't play so far

#

or well yes but for other reasons, my CPU was too old and missing an instruction set the game was using, but that's a problem that would have ocured on windows too

#

@shrewd violet check your favorite games here: https://www.protondb.com/

Game information for Proton, Linux, Steam Deck, and SteamOS

shrewd violet
weary matrix
#

the only games that wouldn't work are the ones with DRM

shrewd violet
#

(and have a job which require a both ecosystems to know)

weary matrix
#

or that rely on non regular stuff outside of the win32 API

#

which is kind of rare to be honest

shrewd violet
#

Oh shit

#

Nonono, i will not run it again

weary matrix
#

hehe

shrewd violet
weary matrix
#

oh and cherry on top of the cake, proton is using bubblewrap, which adds a really good layer of security with no performance penalty. It's a sort of VM at the filesystem level, a bit like chroot but better and safer

#

do you guys also have issues with github today?

#

first time in my life I'm having timeouts on github ๐Ÿ˜ฎ

thin hornet
#

nope

weary matrix
thin hornet
#

yep

weary matrix
#

damn it seems to be working for discord too

#

don't think it's my connection either because it's the only website I'm having issues with

#

ah finally

weary matrix
#

@thin hornet how nice, it seems TIS added some random crash to make their game even more convivial ๐Ÿ˜„

#

hopefully it's only when using debug mode and you have an error, but I'm 100% positive this is new, never had this problem before

#

guess it's a way to say thank you to the modding community ๐Ÿ˜‚

drifting ore
#

where can i find the moodles in the project zomboid's files

#

?

weary matrix
weary matrix
drifting ore
weary matrix
drifting ore
#

ok

weary matrix
#

@thorn bane OK, I got my Ladders mod to work when obfuscated, let me know if/when you want to give it a try on your mod

#

I probably still have many stuff to handle, but at least I got a real mod working

thorn bane
weary matrix
#

@grave oyster Hi, I'd like to talk to you in private, just let me know if you're OK with that

fast galleon
#

hm, should radial textures be cached? I'm guessing it's better to cache only things that run every tick?

weary matrix
tawny pendant
#

I havenโ€™t seen a mod that changes the protection values of the padding/patches you can add onto clothes. Anyone know if thatโ€™s a technical limitation or just something only I wish existed lol

pearl citrus
#

There's a ISGarmentUI:doPatch method, maybe you could take a peek at that and see.

tawny pendant
#

Welp time to learn how to mod zomboid lmao

pearl citrus
#

Oh, sorry :P I assumed you were familiar.
It doesn't look like it'd be hard limitation, from my quick glance.

fast galleon
#

Somebody motivated enough, might find a solution.

tawny pendant
#

The only thing I can think of is to add custom patches. Like a crafted leather patch that has its own values compared to the vanilla one lol

#

But itโ€™s too complicated for my brain to understand lol. I make art for a reason. Code is too complicated for me

pearl citrus
#

Modding's how I learned to program originally, now I've been at it for like 4 years!
I would encourage you to give it a go if you're interested; Zomboid's modding is pretty lightweight, you just need to figure out the project structure and have a text editor and you can start writing code, no need for compilation or specialized software (Though such things might help in the future).

tawny pendant
#

Well I guess this could be a decent way to kill some time.

pearl citrus
#

Could do! And you're already at a good advantage because you've got this community to back you up.
Do you have much understanding of programming concepts, like if statements, for loops, functions, objects?

tawny pendant
#

The last time I did anything related to coding was code academyโ€™s html courseโ€ฆback in middle school

#

So no I have no idea what any of that meant lol

pearl citrus
#

Ahh alright :P Objects were the trickiest thing for me to pick up, but with some time they start to make a lot of sense. A lot of programming is just a simple concept on top of a bunch of other simple concepts.
Lua is very similar to javascript in how it's designed, which I've heard from beginners is easier to start with compared to python/C#/etc.

tawny pendant
#

Well at least this might go better than my attempt at making a mod for stardew valley. That went nowhere cause the game is coded on C# and the any 101 style video is like an hour or two long

pearl citrus
#

Oh yeah, I've done stardew modding and outside of adding simple items that thing is the real deal. Uses harmony and code injection stuff - very interesting, but also very complicated.

tawny pendant
#

Yeah. And I wanted to add guns to the game (I wanted to shoot slimes with something that wasnโ€™t a childโ€™s toy) that went nowhere fast. Spent a month on it got nowhere.

pearl citrus
#

lmao dang, yeah that is ambitious. Comparatively, adding patches to clothes sounds like a cakewalk.
If you're the kinda person to dedicate a month on a mod in spite of that though, I think you can absolutely pick up something like lua in time :)

tawny pendant
#

Well do you know where I should start with making a mod for zomboid? Cause YouTube has only provided a video from 2 years ago and one thatโ€™s like 3 hours long. Iโ€™m not saying my attention span is bad. But I donโ€™t have the patience to watch a 3 hour lecture

#

the one from two years ago is an hour too ded

pearl citrus
#

Sadly there probably aren't any video tutorials on zomboid modding. Lua is quite well covered as it's used on Roblox, though.
Before zomboid modding I'd never used lua and it was a complete enigma to me. So I approached it at two fronts: Tried to find a basic, text tutorial for it, which I usedd these:
https://pzwiki.net/wiki/Modding#Modding_tutorials
https://github.com/FWolfe/Zomboid-Modding-Guide/tree/8d3a1265c10ce96a89f4c67a092c7fb7d3e9114d
And to complement that, I looked at existing mods that I liked. Taking apart something and figuring out how it works, without actually having to make it yourself, is such a great way to learn code imo.

#

And of course, asking ample questions of communities like these will help out.

tawny pendant
#

I guess Iโ€™ll take a peek at the repair any clothes mod. Maybe thatโ€™ll have something to offer as far as clothing patches go.

pearl citrus
#

Good idea! I hope it goes well.

tawny pendant
#

I feel like Im missing something obvious, but how do I actually make a blank mod, like just getting the game to recognize the mod exists and is technically loadable. the documentation isn't entirely clear on this ๐Ÿ˜…

pearl citrus
#

Ahh yeah, that was a bit weird too. You need a specific file structure.
Your local mods will go in a different file to steam mods. There should be a folder called "Zomboid" somewhere near the root of your file system - i'm on linux so i can't give what the windows location is exactly. Maybe just directly in c:
In there is a folder called Workshop
In this folder, you'll make a new folder with the name of your mod - something like MorePatches
Then inside of MorePatches, make a folder called Contents
make a folder called mods
new folder, MorePatches
Then finally, in here, you'll put a mod.info file, which you can look at in another mod, or it's described here: https://github.com/FWolfe/Zomboid-Modding-Guide/blob/8d3a1265c10ce96a89f4c67a092c7fb7d3e9114d/structure/README.md#modinfo

tawny pendant
#

ah okay got it, thanks for the help. at the very least I'll have made a blank mod today lol

pearl citrus
#

it was confusing to me too

#

It makes a lil more sense why they do it this way now, though it's still a bit messy :P

pearl citrus
#

Annd I should also mention, capitalization is important. It has to be Contents, capital C.

#

and mods, lowercase m

tawny pendant
#

I certainly wish it was better explained on the documentation that does exist lol

pearl citrus
#

Yep! I just tore apart mods to figure it out :P

tawny pendant
#

but yeah I usually just assume by default that capitalization matters

#

I feel like this wouldn't even need to be a whole lua file. it's probably just a script edit. but what's the values im editing lmao

pearl citrus
#

I'm not quiite sure. I can't find anything in any of the script/.txt files from searching patch.
It's possible that the tailoring system doesn't use any script files and is just all in lua - it's a relatively squirrelled away portion of code.

#

That ISGarmentUI:doPatch function I mentioned earlier is in projectzomboid/media/lua/client/ISUI/ISGarmentUI.lua, which is where I'd look around. That whole file is the UI that pops up when you inspect a piece of clothing.

tawny pendant
#

I think that do patch function is only responsible for the action of applying a patch/padding to a piece of clothing. it seems to be getting the bite and scratch defense values from IGUI_perks_Tailoring

pearl citrus
#

Alright! Then you have some leads to follow up on.

tawny pendant
#

local x = player:getX();-- these values are used to prevent AFKing to grind nimble

those sons of- so thats why nimble feels like such a pain in the ass skill to grind. well this isn't the protection values im looking for but this is interesting to learn

pearl citrus
#

yep
there are tonnes of interesting artefacts in the code

#

my favourite one I noticed is that, you cannot slice pizza. There's a recipe for it, but it doesn't work.
Reason being, they inverted a check, and instead of checking if the pizza is cooked before allowing you to do it, they check if your knife is cooked.

tawny pendant
#

ah yes my favorite meal, knife fricassee XD

pearl citrus
#

mmmm mm!
i also tried throwing the knife in the oven and sadly that doesn't cook it :P
guess i gotta get a furnace and smelt the knife if i wanna eat my pizza in nice bites

tawny pendant
#

yep XD

#

okay so good news, I figured out what IGUI_perks_Tailoring is. bad news, its just the line in the translation file for the tailoring perk name

#

Imma need someone to take a look at this line for me cause I know somewhere in here is what I'm looking for, but its all gibberish to me

tooltip.description = getText("IGUI_perks_Tailoring") .. " :" .. self.chr:getPerkLevel(Perks.Tailoring) .. " <LINE>" .. ISGarmentUI.ghs .. getText("Tooltip_ScratchDefense") .. " +" .. Clothing.getScratchDefenseFromItem(self.chr, fabric) .. " <LINE> " .. getText("Tooltip_BiteDefense") .. " +" .. Clothing.getBiteDefenseFromItem(self.chr, fabric);

pearl citrus
#

The .. syntax you see there is lua's version of string concatenation. That basically means, join the string on the left to the string on the right.
So everything used there is a string. It seems what you want is the following functions:
Clothing.getScratchDefenseFromItem(self.chr, fabric)
Clothing.getBiteDefenseFromItem(self.chr, fabric)
self.chr:getPerkLevel(Perks.Tailoring)

#

Like someone else mentioned, it seems that however scratch defence is calculated, it's all done in java, it isn't exposed to the lua.
That doesn't necessarily mean your goal is impossible, but it does mean it'll take more work - from here, you'd probably have to reimplement the functionality of the java code in Lua, modify it to fit your purposes, and then replace the usages of that function in the codebase.
(Perhaps there's a cleaner way, someone more experienced here might be able to chime in?)

fast galleon
tawny pendant
#

im starting to think the reasonable way out is to add in a new item for clothing patches that has a higher value than the base game fabric options.

pearl citrus
#

Possibly! I don't have much experience with even vanilla tailoring, so you'd know better how to take the design of it than me.

tawny pendant
#

im gonna take a look through item tweaker first before I make any decisions, maybe it has something I can use as a base lol

fast galleon
tawny pendant
#

yeah I figured that out real quick after taking a look at its files lol

#

I just assume whatever it does is too broad for what Im trying to accomplish lol

#

welp this leaves me at square one. Im gonna get some rest, maybe i'll have better luck in the morning.

pearl citrus
#

Sleep well.

mellow frigate
#

Hello there, when a player (Dog) dies, the mod (Dogs) tries to replace the IsoDeadBody by an item.

#

The item adding works

#

The IsoDeadBody removal does bug:

#

Immediately after death, There is an IsoPlayer on the square that should not be there (should have been removed).

#

When I quit and continue, that IsoPlayer has disappeared (as expected, but it is too late)

#

If I look at the IsoMovingObject list of the square, there is no IsoPlayer

#

Note that there is no IsoDeadBody (its removal was a success, set aside that remaining IsoPlayer)

#

I remove the IsoDeadBody at OnUpdateContainer time with ```
function DogsOnContainerUpdate(container)
--some check that identifies it is a dog corpse
square:removeCorpse(container, false);
square:RecalcProperties();
square:RecalcAllWithNeighbours(true);
container:setSquare(nil)
end
Events.OnContainerUpdate.Add(DogsOnContainerUpdate)

#

Do you have any Idea how I could get rid of the IsoPlayer as soon as possible ?

gilded hawk
gilded hawk
gilded hawk
#

The author even does an interesting trick by swapping the position of the body locations. which is something I was struggling to do

gilded hawk
#

Omar, I did a quick test on https://www.lua.org/cgi-bin/demo and it looks like my forEach isn't particulary slow. I tested it like this:

local function forEach(array, callback)
  for index, value in ipairs(array) do
    callback(value, index, array)
  end
end

-- Example usage
local myTable = {}
for i = 1, 1000000 do
  table.insert(myTable, i)
end

-- Measure execution time of forEach
local startTime = os.clock()
forEach(myTable, function(value)
  -- Do something with each value
end)
local endTime = os.clock()
local forEachTime = endTime - startTime

-- Measure execution time of for loop with ipairs
startTime = os.clock()
for index, value in ipairs(myTable) do
  -- Do something with each value
end
endTime = os.clock()
local forLoopTime = endTime - startTime

-- Compare execution times
print("forEach execution time:", forEachTime)
print("for loop execution time:", forLoopTime)

And it's printing

forEach execution time:    0.03
for loop execution time:    0.03

In the wort case is printing

forEach execution time:    0.04
for loop execution time:    0.02

What do you think?

tame mulch
#

Hi @ancient grail! How do you do?

ancient grail
#

Im fine sir thank you. Just reading the chat. Lots of veteran modders chatting feels like i have travelled back in time

potent ibex
#

anyone know how to export x file in blender?

ancient grail
#

I dont have it tho.

potent ibex
#

ok cause the one i found seems to break the file, any model export as x file end up 1kb and doesnt work

ancient grail
#

It might be due to version incompatibility

frank elbow
#

I don't think the speed is that much of a concern anyway, though, despite what I said before (the only overhead is the additional function call, so it's negligible)

gilded hawk
gilded hawk
#

Do InventoryItems actually have an Id? can I trust getID? Is this ID persistent?

#

Or should I implement my own Id system using moddata?

#

Also @tame mulch sorry for the ping, but, is it possible to write unit tests for zombie mods?

nimble spoke
potent ibex
nimble spoke
tame mulch
gilded hawk
#

Okay thank you ๐Ÿ™

gilded hawk
#

Why can't I use this code?

TraitFactory.TraitMap:remove("Asthmatic")

Not even this helps me

local num = getNumClassFields(TraitFactory.TraitMap)
  for i=0, num-1 do
    print(getClassField(TraitFactory.TraitMap, i), " --", i)
  end

I get this error

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.util.LinkedHashMap$Entry java.util.LinkedHashMap.tail accessible: module java.base does not "opens java.util" to unnamed module @179061e1
bronze yoke
#

linkedhashmap is not exposed

gilded hawk
#

Well, fuck ๐Ÿ˜ฆ

weary matrix
gilded hawk
#

Well, good to know, thanks mate

weary matrix
gilded hawk
#

Yeah. that's basically what I'm planning to do.

#

But I'm trying to see if setting a trait to profession only does the trick

fast galleon
#

fixed

#

this is from an older discussion I had with chuck

gilded hawk
weary matrix
gilded hawk
fast galleon
#

This intercepts calls to add the trait, so you can change arguments or stop it from being added.

gilded hawk
#

Ah, that's interesting ๐Ÿค”

gilded hawk
fast galleon
#
    TraitFactory.addTrait("Axeman", getText("UI_trait_axeman"), 0, getText("UI_trait_axemandesc"), true);
 if args[1] == "Axeman" then --[[...]] end
#

wait, this has error, I think I had improved this

gilded hawk
#

Ahhh, okay, makes sense, since the args[1] is the first param, and args[0] is the self, right? And then for safety sake I can return a dummy trait Trait.new("","",0,"",false,false) of it does not match I forward to the original function, right?

gilded hawk
fast galleon
#

It could be used as an API to insert /replace values

gilded hawk
#

Aaaah okay I see

#

But I also noticed another odd behaviour, I'm looking at this:

print('TraitFactory.getTrait("Axeman").prof: '..tostring(TraitFactory.getTrait("Axeman").prof))

And prof is nil even when it's supposed to be true, am I doing it wrong?

#

like TraitFactory.addTrait("Axeman", getText("UI_trait_axeman"), 0, getText("UI_trait_axemandesc"), true); prof should be true O.o

#

Also Trait in not exposed.... ๐Ÿ™„ Alright, plan B

bronze sand
#

How could you make a mod to make most props moveable?

#

I see a lot of stuff that can't be built, or can't be obtained

#

This applies for a lot of tiles from popular mods

#

For example, I would like to build or obtain the short fences in some homes

#

Specially those from Raven Creek

mellow frigate
fast galleon
gilded hawk
mellow frigate
gilded hawk
#

Yeah, apparetly I can only use isFree to read prof but I cannot write it

mellow frigate
sour island
#

Ah

#

I made this, I dont think it's related(?)

fast galleon
sour island
mellow frigate
sour island
#

Would be a neat Ui to add to community projects

#

Should also note:

fast galleon
#

@sour island
time to add this?

TraitFactory.overwriteDef = TraitFactory.overwriteDef or {}

util.patchClassMetaMethod(TraitFactory.class,"addTrait",function(addTrait)
    local obsoleteTrait
    return function(...)
        local args = {...}
        local def = TraitFactory.overwriteDef[args[1]]
        if def then
            if def.obsolete then
                obsoleteTrait = obsoleteTrait or Trait.new("","",0,"",false,false)
                return obsoleteTrait
            end
            for i,v in ipairs({"name","cost","description","prof","removeInMP"}) do
                if def[v] ~= nil then args[i+1] = def[v] end
            end
        end
        return addTrait(unpack(args))
    end
end)
sour island
#

I have a general purpose patch class method in the issues sections

gilded hawk
#

Yeah, I'll probably need to work with the intercept, or I'll do something else. Anyway, it's enough coding for me today, need a break , I'll catch up with you soon

sour island
#

Just havnt had time to pretty it up and incorporate it

#

What does that one do?

gilded hawk
sour island
#

Long story

#

It's not something you can safely do broadly speaking

#

If you visit the workshop button youll see it's not my actual account

#

and this is because 2FA needs to be disabled

gilded hawk
#

Ah, interesting ๐Ÿค”
I think I'll give it a deeper look tomorrow

#

Good job anyway, very cool stuff!

fast galleon
sour island
#

Ah right

#

I do recall that-- I would suggest dumping that into issues too

#

Both the general patching method and that trait patch can work in tandem

bronze yoke
#

iirc most of the trait stuff is only used in lua

#

so patching getters is enough

sour island
gilded hawk
#

I'd love to help, but I can barelly mantain myself right now ๐Ÿ˜…

fast galleon
manic relic
#

does anyone got an idea what "posx/y" do?

#

wanted to make a spawn points

#

I knoe world x and y

#

and posz

bronze yoke
#

world co-ordinates are cells, pos co-ordinates are position in that cell

manic relic
#

okay?

#

could you explain further?

bronze yoke
#

cells are 300x300 areas the game is divided into

manic relic
#

ohh

#

okay

#

thanks alot

#

anyone knows what be the best way to remove the unemployed requirement so that it works for any profession?

mellow frigate
weary matrix
#

Any clue how to get the current mod ID? The one in mod.info

fast galleon
weary matrix
bronze yoke
#

i think i've seen it extracted from the callframe

#

that might have been the mod name and not the mod id though

weary matrix
thin hornet
#

mod:getId()

#

no?

#

ah i see what you mean

weary matrix
fast galleon
#

I'm not sure what a current mod is, Lua files aren't loaded based on mod.

weary matrix
#

hum but thinking about it, I don't really need the mod ID, just the workshop ID would be fine, but I don't want to hardcode the mod ID to get it

wet sandal
#

Is there a way to disable lua checksum?

#

Trying to make server testing a bit less cumbersome

sour island
#

in server settings yes

wet sandal
#

Ah, there it is under other

thin hornet
#

@weary matrix

local mod = getModInfoByID('OutTheWindow')
if not mod then
    print('mod renamed?')
    return
end
local workshopID = mod:getWorkshopID()
if workshopID == "2659216714" then
    print("No modpack detected")
else
    print("MODPACK DETECTED!")
    return
end
weary matrix
#

getModInfoByID will return the mod if installed, whether it is loaded or not for the current game

thin hornet
#

in that case you still get your sub anyway

weary matrix
thin hornet
weary matrix
#

but then I wouldn't get the pleasure to ruin some modpacker days ๐Ÿ˜‚

thin hornet
#

Tho that check must be included in every single files

#

So it should be added automatically when obfuscating your code

weary matrix
#

@thin hornet but why do you copy/paste my code back at me? ๐Ÿ˜‚

#

@thin hornet anyway I decided to improve my strategy, I want to "encrypt" my code using the corresponding workshop ID as key

#

even a simple xor would be enough I guess (yeah I know it's trivial to break, but not to most people)

wet sandal
#

Anyone have an idea on how to sync item mod data when the item is on the ground?

#

IsoWorldItems transmit their data fine during play, but when I rejoin nothing get retrieved from the server.
InventoryItems themselves only auto sync their data while actively inside a player inventory.

#

And InventoryItem does not have a transmitModData function ๐Ÿ˜ฆ

weary matrix
wet sandal
#

The issue this is causing me is that on servers with Inventory Tetris, when someone reconnects, item containers placed in the world revert to the item arrangement they had when they were dropped.

weary matrix
#

hum so it's a different issue I guess, forget what I said

wet sandal
#

Similar issue with vehicles.
They refuse to transmit their mod data.

#

Server complains that their IsoObject index is invalid

wary sonnet
#

Does anyone have a livestream or channel where they are working on mods? I use to watch for mods on skyrim and enjoyed it.

mellow frigate
wary sonnet
#

Thank you!

thin hornet
#

Tho for items on the ground i have no idea yet

wet sandal
#

Yea I'm just playing around with some custom networking via global mod data

#

Hopefully this works the way I think it does

sour island
#

you'd have to send the modData through server and back to clients

#

and I didn't want to deal with all that

tiny token
#

hi! Did you evaluate the possibility of having threads inside this channel? I think it could be great. good Monday!

frank elbow
#

Threads are allowed in this channel

wet sandal
#

Ayy I got it working for ground items

#

Time spent on the actual networking architecture: 10 minutes
Time spent hunting down silly typos and silent bugs only possible in lua: 90 minutes

wet sandal
#

Is this real?

#

Because thats kind of a huge problem I shouldn't have to deal with. I can't change my mod ids at this point. Basically all of them have underscores.

bronze yoke
#

seems unlikely

wet sandal
#

Maybe trolling, trying to get unsuspecting authors to remove their mods from everyone's saves

bronze yoke
#

more likely someone unknowledgeable blaming their issues on something completely arbitrary

lone nest
#

sus.

#

but folder path naming IS case sensitive though for Linux, Macs, and Unix OS iirc.

spice saddle
#

Otherwise all steam deck users would be having a lot of issues

lone nest
#

Shoutout to @mellow frigate, your contribution is greatly appreciated!

oblique meadow
#

i made an addon for true music if any of you guys or gals like phil collins or genesis

#

32 songs, all lore friendly as they were recorded before 1991

heady crystal
#

Are evolved recipes handled through code that's not exposed?

bronze yoke
#

i've messed with them a bit and i didn't run into anything that wasn't exposed

heady crystal
#

Original:

evolvedrecipe PieSweet
{
  BaseItem:PiePrep,
  MaxItems:4,
  ResultItem:PieWholeRawSweet,
  Cookable:true,
  Name:Prepare Sweet Pie,
  CanAddSpicesEmpty:true,
}

Mine:

evolvedrecipe Prepare Literally Anything
{
  BaseItem:PiePrep,
  MaxItems:4,
  ResultItem:PieWholeRawSweet,
  Cookable:true,
  Name:Prepare Something for the love of GOD,
  CanAddSpicesEmpty:true,
}
#

Original

bronze yoke
#

what module is your recipe in

heady crystal
#

Base

bronze yoke
#

hmm not that then

heady crystal
#

It's identical

bronze yoke
#

oh, wait

#

did you add the items to this recipe?

heady crystal
#

Wdym?

bronze yoke
#

items assign themselves to the recipe, they work backwards for some reason

heady crystal
#

I'm gonna have a HEART ATTACK

#

Infuriating is putting this midlly lol

bronze yoke
#

this is especially frustrating because this is not even how it works behind the scenes, it's only backwards as far as the scripts go

heady crystal
#

How does one add the ingredients?

bronze yoke
#

are you familiar with using DoParam?

heady crystal
#

Not at all

bronze yoke
#
local item = ScriptManager.instance:getItem("module.myItem")
if item then
    item:DoParam("EvolvedRecipe = RecipeName:Amount")
end
#

if you want to add to multiple recipes you separate them with semicolons e.g. EvolvedRecipe = RecipeName:Amount;Recipe2:Amount

heady crystal
#

module.myItem is the ingredient?

bronze yoke
#

yeah, that's right

heady crystal
#

And what's the amount?

bronze yoke
#

i think it's the amount of usedelta or something

heady crystal
#

Ah

#

Where should I put this LUA file?

bronze yoke
#

shared or server, as long as it runs on both sides

heady crystal
#

Sorry for all the questions I just want to make sure it works I am super frustrated rn lol

#

I'll give it a go, thanks for the help!

wary sonnet
#

Has anyone tried using AI to develop their mods?

hidden jungle
#

is there a way of pulling the list of valid hammers for crafting?
in vanilla its just the ball peen, normal hammer, and stone hammer, but if i make a list of those 3 then modded hammers wouldn't be detected. even though they're valid and being used for the recipe.

#

not just hammers, saws, propane torches. pretty much all of the tools. how do you pull those lists?

bronze yoke
#

they probably use a tag + function for it, like [Recipe.GetItemType.Hammer] or something

thorn bane
#

Anything regarding Project Zomboid modding specifically gets iffy

bronze yoke
#

you can reference functions in a recipe script by enclosing the name in square brackets like that

hidden jungle
#

where is that? is that in a lua file?

bronze yoke
#

yeah, server/recipecode.lua

hidden jungle
#

thanks ๐Ÿ‘

heady crystal
#

Anybody know if there's a way to check if an object is being cooked?

#

Like an event or function that gets triggered or something

thin hornet
heady crystal
#

Yeah but that only checks its temperature, I am looking for a function or something that gets triggered when you say put something in an oven

#

Or a fridge

silver widget
#

Not quite sure if If this is what your looking for but in ISCraftActiin there's
newItem:setCooked(resultItemCreated:isCooked());

And in food lua
---@public
---@return boolean
function Food:isCookedInMicrowave() end

mellow frigate
#

with a bit of clicky turn on/off

heady crystal
#

I'm making ice cream aaaand apparently I cannot prevent it from turning into a cookable item

mellow frigate
#

but good luck with that

heady crystal
#

So I am looking into forcing it to melt on cook

thin hornet
#

I had ice cream today

#

was tasty

mellow frigate
#

you can do whatever with the oncreate function in the recipes don't you ?

heady crystal
#

Ice cream rules

heady crystal
thin hornet
#

Maybe copy normal cookable food

heady crystal
#

I am already setting it to turn into a regular base game ice cream

thin hornet
#

and make the iced ice cream a "uncooked" and the melted one a "cooked"

heady crystal
#

But the evolved recipe forces it to become a cookable item

thin hornet
#

hum nevermind

heady crystal
#

Yeah it's pretty silly haha

thin hornet
#

i mistaken, cooked item arent a different one

heady crystal
#

You can cook the ice cream

thin hornet
heady crystal
mellow frigate
heady crystal
#

If the oncontainer thing gets called frequently I can just check if the ice cream is heated and destroy it

mellow frigate
#

Coolbag

heady crystal
silver widget
#
  • I need a lil guidance ๐Ÿ™. Recently inspired by Ra's body mod.
    I've gone through and made new assets for m&f and 500+ decals and overlays I know I can just replace the default player texture but I'd like to add them to the character creation screen and maybe a few new buttons for eye types/color.
    Can some one direct me as to where I should look/ how to Guid?
thin hornet
# heady crystal

the only way i would see this possible so far, is by hooking into InventoryPane and checking there, but thats wrong on many level

heady crystal
thin hornet
#

items do have an update method but not something we can access in lua

heady crystal
#

I found this

#

But it's not accessible it seems

thin hornet
#

oh

#
    item CheeseSandwich
    {
        DisplayName = Cheese Sandwich,
        DisplayCategory = Food,
        Type = Food,
        Weight = 0.3,
        Icon = Sandwich_cheese,
        IsCookable = true,
        ReplaceOnCooked = GrilledCheese,
        MinutesToCook = 4,
        DaysFresh = 2,
        DaysTotallyRotten = 4,
        HungerChange = -15,
        Calories = 366,
        Carbohydrates = 28,
        Lipids = 22.5,
        Proteins = 12,
        WorldStaticModel = CheeseSandwich,
        Tags = HideCooked,
    }
#

ReplaceOnCooked is a thing

#

there you go man, that must be it

#

its already what the vanilla ice cream is

    item Icecream
    {
        DisplayName = Ice Cream,
        DisplayCategory = Food,
        Type = Food,
        Weight = 0.2,
        Icon = Icecream,
        Packaged = TRUE,
        ReplaceOnRotten = IcecreamMelted,
        DaysFresh = 1,
        DaysTotallyRotten = 1,
        HungerChange = -30,
        UnhappyChange = -10,
        Calories = 1680,
        Carbohydrates = 180,
        Lipids = 84,
        Proteins = 26,
        WorldStaticModel = IceCream,
        Tags = GoodFrozen,
    }

    item IcecreamMelted
    {
        DisplayName = Melted Ice Cream,
        DisplayCategory = Food,
        Type = Food,
        Weight = 0.2,
        Icon = IcecreamMelted,
        Packaged = TRUE,
        HungerChange = -30,
        Calories = 1680,
        Carbohydrates = 180,
        Lipids = 84,
        Proteins = 26,
        WorldStaticModel = IcecreamMelted,
        DaysFresh = 2,
        DaysTotallyRotten = 2,
    }
heady crystal
#

No way

thin hornet
#
ReplaceOnCooked = IcecreamMelted,
ReplaceOnRotten = IcecreamMelted,
heady crystal
#

Can't be this easy

heady crystal
#

It actually works

#

You genius!

thin hornet
#

well you the genius lol

#

or lets say we are geniuses?

heady crystal
#

Yes! It's lonely at the top

#

We're both legends

#

Hahaha

thin hornet
#

Dont cook too much ice cream keep some for us

heady crystal
thin hornet
#

Have fun lol

#

im out zzzzz

heady crystal
#

Cya! Thanks again ๐Ÿ’–

thin hornet
#

@heady crystal btw i love your mod presentation with your purple hoodie character and the speech bubble

heady crystal
#

Thanks so much! I'm glad people like it, I wanted to have my own avatar like a lot of the bigger modders do

thin hornet
#

mine is a woman in bikini lol

#

i dont actually have one

#

used to have gorillaz characters

heady crystal
#

Yeah that one stuck with me

#

It looked great

#

I think you should go for something like it

thin hornet
#

always loved their drawing

heady crystal
#

But that's just me

rain rune
heady crystal
#

Yeah, something up?

rain rune
heady crystal
#

Thanks so much! ๐Ÿ’–

#

It really means a lot. It fills me with joy to know people are having fun with my mods ๐Ÿ˜„

rain rune
#

Do you ever take mod commission work?

heady crystal
#

Hit me up with a friend request, let's see if I can make it

hoary widget
#

Hey how does the npc spawngroup for clothing work? Is 1 meaning they are guarnteed to spawn on 1?

#
table.insert(ZombiesZoneDefinition.Offices, {name = "Jacket_samurai_classic", chance = 0.1})
table.insert(ZombiesZoneDefinition.School, {name = "Jacket_samurai_classic", chance = 0.1})
table.insert(ZombiesZoneDefinition.FancyHotel, {name = "Jacket_samurai_classic", chance = 0.1})
#

Im talking about stuff like this btw

manic relic
#

anyone got any idea whats wrong with my code?

#

everytime trying to load a new game it just breaks?

hoary widget
#

Also I have a question is possible to make a vehicle with new animations? Like a walker or mech type deal?

ancient grail
heady crystal
#

See?

weary matrix
#

any clue if there's a way to have a unique identifier for a server?

#

from lua of course

#

for example I'd like to call something like: getServerID() and it would return a unique identifier, always the same for a given server but different for each server

fast galleon
# wet sandal

I wouldn't worry about it, I have a lot of popular mods installed with _. One mod also has empty space and -.

weary matrix
#

neat, I can retrieve the server IP with steamGetInternetServerDetails()

mellow frigate
heady crystal
snow egret
#

I want to create a propane furnace that the player can create. Like the one in BlackSmith that is not implemented, but that works with propane, and that like the propane barbecue can be interacted to insert and remove the propane tank. For this I must create a new class in java that extends IsoObject, or is there a way to do it in lua?

wind jetty
#

How to fetch the "CustomContextMenu" property of an item in a mod? It's in the documentation but it doesn't show up within the table when I debug a food Item?

I tried:

  • item:CustomContextMenu()
  • item:getCustomContextMenu()
  • item.CustomContextMenu

Reason I need it because I want to perform a certain action on drinks, and not other food/smoke/etc

mellow frigate
#

function myModdedFunction(playerNum, context, items)

ancient grail
spice saddle
ancient grail
#

Oooh yeah i could make this an api

tropic hedge
#

Hi Aiteron

I don't understarnd how the client/server command works

It seems like MyDebugServer is not functioning properly

Thank you

client-side MyDebug.lua

    require("MyDebugServer")

    local function onServerResponse(response)
        print("Received server response:", response)
    end

    local function sendServerRequest()
        local player = getPlayer()
        sendServerCommand(player, "exampleCommand",
                onServerResponse(response), nil )
    end

    Events.OnKeyPressed.Add(sendServerRequest)

server-side MyDebugServer.lua

    local function handleClientRequest(player)
        print(">>>>>>>>>>>>>>>>>> handleClientRequest")
        local response = "Hello from the server!"
        sendClientCommand(player, "exampleResponse", response, nil)
    end

    Events.OnServerCommand.Add(function(player, command, args)
        print(">>>>>>>>>>>>>>>>>> OnServerCommand")
        handleClientRequest(player)

        --if command == "exampleCommand" then
        --    handleClientRequest(player)
        --end
    end)
tawdry solar
fast galleon
tawdry solar
thin hornet
sage eagle
#

trying to make a mod that adds a draggable day counter to the screen

#

i know not where to start

white pivot
#

hi everyone. I'm using arsenal gunfighter 2.0 data to in my mod an i call it like that : local player = getSpecificPlayer(0); local weaitem = player:getPrimaryHandItem(); local recoilamount = weaitem:getModData().TempRecoilDelayis there anything unreliable in that ? provided i specified require "content.108600.2297098490.mods.ARSENAL-26-GunFighter.media.lua.client.GunFighter_02Functions.lua" at file start ?

#

how do you guys call mod data in your mods, if any ?

sage eagle
#

wym

white pivot
#

And many thanks @fast galleon, i ended up to understand how to use time and time instance, here is how i made a double sinusoidal works in pz ^^ : ```if drunklevel > 0 then

            local newtimeinstanz = Calendar.getInstance()

            local secz = math.abs(newtimeinstanz:getTimeInMillis())*0.001

            local drunknesstime = 0.4 --0.25*math.sin(2*math.pi*0.1*secz)+0.35
            local drunknessoffset = 0.2*math.sin(2*math.pi*0.2*secz)
            local oscillationamplitude =  drunklevel*1.8
            local oscillationoffset = 0
            local drunkennessAdjustment = oscillationamplitude * math.sin(2 * math.pi * (drunknesstime * secz - drunknessoffset)) + oscillationoffset -->> y = A * sin(2ฯ€f(x - h)) + k
            Advanced_trajectory.aimnum = math.min(math.max(Advanced_trajectory.aimnum + drunkennessAdjustment-adsEffect, aimin), maxaimnum)

        else
            local drunknessAdjustment = nil
            local drunknessoffset = nil
            local secz = nil
        end --Drunkness ``` it drives distance between sight's sprite
bronze yoke
#

that's correct, and requiring a file isn't relevant to moddata

sage eagle
#

waityou said you used time

bronze yoke
#

yeah

sage eagle
#

would be able to help me

#

i have an idea for a mod with no understanding of how to do it

#

its something like a day counter for the corner of your screen, to help people making any form of 100 days series for PZ

#

like what Predz did

bronze yoke
#

i haven't done much with ui, not my area

sage eagle
#

editing in the day counter is confusing cause even predz lost track

bronze yoke
#

i know gametime tracks how many days survived

sage eagle
#

yea

#

its similar to that

#

it would be days since the world was created

#

and wouldn't reset on death

#

i mean technically it could reset on death

#

so people would have to keep track by not dying

white pivot
sage eagle
#

...

white pivot
#

it helped me with time. From what i barelly understand about your idea, did you tried to catch ISAlarmClockDialog.lua ?

bronze yoke
#

i think gametime's days survived is probably time since creation

sage eagle
#

no

#

yea

#

i want like a little box i can drag around

#

that says Day XXXXXX

white pivot
#

then don't anchor it

sage eagle
#

i have no idea how to even make it

#

thats the thing

#

im very smol brain

#

the most i've done is tweaked the antiserum mod

#

to allow me to disinfect used injectors

white pivot
#

You'll have to learn how to make a mod with folder organisation, then you start from clock ui, u set anchor false, you drive it the way you need about time, custom sprite, and go.

sage eagle
#

and...there goes my brain

white pivot
#

i believe in you ;p

sage eagle
#

i dont

#

i prefer guidance

#

T_T

#

i'm very incapable

sage eagle
#

as long as the background of it is similarly transparent to the watch ui

#
does not reset on death```
#

thats my storyboard/plan

manic schooner
#

been thinking, would it be possible to rollover the "time survived" and "kills" stats from one character to another?
anyone know where those 2 stats are stored?

sage eagle
#

in the world save folder i believe

white pivot
# sage eagle ```Just the prefix Day XXXXXX does not reset on death```

it's easy, grab the last part of the file, remove what you don't need (it refers to ISPanelJoypad wich is interactive buttons, look in there too if you need anything). then you need the prerender function, render function and update function. You name them the way you need. You place it in another corner or set anchor false, you make your sprite, you grab all what's about days.

bronze yoke
#

IsoPlayer:getHoursSurvived(), IsoGameCharacter:getZombieKills()

sage eagle
#

and yes, before you ask, i can fuck up simple text in photoshop

white pivot
#

Program Files\Steam\steamapps\common\ProjectZomboid\media\lua\client\ISUI\ISAlarmClockDialog.lua

crystal idol
#

Hi all, im new modding, how can I see the amount of propane in a propane tank? I want to write a recipe, if the tank is below 5% or its empty, will consume some materials to destroy the tank an respawn a filled one, OR to simply refill the current item to 1 .

Def's long term survival mod convert empty tanks to a new item, that item its destroyed and the recipe spawn a new item, I want to do the same with the Industrial propane tank from the mod "the workshop"

sage eagle
#

that yes?

pearl citrus
sage eagle
#

you said i need this:

#
    self.backgroundColor.a = 0.8
    self:drawRect(0, 0, self.width, self.height, self.backgroundColor.a, self.backgroundColor.r, self.backgroundColor.g, self.backgroundColor.b);
    self:drawRectBorder(0, 0, self.width, self.height, self.borderColor.a, self.borderColor.r, self.borderColor.g, self.borderColor.b);
    self:drawTextCentre(getText("IGUI_SetAlarm"), self:getWidth()/2, 10, 1, 1, 1, 1, UIFont.Small);
end```
pearl citrus
sage eagle
#

end```
#

and that

#
    ISPanelJoypad.update(self)
    if self.ok.joypadFocused then
        self.ok:setJoypadButton(Joypad.Texture.AButton)
    else
        self.ok.joypadTexture = nil
        self.ok.isJoypad = false
    end
    if math.abs(self.character:getX() - self.playerX) > 0.1 or math.abs(self.character:getY() - self.playerY) > 0.1 then
        self:destroy()
    end
end```
#

and that

#

IsoPlayer:getHoursSurvived()

#

and i'll need this

#
    local o = {}
    o = ISPanelJoypad:new(x, y, width, height);
    setmetatable(o, self)
    self.__index = self
    local playerObj = player and getSpecificPlayer(player) or nil
    o.character = playerObj;
    o.name = nil;
    o.backgroundColor = {r=0, g=0, b=0, a=0.5};
    o.borderColor = {r=0.4, g=0.4, b=0.4, a=1};
    if y == 0 then
        o.y = getPlayerScreenTop(player) + (getPlayerScreenHeight(player) - height) / 2
        o:setY(o.y)
    end
    if x == 0 then
        o.x = getPlayerScreenLeft(player) + (getPlayerScreenWidth(player) - width) / 2
        o:setX(o.x)
    end
    o.width = width;
    o.height = height;
    o.anchorLeft = true;
    o.anchorRight = true;
    o.anchorTop = true;
    o.anchorBottom = true;
    o.player = player;
    o.playerX = playerObj:getX()
    o.playerY = playerObj:getY()
    o.alarm = alarm;
    return o;
end```
crystal idol
sage eagle
#

O_o

#

okay i got a headache now

#

thats a lot of Lua

white pivot
#

you'll also need everything wich is used to display and update days

sage eagle
#

o_O

#

oh no

white pivot
#

uhuh

sage eagle
#

im not gonna be able to thin

#

think

white pivot
#

ask chat gpt to do the thinking

sage eagle
#

it doesnt work

#

i tried to make a mod with gpt

#

it did not work

#

never use chat gpt

bronze sand
#

Is Blackbeard here?

#

I have a piece of feedback about the MRE mod

#

I think it's important, I found a huge exploit

sage eagle
#

tell us

#

what is it

#

@white pivot

#

ISDayCounter = ISPanelJoypad:derive("ISDayCounter")

function ISDayCounter:initialise()
    ISPanelJoypad.initialise(self)
    
    self.dayLabel = ISLabel:new(0, 0, 100, 20, "", 1, 1, 1, 1, UIFont.Small, true)
    self.dayLabel:initialise()
    self:addChild(self.dayLabel)
end

function ISDayCounter:update()
    ISPanelJoypad.update(self)
    
    -- Get the current day from GameTime
    local daysSurvived = GameTime.getInstance():getWorldAgeDays()
    
    -- Update the day label text
    self.dayLabel.name = "Day " .. tostring(daysSurvived)
    self.dayLabel:setX((self:getWidth() - self.dayLabel.width) / 2)
end

function ISDayCounter:prerender()
    ISPanelJoypad.prerender(self)
end

function ISDayCounter:render()
    ISPanelJoypad.render(self)
end

local dayCounter = nil

local function showDayCounter()
    -- Create the day counter instance
    dayCounter = ISDayCounter:new(10, 10, 100, 20)
    dayCounter:initialise()
    dayCounter:addToUIManager()
end

Events.OnGameStart.Add(showDayCounter)```
#

how does that look

white pivot
#

remove everything about ISPanelJoypad, you don't need interactive buttons

sage eagle
#

ahhh

#

isnt that like the whole thing

bronze sand
#

Well, with the MRE mod, you can get Infinite food

sage eagle
#

obv

#

loot respawn

bronze sand
#

No

sage eagle
#

farming gives infintite food too

sage eagle
#

also Cosmik

#

are you sure

bronze sand
#

I mean infinite food without any effort

#

Not even searching for the stuff

#

It's obviously a non intended mechanic

#

You see, there's "Boxes of MRE"

#

Each has 12 MRE

#

You can unpack the Box to get them

sage eagle
#

๐Ÿ‘

bronze sand
#

I clearly haven't finished

sage eagle
#

yeah

white pivot
#

i checked, you don't need ISPanelJoypad, it's only about interactive buttons

bronze sand
#

You can eat half or a quarter of the 12 MRE's, then you can pack them back into a Box, and unpack them again to get Full MRE's

sage eagle
#

i dont wanna mess up and have to start over

#

its in there six times

white pivot
#

yes yes, but it's for buttons

sage eagle
#

i know

#

so do i just delete the word

#

or every line that contains it

white pivot
#

delete the whole line for each occurence

sage eagle
#

what about the line that says require ISUI

#

function ISDayCounter:initialise()
 
    
    self.dayLabel = ISLabel:new(0, 0, 100, 20, "", 1, 1, 1, 1, UIFont.Small, true)
    self.dayLabel:initialise()
    self:addChild(self.dayLabel)
end

function ISDayCounter:update()
 
    
    -- Get the current day from GameTime
    local daysSurvived = GameTime.getInstance():getWorldAgeDays()
    
    -- Update the day label text
    self.dayLabel.name = "Day " .. tostring(daysSurvived)
    self.dayLabel:setX((self:getWidth() - self.dayLabel.width) / 2)
end

function ISDayCounter:prerender()
  
end

function ISDayCounter:render()
   
end

local dayCounter = nil

local function showDayCounter()
    -- Create the day counter instance
    dayCounter = ISDayCounter:new(10, 10, 100, 20)
    dayCounter:initialise()
    dayCounter:addToUIManager()
end

Events.OnGameStart.Add(showDayCounter)```
#

there it is

bronze yoke
#

requiring a vanilla file doesn't do anything anyway

#

the only reasons you'll see someone require a vanilla file is either they don't know that or it's just for organisation

sage eagle
#

so i can remove the entire requirement line

white pivot
#

yes, or you can use ISPanel instead, but look into ISPanelJoypad functions thats called in the clock file

sage eagle
#

you broke my brain again

white pivot
#

when you hit initialise(), it does function ISPanel:initialise() ISUIElement.initialise(self); end

sage eagle
#

am i adding that

white pivot
#

that's not too harsh

sage eagle
#

im a dumbass lmao

white pivot
#

๐Ÿ˜…

#

i think you are on a good way to learn LUA

sage eagle
#

i wish i had the mentality of a pz character

#

read one magazine and learn an entire field of information

#

do i need to add anything to what i have

zinc pilot
#

any clue in how to directly run a SendCommandToServer on the server?

#

Specifically, I wanna trigger a /Save

sage eagle
#

function ISDayCounter:initialise()
 
    
    self.dayLabel = ISLabel:new(0, 0, 100, 20, "", 1, 1, 1, 1, UIFont.Small, true)
    self.dayLabel:initialise()
    self:addChild(self.dayLabel)
    self.dragging = false
    self.dragOffsetX = 0
    self.dragOffsetY = 0
end

function ISDayCounter:update()
 
    
    -- Get the current day from GameTime
    local daysSurvived = GameTime.getInstance():getWorldAgeDays()
    
    -- Update the day label text
    self.dayLabel.name = "Day " .. tostring(daysSurvived)
    self.dayLabel:setX((self:getWidth() - self.dayLabel.width) / 2)
    
    -- Update the label position if dragging
     if self.dragging then
        local x = getMouseX() - self.dragOffsetX
        local y = getMouseY() - self.dragOffsetY
        self:setX(x)
        self:setY(y)
     end
end

function ISDayCounter:onMouseDown(x, y)

    -- Check if the mouse click is within the day counter panel
    if x >= 0 and y >= 0 and x <= self.width and y <= self.height then
        -- Set dragging flag and calculate drag offsets
        self.dragging = true
        self.dragOffsetX = x
        self.dragOffsetY = y
    end
end

function ISDayCounter:onMouseUp(x, y)
    
    -- Reset dragging flag
    self.dragging = false
end

function ISDayCounter:new(x, y, width, height)
    o.backgroundColor = { r = 0, g = 0, b = 0, a = 0 }
    o.borderColor = { r = 1, g = 1, b = 1, a = 0 }
    return o
end

function ISDayCounter:prerender()
  
end

function ISDayCounter:render()
   
end

local dayCounter = nil

local function showDayCounter()
    -- Create the day counter instance
    dayCounter = ISDayCounter:new(10, 10, 100, 20)
    dayCounter:initialise()
    dayCounter:addToUIManager()
end

Events.OnGameStart.Add(showDayCounter)```
#

alright so i made it draggable i think

#

cosmik does that look good?

sage eagle
#

youtube

snow egret
#

I want to create a propane furnace that the player can create. Like the one in BlackSmith that is not implemented, but that works with propane, and that like the propane barbecue can be interacted to insert and remove the propane tank. For this I must create a new class in java that extends IsoObject, or is there a way to do it in lua?

hoary widget
#

Check pinned messages, and sadly there is no youtube tut for cloth modding in PZ...yet

clever totem
#

Hey guys! I wanted to make myself a custom map, just like they did flyers in Expanded Helicopter Events, and I was wondering if someone here could help me out with it, I am quite new to modding zomboid, haven't done anything except for clothes, and I am unsure of where to start with it, thank you in advance

sour island
#

gnome also, hit my first mili

#

Nvm... my menu mod beat it, I forgot to check it first

#

Egg on my face, a menu mod is my most subbed

#

Then again, mod options is still at #1

tame mulch
sour island
#

Oh nice, better sorting jumped up a few spots - I wonder what happened there.

sage eagle
#

@white pivot

#

it did not work

#

T_T

untold turtle
#

Haio could someone dm me who is willing to help me with a modding issue? or @ me when you can (Ty)

urban vapor
#

hi, if I want to do some mod, where should I start with? I now the basic of basics in code and never touched lua

bronze sand
#

@sour island
Now request a job at The Indie Stone

#

I actually think they should consider hiring more QoL modders

clever totem
sour island
#

If you post the error people will help

clever totem
#

Got it, I will try to, it doesn't show any error, though I can show what files, and code I put so far

stone garden
#

im trying to learn modding could anyone help me?

#

im trying to modify project humanoid because i got perm from aiteron and i wanted to see how to make npcs spawn naturally

clever totem
#

I've fixed the code, it doesn't kick anymore, however I can't seem to find the map in the cheat menu, the map is already coded aswell as an item

#

though Muldrough is changed to MapS1

#

I also got LUA stuff for the overlay thign from EHE

#

along with UI

stone garden
#

No one can help me :(

#

im really sorry for begging please help me

lone nest
#

and Aiteron's code is from 2 years ago, which may or may not work in the current b41 build.

stone garden
#

it actually works

lone nest
#

I'm assuming you have it spawn on command or by a function call...

#

In the case of NPCs, I strongly suggest no faster than EveryHour (in-game hour)

#

every minute in-game is about 2 seconds(?) IRL, which will kill your game performance very quickly.

#

@stone garden hope that's enough to get you started.

stone garden
stone garden
#

the npcs dont spawn in

clever totem
#

i got it!!!

gilded hawk
#

I decided to update my color picker for the transmog mod, it even support custom pickers ๐Ÿ˜„

magic halo
#

Good night guys! I have a problem, I created a machine item to use at an ATM, I set its weight to 2000 so that no one can pick it up, but I can't place it on the ground for some reason, is there a way to work around this problem?

#

I needed to use the place item option, to prevent the machine from being deleted on floor cleaning...

sour island
#

You made an item to act as the ATM?

magic halo
#

Yes

sour island
#

Take it from someone who thought using cars as crates was a good idea - look into IsoObjects instead

sour island
#

Nah, no wheels - we just wanted a 3D object with density

#

you can tow it though

magic halo
#

I'm making a savings system that uses cash items to buy things from vending machines and ATMs, so the ATM and machines could show up in receipts as well

#

Would be like this

weary matrix
nimble spoke
stone garden
#

does anyone here have project humanoid file?

hidden jungle
#

how do you cause zombies to fall? I found :setStaggerBack() which causes them to react as if they're pushed but is there a way to force a knock down?

pulsar stag
hidden jungle
#

@weary matrix its a bit iffy. it looks like zombies have some kind of "fall resist" mechanic? is that what im seeing or is it something else.

its being tied to the WeaponHitSomething event so could that be it?

bronze yoke
#

i think you just need to setBumpFallType

hidden jungle
#

what are the valid strings for that?

bronze yoke
#

i think glytch3r kept a list of them but his resources aren't very organised so idk how to find it

hidden jungle
#

can you send me the link? i'll dig around myself. maybe i'll find some other stuff too

bronze yoke
#

from searching vanilla code i see only "pushedBehind" and "pushedFront" used

hidden jungle
#

no dice.
but setBumpFallType() is something that i already use for causing a player to trip. gonna try the same setup on a zombie and see if ti works

bronze yoke
#

yeah it might be part of a larger thing, i've never used it myself just seen it come up here a couple times

hidden jungle
#

oh god... it corrupted the entire save

#

what the fuck

#

i've never seen zomboid do that, instead of the error reporter it just faded to black and went back to the main menu

#

it saved the corrupted world as a new one. good to know zomboid has failsafes for when things go wrong.

mellow frigate
hidden jungle
#

buddy i'm already level 8 at least.
i've been developing in lua since i was 13 years old :P

#

the java lua hybrid shinangains that zomboid does is a nightmare for me though. java is so much different than lua its not even funny

potent ibex
#

i made some custom items but cant attach it to my backpack in the utility slot, anyone know how to fix this?

hidden jungle
#

is the utility slot from another mod?
or are you talking about the back slot

potent ibex
#

i think its from the noir attachment mod

#

is this mod have included specific items to an list in his mod?