#mod_development

1 messages ยท Page 268 of 1

nimble vale
#

but to design your own is no simple task

red tiger
nimble vale
#

at that point if you could design your own llm model loader that can compete with those two you'd be making a lot of money doing something better with your time lol

red tiger
#

Thought it'd be relevant to your interests.

nimble vale
#

I'm not saying you can incorporate python into PZ im just saying, that creating one program to do all of this, even in python is a serious undertaking requiring extensive knowledge in multiple fields

#

This isn't even discussing model templates, model formats etc

red tiger
#

Yes. I'm letting you know about another tool that could help you depending on what you're doing.

#

=)

bright fog
red tiger
#

It's all basically ready for production.

nimble vale
#

I took a look at the ping pong one and it pretty much is all just sending server/client commands mainly but it makes since considering what the devs used for coding pz

bright fog
red tiger
#

The font one shows sub-classing in action.

#

(Sub-classing Java classes)

#

The shader one involves touching private code deeper in the engine to modify shader uniforms in realtime.

nimble vale
#

Like i said nothing is impossible but you'd need to start somewhere and so far there's no one whose made a NPC mod from the base up besides nolan without relying on his code. So until someone does, it's going to run like jank.

bright fog
#

....

#

I already mentioned it

#

Bandits is the best one, which doesn't involve any of the previous NPC mods that exist

#

And there's a fuck ton of different projects that didn't rely on older mods

nimble vale
#

what makes you think they havent used his code as a base?

bright fog
#

Bcs I have dug through it

#

They use IsoZombie

nimble vale
#

I'll take a look at it now as im pretty familiar with it

bright fog
#

Bandits is unique

#

It has nothing to do with other NPC mods

#

It uses IsoZombie, which is way more reliable and the only way to make proper NPC in MP as IsoPlayer does weird shit in MP

#

from my understanding of it

red tiger
#

I hope that you're writing a research paper for uni or something for this.

#

Don't sit on this as a pet project.

#

=)

#

Make it worth your while.

bright fog
#

What are you talking about ?

red tiger
#

The AI model stuff Ada is doing.

#

I'm saying do this in a way that makes it good for you in your career path.

#

It's valuable work.

bright fog
#

Depends tbf

#

If they absolutely do not plan on doing any of that stuff in the future, there isn't much to go there

red tiger
#

You can say that. I'm saying simply that it is worth doing a little extra work to form it into a research project.

#

Still good to have as a portfolio piece. <3

bright fog
#

For sure, but if they absolutely do not work in the field, there isn't much need

red tiger
#

There's a lot of people who mod to learn their trade. =)

bright fog
#

Anyway I checked your Pythoid example ping pong, so that does something which you can do with lua basically ?

red tiger
#

If you saw my prior messages I mentioned the more complex examples.

bright fog
#

Going to check the others

#

Yea

nimble vale
#

BanditPlayer.getPlayerById = function(id)
local playerList = BanditPlayer.GetPlayers()
for i=0, playerList:size()-1 do
local player = playerList:get(i)
if player then
local pid = BanditUtils.GetCharacterID(player)
if pid == id then
return player
end
end
end
end

It is literally structured exactly the same whether they used his code or just did the exact same thing nolan did, it is essentially the same. It's all built off zombie logic.

bright fog
#

So the font one is about adding new fonts ?

bright fog
nimble vale
#

lol nvm then

#

its kind of funny saying you know something when you dont know what im talking about clearly

bright fog
#

Bcs there's multiple NPC mods and a bunch of those don't use the same thing

nimble vale
#

Yeah but they only exist because of one npc mod

#

that's my point

bright fog
#

Name the mod?

nimble vale
#

๐Ÿคฆโ€โ™‚๏ธ

nimble vale
#

If you all want to explain to him the history of npc mods go for it im fixing some coffee

bright fog
#

So what you're saying is that literally every single NPC mod is based on the same mod ?

#

There's like 4, maybe 5, NPC mods that come to my mind and all of these are based on the same shit ?

#

I judged Bandits based on what I knew of the few NPCs mods I know of, and it looked fairly unique to me, nor as he mentioned anywhere basing his work on another person, but you mention a part of code which is used in another mod ?

nimble vale
#

People have stolen my mods and not credited me, its pretty common.

bright fog
#

Why are we talking about you here ?

drifting ore
#

Hi

nimble vale
#

Is it me or are they looking for an argument ?

bright fog
#

No

#

I'm not

nimble vale
#

Hi @drifting ore

bright fog
#

I didn't mean it as an insult or anything

#

Just idk who you are in the modding community really, so you're mentioning people stealing your mods and not crediting you, but I don't even know what mod we are talking about here

nimble vale
#

My point is a generalization that its a very common thing to do

#

thats the main focus

bright fog
#

I mean yeah

#

But if I know the guy stole the code of someone else it matters to me

red tiger
#

This convo got really meta in a weird way.

nimble vale
#

^

bright fog
#

Bcs I've been studying Bandits technical aspects a bunch

nimble vale
#

it really did

drifting ore
#

Hello

red tiger
#

I only have an hour left of time before work. I'm going to go focus on my stuff.

nimble vale
#

same

#

it was fun yall

bright fog
#

-_-

bright fog
red tiger
timid scarab
bright fog
#

No ?

#

I was supposing Nolan was Super Survivor but Bandits uses IsoZombie and from what people explained SS uses IsoPlayer ?

bright fog
#

Nvm you already did

timid scarab
bright fog
#

Hmm

timid scarab
#

I don't see how it could've been made using the IsoPlayer class

bright fog
bronze yoke
#

yeah, the latest lua update just broke it completely (i love pushing untested changes), until they fix it you need to edit the path to the correct one manually

#

it looks like the issue was closed this morning so hopefully the actual release will be soon

bright fog
#

Nice

#

Thankfully I haven't modded a lot these past days so I didn't have to reenable Umbrella in other folders

red tiger
nimble vale
#

Okay coffee is done. To answer your question yes, and both stem from the same code, but one is specifically for zombie behavior, which is what bandits uses for their npc's (survivor npc mods don't have this functionality) bandits took it a step further. So while the framework everyone uses is the exact same method. Whether or not like I said before they achieved it in the same manner or used code to base off of. Doesn't fundamentally change the fact that survivor code for survivor mod's including bandits is achieved through jank of zombie npc behavior.

#

My point is there is no code for npc's (anymore) there is remnants of code and zombies. The end result is the same. I still don't know why it's that big of a deal to you. The main difference is the ability to zombifiy (and zombie behavior once zombified) a NPC or not. Beyond that they accomplish sudo NPC behavior.

#

and there are references to Isoplayer in bandits as well, most of which in regards to MP situations. Other survivors mods dont rely on Isozombie because they don't use zombification. So it doesnt do anything normal npc's do as a survivor besides turn into a zombie.

#

The main take away, the base foundation remains the same and likely will be till we get true NPC behavior code.

#

Whether I use isoplayer or isozombie mainly has to do with the fact, using isoplayer is simplier for my usecase. I don't want to have to worry about extra code on top of normal (alive) npc behavior. So it strips one element of problems i'd have to worry about with my integration with AI by not using bandits.

nimble vale
#

and if you want to know what syncing ai npc's is like look at BanditUtils.lua in this directory X:\Steam\steamapps\workshop\content\108600\3268487204\mods\Bandits\media\lua\shared (x= your drive)

They did the math, put the bandits on the client side, tried to re-sync to the server, cloned the Player, created a fake player on another layer. Just to make sure multiplayer sync works. It's impressive but right in his notes on the lua file he mentions how difficult syncing actually is.

potent loom
#

the cloning of IsoPlayer actually has nothing to do with syncing. It's only use case was to use it in Hit function that was expecting IsoPlayer as an attacker, but the attacker was zombie, so this was a workaround

#

if the attacker was a zombie, the player reaction hit would look like a bite attack

nimble vale
#

When it comes to Pz I feel like most mods accomplish amazing things by amazing work arounds. So that makes sense

potent loom
#

yea its tons of hacks

nimble vale
#

That's the same boat I'm in, lack of actual IP api connection so I have to duct tape stuff through text files and read/write code

potent loom
#

that's the fun i guess

#

but only if you achieve something in the end

nimble vale
#

It really is, I don't play much but the challenge was more fun than using the end result tbh.

#

I was actually working on a python script for tts/stt/chat integration when I thought of PZ's modding capabilities and did it just for fun.

potent loom
#

yea be careful, modding is addictive

nimble vale
#

:X Yeah I stopped modding for PZ a few years back version updates have a way of taking the wind out of you.

nimble vale
potent loom
#

i have no idea. But my lucky guess is that TIS tries to rather introduce new stuff instead of changing things because changing things will break so many mods

nimble vale
#

I heard they are changing the mod system based on their aug 29th blog

#

I'm not sure exactly how much but it was an interesting read since i haven't been in the loop forever

potent loom
#

they will require every mod to be explitly marked as b42 compliant

#

i dont know how it will work for popular mods that are not developed anymire, someone else will have to repost them

nimble vale
#

Yeah, that part was a bit confusing because it said it will work if you setup a b42 structure, but i assume that only is in reference to b42 beta not official release.

#

And yeah, I expect a lot of mods to be DOA.

#

How does the change to zombie heat mapping affect your mod?

#

or does it?

potent loom
#

it should not impact it at all

#

the risk is for example if they actually fix the bugs:) say the calendar problem, the starting date in multiplayer is wrong and i do correct it, so if they fix it my correction would actually make it incorrect again

nimble vale
#

So I noticed that, and for some reason I have a similar issue even in single player.

#

My text files save with a date timestamp, and for some reason it thinks its the next day before it is. which is a bit odd.

potent loom
#

things like that should be corrected asap otherwise the technical debt accumulates

nimble vale
#

The whole timing system in general being linked to frames isn't great either.

#

That's the whole fallout 4 issue all over again.

#

One method I contemplated for using instead of OnTick was to pull the osdate (time) then ontick till the desired time, then turn off and trigger an event.

#

because I didn't want OnTick running non-stop for something that I didn't need constantly

muted garnet
#

@bright fog @bronze yoke got it, thanks

nimble vale
#

I ended up not using it for whatever reason, but it'd be nice to have a more standard timing system.

#

I'm not expecting one though.

potent loom
#

realying on real life time is not a good idea i think, game may slow down because of lag but real life time not so you can get unexpected results

nimble vale
#

Yeah, I had some issue with it (can't remember what) but it was far from ideal.

#

For me it was because EveryTenMinutes and EveryOneMinute was both too soon or too late for the event I wanted triggered I think.

potent loom
#

so use OnTick that has consequitive numTick parameter. Divide that number by 200 and check if the rest of division is zero. It will then execute once every 200 times

nimble vale
#

I think I did a millis conversion at some point.

#

But yeah, I scrapped that idea and found another way to accomplish what I needed luckily. Since most of my mod is really just proof of theory (to see if i can) type of situation.

#

In your opinion knowing how difficult syncing for multiplayer can be, a lot of people seem really interested in integration of AI Npc's, but honestly I think that would introduce way too many sync issues between server/client for each AI capable NPC, on top of NPC behavior. Would you agree?

#

Because of course each person would have to run an individual AI client side for this to work.

#

I have no intention of making this mod, but the getting AI text/actions with the NPC on top of multiplayer feels like it'd introduce a host of issues.

potent loom
# nimble vale In your opinion knowing how difficult syncing for multiplayer can be, a lot of p...

i think the game only syncs zombies in aspects of their position, and even that happens with a margin of error. if the position difference gets too big, the zombie teleports to get it fixed. everything else is client controlled and there are two choices: build syncing yourself which i dont think is possible because of the amount of data, or execute the same actions on all clients in more or less the same time

#

now executing the same actions is a challange because you must rely on objective conditions that are the same for all clients. you cannot use random functions because they will produce different results on different clients too

#

to illustrate, if you want a bandit to use melee weapon when the distance to the enemy is say 0.40 squares, then on one client it may be 0.40 and on another 0.41, so this is not an objective information

nimble vale
#

Yeah, that makes sense. Thank you.

rich reef
#

Hello all. I have a question regarding OnFillWorldObjectContextMenu.

I have an item that I want the player to place on the ground, and then be able to right click on, and have a context menu pop up and a function ran from it.

I have the event/function OnFillInventoryObjectContextMenu working fine for this so far, but would like to have it work from clicking on the placed item instead.

Can someone give me some info on how to access the name of the object from the worldObjects list that OnnFIllWorld gives you? Keep getting errors, and not sure if it's an object:getName, or getType, or one of those that works, or maybe something entirely different.

Thank you for your help.

long beacon
#

Which mod was it that put the check marks on the books you read and the white i symbols on the ones you need to?

silent fiber
#

sound like "has been read" maybe?

bronze yoke
#

there is an IsoObject getName() but if i remember right it doesn't return anything for the majority of objects because they don't have a reason to have a 'name'

rich reef
#

Here is the code for context.

CrystalBallContextWorld = function(player, context, worldobjects)

    local playerObj = getSpecificPlayer(player)

    for _, object in ipairs(worldobjects) do
       if object:getName() == "Crystal Ball"
            then
                print("Found Crystal Ball!")
                context:addOption("Peer into Crystal Ball", worldobjects, CrystalBallTellFortune, playerObj, object)
            end
   end
end

Events.OnFillWorldObjectContextMenu.Add(CrystalBallContextWorld)
bronze yoke
#

i'm not sure if that event will actually give you a world item

#

the list it gives is kinda fucky and often useless lol

rich reef
#

Ahh, well shit.. LOL

#

What method do others use to right click on an item, and get a context menu? Or is it even possible? From what I've seen, it seems to be, but maybe Im wrong.

bronze yoke
topaz tangle
#

hey uh so like
would anyone know how to add modded items to the loot distribution?

bronze yoke
#

we usually just grab the square from the first object in the list and loop through the objects on the square lol

silent fiber
# topaz tangle hey uh so like would anyone know how to add modded items to the loot distributio...
The Indie Stone Forums

This is a visual guide for mappers and modders who need to add or modify PZ's loot entries using the new ProceduralDistributions.lua approach. Whilst the ProceduralDistributions.lua file has been in the game for quite a while (i.e. the Gigamart shelves having distinct loot types), TIS will be eve...

topaz tangle
#

not really
no clue whats going on in this image ๐Ÿ˜ญ

rich reef
bronze yoke
#

you probably called the worldObjects table something different in your function

rich reef
#

on objects = worldObjects[1]

#

let me double check

#

Yes, no camel case.. lol

#

Let me retry

#

Bingo

#

You are the best Albion. I swear. You've answered so many of my questions. haha Thank you very much.

timid scarab
#

You'll want to add in your item like this, higher the number = more likely to be chosen based on the pool it's inserted into

topaz tangle
#

okay
i think this makes sense to me?

timid scarab
#

Here's a list of the possible containers

topaz tangle
#

thanks

#

can i list more then one item at a time or would i need to make a seperate document for each?

timid scarab
#

Yeah you can do it in the same lua file for multiple items

bronze yoke
#

keep in mind it rarely ever matters what file a lua snippet runs in

topaz tangle
#

okay cool!
i assume that needs to be in ther lua/servers/ file

timid scarab
#

C:\Program Files (x86)\Steam\steamapps\common\ProjectZomboid\media\lua\server\Items

Yeah, you can also check the Procedural Distribution lua located here to check for vanilla values
You'll want to weight any items you add similar to vanilla values of a similar item so you don't dilute / ruin the loot pool

bronze yoke
#

as long as it's in server it's good

#

(also to be pedantic the require doesn't do anything)

topaz tangle
#

alright and one last question
is the name that i put there the display name or the name ive used for the item script?

timid scarab
#

Item script name not the display name

#

So it'll be the one that has "_" in it instead of spaces

topaz tangle
#

thanks!!!!!!!!

bronze yoke
#

if your module isn't Base it should also include the module (as Module.ItemName)

topaz tangle
#

?

long beacon
#

Which mod adds the numbers next to the bar which how how many units an item like water has left?

timid scarab
# topaz tangle ?

Most likely talking about your script folder .txt files, you'll want to import base

long beacon
timid scarab
#

Here's the media folder for one of my backpack mods if you want to take a look through the file structure

#

@topaz tangle

pearl prism
#

Does anyone know how to make vehicle containers that only accept a specific type of item?

topaz tangle
#

is there a good way to like, see if its spawning right?

timid scarab
#

I don't know if it's the best method, but I tested it by turning on debug mode through steam parametres, then spawned in mauldraugh, turned on fast move / noclip and checked the containers I set it to spawn in

topaz tangle
#

yeah that makes sense lol, ill probably do that too

bronze yoke
#

if you enable lootzed you can check spawn chances in-game by right clicking a container's icon, and you can reroll from there until it spawns if you want to be double sure

timid scarab
#

^^

#

Definitely faster than my neanderthal level method

bronze yoke
#

i think lootzed is in the debug cheats menu

topaz tangle
#

oh wow yeah im sure that would be far more efficiant
so like, what if maybe it doesnt show my item what may i have done wrong?

#

(probably something so simple)

topaz tangle
#

fixed it

rich reef
# bronze yoke try this within the event```lua local objects = worldObjects[1] and worldObjects...

Hey Albion, I've got my context menu working great now. But curiosity always gets the best of me, and was wondering if you knew how to link a timed action to a Right Click Context Menu Option?

I have it set up, and the timed action runs immediately upon right clicking to bring up the menu, but not when I actually click on the menu option itself. Seems like I'm missing something simple here. Any ideas?

bronze yoke
#

you're probably calling the function instead of passing it to the option

#

myFunc() calls myFunc, myFunc just passes it

#

here's an example of one of my context menus:```lua
---@param player IsoPlayer
---@param vehicle BaseVehicle
---@param spraypaint DrainableComboItem
PaintUI.onPaintVehicle = function(player, vehicle, spraypaint)
if not (spraypaint:getRemainingUses() < 1) then
PaintAction.queueNew(player, vehicle, spraypaint)
end
end

-- in the actual context menu function:
spraypaintMenu:addOption(spraypaint:getName(), player,
PaintUI.onPaintVehicle, vehicle, spraypaint)

#

addOption's arguments are basically name of the option, argument 1, function to call, argument 2 (if needed) etc

#

those arguments will get passed to the function when the option is selected

#

the decision to put argument 1 before the function, separated from the others is perplexing to everyone

rich reef
#

Thank you, I have it calling the function correctly now, but it's not passing the arguments from the OnFillWorld event now, let me tinker around with this.

#

Actually, that part is working fine too. I'm getting another error, just read it wrong. The context menu pops up, and I can click on it, and once I do, it errors out.

bronze yoke
#

the problem could either be passing the function wrong or something going wrong in the function itself

#

it sounds like your function was calling fine earlier so it may be something like passing arguments in the wrong order

fleet bridge
#

not a bad idea to pass a table of args in this case

#

so you dont need to match the order/number of args

rich reef
#

Yeah, Im testing that now. The context menu works fine, it gets the arguments passed from the event/function variables, and thats good. But it says you need to use ISTimedActionQueue.add(MyTimedAction:new(player)) to call the timed action, which seems to make the context menu instantly call the function instead of passing it, so I instead created a RunTimedAction function with that call inside of it, to make the syntax for the context menu work. But it seems that possibly it's not getting the player object it needs still?

rich reef
fleet bridge
#

player object is usually passed down in self

rich reef
#

simple errors I guess. Overthinking stuff

#

Thank you Albion and lect for the insight

#

On the topic of timed actions, do I absolutely need to declare all the sub functions for it to work? For instance function MyFunction:update(), MyFunction:isValid, etc?

bronze yoke
#

i don't remember which but some of them are needed even if they don't do anything

rich reef
#

Alright. It kind of seems that way. I guess I'll just compact them down in the code so they aren't obnoxious

bronze yoke
#

it might just be isValid actually

#

you inherit most of them from the base timed action when you use derive, but the base isValid doesn't return anything, which is treated the same as returning false and ends the action immediately lol

rich reef
#

Interesting, alright

#

Well this is awesome. Not only did I figure out how to get the Inventory and World Context Menus working and doing things, but also Timed Actions. So cool. Thanks again everybody

ancient grail
brittle geyser
#

hi all random noob question, for my mod is it possible to make the spawn rate of the clothing somewhat configurable (ie. common, rare, very rare) in some sort of server option? Otherwise I'll just tweak my distribution file until people are happy lol

topaz tangle
#

Iโ€™m not sure for the first part

But I would make the rarity equal to real life, then just a tad rarer (not as many items in PZ as real life)

brittle geyser
#

sounds good! thanks for the input

#

also another random question, in the debug menu is there a way to spawn a zombie with a specific outfit (i.e. a custom clown), trying to test my clothing.xml

topaz tangle
#

Not that Iโ€™m aware of

#

Iโ€™d spawn a bunch and just wait till it shows up

#

Iโ€™d make it super common though to save time, then set it to the rarity you want

bronze yoke
#

the horde manager when you right click the ground lets you pick an outfit

brittle geyser
#

thanks! I found it!

young raven
#

how do i correctly disable recipes? i did recipe:setIsHidden(true) in lua which hides them from crafting menu, but they still show up in the context menu when u right click the ingredients

dry chasm
# young raven how do i correctly disable recipes? i did `recipe:setIsHidden(true)` in lua whic...

you could try something like

-- a global function which always returns false for whether or not it can perform
Recipe.OnCanPerform.AlwaysFalse = function() return false end 
for --[[...]] do
  local recipe = --[[..]];
  recipe:setIsHidden(true);
  recipe:setCanPerform("Recipe.OnCanPerform.AlwaysFalse"); -- should make every item "uncraftable"
end
``` Aside of that, unsure. (Could probably use OnTest instead, unsure which gets checked first.)
unreal pewter
#

would anyone here know whats going on with this? i sent it in #mapping but im not sure if thats the right place, and all

young raven
topaz tangle
winter bolt
lone hound
#

Hello, I would like to know if there is a framework for creating craft panels this way?

Prints from the "S4 Vaccine" mod

untold jolt
#

Hello, is anyone doing a mod commission? I would like to have a mesh as a hat.

brittle geyser
ember roost
#

Hello, im curious about 3d clothing. I know clothes are generally organized by layers on the texture, however anyone thinks its possible to make clothing 3d for players?

#

Not necessarily 3D while on the ground, or in a container. Mainly just on the bare playercharacter themselves.

bright fog
ember roost
bright fog
bronze yoke
#

a jacket is just a 3d shirt

winter bolt
austere turtle
#

Can anybody help me fins sprite IDs in tilezed

ancient grail
ancient grail
left needle
#

What is the roll Function in procentualdistributions.lua file?

ancient grail
rancid panther
#

apparently my immunity mod is not working according to one person after months of no complaints. it's really strange

#

i'll have to look at it again and make sure the person who reported it was using a fresh save but they said they tested it with only my mod

bright fog
rancid panther
#

yes, i used a bunch of things to remove infection, set infection time to -1, set infection level to 0 etc

bright fog
#

Sounds good

#

If you can't reproduce the bug, you can't do anything about them

rancid panther
#

which i got with help from others, but if this person is reporting it the bug is either still there, or they misreported

bright fog
#

Could be they have a modpacked version of your mod

#

An older version

rancid panther
#

they said they used only my mod to test it, so i'll probably ask them to uninstall and reinstall it

bright fog
#

A modpacked version will break

#

Bcs a modpacked version, uses your exact mod ID

#

And it mixes both mods together

rancid panther
#

and they r even asking me to mark my mod as broken

bright fog
#

And you end up having your current workshop version mixed with a random modpacked

bright fog
#

Test your mod, if you can't reproduce, it's not broken

#

It's only one guy

rancid panther
#

like almost every immunity mod has that same bug, and i have not seen a single report in months

bright fog
#

If you were getting a lot of reports, I get it, but you're only getting one guy reporting a problem

bronze yoke
#

it is not unusual for bugs to go completely unreported for no reason, but it is also not unusual for one guy to confidently completely fail to even install a mod and then blame it on you

rancid panther
#

in fact, the anthro immunity mod also has that bug which is what they were using at first when they were reporting bugs

#

so im like jaques_beaver

#

so ur using 2 immunity mods and commenting on the one that has comments open

bright fog
#

lmao

#

Yeah ok it's on them

rancid panther
#

they said they used mine in a single player world to test it, but i have a sneaking suspicion they removed anthro immunity and then the bug still happened

bright fog
#

Amazing

bronze yoke
#

yeah the bug is inherently one that lingers

rancid panther
#

but nevertheless, i'll just ask them to uninstall my mod, verify game files, and reinstall it (or actually just not use my mod with anthro-immunity since they r both modifying the same data)

ember roost
# bronze yoke a jacket is just a 3d shirt

Yes but if you read it im talking about the differences between layered clothing using textures and actual 3d models in game like the jacket you mentioned. @winter bolt answered my question. It would mess up the layering if I tried to incorporate a 3d environment for cltohing. Thank you for the response though!

#

Something I made up today, its a "Cheat Menu" thats basically integrated into the UI like the inventory system using the astrics key. I am going to add more features, but one thing I noticed about godmode is when you have around 10-15 zeds surround you, you are basically stuck. So I added the "Kill nearby zombies" feature that basically brings all zombies within a radius of "5" to 0 health so you can get unstuck. What are some features some of you guys would like to see in a cheat menu? I know there is a very prominent cheat menu out currently. However I wanted to make my own to use. Both features do work properly and tested

raven stream
#

Hello does anyone know a good tutorial for making a like ski mask mod I want to make my own and I want to find out how to

main pasture
#

Anyone know how to prevent player from opening the RadialMenu? setEnabled(false) doesn't seem to do anything

ember roost
robust locust
#

Heyo, I've seen a log in my console file saying 2x version of HMW_Guitars.pack not found. I'm using the 2x folder for the sprite tilesheets. Do I need to do something with the .pack file itself?

main pasture
ember roost
main pasture
#

No I just need to prevent from opening it when in a certain type of vehicle

main pasture
bronze yoke
#

you should prefer not isServer() to isClient() in checks like this

#

singleplayer isn't a client but you obviously want this code to run in singleplayer

main pasture
#

Good to know. Thanks

ancient grail
ancient grail
ancient grail
robust locust
ancient grail
ancient grail
#

have 1 folder outside the 2x folder that should contain all your files(packfile, tiles file, and the png)
the 2x folder should also have a copy of the png file

#

make sure they are the same file (everytime you try and edit one of em dont forget to copy the new version to both folders)

robust locust
#

I've had it like this

ancient grail
#

yes\

#

so also add the png inside the 2x file then do the process of saving the pack file again

robust locust
#

I've already got the png's inside the 2x folder, otherwise they go weird

ancient grail
#

dont need to redo the tiles file since its just the property,it really doesnt matter what the png is but the pack files is basically the png with all the spritesheet related data(like which cnumber each sprite is assigned to and the size)so you have to redo that

robust locust
#

When I create the pack file, which folder do I chose for the png's?

#

If I select the 2x folder, it adds all the png's to it

#

Do I remove all the pngs I don't need while I create the pack, then move them back? That seems silly though...

ancient grail
#

slr

ancient grail
#

you probably did everything correctly already
just do the same thing again but this time with the copied png on the 2x folder
thats it really

robust locust
ancient grail
#

whats your settings

#

when you export pack file?

ancient grail
#

and check your png dimension?

river galleon
low spindle
#

hey guys,every time i edit a mod file, save it, then reload my game changing the mod order or turning it on/off, all the files will be updated?

bronze yoke
#

yeah

#

you can also just reload your save

#

some file types need game restarts but it's rare, and some like models and textures can update live

low spindle
brittle geyser
#
VERSION = 1,
option ZomboidCrossing.CostumeRarity
{
    type = integer,
    min = 0,
    max = 10,
    default = 1,
    page = ZomboidCrossing,
    translation = ZomboidCrossing_CostumeRarity,
}
require 'Items/ProceduralDistributions'

--ClosetShelfGeneric
local rarity = SandboxVars.ZomboidCrossing.CostumeRarity / 25
local common = SandboxVars.ZomboidCrossing.CostumeRarity / 10

print("[Zomboid Crossing][Rarity]:", rarity)


table.insert(ProceduralDistributions.list.ClosetShelfGeneric.items, "Base.BobHead");
table.insert(ProceduralDistributions.list.ClosetShelfGeneric.items, rarity);
...
bronze yoke
#

put your distributions code into a function and add it to the OnInitGlobalModData event

#

file run time is too early for sandbox options

brittle geyser
#

ah I thought so! thanks, I will give it a try

magic eagle
#

Hey guys!
Is there a way to automatically open the window while triggering the window-opening animation?

My current approach is to add the ToggleWindow method to the ISTimedActionQueue.

The window does open, but since there is no mouse click operation in the game, and the player doesn't perform the animation of opening the window.

ancient grail
bright fog
real wave
#

guys i need help,when i open .pack files using tilezed and try to export them as images i do not get any images exported.
Export file path is right .
what am i doing wrong?

gilded yoke
#

maybe this will be a better place to ask

Does anyone happen to know where player zombie kills are logged?

gilded yoke
mellow frigate
gilded yoke
gilded yoke
gilded yoke
#

hmm, looks like its referencing events like

Events.OnCharacterDeath
Events.OnZombieDead
Events.OnWeaponHitXp

I just spun this new server up today and theres a folder with a good number of logs with seemingly todays date...
anyone here that has an older server that went though new world wipes be kind enough to screenshot just the subfolders of the logs folder?

#

Just want to confirm if thats a dynamic folder or persistent

dusty flint
ancient grail
gilded yoke
#

I got so lost in the sauce trying to find where its actually reading the kill counts Im gonna give up lol

vagrant ledge
orchid drift
#

After spending weeks trying to figure out how to make my mod (thank you glytch3r btw) I finally finished it but now I can't find it to test it. Its on the mod folder and workshop folder, it shows as subscribed on steam, Ive restarted steam and my computer, but the f`cker wont show in the mod list ingame. Am I cursed?

dusty flint
orchid drift
dusty flint
#

dunno then

grizzled fulcrum
#

that's epic

wind rock
#

how do i get the base plain vehicle textures, i wanna edit some few things

bright fog
grizzled fulcrum
wind rock
#

i want this but without the extra livery stuff

#

theres this but its missing the shading color things

pearl prism
wind rock
#

how do i get it

pearl prism
#

You can make a copy and invert the Alpha value, so you will have a file with just the vehicle colors that will make editing much easier

pearl prism
wind rock
#

ohh

#

thanks

#

sorry to bother again but how do i invert the alpha value?

#

im new to photoshop and i dont really understand all the features and things

pearl prism
wind rock
#

oh yeah i happen to have that too

#

ok i figured it out, thanks once again for the help i really appreciate it

uneven vessel
#

I have aiming time, recoil delay, reload time and swingtime all set to the same number on two pistols yet one of them fires faster than the other and I can't figure out why

#

what else determines firespeed?

bronze yoke
#

primarily the animation

uneven vessel
#

those also all seem to be the same

naive hatch
#

Quick question. Iโ€™m pretty new to Java, but does anyone know what the UI for the dashboard in project zomboid uses?

tranquil kindle
uneven vessel
#

I am a fool

tranquil kindle
# uneven vessel Ah that might be it

Also if you use debug mode you can right click items and edit them there. For guns there are few things to edit like recoil/aiming time/damage and some other base stats, so you can test it there as game runs to find sweetspot for it. Also keep in mind that aiming/reloading 0 and 10 will vary in time it takes to fire/reload/rack guns.

uneven vessel
patent helm
#

is there a function or method to increase fuel consumption on a specific vehicle? i can only find the creation of speed demon and sunday driver via vs code search and i cant find where it modifies the code to increase fuel consumption. unless fuel consumptions is tied into weight and speed of the vehicle

uneven vessel
tranquil kindle
uneven vessel
#

ahhh

tranquil kindle
#

Recoil delay on the other hand less=faster firerate

#

But firerate also depends on animation

ancient grail
patent helm
#

will try that thank you

orchid drift
viral notch
#

what about replace zombies to aliens

sour island
#

Expanded Helis: Super Weird has aliens

mystic vessel
#

guys goodnight, i'm wondering what is wrong
i'm trying to make a code that reads when player is with a weapon equipped in both hands, and then play a sound.

But i can't figure out a way to play the sound(who players and zombies can hear)

sour island
#

You can call player:playSound(soundName)

mystic vessel
#

My intention is for the item to make a noise so that both the player and the zombies can hear it.

#

i already used player:playsound, but i never tought that worked for zombies too

bronze yoke
#

look into WorldSoundManager addSound

#

this is how you make a sound that zombies can hear, but you do still need to do the actual audio playback separately (player:playSound is perfect for that)

mystic vessel
mystic vessel
mystic vessel
sour island
#

I'd avoid using any looped sound tbh

#

I've had only issues with it and EHE

#

But if you get the player's sound emitter you should be able to check isPlaying(soundName)

bright fog
orchid drift
#

Im not the sharpest tool in the shed when it comes to this. I started to learn how to mod about a month ago

bright fog
# orchid drift Ive never done anything like this before. Glytch3r already told me that was a te...

Ok so one thing: you shouldn't need to download your mod to test it and that's for three reasons:

  • when you have a local copy and workshop copy with the same mod ID, they will clash and mix, and you end up testing neither of both
  • you already have a local copy, if that copy works, there's 0 reasons for the workshop uploaded version to not work
  • tho you have to make sure you create your mod while in Zomboid/Workshop, and not Zomboid/mods ! The reason is that to upload it needs to be in /workshop, and you shouldn't have 2 copies of your mod, in both /mods and /workshop or they will clash together too
orchid drift
low spindle
#

hi guys, anyone knows why mods that got unique skills like more brews got brewing/wine brewing skills, the code in perk.txt file that defines the xp needed to lvl up is 2/3 of what need ingame?

orchid drift
real wave
#

hello there im currently maikng an inproved vannila radial ui

gaunt meteor
#

im in -debug mode but that error screen doesnt come up automatically when errors happen. i cant remember the hotkey to bring it up because its been a while... anyone can remind me? ๐Ÿฅฒ

left needle
#

Hello does anyone has a advice .I want to change the Color of the bloodsplatters.open the 1xtile.pack in pack viewer
Find the side with the bloodsplatters Extract (Prefix overlay blood)it in png .Edit the bloodsplatters png and make a pack file of it.But how can i get this new pack file into the original 1xtile.packfile,so it appears in game???

low spindle
true nova
# left needle Hello does anyone has a advice .I want to change the Color of the bloodsplatters...

you should be able to just overwrite the file by placing it in the textures folder as the png in a mod. If you want to directly modify the games files to have this you'd have to open and extract then repack everything in the .pack file i think. It may also be possible to put it in the game textures folder. I may remember wrong, i know for sure if you repack it and put it in the texturepacks folder in a mod it will overwrite the old one as long as it is the exact same name

long beacon
#

Which mod was it that gave blowtorches 14 units?

bright fog
bronze yoke
#

there was one that was popular that gave them 100 because everyone was mad about that patch if you're thinking of that

#

i think it was just called something like blowtorch fix

hot patrol
#

houses with actual slanted roofs

bronze yoke
#

i don't really have any opinions on this, i never used either

hot patrol
hot patrol
#

granted even that can be changed or disabled which is nice

long beacon
left needle
#

Hello guns do you mean put the new pack file (name it 1xtile.pack)in the mod Folder?But the new one has only the blood Splatter in there.

hot patrol
true nova
hot patrol
#

thanks ๐Ÿ™‚

past kelp
#

Hi! Iยดm working with a friend in a mod. Iยดm designing new sounds for new guns of the mod. Does anyone know how can i make the shots sound different depending on whether they are indoors or outdoors?

bright fog
#

@tranquil kindle can expand on that

tranquil kindle
#

Maybe with .bank files there is something that could help. I myself did not visit that territory

#

Or you could maybe check if player is in building, and then change inventoryitem sound, but that sounds like a pain in the rear

past kelp
#

I understand, can i talk to you on dm to ask you some more questions about that?

bronze yoke
#

keep in mind there isn't really mod support for bank files

tranquil kindle
#

There is no need for dm's, i know things to some degree, but here you might have a chance to hear multiple advices from diffrent people. There might be multiple ways to do what you want to

bright fog
bronze yoke
#

i wonder if a java patch for it would be difficult

#

from what i've seen of the bank code, not really

bright fog
#

No idea

outer crypt
#

question: I know that script files can be made to override the vanilla script entries, example changing a sound pointer from it's original sound to a new file in the mod folder. Is there a way to change that in lua on the fly as opposed to in the script files where lua doesn't run?

past kelp
#

Iยดm gonna say to my friend to come here and talk about this because iยดm only the sound designer. He is the one that knows all about game code and all that stuff hahhaha. Thank you so much guys๐Ÿ‘

bronze yoke
#

doparam is only for items

bright fog
#

Ah

bronze yoke
#

sound script objects can't be modified at runtime by lua but you may be able to override them with ScriptManager.ParseScript

outer crypt
#

thanks, I will look into that

dusty flint
#

hehe
lunchly

true nova
dusty flint
#

im not intelligent to want to do that

#

spelling

grizzled fulcrum
#

item should have like +500g of sodium and potassium lol

ancient grail
#

they are going to make buildmenu
txt based?? is this a good thing?

bronze yoke
#

it's definitely much better

sonic needle
#

yeah its better. it makes it super easy for adding context addons to it

coarse sinew
vague raven
#

Could I recommend a possible car mod? EVELYN the 2002 Subaru WRX STI as a car mod from the twisted metal TV series

ancient grail
#

i also think this allows modders who does not use lua be able to create more menus now

obtuse aurora
#

yeah sure mate

coarse sinew
#

they forgot to mask the links ๐Ÿ˜ญ

#

<@&671452400221159444>

obtuse aurora
#

amateur behaviour

lost slate
#

ty

topaz tangle
#

i finished my RV

left needle
# true nova yes it should go into the texturepacks folder and just it having the same name a...

hello guns ,thanks for your advice it is work fine. now one question more I name the new packfile like the pngs i edit overlay blood floor01.png)now i want to change the color of every overlay blood wall.pngs . Can i put all the png`s (blood floor &blood wall) in one folder, create packfile and what name i must select for the mod folder?Or must i edit two mods folder (one for blood floor and one for blood wall)?

crystal crypt
#

require "ISUI/ISPanel"

MyUI = ISPanel:derive("MyUI");

function MyUI:initialise()
ISPanel.initialise(self);
self:create();
end

function MyUI:prerender() -- Call before render, it's for harder stuff that need init, ect
ISPanel.prerender(self);
self:drawText("Hello world",0,0,1,1,1,1, UIFont.Small); -- You can put it in render() too
myUI:setVisible(true);
myUI:addToUIManager();
end

function MyUI:render() -- Use to render text and other
end

function MyUI:create() -- Use to make the elements
end

function MyUI:new(x, y, width, height)
local o = {};
o = ISPanel:new(x, y, width, height);
setmetatable(o, self);
self.__index = self;

return o;

end
Events.OnNewGame.Add(MyUI)

it isnt working :/ can someone help , im trying to learn how to make UIS

crystal crypt
#

i fixed it , how i can know the cordinates ? like x and y , do i need a site ?

indigo pasture
#

its your x and y on your screen resolution

crystal crypt
#

thanks

#

learning uis is diffucult

indigo pasture
#

x=0 and y=0 is top left if you increase x it goes to the right, if you increase y it goes down

crystal crypt
#

but and if i want to put an button inside an ui ?

indigo pasture
#

inside your MyUI:create() function you can do something like this
self.leftButton = ISButton:new(x, y, width, height, "text", self, onButtonDown); self.leftButton.internal = "Left"; self.leftButton:initialise(); self.leftButton:instantiate(); self:addChild(self.leftButton);

crystal crypt
#

function MyUI:create()
local btnWid = 75
local btnHgt = getTextManager():getFontHeight(UIFont.Small) + 2 * 4

self.button = ISButton:new(x, y, btnWid, btnHgt, "My button", self, MyUI.onOptionMouseDown); <-------- imagine that i want to put it inside an ui , do i need to put like the x and y inside the ui?? if i put the x and y like 400,500 and the ui in 600,700 the button will not appear inside an ui but if i want to have a window that can move around , how can i connect it to stay in the same place??
indigo pasture
#

the x and y on the ui elements is relative to the ui itself

#

if you put your ui on x= 600 and any element on x=400 the element will be on x=1000

#

the top left of the ui in this case is x=0 and y=0 you need to position it based on the ui

crystal crypt
#

how can i make the ui for i can move it around ?

#

is something related to ISCollapsableWindow

indigo pasture
#

inside your MyUI:new Function you add o.moveWithMouse = true

crystal crypt
#

you actually know how to make uis , how do you learned ?

indigo pasture
#

mostly looking at vanilla ui code and other ui mods code, also lots of trial and error

crystal crypt
#

hahaha

#

self:drawText("Text", x, y, r, g, b, a, UIFont.Small)

#

why so many coordinates,how does it work ?

#

x y r g b a

indigo pasture
#

x,y= position| r, g, b= color | a = alpha

crystal crypt
#

thanks

#

whats alpha?

indigo pasture
#

opacity

crystal crypt
#

ohh okk

#

need to put the button a little bit more to the left

#

@indigo pasture thanks for being teaching me โค๏ธ ive been so many weeks looking to learn how to make uis

#

how can i add this part to it on the top ?

indigo pasture
crystal crypt
#

okk , no problem

#

what is ISCollapsabllewindow ??

indigo pasture
#

from the name i'd guess it's what you want probably

coarse sinew
#

That allows you to well, collapse it

true nova
crystal crypt
#

my tutorial has "This is the base of a UI, it's gonna display a rectangle with "Hello world" write in it.
Note: ISPanel car be change to ISWindow or ISCollapsableWindow."

#

its actually working but when i open the menu the screen starts blinking

#

require "ISUI/ISCollapsableWindow"
local FONT_HGT_SMALL = getTextManager():getFontHeight(UIFont.Small)

MyUI = ISCollapsableWindow:derive("MyUI");

function MyUI:initialise()
ISCollapsableWindow.initialise(self);
self:create();
end

function MyUI:prerender()
ISCollapsableWindow.prerender(self);
self:drawText("Hello !", 250 ,20, 0,0,255,1, UIFont.Small);
end

function MyUI:render()
end

function MyUI:new()
local o = {};
x =400;
y =400;
o = ISCollapsableWindow:new(x, y, 500, 400);
setmetatable(o, self);
self.__index = self;
o.variableColor={r=0.9, g=0.55, b=0.1, a=1};
o.borderColor = {r=0.4, g=0.4, b=0.4, a=1};
o.backgroundColor = {r=0, g=0, b=0, a=1};
o.buttonBorderColor = {r=0.7, g=0.7, b=0.7, a=0.5};
o.zOffsetSmallFont = 25;
o.moveWithMouse = true;

return o;

end

function onCustomUIKeyPressed(key)
if key == 21 then
local myUI = MyUI:new()
myUI:initialise();
myUI:addToUIManager();
end
end

Events.OnCustomUIKeyPressed.Add(onCustomUIKeyPressed)

#

when i click on "Y" the ui opens but my screen starts blinking

tranquil kindle
#
require "ISUI/ISCollapsableWindow"
local FONT_HGT_SMALL = getTextManager():getFontHeight(UIFont.Small)

MyUI = ISCollapsableWindow:derive("MyUI");

function MyUI:initialise()
    ISCollapsableWindow.initialise(self);
    self:create();
end

function MyUI:prerender()
    ISCollapsableWindow.prerender(self);
    self:drawText("Hello !", 250 ,20, 0,0,255,1, UIFont.Small);
end

function MyUI:render()
end

function MyUI:new()
    local o = {};
    x =400;
    y =400;
    o = ISCollapsableWindow:new(x, y, 500, 400);
    setmetatable(o, self);
    self.__index = self;
    o.variableColor={r=0.9, g=0.55, b=0.1, a=1};
    o.borderColor = {r=0.4, g=0.4, b=0.4, a=1};
    o.backgroundColor = {r=0, g=0, b=0, a=1};
    o.buttonBorderColor = {r=0.7, g=0.7, b=0.7, a=0.5};
    o.zOffsetSmallFont = 25;
    o.moveWithMouse = true;

    return o;
end

function onCustomUIKeyPressed(key)
    if key == 21 then
        local myUI = MyUI:new()
        myUI:initialise();
        myUI:addToUIManager();
    end
end
``` Thats what i mean*
coarse ember
#

hello i am trying to make myself a mod for repairing weapons and tools,
fixing Fix Axe
{
Require : Axe,
GlobalItem : BlowTorch=1,
ConditionModifier : 1000,

      Fixer : SmallSheetMetal=1;,
  Fixer : ScrapMetal=1;MetalWelding=1;,
}

this is what i use, is there any line of code so that after every repair, chance of success don't drop,i want it to remain at 100 percent so i can repair it forever, i was trying with and without MetalWelding=1 as you can see but it's still dropping? thanks

ancient grail
ancient grail
tranquil kindle
# coarse ember hello i am trying to make myself a mod for repairing weapons and tools, fixi...

Does any of this work? I remember someone saying that fixers are hard coded and First Fixer will always repair the most, then next one less and so on and so on and that we have no way to change values for those. Same might be with chances of success. You could always make a recipe to fix it. By default i noticed that if you make recipe, get Item you want to repair and other items as that are used for "fixing" and result will be your item, it will repair it slightly (to repair it to full you would probably use onCreate Function to always get 100% condition result), or with something like destroy thing so your item will not use any of conditions of items used:

    {
     destroy Axe,
     Woodglue,

       Result:Axe,
       Time:50.0,
    }
#

Also using raw recipe will zero your times repaird so your repairs with right click on item will be as efficient as they can be.

tranquil kindle
#

Though i'll probably forget it soon knowing myself

bronze yoke
#

you can also escape any special characters with \

ancient grail
#

coool

#

we learn something everyday

bright fog
#

Nice, I think that's basic markdown

fathom forum
#

does anyone know how to additem Base.556Clip with full ammo?

true nova
#

setCurrentAmmoCount(int ammo) will set its ammo.
getMaxAmmo() gets the max.

item:setCurrentAmmoCount(item:getMaxAmmo())
fathom forum
#

where do i type that

true nova
fathom forum
#

ingame, as admin

fathom forum
#

it spawns an empty m16 clip in my inventory

#

i want to spawn them full

#

someone suggested i asked this here

true nova
#

well that's not something that can be done through simple admin commands i think

fathom forum
#

hm. ok

#

thanks anyway

ancient grail
dusty flint
#

how do i rotate this ๐Ÿ˜ญ

fathom forum
#

this caused an error
item:setCurrentAmmoCount(item:getMaxAmmo())

ancient grail
#

what was the item called again?

fathom forum
#

Base.556Clip

ancient grail
#

let me get to my pc

fathom forum
#

the description has something called ammo count

#

idk what the lua variable would be called but i assume its similar

bronze yoke
#

try local item = getPlayer():getInventory():AddItem("Base.556Clip"); item:setCurrentAmmoCount(item:getMaxAmmo())

fathom forum
#

that actually worked

#

may i ask you questions about that?

bronze yoke
#

sure

fathom forum
#

is local item a keyword? or is that just a random variable name you are making

bright fog
fathom forum
#

and how does it know to tie that to the next part item:setCurrentAmmoCount(item:getMaxAmmo())

#

oh

#

local is the keyword

#

item is just a throw away name

#

?

bronze yoke
#

local is a keyword that makes the variable restricted to the current scope, item is just the name of the variable

bright fog
fathom forum
#

oh i see

#

and then in the next command you refer to it

bright fog
#

Yoiu could replace item by anything

fathom forum
#

neat

#

thank you

bright fog
fathom forum
#

never used lua before

bright fog
#

I believe the wiki has a decent lua guide

dusty flint
ancient grail
#

since albion already got the code for you i decided to instead provide another code that lets you configure what to spawn and how many

local function magSpawner(qty, itemStr)    
    local qty = qty or 2
    local itemStr = itemStr or "Base.556Clip"    
    local pl = getPlayer() 
    local inv = pl:getInventory() 
    for i = 1, qty  do
        local item = inv:AddItem(itemStr)
        local ammo = item:getMaxAmmo()
        item:setCurrentAmmoCount(ammo)
    end
end
--just change this 5 is the qty and  "Base.44Clip" is the item
magSpawner(5, "Base.44Clip")    
--without adding paramaters
--this will spawn by default 2x  "Base.556Clip"    
magSpawner()


#

@fathom forum

tiny dawn
#

Hello, just joined. I was wondering how folks start creating mods? Do you use notepad ++ or is there a more definitive way to begin creating a mod?

bronze yoke
#

vscode is by far the most popular program for it

tiny dawn
#

Will visual studio 2022 work? It's the IDE I currently use.

bronze yoke
#

i don't really know anyone who's used it for zomboid, it probably works fine as long as there's a decent lua extension but it is built for c++/c# so i have no idea how good of a fit it is

tiny dawn
#

Ooooo VScode looks really nice actually XD Will be better for Java for sure. Does anybody have a good resource on integrating written code as a mod into the game?

ancient grail
#

finally done with dungeon maker mod

tranquil kindle
#

If its a clothing item, even if its a hat i still suggest parenting it to PZ armature and weight painting it

dusty flint
#

hat

tranquil kindle
#

So thing is, for hats you don't need to parent them to armature if you go vanila way, however its so intuitive, that you'd probably need to rotate model and move it around, then apply transforms untill it just sits on the head, but the worst part is you either go blind and try over and over, or find a mod that does it exacly the same and use it as a base. Other way would be to use PZ armature, add your hat model, move it so it sits on head like you want to, apply transforms, parent it to Armature. Then you select your hat, go into edit mode, select all faces and weight it to bip01 Head. Then you export it with armature (without body model) and translation data

crystal crypt
#
require "ISUI/ISCollapsableWindow"
local FONT_HGT_SMALL = getTextManager():getFontHeight(UIFont.Small)

MyUI = ISCollapsableWindow:derive("MyUI");

function MyUI:initialise()
    ISCollapsableWindow.initialise(self);
    self:create();
end

function MyUI:prerender()
    ISCollapsableWindow.prerender(self);
    self:drawText("Hello !", 250 ,20, 0,0,255,1, UIFont.Small);
end

function MyUI:render()
end

function MyUI:new()
    local o = {};
    o = ISCollapsableWindow:new(400, 400, 500, 400);
    setmetatable(o, self);
    self.__index = self;
    o.variableColor={r=0.9, g=0.55, b=0.1, a=1};
    o.borderColor = {r=0.4, g=0.4, b=0.4, a=1};
    o.backgroundColor = {r=0, g=0, b=0, a=1};
    o.buttonBorderColor = {r=0.7, g=0.7, b=0.7, a=0.5};
    o.zOffsetSmallFont = 25;
    o.moveWithMouse = true;

    return o;
end

function onCustomUIKeyPressed(key)
    if key == 21 then
        local myUI = MyUI:new()
        myUI:initialise();
        myUI:addToUIManager();
    end
end

Events.OnCustomUIKeyPressed.Add(onCustomUIKeyPressed)
#

@ancient grail do u know how to solve ?

crystal crypt
#

trying to fix

ancient grail
#

also you lack paramaters on the new
it should have 4 params

crystal crypt
#

What params are missing?

ancient grail
#

x, y ,w, h

crystal crypt
#

Where are they missing?

sly lily
#

is this a good place to chat about mods as a mod user too?

#

like mod suggestions and stuff

frank elbow
#

For a mod user asking questions you'd want #mod_support, but for discussing creation of mods (including theoretical) this channel makes sense

sly lily
#

i mean asking for mods to download

#

like "any cool mods that touch up texture issues"

frank elbow
sly lily
#

ok thats fair

#

i was doing that before i just didnt know if that was the right thing aha

#

thanks for clarifying!

low spindle
#

how do i require another mod file with my mod? and overwrite it

dusky barn
#

im looking for editing just a few numbers on a manually installed .class java mods (on zombie\ directory) on workshop, what should i start off from? ๐Ÿ™‚

fiery yarrow
#

Hi i'm new to zomboid modding, is there any hotkey to quickly reload all the lua scripts?

bronze yoke
#

no, but you can reload individual files in the f11 debug menu (this will break things if you didn't write around it) or reload the save for a full lua reload

fiery yarrow
#

Okey, thanks for your answer!

fiery yarrow
drifting ore
#

Hello everyone. if I make a mod for a car, can I make it so that it doesn't spawn in the world? So that it can be saved only through the admin panel on the server. Is this possible?

bronze yoke
#

yes, in fact it will not spawn in the world by default, you would have to add it to a vehicle zone if you wanted it to

drifting ore
#

Oh, great. so if I don't add any zones, there won't be any chance at all that the car will appear in the world?

dreamy cape
tiny dawn
dreamy cape
bronze yoke
#

don't follow that, it's ancient

#

intellij is no longer a good choice for zomboid at all and the tool it's trying to get you to install is heavily outdated and doesn't even work in modern versions

zenith glacier
#

WARN : General , 1730684735026> MeshAssetManager.loadCallback> Failed to load asset: AssetPath{ "Book
WorldStaticModel" }
WARN : Script , 1730678147712> ModelScript.check> no such model "???.grimoremodel" for Base.Occult_Mag

i get this errors.. im trying to place a mesh model i made into a mod, it also has its texture.
the game gives me the possibility to place the item , but its invisible.. and then it drops the icon image of the item

tiny dawn
#

Yeah setting up gradle I think is where it pooped out

#

It looks like it's having trouble pathing to the image

bronze yoke
#

it's just built for much older versions of idea, it was long abandoned even by the time i started modding

tiny dawn
#

Ahhhhh, that makes sense. That walk through was asking for oracle dist. Java 17 which was concerning lol. I'll try the other one you mentioned

magic eagle
#

Is there any way to use a database within Project Zomboid, such as lsqlite3 or similar? I've tried placing a locally compiled lsqlite3 file within my mod to load and call it, but it doesnโ€™t seem to work. Are there any alternative methods to allow a mod to write data to a database?

Any help would be greatly appreciated!

outer crypt
tiny dawn
ancient grail
#

is there a way to generate custom zombie outfit using lua?
i know this isnt possible since there are xml files and have own guid
but theres a guid function so maybe its possible?
maybe something that is similar to how reanimated player works since its wearing whatever the dead player was wearing

bronze yoke
#

if you want to change a specific zombie's clothing, you can just mess with their itemvisuals

#

i feel doubtful that you can generate an actual outfit at runtime but i don't know that for a fact

bright fog
bright fog
grizzled fulcrum
bright fog
#

๐Ÿ‘Œ

ancient grail
#

i want to like be able to mke custom custom outfit
like getOutfit()

doesnt matter what it looks like

#

also i cant figure out the syntax for using that item visual thing

#

i tried before but failed
i probably did something wrong

bright fog
#
local visuals = zombie:getItemVisuals()
for i = 0,visuals:size()-1 do
    local visual = visuals:get(i)
end
#

It's an array

#

Of all the clothing pieces

#

You can print visuals if you're curious, or print single visual

#

You'll see how it is

#

You can modify anything that way

#

Check out this part of Zomboid Forge

#

This is where I handle visuals for zombies

#
-- this will remove all the clothing pieces from a zombie
local visuals = zombie:getItemVisuals()
for i = 0,visuals:size()-1 do
    local visual = visuals:get(i)
    visuals:remove(visual)
end

-- that too will (untested)
visuals:clear()
grizzled fulcrum
#

Couldn't you just do visuals:clear() instead of looping in Lua?

#

that clears the array list

ancient grail
#

oh wait ill read the link on modify

#

found it

#

item visuals

from zomboid forge
by @bright fog


-- This function will replace or add clothing visuals from the `zombie` for each 
-- clothing `locations` specified. 
--
--      `1: checks for bodyLocations that fit locations`
--      `2: replaces bodyLocation item if not already the proper item`
--      `3: add visuals that need to get added`

---@param visuals       ItemVisuals
---@param locations     table      --Zombie Type ID

ZomboidForge.AddClothingVisuals = function(visuals,locations,gender)
    -- replace visuals that are at the same body locations and check for already set visuals
    local replace = {}
    local ZData
    local choice
    local location
    local item
    for i = visuals:size() - 1, 0, -1 do
        item = visuals:get(i)
        location = item:getScriptItem():getBodyLocation()

        if locations[location] then
            ZData = ZomboidForge.RetrieveDataFromTable(locations,location,gender)

            -- if data for this ZTypes found then
            if ZData then
                -- get current and do a choice
                local scriptItem = item:getScriptItem()
                local current = scriptItem:getModuleName().."."..scriptItem:getName()

                -- chose item if current not in ZData
                choice = ZomboidForge.ChoseInTable(ZData,current)

                -- verify data was found in the list to chose or current is not choice
                if choice then
                    item:setItemType(choice)
                    item:setClothingItemName(choice)
                end

                -- location already exists so skip adding it
                replace[location] = item
            end
        end
    end

    -- check for visuals that need to be added and add them
    for location,item in pairs(locations) do
        if not replace[location] then
            ZData = ZomboidForge.RetrieveDataFromTable(locations,location,gender)
            choice = ZomboidForge.ChoseInTable(ZData,item)

            local itemVisual = ItemVisual.new()
            itemVisual:setItemType(choice)
            itemVisual:setClothingItemName(choice)
            visuals:add(itemVisual)
        end
    end
end

bright fog
#

Was mostly to give an example of what he can do

#

But you're probably right

grizzled fulcrum
#

if it's just an example then its ok!

bright fog
#

๐Ÿ‘Œ

wind rock
#

how to replace moodles

bright fog
#

So if you mean like the texture, the moodle circle visual, check out mods that change it

#

But if you mean like modify each moodles themselves, to stop them from appearing for example, you are fucked

wind rock
#

texture

bright fog
#

Must be stored somewhere, maybe in a .pack file

wind rock
#

i dont even know how to access a .pack file

#

like what tools to use

#

i think i found something

orchid drift
bright fog
#

Search in your Steam library

#

It comes with the game

wind rock
#

thanks

left needle
#

Where in pz can i find the little item Icons?I only find the 3d models and the textures .

true nova
left needle
bright fog
left needle
frank elbow
#

Yeah why not

left needle
bright fog
#

๐Ÿ‘Œ

orchid drift
#

Anyone else ever tried to make a curtain mod? Like a mod that adds a new type of curtain?

stark tusk
#

there should be some tiles settings which makes that possible

#

Hi guys, just a quick question, im currently trying to create a mod related to pvp enabling / disabling, and since this is my first time doing this sort of modding, i'd like to know:

  1. what event do we specifically listen to for registering pvp hits
  2. does pvp have to be enabled for the attacker for this event to be fired, or can pvp be disabled for both characters and the event would still activate?
orchid drift
# stark tusk there should be some tiles settings which makes that possible

Yes, Ive been trying to make one and yesterday I realized it wasnt working because on mod.info I put the wrong name on tiledef and pack, but I wanted to know if anyone had ever tried to make one so that we could maybe work together or could give some tips/references. Glytch3r has been giving me some help understanding what modding is (shoutout to glytch3r btw), but theres almost zero info online on how to do this specific type of tile and wanted to see if I could find more resources

stark tusk
#

yeah glytch3r's a chad

stark tusk
#

IsoCurtain

orchid drift
#

DAMN

orchid drift
ancient grail
robust locust
#

Hiya, is there a sheet, or place, that lists all the room names? eg. livingroom, laundry, etc.

true nova
copper mortar
#

Guys, can someone send me the sound of a zombie knocking on the door?

robust locust
copper mortar
#

It's not me who needs the sound from the PZ

copper mortar
true nova
orchid drift
#

Sent

bronze yoke
#

most of the sounds in the sound folder are unused so it might not be in there

orchid drift
#

Ah damn it

#

I tried searching more sounds with .ogg format and they were all in the sound folder

bronze yoke
#

they're not loose files, they're in fmod banks

#

the loose files are mostly left overs from before those were used, only a select few are still used

orchid drift
#

Where is fmod banks located?

#

ZomboidSound.bank?

copper mortar
#

I would be grateful if you send me this sound.

orchid drift
#

You need to extract the sound files from the ZomboidSound.bank file. I can send you a link I found on how to do it, but if you really just want a 10 second clip of the zombies banging on the door I dont think it'll be worth the trouble unless you also want to learn how to extract bank files

uncut mural
#

Any mod suggestion to make similiar gameplay like tarkov?

frank elbow
#

(Serious answer: you're probably better off getting mod suggestions in #pz_b42_chat than here)

lost marsh
torpid cargo
#

Does anyone know if its possible to make your character temporarily gain a trait after consuming an item?

dull moss
#

yes. when you eat something you can fire a function (idk how)
then you make that function give a trait and make a countdown im moddata (for exmaple, hoursLeftWithMyTrait) and set it to X
then you also add event that fires every hour and reduces your counter, when reaching 0 you remove the trait and remove the event

torpid cargo
frank elbow
#

You can express disagreement or disdain for AI suggestions without being rude about it

topaz tangle
#

Well, I wasnโ€™t intending to be nice

AI is lazy and low quality

frank elbow
#

Your feelings towards AI aren't an excuse to be rude. I don't care for the suggestion either, but that's no reason to be disrespectful towards someone

topaz tangle
#

Iโ€™m sad that you feel that way

bright fog
bright fog
#

Using AI for art and shit when you're modding is fine tbf

#

You won't be good in every fields, nor do you have money to put in art, voice acting and shit

dull moss
#

Hurr durr, AI = bad, hurr durr

orchid drift
torpid cargo
orchid drift
# topaz tangle Iโ€™m sad that you feel that way

AI when used as an assistanting tool is more than acceptable. Also, saying shut up without adding nothing to solve the person's problem puts it you in the same category of people who try to profit off of AI-only made art. Zero contribution to society, just another clown

orchid drift
torpid cargo
# orchid drift Niiiiiiiiiiiiice, a bit like fallout's drugs?

kinda, i dont really remember how that works in fallout. but one of my ideas and reason for asking is cause i wanted to add Benadryl, to cure colds but if you overdose on it, it would temporarily give you the schizophrenia trait from another mod and some bad effects

orchid drift
torpid cargo
ancient grail
#

it temporarily gives you trait
i used the trait thing to add condition
it should be a trait at all
its just a hacky way of doing the mods project scope

torpid cargo
mystic vessel
#

Guys one question, i see a lot of renders to mods in workshop. Is there any template to make characters pose like this?

coarse sinew
mystic vessel
coarse sinew
#

ah yes, but they are quite simple

#

I followed this to attach the clothes to the character https://www.youtube.com/watch?v=IkfgHp_eDdE

YouTube is something I do in my spare time, so in order for me to do this full time, support the channel and brand by joining any of the links below and get invited to my private community!

Links to support the channel and/or get help:
Website Membership: https://www.tldstudios.net/plans-pricing
Patreon Membership: https://www.patreon.com/DaleT...

โ–ถ Play video
orchid drift
#

If Im making a mod that is basically a copy of the sheet curtain, do I need to do anything to the option menu to show the option to add the curtain to the window like it shows for the sheet? Like on the dropdown menu it shows "Add Sheet to window" or something like that (dont have the game with me atm) and I was wondering if I need to do a script that will show the same option for my custom curtain

ancient grail
#

OnFillWorldObjectContextMenu

Triggered when world object context menus are being filled.

Integer The index of the player for which the context menu is being filled.
KahluaTable The context menu to be filled.
KahluaTable The world objects available nearby the player.
Boolean Set to true if called for the purpose of testing for nearby objects.

orchid drift
#

This might be it

#

Where do I find the file? lua folder?

ancient grail
#
local function OnFillWorldObjectContextMenu(playerIndex, context, worldObjects, test)


    local player = getSpecificPlayer(playerIndex)


end

Events.OnFillWorldObjectContextMenu.Add(OnFillWorldObjectContextMenu)
bronze yoke
#

the sheet behaviour is very likely hardcoded to that specific item, you'd have to look around the vanilla game to see how it works

mystic vessel
#

good afternoon guys, for now it's impossible to make custom generators in vanilla style right?

#

with menu, custom consumption, range etc

#

I've never seen many mods about it and I wanted to know how difficult it would be to do this

orchid drift
bronze yoke
#

it's not impossible but all the core generator logic is hardcoded java stuff

mystic vessel
#

or something like that

bronze yoke
#

you can but you'd basically have to rewrite generators in lua

ancient grail
mystic vessel
small topaz
#

Hi! Has anyone ever noticed that when you change a vanilla item's property via the doParam command, it may cause problems when the mod is added to an existing save game? What happens for me is that the game then deletes the items I want to change with the command. Is this a known problem?

bronze yoke
#

if you change its type, yes

#

different types use different save formats so it is not possible for the game to load items that have changed type

small topaz
#

btw, here is my code from my mod:


  local name = "Base.Razor"
  local item = ScriptManager.instance:getItem(name)

  if item then
     item:DoParam("Type = Drainable")
     item:DoParam("UseDelta = 0.05")
     item:DoParam("UseWhileEquipped = FALSE")
     item:DoParam("cantBeConsolided = TRUE")
  end
end

Events.OnGameBoot.Add(changeRazors)```
#

ah... I guess it is because of the "Type = Drainable"?

#

will it then delete all razors (in my case) from the map? or only from parts of map which have already been visited by the player?

bronze yoke
#

only those that have already spawned

#

so not unvisited areas

small topaz
#

thanks! good to know!

calm stone
#

I added a poster.png and I've declared it on mod.info, but I still don't get the thumbnail. Does anyone know why?

mellow frigate
calm stone
mellow frigate
calm stone
#

it is already there

mellow frigate
#

in your picture above it is under media

#

check there is no mod.info nor poster.png under media and edit the one in spitfire

calm stone
#

in Visual Studio Code it kinda looks like it's inside media, but it's outside

mellow frigate
calm stone
#

so

#

I still don't understand, sorry

#

I don't get why you're saying something about the route

#

mod.info and poster.png are on the Spitfire folder, but outside media

hallow anvil
#

why can't tiled export tile images from .pack files?

mellow frigate
#

you have multiple Spitfire folders one you modify, and one PZ is using

calm stone
#

here I have the one that's on the game, but it's just a copy-paste of the version I made

mellow frigate
calm stone
#

the mod works, but in the game, there's no thumbnail

bronze yoke
#

just to make sure, the image is actually formatted as a png and not just a renamed jpeg or something?

calm stone
#

yes, type of file: png

bronze yoke
#

could you send the image here?

calm stone
bronze yoke
#

i threw it into one of my mods and immediately got this error:```
ERROR: General , 1730935239161> DebugLogStream.printException> Stack trace:
java.util.concurrent.ExecutionException: java.io.IOException: Not a valid PNG file
at java.base/java.util.concurrent.FutureTask.report(Unknown Source)
at java.base/java.util.concurrent.FutureTask.get(Unknown Source)
at zombie.fileSystem.FileSystemImpl.updateAsyncTransactions(FileSystemImpl.java:314)
at zombie.GameWindow.logic(GameWindow.java:309)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:765)
at zombie.GameWindow.run_ez(GameWindow.java:667)
at zombie.GameWindow.mainThread(GameWindow.java:495)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Not a valid PNG file
at zombie.core.textures.PNGDecoder.<init>(PNGDecoder.java:117)
at zombie.core.textures.ImageData.<init>(ImageData.java:257)
at zombie.asset.FileTask_LoadImageData.call(FileTask_LoadImageData.java:48)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
... 1 more

calm stone
#

so, should I change the image?

bronze yoke
#

this is, infact, a renamed jpeg

#

open it in an image editor and save it as a png

calm stone
#

but it says PNG

bronze yoke
#

that's just the file extension, it doesn't mean the data is actually formatted as one

calm stone
#

I see

#

thank you

#

can I use an online converter?

bronze yoke
#

probably yeah

winter bolt
#

you can open it in paint and then save it as png i think

calm stone
ancient grail
#

amazing

bronze yoke
#

couldn't see anything wrong with the configuration so it had to be the image, and the image was showing up fine elsewhere so it had to be in a valid but wrong format

mystic vessel
#

This is going to sound like an extremely stupid question, but is there a way for me to add icons to recipes I made using the script?

#

Is there something in lua for that?

bronze yoke
#

if it's added by the time OnFillInventoryObjectContextMenu fires, you can search the context menu for the option and set its icon

mystic vessel
#

I suppose there's nothing that can be done for conventional recipes.

#

right?

true nova
#

well in the inventory context in this case

#

heres how you can do this. i haven't done this but i've used to add and remove options but i think this is how it would work.

function OnFillInventoryObjectContextMenu(playerIndex, context, worldObjects, test)
    for i = #context.options, 1, -1 do
        local option = context.options[i];
        if option.name == "Cut In Metal Pipe" then
            option.iconTexture = getTexture("your icon texture name here")
        end
    end
end
Events.OnFillInventoryObjectContextMenu.Add(OnFillWorldObjectContextMenu)

mystic vessel
true nova
true nova
#

is your icon sized correctly?

mystic vessel
true nova
#

well maybe it cant be done with script items like that, I've set icons on stuff i've added so if all the names line up it should work. So the option.name probably isn't matching, this might be a translation thing?? idk what the game does for sure with this but my guess would be change it to "Recipe_Cut_In_Metal_Pipe"

ancient grail
#

basically the mod has a sandbox option for you to set what items you can gather

it adds the items icon dynamically

dark raptor
#

is there a specific file that controls the amount of xp needed for each level?

bronze yoke
#

modded skills define it in the mod's perks.txt, vanilla skills do not use this system and are hardcoded

dark raptor
#

damn

#

thanks though

wheat pebble
#

spiffo Heya, Im looking to make a mod hat that covers the entire head and I wanna ask if there is a way that at the moment u wear the hat the head gets "hide" or "invisible", or a way that the head and hair dont break through the hat besides scaling the model jaques_beaver

dark raptor
# dark raptor damn

i wonder if i can multiply xp in some sort of way based off your level to try to simulate the effects of the required xp being lower ๐Ÿค” (i want to make a mod that makes required xp grow less exponentially)

icy escarp
#

Anyone know of a file that contains the current version number of the game? Preferably one that has existed for a long time

wheat pebble
vague raven
deft ether
#

Hey everyone, new here, digging into PZ modding and I have a question about the syntax regarding tables/maps in lua.

    min = 5,
    normal = 60,
    max = 160,
}

Blood.algoverBurryShockIndex = {
    [0] = { threshold = 0.5, 0 },
    [1] = { threshold = 0.8, 0.15, 0.20}, -- 15-20%
    [2] = { threshold = 1, 0.2, 0.4 }, -- 20-40%
    [3] = { threshold = 1.3, 0.4, 0.5 }, -- >40%
}```

I'm assuming `Blood.pulse` is creating a table with min, normal, and max as values. `Blood.algoverBlurryShockIndex` is creating essentially a HashMap.

I've primarily written with Java as a hobby so I am exploring new grounds. I am familiar with Lua, but I understand this is Khalua. I just need help wrapping my brain around how this works with what little documentation is available. TYIA!
bronze yoke
#

so this is a bit weird

#

so lua tables are just hash maps, that's the only data structure in lua

#

when you do { stringKey = 5 } that's equivalent to { ["stringKey"] = 5}, it's just neater syntax for certain things

#

the Blood.algoverBurryShockIndex table here is a bit strange, they're using it as an array-like table (which is still just a hashmap, but you use consecutive numeric keys only like it was an array)

#

normally you can just define that like:```lua
Blood.algoverBurryShockIndex = {
{ threshold = 0.5, 0 },
{ threshold = 0.8, 0.15, 0.20},
{ threshold = 1, 0.2, 0.4 },
{ threshold = 1.3, 0.4, 0.5 },
}

#

i do recommend looking for general lua resources, kahlua doesn't differ from lua 5.1 as a language in any major way, it just has some missing (and extra) standard library functions

deft ether
#

Thank you for your advice, that was all I needed!

vagrant ledge
#

Is there a built-in limit to how many things the game will try to render on one tile? Like, say, if one of my players tried to stash a few thousand planks on one tile and can't load into the game, now? >_>

#

Or is their PC just being junky?

deft ether
#

My guess, if the server hasn't crashed, it's a client-side issue

bronze yoke
#

no, the client will freeze and eventually time out from the server if there are enough items on a square

grizzled fulcrum
#

isn't it like 65535 or something rediculous

#

or maybe it's 6000 idk

coarse sinew
# mystic vessel This is going to sound like an extremely stupid question, but is there a way for...

You can use this:

local origAddDynamicalContextMenu = ISInventoryPaneContextMenu.addDynamicalContextMenu;

local function getOptionFromName(context, name)
    for i = 1, #context.options do
        local option = context.options[i];
        if option.name == name then
            return option;
        end
    end
    return nil;
end

local recipeIconTextures = {
    ["Empty Baking Tray"] = "media/ui/Moodle_chevron_down.png",
    ["Slice Pizza"] = "media/ui/Moodle_chevron_up.png",
};

ISInventoryPaneContextMenu.addDynamicalContextMenu = function(selectedItem, context, recipeList, player, containerList)
    local result = origAddDynamicalContextMenu(selectedItem, context, recipeList, player, containerList);

    for i = 0, recipeList:size() - 1 do
        local recipe = recipeList:get(i);
        local option = getOptionFromName(context, recipe:getName());

        if option then
            local texturePath = recipeIconTextures[recipe:getOriginalname()];
            if texturePath then
                option.iconTexture = getTexture(texturePath);
            end

            -- local resultItem = InventoryItemFactory.CreateItem(recipe:getResult():getFullType());
            -- if resultItem then
            --     local resultTexture = resultItem:getTexture();
            --     if resultTexture then
            --         option.iconTexture = resultTexture; -- assign icon texture from result item
            --     end
            -- end
        end
    end

    return result;
end
#

This integrates the icons directly into the dynamic context menu creation. getName() returns the localized name that the player sees (useful for finding the menu option) which is probably why it didn't work for you with the code from guns and getOriginalname() returns the script-defined name of the recipe, the name in the .txt file where you defined the recipe, which you need to add in the recipeIconTextures table. I also included a fallback using the result itemโ€™s texture (commented out here).

queen oasis
#

so much time wasted because my "scripts" folder was named "srcipts"

shrewd copper
#

Primary directive of MTF Beta 7 units in [REDACTED] Quarantine Zone remains elimination of SCP-008-1 instances [DIRECTIVE: FIREWORKS]. Secondary directive is to retrieve critical research data compiled by MTF Iota-10 agents placed within the ranks of the LMPD when the Foundation received word of a possible outbreak of SCP-008 [DIRECTIVE: EGG].

05 Council [DATA EXPUNGED] meeting converged on [REDACTED]/1993 to consider reclassifying SCP-008 to Appoleyeon, 5-4 decision to base reclassification decision on results of DIRECTIVE FIREWORKS

main pasture
#

is it possible to rotate texture in the UI with arbitrary angles? (or text?)

orchid drift
#

Hey guys. Could someone explain this to me by steps? Im new to modding and I got a bit confused

I didnt want to ask them directly because I didnt want to be bothering them too much

#

I made new tiles for my curtain, but Im not 100% understanding what they meant. Sorry if I sound stupid, Im trying my best to learn by myself as much as I can, but this is all fairly new to me and my daily life doesnt give me much time to deep dive into this subject

vague hedge
#

Will PZ allow me to have two recipes that require two different things but result in the same thing?

#

I have one recipe that is 5x 2 dollar bills in exchange for a 10 dollar bill and that works just fine. I then have another recipe under it that is 2x 5 dollar bills in exchange for a 10 dollar bill.

#

The 2x 5 dollar bills recipe does not function and gives an error, but the 5x2 dollar bills recipe functions.

bright fog
#

I'd be surprised if you weren't able to create a sheet tile from lua

#

And if you can, you got everything needed

orchid drift
bright fog
#

I can't really check now tbf

orchid drift
# bright fog I can't really check now tbf

No problem! Im in no position to make any kind of demands or expectations from anyone. Im aware Im out of my league in this subject. Any help is welcomed and appreciated, no matter how small it may be ๐Ÿ™‚

orchid drift
vague hedge
orchid drift
#

Yes, please

fleet bridge
#

What's the error

vague hedge
#

So the code I am using for the recipe is this:

bronze yoke
# orchid drift

i would expect the sheet cover functionality to be hardcoded, but i'm sure tilesets can just add new curtain tile, which i think is what they're recommending to you

vague hedge
#

The error the error finder gives me is this: ```attempted index: getTexture of non-table: null
function: addDynamicalContextMenu -- file: ISInventoryPaneContextMenu.lua line # 2781 | Vanilla
function: createMenu -- file: ISInventoryPaneContextMenu.lua line # 699 | Vanilla
function: onRightMouseUp -- file: ISInventoryPane.lua line # 1444 | Vanilla
java.lang.RuntimeException: attempted index: getTexture of non-table: null
at se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1689)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:641)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcallBoolean(KahluaThread.java:1924)
at se.krka.kahlua.integration.LuaCaller.protectedCallBoolean(LuaCaller.java:104)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1458)
at zombie.ui.UIElement.onRightMouseUp(UIElement.java:1416)
at zombie.ui.UIManager.update(UIManager.java:910)
at zombie.GameWindow.logic(GameWindow.java:262)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:765)
at zombie.GameWindow.run_ez(GameWindow.java:681)
at zombie.GameWindow.mainThread(GameWindow.java:495)
at java.base/java.lang.Thread.run(Unknown Source)

bronze yoke
#

they're recommending you add a curtain tile which you craft with regular garbage bags rather than trying to get garbage bags to work in the very likely hardcoded sheet cover functionality

vague hedge
orchid drift
queen oasis
bronze yoke
bronze yoke
#

are you sure it's one of these causing the problem and not another recipe?

vague hedge
#

But the issue isn't from the 10$ thing I guess, so why won't it show up?

#

What's the specific code for if you have a recipe that equals item 3. Item 3 needs either 2x of Item 1 or 5x of item 2?

#

Is it "item2 OR item1" or is it something different?

vague hedge
#

I mispelled it.

bronze yoke
#

you can have a source that can take multiple different items with item1/item2=5 but you can't have different amounts per item

vague hedge
#

It all works now!

#

Oddly that spelling mistake on the bunny ears recipe was holding back a ton of recipes from being made.

#

And Craft Helper 41 even shows up on the 5$ bill now!

queen oasis
#

While I'm in the InventoryPaneContextMenu.lua - Candle is coded to prevent more than 1 from being lit...

queen oasis
grizzled marsh
#

Hello guys, where can I see a list of all the attributes the TV can give characters, such as PAN+1 and FEA+1

tiny dawn
#

So I've found the item I want to modify, which is pretty simple with just adjusting the item values and renaming it, but is there a directory of what each "weapon" object interacts with? Once I get the media files for the weapon I want to make sure I have all of it's dependencies and interactors handled before testing. Any help is greatly appreciated!

queen oasis
mellow frigate
#

There is a maximum of 1000 pages on steam workshop and a maximum of 30 items(mods) per page. So GG guys, with more than 30000 mods on the workshop, some of them cannot be browsed. drunk

plucky gust
queen oasis
#

true mu.. cough cough

#

and mod templ cough cough

queen oasis
#

Working with OnFillInventoryObjectContextMenu. Is there a better way to get the item that was left-clicked?

for i, _ in ipairs(items) do
    for why = 1, #items do
        local item = items[why]
        if instanceof(item, "InventoryItem") then
            print(item:getName())
        else
            for the = 1, #item.items do
                local fuck = item.items[the]
                print(fuck:getName())
            end
        end
    end
end
#

and thanks albion, because without the hint "InventoryItem[] or ContextMenuItemStack[]" I would have never figured out what I have already

bronze yoke
#

i use something like```lua
local item = items[1]
if not instanceof(item, "InventoryItem") then
local item= item.items[1]
end

#

i don't remember if that's exactly correct though, not at my computer right now

queen oasis
#

just grab the first item...

#

thanks!

#

maybe check items length, and => 2, assume it's a stack.

grizzled marsh
ancient grail
#

i think even if its just 1 item

but im not sure

bronze yoke
#

it's either a list of items or a list of item stack structures

grizzled fulcrum
#

what a weird implementation

stark tusk
#

If a vehicle goes to NaN, NaN coordinates, is there a way to bring it back?

fathom forum
#

i have questions about java mods

#

is there anyone here who is experienced with this? how does mod distribution work?
can they be uploaded to the workshop like other mods

bright fog
bronze yoke
#

the workshop doesn't really vet what you upload to it at all

#

as far as i can tell you can upload whatever files you want, it's basically just a file host

bronze yoke
#

meh, not really

#

if you're in the habit of running weird files from the internet it doesn't really matter where you got them from

#

workshop is fairly safe in that any game that supports it (including zomboid) is going to have specific mod support and not just like, e.g. run some weird virus exe

indigo copper
#

help me
i use addVehicleDebug on server side
but not found getVehicleById({serverside_spawn_vehicleId}) on client

i need function
update request to server side on client OR update client on server side

frank elbow