#mod_development

1 messages Β· Page 514 of 1

drifting ore
peak raven
#

missing texture

#

or its spelled wrong in the model file

drifting ore
#

Thigh_Boots

#

nah its right

lethal oasis
#

Anyone in here able to help with a issue with a map mod i made? Cant get it to show up in the mod list in game and i have no idea whats wrong.

drifting ore
#

I got this error when I try to call ISUnequipAction. If anyone can help, I'm rly stuck on that

-----------------------------------------
function: start -- file: ISUnequipAction.lua line # 18
Callframe at: StartAction
function: begin -- file: ISBaseTimedAction.lua line # 59
function: addToQueue -- file: ISTimedActionQueue.lua line # 23
function: add -- file: ISTimedActionQueue.lua line # 125
function: unequipItem -- file: ISGearPanel.lua line # 264
function: equipAllClothes -- file: ISGearPanel.lua line # 272
function: onOptionMouseDown -- file: ISGearPanel.lua line # 549
function: onMouseUp -- file: ISButton.lua line # 56

LOG  : General     , 1642826752432> Object tried to call nil in start
LOG  : General     , 1642826752433> creating new sourcewindow: C:/Program Files (x86)/Steam/steamapps/common/ProjectZomboid/media/lua/client/TimedActions/ISUnequipAction.lua
ERROR: General     , 1642826815034> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in start at KahluaUtil.fail line:82.
ERROR: General     , 1642826815035> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in start
...
lethal oasis
#

also posted about this in the mapping chat.

carmine flume
#

I'm trapped in a bit of a catch-22. I want to do something before my lua code loads, because code there needs to be influenced by something I do later on. The edit I make is persistent so I can get around this by calling ResetLua but the problem is that this gets stuck in a loop because I'll just end up calling ResetLua any time my code loads. Events like OnGameBoot or OnMainMenuEnter get called a second time when ResetLua is called, so I can't hook into those either because I'll once again get stuck in an endless loop.

#

I could potentially get around this if there's a way to hook into the game exiting, but I don't think I can do that, either

bitter igloo
#

How to modify a recipe to yield 2 different items? Namely, I want "open jar box" recipe to yield both jars and jar lids

#

As far as I can tell, the game handles it somewhere else other than the recipe file

drifting stump
#

can use require to load it before

#

or put in in shared since that gets loaded first

carmine flume
#

It's java

#

I can't tell Java to load my thing before it does anything

drifting stump
#

can go the jank route of having a variable keeping track if youve done the reset

carmine flume
#

I can't have a variable keeping track of things because that'll get reset when I reload lua, which is required.

#

I mean the simple option is to tell people my mod has to be loaded twice before it works, but that's not ideal

#

There's a thing Java does that I need it to do after I do my thing, but it only does it before I can do my thing. And the only way to trigger it from Lua seems to be to call ResetLua. So I can't use Lua to keep track of what I'm doing.

quasi geode
# drifting ore I got this error when I try to call `ISUnequipAction`. If anyone can help, I'm r...

error at function: start -- file: ISUnequipAction.lua line # 18
the exact error is Object tried to call nil in start meaning it tried to function() something, but the function doesnt exist
line #18 in that file is:

self.item:setJobType(getText("ContextMenu_Unequip") .. " " .. self.item:getName());

theres 3 function calls in that line, item:setJobType(), getText() and item:getName() so one of those doesnt seem to exist
getText is a global function, so can rule that out. setJobType and getName are methods of InventoryItem, so those should both exist, unless self.item is pointing to a value that isnt a InventoryItem

carmine flume
#

So I'm looking for some sort of hook that'll be able to tell my Lua code where it is in that process

drifting ore
carmine flume
#

Basically my goal is to trigger a reload of the SandboxOptions once I've done my thing.

drifting ore
#

But I already think of all of that. That why I'm stuck xD

quasi geode
#

what the value of self.item when you print() it? because if its a Clothing subclass of InventoryItem then it should have those methods.

carmine flume
#

I really just need a hook that triggers only once no matter how often Lua is reloaded. But I'm not sure one exists

drifting stump
carmine flume
#

Display of what?

drifting stump
#

of sandbox options

autumn torrent
carmine flume
autumn torrent
carmine flume
#

Thanks! I'll check it out.

drifting ore
#

That is a Clothing, I'm not crazy right ?

carmine flume
autumn torrent
#

rip

quasi geode
drifting ore
#

I tried several different functions to unequip a clothing but nothing worked. I always get weird errors

quasi geode
#

got a mod running thats messing with that line throwing a error? theres clearly something different going on (else it would always throw that error unequipping clothes), or how are you calling the timed action?

drifting ore
#

It's the only mod, I test it

craggy furnace
#

modular helmets are a fun concept

drifting ore
#

For example both work:
ISTimedActionQueue.add(ISInventoryTransferAction:new(self.char, item, item:getContainer(), self.char:getInventory()))
and
ISTimedActionQueue.add(ISWearClothing:new(self.char, item, 50))

quasi geode
#

add a print into the timed action:

function ISUnequipAction:start()
    print(tostring(self.item.setJobType), tostring(getText), tostring(self.item.getName)) 
    self.item:setJobType(getText("ContextMenu_Unequip") .. " " .. self.item:getName());

should print out

LOG  : General     , 1642830184496> function 0x1662484120    function 0x1680374941    function 0x1717067458

not sure how but one of those is seems to be returning nil (since its Object tried to call nil in start)

drifting ore
bright acorn
#

Get some of that left handed action going on xD

https://www.youtube.com/watch?v=lNEr_xVYS8Y&ab_channel=AbraxasDusk

A mod for Project Zomboid that allows you to wield a weapon in your second hand.

Project Zomboid:
https://store.steampowered.com/app/108600/Project_Zomboid/

Offhand Attack Mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=2727440840

My Other Mods:

Jump Through Windows Mod:
https://steamcommunity.com/sharedfiles/filedetails/?id=268...

β–Ά Play video
hollow shadow
craggy furnace
drifting stump
#

is there a lua event that triggers on the client after it finished loading in to a server

carmine flume
#

I think OnCreatePlayer? It also fires on single player but you should be able to check whether you're on a server or not using lua.

drifting stump
#

shouldnt matter if im on a server or singleplayer

#

was trying with OnGameTimeLoaded

#

wiki says OnCreatePlayer triggers when a player is being created

#

not when it finishes loading in

carmine flume
#

What's the significant difference in this case? The event gives you access to the IsoPlayer object right away and you can start doing stuff with it.

drifting stump
#

to request info from the server

#

player object doesnt matter

carmine flume
#

What kind of info do you need from the server? Do you need to wait until the player has fully loaded in?

#

There is also OnConnected, but not sure on which side that fires

drifting stump
#

working on multiplayer pause

carmine flume
#

And OnGameStart / OnLoad could be relevant too

drifting stump
#

and with the methods exposed to lua this is fiddly to say the least

#

after a lot of trial and error i have it working

#

just need to sync to a new player connecting the status

#

OnGameStart might be what i need

carmine flume
#

Well, OnCreatePlayer is the moment when the player is created in the world, so that's when gameplay truly starts. But best to try how those events interact with what you're trying to do.

drifting stump
#

ugh thought it was when creating a character

carmine flume
#

OnCreatePlayer fires when an IsoPlayer object is added into the world, which happens for existing characters too, not just new ones

drifting stump
#

OnGameStart did not work

#

everything is too early to work

#

well this is why

#

net is loading after

carmine flume
#

One thing you could try if there are no other suitable events is request global moddata from the server, and then listen to that event. Since that event means a response from the server, it should fire late enough, even if you request the moddata in an event that's too early.

radiant marten
#

Could somebody help me figure out how to add true music to multiplayer? I can't figure out how to add my own songs

drifting stump
#

since i dont need a real thing i can request nothing just to trigger a response

carmine flume
#

Well, if you want the player to get data from the server you could actually use it to send real data, but if you don't want that, I think you can request something invalid too. Let me check...

#

Okay, OnReceiveGlobalModData event has 2 arguments. The second one is either the data, or false. So it appears that this means it always fires, even if the thing you asked for doesn't exist.

drifting stump
#

i think the issue is another XD i tried without the code to sync and a client connecting to a paused server simply doesnt load until you cancel the pause

#

but it doesnt run the unpause on the server for some reason when you cancel

carmine flume
#

hmmm. Maybe the pause is also pausing the ability to cancel?

drifting stump
#

wouldnt be surprized

#

if only the PauselAllClients() and UnpauselAllClients() were exposed to lua

#

might leave it at "just dont join a paused server its already jank enough as is"

radiant marten
#

how to make true music addon? I can't figure out how to upload mod or make it
i am completely lost, cannot even do first step. the template they told me to use says it contains file types that are not allowed? Please help me

#

this all it says template they give me doesnt work?!

teal harbor
#

anyone know how to spawn modded items or how to access the file for workshop items

#

i cant find the id for the things i want to spawn

radiant marten
#

please help with just one step? i just cant figure out how to start

radiant marten
#

is this not right? why get error?!

vivid flare
#

still nobody knows how to correctly export vehicle animations via blender?

radiant marten
#

please somebody message me... i give up for now

pearl prism
#

?

vivid flare
#

well, i was able to export animations, but it wildly differs from model to model

#

everytime i think "now i got it" ... next time it's different again

#

i even tried an alternative fbx exporter now, because apparently the one in blender is not good.

#

the problem i have now is that the game screams error because of missing bone index

#

i am able export a single working animation, but as soon as it's about multiple ... non-stop issues

pearl prism
vivid flare
#

wish i knew

#

one element is that i had to be in animation tab / object mode for all animations to be exported correctly

#

but it might as well be some other factor, who knows

pearl prism
#

Did you configure the script the same as vanillas?

vivid flare
#

scripts are ok. it's an fbx issue

pearl prism
#

I'm also interested in this area, if you find something, send me a message. πŸ‘

carmine flume
#

Is there a way to circumvent maximum / minimum values for sandbox settings using lua? e.g. setting the population multiplier to 5 or something like that?

#

A lot of those values seem arbitrarily limited, and the Java code generally gets its values directly from the sandbox options object which enforces those limits, so I'm not sure how to get around it

#

Unless I want to write a java mod but that means I wouldn't be able to put it on the workshop

#

tbh the longer I'm working on trying to mod this game, the less I like the state of the modding API

#

It's nothing but cursed and janky workarounds

#

It's so hard to do anything more than the most basic stuff

#

The API seems like it's built solely for content mods, not functionality mods

carmine flume
#

I'm not necessarily saying this as a complaint though. I understand that there are more important things to work on than modding support. It's just a bit frustrating to find that I simply can't do the things I want to do

uncut jasper
#

hi, where can i find the script with keydown code in origin vanilla .lua of the game? i search this but i dont find. i want change the restriction for keydown "E" (interact). i want derive the vanilla script for add a restriction if door is locked.

in my mod, i want lock door inside house (IsoFlagType inside) and add restriction, player can't enter if door is locked, my script good working with scroll menu to open door, (if door is locked, door no open) it's good too with click on door for opening, if door is lock : no open.

But if i keydown "E" (interact), the door open even if she is locked, why ??
i have derive this for add restriction : iSObjectClickHandle
i have derive this for add restriction : ISLockDoor
i have derive this for add restriction : ISOpenCloseDoor

what script should i derive for add restriction for the keydown interact E please ?

#

sory for my language, i'm not english ^^ but you understand my friends?

carmine flume
#

As an aside, have you considered what happens if someone rebinds their interact key to something like "I"? Perhaps you're unable to find it because you're looking for things involving the "E" key rather than a dynamic interact key. It could also be that the code you're looking for is in the java part of the game, although I haven't checked.

uncut jasper
#

no i dont search for keydown E, just dynamic script for interact yes.

Yes i have believe for java script, and we can't derive java script i think?

midnight knot
#

Hey!

I'm new here and I would love to start creating my own level mod. I'm having an issue finding clean information on how to setup custom mods. I've installed Modding Tools from Steam and I have both Tiled and WorldEditor. I would love to first figure out how to add a basic ground texture for starts. Any clear information would be awesome!

dreamy silo
#

is there a clever way to use 3 different items?
atm my recipe uses:

A/B/C/D/E/F/G
A/B/C/D/E/F/G
A/B/C/D/E/F/G

can I use sth like

3x(A/B/C/D/E/F/G)

?
because if there are more than 8 items and you use them several times the recipe page is quite long

#

so that especially the game shows 5 of this

#

instead of 1 of this (5 times)

lilac lake
#

@dreamy silo i'm fairly new to PZ modding but if your recipe requires 3 instances of one of six different objects, why not tag those six objects with a category and then require three instances of items with that category

#

for example, cooking requires a "knife", which can be a kitchen knife or a hunting knife etc

#

and chopping trees requires an "axe", which can be a hand axe, a splitting axe, a fire axe, etc

dreamy silo
#

how do I categorize this objects? and use it later?

#

googleing doenst really help

warped quarry
#

If you wanted to change mod recipes, where the hell do you go?

lilac lake
warped quarry
lilac lake
#

well first and foremost your solution will require altering the scrap weapons mod unless you want to track down the mod that's recreating base game items for some incomprehensible reason

#

do you know where to find the mod info that steam downloads?

dreamy silo
#

@warped quarry I think I saw a YT Video from Hasilein which showed than you can place those tin cans on the ground, get them waterfilled and then you can make an empty one of them again...
https://youtu.be/AC43I3SQR-s?t=471

#ProjectZomboid#Hydrocraft#NEWS

If you find any bug or like to be part of the team - join my discord https://discord.gg/CzMAJpRX

Update is on the way. Important to know BEFORE you do it:
These usable items will be turned intofurniture and not exist any more if they are anchored - all items inthere ale lost. So remove them.
Herbalist Table, Ki...

β–Ά Play video
lilac lake
#

tbh i've never understood why items on the ground collect water but the item doesn't collect water when equipped

dreamy silo
#

because _if you waer it its either in the backpack or the hand?

lilac lake
#

exactly

dreamy silo
#

so it wont collect

lilac lake
#

so if i'm holding a cooking pot or the cooking pot is on the ground, what's the difference

#

unless you're saying that by holding a cooking pot in my hands, i'm creating a forcefield that prevents rain from falling into it

dreamy silo
#

I would hold it like this πŸ˜‰

#

so it wont fill πŸ˜„

midnight knot
dreamy silo
#

is there a useful tutorial how to make furniture?

#

or how to make own chests?

#

I wanna create a bigger chestmod πŸ˜„

drifting ore
#

Also wrong channel.

midnight knot
#

OOO got it! thank you and I noticed I was in the wrong channel again πŸ€¦β€β™‚οΈ

vivid flare
lilac lake
#

i know, it's wild how complex incrementing the contents of held items is, lord only knows how they managed to put the code together to fill containers in your hands from sinks sippyjuice

vivid flare
#

what if i sprint

#

what if i fall down. should the pot get empty then?

#

actually when holding the item in your hand, the open top doesnt necessarily point upwards

lilac lake
#

i mean the game is fairly logical about most things, so yeah, naturally containers should empty if you trip while sprinting

#

and most items ergonomically would be carried upright as it would be literally painful to hold them inverted, such as cooking pots

vivid flare
#

it's just not worth it. and in like 10 years, this is the first time i see someone suggesting this πŸ˜„

lilac lake
#

well to be fair, tripping wasn't a thing before b41 sippyjuice

vivid flare
#

also will water in the pot get tainted then?

lilac lake
#

obviously πŸ‘

vivid flare
#

but that's not realistic :>

lilac lake
vivid flare
#

it's raining food coloring?

lilac lake
#

i'm not sure whether this is a language fail or a science fail but anyway if the rain is contaminated, anything the rain gets into will be contaminated - this is why if you collect rainwater from puddles on the ground, the water is contaminated

#

the colour in the food colouring was an analogy for the contamination in rainwater

vivid flare
#

well, if you want containers in player hands to fill while raining, you can probably just script that

#

personally i dont see the point in it

#

but then again i never walk around much with pots

mint sphinx
#

is there a way in the game so if you build it build the item on x,y,z and x,y,z+1 if z is the high of the map ? like to build something there take op spaces like 2x2x3

tame veldt
#

Does anyone know if "Trunk Space Mods" still cause items to despawn?

lilac lake
fickle forum
#

Hey I'm looking to get into modding PZ, am I able to use another mods code / assets and credit them or is that not allowed?

lilac lake
#

i mean that's up to the mod creator - if you're based in the USA, it's entirely possible that a mod maker could ask steam to take down your mod if you created a derivative mod without requesting permission

#

personally i download mods just to look at how they've structured things

fickle forum
#

I see, it would never be a carbon copy or close. Just to learn.

lilac lake
#

if you don't publish it on steam, it doesn't matter and nobody can do a thing

#

the problem comes when you publish someone else's work and pretend that it's yours

fickle forum
#

Yes, if I were to use any I would credit.

lilac lake
#

even with attribution and a disclaimer that the work belongs to someone else, it's still presenting the mod as if you've made enough changes to claim it as your own work

#

credit isn't enough; permission is the gold standard

#

if i made a mod and someone duplicated it, tinkered with it a little bit, and then reposted it without permission, i would have it taken down even if they credited me on every second line of the mod description

fickle forum
#

Yeah, I've been modding different games and its different per game. Good to know for this going forward.

lilac lake
#

to be fair it doesn't much matter what game we're talking about; when it comes to making a derivative work and publishing it, permission from the author is gold because there are people like me out there

fickle forum
#

Well it depends on the game. As the mod may need the game, and in using the game you've accepted it can be copied and used. Example: Teardown.

lilac lake
#

all mods need the game the mod runs on by default

fickle forum
#

I'm not here to argue, thanks for the advice.

lilac lake
unreal river
#

Hi! I was wondering if anyone would be available in helping make a mod to remove admin models for multiplayer servers? Basically I would love to remove my personal instance's model for recording purposes.

lilac lake
#

have you considered recording on a non-admin account and utilizing admin invisibility?

hollow jewel
#

hi guys, i want to learn how to make mode in project z, but i can't find a good tutorial for begginers, i know how to code, but i don't have idea how to create a mod

#

sorry for my bad english

hollow jewel
lilac lake
unreal river
lilac lake
hollow jewel
unreal river
lilac lake
# hollow jewel can i share my code with u?

instead of sharing code and a singular problem being found, it would be better if you read the link that i sent you so that you can find the error and know how to prevent making it in the future

hollow jewel
#

i have literally copied the documentation

#
module Base
{
    recipe Ciao
    {
        WineEmpty/WineEmpty2/WhiskeyEmpty/BeerEmpty,

        Result:SmashedBottle,
        Time:20,
        Sound:BreakGlassItem,
    }
}
lilac lake
#

as you can see, the module should be "MyMod" or whatever the name of the mod is

#

imports { Base }

#

and then recipes should follow

#

this information was accessible at this link

#
    imports {
        Base
    }
    /** Comments can be multiline like this
        and can appear anywhere in the file, even in the
        middle of a { block }
    **/
    item MyItem
    {
        Type         = Normal,
        DisplayName  = My First Item,
        Icon         = MyIcon,
        Weight       = 0.1,
    }
}```
hollow jewel
#

thank u man

lilac lake
#

no worries, please read the documentation in the future

hollow jewel
#
module prova {
    recipe Ciao
    {
        Base.Seaweed,

        Result:SmashedBottle,
        Time:20,
        Sound:BreakGlassItem,
    }
}

Sorry again, i'm getting mad, this not work, and i can't understand why

#

i have readed the documentation, and i have used as module my mod and not the base module

drifting ore
#

But you should use the import part

hollow jewel
#

but no

#

the name of the module is the same name of the id of the mod right?

drifting ore
#

No, it's just using in game in type like this prova.MyItem

hollow jewel
#

ah okk, but not work

#
module prova {
    recipe Ciao
    {
        Base.Seaweed,

        Result: Base.SmashedBottle,
        Time: 20.0,
        Sound: Base.BreakGlassItem,
    }
}
#

the mod is detected in game but not show my recipe

drifting ore
#

remove the sound, see if that's it

#
{
    imports
    {
        Base
    }

recipe Ciao recp
    {
        Seaweed,

        Result: SmashedBottle,
        Time: 20.0,
    }
}
lilac lake
#

i'm not going to claim special knowledge here but it makes sense that you need to import Base if you want to refer to items in Base because otherwise how is the computer supposed to know what "Base.SmashedBottle" is

rain pumice
#

which place is the best to start modding, I have been learning lua for 2 weeks and I'm really lost at this point on where to start modding. I have visited the links on pinned but it is all confusing to me still lol

weary matrix
drifting ore
rain pumice
#

ty guys

#

πŸ™‚

drifting ore
#

And look at other mod indeed

weary matrix
#

@drifting ore got your hook working?

drifting ore
weary matrix
drifting ore
#

I try something else, I think it's gonna work

#

That why I delete it

weary matrix
#

ok then

drifting ore
#

It worked, I just overwrite again the overwrite code

weary matrix
#

overwrite is just confusing

drifting ore
#

Yes sorry, I'm bad at remembering terms, I'm not a computer scientist and English is not my mother tongue so it's sometimes difficult to find the right word

weary matrix
#

any clue why this is not working?

player:setZombieKills(playerData.zombieKills)``` I checked, playerData.zombieKills is the proper value I want to set, but in game the player zombie kills remain zero
weary matrix
quasi geode
#

personally i'd say it depends on the usage, with overwrite completely replacing the original, while hooking is adding extra code to run on top (or bottom) of the original. but its all personal opinion really. sure you could find lots of arguments about it lol

weary matrix
#

I would agree with the term overwrite if you actually overwrite the memory where the function is located, but that's not the case here

quasi geode
#

it also fits the definition of overwrite effectively:
a. To destroy or lose (old data) by recording new data over it
b. To record (new data) on top of already stored data, thus destroying the old data

weary matrix
quasi geode
#

sure, you can overwrite the contexts of text file and still keep the original if you copy/pasted it too XD

weary matrix
#

what you're overwriting is the place where the reference to the old function is stored, that's called hooking πŸ˜…

weary matrix
weary matrix
#

Any clue how to change player weight in MP? I tried this:

getPlayer():getNutrition():setWeight(85.0)```
But it does not change the value in the player info panel
fathom hare
#

Hi, does someone have a clue if theres a mod which does skill books, recipe magazines etc. to have a slight chance to be destroyed/damaged after reading?

viscid elbow
hexed shuttle
#

Does anyone know of a mod that lets you plaster non-player built walls?

silver kindle
#

whats wsome cool recent multiplayer mods πŸ™‚

vernal berry
#

Has anyone downloaded the β€œSnake” mod pack? And how was it?

hollow jewel
#

Just for try but doenst work

nimble spoke
vocal hull
#

does anyone have a good modpack for a multiplayer game? heopfully keeping it sort of vanilla

weary matrix
unreal river
#

REPOST: Hi! I was wondering if anyone would be available in helping make a mod to remove admin models for multiplayer servers? Basically I would love to remove my personal instance's model for recording purposes. It is basically to reduce some logistical problems that can help some creators record easier πŸ˜„

drifting ore
unreal river
weary matrix
drifting ore
#

didn't see it's was in MP

weary matrix
#

It's weird cause it's not even showing the change on client side

floral sand
#

Whats that mod for making sleep short?

weary matrix
floral sand
#

thats it!

#

thanks

weary matrix
analog copper
#

sorry

weary matrix
#

No worries

viscid elbow
#

Anyone know if we have support for custom save data?

#

Having a hard time finding info on it.

weary matrix
viscid elbow
#

basically a map of strings to booleans

weary matrix
viscid elbow
#

ooh that may work. thanks

tulip valve
#

How do you make a recipe give 2 items?

unique barn
#

anyone know a mod that allows me to spawn specific zombies

hidden junco
#

Does anyone know which version of Lua runs on PZ? I'm trying to use the goto command, but it only was added on Lua 2.0.1 . Maybe I won't be able to run this?

hollow jewel
quasi geode
quasi geode
#

?

hollow jewel
#
module prova
{
    imports
    {
        Base
    }

recipe Ciao recp
    {
        Seaweed,

        Result: SmashedBottle,
        Time: 20.0,
    }
}
#

this code is correct?

#

the game recognize the mod but in the crafting menu i can't see the recipe

quasi geode
#

syntax looks fine, though i cant remember if it allows for spaces after : its been ages since i worked with recipes

hollow jewel
#

i'm try to leave spaces now

quasi geode
#

ah ya looking i dont think spaces is going have to have a effect

hollow jewel
#

it's all day i'm trying to create a recpie

#

the mod apperas in the mod selection, but in game the recipe doesen't appear in the crafting menu

#

the space not is the problem

#

this is the folder

#

is in Zomboid folder

nimble spoke
#

al these must be inside media folder

#

all these folders

hollow jewel
#

now I try

weary matrix
#

@hollow jewel try = instead of :

hollow jewel
#

okk

quasi geode
#

recipes use :

weary matrix
#

Oh really? Damn, sorry then

quasi geode
#

its the folder structure as Soul suggested

hollow jewel
#

if i put all files in media the game doesn't find the mod

quasi geode
#

or the poster.png

#

just the folders lua, scripts, sounds and textures go in media

hollow jewel
#

okkk now i try

#

thank u guys

#

now the mod is working but i have only my custom recipe

#

the other is disappeared

#

ok i have fixed that

#

really cool, thank a lot guys

uncut jasper
#

hi, a .lua file script can call java script?

Because i search "Interact" inside script

bind = {};
bind.value = "Interact";
bind.key = 18;
table.insert(keyBinding, bind);````
#

in shared/keybinding.lua

drifting ore
#

I made this as a prototype quickly, to see if it was possible. Do you think it might interest people?
The goal being of course to remove the equipped items from the main panel

#

Basically it's a new tab in the health menu with all the equip items. Instead of having them in the main menu all the time for nothing

#

Everything works the same way. Double click for equipped, can drag items into other containers, ect

cold burrow
drifting ore
# cold burrow I really interested in this mod. If you going to finish this mod and If you tak...

β€’ Ability to hide equipped items from main inventory and show only in this panel. Maybe with ModOptions.
Ofc, as I said "The goal being of course to remove the equipped items from the main panel".

β€’ Ability to rename it? Again with ModOptions.
I will just name it Equipments I think

β€’ Ability to place tab between Health and Protection tabs.
Not possible, finally yes but my mod would lose its ability to stay up to date because I would have to hook basic functions

#

Thank for your opinion, it rly helps

sinful relic
#

how can i make something from my inventory drop instantaneously, without the timed action?

cedar ingot
#

how do i start making a mod?

weary matrix
cedar ingot
#

what else?

craggy furnace
#

time

cedar ingot
#

but like what do i need to make it, any special programs, what?

drifting ore
#

Check pinned message

weary matrix
sonic nebula
#

ah ok sorry

shut zinc
#

Before I commit, is anyone working on a mod that allows you to view other players on the map in MP?

drifting ore
#

Is it possible to make boxes and the like cool items if the room(or exterior) they are in is freezing?
I just noticed that is a thing that is missing and its kinda dumb

hushed cypress
#

How good is the Astar api if one wanted to path for vehicles? I found zombie.ai.astar.AStarPathMap but I wonder how well it would work if I used it for gps, and if it would make the car go into trees

#

and if it properly calculates the cost when moving trough grass tiles over road

weary matrix
hushed cypress
#

Interface Mover docstring says β€žFor instance, a Mover might represent a tank or plane on a game map. Passing round this entity allows us to determine whether rough ground on a map should effect the unit's cost for moving through the tile.” So it could potentialy work for cars i guess?

weary matrix
#

@hushed cypress not sure any of the astar classes are exposed to lua

drifting ore
languid nimbus
#

Does anyone know if there is a way to create new animations? I'm making a slingshot mod, it's all done but the animations and I can't find anything related to it =/

stark abyss
#

does anyone know how to use mods in a multiplayer server i select them is sever settings under mods the session will use but the game does not seem to recognize them

weary matrix
weary matrix
stark abyss
#

thx

weary matrix
#

It's probably implemented using the lua event EveryOneMinute or something

grave lynx
#

do i have to learn lua for this?

#

im asking the cahnnel

#

if i need to learn lua to create mods

raw tulip
#

depends on what mod you are making

grave lynx
#

hm

#

is there by chance some sort of framework for another language?

raw tulip
#

yes: you should have some understanding on how file structures work, or how files associate with other files

#

no: some mods do not require coding experience, such as models, sounds and textures

grave lynx
#

well my problem isnt the programming expoeriuence

#

just wondering if i can do it in a different programming language

raw tulip
#

im not a programmer so i cannot answer your question about lua, sorry

grave lynx
#

damn

raw tulip
#

just java stuff right?

grave lynx
#

theres like no framework for it or anything that'd allow you to use a different language?

grave lynx
#

damn

#

guess i gotta learn lua

quasi geode
#

eh if you've got experience in any other language then lua is simple to learn. the language is really basic without a lot of keywords or builtins

bright acorn
weary matrix
#

<@&671452400221159444> spam link up there

grave lynx
quasi geode
#

not even close to python

grave lynx
#

lmfao

weary matrix
#

Nothing to do with python really

bright acorn
grave lynx
#

i never rlly did too much with either

#

although lua might be useful to pick up

#

any good guides, or can ilearn enough of it from the modding guide

weary matrix
#

@grave lynx there's a descent guide from @quasi geode himself πŸ˜‹

quasi geode
#

ya thats not really a lua introduction guide though (its still missing that section) XD

#

more of the specifics of lua pertaining to the pz engine

weary matrix
#

Ah true, sorry for throwing you under the bus then πŸ˜‚

quasi geode
#

haha

quasi geode
#

i actually cant recommend any basic lua guides specifically. I learned it mostly by reading the official manual. but i'm sure google can throw out dozens of various guides

bright acorn
# languid nimbus Thanks man, I'll try it

In this version I'm bringing in one of the existing tracks in the game and creating a new AnimSet with it, but the AnimSet will also work if you point it to a new animation track (I've been using true actions: dancing to test it)

weary matrix
quasi geode
#

ah well i had some practice at the time reading language specs in EBNF format πŸ˜…

#

also, had just come down off a 10 year long perl binge 😐

vernal berry
#

Has anyone used AutoTsar mods? We just aren't seeing any jeeps or busses.

drifting ore
#

been busy modding forgot to mod and play

weary matrix
eternal grove
#

Does anyone know if Map Packs (like AIZ Enhanced, etc) are a problem in terms of author permissions? or if they are likely to get removed? i know that repacks/compilations of other mods are usually not ok, but many of these map packs seem to get a lot of support, so im not sure if they are the same.

drifting ore
#

Steam TOS is very touchy

#

Iirc for the most part any uploads to steam have creative commons 3 applied

#

But I think its generally a good idea to ask

eternal grove
#

yeah, but that's why im wondering how AIZ enhanced 2 has been around since 2017 and still hasn't been removed. Maybe it does have the permissions, but i can't find them on the workshop page.

#

I'm just wondering theres's something unique to maps that im unaware of

carmine flume
#

I'm trying to figure out how the population multiplier, population start multiplier, and population end multiplier affect one another. Do they compound somehow or do they to some degree overwrite each other? I'm trying to do some stuff using zombie population, and I don't really know where to find info about this

carmine flume
#

Man, it would be so helpful to have access not just to public methods on java classes but also public fields. It would actually massively multiply the possibilities.

#

If I had a wishlist for modding features it would essentially just be this:

  1. allow reading and writing public fields of exposed classes from lua
  2. expose all classes unless there's a really good reason not to
  3. allow monkey patching of java methods from lua.
verbal ivy
#

Hi, is it possible to change the item icon ingame via lua? I played around the Texture Calss but no avail, I want to make the icon dynamic change during some process. Can it be done at current modding possibility?

vivid flare
#

are items in containers created on cell load or when someone tries to access the container?

zealous wing
#

Cell load.

#

I think?

#

Been a minute since I looked at that stuff.

hexed arch
#

Has anyone been able to add custom attachments to vanillas SmallBeltLeft & SmallBeltRight in ISHotbarAttachDefinitions?

#

I feel like I should be accessing the table and appending an item to attachments but I'm not sure how to do that in lua.

cold burrow
verbal ivy
golden blade
#

Has anyone here tried adding a new vehicle mod to a multiplayer server after having the server run for a couple of months and succesfully found the new vehicles in an unexplored cell?

#

someone told me they would spawn if you venture to an unexplored cell, but i have yet to see it

eternal stirrup
#

hey, how about the blood overlay? How do you set it up?

pearl prism
tropic olive
#

Can anyone tell me, if i want for example multiple boxes of 9mm ammo to spawn in zombies, the "for i =" cycle can do the same result as the "rolls =" in the loot generating code?

dim pawn
#

is there a mod that keeps the cars hood open? Constantly having to open it again, and again, and again when doing repairs is rather annoying

devout rock
#

Solved.
Had to rearrange the code around in different order and that fixed the issue. 😌

shut zinc
#

How are you testing your mods in multiplayer? Is there an easy way to launch multiple instances of the game?

dreamy silo
#

Im looking for a tutorial about how to make a custom container...

#

any tips?

drifting ore
#

Does anyone know of a mod that uses global mod data?

#

Because we agree that I can't use getModData() on another isoplayer? I will just get a nil right ?

weary matrix
drifting ore
weary matrix
dreamy silo
#

where can I see how a wooden crate is created ?

#

cant find it in recipes

drifting ore
weary matrix
drifting ore
weary matrix
#

I did πŸ˜…

drifting ore
#

Look at my profile picture, you will understand that memory is not my thing πŸ˜†

weary matrix
#

if you don't want to rely on Steam you could use the player username I guess

#

as a key

drifting ore
weary matrix
#

ah so you remember now? πŸ˜‚

drifting ore
#

Maybe I did something wrong

weary matrix
#

not sure it's working from one player to another, but at least it is sent to server and dispatched back to client

drifting ore
#

Yes, you have to refresh my memory but once done, I have a pretty good memory ^^

drifting ore
weary matrix
drifting ore
#

I remember that was the problem with your example. It's client to server transfer and not client to server then to another client

weary matrix
#

@thin hornet maybe you know about this? How to access mod data from different players, with the info shared between all clients?

hidden junco
#

I'm trying to add fuel to a campfire via lua code, but the heatSource:addFuel(fuelAmt) method I found on other mods does not seem to work anymore.
Anyone has an idea on how I can do this? Or some other mod that may have this answer?

hollow jewel
#

it's possible to hot reload mod in game

#

?

weary matrix
weary matrix
hollow jewel
weary matrix
hollow jewel
#

ah okk

#

thank u

weary matrix
#

but I agree it is so annoying

drifting ore
hidden junco
#

This generator is an IsoObject?

weary matrix
drifting ore
#

O so, ISAddFuel.lua is only for generator ? Mb

hidden junco
#

I found a addFuel method on ISCampingMenu.lua but it needs a player to be present. My idea is something that would not involve a player action, but rather happen via script.

drifting ore
#

O I see, it's use a character. No idea, I think you can't

hidden junco
#

It's fine if it has to take one character action to make it happen, then. I will try this code. You found it on ISAddFuelAction , right?

drifting ore
#

Yes

weary matrix
hollow jewel
#

guys i don't find the granade item in media of game, anyone know where is it? i want to make a custom bomb

hidden junco
#

I'm trying to recreate the BetterRefueling mod and add a few features to it. It seems not to work anymore since 2019.

The idea is that you dump all the fuel on the campfire container and then convert it to fuel in a single action.
But it used a heatSource:addFuel() method that seems to no longer exist. I'm trying to find a way to make it work again.

umbral stump
#

any suggestions for good firearms mods in the workshop?

hollow jewel
#

i find only molotov

verbal ivy
#

Is the world sound falloff in this game hardcoded? I try to add an big explosion sound with getSoundManager():PlayWorldSound(), but no matter how I adjust the vars, the sound it play always fall off at 10~15 tiles. can't hear it at all at 15+ tiles distance. Is there anyway to work around this?

tropic olive
hidden junco
# drifting ore ```lua local cf = campfire local args = { x = cf.x, y = cf.y, z = cf.z, fuelAmt ...

The sendCommand seems to be failing on a "assertValid" function, but I can't find where it is.

Stack trace below

ERROR: General     , 1642950135150> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException:  at MethodArguments.assertValid line:123.
ERROR: General     , 1642950135150> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: 
    at se.krka.kahlua.integration.expose.MethodArguments.assertValid(MethodArguments.java:123)
    at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:186)
    at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
    at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
    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.onMouseUp(UIElement.java:1228)
    at zombie.ui.UIManager.update(UIManager.java:808)
    at zombie.GameWindow.logic(GameWindow.java:253)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:745)
    at zombie.GameWindow.run_ez(GameWindow.java:661)
    at zombie.GameWindow.mainThread(GameWindow.java:475)
    at java.base/java.lang.Thread.run(Unknown Source)
LOG  : General     , 1642950135151> -----------------------------------------
STACK TRACE
-----------------------------------------
Callframe at: sendCommand
function: sendCommand -- file: CGlobalObjectSystem.lua line # 110
function: addFuelCallback -- file: configureFireplaceAction.lua line # 53
function: onMouseUp -- file: ISContextMenu.lua line # 90
verbal ivy
#

The only thing I can think of is making the sound 2d, but that lose the 3d effect, and other players in MP won't be able to hear it, really a big problem here.

umbral stump
tropic olive
#

yep

weary matrix
#

@tropic olive @umbral stump this channel is about developing mods, please go to #mod_support for this kind of discussion

umbral stump
#

Apologies! New to using the server; just lurked until recently.

weary matrix
#

no worries

weary matrix
tropic olive
#

i have a question tho, is there a list somewhere about the specific zombie types in the game what can have different loot tables from the other zombies like the "Outfit_Police"?

weary matrix
tacit tusk
#

Hello all.. is this the place to talk to modder about ideas etc>?

weary matrix
#

@teal slate found another gem for your little collection! πŸ˜„

    public static void setLanguage(Language language) {
        if (language == null) {
            language = getDefaultLanguage();
        }

        language = language;
    }
hollow jewel
#

guys i have a problem

#

i can't find the item of bomb in the media of the game

#

anyone know the file name?

verbal ivy
weary matrix
hollow jewel
#

thank u so much

low yarrow
hidden junco
weary matrix
#

hum someone asked about getting the current language, but I can't find the question anymore. So if that person is reading, he could try: Translator.getLanguage()

#

@verbal ivy most of those methods seem to take a radius parameter, not sure about the unit you have to use though

teal slate
weary matrix
#

@tacit tusk unless you plan on implementing it yourself I'd say no πŸ˜…

teal slate
#

one thing modders tend not to have a shortage of is ideas

#

and if they do they'll ask

verbal ivy
weary matrix
weary matrix
hollow jewel
#

for example if i want to add damage to zombie with a pipe bomb, how can i do that?

verbal ivy
# weary matrix which variation of the function have you tried?

well, all of then in the javadoc:
PlayWorldSound​(soundname, boolean, square, float, float, float, boolean); PlayWorldSound​(soundname, square, float, float, float, boolean); PlayWorldSound​(soundname, boolean, square, float, float, float, int, boolean); PlayWorldSoundImpl​(soundname, boolean, x, y, z, float, float, float, boolean)

#

I tried set all the float and int to 500 or 0, they all sound the same. Full volume, fall off after 15 tiles.

weary matrix
#

@teal slate actually you might be right, it's a static field so maybe:

    Code:
       0: aload_0
       1: ifnonnull     8
       4: invokestatic  #247                // Method getDefaultLanguage:()Lzombie/core/Language;
       7: astore_0
       8: aload_0
       9: putstatic     #7                  // Field language:Lzombie/core/Language;
      12: return
#

I'm not quite fluent with java bytecode though so I'm not sure

hollow jewel
#

    item Bomba artigianale
    {
        DisplayCategory = Devices,
        MaxRange    =    10,
        Type    =    Weapon,
        MinimumSwingTime    =    1.5,
        SwingAnim    =    Throw,
        WeaponSprite = Molotov,
        UseSelf    =    TRUE,
        DisplayName    =    Bomba Carta,
        SwingTime    =    1.5,
        SwingAmountBeforeImpact    =    0.1,
        PhysicsObject    =    PipeBomb,
        MinDamage    =    50000,
        Weight    =    1.5,
        MaxDamage    =    50000,
        MaxHitCount    =    50,
        Icon    =    PipeBomb,
        ExplosionPower  =   0,
        ExplosionRange  =   50,
        ExplosionSound = PipeBombExplode,
        SwingSound = PipeBombThrow,
        PlacedSprite = constructedobjects_01_32,
        Tooltip = Tooltip_Trap,
        WorldStaticModel = PipeBomb,
    }
#

with this settings the bomb give damage to me

#

but no to the zombie

#

anyone can help me?

wide harbor
#

looking to start modding, never really done it before. I've come up with a (hopefully) fairly simple QoL mod I want to work on (a box to tick that makes the chatbox pop back up if someone sends a message in it) but I have no idea where to start. any suggestions?

weary matrix
# verbal ivy well, all of then in the javadoc: `PlayWorldSound​(soundname, boolean, square, f...

I guess you're right about the method being broken, they all come down to calling this:

    public Audio PlayWorldSoundImpl(String string, boolean boolean1, int int1, int int2, int int3, float float1, float float2, float float3, boolean boolean2) {
        BaseSoundEmitter baseSoundEmitter = IsoWorld.instance.getFreeEmitter((float)int1 + 0.5F, (float)int2 + 0.5F, (float)int3);
        baseSoundEmitter.playSoundImpl(string, (IsoObject)null);
        return new FMODAudio(baseSoundEmitter);
    }
``` which looks like it's completely ignoring the float parameters
#

@teal slate another gem? πŸ˜„

verbal ivy
weary matrix
#

and yes indeed, it is a big pile of spaghetti code

verbal ivy
drifting ore
#

For you, what is the important information of an equipment set? I have:

  • Bite and scratch resistance for each limb.
  • Combat and running speeds modifier.
  • Total insulation and mass.
#

But you think of something else? I see nothing else personally

tacit tusk
weary matrix
#

like denim, leather etc

#

also whether it can be repaired or not I guess

hidden junco
#

Is there a way to get the contents of the corpse container when it is already inside a container?

I have a corpse item inside a campfire container.
When I run corpse:getContainer() , it returns me the campfire, instead of - say - the clothes the corpse is wearing.

I'm not finding another method to refer to what the corpse has inside it.

weary matrix
weary matrix
hidden junco
hidden junco
#

Is there a way to type things into the lua console on the F11 screen?
Like items:size() without having to go all the way back to a lua file, closing and opening the game again?

I couldn't find a way to use the "Watch Window" too. All tutorials on the forum or youtube did not help.

cold burrow
cursive solstice
#

Hello, can someone help me pls, can I enable mods in existing world in mp? Will it crash or smth

hidden junco
cursive solstice
#

oh sry, ty ❀️

weary matrix
hidden junco
#

How could I get references to the world items this way?
For instance, how to refer to a specific zombie item inside my campfire container? πŸ€”

weary matrix
#

oh right

hidden junco
#

I was thinking something like the Google Chrome console, where I could mess with my own lua script while running

drifting ore
shut valley
#

and N/A if you are not wearing anything there

opal wind
#

few people like me have the guts to say the truth; PZ multiplayer is far from being ready/stable, there i said it, its my opinion and period.

#

πŸ™‚

opal wind
#

i cant complain much thou since i was never able to make my mincraft mod to work 100% on servers too lmao

vocal stump
opal wind
#

all this on MP?

vocal stump
#

Yep

opal wind
#

yeah teleporting cars i saw myself, its a major bug

#

i cant even make my no-mod server to work fine

vocal stump
opal wind
#

so its not a mod thing, this MP feature was released in a rush, because the game was having a selling booster

vocal stump
#

What's the issue with hosting a server on your side?

drifting ore
#

Is there a way to remove default map from my server?

opal wind
#

did you play MP build 40? i wonder if it was this broken too, i never tried

opal wind
vocal stump
opal wind
#

same here i dont know what is the problem

vocal stump
#

Also got small dedicated server, no issues there. Why don't you get a dedicated server to host for you? It might be your PC compatibility with PZ.

drifting ore
opal wind
#

modding is fun πŸ˜›

muted lynx
#

Do we have a coder that might wanna help a bit on a mod? PM me for info, it's a fairly simple mod already out on the workshop, obviously you'll be added as a collaborator! πŸ™‚

drifting ore
muted lynx
#

Ok, you're right, sounds sketchy. Basically, my mod is called "Pee In A Bottle", it's dumb, silly but simple. It's meant to help you walk those extra miles when you're desperat for water, so you pee in a empty bottle, drink, gain a bit hydration (not much) and a bit of unhappiness. So far I am up to 230 downloads on the workshop. The thing is, I am very bad at LUA, and my script mostly contains a icon, and a .txt file with like 7 lines of "code" but it does the trick and the mod is working fine.

I wanna add a trait in the game that makes you be able to drink the pee without getting unhappiness, this will be called: "Happy pee drinker", and I wanna add a limit to how much you can pee in a hour, or so. If that is possible and not to much to ask for, it would be nice for some help. I'll send the core files over, you do the magic. I cannot pay anyone unfourtnalley, so if no one wants to help its fine.

opal wind
#

LOL

#

pee in a bottle πŸ˜„

#

ahahaa its def funny man i give u that πŸ˜„

drifting ore
#

Is there a way to remove default spawnpoints from my server?

muted lynx
#

It's a simple mod, and I am just hella confused it didnt exist on the workshop before.

drifting ore
muted lynx
#

It would be awesome, I used to do LUA modding for FiveM a while back as a hobby, but I was super basic on that stuff really.

drifting ore
drifting ore
muted lynx
#

Yhe, I'll probabally hit you up for some help later, I am just going to quickly add a pee filtration system to make safe pee.

drifting ore
#

I know LuaU but no idea how different that is from the Lua in PZ

drifting ore
muted lynx
#

Alright!

opal wind
#

yeah ask the stuff here we will help as we see/can

muted lynx
#

Sub to it now! It's out πŸ˜„

crisp fable
low yarrow
#

Oh i read only half way and got hyped.
Yes i sub it now πŸ˜„

cyan fiber
#

any addons that reduce the sound made by lightswitches at night?

muted lynx
#

@low yarrow I need to update it quickly tho, my latest update accidentally removed the script files for some reason 😠

#

done

winter bolt
drifting ore
#

RCON: password doesn't match
RCON: connection closed Socket

#

could someone help me?

deep belfry
#

Wrong rcon password

drifting ore
deep belfry
drifting ore
#

I want to get into modding

#

whats a good resource for starting out

stark flame
#

after installing autotsar trailers and removing it, I have some impossible to move cars on the street, can't be drag with another car, any way to fix it?

hollow jewel
#

guys i want to start make a mod with a little bit of lua any suggestion for start?

hollow jewel
#

i know how to add item and recipe but i don't have idea of implementing lua

hollow jewel
thin hornet
#

Anyway of spawn IsoObject on a Z index that has no square yet

#

getGridSquare not working since it doesnt find a floor tile i guess

edit
need to create the square

local theSquare = getCell():getGridSquare(x, y, z);
    if not theSquare then
        theSquare = IsoGridSquare.new(getCell(), nil, x, y, z);
        getCell():ConnectNewSquare(theSquare, false);
    end
drifting ore
#

Is there a quick way to make the offset correct? as it is becoming a headache

#

its suppose to be like a hammer but its a bong

drifting ore
hollow jewel
drifting ore
#

Sure, ask. Don't ask to ask

hollow jewel
#

it would be nice if as a thing to do I added a step by step guide to create the first script in lua in a guided way, do you think it is possible?

#

because i have readed the coding part, but i have no idea how to get started

drifting ore
hollow jewel
#

i mean for example

drifting ore
hollow jewel
#

create custom actions, such as creating a lighter that with a right click on the table sets it on fire

hollow jewel
drifting ore
#

Do what seems useful to you, just avoid redoing something already done as much as possible, but otherwise any documentation is welcome

#

But for me, the best examples are other mods

hollow jewel
#

the problem is that I don't understand how to practically create a lua script and implement it

drifting ore
#

If you just put a .lua file in media/lua/client. It will be use on the client side

#

Client side is like the game on your computer, it's usely what you use

hollow jewel
#

for example, i want to create a mod with real scream when press q to actract zombies

#

but i don't know how to do that

#

or any mod for getting stared

drifting ore
#

The beginning is always complicated. You have to look for the simplest. Like how to use the keyboard

#

After how to scream

#

ect

#

baby step

#

after you will run

hollow jewel
#

like create a mod that when I press g prints something in the console?

drifting ore
#

Like if you research in this channel keyboard, you find this. It's look like a nice place to start. #mod_development message

hollow jewel
#

thank you, so now I try but I already know it will turn out badly 🀣

light shadow
#

hello, i am new to modding, how can i make a simple new clothing item that is a reskin?

#

i didnt find any good guides so i am asking here

drifting ore
drifting ore
#

I don't think there is a guide to explain it but it simple

light shadow
#

also, are there any files with thew in game clothing models? i just wanna make a reskin, not a clothing item from scratch

light shadow
#

thx

drifting ore
real solar
#

Hi everyone! πŸ™‚
Could someone please tell me what scripting language are the .txt files (located in media\scripts folder) written in?

hollow jewel
#

in the documentation of FWolfe the link is broken

#

i need all the action for the event getPLayer()

muted lynx
#

Alright fine people, anyone know if I'd be able to add a "sweating" mood onto my character upon consumption of a beverge?

    {
        DisplayCategory         = Food,
        HungerChange            =    0,
        Weight                  =    0.3,
        AlwaysWelcomeGift        =    TRUE,
        Type                    =    Food,
        UnhappyChange            =    +30,
        ThirstChange            =    -20,
        DisplayName             =    Unfiltered Pee in a bottle,
        Icon                    =    PeeInBottle,
        CustomContextMenu       = Drink,
        CustomEatSound          = robloxdrinking,
        Carbohydrates           = 39,
        ReplaceOnUse            = WaterBottleEmpty,
        Proteins                = 0,
        Lipids                  = 0,
        Calories                = 100,
        Packaged                = TRUE,
        CantBeFrozen            = TRUE,
        StaticModel             = PopCanDiet,
        EatType                 = popcan,
        WorldStaticModel        = PopCanDiet,
    }```
#

Don't mind the "robloxdrinking" sound alright.

sour island
#

@worldly olive and anyone else interested in xpMaps:

bonusProfessionLevels: 
- Fire Officer
-- Strength : 1
-- Fitness : 1
-- Sprinting : 1
-- Axe : 1
bonusTraitLevels:
- Out of Shape, Strong, 
-- Fitness : -2
-- Strength : 4
bonusDescLevels:
-- Strength : 3
-- Fitness : 2
-- Sprinting : 1
-- Axe : 1

bonusProfessionLevels:

  • Unemployed
    bonusTraitLevels:

bonusDescLevels:
-- Strength : 3
-- Fitness : 3

bonusProfessionLevels: 
- Unemployed
bonusTraitLevels:
- Strong, Unfit, 
-- Strength : 4
-- Fitness : -4
bonusDescLevels:
-- Strength : 3
-- Fitness : 1
```
#

So these are the xpMaps for different characters...

#

The way fitness and strength behave is kind of weird.

#

Default is 3/3 not 5/5 for some reason?

#

The 5/5 is set after the fact.

#

Desc seems to be a blend of the two - which makes sense.

hollow jewel
#

i can't find in the documentation

sour island
#

it's under IsoPlayer / IsoGameCharacter

hollow jewel
#

thank u so mucyh

pearl prism
#

How do you guys use Javadoc to mod in LUA?

muted lynx
#

Anyone know how to add a WorldStaticModel to my item?

sour island
#

Ah interesting - taking firefighter shifts unfit into out of shape... neat.

#

So I can't track the -4 needed for recovery journal cause it's a -2 after the fact hm...

hollow jewel
#

public void Bitten()

#

i cant't understand what do this function

#

is a void so not accept a value in a function

#

getPlayer():Bitten() i have tried this but give me stack error

drifting ore
hollow jewel
#

ah ok, slowly i'm starting to undestand

sour island
#

Idk if this info helps lol

weary matrix
drifting ore
hollow jewel
#

can you give me a example of usage?

weary matrix
#

the parent class is Object

drifting ore
#

Ok, I must not understand the term subclass xD

weary matrix
drifting ore
#

So what does zombie.characters. mean ?

strong plover
#

Hello, here ! I'm new to mod making, please bear with me.
I'm looking to create a mod that would change the speed of zombies when impacted by a light source. Ideas on how to do it ?

weary matrix
#

a package is nothing more than a collection of classes that makes sense to put together from a human perspective, also adds some specific permissions to access some fields etc but that's it

drifting ore
drifting ore
weary matrix
strong plover
muted lynx
#

I managed to add a trait in my mod called "Happy Pee Drinker" It's supposed to make you immune to the unhappiness effect you get from drinking a pee bottle, how would I execute that πŸ™‚

drifting ore
# strong plover I know how to change a zombie's speed. What I don't know is how to do it dependi...
molten basin
#

Is there a way to get what building/safehouse u are standing on ? I got the isocell from player. but the building list is empty

#

Ie toy example:

local player = getSpecificPlayer(0);
local cell = player:getCell();
local buildings = cell:getBuildingList();
returns an empty list
strong plover
weary matrix
weary matrix
molten basin
quasi geode
#

getSpecificPlayer(0):getCurrentSquare():getBuilding()

weary matrix
#

oh yeah totally forgot about the building part, but what @quasi geode suggested is what I would have said too

drifting ore
#

Someone know how to use self.character:reportEvent("EventWearClothing") ? Like add code to this event ?

muted lynx
#

@drifting ore u prank me

drifting ore
#

I miss clicked πŸ˜‰

muted lynx
#

πŸ˜„

hollow jewel
#

My first lua script 🀣

muted lynx
#

Does anyone have a PZ Lua Reference list or anything? Or even a link to any libraries extensions for Visual Code or something.

hollow jewel
#

guys when the game is paused for stack error, how can i resume?

#

because i stop and reopen the game every time

molten basin
#

f11

drifting ore
#

I ran into a weird problem, ISScrollingListBox can't recognize if the box to display is in the listBox or in another one. Making it impossible to stack listBoxes. Example:

near sail
#

Yo

#

Mod idea:

#

Add a winning condition for the game. It can be as something as complex as constructing a boat and getting the fuck out of dodge or adding a decomposition effect by which after a year (or however long ya want) all zombies begin to die of natural decomposition

grizzled grove
drifting ore
grizzled grove
#

it's how i would separate things in Qt at least, by using a new parent layout for the sub elements (if i really needed to, that is).

drifting ore
#

Do you think that solves the problem?

grizzled grove
prime patio
#

Is brita's broken

drifting ore
#

Hi there, so I’m looking to get into Project Zomboid modding, specifically making the mods, any good videos or forums to look at?

prime patio
#

Brita's is still broken

opal wind
#

hey guys iΒ΄ve been setting custom condition for my weapons and i notice they break after a load, im setting like this:

#

ConditionMax = 200,
ConditionLowerChanceOneIn = 15,

#

maybe there is a max value for ConditionMax or something?

#

happens on meele weapons and firearms

spiral stream
#

Hi everyone

How can I get ModOptions to work in a multiplayer server? I'm trying to use Brita's Weapon Mod, but I'm not able to see the options while in game

old blade
#

pet hamster mod

#

hey dont click that link above its a scam

hollow shadow
#

Ye

old blade
#

discord doesnt send links its all intergrated within the app so if someone gifts you itll just pop up natively in the app

hollow shadow
#

I already pinged a mod but it’s been 5 mins…

old blade
#

imagine being such a loser that u go into a discord and do nothing but try and scam people

rocky cobalt
#

can anyone help me figure out a can of soup? πŸ˜„

#

I'm new, hello, and just wanted to start off small and create a can of soup that gave -100 thirst and hunger. I've been able to create the items but when I go to use them in game, I'm not prompted to use the can opener and I can't use a pot to cook it. Bowls don't work either.

#

so I'm thinking there's a recipe component I'm missing?

#

but the mod that I modelled mine after didn't have anything about recipies in it

#

and it was a simple "roll and unroll a sleeping bag" so I assume it had some sort of mechanism that did the transformation

#

Here's my snippet:

devout rock
#

I have a UI panel with drawTexture and drawText elements in it, all are attached to the panel window. When I hide the UI panel with a press of a button, the panel itself and the icons become hidden as intended, but the text remains visible. Anyone have any idea why that might be happening?

drifting ore
wispy oak
#

people, but an accomplished mod so that not only those who are registered in membership, but belong to their affiliation, can enter the shelter. Or is there already such a mod? )

drifting ore
drifting ore
devout rock
drifting ore
devout rock
paper tartan
#

hey guys, how hard would it be to make those louisville barbed fences pickupable?

drifting ore
drifting ore
paper tartan
#

ahh

#

what about a mod that makes them craftable?

#

using same tile tho

drifting ore
#

Honestly I don't know, I didn't do this side of modding

mint sphinx
paper tartan
#

and of course, its optional for everyone, hence why a mod...

#

More Builds mod has it in but that mod is broken, half of stuff cant be placed/ working

mint sphinx
#

also most of the building mods break some core fuctions becuase the dont do it right like more building the admin / debug menu is broken for test building stuff. which mean he didnt do a real hook in but just spaghetti code it..

paper tartan
#

either way i jus twanna deleted that mod hence why i asked how hard would be to get the buildable fence mod

devout rock
#

@drifting ore I'm trying to solve the issue like you suggested but I've been unsuccessful so far.
Even ignoring the fact that I can't figure out how to hide\show a panel from a single button using the UI Manager functions, even when I use those functions just to disable the UI the text still remains on screen.

drifting ore
umbral grove
#

does britas weapon pack work for multiplayer?

devout rock
umbral grove
#

yeah found out i just had a conflicting mod

#

on my mp server

#

think i got it figurer out now

tropic olive
#

Hello! I wanted to make a small mod for myself to add some loot to zombies. Can anyone check the code that is alright? It seems working but i just want to make sure, i dont really know what im doing yet πŸ˜„ Also a question: what the "rolls = " line are doing in the code exactly? How can i achieve that some items can have multiple drops than a single one? For example if i want ammo to randomly spawn between 1-4 amount of boxes in bodies?

umbral grove
#

One more question

mint sphinx
umbral grove
#

is there a place I can get the item ID's for the items that are added from Brita's weapon pack?

#

so if I want to add them to a starting character

tropic olive
mint sphinx
#

Have really tried to do drop on zobies before also hard to tell if the drop rate it high or low.

tropic olive
#

and my other questions are still up

mint sphinx
tropic olive
#

is it better with insert.table?

mint sphinx
#

With insert table you do so you don't mistakenly outdate vanilla drop table from zombies

#

To be honest have red the code closely because on a mobile screen atm

tropic olive
#

ah... okay

#

i will rewrite it with insert.table then

paper tartan
mint sphinx
devout rock
devout rock
hidden estuary
#

I'm once again asking if anyone happens to know if Distribution values are based on percentage

#
table.insert(ProceduralDistributions["list"]["WardrobeChild"].items, 0.03);```
#

would this count as 3%? is it based on 1 = 100

mint sphinx
mint sphinx
hidden estuary
#

so the game just rolls the dice on whether or not it should contain an item?

mint sphinx
#

and then the container some time have x amount of rolls and how many items is maximum can have / minium

hidden estuary
#

oki, ty

tropic olive
#

like this:
for i = 1, 4, 1 do
table.insert(SuburbsDistributions["all"]["inventorymale"].items, "Base.DuctTape");
table.insert(SuburbsDistributions["all"]["inventorymale"].items, 0.5);
end

will try to spawn 4 times?

#

i mean this way i can have 1-4 duct tapes randomly in the loot every time

mint sphinx
vivid flare
mint sphinx
#

so it do make it like append to lest when insert and not like a hashval thx lexx then i dont have to read on documentaions ^^

muted lynx
#

Can I call items from my item.txt file in a lua event?
I am trying to make so when you have a specific trait, you wont gain any unhappiness from drinking.
(I've made a pee mod where u drink pee and as of now u gain unhappiness)

tropic olive
vivid flare
#

no clue :>

mint sphinx
tropic olive
#

i mean between 1-4 randomly

mint sphinx
#

1-4 randomly drop form the whole table?

#

or only within the duct tape ?

tropic olive
#

im curious about both methods πŸ˜„

mint sphinx
#

if it for the whole table you can see the table have a roll

#

that roll = 1 on a zomboi on the first script you uplaoded here tells the game roll onces on this table when they zombie die

#

if you change that to 4 it will roll 4 times to see if it drops anything

#

that a table roll

tropic olive
#

so the rolls parameter decides how many times the drops can happen in the same body

mint sphinx
#

from the whole loot table yes

tropic olive
#

and what about a single item?

#

like the duct tape?

mint sphinx
#

there might be 2 ways to do it ^^
but one way "the easy for non modder" might be add a new items which consume .25 on usages there give you a duct tape. and then have the table to have either 0.25,0.50...... contention when found and the other way im not quite sure yet let me see for 2 min

tropic olive
#

sure, take your time πŸ˜„ Thanks for giving me direction

muted lynx
#

Anyone got a link to button map list? Trying to add buttons in my code, but got no clue which number is what button.

mint sphinx
#

achii value i think the game runing in

drifting ore
#

I have a texture using tex = getTexture("media/ui/MoreTab/line_100x2.png")
Is there a function to resize the texture like that ? text = resizeTexture(tex, w, h)

mint sphinx
#

also have you tried to see if you can do "KEY_J" ? else i know it somewhere in here ^^

hidden estuary
#

yeah distributions work weird... did a 100% chance on an item but there were still times where it didn't roll the item at all, its gonna be weird to balance if 100% isnt 100%

mint sphinx
#

i take it you know abit more about which mapping they using πŸ™‚

hidden estuary
#

but hey, he's heere

#

the child has spawned

languid nimbus
#

Anyone knows what software people use to create .fbx animations? I've tried many but just result in error or bugged animations

#

I can't make it work but it's been funny

mint sphinx
#

but i guess blender

languid nimbus
languid nimbus
#

ok ok

muted lynx
#

So I found a list of different events, OnKeyPressed, etc. And I found that GlobalObject() list, for example getPlayer(), etc.
But I wanna know all different functions I could use, for example:
I found a tutorial on how to make text appear over your characters head using a keypress.
But the :Say("Whatever!") you put behind getPlayer() would never be obvious unless I saw that little tutorial. Is there a list of those certain commands/variables?

dawn shuttle
muted lynx
#

I tested this same function with just prompting a text above head saying test.
But I can't get it to spawn a specific item in a dead zombies inventory, am I doing it wrong?

    if (ZombRand(3) == 0) then
        zombie:getInventory():AddItem("PeeFilter")
    end
end
Events.OnZombieDead.Add(ZombKilled);```
#

Fixed my own problem! It was supposed to be Base.PeeFilter

umbral grove
#

Anyone know where I can find the list of item ID's for all of the guns added by Brita's weapon pack?

drifting ore
#

mods are from workshop

hollow shadow
wheat tendon
#

Is there a stable mod for silencers/suppressors ? Silencer/suppressor mod doesnt seem to work (tho it may bcoz theres another silencer mod which im not aware)

muted lynx
#

I am looking for the lua script for traits, trying to see how the Smoker trait code works in actually minimizing stress when consumed, trying to add that to my own mod.

safe sinew
#

Is it possible to mod in enormous, many-feet long muzzle flashes?

#

Or are we currently stuck with the tiny baby flashes?

alpine night
#

Anything is possible

muted lynx
#

Ok Imma leave it here then, I need help with a code that works like this.
(Currently you gain unhappiness from drinking pee in a bottle that I have added.)
With trait "Happy pee drinker" > Drinks pee > Gains no unhappiness

The trait is already in but got no function.

real solar
#

Hi! I'm new to PZ modding, trying to figure out how things work!
Could someone please give me some info about the contents of the .txt files that are located in media\scripts folder? At first, I thought it was lua code, but it doesn't seem like it..
I need it so I can set the appropriate code highlighting in vs code.

safe sinew
late hound
broken kayak
#

Hi everyone, small question about the .xml files in generals. (fileguidtable.xml, clothing.xml etc...)
I have seen both mods that entirely redo the fileguidtable.xml or the clothing.xml files and others that just create one with only the stuff added by the mod inside.
As the console.txt file states that mods overrides theses files, I'm a bit lost.
Can I get away with creating a fileguidtable.xml containing only my custom content or is this going to override the WHOLE GUID table ?

wild oasis
#

workshop mod to show how much gas is remaining at a pump?

wheat tendon
#

If there’s more than one different silencer/suppressor, will it break all gun sounds ? I got firearms b41 n More attachments

real solar
# late hound Its all scripts that contain reference tags that are defined in lua.

Thank you for your reply! Oh, you mean they are defined in the .lua files?
e.g. items.txt contains the attributes of each item that is defined in Distibutions.lua linked lists, have I got it right?
But what data structure type is each item reference in items.txt?
e.g.
item BeerEmpty { DisplayCategory = WaterContainer, Weight = 0.1, CanStoreWater = TRUE, Type = Normal, DisplayName = Empty Bottle, ReplaceOnUseOn = WaterSource-BeerWaterFull, Icon = Wine2Empty, StaticModel = BeerBottle, WorldStaticModel = BeerBottle, }
There is no = sign, so item BeerEmpty {} is not an array or a list. It looks like JSON but it isn't either. πŸ˜• I'm sorry for the long post, but I'm trying to understand...

tough surge
#

any good mods for increased storage space in wooden crates? cant seem to find one

little vessel
#

Kinda stuck with this, so any help is appreciated. Trying to finish my own addon to Better Lockpicking so people can disarm house alarms and I'm having trouble associating the "found alarm" with a given building.

The code giving me problems is:

require "Lockpicking/Actions/CheckAlarmBuildingAction"

function CheckAlarmBuildingAction:perform()
    local def = self.building:getBuilding():getDef()
    
    ISBaseTimedAction.perform(self);
    
    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"))
            
            local rooms = def:getRooms()
            for i = 0, rooms:size()-1 do
                local room = rooms:get(i)
                if room ~= nil then
                    local isoRoom = room:getIsoRoom()
                    local squares = isoRoom:getSquares()
                    for j = 0, squares:size()-1 do
                        local square = squares:get(j)
                        if square ~= nil then
                            square:getModData().HasAlarm = true
                        end
                    end
                end
            end
            
        else
            self.character:Say(getText("UI_is_no_alarm"))
        (...)
            
        end
    end

end

Specifically the fourth line, "local def = self.building:getBuilding():getDef()" throws a "ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: attempted index: getBuilding of non-table: null at KahluaThread.tableget"

#

The thing is, a very similar code is used successfully to mark an alarm as attempted and failed to disarm:

function ISDisarmAlarm:perform()

    local difference = math.abs(ZombRand(100) - self.baseChance)
    local inv = self.character:getInventory()
    local def = self.building:getBuilding():getDef()

    -- needed to remove from queue / start next.
    ISBaseTimedAction.perform(self);
    --- Critical Failure
    if  difference <= 20 then
        def:setAlarmed(false)
        
        self.character:Say("Oh god... I think I triggered the alarm")
        
        -- add a sound to the list so zombie/npc can hear it
        local soundRadius = 500
        local volume = 300

        -- Use the emitter because it emits sound in the world (zombies can hear)
        self.gameSound = self.character:getEmitter():playSound("burglar2");
            
        addSound(self.character, self.character:getX(), self.character:getY(), self.character:getZ(), soundRadius, volume)
        
        local rooms = def:getRooms()
        for i = 0, rooms:size()-1 do
            local room = rooms:get(i)
            if room ~= nil then
                local isoRoom = room:getIsoRoom()
                local squares = isoRoom:getSquares()
                for j = 0, squares:size()-1 do
                    local square = squares:get(j)
                    if square ~= nil then
                        square:getModData().failedDisarm = true
                    end
                end
            end
        end
        
        print ("Critical Failure: " .. difference)
        
    --- Complete Failure
real solar
little vessel
#

The code is heavily based on https://steamcommunity.com/sharedfiles/filedetails/?id=2653025458
Dislaik helped me in the past with using math.abs for multiple outcomes for a roll.

The question here is that I can set a "getModData().failedDisarm = true" for a building but I cannot do the same with "getModData().HasAlarm = true" and I have no clue why. The latter, however, is crucial to setting up player knowledge on a building-by-building basis. I did implementations of a simple, local variable like "alarmFound = true" but that meant the character kept the "knowledge" and could try to disarm other buildings - even those that were not alarmed.

rich knoll
#

does anyone know if theres a version of Erie Country with a functional map?

drifting ore
#

How can I find all the bags that are equipped on a player?

#

I know how to get all players items local playerItemList = self.char:getInventory():getItems()

#

But now, how to I extract only bags equiped ?

shadow kelp
#

Hey everyone, i'm newbie here and i'm dedicated server owner πŸ‘‹
Please tell me how to fix problem when someone update his mod and there is a error when join server with mods (version of mods).
If i use 30+ mods there is always will be a problem with mod version. How do you solve this problem when working with ur dedicated server?

I'm sure there is should be solution because it's pain to unsubscribe all mods and install it again every time!!!

sacred pewter
#

Hello all πŸ™‚

I am trying to mod my game a little.
Simply, I want to change the code so that I can plumb my sink without being 'indoor' for the sink.

I searched the workshop for 'sink' and nothing showed up.

I then tried to search the media folder for 'sink', nothing too and when I opened the "RainBarrel" folder and looked at the code, I didn't see a thing that would suggest a plumbing code to check if it is indoor or not...

Can someone more knowledgeable help me a little ^^' ?

drifting ore
drifting ore
sacred pewter
#

oh :/ I am still looking into it, I am in the "timed action" folder rn, maybe plumbing is one ? but if not and it's still in java then I'm caput x)

drifting ore
sour island
#

After you fix all your bugs:

sacred pewter
drifting ore
#

It annoys me so much not being able to exchange data between players that I'm about to throw my mod away. I've been trying to do one simple fucking thing with global modData for days but they shit is so screwed up, it's unusable

drifting ore
sour island
#

You're right it's been 12 hours since I last updated

sacred pewter
drifting ore
#

Is there a way to contact the developers? To ask them how I can use global modData. It shouldn't take long to explain. And after that, I would use the infos to make a guide

sour island
#

From what I understand you have to flip it over to the server (?)

#

isServer() will tell you if code is being run by the server or a connected client

#

generally stuff inside the server folder should be ran by the server

drifting ore
#

Believe me, everything has already been tried

sour island
#

anything inside the client folders can't communicate with anything inside the server folder (I think) -- that's where shared comes in

#

you could (and probably have to) use a clientcommand/servercommand if there isn't a send global data

#

I've been putting off writing EHE to be more server side cause i'm still wrapping my head around it

sour island
#

There's two events

#

basically 1 for when server recieves data/command

#

one where clients receives data/command

#

This is how I coordinate EHE events between players

drifting ore
#

EHE ? It's your mod ?

sour island
#

it's all actually still client side - but I have clients send the data to the srever, then back to all others

#

cause I'm a bad person

#

Yes

drifting ore
sour island
#

If you're trying to set the globalmodData - if you have it inside the server folder and tied to an event the server can run

#

it will be serverside

#

I assume you're trying to get players to read the data?

drifting ore
#

Yes, basically I want to be able to read one player's modData from another

sour island
#

Konjima/Co' may know more about it

#

Ah

drifting ore
#

Co' no, he already try to help

sour island
#

like the player's IsoPlayer object modData?

drifting ore
#

But I get a nil every time

sour island
#

I'm actually curious about how players on eitherside of the p2p works - but yeah you'd have to send it to the server upon request

#

Let me write up an example of what I use

drifting ore
#

That would be great thanks, can you give me the full name of your mod too pls? I would go watch

sour island
#
---\client\
local function onServerCommandToClient(_module, _command, _args)
    --clientside
    if _module == "testModule" then
        if _command == "sendPlayersUsernamePONG" then
            print("RESULT:".._args.username)
        end
    end
end
Events.OnServerCommand.Add(onServerCommandToClient)


---\server\
local function onClientCommandToServer(_module, _command, _player, _args)
    --serverside
    if _module == "testModule" then
        if _command == "sendPlayersUsernamePING" then
            exampleOfClientToServerToClient(true)
            sendServerCommand("testModule", "sendPlayersUsernamePONG", _args)
        end
    end
end
Events.OnClientCommand.Add(onClientCommandToServer)


---sendServerCommand("testModule", "testCommand", _args)
---overload: sendServerCommand(player, "testModule", "testCommand", _args)

---sendClientCommand("testModule", "testCommand", _args)
---overload: sendClientCommand(player, "testModule", "testCommand", _args)


function exampleOfClientToServerToClient(override)
    if not override and isClient() then
        sendClientCommand("testModule", "sendPlayersUsernamePING",{username=getPlayer():getUsername()})
    else
        print("ClientOrOveriddenTest:"..getPlayer():getUsername())
    end
end 
#

Expanded Helicopter Events = EHE

#

I haven't tested if this actually works mostly just cleaned up what I have - but this would be an example of the client sending info to the server and back to all clients

#

I assume you'd want your modData to be sent to the server

#

and then to be given by the server upon request?

#

---\client\ function belongs in client, server in server

#

the last function is an example of a shared command

#

actually wait lol

#

Kind of gave you two examples in one

#

_args is sending a string

#

but you can also have a shared function get used twice over depending if it's client-side or server side

#

@drifting ore Also Turbo mentioned LuaNet.lua

#

Forgot to actually look into that

muted lynx
#

Anyone know how many positive rating I need until I actually get a rating? I am at 20 atm.

#

on the workshop

drifting ore
#

O I use sendServerCommand("testModule", "testCommand", _args) on the client side right ?

sour island
#

sendSeverCommand sneds the data back to all clients or just 1

drifting ore
#

To put the data on the server side and then I use sendClientCommand("testModule", "testCommand", _args) to get it back to the client ?

sour island
#

sendClientCommand -> client to server

#

sendServerCommand -> server to client(s)

drifting ore
#

So if I want a player's data. I send the data with sendClientCommand, then on the server sends them back to the other player with sendServerCommand

#

Ok I will try that thx

sour island
#

Depends on what you're trying to do

#

as I don't recomend sending the entire modData

drifting ore
#

Otherwise, what is LuaNet.lua? I look at it rn, it also looks like what I'm looking for

sour island
#

I haven't looked

drifting ore
#

Like ~50 boolean

quasi geode
#

LuaNet is a overly complex unnecessary wrapper around sendClientCommand/sendServerCommand

sour island
#

So you're trying to keep a table of player related info?

drifting ore
sour island
#

ah

#

I am surprised there isn't a send visual method?

#

seems like a big thing the MP code already does

drifting ore
sour island
#

You mean to update the player's visual?

#

To remove the arm etc?

drifting ore
#

No no, change the modData of the player. That's all I want, to have access and modify the modData of a player from another

#

In my mod I do not change the player's visual. I just equip him with an invisible cloth

drifting ore
#

I still thought about a layout that would be nice to display equipment and I did that. What do you think ? I don't find it great personally

drifting ore
#

You can double click to unequip and the "Equip weapon" button opens a window with a list of all the weapons at hand. Or you can also double click to add them to inventory or equip them. That also hide equipment in the inventory panel

sacred pewter
#

That sounds neat πŸ™‚

drifting ore
#

Lists are not very nice but at least it works with absolutely all mods

cedar salmon
# sacred pewter I did find one that is cool to look at but something is missing, maybe you can g...

What I find missing from that mod is that I want an inventory of all clothing layers and what clothing is occupying that layer. That way I'd know if I've got all layeres covered or not. Better to have separate articles with +20 bite for 2 layers than one article with +30 bite covering both of them. Plus you can pad each of the two vs only the one. I'm not aware of any mod that does that. I like the one in The Long Dark: https://thelongdark-archive.fandom.com/wiki/Clothing?file=ClothingUI.jpg.

The Long Dark Wiki

Clothing is what the player wears on their body, and is the most common protection against the weather. Mechanically, this translates into how fast the Cold meter decreases. Properly maintained clothing will keep the player warm in most environments, at the cost of carrying the clothing, and thus, having less weight to carry other items.

You c...

sacred pewter
#

I see. It's right that it can't do that :/

What I do to know if it does remove two clothing insterad of one is equip it and see if something was removed with the mods and then try to see if it's a downside or not... It's prety long winded ^^'

If a mod did that it would be a really nice QoL

drifting ore
rancid spear
#

Anyone familiar with Britta's Weapons?

drifting ore
#

Is there a function like getPlayer():getBags()? To collect all the bags that the players carry

ionic galleon
#

I have a question regarding moddata and transmit. I'm trying to send data between the server and the client in both ways. when I'm assigning values on the server side and then transmitting, nothing will change on the user's end even so I'm using Moddata.get every time I check.

Is there another way for sending data between both the client and server in both directions, it doesn't have to be anything complex even sending strings will do the job

quasi geode
# ionic galleon I have a question regarding moddata and transmit. I'm trying to send data betwee...
--- server side code

local Commands = {} -- this table should hold various functions

local onClientCommand = function(module, command, player, args)
    if module == 'MyModule' and Commands[command] then
        args = args or {}
        Commands[command](player, args)
    end
end
Events.OnClientCommand.Add(onClientCommand)
--- client side code
local Commands = {} -- this table should hold various functions

local onServerCommand = function(module, command, args) -- note the lack of player arg
    if module == 'MyModule' and Commands[command] then
        args = args or {}
        Commands[command](args)
    end
end
Events.OnServerCommand.Add(onServerCommand)
-- example sends
-- Note "MyModule" is passed to the module argument in the above functions
-- "MyCommand" is passed to the command argument in the above functions,
-- which checks the Commands table for a function named "MyCommand"
-- the table is passed as the args argument to the above functions

-- client side sending
sendClientCommand("MyModule", "MyCommand", {key = "value", key2 = "value2"})

-- server side sending to all players
sendServerCommand("MyModule", "MyCommand", {key = "value", key2 = "value2"})

-- server side sending to a specific IsoPlayer 
sendServerCommand(playerObj, "MyModule", "MyCommand", {key = "value", key2 = "value2"})
midnight dawn
#

Hey if anyone can help, i get an error that suggests the guid's of my items are messed up but the xml and the guidtable share the same id so im not sure what to do. It usually appears ingame as a variety of rainbow colors with ClothingItem beneath its name. Edit: This seems to only occur when it's in the guidTable with another item, if i isolate it to another mod it works fine.

opal wind
#

hey guys im trying to make some custom pills here (medicine), but i dont see any effect entry for any of the medicaments, like the sleeping pills;

#

item PillsSleepingTablets
{
DisplayCategory = FirstAid,
Weight = 0.2,
Type = Drainable,
UseDelta = 0.1,
UseWhileEquipped = FALSE,
DisplayName = Sleeping Tablets,
Icon = PillsSleeping,
Tooltip = Tooltip_PillsSleeping,
StaticModel = PillBottle,
WorldStaticModel = SleepingTablets_Ground,
Medical = TRUE,
}

#

so where is the file that connect this item with the sleeping tables effect on the char?

cedar salmon
opal wind
#

i tried to make a recipe for it, when the player take the pills, to consume 1 works fine, but the effect is not working, i set it like this on my .lua

#

function Wiz_ReduceSleep(items, result, player)
local FatigueChange = -50; <---------------------------------------- ?
end

#

i want the pill to take fatigue out like coffe

#

the function comes from the recipe

#

recipe Take Stimulant Pills
{
Wiz_AwakePills_Tablets;1,

        Result:Wiz_AwakePills_Tablets,
        RemoveResultItem:true,
        Time:30.0,
        OnCreate:Wiz_ReduceSleep,
        
    }
#

since i dont know lua could someone help me on that first part?

tired charm
opal wind
#

i also tried like this

#

function Wiz_ReduceSleep (items, result, player)

local Fatigue = self.item:getFatigueChange();
self.character:getStats():setFatigue(self.character:getStats():getFatigue() + Fatigue);    
self.item:Use();

self.item:getContainer():setDrawDirty(true);
self.item:setJobDelta(0.0);
self.character:getBodyDamage():JustTookPill(self.item);
-- needed to remove from queue / start next.
ISBaseTimedAction.perform(self);

end

abstract raptor
opal wind
#

i tried to make it as a food now it works fine, but the item also disapear when i try to eat it 1/4 or 1/2 only... anybody knows why this happen?

#

item Wiz_AwakePills_Tablets
{
DisplayCategory = Food,
Type = Food,
FoodType = NoExplicit,
Weight = 0.5,
AlwaysWelcomeGift = TRUE,
HungerChange = -1,
FatigueChange = -50,
EnduranceChange = 15,
Packaged = TRUE,
DisplayName = Stimulant Pills,
Tooltip = Tooltip_PillsStimulant,
Icon = Wiz_AwakePills_Tablets,
CustomEatSound = EatingCrispy,
StaticModel = PillBottle,
WorldStaticModel = SleepingTablets_Ground,
Carbohydrates = 0,
Proteins = 0,
Lipids = 0,
Calories = 10,

}
primal knot
#

HI everyone. I'm trying to list all the items in a building, but I got stuck discovering how the items are located in the game. I tried to write some code using getBuilding(), getBuilding():getDef(), getRoom(), but I don't see the way of reaching the items from here. I saw there is a getObjects() method in some classes, but I think that's for things like walls, for example, isn't it?

flat temple
#

hey all does anyone know what "Thread Pieces" are from? Its from a mod idk which but its stupid cus it makes it so i need 100pieces to make 1 thread

vivid flare
#

probably that tank mod