#mod_development

1 messages ยท Page 160 of 1

trim mist
#

just fyi.

#

I wonder if staff looks in here every once in a while to see how we're mangling their game

#

lmao

ancient grail
#

congrats

trim mist
#

ty. Strangely enough, it wouldn't work with not isBumped() or not isKnockedDown(), it would set it once, not trigger for the zombie again, and the zombie would only be bumped, not knocked down

novel swallow
#

Does anyone know of an example mod that has an item that when you use it, you gain a level in a skill?

#

Or better yet: sets you to a specified level - both up or down.

novel swallow
#

thanks

glass basalt
#

hmm, okay, turns out I need to decompile the Java code. What's the most convenient way to do that?

drifting ore
#

Does anyone know where you can find the basegame clothing spawns?

glass basalt
drifting ore
glass basalt
#

ah, the clothes you can select? idk tbh, but I know the "Insurgent - Black Ops Profession" mod changes them, so you could look at what it does there

drifting ore
#

I'll check it out over there, thank you for the suggestion!

trim mist
novel swallow
#

Okay so setting levels is easy, how do I add custom right click interactions on an item without using recipes? Or even "on eat" effects if I use food? I basically need a hook in to lua from 'using' an item.

bronze yoke
drifting ore
#

Oooo, thank you!

glass basalt
#

gonna make my first Java class replacer mod i guess, because vehicle story definitions are hardcoded in Java for some reason

glass basalt
#

what version of Java did the devs use for Build 41? so that I compile my changes correctly lol

#

or hmm, nvm. javac hasn't changed much since Java SE 6

#

AHA, found it. Build 41.71.16 is using JDK 17.0.1

#

for future reference

novel swallow
#

hmm, anyone PipeWrenchy know what I'm supposed to do with KahluaTable when using this event? I was expecting a context menu and something iterable of items, not KahluaTable

  export type OnFillInventoryObjectContextMenuListener = (playerNum: number, table: KahluaTable, items: KahluaTable) => void;
late hound
#

๐Ÿ‘Œ ๐Ÿ‘Œ

drifting ore
#

How do i prevent my custom professions from looking like this?

bronze yoke
#

what's wrong with them?

drifting ore
#

The UI_prof

#

I have a translate file set up but it's not taking the text from them for some reason

bronze yoke
#

is the translation file named correctly?

drifting ore
#

I have it named as Real_UI_EN, should it just be UI_EN?

bronze yoke
#

yeah

#

translation files should always use the name of the vanilla file, they don't get overwritten since they aren't actually loaded as part of the lua environment (even though the logs say 'mod "whatever" overwrites file ui_en.txt')

drifting ore
#

Yeah, that part confused me. Well, thank you for the assistance! It's working perfectly now!

wicked zealot
#

does somebody know why i cant make the player model turn around in a vehicle?

glass basalt
bitter lodge
#

Im trying to make a recipe to make a chipped stone from two stones, but I want one of the stones to be kept and the other to convert to a chipped stone

#

my problem is I don't want you to be able to use the chipped stone with another stone

#

I want it to be two stones only to create a chipped stone

#

but for some reason its allowing me to use a chipped stone and a stone to make a chipped stone

bronze yoke
#

can you show your recipe script?

glass basalt
#

there are mods that do this already. you need to have one stone kept as an tool per say

bitter lodge
#

whats the code formatt thing

#

yeah nah it's gonna be part of a mod

#

I just wanna start off easy

glass basalt
bronze yoke
#

```
code
```

bitter lodge
#
    {
        Stone=2,

        Result:SharpedStone=1,Stone=1,
        Sound:chip,
        Time:300.00,
        Category:Foraging,
    }```
#

thanks

#

I did do

stone```
#

basically im looking to exclude chipped.stone

bronze yoke
#

oh, they're evaluated totally separately, so one stone fulfils both conditions if you have two

bitter lodge
#

also I figure having two results won't work

bronze yoke
#

you can't have multiple results, you can get around that with an OnCreate function

#

OnCreate:NameOfLuaFunction, and then a lua file with a global function by the same name that adds the extra item(s) to the player's inventory

bitter lodge
#

thanks

wicked zealot
novel swallow
#

Looking at the above and about OnCreate can you have recipes with NO output but still call a OnCreate?

#

So you could forfeit items to trigger custom code?

tawdry solar
bronze yoke
frank elbow
#

As for what you're supposed to do with them, see the methods in ISContextMenu.lua. addSubMenu, addOption, etc.

novel swallow
#

Yeah, I got that part working. I still can't figure out how to iterate the items table using TypeScript ๐Ÿค”

#

I can do it in lua but not using pipewrench

frank elbow
#

items is a collection of items & you can get just the items using ISInventoryPane.getActualItems, or similar logic

#

Not sure what its actual structure is off the top of my head, but it's not just a list of items

glass basalt
novel swallow
#

RemoveResultItem?

glass basalt
#

RemoveResultItem deletes the output, you don't want that lol

novel swallow
#

Yeah, I don't want an item, just code to run

glass basalt
#

hmm then maybe

novel swallow
#

I think it should work, just writing it out now

#

wooo it works

glass basalt
#

darn, I was hoping to make my vehicle mod completely dynamic, but I need to write in compatibility for certain categories of vehicles. There is no ambulance or truck categories

#

I could try using Vehicle Spawn Zones Expanded as a dependency, but that complicates a lot of things

gilded hawk
#

How can I get the display name of an Item using their full name?

Like Base.Hat_Army to Military Helmet

bronze yoke
#

getItemNameFromFullType(fullType)

gilded hawk
#

Thank you

pseudo jetty
#

anyone know a good way to integrate zomboid with intellij?

#

but it didn't work

#

I get an error on step 3

#

anyone know if there is a better way or if I am just doing something wrong?

glass basalt
#

another being mccoy but log trucks don't fit as well

glass basalt
#

I can't figure out how to compile my Java class files. Does anyone know if every class file must be fully decompiled or not?

trim mist
primal remnant
#

Hey guys, I want to create a mod that basically adds some recipes for two different mods.

In essence I want to take weed from one mod and then a bong from another mod and allow them to be combinable. The problem is when I create a recipe using those items, the recipe does not even show up. My suspicion is that because I have not created said items in my mod already, even though they are loaded in the game, my recipe can not use items from outside itself.

I tried imports{} and added the modID names for those mods along with Base, but that was just a shot in the dark.

In summary: How would I make a recipe in a standalone mod, that uses items from another mod? Am I on the right track?

bronze yoke
#

import the modules from the mod's item scripts, not the mod ids

primal remnant
#

Albion, I genuinely get excited when I see you typing. Thank you so much.

bronze yoke
#

๐Ÿ˜‡

sick vapor
spice saddle
novel swallow
#

What's the difference between StaticModel and WorldStaticModel for item defs?

thin hornet
# novel swallow hmm, anyone PipeWrenchy know what I'm supposed to do with `KahluaTable` when usi...
import { ISContextMenu, ISTimedActionQueue, InventoryItem, _instanceof_, getSpecificPlayer, getText } from "@asledgehammer/pipewrench";
import { onFillInventoryObjectContextMenu, onFillWorldObjectContextMenu } from "@asledgehammer/pipewrench-events";

function onItemContextMenu(playerNum: number, context: ISContextMenu, items: any) {
  const playerObj = getSpecificPlayer(playerNum);
  
  for (const [_, item] of items as LuaTable<number, InventoryItem>) {
    if (_instanceof_(item, "InventoryItem")) {
      const itemFullType = item.getFullType();
      if (itemFullType !== "Base.Axe") {
        context.addOptionOnTop('hello', null,  () => {
          
        });
      }
      break;
    }
    else {
      for (const [_, _item] of (item as any).items as LuaTable<number, InventoryItem>) {
        if (_instanceof_(_item, "InventoryItem")) {
          const itemFullType = _item.getFullType();
          if (itemFullType !== "Base.Axe") {
            context.addOptionOnTop('hello', null,  () => {
              
            });
          }
          break;
        }
      }
    }
  }
}
onFillInventoryObjectContextMenu.addListener(onItemContextMenu);

here is how i use it with pipewrench

novel swallow
#

beautiful

#

thanks

#

const [_, item] of items as LuaTable<number, InventoryItem> was the part I was missing, I got as close as const item of items and messing with that was driving me wild

#

ohhh, and I was using the wrong instanceof too so thanks for that snippet

thin hornet
#

๐Ÿ˜„

#

we often have to infer types using as to get the correct compiled result but it also gives the correct intelisense

#

so when i dev using pipewrench i still have a second vscode opens with the game base lua files to search for reference

novel swallow
#

yeah, I was trying that but I'm bad at converting between lua/ts still as I have no idea what I'm doing with lua. Hadn't even spotted the LuaTable in ts

thin hornet
#

Also you can change noImplicitAny to false in your tsconfig

#

lets say you want to assign something to the globals

(_G as any).something = something

with noImplicitAny: false you would just need to do:

_G.something = something
#

also when using game events:

// function will reload correctly when reloading the script
function onItemContextMenu() {}
onFillInventoryObjectContextMenu.addListener(onItemContextMenu);

its better to have the function outside (like that first example) instead of this next example:

// will not reload properly in game
onFillInventoryObjectContextMenu.addListener(function() {});
#

also if you want to define interface you can name those files .d.ts so they dont actually get compiled into an empty lua file in your dist

// file: src/my_mod/shared/person.d.ts
export interface IPerson {
  name: string
  age: number
}
novel swallow
#

noted all the above, thanks for your help ๐Ÿ™Œ

primal remnant
#

Can I use Override = true for a recipe?

thin hornet
primal remnant
#

@thin hornet @fast galleon The doors that have just been opened for me.

#

The reason I was asking is there are several different mods that handle "Blacksmithing" differently. I wanted to recombine all the recipes to use any of their items but was worried I'd end up with 2 or 3 identical context menu options.

#

Now I shall

novel swallow
#

On books, the LvlSkillTrained = 1, is this the required skill to read it? Cos I see BookMetalWelding3 has LvlSkillTrained = 5

fast galleon
#

it's for giving xp multiplier from level 0, also used to choose the value of multiplier based on this.

novel swallow
#

oh hmm, how do those books handle the whole "not skilled enough to read it" thing?

fast galleon
#

ISReadABook.lua something like player skill < LvlSkillTrained - 1

novel swallow
#

hmm, so LvlSkillTrained gets used for multiple things?

novel swallow
#

Anyone got a mod example of putting text above the character?

#

e.g. I want on using an item for it to say "Skill requirements not met" or something

spice saddle
trim mist
#

you could have it trigger that on an event happening

boreal ginkgo
#

๐Ÿ‘‹ morning all. Does anyone know what language the scripts in the script/ folder are written in ? Screenshot attached for clarity.

#

The extension is .txt , but it's clearly something since there are modules and imports

red tiger
#

Good morning.

boreal ginkgo
#

mornin'

tiny wolf
#

Hello guys ๐Ÿ™‚ hope you're fine.
Working on a new mod : do you know what chunkdata savegame files containing pls ? ๐Ÿ™‚

novel swallow
#

How do I delete an item from a player's inventory? As in, I want to destroy the item so it's gone

#

I see a few different ways/functions from other mods... Not sure which is best

novel swallow
#

I'm super struggling with lua tables, can anyone help me out?

testTable = {}

-- Game doesn't boot if I do it this way, not sure why
testTable["Entry"] = { perk = Perks.Woodwork, level = 1};

-- Saw a different mod wrap the perk in {}
testTable["Entry"] = { perk = { Perks.Woodwork }, level = 1};

-- Doing this causes an error though... How do I get `.perk` to be correct?
playerObj:getPerkLevel(testTable["Entry"].perk);
lone nest
novel swallow
#

Aren't they equivalent?

lone nest
#

No, because in my limited experience thus far, lua does not have the concept of "properties" you would find in JS/TS

#

and the goofy workaround is to create a table mapping in place of it

#

hence testTable["Entry"]["perk"] should point at the correct table value now

#

rather than testTable["Entry"].perk

bronze yoke
#

they are equivalent

#

table["string"] is the same as table.string

lone nest
#

interesting... so I might have had a typo in my own code

lone nest
novel swallow
#

Hmm, so my issue is with something else but I can't figure out what ๐Ÿค” something to do with this perk system

vale vapor
#

Hello, if i place my mod in a file at "media/lua/server/". It's not working on a dรฉdicated server. Do you know why? Here is my code.

local MaxTime = 0
local ReanimationChance = 0

local function WakeUpSetup()
    MinTime = SandboxVars.ZombieWakeUp.MinTime;
    MaxTime = SandboxVars.ZombieWakeUp.MaxTime;
    ReanimationChance = SandboxVars.ZombieWakeUp.ReanimationChance;
end

local function OnContainerUpdateWakeUp(zombie)
    if zombie and instanceof(zombie, "IsoDeadBody") then
        if ZombRand(1, 100) <= ReanimationChance then
            if MaxTime < MinTime then
                MaxTime = MinTime
            end
            local ReanimationTime = ZombRand(MinTime,MaxTime);
            zombie:setReanimateTime(getGameTime():getWorldAgeHours() + ReanimationTime);
        end
    end
end

Events.OnGameStart.Add(WakeUpSetup);
Events.OnContainerUpdate.Add(OnContainerUpdateWakeUp);```

It's work fine in solo game.
red tiger
#

Trace what's not firing or returning expected data by using prints.

#

If it doesn't work on the server, then you'll need to figure out how to implement what you want by executing or gathering info on the client and sending that to the server.

vale vapor
#

ok thx, like file in directory client. Grab event and call function server side?

red tiger
vale vapor
#

ok thx. I will go see this. Thx for your help.

red tiger
#

No problem.

novel swallow
#

Just looked further in to the mod that's using perks in a table and uh... what

#

local perkobj = PerkLookup["Test"].perk[ZombRand(1, # PerkLookup["Test"].perk +1)];

#

they access the perk with [] and do a random number between 1 and the perk + 1... I do not follow

#

Though not sure what the # does

#

PerkLookup["Test"] = { perk = {Perks.Woodwork}} for reference

#

Oh right that's saying random between 1 and length of perk... What. That still doesn't make sense

bronze yoke
#

it's because perk is a table

#

that code picks a random perk from that table (though there's only one so it always picks that one)

novel swallow
#

I guess I'm confused why PerkLookup["Test"] = { perk = Perks.Woodwork} (no {} around perk) bricks the game. I'm assuming that means what I really want in my code is just PerkLookup["Test"][1]

lone nest
novel swallow
#

it returned the perk and worked

lone nest
#

PerkLookup["Test"]["perk"] will return another table.

#

Hm...

novel swallow
#

oh wait no

#

I sent the wrong message earlier, yeah

#

I meant PerkLookup["Test"]["perk"][1] - that got me what I wanted... The question falls back to why I need to wrap the perk in {} when creating the table otherwise it bricks the game. I assume my script is running too early or something.

frank elbow
#

When you're asking questions about an error it's good practice to indicate what the error was ๐Ÿ˜„

novel swallow
#

That's the thing: it wasn't giving me a proper one

#

just attempted index of non-table no stack

frank elbow
#

Can you show it? That's odd

novel swallow
#
-----------------------------------------
function: mGuv_LevelOverhaul_PerkDefinitions.lua -- file: mGuv_LevelOverhaul_PerkDefinitions.lua line # 2 | MOD: Matt's Brita Trade Overhaul

LOG  : General     , 1683991060031> attempted index of non-table
LOG  : General     , 1683991084832> EXITDEBUG: RenderThread.isCloseRequested 1
#

upon game booting

frank elbow
novel swallow
#
mGuvLevelOverHaulPerkDefinitions = {};
mGuvLevelOverHaulPerkDefinitions["mGuv_LevelOverhaul_PerkUnlock_Aiming_1"] = { perk = Perks.Aiming, level = 1}
frank elbow
#

And how were you using it?

#

I'm assuming some information is missing here, because that's odd if it's truly just what you sent above

novel swallow
#

playerObj:LevelPerk(mGuvLevelOverHaulPerkDefinitions["mGuv_LevelOverhaul_PerkUnlock_Aiming_1"].perk, false)

#

all of this blows up

#

it works now I changed it to:

mGuvLevelOverHaulPerkDefinitions = {};
mGuvLevelOverHaulPerkDefinitions["mGuv_LevelOverhaul_PerkUnlock_Aiming_1"] = { perk = {Perks.Aiming}, level = 1}
--
playerObj:LevelPerk(mGuvLevelOverHaulPerkDefinitions["mGuv_LevelOverhaul_PerkUnlock_Aiming_1"].perk[1], false)
frank elbow
#

That shouldn't be necessary

novel swallow
#

My game doesn't even boot with the first mGuvLevelOverHaulPerkDefinitions I showed

#

Hangs on black screen with the error above in console.txt

frank elbow
#

When it refers to "line #2" in the error message, is that the line where you declare the table with the perk?

novel swallow
#

ye

frank elbow
#

I don't know if you care to figure it out since you have it working anyway, but I'm curious

novel swallow
#

I do care, because it's annoying and goes against everything I thought I understood ๐Ÿ˜›

frank elbow
#

That implies that Perks is potentially the problem, to me. Only other option is the table you just declared

#

If you set a variable with the value of Perks.Aiming or try printing it what happens?

novel swallow
#

So if you're in an executing script somewhere deeper, that works fine, as it's an instance of PerkFactory$Perk - the built in perk system

#

but for some reason, if you just have a loose .lua file that executes instantly.. it blows up

frank elbow
#

Yeah, just wondering whether you tried it on its own

novel swallow
#

Yeah, I used it loads before. This definition way I'm doing it is to cut down the code I need to write. As I'm generating lua/items/recipes via TypeScript

#

I thought it was a problem with my TS -> Lua chain, but it ended up being a lua/zomboid problem

frank elbow
novel swallow
#

Oh I see what you mean

#

one sec

#

I'm lost. It's suddenly working now

#

Well working as in, it's booting without errors

red tiger
#

Not related; Reorganizing my tokenizer, my linter, and my formatter WIP code for the ZedScript vscode extension.

novel swallow
#

Okay, moment of truth. I reverted back to when it was all broken

#

Aaaand it's fine.

#

Now I'm very confused, haha.

#

I was manually editing workshop files at one point, I must have butchered something...

lone nest
#

rip, use git versioning control.

red tiger
#

^

#

Learning the complexity and process of linting language tokens these past months..

#

I'm now closer to writing my own languages.

#

Feels like a rite of passage. =P

novel swallow
#

I use git obsessively so we're all good there ๐Ÿ˜› It's getting it work the first time I struggle with at the moment.

#

Is there anyway when using a keep item on a recipe, to lower the items Condition? And/or require a minimum condition?

#

If not, I can just add in my own item with a delta and use it like glue

neon bronze
#

OnTest and OnCreate functions

trim mist
#

Annnnnyone know if there's frame calculations available to us in lua?

novel swallow
trim mist
#

like in unity there's a time.deltatime() function--anything similar in here?

neon bronze
#

One (bad) tip i can give is to use a OnTick event

trim mist
neon bronze
#

I mainly say its bad cause of performance issue for lowtier hardware aka mine

frank elbow
novel swallow
#

I don't know Zomboid but yeah, on tick events in general, depending on what you do in them can be killer for performance

neon bronze
#

There is a OnTick and OnRenderTick events

trim mist
#

In lieu of any actual, written functions that we have access to to stop sweating, my thought is in onPlayerUpdate I could do something like

if not getClimateController():isRaining
then
player:getBodyDamage():setWetness( player:getBodyDamage():getWetness() - 0.015 * time.DeltaTime())
#

(and for context 0.015 is the actual wetnessIncrease value, just didn't know how to reference it)

#

with the on tick method I could at least get closer to the value i'm expecting to see in testing per frame (i think frame) which is 0.015

red tiger
trim mist
#

I don't wanna mess with it too much, I just want the time between frames as made available by java

red tiger
#

Would be cool if The UI API would allow for cached instruction calls or even better, render toggles for caching the result texture buffer.

#

Was working on a core mod to demonstrate this.

frank elbow
#

OnPlayerUpdate doesn't offer that as an argument, but you can keep track of the elapsed time yourself using getTimeInMillis or one of the other similarly-named functions

#

I think it may be possible to do what you're trying to do more accurately with Thermoregulator functions, but I'm not certain

trim mist
#

the thermoregulator class is a big fucking mess ngl

frank elbow
#

Actually getTimeInMillis wouldn't work all that well because it doesn't factor in paused time, lemme take a quick look to see what doesn't do that

#

GameTime has some stuff that may be of use

red tiger
frank elbow
#

Yeah, I've done something similar before, but if there's a cleaner way that'd be ideal imo

red tiger
#

You're already inside of a pseudo Lua environment ran in Java, so don't blame yourself on optimization.

#

We still don't even have primitive data wrapper API for PZ.

#

Heck, Roblox has those.

frank elbow
#

I don't worry too much about optimization, but I do like to go with whatever option won't make future me say "why did I do this" and then sigh when reading the comment that tries to justify it

bronze yoke
#

getMultiplier() is the main one, getRealworldSecondsSinceLastUpdate() and getMultipliedSecondsSinceLastUpdate() are pretty useful too

trim mist
#

thank you albion, once again lmao

#

what would this community do without you?

bronze yoke
#

๐Ÿ˜‡

frank elbow
#

Is this going to apply conditionally, or all the time?

#

If it's the latter it seems like you could just modify the value (that is, the WetnessIncrease value you referenced earlier)

#

Worth noting either way: looking at the code in ClothingWetness suggests that WetnessIncrease is a multiplier & not the final value which will be added to the wetness

bitter lodge
#

what unit is time in?

#

like milliseconds or what

frank elbow
#

Depends on the method you're calling

bitter lodge
#

recipe time

#

Time:160.00,

frank elbow
#

Looks like that's used as the maxTime for the craft actionโ€”I'm uncertain what unit it is, but I think it's tied to game time rather than real time

bitter lodge
#

Oh okay

#

I was just wondering because i'd like to make a sound file in time with it

#

but if I make it short will it just loop or play once?

frank elbow
#

Depends on how you write it

#

That is, you can do either

bitter lodge
#

oh cool I didn't realize

frank elbow
#

ISBuildAction.lua has an example of sound effects

bitter lodge
#

thank you

frank elbow
#

May want to reply to the person asking instead ๐Ÿ˜„

#

Although I don't think they necessarily need real time anyhow; I said that because milliseconds were mentioned

bitter lodge
#

Nah im just trying to time it

#

I'll go with looping it tbh

#

thanks though

red tiger
frank elbow
#

I needed it when I was doing music stuff, but I don't think I've needed it in any other case

red tiger
#

Mainly UI stuff.

#

Also music, btw.

frank elbow
#

Ah, fair

red tiger
#

The update() call for UI is intentionally slowed way down so I had to overstep that.

frank elbow
#

That series of edits had me go from wondering to understanding

#

A real rollercoaster

red tiger
#

My fucking fingers can't do anything.

frank elbow
#

Was using render not an option?

red tiger
#

I realized this when I was working on a React-based HTML solution for PZ UI.

#

You need to use it.

#

render() is fine.

#

Just know that it runs on the main UPS thread.

frank elbow
#

Interesting, I was wondering about such a thing a while back but didn't explore the thought

#

The HTML-based UI bit, I mean

red tiger
#

I tore the UI engine apart to implement GLSL support.

frank elbow
#

CSS styling too, nice

red tiger
#

You have to create any element you'd use here but.

#

It's totally doable.

#

It's a shelved project for the time being.

#

The skeleton for it is there to build on.

#

The plan was to make elements for buttons, check boxes, forms, etc.

#

I think that people would have a far easier time using web logic to make their UIs.

frank elbow
#

Agreed

red tiger
#

Again, it's there and can be worked on by me or anyone.

frank elbow
#

I had more of a templating style in mind, but I have to admit the jsx is appealing

red tiger
#

One more reason to join the Typescript bandwagon.

frank elbow
#

Not enough to rip me away from my beloved Lua

#

๐Ÿ˜„ I knew it was coming

red tiger
#

TS is a non-canon way to mod PZ.

frank elbow
#

I see it as valid but choose to admire from afar

red tiger
#

More lore for the lore goblins.

#

Wish I had a vet badge. Been modding since '14. unhappy

#

BTW RadialMenus in HTML would be insanely useful.

rich hazel
#

Is there an up to date resource for finding perk/trait names, etc?
This link on the modding page of the wiki is borked

pseudo jetty
#

btw anyone know how to knock a player onto the ground?

rich hazel
#

I apologize for the dumb questions, I'm new to this.

pseudo jetty
#

not sure

#

I'm new too

#

I'm looking through the game media file and I can't find any perk declarations

#

yes, i think that they are

#

I just found the perk name "Woodwork" referenced in the code

#

I'm not sure where they are defined, but those seem like the actual names

rich hazel
#

All right, I'll see if I can't get it figured out. Thanks for the help!

mellow frigate
#

perks are defined in PerkFactory.java

bronze yoke
#

the Perks enum should be on the reference site

ancient grail
drifting ore
#

How hard is it to start learning how to make mods if you haven't used any language?

#

Or do you need to have learned another language?

ancient grail
# rich hazel

If your looking for the full list lf traits
I think you can get by iterating over this

TraitFactory.getTraits():get(i)
pseudo jetty
#

also does anyone know how to emit light with lua?

vale vapor
#

Hello. I'm trying to use sendCommandServer for making my mod working on server.
Actually my file shared is:

    ServerCommands = {}
}

local function OnContainerUpdateWakeUp(zombie)
    if isServer() then
        ZombieWakeUp.ServerCommands.ZombieWakeUpServer(zombie)
    end
end

Events.OnContainerUpdate.Add(OnContainerUpdateWakeUp);

return ZombieWakeUp```

And my file server is:
```local MinTime = 0
local MaxTime = 0
local ReanimationChance = 0

local function WakeUpSetup()
    MinTime = SandboxVars.ZombieWakeUp.MinTime;
    MaxTime = SandboxVars.ZombieWakeUp.MaxTime;
    ReanimationChance = SandboxVars.ZombieWakeUp.ReanimationChance;
end

ZombieWakeUp.ServerCommands.ZombieWakeUpServer = function (zombie)
    if zombie and instanceof(zombie, "IsoDeadBody") then
        if ZombRand(1, 100) <= ReanimationChance then
            if MaxTime < MinTime then
                MaxTime = MinTime
            end
            local ReanimationTime = ZombRand(MinTime,MaxTime);
            zombie:setReanimateTime(getGameTime():getWorldAgeHours() + ReanimationTime);
        end
    end
end

RegisterServerCommand("ZombieWakeUp", function(zombie)
    if zombie then
        ZombieWakeUp.ZombieWakeUpServer(zombie)
    end
end)

Events.OnGameStart.Add(WakeUpSetup);```

But i get an error call nil  server file at ```RegisterServerCommand("ZombieWakeUp", function(zombie)```

Anyone have a pist for resolve it? I ma doing something weird? I don't find many doc for help to understand how to use it.

thx in advance for your time and help.
bronze yoke
#

what is registerservercommand?

vale vapor
#

i see on a forum, it's needed to register my new command. But i don't understand why. And i can't get it to work actually.

bronze yoke
#

i think it might be something old or specific to someone's mod

#

you don't need to register server commands

vale vapor
#

oh ok

#

The rest is correct you think?

thin hornet
thin hornet
#
local LightSource = IsoLightSource.new(x, y, z, r, g, b, radius)
getCell():addLamppost(LightSource)
pseudo jetty
#

๐Ÿ‘

thin hornet
#

it wont be synced between players

#

so one way to handle this, is to add the light information to a square modData and when loading that square checking if there is info and recreating that light for the client

pseudo jetty
#

ok, I'll try that out

#

thank you

#

also just wondering if there is a way to reload scripts mid game, or do I need to reload the game each time

thin hornet
#

basically using Events.LoadGridsquare

#

which run everytime a square has been loaded into the client game

pseudo jetty
#

what about when the light is initially created, will it be triggered?

winter thunder
#

Hey, anyone have a guide for adding a context option to something? I want to be able to r-click the item, click the custom option, and have it trigger a function. Just not sure on the possibility of that

#

I know it is possible* I just dont know how lol

thin hornet
#

well i would transmit the light to all players when created dynamically. Then if the square exist in each client create it. otherwise it will load when the square is loaded

thin hornet
#

there are many example in the base game lua code

thin hornet
#

one example:

local function RemoveItemContextOptions(player, context, items)
    if not (isDebugEnabled() or (isClient() and (isAdmin() or getAccessLevel() ~= ""))) then return true; end

    local container = nil
    local resItems = {}
    for i,v in ipairs(items) do
        if not instanceof(v, "InventoryItem") then
            for _, it in ipairs(v.items) do
                resItems[it] = true
            end
            container = v.items[1]:getContainer()
        else
            resItems[v] = true
            container = v:getContainer()
        end
    end

    local listItems = {}
    for v, _ in pairs(resItems) do
        table.insert(listItems, v)
    end

    local removeOption = context:addDebugOption("Delete:")
    local subMenuRemove = ISContextMenu:getNew(context)
    context:addSubMenu(removeOption, subMenuRemove)

    subMenuRemove:addOption("1 item", listItems[1], ISRemoveItemTool.removeItem, player)
    subMenuRemove:addOption("selected", listItems, ISRemoveItemTool.removeItems, player)
end
Events.OnFillInventoryObjectContextMenu.Add(RemoveItemContextOptions)
pseudo jetty
#

also thanks for your guide on github

winter thunder
#

Thank you! That is very helpful <3

novel swallow
#

All you guys are awesome who help in here, just chipping in. I learnt more in 1 hour here and accelerated progression through the roof, than I ever did googling and reading the forums

#

Big props ๐Ÿค™

winter thunder
#

While I am here- Do you also know the formatting for the way custom pages are kept track of? I know it is a hashmap. Trying to find out if it the int is page number, and the string is the text on that page

winter thunder
#

Here is my lil list of a bunch of helpful links too <3

novel swallow
#

Oh nice, thanks.

winter thunder
drifting ore
#

to put a note that does not affect the code in notepad, wasn't it // ?

novel swallow
#

-- in lua

drifting ore
#

thx

novel swallow
#

Every other language it's // ๐Ÿ˜›

mellow frigate
#

or # or ;

spice saddle
#

sql uses - -

spice saddle
red tiger
austere plume
#

Hello everyone. Can somebody share with me masks_basic_starter.psd ? Thx. :3

mystic vessel
#

Hello good evening, I have an idea for a mod, if anyone wants to take this idea and run it feel free. But I wanted to make a mod for zomboid but I have no idea how to do it, could anyone help me?

#

The idea is to make a machine that, when energized, re-supplies all the sinks, showers, etc.. in an area

#

As if it were a generator, but with the purpose of water

winter thunder
#

But also, does anyone know how PlayerEmoteState() is used? I am trying to make a function that will force the player to exit an emote. I presume I would use PlayerEmoteState():exit(). Possible for that to have some unitended effect? I dont want to interrupt normal game functions, just the literal emotes used in game to like wave

bronze yoke
#

i think you need to change the player's state to something else

winter thunder
#

These are all of the methods for that class

#

It is an extension of the State class

bronze yoke
#

you'd want to mess with the player's state machine not the state itself i think

#

player:changeState(IdleState.instance()) for example

winter thunder
#

But that would mess with the global state, which would be exactly what I wanna avoid- Since that'd break any sitting / fishing / timed action they were doing

#

I basically JUST want it to end any emotes

bronze yoke
#

they're emoting at the same time?

winter thunder
#

I am helping a friend with a mod. It will trigger talking emotes when the player is typing

#

I am making an escape function

bronze yoke
#

the player should only be in one state at a time

winter thunder
#

Alright, than is helpful. Do you know if there is a way to check to see if the player is emoting or if they are in any other state? It is going to be on a short timer, but I dont want that to accidentally end something like someone climbing a sheet rope immediately after typing or whatever lol

bronze yoke
#

player:isCurrentState(stateObj)

winter thunder
#

So would I just use like player:isCurrentState(PlayerEmoteState)?

bronze yoke
#

PlayerEmoteState.instance()

winter thunder
#

I was just about to fix that

#

lol

#

As always Albion, thank you <3

pseudo jetty
#

does anyone know if the vehicle door open, enter, exit and close timedactions are overwritten in mods frequently?

#

or by any large ones

sour island
pseudo jetty
bronze yoke
#

i had a quick look at those functions and i don't see why you'd be forced to fully override them

sour island
#

Overwriting isvalids can actually be tricky

#

Or I may be overthinking it

#

But an earlier overwrite could pass the function as true

#

The default isvalids should only if into false and default to true

#

But that is the joy of mod-to-mod compatability ๐Ÿ˜…

pseudo jetty
bronze yoke
#

you can return true on the specific combinations of conditions that you want to overwrite instead of overwriting the entire function

#

returning true is a little problematic for mod compatibility but less so

mystic vessel
ancient grail
#

Iirc pao already patched this

mystic vessel
ancient grail
#

this doesnt really plumb sinks
It just adds water to the sinks everytime you open context menu making them infinite water source (make sense cuz it require water tiles as water source)

#

So it means its tapped to a body of water. Thats the idea behind it.

ancient grail
mystic vessel
bronze yoke
#

i'd be surprised if it's been patched considering that it has never received an update

ancient grail
drifting ore
#

Hello! I am trying to add xp and traits to my professions and it decided to shoot me in the foot. If I add the trait function it won't add the trait and remove the entire description

mystic vessel
ancient grail
thin hornet
drifting ore
#

YES, I just realized this on my own a few minutes ago but thank you regardless-

rich hazel
#

Can someone point me in the right direction of modifying vanilla skills

thin hornet
#

what do you want to modify about it

rich hazel
#

Specifically, I want to modify the modifiers for each level of the aiming skill

thin hornet
#

Well, skills are called Perk in the code. Perks only store the require xp needed to level up.
Also have a look at media\lua\server\XpSystem\XpUpdate.lua
So really what you are actually looking for is to find where aiming perk level actually effect aiming.

rich hazel
#

Would I be able to change the actual modifiers of the skill itself?

#

Like, per level?

glossy turret
bronze yoke
#

probably only possible with a java mod

glossy turret
#

thought that might be the case

#

rip

thin hornet
#
   public float getAimingMod() {
      int var1 = this.getPerkLevel(PerkFactory.Perks.Aiming);
      if (var1 == 1) {
         return 1.1F;
      } else if (var1 == 2) {
         return 1.14F;
      } else if (var1 == 3) {
         return 1.18F;
      } else if (var1 == 4) {
         return 1.22F;
      } else if (var1 == 5) {
         return 1.26F;
      } else if (var1 == 6) {
         return 1.3F;
      } else if (var1 == 7) {
         return 1.34F;
      } else if (var1 == 8) {
         return 1.36F;
      } else if (var1 == 9) {
         return 1.4F;
      } else {
         return var1 == 10 ? 1.5F : 1.0F;
      }
   }
#

it is indeed hardcoded

glossy turret
#

thanks

thin hornet
#

tho i cant seem to find any usage example of getAimingMod anywhere

#

so not sure its in use atm

glossy turret
#

that was for items i think

#

guns have stats for accuracy etc

mellow frigate
visual island
#

hi! is there a way to add new java classes without replacing the original .class files?

magic halo
#

Good morning, I have many doubts about how to create furniture, is there any tutorial?

fast galleon
ancient grail
# magic halo Good morning, I have many doubts about how to create furniture, is there any tut...

I dont understand
You have doubts if jts doable?
Or you doubt yourself if you can do it?

Create furniture? You referring to vanilla?
Tilepicker/brush tool?
Moveable? Place item?

Or do you mean to create a tilesheet? Or a contextmenu thing like. Or
Similar to more builds?

We cant help u if we dont understand what you need

We cant even tell if youre end user asking for support or a modder

novel swallow
#

Can someone point me at a mod/how to for adding things to loot tables, specifically zombie drops?

#

I see one mod doing table.insert(SuburbsDistributions["all"]["inventoryfemale"].items, "Item");, is that the right one?

magic halo
#

I'm making a mod that uses crafting tables to make items, but I wanted to make something similar to the Vaccine mod, they made movables that can be used as a condition for recipes. I have no idea how to create a new piece of furniture through the mod, which is a lot to learn, I didn't want to do those creation tables by dropping the item on the table on the floor @ancient grail

ancient grail
#

Watch daddy dirk videos

Then you need a lua code for context menu
And detect the sprite when you rightclick

Use the event
OnFillWorldObjectContextMenu

#

Goodluck man

#

Oh and for the "dropping the jtem"
U need to make an item script that will define your moveable

magic halo
#

I wanted to be able to build a table that would be used to craft items when approaching it. I know how to make recipes in script and in lua, except how to create new moveables, with textures made by me. Sorry for the bad english, it's not my native language

ancient grail
#

Nah the english isnt the problem
Its the missing info at first but now its all clear

Anyways yeah like i mentioned
Watch daddy dirk videos on youtube

#

Make the tiles
Thats the first part you need to do

magic halo
#

I didn't know he had tutorials on youtube, I'm going to watch it now

ancient grail
#

1 make tilesheet
2 make moveable item
3 make context menu code
4 make main function
5 upload to workshop
6 share your success here so we can congratulate you

ancient grail
magic halo
#

thank you for your attention and help Glytch3r

novel swallow
#

If I want to add items to a zombie on death, I see there's a OnZombieDead event. My question is, I assume that script would need to be a server script?

fast galleon
#

Can it not be done with distributions?

novel swallow
#

I want a bit more logic behind it

#

and without interfering with existing tables

#

Hmm, though looking at other mods OnZombieDead is used always on the Client... Even Killcount does it and doesn't even filter what player killed it - so I assume that means the Client that kills the zombie, is the one that triggers it

fast galleon
#

if you go this way, know that vanilla loot is added a few ticks after this event to the dead body and that syncing containers from server is not the best.

#

but if you just add the item on zombie death it should be transferred to the dead body automatically

#

it all on depends on what you're trying to do with this

novel swallow
#

Literally just stuff some items in to the zombie

fast galleon
#

if there's no random involved you could have it in shared probably, but yes I think start with server only and see what happens

gilded hawk
#

Is there a zomboid mod that enables respawn? Like in minecraft?
You die, loose your gear, but you also re-spawn at the bed

Cause if not I think I need to develop it myself

fast galleon
#

MP has the safehouse respawn, right?

gilded hawk
#

Really?

frank elbow
#

Yeah

#

It's a server option

novel swallow
#

ZombRand is Inclusive Min, Exclusive Max?

frank elbow
#

It's not with the same character, though (I think?)

gilded hawk
bright atlas
#

How does the build menu work

#

I suspect it's a list or dictionary, right?

frank elbow
#

See ISBuildMenu (media/lua/client/BuildingObjects/ISUI/ISBuildMenu.lua)โ€”it's a context menu, which is created with ISContextMenu (under the hood, table with a metatable)

bright atlas
#

I see

fast galleon
novel swallow
#

Is it just me or is the XP system really weird ๐Ÿ˜… especially if you're manually setting it and leveling skills via code

bronze yoke
#

it's not just you

frank elbow
#

I've seen Chuck say the same quite a few times

fast galleon
#

It scales with starting skill level.

novel swallow
#

Basically, I've added a way to get xp and spend it on skills... But right now, I'm trying to get carry over xp to work

fast galleon
#

----Perkboost values 0/1/2/3 - AddXP100: 25/100/133/166, 0 <= boost <= 3

novel swallow
#

say you level to 50/75 and you use my mod to go up a level, I wanted that 50 to then apply to the next level so it wasn't lost

#

but uh... it doesn't come back as 50, it comes back as like a fraction of that 50

bronze yoke
#

there's an addxpnomultiplier or something

novel swallow
#

Yeah, I tried that and AddXP - they both did the same thing ๐Ÿค”

wooden lodge
#

Is there still no working bicycle modification that lets us fold the bikes so we could use them as a spawn loadout?

fast galleon
novel swallow
#

I tried the one above, that just takes Perk,float - any idea on what I want for those three bools?

fast galleon
#

albion โ€” 12/12/2022 00:26
yeah
specifically the arguments are:
type: the perk
amount: the base amount of xp
callLua: whether to call the AddXP event
doXPBoost: whether to apply xp multipliers (other than strength/fitness protein boost)
remote: if false, send a packet to the server describing the xp change (too annoying to tell what this actually does)

albion โ€” 12/12/2022 00:42
you should just revert the protein bonus manually, it's pretty consistent
if proteins lie within a certain range, divide by 1.5, otherwise don't
oh, specifically: above 50 and below 300, xp is multiplied by 1.5, below -300, xp is multiplied by 0.7

novel swallow
#

Thanks, that seems to be working.

#

I just did false, false, false and now it's granting the right XP. About to test when I have boosts

#

Yup, all good.

#

No idea why that one works differently to the same named two parameter AddXP function.

dusty wigeon
#

im trying to create a health check for a function. There seems to be something wrong with "if player:getHealth() == player:getMaxHealth() then" line in this part of the code

function InjectPropital(items, result, player)
    local char = player;
    -- Check if the player's health is already at the maximum value
    if player:getHealth() == player:getMaxHealth() then
        print "Your at max health."
        return
    end
thin hornet
#

i think its a value from 0 to 1 and if not, then probably 0 to 100

dusty wigeon
#

ok now i got that to work now to write the rest of the code

novel swallow
#

Long shot but it'd be super useful/time saving for me to debug: Does a "Firing Range" mod/map for Brita's Weapons exist anywhere? Basically just a big place full of all the guns, attachments, ammo, etc... And loads of zombies.

#

Trying to test stuff and that'd save me time spawning it all in manually

winter thunder
red tiger
#

Bored.

#

Hoping to see Typescript code thrown around in here more one day..

uneven fractal
#

Hi, currently working on my first mod, I need some help. I'm trying to check what weapon does the player has

local function Advanced_EnhancementWeapon()

local player = getPlayer()
local weapon_current = player:getUseHandWeapon()

if weapon_current == "Pistol"
then player:Say("gun")
else player:Say("no gun")

end

end

Events.EveryOneMinute.Add(Advanced_EnhancementWeapon)

#

what am i doing wrong?

#

no errors showing btw

red tiger
#
print('Hello, World!');
winter thunder
#

@uneven fractal try
getPrimaryHandItem() instead of the one you have. You can then make a statement that checks the items type, and then if it is a weapon, say/print the name

steady hawk
#

Hello, I would like to know if someone could help me.
I'm trying to make a survivor notes mod using images. In this case I wanted to use the maps you find during the game as a base but I'm racking my brain trying to get this to work right. Can anyone offer me a basis to continue my project?
like this

winter thunder
#

If I had to guess, there is probably some designated png location for the maps, and you just tell the map what image to use. Not 100% on that- but checking out that mod is probably your best place to start IMO

uneven fractal
#

how can i paste code with darker background so it doesn't take much space?

#

paste here of course

uneven fractal
#

lol

winter thunder
#

@uneven fractal if you surround it in a set of ``` on either side itโ€™ll be a code block

#

You can do inline code with just a single ` on either side

uneven fractal
#

thanks, i'm on esp keyboard distribution so I don't have that character by default

#

so what i need to do is to check what weapon am i using everytime I equip an item in my primary. Is there an event for when I equip smth or do i need to check manually using Events.EveryTenMinutes.Add for example?

winter thunder
#

There is an event for โ€œOnEquipPrimaryโ€

uneven fractal
#

so when i use that event testing with player:say if i equip a weapon it says two times, unlike unequiping where it says one time

#

any ideas?

winter thunder
uneven fractal
#
AETest = AETest

local function Advanced_EnhancementCheck()

local player = getPlayer()

 player:Say("Working!")

end

Events.OnEquipPrimary.Add(Advanced_EnhancementCheck)
#

i know i can use print but player:say is easier to see

ancient grail
#
local function Advanced_EnhancementWeapon()
    local player = getPlayer()
    local weapon_current = player:getPrimaryHandItem() 
    if weapon_current and (weapon_current:getItemsFromCategory() == "Weapon"  or  weapon_current:isRanged()) then
        player:Say("Gun")
    else 
        player:Say("No Gun") 
    end
end
Events.EveryOneMinute.Add(Advanced_EnhancementWeapon)
granite arch
#

Hello! Not sure if this is the right place to ask, but looking to get some clothing commissions done. Anyone available for that?

ancient grail
#
local function Advanced_EnhancementWeapon(player, weapon_current)
    if weapon_current and (weapon_current:getItemsFromCategory() == "Weapon"  or  weapon_current:isRanged()) then
        player:Say("Gun")
    else 
        player:Say("No Gun") 
    end
end
Events.OnEquipPrimary.Add(Advanced_EnhancementWeapon)
winter thunder
#

@granite arch the modeling channel might be a bit better for your search :)

ancient grail
#
local function Advanced_EnhancementWeapon(player, weapon_current)
    if weapon_current and  weapon_current:isRanged() then
        player:Say("Gun")
    else 
        player:Say("No Gun") 
    end
end
Events.OnEquipPrimary.Add(Advanced_EnhancementWeapon)


#

try this

uneven fractal
ancient grail
uneven fractal
#

so whats the difference between stating weapon_current like that and doing local weapon_current?

bronze yoke
#

the event passes the player and weapon so it's a waste to get it yourself when it's already provided

uneven fractal
#

what i mean is, when are you saying that player = getPlayer()? for example

bronze yoke
#

you aren't, the OnEquipPrimary event provides the player and the weapon to any function you add to it

uneven fractal
#

hmm i can't seem to understand, so for example if i want to add a variable that stores the name of the weapon i'm currently holding how can i do that in the same function?

ancient grail
#

Events has set of params they already have
Lile on player update give you player

So you dont need to getPlayer()

#

Try getName()
Or
getDisplayName()

uneven fractal
#

so should i do it like local variable = getName() or add it to player, weapon_current?

#

well my game seems to be bugged cause i tried your code again and it isn't working correctly, saying "no gun" and "gun" at the same time

drifting ore
#

I feel a tad bit silly, what bit of this code would be the one PZ uses to give the trait an Icon?

uneven fractal
#

doesn't work

wet sandal
#

Is there a more precise timestamp I can get than getTimestampMs()?

red tiger
wet sandal
#

Hmmm

#

I'll use the FPS counter than

red tiger
#

Making progress on my linter.

#

I'm using ruleset tables to define where things should be.

#
export const SCOPE_RULES: { [word: string]: LintScopeRules[] } = {
    module: [{ scope: 'root', title: 'word', body: 'scope_only' }],
    imports: [{ scope: 'root.module', body: 'imports'}],

    /** ANIMATION **************************************************** */
    animation: [{ scope: 'root.module', title: 'word', body: '=' }],
    copyframe: [{ scope: 'root.module.animation', body: '=' }],
    copyframes: [{ scope: 'root.module.animation', body: '=' }],
};
#

Same with properties:

export const PROP_RULES: { [word: string]: LintPropertyRules[] } = {
    frame: [
        { scope: 'root.module.animation.copyframe', type: 'int' },
        { scope: 'root.module.animation.copyframes', type: 'int' },
    ],
    source: [
        { scope: 'root.module.animation.copyframe', type: 'string' },
        { scope: 'root.module.animation.copyframes', type: 'string' },
    ],
    sourceFrame: [{ scope: 'root.module.animation.copyframe', type: 'int' }],
    sourceFrame1: [{ scope: 'root.module.animation.copyframes', type: 'int' }],
    sourceFrame2: [{ scope: 'root.module.animation.copyframes', type: 'int' }],
};
#

I've learned a lot from trying to make a working linter for the past month and a half. The best approach I know right now is to split up syntax linting to phases.

#

So if anyone ever goes down this road in life for programming, break your stuff up into phases or separate runes in sequence.

#

The way I went about it this time is:

  1. Check for curly braces to be even. The EOF should have a value of 0 when incrementing { and decrementing }.
  2. Check for scope blocks. (entity { ... }) and make sure they follow basic rules and position inside of nested scopes.
  3. (Working to get here) Property rules and their positions as well. Also value type checks. =)
#

The phases helps assert that prior phases passed which means I don't need to compile all linting logic into one loop which is the nightmare I endured for almost two months now.

#

=)

#

@frank elbow

#

It gets to be fun when you get to a place that can finally show simple pictures as what's been worked on, rather than endless ranting about failures.

frank elbow
#

I save my endless ranting about failures for smaller friend groups so, outside of those groups, it seems like I know exactly what I'm doing

#

Nice to see the linter coming along

red tiger
#

This is the third rewrite, meaning there were four attempts at this one component.

#

Anywho. Taking a break.

wet sandal
#

drunk The grid itself was by far the largest time sink in my render

drifting ore
#

I am hugely stuck at the point of trying to add traits to my mod- I'm not sure what has gone wrong here so uh, have at me people who are more capable

drifting ore
#

What ends up happening is that when I go to use it... nothing happens, and if that is it-

thin hornet
#

whats the path of your file?

drifting ore
#

Oh no, I know the program works because I have this section of the code in the same file which works perfectly, the addition of the second bit of code is the thing that's messing up (and I'm not sure if it's because it's sharing a file)

Here is the path anyways

ancient grail
drifting ore
#

I am adding perks as traits, yes- the plan is to make them choose between them as a sorta starter

bronze yoke
drifting ore
#

okay, I'm going to just check over for typos. Because that's clearly just the issue and not some bigger thing, thank you for the help!

bronze yoke
#

hi everyone, i've written a script to generate EmmyLua documentation for events:

#

the event data has been rewritten from scratch and should be more accurate than the ones on the wiki, and it includes the events added since the wiki was last updated
if you're interested, you can downloaded the generated files here, and then add them to your IDE as a library: https://github.com/demiurgeQuantified/PZEventDoc/releases

ancient grail
#

Posting it on the threads

#

Is that ok i named it
Albion's event plugin

bronze yoke
#

it's not exactly a plugin but that works

frank elbow
#

Love that client only is included in the schema. I'll have to modify the script a bit for the LuaLS fork's annotations but def putting that to good use, thanks albion

bronze yoke
#

i'm interested to see exactly what's different, a future idea was a command line argument or something to change annotation styles

frank elbow
#

Plus I'll prob just change around the format a bit to match how I usually doc

ancient grail
#

Can it be downloaded from the vscode extensions

bronze yoke
#

ooh, i think i could safely add that and emmy would ignore it

#

it's not an extension, it's more like a single file library

frank elbow
bronze yoke
#

personally i'm just dropping it into zdoc's library folder but you can load it standalone as a library too

ancient grail
#

Take note im not IT
So i have no idea whats really going on im just here to support hehe

frank elbow
#

Oh, one other thing for LuaCATS annots; a ---@meta comment at the top tells it to not run diagnostics on the file. I can create a PR that adds those (maybe with a flag for whether to include them?) if you'd like

bronze yoke
#

it seems like emmylua will just ignore them, so it should be fine to just drop them in

ancient grail
#

Zdoc where is this

bronze yoke
#

zdoc is the library capsid generates

bronze yoke
#

merged, thanks for the help!

twilit ridge
#

would anyone be able to help me make a mod to automatically announce messages and player locations over the radio?

pseudo jetty
#

finally learned enough about the process to finish my first mod

drifting ore
hoary widget
#

Is there a way to have clothing glow? Or do you guys think the neck collar wouldn't have enough light to have a glow?

ancient grail
bronze yoke
drifting ore
#

Ooooh okay, thank you-

bronze yoke
#

i'll probably write up a proper guide on how to use it at some point since i feel most new modders won't know how to do that either

drifting ore
#

Yeah, I haven't ever touched Visual Code Studio's settings so...

#

I dunno what I'm doing

drifting ore
hollow lodge
#

hi, how can I make an item to appear on zombies?

#

as well as an outfit

primal remnant
#

I'm having some trouble getting Override:true, to work.
I have a recipe from one mod, and a duplicate recipe in my integration fix. I used Override:true, on my mod to override the default mods recipe.
It works on one item, but not on others.
What considerations might I be missing? How does Override check to see if the recipes are the same? If they have different ingredients will that consider it a different recipe altogether?

Figured out my issue: Like a dummy, I wasn't paying attention to the fact that there were multiple recipes with the same name but different ingredients. So using override for them was simply taking the last one or something similar to that.

I'll have to create a custom Category:Omni Metalworking, that will store all of my modified recipes.

red tiger
#

Keep me posted on this. I have a bot that can update on the wiki.

#

@bronze yoke

pseudo jetty
#

has anyone noticed that so many modding guides on steam are missing with this error (from the how to make a clothing mod guide):

primal remnant
pseudo jetty
#

oh

#

anyone know an updated clothing mod guide lol?

hoary widget
# pseudo jetty anyone know an updated clothing mod guide lol?
#

Use the top one for like the setup and stuff

#

It's hard to get into the clothing stuff, it's easier once you figure out what ya need though.

pseudo jetty
#

yep, I'm experienced with blender but the exactly stuff for zomboid is confusing

#

this will really help, thank you

hoary widget
#

I know blender but ngl this was...a bit much to figure out lol

red tiger
#

Hey plungers, saying this just in-case you don't know. #modeling Is a place to focus more on the modeling side of modding. =)

#

It's fine to talk it here. Be mindful though if the discussions on modeling get lengthy or busy.

primal remnant
#

Does anyone know off the top of their head how Crafting Window Tabs are sorted? Doesn't seem to be alphabetical. Is it load order?

mellow frigate
#

Hi, I try to add worn clothes to zombies. inventoryItem = InventoryItemFactory.CreateItem('Base.Boilersuit_Flying') local strName = inventoryItem:getBodyLocation() zombie:getWornItems():setItem(strName,inventoryItem) anyone can point me in the right direction ?

#

this failed ๐Ÿ™‚

fast galleon
#

it doesn't work if they're not reanimated players, etc

#

it needs to be a costume

mellow frigate
#

an outfit ๐Ÿ˜ฆ I want to avoid that

fast galleon
#

you can change the visual but it won't be saved

#

try adding zed:resetModelNextFrame() to see changes

mellow frigate
#

thx

#

but the exact clothes with color is kept among saves, so it must be stored somewhere.. (the outfit has randomness that is not reroll at reload time)

mellow frigate
#

Thanx a lot anyway ๐Ÿ™‚

fast galleon
#
    zxTest = zxTest or addZombiesInOutfit(x,y,z,1,"Naked",100):get(0)

    local zed = zxTest
    ---[[ add worn item
    zed:setReanimatedPlayer(true)
    local duffel = InventoryItemFactory.CreateItem("Base.Bag_DuffelBag")
    zed:getInventory():AddItem(duffel)
    zed:setWornItem(duffel:canBeEquipped(),duffel)
    --zed:resetModelNextFrame()
    --]]

    --[[ add new ItemVisual
    local iv = ItemVisual:new()
    iv:setItemType("Base.Bag_DuffelBag")
    zed:getItemVisuals():add(iv)
    zed:resetModelNextFrame()
    --]]

#

ItemVisual definitely doesn't save though

#

there's PersistentOutfits.Data but it's not exposed

signal ibex
#

Is there a way to change voice chat distance during gameplay?
Like for example whisper mode so only players near me can hear me

fast galleon
#

@mellow frigate works if you set them as reanimated

mellow frigate
fast galleon
#

hm, there's probably a command for that if it's not initialized

old crescent
#

anybody explains
zombie.network.GameServer

novel swallow
#

Hey all, what's the 'proper' way to allow people to configure your mod? I see so many mods use different solutions (or other mods) that now I'm not sure who to follow

neon bronze
#

i think most of the time people use sandbox options to let the user change something like spawn rates and such

wet sandal
#

Depends on the type of configuration.

For user preference stuff I'd recommend the Mod Options mod.
For settings that effect game balance and should be the same for every player in an online context, I'd go with sandbox options.

ancient grail
#

What the actual fuck is this

spice saddle
#

lol at best he doesn't understand that he uploaded these publicly not privately; at normal, he doesn't understand intellectual property and etiquette; at worst, he knows but doesn't give a fk

novel swallow
#

Anyone know what all the weird [H] tags are for Brita firing modes?

#

Like guns can be Single fire or Single[H], there's others too

sour island
#

๐Ÿง  I could add a translation branch to community projects :0

jade stump
#

hello
does anybody know a mod that can increase the generators range?

dusty wigeon
#

does anyone have an idea of where to look at the base game health regeneration

dusty wigeon
#

what file would that be under

ancient grail
#

You can manually regen your player no need to hook to the actual regen functions

jade stump
#

nerd

dusty wigeon
#

im trying to make it an over time thing and its being a pain in the ass

ancient grail
ancient grail
dusty wigeon
#

damn

#

this is what i have so far

function InjectPropital(items, result, player)
    local char = player
    local bodyDamage = player:getBodyDamage()
    local overallHealth = bodyDamage:getGeneralHealth()
    local maxHealth = 100.0f
    local addHealth = 10.0f

    -- Check if the player's health is already at the maximum value
    if overallHealth == maxHealth then
        print "Your at max health"
        return
    end

    -- Define the function that heals the player up to max health over time
    local function addHealthOverTime(amount, interval)
        while overallHealth < maxHealth do
            
        end
    end
end
bronze yoke
# dusty wigeon this is what i have so far ```lua function InjectPropital(items, result, player)...

untested, but this is how i would approach it:```lua
local function addHealthOverTime(player, amount, seconds)
local bodyDamage = player:getBodyDamage()
local gameTime = getGameTime()
local rate = amount / seconds
local healthAdded = 0

local function doAddHealthOverTime()
    if seconds <= 0 or healthAdded >= amount then
        Events.OnTick.Remove(doAddHealthOverTime)
        return
    end

    local delta = gameTime:getMultipliedSecondsSinceLastUpdate()
    seconds = seconds - delta

    local addAmount = math.min(rate * delta, amount - healthAdded)
    healthAdded = healthAdded + addAmount
    bodyDamage:AddGeneralHealth(addAmount)
end

Events.OnTick.Add(doAddHealthOverTime)

end

fading horizon
#

wip of an armor mod i'm making

spice saddle
# fading horizon

Iโ€™m surprised the armor isnโ€™t made with 300 Stuart Little mice as the bullet fodder

fading horizon
#

lmfaoooo

sour island
#

A translation patch would be to support mods that may not have translations or a means to translate it

#

Offers a place to update them too

#

This is also kind of how the base game handles it

novel swallow
#

is OnCreatePlayer the event for doing anything for when a character is freshly made?

bronze yoke
#

not 'freshly made', it fires every time that player loads in

drifting ore
#

are there any cool lua guides that are not on the wiki for whatever reason?

drifting ore
#

cheers

red tiger
#

@bronze yoke You said that you're rewriting events documentation, correct?

bronze yoke
#

i'm pretty much done with rewriting event documentation

red tiger
#

That's a lot of docs. You must've been at it for a bit.

bronze yoke
#

there's some misc TODOs and i haven't covered a couple of the steam integration ones but nothing important is missing

red tiger
red tiger
#

I take it this is the same JSON schema as PZWiki?

#

Looks similar.

bronze yoke
#

no, it isn't

red tiger
#

Hmm...

#

Looks like I have some grunt work to do. Transforming this to work with the PZWIki code by co` will be useful. (Also PipeWrench-Events)

bronze yoke
#

yeah, i would've written parameter descriptions like the wiki has but it didn't really have an application for annotations

#

and i'm sure there's other differences too

red tiger
#

I chose to act because the current official documentation via the PZWiki portal is factually incorrect in areas.

#

It affects my products as well.

bronze yoke
#

yeah, that was why i decided to write mine from scratch, the wiki's is unreliable and i wouldn't necessarily know every place that it was wrong

red tiger
#

When we get this documentation forwarded to the PZWiki tool format, I can pull the trigger.

uneven fractal
#

Hi, dumb question. How can I leave comments in my code without messing it up?

bronze yoke
#

prefix the comment with --

novel swallow
uneven fractal
#

thx

novel swallow
#

Oh, is it OnNewGame for a new player?

bronze yoke
#

yeah!

novel swallow
#

Thanks

ancient grail
gilded hawk
#

Yeah everyone can make settings for their own server

ancient grail
#

ahh ok

#

nice

gilded hawk
#

And to stop this massive spam of mods, it's why im slowly remaking the transmog mod

ancient grail
gilded hawk
#

Yeah it's okay but it's also stupid. That version of the mod I made was poorly implemented and did not really need to make an extra mod to do the transmog. It was shit code I wrote in a very shit state of mind.

ancient grail
rich hazel
#

Is there any easy way to find recipes that are unique to mods?

sharp silo
#

Hi, all!
Someone knows any guide to upload created mods to Steam Whorkshop? ๐Ÿ˜ฎ

gilded hawk
#

I never seen this fuction addItemOnServer what does it do?

#

And should i use it instead of addItem?

bronze yoke
#

if you are adding an item to a container from the client, and it's not the client's inventory, yes

sour island
#

Hopefully with the inventory changes that's all streamlined a bit internally

#

you also have to removeitemonsever for the inverse

#

and as per the vanilla lua you should confirm if it's in a player or not

peak forge
#

anyone know where I can get larger icons of like the hunger moodlet/waterbootle icon ect

#

most are 32x32

#

but need bigger ones

glass basalt
lone nest
#

I'm looking at an older mod... is this an actual function in base PZ? getPlayerData()

#

I know there is getSpecificPlayer() and getPlayer()

bronze yoke
#

yeah, playerdata is lua

#

the code for it is weird and it didn't seem used very often so i never really worked out what it's for

sour island
#

I honestly don't test co-op ๐Ÿคทโ€โ™‚๏ธ

gilded hawk
#

Holy shit I nailed the transmog in MP

It works without external mods, and it keeps itself updated up to 5k new clothings

sour island
#

Nice!

gilded hawk
#

Damn I really needed this win to turn a bad monday into a good one

lone nest
#

thanks the replies!

bronze yoke
#

getPlayer() always gets player 0, getSpecificPlayer(index) gets player 0-3 depending on the value passed

bronze yoke
glossy turret
#

currently making custom professions with profession framework, i'm making one with nothing under the xp = [perk.] etc.
How do i make it not have an empty box on the tooltip when i mouse over my profession

bronze yoke
#

i think just don't include xp at all instead of leaving it empty

glossy turret
#

i excluded it

#

its a profession with no skill bonuses or traits

#

it doesnt affect anything besides being annoying, just wanted to see if there was a way to avoid that

frank elbow
#

@bronze yoke Responded to the issues on PZEventDoc with some info (too lazy to create a PR atm & likely will continue to be too lazy/busy until the weekend ๐Ÿ˜„)

glossy turret
#

i also have another question
does anyone have the names of the clothing slots for professions? in the readme for profession framework i see tshirt and pants

bronze yoke
gilded hawk
glossy turret
#

I am trying to use this in profession framework:

replace bool value, completely replaces all vanilla clothing options (default false)

Where would i put it in this?

clothing = {
Hat = {"UndeadSurvivor.StalkerCloakDOWN"},
Tshirt = {"YakiMakeshift.Makeshift_Shirt_Rogue"},
Pants = {"UndeadSurvivor.StalkerTrousers"},
Hands = {"UndeadSurvivor.StalkerGloves"},
Shoes = {"UndeadSurvivor.StalkerBoots"},
},

atomic onyx
#

Just starting to read all that guides. Can you actually debug mods in game?

glossy turret
#

what do you mean by that

thin hornet
#

You then have a console to test lua in the game

#

and a way to reload scripts

uneven fractal
#

Is there a way to replace the sandbox option of a mod with an addon? For example:

In sandbox options, the mod page shows as "mod" and if I enable an addon the page changes to "addon"

thin hornet
#

but if its only for a translation text you can just override it in the Translate/EN/Sandbox_EN.txt

uneven fractal
#

Well, I managed to put new options from my addon to the mod's sandbox settings but for some reason I'm not able to rename the mod's page name

#

nvm i did it, thx

red tiger
#

I may write a forum post regarding the request for primitive type support for Lua in PZ.

#

That can help with both overhead and complicated solutions requiring a lot of data.

hoary widget
#

Clothing can have different textures for male and female right?

late hound
hoary widget
#

Thank you!

tiny wolf
#

Hello everybody
Into my mod i want to add mod items which PZ can choose to place into crates like every other items.
It's about military stuff, so i check everywhere PZ put military stuff and copy it.
I use this code (for example, for a Flecktarn Jacket) :
table.insert(ProceduralDistributions["list"]["ArmySurplusOutfit"].items, "Base.JacketFlecktarnGreen");
table.insert(ProceduralDistributions["list"]["ArmySurplusOutfit"].items, 3);

Problem is : i think that doing this with 15 jackets and 15 trousers and a lot of more stuff, with this commande, add items to the vanilla stuff, it result with MORE and MORE items into crates and everything.
But i want that game could choose my moded items, not spawn in additionnal of vanilla items.

Do you think there is another solution to do more like this ? ๐Ÿ™‚

novel swallow
#

I'm still new to modding but in theory, it's just a lua table, so you should be able to clear that index by assinging it to {}, wouldn't stop other mods/later loads also inserting in to tha ttable.

#

Or you could make your own distribution and somehow update loot zones to use that distribution instead (Unsure how to do this, or if it's possible that way)

bronze yoke
#

yeah, the game rolls for every possible item individually, so more possible items = more items per container on average

#

that's why the spawn rates in large true music packs get out of control

#

in the past i've reduced the chance of all items in the container to drag the average back down

novel swallow
#

I just see most people set their item to 200 and blow the weights out the water lol

fast galleon
novel swallow
#

Wait, as in, "rolls 3" on a table means, it checks every item 3 times if it should spawn?

#

so if you had perfect luck, the container would have 3 * itemsInTable items in it?

mellow frigate
#

Hi, I want to identify a moveable at runtime. e.g. I want to identify a poster or a mirror on the wall. When I look at all IsoObjects on the square I only got that object name: walls_interior_house_02_49 (I do not count the floor). Any idea on how I can get the poster / mirror object ?

fast galleon
#

So you want to know if the isoObject is the one with the specific sprite name?

mellow frigate
#

I want to know if there is a mirror on the wall. I got the square.

#

I parsed the objects and did not found an,ything that I could identify as a mirror.

tiny wolf
#

Thank you @bronze yoke @novel swallow and @fast galleon โค๏ธ

tiny wolf
fast galleon
#

You know the F2 key, Chunk Debugger feature?

mellow frigate
#

no

tiny wolf
#

Press F2 and put your mouse on the tile

#

you'll have got the list of tiles on the left of your screen ๐Ÿ˜‰

#

maybe you'll find you mirror tile

mellow frigate
#

Thanx. That may be of use in the future ๐Ÿ™‚ But It gives only the name for the wall.

fast galleon
#

I guess it could be in attached sprites then.

#

isoObject:getAttachedAnimSprite()

#

it's not an overlay, is it?

#

@mellow frigate
select object and a list of attached sprites appears

mellow frigate
#

yes, thanx

#

it is indeed an attached sprite: walls_decoration_01_9

#

is there a tool to view all walls_decoration_* ?

fast galleon
#

You can find tile pictures / tools on TIS forums, and maybe pinned in mapping.

mellow frigate
#

thx a lot

#

It also is accessible through the ingame (debug) cheat > brush tool

fast galleon
#

oh also in-game tiles picker UI

mellow frigate
#

and North wall decorations are attached sprite. while West wall decorations are IsoObjects (at least under the F2 chunk debugger)

fast galleon
#

It might depend on the way they are spawned?

#

Reminds me of how not all doors are IsoDoor ๐Ÿค”
Might be a mapping thing.

mellow frigate
#

Maybe but in this case I spawned them all with the brush tool. (except the initial mirror I installed 'as a player')

mellow frigate
fast galleon
#

yes, walls_decoration_01_8 should be attached according to the properties it has

deft plaza
#

So I'm trying to change the intro text the "this is how you died" I did everything correctly I think but the game won't detect the mod.info

ancient grail
#

How do we get the square behind the player again?

frank elbow
ancient grail
#

Hm..i bet i need to to add the directions to a table
Like if north then south

#

But i was really hoping for a mathematical way to get 180 degrees

fast galleon
novel swallow
#

Do I have to bump the version number to trigger a redownload of my workshop item?

#

If so, what format does that use? Is it just semver?

#

or incremental, given it starts at 1 lol

#

As I uploaded a change to my mod but my subscribed copy isn't updating, I still see the old version

drifting ore
#

anyone know if build 42 will have a big change to the UI or no

#

trying to make an intro sequence and i can't do that with how the UI is currently

uneven fractal
#

How can I create presets with custom options like "Six Months Later" or "Apocalypse"?

fast galleon
uneven fractal
#

thx i'll check it out

drifting ore
#

I have the feeling that notloc is having a hard time adapting the mod to multiplayer, but as I don't know about it, I can't say for sure.

#

I wonder if it is more difficult to make something for multiplayer than for 1 player.

sour island
#

UI is client sided - the only thing he has to worry about is calling the correct add and removes

novel swallow
#

Is there a way to play the level up noise?

red tiger
#

The doom banjo must only be played in depressing melodies.

novel swallow
#

well I played getPlayer():playSoundLocal("levelup"); and it worked but... that wasn't the noise I was expecting haha. Ah it's GainExperienceLevel

ebon apex
#

how to delete an item? like additem just the opposite

#

for example, after I eat something - this item goes to the same place ... how can I do this?

lone nest
#

Is there documentation for Events.OnRenderTick? I see Add(), but is there a Delete() or Remove()?

neon bronze
#

there is a Remove() for events in general

lone nest
ancient grail
# ebon apex how to delete an item? like additem just the opposite

Im currently afk. You can just mpdify my snippet

delete everything from your inventory

local inv = getPlayer():getInventory() 
for i = inv:getItems():size() - 1, 0, -1 do
    local item = inv:getItems():get(i)
    inv:DoRemoveItem(item);
end    
getPlayerLoot(0):refreshBackpacks()

bronze yoke
#

if you want to delete everything from a container just use removeAllItems()

#

if you want to remove items from anywhere but the player's inventory use removeItemOnServer(item)

trim mist
#

Question for you all. Is it possible to slow the time taken for certain timed actions without having to hook into each one?

#

Like could I hook into the base ISBaseTimedAction and do something like

if ISBaseTimedAction == "ISUnbarricadeAction"
then
    self.maxTime = self.maxTime * 1.2
end
#

or better yet

if unwieldyHandsSlowedTimedActions.contains(this.ISBaseTimedAction)
then
    self.maxTime = self.maxTime * 1.2
end
bronze yoke
#

as long as the method you hook into doesn't get overwritten by those actions

#

if self.Type == "ISUnbarricadeAction"

#

it seems like vanilla already does something similar in ISBaseTimedAction:create()

#

so i would go for that one

nimble spoke
mellow frigate
deft plaza
#

for the workshop mod should It be called contents or media

nimble spoke
mellow frigate
nimble spoke
deft plaza
#

can someone tell me where mod.info is supposed to be

#

my first time

red tiger
#

Example Mod?

trim mist
#

that also works lol

deft plaza
#

I was looking at that too

red tiger
lone nest
#

when ZombRand(100) is called, is it between 0 and 100? or 1 and 100?

red tiger
#

idk. I wish that TIS would expose a Java.util.Random instance.

#

Java brain.

lone nest
#

curses... well, I better use the overloaded version with 2 parameters then... (min, max)

red tiger
#

That should be what you'd want.

#

PZ utils are whacky because it mainly caters to Lua code.

#

I'm used to 0-index.

#

Thinking in Lua gives me brain scars.

#

=P

lone nest
#

Yeah I wanted to make sure this actually makes sense...
local isSpawning = (spawnChanceVal > ZombRand(0, 100)); -- spawn if spawnChanceVal is greater than the random roll between 0 and 100.

lone nest
#

so that little comparison operation means a value of 5 is actually 5 percent chance spawning.

#

so i hope

#

-_-

red tiger
#

I do nextDouble() >= 0.05

lone nest
# mellow frigate [0,100[

thanks for clarifying, but I'll update the existing code to use 2 values so I won't be confused in the future.

red tiger
#

or was it nextFloat()?

#

If a decimal is going to be 0-1 I don't have to waste CPU time flooring or integer-transforming the value.

lone nest
#

๐Ÿค”

#

now I'm confused which one should be lua native or Java.

ancient grail
#
local function coin() 
     if ZombRand(1) ==1 then
          return  true
     end
end
red tiger
#

return return true?

#

tf you smoking?

ancient grail
#

Oh yeah slrey

red tiger
#

slrey???

ancient grail
#

Im carry my kid

red tiger
#

Am lost.

ancient grail
#

Csreyingd

#

Im carrying my infant kid

red tiger
#

Just drop the phone glitcher. It's all good.

lone nest
#

ChatGpt answer.

#

lua has a math library

red tiger
#

Kahlua doesn't.

#

PZ Lua is not real Lua.

lone nest
#

Curses.

trim mist
#

what

red tiger
#

Oh and before you ask, it's modeled after 5.1 Lua, so no bitwise.

trim mist
lone nest
trim mist
#

if that's the case why doesn't this throw an error lmfao

#

I'm using math.max

lone nest
#

well, I'll give it a twirl; gonna update the code and try running it in PZ.

red tiger
#

Math random

#

Try it.

lone nest
bronze yoke
lone nest
#

yeah I see that now

#

function returns a nil

red tiger
#

They're really picky about what PRNGs are used.

#

(I've had this convo a few times in the past)

#

Added a mod to servers that allowed for using medium to low-quality PRNGs so that the tick time on the server lowered.

bronze yoke
#

i'm actually looking into what's available right now, never seen it before but newrandom():random() is an alternative to zombrand

red tiger
#

ZombRand calls an instance of a maths PRNG which is a high-quality, typically used for things like casinos or higher-security.

spice saddle
#

Hey all absolute newb questions. I started developing a mod and obviously I want to test it. How should my folder structure be? Says it needs preview png file yet I do and it doesnโ€™t recognize it. Iโ€™m pretty sure the image isnโ€™t actually a problem because I just threw one from an already exiting mod as a place holder

lone nest
#

In windows, you can grab a copy from the example mod and edit it for your mod

#

not sure how you would do it on a mac.

spice saddle
#

I literally copied and pasted a working mod (including mod.info) and made sure to name the file preview.png and also altered mod.info to refer poster as preview.png

#

Maybe it needs to be literally poster.png? Though my error states preview.png

bronze yoke
#

preview.png should be in whatevenisthis

wanton pier
#

You can test by putting
MODNAME/media/ etc into
Users/YOURNAME/Zomboid/Mods

I believe instead. Installing mods the "Zomboid way" rather than workshop.

bronze yoke
#

i would say just don't do the workshop file structure until you're ready to upload

#

work from mods instead

#

you'll need a preview.png and a workshop.txt and stuff if you work from workshop

spice saddle
bronze yoke
#

that's because it should be Contents/mods/myMod

#

the preview was right so it went onto the next error

spice saddle
#

I copied and pasted a working mod CustomizableWoodWeight

#

with Contents/mod/whatevermod

bronze yoke
#

Workshop/myMod/Contents/mods/myMod

trim mist
#

Question. Instead of hooking into a function, could i... add an overload instead?

bronze yoke
frank elbow
bronze yoke
#

there's quite a few, i started working through them earlier

frank elbow
#

I wrote a quick type stub for them that doesn't actually document anything other than types

spice saddle
bronze yoke
frank elbow
#

Yeah, I noticed the same thing. I was a bit concerned about the serialize one since it doesn't handle recursive tables, but then again hardly anyone knows about it so I don't think it'd be used naively

spice saddle