#mod_development

1 messages Β· Page 490 of 1

thin hornet
#

is good

#

just remember to remove when you're done

#

cause it add tons of stuff you may not like

#

if you trying to play legit

grand bough
#

I mean, not entirely.

#

Most of PZ is kinda like... Scene Building for me.

thin hornet
grand bough
#

xD

thin hornet
#

may as well install cheat menu and enable creative and infinite carry weight

grand bough
#

I'm tired of a bunch of bags, okay xD

thin hornet
#

but i feel you building is funn

grand bough
#

I changed the value to 25. The... Capacity, and the name to Adventurer Bag

#

So I just removed the " 's "

grand bough
#

So uh... What is your startup time for PZ?

#

I'm sitting at a blackscreen currently.

#

Much longer than usual.

thin hornet
#

mhm

#

its open as fast as usual

#

"-Ddebug",

grand bough
#

I think I left a file open.

thin hornet
#

try copy paste this one and try again

#

and doesnt matter if file is open and also make sure to save

#

lol

#

joking

grand bough
#

Getting locked in a blackscreen after... Loading Lua

thin hornet
#

damn it

#

remove the line

grand bough
#

Okay.

thin hornet
#

install cheat menu should be enough

grand bough
#

Name change worked, capacity did not.

thin hornet
#

send the whole .txt file with the bags

grand bough
#

... Could it be a trait screwing it up?

#

Such as organized?

thin hornet
#

i have no idea what is screwing it

grand bough
#

So it must be another mod screwing with it.

#

It has to.

#

I guess I could disable it and see what disables with it?

#

Also, I assume the item editor is like not a cheatmenu thing, cause I cannot do that.

thin hornet
#
module Base
{
    item smallback
    {
        WeightReduction    =    100,
        Weight    =    1,
        Type    =    Container,
        Capacity    =    100,
        DisplayName    =    Adventure Bag,
        IconsForTexture = advbag;advbag2,
        CanBeEquipped = Back,
        OpenSound   =   cloth1,
        CloseSound   =   cloth2,
        PutInSound   =   PutItemInBag,
        ClothingItem = smallback,
        AttachmentsProvided = ChestRig,
        BloodLocation = Bag,
        RunSpeedModifier = 1,
    }
}
#

try adding just that bag

#

like remove all the content and paste that

#

keep a backup if you care

#

i used that and it worked, but didnt us it with the models and textures but still idk otherwise

grand bough
#

As in remove everything else from the clothing_PLLootBags?

thin hornet
#

yeah you just want that cheated bag right?

grand bough
#

Nah, I like the mod overall, I just... Wanted to change that bag because I like it.

#

If could have gotten the item editor work, I would just do that.

thin hornet
#

the item editor doesnt allow for chaning all properties

grand bough
#

But I couldn't get cheat menu to show the dialog box you had.

thin hornet
#

either you struggle making this bag work, or you just use a cheat menu to get infinite carry weight

#

you can still use the bag if you like the style xD

#

@grand bough or you could use this modded Spiffo backpack spiffo

module Base
{
    item smallback
    {
        WeightReduction    =    95,
        Weight    =    1,
        Type    =    Container,
        Capacity    =    50,
        DisplayName    =    Super Spiffo Bag,
        IconsForTexture = Backpack_Spiffo,
        CanBeEquipped = Back,
        OpenSound   =   OpenBag,
        CloseSound   =   CloseBag,
        PutInSound   =   PutItemInBag,
        ClothingItem = Bag_SchoolBag,
        BloodLocation = Bag,
        RunSpeedModifier = 1,
        AttachmentReplacement = Bag,
        ReplaceInSecondHand = Bag_Schoolbag_LHand holdingbagleft,
        ReplaceInPrimaryHand = Bag_Schoolbag_RHand holdingbagright,
        WorldStaticModel = SchoolBag_Ground,
    }
}
grand bough
#

XD

#

I'm unable to figure it out. At this point it's like something I /HAVE/ to do.

#

Because there's no reason it shouldn't work.

thin hornet
#

how about trying this superb spiffo backpack

grand bough
#

could it be a spacing thing?

#

No. That shouldn't matter. Yours has the same spacing.

#

I know spaces don't matter, but I just... this is gonna burn. It's 6 AM and I have work in a couple hours, and I won't be able to rest until this is fixed.

#

Gonna check weird mod incompatibilites

thin hornet
#

xD

#

Spiffo bag did it work?

#

at least if it work with spiffo bag you can then just change the texture and model

grand bough
#

I should replace the one we're working on right?

#

I got distracted, I'm sorry.

#

Or do I make a new text file?

thin hornet
#

You replace it and check if the new bag work

#

im going to bed man

#

i wish you all the luck in the world for your magic bag

grand bough
#

Goodnight. And thanks again for the help, Konijima!

#

I really can't thank you enough.

thin hornet
#

haha ive done not much but if really it doesnt work then you could just send me the zip and ill make you a bag

#

later

grand bough
#

Rest easy, friend.

thin hornet
#

spiffo2 πŸ‘

formal edge
#

i didnt follow the subject, but you want to do a bag with a great amount of space available ?

grand bough
#

I found it. It's a Lua from another mod- which I didn't realize messed with Modded bags.

#

And it was tucked away in my modlist too. I don't remember installing it. This should fix it.

formal edge
#

Oh ok. hope you will fix your issue.

#

i was thinking in a bag like minecraft and the enderchest. This is what i heard when i saw "magic bag"

ruby urchin
#

give me a VPS and those annoying messages will disappear

balmy valve
#

Hey ya'll quick question for ya

#

I cleared my mod list a bit ago, and accidentally deleted a mod that gave your character the ability to yap about things, like temperature or hunger, or panic and the like. Anyone know what it was called?

bold cobalt
#

something speech I think

#

I mean the word speech is in the name

wintry mason
#

uh ok?

balmy valve
#

I was looking with comments

quiet cosmos
surreal meteor
#

Anyone know what mod is causing food to get insane 1000+ negative mod and bordom when unfreezing?
I saw a few posts about it in the sub

#

I havent been able to A-B test it yet

#

And theres no log erros that i think are responcable

#

Oh its a vanilla bug

#

HUH

wintry mason
cobalt kettle
#

I know there are no such things as stupid questions, but does someone want to challenge me? I recently picked up PZ and wanted to get into some modding. Never modded before but have some coding skills.

#

Should I just create a backup of the lua file, then place a modded one in the Mods folder? Didnt know if the mods folder would override same named files or anything. I have been looking around in all the documents I can find but I have a fear of screwing it up before I even start.

dawn shuttle
cobalt kettle
#

Thanks. I'll give it a whirl. I just kept seeing things from 2017 and others more recent. Wanted to make sure I had valid info. I knew people were saying the wiki was getting updated to figured if I asked here, I would get the best answer. Thanks again.

steady onyx
#

I think it was missed last time so I'll ask again. Is it possible to add custom injury types? My sitting on a hot af idea right now that I'd really like to work on.

#

The javadoc sucks

steady onyx
#

Well I'd guess no considering every injury type seems to have methods associated with it

#

But I wouldn't know. A method called 'FindAllCake' could literally find all cake, or because there's no descriptions of what the method actually does it could actually kill every zombie

#

That's a shame, regardless.

dawn shuttle
#

It looks pretty much welded logic yeah. Would be a challenge to add one from the looks of it. Sorry!

drifting ore
#

@craggy furnace i tried doing the same thing for your law enforcement pack but got this error
attempted index: weapons of non-table: null

#

did you change the function?

pearl thistle
#

anyone know of any performance mods?

drifting ore
#

nvm fixed

#

wrong pathing

craggy furnace
drifting ore
#

shark

#

why did u change it from shared to server

#

threw me off for a bit

#

kept wondering why it kept returning a null table

barren sierra
#

What do I need to do in the Texturepack file to fix this issue? Or is this something I cannot fix?

weary matrix
#

@barren sierra IIRC you have to add a PNG for each item in the folder media/textures/WorldItems/

#

for example media/textures/WorldItems/RippedSheet.png, same name as your item

dry chasm
barren sierra
#

Well damn! Thats a bummer. Wonder why the tectures just up and left

weary matrix
#

@dry chasm ha maybe I'm not sure, I just copy pasted the path of a random item from my steam folder

dry chasm
weary matrix
#

@dry chasm yes, your opinion matters! πŸ˜›

dry chasm
#

the crossed through ones deprecated/unused? πŸ‘€
IIRC some of them are still used and triggered via lua?

weary matrix
#

@dry chasm yes, well I take the list of all events from java code by checking for AddEvent(), then I consider as deprecated all events with no corresponding triggerEvent(), is that not correct?

dry chasm
#

Some are triggered in lua and not java IIRC, so unless they're also not triggered there, then I'd say it's alright.
Also shouldn't it be more of a thing for #pzwiki_editing ?

quasi geode
#

some events are added via lua only (also triggered there)

weary matrix
#

ah I see

quasi geode
#

so check there too

weary matrix
#

@quasi geode any clue how I could find them automatically?

#

like for pattern matching

barren sierra
weary matrix
#

I'm trying to automate the whole process

quasi geode
#

ah cant remember the exact search string offhand, dont have that info handy atm

#

but should be easy enough to spot. will be similar to the java

dry chasm
quasi geode
#

that should do it

#

though might need to tweak that regex to check for " or '

weary matrix
#

yeah don't worry about the quotes, that won't be an issue

dry chasm
#

(LuaEventManager\.AddEvent\([\"\'].*?[\"\']\))

#

xD

weary matrix
#

@sick palm all the events I can find with your pattern are not marked as deprecated in my list

quasi geode
#

.*? doesnt look valid * and ? should be mutually exclusive in that use?

dry chasm
weary matrix
#

but, I do find this:

ua/server/Seasons/season.lua:        triggerEvent("OnChangeWeather", season.weather);
lua/server/Seasons/season.lua:        triggerEvent("OnDusk"); -- we notify that we're on dusk for modding purpose
lua/server/Seasons/season.lua:        triggerEvent("OnDawn"); -- we notify that we're on dawn for modding purpose
lua/client/ISUI/ISWorldObjectContextMenu.lua:    triggerEvent("OnPreFillWorldObjectContextMenu", player, context, worldobjects, test);
lua/client/ISUI/ISWorldObjectContextMenu.lua:    triggerEvent("OnFillWorldObjectContextMenu", player, context, worldobjects, test);
lua/client/ISUI/ISInventoryPage.lua:    triggerEvent("OnRefreshInventoryWindowContainers", self, "begin")
lua/client/ISUI/ISInventoryPage.lua:        triggerEvent("OnRefreshInventoryWindowContainers", self, "beforeFloor")
lua/client/ISUI/ISInventoryPage.lua:    triggerEvent("OnRefreshInventoryWindowContainers", self, "buttonsAdded")
lua/client/ISUI/ISInventoryPage.lua:    triggerEvent("OnRefreshInventoryWindowContainers", self, "end")
lua/client/ISUI/ISInventoryPaneContextMenu.lua:    triggerEvent("OnPreFillInventoryObjectContextMenu", player, context, items);
lua/client/ISUI/ISInventoryPaneContextMenu.lua:    triggerEvent("OnFillInventoryObjectContextMenu", player, context, items);
lua/client/OptionScreens/MainScreen.lua:        triggerEvent("OnChallengeQuery");
lua/shared/SpawnRegions.lua:        triggerEvent("OnSpawnRegionsLoaded", regions)
```, those are deprecated in my list
dry chasm
quasi geode
#

probably...i'm used to perl regex (i dont mess with JS at all)

dry chasm
weary matrix
#

So OK I will fix the invalid deprecated, what about the event page itself, not the list?

dry chasm
#

exact function call is triggerEvent(eventName, ...)

#

... = the args

dry chasm
#

seems alright

#

imo*

weary matrix
#

see the parameter links pointing straight to the javadoc? I love it πŸ˜„

#

and the example is also auto-generated

dry chasm
#

though maybe in that example more along the lines of The description data of the player or survivor being created, as otherwise one could expect it to be a string instead

weary matrix
#

well if people don't read the parameter list what can I do? Second parameter points to the javadoc URL for SurvivorDesc class

dry chasm
#

not everyone click on every link they see, so the description is all the more important πŸ˜›
But not that big of an issue anyway i believe

weary matrix
dry chasm
weary matrix
#

loool

#

it's not that hard πŸ˜‚

#

just do: git clone https://github.com/quarantin/zomboid-wiki/ then edit the file, then

git add description.json
git commit -m "Updating missing descriptions + Edits"
git push origin develop-desc``` and then you can create the PR in github web interface
#

@sick palm or worst case just download the file, edit it and send it back to me through discord

#

woops, sorry @sick palm I meant to mention @dry chasm

#

@dry chasm

#

pinged or not?

dry chasm
#

yup

willow estuary
#

Sorry, been away from discord for the most part for the past week, but saw this and it's some good shit @weary matrix ! πŸ™‚
I love how the parameters are listed with the events; I've used that OnCreateLivingCharacter event before specifically to access the player description and I had no idea it automatically called the parameter.

rare bay
#

Hey everyone, I am looking to mod some sound files or basically replace the sound files with sounds of my choosing for a project. Would anyone be able to advise me on how to do this?

weary matrix
rare bay
#

ah this edits the music in game by adding more in. I want to replace sfx like the jumpscare with my own soundfile

#

Do you know of anyway to do that?

weary matrix
#

@rare bay I have no idea what your talking about, I don't know what's sfx or jumpscare, so no πŸ˜‚

#

I'm just a developer

rare bay
#

its no worries

weary matrix
#

@rare bay aaaah ok, sorry just woke up, got to power up the brain πŸ˜‚

rare bay
weary matrix
#

I wish I could 😦

stiff mauve
#

is there any mod that let char attach 2 two handed weapons?

#

like this one,

#

one attached on the back, and one on the shoulder

weary matrix
#

@rare bay also check in your steam folder: media/lua/shared/SoundBanks/SoundBanks.lua, looks promising

balmy prism
#

Got a question for the mod guys. Back in Build 40 when you hosted a server and when you tried to apply a mod that maybe it didn’t work it would give an error message along the lines of β€œfile x not found in server” or something like that. Is there any way to fix that?

drifting ore
rare bay
ruby urchin
weary matrix
#

@rare bay you probably have to hook the event: OnLoadSoundBanks

hot patrol
fast dagger
#

anyone else is missing (im only aware of this one) the 9mm Drum Magazine from Brita's Weapon Pack and ArsenalFighter mods?

#

i've got the modded weapons, attachments I just don't have the drum magazines for some reason...

#

I've tried unsubscribing and subscribing to the mods again

#

it doesn't exist in the debug's item list

bold cobalt
#

Mine is working @fast dagger

fast dagger
#

can you show me the name of the mag?

#

exactly

bold cobalt
#

sure, give me a few to fire it up

fast dagger
#

thanks a lot

bold cobalt
#

2nd to last is the 9mm drum in your Screen Shot

fast dagger
#

it doesn't work

#

that's 9x19mm

bold cobalt
#

are you right clicking to use the drum mag?

fast dagger
#

yes

#

it's like the weapon doesn't detect it

bold cobalt
#

that does not work anymore, its now the [ key

fast dagger
#

that doesn't do anything either

#

i've tried

bold cobalt
#

is it loaded with rounds?

hollow shadow
#

so with my modpack enabled i cant craft scrap weapons and i get "ERROR: module "Base" imports itself" but with the single mod it works

#

how do i find out which of the 300 mods cause the error xD

undone crag
#

Maybe notepad++ and tell it to look for module base in text files.

fast dagger
hollow shadow
#

my 3 mods

#

it just says that it imports itself

#

idk which mod is doing that or if its my mod

hot patrol
#

best balance i could think of for how op it is

bold cobalt
#

πŸ‘

hot patrol
#

if you have any recommendations on how I can tweak things let me know. tbh I went the lazy route and just made it super crazy strong and heavy since I didn't know what all the config options meant but I was pretty happy with it. Very satisfying clearing a forest in 3 swings with it.

ruby urchin
#

wtf a module functios returns a table wtf wtf anyone some idea?

local EasyModdingAPI = require "EasyModdingAPI"
EasyModdingAPI.Utils.String():testito("lolololol.com")
local String = function()
    local self = {}

    self.testito = function(aaaaa)
        
        print(aaaaa)
    end

    return self
end

return String
undone crag
# hollow shadow it just says that it imports itself

I'm guessing that may mean there's something that says both module base and imports base. Maybe you could get notepad++ to show you all the text files saying module base and if the list is not too long you could see if any of them are also importing base.

weary matrix
#

@ruby urchin it seems testito means testimony in spanish, maybe it's just a debug function to print strings?

#

@ruby urchin also in Lua even objects are tables so...

quasi geode
#

returning a local table at the end of a file (for importing via require) is the proper usage of require and modules in lua. this way you arent polluting the global namespace

ruby urchin
weary matrix
#

@ruby urchin your String() call returns a table containing a function named testito, why is this weird?

ruby urchin
#

I'm not calling String(), just the functions inside of the module

#

For example, I have another module called Player

local EasyModdingAPI = require "EasyModdingAPI"
...
local player = EasyModdingAPI.Player(source)
local x = player:replaceVisualClothingItem(p1, p2, table)

and it works as it should

weary matrix
#

@ruby urchin you mean the print statement is showing something like table: 0x55a6b....?

ruby urchin
#

of course, in summary, I give a string and the function print a table

#

I did some tests, and the parameters is the one that changes

#

and it should give me the same string provided

weary matrix
#

@ruby urchin I think if you want to be able to use the : character to call a method you have to set the metatable

ruby urchin
#

Not really necessary, that's why I use self

weary matrix
#

try to replace your String():testito("lolololol.com") with String().testito("lolololol.com")

#

@ruby urchin You're trying to call testito as if it was an object method, except your String is not an Object because no metatable

#

so your code just declare testito as a function, not a method

#

when you use : to call something, the call will actually add the object itself as first param, that's why it's printing a table and not the string

#

you can also try to add a second parameter to testito and print that parameter instead, then it should "work" as you expect

#

for example try this:

local String = function()
    local self = {}

    self.testito = function(aaaaa, bbbbb)
        
        print(bbbbb)
    end

    return self
end

print(String():testito('Hello World!'))
#
Hello World!```
ruby urchin
#

I'm dumb, I forgot the first parameter on the module

#
local String = function(variable)
#

now works

dry chasm
marble folio
#

I just had an idea and wanted to know if this makes any sense / Would be too hard to modify cause I'm a real newbie with mods

When foods/items are put in a refrigerator container and they turn Blue (+Slowing the time that Perishables food rot) Would it be possible to add a new value to that involving PlayerDamage or whatever the one that controls temperature?

More precisely, I want to make refrigerated food in general (Even the ones not perishable like sodas) to interact with the players heat, making him cool down if he's too hot or even get cold if he eats something frozen in the winter (In the future I'd also apply that to hot food, like eating a fresh hot cup of coffe in the middle of the winter would get your body temperature up)

Would it be possible to do that only with Lua without messing with Java?

thin hornet
#

@marble folio we can change player temperature thats for sure

#

we can also get the Heat level of a food item

#

we can set player ItemContainer CustomTemperature to keep the food warm (red) or cold

#

we can hook into the action of eating and check the food temperature and modify the player temperature

marble folio
thin hornet
#

if its of the class ItemContainer yes

marble folio
#

will finish installing stuff and get into it
Thanks for the help

thin hornet
#

To hook into the action of eating (after the action is performed):

local original_ISEatFoodAction_perform = ISEatFoodAction.perform
function ISEatFoodAction:perform()
    original_ISEatFoodAction_perform(self)
    
    -- do stuff here
    if instanceof(self.item, "Food") then
        -- local percentageAte = self.percentage -- if 1.0 mean fully eaten
        -- self.item:getHeat()
    end
end
shadow dust
#

Are sound mods possible to make on 41.53?

#

if so whats the folder with the new sounds

thin hornet
#

@shadow dust it would be in C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\sound\banks\Desktop
file are .bank

#

'i think'

shadow dust
#

how do I edit the .bank files?

thin hornet
#

There is a software for this but that i dont know

#

search the forum

vale marsh
#

i keep seeing these around raven creek is this normal?

reef hatch
vale marsh
#

currently yeah

reef hatch
hot patrol
#

So I followed a guide to make clothing and it's in game but I can't see it on the ground or an my player

harsh prairie
reef hatch
surreal meteor
#

@willow estuary didnt see anywhere to report errors to you on the mod page so il ping you here, getting an error with Military Vehicle Parts (build 41).

https://pastebin.com/7Wh2tikL

late hound
weary matrix
#

Any clue how to interpret the result of this call? For example what does it mean if it returns 0.5 or something like that:

GameTime.instance.getRealworldSecondsSinceLastUpdate()```
#

more specifically, how much time 0.5 represent in the game?

quasi geode
#

guessing here, but 0.5 = 30 frames? (assuming its running at 60 fps) so not entirely sure it actually translates into "game time". the method returns 0.016666668 * a fps modifier, which basically = 1 if that multiplier is 60. at various other points (in different classes) that field holding the multiplier gets set to 60 divided by various variables i'm way to tired atm to properly trace

#

so 0.5 = half a second at 60 fps

weary matrix
#

the boolean value is like: this.useVehicleDuration > 0.5F

hollow shadow
#

anyone know which kind of mods need the most performance?

weary matrix
#

@hollow shadow the ones with the worst algorithm implemented? πŸ˜‚

sour island
#

Send help

dry chasm
sour island
#

It's very hard to tell the collision box is not round

#

Looks great

#

The alien at the top keeps tripping too

#

Maybe he's not actually infected - just trying to assimilate

fast dagger
#

are there mods which adds small storage boxes but with a high capacity?

fast dagger
weary matrix
#

is there a difference between these two version of Zomboid?

short shell
#

I wondered that myself. I always choose the iwillbackupmysave build every time so I would not know.

dry chasm
autumn rose
#

Does anyone know if a mod exists that removes the "Delete All" button from all the trashcans?
I was never personally a fan of that feature after it was added to the game, and it's something I can easily just ignore in singleplayer, but I don't want that being a thing for when Build 41 eventually gets multiplayer, for a few reasons to be honest.
I've looked online but haven't been able to find a mod that does this yet.

weary matrix
#

@dry chasm thanks, btw the picture IS the property panel you're talking about

dry chasm
#

picture? panel? πŸ‘€

weary matrix
dry chasm
#

aaand you lost me

willow estuary
#

For the most part, things with "griefing potential" has an option to disable it in the MP settings.

autumn rose
#

Oh perfect, thanks!

heavy pebble
#

idk who to relate this to, but some russian guy put up "multiplayer for Build41" on workshop stating that it's "likely won't work when downloaded to workshop" then provided a link to a yandex disk which is essentially russian google drive

#

mod is taken down now

#

i won't test this shit myself as it is likely malware or worse

#

and i dont see any report button

sour island
#

Is this not a direct link to it?

heavy pebble
#

It is a direct link to a mod in workshop, although he provides another one in description.

#

Which might be a malware.

#

because he also tells that "instructions are there" baiting you to download it

#

@iron salmon read my post with link above please

heavy pebble
#

you were right

#

Also, if it isn't clear for anyone, don't subscribe to it and dont download shit from his link.

#

Might be just a simple fluke with enabling mp button in main menu, but it might as well be something like miner.

granite shell
#

this is not malware

heavy pebble
#

Workshop removed link thankfully.

#

But how do you know anyway?

granite shell
#

just why would he add some kind of malware there?

willow estuary
#

It's been removed; if you see anything that you have concerns about you can always DM nasko, or another moderator to let them know. (even if a moderator doesn't deal with workshop matters, they'll be able to let the right person know).
The report button on workshop pages is here:

heavy pebble
#

Ok, sorry, my bad.

#

I got it now.

willow estuary
#

πŸ‘

tired charm
#

Hello guys, sorry for the question (it is most likely basic and stupid). I'm fairly new to Lua, specifically to the one in Zomboid and I was wondering: how can I, still if possible, have a function that is called whenever a zombie is hitting something (such as a barricade), with a reference to the barricade (in this example)?

Thanks

ruby urchin
#
local EasyModdingAPI = require "EasyModdingAPI"

local UpdateClothes = function(source)
    local Player = EasyModdingAPI.Player(source)
    
    Player:switchVisualClothing("DCP.Trousers_TacticalSWAT", "DCP.Trousers_TacticalSWATForBoots", "Shoes", {"Base.Shoes_ArmyBoots", "Base.Shoes_ArmyBootsDesert"})
end

Events.OnClothingUpdated.Add(UpdateClothes)

in some minutes I will release this API, in his initial state (few functions)

harsh prairie
#

I have two questions about a mod I made - How do I make it so the character is holding an item in their other hand during the crafting animation? I have prop2:broom but I'd like the other hand to have a knife, for example.

the other question is that when they create the spear it always has max durability, but i'd like that to be the same random chance as the original craft spear recipe.

vapid lantern
tame mulch
harsh prairie
#

what would that look like? I looked at the code for the spear and copied it but I am still getting max condition every time

hot patrol
#

When making clothes do you need to make a separate model for both male and female?

#

I know for normal clothes the answer is probably yes sice it would look bad otherwise but I mean more for something like my pillow armor

#

Can the same models work for both genders?

hollow shadow
hot patrol
#

nice

#

oh so wait they do need to at least be seperate files?

#

that might explain why I can't see my clothes

ruby urchin
# tame mulch What will be in your API? What if 2 players in game?

a bit of everything, the idea is to provide new functions from those already in the game, an example of this would be switchVisualClothing() that a while ago I did and I forgot, If there two players, modder just need use getOnlinePlayers() this returns List<IsoPlayer> (Works for Client/Server sides)

#

Since IWBUMS not have MP yet, I don't think necessary add script for server/shared sides

drifting ore
zealous wing
#

Could someone explain clothing xml and guid works? I'm trying to figure out how to do clothing.

hot patrol
#

same here

#

it's been rough

zealous wing
#

Specifically how to set up the GuidTable.xml properly.

hot patrol
#

from what I gather it's exactly how it looks in the vanilla files

#

my modded item is at the bottom

zealous wing
#

From where do you get the guid string from though?

hot patrol
#

generate one

#

off a guid maker site

zealous wing
#

With what?

marble folio
hot patrol
zealous wing
#

All right, I will try that.

#

I presume PZ needs it in a specific format?

worldly olive
#

Hi hi!
Can somebody remind me how it was to check if an specific mod was activated?

ruby urchin
zealous wing
#

Hard to make out, but this is the patch on the back:

#

Doing it as a favor to a dude. πŸ˜„

harsh prairie
worldly olive
#

No no, but I mean, in the code, to do something if an specific mod is activated

quasi geode
#

getActivatedMods():contains("ModID")

hot patrol
#

can someone please look at my logs and help me figure out why my clothing won't show up on my player or when I place it on the ground?

drifting ore
#

so would it be legal for me to make vr version of the game, basically with unity but make it rely on the actual games files to work so that nobody who didn't buy the game can play it ?

#

like, boot up unity export models make the map ect... same with ai and crafting ect... but, again make it depend on the actual game basically like a mod but a bit bigger

#

ofc for free no paywall require to play it, well obviously it wouldn't be out for a long time like probably when B42 is fully release

worldly olive
ruby urchin
#

As far as I know, it is allowed with mods just because they allow it and give the facility to do them

drifting ore
#

an other way to do this but to complicated for me to do, would be to use to player to detect the tiles he is on and the ones in his field of view with raycast and to detect zombies then, make a 3d model of the scene accordingly, but that would be pretty laggy i'm sure

#

and messy too

#

and wouldn't work well with combat yeah i don't think i'll use this approach if the dev let me do this

willow estuary
#

This sounds like something that you would need to ask a representative of The Indie Stone in regards to what permissions they would grant you for such a project, and not anything that any third parties in the modding channel would be able to help you with. @ nasKo is the person who usually fields this kind of stuff.

zealous wing
#

Isn't like 90% of the game 2D anyway? Like how would you even render that?

#

That would be like trying to make a VR version of CDDA.

drifting ore
zealous wing
drifting ore
#

so when it knows that there's a lets say grass tile below you you load up the grass tile that you would have made yourself

zealous wing
#

At that point you might was well just make a brand new game, since you'd need to use a better engine that can handle a straight 3d environment like that.

drifting ore
#

but i'll ask the devs, and if i they allow me to do it i'll probably just make a vr version of project zomboid, normally so just i remake the map load in the existing 3d models ect.. and make it so that the game won't load if you don't already have PZ

drifting ore
#

after all my only motivation to make this is because i really want to play this game in vr, it's already so immersive and fun so i can't imagine in vr. anything else than that would be pointless to me

#

anyways this is just speculations since the devs didn't reply yet (i dm them to see if they would allow me to do so)

drifting ore
weary matrix
#

@drifting ore legally speaking I think what you describe is just some sort of modding

craggy furnace
weary matrix
#

as long as you don't distribute the game files and users still have to buy the game, I see no reason for them to refuse

#

unless of course if they have a VR plan or something, but I doubt it for now πŸ˜‚

#

but don't take what I said for granted, I'm no lawyer

#

also different laws in different countries so

craggy furnace
#

PZ does not work in any other view or render

#

people get disappointed that dayz or other games like PZ do not have massive hordes of zombies

#

specifically because the moment you slip them into those realms the games demands increase eight fold

weary matrix
craggy furnace
#

youll get some success but ultimately itll just crap out

weary matrix
#

@craggy furnace he said he would make 3D versions of every tile in the game πŸ˜›

#

so assuming he manages to do that, the rest is piece of cake, or well sort of

drifting ore
#
  • i asked the dev and i got a greenlight
weary matrix
#

yay

#

@drifting ore man, not sure how I can help, but I'd really be looking forward to a Zomboid VR mod

craggy furnace
#

yeah attempting to 1 to 1 in terms of recreation would be like eating chalk in terms of food enjoyment

weary matrix
#

if I can help in any way don't hesitate!

craggy furnace
#

yeah cool idea

#

i know others have tried

hot patrol
#

if you mangage to pull it off it would be one hell of an amazing mod

#

hell the devs should hire you if you succeed

weary matrix
#

clearly

drifting ore
#

map, recipe , menu but i think that there's thing like erosion that are going to be harder

weary matrix
#

@drifting ore I'm a coder btw πŸ˜›

hot patrol
#

I think it's because it takes the bag slot

#

idk

weary matrix
#

@hot patrol sounds like a 3D problem, I'm no 3D designer though

hot patrol
#

the model should work I think it is an issue with the xml since the front piece was having a similar issue

#

I can send over my log

weary matrix
#

@hot patrol sure we can check

craggy furnace
#

well

hot patrol
craggy furnace
#

if you want to do erosion in VR

#

you apply it on the texture level

hot patrol
drifting ore
#

but i'll start and the beginning

#

making a new unity project and getting started

craggy furnace
#

you need to make it a "thin" project if you want to succeed

#

going wide will burn you out and you will quit before you know it

hot patrol
#

so anybody see what might be wrong?

craggy furnace
#

its better to have 5 small victories then one large defeat because you are fighting to make something work

drifting ore
craggy furnace
ruby urchin
craggy furnace
weary matrix
#

@hot patrol You have other mods?

hot patrol
#

nope on that worl I am only using my pillow mod

#

for testing

weary matrix
#

You have some really strange errors in some places that shouldn't break

#

@hot patrol which event handlers do you register in your mod?

hot patrol
#

what does that mean?

weary matrix
#

like: Events.OnGameStart.Add(yourFunction)

hot patrol
#

uhhh how would I find out?

weary matrix
#

haven't you made your own mod?

hot patrol
#

this is my first semi complex one

#

and I know little about coding. I have been jumping from guide to guide and help from on here

#

yea I don't think I have anything like that in my mod

weary matrix
#

@hot patrol could you make a new game with a short run to trigger the bug you want to fix? The one you provided has too many errors

hot patrol
#

sure thing

weary matrix
#

then you quit the game as fast as possible, and then upload the log

hot patrol
#

so i'll just log in, spawn the item try to wear it and log out

weary matrix
#

@hot patrol also check your mod media folder and search for every file that contains "Events." in them (with a upper E at the beginning)

hot patrol
#

I did and came across nothing

weary matrix
#

@hot patrol you have no .lua file at all in your mod?

hot patrol
hot patrol
#

both have nothing for events in the code

weary matrix
#

mm ok

#

weird, you have the same errors about the ISRecordeMedia.lua, never seen this error before and I'm using same version as you:

OG  : General     , 1636937663398> -------------------------------------------------------------
attempted index: setTitle of non-table: null

LOG  : General     , 1636937663405> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21

ERROR: General     , 1636937663422> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: setTitle of non-table: null at KahluaThread.tableget line:1689.
ERROR: General     , 1636937663423> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: setTitle of non-table: null
   ...
    at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:262)
    at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:219)
    at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1636937663424> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21```
hot patrol
#

I think I had someone else tell me this. I have no idea why

#

it doesn't seem to effect my game

#

but I was getting 1 error

#

idk if that is what is causing my mod problems tho

weary matrix
#

and also this one: ```STACK TRACE

Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@4b373bc3
function: render -- file: ISToolTipInv.lua line # 108

hot patrol
weary matrix
#

and this:

-----------------------------------------
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@4682e541
function: perform -- file: ISWearClothing.lua line # 72```
#

@hot patrol sorry for asking again, but you sure you don't have any mod enabled except the one you're trying to debug?

hot patrol
#

I only enabled my mod in the world creation settings and I'm fairly sure I have no mods enabled on the base game

#

I will look again

weary matrix
#

@hot patrol ok just need to be sure, because those error, if not coming from another mod, they really have to come from your mod

hot patrol
#

nope, nothing

weary matrix
#

ok

#

@hot patrol do you have your mod published online somewhere so I can have a look at it?

hot patrol
#

want me to send you the entire mod over?

#

I can just send you a rar of it

weary matrix
#

yeah that could be easier to troubleshoot πŸ˜›

#

zip it rather than rar if you can

hot patrol
weary matrix
#

@hot patrol is this file supposed to be in there? daki.psd

hot patrol
#

it was just the photoshop for the textures. I planned to move it once it was done

#

there are some other files like that. I didn't think it would effect things

weary matrix
#

ok

hot patrol
#

I keep a messy work space lol

weary matrix
#

all right, let's see if I get the same errors as you

#

@hot patrol what should I do to trigger your bug?

hot patrol
#

type daki in item spawner and try to wear the one that ends in back

#

power dakimakura back

weary matrix
#

ok

#

ok getting same errors as you πŸ˜…

hot patrol
weary matrix
#

well

#

its a good thing

#

if I wasn't getting the same error I wouldn't be able to help you πŸ˜›

hot patrol
#

truu

weary matrix
#

or to try to help you at least

#

and it means there is indeed a problem to fix

#

@hot patrol how come the icon in inventory is not OK?

hot patrol
#

I haven't made it yet

weary matrix
#

ah ok

#

@hot patrol and what about your other models, do they "work"?

hot patrol
#

yep minus the ground model for the armor

#

both the back anf front piece use the same ground model

#

I'm not even getting the option to place

weary matrix
#

ok so there's defeintely a problem already when you right click the item in inventory

hot patrol
#

there is?

#

just the back or also the front piece?

prime frost
#

Anyone played with the "ReplaceOnRotten ="? Can't get it to spawn the item, the initial item is removed but then nothing πŸ˜’

weary matrix
#

@hot patrol with the back

#

front piece seem ok

hot patrol
#

thought so

#

yea idk why that one is so broken

dry chasm
hot patrol
#

it is meant to use the back pack slot but it's not supposed to be a back pack

#

maybe that's why

weary matrix
#

@hot patrol so I know knowing about cloth and wearable in general, so I need to ask a few silly questions πŸ˜…

#

@hot patrol why do you have so many entries in your fileGuidTable.txt?

prime frost
hot patrol
#

I was stuck for a week on why my zeds spawned nude

weary matrix
#

ok

prime frost
zealous wing
#

I wish getting custom clothing onto zombies wasn't so complex. I have literally no idea how or where to start.

zealous wing
#

Well, I have a custom biker jacket I want to be able to spawn on zeds, but I can't even figure out where in the game files are the instructions governing zed outfits.

craggy furnace
#

there are no instructions

#

but

zealous wing
#

Like, where's the table that outlines what, say, a given zombie wears then?

craggy furnace
#

you assign them an outfit, a name, then you dress them with clothingitems via clothing guid

zealous wing
#

Well I figured out the clothing guid, I think.

#

I have that.

craggy furnace
#

only "difficult" part is finding where to spawn them

#

authenticZ is your go to destination to look at as a reference

zealous wing
#

Well I know where I want this item to spawn, on zombies at bars and the like, as well as more rarely in the world.

#

"ZombiesZoneDefinition.Bar" is what it's called in the game files.

weary matrix
#

@hot patrol ah yeah, I see what you mean about the bag, that could be the issue

hot patrol
#

sadly I have no clue how to fix it. I thought I put all the important info in there for it to work

zealous wing
#

@craggy furnace
So I got this hammered out:

`require 'NPCs/ZombiesZoneDefinition'

ZombiesZoneDefinition.Bar = {
WSJacket = {
name="WSJacket",
chance=40,
},
}`

Is that even vaguely correct? πŸ˜„

#

'WSJacket' being the name of the item in the guid file.

willow estuary
#

Put this is a sub-directory of lua/shared/NPCs or else it will get overwritten by other mods that have zombie zones definitions.

#

You needs to have a zombie outfit defined, using your jacket as part of it, for YOURNAMEHERE

#

You define outfits in media/clothing/clothing.xml, just take the biker outfit and replace the jacket with your jacket and give it a new name.
All of the clothing items used in your outfit definition need to be in the fileGuid.xml file.

weary matrix
#

@hot patrol So I just tried something, basically I replaced your clothing/PowerDakiArmor.txt script with this one:

#

@hot patrol then I can equip the back armor, and it works fine without crash, is properly equipped on the back of the character, but when I try to put the front after that, then the back disappear

hot patrol
#

hmm that's not good

#

what could cause that?

weary matrix
#

I'm thinking maybe you have some shared stuff between the two?

hot patrol
#

oh I see why

weary matrix
#

models

hot patrol
#

you made them both aprons

weary matrix
#

yes, but the back is really being displayed on the back of the character

#

and I guess you can have only one apron, so yes that's probably why

wet dune
#

Can pz handle fbx animation?

hot patrol
#

yea but they need to be able to work together so they need to occupy different spots. plus I have it use a bag slot because I don't want you to be able to wear a bag with the back piece

#

but that at least proves that it being a bag is the problem

#

but why

#

I have the back model using the bag bones

#

idk if that matters

weary matrix
#

@hot patrol I think somehow you're telling the game that your back armor is a bag pack, so it tries to act as if it was one, that's why you're getting errors when hovering over it with the mouse, or right clicking, cause a bag item will trigger these behaviors, like trying to get the items in there etc

hot patrol
#

wait do you think making the type = bag or whatever backpacks use might work?

#

I basically want it to be a backpack with no slots that offers protection

weary matrix
#

@hot patrol

hot patrol
#

what did you do?

weary matrix
#

@hot patrol try this: ``` item PowerDakiArmorBack
{
Type = Clothing,
Icon = Test,
DisplayName = Power Dakimakura Armor Back,
ClothingItem = PowerDakiArmorBack,
BodyLocation = Back,
BloodLocation = Bag,
RunSpeedModifier = 0.93,
CombatSpeedModifier = 0.98,
BiteDefense = 90,
ScratchDefense - 90,
Insulation = 0.2,
WindResistance = 0.05,
FabricType = Cotton,
WaterResistance = 0,
Weight = 4,
WorldStaticModel = PowerDakiArmor_ground,
}

hot patrol
#

AHH body location back

#

smart

#

testing now

weary matrix
#

Oh, I don't like this: Caused by: java.lang.ClassCastException: class zombie.inventory.types.InventoryContainer cannot be cast to class zombie.inventory.types.Clothing (zombie.inventory.types.InventoryContainer and zombie.inventory.types.Clothing are in unnamed module of loader 'app')

#

@hot patrol also when I put on a bag, it remove the pillow in the back, if I put the pillow again the bagpack is removed

hot patrol
#

perfect

#

works on my end to

#

you are a god

#

also what is that error mean?

weary matrix
#

it's means it's trying to use a bag as a clothing item

willow estuary
#

The tooltip code does not like clothing and containers sharing the same clothing slot.

weary matrix
#

@hot patrol so try to make your back armor to be a container where you can put 0 weight in there

hot patrol
#

I don't need to. it isn't a container

#

just takes the slot

weary matrix
#

I know, and that's the problem it seems

#

so make it a container

willow estuary
#

Containers can't have protective properties FYI

hot patrol
#

will that make it show up in the inventory area on the bag slot tho?

weary matrix
#

@willow estuary ah good to know

hot patrol
#

also an issue

#

I guess i'll live with that error

willow estuary
#

This is the code I use to keep PZ from spewing errors when clothing and containers use the same slot; it's a janky measure in that clothing items that "conflict" withe container won't have a tooltip on mouseover when there are conflicts but it works for my stuff?

require "ISUI/ISToolTipInv"

local old_ISToolTipInv_render = ISToolTipInv.render

function ISToolTipInv:render()
    if self.item
    and instanceof( self.item, "Clothing")
    and self.item:getBodyLocation()
    and getPlayer():getWornItem(self.item:getBodyLocation())
    and instanceof( getPlayer():getWornItem(self.item:getBodyLocation()), "InventoryContainer")
    then
        return false 
    end
    old_ISToolTipInv_render(self)
end
hot patrol
#

nice where would I put that?

willow estuary
#

Somewhere in the media/client/lua directory, with the caveat that it works for my stuff but no guarantees.

hot patrol
#

I'll try it but worst case I'm sure the error won't kill anyone

#

I hope..

willow estuary
#

Believe me, you do not want a mod on the workshop that spams errors, even if they are inconsequential.

hot patrol
#

yea that's fair

#

hmmm

willow estuary
#

Unless you like getting lots of DMs and pings from fussy strangers.

weary matrix
#

@hot patrol try what @willow estuary said

hot patrol
#

tying now

#

what should I name this file?

willow estuary
#

Something unique dot lua.

hot patrol
#

ok where was the error being spammed? @weary matrix

#

so I can check

weary matrix
#

@hot patrol what do you mean?

#

I just hover with the mouse over the back armor in inventory and it triggers errors as long as I keep the mouse over the back armor

hot patrol
#

ohhh

weary matrix
#

like red square errors in the bottom right of the screen

hot patrol
#

I think It's fixed then

#

I didn't get any

weary matrix
#

The lua file solved it correct?

hot patrol
#

pretty sure. checking again

#

I still get 1 error loading into the game

#

yep the error you spoke of is gone

willow estuary
#

Clothing item tooltips want to compare the clothing item with any clothing item currently worn using the same "clothing slot".
If there's a container, and not a clothing item, in the slot, then it doesn't know how to interpret the information from it to generate the tooltip.

weary matrix
#

@hot patrol oh sorry, I only get the error when a bag pack is equipped

zealous glade
#

Can I ask a dummy question? getSpecificPlayer(0); what does "0" mean and can I just ignore it? Like getSpecificPlayer();

hot patrol
#

I have it equipped and hovering on it in inv does nothing blair fixed it

weary matrix
#

@hot patrol you have a backpack equipped and the back armor in your inventory ?

hot patrol
#

yep

#

well good stuff

#

I'm almost to the finish line now

#

the foundation of my mod is done now I just need to add more varients and tweak the stats

#

basically a lot of copy pasting

#

my biggest question is if I shoulf make them all seperate items or if I can make 1 model have multiple texture varients

#

I think I had asked this before

#

also getting it be able to spawn in the world outside of containers would be a big bonus

#

shurutsue explained the last one to me but tbh I didn't understand it so i might have to pass on it for now

#

either way thank you both a ton

weary matrix
#

@hot patrol this is the java code that triggers the bug:

      if (!this.isEquipped() && tooltip.getCharacter() != null) {
         float biteDefense = 0.0F;
         float scratchDefense = 0.0F;
         float bulletDefense = 0.0F;
         WornItems wornItems = tooltip.getCharacter().getWornItems();

         for(int i = 0; i < wornItems.size(); ++i) {
            WornItem wornItem = wornItems.get(i);
            if (this.getBodyLocation().equals(wornItem.getLocation()) || wornItems.getBodyLocationGroup().isExclusive(this.getBodyLocation(), wornItem.getLocation())) {
               biteDefense += ((Clothing)wornItem.getItem()).getBiteDefense();
               scratchDefense += ((Clothing)wornItem.getItem()).getScratchDefense();
               bulletDefense += ((Clothing)wornItem.getItem()).getBulletDefense();
            }
         }```
hot patrol
weary matrix
#

I confirm, it fixed it for me too

hot patrol
#

nice

#

I still get 1 error loading in but i've been getting that for a while and I think it happens even with no mods

weary matrix
#

there's no error at load time in 41.56 with no mod

hot patrol
#

must be on my end some how

#

just made a modless world and got it

weary matrix
#

@hot patrol mmm weird, it was one of the errors I was seeing in the beginning

#

but I don't have it on my side

hot patrol
#

yea idk. I even varified game files

weary matrix
#

do you also get the error with a fresh game?

hot patrol
#

I can live with it so long as it's not my mod

#

yea that's what that was

#

fresh modless world

weary matrix
#

@hot patrol very weird:

LOG  : General     , 1636943293290> -------------------------------------------------------------
attempted index: setTitle of non-table: null

LOG  : General     , 1636943293290> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21

ERROR: General     , 1636943293291> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: setTitle of non-table: null at KahluaThread.tableget line:1689.
ERROR: General     , 1636943293291> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: attempted index: setTitle of non-table: null
    at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
    at zombie.Lua.Event.trigger(Event.java:64)
    at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:88)
    at zombie.radio.media.RecordedMedia.init(RecordedMedia.java:70)
    at zombie.radio.ZomboidRadio.Init(ZomboidRadio.java:192)
    at zombie.iso.IsoWorld.init(IsoWorld.java:2280)
    at zombie.gameStates.GameLoadingState$1.runInner(GameLoadingState.java:262)
    at zombie.gameStates.GameLoadingState$1.run(GameLoadingState.java:219)
    at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1636943293293> -----------------------------------------
STACK TRACE
-----------------------------------------
function: init -- file: ISRecordeMedia.lua line # 21```
#

see the first line?

#

this one: RecordeMedia -> MediaData id already exists : 89108e07-fc70-4eec-a267-790d6f4b9831

hot patrol
#

what about it?

weary matrix
#

it looks like you have another object with that UUID, so the ISRecordeMedia.lua is trying to use that other object instead of a radio

hot patrol
#

not sure what that means but I see radio. Is this an audio related issue?

#

if so I think I know why

#

I used to use that audio ovehaul mod

weary matrix
#

probably yes

#

guess it broke something then

#

try to search this UUID in all your game files under media/ folder: 89108e07-fc70-4eec-a267-790d6f4b9831

hot patrol
#

you would thing varifying game integrity would fix that tho, no?

weary matrix
#

possibly not

#

Steam just checks the files it knows about, if you have extra file it might just ignore them

#

and if you have a conflicting item with that UUID in a file that is not part of vanilla, that would definitely explain this bug

hot patrol
#

so how am I searching this?

weary matrix
#

just search for this 89108e07-fc70-4eec-a267-790d6f4b9831 in the content of your game files under the folder ./media

hot patrol
#

gotcha

#

no item match

weary matrix
#

I would try a fresh install then

hot patrol
#

yea will do

#

for now I can live with it

#

thanks tho

#

I appreciate it

#

man, a lot has gotten done tonight

weary matrix
#

@hot patrol let's say you owe me a few hours of your time when I'll try to make some models, sounds fair? πŸ˜…

hot patrol
#

lol

#

I only made the one pillow. He made the armor

weary matrix
#

haha ok

hot patrol
#

yea, sorry. total novice here

#

as I'm sure you can tel

weary matrix
#

well you still have knowledge that I don't have I think

hot patrol
#

hey i'll take that compliment

#

haha

weary matrix
#

just going through making your mod, you touched a lot of things I never played with yet

hot patrol
#

yea it blows my mind as well. This was meant to be a simple shit post mod

#

to play around with

#

but everyone here piled on the great ideas and now it is a monster shit post

weary matrix
#

heh

hot patrol
#

I love it though

#

super proud of it

weary matrix
#

i bet

hot patrol
#

anyways I'm gonna call it a night. If you have any clues on how I can tackle my remaining tasks hit me up

weary matrix
#

good night!

soft musk
#

Man.. I know some people have been making special zombie mods, but it would be amazing if there were a mod that makes some zombies have the "environmental attacks" feature on

weary matrix
#

I think i found my next mod! Make it possible to throw zombies out the window! It could be called "Out the window" or something πŸ˜‹

#

@soft musk shouln't be too hard

viral spire
#

Is there a Quiet Place mod?

fair frost
#

Update of the day for (wip) addon:

  • Added Jefferson and (accurate) Knox County Sheriff Vics
  • Got all custom sirens to work properly
dark solar
#

noice

glossy briar
#

does the supbar survivor mods still work? starting in the camps with populations and theres no npcs at all

fair frost
unkempt blaze
#

Why does my fashion montage work? I can not customize character more, but i have enabled it

tired charm
#

Guys is there an event for when a barricade Is damaged or something that can make me achieve that? Thanks

little vessel
#

Does anyone have any experience with monkeypatching?

I'm trying to modify a function of Better Lockpicking, but still want the mod to require the rest of that mod.

The function I'm trying to modify is CheckAlarmBuildingAction:perform()

I tried the current solution

local BLCheckBuildAlarm = betterLockpicking.CheckAlarmBuildingAction

betterLockpicking.CheckAlarmBuildingAction = function CheckAlarmBuildingAction:perform()

    local alarmFound = false
    if self.obj:getModData()["BetLock_cantCheckAlarm"] == nil then
        self.obj:getModData()["BetLock_cantCheckAlarm"] = (ZombRand(100) < 5)
    end

    if self.obj:getModData()["BetLock_cantCheckAlarm"] then
        self.character:Say(getText("UI_cant_check_alarm"))
    else
        if (self.sq1:getBuilding() and self.sq1:getBuilding():getDef():isAlarmed()) or (self.sq2:getBuilding() and self.sq2:getBuilding():getDef():isAlarmed()) then
            self.character:Say(getText("UI_is_alarm"))
            alarmFound = true
        else
            self.character:Say(getText("UI_is_no_alarm"))
            alarmFound = true
        end
    end    

    ISBaseTimedAction.perform(self)
    return BLCheckBuildAlarm
end

But it didn't work.

Basically what I'm trying to do is insert the alarmFound variable in the Better Lockpicking mod.

weary matrix
weary matrix
#

yw

south brook
#

anyone has a cool mod?

harsh prairie
south brook
#

I dont know

#

tell me

#

what am I looking for?

#

I want to make this game better

harsh prairie
#

Hello! Could someone take a look at a trait mod I am working on? Something is not working right, but I don't know what.

south brook
#

what is trait mod

harsh prairie
#

@south brook it's a custom made trait.

south brook
#

can I see it?

harsh prairie
#

It is not finished yet - you should check out the More Traits mod in the Workshop!

keen edge
#

Anyone know if there's a way to get a clothing items random tint value and apply it to another item? Been messing with an idea for makeshift winter clothing and a couple of the things I've made use recipes to basically change another clothing item into something else and I wanted the new item created using the other item to have to same tint value/colour?
For example one of the recipes uses socks to make sock gloves in case you can't find anything else for warmth and it all works fine, only that the gloves are set to random tint as well and obviously come out a completely different colour to the socks you used to make them. Is there a way I can get the tint value of an item used in crafting and apply it to the result I guess, if that makes sense πŸ˜…
Any idea's would be muchly appreciated SpiggoπŸ’ž

willow estuary
#

My own code, no guarantees it will work for you, rename the function so it doesn't conflict with my stuff, yadda yadda yadda

function  TransferColor(items, result, player)
    local ClothingColor  = nil
    for i=0,items:size()-1 do
        local item = items:get(i)
        if  item:IsClothing() then
            ClothingColor = item:getColor()
        end        
    end
    result:setColor(ClothingColor)
    result:getVisual():setTint(ImmutableColor.new(ClothingColor))
end
weary matrix
#

Can I take for granted the fact that a player will never have more than one corpse in inventory etc?

#

arf

#

no

#

just managed to have two πŸ˜‚

#

grab corpse, put it in bagpack, drop backpack, grab other corpse, equip backpack

#

so there's a tiny bug, once you put a corpse in your backpack, even if you unpack the corpse you don't have the option to "Drop Corpse" when right-clicking on the ground

#

and if I right click on the corpse in my inventory, I can "Grab Corpse" instead of "Drop Corpse"

#

if I try to grab the corpse in my inventory I'm getting this in console.txt: LOG : General , 1636998618238> bugged action, cleared queue zombie.characters.CharacterTimedActions.LuaTimedActionNew@10dc043e

hollow shadow
weary matrix
#

@hollow shadow so you're calling me a liar? I just did it

#

on vanilla with no mod

willow estuary
#

Debug mode?

weary matrix
#

ah, yes, does that change something?

willow estuary
#

Absolutely.

weary matrix
#

Why?

willow estuary
#

A lot of the limitations for handling stuff in the inventory is disabled when in debug mode.

weary matrix
#

@willow estuary does it affect the game even if you quit to desktop, disable debug mode, and continue the same game?

#

Cause I was still able to put the corpse in my bag

#

the bag was the Big Hiking Bag

#

@hollow shadow any clue?

hollow shadow
#

i was able to do some weird stuff in debug mode when i tried it.

#

i think i stuffed like 1000 corpses ina duffle bag in my hands 5 months ago

#

with it

#

but im not sure since it was a long time ago

weary matrix
#

@hollow shadow I mean if I start a new game to get a bag, quit to desktop, disable debug mode and continue same game, will the game still be affected by debug mode allowing me to put whatever stuff in my bag like corpses?

hollow shadow
#

i dont know.

weary matrix
#

thx

keen edge
#

Actually I might be able to work it out by looking at your knitting mod ^^ If I end up hitting a dead end I'll ask again here
Again, thanks heaps though. Would've had no idea where to start otherwise

sour island
#

Generally moving the corpses and generators inside of your inventory trigger dropping it. Some mods break this.

weary matrix
#

@sour island I'm was not using any mod during the test

sour island
#

I know just a heads up to anyone

drifting ore
#

Why is it that when I try to place an irrigation pipe on the red square's place, it is put in another place?

#

Same to the solar panel mod

ruby urchin
warped night
#

It’s a mod so mod support goes here

weary matrix
#

When I check the properties of an IsoWindow object, I don't get the same "Facing" value depending if I look with Chunk Debugger, or when I print the value from Lua code. Any one could explain what the f*** is going on here? πŸ˜‚

#

oh, and here's the code I'm using:

#

Any clue?

#

The worst is if I check a window oriented in the opposite direction, the values are OK, both Chunk Debugger and console show the same value, that is West

#

Got same problem for North and South

#

@sour island any clue?

agile coral
#

Have you tried pulling out the lambda into a named function? I had some issues with them before

weary matrix
#

@agile coral you mean the one I'm passing to getAllEvalRecurse()?

agile coral
#

yeah

grizzled grove
#

just to double check, are you querying the same floor tile in both examples?

weary matrix
#

@grizzled grove well with chunk debugger I select the only tile around with an IsoWindow in it, and from the code I check if the object is an instance of IsoWindow, so not sure but I'd say yes? Otherwise how can I know?

#

@agile coral but the getAllEvalRecurse() is just to get the corpse in player inventory, not related to the window. What kind of issue were you having?

willow estuary
#

I dunno about the discrepancy between debug and your code, but, as far as I know, windows only have two "facing values", the north/south ones and east/west ones?
Windows only exist on the west and northern edge of a tile.

So a west facing windows is the same as an east facing window.

grizzled grove
#

i just don't know how you're calling your script is all. We have a tendency to click on the visible part of the object, which could lead to the tile behind the one you're wanting info on.

#

debug is returning 'facing E' though. i think it might matter for in/out of a room and for animation

weary matrix
#

@willow estuary but then why Chunk debugger is showing East for the first window, and West for the window in the opposite direction?

willow estuary
#

I have no idea? Could be just two ways of saying the same thing from what I know about windows?
Debug is also specifically a tool for the devs, and isn't designed/intended for other uses? I mean it's useful for making mods, but that's not the intent of it's design?

#

I'd just look at the chunk debug code for answers though, but as far as I know a west facing window is also a east facing window?

#

Windows and doors are both funky to deal with IME on account of the whole "only existing on the western or northern edge of a tile" business.

weary matrix
#

@grizzled grove but the other tiles are not IsoWindows? I check like this: if instanceof(object, 'IsoWindow')

willow estuary
#

Ah, the chunk debugger probably has extra code for "facings"?

weary matrix
#

@willow estuary ok so how could I determine which is the square outside the window just in front of it? Cause some window square are inside or outside depending on their orientation

#

so calling window:getSquare():isOutside() is not helping

willow estuary
#

I don't remember how I did it, other than it was a pain in the ass to be honest?

weary matrix
#

@willow estuary have made a mod that does that?

grizzled grove
weary matrix
#

@grizzled grove I was saying this regarding: We have a tendency to click on the visible part of the object, which could lead to the tile behind the one you're wanting info on.

willow estuary
#

Ah, here we go, square:isWindowTo(square2), that's what I used for the most part.

#

assuming square is the "point of origin"
if square1:isWindow(to the other square north of square1) then the window faces north, and so forth.

weary matrix
#

@willow estuary mmm so I would have to check the four square around the window square? Like window square has coordinates (x, y), then I will have to call windowSquare:isWindowTo() for each square with coordinates (x + 1, y), (x - 1, y), (x, y + 1), (x, y - 1), is that correct?

#

or just two square to check maybe

willow estuary
#

Yeah, that seems to be what I uses for evaluating windows.

weary matrix
#

I'm tempted to open a bug report about this

#

but yeah what you propose should be working indeed

#

@agile coral FYI, just tried to make a proper function but same result. But now I'm, curious, what kind of issue were you having with closure?

agile coral
weary matrix
#

ok

quasi geode
#

was probably something else messing with the event then. lua functions are "first class functitons"

#

ie: they're just variables with a function type instead of something like string or number

ruby urchin
weary matrix
#

Any clue when you have a corpse item in your inventory how to get the corresponding IsoDeadBody?

quasi geode
#

dont really think you could reimplement some of what the java is doing there via lua, but you can take a look. starting at line 4836 in IsoGridSquare (in iwbums version)

weary matrix
#

thanks @quasi geode ❀️

#

I suspected the InventoryItem.storeInByteData() had something to do with it but could not figure how to get back the IsoDeadBody

#

been looking for a DropCorpse action in lua but couldn't find it

#

I suspect IsoGridSquare also has a role to play in there

#

especially this: public InventoryItem AddWorldInventoryItem(..

#

it has a block like this: ```java
IsoDeadBody var6 = new IsoDeadBody(IsoWorld.instance.CurrentCell);

     try {
        byte var7 = var1.byteData.get();
        byte var16 = var1.byteData.get();
        byte var9 = var1.byteData.get();
        byte var10 = var1.byteData.get();
        int var11 = 56;
        if (var7 == 87 && var16 == 86 && var9 == 69 && var10 == 82) {
           var11 = var1.byteData.getInt();
        } else {
           var1.byteData.rewind();
        }

        var6.load(var1.byteData, var11);
     } catch (IOException var12) {
        var12.printStackTrace();
        IsoZombie var8 = new IsoZombie((IsoCell)null);
        var8.dir = var6.dir;
        var8.current = this;
        var8.x = var6.x;
        var8.y = var6.y;
        var8.z = var6.z;
        var6 = new IsoDeadBody(var8);
     }

     var6.setX((float)this.x + var2);
     var6.setY((float)this.y + var3);
     var6.setZ((float)this.z);
     var6.square = this;
     this.addCorpse(var6, false);
#

and it's adding the corpse to the square

#

haha yes!!!! ❀️

#

@quasi geode simply call square:AddWorldInventoryItem(corpseItem, 0, 0, 0) and it works! πŸ˜„

#

or well, the corpse is not exactly where I want it to be, but at least I get a body!

quasi geode
#

ah ya thats the block of code i was referring too

weary matrix
#

@quasi geode thanks man!

#

NOW I CAN THROW DEAD BODIES OFF WINDOWS DAMN IT !!! πŸ˜‚

quasi geode
#

lol

weary matrix
#

sorry for screaming but I'm so happy πŸ˜‚

quasi geode
#

didnt realize you wanted it to spawn, just thought you wanted a reference to it otherwise i would have just suggested calling the function (i'm only half-thinking at this time of night). good that it works for your purpose though

weary matrix
#

πŸ˜„ πŸ˜„ πŸ˜„ πŸ˜„ πŸ˜„

#

Who said there was no gravity in Project Zomboid ??? πŸ˜‚

#

guess I could make it fall properly, so you actually see the fall, not sure it's worth it though

#

and now I deserve a good night sleep! nite all, thanks again @quasi geode

viral spire
#

So I'm trying out the Turning Time mod. Does the spawn of Banshees/Nemeses depend on the zombie population as well? I'm trying to see if it's possible to create a survival where the only zombie spawns are Banshees or Nemeses depending on my choice.

hollow shadow
#

so i switched from old blender to new blender. And i cant figure out how to turn cylinder into prism when i spawn it. Any help?

hollow shadow
nimble spoke
#

The thing is, it would be way harder to find bags and some clothes, that would be my main concern

weary matrix
#

@hollow shadow I usually google for the name of the stuff I'm trying to do, adding the exact version of blender. I usually find some video, where I can see how it's done πŸ˜…

hollow shadow
#

blender 2.7 is chad

#

i googled for it and didnt find anything

ruby urchin
#

Hey someone know some way to get OutfitManager class?

formal edge
#

Do you think it's possible in the game too add news models of zombies with news hitbox and animations ? For exemple, If i want to make a left4dead fan game and add a boomer ?

hot patrol
#

Some mods already do

willow estuary
#

HItboxes? Probably not.
That will be feasible when animals are added to vanilla however.

weary matrix
#

I'm not really a 3D designer, but I learned the basics for both 2.7 and 2.8

hot patrol
#

Nevermind I thought that was about something else

hollow shadow
formal edge
weary matrix
#

@hollow shadow sure I understand πŸ‘

formal edge
#

Ty for the informations πŸ˜„

north ledge
#

You sound like you're gonna have some fun

drifting ore
#

Ehy everyone. What's wrong with the Fertilizer? Using it in recipe makes game sick (crafting menu doesnt appear, gamepad broken)

copper torrent
#

can someone help me a mod i subscribed isnt showing up in mod tab to enable it

#

ok got it working after reinstalling my entire game

dark solar
dawn shuttle
weary matrix
#

for me it happens after I start too many new games and/or load too many saved games

dark solar
#

hmm has not happened to me

viral spire
# nimble spoke Yeah, it depends on standard population. I could add some kind of challenge mode

A challenge mode would be interesting, maybe if it removes the zombies and leaves only the specials and kind of plants the player into this Nightmare scenario.

Either as a challenge or a separate mod. I'd prefer a separate mod because it allows the players to retain the freedom to select via sandbox or defaults, rather than spawn them in the same predetermined location.

But I guess it depends on what is or isn't possible modding-wise.

vapid lantern
#

I've been trying to add a few pices of clothing for a while noe, but I can't get the texture to work, I've even changed a base game item texture to make sure I was doing it right and it worked then, also the item icon for the added clothing changes it's color

agile coral
weary matrix
#

@agile coral good to know, could you please acknowledge on the thread you're also having the issue with UI slow down when you start/load/quit games many times?

#

also I'm writing a script to monitor memory heap usage of Zomboid process, I can already see between each loading/new game that heap space keep increasing

agile coral
#

Sure, I added my $0.02 to the thread

vapid lantern
#

I just needed to move the fileGuidTable.xml from clothing to media

wild estuary
#

found a guide on modding and the author said that a lot of people frown upon Java modding. If this is true, why is that?

willow estuary
#

The only person I've ever heard say that was the author of that guide so I dunno?

weary matrix
#

@agile coral thanks man!

vapid lantern
#

I may just be harder to get past the workshop screening prosses

weary matrix
#

@wild estuary probably true when there's no support for modding, might be a nightmare in that case

#

but in Zomboid case there's an official API for modding, and it's really good. Not perfect but it's still allows you to do many crazy things

wild estuary
#

yeah they mentioned that so I'm gonna take a look at that. A lot more comfortable with Java than Lua

vapid lantern
weary matrix
#

Except for closed window and barricade, anything that can block passage through a window? Maybe with metalworking, i'm not sure

wild estuary
vapid lantern
#

ok, thanks

late hound
weary matrix
#

@agile coral check ---^

agile coral
#

Aha, so there WAS a leak after all

ruby urchin
#

lmao why put a xml path if it won't work

final String guidFromFilePath3 = ZomboidFileSystem.instance.getGuidFromFilePath("media/clothing/clothingItems/" + item.getClothingItem() + ".xml");
ruby urchin
#

In fileGuidTable you can set xml path of your ClothingItem, but it doesn't matter, always will be in ../clothingItems/ folder

steady onyx
#

Just had a workshop update that disabled a load of mods on my save (near pee'd myself, fearing corruption)... Don't think I've seen that before?

weary matrix
#

Any clue what I'm doing wrong? I'm trying to figure out the square on the other side of a window, but this code always trigger the error at the end:

function getOppositeSquare(player, window)

    local square = window:getSquare()

    local x = square:getX()
    local y = square:getY()
    local z = square:getZ()

    local sq1 = getSquare(x + 1, y, z)
    local sq2 = getSquare(x - 1, y, z)
    local sq2 = getSquare(x, y + 1, z)
    local sq3 = getSquare(x, y - 1, z)

    if square:isWindowTo(sq1) then
        return sq1

    elseif square:isWindowTo(sq2) then
        return sq2

    elseif square:isWindowTo(sq3) then
        return sq3

    elseif square:isWindowTo(sq4) then
        return sq4
    end

    error('This should never happen!')
end```
#

@willow estuary any clue? Trying to implement your idea

#

can't figure out why none of sq1, sq2, sq3, sq4 are the opposing square considering the coordinates

weary matrix
#

oh man, this is driving me nuts πŸ˜‚

zealous glade
#

How can I get the player's current equipped weapon subCategory?

#

local player = getSpecificPlayer(0);

#

local equipped = player:get??

weary matrix
#

@zealous glade found it yet?

zealous glade
#

yes, trying to figure it out how to use it

#

It seems to be a handweapon in the inventory? I don't know how to get the equipped weapon.

weary matrix
#

@zealous glade have you searched for weapon in the link I sent you? πŸ˜‰

zealous glade
#

This one?

weary matrix
#

yes I think that's it

#

not sure what it does if you have two hand weapons equipped though

zealous glade
#

I think it's still functional with two handed weapons

weary matrix
#

no I don't mean a two handed weapons, but like if you have a hammer in one hand, and a screwdriver in the other for instance

#

guess it will return the primary hand weapon but I'm not sure

zealous glade
#

It doesn't matter, my goal is to get the subcatogory of the equipped weapon that kills the zombie. If it can attack, it must be an equipped weapon, right?

zealous glade
#

Can I ask another dumb question? How to define if the zombie is killed by the player?

weary matrix
zealous glade
#
local function realZombie(zombie)
    local player = getSpecificPlayer(0);
    local equipped = player:getUsehandWeapon():getSubCategory();
    local corpse = zombie

    --the zombie is hit by player
    if corpse:Hit(player) then

        --the zombie is dead because player kills it
        if corpse and instanceof(corpse, "IsoDeadBody") then

            --the weapon player uses to kill it is a Swinging type
            if equipped == "Swinging" then

                --there is a chance that zombie doesn't die, it comes back later
                local Rand = ZombRand(1, 100);
                print(Rand);
                if Rand < 25 then
                    corpse:setReanimateTime(10);
                end
            end
        end
    end

Events.OnContainerUpdate.Add(realZombie);```
#

I know it's dumb, sorry about the mess.

#

I don't know if it is correct to write corpse:Hit(player) to define the zombie is killed by player or not

kind surge
weary matrix
#

@kind surge no, but why would they be nil?

#

it's not on the border of the map or something

#

@zealous glade probably not, if I'm not mistaken, that would make the zombie hit the player

kind surge
weary matrix
#

@kind surge right now I've been testing on ground level, still no square returns true for IsWindowTo 😦

#

@zealous glade that's not the proper event I think

#

also the parameter could be either Food, or IsoDeadBody, or IsoGridSquare, or IsoWorldInventoryObject

#

so if you call the method Hit() that would probably trigger an error in all cases

#

cause none of these objects have a Hit method AFAIK

zealous glade
#

I see, I'm still stuck at figuring out how to write correctly and call the methods correctly

weary matrix
#

and finding the proper event πŸ˜…

#

it's definitely NOT OnContainerUpdate

zealous glade
#

Thanks man, have to learn hard now

weary matrix
#

try with the event I told you about, and just check if the zombie has his health equal to zero

hoary hawk
#

is it possible someone could show me the structure i need to use to make a mod that adds guns

#

file type for models, sounds need to be ogg I think?

#

is it possible I could just copy paste the files for vanilla guns and change that?

formal edge
hoary hawk
#

how

#

i think i mostly have this figured out but id greatly appreciate knowing how tod that

formal edge
zealous glade
hoary hawk
#

yeah how do i view it

#

i have a mod i could have used for this but i have no idea how to access mod files

zealous glade
#

Subscribe it then locate the mod on your pc

hoary hawk
#

lmao

#

how do i locate it

zealous glade
#

D:\Program Files (x86)\Steam\steamapps\workshop\content\108600

#

remember the Mod ID, find the folder named that ID

hoary hawk
#

oohhhh

#

i was looking in zomboid files

#

thank you

zealous glade
#

np man

formal edge
#

i didnt know that mod, gonna watch it too πŸ˜„

sharp crystal
#

Hello. I just want to remap a key-bind from a mod. How to add numeric keys for it? Like I want to add the numeric key 0. zero...

#

for F it looks like this:

#

elseif key == Keyboard.KEY_F

#

how to add the zero pls?

#

instead of F?

trim igloo
dry chasm
#

Rather should be Keyboard.KEY_NUMPAD<number> for 0-9 ex.: Keyboard.KEY_NUMPAD0 IIRC
Edit: Forgot prefix KEY_

trim current
#

does anyone know what determines if a firearm produces muzzle flash? i'm trying to remove it from a gun that i'm making

viral vale
#

Free mod idea: Dirtied & bloodied clothing raises your ability to avoid zombie detection but increases your illness chances, allows for even stealthier gameplay but at a risk. Can also cover your body with dirt/blood as well

undone elbow
#

Is it possible to load lua file on demand from mod folder?
For example, I'd like to make a kind of version checker that loads right lua file.

dry chasm
#

ex.:

if condition == false then
  return nil;
end

-- Usual file content here
ruby urchin
glacial karma
#

Hello everyone, are there people here who know how to create animations and speak Russian?

ruby urchin
#

here is

tired charm
#

Hi, I was looking into the Java code and events. I'm aware of where's the list with all the events, but does anyone know where specifically events are defined? For example, where is the code for the "EveryTenMinutes" events, etc.

ruby urchin
#

I recommend use a decompiler like Procyon for .class files, so you can see them

tired charm
#

Yeah, that's what I'm doing. Though the sheer amount of files is immense to look in, that's why I'm asking if anyone knows already. Anyway, I'll check out that decompiler πŸ‘

ruby urchin
#

You're usin vscode?

tired charm
#

JD-GUI

#

Having a buggy time using it though.

ruby urchin
#

idk if JD-GUI have the option to search in files, but in vscode, you just need search and it will give you all the locations where it is named

tired charm
willow estuary
thorny vortex
#

I cant scroll in the mod options.

#

There's no scroll option, hitting buttons don't work, I tried a bunch of different things.

#

Turns out, Sandbox+ was the problem.

#

Problem fixed.

ruby urchin
plucky nova
#

somebody went and fixed the helicopter mod! it works now!

errant meteor
craggy furnace