#mod_development

1 messages · Page 83 of 1

pulsar heath
#

but i have to think about the ones who dont think like me

#

but yeah, ill prolly will go with your suggestion

#

let them choose

thick karma
#

I just love minimalist huds whether I feel subjectively immersed or not

#

I don't really love seeing stuff I don't feel I need, generally.

pulsar heath
#

same

thick karma
#

Would rather take in the scenery

pulsar heath
#

but it also depends on the game

#

but i do agree, keep it to the minimum needed and dont flood the screen with to much crap

thick karma
#

Fair... I have played several games hudless that most people probably wouldn't play hudless, but I loved them for letting me

#

Odyssey e.g.

#

Sekiro

pulsar heath
#

yup, rather have the choice to and not use it than not having a choice at all. not everyone enjoys things the same way

#

sekiro no hud?

thick karma
#

Just feels different in a good way to have everything off

pulsar heath
#

crazy dude 😄

thick karma
#

And yes ESPECIALLY Sekiro no hud

#

God that game was so much more fun without a hud

#

I also did not let myself rez

#

I save scum reloaded to avoid using the I-didn't-really-die mechanic

#

Killed every boss with 1 life

pulsar heath
#

i had a hard time just killing them...

#

😄

thick karma
#

It was definitely among the hardest things I've tried in gaming lol

#

But worth it

#

It just made me appreciate the rhythm of that game so much

#

They really do give you the ability to never get hit and apply constant pressure if you move right

#

It really is the secret to every boss

pulsar heath
#

well its kinda my aproach with pz... if my char dies... new save

thick karma
#

So I would just... do that.

#

My health was not relevant if they couldn't hit me very often.

pulsar heath
#

dont enjoy just making a new char and have all setup by the char who died

#

if i die, new game

#

plus the fun in pz for me at least its the initial struggle to get the things you need to survive

#

after that... meh

thick karma
#

Totally fair. I do not have a respawn mod for PZ lol but I do ❤️ Skill Recovery Journal

#

I haven't gotten far in the game tbh (got so sucked into modding I barely play lmao)

#

But if I did, I would not want to reread 400 books

pulsar heath
#

i have around 5k hours

thick karma
#

And rebreakdown 200 chairs

#

Etc.

#

That kind of stuff is tedious to me

pulsar heath
#

i reckon 1k were spent just modding

thick karma
#

I'd rather just... find my old zombified self and read his journal

pulsar heath
#

well from that point of view, yeah

thick karma
#

I have over 1k since buying game and almost all of them are modding.

pulsar heath
#

it makes some sense... someone survived a while then died, another survivor finds his journal and learns from it

thick karma
#

Exactly I like that mechanic a lot

#

Some people wouldn't

#

They want to truly "start over"

#

In the game's sense of working through the grind again

#

No thanks

pulsar heath
#

but i will still know where my weapons are, car etc... but maybe if used along with pillows random spawn mod

thick karma
#

I don't mind getting a new safehouse, getting new gear etc.

pulsar heath
#

hmmm

thick karma
#

But the skill grind is such tedium to me

#

I prefer when games focus on making your skills the important grind

pulsar heath
#

yeah... i mostly grind combat skills and the minimum for every other skill

thick karma
#

I mean like... yours... as a human being

pulsar heath
#

just enough to be able to make what i need

thick karma
#

Not your character's

#

I prefer when my personal knowledge and ability is the only limit on my play tbh. And physical resources are okay.

pulsar heath
#

i think i never got carpentry higher then 6

thick karma
#

But RPG mechanics can just go die afaic

#

lmao and I grew up loving RPGs but now I just hate how their mechanics have invaded every other gametype and made them imo worse for it

pulsar heath
#

its hard to find a decent rpg

#

i still find myself playing some of the old school 2d rpg

#

mostly jrpg's

thick karma
#

An RPG needs a good story to justify its pacing and such. A VERY good story.

#

A game with virtually no story does not need gd RPG mechanic pacing

#

lmao

pulsar heath
#

any game needs a good story... and in the present most of the games focus more on graphics and less on story

thick karma
#

I realize these are just my opinions but damn it I have them lol

pulsar heath
#

opinions are just that, your personal point of view... it doesnt matter it others agree or not, as long as it trully your opinion

thick karma
pulsar heath
#

yeah but those "fast food" games

#

like grab the controller, have some fun and move on

#

come back later and play it again some more fun move on

thick karma
#

True, but some fast food games are fun for longer than any story game with the right friends in my experience.

#

The best story is over in 200 hours tops afaik

pulsar heath
#

fast food doesnt mean it has to be bad food

thick karma
#

A great multiplayer that your people never stop playing can last countless hours

pulsar heath
#

i have around 3k hours in dead cells

#

adictive as hell

thick karma
thick karma
pulsar heath
#

i have 3 games that make me lose track of time when playing them: pz, dead cells and rimworld

thick karma
#

Quick question about vanilla... player A trades with B using context... A cancels trade... does the trade window offering trade remain for B?

#

@ anyone

sour island
#

From what I messed with the window gets blocked on their end.

#

'player A cancelled trade'

thick karma
#

Ah let me see

sour island
#

A tinted screen is drawn - the window becomes disabled

pulsar heath
#

@sour island sorry about bothering with the dm, just giving you a heads up that an idiot was messing with your mod

#

and it actually works... so far....

sour island
#

Hm?

thick karma
#

Hmm I must have messed something up

#

Working on adding gamepad support to it XD

#

Have cancel trade working for offerer

#

lol

sour island
#

I hate discords new DM handling

pulsar heath
#

i sent you a dm b4 going to sleep... was thing about using your functions like i told you to call the events, but ended up just messing with the table

sour island
#

I didn't even see it lol

pulsar heath
#

thinking

#

local globalModData = getExpandedHeliEventsModData()

sour island
#

I haven't had a chance to mess with EHE yet

#

There's a way to schedule events and there's a way to launch them

pulsar heath
#

instead of using the function i just modify the table from the main mod

#

yeah

sour island
#

That's fine as long as the entries make sense

pulsar heath
#

someting event(id)

#

or the get free heli something?

#

i think modifying the table is better... dunno might be wrong so far it works fine

#

i can call them from my twitch chat rewards

sour island
#

You can use H = eHelicopter:new()
H:launch()

pulsar heath
#

no error

thick karma
#

Can anyone clarify how to add an admin user on a server while hosting in -nosteam specifically?

sour island
#

Or the actual scheduler's functions

#

The debug commands don't use the scheduler

pulsar heath
#

yeah ... it can mess things up... my previous mod used the debug commands..

#

not a very good idea...

sour island
thick karma
#

Ah in the chat window interesting... does it save their admin status by username for future connections?

sour island
#

No for some reason

thick karma
#

Oof

#

Thanks

sour island
#

I think it involves the debug mode not saving perhaps

thick karma
#

Hm weird

sour island
#

Hosts have some admin powers by default

#

Idk why it's not just given entirely

#

You can try to set access outside of debug to see if it works

pulsar heath
#

debug mode is sluggish sometimes... at least for me

sour island
#

You can just rip what is inside of them either way

pulsar heath
#

i think ill go with the table modify from my mod... makes things a lot easier for me since i can just send the presets from the app

sour island
#

👍

pulsar heath
#

and send everything to my mod in on json string

#

one

#

so most of the logic is done outside the game

sour island
#

I'll have to put in some checks - I added that error you got to the GitHub

pulsar heath
#

that error was me doing something stupid in the lua interpreter ingame

#

dont remember what i exactly did

sour island
#

Currently trying to solve why connected clients don't hear my specially handled loops

pulsar heath
#

but i was messing around with event ids or something

thick karma
#

Hmmm doesn't seem to work for allowing people to connect with -debug

pulsar heath
#

i think i triggered a non existing event

sour island
pulsar heath
#

now that i think about it... typed the wrong number or something

sour island
pulsar heath
#

yeah i was launching events by id

#

lemme check my notes

thick karma
#

Connector's name: "Pete"

#

Command: /setaccesslevel "Pete" admin

#

I also did it to myself, and that worked in-game

#

Using debug host to set self as admin

pulsar heath
#

yup i was triggering an event manually

thick karma
#

But setting Pete admin and then trying to join as debug was no good.

pulsar heath
#

called event id 20, and i wanted to call 2...

thick karma
#

The server just doesn't see Pete like that.

pulsar heath
#

never messed around in server on debug mode.

#

i usually use my renteded vm for testing stuff in server

#

rented

calm depot
#

You don't need a separate machine to test server, you can run it locally

#

You also don't need to install the dedicated server files, the regular game has everything included

pulsar heath
#

i know, but i have the resources to do so, so why not use them?

#

plus i get to mess around in linux a bit

calm depot
#

Local server is as convenient as it gets for me

thick karma
#

@sour island It's cool I'll just copy a local copy of ModOptions and use that to do what I wanted.

#

Thanks though.

pulsar heath
#

im not always at home so that way even if i have my shitty laptop i can still mess around with the server

#

ok, everything works...

#

time to clean up the code and make the github public

silk hemlock
#

What could cause getRadioText to fail on a dedicated server?
Adding my own lines to AEBS channel. Works fine on SP. On dedi it just shows the raw translation string.

Workaround: if getCore():isDedicated() is true. Bypass translations and just send the english text instead of calling getRadioText.

drifting ore
#

Somehow made it broken then had to fix it again lmao

drifting ore
#

I'm just throwing shit and seeing if it sticks but if it's an issue between it working on sp and not on multiplayer could it be that some of that is client based and some is server based?

silk hemlock
viral notch
#

hey what is separtor for modules ?

lilac condor
#

Ola, friends! Can you please help me? I am having troubles to find anything that can open .pack file from one of the PZ mods. I want to slightly tune mod textures, but can't unpack .pack file. Tried everything i could find: TileZed, UnPacker.jar and etc. no success. I'm kindly asking for your helpaxe

thick karma
#

Have you tried renaming as .zip and unzipping with 7zip? Google suggests that may work.

thick karma
#

Have you explored that post?

#

Seems p recent

#

Covers unpacking and repacking

lilac condor
#

Yeah, thank you. Nothing from that post is working for me, TileZed including. For some reason an attempt to open the file just freezes the program solid

thick karma
#

Hmm yeah I've never done it so I'm not sure about details of troubleshooting

jagged ingot
#

Good morning.

dreamy hamlet
#

HI question when 42 coming out? me nd a freind are wondering for chickens

neon bronze
#

Is there a way to make a clothing item be wearable but not have a world model on your player?

vast nacelle
neon bronze
vast nacelle
#

Type = Clothing
and
BodyLocation = [Something]

ancient grail
neon bronze
#

Not CanBeEquiped?

vast nacelle
#

That's for bags

neon bronze
#

Ok but when i just put CanBeEquipped without anything else it wont render a model right?

ancient grail
#

@sour island sir
Shops and trade mod converts stuff with random values

Nvm im mistaken i got confused with what the client was telling me

#

I mean ots randomized right?

viral notch
#

how can i add receipt of item what request items from other mod ?

#

due that

recipe Make Bomb of Watermelon
    {
        keep MeatCleaver,
    Watermelon_from_mod,
    Dynamite,
 
    Result:WatermelonBomb,
        Time:50.0,
...
...
    }
#

make that

zinc pilot
#

Hello, should a context menu close after its function is run, correct?

#

I mean, automatically

drifting ore
#

That's what happens to mine upon being clicked

ancient grail
ancient grail
viral notch
zinc pilot
#

even with nested context menus?

ancient grail
sour island
ancient grail
ancient grail
drifting ore
#

Trying to figure out what decides where the sound location is being put in game and its radius. It's in a lua file right? Something like playSound(x, y, sound, radius) etc

rancid tendon
#

query: is there a guide on creating zombies with custom outfits and inventories?

viral notch
ancient grail
#

module YouModile {
imports {
Base
Mod1
Mod2
}
}

#

Its not formatted in using mobile but check out the brackets

#

@viral notch do you see the bracket that im telling u

viral notch
#

ugh

#

mate

#

module MYmod {
imports {
Base
Mod1
Mod2
}

bronze yoke
#

you can also just use Module.Item when referencing the item instead of importing the module wholesale

viral notch
#

you added twice } after import and that close Main module

viral notch
ancient grail
#

I do this

module Base {
sound{}
recipe{}
model{}
}
module MyMod { imports { Base Mod1 Mod2 } 

item{}
item{}
}
ancient grail
viral notch
ancient grail
#

In such a way but not totally similar

viral notch
#

yeah i need that in txt file

ancient grail
#

U can move the tecipe
It really doesnt matter
Im just showing an example

If you are only using 1 itrm of a mod then dont import it
Do what albion said

viral notch
#

if Module.item not works
then what can do

#

import modules on top

ancient grail
#

It will work

ancient grail
#

If it doesnt work
Then fix the brackets or your syntax

U can post here your script after you are done so we can advice u further if u need

viral notch
#
module MyMod
{
    imports
    {
        Base,
        Mod1,
        Mod2,
    }

    
    recipe Make Bomb of Watermelon
    {
        keep MeatCleaver,
        Mod1.Watermelon_from_mod,
        Mod2.Dynamite,
 
        Result:WatermelonBomb,
        Time:50.0,
        Category:Weapon,
    }

}
neon bronze
#

Put the commas in the imports after the modules named, that works for me

ancient grail
#

Thats not required but sure

#

U imported so u dont need to add the module on the recipe but u can leave it . Cuz its not gona cause errors

Of you are using drainables you should
Put =1 or whatver amt after
Or
destroy

#

These are a few things that confused me before

ancient grail
#

Nah i think

#

Im really confused with what he ment

#

``the ATM mod allows jewelry to be exchanged for the vanilla money item.

Shops and traders changes the vanilla money item though.

That creates a problem where the value of the money item is always different when exchanging them at the ATM.

so one time I will get 7$ for a diamond ring and then 23$ for the same item
thats all I want. A version where the value you get back is always the same and you only get base.money and not the penny item that the ATM mod also adds``

#

Thats what he said

#

like here it is 9.65$. But the next time you exchange something it might be 16$ or 2$

neon bronze
#

So im having the current problem on a server: i set up a var in an isoThumpable‘s moddata and based on it i either lock it with a padlock or remove the lock. But it has occurred that the variable is set to lock but its not locked with a lock. Is it a problem with syncing the object?

ancient grail
#

Use chucks container api

neon bronze
#

Hmm how do i use it?

ancient grail
#

@sour island imight build another atm mod but make it compat with your shops moddata
Mind sharing what i should name the vars

sour island
#

Uh - I have a WIP faction banking thing for it - no ATM UI tho - just a simple input window

#

The code for it is on GitHub

#

I use 2-3 global modData lists

#

Just listed it

ancient grail
#

What does your shop mod do exactly? It allows players to sell right?

viral notch
#

where can found source file with OnGiveXP:Recipe.OnGiveXP

ancient grail
#

Whats the difference with shops compare to this.? My client specifically mentioned your mod and the atm mod

ancient grail
viral notch
#

windows expoler ... nope

ancient grail
#

Ide

viral notch
#

a gdzie ?

#

🤣

true vault
# viral notch my what?

IDE = Integrated Development Enviroment.. Like what do you use for coding? Visual Studio, Visual Code, some sort of text editor with IDE capabilities like Notepad++, Sublime, etc....

ancient grail
#

IDE
Integrated dev environment

#

Yeah notepad++ can do that. Slow but it can do it

viral notch
#

yeah i dont have so much ram xD

true vault
# viral notch im using notepad++

I would suggest a proper IDE, or at least a better text editor. I use Visual Studio for heavier stuff, and Sublime Text for small stuff. Even sublime can open a folder as a project, and search within it rather fast..

neon bronze
#

I thinks its under server folder

#

recipecode.lua

true vault
ancient grail
true vault
#

Which it looks like the d00der above me just said as well lolz

viral notch
sour island
#

I got commissioned to make it

#

With the intention of supporting the shops mod

true vault
viral notch
sour island
#

Idk how to make the branch public from the app

#

But the workshop is open

ancient grail
#

But yeah. Like i said their server specifically wants your first shop mod
Which is perfect . Its just that the atm he uses has a problem so he wanted me to make one and while this doesnt require me to make it compat with your
Mod
I still prefer to do so cuz why the hell not

true vault
ancient grail
vague raven
#

You don't need to import mods for recipes as long as the server is also running the required mod. You also don't need to put the module in it either.

ancient grail
#

Right... So when do you need to out them?

sour island
#

It saves it on a new global modData list

#

Tied to factions directly

ancient grail
#

Ye but this is the faction repo tho

true vault
# viral notch second one

That's wicked easy then; you create a new function to do so; I generally follow the same format the vanilla files do, and simply make a copy of the function I want to replicate, change the name, change the Perk type it targets, and change the amount of XP it gives for that perk. Then in the recipe, you call that function on the OnGiveXP event.

ancient grail
#

Is it the same mod as the first mod? I thought they are diffrent

#

Ah so faction banking requires the shop and trades mod

#

Im not sure if they will include that

sour island
#

🤷‍♂️

#

I thought that's what you were asking for

#

Banking that works with the shops mod

stray yacht
#

Hey gang 2 super basic questions that I'm just not understanding from examples. If I want to get the local client's player, how do I do that without hooking into an event that returns the player? Similar problem with the context menu, I want to get the context menu without hooking into an event. Right now I'm getting them through events but, as I only need access one time, that makes for a lot of unnecessary calls over time. Any tips?

bronze yoke
#

you can use getPlayer() to grab the player

young pasture
#

Hi. Can anyone give me a link reference to a latest modding guide/tutorial ?

stray yacht
bronze yoke
#

you can just call it out of nowhere

bronze yoke
#

it's part of the global object

stray yacht
#

amazing, thank you!

young pasture
elfin rapids
#

So i added new lua file to dynamic traits mod and i'm getting this message while trying to load server i'm hosting by myself, is disabling anticheat solution for that?

#

it's server hosted by "host" in main menu, not by dedicated server

vast nacelle
#

You could decorate the ContextMenu functions... but that'd pretty much be the same effect as using the events in most cases.

stray yacht
bronze yoke
#

it technically does always exist, but yeah, the events are intended for that very kind of use

vast nacelle
#

I guess it just keeps the last instance around then as hidden stale data until it gets reset on the next call?

bronze yoke
#

i'm not sure of the exact specifics, but the context menu is created when the player is

drifting ore
#

What are the advantages of using either moddata or saving a file to save data?

#

I've learnt how to save a json file (mostly) to save data, looking to learn how to use moddata as well

#

Sounds like since you're not using the complexities of encoding decoding a json file it would be easier to store variables into moddata

bronze yoke
#

moddata is way easier

young pasture
#

Hi, what function i can create a confirmation box ?

drifting ore
#

I just read something online, it's basically storing variables into a lua table with keys in the mod itself, so if you get the player, you can get the variables you saved for him?

bronze yoke
#

the only times i've used json were because i specifically wanted a json file (to be used externally), and one very niche case where i needed some data before global mod data loads

drifting ore
#

But I assume not everyone will want to modify a json file in the server files to change something so it will be easier to learn to use moddata for admins to change values

drifting ore
bronze yoke
#

the syntax is (any IsoObject derivative, and probably some others):getModData()

young pasture
bronze yoke
#

beginners always seem scared of it and make a lot of assumptions about weirdly strict syntax, but it literally just returns a normal lua table

drifting ore
bronze yoke
#

same with ModData.getOrCreate('ModName') , which is for mod data that doesn't belong to any specific object

drifting ore
#

But I think the hard part will be making the UI if you're not familiar with it

young pasture
drifting ore
#
    local showMoney = showMoney:new() 
     showMoney:initialise(); 
     showMoney:addToUIManager();

This is an example of how to call it to open. showMoney:new, in there showMoney is the name of the UI found in your UI file

#

I'll copy an excerpt from the UI file as well as an examlle

#
showMoney = ISPanel:derive("showMoney");
#

The beginning of your UI file for example

#

If you want to see a full example of the UI file I can send you one of my own or a guide I was following

vast nacelle
young pasture
drifting ore
#

No clue, I only learnt to do it this way for now, I'd defer to you for that

#

Sounds better tbh

drifting ore
stray yacht
young pasture
#

Thank you for the link!

cosmic condor
#

Did you delete the message? lol

drifting ore
#

anxiety, dont mind me 😦

cosmic condor
#

I'm about to ask if it's better than testing on Dedicated Server?

drifting ore
#

Do you mean like paying for one or? I only learnt of this method for now

cosmic condor
#

no, on your own PC

drifting ore
#

Oh yeah I thought you read my thing already, no it's that. Just downloading the server tools, launching the ded server and logging in with two clients at the same time

cosmic condor
#

@drifting ore thank you for sharing and reminding me that there are these guides available on GitHub. I need to refresh my memory since I haven't been active for 4 months 😹

drifting ore
#

no worries, 🙂 love to help 😄

fast galleon
#

🌲🌲🌲ded Pistol 🌲🌲🌲

young pasture
#

Hi. is this a bug ? im on the scenario,testing my simple mod, but then pressing ESC does not open the menu (QUIT, QUIT TO DESKTOP etc.)

viral notch
#

or open MAP

#

and close it

#

then hit esc

young pasture
#

thank

#

thanks

#

what event is getting the number of zombies killed?

viral notch
#

where can found icons for clouts ?

small topaz
#

I tried the following variants: item:setIcon("myIcon") and item:setIcon("Item_myIcon.png") but without success. Console shows the error "Object tried to call nil".

young pasture
drifting ore
#

after having the icons in textures directory

tardy wren
fast galleon
#

you could try

item:DoParam("Icon=...")

*yeah I only read top part

bronze yoke
#

yeah sounds like the item script is the problem, not the argument

drifting ore
#

if you are using the right heirarchy it should be pretty straight forward

small topaz
bronze yoke
#

oh, are you trying to set it on the InventoryItem? this is for Item, the script object

drifting ore
#

oh myb if so

small topaz
bronze yoke
#

i think it's probably InventoryItem:setTexture(Texture texture) in that case

small topaz
bronze yoke
#

getTexture("file path, starting with media/")

#

e.g. from one of my mods getTexture("media/ui/Traits/trait_Prisoner.png")

small topaz
young pasture
#

Hi, im still starting, how can i access mainCategory value ?

local testOnly = player:getUseHandWeapon()
print(testOnly.mainCategory)
bronze yoke
#

use getCategory()

young pasture
#

ah so getCategory is getting the mainCategory value, i thought they were not the same

small topaz
fast galleon
#

game does this to get the texture Texture.trygetTexture("Item_".."iconNeme")

fast galleon
#

do you test in-game?

#

you can try to capture the texture from console to get it right faster

small topaz
small topaz
#

yes, that's the problem

#

but I think I now got what you tried to explained to me! 😅 misunderstood some parts of @bronze yoke comments

mint helm
#

hey does anyone know what could be preventing me from turning a spot into my safehouse?

young pasture
#

how can i refresh the lua files ingame? i added new .lua file but i cannot find it, do i really need to exit the game ?

astral dune
#

going to the main menu is enough

drifting ore
#

I keep closing the ded server and launching it again 🤣

young pasture
drifting ore
#

In the main menu

astral dune
#

obviously a dedicated server would need to be restarted

rain shard
#

Hey guys, is there a list of itemProperties somewhere?

young pasture
#

How do i make my item be placeable ?

#

something like that

winter thunder
# young pasture How do i make my item be placeable ?

You need to give it a model, if you look in the script files, there is a file called models_items.txt that shows this. Basically you need a 3d model and texture to reference, and then you designate that in a script file

#

If it already has a model, you just add WorldStaticModel = Name_Of_Your_Model_Here,

#

to the item script

dull moss
#

is there a way to check if player is adding perks via admin mode?

bronze yoke
#

hook whichever function that uses

dull moss
#

smort

winter thunder
#

Anyone know why the game is kicking back "no such function"

#

My function 100% exists in the files lol

bronze yoke
#

probably because there's no such function! you'll need to give more information than that

young pasture
#

where is the class that tripped the user? like when runnig with low health

winter thunder
young pasture
#

or like the player is jumping over fence

bronze yoke
#

you might have errors in the function that are causing the file to stop executing

winter thunder
#

word

young pasture
#

is it possible to do the climb wall animation without a wall or fence etc.

drifting ore
#

Blacksmith:addXPBoost(Perks.MetalWorking, 3);

is this correct

bronze yoke
young pasture
#

Hi. Where do i get the txt files and models/sounds etc. of the current item in game? Lets say the m14, because i want to use, the model and i want to know what are the details of the .txt m14.l

drifting ore
molten cobalt
#

Hi all, any ideas why this code doesn't work in-game?

local function TraitMinorSunlightSensitivity()
    local player = getPlayer();
    local timeOfDay = getGameTime():getTimeOfDay();
    if DAYORNIGHT(timeOfDay) then
    if player:IsOutside() then
            local allBodyParts = player:getBodyDamage():getBodyParts()
              local bodyPart = allBodyParts:get(ZombRand(allBodyParts:size()))
              bodyPart:AddDamage(2.5)
    if player:IsOutside() and player:IsSeatedInVehicle(); then
            local allBodyParts = player:getBodyDamage():getBodyParts()
              local bodyPart = allBodyParts:get(ZombRand(allBodyParts:size()))
              bodyPart:AddDamage(1.5)

this one works

local function TraitSunlightSensitive()
    local player = getPlayer();
    local timeOfDay = getGameTime():getTimeOfDay();
    if DAYORNIGHT(timeOfDay) and player:isOutside() then
        local allBodyParts = player:getBodyDamage():getBodyParts()
        local bodyPart = allBodyParts:get(ZombRand(allBodyParts:size()))
        bodyPart:AddDamage(5)

```lua
#

I mean its going to be to do with the the first if and the vehicle bits but I don't know why

molten cobalt
#

Basically trying to get it to identify if the player is in a vehicle or not, and then do X

dark wedge
sour island
#

In most cases functions are lowercase Uppercase

#

There are a few cases where this isn't the case but I'm sure there's a good reason

molten cobalt
#

Thank you, I've not had issues with the uppercase IsOutside, but I'll make sure I do it from now on to avoid issues 🙂

#

Hmm that doesn't give me errors now but nothing happens, I'll have to go back and have another look

astral dune
dull moss
dull moss
sour island
#

@calm depot opened up your radio fix... is that really it . _ .

#

I laughed outloud

#

would it be safe to add into EHE as is? would reloading the translator break anything?

#

also, if you ever find a bug - EHE is on git, and I ofc don't mind PRs

humble oriole
#

I do not envy you Chuck, doing the right thing for the sake of balance and everyone in the mod comments beating you up about it 🙄

#

not to mention half the features you just put in can be toggled.

sour island
#

ah about the journal?

#

comments don't really bother me - I try to reply to more innocent ones, otherwise I just ignore them lol

#

also, anyone getting overwhelmed by the comments - just unsubscribe

#

would say to not disable them outright without an alternative way to collect info

#

but no need to be on call either

rain shard
ancient grail
#

@sour island does the container api have the ablity to make contaoner invulnerable to sledge and dismantle?

sour island
#

nope

ancient grail
#

Ahhh ok..
Anyone knows how to make containers invulnerable?

sour island
#

safe zone?

ancient grail
#

No... Something that the container itself should have the immunity

#

Like a property i think theres a vanilla thing abt it but but am not sure if it works

ancient grail
ancient grail
ancient grail
#

One of the links is about items

bronze yoke
#

you can find them all in the source for DoParam, i don't know if that guide is actually outdated or not but it is very old

ancient grail
#

Ye its missing iirc clothing related

ancient grail
bronze yoke
#

huh? no

ancient grail
#

Ow ok. I misunderstood what you ment

#

Is it possible to iterate every porperty of an isoobj?

bronze yoke
#

you could loop through the metatable if you have some method of recognising getters (probably just using the string start util for the key would be enough)

#

hardcoding them probably wouldn't be that bad either

ancient grail
#

Ow ok.. sounds like a drag 😂 thnx tho

sour island
#

pz-libraries would show getters

atomic mauve
#

hi everyone, i was wondering how hard coding a behavior mod for zombies would be. due to the recent obsoletion of pillow's Fear The Sun, ive been looking for a similar mod to no avail. any ideas where to start or what to do in order to simulate zombies that dont go outside at daytime? thanks in advance

uncut meteor
#

hi , is there a way so i can check current player speed and set it to 0 if he is holding or equiping lets say an item with alot of weight?

humble oriole
#

For timed actions, does the perform function run on animation complete?

bronze yoke
#

it runs when the action is complete

humble oriole
#

start() starts the action and then perform() runs after o.maxTime, right?

bronze yoke
#

yeah

humble oriole
bronze yoke
#

stop() is used when cancelling the action early

humble oriole
#

Yea, I figured that, just wanted to know the order of operations, the animation is just going to play and then on finish it'll send a client command to run a function.

#

oh wonderful, just had a full JRE crash on our server.

bronze yoke
vestal geode
bronze yoke
#

if the original mod's license allows you or you can get the author's permission, fixing whatever caused that mod to stop working is probably the simplest option available to you

vestal geode
atomic mauve
vestal geode
vestal geode
#

The most trivial solution would be of course sth like
context:removeOptionByName(getText('ContextMenu_Destroy'))
It's a pity that the corresponding predicateSledgehammer function is local, otherwise you could simply overload it. But maybe you'll find a better solution

small topaz
#

I am currently setting an icon for an inventory item via the command item:setTexture(myIcon) which happens while in game. However, when I quite the game and load again, the item will not have the icon anymore. Anyone an idea why that happens and whether there is a way to solve this?

#

What I want to achieve is that one type of item defined via one script.txt entry can have several different icons ingame. Not sure if that's possible at all.

ancient grail
dull moss
#

hey wasn't there some problem on MP with having setstress, setunhappiness and setpanic? getting report that those dont work

dull moss
#

I've been told that "The issue is with Floating point accuracy. You can set these values, but beyond around three decimal places, it just stops working."

#

Anyone knows something about that?

rancid tendon
#

anyone know of a guide for implementing custom zombie outfits/inventories?

vestal geode
# dull moss Anyone knows something about that?

I haven't heard anything about it yet. But do you really need such small values? These are percentage values, i.e. an interval of 0-100. With three decimal places, that would still be an accuracy of +-0.001%

dull moss
#

they are not %

#

one of them is

#

i decrease them by 4%

#

4% is not 0.001%

#
Unhappiness:35.91999816894531->35.87999725341797, stress: 0.15254822373390198->0.11254822462797165, panic: 7.570008754730225->7.170008659362793
Unhappiness:35.87999725341797->35.839996337890625, stress: 0.07881207764148712->0.03881207853555679, panic: 2.289999008178711->1.8899990320205688
Unhappiness:35.839996337890625->35.79999542236328, stress: 0.007868108339607716->0, panic: 39.12001419067383->38.72001266479492
Unhappiness:35.79999542236328->35.75999450683594, stress: 0->0, panic: 34.910133361816406->34.5101318359375
Unhappiness:35.75999450683594->35.719993591308594, stress: 0->0, panic: 36.83024597167969->36.43024444580078```
#

well, panic and unhappinesss by 0.4%

#

still

rancid tendon
#

i'm doing my best google-fu and cannot for the life of me find any information on adding custom zombies to the game

#

even taking a look at other mods that do it and trying to figure out where it actually defines the outfit/zombie types has yielded nothing, s'all greek to me i guess

fast galleon
#

ok, so sandbox screen is 'easy' to add group box e.g. ProperZombies for all the options but if you want more than that you should probably recreate the whole panel (your sandbox page).
Which means you can customize it anyway you want, if you're familiar with UI.

fast galleon
#

yeah

fast galleon
#

it needs more changes to work properly, but I just added to In-game map page.

dull moss
#

Huh?

fast galleon
#

just for test, because it errors atm if you use other types that are not combobox or tickbox 😅

#

if v42 makes no changes, we could make a community api for it, it has been asked here a few times 🤷‍♂️

ancient grail
#

is there a guide for this

#

making the groups

vast nacelle
vestal geode
# ancient grail i can see you have thought of this too

I've just checked the options again, because I'll also need it soon anyway. Seems like this is actually the most viable solution, otherwise you'd have to overload/overwrite the entire doMenu function or do it for each IsoObject class manually. In addition, I'd recommend to implement an onDestroy function as a fallback, which in case of doubt clones the container and its content and re-places it if someone somehow manages to demolish the container

vast nacelle
# rancid tendon i'm doing my best google-fu and cannot for the life of me find any information o...

First you create an outfit in clothing.xml using the clothes' guid. The guid's you use are defined in the xmls found in /media/clothing/clothingItems. Every guid you use also needs to be in a fileGuidTable.xml in your mod in /media.

Then you create a HairOutfit lua file to associate specific hair/hair colors with your zombie outfits. Can skip this if you don't particularly care what hair/hair color your zombies have.

And a ZombieZoneDefinitions lua to tell the game to spawn zombies in your outfits in certain locations.

ancient grail
vestal geode
ancient grail
#

Dont want it to chang stuff thats already spawned or about to spawn. I only want a function that can be applied manually or something like that

vast nacelle
ancient grail
#

Right click setIsUnbreakable()

rancid tendon
#

second off, thank you for the information, that's super helpful! :)

ancient grail
#

@vast nacelle wow u have lots of high star mods

#

Impressive

rancid tendon
#

i'll sniff around that, thank you! i'm working on a feature for my lil (enormous) music mod to add survivor zombies that are carrying cassettes

ancient grail
vast nacelle
#

I need to do some fancy item distribution stuff with STARS to make it so they always only drop 1 item in a set of options.
But you can more easily add items to their loot table with something like

table.insert(ProceduralDistributions["outfit_YOUROUTFITNAME"].items, dropChance);``` or something like that.
rancid tendon
#

and i thought i'd have some fun dressing them up tbh. i have a trailer for my mod that has a bunch of different survivors with different outfits in it and i might put them in if players have all the required mods enabled

#

oh yeah i mean

#

i also want to do full custom outfits

#

just the main purpose in the mod is as a vehicle for dropping a bunch of cassettes as well as a bit of interesting loot

ancient grail
#

Not sure how but i believe you can use

#

clothing.xml

rancid tendon
#

yeah cosmicb gave me most of the information i should need!

ancient grail
#

ok if you prefer lua way.. cuz whaat i suggested was xml way

rancid tendon
#

anyway, that's the trailer--i thought it'd be cute if, if you have all the mods required, each of the survivors depicted in this video could show up as very rare zombies carrying a bunch of music items personalized to the character

#

so that's why i was asking :)

vast nacelle
rancid tendon
#

i've only made one mod, but i really poured my heart and soul into it and it was honestly mostly for me--i'd seen true music give the people i played with on servers a ton of awesome memories that would never have been quite as cool without it, so i was super inspired

ancient grail
#

yeah its been a long time since i ever made anything for myself... ive been doing commission after commission

#

i think secret stash is the only mod ive ever done for myself

vast nacelle
rancid tendon
#

see i actually had that idea but that sounds way more complicated than i know how to do haha

#

if i could do that i'd totally give them all a boombox playing the song associated with their bit of the trailer

#

you hear beach boys - kokomo menacingly in the distance as beach man and his entourage lurch towards you

vast nacelle
vestal geode
ancient grail
#

on the traits mod im working on im left with 2 tasks
believer traits shouldnt have context menu on cigarettes and alcohol
then 2 other traits can eat raw food without getting sick..any advice?
im looking to overwrite thios function but its a very long one

#

ISInventoryPaneContextMenu.createMenu = function(player, isInPlayerInventory, items, x, y, origin)

#

its almost the whole lua file

#

any way to extract just a part of it

dapper geode
#

hii, just curious about how to disable grabbing/taking item from specific container on specific area

vestal geode
ancient grail
ancient grail
ancient grail
#

How do i get the specific menu ?

vestal geode
#

exactly

#

sec have to check the sources to find the functions name

dapper geode
rancid tendon
#

... so question actually

#

it's possible for zombies to have something equipped in their hand, right?

#

or at least attached to their hand?

ancient grail
#

We are doing the exact same thing but on diffrent situation and yours is onfillworld mine is inventory

ancient grail
#

Like i mentioned check out the xml file

#

Its inside the clothing folder

rancid tendon
#

right that's just a preliminary question to a more complicated question

#

is it possible to equip a device to a zombie's hand that has a defined state? i.e. would it be possible to equip a boombox on a zombie that has a loaded, playing cassette

vestal geode
vast nacelle
# ancient grail How do i get the specific menu ?

I kinda threw this together, but this is sort of what you want I think as an example for your traits.

ISBelieverTraitsContextMenu.removeSmokingOption = function(player, context, items)
    local playerObj = getSpecificPlayer(player)

    items = ISInventoryPane.getActualItems(items)
    for _, item in ipairs(items) do
        if item:getFullType() == "Base.Cigarettes" and playerObj:HasTrait("NoSmokes") then        
            local smokeOption = context:getOptionFromName(getText("ContextMenu_Smoke"));
            if smokeOption then
                local toolTip = smokeOption.toolTip or ISInventoryPaneContextMenu.addToolTip();
                toolTip.description = getText("Don't give in to peer pressure, kids");
                smokeOption.toolTip = toolTip;
                smokeOption.notAvailable = true
            end    
            break;
        end
    end
end
Events.OnFillInventoryObjectContextMenu.Add(ISBelieverTraitsContextMenu.removeSmokingOption);```
ancient grail
vast nacelle
#

You could outright remove the option with removeByName or something, but I figure it's better to communicate why the option is not available rather than just have it not be there.

ancient grail
#

Idont understand it yet but ill try it out

#

The trait is actually called believer

vast nacelle
#

Pretty much this is adding a function to the render context menu stuff that checks if its a cigarette and the player has a NoSmokes trait, sees if there is a "Smoke" option that has already been created, and if so, sets it to unavailable (unclickable red text).

ancient grail
#

Then for alcohol ill just check for drink right and if its an alcoholic drink i think i have that on a note. Im currently afk

vast nacelle
#

I think you'd want to check if its a food item and if it is, check if IsAlcoholic is true.
To catch all alcoholic drinks without have to stipulate specific ones.

rancid tendon
ancient grail
#

Maybe she blocked me and so she cant read my msgs hehe

rancid tendon
#

yes i have

ancient grail
#

Ow yey

rancid tendon
#

the one i'm looking at does not tell me any of that info

ancient grail
#

You can use onzombieupdate

vast nacelle
# rancid tendon hey cosmicb! do you think this would be possible? :0 you seem to know quite a bi...

No problem.
You'd want to look at the AttachedWeaponDefinitions lua. Either the one in STARS or the one in the base game code.
Same idea for a boombox, but instead of using a "impaled in the zombie" location, you'd get their hands or something. (though unfortunately there does not seem to be a way to force it to ALWAYS spawn your zombie with the item. There's a global hardcoded chance of 6%)
As for how to actually give it a battery, a casette, and then turn it on when a zombie does spawn with one... I haven't a clue.

rancid tendon
#

hah, that's the sticking point

ancient grail
#

Then add a random thing to add to its inventory and equip it on his primary

Like how u would a player

rancid tendon
#

it's really the question of how to get the cassette into the boombox

#

and turn it on

vast nacelle
#

Doesn't OnZombieUpdate run ridiculously fast though?

ancient grail
#

Add moddata

#

Or maybe media... Idk media mods tbh

ancient grail
vast nacelle
#

I just consider all the update events dangerous territory for performance, OnPlayerUpdate, OnZombieUpdate, OnTick, etc.. 😅

ancient grail
#

OnPlayerMove
OnGridLoad

#

Or load grid not sure

vast nacelle
#

I really wish there was a OnZombieSpawn or something. 😮‍💨

#

Just goes back to how there's some annoying gaps in events.
Like, there isn't an event that triggers when a zombie hits a player... in a zombie game. You can only catch the bleed damage that follows afterwards with OnPlayerGetDamage.

ancient grail
#

Yeah that seem to be a must have

ancient grail
#

is there a way to restart server via rcon

bronze yoke
#

the update events are a little overly feared

#

the advice to stay away from them is mostly so beginners don't write crappy code that lags out the game, if you're responsible about it it's fine

#

please though... onzombiespawn...

neon bronze
#

guys, how do i effectively spawn tapes in my inventory? When i do AddItem(tape) it does spawn them, but they cant be inserted in the tvs

bronze yoke
#

you need to use setRecordedMediaData(mediaData) on the item

#

by default it's just a blank tape that doesn't do anything

frank elbow
neon bronze
bronze yoke
#

getZomboidRadio():getRecordedMedia():getMediaData(id)

neon bronze
#

and i can get the id of the tape in question right?

bronze yoke
#

if you've just spawned it it's blank, it doesn't have any media data

#

it's basically just a template item

neon bronze
#

yea i spawn a tape through the items list but i set it to an actual tape through the dbg option

#

it does let me put it in the tv before i do my stuff

ancient grail
#
    item Beer2
    {
        DisplayName = Poured in a Glass,
        DisplayCategory = Food,
        Type = Food,
        Weight = 0.3,
        Icon = PlasticCup,
        EatType = Can,
        ReplaceOnUse = PlasticCup,
        CustomEatSound = DrinkingFromCan,
        WorldStaticModel = PlasticCup_Ground,
        CustomContextMenu = Drink,
        EvolvedRecipeName = Beer,
        Tags = LowAlcohol,
    }
#

how do i check for tags again

#

wait i think i know nvm

#

if getScriptManager():getItemsTag("Liquor") or getScriptManager():getItemsTag("LowAlcohol") then

neon bronze
#

why not HasTag()?

ancient grail
#

item:hasTag("Liquor")

#

just realized ye

neon bronze
#

anyone knows why my Additem gives me back a comboitem?

ancient grail
#

whats a combo item

neon bronze
#

Ive no idea but its called liked that in the debug window

bronze yoke
#

it's a subclass of inventoryitem

neon bronze
#

ok how can i ensure that it wont turn into the comboitem?

bronze yoke
#

your item needs to be one for some reason

#

i don't know why you wouldn't want it to be

neon bronze
#

cause it messes up the tapes they turn into something which the game cannot recognize

#

they cannot be dropped or deleted from the inventory

glacial flicker
#

I need to deep dive into the PZ modding code to make one where you can craft your own graffiti overlays from the base game

#

it's such a cool decor piece that's not craftable

#

😭

vast nacelle
#

If not exactly what you are wanting, it should at least work as an idea on where to start on your own mod

glacial flicker
#

Oh I know about Aza's one, I just like the overlay tiles from base PZ, and would like them to be buildable (think More Builds Mod having the Well, fuel tanks and so on)

#

Or having a way to 'build' the grime overlay as well

ancient grail
#

Wow looks like u are typing a long one bro @thick karma

thick karma
#

Alright y'all, wondering if anyone can help me slot a piece of another puzzle. I am working on cleaning up the character creation panel (yes, I know there are other mods that rework it entirely, but they aren't gamepad compatible and I don't feel like adding that support for them)... One of my goals in doing so was to sort the clothing categories alphabetically. So I did (4x font for testing to demonstrate attached).

UNFORTUNATELY, there was a twist. The game's AvatarPanel somehow uses the order of the list to determine which items get drawn on top of which other items, so when I reordered that list, it resulted in my poncho being drawn partially under my shirt.

Can anyone help me identify where exactly the game decides to use the order of the items to draw the clothes on your sprite in the character preview ("Avatar Panel")? Hoping I can split that function and tell it to use a different table for drawing when I've sorted the categories in the menu.

#

(I am not yet sure if the menu consequences would carry forward into the game.)

#

Fell asleep trying to solve this for a couple hours last night so I figure it's time to run it by the people.

#

Hmmm maybe I need to do something with updateSelectedClothingCombo

calm depot
#

aren't they set according to the order in shared/Definitions/ClothingSelectionDefinitions

#

actually, no, they can't be because it's iterating using pairs() so the order wouldn't be guaranteed

#

are you sure that the items you're applying are actually compatible and not something the game would treat as a slot confict if you were trying to put them on in-game?

#

I'd start a game up, give yourself the same clothing items then try to put them on from your inventory

thick karma
#

It's a saved outfit I wear all the time. I already isolated the sort function as the issue

#

If I sort the items, bug. No sort, no bug.

#

Even with mod running

calm depot
#

well, by "no sort" you must really mean "sorted in a different way"

thick karma
#

The avatar panel uses the stuff I sort somewhere, in something created immediately after the sort process perhaps.

calm depot
#

so, how do they need to be sorted in order to display correctly?

thick karma
#

By no sort I mean no sort from me

calm depot
#

yes, I get that, but clearly the game has a correct order that they must be applied, therefore they must be sorted

#

so, based on what you've observed, what does that sort order seem to be?

thick karma
#

In their original way they seem to put stuff that has to appear on top below the stuff that it might cover

#

E.g., my poncho is in the Jacket category. When Jacket is moved above Pants, Pants appear over your jacket.

#

That's how I noticed in the first place

calm depot
#

but when you're in-game, you end up looking the same regardless of whether you put on the pants or jacket first, right?

thick karma
#

I actually haven't tested that... I suppose it could help solve the problem but last night I was only focused on reading the code that creates the menu that is causing me problems

calm depot
#

given the limited clothing options in the creation screen, and from looking at the code, it looks to me like they don't need to care about order there because they only support a few types

#

I reckon the better place to look is going to be the in-game code that handles clothing

thick karma
#

Hmmm yeah I am not sure where exactly the game loops through selections to dress your character... But I feel I need to revert that list of selections to its original order somehow. No idea what file to check if it's not in this menu somewhere tbh.

bronze yoke
#

can you show the issue?

thick karma
#

Yeah gimme a sec I'll screenshot it

#

I'll also go ahead and start and see if the visual error persists into real game world.

calm depot
#

if it does, I'd be curious to see if it also persists after quitting and reloading the save

thick karma
#

Starting game now

calm depot
#

nice loin cloth, I don't see the problem 😏

#

it's not a bug, it's a feature, ship it

thick karma
#

Sure enough, persists into the gameworld.

#

I sort it in CharacterCreationMain:doClothingCombo(definition, erasePrevious) FYI:
if LM.alphabetizeClothingCategories then definition = LM.snailsort(definition) end

calm depot
#

so, what if you quit and load it back up?

#

if it still does, that would imply the order of item application is also stored

thick karma
#

Well you mean if I disable the mod and restart? I mean with the mod enabled I would expect to produce the same issue as soon as character creation was initialized.

calm depot
#

no, not the mod

#

just quit back to main menu and load back in

thick karma
#

Alright I will test that for giggles

calm depot
#

the fact it's bugged in-game may not be notable as it might simply be "recycling" the model from the creation screen

thick karma
#

Not like I'm making much progress e.g. lmao

calm depot
#

if it's still bugged after a re-load, now we know something

thick karma
#

I'll let you know.

calm depot
#

(more specifically, it means it's worth looking at the code that applies your outfit when you load a game)

bronze yoke
#

when in-game, does changing your equipment in an unrelated way (such as putting on glasses) fix it?

thick karma
fast galleon
#

I hope it's not something weird like trying to see why you can't add sheet rope, only to discover it's a duplicate item a mod adds for whatever reason that doesn't work.

thick karma
calm depot
#

right, so there's some logic somewhere that knows the correct order to apply clothing when you load the game

thick karma
#

Right.

#

And it's tied into how the clothes display in the creation panel

calm depot
#

makes sense that it breaks again when you respawn since, presumably, your code is executing again

thick karma
#

Question remains: wtf is it

#

haha

calm depot
#

I have the suspicion this is living in javaland

thick karma
#

Well even so I should be able to reorder things after Lua draws the menu right? If they get put out of order in Lua, they should be orderable via Lua...

#

Just gotta work out the timing and the how which sort of needs the why

calm depot
#

yeah of course, you can intercept the call

#

I was/am hoping there's a function that either returns the right order, or applies it

bronze yoke
#

what's the table called

thick karma
#

in that context it's just called definition @bronze yoke... Idk if it has a better name. P sure it just shows up as a table in debug console.

#

I wonder if this could be a relevant chunk.

    self.clothingCombo = self.clothingCombo or {}
    self.clothingColorBtn = self.clothingColorBtn or {}
    self.clothingTextureCombo = self.clothingTextureCombo or {}
    self.clothingComboLabel = self.clothingComboLabel or {}
    
    self.clothingCombo[bodyLocation] = combo
    self.clothingColorBtn[bodyLocation] = button
    self.clothingTextureCombo[bodyLocation] = comboTexture
    self.clothingComboLabel[bodyLocation] = label;
    
    table.insert(self.clothingWidgets, { combo, button, comboTexture })```
#

That insert should be putting each new item at position 1 in clothingWidgets, yeah?

#

What if they just... naively loop through clothingWidgets somewhere? (Maybe Java side) when equipping stuff?

young pasture
#

Hi. is it possible to create a player in debugging mode? because i want to test something for multiplayer

thick karma
young pasture
#

How

thick karma
#

Wait do you mean create a character normally, or add another player object to the game in addition to yourself?

young pasture
#

add another player object to the game

#

like i want to hit a player

thick karma
#

Ah, I've seen people create NPCs for certain mods but idk how. Maybe they call the IsoPlayer constructor from Lua to create an object and give it a position? Unsure, sorry. 😦

#

However, you can launch 2 instances of the game for MP testing.

#

That's what most of us do afaik.

#

You need to run in -nosteam mode.

young pasture
#

i created a shortcut desktop with -debug

thick karma
#

Before you do it, I recommend backing up Zomboid, because switching to -nosteam resets all the mod sandbox options that aren't available in -nosteam mode (which will usually be most of your mods during testing)

#

-debug is not enough. You will need to run one game in -nosteam -debug (the host), and run a client as -nosteam.

#

The client cannot be debug afaik. I do not know of a nosteam-friendly way to give them admin powers before they join the server, and non-admins cannot connect as debug.

young pasture
thick karma
#

It's the folder where you find mods, and mods is where you put local only mods.

#

That's where your mod needs to be to test with -nosteam.

#

But you should back up Zomboid entirely because it's just easier

#

I just duplicate Zomboid and name it Zomboid Steam

#

And rename Zomboid Steam when finished

young pasture
drifting ore
#

If you want

young pasture
#

Can i have the link

#

Thanks

drifting ore
#

Could use feedback if it's good enough

thick karma
drifting ore
#

Its at the bottom "how to test mods mp"

thick karma
#

@young pasture

young pasture
#

thanks

calm depot
#

@dull moss so uh, what does Bloodlust actually do?

#

the spreadsheet tells you everything except that

young pasture
#

Can i add a unique indicator/tag for item ?

calm depot
#

tags are arbitrary strings

young pasture
neon bronze
#

You can look for tags with hasTag(..)

young pasture
#

There is no tag

neon bronze
#

Its in your item definition

#

In the .txt file that you make you just write Tags = … and the your tags for it

bronze yoke
#

tags are per item script, not per instance, if that matters

young pasture
neon bronze
#

I think every events happens in mo aswell

#

Except maybe a handful

young pasture
sour island
#

Why does it feel like when I mess with server / client stuff, nothing works as expected 🤔

#

Didn't have these issues with pzShops or whatnot - maybe I'm just rusty with EHE and how many part there are

#

I have code in /server/ that when I'm hosting returns isServer false and isClient true

#

I am trying to move all the system parts to run off the server and just send the clients updates for syncing

#

The only way I got it to update accordingly is to send a command from /server/ to client to server

#

Which is what I was doing before - as I had all of the code in /client/

pulsar heath
#

im focusing on sp for now just because of that 😄

#

got the zombies to work with mp, all the client does is ask the server to do X

#

did the same for everything else... nothing works... back to zero

#

😄

#

so sp... when sp is done ill worry about mp

#

just having some problems in unrelated stuff that i want to add in the future ( flat tire and stall engine )

#

but i have time to figure it out, so not a issue at least for now

#

btw having no issues with EHE

#

client and server side

young pasture
#

Server

D:\SteamLibrary\steamapps\common\ProjectZomboid\ProjectZomboid64.exe -nosteam -debug

Client

D:\SteamLibrary\steamapps\common\ProjectZomboid\ProjectZomboid64.exe -nosteam

My client cannot conect to server. Any idea?

thick karma
#

Okay in CharacterCreationMain:loadOutfit(box) they have self:onClothingComboSelected(self.clothingCombo[bodyLocation], bodyLocation);... Chunk:

        elseif self.clothingCombo[location[1]]  then
--            print("dress on ", location[1], "with", options[1])
            local bodyLocation = location[1];
            local itemType = options[1];
            self.clothingCombo[bodyLocation].selected = 1;
            self.clothingCombo[bodyLocation]:selectData(itemType);
            self:onClothingComboSelected(self.clothingCombo[bodyLocation], bodyLocation);
            if options[2] then
                local comboTexture = self.clothingTextureCombo[bodyLocation]
                local color = luautils.split(options[2], ",");
                -- is it a color or a texture choice
                if (#color == 3) and self.clothingColorBtn[bodyLocation] then -- it's a color
                    local colorRGB = {};
                    colorRGB.r = tonumber(color[1]);
                    colorRGB.g = tonumber(color[2]);
                    colorRGB.b = tonumber(color[3]);
                    self:onClothingColorPicked(colorRGB, true, bodyLocation);
                elseif comboTexture and comboTexture.options[tonumber(color[1])] then -- texture
                    comboTexture.selected = tonumber(color[1]);
                    self:onClothingTextureComboSelected(comboTexture, bodyLocation);
                end
            end
        end

where location and options come from this:

    local saved_builds = CharacterCreationMain.readSavedOutfitFile();
    local build = saved_builds[name];
    if build == nil then return end;
    
    desc:getWornItems():clear();

    local items = luautils.split(build, ";");
    for i,v in pairs(items) do
        local location = luautils.split(v, "=");
        local options = nil;
        if location[2] then
            options = luautils.split(location[2], "|");
        end
        . . . . . 
        end

So when I load clothes, game seems to use use self.clothingCombo to call self:onClothingComboSelected which in turn sets the worn item like so:

function CharacterCreationMain:onClothingComboSelected(combo, bodyLocation)
    local desc = MainScreen.instance.desc
    desc:setWornItem(bodyLocation, nil)
    local itemType = combo:getOptionData(combo.selected)
    if itemType then
        local item = InventoryItemFactory.CreateItem(itemType)
        if item then
            desc:setWornItem(bodyLocation, item)
        end
    end
    self:updateSelectedClothingCombo();
    
    CharacterCreationHeader.instance.avatarPanel:setSurvivorDesc(desc)
    self:disableBtn()
end

Still not seeing why the order determines the layering of clothes but I am just sharing info hoping someone sees what I don't at this point lol...

opaque fiber
#

greetings. i'm attempting to make a mod that spawns ALL zombies with a hat. is there any easy way to accomplish this? i've tried using underweardistributions as a base to insert and add stuff, which DOES work and doesn't conflict with anything... except there's one slight problem - the base chance of anything spawning is 70%, as per the underweardistributions file... not very ideal

so, is there any workaround? or perhaps an alternative method i could use? this is my first time dabbling with zombie outfits and what not, any help would be greatly appreciated

pulsar heath
#

@thick karma i would like to help but i know nothing about that type of modding... to much for my small brain 😄

pulsar heath
#

dont know how to set the outfit though

vast nacelle
pulsar heath
#

for that he has to set the default outfit for the zombie population

#

i know there was a wway to do it with outfitmanager or something

#

but not my area of modding thats all the help i can give

#

i think he has to create a named outfit and then assign it to the zombie population

#

how... no idea

pulsar heath
#

no worries, sorry i couldnt be more of a help... but i dont have much knowledge about that part of the game code...

young pasture
#

How do i display print() in multiplayer ?

ruby urchin
thick karma
#

Ugh I just want to sort the list without borking clothes 😭 lol I hate having the sort working and not being able to use it because of this weird behavior I can't solve.

#

Oof

bronze yoke
#

they're totally separate, so you'll need to check the coop-console.txt to see what's actually going on on the server side

ancient grail
young pasture
#

any link reference on getting started with global mod data ?

ancient grail
fast galleon
#

Like reading skillbook where player keeps saying things like "Too complicated".

sour island
#

but I guess the issue could also be related to me being the host too

crimson sapphire
#

I just downloaded the superior survivors mod from steam and after turning it on, my cursor glitches out and becomes invisible but I can still click options. Anyone else getting this glitch?

fast galleon
crimson sapphire
#

No, I found it on YouTube and I thought that I could get some help here

rancid tendon
crimson sapphire
#

Yea I posted it there as well, sorry mates

#

for disturbing

frank cypress
#

alright does anyone know how to change the burglar alarm sound? trying to change "HouseAlarm" from sounds_world.txt doesn't do anything

pulsar heath
#

well mostly everything is sorted for now... time to make a test run and rage because i know some error will show after cleaning the code... it always does... something missing our out of place.

ancient grail
vast nacelle
#

OnTest is ran before the recipe is activated. If it comes back false, the recipe isn't clickable and doesn't appear in the context menu.
OnCreate is ran after the recipe is completed so you can make adjustments to the results or what not.
Edit: Whoops. That's OnCreate. Is OnPerform even a thing?

fast galleon
#

oops, *on perform. When the action completes. OnTest? Are you talking about recipes?

pulsar heath
ancient grail
fast galleon
ancient grail
#

I thought changing nicknames wasnt allowed on this server. Said anonymous but you manage to change yours poltergeist

#

Yep o got that. Now. Hmmm

fast galleon
ancient grail
#

Or maybe your able to click it but as you character do the action he will stop cuz theres poop on the sledge so he doesnt want to continue

#

Idk anonymous wanted to change his .

#

iirc When i accidentally tagged a diffrent person?

bronze yoke
#

it's not a server nickname

ancient grail
#

Ahhh

#

Whatcha workin on @bronze yoke

bronze yoke
#

i haven't done pz in a bit, i've been learning barotrauma modding instead

#

i do have a couple commissions coming up later and i'm always thinking about pz but no specific work on anything recently

rancid tendon
#

is anyone familiar enough with creating custom zombies that they can tutorialize me as to:

  1. forcing a specific zombie outfit to spawn with a specific hairstyle and hair color
  2. whether or not it's possible to force colors outside the range of those available in normal character creation?
    i tried looking around at the hairstyles xmls and stuff and it might be my sleep deprivation but
#

just couldn't wrap my head around em

ancient grail
#

Is that the submarine game?

#

I saw a submarine game and iirc it has a workshop

small topaz
drifting ore
#

How would you go about using multiple UIs in one mod, separate files for each UI or all in one?

#

Not familiar if you can actually just make multiple panels and just use that

#

Sounds simpler lol

ancient grail
#

I would do it separately

drifting ore
#

Hey btw can you add folders inside the client folder? Like to categorise the lua files

ancient grail
#

You can choose to make it as a single file but a ui already has alot of lines
So it would be harder to scroll up and down compare to just switch tab or if youre using multiple tab view then it would be easier

#

You can

drifting ore
#

Ohhhh damn that's gonna be a fucking gamechanger

#

Do I need special requires at the top or will it work normally

ancient grail
#

Idk what you mean

#

Like require? For folder? No

drifting ore
#

You know how you put require at the top if you need a variable from a file

ancient grail
#

If you need to link the file then yes

#

Even if they are on the same folder

drifting ore
#

Yeah aight gotcha, thanks man ❤️❤️❤️

ancient grail
#

Sample u have 2 files on the ISUI
Folder

Then u should still require "ISUI/some.lua"

bronze yoke
#

you should definitely do that, so long as your mod takes more than one file having folders means you can have way more boring filenames so long as your folder name is unique

ancient grail
#

On one of them
Which made me wonder
If they can require eachother

#

What are u building @drifting ore

bronze yoke
#

modname/file1.lua, modname/file2.lua is way nicer than modname_file1.lua, modname_file2.lua

bronze yoke
ancient grail
#

Like cause error?

bronze yoke
#

otherwise it's just an infinite loop of load file 1 -> load file 2 -> load file 1 -> load file 2

#

they don't cause an error but the require fails

ancient grail
#

Ahh ok

bronze yoke
#

or they do cause an error but it doesn't stop execution of the file, and it's not a pz red box error

drifting ore
#

That's why I need lots of UIs

ancient grail
#

But what if
1 req 2
2 req 3
3 req 1

Still breaks out?

#

We have that lol

bronze yoke
#

probably! i never tried it

#

it'll either break out or crash the game so like

#

just don't do it lol

ancient grail
#

On the server me and albion do mod stuff
We have a co modder there that did the exact same thing u want but i think its unlisted or maybe its just way too specifc for the server

astral dune
#

why does everything happen in this chat at 4am on a saturday 😩

bronze yoke
#

yeah he's been working on that for months

ancient grail
ancient grail
#

Wtf

#

24hrs difference lol

drifting ore
#

Is that possible

bronze yoke
#

nope

ancient grail
#

I dont know

astral dune
#

haha its not 4am here anymore, but it was when people started talking a lot

ancient grail
#

I dont think so

drifting ore
#

Lmao

ancient grail
#

Ahhh ok

drifting ore
#

Can you tell why I never went for programming (bad at numbers / math)

ancient grail
#

Whew i thought you lived on a diffrent planet or something

astral dune
#

gave up trying to read everything that happened since 4am, hopefully I didn't miss any good tips or resources

ancient grail
drifting ore
#

I just learn what I need to do something

#

If I don't need it I don't bother 🤣

astral dune
#

I lurk on here all day at work and no one says anything, go to bed at night and come back to hundreds of posts

pulsar heath
#

everytime i clean up the code something stupid happens like...
ExceptionLogger.logException> Exception thrown se.krka.kahlua.vm.KahluaException: TWEVENTSmain.lua:79: 'then' expected near eHeliEvent_new at LexState.lexerror line:278..

#

oops...

#

😄

#

forgot the then...

#

😄

drifting ore
#

Lol

ancient grail
pulsar heath
#

last error was ) missing

drifting ore
#

Thats admirable I only come here to ask a question get an answer and dont respond back 🤓

pulsar heath
#

im gonna start leaving me code in mode frankenstein

#

it works... uggly to look at but works...

#

😄

ancient grail
pulsar heath
#

i do... but i write a lot of --notes

#

so mostly my mod file is like... 40 lines of code

#

100 lines with notes 😄

#

but this should be good enough... just need to remove the prints when im done testing

bronze yoke
#

dashsalute comment writer

#

i only write todos and jokes, it's a bad habit of mine

pulsar heath
#

and i think all is well now... time to try it

#

man i love mod manager, whoever made this whenever they come to portugal has a dinner or lunch on me

ancient grail
#

Modmanager ? So you test on sp?

bronze yoke
#

last i heard that guy has been mia for months

ancient grail
pulsar heath
bronze yoke
#

i try to read everything i miss but sometimes there's several hundred messages

pulsar heath
#

having some issues with the exchange of commands from client to server, but this mod was made mainly for single player to begin with, so.... not that worries about not working in mp

#

but i know where i went wrong... prolly im doing something stupid as usual and sending the module name wrong like... a wrong case somewhere on the modules name... thats usually what happens with me...

#

twitch when it should be Twitch or the other way around... have to be more carefull with the names and take notes so that i dont do the same mistakes over and over again.

drifting ore
#

Can I get a W for this, in my first mod I put in a comment line within crediting the author of the timed action or UI whatever it was, "Robert Johnson" thanking him for his great coding skills (I assumed the author of the mod was that), until I now opened a file in the OG game files and found the same name and style at the top.

#

The timed action /UI I used in my mod, with my own changes ofc, also had that text at the top lmfao

golden sparrow
bronze yoke
#

a lot of the timed actions are prefaced like that, i think whichever mod you copied that from just copied that from vanilla

pulsar heath
#

if it doesnt then i know why my damn code isnt working on mp and it does on sp 😄

golden sparrow
pulsar heath
#

because im using a check if isclient and isadmin execute

#

so i guess ill have to rethink the code... later on... sp comes first

bronze yoke
#

isClient returns true on the client, isServer returns true on the server, both return false in singleplayer

pulsar heath
#

and here we go again...

#

forgot to convert the table value to number

#

so nothing triggers...

#

thats 7 stupid mistakes in less than 20m

#

a new personal record

mint helm
#

Hell of a lot of good that that scope does

pulsar heath
#

😄

tardy wren
#

Has something happened to the SuburbsDistributions in the recent patches?

#

A mod pack we run has errors with it, and all of them point towards loot table distributions inserting to it from across several mods

drifting ore
#

not in like the past year that i can tell

tardy wren
#

This begun to happen like... recently

#

Sometime after 41.78

bronze yoke
#

most likely one mod broke something and it causes all of them to have issues

tardy wren
#

A mod that removes some of the tables?

#

Oh, no...

#

It was renamed, but there is some mod compat for it

#

They still exist..?

small topaz
#

When I use the event OnGameStart to execute a particular function and put the code in the server folder, will the function then always be executed when a player enters a multiplayer game or will it only be executed when the admin starts the server?

pulsar heath
#

usually on gamestart is when the game starts

#

not when a player connects

#

but that me guessing

#

thats

#

...

small topaz
sour island
#

There's an event for connecting

#

Saw it in LuaNet

#

Wouldn't have thought of the name 'onGameLoad'

#

After the player initializes entirely

vast nacelle
#

As far as I know, OnGameStart fires whenever the game starts ( i.e. after the loading screen when joining/loading) for any user, client or server.

bronze yoke
#

i think the events for connecting are for the client

sour island
#

This would be specific to connections of clients

#

Yeah

#

If you need to differentiate

small topaz
#

So what I want to do: Whenever a server is started, a certain function should trigger but it should not trigger when a player enters the server. Critical stuff for me is only multiplayer here. (Singleplayer is not a problem since here, the function should always trigger when game is started or loaded and this could easily be done on OnGameStart afaik.)

vast nacelle
#

Correct me if I'm wrong, but I believe this achieves that

   if not isServer() and isClient() then return end

   -- Code stuff
end
Events.OnGameStart.Add(MyFunc)```
small topaz
#

Ok. Looks promising!

small topaz
golden sparrow
#

There's an OnServerStarted Event aswell

vast nacelle
#

The client will still call MyFunc but immediately exit without doing anything else in there.
Probably better to reverse the if statement and put it around the Events.OnGameStart.Add. 🤷‍♂️

   -- Code stuff
end
if isServer() and not isClient() then
   Events.OnGameStart.Add(MyFunc)
end```
The client will never call MyFunc, so almost unnoticeably better in performance since the client isn't wasting time.
bronze yoke
#

the not isClient() is redundant but yeah, this is the best way of doing it