#mod_development

1 messages ยท Page 171 of 1

glossy grotto
#

But I'm just looking for a doge plush and mask, maby some other dumb things

trim mist
#

I haven't specifically looked at any plushes, but if you're really wanting it, you could probably commission Xochi for relatively cheap to have a doge model made for you

#

i know there are people here that like modelling plushies so I'm sure they'd be happy to help too

glossy grotto
#

Sure...

trim mist
#

I'm writing a hook into an event and I'm getting a attempted index of non-table

bronze yoke
#

which folder is this file in?

#

if it's not in server, you're referencing it before it's created

trim mist
#

yeah it's in client

#

so don't put it in shared, put it in server?

neon bronze
#

Youโ€™d need to require that file probably

bronze yoke
#

requiring vanilla files doesn't do anything

#

you need to put it in server, or delay your code until after the server folder loads

deft plaza
#

hey is this right? anyone?

bronze yoke
#

looks correct to me

deft plaza
#

closetshelfgeneric should those small 2 tiles rooms

#

I set crate tools to 100 lets see if it spawns

trim mist
#

I moved the reference to the old function and now it's not throwing an error...??

#

PZ is magic

deft plaza
#

what do I name the distribution

#

file

#

this is mine

bronze yoke
#

should be .lua

deft plaza
#

how do I make it lua?

bronze yoke
#

just rename it from .txt to .lua

deft plaza
#

okay thanks

bronze yoke
#

the specific name isn't important but it should ideally be unique to your mod (if another mod has a file with the same name only one will load)

deft plaza
#

pro

#

your are a pro

#

modding is kinda of fun

#

I'm getting the hang of it

#

I got a error 1 when loading up the game

#

what do I do about that

bronze yoke
#

ohh i didn't notice, in your file you always write ProcerduralDistributions, should be ProceduralDistributions

deft plaza
#

what

bronze yoke
#

it's just a typo

deft plaza
#

oh thanks

heady crystal
#

I don't usually do this, but this was a fun little mod to make so

deft plaza
#

it seems to not spawn in still no items

heady crystal
#

Yea hahah

tawdry solar
#

how does it work?

#

like hitting a zombie makes a loud noise?

deft plaza
#

I'm thinking its more of the ai is connected in a way if one reacts they all do

tawdry solar
#

im talking abou the code side

deft plaza
#

oh lol

heady crystal
#

If a zombie spots you, the server creates a noise for the whole cell once

#

Every 3 minutes

deft plaza
#

smart

tawdry solar
#

thats what i figured

heady crystal
#

I didn't want it like that tbf

#

Wanted to specifically target the player

#

But couldn't work it out, no matter what functions I used, zombies just don't go for it even with the player as a target. Only the one that spotted you.

tawdry solar
#

couldnt you make noises be pinged off the player every like few seconds?

deft plaza
#

does this need to have spaces or?

heady crystal
#

So then I look at the last stand scenario that's pretty similar and I see it's like.... add a sound all the time lol

tawdry solar
#

also is the art ai generated?

deft plaza
#

last part

tawdry solar
#

it looks verry ai

heady crystal
#

Yup yup

heady crystal
#

This adds some interesting mechanics

tawdry solar
#

correct me if im wrong dont you need base.RedHandledMachete?

deft plaza
#

let me try it

tawdry solar
#

my friend showed me his dist code

heady crystal
#

You could for once let a zombie see you, they will all come towards you, then bolt and once it breaks line of sight you just lured like 1000 zombies to a specific location

#

Could be used to get them away from a location, lure them to a killing zone, or even to mess with other players

tawdry solar
#

like this i think

deft plaza
tawdry solar
#

i dont know if it works

deft plaza
#

I'll try it

deft plaza
heady crystal
#

What's that supposed to mean

tawdry solar
#

hes been around for a while if i remember

#

i think he ment popular

deft plaza
#

yea and maybe to get all these cool modding stuff

tawdry solar
#

braven when did you make your first mod?

#

istg seeing one of your mods when i started

#

playing

heady crystal
#

I have been professionally programing since 2018. I'd say I am somewhat experienced. So I got PZ in I think... late 2021? Something like that. I can check later.

deft plaza
#

oh wow okay

heady crystal
#

So I instantly love this game cause I love zombies

#

But then I realize..... where's the BICYCLES?!

tawdry solar
#

i started in late 2021

#

IT WAS THE BICYCLES MOD

heady crystal
#

So I look up and no bike mod. The hell? We have Britas and a lot of epic complex mods

#

and not a single bike

deft plaza
#

do you still watch tutorials?

heady crystal
#

So I decided to do it myself

#

I later understood why nobody did it before lmao

tawdry solar
#

there are a lack of tutorals

#

i ask here

deft plaza
heady crystal
#

I learned by myself

#

I like it that way. Lots of banging your head against the wall, but you pick things up fast.

deft plaza
#

nice

tawdry solar
#

the tutorials are outdated too

heady crystal
#

Yeah most of it barely touches real modding too

#

There was a supreme lack of proper guidance when I started. Still hard today ngl.

tawdry solar
#

i never watched a modeling tut either

heady crystal
#

Every modder knows a good deal about something, so if you ask around you can thankfully get some help

tawdry solar
#

too boring

heady crystal
#

Albion and Konijima helped me a lot with getting the hang of server stuff

gusty wharf
#

Is there a guide somewhere on how to make professions and how to give them attributes (foraging search bonuses, traits, etc.)?

heady crystal
#

Most modders are very nice ppl

heady crystal
#

So basically as soon as I released the bike mod, inexperienced as I was, I got a lot of attention, and then I kept going

tawdry solar
#

cause its original

#

i also have a question

deft plaza
#

still not spawning in

tawdry solar
#

is the main source of clicks the poster?

heady crystal
#

I remember I had absolutely no idea about how modding worked, so I just paste my mod folder in the workshop template mod, and after I release a Russian guy writes "You're not supposed to ship the template" and i'm like "...Oh."

deft plaza
#

ship the template?

heady crystal
#

I uploaded the template folder by accident with it cause I didn't know how the folder structure worked

tawdry solar
heady crystal
deft plaza
#

oh lol

mellow frigate
#

Hello there, is there something to hook on to know on a client, when the OnlinePlayers list was modified ?

trim mist
#

hm. @bronze yoke you mentioned a while ago that you test your mods in MP with two seperate PZ clients. I have two up and I can't join my localhost since my steam username is already being used on it

bronze yoke
#

yeah, you need to be in -nosteam mode

trim mist
#

Do you know what I might be doing wrong off--

#

lol okay, thank you.

mellow frigate
heady crystal
#

See what I'm talking about? I'd take 3 and a half ages to figure this out

#

Thank the lord for other modders prayge

deft plaza
#

what could I be doing wrong here

gusty wharf
# tawdry solar i couldnt find one

The only thing I know how to do is add are traits , xp boosts and recipes but can't find info on how to do these other bonuses like the foraging stuff or park ranger's being faster in woods

heady crystal
#

Programming is art

deft plaza
#

wait is the display name for RGM_Distribution

#

or is it the item

tawdry solar
#

or

trim mist
tawdry solar
#

it could be because your not actually doing the correct item name

#

thats the item name

deft plaza
tawdry solar
#

its base.

#

then that

#

np

bronze yoke
mellow frigate
#

in facts the OnMiniScoreboardUpdate event is very close to informing on other players connection / disconnection ๐Ÿ˜„

deft plaza
#

the time has come... to release my very first mod

tawdry solar
#

pls dm it

deft plaza
#

one sec

tawdry solar
#

you changed all the shit like the pic?

deft plaza
#

pic?

tawdry solar
#

do you want my steam for crds?

deft plaza
#

yes

tawdry solar
deft plaza
#

oh ya

tawdry solar
#

we fixed it

deft plaza
#

it keeps asking about 256x256 image but I have it

#

it won't work

fast galleon
mystic vessel
#

Good afternoon everyone, I have a quick question
I created a new cleaner for my mod. How do I add the function so he can clean the blood?

#

I created it with the intention of being a more durable "bleach"

deft plaza
#

I literally put my image on top of that one same size

#

Why does the modding have to be so broke man

#

I can't with this it's not even working I read a forum post and it still does not work

tawdry solar
deft plaza
#

okay fine

#

it's gonna look suspicious

#

oh wow it still does not work

tawdry solar
#

send us ur media

#

folder

#

@deft plaza

deft plaza
#

what media

tawdry solar
#

the entire mod folder i meant

deft plaza
#

okay dms

tawdry solar
#

yup

warm forum
#

I have created a firearm mod, everything works fine except my character reloads it upside down. Does anyone know how to fix that?

tawdry solar
#

i have no clue

warm forum
#

Thanks bud

tawdry solar
#

np

mellow frigate
#

hi, when I use sendClientCommand on first few OnUpdatePlayer calls of a client, the client command is not sent. any idea what I should look for to do things correctly ? Do I need to wait for a valid square or something ?

bronze yoke
#

seemed arbitrary to me

#

i put it on first onplayermove as a hack

mellow frigate
bronze yoke
#

i think it could be a little bit clearer but it's good enough to release

glass stump
#

https://youtu.be/bnbjy8FDgCo

Got another mod release from bro, feedback is welcome!

With Point Blank, if you are close enough to a zombie and shooting a gun, the zombie will die instantly. Quality Of Life Mod For Project Zomboid

Steam Workshop Link โ–บ https://steamcommunity.com/sharedfiles/filedetails/?id=2990322197

My Twitch โ–บ https://www.twitch.tv/scott_hf
My Twitter โ–บ https://twitter.com/HelloFriendGame

Music By WhiteBatAu...

โ–ถ Play video
tawdry solar
#

ooh

#

sick

#

mod looks cool

#

the video is amazing

glass stump
#

he'll be happy to hear that!

gusty wharf
#

How does the park ranger's faster movement in woods work like? Where is lua stuff related to it located? I'm wondering how to add it onto a custom occupation

bronze yoke
#

it's not lua

#

it's hardcoded into the movement java

heady crystal
#

Anybody know a tutorial for adding custom clothing?

trim mist
#

Hey, I'm having an interesting typing issue

red tiger
#

I have a headache and I don't know why

trim mist
#

It's odd though because in the f11 console it shows as the type of IsoPlayer

#

Has anyone had to deal with this before?

red tiger
#

Sounds like you are either incorrectly referencing what you are looking at or don't know what to call exactly.

bronze yoke
#

it doesn't really matter what type it's returned as, i don't think that has any relevance to lua

#

since we don't have casting or anything

trim mist
#

that's what I thought, but I have no idea what else this error could be

#

this is everything I have compiled on it

red tiger
#

There's an API call you can use to get the type of java class

bronze yoke
#

in the case of the event i just listed it as IsoMovingObject because it's always that or a subclass of that, i don't think the event actually casts anything

#

(and again don't think that would have any implications on lua anyway)

red tiger
#

I'm in a restaurant right now so I can't look

#

The event only serves what's passed.

trim mist
#

I use instanceof(collider, "IsoPlayer") in my code

red tiger
#

You need to figure out how to interpret it

bronze yoke
#

are you absolutely sure the player has this ATPlayerData?

trim mist
#

yeah, one sec

#

That's all the times I use that to grab mod data, and this function gets triggered OnObjectCollide

bronze yoke
#

ohh, is this happening in multiplayer only?

honest roost
#

right chat this time lol how come the pen is disabled? i cant place flooring drunk

bronze yoke
#

well i have two theories about this actually

trim mist
bronze yoke
#
  1. your moddata is created OnNewGame, so if the character was created before the mod was added it won't work
  2. if the event fires for a remote player, it doesn't seem like player moddata is synchronised
trim mist
#

ah!

#

i was under the impression that I didn't have to sync data like that if it were moddata or in shared

#

๐Ÿ’€

honest roost
#

Nvm Iโ€™m a dummy just had to go to tile

bronze yoke
#

moddata works case by case, the shared thing seems like a fundamental misunderstanding of networking though ๐Ÿ˜…

trim mist
#

networking was... not my strong suit in school

bronze yoke
#

every process has an entirely seperate lua environment, shared is just (supposed to) mean those files are loaded on clients and servers

#

of course in pz the server folder is also loaded on clients so the meaning of those folders is sort of weak

trim mist
#

i hear you

#

So no matter where I put things I still have to worry about networking and syncage

#

:S

bronze yoke
#
local function ATOnCharacterCollide(collider, collidee)
    if instanceof(collider, "IsoPlayer") and IsoPlayer:isLocalPlayer()
```give this a try
#

oh i've edited the wrong function ๐Ÿ˜… but you see the idea

#

that might be necessary elsewhere

trim mist
#

it will be. I mean, i use that logic in ATOnCharacterCollide

#

lol

#

๐Ÿค”

#

I'm getting an inkling that if I have this run only on clients using IsoPlayer:isLocalPlayer() I can sidestep this whole syncing issue? maybe?

bronze yoke
#

oh that also should've been collider:isLocalPlayer() LOL

trim mist
#

no worries I understood lol

bronze yoke
#

i wrote IsoPlayer to get autocompletion because i couldn't quite remember the name and it isn't typed but i forgot to change it back

trim mist
trim mist
#

also sticking this here for posterity

gusty wharf
bronze yoke
#

there's a lot, but off the top of my head the driving traits come to mind

#

unfortunately as a rule for trait stuff i'd say if it affects a part of the game handled by java, it's hardcoded

gusty wharf
#

Are java mods possible?

#

Well just curious because surely ain't gonna code a thing in java

bronze yoke
#

yeah, but they aren't distributable through the workshop and generally there isn't much of a community or support for them

lone nest
#

trying to make some IsoPlayer run

#

but the default pathfinding call seems to override the numerous running flags check

drifting ore
#

Someone should make a Changed themed mod

formal oasis
#

I got a function I wanna run when folks first load into their save/server. (its a function that checks if a list of items are being worn). Do you guys have any advice on what event to use?

bronze yoke
#

ongamestart or oncreateplayer

formal oasis
#

hmmm okie. Yeah I was afraid of that. I tried those and got some errors

#

I was hoping it was a bad event use, not an issue in my code problem

#

thanks

thin hornet
#

There is also this way

local function init()
  Events.OnTick.Remove(init)
  -- do something on the first tick
end
Events.OnTick.Add(init)
#

But that would not trigger again if the player dies and create a new character and load back in.

formal oasis
#

So this is running the event on tick, then removing itself?

bronze yoke
#

is there a situation where this might behave differently to ongamestart?

thin hornet
#

Network is not ready i believe

bronze yoke
#

i don't think the network is ready on the first tick either

formal oasis
#

Actually this (might) work

#

its a gasmask check, i already have Events.OnClothingUpdated.Add(HS_SD_GasMaskCheck) and its working

#

so it already works if you change clothes

#

its just logging in and checking im trying to solve

bronze yoke
#

oncreateplayer would be best for that

formal oasis
#

Yeah the problem I encounter is this, This is the function I call with oncreateplayer

function HS_SD_GasMaskCheck(player)
HS_GM_wornItems = player:getWornItems()

#

it fails on HS_GM_wornItems = player:getWornItems()

#

but it works fine with things like, OnClothingUpdated or OnPlayerUpdate

bronze yoke
#

the first parameter passed to OnCreatePlayer is the player index

#

not a player object

#

you'd want to do something like```lua
local function onCreatePlayer(_index, player)
HS_SD_GasMaskCheck(player)
end

Events.OnCreatePlayer.Add(onCreatePlayer)

formal oasis
#

I see. I just started seriously diving into pz modding a few days ago, so I appreciate the patience

#

thank you, ill give this a shot

#

It did work. Thanks a bunch

heady crystal
#

Does setVariable not work with ints, floats, etc?

bronze yoke
#

it works with strings, bools and floats

heady crystal
#

Aw come on

#

I needed an int

bronze yoke
#

kahlua should be happy to interpret it as a float

heady crystal
#

playerObj:SetVariable("Name", 1) gives an error

bronze yoke
#

likely because it's setVariable

heady crystal
#

No way

#

Why does it work with a string

#

I can't believe I committed this mistake lmao

bronze yoke
#

yeah, there's a string capitalised one - maybe a backwards compatibility thing?

heady crystal
#

This is so wrong lol

#

I am not getting back the hour I spent trying to figure out why it didn't work ded

#

Thanks Albion love

tawdry solar
#

anyone know why this doesnt apear ingame

deft plaza
#

I was finna ask that lol

bronze yoke
#

no module

deft plaza
#

right

#

its module base

bronze yoke
#

no comma on mesh line

deft plaza
#

there is

bronze yoke
deft plaza
#

thats the other post

#

oh wait lol

#

this is what it looks like

#

I'm confused

red tiger
# bronze yoke

It should be illegal not to format your script before posting it to ask for help.

#

I sound like an asshole about this but I swear that this will help you so much.

bronze yoke
#

i'd say you should format your scripts but not for my sake

red tiger
#

Do it for your sake

mellow frigate
#

to get a percentage, should I use ZombRand(0,100) or something else ?

tawdry solar
#

100%

deft plaza
#

what am I doing wrong

#

btw I don't know how to formate my scripts

#

I just need to know what I am doing wrong

red tiger
# deft plaza

Would you pass in a college paper that looks like that?

#

Tabbing like that?

#

You want something that "works". If you have that much concern when maintaining your car's engine it wouldn't run. It's not your fault though because the game's files are just as bad.

#

Clean code and clean text will help you more than you will know.

#

You bring me a jumbled mess and ask me what you're doing wrong. :/

tawny depot
#

holy moly wtf is that whitespace

heady crystal
#

Anybody know an easier way to fetch the squares around a Player without fetching every single one manually with coordinates?

#

As in get say a 5 tile radius

red tiger
#

for x = p.x - 5; x <= p.x +5; x++

#

Do for x and y

tawny depot
heady crystal
#

LOL

#

The odds

tawny depot
#

right??? lmao

bronze yoke
#

i'm assuming you're using loops already so no nothing better than that

red tiger
#

I'm between buzzed and drunk irl so I'm simply answering questions

heady crystal
#

Ah shame

#

Yeah it sucks to fetch every single tile manually

tawny depot
#

real

heady crystal
#

I am adding this to the request we'll probably never get

bronze yoke
#

to be fair, their implementation will also be to loop from x-5 to x+5 etc etc

#

it's not really something we need them to add

red tiger
#

You should stop asking TIS for it and write it in yourself.

tawny depot
#

just a util function

heady crystal
#

Not as well as they can

tawny depot
#

I mean it's all about learning

red tiger
#

You can. No one is stopping you.

#

You're talking to the one who grandfathered in 3D model modding support.

#

All you have to do is try

heady crystal
#

Then by all means explain to me how I would code the function to check if a Player just made a new character, cause as far as I know it's just guess work

#

And guess work is lame AF

bronze yoke
#

oncreatecharacter check their hours survived

red tiger
#

Don't be afraid to mod the game.

heady crystal
#

You can create a character, leave then come back in less than an hour

bronze yoke
#

then do < 0.0001 instead of < 1

#

or just set a moddata

heady crystal
#

I fundamentally disagree with modding everything ourselves, based on guess work and work arounds, when it's infinitely easier and more helpful if the devs code it on their side.

bronze yoke
#

i agree that the onnewgame event should be fired more consistently

red tiger
#

I wish that more people modded the game in java.

tawny depot
#

real

bronze yoke
#
local function getSquaresInRadius(square, radius)
    local squares = {}
    sqX = square:getX()
    sqY = square:getY()
    sqZ = square:getZ()

    for x = sqX-radius, sqX+radius do
        for y = sqY-radius, sqY+radius do
            table.insert(getSquare(x, y, sqZ))
        end
    end

    return squares
end
```i just don't see why we need to get TIS to do this specifically for us i guess
red tiger
#

I'll rip this game apart to get the results I want.

tawny depot
#

I'm really new to this, but I'm used to hopping into games and just learning how to mod as I go, and I'm really debating just going straight java

red tiger
#

I have for ten years

bronze yoke
#

keep in mind you'll have very little support if you go the java route

tawny depot
#

I mean I have the javadoc and class references

heady crystal
tawny depot
#

what more to need ๐Ÿ™‚

red tiger
bronze yoke
#

keep in mind that they are creating a game not an engine

red tiger
#

Have fun modding. Take it as far as you want to go

tawny depot
#

The best part of modding is discovering and sharing new ways for other people to create mods

red tiger
#

It's your world to make

heady crystal
#

I'm not disagreeing with that?

tawny depot
#

Braven, I don't think anyone has an issue with the way you are modding, like at all

#

if you don't feel comfortable going that deep into the source code it's 100% fine, no one is going to knock you for that (at least I won't)

red tiger
#

I want to see modders transcend the limits and make their own visions come to life, if through modding games like PZ

heady crystal
#

Woah you guys just made this convo extremely odd. I'm outie.

tawny depot
#

lmao

red tiger
#

Just know that you always have a opportunity to have fun here

tawny depot
#

@red tiger you mentioned modding PZ for 10 years yeah? What were some of the biggest breakthroughs you've seen through modding? I used to be big into Black Ops 3 modding, and just seeing all the changes since I strated modding to now is just amazing, and I'm always interested in hearing how things came to be how they are now

red tiger
#

Don't limit yourself to what people want from you.

red tiger
#

Making entire communities out of simple ideas of how to make the game better.

#

That's why I love to help people mod here. It's fun to see what they do with better tools. =)

red tiger
bronze yoke
#

i never heard about that one, that's crazy

red tiger
#

I don't think that I could do something like that again

#

Seeing full friendships from because of translators built into the game

#

It's the best thing to see

tawny depot
#

See! That's what I'm talking about! What an awesome idea!

red tiger
#

That's why I say to not limit yourself. :)

#

You never know just how much you can charge people for the simple ideas you have.

tawny depot
#

lmao no kidding

red tiger
#

That's what over 20 years of modding taught me. :]

crystal oar
#

can i specify multiple items in player:getInventory():AddItems(); ?

#

or just one item per additems?

bronze yoke
#

one per call

crystal oar
#

okay thanks

#

so maybe turn my delimited list from sandbox vars into an array then loop through the array and add the items one at a time?

worn karma
#

Any zomboid animation modding video tutoral?

crystal oar
#

or skip the step of making an array, just do for item in string.gmatch(list, "[^;]+") do player:getInventory():AddItems(item); end?

#

okay thanks again

north drift
#

Hey Everyone, im new to modding, but i have a bit of experience programming. Im looking to making a simple(VERY SIMPLE) NPC mod that can be run on multiplayer or single player game modes. There seems to be very limited information about creating mods to be inclusive of multiplayer. Is there any information or caveats i should know about before diving head first into this multiplayer mod

bronze yoke
#

the number one caveat is that npcs can't be rendered in multiplayer, which is why none of the existing ones support it

north drift
#

Okay but why ?

bronze yoke
#

they use fake player objects, and multiplayer is just stricter about them

north drift
#

As in the game logic prevents it ?

bronze yoke
#

it seems that way

north drift
#

Is there any specific information about how or where this is done? and if it specific to a particular function call ?

bronze yoke
#

it's not something i'm specifically knowledgeable about

north drift
#

Okay hmm ill have to see and find where its being blocked.

#

and am i correct in saying the server lua is run in both single player and multiple player ?

bronze yoke
#

yeah

#

if you're referring to the client/shared/server structure in the lua folder, don't be fooled

#

server is also ran by both, the only special behaviour is that client doesn't run on the server

#

so nearly the entire game's lua is run on both sides

north drift
#

is there any mechanism to tell what the code is being run on ?

bronze yoke
#

yeah, there's isClient() and isServer()

north drift
#

eg perform one set of functions if on single player and another on multipler

bronze yoke
#

both are false in singleplayer

north drift
#

ahh perfect

bronze yoke
#

for that reason, with server-only code you generally want to check if it's *not* a client, not if it is a server, since usually you want your server-only code to run in singleplayer

crystal oar
#

i am having trouble figuring out how to use the value of a sandbox var, how do i get my local variable to grab the value of a sandbox var?

bronze yoke
#

for an option defined as MyMod.MyOption you would reference it as SandboxVars.MyMod.MyOption

crystal oar
#

i feel silly now that i see the solution written out

#

i guess i am pretty new at this

bronze yoke
#

hey, it's a big undocumented system

crystal oar
#

i appreciate the help

north drift
#

is there a distinction between 'Hosting' and 'Dedicated Servers' or are they just both Multiplayer

bronze yoke
#

i think there is some function to check for it, but they behave basically exactly the same so i've never needed to look into it

#

the game usually refers to in-game hosting as co-op (but it also sometimes refers to splitscreen as co-op tired)

north drift
#

hmm okay, yeah i saw a couple functions mention co op

#

is there a way to reload all lua files, or to reload lua files on change ?

bronze yoke
#

you can reload individual files from the debug menu (i don't recommend doing this, it usually causes issues), or reload all lua from a button on the main menu

#

if the mods in your save game don't match the mods on your main menu, it'll reload lua every time you load the save automatically: i consider that the easiest way

thin hornet
#

@north drift ```lua
isCoopHost() -- return true when called from the host client. The coop server runs in background, it's like a dedicated server.

To reload a server file in a hosted server, send this command from the chat as admin `/reloadlua server/myfile.lua`
north drift
#

awesome thanks

thin hornet
#

reloading a server file from the F11 debug menu will not reload on the actual server.

#

server lua files also runs on clients.

bronze yoke
#

oh, and don't expect server prints to show up on your client

thin hornet
#

if you really don't want the server lua files to run on client add this on top of the file

if not isServer() then return end

in which case will also not run in single player

north drift
crystal oar
#

now that i'm working on this again, I need to name this file something other than recipecode.lua right? it will mess up vanilla items if i name it recipecode.lua?

bronze yoke
#

yes, the filename must be unique to your mod

crystal oar
#

okay good

bronze yoke
#

if your mod needs many files i recommend just creating a folder so you don't need to give everything weird filenames

thin hornet
#

ya

barren junco
#

Holy! Is that Konijima?

#

The guy who made the decompilation guide?

thin hornet
#

I do my structure like this

media/lua/client/MyMod/client.lua
media/lua/server/MyMod/server.lua
media/lua/server/MyMod/recipecode.lua
media/lua/shared/MyMod/utils.lua
media/lua/shared/Translate/EN/Sandbox_EN.txt

require looks like this:

local utils = require("MyMod/utils")
north drift
#

is there any standardised way to do commands ?

thin hornet
#

not really

#

you can do as you like

#

I do this most of the time:

local function onServerCommand(module, command, args)
    if module ~= "PlayerConnectionMessage" then return end

    if command == "playerConnected" then
        PlayerConnectionMessage.doConnect(args.username)
    end

    if command == "playerDied" then
        PlayerConnectionMessage.doDeath(args.username, args.killer)
    end

    if command == "playerDisconnected" then
        PlayerConnectionMessage.doDisconnect(args.username)
    end
end
Events.OnServerCommand.Add(onServerCommand)
bronze yoke
#

a lot of people like to make a table of functions keyed by the command name

#

i don't like that though because you have to unpack the args table in the command function, makes ugly code imo (and difficult to reuse)

crystal oar
#

well i think i borked my mod lol, my test server is hung on initializing. it feels like so straightforward of a mod too

#

i have a recipe recipe Choose Kit 1 { destroy Sandbag, Result:EmptySandbag, OnCreate:Recipe.OnCreate.StarterKit1Open, Sound:PutItemInBag, Time:180.0, }
and a bit of lua code function Recipe.OnCreate.StarterKit1Open(items, result, player) local list = SandboxVars.StarterKits.Kit1 for item in string.gmatch(list, "[^;]+") do player:getInventory():AddItems(item); end end anyone see the problem offhand?

#

ignore the fact that i'm using sand for some reason, i haven't made the item for the mod yet that will replace sandbags in this instance

thin hornet
#

I suggest you create your own global for your recipes, replace MyMod by your mod name

MyModRecipes = {}
MyModRecipes.OnCreate = {}

function MyModRecipes.OnCreate.StarterKit1Open(items, result, player)
end
bronze yoke
#

errors in these files wouldn't be able to bork your server (probably)

#

is that the full recipe file? if it is you're missing the module

crystal oar
bronze yoke
#

it's always a typo drunk

crystal oar
#

esp this late at night

formal oasis
#

As I read that I uncovered a typo causing me issues. It literally always is a typo

bronze yoke
#

bonus points if it's a comma

formal oasis
#

...

#

yeah it was

#

i forgot a comma

crystal oar
thin hornet
#

This way you reduce the risk of overwriting a recipe function with other mods.

crystal oar
#

ah that makes more sense to me now

#

i'm still just trying to get it to work right at all lol, right now i can do the recipe but the knock-on effect of Recipe.OnCreate. isn't working

thin hornet
#

whats the knock-on effect?

crystal oar
#
    local list = SandboxVars.StarterKits.Kit1
    for item in string.gmatch(list, "[^;]+") do
        player:getInventory():AddItems(item);
    end
end``` it's to read the sandbox vars for a list of items and add them to the player's inventory
thin hornet
#

Try printing some values

crystal oar
#

does that print to chat or console.txt?

formal oasis
#

console.txt

thin hornet
#

if you run the game with -debug youll see it in the console UI

#

@crystal oar also whats the Kit1 string value atm?

crystal oar
#

Kit1 = "Base.Sandbag;Base.Belt2",

#

just to see if it works

#

adding some prints to the code now

thin hornet
#

also AddItems require a second param with the quantity

crystal oar
#

oh well that would probably help a lot

#

oh that was evidently the whole problem, i needed a qty

mellow frigate
bronze yoke
#

how do you detect it?

mellow frigate
#

I sendClientCommand until I got an answer

thin hornet
#

sendClientCommand is valid from the first tick

#
local function init()
  Events.OnTick.Remove(init)
  --- sendClientCommand is 100% available
end
Events.OnTick.Add(init)
mellow frigate
thin hornet
#

What do you mean may not receive it?

#

The network is ready during the first tick technically

mellow frigate
#

The callback added to Events.OnClientCommand is not triggered.

#

It occures systematicaly when I send on the first OnPlayerUpdate occurrence.

bronze yoke
#

i have not been able to send commands on the first tick either

thin hornet
#

and on the second?

mellow frigate
jaunty marten
#

@mellow frigate I have question about luautils module from ur lib
why in luautils.removeFromTable r u creating new table?
it's creating new object so after it input and output tables will be different so it's not removeFromTable but createNewTableWithoutValue
in addition this function is free to break sequential table

subtle sapphire
#

Hello, anyone here with some experience in creating new tiles? I have an issue I am not able to rotate a new sprite in game. I have defined all the four faces (east, south, west, an north), also CustomName and GroupName. But still, once I get the item in game and try to place it, it won't allow me to rotate. I can only see the east facing direction.

Also, double check with existing/vanilla tiles definition, and everything looks correct ๐Ÿค” ๐Ÿ‘€ Am I missing some Lua magic somewhere?

fast galleon
#

Would you mind sharing the pack, tiles and mod info files?

subtle sapphire
fast galleon
#
getPlayer():getInventory():AddItem('Moveables.Moveable'):ReadFromWorldSprite('furniture_seating_indoor_03_17')
--or
getPlayer():getInventory():AddItem(InventoryItemFactory.CreateItem("Moveables.solarmod_tileset_01_0"))

you could try spawning it like this ๐Ÿค”

fringe heart
#

hello everyone! Who knows where I can find a person who is willing to make a mod in pz for some money?

verbal yew
#

Guys, who know conditions for UI Offscreen Rendering, I need to check for this option

tame mulch
verbal yew
#

@tame mulch for example

local X = 0
if UIOffscreen Rendering = 1 then
X = 5
else
X = 10
verbal yew
red tiger
#

Good morning

zinc pilot
#

Is there a way to retrieve informations from mod.info in lua?

red tiger
#

Worked on this yesterday:

#

It's only visual. No function yet.

red tiger
#

I don't know the explicit API calls.

fast galleon
red tiger
ancient grail
#

Oh nvm saw you already joined thnx

red tiger
#

Probably good to keep that to DMs.

fast galleon
#
    local reader = getModFileReader("uta_mod","mod.info",false)
    print(reader:readLine())
red tiger
#

Not direct files in a mod.

fast galleon
#
print(getModFileReader("uta_mod","media/lua/client/UtaUtaNoMi_SkillControls.lua",false))
#

I just used it in prectice so it works.

red tiger
#
        public static BufferedReader getModFileReader(String var0, String var1, boolean var2) throws IOException {
            if (!var1.isEmpty() && !StringUtils.containsDoubleDot(var1) && !new File(var1).isAbsolute()) {
                // getCacheDir() == "../Zomboid/Lua"
                String var3 = ZomboidFileSystem.instance.getCacheDir() + File.separator + "mods" + File.separator + var1;
#

The individual asked about reading mod.info files.

#

You cannot get this from the folder that you can access but can't go outside of.

red tiger
#

Oh I see a clause in there for mod folder. Interesting..

#

All other readers forces the cache folder absolutely..

fast galleon
red tiger
#

Yeah ok so maybe.

red tiger
#

Okay bud.

fast galleon
#

I am not sure why are so mad, that I managed to read the file.

red tiger
#

But I understand that there's a lot of kids here so why would I be mad? lol.

fast galleon
red tiger
fast galleon
#

What the hell got up his ass?

deft plaza
#

he even said good morning lol

fast galleon
#

Maybe this will cheer him up?

upper moat
#

๐Ÿ™‚

radiant flame
#

I'm not sure whether i post this here? I just made my 2nd mod so I just wanted to share it.
https://youtu.be/bnbjy8FDgCo

With Point Blank, if you are close enough to a zombie and shooting a gun, the zombie will die instantly. Quality Of Life Mod For Project Zomboid

Steam Workshop Link โ–บ https://steamcommunity.com/sharedfiles/filedetails/?id=2990322197

My Twitch โ–บ https://www.twitch.tv/scott_hf
My Twitter โ–บ https://twitter.com/HelloFriendGame

Music By WhiteBatAu...

โ–ถ Play video
tawdry solar
mellow frigate
sinful scaffold
#

So, I am trying to write a hook that will allow two weapons to not have muzzle flashes; which I did, and which technically worked. However, if a zombie gets close enough to trigger a shove animation, all weapons never fire again, which is definitely not something I wish to happen. Any idea of how to fix this? (Also, thank you Glytch3r for pointing me in the right direction.)

#

ISReloadWeaponAction.attackHookOSBB = function(character, chargeDelta, weapon)
    ISTimedActionQueue.clear(character)
    if character:isAttackStarted() then return; end
    if instanceof(character, "IsoPlayer") and not character:isAuthorizeMeleeAction() then
        return;
    end
    if weapon:isRanged() and not character:isDoShove() then
        if ISReloadWeaponAction.canShoot(weapon) then
            character:playSound(weapon:getSwingSound());
            local radius = weapon:getSoundRadius();
            if isClient() then -- limit sound radius in MP
                radius = radius / 1.8;
            end
            if string.find(weapon:getWeaponSprite(), "Base.WEAPON1") then
            character:addWorldSoundUnlessInvisible(radius, weapon:getSoundVolume(), false);
            character:DoAttack(0);
            elseif string.find(weapon:getWeaponSprite(), "Base.WEAPON2") then
            character:addWorldSoundUnlessInvisible(radius, weapon:getSoundVolume(), false);
            character:DoAttack(0);
            else
            return original(character, chargeDelta, weapon)
            end
        end
    end
end

Events.OnGameBoot.Add(function()
    Hook.Attack.Remove(ISReloadWeaponAction.attackHook);
    Hook.Attack.Add(ISReloadWeaponAction.attackHookOSBB)
    
    original_attackHook = ISReloadWeaponAction.attackHook
    ISReloadWeaponAction.attackHook = ISReloadWeaponAction.attackHookOSBB
end)```
deft plaza
sinful scaffold
#

The bracket on the same line as item?

deft plaza
#

what

#

what do I do

sinful scaffold
#

I don't think it's supposed to be in the same line as other stuff, perhaps.

deft plaza
#

alright I changed it let me see if it works

#

still nothing

#

this good?

verbal yew
#

items parametr
WorldStaticModel = RedDuctTape,
but
Model RedDuctTapeBase

sinful scaffold
#

Yeah, was going to say it's not the same, also most likely case sensitive as well.

deft plaza
#

where do I put that?

verbal yew
#

try

{
  item RedDuctTape
    {
        DisplayCategory = Material,
        Weight = 0.3,
        Type = Normal,
        UseDelta = 0.25,
        UseWhileEquipped = FALSE,
        DisplayName = Red Duct Tape,
        Icon = RedDuctTape,
        Tooltip = Tooltip_FixItems,
        ConsolidateOption = ContextMenu_Merge,
        SurvivalGear = TRUE,
        WorldStaticModel = RedDuctTapeBase, ---- HERE
    }

        model RedDuctTapeBase
                {
                mesh = WorldItems/Redducttape,
                            texture = WorldItems/RedDuctTapeBase,
                scale = 0.01,
                                attachment world
                {
                offset = 0.0000 0.1500 0.1500,
                        rotate = 0.0000 0.0000 0.0000,
                }
            }
}```
deft plaza
#

what goes here sorry I'm new to modding

#

the ____

verbal yew
#

your items use WorldStaticModel = RedDuctTape
but your model name RedDuctTapeBase

deft plaza
#

what goes here I mean

verbal yew
#

nothing, it's just link for error, all stuff after -- not readable for code

deft plaza
#

so delete it?

verbal yew
#

may or not, it's don't do some stuff with code, just for comments

deft plaza
#

what

verbal yew
#

god...
this stuff just for comments, game not see it

deft plaza
#

okay sorry

#

jeez

verbal yew
#

u can write all things after -- or --[[ ]]--

#

for example

deft plaza
#

still does not show up in game

#

I'm probably forgetting something just tell me

verbal yew
#

scale = 1 may be

deft plaza
#

sorry as in its not in the game

#

I look in cheat menu and its not there

verbal yew
#

u reload game or file in -debug mode with F11?

deft plaza
#

oh I never knew that thanks for telling me but I restart the game fully

deft plaza
#

like I exit out and run in again

verbal yew
#

yep, it's not update in realtime if u change files

#

but can be if u start game in -debug mode

#

for lua, not know for txt...

deft plaza
#

one sec

#

how do I open that

verbal yew
#

u should set parametr for start game -debug

deft plaza
#

I already did

verbal yew
#

and push F11 ingame

deft plaza
#

thanks and what do I do when I do that

verbal yew
#

name of your file and reload button should help you

#

but scripts with items - it's not lua, it's txt...
not sure, but think it's not help u xD

#

but for future stuff... may be

deft plaza
#

the item still does not spawn though

verbal yew
#

drop your mod in pm

deft plaza
#

dm?

verbal yew
#

personal message

deft plaza
#

okay

deft plaza
#

what is item again

celest sable
#

Hey, quick question, which method should I use to damage an entity without instantly killing it?

#

An IsoGameCharacter*

tawdry solar
#

ive heard of it

bronze yoke
#

the base class for character objects

celest sable
#

It looks like the parent class for players and zombies but I might be mistaken

#

I'm only just digging into the javadocs, though I generally find javadocs unhelpful because people don't comment the functions you want

bronze yoke
#

character:getBodyDamage():ReduceGeneralHealth(amount)

tawdry solar
celest sable
#

Are there any logic gate mods that are relatively popular? Something where players could define simple boolean/timed logic for gates/traps/lights/sounds?

#

Also are there any good references for making a vehicle drive itself?

#

Javadocs make me sad because they usually have no comments on the methods you actually need

bronze yoke
#

i haven't looked into it but i would be surprised if self-driving cars are possible

celest sable
#

I was aiming for an on-rails thing

bronze yoke
#

i've done a lot of stuff with vehicles and it doesn't seem like it would let you do that

celest sable
#

Ideally a rollercoaster

bronze yoke
#

jab's going to love that

#

but it'd probably have to be a java mod

trim mist
mellow frigate
#

Are people aware of a limitation to the use of UI draw functions ? I'm having a hard time understanding why it sometimes draw and sometimes don't. This includes (but is not limited to) calls to ISUIElement:drawLine2, LuaManager.renderIsoCircle and in the end: all that uses getRenderer():render(...); e.g. getRenderer():render(nil, x-thickX, y-thickY, x+thickX, y+thickY, x2+thickX, y2+thickY, x2-thickX, y2-thickY, r, g, b, a, r, g, b, a, r, g, b, a, r, g, b, a, nil); Note: for the Iso relative functions, it also occures even when the player on the same Z level and in the same cell & chunk.

deft plaza
bronze yoke
#

missing comma on scale = 0.6 line

deft plaza
#

okay

#

fixed it

#

anything the wouldnt make it show up in game as in its not in the spawn menu

bronze yoke
#

there doesn't need to be a comma after imports { Base but i don't know if that causes issues or not

deft plaza
#

anything

#

else

bronze yoke
#

oh, it is .lua, scripts should be .txt

deft plaza
#

why?

#

I though lua is what you do?

bronze yoke
#

that isn't lua

#

these are a made up format zomboid uses for item, model etc definitions

deft plaza
#

okay thanks lemme try it now

mellow frigate
bronze yoke
#

sorry i don't have any knowledge about that

mellow frigate
red tiger
#

It's called ZedScript for right now..

deft plaza
red tiger
#

Also UI stuff isn't well documented.. It's why I am writing 3rd-party docs to it.

red tiger
deft plaza
#

nothing here guys

#

still won't spawn in the menu

trim mist
#

Isn't there a zedscript plugin or something that does this work for you?

#

with all the syntax?

red tiger
verbal yew
deft plaza
#

I guess I always get anxious I'm about someone stealing

red tiger
#

Look up 'ZedScript' on vscode extensions.

trim mist
#

I think people are pretty vigilant about that here. Besides, people are likely to reference your code anyway when you put it up on the workshop

red tiger
#

I had to work on something else because I had spent 4 months of my free time learning how to make extensions, writing syntax highlighting, a full on linter and parser, etc.

bronze yoke
#

yeah, your code is going to be visible to anyone who downloads your mod so no point being too secretive about it

deft plaza
#

alright

trim mist
red tiger
deft plaza
#

okay I found it

deft plaza
red tiger
#

Read the extension page.

#

It'll tell you how to use it.

deft plaza
#

okay I did it

trim mist
#

Oh. Speaking of which, has anyone edited tooltips of items? Like, either hooking into the function that creates the tooltip or editing tooltips on game launch?

#

Not sure where to begin with that

red tiger
#

Again, the extension isn't feature-complete however it should help you visually and help you with item properties for those definitions for now..

deft plaza
#

okay thank you Jab

red tiger
#

It doesn't seem to be that much in demand so finishing that project will be later on.

deft plaza
#

so this is my item_redducttape.txt

#

I don't see it in game

verbal yew
# trim mist Oh. Speaking of which, has anyone edited tooltips of items? Like, either hooking...
    local player = getPlayer();
    local inventory = player:getInventory();

    if player:HasTrait("DemoStrongGrip") then
        if player:getPrimaryHandItem() ~= nil then
        
        if player:getPrimaryHandItem():getType() == "Sledgehammer"
        or player:getPrimaryHandItem():getType() == "Sledgehammer2"
        then
        
        local sledgehammer = player:getPrimaryHandItem();
        sledgehammer:setEnduranceMod(1.0);
        sledgehammer:setBaseSpeed(1.2);
        sledgehammer:setCantAttackWithLowestEndurance(false);    
        sledgehammer:setTooltip(getText("Tooltip_demostronggripbuff"));    
        end
        end
    end
    
    if player:HasItem("Sledgehammer") == true or player:HasItem("Sledgehammer2") == true then    
        local skip = false;
        if player:getPrimaryHandItem() ~= null then
            if player:getPrimaryHandItem():getTooltip() == getText("Tooltip_demostronggripbuff")
            or player:getPrimaryHandItem():getType() == "Sledgehammer"
            or player:getPrimaryHandItem():getType() == "Sledgehammer2"
            then
                skip = true;
            end
        end    
        if skip == false then
--            local inv = player:getInventory();
            for i = 0, inventory:getItems():size() - 1 do
            local item = inventory:getItems():get(i);
            if item:getTooltip() == getText("Tooltip_demostronggripbuff") then
            local sledgehammer = item;
            sledgehammer:setEnduranceMod(4);
            sledgehammer:setBaseSpeed(0.9);
            sledgehammer:setCantAttackWithLowestEndurance(true);            
            sledgehammer:setTooltip(null);
            break ;
            end
            end
        end    
    end
end```
#

hmm... need to learn spoler do...

deft plaza
#

wait If I made a weapon and a crafting item does it need to be in the same .txt

verbal yew
#

it's can be in another txt or another mod folder or etc

deft plaza
#

I'm send the txt

verbal yew
#

i use your txt only

#

i think your problem with mod folders directory

deft plaza
#

alright I'll send it

verbal yew
#

for example:
Zomboid - Workshop - Your Mod Name

#

mod name folders can be another

#

all your modding stuff start here

deft plaza
#

yes

#

I sent my zi[

#

zip*

verbal yew
#

wip

deft plaza
#

k

verbal yew
deft plaza
#

okay?

verbal yew
#

register

#

RedDuctTape not same as redducttape

deft plaza
#

okay let me fix that

verbal yew
#

but another stuff work

#

idk how u trouble

#

apologise it's your mod folder

deft plaza
#

what about it

verbal yew
deft plaza
#

I'm using the mod folder not workshop

verbal yew
#

{
     item macheteredhandle
    {``` - imports base should be
deft plaza
bronze yoke
#

oh, actually

verbal yew
#

recipe should be with module

bronze yoke
#

you have a comment here, but -- doesn't mark comments in zedscript

deft plaza
#

delete it?

bronze yoke
#

ya

deft plaza
#

bruh

#

alright what now

verbal yew
deft plaza
#

can someone tell me what to do

mild venture
#

Hello everyone. Please tell me how I can get a list of cars in a certain square in the world. I have the coordinates of the world, like:

startPos = { x = 8688, y = 7066, }
endPos = { x = 8710, y = 7052, }
deft plaza
#

what do I do

bronze yoke
#

the easiest way is to loop through the vehicle list and check each vehicle's location with BaseVehicle:isIntersectingSquare(x, y, z)

#

vehicles 'belong' to one square but they're big so they cover many other squares that don't know about them, so you have to work backwards from the vehicles

mild venture
#

Thanks!

deft plaza
#

btw it still doesnt work

#

JUST THE RED DUCT TAPE OKAY

#

THE MACHETE IS STILL GOOD OKAY

tawdry solar
#

instead of 0.1

verbal yew
tawdry solar
#

yea hik

#

ik

verbal yew
#

but i have it shrug

red tiger
#

I bet it's loading another version of the mod instead of the one he's trying to load.

#

xP

red tiger
#

Like a copy of the mod in another folder.

#

same ID.

#

A lot of people fall for this issue.

tawdry solar
#

maybe

deft plaza
#

what do you mean

tawdry solar
#

man i needa make a backpack mo

#

mod

deft plaza
#

how do I fix what your saying

tawdry solar
#

@red tiger cant be right

#

he has a working item already in the same mod

bronze yoke
#

well if it's working in the other location

#

if you've worked from both the mods and workshop folders you should make sure only the one you're working on is still there

tawdry solar
#

hes adding an item to his mod

bronze yoke
#

yeah but if you've worked on the same mod in two different folders this issue happens

#

that's usually the cause of these 'new thing i added that works for other people and seems perfect doesn't work for me' problems

tawdry solar
#

your right

tawdry solar
#

i feel this is partly my fault

deft plaza
#

probably

tawdry solar
#

for not saying what it meantr

deft plaza
#

its not

tawdry solar
#

i only work in the /workshop folder

deft plaza
#

its still not there

#

what if the ids are the same

#

is that how its supposed to be

tawdry solar
#

'ids are the same'

#

this?

deft plaza
#

no

verbal yew
#

guys, need event stuff for trigger after apply game options

deft plaza
tawdry solar
bronze yoke
tawdry solar
#

for the mod

deft plaza
#

no I mean

#

wait so a mod.info should not be in workshop

verbal yew
#

drop screenshots of your folder

deft plaza
#

workshop

verbal yew
#

folder stuff plz

deft plaza
#

what

verbal yew
deft plaza
#

dude

verbal yew
#

head of full folder position

deft plaza
#

...

bronze yoke
#

there's two structures for mods:
Zomboid/mods/myMod/mod.info
Zomboid/Workshop/myMod/Contents/mods/myMod/mod.info
you should only have one

deft plaza
#

this is mods folder btw

#

so

tawdry solar
#

btw work in the workshop folder

#

as it will save time transfering folders to update the mod

deft plaza
#

whats the point

#

fine

bronze yoke
#

it's fine to work in the mods folder until your mod is ready to release

tawdry solar
#

to save time

#

we released it already

bronze yoke
#

oh then that's why

tawdry solar
#

this is our first update

deft plaza
#

crafting recipe

tawdry solar
#

we are trying to get this to work

deft plaza
#

your nasty

tawdry solar
#

I got this one ๐Ÿ˜Ž

deft plaza
#

nothing here

#

so everyone just gave up

bronze yoke
#

are you subscribed to your mod on the workshop

deft plaza
#

no

#

should

#

i

tawdry solar
#

no

#

this is the first one you did with the machete

deft plaza
#

yea

tawdry solar
#

when you got it working?

#

alright

deft plaza
#

so thats it?

#

is this part right?

tawdry solar
#

i dont do imports

bronze yoke
#

if your module is base it doesn't need to import base

tawdry solar
#

ive decieded to make this a comunity effort

bronze yoke
#

but iirc this doesn't break it, it just complains in the log

tawdry solar
#

what does iirc mean

bronze yoke
#

if i recall correctly

tawdry solar
#

oh

trim mist
#

@bronze yoke @thin hornet @ancient grail and other modders, I just added a new request here: #1118138532314218557 message
Let me know what you think of it and if I have anything wrong! I'll be adding 1-2 more suggestions shortly about adding more variables to the IsoGameCharacter class and allowing modders to change the speed scale for some animations (or change animSets for a game character)

#

Sorry for the @ but I think this is a widely requested and bumped-into issue

bronze yoke
#

i wouldn't expect much

trim mist
#

If people could thumb it up or something that might also help?

bronze yoke
#

i'd post something in the lua requests forum thread, not that i think that really has much of a chance either

trim mist
#

IIRC Konjima was gonna post these after review from Aiteron

#

to said forum post

deft plaza
#

whats a import and a base?

tawdry solar
#

i got sm to ask you btw

deft plaza
#

what

tawdry solar
#

ilkl dm

deft plaza
#

what

deft plaza
crystal oar
# deft plaza whats a import and a base?

i'm probably explaining htis wrong but Base is the module that contains the base game's stuff, and importing it lets you refer to it without putting Base. before each thing you reference in it

tawdry solar
#

oh

verbal yew
#

guys, need event stuff for trigger after apply game options
and for key push/holding/pushed (right mouse button or ctrl key)

heady crystal
#

Is there a list of what each anticheat does in MP?

tawdry solar
#

i need help to make a backpack

#

ive got textures and model

bronze yoke
#

so there probably isn't anything widely available for that

heady crystal
#

I... I guess I might get some people banned then lmao

#

I wanna use TP on multiplayer

bronze yoke
#

honestly, just try it and turn off whichever anti cheat it tells you kicked you

thin hornet
#

I think it's type 12 or 13

red tiger
#

The fact that the official anticheat is cryptic is hilarious

#

There was no need to but they did it anyway

tame mulch
tawdry solar
#

hello aiteron

mellow frigate
# tame mulch I think problem with how you call this functions

That's also what I though, so I played with it for several weeks. As it also occurs when called from LuaManager.renderIsoCircle, I now doubt there is a way to ensure it works (it works most of the time, not always, with the same call). Also When calling the equivalent for (above) map (and minimap) it works ALL the time.

tame mulch
deft plaza
#

okay still its not showing in the spawn menu can't find it at all

#

anything I need to fix

#

?

deft plaza
#

help

#

I get no one wants to help because its not working for me no matter what but come on

verbal yew
#

try find like base.redducttape

deft plaza
#

where would I go

bronze yoke
#

if you aren't getting help it doesn't mean nobody wants to help, it means nobody knows what's wrong

verbal yew
#

or redducttape. idk but i have it in spawn menu

deft plaza
#

no I mean I cant its not in the spawn menu the cheats

#

the items does not spawn yet

#

what do you mean base.redducttape

heady crystal
#

Does player mod data not persist in MP?

crystal oar
#

What item? Also are you just trying to spawn in an item or are you writing a mod?

bronze yoke
#

it persists

deft plaza
#

a machete

#

so I did that

#

I'm trying to add a custom item duct tape

#

red duct tape

crystal oar
#
{
    imports 
    {
        Base
    }
    
    item SKit1
    {
        DisplayCategory = Junk,
        Weight    =    3.0,
        Type    =    Normal,
        DisplayName    =    Starter Kit,
        Icon    =    Briefcase,
        StaticModel = Briefcase,
        WorldStaticModel = Briefcase,
    }
}``` so like this is how to add a really simple item that right now does nothing without more code
deft plaza
#

okay

#

so?

#

this is mine

bronze yoke
#

icfon?

deft plaza
#

okay

#

just fixed it

#

I need more

crystal oar
#

okay so since you are making your item part of base you don't need to import base like i did (i think)

deft plaza
#

okay so what do I do?

heady crystal
#

Ok I found the issue wtf

#

So I teleported the player up, and when I load in and check they are in the Z position they were before I teleported them

crystal oar
heady crystal
#

Only in code, in-game they are on the floor I sent them to

deft plaza
#

I'll the run the game again

heady crystal
#

reeee

deft plaza
#

one sec

deft plaza
crystal oar
deft plaza
#

no I did

#

I used the cheat menu and nothing works

#

I mean its not there

crystal oar
#

k did you get an error when you loaded the save up?

deft plaza
#

no

crystal oar
#

also i see worldstaticmodel is RedDuctTapeBase and then you have a model for redducttapebase, is that the problem?

deft plaza
#

models_X is Redducttape

crystal oar
#

that was greek to me, anyone catch that?

deft plaza
#

what

#

dude

deft plaza
#

alright

#

worldstaticmodel is supposed to be a FBX file correct

crystal oar
#

i am unsure, i only reuse vanilla assets. i'm a rookie, but i'm trying my best to grasp what would cauuse it to not show up

#

and something like the case of RedDuctTapeBase versus redducttapebase seems a likely culprit

#

like what is RedDuctTapeBase? i don't see that defined

deft plaza
#

this*

crystal oar
#

no that is redducttapebase

bronze yoke
#

WorldStaticModel should be the name of a model script

#

the model script's mesh should be the actual filename

deft plaza
#

what is the model?

#

is that like the 3d thing

bronze yoke
#

yeah

deft plaza
#

the fbx?

bronze yoke
crystal oar
#

do you see what i mean that redducttapebase does not equal RedDuctTapeBase?

#

ah thanks as always albion

deft plaza
#

how about now

crystal oar
#

as far as i can tell with my rookie eyes that looks right

deft plaza
#

changed it

#

would that fix everything

#

god damn it

#

its still not there

crystal oar
#

can you show the whole thing again?

deft plaza
tawdry solar
#

i dont think model matters for the item to spawn ingame

#

unless it works and the model isnt apearing

deft plaza
#

man

crystal oar
#

i think it's not getting that far, otherwise it would show up in the item list

deft plaza
#

I'm trying to make it appear in game like the item in the cheat menu

crystal oar
#

it should be a type drainable not normal, i'll keep looking

deft plaza
#

but I'm trying to make a recipe and I don't want the players to keep using the redducttape

#

to make the item

crystal oar
#

come again?

deft plaza
#

man

crystal oar
#

maybe seeing the recipe would help me understand?

deft plaza
#

no no

#

man

#

I don't want the player to keep using the red duct tape

#

so I made it a normal item

#

I want it to be a one time use

crystal oar
#

so then why and how does it have a usedelta?

deft plaza
#

what

#

oh

crystal oar
#

UseDelta = 0.25

deft plaza
#

usedelta is??

#

i'm new to modding

crystal oar
#

how much of a drainable is used

deft plaza
#

so delete it