#mod_development

1 messages Β· Page 115 of 1

drifting ore
#

i know that "fast move" handles player movement more like a camera than a player so maybe somehow thats part of it

#

he could but i think he's trying to make it more conditional instead of based on manual adjustment

#

lol... dare i spend time figuring out how to use Radials for lightswitch electrician

#

can't be insanely hard to add some light on/off and battery add/remove options and maybe something to toggle switches.. lol essentially redoing the entire mod but for ui radial now

dark wedge
#

Ah, I think I understand. I'm not sure if the falling can be negated now that I kind of tried. Not fully sure how flight was done, but thinking it was just the animation. if so, that's just "smoke and mirrors" and not actually updating the z value, so makes sense it still reports as 0.

dark wedge
drifting ore
#

ahh good call!

#

i have a TON of context menu option stuff also i would think should help me get through this faster. but who knows πŸ˜„

dark wedge
#

Speaking of radials, I was thinking for the next SpiffUI - Radials update, I would try to take a crack at making the context menu a little mini radial.

drifting ore
#

i'm stoked for that update honestly. i love that mod but there was something that stopped me from being able to use it

dark wedge
#

oh? do you happen to know what? I do know there's some issues with it, and it's been bothering me that I haven't had time to touch it. only so much time during the day. haha

drifting ore
#

honestly dont even remember at this point. i'll let you know if it comes to me

#

i love this concept 10000000%

#

it brings a lot of things hidden in context menus and stuff right to one place

#

makes the game super intuitive to play

#

ohh i know why

#

because we have a shit ton of crafting options and stuff and other things

#

16k items so it happens

ancient grail
#

Is it possible to toggle hide a trait using sandbox including the char selection

drifting ore
#

i wasn't sure how it would play with it all since there was no way to stop those menus from what i saw

ancient grail
#

It exist but its just hidden

#

So server admins can choose if the trait is accesible or not

drifting ore
#

since i dont have a vm server setup atm i havent been able to afford to test things like that ATM

ancient grail
#

I could but how will that work i mean ... Its hard to explain

drifting ore
#

i can't host my server either

#

D:

#

pretty sure there is some limit on starting a server from host with so much stuff lol

dark wedge
drifting ore
#

i haven't checked into it much. if you dont think there is anything that would cause an issue, then it's gonna probably go on next update lol

#

when i finish my mod i'm putting it on πŸ˜„

#

adding an altered version for my server also since we have pliers and wire cutters haha gotta use em instead of wrench lolol

drifting ore
#

i always thought it just made smoking automatic which i didn't want. but wasn't sure also. would like to use the feature as long as it's bound to the radial and not actually automatic

dark wedge
# drifting ore oh yea it's unclear, do i have to use autosmoke mod in order to use smoke featur...

Also for the crafting radial, make sure to use the option to only show recipes you can actually make. otherwise, it can get a bit slow when you have a bunch of recipes and also hard to sort through as there are no categories (maybe yet, idk)
For now, Autosmoke is required as i use those functions for its recipes on various modded cigpacks. you can disable the autosmoke "autosmoking" feature if you want. That's been a pain-point since its release, so will write my own for the next update too

drifting ore
#

perfect. those were literally my exact two things that stopped me from putting it on. my girl will be happy to know haha

#

ever since i showed her it she's been all about it

#

first round test of menu and submenus for light radius increasing lol

ancient grail
#

how to add icons oin traits

#

any reference

thick karma
#

ui/traits/trait_TraitID iirc @ancient grail

#

Wookiee Tutorial Party Animal has this demonstrated in the GitHub link

ancient grail
#

πŸ™

#

I cant find the animal party

#

Nvm found it

#

Ow no its a diffrent one

#

I cant find it again

thick karma
#

Sorry ui/Traits/trait_TraitID.png

ancient grail
#

Ty

thick karma
#

I believe you need the trait_ part of the name strictly

#

I never tried removing it though

#

I just followed someone's tutorial at the time

#

I.e. the whole filename needs to be exactly right

#

By the trait ID I mean the spaceless tag you use to grant and revoke the trait

#

Whatever that is

#

Mine is just TraitName for a trait called Trait Name to make it easy on me.

ancient grail
#

I kinda remember this. You just need the name of the file and be on the right folder you dont need to add stuff the function that actually adds the trait..

How about making it hidden from players on creation screen?

#

Is that possible?

drifting stump
#

Yeah not having client/server comms or sandbox vars at that point is annoying

thick karma
#

Assuming you mean that you want the trait in the game but not selectable

#

Perhaps exclusively dynamic

iron trellis
#

Hey guys, so I'm COMPLETELY new to the PZ modding schmuck, and I'd like to know if someone's willing to help me out with a mod that I'm planning to make?
It's gonna be a simple little mod that changes the jumpscare sounds to be way more intense/scarier (basically just replacing the files with different ones). I maybe know the basic idea of how I could do it, but I just need someone to help me out because again, I'm fully new to this thing and I've never worked on a PZ mod before lol

If someone sends me a DM with the basics on what to do, I'd be really really grateful!! Thanks in advance!

sour island
#

You could look up the metal gear alert jumpscare mod, and just replace what they've done.

#

@ancient grail @thick karma If I recall the creation methods are one of the older Lua handled stuff that is a giant if chain.

thick karma
#

Oof

sour island
#

I've become unfortunately busy again, and trying to hammer out an update to EHE, but making a checklist of those types of giant-if-chains are a to-do for the community patch

thick karma
#

Hey how do we make use of the community patch? Is it live on the workshop?

sour island
#

Might even be a last-resort-just-ovetwrite-the-function situation too

thick karma
#

I heard about that the other day and I still don't know how people are intended to make use of it

#

Just grab what we need from the github?

sour island
#

The work to be done on those functions is still to be done

#

It's on the workshop and github

thick karma
#

I guess I missed the workshop link

sour island
#

Changes approved on the GitHub are automatically pushed to the workshop on Fridays

thick karma
#

Interesting. I need to look more into what all it does and subscribe

#

I was thinking some of my rewrites could be useful

sour island
#

There isn't anything on the patch yet, I've just been adding issues as todos/bounties

thick karma
#

Oh

#

I see.

sour island
#

The only thing on the mod are debug tools πŸ˜…

thick karma
#

Understood.

sour island
#

Just saying, if one of you plans to overwrite the function to allow for hidden traits. It would benefit to have the function broken down

#

Basically piecemeal it so the results/list of traits can be accessed before rendering

#

Inventory display and context menus are another candidate for this type of brute force overwrite unfortunately

fast galleon
sour island
#

Tbh, I haven't started it cause I'm not sure when it should be executed - before or after others mods

drifting stump
thick karma
#

Will definitely do it this way if I rewrite it

#

Fair.

#

Whatever is most useful to people.

sour island
#

It would fit framework

drifting stump
#

patch is for fixing issues
framework improve modability

sour island
#

True

thick karma
#

Makes sense.

sour island
#

At some point those two might be merged πŸ˜…

thick karma
#

Understood.

#

Haha I mean I think that's fair @sour island

sour island
#

If the fixes and the frameworks need to continuously be tested for self compatibility

thick karma
#

Lack of modability is an issue afaic πŸ˜‰

drifting stump
#

as for code standards: no globals

sour island
#

What about the vanilla globals πŸ˜…

#

UI etc

thick karma
#

Well I'm talking about rewriting vanilla globals.

#

I'm not going to localize things that people expect to be global obviously lol

#

That would be... not smart.

drifting stump
#

well we dont have a choice about vanilla globals and have to keep them

#

else would break stuff

#

but dont introduce new globals

thick karma
#

I will not add any globals to the community submissions if I do make them.

#

I understand the desire.

sour island
#

local __G = _G
_G = __G

#

I cracked it

thick karma
#

lol

sour island
#

I'm thinking frameworks should actually be loaded last if possible

#

Even though it'd break others mods - the alternative would be the framework doesn't work 90% of the time

drifting stump
#

need to be loaded first so mods doing overwrites dont break

thick karma
#

here's a local for your framework ;P

local function handleWaterZone(file, v)
    -- If you see the number of the beast, you know something is wrong . . .
    local x = v.x or -666
    local y = v.y or -666
    local z = v.z or -666
    if v.properties == nil then
        print('ERROR: WaterZone missing properties in '..file..' at '..x..','..y..','..z)
        return
    end
    if v.properties.WaterGround == nil then
        print('ERROR: WaterZone missing properties.WaterGround in '..file..' at '..x..','..y..','..z)
        return
    end
    if v.properties.WaterShore == nil then
        print('ERROR: WaterZone missing properties.WaterShore in '..file..' at '..x..','..y..','..z)
        return
    end
    getWorld():registerWaterZone(x, y, x + v.width, y + v.height,
        v.properties.WaterShore and 1.0 or 0.0, v.properties.WaterGround and 1.0 or 0.0)
end
#

That'll stop the game from accidentally throwing fatal exceptions during server load when it intended to simply print an error.

sour island
#

But wouldn't other mods doing overwrites potentially break the overwritten functions?

#

πŸ€”

drifting stump
#

if they dont hook yeah would break it but if it causes any issues people will complain

sour island
#

I guess as long as the ultimate returns are the same it should be fine

#

In any case, I gtg to work

thick karma
#

Glhf

ancient grail
sour island
#

What's the difference between water shore and water ground? Puddles?

thick karma
#

It would need to be integrated into metazoneHandler.lua

#

It's not useful alone to anyone but the modder who plans to fix metazoneHandler

#

Or "improve the modability of" metazoneHandler

#

(fix 😎)

ancient grail
#

Ok

weary dock
#

yo guys and ladies, how to modify eating speed on some items? And mb hook up external animation?

thick karma
#

@quasi kernel You lurkin?

thick karma
#

Animation... is not as easy as you would hope.

#

Your casual reference to it suggests to me you are hoping it might not be a big deal but a custom animation in general will be a bit of a headache, especially if your animation involves something in your hands.

#

Especially in Zomboid

#

Because of how the items are bound to your character in the animation software.

#

(They connect to and move with your pelvis, not your hands.)

#

Regarding eating speed, I could say look into TimedActions for eating, but if you don't know how to search for that yet, it probably won't help.

#

So trying to clarify where you are.

weary dock
weary dock
weary dock
thick karma
#

A TimedAction is actually a Lua table object.

#

well, sort of both

#

But the way you handle it is via the Lua table implementation in Lua

#

You don't find it on the JavaDoc

#

You find it by searching the media/lua folder of the Project Zomboid installation

#

You may want to index those folders in Windows so that you can search the text of those files in addition to file names using the Windows file explorer.

#

I recommend looking at the ISReadABook timed action in ISReadABook.lua as a very simple example of the basics.

thick karma
#

Not saying you cannot do it

#

But it's not trivial

weary dock
#

ok imma thinking mb i can reuse some of vanilla anims as well to atleast save time and sanity

thick karma
#

Triggering an animation is easier than making one by far

#

If the animation is not already an emote you can follow the structure of the other emote files in AnimSets/player/emote and try to turn it into one.

#

And put it in your own AnimSets/player/emote in your mod

weary dock
thick karma
#

I'm not gonna ping him because he shows up often enough on his own but he'll probably see this and respond eventually.

#

lol guy needs to take a break.

weary dock
#

i guess imma go try smthing out now, ty for help

thick karma
#

But you can scroll up to see the superman flying animation he made

#

No worries, good luck

quasi kernel
#

Sorry- was asleep.

thick karma
#

Ayyyyyy

#

One sec gonna grab the file names

#

@quasi kernel Okay! In UFP_FarmingSystem_patch.lua and UFP_farmingCommands.lua you reference an object called SFarmingSystemCommands and another called SFarmingSystem

#

The problem is that those objects do not exist on the clientside

#

So when you load, the clientside throws exceptions.

#

You need if isClient() then return end at the top of those files.

#

(Even though they are in server, clients still load them.)

quasi kernel
#

Mfw

#

You'd think server would stay on the server but I guess not

thick karma
#

Newp

quasi kernel
#

Yeah ill get around to patching that soon, to my knowledge it doesn't break anything so things should still be OK for now

#

Thank you!

thick karma
#

I recently learned that... Clients load server stuff. Server, however, does not load client stuff.

#

Anyhoo thought you would want to know

neon bronze
#

Hope they fix it in b42

quasi kernel
#

Yeye! I received a report about it a while ago I think and didn't know what was up since the code was fine.

#

Didn't see any of the errors popping up in testing I don't think

#

Only error that pops up is if you have More common seed types loaded because of something on their end.

thick karma
#

Right anything that clients cannot see in your server code needs to be protected... If clients shouldn't load anything in server files, returning if isClient will fix everything

thick karma
sour island
#

Clients load server code but what that code does is up to you

#

If you use if isClient() return end or isServer() depending on what you need -- the code won't engage

quasi kernel
#

Yeye!

sour island
#

This is also true for shared

quasi kernel
#

Shared I'd expect that much, it threw me off for server though.

neon bronze
#

What does client actually load first? The client folder or the server folder?

sour island
#

I don't know if this was even intentional or just an oversight -- could be for checksum purposes

#

Could also be an easy way to handle single player that doesn't involve refactoring much of the game/Lua files

#

Also, just occurred to me - the MP is basically peer to peer

#

So in that sense there is no "server" code

#

It's all client-side or to make terminology more defined, connection-side

#

You can send specific information to the host to keep connections in sync

#

It just happens the host doesn't run "client" code

#

This is how I understand it to be- and I prefer this terminology cause it gets really convoluted otherwise πŸ˜…

sour island
#

Yep, sorry, on phone

quasi kernel
#

Wait so Burryaga, you're trying to make an error free modpack?

sour island
#

I've been enclosing Events.X.Add() with if not isClient - but some events don't get called host-side and I assume vice versa(?)

thick karma
#

But it depends on the patch I just sent you and a couple more patches that I need to publish in Wookiee Gamepad Support

sour island
#

Any mods in particular not playing nice with eachother?

quasi kernel
#

Hehe, I'll get to work soon then as to not keep you waiting.

thick karma
#

Haha no rush

#

Just being honest

#

No pressure at all

sour island
#

Apparently the combination of SwapIt + Only Cure + Fancy Handiwork doesn't work.

thick karma
#

I just wanted to make it easy on you by sending you the solution

#

Instead of just whining about the problem

quasi kernel
#

I had someone start complaining that Better Batteries was updating too much when I only updated twice, over two days, after months of nothing.

thick karma
#

SwapIt isn't even gamepad compatible so it didn't make the cut @sour island

quasi kernel
#

It made me die a little inside since both of those updates were fixes.

sour island
#

Is hotbar actions not supported on gamepad?

#

Or is everything radials

thick karma
#

SwapIt throws infinite exceptions if you try to wander its options menu using a gamepad

red tiger
#

Good morning.

thick karma
#

Its options tab is done wrong

sour island
#

Like in menu options?

quasi kernel
#

Morning jab!!

thick karma
#

Correct

sour island
#

I really need to sit down and redo easyConfig - I basically butchered it out of an old mod and gave it a really bad facelift πŸ˜…

#

Way back before I knew much of anything

thick karma
#

Haha word

sour island
#

Custom menu API would be a nice framework

red tiger
thick karma
#

I need to give all of my mods a facelift but when stuff is working bug free and you have more solutions for features that literally don't work yet...

red tiger
#

<3

thick karma
#

Hard to choose refactoring over the next job

red tiger
#

We working towards a brighter future for UI lol

sour island
#

As nice as modOptions is, it seems there's issues with ini files and apparently anyone can change the settings online.

#

Not necessarily the UI - just a handling of options

thick karma
#

Wdym anyone can change the settings online?

sour island
#

Everyone can have independent options set

#

EasyConfig locks it to the server and only lets admins change

thick karma
#

Wait are you discussing a problem or a feature?

sour island
#

However, it would be nice to have either available

thick karma
#

Ohhh, I seeeee.

sour island
#

Problem and a feature, depending

#

ModOptions treats everything like single player (unless there was an update) - so players can set settings that impact MP play

thick karma
#

Yes, if you made something like Mod Options that had controller support and had both admin-restricted settings and client settings, that would be great.

sour island
#

While I took a more conservative approach

thick karma
#

I have already considered taking over MCM and redoing it with gamepad support

sour island
#

I would, but I can only squeeze out like an hour or two a couple days

#

And something like that needs a solid sit down to not lose track

#

MCM like Skyrim?

thick karma
#

I could redo this with A) gamepad support, and B) options only admins can set.

#

I have been considering it.

sour island
#

Hmm

thick karma
#

But then I will want to redo ALL my mod options

#

for ALL my mods

#

And oof

#

Hahahaha

#

As soon as I am ABLE to have a better mod options page, I will immediately want to

sour island
#

If you want to split time on EasyConfig

#

I don't know how game pad support works

thick karma
#

I mean I could look into it. I don't know anything about EasyConfig, probably because admin-only settings were never something I was thinkin about

#

I tend to use sandbox options for admin-only stuff.

sour island
#

Yeah I added those before I knew change sandbox options was a thing or before it was reliable

thick karma
#

So it never occurred to me that I might want in-game menu options for admins (or that anyone had invested time in providing that)

thick karma
#

I figured something along those lines

sour island
#

I might scrub the admin only options in lieu of that

#

Maybe include the change sandbox options mod as a required πŸ˜…

thick karma
#

shrug, some people might love em, honestly.

#

I do not know

sour island
#

I'd have to sit down tbh

#

There are some options it makes sense to have available in the menu

#

Something like SwapIt makes sense to be adjustable but should also be consistent in MP

#

But I also had some people request it not be consistent as they have a PVE server

thick karma
#

Right right

sour island
#

So that'd be something to also support

#

Toggling which options are locked to admin / etc

#

And sandbox doesn't really handle that kind of case

#

I mean... It could if you used the config as an overwrite if it's present

red tiger
#

@tame mulch How's the scripting guide since completion? I see that people are linking it in here.

sour island
#

Otherwise default to sandbox but at that point you might as well leave the sandbox out of it πŸ˜…

thick karma
#

Yeah I'm not sure what I'll do next. Part of me wants to stay focused on doing a shops mod as my very next thing after I post this collection, but there are so many variables to consider before I pick one I want to support. I need to try some out and I need to consider how they implement money and what the consequences are and such

sour island
#

Shops mod? πŸ₯Ί

thick karma
#

Gamepad support

#

Not the whole thing

sour island
#

Ooh

thick karma
#

Adding support to an existing one

#

As part of Wookiee Gamepad Support.

sour island
#

πŸ™

thick karma
#

I don't need to reinvent the wheel here.

#

There seem to be plenty of good ones

tame mulch
thick karma
#

I just don't know which is likeliest to rise above and become the one most people prefer.

#

(Or a small handful of good ones.)

sour island
#

I will be adding bartering and player ran shops soon(ish)

#

Afaik, it's just mine and Noirs'

thick karma
#

Bartering?

sour island
#

Items for items

thick karma
#

They have a barter UI

thick karma
#

The player to player trading UI is for bartering by nature

#

And I just did gamepad suppot for it.

sour island
#

Yes but this would be a location one could do it

thick karma
#

Ohhhhhh

#

You should just let people trigger the vanilla one at range.

#

Easy

#

Done

sour island
#

I have a whole shop system that handles stock and what gets listed or not

thick karma
#

No need to redo the whole UI

#

I see, so this would need to pull items from more than player inventory

#

They have stock somewhere that they can barter from?

sour island
#

The items are technically deleted

#

It's just storing item types

thick karma
#

I see.

sour island
#

Might have to store condition as well πŸ€”

#

The first focus will be on player ran shops though

thick karma
#

Fair.

sour island
#

Would need to create something to handle that

thick karma
#

Definitely yours is on my radar because Noir doesn't seem to interact with people here or anywhere.

sour island
#

I was told Noirs' is 1 giant shop

thick karma
#

And I don't know of a mod that really looks better than either of yours

sour island
#

And that's why I was commissioned to make a mod that handles multiple shops

thick karma
#

I see

#

Shops and Traders was originally a commission job?

#

Ouch

#

Haha

sour island
#

I think I heard he recently added player selling -- but I don't know on what capacity -- I assume players can add listings tied to them

sour island
#

The expansion into bartering and player owned shops is also being supported (so I do it sooner πŸ˜…)

thick karma
#

I see, lol. I hope they're paying you for real because that mod would take countless hours I imagine.

#

Shops and Traders does not look like it was finished in 3 hours.

sour island
#

They're good people

thick karma
#

right on

sour island
#

And actually, S&T was commissioned by Duck

#

FB was by someone else

#

Both good peoples πŸ‘

#

I'd say Shops took like a solid week during the summer

thick karma
#

I believe that.

sour island
#

The longest was getting the UI in order

thick karma
#

A looong week. Haha

sour island
#

Then, the networking -- the easiest part was just setting up the objects and making the functions

thick karma
#

The UI already scales to 4x no problems?

sour island
#

I would have to check what I did for the initial window - but everything else should scale to the size of the main shop window

thick karma
#

Just making sure your text positioning is based on font height and not hardcoded like vanilla

sour island
#

So changing the size of the shop window should warp the rest of the window

#

I use fontManager and such throughout

thick karma
#

Cool

#

Great

sour island
#

The vanilla UI I saw does use font heights

thick karma
#

Those things definitely increase my odds of picking it

sour island
#

I presume the older stuff doesn't?

thick karma
#

E.g., the trade UI has a history box

#

of trade actions

#

The line sizes are not set to match the font height

#

So the font is way too big for the rows of the lists.

#

Looks like shit in vanilla

sour island
#

Ah, I used the trade window as a launching pad - but I gutted it

#

I used fontHeight checks as seen in tooltips πŸ˜…

thick karma
#

Nice.

#

If I work on something I need it to look right at 4x, haha, so I am more likely to want to help if I do not have to make it look right myself.

#

(Not only because it's bad form not to have scaling text, but also because I have friends who need that setting and I am not gonna publish mods they wouldn't want to use.)

sour island
#

One thing Noir does have that I don't is selling cars

#

I do plan to add that too though

thick karma
#

I do remember noticing that

#

and some 3D view window

#

Pretty fancy crap

sour island
#

Ah yeah, I saw that

thick karma
#

Good on him

sour island
#

Not sure if I'd add that lol

thick karma
#

If he had a Discord or comments or wanted friends... I might try to do his gamepad support lmao

#

But alas

sour island
#

Also would think it makes more sense to sell the keys to a nearby car if it's player ran

thick karma
#

He's not looking like a likely candidate

#

I don't do aloof

#

Communication is important

sour island
#

He's apart of Valhalla and mostly does their stuff afaik

thick karma
#

That makes sense

#

I am sure he feels too busy for outside input. That's understandable.

#

But it also means he likely won't get outside support.

#

Trade-offs.

thick karma
#

I honestly prefer the idea of needing to bring people cars

#

Physically.

#

Not just because it's easier to code ( 🀣 )

#

I mean it's a fun job to do in an apocalypse

#

Get the car across the map

#

Make the money

#

Honestly one thing on my agenda is teleporting cars though lol for Jumper.

#

I think I will need to create a copy of the same type of car and then do inventory transfer and then delete

#

Couldn't find a function that would effectively teleport an existing car

drifting stump
#

smh if you want vehicle rendering in ui look at my server points

thick karma
#

Haha there you go @sour island

#

C'moooon you know you wanna. πŸ˜‰

#

What's one more TODO?

#

A reason to live, that's what!

drifting stump
#

the shops i did had a pretty simple ui and currency support was just overwriting 2 functions

thick karma
#

Lit

drifting stump
#

dont know how much more albion has developed it though

#

not sure but it mightve been the first fully scaling ui on the workshop

thick karma
#

Nice.

#

I don't know if albion's still working on the update she made to your mod

#

That mod has a "finished" looking Workshop page

#

And explicitly declares itself as a commission project

#

(maybe to discourage people from thinking it'll be indefinitely maintained?)

drifting stump
#

she couldve done a patch but at the time she didnt know about the require magic πŸ˜”

thick karma
#

Idk

#

Hahaha

#

I mean the enormous majority of local code in vanilla is either not accessible or very, very mysteriously accessible, so much that it becomes empirically justifiable in context not to expect a Zomboid file with a bunch of local stuff to be accessible.

#

Ever since talking to you, I always check if apparently inaccessible local stuff is returned, and 9/10 minimum, it isn't, but I have found occasionally it's hidden in copies made in global objects.

#

Virtually no local objects in vanilla code get returned for import afaik

#

Soooo

#

haha

#

Understandable mistake.

drifting stump
#

you can grab some stuff from the metatable

thick karma
#

Fair, hence "very, very mysteriously accessible" haha

drifting stump
#
local parentObject = ThatOneGlobalObject.__index
thick karma
#

That is a useful trick to know

drifting stump
#

also you can access local variables from out of scope

#

dont remember if it was either not implemented in kahlua or not exposed

thick karma
#

Iirc trying to call debug functions from the Debug Console did not work

#

That is super cool though

#

That you can loop through all the locals like that

#

Is it file-limited?

#

like only the locals in that file?

#

Or all running locals?

#

It says any active function... not sure if that would let you redefine a local function in a file... Would the file itself count as an "active function" with its own locals? How does that play out?

drifting stump
#

with that one you can grab locals of a function

thick karma
#

That's what I was thinking but wasn't sure

drifting stump
#

with upvalues you can grab a bit more

thick karma
#

So anything declared deeper than foo() basically (in the example link)

drifting stump
#

you would require the closure object though

thick karma
#

Word.... well, maybe all locals can very very mysteriously be grabbed, haha. But, if so, it's so mysterious that the enormous majority of us do not know how to get to them

quasi kernel
#

Gotta fix 'Mo Crops icons not appearing correctly apparently tho

thick karma
#

Hey! Nice!

#

Glad you got it sorted!

quasi kernel
#

Thank you for guiding me!

#

Now to sort through a 4K+ line file

thick karma
#

No worries! Please do let me know when it goes live so I can go back to using your version instead of my local dupe. πŸ˜‰

quasi kernel
#

About to push the update

#

@thick karma Think it's done.

zinc pilot
#

spicy question

#

if I wanted to modify a public value inherited from another class, how should I use GetClassFieldVal?

gilded hawk
#

Can I use sendClientCommand and sendServerCommand when I'm in single player? πŸ€”

ancient grail
#

No @gilded hawk

#

Which is why there are checks
isClient()
How r u ? Its been a long time since you last posted here

gilded hawk
#

How are you doing?

ancient grail
#

All good man . Been trying out animation mods recently

gilded hawk
#

I noticed the flying skeleton gif you posted, cool stuff!

ancient grail
#

Still cant figure out what to do with the z axis problem
Maybe as soon as the player reaches that floor i should change his animation and teleport him above floor.. .. hmmm if only i can use xml to set a variable once the animation is complete
I was thinking of time action but its based on movment so thats another dead end

gilded hawk
thick karma
red tiger
#

Hey @gilded hawk

#

You using Lua for your experiments for PZ? =P

ancient grail
#

Imean the player is on the z0
It goes up but its just animation no code involve that makes him to on the 2nd flr if i tp him then he would look like his on the third floor if you can imagine

#

And if i just keep like this then i would have to turn noclip other wise he can passthru wall despite lookig like his above the wall

gilded hawk
red tiger
#

Hahah gotcha.

#

Hey, I'm working on a 1:1 Lua -> TS transpiler right now. That's my current project.

#

It's good to see you active again.

gilded hawk
red tiger
#

I won't be done with my transpiler until I can lift the over one-thousand Lua files in PZ to TS as a demonstration.

gilded hawk
#

Damn man, good luck!

red tiger
#
/* FILE: ./assets/media/lua/shared//ISBaseObject.lua */

import { setmetatable } from './lua_utils';

export let ISBaseObject: any = {};
ISBaseObject.Type = 'ISBaseObject';

ISBaseObject.initialise = function () {};

ISBaseObject.derive = function (type: any | null | null) {
    let o: any | null = {};
    setmetatable(o, this);
    this.__index = this;
    o.Type = type;
    return o;
};

ISBaseObject.new = function () {
    let o: any | null = {};
    setmetatable(o, this);
    this.__index = this;
    return o;
};
red tiger
fair dagger
#

can somebody help me understand why i keep crashing?

#

or is this the wrong chat

red tiger
ancient grail
#

is there a way to detect blind time of current player animation

drifting stump
#

will patch sendClientCommand and sendServerCommand to work in singleplayer

#

solution is actually quite simple

gilded hawk
#

Does sendClientCommand work if you are the host, hosting via the host button? πŸ€”

red tiger
#

PZ doesn't run SP as a simulated local MP server.

#

If PZ did simulate SP as local MP, I'd be for that for consistency.

nova socket
#

Hardcore question: Is there are a way to get a specific cell that was just loaded in on server?

Context: I need to get if some specific remote square in cell once its loading in by x,y,z and spawn a vehicle there. I'm trying to create a persistence vehicle by set coordinates and set mod data on it.

gilded hawk
# nova socket Hardcore question: Is there are a way to get a specific cell that was just loade...

Yes, here is an example

local function OnLoadGridSquare(square)
    if isClient() then
        return -- Must return on client!
    end

    if not square then
        return
    end

    local X = square:getX()
    local Y = square:getY()
    local Z = square:getZ()

    if SquaresInExplosion[Y] == nil then
        return
    end

    local explosionEffect = SquaresInExplosion[Y][X]
    if explosionEffect == nil then
        return
    end

    if square:getModData()[ModDataIgnoreKey] then
        return
    end

    BurnSquare(square, explosionEffect)

    -- Burn multi floor buildings
    local upperSquare = getCell():getGridSquare(X, Y, Z + 1);
    if upperSquare then
        BurnSquare(upperSquare, explosionEffect)
    end
end

Events.LoadGridsquare.Add(OnLoadGridSquare);
nova socket
#

Eh, well yes, I found event for squares. But checking each square on load is kinda yikes isn't it?

#

@gilded hawk

#

Any way to get some sort of array of current cells and scroll through them?

nova socket
#

getCell():getGridSquare(x,y,z) but that's for current cell that client is in right now.

gilded hawk
gilded hawk
drifting stump
drifting stump
nova socket
gilded hawk
gilded hawk
weary dock
#

yo guys what animations (and where to find em) uses EatType? i tried it with kettle but it didnt work. But when used context menu for pills it worked and i got pills anim.

acoustic dust
#

i made a smol addon that makes it so the school bag has 90 capacity and weight reduction of 100, but when ever i go over the original weight, i suddenly cant jog or Sprint and my aim move becomes really slow despite having nimble 5, why is that?

fast galleon
finite radish
sour island
#

You can/should do "if isServer()" to feed into a command or just do what you need directly

#

This is where shared comes in as you can feed into a shared function and do the check/switch over there

#

sendClientCommand(toServer)

#

sendServerCommand(toClient(s))

#

I'm pretty sure sendServer doesn't work in SP

acoustic dust
#

they said i should ask here..
would yall know where should i look if i want to increase/decrease a the amount of points a specific trait gives?

drifting stump
ember swallow
#

@acoustic dust F:\Games\SteamLibrary\steamapps\common\ProjectZomboid\media\lua\shared\NPCs\MainCreationMethods.lua line 119

bronze yoke
#

as far as the questions about it being actively maintained, i have no plans to stop fixing bugs for any of my mods but that one isn't a passion project so i don't promise more than that

drifting ore
#

how can i add spongies open jackets frame work to night scales rick grimes sheriff uniform

ancient grail
sour island
#

Hosting from the main menu creates two entities for a lack of terms

#

Host and connection

#

Other connections can be made

#

But it creates a peer to peer dealio

#

"dealio" is an industry term πŸ‘

#

I wonder if there's a delay between host and local connections though

ancient grail
#

There is

ember swallow
#

Just learned the hard way that a table made up of keys with nil values is empty and my thinking this through was so wrong πŸ˜‚ the pain when I figured it out

jaunty marten
#

lol

tame mulch
#

Ooooh. Fishes everywhere...

drifting ore
#

If i derive the timed action class and it's working without errors. do i actually still need conditions in my timed action for it to utilize maxTime?

#
require "TimedActions/ISBaseTimedAction"
NipActions = ISBaseTimedAction:derive("NipActions")
function NipActions:isValid()
    return true
end
function NipActions:update()
    -- no-op
end
function NipActions:waitToStart()
    -- no-op
end
function NipActions:start()
    -- no-op
end
function NipActions:stop()
    ISBaseTimedAction.stop(self)
end
function NipActions:perform()
  ISBaseTimedAction.perform(self);
end
local switchSpeed = SandboxVars.Nipswitch.Craftspeed
function NipActions:new(character)
    local o = {}
    setmetatable(o, self)
    self.__index = self
    o.character = character
    o.maxTime = switchSpeed -- set the maximum time for the action
    if o.character:isTimedActionInstant() then o.maxTime = 1; end
    return o
end
#

i have tried without sandbox car using 1000 and it didn't seem to actually do anything.. *forgot i was testing stuff. this is what it looks like though.

#

i'm trying to add this into OnCreate Recipe with no arguments except character, which it seems is the basic usage. but when i add this into my OnCreate, it doesn't seem to trigger the timed action

#

actually maybe... lol lets see

neon bronze
#

I mean you derive it from the base timed action which does t do anything + maybe look into o.character and what the TimedActionInstant is? I assume its a moddata var since i never used it for anything in a char

drifting ore
#

i'm under the assumption that the maxTime is implied as a part of the original usage and happens no matter what takes place in each of the functions

#

what that what actually takes place in each part of the timed action is dependent on where you are calling it

neon bronze
#

I mean you dont define switchspeed anywhere so unless your action is instant which i presume is meant with the isActionInstant() call your maxTime will be nil

drifting ore
#

local switchSpeed = SandboxVars.Nipswitch.Craftspeed

#

= 120

#

but even when it's 1000 and not switchspeed its still instant

#

but i am calling it in the recipe OnCreate also

neon bronze
#

Maybe thats the problem? It may override your action with the Crafting Action

drifting ore
#
require "NipTimedAction.lua"

function Recipe.OnCreate.Switch(items, result, player_num)
    NipActions:new(player_num)
end
#

it's part of the action

#

within th eprocess of crafdting this is called

neon bronze
#

Do you add it to the TimedActionQueue?

drifting ore
#

i assumed calling new did that as part of the usage

neon bronze
#

Nope

drifting ore
#
    return true
end
function NipActions:update()
    -- no-op
end
function NipActions:waitToStart()
neon bronze
#

You gonna have to add it yourself from the OnCreate

drifting ore
#

ahhhhhhhh

#

i see

#

i was using this previous and didnt work

#

ISTimedActionQueue.add(NipActions:new(player_num))

neon bronze
#

Also you dont need the .lua suffix in the require for your onCreate

drifting ore
#

ahh your right

#

do i need server/ ?

#

or just the file if it's in the same folder

neon bronze
#

The folder and the filename i say

drifting ore
#

i just named the deerived class NipTimedActions.lua

#

kk

neon bronze
#

Also about the player_num, is it an int?

drifting ore
#

yea 0

#

player instance

neon bronze
#

Well in that case you cant call :isActionInstant on it

drifting ore
#

well i dont want instant anyways

neon bronze
#

I mean thats why it cant initialise it

drifting ore
#

ohhh i see

#

okay so i been looking into it and i'm trying to fully understand what you are saying about the isActionInstant things

#

i dont really understand where that is called

#

i have a condition for it, but it's not actually called

bronze yoke
#

in your new() function:
if o.character:isTimedActionInstant() then o.maxTime = 1; end
o.character is a number, so it's attempting to index a non-indexable type, which makes it mad

neon bronze
#

Thats what i meant sorry

drifting ore
#

you are good i'm just figuring it all out so it isn't clear to me sometimes

bronze yoke
#

if you're trying to copy the usual timed action structure, you should just use getSpecificPlayer(player_num) and then pass that into new() - o.character usually refers to the actual character object, not the player number

drifting ore
#

ahhh okay.

neon bronze
#

or have it as an arg for your new() constructor

drifting ore
#
require "server/NipTimedAction"

function Recipe.OnCreate.Switch(items, result, player_num)
    local player = getSpecificPlayer(player_num)
    ISTimedActionQueue.add(NipActions:new(player))
end
#

like that?

#

do i actually need to manually add it like you were saying?

#

or can i just call my function straight up

bronze yoke
#

yeah something like that

drifting ore
#

NipActions:new

#

oh okay ill give it a whirl now

#

honestly i almost wrote off doing this but if i can figure out timed actions i will have a lot more flexibility

#

thank you also

#

i had one thing left which was this.. but now i can't help but try to make a context menu and submenus for changing the radius range of lightswitches πŸ˜„ then i SWEAR i'm done haha

#

gonna try a few more things again before i let it go yet again but damn this seems confusingh

#

TBH i literally just want to add the most basic timed action

#

dont want anything to happen whatsoever except it just add time into the recipe

#

i also just commented that line out for now

#
require "server/NipTimedAction"

function Recipe.OnCreate.Switch(items, result, player_num)
    --local player = getSpecificPlayer(player_num)
    ISTimedActionQueue.add(NipActions:new(player_num))
end
``` no error but doesn't fulfill maxTime
#

tbh doesn't even seem to trigger timedaction at all

#

but no error

#

the error i got earlier was using getspecificplayer

bronze yoke
#

maybe player_num isn't actually a player num think

neon bronze
#

Print player_num pls

drifting ore
#

kk

red tiger
#

@tame mulch Does the script format have an official name?

#

I'm currently writing an AST parser for it.

red tiger
#

Will publish on GitHub & npmjs

#

I'd hate to call it PZScript lol

#

SpiffoScript

tame mulch
red tiger
#

But for real, I can use a name for this format. I don't want to change it after publishing it.

#

=/

tame mulch
#

ZedScript?

red tiger
#

I wrote a tokenizer and am compiling it to an AST tokenizer right now, then exporting as uhhhhhhhhhhh JSON.

#

You want me to use 'ZedScript'? I can do that.

tame mulch
#

I don't know) I am not best with naming stuff)

red tiger
#

Ok. Not holding you responsible lol

#

If I'm going to publish tools for it, it's best to have a name.

#

Lol for stressed I did this in 1 1/2 hours. <3

#

The code implementation itself is in another file ATM.

#

We could do some kind of lexxer that sanity-checks (even strict mode), scripts to make sure they are using the right properties for object types like animation.

drifting ore
red tiger
#

@tame mulch I did say I was going to work with your stuff. I meant it. <3

#

I'll use ZedScript going forward unless told otherwise.

#

Thanks.

#

People here should use it too until an official name is mentioned.

#

=)

#

I think having a linter for ZedScript is a good idea.

red tiger
drifting ore
sleek hull
#

(Beginner to Lua)
I can't for the life of me figure out how to update the speed & lore of already existing zombies. As far as I've got:
getSandboxOptions():set("ZombieLore.Speed", 1);
only changes the speed of zombies that are spawned in after the line is executed, but pre-existing zombies are untouched.
How would I go about updating pre-existing zombies to the new desired speed?

ancient grail
#
Events.OnZombieUpdate.Add(function(zombie) 
if not zombie then return end
getSandboxOptions():set("ZombieLore.Speed", 1)
end))

--im just on mobile so my tabbing is ... Ugh what tabbing? Nvm
#

@sleek hull

#

Assuming that the snippet you just mentioned works
Then just use events to apply to zeds that are spawned

#

O wait nvm

#

Scratch that code

Its not gonna work

drifting ore
#

i feel like it would require a reasonable amount of code to do that. lol. can you update zombie without editing their data?

sleek hull
ancient grail
#

I have no idea
But your code is simply part of a clickable thing on the sandbox
And if you click that instead it will update everything

#

Might wana click it instead

glass basalt
#

need help making a model not gargantuan, not sure which channel would be suited best.
I have made the model script file, and set the scale to be super small, but it doesn't change the model at all. Might the issue be in the model itself, or the textures?
Will also post script file below

#

here is the file at the moment

sleek hull
drifting ore
#

there are mods like random zombies that do what you want. i'd really check that out tbh. there is quite a few others ones. but that is one i know works. i just havent ever looked at how πŸ˜„

sleek hull
ancient grail
#

Zombie modding is hard as fuq

glass basalt
gilded hawk
#

Is there a way to respawn all instances of an item? I need to run :DoParams on some items while the game is already loaded. And as other have mentioned, changed via DoParam require the item to respawn

glass basalt
bronze yoke
glass basalt
#

i guess I will check

bronze yoke
#

the format is weird and usually expects a comma on every line

glass basalt
#

....why does it work with the comma

#

I have edited hundreds of items and other things, why does it require a comma only for models

#

😭

bronze yoke
#

just always have commas, all kinds of things can break without them

glass basalt
#

now I have to go through all of my other mods just to add a comma at the end of each list

#

Thank you though. Helped me once again πŸ™

glossy helm
#

alright. I'm working on a infinite fish abundance mod and i thought i'd jump in here

drifting ore
#

i made this instead of context menu πŸ˜„

#

now to actually make it work lol

#

i love this for sure

red tiger
#

The syntax for script categories is wild.

#

πŸ€¦β€β™‚οΈ

#

Assumed all properties used =

#

aaaaaaaaaaa

#

recipes are crazy.

weak sierra
#

what's a good place to hook into for giving NEW CHARACTERS an item

#

e.g., only on spawn, not on load in, in mp

#

(or sp i guess, probably same deal)

bronze yoke
#

oncreateplayer, use moddata to ensure it hasn't happened already

weak sierra
#

i know in old PZ versions OnNewGame worked for this

#

but im not sure if that's SP-friendly-only

bronze yoke
#

that's not mp friendly

weak sierra
#

figured, tyu

red tiger
#

Hahahaha

#

So my rendered AST JSON for items_food.txt is 126,048 lines long.

#

I've mostly implemented an "Abstract Syntax Tree" for ZedScript.

red tiger
#

Oh.. An AIM emoticon.

#

I feel old.

#

Man.. I almost have the entire scripts folder for PZ parsed.

humble oriole
red tiger
#

:D

#

I would've posted this if I saw Udderly's post.

humble oriole
#

I've only spent about 30 seconds looking, but if anyone knows of a way to get the time since last death off the cuff, I'm looking Eyes

#

or maybe previous alive time?

bronze yoke
#

does onnewgame really work that way? that's crazy

#

maybe the reason mods still prefer to use oncreateplayer for a lot of one-time stuff is just to make it safe to add mid-save

red tiger
#

Oh shit.

drifting ore
red tiger
#

I just parsed the entire scripts lib.

red tiger
#

Working on the Lua transpiler to make that side just as pretty.

drifting ore
#

that's pretty detailed lol

#

will help clear up confusion on some things

red tiger
#

No but for real though.

#

I hand-copied over those event details from the wiki to the typings for the custom event listener API.

drifting ore
#

honestly i'd hype this hardcore even if i didn't use ts when finished

red tiger
#

It'll tell you what's provided and their types, which reflects the Java objects they pass and what you can access.

#

It's all referenced. =)

bronze yoke
#

in case it causes you a headache later on, you should know the wiki isn't perfectly accurate

#

most of it is good but some of the information they have on events is outdated, and some of it is just wrong

red tiger
#

Beats investigating 200 events manually.

#

heheh

#

This is why I don't shut up about PipeWrench. It'll save you so much time figuring things out.

drifting ore
#

can i ask why the naming conventions are changed so much?

#

is it because of the language itself used?

#

obv i am only noticing little things but i'm assuming you wrote it all

#

i dont know ts btw

#

att all

red tiger
drifting ore
#

oh i suppose lol

red tiger
#

I wrote the transpiler that generates it.

drifting ore
#

oh I gotcha lol myb good sir

red tiger
#

Not offended. lol

#

I'm glad I didn't write that manually.

drifting ore
#

yea looking forward to it.

red tiger
#

I mean.. you can already use it. Others do. My 2nd Lua transpiler will make things so much better.

drifting ore
#

for now looking forward to assigning values to this slider thing and seeing if it's possible to add colors to it.

#

to be honest... i'm extremely new to this all

red tiger
#

I won't push it on you.

drifting ore
#

i start writing my first line of code around 1.5 months ago

#

πŸ˜„

red tiger
#

I push it as info to modders that need a guide or want to avoid Lua mostly.

drifting ore
#

you are all good. I appreciate it also.

red tiger
#

I'm an oldhat in PZ modding (10ish years now), however newer kids on the block need help.

drifting ore
#

i like it for what it is, not even counting being able to use TS. my goal was to really focus on one language until it makes enough sense to where others start to naturally make more sense

#

even that said i'm still going to check this out for the docs lol

#

single pane window kinda person if i can be

red tiger
#

I haven't written messy code like this in so long...

#

My ZedScript AST parser works though.

#

Will clean it when I have time.

drifting ore
#

making UI stuff is actually kinda entertaining

red tiger
red tiger
#

I will need to clean it.

#

This is what my test code looks like after 6 hours of work lol.

#

This is what it generates.

drifting ore
#

lol i got a panel, a slider, and a button that does nothing and a button that closes it. i'm good on that for now πŸ˜„ just need to assign values to the slider somehow and assign a function that sets the lightradius of the light and i hope thats it LOL

#

once i learned how easy it is to derive classes though

#

so many things started making sense

red tiger
#

@tame mulch I have a working AST parser for ZedScript. It can be improved on to cater more specifically for certain structs. Up to if I have time to improve on it. https://github.com/asledgehammer/ZedScriptParser

So this is implementing an AST-approach for abstract expressions and statements to detail what's going on. This isn't the JSON I want as a result. This serves as a way to handle what's going on with the script's contents to make things like the JSON parser I want.

I can cleanup the tech-code in the repo right now and make it into a OOP library that can then be used to make the app I mentioned wanting to make.

red tiger
quasi widget
#

Does the figure 0.05 in zombie loots table mean 5%?

drifting ore
#

i'll say this. load up in debug after you choose the number.. pull up the debug menu and goto cheat. towards the bottom check the lootzed box

#

go up to your intended container spawn and up in the inv you can right click the container and open lootzed. you should be able to find your item and the %

#

you can kinda go from there

#

round 2

#

so many failsafes to prevent people somehow abusing this after walking away from the switch lol...

ancient grail
#

Should i redo this what? Its a water pump

jaunty marten
#

looks fine

#

me too need pump for my mod, sadly found nothing on google images so my mod won't have pump twitch_omegaLul

drifting ore
tardy wren
#

Is there any way to make the game detect that my sandbox options are no longer... valid? I had to change some stuff around in a mod, change the separator in my string, and I want the game to not load the bad options at all...

pulsar heath
#

in theory you could compare the actual applied sandbox settings with the settings from another "preset" or file

jovial harness
#

Good morning guys. Question: how can I save item ModDatas to the server? transmitModData() is for objects and I didn't find anything similar to it for items. I'm thinking that maybe I should use the InventoryItem.save function, but I have no idea how to call it

thick karma
#

Because I know for a fact it still works and I prefer using it, but if it will soon no longer work I would like to know...

fast galleon
#

also zomboid-javadoc has 41.78 docs, use more current version for your modding πŸ™‚

thick karma
#

@fast galleon I do, but before 78 was being passed around other links allowed me to see Keyboard, so I was asking explicitly why I could no longer see it because I cannot see it in the 41.78 docs that I am using. πŸ˜‰

#

That's fair enough though. I figured they intentionally included Keyboard in the past because it's useful to Zomboid modding.

#

For the sake of consistency

#

Rather than everyone coming up with their own special butterfly way of naming a big set of constants that already has names.

ancient grail
fast galleon
thick karma
#

Ohhhhh so 41.78 doc is NOT the latest TIS doc?

#

Oh I seeeeeee

#

I DO misunderstand.

#

So someone in the community makes this other doc including various Java classes we can use in Zomboid that are not written by TIS?

#

The one with 41.65 / 41.78 in the URL?

agile lily
#

Howdy fellas, this might seem like an odd request or thing to ask but - anyone need help with model creation?? I’m working with some people on a mod for PZ but progress has been slow lately and I feel I’ve made a lot of what can be done at the moment. I also just want a reason to push myself so I can keep learning blender and improve, hopefully learn more about modding in the process as well. I don’t really have any preferences on what we should make, just as long as it’s fun and not something that will get abandoned, maturity is a must as well. You can shoot me a message if you’d fancy checking out some of my current models. You can respond with your clown emojis now 🀑

nova socket
#

Can you /addvehicle into cell that is currently unloaded I wonder.

fast galleon
red tiger
#

Good morning.

nova socket
vivid linden
#

Can anyone help me understand how to add new spawn regions? I understand the coordinate system but I need to figure out how to actually set it up and modify it

rancid panther
#

you can probably just look at a spawn point mod and do the same thing

#

try looking at one that adds less spawn points rather than more

red tiger
#

@jaunty marten You see my mini-project yesterday? =3

#

Also it's hard to @ you without a Russian keyboard lol.

rancid panther
vivid linden
#

think im figuring it out, im cloning the vanilla files and then adding them to the master list. it at least shows up in the game as a region now but not tested yet. ima be in a vc streaming if anyone curious. I dont want a mod as I am just adding a set few locations to choose from. The other challenge is seeing if this translates over to clients

rancid panther
#

yeah i know but if u look at a mod's code u can see how they did it

#

especially since spawn point mods are pretty common, they all do it pretty much the same way

rough venture
#

Holaaaa

jaunty marten
jaunty marten
red tiger
jaunty marten
#

can't do set nick only here, it's blocked by server unhappy

red tiger
jaunty marten
red tiger
#

Here's one of the files parsed.

jaunty marten
jaunty marten
red tiger
#

It's too long to paste in Discord.

jaunty marten
#

will check when will come to home

thick karma
#

Cleaning up the hideous positioning of Host menu and making it so we can see absurdly named server names for Wookiee Server Options (expanded / improved successor to Legible Mods):

#

(on every font size, not just on default)

#

Gamepad players will now be able to quickly remove mods with a button:

#

Everyone will be able to add / remove workshop item / mods up to 20 at a time using accelerator shortcuts (L2/R2 or L Control/L Shift)

#

Adding a mod will also select the next mod if possible, instead of the same one, to enable easier spam adding especially for gamepad.

agile lily
#

Doing the lords work

#

I didn’t even know people actually play this game with controllers to be fair spiffo

#

Would anyone know if it’s possible to implement custom shaders that affect the main viewport of the game? Think effects such as blur, desaturation and so on. Been doing some searching on the subject matter and so far it seems you can’t interact with the shaders through lua. Anyone else have a different experience?

thick karma
thick karma
#

Other things can be done with gif overlays or perhaps light sources that follow the player.

#

Beyond that, idk.

agile lily
#

Yeah! I’ll definitely check out the blind trait one! I know that you can create overlays that are images drawn over your screen, but that seems a bit limited. But maybe it’ll be nice if combined with the investigation blur. Just want to make being drunk a little more immersive :x

sour island
#

Combat is a lot smoother with controllers

#

But the inventory is rough πŸ˜…

#

I hope context menus can be a thing of the past eventually

#

I wonder if it would be difficult to make a dynamic radial menu rather than context

glass basalt
pulsar heath
#

@sour island im cleaning up the twitch integration lib and adding some functions to it, if you have any idea of things to add now is the time πŸ™‚

#

and anyone else who might want something supported by the lib

#

also need to make the documentation for it...

sour island
#

Do you have user messages coming through as Say?

quasi kernel
#

Translations for sandbox options are with the rest of translations.

#

Actual indexing of sandbox options is something like SandboxVars.ModName.OptionName

glass basalt
quasi kernel
#

The values stored? Like as in a drop-down?

glass basalt
#

As in "player chooses 2-6 months" therefore I will choose a random value between those two points

pulsar heath
sour island
#

Yes, I always thought it was a waste of potential sub messages didn't go through as Say in game

Especially with Q-Shout being a thing.

quasi kernel
#

Yeah the defaults should be handled by options.txt

#

I haven't done a drop-down yet I don't think but I imagine that's probably done via options.txt as well.

pulsar heath
#

hmmm

#

thats easy to add

glass basalt
#

If you know, that is

pulsar heath
#

the json string has a limit of around 2 mb

quasi kernel
glass basalt
#

Yes

pulsar heath
#

i can just use a custom field for it, one i have just called data

#

or make a field in the json for it

quasi kernel
#

I believe theres string splitter methods where you can set the "split" character.

sour island
#

Also, @pulsar heath, the current version of EHE on GitHub has changes made to make it work server-sided. I might push it through just to fix the MP issues. Still debating if it should cook a whole lot more for other features.

quasi kernel
#

I don't remember exactly how to do it, Udderly gave me a function for it and I just ran with it to the races, but y'know.

pulsar heath
#

you managed to solve the stale zombies issue?

sour island
#

Yes, the server didn't like the way I was killing zombies

#

The update isn't on workshop yet

glass basalt
sour island
#

But I figured you should know it may screw up what you have.

pulsar heath
#

so add a say message to events such as sub as well to the lib

#

its done

#

πŸ™‚

#

anything else?

sour island
#

I don't stream, so I wouldn't have any ideas lol

#

I assume you have the usual gifts?

pulsar heath
#

yup

sour island
#

What about injuries? πŸ€”

#

Or tripping

pulsar heath
#

hmmm havent add those yet

sour island
#

If you could make it so others could easily tap into your system it can scale with sub-mods

#

I can guess there's an idea that no one has thought of yet

pulsar heath
#

thats why im cleaning the code...

#

the json string generation was static

#

so im making it dynamic

#

so it can be used with other mods apart from mine

sour island
#

So one could provide a Lua function similar to how recipes work?

pulsar heath
#

that way you can define your own syntax

#

yeah a bit like that

sour island
#

Neat

#

Added bonus is it's less overhead for you

pulsar heath
#

yup dont need to explain how it works... you can just make it work the way you want

#

as long as it doesnt pass the 2mb limit

#

but 2mb is a lot for json string

#

so i think that wont be an issue

sour island
#

So you could pass the function name and arguments as needed

pulsar heath
#

yup

sour island
#

Nice πŸ‘

pulsar heath
#

thats the idea

sour island
#

Are you using unpack()?

pulsar heath
#

nop

sour island
#

How are the arguments being fed into the function?

pulsar heath
#

there are some rules in the json creation to make sure all the values are correctly fed

#

as in action, args, etc

red tiger
sour island
#

So it can only take specific types and order?

pulsar heath
#

the only static order is that the 1st field has to be the function name

#

from that point on everything it treated as args

sour island
#

Is there a limit to how many?

red tiger
#

=(

pulsar heath
#

one function per string

#

at least for now

#

but that doesnt mean you cant add more

#

its up to the mod to deserialize the string and grab the values

sour island
pulsar heath
#

so you can add as many as you want

sour island
#

Ah, so the framework just tosses the modder the string and says "there you go, make use of it" πŸ˜…

pulsar heath
#

yup

#

tried to make a standart json string but that will limit a lot of things and its best to leave it simple

#

the app serializes whatever you send it from twitch

sour island
#

Yeah, even if you did use unpack it would be on them to account for argument types and safety checks anyway

pulsar heath
#

then the mod will grab whatever it needs

#

the only thing the app will do is to follow the syntax you set on the config

#

so you cant define your own json string fields

sour island
#

Sounds pretty solid

pulsar heath
#

then since youre the one who made the syntax

#

its up to your mod to make use of it

#

i havent done the gui yet so i cant show you a screenshot...

sour island
#

So you just have a twitch event pass the configured string over

pulsar heath
#

but by the end of the day i will have a "placeholder gui"

#

yup, then the user grabs the values from the event sent by twitch and defines in the app what to send to the mod

#

where he can define what function to call with what args

sour island
#

Hmm, I think it's pretty straight forward

pulsar heath
#

so he can do a general json string to send for all rewards

#

and customize some of them without having to configure them all

#

a standard behavior and a custom one

#

or several custom on top of the standard... its up to the modder to do whatever he wants the way he wants

sour island
#

I think a lot of streamers will like this

pulsar heath
#

he can even simulate something like a "hype train"

#

so if a user buys lets say 5 consecutive zombie or whatever events

sour island
#

A few people didn't want to deal with the touch portal

pulsar heath
#

the 6th can have a custom behavior as a bobus

#

touch portal is very good... but not very user friendly

sour island
#

Yeah, plus there was an issue of accidentally hitting those keys

#

Or the fact you may need those keys for other things

red tiger
#

I still want to know what data yall are talking about.

#

=(

sour island
#

Oh, he's working on a twitch integration app

red tiger
#

Oh he's discussing his app ok.

#

M3ss, at least your JSON isn't 100K+ lines. xD

pulsar heath
#

nop its not i only set the 2mb limit on a whim

#

i doubt anyone will use more that 20k and im already fattening it up

red tiger
#

AST JSON can get very massive.

pulsar heath
#

well if we are talking about json for something complex... yeah it can get quite big

red tiger
#

Hahahah yeah.

pulsar heath
#

but in this case and use scenario... i doubt anyone will need more than 20k ( at most half of that is more than enough )

#

so 2mb is my way of saying... here... have fun

#

πŸ˜„

red tiger
#

Are you sending Lua code to execute in the game from Twitch Integration?

pulsar heath
#

experimenting with it

#

atm it only send the function name and the args

red tiger
#
loadstring('print("Hello, World!")')()
pulsar heath
#

i dont want to make a mod framework... just a twitch framework

#

πŸ˜›

#

and testing it with youtube as well

red tiger
#

I think this would save you the grief.

#

If you need to execute a function, you might as well forward code strings.

#

(My opinion)

#

Otherwise it's fun to watch you develop this app.

#

(Especially since I made my own in a way)

pulsar heath
#

its fun to develop it

#

thats why im doing it πŸ˜„

red tiger
pulsar heath
#

i could just use keypresses like any other mod

#

and be done with it

#

use this app here for the mod to work

#

and that would be it

#

but at the same time im making my own twitch, steam, discord, youtube and rcon lib

#

so... fun and useful... at least for me

#

the only bit thats not fun... is making the gui...

red tiger
#

You might have caught the same bug I have a long time ago where you want to make tools... endlessly...

#

.. forever..

pulsar heath
#

yeah but thats a normal bug to have if you enjoy coding

red tiger
#

Depends on how big the tools are.

pulsar heath
#

plus... if i have this lib with this amount of useful stuff in it

red tiger
#

Most people write small tools.

pulsar heath
#

that means that in the future i will not need to worry about making them, just improving or updating

#

i have a dll i started making in 2003...

#

another one from 2005

red tiger
#

Hahah no way.

#

I started modding games in 03.

pulsar heath
#

and i still use both... the older one is only file manipulation and related stuff

#

the second one was when i started messing around with REST

#

i enjoy making tools but i dont enjoy making the same thing all over and over again

#

so... it keeps growing...

red tiger
#

I enjoy challenging projects for very complex, abstract solutions.

#

Building things that haven't been made yet.

pulsar heath
#

in my case it depends... if i need something... its already done but i dont agree with something in it ill just make my own the way i want it to be

#

there already a big project called twitchlib in c#

#

but... its... bloated as hell