#mod_development

1 messages ยท Page 123 of 1

glass basalt
#

gotta love macros hehe

weak sierra
#

that's.. a hard question.. everything? sometimes im fixing bugs in others' mods sometimes i'm making new mods to add features, sometimes it's just writing recipes for packing items down, sometimes i have to modify an existing mod (w/ perm) to change the way it works to suit the server, remove a feature, etc.. sometimes i have to make custom RP items for people

#

im just constantly doin shit

weak sierra
#

i don't have money

#

:p

glass basalt
weak sierra
#

looking for people who'd like to play on that sort of server who also mod, so they could contribute and help make the place better as we go

glass basalt
#

Idk if I'm up for the task, you could probably judge my Workshop and get a consensus

weak sierra
#

u know more than enough judging by that

glass basalt
#

MP is a dark alleyway I haven't touched stressed can't even fix my own mods to work with MP

weak sierra
#

i could help with that

glass basalt
#

well, I'll start by taking a look at the RP server. Got an invite?

weak sierra
#

sent in dm

sleek heath
#

@weak sierra so im trying that mod and im not seeing any cassettes at all

#

its working a little too well

#

lol

#

ok found some in a car glovebox

#

guessing thats the only place they're showing?

weak sierra
#

afaik it should spawn in all the places they normally do but i dunno i havent exactly gone cassette hunting in a while

#

maybe im wrong

sleek heath
#

i'll probably do the 1 less decimal strat

weak sierra
sleek heath
#

it is nice to have the cases and such

#

but unfortunately its working too well

red tiger
#

@quasi geode Just finished my parser rewrite. It's so much cleaner now.

quasi geode
#

clean is good

red tiger
#

I have a few categories to implement however.. I might wait on vehicles just because.

#

I also get the feeling that vehicles will be modified for b42.

#

All good. Done for the night.

odd siren
#

Can somebody make a tamagotchi collectors mod since PZ is in the 90's ๐Ÿ˜†

red tiger
#

Might as well add Beanie Babies

rancid panther
#

if you rename a trait or occupation will there be any issues for ongoing saves for other people using your mod?

#

or would it like just remove the trait/occupation from the character details or something?

bronze yoke
#

it will remove the trait

rancid panther
#

ok thanks!

cosmic condor
#

some of my items were released in 1994 and people are complaining

#

the safe timeline is before 1993

rancid panther
#

wondering if i should change the bite from the left forearm to the right forearm, to make it affect combat...

fast galleon
#

@sour island what do you think about spawner api that uses global objects instead?
pros: no LoadGridsquare checks (chunk load v42), gets called when there's an object in chunk, can get all chunk objects with a command

#

@jaunty marten no more strings concat, any better way you can think of?

rancid panther
#

i chose the left arm cuz it makes the infection the only concern with the trait, but if i make it the right arm, even if someone has a cure already or an immune trait it wont be free points

bronze yoke
#

especially if the arms are involved, randomly having it on the right arm is a way bigger deal than the others

fast galleon
#

leg bites are worse

rancid panther
#

also cuz ellie from TLOU is bitten on her right arm, someone could roleplay as ellie if they also take an immunity trait LOL

fast galleon
#

if you can't decide, make both traits

rancid panther
#

i was thinking of a sandbox option actually

#

sandbox option for bite time and for bite location

#

but idk how to make sandbox options, so i'll look into it when i have time

#

i kinda get that u can make a variable that takes from the sandbox file but havent tried applying it yet

fast galleon
#

it's generally simple enough

rancid panther
#

yea i've seen other mods that have sandbox options

fast galleon
#

using it to select bite location should be simple, changing trait selection before world loads is not

rancid panther
#

wym

fast galleon
#

sometimes people ask about using sandbox for character creation UI, which is too early to use them

#

I thought I'd mention this because you make a trait, but it shouldn't affect you

rancid panther
#

ah, like enabling a trait or disabling one?

bronze yoke
#

it's not that character creation is too early, it's that a lot of common things people want to change with them is permanent once it's set in the java

#

one of my mods heavily utilises character creation sandbox options

rancid panther
#

hmm

#

im sure i will understand more if i ever run into the problem then

fast galleon
#

never tested it so... would mp have current vals? any issues with sp?

bronze yoke
#

only issue i had was in singleplayer if you die and exit they don't load when you load game and make a new character, but i think i just forced it

rancid panther
#

i can make a dropdown menu for sandbox so ppl cant type in a nonexistant body part? would i need to make an array or something

bronze yoke
#

you can use enum sandbox option

rancid panther
#

ic

#

i will look at other mods that do stuff like that and see how to apply it

fast galleon
#

with two options you make a simple if sand == 1 then ... else ... end, with more options you add more ifs or make a table

fast galleon
fast galleon
#

cherrypie

  1. How much earlier can we expect sandbox for v42?
  2. Will chunks be 8 x 8 everywhere? Will chunks be further broken down per 4 levels or is that only for rendering?
  3. Some moveables accept only specific items, are there plans to have this less hardcoded? e.g save persistently the AcceptItemFunction for ItemContainer or expand the isItemAllowedInContainer function.
spring zephyr
#

Hello i have question about adding zomboid animatino to action. but i cant find a proper name or value .

i found
setanimation("Loot")
setVariable("Looting","mid").

but i want to try with action which i can see in debug mod , name "Bob_AttackFloor1Hand". where can i find this proper name and variable? even in wiki only shows some basic formats.

tame mulch
quaint mirage
#

Hey, just making a vehicle spawn disabler for my server, just wondered what is a good and bad spawn region for vehicles?

#
-- Good spawns --
VehicleZoneDistribution.good.vehicles[vehicleMod.vehicle] = {index = -1, spawnChance = vehicleMod.spawnChances.good};

 -- Bad spawns --
VehicleZoneDistribution.bad.vehicles[vehicleMod.vehicle] = {index = -1, spawnChance = vehicleMod.spawnChances.bad};
#

Im trying to hide black hawk but it still spawns , just wondering if good and bad had anything to do with it

#
 {
            vehicle = "Base.hmmwvtr",
            spawnChances = {
               parkingstall = 0,
               trafficjams = 0,
               trailerpark = 0,
               junkyard = 0,
               fossoil = 0,
               military = 0,
               ranger = 0,
               police = 0,
               spiffo = 0,
               good = 0,
               bad = 0
            }
         },
         {
             vehicle = "Base.hmmwvht",
             spawnChances = {
               parkingstall = 0,
               trafficjams = 0,
               trailerpark = 0,
               junkyard = 0,
               fossoil = 0,
               military = 0,
               ranger = 0,
               police = 0,
               spiffo = 0,
               good = 0,
               bad = 0
            }
        },
#

Also these still spawn

scenic cradle
#

huh... why would my UI_EN translations suddenly stop working...

nimble spoke
scenic cradle
#

@nimble spoke - has to be of course - I'm just trying to identify where it is..

#

cause only a portion of my UI translations are borked ๐Ÿคฏ

#

(btw - LOVE your mods dude!!!)

fast galleon
scenic cradle
#

so... we have some experimentation I was doing to the professions+traits we use:

#

however I can still see the previous ones i dropped in working - side by side with the broken ones:

#

code wise:
p70s = ProfessionFactory.addProfession("70s",getText("UI_prof_70s"),"profession_70s",70,getText("UI_profdesc_70s"));
wastelandTransporter = ProfessionFactory.addProfession("wastelandTransporter",getText("UI_prof_wastelandTransporter"),"profession_wastelandTransporter",-6,getText("UI_profdesc_wastelandTransporter"));

#

and then from my UI file:
Working:
UI_prof_wastelandTransporter = "Wasteland Transporter",
UI_profdesc_wastelandTransporter = "Since the outbreak you've been making a go of things by running goods for people. It started with small pockets of civilization, but over the last year it has expanded to a small network of traders - giving you a market to buy and sell goods at higher value to the small colonies that don't have transportation networks worked out.",
Vs Not:
UI_prof_70s = "70+ Years Old",
UI_profdesc_70s = "10 years into the outbreak and you're one of the oldest folk still standing - if you weren't ready to kick the bucket before, you are now - but if you're going down you're taking every last walking dead you can with you.",
UI_trait_age70 = "70+ Years Old",
UI_traitdesc_age70 = "All you could ask for is a rocking chair, a porch, and a lawn to yell at some kids to stay off of. You'll settle for a shotgun and some zombies though - cause with the arthritis and whatever else you have wrong, this is it.",

#

it all looks right - but I don't understand why the test on the new UI elements I added is defaulting to their text values in getText() vs the actual UI definitions

#

the only difference on my end is this is the first time I've dropped a + symbol into a description and I'm about to remove those as part of my testing.

#

assuming it's a special character or something shrug

nimble spoke
#

70s versus 70S ? It is case sensitive

fast galleon
#

nothing strikes me as obvious yet, can you drop the whole file?

pulsar heath
#

99% of the problems or errors i get when modding is a typo

#

so thats a good thing to check

scenic cradle
fast galleon
#

I mean how huge would it be

#

or at least use and crop as little as possible

nimble spoke
#

a quick check in the game's files tells me + isn't a special character

scenic cradle
#

lol oh it's not that big just wanted to make sure that's what you wanted - give me a few moments, cleaning it up a bit and checking for a few obvious things (like I noticed a missing , at the end of a line near the bottom of my file just then...)

#

and a reload of my LUA systems will reload the UI translations as well right? This is one of those scenarios where I might need to kill PZ completely and relaunch?

pulsar heath
#

reloading lua should do it

#

unless you change a texture or something

fast galleon
#

hm, message.txt is bad name for that file drunk ๐Ÿคฃ

scenic cradle
#

๐Ÿ˜›

tepid dawn
#

hello, is it possible to change the main male and female playermodels?

#

through modding

fast galleon
#

you can reload lua in-game

#

translations*

scenic cradle
#

....

#

I think I know what the problem is

#

testing something to validated that I am an idiot....

tepid dawn
scenic cradle
#

Yup - confirmed guys, I'm just an idiot - disregard my question! ๐Ÿ˜ฃ

fast galleon
#

can you say what it is?

scenic cradle
#

Apparently I had a copy of UI_EN.txt left outside of my EN folder. I do most of my editing in notepad++ and keep my files open. Apparently I started editting the one in translate/ and not translate/EN - so none of my new content changes were getting added -_-

#

facepalm

#

<- idiot

fast galleon
# jaunty marten wdym?

Instead of using LoadGridsquare event and concat, make global objects. That seems better, unless you can think of another way for that spawner api.

scenic cradle
#

lol I'm so rotted over that - but at the same time glad it was an easy fix. Wondering how long I've had that file duped now....

fast galleon
#

so it was a file problem in the end, try to learn from this

#

you're not the first person to do this

tepid dawn
scenic cradle
#

@tepid dawn I've only seen full model replacements, not one that modifies the UI to let you pick in character creation unfortunately.

tepid dawn
#

You mean they instantly spawn you with a set character ?

tepid dawn
hot patrol
#

Do textures need to be in the vanilla specific file structure for them to be applied to a model? For example my mod uses the same texture for both a clothing and weapon item. Currently I have 2 folders with the exact same images in the textures folder mimicing how the vase game does it but can I just have 1 set of those images in 1 folder and put the directory in the script?

tepid dawn
hot patrol
#

Testing it now

#

honestly don't kbnow why I didn't when I first made this

#

it does in fact work

faint jewel
#

question! anyone know of a way to get a 2x2 square that is within the range of a vehciles right door area?

red tiger
#

Good morning.

tepid dawn
#

i mean country wise

red tiger
tepid dawn
zinc pilot
#

hello, is there a list to all available Keyboard.KEY_* values?

#

for example, if I wanted to bind DELETE, what's the correct one?

#

(not asking about normal key codes)

fast galleon
fast galleon
zinc pilot
red tiger
#

Getting vehicle scripts parsed & loaded doesn't sound hard to do. It's understanding the nature of vehicle scripts and what they do that's more of my concern.

#

I've modded this game for 10 years and I did not get into scripting so some of this is new to me.

#

=/

hot patrol
#

is there a way to add a context menu action for swapping weapons similar to raising you hood on a hoodie?

#

so like right click weapon, select option and weapon turns into something else

#

I know for clothing you use these ClothingItemExtra = DakiArmorBack1, ClothingItemExtraOption = DakiBack, clothingExtraSubmenu = DakiFront,

thick karma
#

Wdym by swapping weapons? Just unequipping one and equipping another?

#

(There is a vanilla radial for this on gamepad so I am confused about whether your goal is something else...)

#

@hot patrol

hot patrol
thick karma
#

Ahhhhhhhhhh

hot patrol
#

carry over condition and all

thick karma
#

Mmmmmm... I suppose you could remove the item from the player's inventory and store it somewhere and replace it with another and try to transfer the stats. There is a setCondition function for items, e.g., which could be used to match their conditions during the swap

hot patrol
#

that sounds like it could work. In my case the 2 weapons are completely identical stat wise minus the model

#

so it's like just changing the cosmetic look of it

summer acorn
#

Do you know if you can change the base model (the .fbx file) of an item without needing to create another item?
Like change this item from model x.fbx to model y.fbx

faint jewel
#

how can i check if a certain tile is within range of a vehicle then?

thick karma
#

Also, your inventory containers have access to DoRemoveItem(InventoryItem inventoryItem)

#

Not sure which is the right one to use tbh, or perhaps both work.

#

Containers also have DoAddItem(InventoryItem inventoryItem)

#

I am not 100% how to create the item if you don't have its reference.

#

I have to work so unfortunately that's all the time I have for guessing ๐Ÿ˜ฆ

hot patrol
red tiger
#

Wondering if there should be a JSON schema made after both FWolfe & I complete our JSON parsers.

#

I'd hate to create two standards. =/

#

For now my JSON will be a proposal to be the standard for representing ZedScript.

shadow bough
#

Anyone working on a power/water restoration quest mod?

faint jewel
#

still needing assistance ova heeah

red tiger
#

Wait.. if destroy is inferred for recipe script-definitions, why is destroy a symbol?

#

It makes sense to have keep.

faint jewel
fast galleon
red tiger
#

(I need to understand how this works so I can properly map these definitions)

fast galleon
#

I'm not sure what a symbol means

red tiger
#

I'm looking at FWolfe's tutorial.

#

keep ...
keep here is what I'm saying is a symbol.

#

keep, destroy being used here to mark what ingredients are kept and destroyed.

#

Then there're lines that are not marked keep, or destroy.

#

So is each line an array of optional ingredients for part of the recipe?

#

Going to go back to reading more on recipes. =/

fast galleon
#

so you can do it through the window if it's close enough?

faint jewel
#

yes

#

and it will set a timer on the tile to stop people from spamming mail into one box.

#

it IS an RP mod.

red tiger
#

Lol I spotted some Russian text in the English side of scripting pzwiki.

#

:3

faint jewel
#

I just need to be able to check for a mail box tile outside the window if the window is open

zinc pilot
#

what's the best way to get out of PlayEmote?

ancient grail
#

Does that work? getOrCreateGridSquare?

#

only way is expensive
Afaik
The ongridload event
Or onloadgrid

Idk i forgot but its something like that

#

Ye

deft falcon
#

is there a way to check whether helicopter is active

#

like, the event

ancient grail
#

Ye afaik this is impossible but there are evidence that it works with that function

Maybe just need to find a way to remove the event once its done doing its job

digital moon
#

I know this is likely a wide-open question, but if you create a custom tile/placeable and it works in TileZed but when bringing it into the game it is not found - what is usually the most common reason?

EDIT: The game sees the mod and can be activated, but the item/tile itself is not found in game

#

OK awesome, thank you.

#

Daddy Dirk said something along the lines of making sure you're referencing them in the mod.info and to use 100-8000

Would it be something like"

pack=name_of_pack 4456

or do you need to have the .tiles extension added to it?

drifting ore
#

packs are the sheet of .png

#

tile properties is another file

#

it defines what the properties of each png in the tilesheet do

digital moon
#

Oh ok - I do have the png so that's good.

drifting ore
#

if you havent made one already

digital moon
#

Oh I did make that as well - I likely don't have the packs/files in the right locations.

I have the png sheet in media/textures

drifting ore
#

texturepacks

ancient grail
#

The png isnt needed on the mod itself . Just fyi
Also this is more of #mapping related but what the heck lets talk about it here
Tho you will get better help from people who are always using tilezed

digital moon
#

I did create the pack file and it's also in the texturepacks folder

drifting ore
#

oh. you just wrote this I have the png sheet in media/textures

#

thats confusing

#

that is your pack

ancient grail
#

Yeah can you show us the mod ini
And how you placed them on the mod

digital moon
#

Oh - yeah, I apologize. I have pngs in the texturepacks folder, the inidividual tile pngs in the textures/worlditems folder

ancient grail
#

Yeah png isnt needed like i mentioned
You only need en to create the packs

drifting ore
#

yep true story

digital moon
#

Yes I can - apologize for the daftness - I usually pick this stuff up pretty quick and feel a bit silly for asking what seems to be questions I should already know the answers to.

drifting ore
#

i think @ancient grail is right. you should really try mapping if we have no luck

digital moon
drifting ore
#

everyone there is using the same tools

#

so if you have issues, they will have already ran into them before

#

way faster answers

ancient grail
#

And you saw a mod that did the wrong thing?

digital moon
#

Oh ok, I assumed mapping was specifically for making custom maps, I was trying to create a custom container like a shelf, etc. I didn't realize.

drifting ore
#

no worries we all try to figure out answers lol this is not a bad place to ask, just not the best

ancient grail
#

Ye let him discuss it here
๐Ÿ™‚ We got this

drifting ore
#

haha love it

ancient grail
#

We shall figure it out

digital moon
#

I'm confused as to why everyone is so friendly...something is awry...

#

lol

drifting ore
#

lol

#

we love modders and mappers!

#

we all are modder technically

ancient grail
#

Welcome to the pz mod community then ๐Ÿ™‚

digital moon
#

I love them too, a lot of you folks have made our server so much better and breathed new life into the game for us

#

I wanted to try to return the favor

ancient grail
#

So like i requested kindly show us screenshot of the directory and the files

digital moon
#

OK sounds good one moment

ancient grail
#

1 for texturepacks
1 for media
1 modinfo itself

drifting ore
#

i also rewrote all my entire new lightswitch mod from 0

#

all last night

#

was pissing me off with some issues i couldnt figure out so just started over lol

ancient grail
#

Damn

drifting ore
#

it works okay. i have one small issue atm and a weird syncing issue

#

thats it

#

after this issue is clear i will post mine

digital moon
#

Ok right now it's just testing names but I can change them if needed. Gathering the screenshots now.

ancient grail
#

Huh

#

Testing names?

drifting ore
#

names shouldnt matter

digital moon
#

like "test_container"

drifting ore
#

at least in the sheet itself

digital moon
#

lol

ancient grail
#

It does
Want me to call you dickless from now on? Haha jk

digital moon
drifting ore
#

lmao

ancient grail
drifting ore
#

LOL

ancient grail
#

Wasnt expecting that at all

drifting ore
#

some friendly fun times lol

ancient grail
#

Dev chat has all sorts of crazy

digital moon
drifting ore
#

i wouldn't take too much seriously

#

thats hilarious

digital moon
#

OK brb getting the screenshots lol

digital moon
#

I wasn't sure if tilezed or the modding tools had the ability to automatically save everything under the correct directories or not.

ancient grail
#

Shout out to @zinc pilot
Looking forward to do more collab mods with ya

digital moon
#

DUDE lmao

#

hahahhaa that's awesome

ancient grail
#

Looks correct @digital moon

#

Let us see the tilezed definition

digital moon
#

Where do I show you that?

#

Oh the lua?

ancient grail
#

On the tilezed

digital moon
#

ok one moment

#

is that the tile properties?

fast galleon
#

switch places pack and tiles

#

the pack=, tiledef= lines have wrong files

digital moon
#

Oh jeez

scenic cradle
#

@ancient grail that vid is awesome, and I may need to grab that and attach to my religious zealot trait in our private server. LOL ๐Ÿ˜„

#

does it damage the Z's or just knock them down?

digital moon
#

Out of curiosity - in the past I've tried to create a single tile sheet out of multiple pngs via the pack maker but it never seems to work - it does make the packs correctly and I'm able to extract images individually. Am I supposed to use a specific prefix?

fast galleon
#

yes

#

a common error is also when making the pack there's a tick box next to folder name you should uncheck if the images aren't made as a single tilesheet

digital moon
#

Ok thanks

#

ok loading up to see if I Can find it in game

scenic cradle
#

Cool -- well gives me something to reference if I decide to make a preacher-trait with "turn undead" capabilities.

#

(now actually being able to make zombies flee from you would be cool).

digital moon
#

Bah - I can't seem to get the container to show up under item view in debug

ancient grail
#

We also need that. Or alteast somehow related to that

Cuz ghost and invi are paired
And you can have only one of em

We need zed to not atack player while player is still visible to others

digital moon
#

and I'm 100% sure it's not my fault - nope.. lol

ancient grail
#

For our reanimation mod (passion proj)

ancient grail
digital moon
#

I did, I believe it's video part 5 or 6, but I'm sure I overlooked something. Perhaps the definitions.lua is in the wrong place

ancient grail
#

Does your mod atleast appear

scenic cradle
#

Glytcher: if/when I start working on our priest/religious zealot stuff, if I make any progress that you can benefit from I will share.

ancient grail
#

And how are you sure its not in the game yet

digital moon
#

The mod does appear - and when the games' loading it is saying it's loading the texture pack

#

I was just trying to spawn one

fast galleon
#

getPlayer():getInventory():AddItem('Moveables.Moveable'):ReadFromWorldSprite('furniture_seating_indoor_03_17') try this to get item

digital moon
#

Oh ok I'll try that

ancient grail
digital moon
#

Of course - shoot me a DM

#

Oh nvm

#

one sec

scenic cradle
#

Glytch: sure!

ancient grail
#

Nice thnx guys

digital moon
#

Oh - I realize you weren't asking me hahaha

ancient grail
#

Feel free to post your server events and what not

#

Or promote your mods.
It might be small but most clients are server admins and server owners

ancient grail
digital moon
#

The daddy dirk video was a little confusing to me because he was talking about loading the tiles into a world and loading into the world to test the ones that were placed - so I wasn't quite sure what files were relevant to his structure

ancient grail
#

I mean id like it if poltergeist joins too hehehhe

digital moon
fast galleon
#

I think script item only affects debug item list

#

and translation is taken from moveables translations

ancient grail
fast galleon
#

did you put a custom name in the tile properties

ancient grail
digital moon
#

Yeah - can they not have spaces?

ancient grail
#

Like grass floors? Or water

digital moon
#

It does work as a container. but the second half of the container (it's two tiles wide) won't allow me to place it

ancient grail
digital moon
#

So I definitely didn't set it up correctly

ancient grail
digital moon
#

Ok good to know. Thanks

#

ForceSingleItem checked, right?

fast galleon
#

my items have also item scripts so I'm not sure

ancient grail
#

Wait how did you check them before? It means it was already there but you just dodnt know how to spawn?
If thats the case then add brush tool cheat and open tilepicker

#

Search for your tile from there

digital moon
#

No it was unchecked - just wanted to make sure

drifting ore
#

i hate to jump in randomly but you sure the offsets are correct?

ancient grail
#

You may also refer to my secretstash mod it has a code that spawns a tile then convert it to container
It should work with any tiles

#

Reference for tile def properties

#

Made by commander

drifting ore
#

i think poltergeist on the right track really

#

even tho they deleted

#

make sure you do both of these correctly for it

digital moon
#

OK excellent - checking that box worked

fast galleon
#

sorry I missed some messages, realised you need another tile

drifting ore
#

if the prote grid pos and you dont have force single item then can cause issues

digital moon
#

STill have to place them individually though, but now I Can place both halves

drifting ore
#

use offset to assign them together

#

gridpos

digital moon
#

ok

drifting ore
#

commander has a guide to show how the grid position works

#

see the diamond pic

#

use that

digital moon
#

Yeah I just looked at that - if I want them along a wall would I assign these grids?

#

For the respective placement tiles I mean

drifting ore
#

it doesn't work like that i dont beliieve

#

just depending on how you want it to fit together

#

so 0,1 and 0,0

digital moon
#

Ahhh - ok

drifting ore
#

or 0,0 anmd 1,0

digital moon
#

I get it now

drifting ore
#

those make it touch

#

depnding on orientation of sprite itself will depend on this

digital moon
#

And if it were more than 2 tiles or 3x3 tiles I'd start at 0,0 as a reference

drifting ore
#

feel free to interject also poltergeist

#

i'm not fully experienced in this just used it a few times

digital moon
#

OK I think I understand, I'll see if this works

drifting ore
#

it will connect thw two sprites to make 1 item

ancient grail
drifting ore
#

yea i just jumped in without looking back

drifting ore
ancient grail
#

Nice. Forget the past live in the present . Cool ๐Ÿ˜Ž

digital moon
#

I'm already really good at making things not working correctly - so I guess you could say things are getting pretty serious

drifting ore
#

lol

ancient grail
#

The hell u talking about youre already gud

fast galleon
#

@digital moonfor the translation... will you have 1 item when you pick up the tiles?

digital moon
#

Yes - it would be like picking up a bed or something

fast galleon
#

beds have 4 items though

red tiger
#

Live for the past. Forget the future. Ignore current problems.

fast galleon
#

1 item for each square

digital moon
#

I know, I meant like, if you place it, you'd have to have all the items in your inventory

#

My mistake

fast galleon
#

so you want to have 1 item or 1 item per square? @digital moon

ancient grail
#

Omg bro ididnt send you invite via dm?? Forgiveneessss? @drifting ore
I thoughtni already did

digital moon
#

Hmm, that didn't work either. Back to the drawing board. I

drifting ore
#

all good no worries!

digital moon
#

I am confident I'll figure it out

#

one day

drifting ore
#

it will work if you use the righ offsets

#

if it worked the way poltergeist suggested

fast galleon
#

@digital moonhow many inventory items would you rather have?

digital moon
#

Ideally I was going to make it so you have to construct it

#

And if you picked it up it would be similar to a stretcher or something wehre you end up having "itemname_1/2 and item name 2/2"

fast galleon
digital moon
#

ok

#

In tile properties - each tile represents a grid position - I think I did it wrong, I grouped up the tile halves (upper and lower halves of each side and put them on a grid, I assume it's likely I need to take each tile and assign them correctly to the appropriate grid

fast galleon
#

translation is like this
Tile CustomName: Battery Bank
file: Moveables_EN.txt
Battery_Bank = "Battery Bank",

#

this should be same for all sprites and the numbers are auto generated, I think

#

honestly here translation is unnecessary

digital moon
#

I think I see what I did incorrectly

fast galleon
#

did you have a custom name?

digital moon
#

I did not - but I did assign the grid positions incorrectly I believe. testing it now

#

I mean I did have a custom name lol but yeah trying to see if the grid was the issue

#

Nope that wasn't it haha

fast galleon
#

there's logs for invalid grid position

digital moon
#

I can place them just fine, but the overlays do not work and when I place it I have to place them individually, and they are still showing up as "movable" instead of the name.

#

Should I just get rid of the custom name?

fast galleon
#

fix the grid first

digital moon
#

OK I thought I did, but I apparently did not

#

Here's a reference

#

I noticed in the pz tiles, things like bookshelves did not have a grid position on the top halfs, only the bottoms

#

OK so for each "full" item tops, bottoms and both halves" need to have one group name that is different from the counterpart (East to West/North to South)?

fast galleon
#

same group name?

digital moon
#

Yeah, so on that above reference picture - that represents the shelf tiles placed North to South

Those all need to be one group name, but the shelves that would be placed East to West, do they need a different group name?

fast galleon
#

good question ๐Ÿ™‚

digital moon
#

hahaha

fast galleon
#

try to find the error logs

ancient grail
#

The suffix of the tile?

#

Thats not automated if thats what youre referring to

fast galleon
#

if you have 2 items the numbers e.g 1/2 and 2/2 should be automatic

ancient grail
#

Ahh hmm. Maybe

digital moon
#

Oh I know - I didn't name them that way, but yeah - that still didn't seem to work. I'll look at a tile property of a bed or something and see if I can figure it out

ancient grail
#

maybe base on whats declared first on the sheet idk

fast galleon
#

MOVABLES: Invalid face ... was probably my first error

digital moon
#

I loaded up the newtiledefinitions in the modding tools and just copied the info from one of the shelves that match some similar stuff to see if that works outside of the names

#

When testing the mod, do you have to exit the game completely to let the mod reload?

#

Not just to the main menu

modern hamlet
#

Is there a way to prevent a TimedAction from being canceled? I want to force the character to complete it no matter what.

fast galleon
#

sometimes you do need to exit the game, I've had that when testing tiles. If you have that problem try with mod disabled in main menu.

digital moon
#

ok

#

the movables.txt - does'

fast galleon
digital moon
#

does that have to be in the mod folder?

fast galleon
red tiger
#

About to dive into vehicle script formats.. wish me luck.

#

Hope to come back alive.

drifting ore
#

Only diff group for diff item to my knowledge

#

I use same custom name for all same tiles and diff group name if itโ€™s a diff set of moveable

#

Also if you donโ€™t setup sprite grid position correctly it wonโ€™t load into game

#

You will see an error in the console right before server fully loads up

bronze yoke
drifting ore
#

here we go with the random issues after a full rewrite LOL

manic relic
#

anyone know any good guides to making custom clothing mods?

#

Like other then Dislaik's guide?

wheat kraken
#

do i need to update workshop mod.info or some .txt file to make steam update for everyone or can i keep version:1 there?

does it auto update fine if i dont change version number?

update: i was referring to workshop.txt, my bad

kindred dawn
#

Think so!

drifting ore
#

yea it's visual only

#

changelog stuff if you mean

#

main thing is if you do a small update to a file sometimes people will have to unsub/resub to get the correct download

kindred dawn
fast galleon
cunning kestrel
#

does anyone know how these work ? they just come up "0"

player:getFitness():getCurrentExeStiffnessTimer(currentExercise))
player:getFitness():getCurrentExeStiffnessInc(currentExercise))
faint jewel
#

okay, so can ANYONE tell me how to tell if a certain tile is within 2 tile of a vehicles right door?

digital moon
#

If I want to extract a pack file into a single tile sheet - what prefix do I use?

fast galleon
digital moon
#

OK thank you

fast galleon
#

that works if the pack was made right and they match

digital moon
#

It worked perfectly - thank you

spring zephyr
#

i am currently on going for few project by myself. but if there is anyone who want to join project. it would be nice.
project i am going on -
real pc assembling
Drivable Train.

#

Drivable Train is facing currently few problems cause zomboid only allows towing the vehicle only 1 on 1.

#

if anyone want to join and talk about this things . join the voice channel. โค๏ธ

weary knoll
tame mulch
weary knoll
tame mulch
weary knoll
tame mulch
#

*add impulse to transform (apply force)

red tiger
#

o/ Using your Scripting Guides now.

weary knoll
tame mulch
weary knoll
#

also, thank you for taking the time to answer

weary knoll
#

so the engine thinks there's a player

faint jewel
#

sigh. i'm gonna have to get crazy aren't i?

tame mulch
#

As idea, maybe on server side will work teleportation of vehicles. So you will move vehicles by small teleportation

#

*and rotation

tame mulch
weary knoll
tame mulch
#

If will be questions - write me

weary knoll
digital moon
#

do I need to make my own .txts in the lua/shared directory or will tilezed do that for me?

eternal garnet
#

Anyone that is able to render some assistance with "Attachment Editor", it is not moving the muzzle flash to the end of the barrel of the gun

kindred dawn
#

Letโ€™s seeโ€ฆ Is Evolved recipes only for food?

#

Or can you also make other non-food items with it

#

Cuz i was thinking about resealing canned foods, with their current stats

#

Like if you eat half, you can reseal it again, and when you open it back up, it still has the same amount

willow estuary
#

Just use normal recipes for resealing cans, etc.
There's absolutely no reason to use evolved recipes for anything beyond what they already do, which is simulating adding ingredients to soups or sandwiches etc.

#

You're actually just making things harder for yourself attempting to use evolved recipes for anything other than their intended purpose as well, the normal recipe system should handle cases like that just fine.

kindred dawn
willow estuary
#

If you make your recipe and code properly, it should be possible, but the onus is on you re doing it properly?

#

There's no vanilla systems for something like that, that I'm aware of, that can be used as a shortcut; it would require some custom lua code AFAIK.

kindred dawn
#

Ty for the info!

red tiger
fast galleon
#

cherrypie

  1. How much earlier can we expect sandbox option to be loaded in v42?
    *When you load a save into character creation, would they be loaded? Some people ask it for character creation options for example. This might not be an issue already.
  2. Will chunks be 8 x 8 everywhere? Will chunks be further broken down per 4 levels or is that only for rendering?
  3. Some moveables accept only specific items, are there plans to have this less hardcoded? e.g save persistently the AcceptItemFunction for ItemContainer or expand the isItemAllowedInContainer function.

I wonder if you can say anything about these? @willow estuary

red tiger
#

DId a lot of fixes to my ZedScript parser today. I am left with parsing template vehicles.

thick karma
#

Re. 2, Polt, are chunk sizes changing to be powers of 2? Is that a thing?

bronze yoke
#

that was implied by the recent thursdoid

thick karma
#

Oh my bad didn't see that or even realize Thursdoids were a thing.

drifting ore
#

yep tiles being merged into 8x8 on render with texture mapping. i'm probably not saying it correctly but something like that

#

the one thing i did read correctly was no more square looking 1x1 haha

#

or at least won't be noticeable with new method woooo

bronze yoke
#

so sandbox options are loaded before character creation in all situations as far as i can see

#

the obstacles most people face is that either their code isn't actually firing at character creation, or the things they want to use sandbox options for are permanent once set in java once (though this isn't that hard to circumvent)

fast galleon
#

they usually exist but in their defaults, until just after OnInitWorld event for SP at least when loading an existing save.

bronze yoke
#

this isn't the case

#

my mod adds sandbox options for what clothing is available at character creation: if i change the clothing settings away from the default, die, exit, and then load, my settings are still applied to the clothing

faint jewel
#

screams internally.

bronze yoke
#

and it only makes sense this way, since if sandbox options weren't loaded at character creation vanilla options like free trait points and all clothing unlocked wouldn't work

digital moon
#

Ok I realized when working in Tilezed that I was loading tiles via the tiles/2x folder instead of just the regular tiles folder, that seemed to clear up a lot of the confusion I was having based on daddy dirks videos. Hopefully I can make some headway with this.

fast galleon
bronze yoke
#

yeah, i think the sandbox options reset when you start actually loading in, in most cases (but not all), because they are available at character creation but they aren't always available afterwards

faint jewel
#

areaPositionWorld(VehicleScript.Area area) will that get me where a door position is?

fast galleon
bronze yoke
#

it's already been confirmed that sandbox options will load sometime before distribution merge in b42 (currently it's after), but i don't think anything more specific than that has been said

digital moon
#

I'm able to now place it as one object - but now I can't place it haha it shows up as if I'm trying to place it in the world, but it's stuck as red hahah

pulsar heath
#

@faint jewel did you fix the bug on your mod?

faint jewel
#

the window? yes

pulsar heath
#

what was it? im still curious about it

faint jewel
#

I had to make it templated. only way it would work.

#

now i have craziness i am trying to sort out.

pulsar heath
#

deliver mail?

#

thats hardcore rp ๐Ÿ˜„

faint jewel
#

lol i need to be able to get if the window is down and if a certain tile is within two tiles of that window.

pulsar heath
#

so im guessing your mailman is to behave like a paper boy with the mail

faint jewel
#

so i can check for mailboxes and then stuff my new junkmail items in it

pulsar heath
#

and if he detects a mail box throws the mail at it ๐Ÿ˜„

faint jewel
#

no, like an actualy mailman.

#

two tiles is kinda close.

#

i'm just gonna put the mail in the box.

pulsar heath
#

that should be easy enough, not much code to write on that bit, should be simple

faint jewel
#

so you say lol.

#

vehicles and getting the sides. always been hell.

pulsar heath
#

lemme know if you need help, day off tomorrow so i can give you a hand

#

just need to finish designing the damn database b4 calling it a day

faint jewel
#

well that if statement is my issue atm.

#

maybe add a speed check too.

pulsar heath
#

show me what code you got for now

faint jewel
#

so they dont just fly down the road spamming mail.

#

NONE.

#

lol

pulsar heath
#

and ill help you out... im kinda bored... database design... meh

#

none? ok... ill write a snippet or two when i finish this db... only 92 tables to go ๐Ÿ˜

eternal garnet
#

ANYONE have experience with working with the attachment editor for firearms?

I am attempting to add the "Muzzle Flash" to my pistol, I have placed where the Muzzle Flash needs to be based on the tool/ UI that has been provided by the Dev's of PZ, but it is not working.

Furthermore I am unable to uncheck the "Break on Error" when pressing F11 on Debug mode, as the check box keeping re-checking itself, so I am black screening anytime I attempt to load up my mod with Debug mode when I go back to the main menu for testing.

If ANYONE has created a firearm for PZ and has used the attachment editor, please do get in touch.

willow estuary
# fast galleon <:cherrypie:232168736520404994> 1. How much earlier can we expect sandbox optio...
  1. I don't know offhand but I'm sure people will find news ways and corner case situations for their custom sandbox options to cause issues regardless?
  2. Chunks are 10x10, in the sense that I use them, and the even from the blog will use them.
  3. You can do whatever you want with that with lua modding, aside from existing hardcoded stuff for clothing racks and toasters. No plans re making that stuff less hardcoded, and it's such a niche corner case there isn't really any need? There's an item tag that's used for the toaster stuff anyways, just put that tag on items you want to be able to go into a toaster.
fast galleon
#

lol, I'll try less bugs if that makes you happy

digital moon
#

Could there be any reason why I can spawn the object I made into my inventory, but I Cannot place it? It's red but all things are green

fast galleon
#

do you have all parts?

red tiger
#

If people highly demand something that involves core Java code to be modified in order to work, you can always patch things and distro the compiled bytecode patches. =)

digital moon
fast galleon
#

Sometimes when testing tiles you might place broken items that can be invisible but still block the square.

#

I can't think of something else right now.

digital moon
#

No worries - I appreciate the help. I can't place it anywhere surprisingly. No matter where I put it.

frank lintel
#

dangles mr. slinky in front of poltergeist

red tiger
#

@quasi geode I think that the best approach to delimited values in JSON format will be to parse them as arrays with array-like names similar to the original property name, such as events: [..] for event: OnEvent/OnAnotherEvent. This is another reason for my approach, so I can handle these much better. Here's an example of the vehicle category:

#

I believe this approach can give way to cleaner ZedScript when converted back to the original format. =)

#

Also for inferred Vector3F arrays (float[3]), I decided to use x, y, and z for context.

#

As far as I can tell, my parser is complete, pre-vehicle templates.

#

Also, are there plans to use the template word for other than vehicle?

frank lintel
#

would think automatically that would be the case its too a generic word

red tiger
#

Yeah. I think that structs and array-like data should be subject to changes to name and data storage format.

#

If not, then it would be a poor use of the format's features.

lusty marsh
#

Have I done something wrong here?

local bodyVisuals = visual:getBodyVisuals()
for i=1,bodyVisuals:size() do
  local inventoryItem = bodyVisuals:get(i-1):getInventoryItem()
  if inventoryItem:getBodyLocation() == visualItem.bodyLocation then
    table.insert(originalItemsInLocation, inventoryItem:getStringItemType())
  end
end

I'm working with HumanVisual and bodyVisuals is seemingly always empty despite the character clearly being dressed?

drifting ore
#

okay i'm dying inside here and probably missing something glaringly obvious but

      if sprSwitch and contextBulb then
            contextBulb.iconTexture = getTexture("media/textures/switch.png")

            if lowLevel then
                local contextRead = context:insertOptionAfter("Remove Light Bulb", phrases[ZombRand(1, 38)])
                if contextRead then
                    toolTip.description = dumbText
                    contextRead.iconTexture = getTexture("media/textures/switch.png")
                    contextRead.toolTip = toolTip
                    contextRead.notAvailable = true
                    context:removeOptionByName(getText("ContextMenu_RemoveLightbulb"))
                end
            end
        end

for whatever reason.

#

i can't figure out why this is running 3 times every time

#

what's more weird is the top option is recognized. but the bottom two are down there because it can't find the previous option

#

that line is literally the only line with insertOptionAfter also lol...

#

omg just writing it out maybe helped me figure it out lol

#

i think it's doing it for each time my condition is true or something like that

frank lintel
#

takes nippy's display and turns it sideways so its now vertical full page viewing

drifting ore
#

lol

#

when i remove the random and just have it use the default options it works np

frank lintel
#

seriously its like mandatory with this Lua... its just ugh.

drifting ore
#

ahahaha

frank lintel
#

its like trying to read patents.

drifting ore
#

the first like 57 lines of my code is just a table and locals LOL<

frank lintel
#

sorry Im just frustrated at this point I'd rather be writing C or ASM

drifting ore
#

to make it even more true

#

honestly man i had negative knowledge a little over 2 months ago

#

the stuff i get stuck on is pretty noobular sometimes but i try not to ask every time i run into things so i can learn some real lessons haha

#

when i struggle i tend to remember forever

frank lintel
#

syntax is the main thing atm Ive done plenty of Java, Im just grrr.'n at this error window which I cant find out who what why its popping up...

drifting ore
#

feel free to post away

frank lintel
#

like I wish I could click a window and know who the heck opened it at where.

drifting ore
#

lolol

#

not sure if you shared previously but post and give context. someone probably knows something

frank lintel
#

nothing shows in debug and its a 'error' popup box so Im like okay error log... nope. window nope... grr.

drifting ore
#

ohh like crash on startup?

#

or you just get normal error

#

have you tried chucks tool?

frank lintel
#

no on spawn soon as I click continue... (or even click the space bar during loading

drifting ore
frank lintel
#

yeah there nothing in console nor F11 error window its like well I cant debug it if I cant find it...

drifting ore
#

ahaha question. it's not crashing right?

#

just not working?

frank lintel
#

its known to be buggy

drifting ore
#

i meant the game itself when you use whatever mod or whatever code you are trying to use

frank lintel
#

no game runs just the mod itself has issues

#

superb survivors...

drifting ore
#

ahhh

#

funny thing about that one specific mod

#

i have played .0. seconds/mins/hours of SP ever

frank lintel
#

oh Im gonna attempt the impossible why Im playing with it

drifting ore
#

i'm so clueless on npc's and anything to do with that mod.. haha

#

lmao

#

well i like to read that either way

frank lintel
#

but right now I gotta get it kinda stable even for SP before....

drifting ore
#

i bit off WAY more than i can chew with this lightswitch overhaul stuff. lol... staying away from hardcoded stuff for the most part in the future

#

i thought i was sooooo coool LOL

frank lintel
#

well I can almost already guess the issue with that mod and MP but there lil thing called 'dedi's ^_^

drifting ore
#

so far everything works perfect as far the as the lights go

#

go colored bulbs into em and battery pack installing

#

everything is custom by sandbox for level gateways

#

including even reading the book haha

frank lintel
#

click that does nothing, and shows nothing anywhere I can find so lm hair pulling atm.

drifting ore
#

yes use chucks mod

#

it will give you something to click there when in debug

#

one sec

#

ill link

frank lintel
#

I'll check itout but again unless it lets me know who's calling that ui popup

drifting ore
#

makes it a tiny bit easier to track down the error, especially if it isn't a stack trace

#

it will tell you

frank lintel
#

k

drifting ore
#

he also has a fingerprint mod as well

#

prints mod name with issue

#

something like that

#

i havent used it before but error mag is perfect already without that

#

if you dont figure it out, share your console

frank lintel
#

oh its not there

#

thats the issue

drifting ore
#

if you get error it is

#

its just not what you are looking for

#

each time error shows it only happens when console happens

#

it wont show error without showing in console

#

even if it's 1 line

#

debugging in lua

#

ayyyy

#

i dont have much coding knowledge but i already see the pains

#

also i guess depending on how you are running the game, maybe diff console log?

#

i'm trying to assume you're fairly experienced also, but have to still ask haha

frank lintel
#

Ive done diffs with and without the mod, nothing shows in console window or the log

faint jewel
#

Okay so I need to find a way to get a vehicles door area in the world

frank lintel
#

just that box crying error but showing no error

drifting ore
#

if you are willing to share your console fresh after the issue... even if it's not got your specific error it may not hurt. you are the only person i've seen though that can't see errors in console which is the part i dont get. not saying that really means anything but if you really stuck on it. paste the file. whats the worst that can happen

#

as long as it's the console from that session ahahahha

frank lintel
#

I rename my logs exactly for that reason

drifting ore
#

ahh smart

red tiger
#

It's a security concern for me.

drifting ore
#

good practice really

#

can't protect yourself enough nowadays

frank lintel
#

whats the code prefix? double slash code?

#

sorry brain farting

#
ERROR: General     , 1677544182908> ExceptionLogger.logException> Exception thrown java.lang.IllegalStateException at UIManager.update line:685.
ERROR: General     , 1677544182908> DebugLogStream.printException> Stack trace:
java.lang.IllegalStateException
    at zombie.ui.UIManager.update(UIManager.java:685)
    at zombie.GameWindow.logic(GameWindow.java:262)
    at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
    at zombie.GameWindow.frameStep(GameWindow.java:765)
    at zombie.GameWindow.run_ez(GameWindow.java:681)
    at zombie.GameWindow.mainThread(GameWindow.java:495)
    at java.base/java.lang.Thread.run(Unknown Source) ```
drifting ore
#

wasn't paying atteniton huh

frank lintel
#

there finally

drifting ore
#

oooo

#

yikes lol

frank lintel
#

thats the only error after spawning

drifting ore
#

650ms callback

#

LOL

#

jesus

frank lintel
#

on player data load yeah?

calm depot
#

that doesn't necessarily matter if it's a one-off at init

frank lintel
#

^ yeah its that first loadup of your character

drifting ore
#

ahhhh... you didnt mention that

#

lol funny

frank lintel
#

I just got the warn notice on for slow lua that all or you'd never see that

#

thats how I know when I got IG :)

drifting ore
#

๐Ÿ˜„

frank lintel
#

and oh if you turn that option on you'll see alot of that show up

#

but yeah thats teh only error I can find anywhere after loading in. and the few times it posts doesnt always match with how many 'error's that red box is saying and nothing tells me it is part of that (albeit I know its related to that mod cuz it dont appear if its not loaded)

lusty marsh
#

Does using java's clone method work from lua? I'm getting object called nil when trying to use it

red tiger
drifting ore
red tiger
#

It's selective in order to create a security sandbox so no Lua can be malicious.

#

(Attempts to)

lusty marsh
#

understandable, well that just killed my project๐Ÿ˜†

red tiger
#

Implementing vehicle templates.

modern hamlet
#
selectedBodyPart:AddDamage(3) 
selectedBodyPart:setDeepWounded(true)
selectedBodyPart:setBleeding(true)
player:SayShout("AAAagghh!!!!")
player:setKnockedDown(true)

I tried to add a wound to the player, but it is quite easy to take care of these wounds. I think I need to change the time settings too, right? If so where can i find vanilla time settings?

red tiger
#

There's a lot of vehicle part-type objects.

#

I think that's the bulk of what makes vehicle-templates annoying lol.

#

Still refusing to generically map prop->values.

faint jewel
#

FUUUUUUUUUUUUUUUUUUUUUUUUUUUUU

#
function MailIcons(menu, player, vehicle)
    if vehicle:getScript() and vehicle:getScriptName() == "Base.USPSTruck" then
        local part = vehicle:getClosestWindow(player);
>>>        if part:getWindow() then
            local window = part:getWindow()
            if window:isOpenable() and not window:isDestroyed() then
                if window:isOpen() then
                    menu:addSlice("Deliver Mail", getTexture("media/ui/Professions/Mail.png"), onDoMail, player) 
                    menu:addSlice("Deliver Mail (available in TIMER)", getTexture("media/ui/Professions/MailWait.png"), onNoMail, player) 
                end
            end
        end        
    end
end
#

why does that line break shit.

frank lintel
#

verify part is being assigned right?

calm depot
#

what is the error?

#

I'm guessing part is nil?

frank lintel
#

that or part when it break's doesnt have getWindow()

faint jewel
#

not sure how to even tell if its set

calm depot
#

if part and part.getWindow and part:getWindow()

#

although since you use the result immediately after, you might as well just do
local window = part and part.getWindow and part:getWindow() and simply have if window

#

saves doing a second call to the same thing

faint jewel
#

yeah nope

bronze yoke
#

what error are you actually getting

faint jewel
#

attempted index: getWindow of non-table: null is where i am now.

bronze yoke
#

getClosestWindow() doesn't look like it should work for characters inside the vehicle

faint jewel
#

ISVehicleMenu uses it.

bronze yoke
#

for what purpose?

#

i think it's used for the smash window prompt, which only happens outside of the vehicle

faint jewel
#

    local door = vehicle:getPassengerDoor(seat)
    local windowPart = VehicleUtils.getChildWindow(door)
    if windowPart and (not windowPart:getItemType() or windowPart:getInventoryItem()) then
        local window = windowPart:getWindow()
        if window:isOpenable() and not window:isDestroyed() then
            if window:isOpen() then
                option = menu:addSlice(getText("ContextMenu_Close_window"), getTexture("media/ui/vehicles/vehicle_windowCLOSED.png"), ISVehiclePartMenu.onOpenCloseWindow, playerObj, windowPart, false)
            else
                option = menu:addSlice(getText("ContextMenu_Open_window"), getTexture("media/ui/vehicles/vehicle_windowOPEN.png"), ISVehiclePartMenu.onOpenCloseWindow, playerObj, windowPart, true)
            end
        end
    end
#

to open and close the window

#

but this is different part.

bronze yoke
#

i just checked and what i described is the only usage in vanilla

#

you should use the method the code you just sent used, this should do what you want

faint jewel
#
    if part:getWindow() and (not part:getItemType() or part:getInventoryItem()) then
        local window = part:getWindow()
        if window:isOpenable() and not window:isDestroyed() and playerObj:getVehicle() then
            if window:isOpen() then
                option = self.context:addOption(getText("ContextMenu_Close_window"), playerObj, ISVehiclePartMenu.onOpenCloseWindow, part, false)
            else
                option = self.context:addOption(getText("ContextMenu_Open_window"), playerObj, ISVehiclePartMenu.onOpenCloseWindow, part, true)
            end
        end
        if not window:isDestroyed() then
            option = self.context:addOption(getText("ContextMenu_Smash_window"), playerObj, ISVehiclePartMenu.onSmashWindow, part)
        end
    end
~```
bronze yoke
#

getClosestWindow() just doesn't work when inside the vehicle, use something like this instead:```lua
local seat = vehicle:getSeat(player)
local door = vehicle:getPassengerDoor(seat)
local window = VehicleUtils.getChildWindow(door)

#

getClosestWindow() is more like 'get whichever window the player is currently standing directly infront of'

hollow shadow
#

anyone know what im allowed to change in the animation set XMLs? Im trying to make my own Idle animation for a specific gun. How do i make it trigger with only that gun?

rain shard
#

Hey guys! I'm having a bit of a head scratcher.

    {
        Case762x39_Pack=1,
        
        Result:Brass762x39=50,
        Time:10,
        Category:Firearm,
    }```

This code previously worked but now it refuses to be an actual recipe with its context actions. The item names all line up, any idea why this might be the case?
hollow shadow
#

worth a try if you are out of options

rain shard
#

Thanks, I'll try that-- might make sense, a context code I had didn't like underscores.

thick karma
thick karma
#

Just dupe the XML for the original Idle and add your condition and put your xml in the same folder

#

Works for me overriding sit and ladder climb animations

hollow shadow
#

i did some digging and found these things in the vanilla script. it doesnt seem to connect to anything in the animsets tho

thick karma
#

Oh interesting

hollow shadow
#

yeah theres nothing

#

only found in that script

thick karma
#

Hmmm very odd

#

No idea what that could reference

hollow shadow
#

this is all i need to do? i am bad at coding

#

with this, i should have a different idle animation but the same vanilla rifle animations

thick karma
#

I'm guessing you need to make a renamed copy of one of these files and edit its conditions:

#

I am not sure which because I'm not sure how game will class your weapon @hollow shadow

hollow shadow
#

it currently acts like a rifle

thick karma
#

Then this is probably your best bet?

hollow shadow
#

yep

#

like the one i posted above?

#

i used that one and renamed it

thick karma
#

Looks right to me

hollow shadow
#

pog

#

thanks

#

fack

thick karma
#

You misunderstand my example ๐Ÿ™‚

hollow shadow
#

yes

#

i copy pasterino and edit

thick karma
#

I am trying to say, player could be the return value from getPlayer(), e.g.

#

If you're doing gamepad support, however, it might not be

#

So I am speaking conditionally

#

getPlayer() will give you player 1

#

if you say local player = getPlayer() above the uncommented line, it will work

#

But player might also come from a function... if you're listening onPlayerUpdate e.g., you receive the player as a param

#

So you would not need to say player = getPlayer() and in fact it would be wrong to do so

#

Because then you're intentionally replacing the player the method expects you to act on with another player object -- possibly a dead player's object when a live player activated the function.

#

So, yeah, how you get the player object is context-dependent.

#

getPlayer():setVariable( . . . . . would also work.

hollow shadow
#

this is so confusing for me

thick karma
#

Haha

#

Fair

#

Sorry

hollow shadow
#

i never coded anything before i just edit stuff :L

thick karma
#

One sec

#

So the best thing for you to hook imo would be the equip/unequip weapon action.

#

function ISEquipWeaponAction:new (character, item, time, primary, twoHands)

#

When you create a new equip weapon action, you can set the variable there if the item is the desired item

#

There is an ISEquipWeaponAction and an ISUnequipAction that will both be relevant to you

hollow shadow
#

o.o

thick karma
#

Imo, you want to make sure you do three things hooking this:

  1. Use a local module to store the original functions.
  2. Decorate the original functions (be sure to pass self).
  3. Return the object as in the original functions.
  4. Return the module for other modders who may for whatever reason need to do something before you decorate this function.
#

E.g., you could write it like this

#
local DJVirusWeaponry = {
  ISEquipWeaponAction = { new = ISEquipWeaponAction.new },
  ISUnequipAction = { new = ISUnequipAction.new }
} -- Step 1

-- You may literally type 3 dots here; it will hold the rest of the parameters.
function ISEquipWeaponAction:new(character, item, ...) 
  local o = DJVirusWeaponry.ISEquipWeaponAction.new(self, character, item, ...)
  if item:getFullType() == "YourItemModule.YourItemName" then
    character:setVariable("YourAnimVariable", true)
  end
  return o -- Step 3, VERY IMPORTANT.
end

function ISUnequipAction:new(character, item, ...) 
  local o = DJVirusWeaponry.ISUnequipAction.new(self, character, item, ...)
  if item:getFullType() == "YourItemModule.YourItemName" then
    character:setVariable("YourAnimVariable", false)
    -- or character:clearVariable("YourAnimVariable")
  end
  return o -- Step 3, VERY IMPORTANT.
end

return DJVirusWeaponry -- Step 4
hollow shadow
#

o_O

thick karma
#

Presumably you can figure out your item name and such and fill in the blanks

hollow shadow
thick karma
#

In your XML

hollow shadow
#

is it the XML name

thick karma
#

The one you set

#

yeah

#

not the name of the XML

hollow shadow
#

okay

thick karma
#

The name of the condition variable

hollow shadow
thick karma
#

right

#

That.

red tiger
#

Guess I'll have to figure out why my vehicle template parse code isn't working on a certain situation another day. =/

hollow shadow
# thick karma That.

ERROR: General , 1677557238792> ExceptionLogger.logException> Exception thrown zombie.util.PZXmlParserException: Exception thrown while parsing XML file "C:\Users\djvir\Zomboid\Workshop\Scrap Guns\Contents\mods\Scrap Guns (New Version)\media\AnimSets\player\idle\Idle.xml"

#

Idk why its looking for that in my mod folder, when its in the vanilla folder

#

do i have to copy paste the vanilla stuff into my mod?

#

the vanilla idle xml*

thick karma
#

Looks like you accidentally moved a copy of Idle.xml to your mod folder.

#

Check C:\Users\djvir\Zomboid\Workshop\Scrap Guns\Contents\mods\Scrap Guns (New Version)\media\AnimSets\player\idle\

hollow shadow
rancid panther
#

lmfao i made my mod incompatible with No More Skilless Survivors by adding underscores in my trait names

thick karma
#

Alternatively, maybe check original Idle.xml to make sure you didn't do something funny to it?

thick karma
rancid panther
# thick karma Bahaha oof

had to go through all the traits and remove the underscores.
cuz i added underscores to give my traits a suffix for less compatibility issues, thus creating an incompatibility ๐Ÿคฃ
also changed them to prefixes since it is easier to sort them this way

#

but this is what happens when an amateur wants to make a mod

thick karma
#

You could try to just give them ModuleName.TraitName as their id, instead of simply TraitName as is usually done

#

I bet that'd be safe.

rancid panther
#

with profession framework

#

it has its own module name

thick karma
#

Wait what does your trait def look like

rancid panther
#

i already fixed the problem tho

#

if i get more experience and have time i might rewrite the whole thing again without profession framework some day, but it isnt in my list of priorities

thick karma
#

Wait did TMRFurry actually conflict?

rancid panther
#

no

thick karma
#

What name conflicted?

rancid panther
#

idk. all of the traits ended with _TMR instead of TMR at the beginning

#

and i changed them to have it this way now

#

it used to say Furry_TMR (as for all the other traits as well)

red tiger
rancid panther
thick karma
#

I wouldn't expect anyone to name their traits "TraitName_TMR" unless their mod name was abbreviated TMR....

red tiger
#

I battled the vehicle script demon. I lost.. lol

thick karma
#

And No More Skilless Survivors is not TMR

rancid panther
#

no it was originally Furry, then i added _TMR as a way to not conflict with other mods that add a trait named Furry (for example)
not just the one trait. all my traits used common names

red tiger
#

Will regroup and take it down.

rancid panther
#

and the underscore caused the incompatibility with No More Skilless Survivors (i think)

dark wedge
# hollow shadow

Animation files that use animNode x_extends="FILE.xml" require the base file to be in the same directory.
So, you can either copy the vanilla action file into your mod as-is, make a copy of the file in your mod folder with a different name and inherit that ( so you don't overwrite vanilla), or make an xml file that doesn't use the x_extends to define your action, and just includes the same conditions.

rancid panther
#

because when i changed all trait names to not have them anymore, the issue was solved

red tiger
#

I'm drinking rn.. vehicle script made me drink...

hollow shadow
red tiger
rancid panther
#

here's an example of traits that would have had issues with other trait mods if i didnt have TMR on them

rancid panther
#

and most of my traits are generic ones like this

#

the non-generic traits like Bitten and Immune dont have a prefix cuz i dont think it is necessary for those

thick karma
rancid panther
#

i think the incompatibility probably came from the Blank Slate function, if i were to guess

#

it probably looks for traits that add skill points and has an error when the traits dont follow typical naming conventions

ancient grail
#

@dark wedge how do you cancel an emote using lua?

#

Is there a way to do that

red tiger
#

I still wonder if TIS planned to have templates for scripts other than vehicle...

rancid panther
#

and even though i dont use blank slate, it still probably does that check

#

idk. i say probably too much, probably

hollow shadow
#

@thick karma now that you mention it, i still have those anim things in my gatlinggun script. from when i copied the vanilla gun scripts

dark wedge
ancient grail
#

Clear nice thnx

patent quiver
#

How do I install my mods on my hosted multiplayer server, i added all of them under mods in server setting?

hollow shadow
#

adding them in workshop will automaticly add them to mods

ancient grail
patent quiver
#

just installing

#

so just add under the workshop?

ancient grail
thick karma
hollow shadow
thick karma
thick karma
#

You delete SwingAnim and RunAnim?

#

From the scripts?

hollow shadow
#

and idleanim

thick karma
#

Okay hmmm

#

@hollow shadow It looks like it works until you unequip and re-equip the way you did in the video. Can you confirm?

hollow shadow
#

yea

#

only works when i equip it. if i move it resets to vanilla

thick karma
#

But in your video you actually move and it appears to be working while you walk

#

So what do you mean "move"?

thick karma
#

Do you have to move a certain distance?

#

Oh wait maybe it's the moving animation that holds it differently

#

I guess when you're standing still your arm is down

hollow shadow
thick karma
#

@hollow shadow You're trying to get player to hold it in 2 hands idle right?

hollow shadow
#

yep

#

you see how he switches to the vanilla firearm idle when i move

thick karma
#

But they only hold it in 2 hands when walking?

#

Oh wait

hollow shadow
#

yeah thats the vanilla firearm walking animation

thick karma
#

Do you want him to hold it in 1 hand?

hollow shadow
#

after that one he should reset to the original one that we just made

#

nope

thick karma
#

One sec I need to see vanilla rifle animation idk what you're trying to do.

hollow shadow
#

i want him to stop using the vanilla rifle idle.

thick karma
#

I don't know which one is vanilla lol

hollow shadow
#

the one where he points the barrel upwards

#

looks simlar to the walking one

frank lintel
#

there a raise or equal func to trigger the debug window to open intentionally?

thick karma
#

OHHHHHH

#

@hollow shadow Movement is not an idle animation

#

you need to override a walking animation too

thick karma
#

if you want what you're saying

hollow shadow
#

after the movement animation ends, he doesnt go back to the idle animation imade

#

he goes back ot the vanilla one

thick karma
#

I seeeeeee

#

Hmmmm

#

Clearly vanilla clears your anim state when you switch

#

Which makes sense

#

need to think of a time to efficiently detect when player becomes idle again

#

and set your anim variable true again at that moment if necessary

hollow shadow
#

isnt it possible to just edit the xml somehow

thick karma
#

I don't know how.

#

Maybe

#

But I imagine no

frank lintel
#

cant define the idle animation for the weapon cfg to use the new one?

thick karma
#

It's not the idle animation he needs to change.

hollow shadow
frank lintel
#

walking all of them... arent they defined by the weap?

thick karma
#

You could try to just set IdleAnim, SwingAnim, RunAnim to your animation @hollow shadow

hollow shadow
#

by type

frank lintel
#

wut?

thick karma
#

In the item script

#

shrug

#

It might work

hollow shadow
#

but what about aim anim

thick karma
#

I don't know item scripts well so I don't know how binding them to animations works.

hollow shadow
#

sneak anim

thick karma
#

I mean if you want all the different animations to involve holding that weapon in a unique state, you may need to make alternative versions of all the necessary XMLs

ancient grail
#

Its much complicated than just xml for me

#

Heres what i did

#

Its not yet even that clean

hollow shadow
#

nice, somehow it goes to the idle animation i want

thick karma
ancient grail
#

But if you switch to vanilla gun

thick karma
hollow shadow
ancient grail
#

@thick karma what happens ehen you make own firearm class? I hvent tried but assumed it doesnt work

ancient grail
#

If you overwrite vanilla the. Other animations is screwed

hollow shadow
thick karma
#

What's it doing?

ancient grail
#

Idk how you did yours

hollow shadow
ancient grail
#

I used lua

thick karma
#

No I mean what are you talking about with the mysterious references to vanilla guns

#

What does it do when you equip a vanilla gun?

#

@hollow shadow

#

Video?

hollow shadow
ancient grail
#

If u overwrite the animation then they will hold vanilla guns like how they hold the gatling gun

#

@thick karma

thick karma
#

Really? Even though you defined those anims the gatling script they affect other items too?

thick karma
#

At least not according to anything he has said.

#

He made a copy of it with a new name.

ancient grail
#

He didnt? Then how did it change i mean can i see the script

hollow shadow
#

these dont do anything, just tested

ancient grail
#

Ahh but what is it pointing at . Its still an overwrite if you look at the conditions of the xml and its same as the vanilla..

But if that works then idk i never did that script edit

#

As you can see on the one vid where i demo the m16

#

It holds it vanilla aim but back to owen gun its diffrent

#

He holds the grip

hollow shadow
#

all my animation files and xmls are in a mod

thick karma
#

He added a condition that does not exist for vanilla

ancient grail
#

Eyats the condition

#

Also u guys sute its mp compat? Have you checked?

thick karma
#

He's not that far.

ancient grail
#

If that eay works then im changing my method to that

#

Cuz its better imho

thick karma
#

To make it MP compat this way would require him to use commands.