#mod_development

1 messages · Page 63 of 1

bronze yoke
#

private text chats are definitely doable

trail lotus
#

Maybe jab could help

drifting ore
#

I will quicly check the lua code of talkie but I don't have too much hope

trail lotus
#

I think he does Java ?

sour island
#

You can also use parts of the radio code to recreate things like the distance distorting the words

#

I kind of wish that applied to say()

#

I think it only works on radio/tv

#

Making your own phone system is not an easy mod - but it's not impossible or that difficult

bronze yoke
#

an aside, but it looks like VoiceManager:getMicVolumeIndicator() returns the volume of the local player's microphone - i know people have been wanting to do voice chat zombie attraction

trail lotus
#

Ahh. I gotta go back to work I’ll be on tonight to bother some people about it. Mrbounty if you want a inv to the server lmk and I can give you access to the dev stuff

#

Where skizot and them are.

sour island
bronze yoke
#

i'm not sure if basing it on the volume of the microphone is a good idea, since microphones tend to deliberately not have very much range

#

but i know that's what people have been wanting

sour island
#

It would be more immersive

bronze yoke
#

and testing that that value is nonzero would probably be the easiest way to tell if a player is speaking (and maybe the only?)

sour island
#

Well the game can check if it's high or low - as the bar does move

#

You could give them the benefit of the doubt and set the scale based on whisper to shout attraction levs

#

That's what I do for conditional speech

bronze yoke
#

i think the bar uses that, but generally gamer microphones don't have a lot of range because they're trying to pick up the voice no matter what

#

if it were optional i couldn't complain, it would certainly be a cool feature for people whose microphones suit it

sour island
#

If you're rocking a mic with no noise gate you're probably better off setting yourself to push to talk cause your blasting everyone's ears too lol

bronze yoke
#

that's not the worry, it's just that if you speak normally or whisper, on an average microphone the volume level is usually not actually very different

sour island
#

Yeah, that's why I mentioned giving the benefit of the doubt and starting the expectation that the lowest levels are a whisper

#

Could even make it less

bronze yoke
#

there's not too much harm in it, i just don't think that scaling it based on volume makes too much sense when players don't really have the control over volume that you'd expect

sour island
#

As bad as it would be that your background noise gets you killed - it's still immersive game play 👍

bronze yoke
#

having to whisper into my radio to avoid alerting zombies would be sick, but my microphone certainly isn't up to it

drifting stump
#

asmr metal gear zomboid

#

but voice is in fact all java sided and theres nothing exposed to lua

sour island
#

If the UI has a meter we can pull off sensitivity that way

#

Handling the attraction would be a bit of a mess tho

bronze yoke
#

yeah, the meter uses that function (edit: actually i don't see that)

#

VoiceManager is exposed, which doesn't really do much, but it does do that at least

#

i can't see where it's exposed but the vanilla lua uses it so ??

#

oh... it's exposed in a weird way that allowed them to not expose that function U_U

sour island
#

Haha yeah

jagged kraken
#

This may sound like a stupid question, but does PZ allow for custom animations?

sour island
#

There's alot of slightly exposed functions

bronze yoke
#

it does

sour island
#

Took me a day and a half to figure out how to get the error info - ended up having it right the first time just did it wrong

bronze yoke
#

i've never come across that before, although i was assuming anything not in exposeall wasn't exposed

sour island
#

🤷‍♂️

jagged kraken
#

I feel like that's a missed opportunity for the modding community, that. The stock character animations, while robust, are a bit dry...

bronze yoke
#

so it's possible that things i assumed were not exposed at all are actually partially exposed in a similar way

sour island
#

It depends if the package is exposed I believe

#

There's defined global calls in Lua manager

#

I'm not that well versed in Java technical terminology

#

But if the package is public and exposed it's good

#

Not package - class

#

And that doesn't always catch extends (?)

jagged kraken
#

I wonder if animations can be tied to clothing...

bronze yoke
#

yeah, if the class is exposed you're good, but this is a weird case where the class isn't exposed but the functions are, even though they don't go through those global functions

sour island
#

Animations use XMLs that can be given variables

humble oriole
#

So, I was talking to Albion about this a bit yesterday in DMs.

And we talked a bit about the global objects system. I played with that a bit last night and see why Albion said it was impenetrable and I’m wondering why we don’t have an API for that system. It’s kind of a big deal seeing as so many mods rely on some hacky work around to make them work when they really just want to make one of these items.

The reason I’m looking is I’m trying to make an item that people can drop on the ground (since you can’t build it or place it) that changs it’s own properties over time. I’m not sure how to approach this, Albion mentioned that I could have all the time simulated when the chunk is on loaded, but I’d need an example to really understand that.

sour island
#

Using setVariable() you can apply the conditions for anims to play

bronze yoke
#

it manually creates the VoiceManager lua table with a couple of its functions

#

maybe in the same way the exposer does it, i've never looked at that, but it specifically only adds a couple functions

jagged kraken
bronze yoke
#

they seem pretty useful for modding, but i haven't heard of anyone ever using them

jagged kraken
humble oriole
bronze yoke
#

it does create a java object, but i wasn't under the impression that the java objects were unique to a specific type of global object

#

e.g. it creates an SGlobalObject for every server global object, regardless of whether it's a rain barrel, campfire, etc, so i don't think they need any special programming on the java side

#

when i was looking through the java for them i don't remember those objects actually doing too much

humble oriole
#

The way it feels that if it’s not defined Java side it just doesn’t work. But, I could be doing something wrong. I just took all the composter code and duplicated it, changing variable and function names.

#

There were also function names being called that we’re definitely Java functions like setCompost()

sour island
bronze yoke
#

yeah, i never actually made my own, i was just trying to work out some of the bugs related to them

sour island
#

The anim XML will need a condition tag to play off of

humble oriole
#

syncCompost() was another

sour island
#

It's not very easy to do and can be overridden alot

bronze yoke
#

some of them might have their own java programming, composters do, but i don't think rainbarrels do, which is what makes me think you can make your own

#

i don't think anything composters do can't be reimplemented in lua though

sour island
#

I'm sure there's someone who's been around the block with animation XMLs

bronze yoke
#

this isn't exactly a comprehensive search, but there isn't a single occurence of the term 'rainbarrel' in the java, which is what they're referred to as everywhere in the lua

sour island
#

Rain barrels are handled Lua sided

#

In terms of building

humble oriole
bronze yoke
#

what i mean is that as far as i can tell rainbarrels are completely lua-sided

sour island
#

I think there might be an iso object type named to collect water

bronze yoke
#

they do use a java object but it's created from lua, so we can do that too

humble oriole
#

The composter does “work” and slowly converts one item to another which is honestly the exact behavior I want hahah

bronze yoke
#

and it's not a java object unique to rainbarrels

sour island
#

Rain barrels are pretty old - but not as old as containers or ovens -- unfortunately the approach is different per thing

humble oriole
#

The problem I’m running into is tracking and saving the work per item

bronze yoke
#

rainbarrels store that information as a property of their lua object, and sync it to the water container

sour island
#

Hate to say it but if you want something slightly different you might have to make your own

sour island
bronze yoke
#

you can keep it as moddata

sour island
#

And all isoObjects spawned in should save

humble oriole
#

I mean, ideally Albion is right, I want a global object. I just don’t think that system is accessible enough for us to use

bronze yoke
#

until someone documents it 😇

quasi kernel
#

Wait, tree placement is Lua right?

#

I only just now realized that could be a problem if the funny vegetation map is only on the java end.

sour island
#

What exactly are you trying to do?

quasi kernel
#

Wanting to make rocks that spawn on world-gen for a basic mining system.

#

Kinda like Don't Starve in a sense.

#

Unless you weren't talking to me, then my bad hehe

sour island
#

Sorry talking to fallen lol

quasi kernel
#

Ah I gotcha, mb

sour island
#

No worries you can use onTick for your system

#

You can check zones and tile sprite

#

For spawning stuff correctly

humble oriole
quasi kernel
#

Huh, interesting.

sour island
#

The issue you'll have is over time and loading unloading

#

You'll have to do what generators do which is track time and only update when players view it

#

Well generators do both - if loaded it ticks off time if unloaded it just snaps the value based on time differences

#

I think if you just stick to the time difference you'll be fine

#

Less work too

humble oriole
#

You’d have to leave and come back for it to update, right?

bronze yoke
#

you can simulate it while players are there too

sour island
#

Depends on what it's doing

#

Is this strictly to harvest when ready?

#

Then I'd just do the check when players actually interact

#

If it's a power source then you'll have to actually run it on a tick when loaded

humble oriole
#

I’d like it to convert real-time just like the composter, but if I’m limited it is what it is

bronze yoke
#

if you can't see the change without interacting with it, you may as well only simulate it when you interact with it

sour island
#

I believe the composter changes sprites over time right?

bronze yoke
#

when a player interacts with it, save the time and simulate it, then when a player next interacts with it, simulate all of the time between that timestamp and now

sour island
#

Ah yeah that's why they simulate it realtime

humble oriole
#

I’m making that

humble oriole
snow oracle
#

Sorry but I have my pz server and I recently updated the workshop and now it doesn't allow users to connect, does anyone know how to fix it?

bronze yoke
keen ginkgo
#

umm dose anyone know how to pick up a backpack that is unpickable? because of the weight(god backpack mod)

sour island
#

You can view it in the loot window

#

To empty it

keen ginkgo
#

nwm am dum ass hell

marsh gale
#

Anyone know where to find the code for the camera zoom and controls?

#

Been looking around and I can't find any files on it

sour island
#

That would be in the java

#

Not something that's guaranteed to be malleable using Lua.

faint jewel
dark arch
marsh gale
dark arch
marsh gale
#

3D camera system. Sounds stupid but If I can find a way to manipulate the pre-built Java camera then it'll be easy

dark arch
#

hmm, im not sure where the camera stuff is, only the zoom stuff.

marsh gale
#

Camera zoom should still be in the same set. It'd probably be a float zoom = mousewheel or something

bronze yoke
#

that's a lot more complex than you think

#

by 3d camera, you mean rotation and stuff?

marsh gale
#

Yeah

bronze yoke
#

but the game uses sprites... most of the world isn't even rendered in 3d

marsh gale
#

Already on that. I've made 3d replacements for a good number of tiles

#

Things like trees, bushes, and grass will probably just have the don't starve approach added to them. 2D textures always facing the camera

dark arch
dark arch
marsh gale
#

That would be a huge help. Mind if I DM you?

dark arch
#

sure

atomic mountain
#

Do people take commissions for modding for this game?

bronze yoke
#

some do

atomic mountain
#

Are there any gear modders that do that you might be able to put me on to

thick karma
#

Ay when I uncomment the following code I am getting an odd index out of bounds exception:

local arguments = {}
sendServerCommand​("Jumper", "Join Buddy", arguments)

Is this not a valid way to send a server command?

bronze yoke
#

seems fine to me

#

can you show the actual error?

thick karma
#

@bronze yoke

bronze yoke
#

oh, whenever i get this it means some non-unicode character has snuck in

thick karma
#

Ahhhhh

#

tysm

#

I bet I know how

chilly beacon
#

is it possible to make a second hotbar type of thing appear when certain clothes are worn?. tons of mods add to the main hotbar but I dont want to use that.

bronze yoke
#

i think it can happen sometimes when copy pasting from the javadoc

thick karma
#

Exactly my suspicion, and sure enough rewriting those lines manually fixed it @bronze yoke

#

you're great

bronze yoke
#

😇

thick karma
#

Such constant fuckery modding this game lol

#

Invisible characters causing exceptions, oof

sour island
chilly beacon
#

maybe im overthinking it, but I'm looking to effectively make gun magazine holders to help with weight and show a model when magazines are attatched. but the hotbar is a bad place for that.

sour island
#

Magazine holders like a belt or such?

chilly beacon
#

right

sour island
#

I wouldn't even put that on any hotbar tbh

#

Shell belts / ammo straps imply faster reload

bronze yoke
#

i would make it a wearable container

chilly beacon
#

well, if it interfaces with something like weapon condition indicator it could show full/empty mags perhaps

sour island
#

Perhaps you can mess around with the reload timed action to reward people who put their magazine in a belt container

chilly beacon
#

containers are out because you have to tap R twice to take the new mag out of the container

#

thats the problem I'm trying to actually solve 😄

sour island
#

Well the player places the first one in a bag

#

The second is to grab a new mag

#

The alternative would be to drop the mag entirely

#

Which could be a feature if you tap R fast

#

But I don't think many people would be keen to do that

chilly beacon
#

mhm, but i'm still looking to see about making the ammo belt anyway

sour island
#

So the reload action actually grabs the most suited magazine - this is the most full / closer to player inventory

chilly beacon
#

not to appear rude by any means, but the help i'm looking for isnt "dont make that mod" lol

sour island
#

You could modify the action to treat the strap as better suited - and make the action faster

#

But I don't see how you'll get around having to hit R twice

chilly beacon
#

spoke to most of the people on the server i play on who would love to have it, both for the usability and the aesthetics

sour island
#

Duct-taped mags would be pretty sick on some rifles 🤔

chilly beacon
#

the mags will be in the main inventory, but "attatched" like a hotbar item to give a weight benefit of it. and it'd be awesome to be able to see whats in them to do reloads

#

just without spamming the hotbar

#

can items do the whole "attachment slot" thing without adding to the hotbar? or are the two things explicitly linked

sour island
#

I believe they are

chilly beacon
#

hm

#

in that case, do you think it would be possible to force the hotbar slots to be like... at the end?

sour island
#

So you want magazines to also display at all times on the screen?

sour island
chilly beacon
#

so sorting the hotbar to always put mine at like, the very end would also work

#

cause then they'd not interfere with the number keys at least

sour island
#

You may not need the hotbar at all tbh - but this is a pretty significant project 😅

#

You could create a special hud when you wear your holder item

#

Then display the ammo that's inside

#

Updating when items are inserted or not

chilly beacon
#

yeah that was my other thought. we use the QOL equipment tab mod a lot, and that UI is really cool too. maybe a open/closeable panel in that sense that shows the magazines and their capaccities

sour island
#

It would be more stable and less of a headache patching issues + more control

#

Yeah that's a pretty good idea

#

You could have a very thin tab on the side that can collapse separate from the main window

#

Are you new to modding tho?

chilly beacon
#

i still want to "attach" the magazines to show the model on the player and for the weight benefit. but maybe that can be from within that system?

sour island
#

Uh you could rig something with insertion

#

I'm not familiar with clothing tbh

#

I've messed with UI and hotbars

chilly beacon
#

i've not done anything like this before, made a few small clothing things

sour island
#

And timed actions

#

Well if you need help - this channel is here 👍

chilly beacon
#

i made some tshirts and a backpack for example

#

but this is a whole new level

sour island
#

Yeah, unfortunately that's how modding is right now

#

Adding on more of what is there is pretty straight forward

#

Deviating at all jumps into the deep end

#

But honestly it's more daunting than difficult

thick karma
#

Say I'm making a custom animation in Blender... is there a tutorial on adding custom visual effects to the animation? E.g., a temporary bright glow effect? (Or can someone explain simply how this would be done, slash whether it is possible?)

hardy flint
#

does anybody know which .class file contains the logic/implementation of the admin cheat window?

thick karma
#

ISAdminPowerUI.lua @hardy flint

hardy flint
#

thank you very much!

thick karma
#

FYI, found in 30 seconds by searching media for "Edit your Admin Powers", finding the translation variable in the EN file, and then searching media for the translation variable... just in case you need something like this in the future and nobody is around. @hardy flint

#

In this case, variable was IGUI_AdminPanel_AdminPower in IG_UI_EN.txt

#

But there are a small handful of possible EN translation files.

hardy flint
#

thank you, will keep that in mind 🙂

thick karma
#

(If you index media, you can search them all simultaneously using Windows file explorer).

dark finch
#

Is there a way a modder can make only specific items lootable by a non faction member in safehouses

#

I feel it would make raiding more fair

drifting ore
#

Could someone help me? Is there any was to make cars drift in zomboid? Maybe some changes in vehicle editor while in debug mode might help?

faint jewel
#

😄

frank rivet
faint jewel
#

@candid light did i jsut implemented it.

#

and i WILL warn you. it is VERY rough

frank rivet
drifting ore
frank rivet
drifting ore
#

I have tried another drift mod, but it was more like driving on ice than drifting

#

And I am not a moder, so I can't do mod like this myself

frank rivet
#

does anyone have a mod on the workshop that uses the OnCreate Function in their scripts? I don't have pz on this laptop I'm using so I can't use vanilla scripts in this instance to reference. Anybody got anything?

drifting ore
#

?

#

I tried to go here, as it says in project zomboid, but there is nothing here

frank rivet
#

from the common folder. go into the workshop folder. then the 18600 one or whatever it is. The folder ID name is going to be in the car's mod page at the bottom.

#

2781895054 << look for that folder

#

I'd post my file location. But I don't have pz on this computer. I'm at work on my laptop lol

drifting ore
frank rivet
#

You're going into the PZ folder. its not in that. go from common to workshop

#

not common, pz, then workshop. thats a different folder all together

drifting ore
#

found it

jagged tapir
#

Hello everyone, I want to make a mod, but I don't have any information, where should I start? Do you have any resources you recommend?

frank rivet
chilly beacon
#

is there a way to see an items full properties whilst in game? I'm think I'm adding an attatchment type using itemtweaker but unsure if its actually working

frank rivet
frank rivet
drifting ore
#

But there are no mods I am looking for
There is only Cryogenic winter

frank rivet
drifting ore
#

This is the only folder there

frank rivet
# drifting ore

if you subscribed to the mod it should be in the folder name this 2781895054

dull moss
#

getPlayer():getPanic() would return how panicked player is, right? float from 0 to 1?

drifting ore
#

Strange

frank rivet
# drifting ore

that is weird. I don't know then honestly. Cause thats where it should be.

dull moss
frank rivet
#

Does anyone know of a mod that uses the OnCreate function in the scripts?? Imma keep asking till I find one haha.

jagged tapir
#

hello, I want to add vehicles to my server. There are places to add mod id and workshop id to the server, but there is no place to add Vehicle ID to my server. How can I add vehicles to my server?

dull moss
#

I don't think you need to?

#

They just spawn. Gotta be a cell that wasn't visited before though

last flax
#

Does anyone know why when adding extras to a vehicle, for example, armor or roofrack, the mass is affected and makes it wobble? I need a code that allows me to fix tha

trail lotus
#

possible to make a mod where you don't see the name above someones head until you "greet them" sort of like a trade thing but you right click and choose "greet" and then both names pop up

spiral sparrow
#

That's...Actually a really good idea!

bronze yoke
#

oooohh like clockwork

trail lotus
#

albion lemme give you some money hook a man up with a solid mod

spiral sparrow
#

Maybe it could be hidden if you're wearing an effective-enough mask or headwear?

trail lotus
#

we have that in the server rn

bronze yoke
#

i'm not sure if it's possible unfortunately

trail lotus
#

i can talk to jonny if you wanna know how its done

#

ooooooo

bronze yoke
#

burryaga was working with nametags recently and so was rj and both of them made it sound like the system is really inflexible

trail lotus
#

jonny spent alot of time tryna get that username to change

#

because we show usernames on the server, so he had to make it where it changes the username i guess?

#

it doesn't work for admins i know that.

#

but that greet mod would be soooo nice albion

bronze yoke
#

think it'd be easy if we turned off nametags and made our own

trail lotus
#

ahh we can do that. but the problem is people can't choose there own.

#

can we make it where the custom name tags are defined by username

bronze yoke
#

we can just grab it from the username like usual anyway

#

but it'll let us add special rules like this

trail lotus
#

awesome lets do it.

#

be a pretty cool global mod for you to do for the pz community normally i ask you for our server specific stuff like bank systems and the prisoner mod lol

bronze yoke
#

i think the handcuffs could be useful for a lot of people, but yeah projectrp doesn't have too much reach

trail lotus
#

i know thats why i always don't mind paying for stuff haha

dull moss
#

can anyone remind me how can you get fear in pz? character-wise, not getPlayer():getStats():getFear()

vast nacelle
#

Idea pitch for your custom user names mod: An option that when enabled changes the username to an alternate one when you have full face coverings.
A "crime persona" of sorts.

trail lotus
#

we have it in the server rn if you put a mask on now.

#

but we need to ravamp it most likley to work with albions new mod we will add.

#

cause rn it works with base game usernames, albion will have to write her own stuff for mask which should be uber easy to do considering she can do anything with her custom names

bronze yoke
#

yeah if this is as simple as it sounds, then the mask thing would be crazy easy to do with a system like this, instead of super annoying

trail lotus
#

yeah poor jonny 😦 he put alot of time into his mask stuff. but im sure he will like the new system.

#

i'd have to specify the item ids of the masks that way you can add the ones that remove you're name right?

bronze yoke
#

we could just do it for any full face mask, different types of masks use different slots

trail lotus
#

ohhh i didn't know that. yes let's do that then.

frank rivet
vast nacelle
bronze yoke
#

you want OnCreate:Recipe.OnCreate.GSKTransferCondition

vast nacelle
#

Ah, yeah. So I do.

frank rivet
#

So I am going to have to use lua. See I keep getting mixed info. I was under the impression that what I am trying to do could all be done in the scripts. Not lua. UGH.

#

I am garbage at programming lol.

bronze yoke
#

yeah, oncreate is a lua thing

frank rivet
#

I new that. But idk. ig I am gonna have to learn lua. -_- All I am wanting is to finish this damn mod lol.

jagged kraken
#

Anyone here super good with writing code for mods?

astral dune
#

Did somebody @ me? I can't find it

bronze yoke
#

i think someone did mention you earlier, but i didn't see them @ you so maybe they deleted it

astral dune
#

🤷‍♂️

bronze yoke
#

perhaps here?

astral dune
#

oh, I found the targeting calculations by looking into where the java triggers the OnWeapon... events, IIRC it just checks every targetable thing in the area to see if it's in range and its relative vector has a dot product with your aiming vector of over 0.7?

#

the outline code is in there somewhere, I don't remember exactly because I was just concerned with how people shoot or hit vehicles, and it turns out you literally have to be standing in one of the interaction zones, ie for doors or trunk or hood, for it to register

bronze yoke
#

that explains why it's so weird

astral dune
#

ya, you literally can't shoot a car unless you're standing right beside it essentially, lol

#

it selects possible vehicle targets the same way as target zombies, by doing the vector math, but then it calls some function on the vehicle like getClosestPart or something like that, which returns nil if you're not close enough to touch it

#

If I was writing the code for a speed gun I'd get the list of vehicles in the chunk, filter out ones too far away, filter out ones outside a particular cone, then get velocity of the closest one. I don't know of a vanilla function that will do that for you, but the math is pretty simple

bronze yoke
#

yeah, using it as a real gun seems like the hard way of doing it

quaint ibex
#

anyone know of a mod that allows for natural yeast collection (other than foraging for the yeast)

prisma gale
#

MoreBrews!....maybe

#

im sure it allows yeast to be collected from rotten fruit in a jar

sour island
astral dune
#

thats a good question, I've noticed with longer vehicles you definitely have to click close to its center so I assume it uses the getVehicleContainer function on the square you click on

#

would be pretty hard to do in motion

ancient grail
#

Sup anonymous. So they say that you might know some stuff about vehicle related events?

astral dune
#

haha yes, thats how this convo started it seems

bronze yoke
#

actually, it uses some weird java class that just loops through the vehicle list

ancient grail
#

Iwanted to make a speed gun that xapture the speed of a player while his driving ..

#

I couldnt @ cuz theres alot of similar name and your avatar didnt showed i wonder why... Guess anonymous is realy anonymous 🙂

astral dune
#

haha sorta. been thinking of changing my nickname here just to be easier to find

astral dune
ancient grail
#

Ok.. so the police with scanner would be the one with the on tick right? Wait let me find my logic map

astral dune
#

hmm, I would assume you use the onWeaponSwing event, constantly scanning could be expensive. Also not sure how you'd detect obstacles in the way of the radar/lidar

bronze yoke
#

anyway...
vehicle = IsoObjectPicker.Instance:PickVehicle(getMouseXScaled(), getMouseYScaled())

ancient grail
#

Ooioo

astral dune
#

I don't see any reason to use moddata, you can just get the velocity directly

ancient grail
bronze yoke
#

yeah, making it use moddata complicates things doesn't it?

ancient grail
#

Ive got only the ui draw snd the speed but its displaying on the driver for now. Just for testing plan to put it on the person with the radar. And turn on and off via onEquipPrimary event

#

So what your saying is i dont need to do the vehicle/driver codes just the one with the gun would be fine ?

#

Yey that makes things shorter ! 🙂

astral dune
#

are you worried about line of sight? that's probably going to be the hardest part

ancient grail
#

Yeh my way of doing it in my mind dint sound efficient at all which is why i waited for advice

#

Otherwise ill re write it again eventually. And dont want to do stuff twice

#

Well albions code is if you click

bronze yoke
#

if player:CanSee(vehicle) then

#

not everything has to be complicated

ancient grail
#

Poltergeist mentioned making it an acutal gun with 0 dmg but i fear it will stun

bronze yoke
#

you can run that code at any time, it doesn't have to be on a click event

astral dune
#

ah, that function is handy. It calls LosUtil, which is what I was going to point out, I don't know if LosUtil is exposed though, so having a function on the player is handy

ancient grail
#

Idk ehat that is but read more when i get to it

bronze yoke
#

you could run on tick while the gun is equipped or something

if not player:isAiming() then return end
vehicle = IsoObjectPicker.Instance:PickVehicle(getMouseXScaled(), getMouseYScaled())
if not vehicle or not player:CanSee(vehicle) then return end
-- now calculate speed and display it
ancient grail
#

Yep and is aiming thats the plan actually

bronze yoke
#

what is the difference between isAimControlActive() , IsAiming() and isAimKeyDown() ...?

ancient grail
#

Not necessarily needs to be pointed i guess

astral dune
#

this will only work if the mouse is over the vehicle, I think, but that's fine because the police should have to work for it

bronze yoke
#

i could imagine there can be some situations where you're pressing the button but not actually able to aim, but that still leaves two that sound like the same thing

ancient grail
#

?

#

I dont understand...

#

I get that it is active if your aiming i dont think we need to make it point to the vehicle if it can capture it without pointing at it

#

Tho for realism that would be a preferred thing
.
O wonder where the highlight is handled i mean where on the lua

astral dune
#

you have to select your target somehow. Albion gave you a way by hovering your mouse over it, its up to you if thats what you want

ancient grail
#

When u aim at someone your visual shows red or green

bronze yoke
#

isAimKeyDown() checks if the button is pressed, IsAiming() checks if you're actually aiming, isAimControlActive() returns true if either is true

ancient grail
#

That might be something i can hook on

astral dune
#

the game never highlights vehicles

ancient grail
#

Ahhh wow nice thnx

bronze yoke
#

i'd be surprised if that was lua, but it is used on a similar kind of class so you might be able to use it if it's exposed?

ancient grail
#

Like the markers?

#

I was planning to do some marker mod util . Could be useful for skizots delivery thing

#

Anyways thank you so much for your time u guys 🙂 ill let u know what works..
Also i wonder what your name would be anonymous

astral dune
#

looks like I can't change it anyway, so we'll never know, lol

sour island
#

right click > edit server profile > nickname

jagged kraken
#

Hey, Chuck, I'm home now, so I can actually delve into the discussion of coding a little bit better.

#

Can specific, unique animations be tied to clothing?

sour island
#

😮

astral dune
#

just an axe pleb

sour island
#

Ah, might because of this veteran badge

astral dune
#

ye, probably

sour island
#

I thought the badges were entirely visual lol

astral dune
#

Don't know how many posts or how long you gotta post to go up a rank, haha

jagged kraken
#

I've literally got a plunger.

#

Best. Weapon. Ever.

sour island
#

esp. if you use vanilla weapons expanded 😉

jagged kraken
#

Chuck

#

I need your help.

sour island
#

makes floor strikes stabbing - and makes a pop sound

jagged kraken
#

You seem smart.

sour island
#

I can offer advice, i suppose lol

#

taking some time on a commission atm

jagged kraken
#

Smart advice, that's the important part.

sour island
#

plenty of other people here if I don't respond right away

jagged kraken
#

I just need to map out how to word this future request whenever someone can help,

#

Can specific animations be tied to clothing? Like..

sour island
#

Were you asking about this earlier?

jagged kraken
#

...if I created a unique walking animation, could I code it to override the normal walking animation when a specific walking cane is equipped?

#

Yes, I was asking earlier (but I was also at work, and a little vague)

#

Or a silly hat.

#

Maybe a cast for the leg,

sour island
#

So, this isn't a topic I'm well versed - but I can tell you using the animation XMLs you can set conditions/events

#

I've also seen a priority tag (as XMLs are all <>)

#

Idk if that would supersede something like walking - which is not really an animation so much as a whole special player state

jagged kraken
#

Hm...

#

I'll have to ask around some more, then.

sour island
#
<?xml version="1.0" encoding="utf-8"?>
<animNode>
    <m_Name>Bob_Idle_Driver</m_Name>
    <m_SpeedScale>0.80</m_SpeedScale>
    <m_AnimName>Bob_IdleDriving</m_AnimName>
    <m_BlendTime>0.20</m_BlendTime>
    <m_Conditions>
        <m_Name>SCUCK_Anim</m_Name>
        <m_Type>STRING</m_Type>
        <m_StringValue>Bob_Idle_Driver</m_StringValue>
    </m_Conditions>
</animNode>
#
local enter_start = ISEnterVehicle.start
function ISEnterVehicle:start()
    enter_start(self)
    self.character:SetVariable("SCUCK_Anim", "True")
end

local function exitVehicle(player)
    player:SetVariable("SCUCK_Anim", "False")
end
Events.OnExitVehicle.Add(exitVehicle)
#

first is XML, second is Lua

#

It's a string check - but in this case I use it like a boolean

#

when the player enters the car you can apply this kind of pseudo animation state

#

the game will seek out animations of specific names

#

and swap between them - given the same condition is set for all of them

#

I assume vanilla has the lowest priority - as there isn't one for this anim

#

there's also Lua functions for playing anims

#

but they aren't really 'states' - and get interupted

#

You can find the vanilla ones in Media/

#

it's a pretty in-depth system

thick karma
#

Does launching in -nosteam always clear mod sandbox settings and enabled mods?

#

Hmmm no it seems to only be doing it for Meditation... I wonder why that is happening. Seems to be ever since I added a second mod folder to that mod?

sour island
#

personally -nosteam doesn't use the local workshop cache - if you keep your wip mods there

#

if you are subbed to your own mod it'd be grabbing off the workshop

thick karma
#

I'm not subbed to it

#

It is in Zomboid\Workshop

#

I mean I have other mods in the same place not doing this

sour island
#

that's the local cache - in my experience -nosteam doesn't grab mods from there

#

only /Mods/

thick karma
#

It seems only Meditation, which has two mods in Contents\mods, is resetting

#

And yeah Meditation is not visible when I'm in -nosteam

sour island
#

do you have an old copy in /mods/?

thick karma
#

It's when I return to normal mode that it resets

#

Nope

sour island
#

that's weird but if you load up the game with out the mod installed/retrievable the sandbox vars might get lost and reset once you load it

#

if that's wheat you mean about it not being visible / going to steam (normal)

#

MP testing is a hassle

#

I wish debug let you connect multiple clients regardless of steamID 😦

thick karma
#

You know what sure enough

#

My other mod's reset to defaults too

#

The one that was enabled entering -nosteam mode

#

oof

#

At least it's just a process error and not a mod issue

#

That was my main concern

#

"Did I bork this for everyone?"

#

"Or only me?"

sour island
#

at least we're unpaid - no one can be all that mad

#

most times

thick karma
#

I just didn't notice my other mod set to defaults because I basically use my other mod's defaults

#

lol true

sour island
#

@faint jewel

#

probably could clean up the truck a bit lol

#

needed to burn off some energy and think

thick karma
#

ugh tfw you fix one mod only to discover an issue in another lmao

sour island
#

both yours?

thick karma
#

Yeah

#

I have Jumper fully working... can drag players with me and have same-name locations in different categories.

#

But now I am trying to figure out how I inverted minimap-hiding in DOTZ

#

Accidentally got disconnected from the rest of the loop such that minimap was showing on hide and hiding on show

sour island
#

heh

thick karma
#

I think it's related to a death-loop bug I just tried to address. When I died with world map open, stuff got wonky.

#

I hate this gd minimap

faint jewel
sour island
#

used the farming spiffo

#

free trucker hat and flannel

faint jewel
#

anyone know how to spawn a vehicle at a certain location

sour island
#

local vehicle = addVehicleDebug(vehicleType, IsoDirections.getRandom(), nil, currentSquare)

#

the nil is an integer for the skin index

#

won't work if the squares aren't loaded tho

thick karma
#

Phew, figured it out, back to my almost-completed new mod. Whee.

#

Can anyone think of any mods that added custom special effects to an animation state?

finite radish
#

is there any way to do reflection on a Lua-exposed object? i.e. access/call private members directly

coral lava
#

If i wanted to introduce a new plant, how would I go about it? I am struggling with finding the code for it

marsh gale
#

Anyone know a good Java editor/compiler?

faint jewel
#

currentsquare... hmmm

finite radish
#

(also depends on how you want to use it - if you're placing it manually that's one thing, if you want it integrated into the foliage that's much harder)

coral lava
#

@finite radish Oh! I should've specified, just one for a farming plot

finite radish
#

oh, like a growable plant? there's a few mods on the workshop, you can take a look at how they handle it. I think I remember an API that someone made to help with that sort of thing, but it's been a long while since I remember seeing it

#

i think the main mod that comes to mind is SoulFilcher's Farming Time though, that should have more than enough examples to get you started

coral lava
#

Alright, thank you for the advice!

faint jewel
#

oh ffs how do i select a square at a certain set of coords?

thick karma
#

Ugh tfw while playtesting your mod you immediately know there are going to be people requesting feature X and you know damn well you're going to add it.

faint jewel
#

i need to know how to set and get mod data on a TILE. not world mod data

sour island
#

so what I do is call on clients to spawn the car - from the server, using a command

rancid panther
#

how do you make it so a trait shows which skills it gives +1 to when you hover over it?

#

do i need to add something here, or is there something outside the thread that makes it do it for every trait i add?

bronze yoke
#

that should be automatic

faint jewel
#

ugh... this is a pain.

finite owl
#

I'm trying to access the Java field IsoPlayer.closestZombie from my Lua script... it's declared public in Java, and the decompiled IsoPlayer.lua mentions it (in a comment). But it doesn't seem to be available on the actual player object, and there's no getClosestZombie() getter defined in Lua. Am I out of luck?

#

There's a method player:getClosestZombieDist() which I presume returns the closest visible/nearby zombie to the player, but it's flagged as deprecated in the Java, and looks pretty heavyweight (whereas the closestZombie float seems to be maintained continuously)

drifting ore
#

Where is the zombie loot and the clothing they wear defined?

finite owl
#

Ah, and also player:getClosestZombieDist() returns nil even if there's a zombie literally gnawing on my character's arm, so it doesn't seem very useful. Deprecated, indeed.

rancid panther
faint jewel
#

anyone have reliable code to get a radius around a set of coords for a vehicle?
local isFull = getCell():getGridSquare(sX, sY, sZ):isVehicleIntersecting(); is CLOSE but misses a lot.

finite owl
#

Hmm, client-side calling getCell():getNearestVisibleZombie(player:getPlayerNum()) seems to do something similar, but the fact that it uses the player's index (and IsoCell stores them in an IsoZombie[4]) means it presumably doesn't work server-side.

astral dune
#

what are you trying to achieve?

finite owl
#

Me? I want to add a check when a player is entering an RV Interior that there aren't any zombies "too close" (configurable via a sandbox setting).

astral dune
#

nah, skizot

bronze yoke
#

he wants to avoid spawning vehicles inside other vehicles

finite owl
#

Ah 🙂

bronze yoke
#

oooh katana

astral dune
#

BaseVehicle.testCollisionWithVehicle() is used for that, I believe

finite owl
astral dune
#

lol, grats

faint jewel
#

i want to spawn a vehicle but I want to check the spawn area to make sure there's not already a car there

finite owl
#

Looking at the implementation of isVehicleIntersecting, it calls BaseVehicle:isIntersectingSquare, which seems to do an intersection test using PolyPolyIntersects.intersects.

#

So in Java it seems you could do PolyPolyIntersects.intersects(vehicle1.getPoly(), vehicle2.getPoly())

#

But I don't know how much of that is exposed on the Lua side

#

Alas, no PolyPolyIntersect.lua that I can see 😦

#

BaseVehicle:getPoly() is defined though

#

So you could implement your own intersection test for two VehiclePolys...

astral dune
#

as I mentioned before BaseVehicle.testCollisionWithVehicle() is what the vanilla code uses to keep vehicles from spawning inside each other, uses a whole different collision algorithm. I imagine one of these approaches should work

#

I used a similar implementation for my collision algorithm. works well on stationary vehicles, but moving vehicles don't report their coordinates well enough. shouldn't be a problem for spawning though

faint jewel
#

got an example usage?

bronze yoke
#

some of it does, but it's mostly an object for the client

finite owl
#

If you went with the polygon route, it seems that VehiclePoly has a method getAABB, and doing intersection tests on Axial-Aligned Bounding Boxes is dead simple, if you don't mind that they're larger than the actual rect, so positions that would be valid would still be rejected

finite owl
bronze yoke
#

i don't think it loads any chunks on the server, so most of its functions will just return null/empty

astral dune
#

IsoChunk.doSpawnedVehiclesInInvalidPosition and IsoChunk.isGoodVehiclePos both use testCollisionWithVehicle, unfortunately the latter is private or it would probably be all you need, its used for making traffic jams.

#

the AddVehicleCommand may be what you really want, which uses the doSpawnedblablabla method

faint jewel
#

so we know what he strings are?

fast galleon
#

If you want to do a check for player interaction, why not do it client side?

finite owl
#

Is that re: testing for nearby zombies preventing you from entering the RV Interior? I'll definitely do it client side, but in a client/server setup I'd normally always test the validity of a client's action on the server as well.

fast galleon
#

I see, getCell works on server from what I know. But some of the arrays might be empty.

bronze yoke
#

getCell works, it's just that many of its functions do nothing

#

how about IsoPlayer:GetStats():getNumVeryCloseZombies()?

finite owl
#

The array of nearest zombies is maintained by the render code, and is indexed by player:getPlayerNum(), so it's going to be empty server-side.

bronze yoke
#

you won't be able to customise the range or anything, but it'd be sufficient for a toggle

finite owl
#

IsoPlayer:GetStats():getNumVeryCloseZombies() returns the number of zombies within 3 tiles - it's used for the jumpscare music, I think

#

So they're very close 😁

#

I'm definitely using player:getStats():getNumChasingZombies() as well... if you're being chased by zombies, I don't care how far away they are, you won't be allowed inside the interior.

#

Although this will all be configurable by sandbox settings - I'm not going to tell players how to play their game.

bronze yoke
#

i thought that sounded extreme at first, but then i remembered that you're literally invincible inside an interior... i like that actually

finite owl
#

But the RV Interior is absolutely safe, being a map far far away from the real world and with invulnerable walls, so we want to make it a bit more restricted

#

Yes, indeed 🙂

#

(teleporting zombies into your interior if they arrive soon enough after you enter would also work, but I don't think it would be feasible given that the chunks will be unloaded pretty immediately if the player is removed from them)

bronze yoke
#

that's something i've always wanted to play with

#

never got around to testing if it was even feasible, but a feature like that would definitely get me using that mod

faint jewel
#

lol AddVehicleCommand​ is not found ANYWHERE

finite owl
#

To be fair, the zombies should have to break through the windows of the RV first before they could follow you inside.

bronze yoke
#

they certainly don't have time for that!

finite owl
#

Not before they're unloaded from memory, no.

astral dune
#

zombie.commands.serverCommands.AddVehicleCommand.java

finite owl
#

I doubt it would be feasible, but it would be great when the new basement support is added in v42 to put the interior far underground below the vehicle location, rather than way off to the side of the map. Then meta and helicopter events while inside would actually affect zombies that are near your vehicle, and presumably the chunk would still be loaded so zombies outside the vehicle would continue to get CPU cycles, and we could conceivably have a way for them to break inside.

bronze yoke
#

that was my thinking actually

finite owl
#

But it would require moving the interior map from wherever you last entered inside to a new location each time you entered, including all items in containers, and I doubt the engine could be cajoled into doing that.

bronze yoke
#

oh yeah...

#

i don't think it's actually that impossible, but it would suck to write

#

i mean you have to think of everything you could possibly need to move

#

might have to hold it all in memory since we can't load chunks at will, which is just lovely too

finite owl
#

Also, I don't know what the Z limit for the basement stuff is. You'd want to be sure that you're not overwriting bits of the map that are actually being used by a basement or sewer system.

faint jewel
#
local radio = nil;
for i=0,sq:getObjects():size() - 1 do
            local item = sq:getObjects():get(i);
            if instanceof(item, "WHATISTHISFORAVEHICLE") then
                Car= item;
                break;
            end
        end
bronze yoke
#

particularly if players can dig, which if they can't will certainly immediately become a popular mod

fast galleon
#

yeah, I'd be mad if it's not possible

astral dune
#

all vehicles are BaseVehicle, afaik

finite owl
bronze yoke
#

yeah, they're IsoMovingObjects at heart

#

i've never looked specifically at if they appear in those lists, but i imagine they do

finite owl
#

Actually, yes, they do.

#

I remember now.

astral dune
#

there is a square.getVehicleContainer which returns one of the vehicles in a square. I think it has to be the actual xyz of the vehicle though, not just one it overlaps

finite owl
#

Because I was being bitten by this test in some hackery I was doing: if not self.vehicle or not self.vehicle:getSquare() or self.vehicle:getSquare():getMovingObjects():indexOf(self.vehicle) < 0 then

#

So it expects to find the vehicle in the getMovingObjects list returned from the square returned by vehicle:getSquare()

#

That's in ISVehicleMechanics... the comment is -- handle vehicle being removed by admin/cheat command

#

The hackery in question was me playing around with wrapping a vehicle Java object with a Lua object using metatables to delegate all function calls to the vehicle, so I could override function calls on a Java object. It was working well, but that test was failing because self.vehicle was my Lua object, but getMovingObjects contained the original vehicle 😩

bronze yoke
#

oh you wanted to mess with the metatables on a specific object? that's fun

finite owl
#

Not exactly, I wasn't touching the metatables on the Java object. That might actually be a better way to do it, actually, if they're available.

bronze yoke
#

i'm unsure if that method would work - i'm pretty sure it's a single metatable

finite owl
#

I was creating a Lua object with metatables whose __newIndex and __index functions would pass on the read/write to the java object, but give me an opportunity to do stuff on the way through.

#

And I could register before and after functions for any given function on the Java object which ran to mess with the arguments going in or the return value coming out, or a replace method which was called instead.

#

Anyway, I've shelved that, I don't think it's very practical.

#

I just wish the Java code was, well...

#

ECS rewrite of the Java side of PZ when.

finite radish
#

sounds slow too, but you're probably right in that it's likely the only way to accomplish it

the real issue there is just how much stuff is private, and without any form of real reflection a lot of stuff is just outright impossible

finite owl
#

Indeed. It was fun, but I don't think it would scale very far.

#

In order to work around that issue above with the ISVehicleMechanics testing if the vehicle is still in its square, I had nested after wrappers like this:

local wrappedVehicle
    wrappedVehicle = wrapJavaObject(self.vehicle, {
        --getPartCount = {
        --    after = function(count)
        --        return count + 1 -- Water tank
        --    end
        --},
        -- Unfortunately the mechanics UI checks the vehicle's square's getMovingObjects Java array for the vehicle
        -- object, but we're trying to pretend that wrappedVehicle is the same thing, so we have to wrap each of them
        -- in turn so that vehicle:getSquare():getMovingObjects():indexOf(wrappedVehicle) returns the index of the real
        -- vehicle.  This check is made every tick, so this wrapping is probably very expensive.
        getSquare = {
            after = function(square, vehicle)
                return wrapJavaObject(square, {
                    getMovingObjects = {
                        after = function(vehicleArray)
                            return wrapJavaObject(vehicleArray, {
                                indexOf = {
                                    after = function(result, self, searchFor)
                                        if result == -1 and searchFor == wrappedVehicle then
                                            result = self:indexOf(vehicle)
                                        end
                                        return result
                                    end
                                }
                            })
                        end
                    }
                })
            end
        }
    })```
#

So I overrode the vehicle's getSquare function so I could override the square's getMovingObjects function so I could override the java array's indexOf function so it returned the index of the original vehicle java object when it searched for the wrapped object 🤣

#

And that all ran every tick.

finite radish
#

dear god

#

yeah that's like a performance warcrime

bronze yoke
#

😟

finite owl
#

It was raining in-game when I was testing this. The raindrops were falling noticeably slower. I didn't measure the FPS 😁

#

I mean, if I thought it was worth it I could add some caching mechanism so the wrapped objects were re-used, but I don't think it's sustainable.

finite radish
#

what was the actual end goal?

finite owl
#

One of the plans for RV Interior is to have a water tank you install and have to fill by hand, and possibly gutters as an upgrade you eventually get to catch the rain, instead of getting free rain catcher barrels on the roof of the interior buildings.

#

Ideally I want the water tank/gutters/anything else we add installed and uninstalled through the mechanics UI

#

But I don't want to duplicate and hand-modify every vehicle script.

#

So I was looking into ways to modify vehicle mechanics dynamically.

finite radish
#

but why at runtime? figure out the script changes needed, then regex it in

#

ez clap

finite owl
#

We don't have our own vehicles - you need to have other vehicle mods (like Fillibuster Rhymes', or AutoTsar) to get the vehicles whose interiors you can enter.

#

So we can't really have modified vehicle scripts distributed as part of our mod

#

Whether they're edited by hand or modified by something we automate

finite radish
#

why not? if they're already a dependency, not sure I see the big deal there. permissions and all that, yeah, but still

#

idk much about either party and how stingy they'd be about that sort of thing

finite owl
#

None of them are actually hard dependencies, because players might not want to play with all of the 5 the vehicle mods we support.

bronze yoke
#

what did you need to modify about the vehicle scripts?

#

couldn't you just use the script manager?

finite owl
#

So, I'm now thinking that VehicleScript.copyPartsFrom looks promising.

#

We have a script which just has the water tank/gutters/whatever vehicle parts, and then copy them into the relevant vehicle scripts each time the game starts up.

bronze yoke
#
local vehicle = scriptManager.instance:getVehicle('Module.ModdedVehicle')
if vehicle then
    -- etc etc
end
#

the way i used this was creating a vehicle script that included only the modifications and adding that script as a template to the original script using the script manager

finite radish
#

that was what I was thinking, just didnt know the syntax. basically instanceOf

finite owl
#

Yup, that's what I'm thinking too.

bronze yoke
#

it's unreleased

finite owl
#

Ah well 😁

faint jewel
#

can i send a chat message to just the local player?

finite owl
#

Ooh, I've upgraded from a 🪠 to a sledge !

bronze yoke
#
local scriptManager = ScriptManager.instance
local getVehicle = scriptManager.getVehicle

getVehicle(scriptManager,'CarNormal'):Load('CarNormal', '{template=CarNormal_Upgrades,}')
```this is the concept
faint jewel
#

like a "no room to spawn vehicle" message

bronze yoke
#

haha congrats!

#

ignore the bringing getvehicle into local space, that's a micro-optimisation i couldn't be bothered to rewrite

thick karma
#

Anyone happen to know whether one of these DrawTexture functions (for UIElements) can cut a picture off at an arbitrary height (rather than scaling it)?

finite owl
bronze yoke
#

say is only visible to that client, so it's pretty ideal for this

finite owl
#

Thanks once again, @bronze yoke ! I've yoinked those snippets into the GitHub ticket for the water tank feature, and we'll see how we go 😁

bronze yoke
#

😇

faint jewel
#

i know this is a long shot, but is there a way to tell what city you are in?

bronze yoke
#

no

faint jewel
#

figures.

bronze yoke
#

you could just define a big box around each one

fast galleon
#

Is it possible to set vehicle to no colide and not visible in any way?

bronze yoke
#

you probably don't want it as a dependency, but kyrp uses stfr and there's a function i wrote for that in there

faint jewel
#

stfr?

bronze yoke
#

small town first responders

#

yeah, it just uses some predefined rectangles to determine which zone you're in

#

actually that function might not be perfect for this usecase... it's pretty specifically optimised for stfr

faint jewel
#

then yeah my signs are going to have to have mod data for the city that gets pulled when you open the menu.

#

fuck this is getting convoluted

#

lol

bronze yoke
#

that's probably the best way to do it, there aren't going to be that many signs right? having a whole zone system would be overkill

faint jewel
#

1 per city

drifting ore
#

How are zombie clothing defined?

finite owl
#

@faint jewel If there's only a handful, and you only need it occasionally, you could potentially define one "city centre" square for each city, and then iterate them and pick the closest one when spawning your sign (or when you open the menu)

finite owl
fast galleon
#

and the loot table is "Outfit_..."

drifting ore
#

Yeah I was lurking in there for a while. I see their names in 'zombieszonesdefinition' , but what actually gives them the clothes I wonder? I see the outfits in 'distributions' too but...

#

Like.. there is "Cook_Generic" - where does he gets the specific clothes he has on?

fast galleon
#

there's something like outfits guid, not sure about the name

#

if you can't find it, check one of the clothing mods to see what it's called

#

Authentic adds extra outfits

drifting ore
#

Ahh i found it I think

#

'clothing.xml'

faint jewel
#

sigh. these all have the SAME spawning direction "IsoDirection.N" stupid game.

#

only the bottom one is right

drifting ore
#

Damn I knew it CANT be too complicated to change up their outfits a little 😄

faint jewel
#

it's like toddlers are spawning them in 😦

#

addVehicleDebug(SjobModel, sA, nil, spawnsquare)

#

x = 12140, y = 7141, z = 0, sA = IsoDirections.N

#

they should all spawn the same direction right?

#

none of this wobbly shiz it's doing.

drifting ore
#

they are too big and probably bump against each other while spawning

faint jewel
#

the top one is the first one spawned.

#

and they are not too big, they match the trucks perfectly.

drifting ore
#

too big for the spawn zones i meant

faint jewel
#

they are being spawned in.

drifting ore
#

ohh

faint jewel
drifting ore
#

I wish there was a totally zombie free trucking RP server in PZ

faint jewel
#

it's adding -10 to 10 degrees randomly on the angles.

#

that's what i am working on.

drifting ore
#

no?

faint jewel
#

AZTS.

drifting ore
#

count me in

faint jewel
#

trying to get the job boards working.

drifting ore
#

it probably needs a lot of custom systems to work?

faint jewel
#

oh god does it.

fast galleon
#

Is it possible to set vehicle to not colide and not visible in any way?
What about changing wheels animation?

viral karma
faint jewel
#

HAH fixed it.

manic relic
#

wanted to ask what the best attachbone is when making a half mask like in undead survivor mod

#

heres an image to what I mean

faint jewel
#

head

#

the whole head moves with it

rancid panther
#

is there a way to make a weapon spawn on the player with an upgrade attached to it?

manic relic
faint jewel
#

huh?

manic relic
#

cause it shouldnt remove any of the hair

faint jewel
#

look at the face masks that exist?

manic relic
#

ok

vast nacelle
rancid panther
#

thanks!

rancid panther
vast nacelle
#

Yes. Something like
local newGun = getPlayer():getInventory():AddItem("Base.Pistol"); local newPart = InventoryItemFactory.CreateItem("Base.RedDot"); newGun:attachWeaponPart(newPart);

rancid panther
#

thanks again!

viral karma
#

Is there an official way to request changes to the Java code base? Would love to add an "isAttached" check here so music could still play through the Walkman (also would love to add this for radios and radio communication)
Context attached...
Edit: I'm happy to contribute a patch
Edit2: (also thinking about those who leave radios on and put them in their bag... would be a lovely zombie attraction - or distraction)

ancient grail
#

i failed to capture the player via right click

#

anyone has a snippet for this

sour island
#

Check medical checks

#

Or trade

fast galleon
#

hm, there's no way to see the ZombiesZoneDefinition around you in-game, is there?

thick karma
ancient grail
viral karma
#

How are you capturing the player via right click? Like right-click on any player?

ancient grail
#

yes

bronze yoke
#

i like to use this

local sq = objects[1]:getSquare()
local squares = {sq, sq:getS(), sq:getE(), sq:getS() and sq:getS():getE() or nil}
local players = {}
for _,square in pairs(squares) do
    local movingObjects = square:getMovingObjects()
    for i=0,movingObjects:size()-1 do
        local movingObject = movingObjects:get(i)
        if instanceof(movingObject, 'IsoPlayer') then
            table.insert(players, movingObject)
        end
    end
end
```depending on your use case you might need to add a check that you don't capture the player opening the context menu
ancient grail
#

ahhh so i need that squares

bronze yoke
#

not really, i just use that to make the selection area more intuitive

ancient grail
#

can it be on post UI

bronze yoke
#

if you only use the objects on the square the player clicked on, about half of the player won't actually be on that square

ancient grail
#

Events.OnPostUIDraw.Add(speedTest)

viral karma
#

ISWorldObjectContextMenu.lua has the following roughly:

ISWorldObjectContextMenu.fetch = function(v, player, doSquare)
    ...
    if instanceof(v, "IsoPlayer") and (v ~= playerObj) then
        clickedPlayer = v;
    end
    ...
end
ISWorldObjectContextMenu.createMenu = function(player, worldobjects, x, y, test)
    ...
    for i,v in ipairs(worldobjects) do
                ISWorldObjectContextMenu.fetch(v, player, true);
    end
    ...
end
bronze yoke
#

i thought this was for a context menu event, i'm not really sure why you'd want players on right click outside of that

ancient grail
#

im really not sure if theres a diffrence with how you get the player wether its for the context menu or not

viral karma
#

I think this is for the speed radar gun

ancient grail
#

cuz i do need it for both

#

i also need the right click anyways for other parts of the mod

bronze yoke
#

well you just need to grab the square under the cursor and omit the first line since that's context menu specific

#
local sq = -- some method of grabbing the square under the cursor
local squares = {sq, sq:getS(), sq:getE(), sq:getS() and sq:getS():getE() or nil}
local players = {}
for _,square in pairs(squares) do
    local movingObjects = square:getMovingObjects()
    for i=0,movingObjects:size()-1 do
        local movingObject = movingObjects:get(i)
        if instanceof(movingObject, 'IsoPlayer') then
            table.insert(players, movingObject)
        end
    end
end
ancient grail
viral karma
#

Was just looking into it, I think I got something for you. Lemme type it out

#

Not tested, but this should get you mostly there

-- Reference: projectzomboid/media/lua/server/BuildingObjects/ISPlace3DItemCursor.lua
-- Reference: projectzomboid/media/lua/client/ISUI/ISInventoryPaneContextMenu.lua
if isServer() then return end

RadarCursor = ISBuildingObject:derive("RadarCursor");

function RadarCursor:getSquareAtCursor()
    local worldX = screenToIsoX(self.player:getPlayerNum(), getMouseX(), getMouseY(), math.floor(self.player:getZ()))
    local worldY = screenToIsoY(self.player:getPlayerNum(), getMouseX(), getMouseY(), math.floor(self.player:getZ()))
    return getSquare(worldX, worldY, self.player:getZ());
end

function RadarCursor:render(x, y, z, square)
    local square = self:getSquareAtCursor()
    if square ~= nil then
        -- do whatever with the square at the cursor
        -- Albion's snippet might work well here
    end
end

-- Called by Java in IsoCell.setDrag()
function RadarCursor:deactivate()
    ISBuildingObject.deactivate(self)
end

function RadarCursor:onObjectLeftMouseButtonDown(object, x, y)
    -- Disable clicks on objects, to prevent the loot window being displayed
    -- however... you _can_ use the same logic instead of putting it in the "render" function
    -- here if you only want mouse click to get the speed
    return true
end

function RadarCursor:new (player)
    local o = {}
    setmetatable(o, self)
    self.__index = self
    o:init()
    o.player = player
    
    return o
end

-- somewhere else in your code, when you're calling to find/render the speed
local radarCursor = RadarCursor:new(player)
getCell():setDrag(radarCursor, player:getPlayerNum())
bronze yoke
#

oooh yeah

ancient grail
#
local function OnObjectLeftMouseButtonUp(object, x, y)
    -- Your code here
end

Events.OnObjectLeftMouseButtonUp.Add(OnObjectLeftMouseButtonUp)
#

will this work

viral karma
ancient grail
#

the even i found works!

#

but its not properly capturing everyiting jus tby printing the arg

#

also the coord of the other event returns the scree x y

#

the other im just about to try

#

cuz i didnt print it yet

bronze yoke
#

i'd heard that event doesn't grab isoplayers

#

you could grab the square of the object and search for players like my snippet

ancient grail
#

thats what i was planning to do

viral karma
#

How are you're doing your "isAiming" check on your weapon?
You can probably trigger the getCell():setDrag(radarCursor, player:getPlayerNum()) call if you are aiming, and maybe call the radarCursor:deactivate call if you're not aiming.

bronze yoke
#

wait, why do you need to find a player with the radar gun anyway?

ancient grail
#

mouseToWorldX()
mouseToWorldY()

#

this didnt work too

ancient grail
#
Events.OnPostUIDraw.Remove(speedGunResult)
local function speedGunResult()

 if not getPlayer() then return end
 if getPlayer():isAiming() then
    local chr = FUNCTIONTIGETPLAYERUNDERTHEMOUSE()
    local car = chr:getVehicle()

     if not (car and car:isEngineRunning() and chr:isDriving()) then return; end


        local MPH = car:getCurrentSpeedKmHour() / 0.621371
        local speedValue = tostring(math.abs(math.floor(MPH)))
        chr:getModData()['MPH'] = speedValue
         --local speedValue = tostring(math.abs(math.floor(MPH * 100)/100))  --adds 2 decimal places

        local xOrigin = getCore():getScreenWidth()  / 2
        local yOrigin = getCore():getScreenHeight()  / 2 - 20

        getTextManager():DrawStringCentre(UIFont.Medium, xOrigin, yOrigin, speedValue , 1, 1, 1, 1)
  end
end
Events.OnPostUIDraw.Add(speedGunResult)
bronze yoke
#

we already had code to get the vehicle you're aiming at right? just use getCurrentSpeedKmHour() on that

ancient grail
#

let me check i i slept after that discussion with anoymouse i must have not stored it cuz i looked at the notes i had

ancient grail
#
    local function speedGunResult()

        if not getPlayer() then return end
        if not getPlayer():isAiming() then return end

        local car = IsoObjectPicker.Instance:PickVehicle(getMouseXScaled(), getMouseYScaled())

        if not car or not getPlayer():CanSee(car) then return end
        local MPH = car:getCurrentSpeedKmHour() / 0.621371
        local speedValue = tostring(math.abs(math.floor(MPH)))
        --local speedValue = tostring(math.abs(math.floor(MPH * 100)/100))  --adds 2 decimal places
        local xOrigin = getCore():getScreenWidth()  / 2
        local yOrigin = getCore():getScreenHeight()  / 2 - 20

        getTextManager():DrawStringCentre(UIFont.Medium, xOrigin, yOrigin, speedValue , 1, 1, 1, 1)
    end
Events.OnPostUIDraw.Add(speedGunResult)
bronze yoke
#

no need to call getPlayer() every time, but yeah

ancient grail
#

ok ill shorten it out

bronze yoke
#

since this code is running a lot you don't want too many unnecessary calls

ancient grail
#
local function speedGunResult()

    if not getPlayer() then return end

    local car = IsoObjectPicker.Instance:PickVehicle(getMouseXScaled(), getMouseYScaled())

    if not car or not (getPlayer():CanSee(car) and getPlayer():isAiming()) then
        local MPH = car:getCurrentSpeedKmHour() / 0.621371
        local speedValue = tostring(math.abs(math.floor(MPH)))
        --local speedValue = tostring(math.abs(math.floor(MPH * 100)/100))  --adds 2 decimal places
        local xOrigin = getCore():getScreenWidth() / 2
        local yOrigin = getCore():getScreenHeight() / 2 - 20

        getTextManager():DrawStringCentre(UIFont.Medium, xOrigin, yOrigin, speedValue, 1, 1, 1, 1)
    end

end
Events.OnPostUIDraw.Add(speedGunResult)
bronze yoke
#

i just meant it'd be better to use

local player = getPlayer()
if not player then return end
--etc etc
ancient grail
bronze yoke
#

if not car or not (getPlayer():CanSee(car) and getPlayer():isAiming()) then

#

you might have wanted this line to be if not car or not (getPlayer():CanSee(car) and getPlayer():isAiming()) then return end

viral karma
bronze yoke
#

if you choose to remove the nots, you need to replace the or with an and too

viral karma
#

When is too much not enough? 🤣
I've been slowly working on some much needed inspector tools. Inspecting items will show the icon, any 3d model, and any world sprite along with item attributes. If -debug, will also show item details in a debug window, along with the edit item menu.
Planning to expand this to a right click > inspect feature, as well as an "inspector" tool that you can select squares/objects and ui elements to get data on them - super helpful when you want to see (and edit!) data on an existing object.

bronze yoke
#

oooh looks very useful!

viral karma
#

I'll hopefully have something for beta testing early next week and probably release on the workshop next weekend.
It includes a rough UI framework to help make code a bit cleaner and easier to follow.

agile vigil
#

I know it's a little weird, but I made some mods earlier this year and just left them with the default "The Indie Stone" picture from the example mod, and I wanted to spice them up as I'm working on a few new mods over Christmas.

I was thinking a simple style, like a static background with a sign that has the name of the mod, and a short description.

Below is an example of my thoughts.

https://cdn.discordapp.com/attachments/1001205761545875537/1053664197591957554/image.png

#

I'd like to ask if anyone has some inputs or ideas on what you actually look for in those little screenshots on the mod-page and previews in the mod lists?

bronze yoke
#

keep in mind that the workshop preview needs to be 1:1

agile vigil
#

Yes, when 1:1 you only see the sign and not the example tooltip.

#

Like this 🙂

bronze yoke
#

for me, it just needs to look nice

#

as long as it's not the default pie or looks like it was just grabbed off google images, my click is based on the title

agile vigil
#

Yeah, I suspect the pie is a big reason why my mods don't seem to get many new visitors. And then people don't do evolved recipes or know what they are much 😄

lavish arch
#

Does anyone know how to make a sprite read all sides and furniture positions?

#

I just put the first .pack image in the script and thought it would read the others, but it didn't work

fast galleon
#

Are you trying to make a pack or is this about in-game?

lavish arch
#

I already made the pack actually, I just don't know how to make it work

#

I just put the first item from the pack in WorldObjectSprite and thought it would work, but apparently it wasn't that simple

fast galleon
#

did you specify the pack in in the mod.info?

lavish arch
lavish arch
ancient grail
chilly beacon
#

I'm having a really wierd issue. I've got a belt attachment point, hotbar slot, and it all works except the world model that i want to be visible on the player is on the floor not matter what I do. The first image is the location definition. the second is where it actually shows up. it should be approximately on the left hip. but nothing i change in the offset seems to make any difference, am I missing something?

#

to clarify, if i change the offset numbers it moves around, but its certainly not attatched to the hip like the bone says it should be

lavish arch
viral karma
chilly beacon
#

... for what purpose? to see how their attachment system works?

#

like what do you mean by "try" here?

viral karma
#

Oh derp, I see what you're getting at.
This is in the item definition scripts for regular Holsters

nocturne swift
#

Hi, does the "or" method work like this?

jagged ingot
#

Hello. Anyone know of any events that I can use for when LuaNet is fully initialized?

#

Can't seem to find any, although the server's logs shows something that resembles events for LuaEvents.onInitAdd..

chilly beacon
#

is there a way to explicitly set that a hotbar slot has a specific number?

trail lotus
#

it's not possible to allow people to create accounts on project zomboid that aren't whitelisted them go and just approve them onto the server is it?

#

each account has to manually be created?

bronze yoke
#

we could like

#

put them in the waiting room or something...? LOL

jagged ingot
#

BungeeCord for Project Zomboid when?

thick karma
# viral karma Try a stencil rect: ``` -- In the prerender: self:setStencilRect(10, 10, 100, 50...

Does this look right to you?

JumperRift = ISPanel:derive("JumperRift")

function JumperRift:prerender()

    self:setStencilRect(0, 0, 1920, 540);  -- (x, y, width, height)
    self:drawTextureScaledAspect(self.rift, 0, 0, 1920, 540, 
        1, 0, 0, 0);
    self:clearStencilRect()

end

function JumperRift:new(x, y, width, height, rift)

    local o = {}
    
    o = ISPanel:new(x, y, width, height)

    o.background = false;
    o.backgroundColor = {r=0, g=0, b=0, a=0};
    o.borderColor = {r=0, g=0, b=0, a=0};

    o.rift = rift

    return o

end

Jumper.prepareRifts = function()

    local lightning = Texture.getSharedTexture("media/ui/lightning.png")

    Jumper.rift = JumperRift:new(
        0, 0, -- position
        1920, 540, -- size
        lightning -- texture
    )

    Jumper.rift:initialise()
    Jumper.rift:addToUIManager()

end

Events.OnGameStart.Add(Jumper.prepareRifts)
#

(I call setVisible elsewhere)

#

Jumper.rift:setVisible(true) is not showing my image

#

It does show a background on the panel though if I don't set that false

#

Also Jumper.rift is existent from terminal and properly reports its intended visibility after calls to setVisible

#

So the object to some degree exists

#

But no texture

#

Original texture size 4k if that's relevant... I had it showing as an ISImage but that seems to have less flexibility.

viral karma
# thick karma Does this look right to you? ``` JumperRift = ISPanel:derive("JumperRift") func...

What are you trying to clip to? You should set the width/height of your StencilRect to the clip area of your texture
Also if you're going for resolution width, you can do getScreenWidth() instead of 1920.
Edit: If you don't want your texture to stretch, you can render it at like 1920x1080, then use the stencil to clip it to 540

Your issue seems to be that you set the alpha of the texture to 0. Try the following:
self:drawTextureScaledAspect(self.rift, 0, 0, 1920, 540, 1); - removing the last 3 0's will treat the 1 as the alpha.

thick karma
viral karma
thick karma
#

Ohhhhhhh I have it backwards crap thanks I bet that's it

thick karma
#

Should I be using drawTextureScaled or drawTextureScaledAspect? @viral karma

viral karma
thick karma
#

Scaled can also shrink the image though?

viral karma
#

I believe so, I'm not 100% sure on what each drawTexture variant does.

thick karma
#

Okay... still haven't gotten anything to show but relaunching now

#

Tried reloading some functions in debug and that was not working so just doing a sanity test

jagged ingot
#

Anyone know of any events that I can hook into regarding the initialization of LuaNet?

thick karma
#

Currently rewrote prerender as

function JumperRift:prerender()

    self:setStencilRect(0, 0, 1920, 540);  -- (x, y, width, height)
    self:drawTextureScaled(self.rift, 0, 0, 1920, 540, 1);
    self:clearStencilRect()

end

So hoping this works since alpha clearly not 0.

thick karma
#

Still borked...

JumperRift = ISPanel:derive("JumperRift")
function JumperRift:prerender()
    self:setStencilRect(0, 0, 1920, 540);  -- (x, y, width, height)
    self:drawTextureScaled(self.rift, 0, 0, 1920, 540, 1);
    self:clearStencilRect()
end
function JumperRift:new(x, y, width, height, rift)
    local o = {}
    o = ISPanel:new(x, y, width, height)
    o.background = false;
    o.backgroundColor = {r=0, g=0, b=0, a=0};
    o.borderColor = {r=0, g=0, b=0, a=0};
    o.rift = rift
    return o
end
Jumper.prepareRifts = function()
    local lightning = Texture.getSharedTexture("media/ui/lightning.png")
    Jumper.rift = JumperRift:new(
        0, 0, -- position
        1920, 540, -- size
        lightning -- texture
    )
    Jumper.rift:initialise()
    Jumper.rift:addToUIManager()
end
Events.OnGameStart.Add(Jumper.prepareRifts)
#

😦

viral karma
thick karma
#

I can definitely set it visible and confirm panel is there... but no texture 😭

viral karma
jagged ingot
thick karma
#

Sure... I DID use getSharedTexture earlier and it did work, but I am open to getting texture any way that works in this context... How do I access getTexture exactly? Texture.getTexture("location")?

jagged ingot
#

I'm sending my own sendClientCommand and needed to know when the game's ready.

thick karma
#

(When I used getSharedTexture with ISImage (instead of trying to embed texture in an ISPanel), that worked.)

#

Still nada... also, confirmation that texture is loaded:

#

Correctly identifying my image size in bottom left

jagged ingot
#
-- ***********************************************************************************************
-- OnGameTimeLoaded
-- called when the client udp engine is running and player properly initialised
-- ***********************************************************************************************
thick karma
#

I did not give it that info (directly) @viral karma

jagged ingot
#

Not very straightforward but a solution nonetheless.

viral karma
thick karma
#

Oh tryt that okay

#

Ohhhh I forgot the metadata and index lines you're saying

#

@viral karma Thanks SO much for spotting that... the actual lines I needed are:

    setmetatable(o, self)
    self.__index = self

But seeing the problem was 99% of the battle there, so thanks nonetheless.

viral karma
thick karma
#

Thanks again!

jagged ingot
#

Looks like LuaNet is dated.

thick karma
#

Lmao, yes, I've done it. I have created the cheapest animation in history.

#

I just sort of make my png shake and change opacities a lot lol

jagged ingot
#

Yeah.. It would be convenient to have an event for when you are able to send client commands and they'll actually send. Writing a OnTickEvenPaused solution is very dirty.

thick karma
jagged ingot
#

Delaying by 5 ticks per query with a self-removing tick-event function fixes this problem for me and that's fine... however.. there will be people in the future running into the same issue and probably will be very lost about why their client commands aren't firing.

#
local a = 5
local b = function()
  if a >= 5 then
    sendClientCommand('..','..',{})
    a = 0
  else
    a = a + 1
  end
end
local c = nil
c = function(d, e, f)
  if d ~= '..' or e ~= '..' then return end
  -- ..
  Events.OnServerCommand.Remove(a)
  Events.OnTickEvenPaused.Remove(c)
end  
Events.OnServerCommand.Add(a)
Events.OnTickEvenPaused.Add(c)
#

This is what I do right now to avoid this problem.

viral karma
fast galleon
#

searched? you can just print them

viral karma
fast galleon
#

your list needs arguments

fast galleon
#

If you update the existing list, it will surely help some people.

jagged ingot
#

If I had the time / task to do this, I'd go through and fully document all events.

#

I translated the wiki documentation for 41.65 events into PipeWrench's typings by hand.

#

Hopefully a solid list of events and documentation for them will bounce onto the PZWiki for the recent versions again.

viral karma
thick karma
faint jewel
#

is there an event that fires when you right click on a tile?

viral karma
sour island
#

Sorry coming in late

jagged ingot
sour island
#

sendCientCommand doesn't fire if paused?

jagged ingot
#

I believe it might be a few ticks, however this is a problem in my situation.

sour island
#

Ah, I had a similar issue with OnPlauerUpdate or CreatePlayer

#

For a few ticks it refers to the object before loading

#

Caused a big headache

jagged ingot
#

shared/utils/LuaNet.lua states that an event on the client fires right after the client -> server command is ready, but this is sadly not the case for the current version of the game.

sour island
#

There's an event for onconnect I believe

#

Could a boolean be set there?

jagged ingot
sour island
#

So a slight delay

#

Not terrible tbh

jagged ingot
sour island
#

Hmm

#

What about player move?

jagged ingot
#

OnGameStart fires slightly before.

#

Why should a player have to move for me to load something that has to load when the game starts?

#

It's something that needs to happen right as the command API is in a loaded state. 🙂

sour island
#

I agree, ofcourse

#

I might start up the community patch next weekish

#

Should have enough time

#

"API" reminded me lol

#

I left commissions open on Kofi and caught one unexpectedly, and work has been crazy with the holidays encroaching 😅

#

I kind of wish Kofi had an approval system -- they just gave me the cash instantly.

jagged ingot
#

Oh wait.. so people use Kofi for commissions hunting?

#

I use a Discord Forums solution for a market place on my Discord server. Haven't shared that in around 4 months now which explains why it's been silent again.

#

What I'm having this issue with is actually something like a commission. 😛

thick karma
#

Well lmao shrinking did not work bahahaha

sour island
thick karma
#

Tried to shrink player model using Blender animation, legs rose into torso and that's about it.

sour island
#

It was supposed to be pretty straight forward, but I had to do a bunch of stuff for work

sour island
jagged ingot
sour island
jagged ingot
sour island
#

Hmmm

jagged ingot
#

Spent the past week creating a creative solution that violates no rules while providing a simple solution to a decades' long issue in the PZ community.

sour island
#

Of keeping mods as a server exclusive?

jagged ingot
#

Yup.

sour island
#

Interesting idea

#

I'd ask for details, but it would probably be over my head and only help people circumvent it

thick karma
# sour island Like with that one mediation pose?

Lmao not quite. In Blender I made an animation where character shrinks down to 10% of original size, tried to play it on the idle animation but the overall character did not shrink, although legs rose up as if perhaps the skeleton of the character was shrinking toward its center.

elfin harbor
#

for my superb survivor mod the npcs wont show or even spawn? what do i do ping me with a response
they are invisible

thick karma
#

but because clothes and skin and beard and such stayed the same size, it looked pretty borked.

jagged ingot
thick karma
#

I was considering disappear-and-reappear animation. Perhaps simply moving my character into the ground would work. Idk. Exploring options.

jagged ingot
#

Also, you'd have to mod your client to do this which is also violating the EULA for PZ. 😄

#

A lot of fun things being violated there. Anyways.. People stealing commissioned works is disgusting.

ruby urchin
jagged ingot
sour island
#

I'd unfortunately never DCMA somebody, the process opens you up to be messed with by people who already could care less

ruby urchin
jagged ingot
#

Have a good evening guys. Peace.

wet sandal
#

Anyone know what encoding I need for Polish translations?

#

Someone provided me the translation, but no matter how I save it, it always looks messed up in game (or missing the accents on characters)

bronze yoke
#

windows 1250

wet sandal
#

Huh

#

Know an app that supports that?

viral notch
bronze yoke
#

notepad++ lets you mess with the encoding, it's a bit annoying though

#

it tends to not open files in the correct encoding, you have to go and change it manually...

viral notch
dull moss
#

Yo I remember I saw somewhere something about how to fix this issue in sandbox setting you gotta delete some file so PZ re-creates it, anyone can remind me what was it?

#

Found it, it's options.ini in Zomboid folder

rancid tendon
#

so question

#

if i wanted to change the ID for my mod, is there any way to do so and guarantee that it doesn't break things for existing servers and such that aren't prepared for the change? any way to force an update to the new mod ID?

bronze yoke
#

not really... you can make the old mod id deactivate itself and activate the new one, but i don't know how that behaves on a server, probably not great

rancid tendon
#

yeahhh, i feel like that wouldn't work for a server ...

#

i wish my brain wasn't so fixated on how badly i mangled the ID naming convention because honestly it's so ugly it's driving me insane but this is also something no one else really cares about and it would be stupid to risk damaging anyone's server to change it :(

#

i'll simply have to have more foresight next time

bronze yoke
#

what's the situation, anyway?

rancid tendon
#

so my mod is split into five packs contained under one workshop id, and they are named as such:

#

Mod ID: MusicfortheEndOP
Mod ID: MusicfortheEnd
Mod ID: MusicfortheEndExtended
Mod ID: MusicfortheEndHl
Mod ID: MusicfortheEndSH

#

you can see that Extended and Hl are the odd ducks, with HL not being properly capitalized and Extended being an entire word instead of what i would make it now, which is EX

bronze yoke
#

yeah that's a pain...

#

i have a somewhat similar situation where a couple of my mods were made back when people were having issues with a character limit on the modlist for dedicated servers, so i made my modids as short as possible, and i'd now rather have them more readable

#

i'd much rather OccupationalClothing than OCCL, for example

dull moss
rancid tendon
#

i really wish PZ had some way of like

#

stop-gapping stuff like that

#

like, instead of deleting unknown items, it could just create placeholder items that retain the ID of the items it's trying to load

#

so that way, if you remove a mod that adds items, the items will remain in the game and if you add the mod back it'll load the appropriate item because the ID is still stored

#

it'd make updating mods a whole lot less risky :V

dull moss
#

Anyone knows what causes PZ sandbox mod options to get royally fucked like this? From testing it appears to happen when you add quite a few mods. If it's a couple of mods, those sandbox pages work just fine.

#

it jamms all non-boolean fields together

bronze yoke
#

are multiple mods adding to the same page?

dull moss
#

no

#

it's singular sandbox-options.txt

#

I mean, maybe on some other pages

#

But this one is 1 file

#

Same as others that get jammed

#

And they are all big sandbox options files that you can scroll through

#

Aka a lot of options

#

But then again they work just fine when modlist is not like 100 mods

#

Mom I just want a game that works as it's supposed to pepecry

sour island
#

I'd check your console.txt

#

Looks like one of the options is shitting the bed

dull moss
#

and what should I look for?

#

wait, this?

#

i thought sandbox-options.txt is default?

#

so everyone supposed use it?