#mod_development

1 messages ยท Page 472 of 1

thin hornet
#

hope that helps

solemn tide
#

@thin hornetmods with the title IWBUMS that's for 41+ right?

thin hornet
#

@solemn tide yes latest, which mean 41.52 right now

solemn tide
#

Greeaat T-T
so many good mods but non of them work for certain on B40

#

another question. Mods that don't have any tag except mod, those should Hypothetically work between the different ones right?

thin hornet
#

dont rely on the tag, not everyone set them

willow estuary
# solemn tide another question. Mods that don't have any tag except mod, those should Hypothet...

Absolutely not.
It's a pain in the butt involving a third party solution to use tags, and most people don't use them.

If it was made in the past 1-2 years, assume it's for 41 unless it says otherwise.
If it hasn't been updated in the past 1-2 years, it might be for 40.
Honestly, unless it says otherwise on the page, just assume it won't work straight up for build 40 unless you test and confirm that it works for build 40.

#

Ain't nobody making playstation 2 games nowadays, so to speak. (I'm sure some hobbyist somewhere is, but I'm being poetic here)

thin hornet
#

xD i like the analogy

solemn tide
#

Good grief such a hassle, well it's worth it in the end, thank you to the both of you,

#

honestly same it's a good little chuck

thin hornet
#

you welcome man and good luck with this

solemn tide
#

thank you, I'm gonna need it

undone crag
#

Ahh capsidddd D:

solemn tide
#

@willow estuaryjust to clairify, if something was made before say 2020/2019 or during that time it should (SHOULD) maybe work for B40?

willow estuary
#

Yeah usually I'd guess, but there's also mods on the workshop that were made for build negative twelve in 2000 BC?

#

I mean, there's a fair amount of mods on the workshop that don't work properly for any build to be honest as well.

#

Just don't jam mods into your game like it's Katamari Damacy.

solemn tide
#

T-T it's like Building a car with nothing more than Caveman Tools

#

I hope the B41 Mulitplayer releases soon enough

#

some seriously great mods out ther

#

okaaaay.. but.. I mean

willow estuary
#

If people must shitpost and the like, the workshop channels are not the place for it FYI.

solemn tide
#

another question, if I may What about B40 mods would they work for B41?

shrewd grove
#

certain ones do

#

many dont.

#

trial and error if its not in the comments or description.

solemn tide
#

okay sweet! that would help my single player life ALOT more xD

#

thank you kindly

willow estuary
#

Comments should be taken with a grain of salt to be honest, and lot of people in them have a cargo cult-esque grasp of the technicalities involved when they make their evaluations.

thin hornet
#

also maybe a grain of pepper if you will

willow estuary
#

Shitposting, Memeing, Heated Disagreements, Drama, and flooding the channel with Gifs have no place in this channel; if you must, take it elsewhere ya zany goofballs.
Be lovely and let's keep the focus on modding in a reasonably well behaved manner.
๐Ÿคช ๐Ÿš”

thin hornet
#

Still trying to figure the perks.txt

#

somehow it require a value VERSION

#

but not sure how to format this and where

#

tried something like this

media/perks.txt
{
    VERSION = 1
    
    perk Skating
    {
        parent = None,
        translation = Skating,
        passive = true,
        xp1 = 100,
        xp2 = 200,
        xp3 = 300,
        xp4 = 400,
        xp5 = 500,
        xp6 = 600,
        xp7 = 700,
        xp8 = 800,
        xp9 = 900,
        xp10 = 1000,
    }

}

tried:

    perk Skating
    {
        VERSION = 1
        parent = None,
        translation = Skating,
        passive = true,
        xp1 = 100,
        xp2 = 200,
        xp3 = 300,
        xp4 = 400,
        xp5 = 500,
        xp6 = 600,
        xp7 = 700,
        xp8 = 800,
        xp9 = 900,
        xp10 = 1000,
    }
#

trying to follow the Block/Value scheme

#

its first parsing the string into Blocks
then it search for a VERSION value in the first block

#

then it iterate the main block childrens

dry sparrow
#

Anybody know why the 41.51 patch broke NPC mods? They can't damage zombies now.

#

Been trying to debug it and I don't see it's anything the mod is specifically doing. I'm wondering if a deeper change in how multiplayer is handled broke them.

latent orchid
#

taking a guess, but I assume it uses the loot system for weapon spawning or something?

#

that might have broken

willow estuary
#

Nah, Serious S doen't have any distro table stuff in it, the multiplayer code would be my guess as well?

#

The code for arming NPCs wouldn't be affected by that.

dry sparrow
#

Yeah, the npcs still function fine, even the weapon swing events fire.

#

But the zombies take no damage, and in fact don't stagger or react to being hit in any way.

#

Interestingly there is sometimes blood splatter though.

#

I've heard split screen play is also broken, because of the way the zombies are handled on the client now and there's only one client.

solemn tide
#

Good news!!!.. I got a pretty decent solid B40 pack going

dry sparrow
#

Wondering if something is similar here. Since the NPC is actually an IsoPlayer object, maybe they need their own copy of the zombie locations in their "client" somehow?

willow estuary
#

Huh, I mean we're fumbling in the dark here, but that sounds like a solid guess?
If anything, given what a headache the Survivor mods have proven to be for everybody involved, maybe this is the opportunity to finally rip the bandage off.

dry sparrow
#

I'm inclined to agree, just pretty sad about it.

#

Spent probably a hundred or more hours over the past month finally getting SS playable again.

solemn tide
#

actually never mind it's fairly broken T-T

#

where can I look for error logs?

willow estuary
#

Yeah, I mean I put a lot of work into my own mod that used it, but at the end of the day it was just too much of a fucking headache and people get too intense and weird about NPC mods in general IMO?
I'll just save my ridiculous ideas for when NPCs are in Vanilla and spare myself the hassle.

#

The amount of times that someone got upset and confused that they couldn't muder NPCs when in god mod, good lord ๐Ÿ˜„

dry sparrow
#

PZ players are an interesting sort, haha.

solemn tide
#

@willow estuary

willow estuary
#

Oh missed that, yeah, usernames/Zomboid/console.txt

solemn tide
#

lol you're a very wordy person xD I love it, but thank you non the less xD

willow estuary
#

But man, I would just not waste my time on build 40 stuff to be frank? I just play DayZ or something myself when I get the MP itch.

#

That's just my terrible hot take, but it just seems like a bunch of frustration and the such for a substandard iteration of the game?

thin hornet
#

better play an existing server when playing b40

solemn tide
#

I get that, but DayZ just isn't for me, waaay to many Toxic folks

#

and yeah that's an idea!

thin hornet
#

Existing server are already working well

solemn tide
#

I got some stuff working just gotta push through it ya know

thin hornet
#

arhg that perks.txt thing is getting on my nerve xD

willow estuary
#

Yeah, play on the Good Ole DayZ to get used to MP, it's an excellent MP kiddie pool so to speak.

solemn tide
#

currently, I open the game... can't craft anything and can't access the pause menu

#

I broke something but I don't know what it is

thin hornet
#

will need a pz dev to explain cause it seems that we wont figure it out D:
should be something like that from my understanding of the source code....

media/perks.txt
{
    VERSION = 1
    
    perk MyNewPerk
    {
        parent = None,
        translation = MyNewPerk,
        passive = true,
        xp1 = 100,
        xp2 = 200,
        xp3 = 300,
        xp4 = 400,
        xp5 = 500,
        xp6 = 600,
        xp7 = 700,
        xp8 = 800,
        xp9 = 900,
        xp10 = 1000,
    }
}
willow estuary
#

I'm gonna be straight up here, aside from the whole build issues, a lot of mods on the workshop are just janky as fuck. I mean, the majority of them are made by someone with a rudimentary grasp of the technicalities involved, no fault of their own, they had an idea and went for it? And it seems to get a lot worse going back.
A lot of super popular mods are just straight up broken as fuck, but people just keep using them anyways?
Less is more, you don't need 21983463298 mods in a game, and frankly you'll learn all sorts of zany things that aren't relevant to the way vanilla PZ works.

#

And the more mods you use, the chance of there being some corner case mod conflict that breaks shit, even if the mods work properly by themselves, increases exponentially?

thin hornet
#

yup

willow estuary
#

I see a lot of mod packs on the workshop that have multiple mods that straight up will cancel each other out.

#

Trunk space mods are know to despawn vehicle contents on a regular basis, but people keep insisting on making + using them so ๐Ÿคท

thin hornet
#

My mod LiquidOverhaul does override existing game function cause thats the only way to do it. So it's like sure gonna break with anything trying to do the same

winter bolt
#

i dont really understand the trunk space mods to begin with

#

the trunks i usually find in cars have enough space and you can upgrade them with mechanics anyway

willow estuary
#

People use every gun mod on the workshop at the same time and then get confused when Barry's Weapons MP5 submachinesguns don't accept the MP5 magazine from Shlobby's Shooting Time.

thin hornet
#

xD

winter bolt
#

reminds me of how almost every popular minecraft mod used to add their own version of copper

near copper
#

Can i ask an experienced modder a question here?

#

Anyone?

thin hornet
#

i quit for perks.txt, when anyone get the answer ill be more than happy if you can share the solution ๐Ÿ˜›

#

@near copper just ask if someone can he\she will answer

near copper
#

@thin hornet can i ask you a question?

thin hornet
#

@near copper yes

near copper
#

i forgor ded

thin hornet
#

xD

near copper
#

I want to do this to rj so bad

#

Why is this so funny to me

#

Im giggling like a little bitch lmfao

willow estuary
near copper
#

Alright alright

thin hornet
craggy furnace
#

nice

latent orchid
#

I'll throw in another 10 as well. Interested to understand what sounds like a neat new feature. Especially for things like modded literature

craggy furnace
#

more interesting in actually taking apart magazines

nimble spoke
#

my plan is to check that tomorrow, as I need to plan a phasing out for my extra skills system

willow estuary
#

Well this dummy janitor has his box of pins ready whenever one of you smart feller's solves the mystery.

craggy furnace
#

or total renovation

nimble spoke
#

for now I'll need to keep it there and working for those still playing 41.50 saves

#

or anyone who got modded skills really. And make it not give my system skills anymore for new saves

#

I'm not a fan of nuking people's saves

thin hornet
#

Well iwbums does nuke save everytime it updates. It suck to manage backward compatibility when mod is more complexe.

#

Would be nice if the Workshop did have a versioning system.

nimble spoke
#

if perks.txt foes through the ScriptParser then it must be built like the other txt files, for items, vehicles, models and so on

willow estuary
#

My terrible take on this situation is this is all a sand castle until build 1.0 is stable?

#

It's one of the reasons I don't use the version tags myself.

thin hornet
#

no matter how i try it nothing works always get the missing VERSION error that is into the CustomPerks class

thin hornet
willow estuary
#

Yeah, never tried myself, but I think there's been some weird corner case issues involving it anyways?

thin hornet
#

But i mean when uploading our mods to the workshop it would be nice to have version for 41.50, 41.51, 41.52 this way it would just install the proper version of the workshop mod based on the subscriber game version. This way when i update the mod for a new game version it doeant overwritte those on 41.50

winter bolt
#

you could just include different mods for each version inside the workshop folder

willow estuary
#

You can have multiple mod directories and mod IDs in the same works.... ..yeah that.

thin hornet
#

thats what i did but still thats a little bit messy and save game has to be edited to select the old version

#

for exemple my latest is named
MyMod
and the older one is renamed to
MyMod4150

but save game is using MyMod still so if the person is not aware of the update he will not edit the save game.

winter bolt
#

true but they would probably end up checking the workshop page in that case

willow estuary
#

Yeah, trying to work around all this seems like a clusterfuck of endless headaches?

So this cowpoke doesn't have a rear view mirror in his hot rod.
I say rip the bandaid off and submit to the cruel wheels of progress?
But I don't get attached to SP saves, so I'm unsentimental about it myself.

#

Guess it stings when you're one of those megabase/1 year challenge/etc types and all.

thin hornet
#

Yeah but subscribers are players and most likely care about their save games. And will complain if we mod maintainer nukes their saves

#

haha

#

its a mess

sour island
#

If you can I would leave the original mod alone and name the new versions going forward

willow estuary
#

Yeah, I mean I spammed the workshop for 1.5 years and have over 100 mods, so, um, I can barely keep on top of one version? ๐Ÿ˜„

thin hornet
#

That could be a better way i agree chuck

#

yeah so updated clients has to start a new game anyway so they'll select mods again

#

i cant make too many mods i just made one yet and its quite something to maintain and upgrade.

willow estuary
#

At the end of the day it comes down to what you, the mod creator, have the time and energy for. ๐Ÿคท

thin hornet
#

Yeah sure

#

I cant overwelm myself xD

willow estuary
#

Exactly. Don't let is run you ragged or anything?
This isn't pacemaker firmware or anything.

thin hornet
#

In the sense that when game updates ill have to update multiple mods

nimble spoke
#

uhhhh I couldn't find error messages or any related message to be honest. Hard to figure out what I'd need to "fix"

nimble spoke
#

yeah

thin hornet
#

check the console.txt

nimble spoke
#

exactly, nothing relevant there

thin hornet
#

no exception?

nimble spoke
#

ohhh it's probably case sensitive and I had it named Perks.txt

thin hornet
#

it should be before lua is loading

#

oh yes it is

nimble spoke
#

still nothing

thin hornet
#

placed in media directory of the mod?

#

media/perks.txt

nimble spoke
#

yeah

thin hornet
#

did u try restart the game

nimble spoke
#

yeah, doing it one more time now

thin hornet
#

you are on 41.52 too i guess

nimble spoke
#

yeah, could you share what you've tried so far?

thin hornet
#

search perks.txt in this channel i pasted many exemple

#

didnt paste all exemple i tried

#

it should be a value in the main block

#

if im not mistaking

#

Blocks contains values and children blocks. and so on.

#

that value seems to be called VERSION in caps and must be equal to 1.

#

its specific to perks.txt only..

tropic shuttle
#

Anybody know what mod is causing this popup about the item? It keeps happening randomly and I can't figure out how to disable it

#

It shows things like shovels, guns, pens, but never items I can see

willow estuary
#

I guess it's an optional setting in the gunslinger thingy that brita's uses?
And I assume that you're using Superb Survivors and that the NPCs weapon info is being sent to that, because there's all sorts of corner case jank like that with it.

tropic shuttle
#

Yes I am using both

thin hornet
#

arsenal mod

#

if you have mod option you can toggle it in the settings

tropic shuttle
#

I'll do that then, thank you

nimble spoke
#

well, no errors or messages. I'll take a look tomorrow

thin hornet
nimble spoke
#

awwww fuck, the creator of the system just sent me an example

thin hornet
#

ill have a look haha

#

omy

#

thats all xD

#

Adding custom perks to media/perks.txt


VERSION = 1,

perk CustomPerk1
{
    parent = None,
    translation = CustomPerk1,
    passive = false,
    xp1 = 0,
    xp2 = 0,
    xp3 = 0,
    xp4 = 0,
    xp5 = 0,
    xp6 = 0,
    xp7 = 0,
    xp8 = 0,
    xp9 = 0,
    xp10 = 0,
}

perk CustomPerk2
{
    parent = CustomPerk1,
    translation = CustomPerk2,
    passive = false,
    xp1 = 50,
    xp2 = 100,
    xp3 = 200,
    xp4 = 500,
    xp5 = 1000,
    xp6 = 2000,
    xp7 = 3000,
    xp8 = 4000,
    xp9 = 5000,
    xp10 = 6000,
}

perk CustomPerk3
{
    parent = Combat,
    translation = CustomPerk3,
    passive = false,
    xp1 = 50,
    xp2 = 100,
    xp3 = 200,
    xp4 = 500,
    xp5 = 1000,
    xp6 = 2000,
    xp7 = 3000,
    xp8 = 4000,
    xp9 = 5000,
    xp10 = 6000,
}

Translation File:
media/lua/shared/Translate/EN/IG_UI_EN.txt

IGUI_EN = {
    IGUI_perks_CustomPerk1 = "Custom Perk #1",
    IGUI_perks_CustomPerk2 = "Custom Perk #2",
    IGUI_perks_CustomPerk3 = "Custom Perk #3",
}

LUA Client:

print( "CustomPerk1", Perks.CustomPerk1, 'parent', Perks.CustomPerk1:getParent() )
print( "CustomPerk1", Perks.CustomPerk2, 'parent', Perks.CustomPerk2:getParent()  )
#

i was so close xD

#

Tested and seems to works, but it's not adding to the Skills UI

#

ill try adding some XP and see it that adds it

willow estuary
#

Do I need to unpin that post? ๐Ÿ˜„

#

How about I give you a day or so to work out the kinks, and then we can pin something?

sour island
thin hornet
#

Dont need to unpin thats the code from the creator of the system

willow estuary
#

Okay, I'm just gonna switch the pin to a post with the archive in it then.

thin hornet
#

I was just expecting it to be visible in the UI

#

ill do that Chuck

willow estuary
thin hornet
#

mhm interesting

#

@sour island after checking ISCharacterInfo.lua its should have loaded custom perks too. It say that custom perks are loaded before lua so they should already be in the array when it makes the UI.

#

but im guessing it might be because i made a passive skill

sour island
#

passive skills aren't listed iirc

#

there's two types of skills one is more of a category system

thin hornet
#

to have a passive perk to show up you must set the parent to parent = Passiv,

#

this way it will show up

sour island
#

skills need a parent category

#

which I think is a skill aswell?

thin hornet
sour island
#

ye

thin hornet
#

parent is a perk too yeah

#

but its a category perk

#

Crafting, Survivalist, Firearm, Combat, Passiv, Agility

latent orchid
# thin hornet parent is a perk too yeah

so in theory you could have a mechanic perk with things like tire, suspension under it which skill books could boost. then you link code to those skills to provide higher chance of repairing those parts of a car?

late hound
#

@ruby urchin Hey I am trying out your clothing model guide, and I am finding that the 3d-convert.com website that you linked and recommended is not working for any of the skinned .X models that I am putting into it. It keeps giving me an error that reads: "An error occurred during the conversion".

undone crag
thin hornet
latent orchid
#

yeah, bad example....but you could have granular skills

sour island
#

You'd have to find the spots that add the xp and apply it to your skills instead in lua

thin hornet
#

but yeah you can do anything with the custom skills

#
---OnEveryTenMinutes
local function OnEveryTenMinutes()
    ---@type IsoPlayer
    local playerObj = getPlayer()
    playerObj:getXp():AddXP(Perks.Skateboarding, 1000)
end

---OnAddXP
---@param character IsoGameCharacter
---@param occupation
---@param amount number
local function OnAddXP(character, occupation, amount)
    print( "Added XP to:", character:getFullName(), "occupation:", occupation, "amount:", tostring(amount) )
end
sour island
#

glad someone bugged them about it coolestmonkey

thin hornet
#

one thing i hope the new multiplayer will do is save character on the server side its unrealted to the skills subject but just though about it

sour island
#

I got save-able zombieAI working via attachedWeapons - shotout to @nimble spoke ranch

sour island
thin hornet
#

well since they rewriting it i do too

#

b40 was a patched mp so i guess they had limitation

thin hornet
sour island
#

yeah

#

zombies aren't saved like items or players - it's as barebones as it can be -- even changes done to the zombie sometimes aren't saved

#

so I can't spawn in a zombie and give it a new item

#

but I can define an outfit to always have an attachedWeapon and run a function in zombieUpdate and check for that item - and apply behavior

#

which is convoluted but it works pretty well

undone crag
#

Spawning an isoSurvivor with survivor factory and making it wear a suit and sunglasses and carry a hammer spawns a shadow with an upright hammer on the ground so it has to be an isoPlayer NPC for now it seems :/

sour island
#

don't use isoSurvivor

undone crag
#

There's the thing you can do what's called something like isZombifiedPlayer for the zombie

sour island
#

you're better off using isoPlayer and giving it extra variables under modData

undone crag
#

Yes I was commenting on an earlier conversation saying maybe isoPlayer survivors might have been broken because of multiplayer code.

sour island
#

theres alot of functionality that written into isoPlayer than isoGameCharacter doesn't have unfortunately

#

nah isoSurvivors have been a bit of a dead end for a while

#

they were the original NPCs

undone crag
#

hmm
Also about the zombie's clothes there's a thing for that that someone like planetagol was using.

sour island
#

terrorzeds?

undone crag
#

that's one yes.

sour island
#

His special zombies wouldn't save from what I saw

undone crag
#

Aww

sour island
#

unless they're outfits

undone crag
#

It saves the zombie that's your player and its items somehow though.

#

Oh his code says zombie:setReanimatedPlayer(true)

sour island
#

zombies save the outfit types as far as I can tell

#

oh? I should look into that

undone crag
#

He did something in onSave which I only see trigger right after you load though. :/

#

He does local setReanimatedPlayer = setReanimatedPlayer twice in the same file and doesn't use it D: ree

sour island
#

reanimatedplayer doesn't seem to be referenced anywhere in the java

#

besides itself

#

in setters and getters lol

undone crag
#

Aww

#

Are you using capsid?

sour island
#

yeah, I wouldn't be surprised with the new saving techniques if it broke those kinds of mods further

sour island
sour island
#

another sneak preview

undone crag
#

Aha how about this, you spawn an isoPlayer in the suit, then you get it infected and reanimated as a zombie?

sour island
#

for the AI? I'm using invisible attached items - like when there's a weapon sticking out of the zombie's cheat

undone crag
#

Bah humbug

sour island
#

it can't be removed - so it works pretty solidly

undone crag
#

Actually that could work if they were on custom bodylocations. Or the custom bodylocations may be unnecessary.

#

hang on maybe that wouldn't make sense umm

#

:|

sour island
#

I made a custom one lol

#

It pays to preemptively avoid compatibility issues

#

it's on github if you want to mess with it

undone crag
#

Before the update for easier clothing modding I had started using things like this to attach a model to the player's attached weapon locations to make clothing show up which became redundant D:

#

Github whar?

sour island
#

Fortunately the zombieAI items don't have visual components

#

haven't gotten into clothing modding yet outside of textures

undone crag
#

What's a zombieAI item?

sour island
#

the attached items I mentioned above

undone crag
#

Oh you said invisible, I missed that word.

sour island
#

no worries lol

#

basically during the lua event ZombieUpdate I check their attached items

#

and compare their types to entries in a lua-class's functions

#

if there's a match it runs that function

undone crag
#

Farewell

viral spire
#

Regarding the Toxic fog mod, does the fog actually kill you in that mod without a gas mask? Or does it just leave you with a sliver of health no matter how long you're in it for? I know the original toxic rain mod did that and I was always bothered by it.

#

Don't know how much even a single mod affects the game crash-wise, but that'd be the only mod I'd plan to use for my PC until I upgrade.

thin hornet
#

Anyway to make zombies ignore player without making player invisible?

indigo holly
thin hornet
#

zombie:setUseless(true) does the trick to be ignored by a specific zombie but they stop moving completely

viral spire
#

Has anyone made a Toxic Snow mod? Or does the Toxic Rain mod also apply to snow?

pastel olive
#

is it possible to save custom values to items

#

hmm maybe i can use item type as drainable

#

and use usedDelta as a custom variable for my use

#

is it possible to do a recipe without result

#

ok found a way

#

can anyone explain how getModData() works

sour island
# pastel olive can anyone explain how getModData() works

Every object in the java side of things is given a Lua table that can be called by using object:getModData() that's about it. You hould be aware many mods use this same table as you so you should name keyed variables something unique or nest your variables inside another table. Also recently found out zombies don't save their modData and anything on zombies does not either.

#

Also I believe it has to be a simple table, i.e. : only strings, numbers, booleans, and other simple tables (nested). If you live reference other objects I don't believe it will save that entry.

pastel olive
#

thanks

#

im trying to check a getmoddata inside a recipe onTest

#

is second argument is list of item or something?

#

first one is result item as far as understand

#

like recipe result

sour island
#

I'd have to check, some of the recipe step functions don't have the items then and there

#

I think ontest checks for them by type though? What is it returning?

pastel olive
#

oh wait

#

they are both object of item

#

but im not sure are they InventoryItem

#

or somethinge lse

#

i think its a Item class

#

not InventoryItem

sour island
#

I'd look into one of the other steps, there's alot

pastel olive
#

what do you mean

sour island
#

Recipe crafting includes a few steps to it, including time actions

#

You could probably find a step that's better suited and actually has the items in question

#

I assume you're trying to make sure an item can be crafted?

#

Based on a custom value?

pastel olive
#

im trying to check items getModData before creation

#

yeah

indigo holly
pastel olive
#

can i make a menu that will open when right click on the item?

sour island
#

I would help more but I gotta go to work

pastel olive
#

ok you already helped me alot thanks

sour island
#

And yes you can had custom context menus but I've not done it personally

pastel olive
#

looks like im quite stupid

#

i checked games code by decompiler

#

should have did earlier tho

#

in OnTest first argument is InventoryItem second one is recipe result as Recipe class

sour island
#

Happens, some of the arguments flip depending on the step

trim tartan
#

this is probably a dumb question but is there documentation for project zomboid?

#

and if so where

pastel olive
# trim tartan and if so where

i didnt see any documentation but you can use any java decompiler and games lua code or other mods lua code to understand how modding works

dry sparrow
pastel olive
#

so best way to understand is look inside mods or game code

trim tartan
#

looks like i gotta do some investigation

pastel olive
#

yeah

trim tartan
#

i also haven't touched java too much so i guess ill find out

pastel olive
#

:p

ruby urchin
trim tartan
#

thanks ๐Ÿ‘

swift sequoia
#

Anyone else having trouble with Java Decompiler not working after update?

thin hornet
#

did you change to java15/16?

#

41.51 is now on java15

swift sequoia
#

I don't see a way to do that in JD

thin hornet
#

i cant help with that i use capsid on Intellij IDE, all i needed to do is to set my project to use jdk15

swift sequoia
#

Bumer. I think you're probably right. The decompiler I use is named 'Java Decompiler', is open source and standalone... and hasn't been updated in 2 years. Java15 was released in 202

#

2020*

#

I guess I need to find a new decompiler program.

vague thorn
#

Is there a pz randomizer?

thin hornet
mellow oyster
#

so how do i get my stupid survivors to use britas competently

#

as of now they just seem to infinitely reload unless i active infinite ammo cheats

dry sparrow
#

Subpar Survivors has brita's compatibility, but it and Superb Survivors are broken right now in 41.51/52

mellow oyster
#

ok, well will it work on 41.50

#

since thats what im on

dry sparrow
#

Subpar works pretty well on 41.50, yeah.

mellow oyster
#

Ok, as long as they dont inf reload like me whenever i reload then thats good

#

haha

#

thats another thing why are their reload functions always so glitchy lol

dry sparrow
#

The infinite reloading bug fro m Superb is fixed, yeah.

mellow oyster
#

cuz every single weapon mod ive ever had makes inf reload bug happen

#

even to my character and its super weird

dry sparrow
#

Reloading in PZ is surprisingly complicated. You have hand-loaded weapons, mags, clips, guns that are chambered or not, multiple mags of different sizes, ammo loose or in boxes, multiple containers ammo could be in.

mellow oyster
#

ye but like every single weapon mod has always had broken reload mechanics and its weird lol

#

i gotta like run or shove to stop reloading haha

#

does soul filchers turning time work in 41.50, and whats it add?

sour island
#

It adds new types of enemies and yes it works

sour island
viral spire
sour island
#

You can be very careful with overwriting - by storing the original function and sliding it's return it into your own iteration of the function (then handing it off to any other iterations) but all it takes is one person to break that chain.

mellow oyster
#

i only have britas mod

#

so idk what could be overwriting certain weapon reloads

sour island
#

Only only his mod?

mellow oyster
#

yep

#

i think at one point i had scrap weapons mod

dry sparrow
#

Brita's requires gunfighter as well, so that could be your problem.

mellow oyster
#

i have a bunch of other mods that make items usable as weapons but nothing that is related to guns

#

i have gunfighter too

#

like you can use a random bucket as a weapon

#

cuz realism.

sour island
#

There could be something off about reloading in general. I noticed if you speed up time it can get reloading stuck?

#

But I'm usually on debug mode, so reloading sometimes just lockups forever

undone crag
winter bolt
#

oh thats what ghost mode does?

#

i assumed it was meant to make you invisible but just didnt work

undone crag
#

:o

#

Maybe if you're running Cheat Menu it sets you to not be in ghost mode.

winter bolt
#

never used cheat menu

sour island
#

I'm working on custom zombie AI I'll let you guys know if I run into anything- or let me know if you do lol

undone crag
#

Hmm

sour island
#

There's a toothless feature I want aware of

#

Could be used to make "jawless" zombies.

winter bolt
#

does it make them unable to bite?

tulip valve
#

Anyone know how I can make it so upon taking a trait, all bags weight reduction is 100%?

I have this code:

local packmule = inventory:AddItem("Base.Bag_ALICEpack")
packmule:setWeightReduction(100)

Altough it spawns a specific bag into the inventory and reduces the weight reduction by 100% but I want to do this with all bags and not have a certain bag added to inventory to reduce weight hmm

#

Maybe this could work?

local packmule = getItemContainer():FindAndReturn("Base.Bag_Schoolbag")
packmule:setWeightReduction(100)

sour island
sour island
tulip valve
#

so getItemContainer is wrong?

sour island
#

You may have to forloop it but I think there's an eval function from players inventory

tulip valve
#

Don't understand that ^^

winter bolt
#

yeah pulling down would probably still work

sour island
#

I don't know what get item container is exactly getting in this case

winter bolt
#

dont need teeth to pull someone apart lol

sour island
#

Since there's nothing Infront of it- I would assume it's getting the general class and not a specific player's inventory

tulip valve
#

local packmule = getItemContainer():FindAll("Base.Bag_Schoolbag")
packmule:setWeightReduction(100)

Shouldnt this work? It checks for Bad_Schoolbag, if it finds it sets it to weightreduction 100

sour island
#

If you're trying to make it a trait it will break with co-op or multiplayer unless you make sure the item changes based on it's location.

#

But that's an issue for another day

tulip valve
#

I'm just making it for myself, for now ๐Ÿ˜›

#

Yes it is supposed to be a new trait

sour island
#

If your not familiar to Lua or progranming- getX() with nothing Infront is getting the template of X so to speak. Player:getX() would more likely return the players X.

#

If you're just making this for SP use you can use local player = getSpecificPlayer(0)

#

That would let you spawn the bag in your inventory and change it

#

To adjust items based on player a players trait I would look for item transfering

#

There's most likely a function or Lua hook for it- and you could even prevent other players from gaining the benefit that way.

tulip valve
sour island
#

I would look into timed actions

#

There should be one for looting

#

And it should have the item being transferred

tulip valve
#

Ah

sour island
#

You can use instanceof() to check if it's a....... inventoryContainer?

#

I keep getting itemContainer, inventoryItem, and inventoryContainer mixed up

sour island
#

InventoryContainers should be the bags cause inventoryItem is the base

tulip valve
#

ItemContainer is probably it

sour island
#

But the actual list object is itemContainer

#

Iirc

#

Like mapobjects can have itemContainers, players inventory's are actually the players' itemContainer

#

Unless I got them mixed up

#

Idk if this helped

#

But good luck

tulip valve
#

Thanks! I will just make it spawn a bag in inventory and change its weight reduction, doing it any other way seems way too advanced for me ^^

sour island
#

No problem, and enjoy

late hound
#

@sour island Not sure if you have tried out the tutorial and reading the code as you go along in it. It showed me probably the only actual uses for these zombie states such as toothless or blind/deaf

quartz kite
#

I have an idea for a revolutionary project on project zomboid, to make a roleplay life server with jobs in a small town.
People who would be interested in helping me?

sour island
#

stomps

late hound
#

I also tried breaking the tutorial too, much fun

nimble spoke
#

ohhh I think I broke it a few times before it was patched

worldly olive
#

Hi!
Does somebody knows how GameTime.getAnimSpeedFix() works? all usages I see if I'm understanding correctly are for the different game speeds. But I'm probably misunderstanding it

undone crag
#

Does Blender have a scale function where instead of scaling the vertices all away from one point they scale them away from their bones?

#

For making them thicker or thinner?

calm portal
#

@craggy furnace @sour island would it be possible to add a CDC Helicopter Event? Goes around circling large groups of infected. And when it crashes spawns Hazmat zombies/corpses?

sour island
nimble spoke
#

@undone crag blender does have that, but I don't remember the name

calm portal
craggy furnace
#

@calm portal ill merge them into army helicopters maybe

#

i have hazmat stuff lying around anyways

calm portal
#

Nice. It be cool to see given that its confirmed they are sending scientists into the exclusion zone to 'conduct tests'

#

Also, what do the anarchist helicopters do? I had one crash. But it didn't do anything too noticeable.

#

It be cool if they blared music or something to stir around zombies

craggy furnace
#

they shoot players

#

they probably will blast something

calm portal
#

Ahhh got it

sick walrus
#

What mods are already ready for the new build 41.52?

nimble spoke
sick walrus
nimble spoke
#

the ones not updated yet are blacksmith, building time and dressing time

sick walrus
craggy furnace
#

legit probably one of the best mod lists in PZ right now

nimble spoke
#

ohhh thanks!

tiny geyser
#

i cant plant seeds because the seed menu doesnt open anyone knows why?

#

i suspect its caused by an outdated mod but idk which

winter bolt
#

is there any way to delay the loading of a lua file until after another lua file is loaded?

winter bolt
#

that doesnt work for my situation

#

i need to let other mods add stuff into a list but the function will end up running before other mods can even add into that list

nimble spoke
tiny geyser
#

oh well im not removing hydrocraft so no planting until it updates i guess

nimble spoke
winter bolt
#

ohh i think OnMainMenuEnter might work

#

how do you add a function to an event in lua again?

nimble spoke
#

it works but doesn't cover all cases.

winter bolt
#

i'll try it out and see

nimble spoke
#

Events.OnMainMenuEnter.Add(yourfunction)

winter bolt
#

the problem is that i think making the function load any later might break the game because its messing with the bodylocations directly

#

ok thanks

nimble spoke
#

ohhhh that's exaclty what I'm working on lol

winter bolt
#

lmao

#

adding new body locations?

nimble spoke
#

yeah, compatibiity for separate mods

winter bolt
#

same lmfao

#

i've never written anything in lua before so mine is very scuffed

nimble spoke
#

I'm halfway through it

#

it works if you have the mod enabled and go for a new character/save

#

but if the mod isn't enabled I need another event for loading

#

ohhh and there's one for loop I need to fix

#

right now exclusive locations don't work

winter bolt
#

i've managed to include stuff like exclusions and multi items but i havent tested them yet

#

yeah adding the function to OnMainMenuEnter didnt do anything for me

#

what i did was manually add all of the vanilla bodylocations to a table and then just replace BodyLocations.lua entirely and use the list to add the body locations instead

#

i couldnt figure out where the table of body locations was actually stored so i just opted to overwrite the whole file instead

drifting ore
#

how come i cant host a Server with mods on 40 build tho

#

like the reason it was disabled

nimble spoke
#

exactly what I did, it is the only way to allow mods to add locations where they should go and not at the ned of the list

winter bolt
#

yeah i mean like at first i tried to insert new ones directly into the table but i couldn't figure out where it was stored

nimble spoke
#

it's a java thing, and what you see in vanilla BodyLocations.lua may be the only way of interacting with that list

winter bolt
#

yeah probably

#

is there any way to see all of the events?

nimble spoke
#

there's an online list but it is outdated

winter bolt
#

i might be stupid

#

i forgot to actually enable the mod

nimble spoke
#

I know the feeling

winter bolt
#

now i'm getting errors lmao

#

beginning to think i dont like lua very much

sour island
#

Like adding another folder past what you need to load first

winter bolt
#

hmm

sour island
#

If these are all your files you can use _ and numbers

nimble spoke
winter bolt
#

yeah yours is way better organised than mine lmao

nimble spoke
#

feel free to use that version. If you make any improvements let me know

winter bolt
#

okay thanks, i'm just trying to figure out why mine keeps erroring

tawdry kelp
#

@nimble spoke by the way, dunno if you've heard but learning time makes skill books unreadable now

nimble spoke
#

Are you sure that's the mod causing the issue? I know Extra Skill System had that bug but it was fixed today

winter bolt
#

well i'm not getting errors anymore but now i am actually getting the issue of it not loading mods before the bodylocations file

winter bolt
sour island
#

ah

#

what are you trying to do again?

tawdry kelp
sour island
#

Oh did you update extra skills to work with the exposed perks stuff? ๐Ÿ˜ฎ

#

that'd mean skill recovery journal can work with it

winter bolt
#

my script overrides the game's BodyLocations.lua file and hijacks its functionality so that mods can add their own bodylocations to a list without needing to overwrite the vanilla file

#

it then reads that list and adds them as body locations like how the vanilla game does it

sour island
#

ah

winter bolt
#

but the problem is that any mods that insert new locations wont load before the bodylocations file

nimble spoke
#

@winter bolt if all those mods include the same new version of the file it won't be a problem, if they don't then they're risking a broken table insert anyway

sour island
#

Can't you just add bodylocations this way?

#

sorry I'm not sure what issue you're having with regards to something being overwritten

winter bolt
#

you can but that adds them to the end of the list

#

it needs to be in render order

sour island
#

aaaaah

#

do you have particular orders in mind?

#

like X has to be before Y, etc?

nimble spoke
#

yeah, the whole clothing system depends on that

#

you have to be very specific about the order to avoid weird combinations

sour island
#

You could make a sister table with a vanilla location to match

#

and insert based on position

winter bolt
#

i've done that

sour island
#

oh

winter bolt
#

the problem is that any lua files from mods that try to insert into the table arent loaded before theyre added as bodylocations

#

so they'll get left out

nimble spoke
#

again...... if all such mods include this new lua version that's not an issue

sour island
#

you are inserting into the same table though?

#

if they flatly overwrite it with their own list that's kind of on them?

#

can't work around that

nimble spoke
#

we can set up a system that works

sour island
#

hold on

nimble spoke
#

or.... as a last resort, I handle the file to a dev and explain the situation

winter bolt
#

i just realised i havent actually been replacing bodylocations.lua the whole time

#

i had it in the wrong folder

#

and now i replaced it i'm getting even more errors lmao

sour island
#

you could try the event "OnGameBoot" ?

nimble spoke
#

I don't remember if I tried that one

sour island
#

so its not loaded when lua is loaded but after

nimble spoke
#

it may be too late, I'd have to test

sour island
#

there's also "OnResetLua"

#

which is when ever it gets loaded

nimble spoke
#

right when it finishes or when it starts?

sour island
#

it's at the end of the reset lua function

#
      LuaEventManager.triggerEvent("OnGameBoot");
      LuaEventManager.triggerEvent("OnMainMenuEnter");
      LuaEventManager.triggerEvent("OnResetLua", var2);
nimble spoke
#

I'll give that a try, thanks

sour island
#

np

#

the second var is a string denoting when/why it's being reset

winter bolt
#

i'm now getting a completely unrelated error where the character creation lua file cant find "Hat"

sour island
#

๐Ÿคท

nimble spoke
#

not totaly unrealted, during my tests if it dailed to load properly in time I'd get those errors too

#

ok, OnResetLua covers changing mods and then back to main menu but not just starting the game, so I guess I need all those 3 events

sour island
#

ongameboot is just turning the game on

nimble spoke
#

looks like these 3 events cover all cases I can test right now, I may need to add one more later for MP

sour island
#

I know theres an event for coop join

nimble spoke
#

for now I need to fix the for loops for exclusive locations and hide locations

#

and the file will be ready for the mods

nimble spoke
#

So Chuck helped me figure out what I had done wrong in the final pieces. Now it is working as intended. If you guys add this file to your clothing mod and insert into those tables our mods should be compatible

#

I'm going to update my Dressing Time with it tomorrow

winter bolt
#

wouldnt it be more efficient to have like a function that you can use to insert into it?

sour island
#

the group stuff is the built-in way to insert

winter bolt
#

i mean into the list

#

the group one just adds a new location to the end

sour island
#

if you wanted to add your own parts to the list you could insert into it yes

winter bolt
#

but that would defeat the point of having it in the first place lol

sour island
#

I'm still not sure what this is for to be honest, i Just noticed like 3 actual letters that were wrong lol

#

I gathered you'd be using his list as a shared resource to make everything work together

#

how would inserting into his list defeat the purpose?

sour island
#
---@param newValue string The name of the new location being inserted
---@param insertHere string "newValue" will be placed after (by default) a list entry matching this; if "insertHere" not defined will insert at the end
---@param bFore boolean if true place "newValue" before "insertHere" onthe list, otherwise after
function InsertNewLocation(newValue, insertHere, bFore)
    if insertHere then
        for n, v in pairs(CreateLocation) do
            if v==insertHere then
                if bFore then
                    insertHere = n
                else
                    insertHere = n+1
                end
                break
            end
        end
    else
        insertHere = #CreateLocation+1
    end

    table.insert(CreateLocation, insertHere, newValue)
end
#

@nimble spoke if you wanted something for people to use

#

@winter bolt is this what you meant?

hybrid palm
#

@thin hornet sorry for the ping,
i had this problem with the gas fill option on gas station
i just found out that for some reason "Coco Liquid Overhaul" broke Gas station Fuel pump option on version 41.50 PZ
Whenever i tried to take gas, it always give this bug

ERROR: General     , 1626921996015> 
ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in GetFuelStationOnSquare at KahluaUtil.fail line:82.

ERROR: General     , 1626921996016> DebugLogStream.printException> Stack trace: java.lang.RuntimeException: Object tried to call nil in GetFuelStationOnSquare```
thin hornet
#

@hybrid palm do you have the mod version for 41.50 enabled?

hybrid palm
#

yes

thin hornet
#

hum

hybrid palm
#

i was assuming this was from CLO based on this stack trace

LOG  : General     , 1626921996015> -----------------------------------------
STACK TRACE
-----------------------------------------
function: GetFuelStationOnSquare -- file: CLO_Functions.lua line # 81
function: GetAvailableFuelOnSquare -- file: CLO_Functions.lua line # 95
function: Context_TakeFuelFromPump -- file: CLO_Context_TakeFuelFromPump.lua line # 44
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@7f6dd557
function: createMenu -- file: ISWorldObjectContextMenu_LetMeThink4150.lua line # 420
function: createMenu -- file: ISMenuContextWorld_LetMeThink4150.lua line # 51
function: createWorldMenu -- file: ISContextManager.lua line # 28
function: doRClick -- file: ISObjectClickHandler_LetMeThink4150.lua line # 48
function: onObjectRightMouseButtonUp -- file: ISObjectClickHandler_LetMeThink4150.lua line # 347
thin hornet
#

what is _LetMeThink4150 is that an other mod

hybrid palm
thin hornet
#

im looking into the bug

#

its hard to support both version, I tried to take a commit version prior to the update but might have messed up

#

i have to downgrade my game to test it

hybrid palm
#

hahaha, Thank for the help!
Sorry for the trouble ๐Ÿ˜†

sour island
#

Out of curiosity what had to be changed between versions?

thin hornet
#

Fuel Pump uses new functions

sour island
#

To remove/count fuel?

thin hornet
#

and i was working on a massive rewritte while the game update happened

#

yeah

sour island
#

Are you overwriting the entire function?

thin hornet
#

i am not overwritting it, i just make my own function and at the end i set fuel to nil which make the original context menu think there is no fuel so it doesnt run.

#

i am only overwritting some actions specific functions

sour island
#

Are they timed actions?

thin hornet
#

yeah

#

cause they are hardcoded to use the Vanilla Gas Can only

sour island
#

Is the only thing you're changing about the vanilla function the setting something to nil?

thin hornet
#

wait ill show you

sour island
#

True, you have github

thin hornet
#
local function OnLoad()
    print(CLO_ModSettings.Name .. " v" .. tostring(CLO_ModSettings.Version) .. " has loaded!")

    ---Do overrides
    CLO_Override_ISAddGasolineToVehicle()
    CLO_Override_ISTakeFuel()
    CLO_Override_ISTakeGasolineFromVehicle()
    CLO_Override_ISVehicleMenu_FillPartMenu()
    CLO_Override_ISVehiclePartMenu_getGasCanNotEmpty()
    CLO_Override_ISVehiclePartMenu_getGasCanNotFull()

    for i = 1, #CLO_ModSettings.PreloadLogs do
        print(CLO_ModSettings.PreloadLogs[i])
    end

    CLO_ModSettings.Loaded = true
end
#

i call those override functions on load

#

and those are the functions

#

i have changed the way they calculate fuel transfert in/out vehicles cause it is also hard coded for a 8 unit fuel can

#

I made a function to add custom fuel items to a table that are use in the overriden functions so this way its like an API where we can add more fuel containers

#
---CLO_AddNewFuelItem
---@param moduleName string
---@param emptyItemName string
---@param fullItemName string
function CLO_AddNewFuelItem(moduleName, emptyItemName, fullItemName)
    CLO_Print("Add new gas can item:\n- " .. moduleName .. "." .. emptyItemName .. "\n- " .. moduleName .. "." .. fullItemName)
    table.insert(CLO_ModSettings.CustomFuelItems, { module = moduleName, empty = emptyItemName, full = fullItemName })
end
#
---Add new GasCan like items
CLO_AddNewFuelItem("CocoLiquidOverhaulItems", "Coco_LargeEmptyPetrolCan", "Coco_LargePetrolCan")
CLO_AddNewFuelItem("CocoLiquidOverhaulItems", "Coco_WaterGallonEmpty", "Coco_WaterGallonPetrol")
#

i wish pz would create something like CanStoreWater but CanStoreFuel to drainable items

#

but pz did only plan to use the small gas can

grave solstice
#

Well you are working on multiple liquids, right? It would be nice to be able to also have things like beer and soda and water and gas all be able to be stored in the same containers

thin hornet
#

beer and soda and milk and any other "fake" liquid as such are actually food. (not drainable)

#

They add boredom and stress relief etc

#

I am planing to look into it tho.

grave solstice
#

I find your work interesting partly because I've been looking at the code for the fuel changes as well

thin hornet
#

oh yeah

#

the mod was not ready to publish before 41.51+ came out so that is why im having a hardtime to try to keep 41.50 compatible.
Right now 41.50 doesnt have the large fuel can. So i suggest people update their game and start a new save ๐Ÿ˜›

#

anyway 41.51+ is a nice update

sour island
#

Btw you can grab items with shared tags recursively - there's examples of this in the recipe lua

thin hornet
#

im having a hardtime to use the recursive functions

sour island
#

You may not have to keep checking for your items for each step

#

Oh?

thin hornet
#

even if i copy it from the source code and use it like it should i get exception idk why

sour island
#

Hm

thin hornet
#

ill have to look into it one day

#

so i made functions to move forward in my development

#

its not the best and i will try to fix this somehow one day

#

but the code is getting massive and its getting hard to maintain with game update too

sour island
#

You could just overwrite the vanilla gas can entirely

thin hornet
#

wouldnt change the fact that those functions need overwritting tho?

sour island
#

No but iirc timed actions have arguments or fields

thin hornet
#

i wonder if its possible to get custom value from items.txt

sour island
#

I'd have to see the originals to see if you can slip in what you need with out entirely overwriting it

hybrid palm
#

ahh shit, i think i just noticed
Im using CLO vers 41.51
instead of CLO old version 41.50
for PZ in PZ 41.50
my bad hahaha

thin hornet
#

the scriptparser would pick them up like any other but the java doesnt have getters for them

#

@hybrid palm nice it should work then!

hybrid palm
#

I think it should, let me check

thin hornet
#

original functions look for Base.PetrolCan

#

which is why the override is necessary

sour island
#

Yes but you're running the normal functionality unless you also have your own can right?

#

That suggests you should be able to run the vanilla steps to completion and then check for your own cans- depending on the step, and what's being returned

thin hornet
#

so basically just create custom action and run them instead of the vanilla overriden one

#

yeah i could do that

#
ISTimedActionQueue.add(ISTakeFuel:new(playerObject, fuelStation, petrolCan, 5000))
ISTimedActionQueue.add(CustomISTakeFuel:new(playerObject, fuelStation, petrolCan, 5000))
sour island
#
storedVanillaFunction = VanillaFunction
VanillaFunction(a,b,c)
storedVanillaFunction(self, a,b,c)
Your stuff
end
thin hornet
#

ohh that how you do this

#

i was wondering

sour island
#

Ye, it's the best way to avoid compatibility issues too

#

I think timed actions return something in most steps

#

Youd just have the stored function be a local variable, then do your stuff to what it's returning, then return the final product

#

So for a step that checks for a gas can you should be able to intercept it and add your own cans as a result

#

Again it depends on what the vanilla stuff is doing

#

I gotta go to bed, I can look at it tomorrow

thin hornet
#

good night man

#

@hybrid palm i downgraded and its work well with the right mod version enabled

#

but that version wont be updated ever

#

so new features are and will never be available on 41.50

hybrid palm
thin hornet
#

cool ๐Ÿ˜„

abstract raptor
#

I love it

craggy furnace
#

i am crossing the event horizon into the mundane dimension

craggy furnace
flint seal
#

smoking cigarretes don't give you negative moodlets such as: Lung Cancer, Heart Disease or Emphysema

craggy furnace
#

and your average player life expectancy is: 1-4 days

strange kiln
fallow bridge
echo leaf
#

Hey are there any clear resources for updating loot distribution lists in mods?

#

I'm not really sure where to start fixing my old stuff atm ๐Ÿ˜„

sour island
#

There's some pins

echo leaf
#

Yeah I checked those and didn't see anything recent relating to how to update a distro list, did I miss it?

sour island
#

The one with pictures, a few pins down

#

Explains the new format for procedural lists

echo leaf
#

Okay thanks, I'll take another peek!

nimble spoke
#

@sour island About yesterday's bodylocation.lua: there's no need to provide a function for inserting new values because table.insert will do (it can receive an int param that is the position in the table)

sour island
#

I thought it mattered where it went?

#

Like the order mattered

#

For rendering? Unless I misunderstood

nimble spoke
#

yes, it matters, but you can insert wherever you want with table.insert

sour island
#

Yes but the function identifies the position based on the the entry

#

Like if what ever your adding has to be after "eyes"

#

I imagine if multiple people are inserting into the list the position isn't fixed

nimble spoke
#

ahhhh that would be more precise, yes

sour island
#

I think was the other guy's concern

#

Also just realized I didn't include a way to put it in the front of the list

#

I have a passion for frameworks :p

nimble spoke
#

Sned me the function when you feel it is finished and I'll add it

#

thanks for the help

sour island
#

Np, you make good stuff, happy to help

#

You helped alot with the AI problem

round field
#

Could somebody direct me to where the code for the "rolls" is located? I'm just getting into modding and I'd like to go through the code to understand how loot spawning etc. works.

glass grotto
#

would be cool a mod that keep all your stats minus one everytime you die (would be nice for split screen)

echo leaf
#

There are a couple mods that do things like that.

#

Some drop something when you die that when you pickup give you back the skills you had. Others let you create journals which when read again will give you the skills you had when you wrote the journal. Stuff like that!

undone crag
glass grotto
#

@echo leaf nice does you have the mod name for the journal thing plz

undone crag
tulip valve
#

How many polygons on a vehicle model for PZ is highest?

viral spire
#

For the toxic fog and rain mod, does it affect/kill crops?

radiant ginkgo
tulip valve
#

Dunno

#

I hear the game can lag if it has high polygon count etc

radiant ginkgo
#

If you have a pentium ๐Ÿ˜„

tulip valve
#

Have you finished your car? ^^

radiant ginkgo
tulip valve
#

You made a car model if I remember correctly

craggy furnace
#

he means the space shuttle with wheels danny

radiant ginkgo
tulip valve
#

YEah thats the one

#

looks like a Porche 911

craggy furnace
#

i hate UVing

radiant ginkgo
craggy furnace
#

tail work is ๐ŸคŒ

tulip valve
radiant ginkgo
craggy furnace
#

how do you do complex uv's anyways?

#

yeah its a critical detail

tulip valve
#

I suppose it will come with different colours or will it just be white?

#

Yeah UV mapping is hell ๐Ÿ˜ฆ

radiant ginkgo
tulip valve
#

xD

radiant ginkgo
#

There will be 5-6 color options

tulip valve
#

Silver is cool

craggy furnace
#

that reminds me

tulip valve
#

but in the pictures it looks white

craggy furnace
#

after the porsche i gotta submod your stuff

craggy furnace
#

ive kinda worked out in my head how to stash cars in certain places

radiant ginkgo
craggy furnace
#

you use the word engaged like its combat

#

you are correct

#

UVing is combat

tulip valve
#

indeed

radiant ginkgo
tulip valve
#

Drools

echo leaf
#

I dont know anyone that enjoy's UV mapping

radiant ginkgo
#

Don't understand

craggy furnace
#

yeah in certain locations around the map

tulip valve
#

@radiant ginkgoHow long have you worked on that damn car? Feels like forever lmao

craggy furnace
#

i already do it for some of filibusters cars

craggy furnace
#

nothing insane, just specifying on the map theyll spawn and adding a chance

radiant ginkgo
craggy furnace
#

i have never liked the car distro system in its entirety because i think it lacks nuance

#

you mean rich/poor, right?

radiant ginkgo
#

Ford Time Machine

radiant ginkgo
#

With chance

craggy furnace
#

oh okay

#

then it looks like youve got it

radiant ginkgo
craggy furnace
#

๐Ÿ‘Œ

radiant ginkgo
#

@tulip valve 972 Polys

#

And they have good detail

#

That's about how much a car needs to have polygons for the PZ

tulip valve
radiant ginkgo
#

But there is also a texture that is 2048x2048

tulip valve
#

nice

swift sequoia
#

Okay. I've faffed about enough. Time to bite the bullet and figure out this capsid thing. I really wish my old decompiler works, it was very nice.

round field
swift sequoia
#

Humm. So there's all kinds of creeps. There's specification creep, feature creep. Now there's IDE creep.

undone crag
#

I've got as far as unzipping Capsid and Gradle, and creating the environment variable for Gradle, but for now it's just a load of folders and files without any instructions on how to actually run the software. :/

swift sequoia
#

It has intellij integration. Hence my comment about ide creep.

#

Used to be there was eclipse and notepad. Now there's notepad++, atom, intellij, VBcode, SciTE... I probably have them all intalled at this point.

#

Oh Beans. Right. I forgot Beans.

undone crag
#

It's like this is my notepad installation but it doesn't tell me how to open a notepad window.

#

When all the tutorials rely on you already knowing how to open this:

#

I have this problem with Microsoft Visual Studio. I know how to install it, I know how to use it once it's open, but I don't know how to open a visual studio window without using some other software that opens it.

#

Oh do I need to install some software called IntelliJ so that I can run Gradle and Capsid?

sour island
undone crag
#

:o

swift sequoia
#

Okay, so Gradle is just the autobuild to for compiling capsid. Gradle doesn't have to be installed to build capsid.

undone crag
#

D:

swift sequoia
#

Correct?

undone crag
#

I do not know.

swift sequoia
#

Ah, I'm wrong. Its a gradle plugin.

thin hornet
#

yeah its a gradle plugin, and capsid adds tasks to gradle

#

to setup the environment and decompile/compile zomboid.

#

i can help if anyone got question about capsid

undone crag
#

Warning, Intellij is 774MB.

craggy furnace
#

and the bad news is you have a hard drive from 2003

undone crag
#

Once I had to download a 20GB update for a computer game which was DLC I couldn't even use because I had not bought it, and it took about 730 days.

#

I checked when I had last saved the last saved game in the game and it was 730 days earlier. That's two years to the day.

thin hornet
#

@undone crag whats up with 774mb? Whats your internet connection?

undone crag
#

It says that's the size of the zip from the Intellij website.

thin hornet
#

but whats the matter?

undone crag
#

Too big

thin hornet
#

too big to download or to install ?

undone crag
#

My internet is faster now so it could download it, so it's mostly hard drive space for me.

thin hornet
#

what do you got?

undone crag
#

155 GB left free

thin hornet
#

damn

undone crag
#

Is that a lot or a little?

thin hornet
#

well 774mb is less than 1 gb

undone crag
#

:|

thin hornet
#

not that much

#

for what it is

#

its worth it to code

undone crag
#

But if I do this more than a hundred times I'll have trouble copying things.

craggy furnace
#

if you are stumbling over 774mb then you need to free up your shit

undone crag
#

I just want to use it to see the PZ java, notepad++ is fine :|

thin hornet
#

or get an ssd for 100$ on amazon

craggy furnace
#

get rid of the 500 gb folder of commanders cancelled mods

thin hornet
#

notepad++ is not ok ๐Ÿ˜›

undone crag
#

orly

thin hornet
#

using capsid and anotation you do get a big advantage coding zomboid mods

#

you'll be less searching for mistakes and errors first. And your be able to better visualize what you are coding.

#

i swear i would never go back to notepad++ since i started using intellij+capsid

undone crag
#

Oh I missed your message on the other server.

thin hornet
#

i use notepad++ when i need to quickly see a file such as scripts.txt

#

any way i dont use notepad++ anymore i moved to linux for development

undone crag
#

I installed a linux called something like Darn Small Linux on a virtual computer but it wasn't registering a certain key or mouse press or something like that. :/

thin hornet
#

and im kidding notepad++ is good but yeah like i say if you can get used to intellij youll probably love it

undone crag
#

Hmmmmm maybe I will install it...... I have an external hard drive I could install it on which I did not mention earlier.

thin hornet
#

all my steam games are installed on external ssd disk. I got over 150 games so that help alot.

#

even my OS are installed on different external ssd so its easy to switch and reinstall without loosing games.

#

you can get a ssd ADATA for cheap on amazon. They are worth it. OS boot in like 1 min and less

undone crag
#

I am boycotting amazon though ha got you you can't get me that easily

thin hornet
#

lol

#

as you wish man

#

but grab some ssd somewhere else asap

#

youll go from shamblers to sprinters

undone crag
#

Eh that's spending money though. Maybe eventually. Possibly because the external hard drive was not flat, it doodled on my huge dank meme collection that may have been gigabytes even, or at least a large part of a gigabyte.

#

Wait a minute

#

I'll download all those dank memes but not Intellij

thin hornet
#

lol

#

i see your priorities now

swift sequoia
#

It is a little aggravating. I was getting what I needed between notepad++ and JD. JD is just 1.5 megs. ๐Ÿ˜ฆ

thin hornet
#

and JD doesnt work anymore?

swift sequoia
#

Correct. I'm taking a second look at it. JD-Core was updated 16 days ago.

thin hornet
#

if you guys need ill upload a zip with the decompiled java classes, i dont mind the effort

swift sequoia
#

That's ultimately what we're after. I'd appreciate that.

#

I'll miss JD's crosslink. But them's the breaks.

thin hornet
#

hopefully it helps, just ask next update ill upload it again

swift sequoia
#

Massively. Thank you!

thin hornet
#

So I started a new mod called Guts n Glory. It allows you to Gut Corpse to make yourself bloody. My only challenge right now is to get zombies to ignore the player. I want them to ignore him as long as he doesnt run/sprint/speak/attack. Which is all good already.

swift sequoia
#

You'd probably have to replace the AI.

thin hornet
#

Yeah i havent play with AI yet im not sure were to start

#

i been using zombie:setUseless(true)

#

but thats not good, zombie stop walking and everything else

craggy furnace
#

the latter i mean

#

pawlow wrote up something you can take a peek at in his loot mod if you want

swift sequoia
#

Well, there are roughly three ways that AI might track a player so long as we ignore actually pathing to the player. 1) calculate linear distance between object and player, 2) some variation fo ray trace to see if there are any blockers between object and player, 3) player leaves a trail where they move and object follows trail. 1 and 2 are pretty straight forward changes.

thin hornet
#

How would i cancel the zombie following the player been looking at most functions and couldnt see anything that would help me do that

swift sequoia
#

You could probably just use the existing zombie AI, and remove its ability to 'see' the player using a linear calculation for any zombies within x radius.

thin hornet
#

i tryed setting target to nil and stuff like that but nothing worked

#

ill have to read more

craggy furnace
#

you can set it up to read the blood mask

#

i currently have this rigged onto a skeleton costume

thin hornet
#

but ghost mod is for everything

#

the way i want to do it is that if a zombie sees me do something like "run" he will start going for me but other will not unless they see me do something too.

#

I just found out about aiBrain ill see what i can do

swift sequoia
#

OMG. JD-Gui works with your decompiled libraries.

thin hornet
#

great man

swift sequoia
#

This is incredible. Its faster too, I guess because its not decompiling, its just displaying. reference links work too, so I can click on say 'bloodybodyparttype' and it'll open the file that contains that reference.

thin hornet
#

๐Ÿ˜„

swift sequoia
#

Now to fold laundry as a 'reward'

umbral wasp
#

A need a bit of help disabling some of the core systems for a story mod

#

like being able to get infected, clothing degrading. stuff like that

thin hornet
#

@umbral wasp might wanna check "Last Stand" gamemode code how they handle it.

umbral wasp
#

will do

thin hornet
#

i try using zombie:setTarget(nil) but it seems to reset it every frame. Seriously not sure how i can acheive zombie to forget about specific player

#

im trying something like that

---@param zombie IsoZombie
local function OnZombieUpdate(zombie)
    local modData = zombie:getModData()
    if modData.spottedPlayer then return end

    local playerIsTarget = zombie:getTarget() == getPlayer()

    if playerIsInvisible then
        if playerIsTarget then
            zombie:setTarget(nil)
        end
    elseif playerIsTarget then
        --modData.spottedPlayer = true
    end
end

Trying to remove the player as target every zombie update but that dont work

umbral wasp
#

well thats the thing, the mod will end up having monsters

#

so id even have to go and make them behave diffrent

#

so im in over my head with that as well

thin hornet
#

@umbral wasp to set sandbox settings you might wanna try

--SandboxVars.Zombies = 2;
  --  SandboxVars.ZombieLore.Speed = 1;
    SandboxVars.Zombies = 1;
    SandboxVars.Distribution = 1;
    SandboxVars.DayLength = 3;
    SandboxVars.StartMonth = 12;
    SandboxVars.StartTime = 2;
    SandboxVars.WaterShutModifier = -1;
    SandboxVars.ElecShutModifier = -1;
    SandboxVars.FoodLoot = 1;
    SandboxVars.WeaponLoot = 1;
    SandboxVars.OtherLoot = 1;
    SandboxVars.Temperature = 3;
    SandboxVars.Rain = 3;
    --    SandboxVars.erosion = 12
    SandboxVars.ErosionSpeed = 1
    SandboxVars.XpMultiplier = "1.0";
    SandboxVars.Farming = 3;
    SandboxVars.NatureAbundance = 5;
    SandboxVars.PlantResilience = 3;
    SandboxVars.PlantAbundance = 3;
    SandboxVars.Alarm = 3;
    SandboxVars.LockedHouses = 3;
    SandboxVars.FoodRotSpeed = 3;
    SandboxVars.FridgeFactor = 3;
    SandboxVars.ZombiesRespawn = 2;
    SandboxVars.LootRespawn = 1;
    SandboxVars.StatsDecrease = 3;
    SandboxVars.StarterKit = false;
    SandboxVars.TimeSinceApo = 13;
    SandboxVars.MultiHitZombies = false;

using SandboxVars

#

you are trying to create story/challenge with predefined settings?

umbral wasp
#

not exactly

#

im just trying to make a silent hill mod because im a nerd

umbral wasp
#

@thin hornet by chance do you know a way to get custom music in game?

#

i think ive got the code right but not the file type or bit rate, i mean if the game is even that picky

thin hornet
#

.ogg and .mp3 works

#

i know how to replace music but not to add new music.

umbral wasp
#

i suppose replaceing works

thin hornet
#

You can check the audio.txt files in the game directory "media/scripts/"

#

but more likely you gonna have to edit the .bank files

#

using the fmod tool

umbral wasp
#

i should have them point to my mod folder rather then replacing the in game files right?

thin hornet
#

check the workshop some music replacement mods exist you can check how they do it

#

thats how i did

umbral wasp
#

smart

thin hornet
#

when i got back to my computer ill send you soomething

umbral wasp
#

may thanks

#

yeah the coding isnt all that hard

#

the map editor makes me wanna jump from a building though

thin hornet
#

haha

#

i know its not that easy

#

you have banks file at media/sounds/banks/Desktop/

#

Game Audio Scripts location:
media/scripts/sounds_music.txt

default:

sound NewMusic_32
{
    category = Music,
    master = Music,
    clip
    {
        event = NewMusic/32,
    }
}

modded:

sound NewMusic_32
{
    category = Music,
    master = Music,
    clip
    {
        file = media/music/TheSearchForJim.mp3,
    }
}
#

one problem with this is that the music is playing like a 3D sound, so when you move the character the audio change direction and distance
i tried adding additional properties but didnt change anything

sound NewMusic_32
    {
        category = Music,
        master = Music,
        is3D = false,
        clip
        {
            file = media/music/TheSearchForJim.mp3,
            reverbMaxRange = 0,
            reverbFactor = 0,
        }
    }
#

might work better with an edited bank file. havent tried cause the tools is for windows not linux

#

you will have to edit NewMusic or OldMusic and in the audio settings you choose the sountrack based on what you edited.

#

im almost there but zombie are buggy a "little"

#

@nimble spoke hey man sorry for ping, im looking at your turning mod and im trying to understand how SFTurnLoadZombies.lua is ever used in the game i dont see anything calling SFTurn ever.

fallow bridge
#

Not gut corpse

thin hornet
#

? with S or no S

fallow bridge
#

No s

thin hornet
#

okay thanks

fallow bridge
#

No problem

#

Small thing

thin hornet
#

yeah im french basically so my english far from perfect

fallow bridge
#

Itโ€™s all good

nimble spoke
thin hornet
#

ohhh

#

did you get to make custom behavior tho?

nimble spoke
#

I needed to recover certain changes to zombies only once upon loading, maybe I'll try it again later

#

depends on what you consider custom behavior

thin hornet
#

well right now im trying to do the gut mod

#

and im trying to find some mod that would help me understand how to change zombies behavior

winter bolt
#

couldnt you see what the inconspicious trait does?

thin hornet
#

good idea

#

but might be global to all zombie at once

nimble spoke
thin hornet
#

im looking for

  • single zombie to ignore player if very bloody
  • if single zombie see player run or talk he will stop ignoring him
#

it has to be for each zombie. otherwise i would just use ghost mode

nimble spoke
#

all zombie checks are inside the java code, you'd have to read through and find "holes in the armor" that could be exploited from lua

thin hornet
#

we are pretty limited i see

nimble spoke
#

I doubt you can do that for single zombies

winter bolt
#

wouldnt there be a way to make a modified inconspicious trait and then add and remove the trait whenever you want while hiding it from the player?

thin hornet
#

will look at the trait solution and see if there is something to do with that

nimble spoke
#

adding traits and making them have a real game effect are 2 completely different things

#

again, checks for these traits are all java you won't be able to add your new trait to those checks unless you include modified class files in your mod

thin hornet
#

modified class are loaded or it require a modloader for java ?

nimble spoke
#

modified class are not loaded from mods

thin hornet
#

ok

#

so i might have to make it ghost but that will be far from nice..

nimble spoke
#

you could apply some of the tokens I have in Turning Time as long as the zombie is within X distance to that player, but it would affect zombies behavior for all players

thin hornet
#

pretty much only setUseless is working for what i want to do, but it will make zombies stop doing what ever they were doing including for "other players"

#

so i guess thats why this mod never was created before

nimble spoke
#

NoTeeth is also interesting

#

for anyone keeping clothing mods that add new body locations: I updated my Dressing Time with a new system so that our mods could be compatible. Please give it a try!

thin hornet
#
    if playerIsInvisible then
        if playerIsTarget and not zombie:isUseless() then
            zombie:setUseless(true)
            zombie:setTarget(nil)
            uselessCount = uselessCount + 1
        end
    else
        if zombie:isUseless() then
            zombie:setUseless(false)
            uselessCount = uselessCount - 1
        end

        if playerIsTarget then
            --modData.spottedPlayer = true
        end
    end

doing this give a result that is not that bad but will certainly not work in splitscreen and mp
in fact the effect is very nice, they kind of come to you like if they are grouping\hording around you

nimble spoke
#

you could also check if zombie target == player

#

and then make it nil

#

possibly

craggy furnace
#

i am curious to apply that to specific body locations (full face/head) for clothing

thin hornet
#

actually thats what im doing and its starting to be very nice

#
---@param player IsoPlayer
local function IsInvisible(player)
    local invisible = IsBloody(player) and not player:isSpeaking()
    if invisible and player:isPlayerMoving() and (player:isRunning() or player:isSprinting()) then
        invisible = false
    end
    return invisible
end

---@param player IsoPlayer
local function OnPlayerUpdate(player)
    playerIsInvisible = IsInvisible(player)
end

---@param zombie IsoZombie
local function OnZombieUpdate(zombie)
    local playerIsTarget = zombie:getTarget() == getPlayer()

    local modData = zombie:getModData()
    if modData.spottedPlayer then
        if not playerIsTarget then
            modData.spottedPlayer = false
        end
        return
    end

    if playerIsInvisible and playerIsTarget then
        zombie:setUseless(true)

    elseif not playerIsInvisible and playerIsTarget then
        zombie:setUseless(false)
        modData.spottedPlayer = true
    end

    if not playerIsTarget then
        zombie:setUseless(false)
    end
end
#

they even forget that they run after me if they lose sigh of me

#

im currently streaming if you wanna see the result

nimble spoke
#

but setting it to useless has other issues with MP, maybe try setTarget(nil) just to see what happens?

#

I'm glad this is taking shape. People havve been requesting for years

thin hornet
#

setting target to nil in the ZombieUpdate lead to zombie being stupid

#

they still get assign you as a target every frame

#

so they kind of act like they want you

#

and yes it will not work with MP and will not work with splitscreen but i would specify it in the mod description.

nimble spoke
#

there's probably another variable you can set/change to make it forget/unsee the player it was targeting

thin hornet
#

thing is making it useless is for every player at the same time

#

one thing that would be cool is setting the "zombie walk" animation to the player

#

or isnt there a function set the player as a zombie, or maybe that function actually kills the player

thin hornet
#

well it suck that we are so limitted with the lua part but its ok i understand why it is. Night yall

viral spire
#

What mods were least likely to be affected by the latest update? I'm thinking of using the toxic fog mod and zombies fear the sun.

fallow bridge
#

pretty much any mods that add custom objects where fucked

umbral wasp
#

@thin hornet i did end up getting audio working just fine

#

But here's a more complex one

#

Depending on the amount of enemies on screen I'd like to bring in more elements of a song.

#

So i export my new tracks as stems, but i need a way to sync up the times and just get them to layer properly

viral spire
# fallow bridge those to should be good

Current mods installed are G.E.A.R., Fear The Sun, Item Tweaker API, and Toxic Fog and Rain. Had Slocan Lake installed too and saw 6 errors during the loading screen, so I'm going to check if that's the reason.

fallow bridge
#

is it ADVANCED GEAR or normal gear?