#mod_development

1 messages · Page 552 of 1

shadow geyser
#

try displayCategory = watercontainer

#

that is what the water bottle has

#

for the empty water bottle that is

late hound
#

turn on Manual drinking option in your settings

static oyster
#

is there any boolean to detect if a house alarm / car alarm is playing / has been triggered etc or if a zombie can hear an alarm or something

simple briar
#

where can I find the VHS tapes script? i couldn't find it in the media files

static oyster
#

is it not possible to get the player last position?

#

throws me errors

full ocean
#

#projectzomboid #zomboid
Imagination required: For the next Project Zomboid challenge , I'm playing with Floor is Lava rules in place, similar to Glock9's 7 Days to Die Playthrough: https://www.youtube.com/watch?v=aD491FlHBdE
So glad everyone has enjoyed what has come so far with the all negative traits character, and there will definitely be mo...

▶ Play video
#

im a bit late to the party but has anybody made challenge mods for amphibian

static oyster
#

can't you just sed the zombies to ignore player built structures?

static oyster
#

zombie lore

#

np mate

sage bluff
#

Hi, I’m trying to learn to mod, does anyone have any tutorials for modding? I tried blackbeards tutorials on YouTube but they didn’t work for me.

sage bluff
#

oh lol, i meant to make mods

#

ok

crisp goblet
#

my comment removed because 'wrong channel

thin hornet
#

If you have an idea of what you want to do you can ask here. We may be able to point you in the right direction.

#

also you will find all the mod you have subscribed to here C:\Program Files (x86)\Steam\steamapps\workshop\content\108600

sage bluff
#

Ok thanks

#

Also, I tried making a mod a while ago, I put the mod into the mods folder and it did come up in the mods section but wasn’t enabling

#

Do you know why this happened?

thin hornet
#

You can copy/paste C:\Users\<user>\Zomboid\Workshop\ModTemplate into C:\Users\<user>\Zomboid\Workshop and rename it to your mod name and also rename the mods info in both workshop.txt and mod.info.

midnight mica
#

anyone have any idea why my event Events.OnMechanicActionDone fires 4 times in thesame second for some players? i'm trying to link a logsystem to this event to show what has been uninstalled, but its acting up

sage bluff
thin hornet
thin hornet
static oyster
#

I need a little help by any experienced coder, something i think should be simple for the ones that know best..

midnight mica
midnight mica
#

the vehicle id in the log also differs for every log made, which is very weird

thin hornet
static oyster
#

and I think its due to my inexperience with coding and or 0 experience with lua even tho its similar do c#

#

one of the things not allowing me to complete is.. let me see how to better word everything

#

if my character is moving the player is detected and the zombies starts to follow it, but as soon as I sneak / stop moving.. its like the player is magically gone.. the zombies will stop immediately (because of the zombie:setUseless), I tried using a boolean for that but as you probably guessed

#

the boolean is always being set true and false

#

I would need to show you the code for you to understand it better tbh

#

I'm using a combination of character modes (isSneaking, isMoving, isRunning) and a distance check between zombie and player + setUseless to achieve a fake blind zombie behaviour

#

again.. it works.. if you sneak and walk by them.. its like they are blind.. but if you run they will notice you and run after you, the problem is.. if you stop, they also stop

#

I want them to keep following the character

thin hornet
#

You could add a "delay" like you increment a variable that say how long the player has been sneaking and if that number is higher than X then set the zombie back to blind

#

You can dm me with some code ill check with you

static oyster
azure rivet
#

Hello, how can I make a weapon not rotate when attacking?
That it always stays static in the hand.

sage bluff
#

thanks so much @thin hornet , my mod works

#

still need to work out some bugs but thank you so much

thin hornet
sour island
#

Katamari PZ edition

sage bluff
#

i have no idea, it changes wherever you look

#

it can be colours, doors, grass when it is supposed to be a opened can

sour island
#

what is the item's script block?

thin hornet
#

XD that is weird

sage bluff
sour island
#

and you have that icon in the textures folder?

sage bluff
#

yeah

#

although im not sure if it is right or not, i got it from someone else

sage bluff
#

thanks for making me recruit btw

static oyster
#

Anyone know how to set a timer ?

shy silo
#

is there any mod that adds foods/drinks with energy?
had snake's modpack which added energy drinks but its outdated now unfortunately

autumn sierra
#

anyone have any idea how hard it would be to set up a system similar to the way T-Shirts with decals work in the game on baseball hats?

#

or hoodies even

tepid spoke
#

Hi there! Are there some good mods that add to the game (items / cars / stuff) and are very stable?

#

currently on the beta branch

viral notch
#

guys have problem

#

with textures for vehicle

#

in blender and photo editor see the same

#

in game

#

is orange and cannot change color or see scratches or blood ///

#

all texstures are done correct

#

so RUST BLOOD DMG COLOR texstures not works

#

only what works is MASK and LIGHTS texture

#

sorry color mask works but only for lights/wheels/black area of car

jagged shoal
viral notch
#

ok after 5 restarts game.... it become black

viral notch
#

not sure how it works really

#

value 1 make it black

viral notch
#

that blood rust and dmg?

#

or something else

ivory bridge
#

yknow im surprised no one has made a mod of ash's chainsaw hand

foggy spade
#

yo
if anyone here could help me out with starting up and hosting a modded server
i have all the mods installed properly and eveyrhting works in SOLO
but doesnt when i host
and ive looked through multiple threads on this server, on steam, and everywhere else and im still confused af

#

if ya could hop on vc and i could screen share, @ me or dm me
otherwise imma go insane

wooden falcon
#

Is there a way to modify the player's movement speed? I read that the run speed modifier on clothing items got disabled a few months ago and so even though items can say they have a run speed modifier, they don't actually. Is there any other way that a mod could adjust the player's movement speed?

karmic violet
#

does anyone know any gun mods that don't add too many guns, but simply adds a couple guns to each caliber.

(please don't say brita's gun mod because it adds FAR to many guns and 0 mags so you cant even use them)

smoky meadow
frosty falcon
pearl prism
pearl prism
sage bluff
#

hi, does anyone know how to make a custom hat, im not too sure about how to make the custom meshes and where they go in the file directory

magic rapids
#

Can anyone make an updates modding system where you can inspect your weapon and customise it(kinda like a cod modding system)

#

updated*

karmic violet
karmic violet
frosty falcon
#

you expect everywhere you go to stock what you need..?

smoky meadow
smoky meadow
karmic violet
smoky meadow
alpine scroll
#

Anyone here knows how clothing.xml works?

#

I am trying to create a custom outfit with existing items, however the zombies are spawning naked

pulsar rock
#

How does one add sandbox settings to their mod?

winter bolt
alpine scroll
winter bolt
#

yeah you just need to copy it from the vanilla table to your own, you dont need any of the files for the item

#

oh wait do you have a fileguidtable.xml already or not?

alpine scroll
#

No I do not

#

Not for the mod that I am doing

#

But thank you @winter bolt , I think you nudged me to the right direction

winter bolt
#

np lol

#

you just need to make fileguidtable.xml in the media folder and then add in the stuff you need from the original file

dusk saddle
#

Howdy, folks. Taking a break from struggling to get the darn jacket working and have a question regardin' evolv'd recipes. As an example, I'm creating some knock-off Lunchables for my mod and have given the pizza variants the ability to add various ingredients. I'm wanting to make the sauce packet have three uses, and so would've thought EvolvedRecipe = PIPizza:3, would do that, though it doesn't seem to do very much. I could give it three packets, but I'd prefer for it to just have one single packet with three uses. Is there another means to accomplish that? Is the fact that the sauce gives very little nutritional value the problem?

pulsar rock
#

@deft falcon, apologies for the ping. I've been looking at your MoreTraits repo to figure out how to add Sandbox options, but it doesn't seem to be adding the options to my sandbox menu. The defaults do seem to apply, however.

#

Any chance you could help me out or link me to some documentation you found?

deft falcon
#

@pulsar rock

#

i think this was the one

pulsar rock
#

Much appreciated!

pulsar rock
deft falcon
#

idk

pulsar rock
#

Sandbox_EN.txt

Sandbox_EN = {
    Sandbox_SkillLimiter = "Skill Limiter",

    Sandbox_SkillLimiter_AgilityBonus = "Agility Bonus",
    Sandbox_SkillLimiter_AgilityBonus_tooltip = "The bonus to the skill cap for agility skills. (0 - 3)",

    Sandbox_SkillLimiter_CombatBonus = "Combat Bonus",
    Sandbox_SkillLimiter_CombatBonus_tooltip = "The bonus to the skill cap for combat skills. (0 - 3)",

    Sandbox_SkillLimiter_CraftingBonus = "Crafting Bonus",
    Sandbox_SkillLimiter_CraftingBonus_tooltip = "The bonus to the skill cap for crafting skills. (0 - 3)",

    Sandbox_SkillLimiter_FirearmBonus = "Firearm Bonus",
    Sandbox_SkillLimiter_FirearmBonus_tooltip = "The bonus to the skill cap for firearms skills. (0 - 3)",

    Sandbox_SkillLimiter_SurvivalistBonus = "Survivalist Bonus",
    Sandbox_SkillLimiter_SurvivalistBonus_tooltip = "The bonus to the skill cap for survival skills. (0 - 3)",

    Sandbox_SkillLimiter_PassivesBonus = "Passives Bonus",
    Sandbox_SkillLimiter_PassivesBonus_tooltip = "The bonus to the skill cap for passives skills. (0 - 3)",
}
deft falcon
#

do you also have translation files

#

oh right

pulsar rock
#

sandbox-options.txt

VERSION = 1,

option SkillLimiter.AgilityBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 2,

    page = SkillLimiter,
    translation = SkillLimiter_AgilityBonus,
}

option SkillLimiter.CombatBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 1,

    page = SkillLimiter,
    translation = SkillLimiter_CombatBonus,
}

option SkillLimiter.CraftingBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 0,

    page = SkillLimiter,
    translation = SkillLimiter_CraftingBonus,
}

option SkillLimiter.FirearmBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 1,

    page = SkillLimiter,
    translation = SkillLimiter_FirearmBonus,
}

option SkillLimiter.SurvivalistBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 0,

    page = SkillLimiter,
    translation = SkillLimiter_SurvivalistBonus,
}

option SkillLimiter.PassivesBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 3,

    page = SkillLimiter,
    translation = SkillLimiter_PassivesBonus,
}
#

Like, the settings appear to be working fine

#

Their defaults are

#

I hosted a local server and made myself admin; But the mod's sandbox options aren't showing up in there.

deft falcon
#

welcome to zomboid modding

pulsar rock
#

😩

deft falcon
#

yea idk the text is literally the same as the one in my other mod

#

where are the files put btw

pulsar rock
deft falcon
#

sandbox options is in media right

pulsar rock
#

Yep

deft falcon
#

legit no idea

pulsar rock
#

Hm

deft falcon
#

do the options show in single player

pulsar rock
#

Do mod sandbox options show up in singleplayer saves on world creation?

#

Was about to give it a try

deft falcon
#

yea they should

pulsar rock
#

Let's see

deft falcon
#

yea all text is what it should be

#

no missing , either

#

legitimately have no idea whats up

#

have you remembered to restart pz

#

or reload lua

pulsar rock
deft falcon
#

try restarting pz

pulsar rock
#

Tried that already

deft falcon
#

what the fuck

#

i legitimately have no idea how thats possible

#

im comparing ur code to mine and theres no difference (apart from the names ofc)

pulsar rock
#

I wonder if I did a typo somewhere hmm

#

Though

deft falcon
#

nah

pulsar rock
#

The defaults are applying (I verified this)

#

This is wack

#

So, the settings are working

#

Just not... showing up

#

This channel is about creating mods

deft falcon
#

there are no missing quotes or commas

pulsar rock
#

I believe so?

deft falcon
#

i legitimately have no idea

pulsar rock
#

My IDE isn't giving me any warnings, at least

deft falcon
#

my sandbox-options.txt

VERSION = 1,
option ETE.StartItems
{
    type = boolean,
    default = true,
    
    page = ETE,
    translation = ETE_StartItems,
}

my translate file

Sandbox_EN = {
    Sandbox_ETE = "Extra Trait Effects",
    Sandbox_ETE_StartItems = "Starting Items",
    Sandbox_ETE_StartItems_tooltip = "If this setting is on, traits and professions will receive unique items at the start of the game.",
}
#

comparing my code to yours has no difference

#

excluding different names

pulsar rock
#

I'm very confused

#

It looks alright

#

@smoky tendon, we require your aid

midnight mica
#

does assigning a new property value by using getModData() not persist after server restarts?

pulsar rock
#

@deft falcon I don't need any lua script in the client folder, right?

deft falcon
#

i dont think so

pulsar rock
#

@willow estuary I'm terribly sorry for pinging you over this. Neither Fajdek nor myself have found what's wrong, and you linked the example mod for sandbox options. Is there any chance you could provide some insights as to what might be wrong?

#

Sandbox_EN.txt

Sandbox_EN = {
    Sandbox_SkillLimiter = "Skill Limiter",

    Sandbox_SkillLimiter_AgilityBonus = "Agility Bonus",
    Sandbox_SkillLimiter_AgilityBonus_tooltip = "The bonus to the skill cap for agility skills. (0 - 3)",

    Sandbox_SkillLimiter_CombatBonus = "Combat Bonus",
    Sandbox_SkillLimiter_CombatBonus_tooltip = "The bonus to the skill cap for combat skills. (0 - 3)",

    Sandbox_SkillLimiter_CraftingBonus = "Crafting Bonus",
    Sandbox_SkillLimiter_CraftingBonus_tooltip = "The bonus to the skill cap for crafting skills. (0 - 3)",

    Sandbox_SkillLimiter_FirearmBonus = "Firearm Bonus",
    Sandbox_SkillLimiter_FirearmBonus_tooltip = "The bonus to the skill cap for firearms skills. (0 - 3)",

    Sandbox_SkillLimiter_SurvivalistBonus = "Survivalist Bonus",
    Sandbox_SkillLimiter_SurvivalistBonus_tooltip = "The bonus to the skill cap for survival skills. (0 - 3)",

    Sandbox_SkillLimiter_PassivesBonus = "Passives Bonus",
    Sandbox_SkillLimiter_PassivesBonus_tooltip = "The bonus to the skill cap for passives skills. (0 - 3)",
}
#

sandbox-options.txt

VERSION = 1,

option SkillLimiter.AgilityBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 2,

    page = SkillLimiter,
    translation = SkillLimiter_AgilityBonus,
}

option SkillLimiter.CombatBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 1,

    page = SkillLimiter,
    translation = SkillLimiter_CombatBonus,
}

option SkillLimiter.CraftingBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 0,

    page = SkillLimiter,
    translation = SkillLimiter_CraftingBonus,
}

option SkillLimiter.FirearmBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 1,

    page = SkillLimiter,
    translation = SkillLimiter_FirearmBonus,
}

option SkillLimiter.SurvivalistBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 0,

    page = SkillLimiter,
    translation = SkillLimiter_SurvivalistBonus,
}

option SkillLimiter.PassivesBonus
{
    type = integer,
    min = 0,
    max = 3,
    default = 3,

    page = SkillLimiter,
    translation = SkillLimiter_PassivesBonus,
}
#

The defaults are applying just fine it seems, but the options aren't showing up in the sandbox options menu.

viral notch
#

Have problem with blood texture ... due when car hit and smashed zombie then nothing happen... car stay clean

#

but when add it by Vehicle Blood option

#

someone can tell me how to make it works correct

pulsar rock
#

Is this your own mod? Or are you asking about a mod you installed?

viral notch
#

my own from 0 to 1

#

model works

#

all works as should just have problem with rust/blood/dmg texstures

#

where rust somehow fixed but only appear when spawn (random)
dmg... idk why the faq but only works on windows
and blood as you see works but not works

#

the problem is that whole model use same texstures so it works on half car and second half not

#

yes car have 2 uv's map

#

so im out of idea ... fighting second day with it

thin hornet
# pulsar rock

can you verify that its loading your local workshop mod and not the subscribed mod?

pulsar rock
thin hornet
#

mhm

pulsar rock
#

And the icon in the mod list shows as local file

#

(Using the mod menu mod)

thin hornet
#

are you 41.71 or 72?

pulsar rock
#

I'm on the release, not beta

#

71, right?

thin hornet
#

yeah

#

you restarted the whole game too

pulsar rock
#

Yep

thin hornet
#

i supose

pulsar rock
#

Multiple times now

thin hornet
#

yeah

#

can you send me a copy and i test too?

pulsar rock
thin hornet
pulsar rock
#

The heck

#

Now I'm wondering if there's some weird caching thing going on with the old version of the mod

#

Gonna restart Steam

thin hornet
#

but im not on.71

#

in your mods directory

pulsar rock
#

?

thin hornet
#

can you see the actual path it take

pulsar rock
#

Let's see

#

Crap

#

I see what's going on

#

It's using my Workshop folder mod

#

🤦‍♂️

#

I'm so very sorry about all of this

#

Thanks for the tip to check the path in the mods menu

thin hornet
#

yeah singleplayer is weird, its the only mode that give priority to the steam workshop

pulsar rock
#

Wait, what

#

I don't even have the mod in the workshop folder

thin hornet
#

i usually dont have this problem

pulsar rock
pulsar rock
#

Different workshop folder

#

Why is there 2

#

Mod updated 🙏

thin hornet
#

you have the workshop dir for your local mod and the one from steam for subbed mods

viral notch
#

so no onehave idea how to fix blood xD

thin hornet
thin hornet
#

oh

thin hornet
viral notch
#

by debug

thin hornet
#

yeah just where do you get it i dont see it anywhere

viral notch
#

right click on vehicle and debug tools Blood UI ?

#

it was there since 2013 xD

thin hornet
#

nope

viral notch
#

but you know

thin hornet
#

ah ok

#

lol

viral notch
#

you need to get out of car

#

xD

thin hornet
#

damn it

#

ok its cleans the cars automatically

#

while its open

viral notch
#

due all is on 0set by default

thin hornet
#

so your car doesnt add blood when hitting zombie but when adding it manually it works

viral notch
#

yes

#

any idea ?

thin hornet
#

hum nope the fact you can add it manually

#

and its not adding it on collision

#

looks like a collision problem maybe ive never made custom car so not quite sure how that part works

viral notch
#

all set around my model

#

i need help someone whos make vehicle for PZ or The Indie Stone dev...

true hollow
#

Does anyone know a command to disable the spawn of a specific item and put another one in its place? In my mod in the part "C:\Users\Windows\Zomboid\Workshop\MyCoolMod\media\lua\server\item" -> "MyCoolMod_Distributions", I put this command
"
local function postDistributionMerge()
ReplaceItemInDistribution(SuburbsDistributions, "Base.Item", false, "MyMod.Item", false, true);
end
Events.OnPostDistributionMerge.Add(postDistributionMerge)
"
I didn't find the item on the map (I think), but I found the item inside a car, does anyone know how to fix it?

true hollow
#

I created it but it kept spawning

viral notch
#

(SuburbsDistributions, "Base.Item", false, "MyMod.Item", false, true);
(SuburbsDistributions, "Base.Item", false, "MyMod.Item", true);

#

that what i do my replacement

shadow flower
#

Does anyone have experience adding localization to their mods? I added Spanish, English and Russian with no issues, but now I'm trying to add German, French and Polish and it isn't adding the translations in game for some reason this is what the folders and files look like for German.

jaunty marten
#

be sure u changed langs to DE exactly in files

#

@shadow flower

robust trail
#

Hello, I would like to commission very simple mod that makes cold weather more deadly for survivor and destroys crops at low temperatures. If someone is interested and has required knowledge DM me.

shadow flower
lucid spindle
#

Anyone know anything about the palette parameter of createZombie()?

shadow flower
midnight mica
#

anyone know if its possible to send a confirmation message in chat to the current player, like this:

viral notch
#

any idea

#

how to fix that

#

...

#

btw dmg zone works on hits

#

and textures also

#

just blood not apply on contact

drowsy citrus
viral notch
gilded hawk
#

Does anyone know what these Sandbox.vars translates to normal settings?

SandboxVars.Zombies = 2;
SandboxVars.WeaponLoot = 3;
SandboxVars.RangedWeaponLoot = 5;
SandboxVars.AmmoLoot = 5;

Like, is zombie 2 apocalypse settings?

And ammo loot abundant?

These settings are from media\lua\client\LastStand\Kingsmouth.lua

sour island
#

I think those names correlate with the java file's setting's names.

sour island
#

@gilded hawk, Found in media/lua/shared/translate

    Sandbox_ZombieCount_option2 = "Very High",
    Sandbox_ZombieCount_option3 = "High",
    Sandbox_ZombieCount_option4 = "Normal",
    Sandbox_ZombieCount_option5 = "Low",
    Sandbox_ZombieCount_option6 = "None",
``` ```    Sandbox_Rarity_option1 = "Extremely Rare",
    Sandbox_Rarity_option2 = "Rare",
    Sandbox_Rarity_option3 = "Normal",
    Sandbox_Rarity_option4 = "Common",
    Sandbox_Rarity_option5 = "Abundant",
gilded hawk
#

Apparently the kingsmouth challenge is more fun than expected

steep cave
#

anyone here use nitrado to host ?

autumn garnet
#

Hey 🙂 can you remove this TIS please```java
public void setModID(String var1) {
if (GameClient.bClient) {
if (this.modID == null) {
this.modID = var1;
} else if (!var1.equals(this.modID) && Core.bDebug) {
WorldDictionary.DebugPrintItem(this);
throw new RuntimeException("Cannot override modID. ModID=" + (var1 != null ? var1 : "null"));
}
}

}``` ?

#

we cannot connect to the server with the debug

ancient grail
#

anyone knows how to reload a mod that is being edited in real time

it takes to reload the game and i jist want to slowly learn while scripting

is there a way to do this that is applicable to the latest version

im just modding items and traits no maps involved thnx in advance

shadow geyser
# ancient grail anyone knows how to reload a mod that is being edited in real time it takes to...

depends on the file. alot of lua files that just declare functions can be reloaded from the f11 menu in debug mode. just need to search for the file in that browser and press reload. but if it is lua code that adds/modifies lua objects in some particular ways, you have to just reload the game. I guess you could technically write alot of code to handle to lua env to make it as if you reloaded in those cases, but that would be alot of work. as for scripts like the ones defining recipes and items, I don't know how you would reload them other than exiting and reentering the world. I think traits are in that section of lua stuff that would need a reload since I think they are just defined in lua, but handled by java. although I may be wrong.

ancient grail
shadow geyser
#

yes. alot of lua stuff can just be reloaded but not all. and with any .txt files you are shit out of luck to my knowledge

ancient grail
#

ok thnx for the infos i guess i dont have a choice but to write the code neatly. i mean im still experimenting so its kind of hard

shadow geyser
#

just to give a couple examples of the lua stuff that can't just be reloaded. Functions which you then give the function to an event handler, it won't be enough to reload the file unless you have addition lua code to remove the old one from the event handler. although maybe you could do some funky stuff with local imports inside the functions to handle that but Im not sure. UI stuff also are all created once in the beginning so extra stuff would be needed to make sure they are created properly. Ive never looked into how possible that is to do in lua though so idk if there is a work around there. Distribution changes can't just be reloaded, unless you properly remove the additions from the previous load of the file. there probably is more but I can't think of them atm

drowsy citrus
# karmic violet ill look at it, thanks!

https://www.youtube.com/watch?v=7ksDELl37bc

personally i prefer vanilla expansion because it keeps added guns limited to a few but they're very intentional additions and they fit better alongside the original guns. it also adds tweaks to existing vanilla weapons (i.e. 1911 actually looks like a 1911, bolt action guns have 5 shots and an integral magazine, etc

hasty viper
#

hey can someone help me with some of my mods dm me

worldly bone
#

Hello everybody!! i hope there is no problem that i'm posting here a project zomboid mod collection made for me. i would like to share with you and i hope you like it!! suggestions are welcome. thumbs up and rating is appreciated. See you soon survivers!
https://steamcommunity.com/sharedfiles/filedetails/?id=2834233804

Steam Workshop: Project Zomboid. [h1][b]Mostly focused on keep the vanilla essence but improving the project zomboid experience. SP and MP compatible. 139 Lore friendly mods in one click![/b][/h1]

[b][u]None of these mods are owne

pearl prism
worldly bone
#

haha i would like such mods!! it's just a cool picture of a cool movie and i think it fits with multiplayer project zomboid experience.

azure rivet
#

hello, in a weapon how can I remove the option to place in primary hand?

sour island
azure rivet
sour island
#

Weapons can't be used from the second hand - what kind of mod are you making?

wooden lodge
#

Hello, could someone help me out with making an item that teleports you back to your safehouse once consumed?
Please ✉️ DM me directly as I'll most likely miss this here due to a busy schedule. Thank you in advance.

sour island
#

I feel like Aza made something like that already

azure rivet
#

Reminds me of the Magic Mirror from Terraria.

wooden lodge
#

Yes, we really need it. We're hosting events a lot and offering people TP to and back from the area is a bit ... stressful for staff

#

Giving an item to people to just poof and go back to their safehouse... Would be way better.

azure rivet
#

and it does not help me to put it in the right since it is placed with the wrong orientation.

azure rivet
wooden lodge
#

Exactly, it would make things so much easier and I'm sure a one way ticket back to safehouse isn't that hard to code either I'm just too dumb with those things

thin hornet
#

So technically
thats how you get teleported

-- On the client, when received from the server
player:setX(x);
player:setY(y);
player:setZ(z);
player:setLx(x);
player:setLy(y);
player:setLz(z);
#

but that will definitively kick you if you use it just like that from a client.

wooden lodge
#

The goal would be an item to eat that will teleport player X to their safehouse and player Y to their safehouse, not everyone to the same location

#

Just like when you're an Admin and you check the Safehouse List and use "Teleport"

thin hornet
#

admin teleport is all done using admin commands

#

something that cant be done for a regular player

wooden lodge
#

So there's no way to make a teleporter that teleports people back to their safehouse when consuming? It would help so much.
Teleporting 30 people back to their safehouse is a hassle

thin hornet
wooden lodge
#

What about adding a command to this:

#

Like the option you get when an admin right clicks in the Mini Scoreboard

thin hornet
wooden lodge
#

Instead of Teleport or Teleport To You, is there no way to add a Teleport to Safehouse?

#

So admins could at least "send" people back to thei rSafehouse that way

#

That would be a different approach

thin hornet
#

Im researching but real quick i cant think of any situation where a player teleport

#

might be worth check the RV Interior mod

#

and see how he teleport player inside the RV

wooden lodge
#

Adding an option to teleport people to their Safehouse wold probably be a good point to start
Why not add it to the vnailla game hmmmm haha

thin hornet
#

the respawn at safehouse is different its not a teleport

#

its a starting point

#

at the character creation its set the position from the safehouse

wooden lodge
#

Yes, but using "Teleport" in the Mini Scoreboard is an admin command teleporting YOU to thei r safheouse
Is there no way to edit that so you can teleport OTHERS to that location you are meant to be? If that makes sense at all

thin hornet
#

i know what you mean

#

but no

wooden lodge
#

I mean you can teleportthem to you already

thin hornet
#

stuff that is java is not editable

#

admin commands are only for admin and if there is no other command allowing us then we cant

#

otherwise it might require to turn off some anti-cheat

wooden lodge
#

So you're saying we can't add another admin command?

#

As that's locked behind Java literally?

thin hornet
#

to allow using

-- On the client, when received from the server
player:setX(x);
player:setY(y);
player:setZ(z);
player:setLx(x);
player:setLy(y);
player:setLz(z);
abstract raptor
#

if you can get past the anti cheat whatever

thin hornet
#

well technically you can add a server command with a java mod on your server

abstract raptor
wooden lodge
#

They're adding more admin commands, why not allowing admins to TPpeople to their safehouse too

#

That would solve all those issues 😂

thin hornet
#

admin can teleport others

#

non admin cannot teleport

wooden lodge
#

Yes

#

That's what I mean

#

Can we not get a function to right lcick and teleport them to safehouse?

#

Even with modding?

abstract raptor
#

did you know the mini scoreboard allows you to teleport somebody too

wooden lodge
#

I let go the idea of them being able to TP themselves

#

If at least admins could TP peple to safehouse without going there first and then summoning htem

#

That'd be a huge help already

thin hornet
#

well yeah you can easily make an option for admin to teleport someone to its own safehouse

wooden lodge
#

That's what I meant! YES, YEEEES

#

please

#

😂

#

Events are hosted by staff anyways, so adding an option to TP players to their safehouse would be the golden solution omg

wraith root
#

What are people using to work with the Java end of the mod commune?

#

Storm seems to be abandoned since last year

#

And a lot of mods I see are too complex for Lua

#

Unless I am underestimating this new API with 41

jagged ingot
#
onTick() {
  // Calculate delta
  // Check against a max delta security check (Vehicles with different max deltas)
  // Enforce max delta by resetting position or kicking the player
}
thin hornet
#

@wooden lodge

local function teleportPlayerToItSafehouse(player, safehouse)
  if isAdmin() then
    local x, y, z = safehouse:getX(), safehouse:getY(), safehouse:getZ();
    SendCommandToServer("/teleportto \"" .. player:getDisplayName() .. "\" " .. tostring(x) .. " " .. tostring(y) .. " " .. tostring(z));
  end
end

--- somewhere with the reference of the player to teleport
local safehouse = SafeHouse.hasSafehouse(player);
if safehouse then
  teleportPlayerToItSafehouse(player, safehouse);
end
jagged ingot
thin hornet
#

@wooden lodge what you could do is use the context menu named "[ADMIN] Teleport player to it safehouse" then loop all online players that has a safehouse and add as sub-option with each player and when clicked then it run that function teleportPlayerToItSafehouse written earlier.

wooden lodge
thin hornet
#

wait a sec

wooden lodge
#

Sure, take all your time, I really appreciate your help even though I'm probably going to end up needing a step by step on this

thin hornet
#
local function teleportPlayerToItSafehouse(player, safehouse)
    if isAdmin() then
        local x, y, z = safehouse:getX(), safehouse:getY(), safehouse:getZ();
        SendCommandToServer("/teleportto \"" .. player:getDisplayName() .. "\" " .. tostring(x) .. " " .. tostring(y) .. " " .. tostring(z));
    end
end

local function doAdminTeleportToSafehouseMenu(_, context, worldobjects, test)
    if not isAdmin() then return; end
    
    local entries = {};

    -- Check all online players if they have safehouse
    local players = getOnlinePlayers();
    for i = 0, players:size() - 1 do
        local player = players:get(i);
        local safehouse = SafeHouse.hasSafehouse(player);
        if safehouse then
            table.insert(entries, { player = player, safehouse = safehouse });
        end
    end

    -- Loop for each entry we have
    if #entries > 0 then
        local debugOption = context:addDebugOption("Teleport Player To Safehouse");
        local subMenu = ISContextMenu:getNew(context);
        context:addSubMenu(debugOption, subMenu);

        for i = 1, #entries do
            subMenu:addOption(entries[i].player:getUsername(), entries[i].player, teleportPlayerToItSafehouse, entries[i].safehouse);
        end
    end

end
Events.OnFillWorldObjectContextMenu.Add(doAdminTeleportToSafehouseMenu);
#

add this to a lua/client/MyMod/AdminTeleportPlayerToSafehouse.lua

wooden lodge
#

I assume in here? Kaeldor\media\lua\client

thin hornet
#

yeah

wooden lodge
#

Now the question is, how do I test that? Does it show up only in the Mini Scoreboard or how do I pull it up?

thin hornet
#

Log as admin

#

right click

#

context menu should show the option only if there is online players

#

also if they have safehouse

wooden lodge
#

Let me see, I'll host a local server and see if the context menu shows it

#

The other stuff... Guess I need to test when our server is updated

wraith root
#

o 3o

thin hornet
#

it will only show if you have online players with safehouse

#

that do includes you tho

wraith root
#

From the use of that Lua seems to be the answer there lol

wooden lodge
#

Let's see

#

I'll claim a safehouse real quick and test

#

so I can technically TP myself to my safehouse with that?

thin hornet
#

yeah (i think so)

wooden lodge
#

Odd things happening 😂 After the This is how you died screen I'm stuck at a black screen rn

#

Will Alt F4 and try again lmao

thin hornet
#

check console.txt

#

before reopening the game

viral vale
#

Ayy yo, i'm interested in doing some 3D modelling on some mods for PZ, where can I go to find a group? Or how should one approach this?

wooden lodge
#

Throws an error when right clicking as admin @thin hornet

thin hornet
#

console.txt

wooden lodge
#

There you go

thin hornet
#

@wooden lodge make sure to re-copy this code

#

i fixed it after sending it

#

i think u have the older one

wooden lodge
#

Restarting and will report again, replaced it now

#

No errors when right clicking at first, gave myself a custom safezone, right clicked again, errors

#

No safehouses = no errors, just tried that too @thin hornet

thin hornet
#

@wooden lodge its because i used unstable version code

#
local function teleportPlayerToItSafehouse(player, safehouse)
    if isAdmin() then
        local x, y = round(safehouse:getX() + safehouse:getW() / 2), round(safehouse:getY() + safehouse:getH() / 2);
        local command = "/tpto \"" .. player:getUsername() .. "\" " .. tostring(x) .. "," .. tostring(y) .. ",0";
        player:Say(command);
        SendCommandToServer(command);
    end
end

local function doAdminTeleportToSafehouseMenu(_, context, worldobjects, test)
    if not isAdmin() then return; end
    
    local entries = {};

    -- Check all online players if they have safehouse
    local players = getOnlinePlayers();
    for i = 0, players:size() - 1 do
        local player = players:get(i);
        local safehouse = SafeHouse.hasSafehouse(player);
        if safehouse then
            table.insert(entries, { player = player, safehouse = safehouse });
        end
    end

    -- Loop for each entry we have
    if #entries > 0 then
        local addOption = context.addOption; -- 41.71
        if context.addDebugOption then addOption = context.addDebugOption; end -- 41.72+
        local debugOption = addOption(context, "Teleport Player To Safehouse");
        local subMenu = ISContextMenu:getNew(context);
        context:addSubMenu(debugOption, subMenu);

        for i = 1, #entries do
            subMenu:addOption(entries[i].player:getUsername(), entries[i].player, teleportPlayerToItSafehouse, entries[i].safehouse);
        end
    end

end
Events.OnFillWorldObjectContextMenu.Add(doAdminTeleportToSafehouseMenu);
wooden lodge
#

What's the difference?

thin hornet
#

context:addDebugOption is a new feature in 41.72+]

wooden lodge
#

Once it updates, will the function still work or need adjustments?

#

I'll try the code you just sent now, brb

thin hornet
#

now it should teleport in the middle of the safehouse first floor

wooden lodge
#

Will try! brb

#

It now doesn't throw errors, but it gives me the hint down left as if I enter a command wrong

#

Doesn't actually move me anywhere though @thin hornet

thin hornet
#

what does the message say

wooden lodge
#

It's what shows up when you just type /teleportto into the console

#

It's some kind of automated help response I'd assume

#

If I type /teleportto without any values, the same message shows up as if I'd click on the command you added

#

If that makes sense

thin hornet
#

try entering /tpto "username" x y 0 replace x and y by coordinates replace username with yours

wooden lodge
#

/tpto "Lera" 2 2 2

#

Like that?

thin hornet
#

set the last number to 0

#

ground level

wooden lodge
#

Nohting happens

#

Same message shows up

#

Maybe stable unstable command issues?

thin hornet
#

and how about /tpto 2 2 0

#

also coord might no be valid

wooden lodge
#

same message

thin hornet
#

ah

#

need ,

wooden lodge
#

Tried /tptp 2000 2000 0

#

ok sec

#

Well that worked

#

I'm in a black void now lmfao

thin hornet
#

this should do

wooden lodge
#

Trying again, brb

#

Sadly still the same. Shows the message in bottom left again, no actual teleport @thin hornet

thin hornet
#

i supose its cause you are trying to tp yourself

#

/teleportto "Lera" 2000,2000,0

wooden lodge
#

That teleports me into the black void

#

but the command doesn't throw errors nor does it teleport me to my claimed safheouse

#

It does throw the same message down left as if I would just type in /teleportto

thin hornet
wooden lodge
#

Yes, into a dark void

#

I teleported back to my safehouse via safehoust list -> Teleport to get out of it

#

Then ran away, tried command again, nothing,j ust the help message in the bottom left showing up again

drifting ore
#

Hey all.

#

Big issue on my PZ server. I'm making a very vertical map for my roleplay server

#

But obviously in PZ you can't shoot to stories above you... meaning that PvP is just trivialized by just "whoever gets the high ground"

#

doe sanyone have any ideas for how otmake people be able to shoot upwards?

winter bolt
sullen knoll
#

Brand new to modding, wanted to try with this game. Does anyone know a good tutorial video/channel for modding build 41 PZ? The ones i've found are out dated or not very good at guiding through the process. I have the mod made but can't find it in the mod list via debug mode. Any help helps, thanks!

sour island
tranquil reef
#

Can I do a timed action for a zombie

#

Like, when it gets within 5 tiles of me, it stops moving for a few seconds or something, then returns to it's regular state

winter bolt
#

i just made it since i'm bored lmao

tranquil reef
#

Uploading is essential

#

"Mogo Plushie"

#

instantly on the front page

winter bolt
#

i'm gonna make a bunch of among us merch items

vapid junco
#

I want to learn how to mod to remake fallout NV in PZ and fuse fallout 1 and 2 mechanics with PZ's ones

#

imagine the entirety of fallout NV and fallout 3 in PZ and the DLCs

#

space is big ennough

tranquil reef
#

Turns out I can't find out any way to do a timer

#

Someone needs to make documentation for this game, it's actually horrible having to research for 5 hours for a function which ends up being as simple as "isUseless" or something, pure pain lol

small vigil
#

If someones out there that can mod. Please make one where I can feed other players 🙂

tranquil reef
#

Kind of a weird suggestion lol

vapid junco
ancient grail
#

if you can add hunger on medical theoreticaly that might be possible

wraith root
#

I read all of it... all of the modding links, every extension of documentation, every discord link... oh lordy there is a lot of information

small vigil
winter bolt
#

i could definitely see the devs adding that when they end up adding in the handcuffs and burlap sack lmao

main swan
winter bolt
#

maybe but i dont remember how dayz handles it either

viral notch
#

I don't have idea... everything checks colisions works, uvs too file is correct settled...
all texstures works except blood on contact...
by manual cann add blood np.. by hiting only take dmg with dmg texture but without blood...
im out of ideas :cry:

earnest elk
#

Just got the game. Does anyone recommend some mods?

versed helm
#

anyone here able to identify which mod is causing an issue from logs?

#

once Im past the character customisation screen on a server im hosting it just goes to black and not responding

versed helm
#

which logs specifically

viral notch
#

that one

#

most spamming of errors

versed helm
viral notch
#

i think after stop using it you need to create new world due that custom map

versed helm
#

yeah I delete player and world every time Im troublehsooting

viral notch
#

howly moly... not sure who make that mod but he not call of Base texstures just copied whole files and put to mod now your log is messs with duplicate texture

#

xD

viral notch
#

check revives and before download

versed helm
#

5 stars 297 rating

#

still crashed

viral notch
#

y se ven con las texturas horrible sobrepuestas
the 2nd floor grid going south is not accessible
mod conflict with other map mods
😅

#

Make Korek Machete, Make Reaver Cleaver, Make Improvised Cold Steel Spear
Salvage items
M113
Hat_Beret_Tactical
that mods do errors on your log

#

but java error make beret xD

versed helm
#

Ill delete scrap weapons and try

viral notch
#

M113 has broken templates

#

but works maybe idk just spam of errors that templates can't be found

#

and cannot import to self vehicle

#

salvage items is outdated i think

versed helm
#

ill delete workshop aswell

viral notch
versed helm
#

ohhhh

#

same again

steady sparrow
#

Is it possible with a lua mod to connect to a remote database? I want to save some information from my server to display on my discord 😊

sharp swan
#

Anyone know if it would be possible to make a mod that changes the field of vision of the character to a green tint? I'd be interested in making a night vision mod that doesn't turn the whole screen green. Kind of like a flashlight with green tint that zombies can't see.

versed helm
#

trynna run server with just Britas and Im just getting a crash after character customisation

#

servers without it work fine

devout galleon
#

any mods that can soft reset without touching safehouses/player build containers?

wraith root
smoky meadow
#

d

drifting ore
#

If we have access to any ASync commands then yeah

#

You could also just run the bot on the same server and point to a server directory but

#

That's not as versatile

steady sparrow
#

I already wrote the bot, but only with all the details available from steam query (players, description etc.) - was hoping to add a bit more details like time of day etc

drifting ore
#

LuaSQL exists

#

Do you need/want super secure info storage?

#

Because if not I think LuaSQL doesnt have MySQLi support

steady sparrow
#

The bot is not hosted on the same machine, since I also use it for other games supporting steam query and multiple servers (6 currently)

#

That might work 🎉

drifting ore
#

I've been learning web development with MySQL and its heen

#

An experience, thats for sure

#

But yeah no you might be able to like

#

Create an SQL DB on the local server that hosts ZB

#

And then have it open a port

#

Then your bot just queries that port

steady sparrow
#

I haven’t done much with lua since warhammer online ages ago lol - can we add libraries like luasql to pz?

#

Luasql would work with remote database if possible

versed helm
#

black screen after hosting server and then "connection lost", anyone know a fix?

drifting ore
steady sparrow
#

Yeah it’s a lot of trial and error currently

loud elm
#

Is there any way, or any mods, that stop military and police zombies from spawning with weapons?

sour island
#

For all modders who struggle with testing/work on their mods and having to juggle mods around to play with friends you can do the following:

  1. Top bar of steam, select: Games > Add a Non-Steam Game...
  2. Browse for the PZ launcher: ProjectZomboid32.exe or ProjectZomboid64.exe
  3. Under launch options, add an unique directory path for local files: -cachedir=E:\Zomboid
  4. Name the "added game" something useful like Project Zomboid [DEV].

You can also add -debug after that command to force the client into debug as well.

The folder created is the same created under user/<name>/Zomboid/ - so it includes the upload folder for mods and the game will recognize it as such.

This lets you develop your mods, have saves for testing, change local files, and all separate from your "real" saves/files.
Note: This still requires you to unsubscribe from mods matching any mods you wish to work on as the game will prioritize downloaded content over local files.

sour island
#

Also useful if you're travelling and want to take your saves with you

#

Although loads times will be impacted even on a 3.0usb

thin hornet
#

neat, I didnt know that that will be usefull

sour island
#

Before that I tried to create a github repo of my server save

#

would not recommend

thin hornet
#

ish

#

max 2gb free with lfs github

sour island
#

the issue was the number of files I think

#

my save was under 1GB afaik

#

but 300k files made github lock up

thin hornet
#

you could probably set your self a gitlab self hosted

sour island
#

Honestly happy with the usb, as long as I dont forget it

thin hornet
#

but at this point might just save it in a harddrive

#

yeah

thin hornet
#

i used to host on digitalocean linux and files count is a big problem with linux most of time with too many files

#

and yo chuck whats your server ?

sour island
#

It's just a private one with friends atm

gilded hawk
sour island
#

Dane includes some suggestions in the description

gilded hawk
#

Yeah, I'm following that, but it feels like I'm missing something, and I don't know what 😦

sour island
#

if you use vanilla sandbox and set months after to 12 all fresh food would be rotten

#

I'd also recommend setting stories to as common as possible

gilded hawk
#

Like the random houses thing?

sour island
#

The randomized situations you find cars or zombies in

#

I think there's a sandbox option for those

gilded hawk
#

Alright give me a sec

worldly bone
# gilded hawk I'm interesting in setting up a "10 years later" server with this mod (https://s...

I'm preparing a mod collection for a post-apocalitic enviroment and hard game mode. take a look. hope you like. suggestions are welcome.
https://steamcommunity.com/sharedfiles/filedetails/?id=2837213135

Steam Workshop: Project Zomboid. [h1][b]"I love the smell of zombie in the morning"[/b][/h1]
My dear masochistic friend, this mod collection is in progress, no tested yet. Come back later.

Take a look of my other colection APOCAL

undone crag
#

Maybe you can get or create the square instead of getting it. Someone said something about something like that.

gilded hawk
#

So, how am I supposed to set how many years have passed?

I'm playing with the kingsmouth sandbox mod, and I did set the erosion day to 6k (10 years), but the food in some fridges is still good 👀

wraith root
#

Afaik

gilded hawk
#

ah, FFS

#

Ight, I need to re-check my settings then thank you anyway

true hollow
#

I'm still trying to replace a vanilla item with a mod item but I'm failing, every time I look for an item that can be found in a vehicle I find the vanilla version of it, does anyone know what I'm doing wrong in this code? I've already recreated the map, put the code in a separate file, I still haven't had success.

coral lava
#

Hello! I have been experimenting with making custom foraging zones in PZ. I already have some custom items in mind but to save me some grief. Does anyone know where I can find the code for it? Thank you!

wooden lodge
#

Hands down, @thin hornet is one of the greatest and most humble modders I've ever met. Thank you so so so much for assisting me as much as you did with this script.

thin hornet
coral lava
#

Oh shit thank you! I was searching now 😭

#

Unironically i have never interacted with Konijima but he's now my second favorite person

#

and one more thing, I am looking to disable the base default professions to rewrite it with unique professions. Would I just name my mod file the same as the ingame file or how would I go about that

thin hornet
#

shared\NPCs\MainCreationMethods.lua

#
Events.OnGameBoot.Remove(BaseGameCharacterDetails.DoProfessions);
BaseGameCharacterDetails.DoProfessions = function()
        -- your own prof here

    local profList = ProfessionFactory.getProfessions()
    for i=1,profList:size() do
        local prof = profList:get(i-1)
        BaseGameCharacterDetails.SetProfessionDescription(prof)
    end
end
Events.OnGameBoot.Add(BaseGameCharacterDetails.DoProfessions);
#

basically you write your own file like shared/NPCs/MyOwn_MainCreationMethods.lua

#

i think

#

you are going to have to test how that goes

coral lava
#

Alright! I'll go test it out now then and see if it works. Thanks for the advice tho!

wraith root
#

When making items, you don't have to delete other items to make room correct?

#

I don't assume so, but some games have this limitation

coral lava
#

I don't think so, a lot of mods add new items just fine without removing the initial ones

coral lava
thin hornet
#

yay

keen cape
#

Is there a way I could get a setting that's from multiplayer (like bumping into another player) and put it into single player?

thin hornet
keen cape
#

I just don't know how to toggle player clipping into another player

thin hornet
#

then you can try getServerOptions() global

local options = getServerOptions();
options:getBoolean("PlayerBumpPlayer"); -- get it
options:putOption("PlayerBumpPlayer", "true"); -- set it (value has to be a string)

might be something like that

keen cape
#

Hyperthink ok

thin hornet
#

weird there is a getServerOptions().getRandomCard()

#

O.o

azure rivet
#

Hello, I need help with the detect of a weapon, I am trying it this way but it seems to be the wrong one.
Player:getSecondaryHandItem(IsWeapon(Base.DoomBlade)) then

toxic walrus
#

Anyone know if theres a workaround to runspeed modifier not working or is it just something we cant interact with at all entirely

willow estuary
willow estuary
azure rivet
azure rivet
#

It works correctly now, it doesn't have to have "Base" in the reference.

tranquil reef
#

I get this error when trying to place down my modded item, anyone know why?

#

When clicking "Place Item" it renders the model and texture, along with the correct size, but I click the left mouse button, it gives me the error, I exit that menu and then it stops rendering even when just clicking "Place Item"

#

The item is modded in

#

I put a comma after the displayname but that also didn't fix the main issue lol

tranquil reef
#

Fixed it, I had to add an icon 💀

#

Also spitters now spit acid every few seconds in my left 4 dead mod

cosmic pawn
#

Anyone making a bicycle mod by chance?

tranquil reef
tranquil reef
cosmic pawn
#

!!! Where is it?

cosmic pawn
#

AMAZING!

#

Thank you!

tranquil reef
#

Made by AlteredMinds from this server too coolSunglasses

tranquil reef
tranquil reef
#

Spitter acid now damages you over time if you're near it

warm sail
#

Hello, I'm having some trouble getting the server to recognize updates that happen whenever a player repairs a vehicle. It updates on the client-side, but the server disregards/ignores/never receives it. For example, if a player repairs a car from 50% to 54%, the player will see 54% on their side, but everybody else on the server still sees 50% (because the value never actually changed on the server), and if the player logs off and back on, they will see 50% again

I'm thinking that maybe I am using sendClientCommand() incorrectly, any help please? Below is the code that I use to send the update to the server

if isClient() then
  local args = {
    vehicle = self.vehicle:getId(),
    condition = self.part:getCondition()
  };

  sendClientCommand(self.character, "vehicle", "repairEngine", args);
end
jagged ingot
#
/**
  * Method Parameters: 
  *  - (String arg0, String arg1, KahluaTable arg2): void
  *  - (IsoPlayer arg0, String arg1, String arg2, KahluaTable arg3): void
  */
  function sendClientCommand(..): void;
#

@warm sail

#

I only know part of your client-side implementation. The server side is set up properly with the event associated with the client command?

#

Not 100% sure but I think you'd use OnClientCommand in the server scopr to receive this.

#

For consistency's sake, I'd recommend sending the client command to the server (Find a way to make it work first), then either have the server update all players if it can be done there with what's provided or update all clients (including the player sending the command), so inconsistencies don't cause problems if something fails.

#

I don't know anything else about your code so I can only help this much. 🙂

tranquil reef
#

Is there a way to make a specific zombie silent and not make it's usual zombie sounds?

jagged ingot
tranquil reef
#

I'm making specific zombies have different idle sounds so I can't just replace the defaults

jagged ingot
#

I see these calls for IsoZombie:

      /**
       * Method Parameters: 
       *  - (long arg0, GameSoundClip arg1, BitSet arg2): void
       */
      stopEvent(arg0: number, arg1: zombie.audio.GameSoundClip, arg2: java.util.BitSet): void;
      /**
       * Method Parameters: 
       *  - (long arg0): void
       */
      stopOrTriggerSound(arg0: number): void;
#

It'd be a hacky method but you could use OnTick to stop common sounds zombies emit.

#

Not 100% on that. Would be a bit of work.

tranquil reef
#

Everything I'm doing is hacky so that shouldn't be a problem lol, thank you, I'll see if I can get that to work

jagged ingot
#

Just thinking a little more creatively about the problem.

winter bolt
#

is there any way I can see what functions are available when i use "ScriptManager.instance:getItem"

winter bolt
#

ohh nice this is helpful

shadow geyser
gilded hawk
tranquil reef
gilded hawk
gilded hawk
#

WHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAT

Holy shit

jagged ingot
#

There are currently two people working on their own NodeJs environments to improve on the prototype one in that article. There's also work being done right now on generating Lua code Typings.

gilded hawk
jagged ingot
#

IIRC you'd install it globally and use commands.

gilded hawk
#

I do run mine using npx mx-create-mod npx take care of the rest

gilded hawk
jagged ingot
jagged ingot
#

The same org made the anti-cheat for 41.60 builds when multiplayer came out and prevented people from destroying public servers.

jagged ingot
#

Was written in Kotlin. 🙂

gilded hawk
jagged ingot
plucky junco
#

hi guys, can someone help me a second? I'm looking for how to make one item that I made require electric power, how to do?

#

thx

thin hornet
plucky junco
thin hornet
#

Mhm

#

Is it used into recipes?

#

im waking up ill check this out just need a coffee first

plucky junco
#

it is a "printer" type object

#

a really simple object, it is required for a recipe and the recipe says CanBeDoneFromFloor:true,

#

but I would like to need electricity to work

#

so basically you just need to be near to it so that the recipe can work

thin hornet
#

Could do something like that for recipes

local function playerIsOnPoweredSquare(player)
    return ((SandboxVars.AllowExteriorGenerator and player:getSquare():haveElectricity()) or (SandboxVars.ElecShutModifier > -1 and GameTime:getInstance():getNightsSurvived() < SandboxVars.ElecShutModifier));
end

MyModNameRecipes = MyModNameRecipes or {};
MyModNameRecipes.OnCanPerform = MyModNameRecipes.OnCanPerform or {};

function MyModNameRecipes.OnCanPerform.RequireElectricityToPerform(recipe, player, item)
    return playerIsOnPoweredSquare(player);
end
#

otherwise anywhere you need you can just use this custom function

local function playerIsOnPoweredSquare(player)
    return ((SandboxVars.AllowExteriorGenerator and player:getSquare():haveElectricity()) or (SandboxVars.ElecShutModifier > -1 and GameTime:getInstance():getNightsSurvived() < SandboxVars.ElecShutModifier));
end
#

thats how the game check for power for example when taking fuel at the gas station

plucky junco
#

i see

thin hornet
#

you could use it into a TimedAction isValid() method and in a context menu when adding the option.

local option = context:addOption("Do something that require power", worldobjects, func, playerObj, etc);
if not playerIsOnPoweredSquare(player) then
  option.notAvailable = true;
end
plucky junco
#

you know any mod that use it where I can get a better understanding of it?

thin hornet
#

My computer mod does check for electricity

#

How do you interact with your printer? (recipe or context menu)

plucky junco
#

recipe

#

as i told you it's really basic

#

it's an object on the floor 🤣

plucky junco
#

thx

thin hornet
plucky junco
#

yes i already found it

#

thx

thin hornet
#

my function added and not computer:getSquare():isOutside() so that the computer doesnt work outside even if power wasnt cut yet (but work outside if using a generator)

plucky junco
#

i see

thin hornet
#

kind of

#

Once im set with PipeWrench ill probably be rewritting alot of my mods

tranquil reef
#

Also I apologize since I didn't read any context lol, I'm tired

thin hornet
#

its the version on workshop yeah

#

i have much more plan with the computer, in an unreleased v2 branch but lua got me tired when making it

#

project grow big fast, and object oriented in lua gets complicated

#

So chance are im going to remake the mod in Typescript which will make it cleaner and easier to expand.

tranquil reef
#

👍

#

I was trying to make all the zombies with this outfit white, but I found one who was black, I got really mad because I didn't know what I did wrong, but after finding like 10 zombies with the same skin tone in a row I'm pretty sure I set the skin tone to black on accident instead of white 💀

#

thought the outfit was broken but turns out I'm just really dumb lol

winter bolt
#

oh you can control the skin texture that zombies spawn with?

tranquil reef
#

I thought so, "I'm just really dumb" was an understatement, I was taking the GUID from the AuthenticZ mod, but didn't realize until just now the creator has it as custom clothing things

#

Explained that poorly, but this is basically how it works

winter bolt
#

ohh

tranquil reef
#

I am going to steal this method of doing it though because the game apparently doesn't want me to be happy lol

tranquil reef
# winter bolt ohh

By the way, did you make the Open Jackets mod? I saw your name and planned on asking at some point but forgot

#

I only use like 3 mods in my playthroughs, true music, open jackets, and drawing on the maps, so if so I appreciate your work in adding something to the game that should just be in it anyway lol

winter bolt
#

yeah lol

tranquil reef
#

Doing God's work

winter bolt
#

i stole an idea from shark's military mod and i'm doing the nightmare work to make every pair of trousers tuckable with boots

tranquil reef
#

That sounds incredibly painful lol

winter bolt
#

its mostly just tedious

#

i wrote a function in my lua script that automates as much of the duplicate work as i can but i still have to manually do all the .xml files

jagged ingot
#

Heh.

#

This is why I'm making a scripting GUI tool for items and recipes.

#

Shelved it for the moment to focus on something a little more urgent.

winter bolt
#

a hero

gilded hawk
#

I'm wondering what Is the best way to turn my sandbox pre-sets into a mod? 🤔

I'm looking for a way to consistently sync my MP an SP presets

tranquil reef
#

I've been wanting the ability to just package saved outfits, traits, and sandbox settings into a mod file people can install, but I'm not sure it's possible lol. However, if you really want to go through the trouble you could have a mod which sets the sandbox settings when the game boots through a lua file

#

Also to clarify I know barely anything about that so there may be an easier solution my ape brain is currently unaware of

winter bolt
#

tucking acquired

lapis glacier
#

Hello. Does anyone know which file I should look at regarding player handling of multiplayer servers (how many players are in-game and other related information)?

thin hornet
#

for example you can get all the player online using

      @LuaMethod(
         name = "getOnlinePlayers",
         global = true
      )
      public static ArrayList getOnlinePlayers() {
         if (GameServer.bServer) {
            return GameServer.getPlayers();
         } else {
            return GameClient.bClient ? GameClient.instance.getPlayers() : null;
         }
      }
#

so in lua

local players = getOnlinePlayers();
if players then
  for i = 0, players:size() - 1 do
    local player = players:get(i);
  end
end
lapis glacier
#

interesting this is very helpful thank you

gilded hawk
#

I need some Experience Modder support

Is there an alternative to newPreset.options:loadGameFile(newPreset.name) in particular loadGameFile ?

Apparently, it only targets the main game folder not the workshop one too and it throw the following error:

STACK TRACE
-----------------------------------------
Callframe at: loadGameFile
function: getOneYearLaterPreset -- file: MoreSandboxPresets.client.lua line # 15
function: loadPresets -- file: MoreSandboxPresets.client.lua line # 23
function: create -- file: SandboxOptions.lua line # 479
function: instantiate -- file: MainScreen.lua line # 784
function: addToUIManager -- file: ISUIElement.lua line # 1009
function: LoadMainScreenPanelInt -- file: MainScreen.lua line # 2148
function: LoadMainScreenPanel -- file: MainScreen.lua line # 2065

ERROR: General     , 1658318493273> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method).
ERROR: General     , 1658318493274> DebugLogStream.printException> Stack trace:
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        [Trimmed Log here]
Caused by: java.lang.RuntimeException: media/lua/shared/Sandbox/OneYearLater.lua not found
    at zombie.SandboxOptions.loadGameFile(SandboxOptions.java:1492)
    ... 24 more
thin hornet
# gilded hawk I need some Experience Modder support Is there an alternative to `newPreset.opt...
   public boolean loadGameFile(String var1) {
      File var2 = ZomboidFileSystem.instance.getMediaFile("lua/shared/Sandbox/" + var1 + ".lua");
      if (!var2.exists()) {
         throw new RuntimeException("media/lua/shared/Sandbox/" + var1 + ".lua not found");
      } else {
         try {
            LuaManager.loaded.remove(var2.getAbsolutePath().replace("\\", "/"));
            Object var3 = LuaManager.RunLua(var2.getAbsolutePath());
            if (!(var3 instanceof KahluaTable)) {
               throw new RuntimeException(var2.getName() + " must return a SandboxVars table");
            } else {
               for(int var4 = 0; var4 < this.options.size(); ++var4) {
                  ((SandboxOptions.SandboxOption)this.options.get(var4)).fromTable((KahluaTable)var3);
               }

               return true;
            }
         } catch (Exception var5) {
            ExceptionLogger.logException(var5);
            return false;
         }
      }
   }
thin hornet
#

might want to check at loadPresetFile

#

instead

#

seem to be the user generated presets tho

gilded hawk
#

Yeah

#

it's annoying cause loadGameFile only looks inside the Zomboid Directory, but ignores the mods

gilded hawk
midnight mica
#

i'm trying to design a claim vehicle system, but i noticed that car ID's seem to change all the time, anyone know why this is?

thin hornet
#

what id are you pulling

gilded hawk
#

LuaManager.getSandboxCacheDir() In my case is C:\Users\massi\Zomboid\Sandbox Presets

thin hornet
midnight mica
#

i'd need to release the claim attached to that vehicle when a player releases

#

even when the player is nowhere near that vehicle

sour island
#

Is this vanilla
LOG : General , 1658075851159> 82†858†766> command entered via server console (System.in): "ping@pong"
I feel like I've left debug messages in command sends but usually I use ping and pong on the different ends.

thin hornet
sour island
#

ah ok, I spent like 20 minutes looking through my repos lol

thin hornet
#

i get that alot in my server logs

midnight mica
thin hornet
#

i suggest you do all the operation and storing on the server side.
and only send the global moddata to players as a reference

#

global moddata is World moddata

#

attaching to the car will not be safe and you will need the vehicle reference to interact with it

sour island
#

does the world instance have it's own modData too?

midnight mica
#

ah, that sounds interesting,

sour island
#

I know gametime does - which I used before they added global

thin hornet
thin hornet
#

have a look at this if you want you can use this too

#

it let you play with networking and global modata easily

midnight mica
#

thanks, i'll check it out 😉

#

this opens a whole new world

thin hornet
#

it contains a base code that handle everything for you, so you can just add what you need to a config file in shared.

#

then you have access to create commands and functions for easy networking

sour island
#

An idea for the #mod_development channel / maybe even for the #mod_support - use of the discord threads feature for specific help/discussions?

autumn temple
#

oh sorry wrong channel

sour island
#

no wait I wanted to see that

#

😦

autumn temple
#

:P

#

oh wait

#

nvm this was the correct channel

#

I made progress on making my own tiles, which I started with posters. but when I attempt to place posters on the walls, either ingame or in the editor. they vanish when going on the walls? does anyone know whats wrong?

sour island
#

did my message confuse you?

autumn temple
#

yes

sour island
#

my bad, it was an unrelated idea

autumn temple
#

idk

#

im confused

sour island
#

we used to have a bunch of pins of 'useful code' that got scrubbed to the wiki (?)

#

but this was before threads was a thing

autumn temple
#

my posters are just really weird when interacting with the world. like i'd attempt to play it on a south wall and the poster will face the North direction

#

even though I have south selected in the tilezed

sour island
autumn temple
#

probably

sour island
#

Almost seems like the directions are reversed tho?

#

Like when you have the blue marker on the floor attached to the wall - I think the poster is on the other side of the wall?

#

With the poster face facing the wall at that

#

Anyway to add a window to the walls to test?

autumn temple
sour island
#

strange, maybe they're reversed visually

autumn temple
#

but i did find an issue code wise lol

#

if I have multiple posters with different ID's but same item name. it breaks the placement

#

like I had "BerserkPoster1" and "BerserkPoster2" but both named Berserk Poster

#

but both posters broke and wouldnt place into the south direction unless I changed their item names

#

this as an example

#

would break the south direction placement, unless I change the DisplayName

steady sparrow
#

@thin hornet sorry to trouble you but you seem very knowledgeable with regards to modding, do you know if it would be possible to import the luasql library in a mod to be able to connect to a remote database?

thin hornet
thin hornet
devout galleon
#

is it possible to get a player heatmap for a server?

jagged ingot
#

That'd be the only way, unless you want to get really funky with SQLite with some other process.

#

(That or core mod)

thin hornet
#

right not really something id love to do

#

unless making a server javamod that integrate http and weksocket communication

sick yew
#

How do I change my zombies back to the default ones?

#

I installed a mod that changes their skin, and they're the same, even if I disable it.

thin hornet
#

restart the game

#

texture overwrite will stay even after going in main menu

sick yew
#

Aye, aye, thanks.

orchid kestrel
#

how do you use mods in multiyplayer

weak sierra
#

how do u make spawn points for a map

#

i want to add spawnpoints to a map that has none for my server

#

like

#

do u just list em

smoky meadow
#

guy's whats type 8 and type 15 in anti cheat?

weak sierra
#

idk i wish they'd fuckin tell u what they are in a tooltip

#

😂

late hound
thorn cipher
#

Is there a way to choose custom vehicle trunk loot?

#

If someone could someone point me the right way? Thanks! 😄

#

In the way that a police car has police loot, spiffo van has spiffo loot

#

Think i found it- VehicleDistributions

thorn cipher
#

Anyone able to help work out how to get specific loot spawning in vehicles?

#

Currently both the trunk and glovebox is empty apart from a key

willow estuary
tranquil reef
#

I'm making a special infected mod and I want to have a sandbox option for the game to wait a week before spawning them, like a boolean, can I check it here?

#

like if the boolean is off, daySurvived is 0, if the boolean is on, daySurvived is 7

thin hornet
#

hey @tranquil reef

#

oh i see so you want the value of the sandbox option to be in that object there

#

it wouldnt make it there in time i fear

#

would have to see when is the AttachedWeaponDefinitions used and if we can edit it later after game load

tranquil reef
#

So this runs before the sandbox settings are checked?

thin hornet
#

its defined right when the script is loaded

#

sandbox are not transmited yet

#

at least for a server / client

#

but even for single player

#

script are reloaded before you even start setting your sandbox options

tranquil reef
#

Rip

thin hornet
#

this is used in IsoZombie.addRandomAttachedWeapon()

#

it may be possible to edit after

#

didnt find where this is initialized yet

#

ah i think it may be in RunLuaInternal

#

nope its in AttachedWeaponDefinitions.init()

tranquil reef
#

Well I guess I'm either going to have to make two mod files, or just only have one of the options by default lol

thin hornet
#

it could potentially be done

#

i think

#

using reloadLuaFile()

#

it would force to reload the file which would make the AttachedWeaponDefinitions dirty and re-init

#

not sure how that would act toward other mods adding to the attachedWeaponDefinitions tho

#

ah nevermind

#

it might not be possible in the end

#

wow wait

#

actually

#
AttachedWeaponDefinitions = AttachedWeaponDefinitions or {};

because this is written like this

#

it would work

tranquil reef
tranquil reef
thin hornet
#

lua/shared/Definitions/spitter_AttachedWeaponDefinitions .lua

AttachedWeaponDefinitions = AttachedWeaponDefinitions or {};

local function defineSpitter()
    AttachedWeaponDefinitions.spitter = {
        chance = 100,
        weaponLocation = {"Stomach"},
        bloodLocations = {"Torso_Lower","Back"},
        addHoles = true,
        daySurvived = SandboxVars.SpitterMod.daySurvived or 0,
        weapons = {
            "Base.Katana",
        },
    }
end

local function init()
    Events.OnTick.Remove(init);

    defineSpitter();
    if (isServer()) then
        reloadServerLuaFile("Definitions/AttachedWeaponDefinitions");
    else
        reloadLuaFile("Definitions/AttachedWeaponDefinitions");
    end
    
end
Events.OnTick.Add(init);
#

By reloading the file it will set the java object to dirty and re-init it, which will get that lua table again which is already stored in global so nothing is lost no matter which mod added to it
and this code would run on both client and server since its shared directory at the first tick.

#

so when a zombie is spawned it would fetch a random outfit and attached weapon from the up-to-date version of this global lua table

tranquil reef
#

Oooo nice, thank you

thin hornet
#

let me know if it actually worked

tranquil reef
#

For this part though, "SandboxVars.SpitterMod.daySurvived or 0,", the sandbox variable is a boolean that can be set to true or false, could I just have a "local daysRequired" or something in defineSpitter, and then have it be set to 0 or 7 depending on the boolean?

#

If that makes any sense

thin hornet
#

just have a sandbox options of type double so that people choose the amount of days

#

if they want 1 month they could

tranquil reef
thin hornet
#

then have a boolean

#

and use this ```lua
daySurvived = SandboxVars.SpitterMod.daySurvived and 7 or 0,

#

that should work

tranquil reef
#

Alright, thank you

thin hornet
#

np

tranquil reef
#

Anybody know a way to make a zombie extremely difficult/impossible to knock over? zombie:onlyJawStab does this but it also makes it immortal unless you stab it in the jaw

#

I currently have a l4d tank that has like 4000 health, but you can walk up and push it over lol

full socket
#

Does anyone know any mods that show the weight as a separate column in the inventory, if not can anyone point me towards the API function to register/add a column?

static oyster
#

Is there any city mod that removes west point what whatever reason ?

#

Asking because while playing online with a friend west point was unreachable, but single player it still there

#

Even tho sp and mp have the same mods so idk..

rancid verge
glad pivot
#

It's good?

drifting ore
tranquil reef
glad pivot
drifting ore
keen cape
#

It kinda looks cursed

glad pivot
glad pivot
#

@keen cape

keen cape
autumn temple
#

i never downloaded it either lol, I just use the 2021 TileZed and WorldZed I found on the indiestone website

#

idk what else the modding tools would have tho

#

ya lol

#

thats literally all it is

#

is just the mapping tools

drifting ore
#

anyone got a pack of mods that dont bug out the hole game

autumn temple
drifting ore
#

mb

autumn temple
#

I am attempting to have a main menu replacement for my mod but I am having an issue where the Title and Title2 files are not properly sitting next to eachother. they have a 1 pixel gap between them

#

I even went through and extended the title image sizes by 1 pixel, so they should be overlapping at that point but the line is still there

jagged ingot
#

I wonder if it's aliasing artifacts or something.

#

Since textures are drawn using double values, have you tried flooring the coordinates?

cunning haven
#

Can someone help me with codding seconds? I want to make a → if player:isSprinting() "for more than 1 second" ← But i have no idea how

#

I was using a timer but that was not it, since the penalty would occur even if it was for less than a second

jagged ingot
#

Unless there's a better way to know when the sprinting started in the API, that's my first guess.

cunning haven
#

Could you give me an example? I'll look in to it

jagged ingot
#

in an OnTick listener, check if the player is sprinting. If the last result is different, handle the switch.

#

You then calculate the delta since the player started sprinting with a stored timestamp.

#

Then make a method that checks both the flag set to true and the delta.

#

Use millisecond timestamps.

#

timeDelta = timeNow - timeThen

cunning haven
#

Ah i see

jagged ingot
#

if timeDelta >= 1000 then return true

#

Again if someone knows if the time is tracked elsewhere in the code for PZ, that'll be a better way.

cunning haven
#

No no that's fine, i was just looking for IRL seconds

jagged ingot
#

The only caveat with my approach is inaccurate deltas when pausing the game while sprinting.

#

You could code more to work against that, however if you don't care then this simple delta calculation works.

cunning haven
#

I have no idea of what im doing

jagged ingot
#

It's fine to feel lost. Don't worry.

#

I figured walking you through the problem logically would help you to think more about the solution than being stuck at the problem.

cunning haven
#

I don't really know much about codding im sorry, TimeDelta for instance would be Local?

jagged ingot
#

You can make it local yeah. You could calculate it either in the OnTick listener or when you call for it as a function.

#

Try to make it work first before optimizing it though.

cunning haven
#

Probably would've been easier if i showed the code before.

For the Sprint part i wanted to make it so it would only happened if you sprinted for more than a second.

OnTick is a built in PZ thing?

jagged ingot
#

When solving any problem in coding, planning, building a prototype, then improving on that prototype is a good way to keep yourself from getting stuck.

jagged ingot
cunning haven
#

Is it the → Events.OnTick.Add(functionName)

cunning haven
cunning haven
#

Looking at the wiki example, is this the right way to use it?

jagged ingot
cunning haven
#

No problem, you already did more than enough, i appreciate the help

subtle sapphire
#

Hello modders 👋 What is the best way to add a new Item (such as a journal or a sheet of paper) with some text already in it? 🤔 I was looking to add or define a new item, but then I realized there is not property like "content" or something like that I can use to add a custom text:

item SheetPaper2
{
    DisplayCategory = Literature,
    Weight    =    0.1,
    Type    =    Literature,
    DisplayName    =    Sheet of Paper,
    Icon    =    Paper,
    CanBeWrite  =   true,
    PageToWrite =   1,
    WorldStaticModel = SheetOfPaper,
}
lyric cairn
#

Once you upload a mod to steam, is there anyway to change the thumbnail?

autumn temple
narrow urchin
#

Hello, I want to add icon with tooltip under health bar in the health panel, but I can't find exact place in lua code anywhere (the health bar, not panel). Can someone tell me which lua file I need to look at?

undone crag
sour island
subtle sapphire
#

@undone crag @sour island I found a way to achieve what I wanted to do:

  1. Define a new item type
  2. Use the OnPreFillInventoryObjectContextMenu to add the content the first time the user click on it
undone crag
#

Reportedly if you have a function on OnPreFillInventoryObjectContextMenu it slows loading.