#mod_development

1 messages · Page 508 of 1

white crag
#

idk why

#

fillContainer stops working with "crate" type

#

after filling a container under the room for 1060 times

#

tried to set setExploered to false

#

container and the room

#

and creating new container and assigning the container to the object

#

it just stops

mint sphinx
#

is there a way to keep the chunk loaded even no player is around that chunk ?

white crag
#

but "bin" works all the time

mint sphinx
hollow shadow
#

Where can i get the new icons?

#

i need the one from baking soad

#

soda

white crag
#

noep

zenith smelt
#

I'm having a simple issue, I have a vector2, how do I get the first element?

#

nvm

#

it's ```
MyVector2:getX();

mint sphinx
#

or world 3d object ?

hollow shadow
#

inventory icon

trim kraken
#

REPOST
Gentlemen , after a little while in PZ I have came to the realization that this game needs a Armored Boxville (GTA V) mod for the Chevalier Step Van.

AutoTsar has a similar mod to this with the bus Mod.

But I dream of the Stepvan with a zombie dozer up front, that 50 cal lmg up top.

If any experienced modders are interested in taking on this project for a commission ( we talk in private ofc )

Dm me and we have a chat 💬

drifting ore
#

I had no idea that it's a thing. How can I know that? And is it possible to unprotect it ?

tacit ermine
#

check the decompiled code or javadoc for the access modifier

hardy garnet
#

don’t think you can unprotected it

tacit ermine
#

and no, you can't

peak raven
drifting ore
#

So it's screwed up? I just want to tidy up the inventory panel, like when we click outside the panel

drifting ore
tacit ermine
#

why do you need to access that method?

drifting ore
# tacit ermine why do you need to access that method?

You see when you click outside the inventory panel, it reduces it, hides it. Well there it is, that's what I want to do. It's enabled by ui:onMouseClickOutside() or ui.draggedItems:reset() but both give me the same error.

tacit ermine
#

I think you can override ui:getTable()['OnMouseDownOutside']

#

oh you want to call it

#

you can re-create what it does pretty easily if you need to

#
   void onMouseDownOutside(double arg0, double arg1) {
      if (this.getTable() != null && this.getTable().rawget("onMouseDownOutside") != null) {
         LuaManager.caller.protectedCallVoid(UIManager.getDefaultThread(), this.getTable().rawget("onMouseDownOutside"), this.table, BoxedStaticValues.toDouble(arg0 - this.xScroll), BoxedStaticValues.toDouble(arg1 - this.yScroll));
      }

      for(int var5 = this.getControls().size() - 1; var5 >= 0; --var5) {
         UIElement var6 = (UIElement)this.getControls().get(var5);
         var6.onMouseDownOutside(arg0 - (double)var6.getX().intValue(), arg1 - (double)var6.getY().intValue());
      }

   }
drifting ore
tacit ermine
#

javadoc probably excludes signatures that aren't public

#

you can decompile the code yourself

drifting ore
#

Ok thx, what is decompile ? It's with the java code ? Because I know nothing about java

tacit ermine
#

yeah, find a decompiler and look at the classes you're interested in

drifting ore
#

You take me for smarter than I am here x)

#

Won't that change the function for all UI Elements? Because that would be problematic.

drifting ore
pale veldt
#

Hello, I have already done some research on the subject but without success.
I am coming to you to find out if it was possible to make a mod that checks if the tile belongs to a safehouse before removing the objects on the ground. Thanks 🙂

pale veldt
#

Basically I'd like to able people to keep items on the grounds in their Safehouse.

stray kestrel
#

does anyone know the Sewing Machine mod? how do you get fabrics to sew stuff in it?

sour island
#

Ah, seems like it was updated sort of recently

#

Doesn't seem to be updated for the current version tho considering the description

#

also, the author is here

stray kestrel
white crag
#

whats the difference between

#

container:removeAllItems, container:reset, container:emptyIt

#

idk why ItemPicker.fillContainer breaks a lot

#

it does not respawns item

#

only works in certain cases

late hound
white crag
#

it runs fine for first like hundreds of times

#

and it just breaks

sour island
#

what is breaking on it?

white crag
#

maybe some generation code? idk

#

i don't have java code

#

what i can say is

#

        bin = {
            rolls = 4,
            items = {
                "BandageDirty", 0.5,
                "BeerEmpty", 0.25,
                "Cockroach", 6,
                "DeadMouse", 0.5,
                "DeadRat", 1,
                "ElectronicsScrap", 0.5,
                "PopBottleEmpty", 0.5,
                "PopEmpty", 4,
                "ScrapMetal", 0.5,
                "SmashedBottle", 0.25,
                "TinCanEmpty", 4,
                "WaterBottleEmpty", 0.5,
                "WhiskeyEmpty", 0.25,
                "WineEmpty", 0.25,
                "WineEmpty2", 0.25,
            },
            junk = {
                rolls = 1,
                items = {
                    "Garbagebag", 100,
                }
            }
        },
#

this works

#
        clothingrack = {
            procedural = true,
            procList = {
                {name="ClothingStoresDress", min=0, max=99, weightChance=100},
                {name="ClothingStoresShirts", min=0, max=99, weightChance=100},
                {name="ClothingStoresShirtsFormal", min=0, max=99, weightChance=100},
                {name="ClothingStoresJumpers", min=0, max=99, weightChance=100},
                {name="ClothingStoresJackets", min=0, max=99, weightChance=100},
                {name="ClothingStoresJacketsFormal", min=0, max=99, weightChance=100},
                {name="ClothingStoresJumpers", min=0, max=99, weightChance=100},
                {name="ClothingStoresPantsFormal", min=0, max=99, weightChance=100},
            }
        },
#

this breaks after like hundreds of run

#

maybe that max=

#

implies something

#

so this means

#

you can only have finite amount of things

#

in single run

willow estuary
#

Yes, that means there should be a maximum of 99 instances of that procedural spawn table spawning in that room.
I don't know the mechanics of how that is applied, but it unsurprising that a table stops working at 100 times if you're force spawning or something.

white crag
#

yup

#

well at least i can see if this is true

#

lucky trait is literally useless

#

got pissed for workshop 0.0015 magazine

#

tried to evaluate the real chance

#

ended up lucky trait actually blocking low-weight loots

#

if its below like 0.2 or something

#

it is literally hardcore mode

#

if the loot table has "empty"? well you're boned

#

if it doesn't have one

#

idk if im doing it wrong

#

the lower the chance is

#

you get less goodies

#

prolly gonna run more than a million

#

just tired atm

#

well now i know why

#

at least i can try to fix my coop session with friends

#

to make it less frustrating and fun to loot and chill

#

prolly add up that min/max value

#

multiply by the players

sour island
#

Could have told you lucky/unlucky is not really worth it

white crag
#

well at least i know how bad it is

#

with statistics

#

i can tell everyone "if you want more food, its good"

sour island
#

from the code it's highest impact is 10% +/-

white crag
#

i hope it is

sour island
#

with all of the other variables thrown in I wouldn't be surprised if it was much much lower

white crag
#

entire "create" loot

#

is actually worse

#

with lucky traits

sour island
#

the thing is zombies in the area impact loot

#

so idk if this unit test can be accurate

white crag
#

well me too

sour island
#

but at the very least that does sound like something is wrong

white crag
#

i ran it millions time

#

inside of storage

#

but i can make it more accurate

#

now i know there is a cap

#

so i can investigate it further

#

but the trend seems same

#

if the lucky trait is there

#

you can get more goods

#

but not rare goods

#

and yes, i really don't want to believe this

sour island
#

I mean idk if this helps but this is doRollItem(

#
      boolean var7 = false;
      boolean var8 = false;
      String var9 = "";
      if (player != null && var3 != null) {
         var7 = var3.Traits.Lucky.isSet();
         var8 = var3.Traits.Unlucky.isSet();
      }

      for(int var10 = 0; (float)var10 < var0.rolls; ++var10) {
         ItemPickerJava.ItemPickerItem[] var11 = var0.Items;

         for(int var12 = 0; var12 < var11.length; ++var12) {
            ItemPickerJava.ItemPickerItem var13 = var11[var12];
            float var14 = var13.chance;
            var9 = var13.itemName;
            if (var7) {
               var14 *= 1.1F;
            }

            if (var8) {
               var14 *= 0.9F;
            }

            float var15 = getLootModifier(var9);
            if (var5) {
               var15 = 1.0F;
               var14 = (float)((double)var14 * 1.4D);
            }

            if ((float)Rand.Next(10000) <= var14 * 100.0F * var15 + var2 * 10.0F) {
               InventoryItem var16 = tryAddItemToContainer(var1, var9, var0);
               if (var16 == null) {
                  return;
               }
white crag
#

god this is something i was looking for

#

but it seems like old cost just moved into java code

#

for perf reason

sour island
#

float var15 = getLootModifier(var9);

white crag
#

if ((float)Rand.Next(10000) <= var14 * 100.0F * var15 + var2 * 10.0F) { this part look familiar

sour island
#

this is the part that is probably messing your test up too

white crag
#

well

#

i rather test the end api

#

because thats the final output comes in

#

and what we get in the game

#

since i just started the modding

#

i can take my time to reduce the pain make it fun with my friends

sour island
#

wait it wasn't the loot modifier variable

#

there's a variable related to zombies

white crag
#

yes

#

zombie intensity

#

afaik

sour island
#

if you're in a zombieless world that also* has an impact on loot

white crag
#

but it's linear and not related with other variables right?

#

still the existence of "loot cap" by itself already ruins the fun for me

#

since reaching 300 is pretty easy

#

in worst case, it could be like 20

sour island
#

just found this: media\lua\client\DebugUIs\ISLootStressTestUI.lua

white crag
#

maybe 5

#

it broke for me

sour island
#
      if (var0 != null && var1 != null) {
         float var5 = 0.0F;
         IsoMetaChunk var6 = null;
         if (player != null && IsoWorld.instance != null) {
            var6 = IsoWorld.instance.getMetaChunk((int)player.getX() / 10, (int)player.getY() / 10);
         }

         if (var6 != null) {
            var5 = var6.getLootZombieIntensity();
         }

         if (var5 > zombieDensityCap) {
            var5 = zombieDensityCap;
         }

         if (var0.ignoreZombieDensity) {
            var5 = 0.0F;
         }
#

var5 is what get's pushed through to the final roll chance

white crag
#

what i can tell you is this is not the loot table HAHA

sour island
#

in if ((float)Rand.Next(10000) <= var14 * 100.0F * var15 + var2 * 10.0F) { the var5 from above is var2

white crag
#
local alt = false;
local itemname = nil;
for m = 1, containerDist.rolls do
    for i, k in ipairs(containerDist.items) do
        if not alt then -- first we take the name of the item
            itemname = k;
        else -- next step is the random spawn part
            local lootModifier = ItemPicker.getLootModifier(itemname) or 0.6;
            if ZombRand(10000) <= ((((k*100) * lootModifier) + (zombieDensity * 10))) then
                -- make an item in the container of that type
                local item = ItemPicker.tryAddItemToContainer(bag:getItemContainer(), itemname);
                if not item then return end
                if instanceof(item, "Key") then
                    item:takeKeyId();
                    item:setName("Key " .. item:getKeyId());
                end
                item:setAutoAge();
            end
        end
        alt = not alt;
    end
end
sour island
#

ah it's probably linked to the old table then?

white crag
#

it does seems pretty same

#

with minor adjustment (which i can't see)

#

still

#

tbh this is frustrating

#

i guess this affects other mod experiences too

#

also idk if this is related or not

#

im not getting any loots from military crates

#

i can fix that but still

sour island
#

do you have a test with unlucky included?

white crag
#

no not yet

sour island
#

I'd be curious

white crag
#

im still trying to code automated test

#

so i can sip a tea while its running in black background

#

because it freezes for like 3 hours

#

300-1000 runs/sec

#

if the table is heavy

#

it goes down to like 30-100

sour island
#

you only need like 10k tests at most though?

white crag
#

i only value the test at least millions of samples

sour island
#

to each their own

white crag
#

at least i can showcase how lucky can you be for each 100 run segments

#

considering there is not much of docs i kinda like the output

sour island
#

I feel like this is right up @grave solstice 's alley

white crag
#

at least i can see

#

what is the most painful to find

#

and adjust the rate

#

well considering the sledge is 0.01

sour island
#

that's designed to be rare for gameplay design I guess

white crag
#

i value the intention

#

but my borderline is sledge

#

i haven't found any sledge for 4 runs

#

if anything goes rare than that

#

its gotta be a nuke

sour island
#

unless there's a fixed minimum you may never find one

white crag
#

or ICBM launch code

stiff urchin
#

How do I make a recipe require an item be equipped when using it? Like the welders mask when doing metalworking recipes?

sour island
#

personally I'd nerf sheet ropes and give players the grueling ability to destroy with basic tools

white crag
#

the pain of wall frame

sour island
#

+try to eliminate floating bases

white crag
#

the sole reason of journey to sledge was to remove ugly frames

#

and got bitten

#

and a month of run is gone lmao

sour island
#

happens

white crag
#

so thats why im obessed with chance

#

ikr

sour island
#

well crafting is supposed to be looked at

#

hopefully and eventually construction gets looked at

white crag
#

but i don't think aiming for 0.23% god run is fun unless I have at least 8 hours to play daily

sour island
#

like like to see varied base building mechanics and destruction

white crag
#

my urge to make build menu

#

ugh

#

i want build menu like crafting menu

#

click to build

sour island
#

i.e. building with bricks is alot more work but is sturdier - but throwing up drywall helps mood or something

white crag
#

search functions

#

why not press key, type "wall"

#

and click

#

if we have some sort of render target texture

#

player can design their own shirts

#

ofc its going to be limited to player clothings i think

upbeat spindle
#

I'm quite confused as to what is the tileset "TileWalls" that I see used in another mod that uses base-game tiles.

#

Going through the guidance given earlier on this channel, I can discern no tileset called TileWalls using TileZed's "Tile Properties" -tool.

#

I'm looking at newtiledefinitions.tiles which resides in the modding tools' Tiles -folder, and this is what I see that are wall-related:

#

Should I be looking at some other .tiles -file than the one found in the modding tools' folders?

#

Apparently TileWalls is found in ProjectZomboid\media\tiledefinitions.tiles, but this tileset is all red questionmarks.

drifting ore
#

is it allowed to overwrite exiting mods and exclude from update?

upbeat spindle
#

So the mod I'm looking at is outdated, and I should use the newtiledefinitions.tiles' definitions, is this correct?

stiff urchin
#

How do I make a recipe require an item be equipped when using it? Like the welders mask when doing metalworking recipes?

drifting ore
hardy garnet
#

anyone got some good mod recommendations?

#

should dm me them ^

stiff urchin
timid plume
#

Hello everyoine

#

I want to make a mod that will spawn itens on a distant cell

#

the cell itself are not loaded then I cannot spawn far

#

Someone know a way to load a remote cell or a event to check when a cell is loaded?

drifting ore
timid plume
#

Ohh good, I will look for it
Then I can easy put the event x and y on variable and check if the player loaded the chunk! Thanks!

#

I will test later and tell here if it worked

hidden estuary
#

gosh I've been losing my mind on this, does anybody know the file or directory where the trait Smoker comes from?

#

I've been trying to locate it to see how it was made and I just can't figure out where it is

rustic raptor
#

Hello everyone, Ive been working on a car parts mod this week and have been stuck for 3 solid days trying to fix the code on installing a new type of battery, The install menu does not appear, I uploaded the mod on github maybe someone can help me out on this, I would much appreciate it! Link to the mod https://github.com/darkstorm2150/Carcraft

GitHub

Carcraft Mod for Project Zomboid. Contribute to darkstorm2150/Carcraft development by creating an account on GitHub.

stiff urchin
hidden estuary
#

yes

#

unless its compiled into a .class, I can't find it

bleak grotto
#

Hello everyone

First of all, I don't know English very well. I'm sorry for that. I want to know about a mod. I will use it on my server but I don't quite understand how it works. Can anyone help with this

stiff urchin
#

@bleak grotto Hello! Maybe try asking in #mod_support and make sure to mention what mod and what problems you have!

tulip grove
#

aye bois i have a question
what mods are good?
i mean like, do you guys have any recommendations for mods?

junior flame
#

@hidden estuary Not sure if this is of any use, but I found this while I was looking around for something else:

zombie/characters/BodyDamage/BodyDamage.java
            if (this.getParentChar().Traits.Smoker.isSet()) {
               this.getParentChar().setTimeSinceLastSmoke(this.getParentChar().getTimeSinceLastSmoke() + 1.0E-4F * GameTime.instance.getMultiplier());
               if (this.getParentChar().getTimeSinceLastSmoke() > 1.0F) {
                  double var3 = Math.floor((double)(this.getParentChar().getTimeSinceLastSmoke() / 10.0F)) + 1.0D;
                  if (var3 > 10.0D) {
                     var3 = 10.0D;
                  }

                  this.getParentChar().getStats().setStressFromCigarettes((float)((double)this.getParentChar().getStats().getStressFromCigarettes() + ZomboidGlobals.StressFromBiteOrScratch / 8.0D * var3 * (double)GameTime.instance.getMultiplier()));
               }
            }
hidden estuary
#

oh my GOD why is it on body damage, this is pretty much it

junior flame
#

traits be fucked

hidden estuary
#

thank you

tawny coral
#

Anyone have a nice list of mods to be used in multiplayer that extends the vanilla gameplay experience but doesnt add any game breaking items or features? I have found the Filibuster's Used Cars (great but does add some slight game changing vehicles) and Expanded Vanilla Firearms (Good balance so far, havent found all new weapons though). become Desensitized (Because it just makes sense after bashing 1000 skulls), and some model update mods, but looking for more.

#

Trying to preserve the difficulty and risk of the game, but add variety and content basically. :)

stiff urchin
#

Only way to do that would be to manually sort and sift. Game breaking is pretty ambiguous and means a lot to different people.

atomic stream
#

Hi, I wanted to ask something I couldn't figure out.

I've created my own mod, which works as intended without any errors.

There's another mod called ScrapWeapons which works without any errors.

When my mod and ScrapWeapons are loaded together, ONLY IN DEBUG MODE, I get an error on ScrapWeapons distribution lua file. The error line is this;

table.insert(SuburbsDiistributions["all"]["postbox"].items, etc...

And Stack Trace says;

attempted index: items of non-table: null

Meaning that the table does not exist.

Another note here is; my mod does not even touch any postboxes.

So the questions here are;

  1. Why does this error happen when I load both these mods at the same time?
  2. Why do I get an unrelated error? Meaning that, my mod cannot have any incompatibility with that mod's postbox distribution.

Thanks in advance for any help

tawny coral
#

@stiff urchin not really ambiguous at all, its pretty much just preserving vanilla balance and difficulty. EX: A weapon added one shots 3 zombies every swing, that would be a game breaking item, or an invulnerable vehicle that blows through zombies unimpeded, these would be things that are somewhat breaking.

#

Good EX: Expanding firearm models, that use the same ammo types and deal similar damage, that would be expansion based on vanilla principals. Adding char creation items that serve no combat purpose, or adding more types of baseball bats for diversity. These are the kind of things I am looking for really.

tacit ermine
#

I think the loader for mod scripts might overwrite rather than merge scripts with the same name

tawny coral
#

Being said, I am also thinking about making a mod (with expensive recipes) that allows us to modify vehicles (late game skill levels) into Mad - Max style rides. But its been 10 years since I really got into and wrote any mods, Seems like a fun project for the game.

stiff urchin
#

I mean...in a sandbox game like this with varied playstyles between multiple people "game breaking" can mean a lot of different things. Obviously, something that 100x the rate of sledges or something would be op, but in general, it really depends on the type of experience youre looking for as well as alternative sandbox options.

hollow shadow
tawny coral
#

Yeah, I do understand what you mean completely. I hope you understand what I meant as well about preservation. Either way, I need to resume my hunt for mods of just the right caliber then to bring into my live servers

stiff urchin
#

Defnitely! Exactly what I meant by different definitions of it, we have two opinions...and thats ok! 😛

frosty stirrup
#

Hi guys, I have a strange problem with foraging of some modded items.

Instead of saying "2 Small Salt Rocks", the popup above the head gives me "<full texture path> 2 small salt rocks". Could it be that it somehow fails to find an icon for a small texture, and why, if the ingame item shows the icon?

winter bolt
#

does it happen if your mod isnt enabled?

tawny coral
#

What are peoples experiences with the player added cities? Quality mods or do they cause issues? Seems like a lot of objects that might go wrong.

low yarrow
#

Does anyone know what the Neckprotection modifier does at clothing items?

#

(Long Leather jacket)

winter bolt
hollow shadow
winter bolt
low yarrow
#

With 0,5 modifier:

winter bolt
#

if you have 20 scratch protection with 0.5 neck modifier then the neck will have 10 scratch while the rest of it has 20

low yarrow
#

Without modifier:

#

Ah i get it now. Thank you spongie

#

Its just a way to threat it seperatly

winter bolt
#

yeah its because most clothing items cover some of the neck but not all of it

low yarrow
#

yeap

hollow shadow
#

ah thats cool

stiff urchin
#

Is there a way in a function to have a character equip an item theyre using for a recipe? I have a recipe that uses a welders mask but would like to have it so the character equips it when using the recipe.

drowsy needle
#

Question: Is there a tag or something that determines if a container can be used to boil water?

#

And second, how do I change this tag for already-existing items?

atomic stream
atomic stream
winter bolt
#

oh weird

atomic stream
#

and vice versa, if my mod is enabled and ScrapWeapons is not no error

crimson fjord
#

does anyone using britas weapon mod pack know how to find a silencer or can i craft one? i've searched so many gun places. police station in muldrough, gun store in west point, i have loot respawn on and checked them multiple times and i never get a silencer

weary matrix
#

any clue how to load mods on server without going through steam workshop?

#

does it work if I just put them in Zomboid/mods?

tacit ermine
#

in ~/Zomboid/mods, yeah

weary matrix
tacit ermine
#

if you're running the server in steam mode (not via steam, but as a steam dedicated server) you can also put them in the mods folder of the zomboid server installation

#

yeah, Linux is what I do work on

weary matrix
#

I do feel less lonely hehe

atomic stream
#

and ofc a custom texture

#

I kind of think this is not related to my mod, since the errors can happen with some other mods under the same circumstances. But why does this happen with my mod and the others enabled at the same time?

weary matrix
#

some mod conflict maybe?

tacit ermine
#

table.insert(Distributions, 1, distributionTable);

#

your mod is overriding the built-in distributions

weary matrix
#

hah

tacit ermine
#

change that to table.insert(Distributions, distributionTable)

#

think that's probably it

weary matrix
#

definitely

atomic stream
#

hmm

#

somebody mentioned here before the ' " ' was not necessary

tacit ermine
#

they'll still get merged correctly, but some mods might assume the defaults are in Distributions[1]

willow estuary
#

I'm personally not a fan of that distribution insert method.

atomic stream
willow estuary
atomic stream
#

but why can this be happening when my mod is enabled with them?

willow estuary
#

It shouldn't work AFAIK, I think there's funky extra code to make it work?

atomic stream
#

😄

tacit ermine
#

what's the mod?

atomic stream
#

mine is linked just up above

tacit ermine
#

the one by djvirus?

atomic stream
#

es

#

yes

atomic stream
#

but the table names are so messed up tbh

tacit ermine
#

it seems to ship two folders with it

#

is it (New version)?

atomic stream
#

i use only use new version and it produced these errors yes

#

it should also require the workshop new version

willow estuary
#

I dunno, I guess my simple answer as to why I don;t like that insert method is that I worry that that distro insert method has potential to mess up things unintentionally that the method that I like to use doesn't?
Again, I don't understand it so I don;t like it 😄

#

I know the method I like works without issue if it's done properly so I stick to it?

tacit ermine
#

so Scrap Weapons directly modifies the vanilla distribution table

tacit ermine
#

and your mod changes the vanilla distribution table to something else

atomic stream
#

can you explain what i did 😄

#

i have two mehods of distributing

#

methods*

#

one is insert into procedural tables

#

the other hardcode into vanilla tables

tacit ermine
#

two things

#
table.insert(Distributions, 1, distributionTable);
#

Distributions is a table of distribution tables

willow estuary
# atomic stream what s your method ? 😄

Okay, so this was written in a deliberately grouchy over the top comedic voice, because at the time there was a lot of confusion and problems with bad distributions stuff? But it details the "simplest" IMO way to insert items into distro tables with minimal potential to cause problems, again, IMO?
#mod_development message

tacit ermine
#

the vanilla table is found at Distributions[1]

#

your table.insert(...) puts your table at Distributions[1] and shifts vanilla to Distributions[2]

#

and then you do this:

--for mod compat:
SuburbsDistributions = distributionTable;
#

which points the global SuburbsDistributions to your smaller distribution table

#

which only contains swiss army knives

atomic stream
#

I got it, so how should i distribute my items then if i may ask?

willow estuary
atomic stream
#

lemme check 😮

tacit ermine
#

that approach looks good to me and is what Scrap Weapons does

#

the only caveat to be aware of is if you need to modify the distribution for a container of another mod

#

you obviously need to make sure that mod is loaded first, or use the OnDistributionsMerged event

cinder widget
#

Anyone Successfully Migrate map chunks from one server to another. I have pulled my base over but all of my containers do not have my loot in it.

willow estuary
#

What I do for other mod containers is check to see if the table exists, and then if the other mod tables exists, then I insert into it. Needs some extra care to ensure it works properly with file names, load order, etc,

tacit ermine
#

yeah that'll work as long as the other mod does the same, don't want them just overwriting the changes you put in

#

using the table.insert(Distributions, table) approach is what handles merging it automatically

#

it just recursively merges everything in Distributions to a single table

atomic stream
willow estuary
#

Yeah, TBH I'm pretty dumb so I always prefer directly modifying tables over using a middle-function to handle it? 😄
Easier for my pea brain to wrap around.

atomic stream
#

I got the lua file you've provided @willow estuary and thanks for that

tacit ermine
#

anyway to fix your existing Lua file

#

just change this

table.insert(Distributions, 1, distributionTable);

--for mod compat:
SuburbsDistributions = distributionTable;
#

to this

#
table.insert(Distributions, distributionTable);
atomic stream
#

btw @tacit ermine i did add this from a tutorial on youtube

--for mod compat:
SuburbsDistributions = distributionTable;

I thought it was a must

#

alrighty

#

this okay 😄

#

and do you guys know what the list name beforehand means?

#

such as;
ProceduralDistributions["list"]["BedroomDresser"]

#

list before bedroomdresser

tacit ermine
#

it just means its a list

#

it contains all the entries

willow estuary
#

It's just part of the table structure for the PreoceduralDistributions table?
Not sure if it serves any purpose, might just be an organizational conceit?

atomic stream
#

for instance Blair's lua calls them [all][bla bla]

willow estuary
#

Tables are really flexible, so sometimes people do extra funky stuff with the wiggle room?

atomic stream
#

there isn't any documentation so thaat's why im a bit lost

#

hmm

willow estuary
#

Yeah, I'm actually switchign away from using the bracket formatting with my distro stuff myself 😄

atomic stream
#

and some dont even have a 2D list

willow estuary
#

It's hard on my eyes!

atomic stream
#

😄

#

anyways I'll mess with them when I have some time and get some understanding then

#

thank you guys both @tacit ermine @willow estuary

weary matrix
#

also having a more convincing topic would be nice I guess 😅

#

it looks like the person who set the topic wasn't really sure

stiff urchin
#

Yeah, moving it to the top for support of mods. Also it may not be very clear for many on what each channel is for, especially non native english speakers. Maybe changing modding to modding-dev, modeling-dev, mapping-dev? Or just a change in name to be more clear what each channels purpose is.

drifting ore
#

I like the dev idea, it's clearer

tacit ermine
#

yeah I think -dev is good

weary matrix
#

agreed

tacit ermine
#

#mod_development makes it look like the logical place you'd go to discuss mod lists, requests, ideas, etc. and a lot of people mistake it for that

weary matrix
#

totally

#

it sounds like the go to place about mods if you don't know where to ask your question

tacit ermine
#

I guess pz_chat is the only other place for "general mod discussion" that doesn't fall within dev/support

drifting ore
#

Maybe add a mod discussion channel too, for the mod lists, ideas, ect.

winter bolt
#

yeah it should probably be renamed to "mod-development" or something like that

weary matrix
#

@winter bolt add some thumbs up then 😛

winter bolt
#

oh i didnt see those messages lol

weary matrix
#

thx 🙂

#

@tacit ermine about my earlier question with non-workshop mods, can it be done for the dedicated server too? or just when hosting a game with "Host" menu

#

not sure how to enable mod on dedicated server unless you have a workshop ID

tacit ermine
#

oh

#

hm

#

I think the workshop ID is just so it can download them from Steam (and tell users which to download), maybe you can just put the mod name in server.ini's Mods option

weary matrix
#

hmm that doesn't sound right, I usually only put the workshop ID in servertest.ini, unless the same workshop id has multiple mods

raven stump
#

you cant if you dont know the workshop id

weary matrix
raven stump
#

if you dont have the workshop id and the mod name it just doesnt do anything

#

yea

#

there are ways to get the workshop id i think but if they dont tell you the modname you're probs screwed

weary matrix
#

well I know for sure you don't need the mod name, unless for the case I mentioned just before

raven stump
#

you might be able to fiddle in the steam workshop files and find it manually

#

on your c drive

weary matrix
tacit ermine
#

what I said is correct, it'll try to load mods you specify in the Mods= server option

raven stump
#

I've tried to do just one or the other to save on time and its never worked for me

weary matrix
raven stump
#

give it a shot then it wont hurt

weary matrix
#

except in my case it's a custom mod not on the workshop

#

sure

raven stump
#

big if but if you really want the mod you could download something like filezilla and dump the mod into the server directly and see if it works
not sure if this works for zomboid

junior flame
weary matrix
#

I know the microwave, stove etc are there at least

#

ok so just the mod ID (the id from mod.info) in Mods= doesn't seem to load the mod :/

raven stump
#

any way you can upload it to the workshop?

weary matrix
#

well of course I could but I would like to be able to test a mod before uploading 😂

raven stump
#

just set it to private :)

weary matrix
#

it feels like "put your stuff on production and see if it works", so wrong

#

I wish there was another way

raven stump
#

last time i checked i thought you could set workshop items to "unlisted"

tacit ermine
#

publishing to Steam every time you change a line of code is a terrible workflow

raven stump
#

might be misremembering completely

#

its all i got

tacit ermine
#

can you check what's happening in ChooseGameInfo.getModDetails(...)?

#

I'm reading GameServer#doMinimumInit and it definitely should be attempting to load your mod

weary matrix
#

will check

#

I guess the good question would be is Hosting == Dedicated

#

in which case no need to use Dedicated

tacit ermine
#

you mean via the main menu??

weary matrix
#

yes

tacit ermine
#

can't actually tell what the host button does

#

does it create a new JVM?

dreamy linden
#

so, is modding in PZ done with lua or java ?

#

i am confused

weary matrix
weary matrix
dreamy linden
#

ah

#

what IDE is recommended ?

weary matrix
#

I don't use an IDE myself

tacit ermine
#

you won't really find much in terms of an IDE for Lua

weary matrix
#

guess IntelliJ has some form of integration though

dreamy linden
#

been using visual studio code personally

tacit ermine
#

any editor will do, IntelliJ might give you some context sensitive tips

dreamy linden
#

that is for other games tho

tacit ermine
#

what is?

dreamy linden
#

huh?

tacit ermine
#

oh, you're using vs code for other games

dreamy linden
#

ye

tacit ermine
#

no reason you can't use vscode to edit zomboid Lua

dreamy linden
#

LUA mods

tacit ermine
#

pretty much all you're going to get is syntax highlighting and semi-smart completion on Lua standard library functions and some simple user defined types

weary matrix
dreamy linden
#

so lua would be simpler to use ?

tacit ermine
#

yeah

#

Java modding is a bit experimental and it's not quite as terse or loose as Lua

dreamy linden
#

i guess you can do more with it ?

#

im only planning on making a simple mod to start with

tacit ermine
#

the game being written in Java means you can do extend it with anything within your technical capabilities, yeah

weary matrix
tacit ermine
#

Lua modding is restricted to "official" extension points

weary matrix
dreamy linden
#

i see. the thing i am planning on making is just to play a sound when a key is pressed. should not be too hard to make

weary matrix
#

definitely go with Lua then 😅

mental fulcrum
#

Is there a rapid way of testing a mod you’re writing?

#

Like if I want to change variable increments and immediately test

tacit ermine
#

you can reload lua from the in-game lua console

mental fulcrum
#

Or is there a whole deployment install process

#

Nice!

tacit ermine
#

depending on what your mod does that might not speed it up significantly (i.e. you have events when the player is first created), but it's something

weary matrix
#

but it's using the same config etc

tacit ermine
#

I'm not sure what it's doing then, the GameServer startup process is signifcantly different from what MainScreenState does

weary matrix
#

like if I add mod with Host menu, I can see them in my server config

tacit ermine
#

and it just puts it in the Mods option with the mod name, it doesn't try to update WorkshopItems?

mental fulcrum
#

Sorry for the off topic question- just joined 5 minutes ago. Is there a text channel for discussing dedicated server hosting?

tacit ermine
weary matrix
#

I guess it does yes

tacit ermine
mental fulcrum
#

Yeah I’m looking and that seems to be the winner. Thank you!

naive spruce
#

hey guys, I'm working on this simple mod that adds a new spawn region with spawn points based on the character's profession. It works just fine on single player but not on our private server since spawn regions are defined in servertest_spawnregions.lua which is usually located outside the game folder, inside C:\Users\YourUsername\Zomboid\Server. I wonder if there's a way to get it to work without having users manually edit the server lua files to add the spawn points

weary matrix
#

hmm so I have these lines of code in my mod:

    print("DEBUG1: " .. tostring(player))
    print("DEBUG2: " .. tostring(player:getModData()))
    print("DEBUG3: " .. tostring(player:getModData().getOrCreate))
    local modData = player:getModData():getOrCreate(TheReturned.id)
``` but I get a crash because getOrCreate does not exist, but when I look at the code ModData have such a method so I'm not sure what I'm doing wrong. Any clue?
tacit ermine
tacit ermine
weary matrix
#

but why is there a ModData class then? 😅

tacit ermine
#

it's for world global ModData that isn't associated to any one entity

weary matrix
#

wondering why there's not using the same ModData class everywhere

tacit ermine
#

ModData isn't actually ever created, it just holds a bunch of static methods (that call into a singleton GlobalModData)

drifting ore
#

someone have the github with all the events ?

tacit ermine
drifting ore
#

Nice, thx

tacit ermine
#

newer things seem to be done with the GlobalObjectSystem

naive spruce
#

@tacit ermine cool, I have looked into it and from what I see I would have to do something like Events.OnSpawnRegionsLoaded.Add(spawnTable). I wonder how I should go about actually adding it to the mod, would a new file in scripts dir with the event call suffice? (first mod I'm making for PZ so i'm not sure)

stiff urchin
#

I am using RequiresEquippedBothHands = TRUE, to try and make an item be required to be equipped in both hands to be carried like a generator, I don't receive any errors but the item is still able to be picked up without being equipped. Is this old or is there a new replacement?

tacit ermine
tacit ermine
#
Events.OnSpawnRegionsLoaded.Add(function (spawnRegions)
    table.insert(spawnRegions, { name = "My Spawn Regions", file="..." })
end)
drifting ore
weary matrix
#

oh I see

abstract raptor
#

anybody know how the um

#

fog works

#

is it like rendered

#

or like

#

I tried editing this pack file called weatherfx

#

to change the hue of the fog but it didn't do anything

naive spruce
#

@tacit ermine got it, will give it a go

#

thanks for the tips

tacit ermine
#

what do you mean by "is it rendered"

#

it's done in a screen space pass with a fragment shader you can edit in media/shaders/fog.frag

abstract raptor
#

oh neat

#

ok cuz

#

I had a mod that changed the fog to different colors

#

I need it for my RP server next month

#

I just need to find a way to color it red

tacit ermine
#

look at the various fog colour fields on ClimateManager

abstract raptor
#

I had a mod that did that but the Color_New_Fog stuff doesn't work on MP

tacit ermine
#

try calling transmitClientChangeAdminVars() on ClimateManager after changing it

#

oh nvm, that doesn't work from the server

atomic stream
#

does anyone know where the hair cutting item requirements are stored in? I checked almost all files and couldn't find it

rustic raptor
drifting ore
atomic stream
#

ahh but where does this exist? And I didn't see a scissor tag on scissors item definition in items_weapons.txt

plucky pollen
#

ok hoping someone can help here...

I made a copy of the journal in game.. new name.. i am using ItemZed dont know how else to make a new item

Is there away i can make it so it has text on the pages by default?

drifting ore
atomic stream
tacit ermine
#

"type" there is just the name in the script

drifting ore
#

Wait no, player:getInventory():containsTypeRecurse("Scissors") check if you have an item scissors

tacit ermine
#

i.e., matches module Base { item Scissors { ... } }

drifting ore
#

yeah that's it, so you can't add an object that cut hair without redoing the whole function

atomic stream
#

😄

#

nice edit 😄

#

i guess it checks the name rather than tag

#

so either I'll have to define a new cut hair function or idk :S

tacit ermine
#

it just checks if it contains "Scissors"

#

just define your item as item Scissors But Not Actually { ... }

atomic stream
#

the item

#

hmm

#

i got that

#

thx

drifting ore
#

It will not create a problem in the game if two items have the same name?

tacit ermine
#

they don't have the same name, one is called "Scissors But Not Actually"

#

the haircut code only cares if it contains "Scissors", not if it's an exact match

#

though, if you have both scissors and your item it might use the scissors instead

drifting ore
#

Oooooooo, that rly interesting ! That, that will help me

tacit ermine
#

sometimes it's not just contains but startsWith, so good practice to make "Scissors" the first part of the name if you're doing things like that

#

oh actually, that might be wrong for this specific case, ItemContainer might be the one place it does search for an exact match

stiff urchin
#

I am using
RequiresEquippedBothHands = TRUE,
to try and make an item be required to be equipped in both hands to be carried like a generator, I don't receive any errors but the item is still able to be picked up without being equipped. Is this old or is there a new replacement?

magic trench
#

system is kinda already there

tacit ermine
atomic stream
tacit ermine
#
    if generator then
        if not playerObj:isHandItem(generator) then
            context:addOption(getText("ContextMenu_GeneratorTake"), playerObj, ISInventoryPaneContextMenu.equipHeavyItem, generator);
        end
    elseif corpse then
        if not playerObj:isHandItem(corpse) then
            context:addOption(getText("ContextMenu_Grab_Corpse"), playerObj, ISInventoryPaneContextMenu.equipHeavyItem, corpse);
        end
    elseif
#

the equipHeavyItem callback seems to be what handles those

errant meteor
#

@pearl prism I use speed demon for all my play throughs and let me tell you that APC gose super fast, I hope this is not intended lol, breaks the immersion of being a heavy beast

stiff urchin
plucky pollen
#

anyone use itemzed?

thorny portal
#

Hey, new to modding PZ, hoping someone might have some good information I can look for on where to get started with the scripting side of things. I understand it's mainly Lua based, but don't know where I can find objects, events, etc.

craggy furnace
#

camel by camel

drifting ore
# thorny portal Hey, new to modding PZ, hoping someone might have some good information I can lo...
Project Zomboid Unofficial Wiki
GitHub

A wiki for the game Project Zomboid. Contribute to quarantin/pzwiki development by creating an account on GitHub.

thorny portal
#

Thanks, I'll read through this stuff and see what questions come next 🙂 thanks.

drifting ore
#

Welcome, there is other stuff but it's what I use

mint sphinx
mint sphinx
rigid dock
#

@abstract raptor Any luck with the magenta zombie blood mod?:P

abstract raptor
#

Oh yeah its done

#

I just haven't released it yet

rigid dock
tough surge
#

anyone have a recommendation for a good storage (bigger crates, etc) mod?

lapis stump
#

using getEmitter():playSound() and the audio is choppy do I need specific encoding or something ?

lapis stump
#

yes it works fine if I play on a grid square but on players its choppy and other issues

#

playing on a grid square would be fine if the radius wasn't like 10 tiles

brittle jewel
#

Hmm, I know the audio is weird when it's attached to a player. It seems like it flips between left/right channels randomly. You could try adding 'is3d = false' to your sound, but I think that breaks the sound falloff. (Where it gets quieter the further away you are.)
#mod_development message

ionic galleon
#

hello i'm having an issue with uploading my mod

#

even so everything is up to spec

#

i checked for hidden files

#

i can't even upload the mod template

#

my mod is multiple submods, does that require anything?

knotty sandal
#

Is it possible to create a new type of zombie definition and specify where it spawns?

#

For example, I assume the game has a definition for police zombies and they have regions in the game where they are most likely to spawn

knotty sandal
ionic galleon
#

how are people able to upload with this format?

#

like i see many doing them

tidal temple
#

figured i should ask here, if i have mods installed locally, can i join other servers that dont have mods?

weary matrix
#

@ionic galleon just put more than one mod in your Workshop/YourMod/Content/mods/

valid terrace
#

Mod suggestion: TV Guide that incorporates all modded TV channels. In the 90s my Grandmother got the TV guide. So Mailboxes should have a pretty decent shot of having a TV guide.

ionic galleon
#

I have used every method i know to find the file it's complaining about

weary matrix
#

what does your file tree looks like?

ionic galleon
#

like i've tried new folders, spaming ls -a, used root

weary matrix
#

hmm maybe try to upload just one, and add the other after?

ionic galleon
#

same story

#

i can't even upload the template

#

like even if i just copy the template folder I can't upload anything

#

it's driving me insane

past mortar
#

are there any mods that make playing cards and playing dice more than just junk items?

errant bluff
#

Is it possible to eliminate the vanilla professions and create customized ones in which there is no possibility of having trait points and also, that depending on the profession you appear with one equipment or another?

knotty sandal
#

And I believe soulfilcher has a mod that lets you play with junk items like toys and playing cards to reduce boredom

#

Playing Time or something

past mortar
lapis stump
#

how do I change climate colors in mp?

ashen pivot
#

My goal is to have a mod that turns off the vehicle when you get out. I've found the onExitVehicle event and alternatively a custom keybind that wraps around the interact key. However I can't find any information on what commands I can run, how to get status, etc. It feels like part of the docs is missing

#

How do I find the list of available commands like 'player.exitVehicle()' or whatever it is

calm depot
#

I use a command-line and grep

craggy isle
#

Hi, does anyone know which mod or how to make a mod that makes vehicles claimable? I saw a few servers do it B40 and I want to know if its possible in B41 and how to do it if yes

hardy garnet
#

is there

#

jump cables?

shy hearth
#

Is OnNewGame supposed to run when the player respawns post-death as a new character in a single player game? Seems contrary to the docs but maybe I'm misunderstanding

plucky pollen
#

anyone able to help me make a custom journal with pre-assigned text for ppl to read? I have Itemzed but dont know how to add text to it etc

onyx bane
#

Any suggestions for mods to prevent other players on a server from using your stuff? We're one faction but want an ability to have "our" stuff.

drifting ore
plucky pollen
drifting ore
small topaz
#

hello! does anyone knows how and where the game handles the choice between a male texture with or without chest hair? all I know so far is that the ui for that option is controlled by some lua files in media/lua/client/OptionScreens and I am also able to manipulate it and show the chest hair option also for women. but how does the game in case of men knows which texture to use? where is this controlled?

plucky pollen
drifting ore
#

In the script part, you have how to make an item

plucky pollen
drifting ore
#

I advise you to try to make a notepad with some text already in it. I know it was a feature a long time ago, I don't know if it's still there

plucky pollen
#

ok will do ty ^.^

drifting ore
#

No idea, never made a map but the best way to test an item is to start the game in debug and use the item list to give you the item

plucky pollen
rigid dock
#

Would it be hard to make a mod that makes 10% of zombies sprinters?

rigid dock
#

Ooh, ty

#

It says it's updated. I'm pretty sure. It will be for solo also

#

It will be for solo. Also Is default shambler or fast shambler? In apocalypse

small topaz
dreamy chasm
#

Hoping someone here has heard of a certain mod or familiar with a mod that I saw linked in a video a while back, but I can't find the mod anymore. It's a mod that allows you to pick up backpacks that are over-encumbered.

random glen
#

Hey there, is the Paw Low Loot (41.50) mod compatible with build 41.65? / Is there a patch that makes it compatible?

snow jolt
#

Does anyone know if there’s a mod that would add like a cosmetic slot to my character. Basically like if I want to wear a dress but I’d like to keep the protections of everything else opt into only showing the dress?

elfin hornet
#

Is there a mod that does the equivalent of 7 Days to Die blood moon by chance?

#

I feel like there should be

cunning canyon
#

Has anyone seen the emergency broadcast system play when connected to a multiplayer game?

#

I'm sitting around on the hour mark, tuned in, and I don't hear it

#

just <szzt> <bzzt> etc

#

(i realize the irony of me asking if this is broken in multiplayer since my mod is supposed to break it, but my server is vanilla right now)

flint bolt
#

local name = scriptItem:getDisplayName() if name == getText("DisplayName_NameOfItem")

This throws me the missing translation error. getText("DisplayName_NameOfItem") returns "DisplayName_NameOfItem" instead of the name set inside the translate files. The translate is working properly in all other places, like the name of the item itself, I've tested it using other languages. But it seems this line of code is being called before the translate files are loaded. Is there another way to verify if the item is the one I'm looking for? Or if there is a way to require for the translate files?

undone crag
lapis stump
#

are there any guides for creating UI with lua?

naive spruce
#

is there any extra steps I have to take in order to require files in lua mods? I'm trying a simple require of /media/maps/<customSpawnRegion>/scriptB.lua from /media/maps/<customSpawnRegion>/scriptA.lua and the require keeps failing Got it 😬

tight rampart
#

ive been playing around with alot of map mods/other mods in my own private server to just see which ones are working and not and it seem that some of them just arent showing up on the new ingame map and mini map. for example grapeseed, over the river, fort knox, erie county, is there somthing im doing wrong when loading them. I'm pretty new to modding but it seems pretty straight forward.

stoic hinge
#

hello, can anyone help me, when i use the comand /addxp, say no such user?

weak moss
#

Does anyone know where in the files you can find the sprites for items in the non-fucky formats?
Like, just .pngs of items like they are presented in the inventory

junior flame
#

err, thats moveables

weak moss
#

Thanks man 🙂

junior flame
weak moss
#

I'm guessing there's no format with all of them as individual files already

junior flame
#

Someone mentioned earlier they had done so, might be worth searching upwards a bit. I haven't gotten around to it yet

weak moss
#

I'll check, tyty. God I hate discord as a searchable forum

junior flame
#

sign, sealed, delivered

atomic stream
#

does anybody know how this method actually works?

"containsTypeRecurse(String)"

silk fulcrum
#

Is there a synchronized map mod to let faction members see other faction members on the map/minimap

plucky pollen
#

hey every one..

Im trying to add this custom journal into my map..

in my mod folder for custom map i have media folder under that i have maps and scripts.. map works fine.. but the item script i have, isnt showing in the item list as admin to spawn...

    imports {
        Base
    }

item GyazoJournal {
    DisplayCategory = Literature,
    Weight = 01,
    Type = Literature,
    DisplayName = Gyazo Journal,
    Icon = Notebook,
    CanBeWrite = true,
    PageToWrite = 20,
    StaticModel = Newspaper,
    WorldStaticModel = Newspaper_Ground,
  }
}
weary matrix
#

@plucky pollen I'm not sure if items are available by default in the admin item list. You could try to add a handler for OnKeyPressed or something and spawn the item directly in your inventory to see if it works

#

or even directly spawn the item in your inventory from OnCreateCharacter or something

winter bolt
hollow shadow
#

so what does weaponlength do

weak moss
#

How many tiles away a weapon can hit a zombie

white crag
#

gotta love single core lua

#

150 tests per seconds

#

well it will take 6 hours to get lucky, unlucky, normal loot statistic for a million samples each

#

good time to sip a tea

#

it seems like fileio is waaay slow

#

idk if it's an issue or not

#

I hope there is a way to add lua coroutines

#

so i can add asynchronous queue for the writing the file

#

and keep the main thread going for generating the loot

tough stone
drifting ore
#

How can I add a tooltip to an added context options ?

#

btw does anyone here know if there's a way to remove the pixilation of 3d object in game

#

or is it because you need really small model to make them work relative to the character

teal slate
zealous peak
#

howdy

#

I'm trying to do a little tweak on a mod.
That mod is recycle and reuse almost everything. I want to get rid of the recipe to getr screws from lunchboxes.
The fourth line is the one that had the lunchbox items listed there. As u can see, I deleted those, but they still appear in game (new game). Am I perhaps missing some piece of code or do I have to turn off and on the mod for changes to take effect?

dreamy chasm
tough stone
#

Trying to figure out how a backpack becomes over encumbered is the thing... like, one character had the Organized trait and you dont?

dreamy chasm
#

No, modded backpacks.

#

When large weight bags get too many things in them, you can't pick them up until you are able to finally access them and pull the items out. But an issue I have had is that if you die, the backpack is still attached to that body and you can not open it up to transfer items out of it to them pick up that backpack again.

plush magnet
#

This is a post for the Modders, there are already a group of mods ingame that will cure the virus completely which is nice to have but a bit of a cheat. It would be nice to have a mod that can slow zombification down but not cure it completely like zombrex from dead rising. So you have to basically medicate for the rest of your life until the medication runs out or until you succumb to the virus meaning that when you need another dose you will slowly lose a bit more health and you will no longer be able to get your health bar back to max again. Is this something that can be done? If so it would be a great addition to both single player and multiplayer as it creates a new game dynamic, for trading currency or holding people up in desperation

zealous peak
#

In my headcannon, with our characters being immune to the ariborne version of the virus, I believe they should be able to resist it as well.
However, what I love about this game, is that everybody can have it's own playstyle and tweak it to it's preferences, so I second this idea.

tulip valve
#

Anybody know why this dosnt work?

recipe Combine A + B = Gunpowder C
{
GunpowderA,
GunpowderB,

            Result:GunpowderC,
            Time:250.0,
    }

If I have a Gunpowder A and Gunpowder B in my inventory, the recipe dosn't show up at all.

But if I have 2 Gunpowder A or 2 Gunpowder B then the recipe shows up... I have no idea why this happends

drifting ore
stray siren
#

^ special character momento

#

You could call it Combination Gunpowder or something

drifting ore
#

Or combine A plus B to C

tulip valve
#

That sucks, I really like A + B = C lol

#

Oh well

stray siren
#

Mix A and B

#

but ye

#

I'm learning to make Custom Moodles

#

since I want to make a happiness mod smug

#

why only be not unhappy when you can be happy

tulip valve
#

It's strange, because this works:

recipe Combine A + A = Gunpowder AA
{
GunpowderA,
GunpowderA,

            Result:GunpowderAA,
            Time:250.0,
    }

or this:

recipe Combine B + B = Gunpowder BB
{
GunpowderB,
GunpowderB,

            Result:GunpowderBB,
            Time:250.0,
    }

but A + B will not work? So strange

stray siren
#

idk it might have special meaning somewhere else

tulip valve
#

I changed the name to Combine A and B to Gunpowder C and still it dosnt work.

If I have a Gunpowder A and B in inventory the recipe dosnt show up, it only shows up if I have atleast 2 Gunpowders A or B lol

winter bolt
#

maybe the spaces in the recipe names might mess it up?

#

you could try using underscores

#

i doubt its the cause but its the only thing i can think of lol

tulip valve
#

the other Gunpowder recipes also has spaces and they work perfectly, its only the A+B recipe that dosnt wanna work :/

tacit ermine
#

what does the entry in the crafting menu say?

tulip valve
#

hmm I havnt checked that

drifting ore
dark solar
tacit ermine
#

on what MrBounty said, it's possible your recipe never worked and the one you're seeing when you have 2 of each is a different recipe

tulip valve
#

No Gunpowder C exists, and it works to create the item if I have 2 Gunpowder A and a B or 2 Gunpowder B and 1 A, but if I have only 1 Gunpowder A and B recipe dosnt even show up lol

tacit ermine
#

does it show up in the crafting menu?

small topaz
#

hi! does anyone knows what the line "WorldRender = FALSE" means? This can be found in some of the script txt files. for example, all bandages and wounds seem to have this line.

idle oasis
#

Can anyone help. I'm trying to add the WestPointExpansion map installed on my server (Nitrado)
Here is what I've tried in the servertest.ini config
I cannot get the map to load
Mods=WestPointExpansion
Map=west_point_expansion;Muldraugh, KY
WorkshopItems=2195155059
Any help would be appreciated.

tulip valve
#

Atleast it works with Crafting menu

tacit ermine
#

oh huh, that's odd

tulip valve
#

very

tacit ermine
#

seems to only be concerned with sprites, though, not sure if 3d objects are handled differently

soft valley
#

Anyone have a link to the modders discord?

#

i'm making a mod and would like to search the prior conversations in the discord for research

winter bolt
small topaz
#

A related question: If you select bandages or wounds as starting "clothes" in sandbox (unlocking all clothes), they are not shown in your ingame inventory when the game starts although they are technically under the category "clothing". Does anyone knows which part of the lua codes is responsible for this? So which part of the code makes it happen that a selected denim jeans is shown in your inventory while Bandage_Head is not for example?

winter bolt
soft valley
#

all my searching keeps leading me to dead links going to a "modders" discord

#

discord links that have expired

#

so i figured someone in here might be in it currently

winter bolt
#

idk about a discord but these channels have modding stuff regularly

small topaz
tulip valve
#

is there any good way to remove an vanilla item from spawning? All methods I have tried havn't worked at all

winter bolt
small topaz
soft valley
#

spongie have you authored any released mods?

winter bolt
#

yeah

soft valley
#

what ones?

soft valley
#

Oh wow that's really cool

#

i've used both of these, love em

torn locust
#

^ Great mods

winter bolt
#

😳

soft valley
#

both are the reason i decided i wanted to make a clothing mod actually lol

#

so i've been doing research about it, though i intend to make a more weeb-ish one. i want cat ears LUL

winter bolt
#

lmao

#

you can probably use the bunny ears as reference

soft valley
#

probably a good idea

#

any tutorials you'd recommend?

#

and it's been very insightful

winter bolt
#

this is also good

soft valley
#

Oh very cool thank you

winter bolt
#

this also has most of the clothing models so you can open them

drifting ore
#

Can I add a tooltip to an added context options ?

stray siren
#

I am now attempting to use the MoodleAPI in the CommunityAPI git will be fun

small topaz
winter bolt
#

oh weird

onyx anvil
#

Hi! Sorry for the noob question. I can't find any option in game to select parts of specific mods in the server settings like you have for single player. How you do that and what happens in mp if a mod has multiple "versions" or "options"?

tacit ermine
onyx anvil
#

oh crap wrong chat sry

bleak grotto
#

Hello everyone, I want to understand the working logic of a mod. There is a reset area system. Is there anyone who can help with this?

cunning canyon
#

One that i spawned in

teal slate
#

Ah, hm. It triggers at the top of every hour?

cunning canyon
#

correct

teal slate
#

So it should work eventually.

cunning canyon
#

hrmmm

teal slate
#

Oh, it didn't then? Mm.

cunning canyon
#

maybe i need to find one in the world?

teal slate
#

How far in are you? Could be the Louisville obfuscation.

#

Like, days

cunning canyon
#

oh

teal slate
#

Not 100% sure though.

cunning canyon
#

it shouldn't be tho because i don't have any problem in singleplayer in muldrough

#

I'll hunt around the save files and see if i can find what the freq is and see if it's a bug on spawned in walkies

#

thx for confirming you've seen it work tho

teal slate
#

Yeah, big multiplayer server too

upbeat spindle
true merlin
#

I'm not sure if it's a mod or not but how do I add more spawn locations to my server? Right now it's just a random spawn (instead of being able to choose the city like some servers have)

upbeat spindle
#

you should have a spawnpoints.lua -file in your media/maps -folder, i'd guess based on making a custom map once

#

ah, not in media/maps by default but in the separate subfolders (i.e. Muldraugh spawnpoints are in maps/Muldraugh, KY/spawnpoints.lua)

#

If such one exists, then it could be a server setting that enables/disables them?

true merlin
#

Great, yeah I have those files and I can see the map pos's for the spawnpoints but when I die, I want to be able to choose the city

#

I wasn't sure if that was a setting or mod

upbeat spindle
#

It sounds more like a server setting than a mod, but I can be mistaken. Hope you figure it out!

valid terrace
onyx anvil
#

oh so if i add the mods to the server from the steam workshop one then it will use what i select in that menu?

valid terrace
#

The mods menu allows you to choose, lore cars or real cars for phils used cars.

#

The steam workshop tab allows you to load that mod unto the server.

plucky pollen
plucky pollen
stray siren
#

How's this for a happy moodle

weary matrix
#

@plucky pollen well just spawn your item directly from your mod? So you'll see if your item is working or not?

onyx anvil
#

thank you, got it @valid terrace

weary matrix
stray siren
warm kettle
#

Fairly new here, but was wondering what zombie item spawns would be under? (for LUA distribution)

weary matrix
#

zombie loot is generated when they die

warm kettle
#

I'll explain what's going on then; helping a friend of mind add new distributions to loot tables, and he was wondering if it were possibly to say, for example, add a fire extinguisher to a zombie's loot table, or change the clothing/stuck weapon/attached weapon they may come with.

weary matrix
#

I gues syou could easily add whatever loot you want on the corpse using OnZombieDeath() but no clue about the items he's wearing, stuck weapons etc

warm kettle
#

I figured it was worth a shot asking, but thanks! I'll try digging into the discord some more, maybe it has been answered already 🙂

warm kettle
#

I had just found that searching 😄

#

but thank you for sharing it with me 🙂

willow estuary
# warm kettle but thank you for sharing it with me 🙂

There's more! 😉
So this is all from my own stuff, and is sloppy and full of commented out stuff etc.?
But should provide you with a template to do all that stuff?
This would be for general zombie inventories, not outfit specific.

table.insert(SuburbsDistributions.all.inventorymale.items, "CokeBaggie")
table.insert(SuburbsDistributions.all.inventorymale.items, 0.05)

table.insert(SuburbsDistributions.all.inventoryfemale.items, "CokeBaggie")
table.insert(SuburbsDistributions.all.inventoryfemale.items, 0.05)
warm kettle
#

Oh that'll definitely help for sure, I appreciate you sharing!

willow estuary
#

Cool, that second file gets into attaching visible items to zombies by outfit? And also involves some custom body locations and items from my stuff so it's not directly usable FYI 😄

tacit ermine
#

you can also find all the valid attachment locations in AttachedLocations.lua (and can define new attachment points on the NPC model in models_items.txt)

willow estuary
#

"Radio.Flashlight_Military" what the fuck did I fuck up there?!?!?! 😄

weary matrix
#

ah good to know

limber wasp
#

hello, i was trying to make a alert sound mod, but when i test it ingame, it just plays the default one

#

is there a requirement for the sound to be in some format or size?

limber jasper
#

Anyone know if there is a mod that makes zombies blind?

#

Can't look ATM, but I just had a idea for like a bat zombie type of deal. Like that movie with the guy from the office.

flint bolt
soft valley
#

I'm interested in commissioning a couple modders, if you have previous published examples of your work on the workshop feel free to DM me.

errant meteor
plucky pollen
rocky lynx
craggy furnace
weary matrix
rocky lynx
#

Thanks!! 😄 3D models made by Truji! I only make the textures for that models! 😄

weary matrix
#

@plucky pollen could work in the debug console I guess

plucky pollen
#

haha ok ty

rocky lynx
#

A lot of texture work also! 😄

frosty stirrup
#

Greetings, dear modders. Is there a guide on what should go in client/shared and /server folders for LUA?

#

Like, what's the logic behind running the script in a specific folder, I understand that concept-wise some code is executed in the client only, but what's shared, and is there any explanation on how to do it properly, to avoid desync data?

rocky lynx
#

Need to do some things for ammo maker about 3D models (Need to do some cans for cases and lead)

frosty stirrup
#

Snake, are you the guy who made the Rod's store? I loved it.

#

Which mod is it?

uncut jasper
#

where can i put a question around to coding/modding please? i have a problem with script 🙁

frosty stirrup
uncut jasper
#

ok ty 😉

rocky lynx
#

I know Rod's but I not do that mod (Sorry about my language I speak spanish)

frosty stirrup
#

Ah, I saw it in your workshop so I thought it's yours

rocky lynx
#

I'm collaborator (Fixed some things in that mod)

#

Recipe codes and another things

plucky pollen
jagged schooner
#

anyone able to help with possible conflicting mods?

craggy furnace
oak spruce
#

yo, can anyone make a crysis nanosuit mod?

#

I got the model for whoever wants to

craggy furnace
next copper
#

is there an easy way to add extra variants of existing items (for example: more backpack colors)

craggy furnace
#

go into the clothing.xml

#

you have two options

plucky pollen
#

i need a little help.. i made a custom journal item.. not replacing old one but i need to force it to have text when ever its spawned same text.. how can i

craggy furnace
#
  1. you can set texture choices
#

<textureChoices>clothes\bag\totebag</textureChoices>

#

it just needs to path correctly

next copper
#

awesome thanks, ill look at that

craggy furnace
#

the cheapest way to do it is to have a white texture but enabling this <m_AllowRandomTint>true</m_AllowRandomTint> as number 2

next copper
craggy furnace
#

yes, of course

#

you can edit xml's locally and have the change take effect

#

but i would not expect that in MP

next copper
#

ok thanks

plucky pollen
#

can anyone pls help with this? 😛

item GyazoJournal {
    DisplayCategory = Literature,
    Weight = 01,
    Type = Literature,
    DisplayName    = Gyazo Journal,
    Icon = Notebook,
    CanBeWrite = true,
    PageToWrite    = 20,
    StaticModel    = Newspaper,
    WorldStaticModel = Newspaper_Ground,
  }

just want find if possible to add pre-exisiting text to it when its read

abstract raptor
#

Look I added two new object types for my map

azure vapor
#

Hey guys any idea where loot stored in containers is stored on the server? Like which files? I transferred my server to another computer, but the items in the containers are no longer there. Thanks!

long grove
#

which file governs the spawning/despawning of zombies please?

next copper
#

where are vanilla item icons located?

stray siren
#

yee thumbnail

#

It currently crashes the game KEK

lapis stump
#

how do I set things like fog intensity from server transmitClientChangeAdminVars() doesnt work

rich wagon
#

Hello!

I made a simple mod that adds some pieces of furnitures as moveable (barbed wire fence, military crate, tall metal lockers...) so i could spawn them as admin. I basically reused the code from the NewMoveable file that just associates a tile to an item.
Problem is, i would like these moveables to be indestructible once placed on ground (like the barbed wire fences). How would i go about that ?
Thanks!

naive spruce
#

is there some api that allows to automate mod releases to steam workshop from cli? having to open pz every single time I want to release a mod update is a bit annoying

#

what is the workflow you guys usually use for releasing updates?

drifting ore
#

That being said, I just finished a release but i want to make sure it works before releasing this updated version. Any way to get people to test it?

long grove
#

In VirtualZombieManager.java there is this function:

public void createHordeFromTo(float var1, float var2, float var3, float var4, int var5) {
ZombiePopulationManager.instance.createHordeFromTo((int)var1, (int)var2, (int)var3, (int)var4, var5);
}

Where do I find the ZombiePopulationManager.java?

junior flame
long grove
#

oh yes I just saw it thanks

#

zombie/popman/

naive spruce
#

@drifting ore rofl, fair enough. Regarding testing, I usually work with two separate branches (git/github): Production and Testing. I work on testing branch and once I'm done I'll do a test release (this a completely separate workshop item with "hidden" status) and install it in both our personal dedicated server to see if it works on multiplayer and then locally for solo gameplay. If nothing breaks I proceed to merge the testing branch into production and make the official release to workshop.

long grove
#

wtf is n_spawnHorde some kind of global function? Its used in ZombiePopulationManager but cant find where it is defined, only declared.

naive spruce
#

bear in mind I'm new to mod development so I'm still coming to terms with the ecosystem

drifting ore
#

Yeah sounds about the "normal" procedure, as a standard release, like in real world development for projects

#

My issue falls with my lack of resources to test it more in-depth in MP

#

Especially for high user counts and such

junior flame
# long grove wtf is n_spawnHorde some kind of global function? Its used in ZombiePopulationMa...

zombie/Lua/LuaManager.java

      public static void spawnHorde(float var0, float var1, float var2, float var3, float var4, int var5) {
         for(int var6 = 0; var6 < var5; ++var6) {
            VirtualZombieManager.instance.choices.clear();
            IsoGridSquare var7 = IsoWorld.instance.CurrentCell.getGridSquare((double)Rand.Next(var0, var2), (double)Rand.Next(var1, var3), (double)var4);
            if (var7 != null) {
               VirtualZombieManager.instance.choices.add(var7);
               IsoZombie var8 = VirtualZombieManager.instance.createRealZombieAlways(IsoDirections.fromIndex(Rand.Next(IsoDirections.Max.index())).index(), false);
               var8.dressInRandomOutfit();
               ZombieSpawnRecorder.instance.record(var8, "LuaManager.spawnHorde");
            }
         }

      }

all i can find regarding that

quasi geode
long grove
#

ok thanks Khrodes

#

So I guess the spawning and grouping are different. i.e the game spawns a bunch of zombies and the zombiegroupmanager groups them eventually? Doesn't seem to be anything about spawning groups themselves

drifting ore
willow estuary
quasi geode
#

thats about normal for updating software... the anxiety lol. the bigger the project and the more on the line the worse it is XD

naive spruce
#

@drifting ore Totally understand. Wish I had something like a QA team for my mods (xD). Currently I rely on a small group of friends that play on our server to test it and give it the green sign or not, but I see how this can quickly become unreliable for mods with a very high user base. On a side note, imagine having something like a CI/CD pipeline mod releases... It would surely save up time and allow people to use the saved time to do more testing

naive spruce
#

probably quite cumbersome for large servers

#

with hundreds of mods

quasi geode
#

its a real issue for larger dedicated servers who dont always have someone at the drivers seat

sour island
#

Probably my favorite bug hunt - read from bottom to top

junior flame
#

lmao

sour island
naive spruce
#

@sour island that's really interesting. Is it an open source project? would love to chime in and help with that

craggy furnace
#

he can use them help

drifting ore
craggy furnace
#

about a week ago i would get anxiety about uploading updates to mod because theyd get followed by what seemed like a cacophany of complaints for stuff that was completely out of my control sometimes

lapis stump
#

disable comments

craggy furnace
#

i have settled on the mindset that the moment you download any mod you immediately sign a deal with the devil outside the normal realms and perimeters of the game and you alone take the blame if something snaps because you were the one who grabbed it

#

and i really cant with some of them

#

expanded helicopters especially

#

i have shifted away from getting anxious because this is one of my hobbies and its insane to put that much thought into something people get unusually mad about

sour island
#

Disabling comments is ultimately not helpful

naive spruce
#

rofl, yeah. I considered disabling comments too, but feedback can really be useful so I ended up not doing that

sour island
#

if you're getting comments it's because there's something wrong - the issue is they don't know how to explain stuff

craggy furnace
#

disabling comments is usually just an antisocial activity by drama queens

drifting ore
naive spruce
#

though I only have a single released mod so I didn't get any negative feedback yet, so let's see how things turn out

craggy furnace
#

only reason ill ever disable comments is because i am actively not working on something

sour island
#

putting up a FAQ with instructions to fetch console.txt has made the experience alot less painful

craggy furnace
#

and have no willingness to hear about it

sour island
#
  • you can unsub from your comment section
#

let users duke it out

plucky pollen
#

can anyone help me with my item mod im trying make? i have it in game.. just not sure how i can do what i want to do

quasi geode
#

I like my solution. i just dont upload my stuff to the workshop (other people end up doing it) 😅

drifting ore
#

I'm just sick of ppl asking "Does it work in mp?" bro just read the description please, it's there... and in other comments too...

lapis stump
#

i want to post comments but not have them enabled 😦

craggy furnace
#

steam workshop in general is overdue for about 5 years worth of quality of life updates in one go

sour island
#

comments also stop coming the second everything is stable

craggy furnace
#

having mods keep old files and seeing users have old versions of mods that are two updates behind is sad

sour island
#

which is sad cause I'd be nice to get showered with compliments

#

at least to the degree to match complaints

naive spruce
#

agreed. I need my ego massage from time to time too...

lapis stump
#

steam awards are better than comments and you don't need to read any complaints 🙂

sour island
#

Just waiting for these awards to turn into NFTs

craggy furnace
#

still gotta hold your nose and find the useful stuff in the ocean of suggestions, free requests, and people getting mad

craggy furnace
sour island
#

can I turn these in for a kazoo

plucky pollen
#

i need help with the notebook / journal for my mod please

sour island
#

?

craggy furnace
plucky pollen
#

currently i have it as journal but can change to notebook if easier?

I have a custom journal but i need it to be pre-filled with some text meant to be a dead persons journal

item GyazoJournal {
    DisplayCategory = Literature,
    Weight = 01,
    Type = Literature,
    DisplayName    = Gyazo Journal,
    Icon = Notebook,
    CanBeWrite = true,
    PageToWrite    = 20,
    StaticModel    = Newspaper,
    WorldStaticModel = Newspaper_Ground,
  }
sour island
#

unless there's a lua call for oncreate that may be difficult to do

#

oncreate in this case not being crafted but literally created

#

you could run a function in fillcontainer

plucky pollen
#

how would i do that?

sour island
#

there's an event called 'OnFillContainer'

#

I'm not sure that it handles zombie deaths though

#

there's also OnZombieDead if you want the books to be on zombies

plucky pollen
#

i just want it to spawn some place containers are fine

I made a map for our rp server and kinda want this to expand on it further..

how and where would i use onfillcontainer? in the same .txt file as the item or?

sour island
#

the ironic thing is if the game isn't doing something already it tends to be alot of work

#

this would involve programming in Lua

#

writing a function that ties into an event the game calls

#

onfillcontainer should apply when you open new containers

#

so you'd have to put the books in loottables

#

then during this event you'd modify books found/spawned

#

having things be in specific places may even be harder

plucky pollen
#

could i have it spawned just on my map then already to start? so there is just 1 journal? or..

oh 😦

sour island
#

I wrote (with the help of konjima/co/etc) a spawnerAPI that can take care of the spawning things in certain places

#

but even then you'd have to write the function

plucky pollen
#

ok, without alot of help for me atm not going be easy.. i got no idea how to even start 😦

sour island
#

it's not a too complicated idea