#mod_development

1 messages Β· Page 460 of 1

echo leaf
#

And it's not visible on my body

#

Did... the swat mod get taken down?

#

Nice.

#

Yup, updated to the new one and all good again πŸ™‚

sour island
#

Does anyone know if instaceof() picks up on extended classes? Like will IsoPlayer also register as an IsoGameCharacter?

#

It does, noice

carmine cosmos
#

Are autosaves with backups be something you guys would be interested in? It would be a mod that automatically creates a new save file every time you sleep allowing you to load a save from for example last day when you happen to die

undone heron
#

would be nice

#

tbh an ironman mode vs a one back up save mode would be nice to have

carmine cosmos
#

Yea I like the idea of one backup save personally as well

undone heron
#

like maybe have all professions give double the stats after a month of play time if you decide to continue a save

#

or a new character made after a month on a save would get a x2 exp boost for levels 1-4 of a skill

errant meteor
carmine cosmos
#

It would definitely be easier for players to continue after dying

undone heron
carmine cosmos
#

Characters generated later on in the game need to start with some gear and clothes

#

Probably at some random location on the map (not really random but not just a house)

#

With some more skills like you mentioned to show that they are survivors

undone heron
#

yeah, any reason to actually continue a save beyond the first death would be welcomed

random terrace
#

how would one go about adding items into the loot table of bags, gun cases etc

#

can't seem to find much of anything about them in the game's files

undone heron
#

table insertion!

random terrace
#

I would've hoped it's that simple, but I can't seem to figure out what the tables are for these

undone heron
#

you get your items and the values and you put them on the tables

#

the tables are on the lua/server/items and it's called suberbDistrubtions

#

you can also look at mods like brita's, scrap armor/weapons, ect to see how they do the insertion

random terrace
#

I've already added items to the tables, but I mean specifically the ones that govern whatever spawns in bags and such

#

Like you know how gun cases can have a gun and a magazine in it

undone heron
#
    FirstAidKit = {
        rolls = 1,
        items = {
            "Bandaid", 200,
            "Bandaid", 200,
            "Bandaid", 200,
            "Bandaid", 70,
            "Bandage", 200,
            "Bandage", 20,
            "Bandage", 10,
            "CottonBalls", 200,
            "CottonBalls", 70,
            "CottonBalls", 30,
            "Disinfectant", 100,
            "AlcoholWipes", 200,
            "AlcoholWipes", 70,
            "AlcoholWipes", 30,
            "Tweezers", 100,
            "SutureNeedle", 100,
            "SutureNeedle", 50,
            "SutureNeedleHolder", 50,
            "Scalpel", 5,
            "Gloves_Surgical", 5,
            "Scissors", 5,
        },
        fillRand = 0,
    },
#
    Tote = {
        rolls = 10,
        items = {
            "Plasticbag", 55,
            "Plasticbag", 50,
            "Plasticbag", 50,
            "Plasticbag", 50,
            "Plasticbag", 50,
            "Plasticbag", 50,
            "Plasticbag", 50,
            "Plasticbag", 50,
        },
        fillRand = 3,
    },
#
    PistolCase1 = {
        rolls = 1,
        items = {
            "Pistol", 100,
            "9mmClip", 100,
        },
        fillRand = 0,
    },
#

so you just need to insert your item into these tables

random terrace
#

oooh nice, thank you

#

out of curiousity which file are these initialized in?

#

for some reason I couldn't find it

echo leaf
undone heron
#

media\lua\server\Items Distributions

latent orchid
#

fair warning, that loot table format will be changing over the coming updates

#

look into procedural_distributions.lua within the same items folder to see how it works in conjunction with the distribution.lua file

sour island
#

Can you provide an explanation as to what it does differently?

spiral plover
#

@undone heron have you looked inside of ISWearClothing.LUA?

#

looks like they use function ISWearClothing:isValid() return self.character:getInventory():contains(self.item); end

#

to check if the player has clothing on or not

undone heron
#

that checks the inventory to see if it has an item, which is the whole inventory. not if it's on a slot or not

spiral plover
#

Right but you could then probably check if it is equipped or not from there

#

there is also local location = self.item:getBodyLocation()

#

and, self:setAnimVariable("WearClothingLocation", WearClothingAnimations[location] or "")

latent orchid
# sour island Can you provide an explanation as to what it does differently?

in summary, a room's containers decide which of the procedural_distribution entries they will use and then roll against those items, so you could have one counter with plates and then the next full of canned foods in a kitchen rather than just a massive mashup list like is presently used for most room defs

#

look at how gigmart entries are structured as example

#

also check out the bedroom example for variation based on furniture present in room

sour island
#

ah, so gigamart already used this to some extent before?

#

sounds much better honestly

digital tinsel
#

anyway to disable or reduce car spawns from swat pack?

severe ridge
digital tinsel
late hound
#

New Snow Ghillie and CEDA Hazmat zombies

humble kernel
#

peach youre the best modder i know

kindred pumice
#

#i-love-peach

willow estuary
craggy furnace
#

yeah so i really need this mod

#

is this for your server project?

willow estuary
#

The mod's already on the workshop, although it doesn't feature the west point gun store key working for the door, that's just test bed stuff.

#

Given how everything is made out of paper mache + how easy it is to farm keys, specific door keys as loot is kind of silly given the contortions needed to make them work and spawn.

craggy furnace
#

oh nice, ive been too busy tinkering with my own stuff to peek out

#

ill grab it

willow estuary
topaz pendant
#

what is this key mod called >.>

topaz pendant
#

hold up before i sub to this mod would it change anything like the main menu or the song when starting a new game?

plucky nova
#

honestly i have been thinking of getting it for a bit but i dont think that its compatible with a lot of different things that i have

#

and besides, i dont think that i am THAT much of a masochist

echo leaf
#

@nimble spoke Hey man, wheat seems to be throwing an error once it reaches the rotting stage

#

Or am I doing something wrong?

grave solstice
#

Actually, you can watch the demo here: https://youtu.be/PZjSgizQyfc

Simple Playable Pianos is a mod for Project Zomboid. This is a demo.

Mod is available at: https://steamcommunity.com/sharedfiles/filedetails/?id=2465017864

Have your Project Zomboid character learn how to play the piano!

  • New animation for playing the piano
  • 11 levels of piano levels
  • Unlock new songs every time you gain a level
  • Play th...
β–Ά Play video
grave solstice
echo leaf
#

midi keyboard integration when?

#

πŸ˜›

latent orchid
#

@late hound regarding the pinball animations, in a similar stream to my above quote, will these be configurable to add new tiles such as DaddyDirk's arcade tiles. Hopefully all us mappers need to do is add a simple mod check and tell it to add functionality to additional tiles on the map.

late hound
hollow cloud
#

Anyone ever think about making something that would consolidate all the items that can pour into themselves? Like thread. Tedious when you have man and are trying to save on weight.

echo leaf
#

I believe this mod will slap together threads that are at lower than 100% into larger stacks

#

So say you have 10 thread at 50%

#

It will stack them into 5thread

#

which then unstacks into 5 full thread

#

not exactly what you want but sorta

hollow cloud
#

Thank you will try now.

echo leaf
hollow cloud
#

I have that one. Issue is that it all needs to be done by hand

#

If you have 70 thread you have to click on each to consolidate it into another one. Was looking for an option to be able to click or hotkey and allow script to run filling up all partials

echo leaf
#

Ah yeah I know what you mean

#

endgame problems

#

πŸ˜›

hollow cloud
#

heh

echo leaf
#

the stacking one should help then

#

you can make some pretty fat stacks with it and as far as i can remember it also consolidates in one action

hollow cloud
#

OK. Trying now

echo leaf
#

Does anyone know of a mod, or if it's possible to make one, that separates the addition of spices from the addition of condiments/meats to food?

undone heron
#

you mean like a different item catagory?

nimble spoke
echo leaf
#

Thanks man

red matrix
#

Piano mod looks neat! Are there any old jazz standards that would work on it?

#

Stardust or King Porter Stomp would be neat

drifting ore
#

Any mod recommendations to spice up the game? (For build 41)

fallow bridge
#

;P

#

petition to make this man add What Was Lost

grave solstice
grave solstice
fallow bridge
#

everyone who plays this game knows WWL

red matrix
#

I've got tons of Duke Ellington's stuff on file. Nice choice!

fallow bridge
#

wrong version

#

newest version

#

everyone knows What Was Lost πŸ™‚

grave solstice
fallow bridge
#

B

#

R

#

i mean

#

PAWS exists in the game

#

yet it didn't exist in 1993

#

Β―_(ツ)_/Β―

#

whatever i tried

marble folio
#

Hey, is there a efficient way of defining the loot distribution or you can only do it by hand in each place that you want?

red matrix
#

I'm working on that currently.

fallow bridge
#

i hate fucking with distro's

red matrix
#

When I'm done you'll be able to define contents for stuff by just messing with the procedural containers instead of room by room 'RandomStoreThings' and 'OtherStoreStuff', etc..

#

'StoreCounterTobacco' 'BookstoreBags' 'ClothesStoreHatsFormal', etc.

fallow bridge
#

store counters don't even hold loot anymore xD

grave solstice
red matrix
#

Fantastic! Even some lousy MIDIs of Scott Joplin tunes would make me smile like an idiot

fallow bridge
#

What Was Lost 😦

#

😭

grave solstice
red matrix
#

Oh, sorry I only watched the first part of the video.

#

Custom anims being a thing blows my mind

grave solstice
grave solstice
#

Maybe in the next version I'll give each piece a tempo designation, and adjust the animation speed accordingly.

red matrix
#

That sounds fantastic. Piano is one of those things I really wish I had been taught as a kid.

#

What's your impression of 'Finger Buster' lol

grave solstice
marble folio
#

One question
Procedural means that the item will 100% spawn without roll? depending on the min and max amount?

red matrix
#

The min/max is how many of that container type will spawn. Check the containers in ProceduralDistributions.lua and you'll see the rolls/items

latent orchid
#

the item roll itself is contained in the procedural_dsitro table. the min/max in distribution is as Baph said, the amount of times that particular loot table might be used

#

looking at the item rolls themselves, things like antique oven have 10,000 set for their roll

red matrix
#

That's a bit overkill but was intended to ensure the item always spawns lol

latent orchid
#

btw baph, noticed more changes in the distro change log today πŸ™‚

#

already prepping my map for those changes

#

look like furniture will be in crates....more themed industrial locations is good

red matrix
#

Not sure if they'll end up in warehouses/factories but they'll fit nicely in storage units and furniture storage rooms. They're good for disassembly for XP/mats too

latent orchid
#

yeah. i actually always wanted to have crates with furniture in rear of furniture shops rather than tools and other odd bits

#

the changes will really add flavor to locations

marble folio
red matrix
#

Bingo!

#

Can be used for places with loads of containers to give them a bit more variety instead of having each one be a big grab bag of each item. Pots in one thing, cans in another, etc..

#

The tool store for example. Big piles of stuff. I'll organize things a touch more, certain tools with other tools. By function or something

marble folio
#

If in my mod distribution list I change a container from procedural to the other type with rolls and put one single item in there, will it mess up the Vanilla Distribution?

#

conflict or something

red matrix
#

Yep! The game will crash actually lol

#

If a container has been switched over to procedural, it can't have loose items because the entries under procList need to be tables with values 'name', 'min', 'max' etc..
If it's an item, it'll return a string instead then throw a fit

marble folio
willow estuary
#

Honestly, at this point, my advice is that everybody just hold off on anything distro related until Baph's distro-pocalypse improvement goes live?

#

That business is seriously fucking with my own plans right now .

willow estuary
#

The workshop comments etc. are going to be a complete clusterfuck when this distro business goes down.

latent orchid
#

@red matrix Hopefully I got this right and its worthy of a pin

errant meteor
#

you should properly pin that

red matrix
#

I think the smaller dresser is also type wardrobe? You can see the type via the top bar in inventory-- I think 'wardrobe' is Cabinet

latent orchid
#

Yeah, i assumed it was sidetable....my bad

#

i dont think it will make a diff explaining things

#

the bed is also a custom coloring of mine πŸ˜‚

red matrix
#

'junk' is also more of a 'non-modifier' version of the item roller. The numbers aren't affected by the world's loot stuff-- the thing that ties zombie density to loot

#

Like, if I put '10' for an item that isn't under 'junk' it won't actually be '10', but something messed around with by the various modifiers. Even '100' won't necessarily result in an item always spawning in that container-- unless it's under junk

#

I like the color job! Nice bed!

latent orchid
#

@red matrix updated version removing the sidetable line

willow estuary
#

Huh, I had no idea junk was more likely to spawn.

latent orchid
#

its so hard explaining the loot system to mappers without having an image showing all three elements side by side

red matrix
#

Nice job!

willow estuary
#

Ohhh, so junk isn't affected by zombie density?

So the stuff I want to have a 0.000001 spawn chance will actually have that spawn chance if I put it in the junk table?!?!?

red matrix
#

Yep!

willow estuary
#

Oh thank goat, that zombie density business was such a pain in the ass for super rare stuff like necronomicons.

latent orchid
#

i kind of figured that would be the case when i noticed some entries repeated in that section. i always thought junk was a nice to have thing

red matrix
willow estuary
#

Thinking those things would be rare in rural kentucky....

latent orchid
#

@willow estuary there was the porn mag drought of '92 IIRC πŸ˜‚

fallow bridge
latent orchid
#

click on 'open original' to see full size

#

also u might need to zoom to full size in your image previewer depending on associated app

late hound
#

"Groovy"

carmine cosmos
#

I see a lot of complaints about distributions very often in this channel so it is time for me to ask.

#

If you could make a request to the developers themselves what would be your ideal way to register new and change existing item distribution entries?

spiral plover
#

I could use a hand, I’ve almost got my profession exclusive traits working but I have one last hurdle

#

The listbox.item is a trait of sorts, but it’s not the same as the trait factory.getTrait? It has a getLabel() function but not a getName() function

#

So I run into the problem when trying to compare if the list has the trait or not because getLabel() is returning β€œLab Grown” while the internal trait name is β€œlabGrown”

#

Would traitFactory.getTrait(x):getLabel() work?

spiral plover
#

Great, so that works and now my conditions are passing correctly, but these functions don't work?

#
            self.listboxTrait:addItem(traitToCheck.traitName, TraitFactory.getTrait(traitToCheck.traitName));
        elseif tableContainsTrait(self.listboxTrait.items, TraitFactory.getTrait(traitToCheck.traitName):getLabel()) then
            print("removing trait?")
            self.listboxTrait:removeItem(traitToCheck.traitName);
        end```
#

removeItem and addItem, I have gotten both to work previously using the same code yet they aren't working here?

#

if I remove the :getLabel() from the first if statement then it will continually add the trait every time you click on the prof and remove it when clicking off, but, what

#

it doesn't remove it from the list when you start?

#
    for _, value in pairs(t) do
        if value.item:getLabel() == e then
            print("Found value in table, returning " .. value.item:getLabel())
            return true
        end
    end
    return false
end```
#

here's the log, it literally should be working, what?

#
LOG  : General     , 1619187538294> Item is: unemployed
LOG  : General     , 1619187538294> Profession is: unemployed
LOG  : General     , 1619187538294> Attempting to filter traits
LOG  : General     , 1619187538294> false
LOG  : General     , 1619187538294> Found value in table, returning Lab Grown
LOG  : General     , 1619187538294> removing trait?```
#

Ehhhh?! Well I got it to work once because removeItem needed to be using :getLabel() but it doesn't work once you click on a different prof and add it back...

#

Yeah.. it's strange behaviour is making me think that it gets added correctly originally, and can be found and removed, but then when I add it back, it isn't added back correctly and can't be found to be removed

willow estuary
#

The apocalypse is better, IMO, with more trash, and more corpses.

#

Cache is the place. Keys are for testing, and not representative of the final version.

#

Not just pretty scenery, but useful as well....

jovial summit
drifting ore
#

πŸ”«

spiral plover
#

Ladies and gentlemen, we got em'

#

Profession exclusive traits, now for the cool ones like genetic mutations 😎

jovial summit
#

What's the plan for test tube experiment?

spiral plover
#

My custom challenge map, Facility-7. Giant underground research lab you must escape. It'll have custom professions like the Test Tube Subject who spawns, naked, in a test tube.

#

You'll have the options for extremely awesome and unique traits, and around the lab will eventually be modules and genes and such you can inject into yourself to get unique traits

#

Will probably do a Cyborg profession eventually too

jovial summit
#

Oh damn, that sounds cool!

#

Good luck with that dude

spiral plover
#

They'll have custom clothes you can't take off to represent the cyborg transition and such. Thanks mate!

grave solstice
#

Does anyone know how to find out if a file exists in the PZ install directory? I'm trying to programmatically determine if my custom animation file is in the correct directory. I could probably solve the problem if I knew how to determine the path to the install directory.

spiral plover
#

I could use a hand with this as I am unsure of the how to do it, the xpUpdate is a list but I want to overwrite the levelPerk function in it

#

this clearly doesnt work

#

Hmm, so I need to add it to the function under Event.LevelPerk or whatever it is?

undone heron
# spiral plover

perks related to the passive skills are for show and don't do anything. I.E if you have strength over 6, you get stout. if you have strength 4 or under, you gain weak

#

oh you said you wanted to overwrite it. it would only trigger on level up so gotta gain exp in a perk to test the print function

#

any guides out there to making clothing? I wanna make some custom clothing

worldly olive
#

Hi everyone!
Does this code has worked for someone? I'm being able to add the "Thin skin" trait but no matter how I try, I can't remove it again

player:getTraits():remove("Thinskinned");

undone heron
#

yeah worked for me

worldly olive
#

That remove has been working for me for all traits, except this one, I can't understand why, I add it but once I add it I can't remove it

carmine cosmos
#

That method will return false if the trait was not removed

rocky lynx
sour island
errant meteor
worldly olive
#

I don't think so, when the trait is created it is named as this: Thinskinned

I'm basically adding and removing it with this:

This one works
if not player:HasTrait("Thinskinned") then
player:getTraits():add("Thinskinned");
end

This one doesn't
if player:HasTrait("Thinskinned") then
player:getTraits():remove("Thinskinned");
end

It is strange because it only happens with this trait, the others works

spiral plover
#

Also, does anyone know if ZombRand returns an int or or float?

echo leaf
harsh prairie
#

I keep getting an error that says tsarslib under my other mods that are installed. Not sure how to fix it

grave solstice
spiral plover
#

Makes sense, thanks

rocky lynx
#

SuperHero outfit included (Easter Egg - Annoted Map)! xD

marble folio
#

Hey, what program do I use to open .X Files from animsX? I have an idea using assets from the PZ itself but i don't know to put it all together yet

spiral plover
#

So uh, anyone know how to add a level directly for a perk (stat)?

#

owner:LoseLevel(perk);

#

that works to remove a level

#

but I can only find AddXP functions for the alternative

harsh prairie
#

Thanks @marble folio !

errant meteor
rocky lynx
worldly olive
#

Owner:setPerkLevel(Perks.Fitness) = 10

I think that should work as an example, I dont know if you can add by one bur you can set the level you want

willow estuary
#

Wrecks with parts

late hound
# marble folio Hey, what program do I use to open .X Files from animsX? I have an idea using as...

https://www.microsoft.com/en-us/download/details.aspx?id=6812
Here is DirectX SDK development kit. It includes the DirectX viewer application that I use to view the .X files.

undone heron
#

hmmmm, what reason could there be for a new clothing item texture to not show up?

media -> Script folder, create the item. Item shows up correctly

    item Strap_Dress
    {
        Type = Clothing,
        DisplayName = Strap Dress,
        ClothingItem = Strap_Dress,
        BodyLocation = Dress,
        BloodLocation = ShortsShort;Shirt,
        Icon = DressShortWhite,
        Insulation = 0.1,
        WindResistance = 0.05,
        FabricType = Cotton
    }

media -> clothing -> clothingItems. Created the XML file by coping the Dress xml and re-naming it to Strap_dress. Then changed the file texture path to the correct one

    <m_BaseTextures>clothes\dress\strap_dress</m_BaseTextures>

texture file is in clothes -> dress, and is named strap_dress

#

am I missing a step?

marble folio
undone heron
late hound
#

Is the model invisible or are you getting the red and white checkerboard?

undone heron
#

it is invisible

late hound
#

what does the model normally look like? If it was a missing texture, it would show a red and white checkerboard texture on it.

undone heron
#

it should just be the dress model with a new texture

late hound
#

ok what does the .xml Clothingitem say?

undone heron
#

Dress_Long (the one I copied)

<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
    <m_MaleModel></m_MaleModel>
    <m_FemaleModel></m_FemaleModel>
    <m_GUID>99f1aa77-0c9c-4f83-a903-c9ba97ab52e8</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomTint>true</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <m_BaseTextures>clothes\dress_textures\dress_long</m_BaseTextures>
</clothingItem>

Mine

<?xml version="1.0" encoding="utf-8"?>
<clothingItem>
    <m_MaleModel></m_MaleModel>
    <m_FemaleModel></m_FemaleModel>
    <m_GUID>02dbb571-5244-4dfe-ab5f-a0f191557ea0</m_GUID>
    <m_Static>false</m_Static>
    <m_AllowRandomTint>true</m_AllowRandomTint>
    <m_AttachBone></m_AttachBone>
    <m_BaseTextures>clothes\dress\Strap_Dress</m_BaseTextures>
</clothingItem>
late hound
#

<m_BaseTextures>clothes\dress\Strap_Dress</m_BaseTextures>
Did you create a new folder called "dress"?

undone heron
#

yes

#

going to try to make one called dress_textures and see

#

nope, still invisible

#

it feels like there is something I am missing

late hound
#

can you send me a .zip of your mod?

undone heron
#

kk

willow estuary
undone heron
#

neat

#

I hate the burnt car system >-> would rather have rusted/100% wrecked cars over burnt

marble folio
#

help
I'm learning to make a mod by following Blackbeard tutorial on youtube and trying to add a custom soda to the game, but something is going wrong and I tried to find out what for almost 2 days but I still don't know. The item doesn't spawn in game and the console shows this:

GRAVE: Error found in LUA file: C:/Users/Gomberg/Zomboid/mods/Dolly Guarana/media/lua/server/items/DLY-Distributions.lua
ERROR: General , 1619226548009> ExceptionLogger.logException> Exception thrown se.krka.kahlua.vm.KahluaException: DLY-Distributions.lua:274: unexpected symbol near <eof> at LexState.lexerror line:279.
ERROR: General , 1619226548063> DebugLogStream.printException> Stack trace:
se.krka.kahlua.vm.KahluaException: DLY-Distributions.lua:274: unexpected symbol near <eof>

I've checked the code and there is nothing at the end, just this that I have no idea (yet) what it does

table.insert(Distributions, 1, distributionTable);

--for mod compat:
SuburbsDistributions = distributionTable;

undone heron
#

GRAVE ERROR

you have a bad symbol in your file

undone heron
#

the error happened at 279. in your file

marble folio
willow estuary
dusty vortex
#

hey, is there a guide somewhere on how to make my own custom clothes

#

and maybe templates?

lethal sparrow
# willow estuary

You've really been going H.A.M, Blair, but this takes the cake. Those are really impressive

willow estuary
#

Ahaha, it's all sketchfab + creative commons and not me πŸ˜„

round kiln
#

i would like to make a mod, but eh i wanna start with something simple, and like idk what i should do first though

carmine cosmos
shy quiver
#

Hi, I like the MRE mod but they are way way too abundant. I found the distribution file, what kind of numbers can I put in that make them really rare?

#

table.insert(SuburbsDistributions["all"]["inventorymale"].items, "USMRE.MREmenu01");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.05);```
#

even at 0.05 they are too common on zeds

willow estuary
#

Ah, I think the problem here is that the chance of something spawning is modified by the number of zombies in the vicinity, so items that are supposed to be rare will always spawn too often when zombies are around.

I'd just strike out the park where they spawn on zombies entirely.

shy quiver
#

yeah, fair enough. I think I'll do that and modify the mre box spawn chance to be rarer

#

can the distributions go into the thousandths?

willow estuary
#

Yeah, but it, in testing, makes no difference.
Zombies affecting the chance pretty much means that there's a practical floor to what the chance really is.

#

I've tried 0.0000001 and it spawns just as often as 0.1

#

Pretty much anywhere items spawn, there are zombies so

drifting ore
#

How can I make custom Challanges?

willow estuary
#

Now, apparently, the junk table entries are not affected by zombies, but there is no junk table for corpse inventories.
Adding a junk table to zombie inventories isn't impossible, but it's not really a "beginner" thing and also frankly it seems like a huge fuckaround as opposed to just setting it so zombies don;t drop MREs?

shy quiver
#

Fair, thank you for the help

#

I just removed the zombie spawn entirely

willow estuary
# drifting ore How can I make custom Challanges?

Now, assuming that you are new to modding for PZ/lua, I'sd say that's not a feasible "beginner" project and you should try making some simple mods first to get a handle on things.

If not, then I'd say it's a matter of time + repeated, repeated, repeated trial and error.

drifting ore
#

πŸ‘ Just asking around

willow estuary
#

Yeah, not trying to discourage anyone, I'm just a big advocate of learning simple stuff and working up from that?
It took me a year and a ton of mods before I felt like I knew anything and could actually implement the ideas I had that were past simple hack jobs.
Granted, in my case, I'm a huge dummy.

#

You could try modifying an existing challenge and see where that gets you.

carmine cosmos
#

I would recommend learning the basics of the language you want to be working in first

#

Then learning how to setup your development working environment

willow estuary
#

Yeah the working environment is really important.
For example I try to have a cup of coffe and an ashtray with a couple of pre-rolled joints within arms reach when working on stuff.

willow estuary
#

Maybe in 1950 πŸ˜„

drifting ore
carmine cosmos
#

If you are looking to learn how to do Lua modding I can share some resources

#

With Lua modding I mean Project Zomboid Lua modding

drifting ore
#

No thank you, just looking around. I have another modding project I need to finish before I jump into another one

carmine cosmos
#

Don't know why you are asking for information if you are not interested in it

drifting ore
#

Cause I thought it would be relatively simple, but now I know that it is not I rather not get into it for the time being

carmine cosmos
#

It is relatively simple, but not if you are not willing to even read documentation

#

Good luck with your other projects though

willow estuary
carmine cosmos
#

...really knows his shit and best practices
I do not agree with this, he believes that modders should stay away from IDE's

#

Working in notepad is not best practice when it comes to modding

drifting ore
#

A map of Raven Creek. In case anyone wants it for their game, I know I did.

drifting ore
#

An army base right at the city entrance? Nice

grizzled grove
abstract lintel
#

Does anyone know some good mods for 41 and a good map?

lyric pike
#

i mostly use it for the clothing

craggy furnace
#

lets all take a second and talk about how cool that poster is

spiral plover
#

It's very well done for sure

craggy furnace
#

man

#

TIS really needs to just cut the laser on the laser pointer

#

it looks so bad

spiral plover
#

idk, it doesn't look so bad in-game when equipped I thought

craggy furnace
#

now holster it

#

nice little laser beam stays on

spiral plover
#

Well, yeah, that part isnt so great

#

Just added my new favorite trait to my facility map. "Doomed" gives you a random timer of 6 to 12 months, affected by lucky/unlucky, that once your time is up, every day there is a chance for your doom to begin

#

and once doomed, well... you'll be dead within the day

craggy furnace
#

man, having cancer in zomboid would be so depressing

#

i got back in TWD recently and theres a callback episode which is basically scavenging for chemo drugs

#

so brutal

craggy furnace
#

yep

late hound
#

a great episode

craggy furnace
#

didnt wanna spoil

spiral plover
#

Yeah.. good episodes, definitely a sad story.

#

I figured it would add an interesting aspect to the game, and there's also a genetic mutation trait that adds and removes traits randomly (probably will limit the traits it can add/remove) so that may be the only option to remove the doomed trait from your character

#

I was considering a very rare and special cure procedure but... nah

spiral plover
#

Hmm, having an issue where my mod's traits aren't being saved on my character and become considered unkown?

#

My thought is that since my traits are added OnGameBoot

#

that they do not work properly when I am just reloading the LUA via the "Continue" button

#

Anyone know about this?

#

O wait, maybe there was just a bug, hold on

wise ravine
#

Is there a mod for tying a brick or something heavy to the drivers wheel of a car to set off the alarm? To like attract zombozals

#

And I know about the police cars sirens, it would be nice if you could do that to normal cars

craggy furnace
#

@late hound damn, animations broke my game lol

#

nevermind, just fixed it

spiral plover
#

Where can I find a list of events I can add to? Looking to add an event to player spawn

late hound
#

@late hound damn, animations broke my game lol
@craggy furnace What happened?

red matrix
#

I use it a hell of a lot more than IntelliJ. IDE's are like flying a space shuttle for a crop dusting run. Yoke and throttle works just as fine as fly-by-wire.

undone heron
#

IntelliJ is more useful when it comes to java modding. but when it comes to just lua...

#

notepadd++ all the wya Β―_(ツ)_/Β―

spiral plover
#

Hrm.. does anyone know how I can get the player's profession once they've loaded into the game?

#

I can't find a getProfession() function, not sure where to look

jovial summit
#

Does anyone know the compat between Moonslime's extra traits and Dynamic traits?

craggy furnace
#

@late hound No clue

#

Maybe I forgot I modded it

round zenith
craggy furnace
#

idk

#

VSC is great if you want something modular

#

you can even assign presets and make templates on the fly

spiral plover
#

I haven't been able to see anything but guess I'll ask, has anyone seen anyway to prevent the player from being dragged down/changing the drag down script?

echo leaf
#

@willow estuary Hey man! I'm not 100% sure this is correlated to the coke baggie but I'm pretty sure.

I did a line, and my character hasn't needed to sleep for many, many days. So I checked with the healthbar mod and my fatigue is stuck at something like 2^-6, is that to be expected or did something explode?

#

(from marching powder)

willow estuary
#

How many other mods are you using?

severe ridge
#

❄️ πŸ‘ƒ

echo leaf
#

I've done a few lines in the past and nothing went amiss, was just this last one that's been a doozy

#

And a few mods but nothing that affects endurance. Just wanted to be sure it wasn't expected behavior, thanks for the response πŸ™‚

#

Do you know of a way to reset the fatigue value?

willow estuary
echo leaf
#

lol okay

#

thanks

echo leaf
#

@willow estuary fwiw I used the cheat menu mod to enable and then disable god mode and it fixed it

#

reset fatigue to 0 and it started behaving normally again

sour island
#

I rarely go digging in the java to see what does what anymore- and I've been able to replace the entire helicopter event, add preset options, event scheduler, etc

craggy furnace
#

IDE's have a place and a purpose

#

if you can get away with using a text editor for minutia then go for it

#

i dont like using space ships for what is basically going from point A to B

spiral plover
#

Hey.. anyone know how I can force a zombie to be shoved back/fall over?

#

there is hitConsequences(HandWeapon weapon, IsoGameCharacter wielder, boolean bIgnoreDamage, float damage, boolean bKnockdown) but I just get errors

#

my error is being super helpful too

carmine cosmos
#

But perhaps you don't consider them professionals

red matrix
#

I am working directly with them and they are most assuredly professional πŸ˜„

#

Very lovely people!

undone heron
red matrix
#

I guess my comfort factor depends on how familiar I am with all the things that tool can do. Notepad++ has fewer functions/features that aren't relevant to what I'm working on. I can use a Swiss army knife to cut fruit, but I've also got a paring knife.

#

The devs use IntelliJ for their stuff, if others were wondering. I really wish I had spent time in school learning this stuff instead of doodling robots and big swords and stupid shit like that.

carmine cosmos
#

Pretending like there is no need is just setting low expectation for fellow modders

red matrix
#

My monocle just fell into my martini glass. Good heavens.

carmine cosmos
#

You are not helping the community when you recommend Notepad over IDE

red matrix
#

You're not helping the community by being such a lovely person.

#

I've already been warned by others that you're rude

#

Nice rep my man.

carmine cosmos
#

Don't know why you are trying to pick a fight with me

#

But I've said what I wanted, now you can continue with your sarcasm

red matrix
#

Forgive me, Data. The vagaries of language are indeed confusing. 'setting low expectation's and 'not helping the community' are hard to perceive as non-adversarial statements.

#

Clearly my shit needs recalibrating. You are very polite.

red matrix
#

For others who are wondering I advise threading the wires through your ferrite cores with the tools provided if you want your landing program to execute correctly.

#

Do not use your fingertips. The oils will corrode the copper and offgas in non-atmospheric conditions, adversely affecting their conductive qualities.

#

Make sure to smoke Chesterfields every 15 minutes to keep your hands steady. Thanks for watching

spiral plover
#

Well.. if anyone knows anything about staggering/knocking over/knocking back zombies, I would greatly appreciate to hear it. I guess I'll just move on for now

sour island
#

I do

#

hold on

spiral plover
#

YOU DO?!

#

I'm saved!!!

sour island
#
---@public
---@param arg0 boolean
---@return void
function IsoZombie:knockDown(arg0) end
#

Speaking to the topic, the only benefit to having an IDE setup is having exposed things tied to it in a library

#

cause you can find this stuff rather quickly

#

If you're just tweaking vanilla stuff, or someonelse's mod, you're probably better off using notepad++ with a few plugins

carmine cosmos
#

Also decompiling, code navigation, debuging, unit testing and more

spiral plover
#

Thanks so much!

sour island
#

Running the game outof intelliJ and getting more accurate debug info is useful, yes

red matrix
carmine cosmos
#

The vector logic we worked on would not be possible to do without IDEA

#

Those were your words as far as I remember πŸ€”

red matrix
#

Oh shit you gotta back him up now, or you're in hot water!

spiral plover
#

Hell YES!

#

Thank you so much @sour island

sour island
#

It would have been done either from having the IDE generate the information needed, or dig through java files -- looking through Java files would have taken longer

sour island
#

what are the ?s

carmine cosmos
#

You figured out the logic by running unit tests

spiral plover
#

Alarm lights I need to remove

red matrix
#

Some weird map object

spiral plover
#

was trying to make blinking lights ages ago but not enough is exposed from what I remember

carmine cosmos
#

from having the IDE generate the information needed,
What information is IDE generating that you are using?

sour island
#

what's actually exposed

carmine cosmos
#

That is not generated by IDE

spiral plover
#

Ah man it's been a long while since I looked at it, there is a light class and I could set up the light but I couldn;t figure out how to update it quickly enough

sour island
#

it is when you have your gradle scripts setup

spiral plover
#

it would change the stats on time but the lighting itself never updated

carmine cosmos
#

The Lua library you are referring to is generated by ZomboidDoc

#

Would be really great if IDE did it automatically though

willow estuary
spiral plover
#

Yeah, I was able to make it work by toggling the light component but... that was just the game switching a literal light switch on and off lol

#

you could even hear the sound effect of the switch flipping

#

I may take another look again soon

willow estuary
#

Ah yeah, that sounds like an unwanted complication πŸ˜„

#

Maybe something the electronics rework might make feasible?

red matrix
#

Isn't there a bunch of deprecated/nonfunctional stuff related to lights? I remember having a hell of a time getting them to shut off/delete during some tinkering with a 'more burned' house

willow estuary
#

You just had to remind me of the nonfunctional functions 😒

red matrix
#

If you've ever wondered what a building looks like with 100% burn coverage, it's awful. Remove the roofs first πŸ˜„

sour island
spiral plover
#

I believe so, yes

#

That was after many failed attempts

sour island
#

briefly looking at the java, but that one has the light switch built in

#

try switchLight(boolean)

#

I assume true is on

round kiln
#

is it ok to modify some mods that i got from workshop a bit?

spiral plover
#

Hmm, I'll take a look at that one!

#

idk where my script went though lol

sour island
#

setActive calls it after it goes through a bunch of stuff

spiral plover
#

May have deleted that one out of frustration

sour island
#

and it looks like it turns on the lights

carmine cosmos
spiral plover
#

Oh! Found it

round kiln
#

hm i see

spiral plover
#
        isoLight:setRadius(maxRadius)
        isoObject:switchLight(true)
    elseif radius >= maxRadius then
        isoLight:setRadius(minRadius)
        isoObject:switchLight(false)
    end```
#

looks like I had found that function, yet it did not work

#

Ah well

round kiln
#

where can i find the textures for the game?

#

nvm i found it, just gotta find the ingame files

#

oh but i cant find the ones for the icons that appear in the inventory

#

these icons, where can i find these?

#

ok i think i found a way

#

i wanna like, try to make some sort of mod that allows for multiple skins of already existing items, like that extra color for some clothing items for example

sour island
#

it's supposed to be called on the IsoLightSwitch

#

and this would be to flicker the lights in the room

#

just to clarify

spiral plover
#

should be an IsoLightSwitch

sour island
#

getlights doesn't appear to be an isoobject function

#

getlights is an isoLightSource function

#

to get the lights connected to the switch

#

getlights returns an array of IsoLightSources

#

weirdly enough lightsources don't have functions to tturn them off lol

#

thats handled by their switches

#

you can setactive but that just changes their field

#

it doesn't register an update

spiral plover
#

Ahhh, alright

#

that makes sense

sour island
#

is the isoobject in this case the lightswitch?

spiral plover
#

Yes I believe it is

sour island
#

Do you run your game in debug?

spiral plover
#

I do! Although the current tile is not in my game

sour island
#

you'd be able to see errors- if you're trying to call the wrong function

spiral plover
sour island
#

neat

#

the true in knock down is if they're falling forward btw

spiral plover
#

oh is it?

sour island
#

I kind of like that they collapse toward you though

#

yeah

spiral plover
#

Handy to know πŸ˜„

sour island
#

do you have it apply to IsoZombie?

spiral plover
#

Yes it should be

#

otherwise wouldn't be working, right

sour island
#

ah, nvm, I was going to suggest making it IsoGameCharacter to apply to players but knockdown is strictly zombie only

#

it's just knocking them down right, not killing them?

spiral plover
#

Yup!

#

and that is the intention

sour island
#

that'd be an interesting mp game mode

#

1 player killing anything it runs into

spiral plover
#

That is an interesting thought

#

Like the snail that will kill you in one touch lol

round kiln
spiral plover
#

Not die* they'll get right back up

round kiln
#

basically unstoppable force vs movable object lol

spiral plover
#

It's an 8 cost trait for a reason, but it isn't as strong as it looks. If not in god mode you'll hit the zombies, likely slow down, maybe trip even. Knockdown is also a random chance

#

@sour island while you're around, do you happen to know anything about preventing play dragdown?

sour island
#

I know there's a sandbox option for it

#

also if you're in ghost mode it doesn't happen

spiral plover
#

Both I am aware of, meaning it is a toggleable, in theory, value

sour island
#

are they killing you just by there being too many around?

spiral plover
#

Nah it's not an issue with Bulwark, but my Undying trait it is an issue

#

as it knocks down all nearby zombies if your health is really low, heals you to full and all, but... being dragged down doesn't change your HP

#

so if 3 zombies gang up on you, I can't activate the trait because, once in the animation, as far as I am aware, you're dead

sour island
#

you can override IsoGameCharacter :setDeathDragDown()

spiral plover
#

Oh?! I was looking for exactly that and couldn't find it!

#

Haha thank you!

sour island
#

idk if the game will freak out tho lol

spiral plover
#

We'll see I suppose!

#

Do you have any more info on how that function works?

sour island
#

I was looking in BodyDamage.java's AddRandomDamageFromZombie()

#

it calls if there if there's enough zombies around you

#

I figured if you made it return false instead depending on the situation

#

it should prevent it

#

wait

#

with undying zombies shouldn't attack right?

spiral plover
#

They still attack, it triggers when you're at less than 10 HP, heals all your wounds, and knocks over all nearby zombies

sour island
#

you could override IsoGameCharacter:getSurroundingAttackingZombies()

#

to always return 0 with specific parameters

#

this is called a bit earlier in the dragdown process

#

should be more reliable

spiral plover
#

Yeah I've just opened my script and found it, hmmm

#

looks like the way to go for sure

#

(I forgot I had jd installed lol)

sour island
#

are you familiar with overriding?

spiral plover
#

Yeah, had to do it a bunch to add profession exclusive traits

sour island
#

alrighty, neat work so far

spiral plover
#
function IsoGameCharacter:getSurroundingAttackingZombies()
    --Incase I need to add something
    oldGetSurroundingZs()
end```
#

just to be safe though, that should work, yes?

sour island
#

you have to prevent the original from running

#

IF you're parameters are met

spiral plover
#

Of course, just simply talking about the overriding part

sour island
#

yeah

#

also
```lua
code
```
adds markdown

spiral plover
#

Oh it does? neat to know

sour island
#

No problem

#

happy modding

spiral plover
#

Thanks for all the help man!

sour island
#

Anytime

willow estuary
#

Gas Siphoning that needs a hose

spiral plover
#

Smart!

mortal widget
jovial summit
#

i just thought that the survivor had a long tongue

fast girder
mortal widget
jovial summit
#

@undone heron you think that nerfed carpentry could be a mod?

undone heron
#

yeah, shouldn't be too hard

winter bolt
#

is skin texture 5 supposed to use skin 1's zombie textures?

#

it doesnt have any in the files and ingame it just switches to the palest skin's zombie textures

sour island
#

Don't shoot I'm just vitamin D deficient

#

I think someone made a mod for healthier looking skintones

severe ridge
#

harry did one as far as i know

sour island
#

Sorry, meant to link it alot sooner was listening to the piano mod demo

#

that thing is nicely done

#

Anyone familiar with getting a cell's trees?

#

the way I'm going about it feels too convoluted- but it's what the code suggests is the right way

#

welp, I guess a cell's Trees list is depreciated as it's empty, and IsoGrideSquares list is private

twilit bison
#

can somone teach me how to add a new cookible item into the game

drifting ore
#

How hard would it be to make a mod that just makes picked food never go bad?
Absolutely 0 coding knowledge, but it should just be deleting one thing and adding another right?

spiral plover
#

I'm on a roll adding these traits now, they're a ton of fun to add

#

Scratches, Lacerations, and Deep wounds will randomly appear based on several factors. Traits that effect it: Lucky, Unlucky, prone to Illness, Resilient, Thin-Skinned, Thick Skinned. Stats that affect the chances of wounds appearing: Stress level, fatigue level, panic level, and sadness

lethal sparrow
drifting ore
#

Didn't gas pumps already run out of gas eventually?

#

Or does this just lower how much gas is left on the pumps when the world is loaded

echo leaf
#

2000 units, so 400 gas cans, afaik

drifting ore
#

Oh

#

Yeah this mod makes more sense now

#

Will keep it in mind when i make a 6 months later game

willow estuary
#

Gas pumps in Vanilla never run out.
There's code for them running out, but it looks like it was disabled.

drifting ore
#

i had no idea that was a thing

willow estuary
#

It's a common misconception that they hold so much that people never empty them.
But it's not the case.

drifting ore
#

Thanks for the mod then, the challenge is part of the fun

#

How much is there on the pumps on average, or is that just randomized?

willow estuary
#

It's randomized but I have a policy of not explaining exact details like that, as I think it's more fun to learn through playing.

drifting ore
#

Fair

#

That also explains what your mods say on the description because for the longest time it seemed to me that you believed other people were an annoyance

willow estuary
#

Ah, there's certainly a loud, demanding minority that have proven to be enough of a bother that I've chosen to close certain avenues of communication.

spiral plover
#

Hmm... I'm trying to get a list of all the traits the player has, but it's being picky

#

Do I need to use that descriptor thing?

#

Nope.. not that

#

There's an isoGameCharacter.getTraits() but I just keep getting the error tried to call a non-function

#

@sour island would you happen to know anything about this? Apologies for the @

sour island
#

use :

spiral plover
#
    local player = _player;
    for i,traits in player:getTraits() do
        print(traits:getLabel());  
    end
end```
#

I am, that's my function, I've tried just printing traits, traits:getName(), and traits:getLabel()

#

doesn't work, because it gets stuck on player:getTraits()

sour island
#

get traits doesn't return a list

spiral plover
#

seriously... it says it returns a damn array! Ugh!

#

What even does it return then?

sour island
#

it's an arraylist

#

also you have to use pairs() in lua - if it was a lua friendly list

spiral plover
#

oh shoot that is also a mistake

#

but you're saying it won't work?

sour island
#

you can use :size() on what it returns, and get()

#

some functions in PZ return table/arrays (lists) that Lua can use

#

some return arrayLists which it can't

#

well it can

#

but you have to use the exposed arrayList functions

spiral plover
#

oooh, alright

#

makes sense

sour island
#

I might have an example handy hold on

spiral plover
#

That would be super useful!

sour island
#
    --- Raise the dead
    function DEBUG_TESTS.raiseTheDead()
        local player = getSpecificPlayer(0)
        local squaresInRange = getIsoRange(player, 15)
        local reanimated=0

        for sq=1, #squaresInRange do
            ---@type IsoGridSquare
            local square = squaresInRange[sq]
            local squareContents = square:getDeadBodys()

            for i=1, squareContents:size() do
                ---@type IsoDeadBody
                local foundObj = squareContents:get(i-1)

                if instanceof(foundObj, "IsoDeadBody") then
                    reanimated = reanimated+1
                    foundObj:reanimateNow()
                end
            end
        end
        print("-- Reanimated: "..reanimated)
    end
spiral plover
#

Aaah, I see

#

that does make sense

sour island
#

ignore the first for

#

also just realized a mistake lol

spiral plover
#

Haha no worries

sour island
#

arrayLists start at 0

#

something to keep in mind, most things in java start at 0 when numerated

spiral plover
#

Aha it is working indeed

sour island
#

Lua starts at 1

spiral plover
#

Right, so you need the -1

sour island
#

you can also just do i=0

spiral plover
#

Ah, makes sense

sour island
#

I find it's cleaner that way

#

now I know why some of the dead bodies don't get up lol

spiral plover
#
        print(player:getTraits():get(i));
    end```
#

there's nothing wrong with that loop, right?

#

it worked so I don't see what would be lol

sour island
#

damn i'm tired

#

you're right you do need the -1 on size

#

but yeah that's fine

#

Idk why I had i-1 on each iteration lol

spiral plover
#

Happens all the time when overthinking things in the name of simplicity lol

#

Thanks for all the help, I can get this Multi personality disorder working now 😎

sour island
#

ooh, what does it do?

#

rotates through sets of traits?

spiral plover
# sour island ooh, what does it do?

Pretty much! It gets all your chosen traits, then will change personalities to a secondary selection of traits. That secondary selection consists of the polar opposites of all your chosen traits, and if it has no opposite, a random trait instead.

#

It also does not swap body related ones like weight or asthmatic

grave solstice
#

Updated my Playable Arcade Machines mod with AuthenticPeach's custom animations! I have an in-world laundromat commercial that shows the new animations off! https://www.youtube.com/watch?v=mwbR0b9KQXE

New Arcade Animations in the updated Playable Arcade Machines mod for Project Zomboid.

Ned has remodeled the laundromat in East Muldraugh. Number 1 on the list - Arcade Machines!

Animations by Authentic Peach

Subscribe to the mod here: https://steamcommunity.com/sharedfiles/filedetails/?id=2445720450

β–Ά Play video
random terrace
#

How would one go about changing the item variables with lua? Changing weight of an item for example

#

I see there's methods for some, but not all

round kiln
random terrace
round kiln
#

i think its something like vanilaa revamped? icant remember, however you might find what i mean by typing sillyplunger or silly plunger in the search bar, as its like an extra mod for that

#

@random terrace

#

wait i found it

#

and i guess if you want to edit it like this way, you have to download that item tweaker mod

random terrace
#

The item tweaker api does look like it could solve my problem, thank you

#

Anyone who has experience with this though, can I change only the current instance of an item?

round kiln
#

oh but

#

seems like its kinda outdated

random terrace
#

last updated 2015 lel

round kiln
#

lol

#

i tried playing with this and that mod before

#

seems like it works still though

#

you may have to try it for yourself if it works, or ask someone else, again i got no experience from modding lol

willow estuary
# round kiln

Item properties modified by item tweaker have nothing to do with translations, that person is mistaken.

Changing item names via translation files is also one of the easiest things to do in the game. I don't know what this person is going on about.

willow estuary
# random terrace last updated 2015 lel

Item tweaker doesn't need to be updated. The code that makes it work has nothing to do with changes to PZ since 2015.
Lots of people use it; it's the gold standard for modifying items.

You don't use it and you get silliness like changes to b41 breaking items like people's "better hammers" mods not working when b41 changes to the tag system.

willow estuary
#

Also, FYI, a good 50% of all posts on workshop comments are complete nonsense, so don't pay them too much heed.

random terrace
#

Yeah, I shouldn't be too surprised to be honest

#

Thank you for the info though

#

In this case though, if there's no setter method for the specific thing im trying to change, is it undoable?

willow estuary
#

Well, if you mean modifying specific qualities of an instance of an item, you can edit some of the values with things like being an admin in MP or using debug mode.

But only some of the item properties that are modified will be persistent between saving/reloading etc.
I don't recall which ones though.

random terrace
#

Yeah, I noticed it's doable in debug mode, which is the main reason im even trying to get it done, more specifically I want to add it to my mod though, so doing it through admin or debug mode isn't what im looking for

#

Trying to make it so if a specific attachement is on a gun, it can't be put in a normal holster

harsh prairie
#

Is there a way I can create folders in the mod screen to organize my mods?

willow estuary
sour island
#

That person was probably using itemtweaker to translate before translations were easier lol.

Itemtweaker is such a barebones technique but that also makes it solid. It grabs the item after it's been defined and adjusts specific variables. Which means two mods can change the same item aslong as it's not the same variable there won't be any issue. More mods should use it.

#

Scripts are usually all or nothing per item- so you always have a competition.

spiral plover
#

Say, anyone know how I can trigger a song to play? Would love to trigger an intense song when the player resists death with the Undying trait of mine

spiral plover
#

Ahah! I've found it!

#

Now epic music will play when you resist death, and sad music will play when your doom begins hehe

spiral plover
#

hrm.. or maybe not - or maybe so, got it working

worldly olive
#

Hi guys!
Does someone knows how to apply an exp bonus on a player skill? I know that addXPBoost add the exp bonus based on a trait, but is there a way to apply the bonus directly to a skill?

sour island
#

look for references to Perks

willow estuary
#

The workshop comments.... .....are not reliable to say the least.

round kiln
#

i guess sometimes it is, sometimes its not huh

#

I'll keep that in mind

#

how hard is it to convert a mod from b40 to b41?

willow estuary
#

There's no simple answer to that.
Many of the systems in PZ are the same in b41 as b40, while the others are completely different.

round kiln
#

i see i see, so it could be very easy to do, or it would be hard that it might need a complete overhaul

willow estuary
#

Also, the when b41 stable is released, it will have a lot of changes from the current build, so even a converted mod might have the wheels come off and the engine start smoking when it releases, just to be forewarned.

worldly olive
#

Does somebody knows what the "getTimeSinceLastSmoke" returns? it is a float, but I can't understand what it means, also if I print the value and I speed up the game to see how it evolve, it reaches a maximum value of 10 before even finishing the first day so πŸ€”

undone heron
#

I know what you're trying to do cause I tried too xD

#

If you have the smoker trait, it increases over a day and increases stress.

If you don't have the smoker trait, then the value does nothing and doesn't function

worldly olive
#

I want to remove the smoker trait once a certain amount of time happened in the game and the player did not smoked on that time

#

But the counter only counts up to ten

undone heron
#

Okay, so if you just want to remove the trait, then that's possible

#

So basically you create a modData value called X since last smoked

You then add a lua event on hours, minutes, or days (that will be X).

In this event, you check if last smoked is at 10, and if it is, increase the counter. If it isn't, you reset the counter

#

Then once say... X gets to 100 (if hours do like 1000). Remove the smoking trait

#

The issue becomes once you loose smoking, can't get it back since the getTimeSinceLastSmoke stops functioning and is stuck at 10

sour island
#

when you smoke it doesn't reset?

undone heron
#

Not without the trait

sour island
#

ah, true

spiral plover
#

Pretty easy to either set it manually or just keep track yoruself

sour island
#

yeah

#

probably better to not rely on game systems like that either

undone heron
#

Oh? How would you get a specific item being used

sour island
#

Use(

#

doesn't each item have that function?

#

OnUse(*

#

You could insert the time of smoking + arbitrary time to lose it into a table saved in the player's modData, then in OnPlayerUpdate delete times that match it as you go

#

if that list ever get's over a certain length add smoker trait

#

you can also make it so new entries could have longer cooldown times based on the length of the list so it's more likely to develop the addiction

worldly olive
#

πŸ€”

#

Very interesting

undone heron
#

I don't think I seen OnUse, but wouldn't know how to really call it without using constant player update events

sour island
#

half the game is calling constant ontick events

#

don't be scared to throw in your own

undone heron
#

Yeah I try to avoid if possible

sour island
#

not an issue if it's short and sweet

#

like I wouldn't use a for in the update

#

you can abuse lua tables' keys for quicker lookup

undone heron
#

I don't want to add more (if possible).

I know I can plug into the 'smoke' time action most likely. Tho from testing with literacy and some other mods, I haven't figured out how to plug into a timed action that completes.

#

(unless that's the preform function. Which sucked when I tested it)

sour island
#
----- OnEat_Cigarettes IS NOT RECIPE CODE.  IT IS CALLED BY IsoGameCharacter.Eat() -----
-- smoking cigarettes gives more bonus to a smoker
function OnEat_Cigarettes(food, character, percent)
undone heron
#

Like wanting to increase/reset a variable on action complete and not if they stop.

sour island
#

I assume eat is called under Use( for food....unless can a player just eat them?

worldly olive
undone heron
#

would make all the addict traits

sour island
#
----- OnEat_Cigarettes IS NOT RECIPE CODE.  IT IS CALLED BY IsoGameCharacter.Eat() -----
-- smoking cigarettes gives more bonus to a smoker
function OnEat_Cigarettes(food, character, percent)
    local script = food:getScriptItem()
    percent = percent * (food:getStressChange() * 100) / script:getStressChange()
    local bodyDamage = character:getBodyDamage()
    local stats = character:getStats()
    if character:HasTrait("Smoker") then
        bodyDamage:setUnhappynessLevel(bodyDamage:getUnhappynessLevel() - 10 * percent);
        if bodyDamage:getUnhappynessLevel() < 0 then
            bodyDamage:setUnhappynessLevel(0);
        end
        stats:setStress(stats:getStress() - 10 * percent);
        if stats:getStress() < 0 then
            stats:setStress(0);
        end
        local reduceSFC = stats:getMaxStressFromCigarettes()
        stats:setStressFromCigarettes(stats:getStressFromCigarettes() - reduceSFC * percent);
        character:setTimeSinceLastSmoke(stats:getStressFromCigarettes() / stats:getMaxStressFromCigarettes());
    else
--        bodyDamage:setUnhappynessLevel(bodyDamage:getUnhappynessLevel() + 5);
--        if bodyDamage:getUnhappynessLevel() > 100 then
--            bodyDamage:setUnhappynessLevel(100);
--        end
        bodyDamage:setFoodSicknessLevel(bodyDamage:getFoodSicknessLevel() + 14 * percent);
        if bodyDamage:getFoodSicknessLevel() > 100 then
            bodyDamage:setFoodSicknessLevel(100);
        end
    end
end
#

you can litterally just have time since last smoke tracked here

#

like move it outside of the check for smoker trait

#

it's the last line of the if smoker block

undone heron
#

Is that from the timed actions file?

sour island
#

no it's in the recipes

#

server/recipecode

undone heron
#

Never looked in there cause didn't think on use would be in there. Ty for point out the right place.

sour island
#

tbh I'm just using ctrl+shift+f "TimeSinceLastSmoke"

undone heron
#

Yeah, I can do like what I did for the tooltips. Store the original in a variable, overwrite the original function, have it perform the original task, and then do my non-smoker variable tracking

sour island
#

I think I was thinking of recipes OnUse stuff

#

but it appears that's how this function is called for smoking

#
    item Cigarettes
    {
        Count    =    20,
        HungerChange    =    0,
        Weight    =    0.005,
        RequireInHandOrInventory    =    Lighter/Matches,
        Type    =    Food,
        DisplayName    =    Cigarettes,
        StressChange    =    -5,
        Icon    =    IckySticks,
        CustomContextMenu = Smoke,
        CantBeFrozen = TRUE,
        OnEat = OnEat_Cigarettes,
        StaticModel = Cigarette,
        EatType = Cigarettes,
        CustomEatSound =
    }
#

also this is what i've been working on

severe ridge
#

eating ciggies delish

sour island
#

wow that's tiny

#

wth

undone heron
#

Red circle

#

β­•

sour island
#

it's for a range scan code

#

I had it partially working- but I needed a visual to confirm

undone heron
#

For a bomb?

sour island
#

for heli attacks

undone heron
#

Ahhh yes

sour island
#

it's actually a grid- the ywllow circles are the centers

#

so 3x3s

severe ridge
#

ooo 🧐

sour island
#

it grabs all those tiles, and counts the zombies with in each 3x3

undone heron
#

Ahh, I saw the empty square in the middle

sour island
#

center is still counted- just not rendered

#

I figure I should give it center by default

#

but it's adjustable

#

between how wide the red should go

undone heron
#

Hmmm, does it do a variable amount of damage in each 3x3 section, a set amount to each zed in it, or a set total in each section?

sour island
#

this is just to identify which grid area might have more zombies

worldly olive
#

I'm still new to this world of modding πŸ˜‚

#

And mostly new to lua

undone heron
#

Yes

sour island
#

all objects have modData- it's just a table

#

just be aware other people's mod may use modData

undone heron
#

getPlayer():getModData().newVariableHere

#

Use highly specific names for it to avoid conflict

#

Like I use moonSlimeVariableName to avoid any mod data conflicts

worldly olive
#

oooooh that's awesome and could have resolve many doubts I had before πŸ˜‚
This opens a new world of possibilities

sour island
#

You can also pack lists into it

undone heron
#

I use it only when I have to. Atm my mod is causing issues with suprub survivors with modData

sour island
#

like moonSlimeVariableName = {1,2,3,4,5}

#

SS uses chunks of LetMeSpeak! - what issues are you having?

undone heron
#

Dunno how to fix atm so I just separated that section out of the main mod.

worldly olive
#

My main problem for many things was that I didn't know how to save variable values that didn't reset once the lua is re-loaded but that helps a lot now

sour island
#

it's not limited to players either

#

I use the world's GameTime object's ModData to store stuff

undone heron
sour island
#

item movement?

undone heron
#

Yeah if they moved something in or out of their inventory (inventory weight changes)

sour island
#

ah

#

The stacktrace should be pretty obvious?

#

I honestly don't think many mods use modData

#

you could be unintentionally wiping it

#

then SS is scrambling to use it

undone heron
#

Hmmmm

#

I will need to get home to get the exact error again

worldly olive
undone heron
#

This is the error I have atm from the mod page

#
function: organizedEvolution -- file: OrganizedEvolutionTrait.lua line # 38

ERROR: General , 1618473362203> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: __add not defined for operands in organizedEvolution at KahluaUtil.fail line:82.
ERROR: General , 1618473362204> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: __add not defined for operands in organizedEvolution
sour island
#

what is line 38

sour island
#

you can do what slime does and use this format:
getPlayer():getModData().newVariableHere = value

#

or getPlayer():getModData()["newVariableHere"] = value

#

they're both the same

undone heron
#

I can get you that in 15 to 20 minutes. Once I get home

worldly olive
#

The variable is created when you assign a value?

#

oooh

sour island
#

yeah, I wouldn't use table.insert

#

cause then it has no key, and it's just a hanging value

worldly olive
#

Great, will check what I can do with all this information, really valuable πŸ˜„

undone heron
sour island
#

Yeah, that's what I do aswell

#

lua tables can be finicky at times

undone heron
#

okay I am home now

#
local function organizedEvolution(_player)
    -- Get the player and check for the trait
    local player = getPlayer();
    local inventory = player:getInventory():getContentsWeight();
    local modData = player:getModData();
    -- Check to see if the stored weight is equal to the current weight the player has
    if modData.moonCurrentWeight == inventory then
        -- Do nothing
    else
        -- If the player's weight is different, add on to the variable total items moved
(Line 39)        modData.moonTotalItemsMoved = modData.moonTotalItemsMoved + 1;
        -- Set the stored weight variable to be equal to the new inventory variable
        modData.moonCurrentWeight = inventory;
    end
    
    -- Check to see if the player has moved roughly 10,000 items to and from his inventory. if so move on...
    if modData.moonTotalItemsMoved >= 10000 then
        -- Reset the count to 0
        modData.moonTotalItemsMoved = 0; 
        -- Check to see if the player does NOT have Organized or Disorganized
        if not player:HasTrait("Organized") and not player:HasTrait("Disorganized") then
            -- Give the player Organized
            player:getTraits():add("Organized");
        -- If the above check fails, check to see if they have Disorganized
        elseif player:HasTrait("Disorganized") then
            -- Remove Disorganized
            player:getTraits():remove("Disorganized");
        end
    end
    
--    player:Say(tostring(inventory) .. " / " .. tostring(modData.moonCurrentWeight) .. " / " .. tostring(modData.moonTotalItemsMoved), 1.0, 1.0, 1.0, UIFont.Dialogue, 30.0, "radio");
end
#

for some reason

 modData.moonTotalItemsMoved = modData.moonTotalItemsMoved + 1;

is breaking if it's a supurb survivor

sour island
#

results of the new and improved hitscan

undone heron
#

ooooo

#

neat

#

debuglog: Hit hit hit hit hit
XD

craggy furnace
#

lmao ikr

sour island
#

could organizedEvolution be called before modData is loaded

#

or set to default?

undone heron
sour island
#

when is your modData set

undone heron
#

Player create event

#

Also: this error only happens if SS is installed. If SS isn't installed,it works fine

#

So from what you said, it seems like it isn't making the modData when SS spawns a fake player/npc

#

So adding one more check to see if the value is nil should fix it, if I am understanding it

sour island
#

yeah

#

it might be creating the AI or some sort of template for the AI on standby

#

you could drop a print somewhere in there to print the player's name

#

I had a similiar issue with SS and conditional speech- where my character was speaking for all the AI in the world

spiral plover
#

Hmm.. anyone know where I would be able to change a firearms accuracy while the player is aiming?

#

Trying to make a Run N Gun trait where the player aim is barely effected by movement

#

I know of OnWeaponSwing but attaching anything to that just seems to cause some bugs

undone heron
outer radish
#

This has probably been asked a million times, but what the heck, here goes nothing - Is there any easy way to spawn a specific vehicle in singleplayer? I'm going for an RP scenario/challenge and would like to spawn a specific vehicle. I'm not sure if I can do that via Debug mode?

undone heron
outer radish
#

Thank you so much!

visual wasp
#

Hello im pretty new to pz modding as i got the game 2 days ago. Would anyone help me with the load order please?

harsh prairie
#

How do I see what’s causing an error message when my game starts? I don’t see any red text for mods that aren’t installed/incompatible etc.

jovial summit
#

console

harsh prairie
#

How do I look at that? Thanks!

solar mulch
#

boat mod super pog

charred ridge
#

what is vehiclesuniversaltex in \media\textures\Vehicles ?

#

it has 3 spokes wheel, a door panel and sides, a headliner and a bottom view of a car and a license plate

#

defo unused textures but what for ?

radiant ginkgo
#

Unused for now

charred ridge
#

oh ok

rocky lynx
willow estuary
spiral plover
#

Damnnn

polar prairie
#

nice.

spiral plover
# willow estuary

Reminds me of the first COD zombies map w/ the plane crash. Whats your plan for the plane crash?

willow estuary
#

Just scenery.
Like the honking big truck as well.

#
  • well, you might be able to pull a battery/headlights/gas out of the truck.
#

Well, the truck will be practically un-towable, and will spawn on the roads, and is big, so it'll function as a permanent driving hazard as well.

spiral plover
#

That's pretty awesome, will love to see stuff like that around

willow estuary
#

Thanks!

spiral plover
#

I once saw her kill 100 zombies in a lab with nothing.. but.. a.. fork..

spiral plover
#

@undone heron you were making that trait where sunlight made your eyes hurt, right?

#

I'm looking for a way to get the light level of the tile the player is on, I think your code had something to do with that, any pointers?

mortal widget
#

Does anyone have a collection of mods that are compatible for multiplayer

#

(remote play)

#

b41

sour island
#

Most mods should be fine I would imagine

#

You would have to avoid mods that use getSpecificPlayer(0)

spiral plover
#

Yeah that's the only thing to be wary of

#

@sour island you wouldn't happen to know anything about getting a tiles "light level" would you? I've been file digging but the stuff I've found has made little sense

sour island
#

I would check IsoGridSquares' methods

#

light in the game in gridbased

spiral plover
#

I've been combing though em' because of that

#

but nothing has been super clear

#

I've found ColorInfo[] lightInfo

sour island
#

that's for weather I think

spiral plover
#

Yeah, that's what I was thinking

#

it's an array of floats with 4 values for the color

#

I found a function called getDarkMulti() Thanking

#

Guess I'll see what this does

sour island
#

maybe CalcVisibility ?

#

it returns an int

spiral plover
#

oh? That might work.. getDarkMulti() just returned an error so that aint working

willow estuary
#

There's a mod on the workshop that disables the ability to read if the light level is too low; I'd take a peek at it.

spiral plover
#

Oh that is the kinda mod I was looking for!

#

ANy idea what it is called?

spiral plover
#
    local function getPlayerLight(Player)
    local player_id = Player:getPlayerNum()
    local square = Player:getCurrentSquare()
    local colors = {
        square:getVertLight(0, player_id),
        square:getVertLight(1, player_id),
        square:getVertLight(2, player_id),
        square:getVertLight(3, player_id),
        square:getVertLight(4, player_id),
        square:getVertLight(5, player_id),
        square:getVertLight(6, player_id),
        square:getVertLight(7, player_id),
    }
    local light = 0
    
    for i, color in ipairs(colors) do
        local hex_str = string.format("%x", color) -- exaple: "ffa1b2c3"
        light = math.max(
            tonumber(string.sub(hex_str, 3, 4), 16) or 0, -- "a1"
            tonumber(string.sub(hex_str, 5, 6), 16) or 0, -- "b2"
            tonumber(string.sub(hex_str, 7, 8), 16) or 0, -- "c3"
            light
        )
    end
    
    return light
end```
sour island
#

ew lol

spiral plover
#

any interesting set of actions to calculate it Thanking

spiral plover
#

Thankfully! Someone has already done the heavy lifting for this monstrosity

sour island
#

is the first argument the z level?

spiral plover
#

I- do not know, I think so

#

public int getVertLight(int i,
int playerIndex)

#
--[[ light in room (without windows, door is closed, no light-source)
                    01:00    13:00
with NightVision    48        99
no NightVision        35        103
]]```
#

thats the values the creator used

#

Sheesh

sour island
#

TIL there's a getsquare and getcurrentsquare

spiral plover
#

Haha might help optimize/shorten some functions

sour island
#

one return's current, the other returns square

drifting ore
#

Anybody else encountered something like this when adding custom .x models?

spiral plover
#

Oh sheesh lol

#

There's some terrifying monster behind you

drifting ore
#

One spooky boi

#

Supposed to be this

spiral plover
#

Ah thats a pretty neat little model! Makeshift bag?

drifting ore
#

Yeah, with extremely low loot I was getting tired of having to use tote bags and purses lol

#

Good for survivors living off in the woods

spiral plover
#

Most definitely, worth having!

sour island
#

should be able to bundle a sheet up

spiral plover
#

Speaking of issues, anyone know about why my character might be getting locked up after reloading their gun? I added player:setBeenMovingFor(0); is the only thing I added. It seems when I set it the character locks up after reloading and I have to press escape a couple times for it to finish?

sour island
#

are you on debug?

spiral plover
#

Yes

sour island
#

that's why

#

the reload code goofs with debug on

spiral plover
#

Oh really?! Sweet, that means it actually works then

sour island
#

if you wait long enough your character will randomly decide to finish reloading lol

spiral plover
#

LEt me give myself a bunch of ammo and see if it works properly then lol

undone heron
spiral plover
#

I was considering doing that as it gets the job done for most cases, but being a shadow assassin requires a little more work

undone heron
#

however... looking into that light code could very well help with a few traits and / or adding a more simplified version to literacy

worldly olive
#

Hey @sour island and @undone heron thank you both, today I was able to do what I wanted to do because you helped with that yesterday πŸ˜„ thank you both!

undone heron
sour island
#

Nice

#

try the getvisiblity thing, check what ints come back

undone heron
#

ye, I am as well able to make an addiction pack for my traits mod. so thanks chuck for the help!

sour island
#

np lol

undone heron
#

and was able to re-add organize to the main package

wary cipher
#

I promise this time i won't take down my mods

#

no houdini stuff

#

99% of you peeps don't know me anyway 🀦

undone heron
wise scaffold
#

Hello there; i need help for fouding something on the base game... i search about the rules for taking (or consuming) an item like an pills or things like that... i already found the item itself but not the rules of what happend if i take it

wary cipher
#

media-> lua -> server -> recipecode

#

take a look in there

#

if you know the item then you know the function and you can search it in there

wise scaffold
#

am i wrong or in this particular file, i just found the cigarettes thing.. but anything about painkiller/beta block pills etc...

#

i cannot do thee thing i want to do with just the cigarette model thing... i manage to create items that are substitute to the vanillia painkillers and others pills like that.. and without the call of any fonction, i don't think it'll work ^^

wary cipher
#

let me take a peak

#

item PillsVitamins
{
FatigueChange = -2,
Weight = 0.2,
UseDelta = 0.1,
Type = Drainable,
UseWhileEquipped = FALSE,
DisplayName = Vitamins,
Icon = Vitamins,
Tooltip = Tooltip_Vitamins,
StaticModel = PillBottle,
Medical = TRUE,
}

#

for vitamins its just fatiguechange in the item itself

#

quite easy

#

the item can be found in media -> scripts -> newitems

wise scaffold
#

yep i see that, and the same thing for antibiotics...

#

but for pills now πŸ˜„

wary cipher
#

item Antibiotics
{
Weight = 0.1,
Type = Food,
DisplayName = Antibiotics,
Icon = Antibiotics,
ReduceInfectionPower = 50,
CustomContextMenu = Take,
CantBeFrozen = TRUE,
Tooltip = Tooltip_Antibiotics,
Medical = TRUE,
}

#

pain killers?

wise scaffold
#

i mean painkillers yep

wary cipher
#

lets peak again

wise scaffold
#

(btw thank you for your time)