#mod_development

1 messages Β· Page 385 of 1

buoyant violet
#

I am basically recycling my hot brass code

strange mauve
#

thats doable, if you use the teleport method,

you can add a check when they hit a wall they get teleported the other way or somethign like that

blissful seal
#

said reference

  int bufferSize = 32768;                              // start at 32KB                                                                       while (true) {                                                                                                                                  try {                                                                                                                                           ByteBuffer sliceBuffer4NetworkPlayer = ByteBuffer.allocate(bufferSize);
          player.save(sliceBuffer4NetworkPlayer);
          // ... copy bytes, break
      } catch (BufferOverflowException var6) {
          if (bufferSize >= 1048576) {                 // cap at 1MB
              DebugType.General.printException(var6, LogSeverity.Error);
              break;
          }
          bufferSize += 32768;                         // grow by 32KB
      }
  }
buoyant violet
#

maybe I could see into see teleport for hot brass

#

idk how to write holy ass

#

**maybe I could see into implementing something like that into hot brass

bright fog
#

Interesting yea I remember smthg about thag a few months back

#

Maybe it's my time to get back to my raytracing framework lol

blissful seal
#

projectile bouncing is raycast/raytracing city

bright fog
#

Yea I had already such a framework in lib but I wanted to streamline it a bit and improve it

#

Also I am convinced it's possibly to retrieve the 3D geometry of tiles from their tile depth

blissful seal
#

O_e

#

brain hurt

bright fog
#

Of course it's not perfect but people tend to do a good job in doing these and they are accurate

bright fog
blissful seal
#

nope, teach me or gimme a link that will teach me!

bright fog
#

And it gives a "depth" to the tile by faking it

blissful seal
#

ooooh

#

so these depths encode the 3d surface shape and you derive the geometry from that

#

really clever

buoyant violet
manic forum
#

does any1 what the alternative is for getPlayer():getbodyDamage():getInfectionLevel() in unstable 42 ?

knotty stone
buoyant violet
#

I have seen that in the past

#

but

#

a granade acting like a mortar is weird haha

#

this is using my hot brass code adapted

upbeat turtle
buoyant violet
#

and you cna have grenades with fuse or impacts

upbeat turtle
mellow frigate
buoyant violet
#

its meant to go along with the frameworok underbarrel

upbeat turtle
#

absolute cinema

buoyant violet
#

I do need to put a little effect for explosion

#

it looks weird without it

upbeat turtle
#

i've wanted to try adding custom explosion vfx for a while now

#

thinking about using the shader system and having it be a .frag file

#

i may or may not use it in this project i'm working on rn. just have 100 other things to finish first before i can get to the icing on the cake stuff πŸ˜‚

bronze yoke
#

what do you need the shader for?

buoyant violet
buoyant violet
#

imma look at it

mellow frigate
#

Also breaking windows, bothering animals πŸ˜‰

buoyant violet
#

I adapted my stupid casings code for it

buoyant violet
#

but to be honest

#

imma stop for today hahaha

#

actually

#

its the real test time

#

MP

upbeat turtle
#

mp is the final frontier

#

using truemodelz to add custom zed types with their own models. these are naturally-spawned zeds with the model added as a test steamhappy

#

the weird looking colors are because the model wasn't built for zomboid 2d clothing lol
(gonna use xmls to make them spawn without vanilla clothes)

#

these are going towards probably what's gonna be my biggest project to date. hella excited to see when its finished πŸ˜†

#

early test of the vision rework im cooking up catdance

blissful seal
#

yall are so sick 😭 thats dope af

alpine swan
#

I want to profile my mod's performance a bit. Is there a way to get higher resolution timing information than milliseconds?

alpine swan
#

Figured it out. GameTime.getServerTime() is System.nanoTime() as long as you call setServerTimeShift first.

strange mauve
elder tiger
#

quick question about zombie health in MP..

i’m trying to give certain zombies (by outfit) really high HP (like 10000) for a hit counter system

but I’m running into this issue:

  • f I setHealth on client β†’ works at first (shows 10000), but after a few seconds zombie just dies anyway.
  • if I move it to server β†’ debug still shows ~1.00 HP and zombie dies fast.

feels like it’s getting overridden or not synced properly

any idea what’s the proper way to handle custom zombie health in multiplayer?

silent zealot
#

Have you tried setting it on both?

#

Also, make sure your code is actually triggering; you can't access outfit information when a zombie is created, you need to delay and check on later ticks. Otherwise you get old information from the last time that zombie ID was used, before it has chosen and applied a new outfit properly

#

This may also depend on the zombie being visible to the player too, just for fun.

elder tiger
# silent zealot Have you tried setting it on both?

Thank you for answering, and after I put in both of the health logics.. when I spawn a zombie with an outfit that I set its health to 10255.

my debug scan system tells me that this zombie does have 10255 health, but when I hit it once. the zombie's health suddenly becomes 50.0

and not long after that the zombie dies without me even hitting it a second time

silent zealot
#

Does the same thing happen in single player?

elder tiger
#

I'm looking for a way to get it to work in multiplayer as well πŸ₯²

silent zealot
#

just checking, if it didn;t work single player that would be the palce to troubleshoot.

#

I wonder if this is one of the places where the multiplayer pushed stuff to java but left half-functional lua stubs to confuse modders.

elder tiger
silent zealot
#

Just make it a single player only mod and change that if you figure it out later

buoyant violet
#

kek_hehe time to test the new system

fleet bridge
buoyant violet
thorny jackal
#

I'm thinking of learning to mod and wanna start by editing certain tiles, namely just a garbage can for starters. Would that fall under image editing, modeling, or mapping in the modding guide wiki page?

buoyant violet
#

still WIP but soon! β„’

silent zealot
#

Adding new graphics for a new type of garbage bin making sprites and putting them into tilesheets, then defining the object. And unless you want to only spawn it by hand/via lua, you probably want to make a map that includes it. Basically, it's a one-object tileset.

#

If you want to make garbage cans spawn raccoons when you look in them, that's something you'd do as a lua mod.

thorny jackal
#

My change I wanted to make is just do some editing and make them cubic and visually take up the tile to match their collision hitboxes

silent zealot
#

I'm not sure how easy it is to replace something in an existing tileset, but hopefully some other people will know.

thorny jackal
#

Ah, thanks anyway

buoyant violet
#

still fixing some stuff

#

but soon "tm"

strange mauve
buoyant violet
strange mauve
buoyant violet
#

oh, I am doing nothing

#

its just. they enter it

strange mauve
#

WHAT

buoyant violet
#

yeah

#

when they die they ragdoll

strange mauve
#

i had to simulate it by teleporting zombies and the players quickly from the center of the blast 😭

shy mantle
buoyant violet
#

I think that may be it

buoyant violet
#

my explosions use the similar pipebomb explosion

shy mantle
#

You could spawn in a pipe bomb if it's not gun fire triggering the ragodoll

strange mauve
#

without it they just get knocked down

shy mantle
buoyant violet
#

it do be do

#

YOOOOOOOOOOOOOO

#

hahahahha

#

man ragdolls are so funny

shy mantle
#

Imagine getting car bombed in the apocalypse

buoyant violet
#

amazing

shy mantle
buoyant violet
#

wish we kinda had a physics engine

#

so I dont have to simulate every single things jaques_beaver

shy mantle
#

Yeah

buoyant violet
#

like my casigns in hot brass and grenades in the framework are all visual tricks

strange mauve
#

sometimes visual deception can be better

shy mantle
#

Exactly, everything is a visual trick with PZ physics, it's really testing the brainpower

shy mantle
lusty drift
lusty drift
#

and then part of those ladder mods

#

for making you appear above?

#

not literally but similar to it imo

shy mantle
lusty drift
#

right makes sense

lusty drift
#

thats kinda cool

#

me when PZD

#

project zomboid dead βœ…

#

twd ❌

#

now all we need is the knox files

shy mantle
lusty drift
#

ah makes sense

#

not sure how the ladder mods do it neither

#

but i assume its a similar principle

shy mantle
#

Yeah, my only unique issue I'd say is being in a vehicle hitbox turns your character all black, so between the animation and the tp there's that flicker

#

I also need to define the size of each vehicle roof individually

lusty drift
#

dang

#

surely you could allow mod devs/other users to predefine stuff no? like a compatability patch

#

that way for modded vehicles you dont need to diy it

#

your self

shy mantle
lusty drift
#

igu

#

i mean in the future

#

just so youre not slaving away

shy mantle
#

Sure, I've thought about it

lusty drift
#

lol

#

ok good

#

at least youre not trying to slave away haha

shy mantle
#

I'm literally waiting for TIS to fix some pretty game breaking stuff for this mod in MP, so

#

In the vanilla game, you can get hit by a car that's above or below you, so that's fun

#

Z level doesn't matter, you could be on the moon

strange mauve
silent zealot
#

Just a few functions you can call to shove vehicles around a bit

buoyant violet
vast pier
silent zealot
#

A gun that shoots cars?

#

(I did actually look into that for five minutes to see if it would be an interesting way to spawn a projectile and yeet it at zombies)

#

(I should probably have another look, might actually be viable now. But probably still stupid and impractical)

lusty drift
#

but zombies

lusty drift
#

probably alot

#

i doubtful theres any easy way to implement guns for cars

silent zealot
#

I think some modded vehicles have mounted guns, but I've never looked into how they work/how well they work

azure oriole
#

Would anyone like to help me out making a multiplayer fishing competition mod?

halcyon river
#

how do people get custom models for their mods? Do they commission them if they can't make models, is the art 2d only ect. I am a software engineer for the last 10 years but I know art is not my place πŸ˜‚

thin swan
halcyon river
#

got it thank you πŸ™‚

thin swan
#

It's a collaborative community for sure, so just ask around and see if someone wants to team up, if you can code and someone can model, you have a good team to make cool stuff

halcyon river
#

i know this is ungodly levels of overdone, but making scp mod #100000 rn

#

I have the mechanics for 7 scps completed with stick figure and line drawing placeholders lol

vivid imp
glass osprey
sour island
#

Creepy pastas with heavy sci-fi themes

#

There's a whole community of creative writers who make them up and build off each other's lore

#

Some of them have surreal humor too

bronze yoke
#

i think they meant which scps

buoyant violet
strange mauve
#

are you going to add knockback?

bright fog
#

I mean ... he could ragdoll the zombies if he doesn't already do that

buoyant violet
#

I just want to ragdolls the zombues yeah

#

this is in MP so you wont see them ragdoll

strange mauve
#

You could technically simulate ragdolls tho

strange mauve
#

idk what that's supposed to mean 😭

buoyant violet
#

this grenades thing became a rabbit whole enough heh

#

I think I will not try to mingle with so many systems to ensure compatibility

#

since its part of the framework

strange mauve
#

ofc, it's your mod

this is how i "ragdolled" them

#

or more of a knockback ig

buoyant violet
strange mauve
#

Multiplayer supports teleporting right?

buoyant violet
#

This is my answer

sour island
#

As far as I know it does

#

Idk if anyone is actually using the newest last stand 😩

strange mauve
buoyant violet
#

And if we put it in the framework your name will be there

#

Random question

#

Tekeport works with world items?

strange mauve
#

mb i was making grits,

wdym?

#

@buoyant violet

#

Explosive Zombies | Test
is the name on the workshop, no credit is needed

#

if you're asking if you can get the zombies to move after an item explodes or whatever, yes it will 100% work

buoyant violet
#

The way I do visual casings in hot brass is by spawning ans removing a worlditem

#

So if I have a more efficient way I will update my code

strange mauve
buoyant violet
#

Haha but I guess I have to see how I can use teleport for world items

strange mauve
#

are you talking about walls and sprites?

buoyant violet
#

It's ny questions so I can optimize Hot Brass

#

No no

#

How to move an item

strange mauve
#

for what?

#

the grenade itself?

#

mb im so lost lmao

buoyant violet
#

I already have a mod that simulated casing ejection

#

Im using the same method for my grenades

#

Wonder I can update my logic to use teleport

strange mauve
#

are the casings physical objects?

buoyant violet
#

Yes

vast pier
#

How

strange mauve
# buoyant violet Yes

probably not, i think you can only teleport players and zombies, not props or items

but for your grenade framework, my teleport method is all yours

buoyant violet
#

It works but sometimes may be heavy for servers

strange mauve
buoyant violet
strange mauve
#

oh i can send Luas in here?

buoyant violet
#

Yeha

#

Just put them in and end with

#

Dammit

#

Put 3 of `

#

Its MD basically

strange mauve
#

in the lua or the discord message

#

oh you dont need the ,,, just copy and paste it lol

buoyant violet
#

Also that

upbeat turtle
#

this just came to me, but what if you used a png for the grenade and used that as the β€˜projectile’? πŸ€”

#

i remember tcherno posted a mod the other day which does that. ik ATRO also does something along those lines

upbeat turtle
#

could use maths from there for the projectile logic steamhappy

buoyant violet
vast pier
buoyant violet
buoyant violet
#

But that mortar like arc seems weird to me haha

vast pier
#

Can you trigger a recipe to start through lua?
Functions as normal recipe, and attempts to activate when called by lua ?

#

And I don't mean imitate a recipe through a timed action, I mean trigger a recipe call

glass osprey
silent zealot
#

ISCraftAction

#

That gets called by the inventory GUI and presumably by the context menu when it has a recipe in it, but I don't see any reason you could not make a new action of that type in your own code.

shy mantle
#

Quick question, is there a way to tell if a vehicle is vanilla or do I need to make my own list?

silent zealot
#

It would be easy to make a list of vanilla vehicles, but keep in mind there are mods that overwrite those. Which may or may not matter to you, depending on why you need the list.

frank lintel
#

isnt there some kind of pathing you can check to make sure that isnt the case?

silent zealot
#

I'm not sure. There is for items since in debug mode tooltips show which mod it comes from, though I don't know where that gets stored. I'm not aware of anything similar for vehicles though. Which doesn't mean it doesn't exist, just that I can't think of anywhere that it gets displayed so it might not be tracked.

#

And also the trick of "go to where it gets displayed, find where it gets the info" won't help.

frank lintel
#

oh I was thinking in code wise should be a way if you got the list of vanilla vic names trace it to its source make sure its not getting redirected to a modded one as in like that idea

silent zealot
#

No getModID() for vehicle or vehiclescripts. πŸ™

#

Maybe getFileName() on the VehicleScript will indicate the path including the mod.

willow tulip
#

@fleet bridge that code makes me angry, sending floats as shorts without normalization to the zombies actual max health -_-;

#

also don't zombies already have more then 32 health? I through a tough zombie was like 150?

#

(or is it actually like 1.5 health?)

#

Honestly, just send as float16 -_-;

#

It provides 3-4 decimal digits of precision and a range up to Β±65,504

#

(or just regular floats)

willow tulip
#
for key,value in pairs(_item:getModData()) do
    obj:getModData()[key] = value
    if (string.find(key, "customContainerName") ~= nil) then
        if (value ~= nil and value ~= '') then
            obj:setName(value);
        end
    end
end
#

what on earth....

#

that is like.. the most painful way to do

if _item:getModData().customContainerName then
  obj:setName(_item:getModData().customContainerName)
end
#

(Maybe with an and _item:getModData().customContainerName ~= '' if you want to be exactly the same..)

upbeat turtle
fleet bridge
willow tulip
#

(prob because like 1~4hp just sounds dumb compared to most games lol)

fleet bridge
#

But combat manager inflates damage

#

I'm pretty sure they can afford to lose one decimal place

willow tulip
#

(or again.. float16 exists.. and so does just sending floats)

#

such a weird microoptimization to just cast it to short16 with a /1000 lol

#

Like if your gonna send it as a short, do / maxHP * 0xffff

#

100% precision

willow tulip
#

Client really doesn't need to know much about zombie HP in vanilla because its honestly just not exposed to the user at all in any meaningful way besides 'alive/dead'

buoyant violet
silent zealot
#

I'm sure reducing save size by 2 bytes per battery was a great use of optimization effort.

blissful seal
# willow tulip Like if your gonna send it as a short, do `/ maxHP * 0xffff`

actuallyy......float16 (half-precision,+/- 65504 range, 3-4 decimal digits) would actually be worse for this use case β€” it has less precision in the 1.0–4.0 range than the current Γ—1000-to-short scheme. Regular float32 would be the clean solution but costs 2 extra bytes per zombie per packet.

#

the battery/propane thing was just a bad antipattern thing

willow tulip
willow tulip
#

so its like... a whole 1 extra kbyte/second worst case to just use floats here like a normal person would. -_-;

#

... when the slowest person online is currently rocking 125kbyte/second internet upload (and generally 10x that in download)

blissful seal
#

you not wrong, i think i also agree in the sense that its kinda unintuitive for modders

#

that more than anything is probably a relic of the game being old af

willow tulip
#

plus again, if there is a maxHP variable somewhere (How'd you set the HP without one?), you'd think they could just scale the packet based on that.

#

and use the full short range effectively.

blissful seal
#

yeah, hardcoding is no good

willow tulip
#

Especially in a sandbox game with 9 pages of sandbox options

#

Like of course someones going to eventually make a mod that breaks your limits and for good reason.

blissful seal
#

it reads to me like less of a super intentional choice, and more of tech debt that has settled and they havent needed to fix

willow tulip
#

Yep

#

'good enough' at the time

blissful seal
#

i just ran into this with the MP Player ModData save buffer

#

it was hard coded to 64kb i think until the recent security patches

#

only on MP, but SP had a dynamic moddata buffer

willow tulip
#

Kinda weird that they even have floating point HP when many games are more.. integral about that kinda stuff (or at least what they expose to the player.. most combat mods scale it to like the 100 range too)

willow tulip
#

Worse, every time you craft something.. it records that to that playerData.

blissful seal
#

no it was increaed to 1MB

#

i proved it

willow tulip
#

Ah k. I heard it was increased to 128k and was like "... BUT WHY, thats just pushing it down the road ever so slightly."

#

1MB is a bit more reasonable if people are hitting 64k limit

blissful seal
#

yes, this was after i spent a day optimizing my mods moddata budget

willow tulip
#

Especially considering modern computers, 1MB is literally rounded out of your free space display lol

blissful seal
#

i made it functionally impossible to overflow with my mod now tho πŸ‘

willow tulip
#

nice

blissful seal
#

what pissed me off there was SP already grew the buffer dynamically, it was only for MP

willow tulip
#

Apparently people where hitting that limit just crafting stuff on modded RP servers

#

and then your character just.. never saves again!

blissful seal
#

yeah and most mods dont think about their moddata budget, and considering it was only 64k

#

there are mods i found which monotonically increase your modData forever πŸ™‚ as long as u keep playing lol

willow tulip
#

'64kbyte outta be enough for anybody' - last spoken by bill gates, and proved incredibly wrong, over and over and over again

blissful seal
#

🀣 exactly

#

going back to your point about floating point health valuse -- all of PZ is floats ticking fractionally per frame, and tehy just put discrete events on top

#

its actually a really really epic simulation concept, but it bleeds into everything, and isnt obvious on the surface

#

all of the systems are simulated by big arrays of floats and noise

willow tulip
#

-_-;

willow tulip
buoyant violet
knotty stone
#

Thats a real man right there almost 0 recoil on the body with an lmg πŸ˜‚

#

But still good job you are doing with all your animation stuff πŸ™‚

blissful seal
#

I wrote a Kahlua Test Harness, that loads the actual Lua VM -- then I run my mods unit tests inside of it for CI/CD

#

Woo repeatable tests, that I have actual confidence in πŸ™‚

#

so a real Kahlua 5.1 runtime that I can really actually run my mod-code inside of and not need to launch the game at all theres mocks of course, but its legit

buoyant violet
cloud hawk
#

@blissful seal that's really great! I started to do some test suite, but then I stopped when I saw that I would have to implement mock for the in-game API: https://github.com/codx-dev/doom-frequency-mod/blob/main/DoomFrequency/tests/sha256_spec.lua

Do you have these functions mocked? For example, on tests, can you setup the suite to return the player name, if we call get from the IsoPlayer?

GitHub

A Project Zomboid radio enchancement tool. Contribute to codx-dev/doom-frequency-mod development by creating an account on GitHub.

blissful seal
#

but yes, i have mocks for the Player Object, Weapons, Items, and Globals

bright fog
# blissful seal

But what's that for if you can't verify the mod works in-game ?

#

I see mocks, tho that sounds unreliable πŸ˜…

blissful seal
#

tests are just for confidence right? I run the tests in game too

#

but the process is cumbersome, launch load save, run test command

bright fog
#

Definitely is, but tests that don't involve the game imo sound a bit worthless, or at least I don't see the use for those

blissful seal
#

They do involve the game though

#

The Kahlua harness I wrote literally runs PZ's actual Lua VM β€” the same se.krka.kahlua classes from projectzomboid.jar. It's not "mocking the game," it's running the game's Lua runtime without the rendering/networking/world layers.

#

mocks replace the data source, not the runtime

#

Think of it this way: when your mod does weapon:setMaxDamage(2.5) and then weapon:getMaxDamage(), that's pure Lua logic. The string pattern matching in your string.find calls, the number coercion in your math, the pcall error handling, the metatable resolution β€” all of that is Kahlua behavior, and our tests run on the actual Kahlua bytecode interpreter.

#

still worthless in your opininon? genuinely looking for your feedback

frank lintel
#

there any reason why revolvers have a "ClipSize" stat? (which is not even remotely accurate alone...)

knotty stone
#

Revolver_Short doesnt have it LUL . would say just some copy pasta from pistol1 to 3

cloud hawk
#

I myself lost a LOT of time creating reproducible in-game scenarios when modding

dull moss
blissful seal
#

I'll get a generalized version pushed up and shared out πŸ™‚

frank lintel
#

can someone explain to me why .bin files sometimes have a MultiplierConfig.Butchering non ascii starting character but then randomly thru the same file its some nonprintable like in the image above?

bronze yoke
#

these aren't text files, your text editor is just interpreting the numbers as characters

#

usually strings are preceded by their length

frank lintel
#

and I stated its a .bin I know this cuz Im trying to write a parser for it

bronze yoke
#

don't waste your time trying to interpret them from nothing, just decompile the game and look at what the vanilla i/o does

frank lintel
#

and no its not length's from what I can tell even using hexedit its a repeating usage but it just seems random

#

and I cant read the whole thing at once is the problem.

#

I mean it might be I guess maybe guess look thru it for the actual value of the characters

bronze yoke
#

if you want to know what something in those files means the easiest way by far is to just find the code that writes it and see where it's getting it from

frank lintel
#

yeah I guess I could go that route and see how its writing it. thank you for the advice needed a different perspective looking at it and this might help.

bright fog
willow tulip
#

ie, key=value, except in this case the keys are stored as binary numbers to save space

#

(And being binary, the = isn't needed as the key could always be a constant number of bytes long)

#

But yea, just look at the save/load code in the decompiled java.

willow tulip
#

You'll prob find that shotguns have it too

paper ibex
blissful seal
#

hell yeah

frank lintel
#

which is what they all say... so kinda odd that stat even being there or atleast that value should be 6.

willow tulip
#

Its doable.

#

But yea, dunno then if there is some other stat for it.

frank lintel
#

ummm lemme see what it was called

blissful seal
#

its MaxAmmo

#

theres also a usesExternalMagazine()

frank lintel
#

we know

#

point was why is there a clip size when a revolver has no clip to use that stat... or even just being the wrong value above all else

frank lintel
# blissful seal its MaxAmmo

Sorry Dark, yeah I know just took me a bit to find the file again and sift thru the whole weapons file again then went to DM's cuz we both were talking about IRL crap.
Now if anything if you can help with is setting up my VSC workspace. I got the decompiled stuff for java done just not sure where my root workspace folder should be and how to tie in the java decompiled code to look at it. Sorry Im a netbeans guy.. :(

#

here's the extensions I got installed so far. there anything more I need?

bright fog
#

The Java one idk, I suggest moving to IDEA to parse the Java bcs VSCode is really bad at it

#

But besides that this all looks good yea

#

There aren't really many extensions, I believe there's one for snippets but I don't remember what snippets it adds anyway

frank lintel
#

okies and what should be considered my Root Lua folder? Media?

#

as for java not worried about that I can use netbeans well enough for java thanks to my MC days

#

also got intelliJ but havent used it in ages

bright fog
#

It gives an example config file

frank lintel
#

okies 1 last question I used vineflower to decompile java is that okay or should I be using this Albion's decompiler (which I dont even see on the wiki page anymore oddly... even though google still mentioning it for version 42)

frank lintel
willow tulip
bright fog
#

It's there

willow tulip
#

its the top link

#

(Well, its on the page the top link goes to)

frank lintel
#

ah okay just mislabeled yeah I was googling and it was naming it specifically so when I didnt see it there I was headscratching okies bookmarked and thanks

willow tulip
#

Fun fact: We even get real variable names these days!

bright fog
#

yup

willow tulip
#

no more figuring out wtf float13 is supposed to mean!

frank lintel
#

well Im used to obfuscation :P

willow tulip
#

(Although that was a half amusing puzzle game when I first got into PZ modding)

#

trying to figure out what a variable is just by the code

bronze yoke
#

i honestly didn't think the variable names would survive to a release

#

i assumed the work i put into making zd use them would go to waste πŸ˜…

willow tulip
#

Yea im glad they left them in

onyx niche
#

hi, correct me if i'm at the wrong place but : i'm new in the modding community and i'm looking for sommeone that could help me with a basic fix spawn location. just mp me if you want to hep

blissful seal
frank lintel
#

ty dark thats where I was getting confused

blissful seal
#

No problem

frank lintel
#

netbeans lets you assign library/runtimes seperately and all and Im not really famliar with IJ or VSC that much so.. since there no Lua plugin for netbeans kinda forced into a steep learning curve lol

willow tulip
#

Anyone wanna test my base saver and give feedback?

#

so hard to find project testers these days...

frank lintel
#

you talking that thing that copies your base?

frank lintel
#

gimme a poke tomorrow cant right now still got a major storm around me... plus 'smoke'

willow tulip
#

ah k.

#

can I dm you or I won't remember who it was.. lol

crisp fossil
#

I'm trying to update my mod to 42.15 and this is what I got currently

item Bag_DuffelBag
    {
        DisplayCategory = Bag,
        ItemType = base:container,
        Weight = 1.0,
        IconsForTexture = Duffelbag;DuffelBag_Green;DuffelBag_Grey;DuffelBagBlue;DuffelBagRed;Duffelbag_Sport;Duffelbag_Sport2,
        CanBeEquipped = base:back,
        ClothingItemExtra = Bag_DuffelBag_LB
        ClothingItemExtraOption = LowerBack
        clothingExtraSubmenu = OnBack,
        CanHaveHoles = false,
        Capacity = 18,
        CloseSound = CloseBag,
        ClothingItem = Bag_DuffelBag,
        EquipSound = EquipDuffleBag,
        OpenSound = OpenBag,
        PutInSound = PutItemInBag,
        ReplaceInPrimaryHand = Bag_DuffelBag_RHand holdingbagright,
        ReplaceInSecondHand = Bag_DuffelBag_LHand holdingbagleft,
        RunSpeedModifier = 0.95,
        SoundParameter = EquippedBaggageContainer DuffleBag,
        WeightReduction = 65,
        WorldStaticModel = DuffelBag_Ground,
        Tags = base:isfirefuel;base:isfiretinder,
    }

item Bag_DuffelBag_LB
    {
        DisplayCategory = Bag,
        Type = base:container,
        DisplayName = Duffel Bag,
        CanBeEquipped = eznbodylocation:lowerback,
        BodyLocation = eznbodylocation:lowerback,
        WeightReduction    =    65,
        ClothingItem = Bag_DuffelBag_LB,
        ClothingItemExtra = Bag_DuffelBag,
        ClothingItemExtraOption = OnBack,
        ClothingExtraSubmenu = LowerBack,
        Weight    =    1,
        Capacity    =    18,
        Icon    =    Duffelbag,
        OpenSound   =   OpenBag,
        CloseSound   =   CloseBag,
        PutInSound   =   PutItemInBag,
        RunSpeedModifier = 0.95,
        CanHaveHoles = false,
        ReplaceInSecondHand = Bag_DuffelBag_LHandTINT holdingbagleft,
        ReplaceInPrimaryHand = Bag_DuffelBag_RHandTINT holdingbagright,
        WorldStaticModel = DuffelBag_Ground,
    }

registries.lua

EznBodyLocations = {}
EznBodyLocations.ItemBodyLocation = {}
EznBodyLocations.ItemBodyLocation.LowerBack = ItemBodyLocation.register("eznbodylocation:lowerback")

shared/NPCs/eznBodyLocations.lua

local group = BodyLocations.getGroup("Human")
group:getOrCreateLocation(EznBodyLocations.ItemBodyLocation.LowerBack)

When I tried to equip it, the item converts into Bag_Duffel_LB but it does not equip and there is no "Wear" in the context menu, instead it has "Equip on Back"

willow tulip
#

Yay.. got world inventory objects working

#

now I just need to figure out the 90000 exception cases I missed and random item types that need some special data saved -_-;

#

prob should go save moddata or something next.

dry stone
#

For my PZDos mod, I realized I won't be able to bundle shareware/freeware included on the workshop - it would likely get taken down. I ended up making a download manager instead. You can create software lists with URLs to download from and manage your library both client and server side.

#

This lets you add your own software to the mod while in game, even creating new installer disk items on the fly (which will end up in loot tables). With the mod I'd include a default list; click fetch and download the full set of games/software from legit hosts.

dry stone
#

Now I only have a billion and a half little things to clean up and fix while slowly losing my mind

willow tulip
#

thus far, other then weird graphical glitches that I think im just going to blame on TIS, its gone pretty smoothly.

dry stone
#

heh all projects inevitably end up in polish phase

#

like you get it working.. but then it takes forever to get it in a state for the public

willow tulip
#

Yea iv pretty much just given up polishing due to lack of feedback on most of my projects... Will have to actually play the game myself to test em, and then I won't find any of the bugs anyway cause I only do certain things with them.

#

steam comments are useless... my discord server is deader then a doornail...

#

shrugs

dry stone
#

Player feedback and bug reports are vastly overrated heh...

#

I did another huge mod a long time ago and got absolutely flooded

#

but very very few things were at all useful...

#

most bug reports were actually "I need this feature, its a bug that it isn't there."

willow tulip
#

most bug reports on my mods are: "I didn't read the install instructions/description on how to use it and it doesn't work"

#

or "I wish it had this feature that already exists in the mod options menu and is described in the description"

dry stone
#

That too. and I'd keep adding things to my FAQ that no one looked in.

#

well, to be fair, I'm sure SOME people did look in there and self-solve things

#

but you never hear from those people because they were going to figure it out anyway.

willow tulip
#

.. ok apparently most items have mod data...

#

even a lowly screwdriver has a customName set to.. Screwdriver

dry stone
#

Oh, yeah, basically anything you put in an item def that isn't a recognized zomboid field ends up as mod data

#

lol... custom names are also mod data. figured that out myself a few days ago

#

You can also set the display name on an item to anything you want from a mod. That's how I dynamically add items (my random software disks are all the same base item with a custom name and some mod data, no need for new item defs)

willow tulip
#

Yea

#

theres some modelIndex value that im still not sure whats for but I think its for item variants?

dry stone
#

And if you wanna fully seal this system, you can add something like this to an item def:

OnCreate = PZDosOnCreateRandomCD,

Then it'll call that function in your mod when the item gets made, and you can set custom name / mod data automatically.

#

This trick is glorious because if you distribute that item in a loot table, it's effectively MANY items, and you can dynamically create new TYPES of items on the fly

willow tulip
#

is modData "flat" or can it hold subtables?

dry stone
#

afaik it's flat. Each item is one line ending in a comma... All fields are just strings. Unrecognized fields become mod data strings

#

you see semicolons used to "list" things but I'm pretty sure indie stone is just splitting the strings by semicolons to make lists.

willow tulip
#

Sigh, my save/load code of moddata is somehow not working properly for gas masks

#

... Oh, right, because spawning the item will give it initial mod data.

dry stone
#

If it's multiplayer you have to sync that yourself in lua

willow tulip
#

Nah, its cause I never erased the initial mod data

dry stone
#

I try to never erase, just overwrite... I use mod data on everything, but maybe OTHER mods also try to put their data on my items. I go out of my way to preserve it

willow tulip
#

lets see if just getModData() = {} works

dry stone
#

I'd be surprised lol

willow tulip
#

Nope it hates that idea lol

#

welp, time to just set all the values to nil then

dry stone
#

but my mod data D:

willow tulip
#

lol. Its for loading items, I want it to load the saved modData and not the spawn modData

#

(because respirators for example expressly delete a key when you remove the filter)

#

yay its now loading respirators correctly.

dry stone
#

You know I never had to delete mod data... like remove a whole field

willow tulip
#

saving moddata: itemTable.modData = item:getModData(); good enough.

dry stone
#

In some cases I'm creating an item and adding mod data (and trying to sync all that from server). But if the mod data appears on creation then I have no idea

willow tulip
#

Yea, gas masks have a lot of modData on creation to spec the filters

dry stone
#

Yeah, I do store it. When you install parts into a computer, the full item and mod data ends up stored in the computer's mod data. When you uninstall a part, I create the item and restore the mod data back

willow tulip
#

its why I tested with them: I knew my modData load/save was working if they work correctly lol

willow tulip
#

(like I did for engines in Project Summer car)

dry stone
#

naw, the computer really needs its own UI for doing builds

willow tulip
#

(into modData)

dry stone
#

I think it's way better than making it a container you toss parts in. It's a lot like the vehicle UI

willow tulip
#

dammn 60mhz pentiums πŸ™‚

dry stone
#

They did exist in 1993... BARELY lol

willow tulip
dry stone
#

I decided in my software list, I'm including games up to 1995 though

#

because I'd miss so many great things if I didn't..

willow tulip
#

the container is just for ease of storing items via code.

#

Obviously you have a working system so its a bit late to change it but πŸ˜›

dry stone
#

I kinda needed a real structure though... Like there's a whole profiler that scans the build and validates it, determines its file systems, sends it to my Java-side...

willow tulip
#

(Also let me easily debug stuff by making the container accessable in debug)

dry stone
#

And then there's the random-computer generator

#

which FINALLY works

willow tulip
#

lol

#

im picturing mismatched ram sockets. THE PAINNNN /s

#

randomly assigned IRQ's for the soundcard. UUGGHHHHHHH PAINNNNN

dry stone
#

No.. I did actually make it bank RAM correctly for all hardware, whether its 30-pin 8 bit simms or 72 pin 32 bit ones.

#

notice how the pentium needs 2

#

but you could install those as singles in a 486

willow tulip
#

Yea

willow tulip
dry stone
#

The validator currently doesn't care if you bank things correctly... I'm not sure if I want to go that far, players will struggle with this as-is.. but hte random generator, no reason for me not to make it accurate

willow tulip
#

Yea

dry stone
#

In an XT you could install 30 pin ram singles.. but no XT-class computers had SIMMs to my knowledge lol

#

you had soldered-onboard ram and sometimes an ISA ram expansion card

willow tulip
#

yea I remember my XT just having a huge array of dip sockets

#

Oh yea, the 2~8MB expanded ram card.. I had one of those.

dry stone
#

This mod will try very hard to simulate your old XT correctly...

#

though I'm struggling a bit on the herucles era graphics stuff a bit right now

willow tulip
#

just an entire card of 1/4 soldered ram and then like $50 in dip sockets

#

full length of the case LOL

dry stone
#

I have one of those cards in my items database

willow tulip
#

made todays video cards look short

dry stone
#

a whole 256kb ram expansion

willow tulip
#

I had a laptop back in the day with a 256kb externam ramdrive πŸ˜›

dry stone
#

I dunno man, I have a 5090. This thing is unbelievably large.

willow tulip
#

thing had 4 nicad batteries in it

#

Oh, and it STILL lost all data if you ever unplugged it from the laptops expansion slot, guess how I figured that out!

dry stone
#

yeah the era before lithium ion

silent zealot
# dry stone

A Pentium with PS/2 ports! I has a 386sx with the big chonky DIN cable for teh keyboard and a serial port for the mouse.

dry stone
#

remember having to buy batteries at the store all the damn time?

willow tulip
#

the other side of the laptop had a little expansion slot for a SUPER SUPER mini cassette player, a DMM or (what I had) a recite printer

dry stone
#

I tried really hard to research my classic parts well

willow tulip
#

Nice

willow tulip
dry stone
#

That's one thing I don't have. .. I did not implement power supplies and computers currently don't care about power/generators at all

silent zealot
# dry stone The validator currently doesn't care if you bank things correctly... I'm not su...

"Advanced mode" in sandbox options. Requires you to choose the cylinders/sectors/heads/etc for your hard drive from a list in your bios that may or may not actually have a proper match. Then move jumper cables on your ISA cards to set IRQs and base memory addresses. Then there's a 50/50 change the floppy drive light turns on but it does not work because the cable is backwards becuase for some stupid reason floppy drive cables are not keyed

dry stone
#

I DO want to require power but .. need to go figure all that out at some point. It's on my list heh

silent zealot
#

...or go with what you have which is still awesome and full of nostalgia and feels authentic even if it's not 100% accurate for every early 90s PC

dry stone
#

It's not fully accurate. It is MOSTLY accurate. It's definitely going to become MORE accurate too as I fix the "million little things" too

silent zealot
#

I recall power supplies of the time being largely interchangable... it wasn't like these days where you might need an extra 1000W to run your graphics card.

willow tulip
dry stone
#

One thing you DO need to do with this mod is configure your sound card properly in games

silent zealot
willow tulip
#

also the cylinder/sectors/heads was printed on the hard drive, along with a list of bad sectors you had to manually enter -_-;

dry stone
#

Port 220, IRQ 7, DMA 1 for your sound blaster. or game sounds will NOT work.

willow tulip
#

usally with space on the label for you to write down more bad sectors as you found them πŸ˜›

silent zealot
#

hahahaha

#

I rmember some bioses didn;t let you actually enter the Hard drive numbers, you just chose from a long list of options.

#

So if you didn't have a perfect match you just picked the closest.

willow tulip
dry stone
#

Also, with this new file manager you'll be able to use QB, EDIT, old dos utilities like LS and stuff

willow tulip
#

"Yea this drive totally has 64 heads. its FINE"

dry stone
#

because you can just click a few buttons and add any software you want

silent zealot
#

It's all abstracted by the drive anyway.

willow tulip
#

they just basically maxed out every value they could to get the stupid motherboard to index the drive space fully

dry stone
willow tulip
silent zealot
#

ah, memories of ye olde sexploitation platformers.

#

That looks very cool

dry stone
#

The Vinyl goddess has a totally different hair color in the swimsuit title screen than in-game. I want my money back

#

If you think that's bad, Duke3D is in there, too.

silent zealot
#

prepares to rip off enemies head and **** down their neck

dry stone
#

It's not duke's fault. He was all outa bubble gum.

#

I'm kinda thinking to add a feature letting you mount ISO images as CDs, because there's a lot of classic "So Much Shareware" type CDs on internet archive

#

and it should be possible to make that work

#

CD ROM drives did exist in 1993.. and you'll be happy to know I'm not simulating their slowness.

willow tulip
#

lol

#

I didn't get a cd rom drive until 52x existed -_-

#

and by that, I mean you couldn't find anything slower then a 52x being sold, because thats how freaken long they where out before my mom bought me one and I was stuck with floopys for a $#@(TNGDWJD DECADE AFTER CD ROMS WHERE COMMON PLACE THANKS MOM

dry stone
#

My dad splurged and bought a 1x drive very early 90s.. it was stupidly expensive. It didn't go in a drive slot - it sat on top of the computer (with the monitor on top of it).

willow tulip
#

I would have been quite happy with like 4x around the time 16x drives where common place but I couldn't even get her to buy that for me

#

And no, she was not poor at all. Just too busy hosting parties for people who never showed up once after she stoped hosting them

dry stone
#

heh, well my dad went deadbeat mode and I was left with scraps myself shortly after.

#

I did still manage to keep some kind of computer together, mostly thanks to a cool uncle

willow tulip
#

mom then died and I had to run the house as dad didn't wanna work.

#

Sadly, I ended up with a lot more cool stuff then I ever would have if my mom stayed alive.. so.. .thanks for dying I guess?

dry stone
#

oh wow that's seriously tough to deal with especially for a teen

willow tulip
#

yeaaa

#

life sucks... And then you die.

dry stone
#

I do most of my modding to distract myself from an otherwise dull life

#

I wake up, I go to work, I come home. Every day for years

willow tulip
#

I can't even work atm due to these migraines. need to get back to knifemaking soon...

dry stone
#

Life sucks but then you enjoy making shit

#

that's how I cope hehe

spark rose
#

making this for zomboid

dry stone
#

Web based server management dashboard?

#

The UI looks slick

spark rose
dry stone
#

Well there's a lot of proprietary ones used by various web-hosts.. but I haven't seen any usable by normal people

#

I might end up using that myself someday

spark rose
#

this would be deployed on your server VPS and use js as backend

#

jesus

dry stone
#

Beats SSHing in and poking at things

spark rose
#

or obvi your VPS control panel

dry stone
#

looks like you can type text there? Bet you're sending it to the server as like stdin?

spark rose
#

console commands

dry stone
#

That's really nice to have. Do you display the console's stdout somewhere too?

spark rose
#

mm been thinking abt that

#

maybe

dry stone
#

If you do, my mod will probably be logging lots of errors to there. haha

spark rose
#

and + most web managers need xamp πŸ’”

#

or sum type of web hosting

#

which is so shit

spark rose
dry stone
#

I usually just play with a friend in MP. We used random web hosts for years. To be fair there are lots of decent ones that do a good job, but it's a paid service

#

lately he's set up a small dedicated server we've been using

spark rose
#

yea hopefully ill compile this and it will be an easy drag / drop and edit one file and be setup on restart but still working kinks out

dry stone
#

Access to raw console could be really handy for like "why is my server crashing" things

dry stone
#

Give each zomboid it's own AI backstory. Make them walk around saying "As an AI, I do not have feelings and seek brains."

spark rose
#

i wanna add that to be able to control spawn rate etc and where they are

dry stone
#

An in game mod that communicates to the server for admins would be how I'd handle something like that

frank lintel
#

its my PDW keyboard has a 1/8th iron or steel plate in the back of it weighs in about 15-20lbs 21" wide

silent zealot
#

I had one of those.

#

Solid enough to beat a zombie to death with.

frank lintel
#

yes it is! lol

silent zealot
#

...make the keyboard a long blunt weapon with crowbar level durability.

frank lintel
#

and the plastic back then was hard as the metal too plus thicker even

silent zealot
#

The cast iron pans of the IT world. Solid, reliable, indestructible.

frank lintel
#

it still works but some the keys sticking now cuz the guides worn out too much think it was the S and A D keys plus omg nothing beat that keyclick they did

#

like you had to intentionally click a key lol

silent zealot
#

I've got a clicky mechanical keyboard, it's great.

#

But those buckling springs

#

so nice

frank lintel
#

I had a green clicker razor but I snaped/folded it in half

silent zealot
blissful seal
narrow moth
#

I have an idea for a mod - log carts, will be similar and inspired from ZuperCart just specific carts for logs(more realistic from 50% wood weight mod, and allows to carry up to 10-20 logs), that would be obtainable in construction/farms/maybe spawned in your home if you picked lumberjack, and probably also a "handmade" craftable version with a DIY looking like model.
I couldn't find any mod like that in the workshop, does anyone know if there is such a thing?

silent zealot
#

From a technical viewpoint, that's just Zupercarts with a restriction on what can be placed in the cart.

#

You could make an add-on for Zupercarts that adds a log cart.

#

I'd ask iBrRus to confirm they are OK with it, but mod authors are usually fine with that sort of thing - you're not copying any code/models/etc, you're making a mod that requires zupercarts to be installed.

spark rose
#

maybe ill fork it and make it a little better (with credit obviously)

echo inlet
#

are vehicle mods hard to do if one has... zero experience with blender etc?

torn igloo
#

Is there a way for me to position the character at vehicle Reardoor?

narrow moth
dry stone
#

Any simple way to open two instances of zomboid to test my mod under multiplayer with 2 players?

bronze yoke
#

launch with -nosteam and you can connect with as many instances as you want

dry stone
#

Hm.. then I just need to figure out how to launch twice (second launch just focuses the original). And I'm on CachyOS so it'll be different to figure out for me

blissful seal
#

its heavily built around LinuxGSM (which I also forked)

blissful seal
#

idc about the UI at all, i just aint editing any config files manually anymore πŸ˜‚

spark rose
#

but yea put it on gh or send me it ill redo the UI and keep you as creator and js add me as a credit?

blissful seal
#

Sure thing πŸ™‚ ill msg-reply u when its up, probably over the weekend

spark rose
#

Ill add a dev console log to

#

for script errors

blissful seal
spark rose
#

so ill js rehaul the ui for you

blissful seal
#

bettt bet ya make it pretty hahah im ass at frontend

spark rose
blissful seal
#

i appreciate your eye for aesthetics

spark rose
#

and ill add a support section you got a discord for support of this?

blissful seal
#

Nope this is something i just cobbled together one weekend after getting tired of editing the config on my linux server

#

i know its helpful for me, but didnt know if folks would really use it, alot of ppl seem to go with the managed server route, which isnt really my thing

spark rose
#

I dont have the game on my main PC so ill js be editing the frontend as I can't really "test" things out

blissful seal
#

no worries

spark rose
#

but made this for my discord bot

blissful seal
#

damn yeah i see you that looks awesome

spark rose
errant idol
#

Hello, is there a mod or something I can mess with in solo sandbox to make a broken leg last longer? I wanted to do a fun challenge but my fullly broken right leg healed too quick. I was using debug menu to set my health.

Idk much about modding but any starting point would help.

#

My only thought to this is a toggleable script that just keeps my leg broken? Any ideas welcome

cinder light
vast pier
#

Got it working.
Duct Tape will still roll from the normal table (17 possibilities) but Duck Tape will always be the same texture/material as the input.
Meaning cotton/denim/leather tape will always result in the same cotton/denim/leather binding on the weapon

#

I may add in a material recovery recipe, to allow you to reclaim some tape.
This would also work as the recipe that allows you to remove certain parts like the stock/grip/front.

I do plan to add in more than one way to bind these parts without tape.
Such as bolting them on using scrap metal.

silent zealot
#

There's also setSplintFactor() which multiples healing time; 1.0 = normal, higher = faster, lower = slower. (splinting your leg with zero medical makes it take twice as long to heal!) and I don't see anything that stops it from being negative and making the fracture worse over time, if you really want to be sadistic.

#

...or if you want to make a Boneitis mod.

errant idol
silent zealot
vast pier
#

especially as oversized as it is, a rifle barrel does not need to be as thick as this

#

If anything I feel like too much gas would dissipate in the air when firing to properly propel the round

#

this is partially solved via the gas cap you weld on, but the model is not accurate to what the gun would need to look like irl

vast pier
silent zealot
#

Volley gun?

vast pier
#

Sorry ik you were making a joke but I'm just genuinely too autistic to not go "Uhm ackshually β˜οΈπŸ€“"

silent zealot
#

I was actually thinking the pieces would seperate, not the barrel explode... but you're right, it would be very easy (with access to modern stuff) to make a barrel that does not explode.

vast pier
# silent zealot Volley gun?

I don't have custom ammos planned atm but a future implementation could involve forms of ammunition other than modern casings

silent zealot
#

I was thinking of an an improvised single shot cannon that kills everything in a cone, but reloads via a recipe (gunpowder and scrap metal)

vast pier
#

like a percussion gun

vast pier
silent zealot
#

I've got "kill all zombies in a cone" code sitting around somewhere, I just never went further than that - if you want to use it let me know and I'll dig it up.

#

Since the game will crash if you put more than 9 projectiles into a single shotgun shell.

vast pier
#

Can still attach an Axe/Chopper though, as they don't require the bayonet lug

#

they attach directly onto the barrel

willow tulip
silent zealot
#

Only if your medical skill is zero.

#

formula is (skill+1)*0.5

willow tulip
silent zealot
#

Unless zero skill is numerically 1 in lua

bronze yoke
#

you do also have to somehow get a fracture for this to be a problem

silent zealot
#

Yeah, usually a fracture comes with a lot of other problems lol

#

I have broken ribs in a car crash though - that sucked. Can't splint them.

willow tulip
bronze yoke
#

does the splint factor actually slow it down for sure or does it not heal at all without a splint? most other injuries just don't really progress until you deal with them

silent zealot
#

Actually the worst was when I tried a mod that makes you immortal, but the "you would have died" effects is to kill all the zombies around you and injure every one of your body locations.

#

fractured skull. broken ribs. broken arms, broken legs.

willow tulip
willow tulip
silent zealot
willow tulip
#

2 broken legs is what, 10% walking speed?

silent zealot
#

Immortality is a Curse: Zomboid Edition

willow tulip
#

You are now the immortal snail!

silent zealot
#

It wasn't that bad, but it was bad. My car was not far, I drove home, I forced myself to recover and never visited the art gallery again.

#

It was a "nothing coming down the staiars even though I'm standing here yelling... I'll quickly see if there are... well that was a lot of zombies standing at the top of the stairs waiting for me" situation

silent zealot
#

This was when killing a zombie with a gun made them freeze in midair, so I created a sculpture at the entrance.

vast pier
# silent zealot I was actually thinking the pieces would seperate, not the barrel explode... but...

Well I do have plans for tracking minor and critical breaks.

I plan for when a minor break happens that it will read the gun’s part list and damage a non vital part based off of a formula that will involve both RNG, the part’s material and the part’s grading.
Weaker materials with a low grade will have a higher chance of rolling durability damage than a part with strong materials and a high grading.
A minor break will not inherently impede the gun being able to shoot.

Critical breaks will be tracked separately, they will have the same rolling logic, but a full break will cause the gun to become inoperable until the specific part is swapped or repaired

willow tulip
#

its kinda lame that you get 1 silencer/scope/whatever and your set for life

willow tulip
vast pier
willow tulip
#

that'd make them a resource you have to decide if you wanna use

#

big ass hoard time? take the silencer off!

#

1 random sprinter? Oh silence time baby.

vast pier
#

Grips/Stocks will be taking direct push back from pushing against the player while firing, and have much more reason for them to take damage compared to a sight that has no pushback during recoil

willow tulip
#

Especially because for a scope, being off 0.1 degrees or a lens getting loose is basically destroyed.

#

or a lens cracking due to getting loose and shaking against the frame

vast pier
#

I mean yeah, I just meant comparatively when against stuff like how much force gets pushed into the stock

vast pier
willow tulip
#

Yea, but a stock is also a solid block of material and you could easily use it as a club with little damage, a scope can be damaged from a light impact

#

and presumably, while using a gun, your handling it, and maybe even dropping it (Ok not really shown ingame but you get the idea)

vast pier
#

I want the focus to be on customizability and aesthetic. and a feeling of attachment to a gun you've spent a long time customizing and upgrading

willow tulip
#

Yea

vast pier
#

The durability rolling is just part of this, as it requires you to actually maintain the gun and its parts

#

and causes you to choose what gun parts are more important

willow tulip
#

Yea

#

I just kinda want a reason to keep collecting stuff πŸ˜›

#

1 scope? No I want 10

#

why? I dunno.. give me a reason!

vast pier
#

Not all parts will inherently be repairable (without an addon mod)

willow tulip
#

PZ repair system makes repairs less effective over time anyway, so even repairable things are not forever.

vast pier
willow tulip
vast pier
#

hmm, yeah that would make sense actually

#

though idk if you would want to touch fiberglass tape on your shoulder while shooting

#

or hand grip

willow tulip
#

Nah, the fiberglass tape gets soaked in epoxy

#

like you put it on, then slather epoxy over it, and can even sand it down smooth again

vast pier
#

I suppose

willow tulip
#

Its basically just glass reinforcement for the plastic that epoxy becomes as it cures

wooden pulsar
#

Is there a bow mod for b42? If not then what language is pz coded in so I can craft up a masterpiece

willow tulip
#

The epoxy provides compressive strength, the fiberglass provides tension strength.

vast pier
willow tulip
#

PS: feel free to steal summer cars repair system!

vast pier
#

idk anything about MSC

willow tulip
#

what I do, is generate faults based on an items condition (for every 20% below 110%, (ie starts at 90%) a fault is generated)

#

each fault has its own repair recipes

vast pier
#

I don't play with cars in my playthroughs πŸ˜…

willow tulip
#

they might be as simple as 'brush with toothbrush and gasoline'

vast pier
#

people think I'm crazy for that

willow tulip
#

or be something like a dent.. 'You can weld it, or hit it with a hammer.. but the hammer is much less likely to succeed'

#

this makes each damage part unique

#

two 90% parts will have different faults and require different repairs

#

you might see a badly broken scope and go "OHHH but this one has EASY repairs, SCORE!!!"

vast pier
willow tulip
#

Or you might have a really good scope thats like "NOOOOOOO IT FAILED HORRIBLY I CAN"T FIX THIS WITHOUT GLASSSMITHING"

vast pier
#

I am still unsure about this system though

#

there's no repair system in the mod currently, not even a way to take parts off the gun

#

once you tape a stock/grip on, it's permanent

#

This will be changed in the future, but I've been focused on a lot of other aspects of the mod

willow tulip
#

One thing I kinda hate, is 'god tier' materials that you never wanna use because they are so rare and valuable.

vast pier
willow tulip
#

thats why I made my repair system generate different faults, so that the best repair would often be more mundane materials

vast pier
#

I've had help with code snippets, but majority of it has been hand crafted

willow tulip
vast pier
#

doesn't need to inherently be much better than the alternatives, but having it as an option encourages choice freedom

vast pier
willow tulip
willow tulip
#

I made a table structure that describes 'repair recipes' and what skill/difficulty they had

vast pier
#

I want to learn how to make a 3d UI where you can inspect the gun, and its parts

#

and possible faults

willow tulip
#

and then another table of 'faults' where each fault could link to multiple repair recipes

#

and then I used tags on parts to indicate to the repair system what kind of faults could be generated.

vast pier
#

Kind of like this framework.
But I have no idea how to make interactive UI

willow tulip
#

like, I used an 'electronics' tag to indicate if it could generate electrical faults that needed wires, electrical parts, etc.

#

I had another tag for if it contained bearings that could fail (Needing replacement bearings or to try and clean the existing ones)

#

PS: I also made it so the repair counter only increases if you fail the repair.

#

So skilled people would be able to repair things much more without 'damaging' it

#

(But I think I also capped success at like 95% or something)

#

I use a weird skill scaling system where the 'required level' of skill is for 80% success (scaling from like 10% at 0 skill IIRC?), and then above the 'required level' it scales from 80% to 95% at level 10

#

this still gives you 'something' at higher levels than required

#

and still keeps some random chance of failure

vast pier
#

I'll keep a lot of this in mind, but I don't think the repair system will be implemented for awhile

#

I think it will be considered a milestone update, like how implementing the gun melees were

willow tulip
#

yea it took a lot of people nagging at me before I finally did my repair system because I didn't wanna follow the PZ system πŸ˜›

#

And then more to get it working in MP -_-;

vast pier
#

I need to make a roadmap or something

willow tulip
vast pier
#

My issue is I don't want to implement a repair system until I implement part grading, and I don't want to implement part grading until I implement alloys, and I don't want to implement alloy parts until I make my smithing mod, and I don't want to make my smithing mod until I've worked out the basic foundation of the gun crafting and worked out major bugs

#

oh yeah I haven't even brought up that I plan to make metal alloys that take into account real material %s determined by the player which will affect weapon stats

#

which will be used for armour, melees, and gun parts

willow tulip
#

lol.

vast pier
#

The scope of what I have mentally planned is huge, but as a solo dev it's very slow and meticulous.
I've spent a lot of time going back and changing old systems to be better suited for future features

#

I know the mod doesn't get much attention currently, but I hope that as it progresses it will gain more traction

#

I could easily use my skills to pump out simpler mods that would likely get more attention, people love guns and melee weapons.
But I want more than to just make generic mods.

upbeat turtle
vast pier
upbeat turtle
vast pier
#

Complex way of me saying, I want to make a group of mods that haven't been fully realized like this before

bronze yoke
#

i don't think modding for popularity really works out anyway

#

just make what you want to make

#

recognition generally comes where there's quality

#

the passion for the things you want to work on will carry you there

vast pier
# vast pier Complex way of me saying, I want to make a group of mods that haven't been fully...

For example, there are definitely bayonet mods.

But have any of them been designed in a way that you could make it fully compatible with any gun mod with just a few tag edits?

Or one where the weapon attachment can function as multiple different melee types?

Effectively turning your rifle into a utility driven multi-tool that can be useful in melee even without one specific melee skill since each "stance" uses a different one?

vast pier
vast pier
bronze yoke
#

of course, very few people have a truly 'pure' interest, i definitely want my mods to get big numbers too

bronze yoke
vast pier
#

I still need to add credit to the mod page for @buoyant violet
he has helped me out a decent bit, and has provided some code snippets for specific functions

#

he's credited in the actual code files, but I meant to do the same on the page

#

I will try to remember when I next update SMW

vast pier
#

doesn't seem like much, but I could not for the life of me figure out how to inherit hotbar slot on a new item

willow tulip
vast pier
#

I want the base mod to be compatible with all gun mods, but I can certainly make a vanilla conversion addon

willow tulip
#

Honestly gun mods on PZ could use some kinda 'gun mod library' of silencers, different size magazines, and all the oddball ammo types that gun mods like to add.

vast pier
#

problem is, who decides what items are used where and how

willow tulip
#

Or at the very least, agree on full type names for those so they properly override each other and you don't end up with like multiple of the same ammo type

vast pier
#

It would probably be the most effort thing I could do after the mod's foundation is laid out

#

I genuinely think implementing alloys would take less time

#

And alloys would require like,,,,, % material tracking and a bunch of calculations for stats.
So that should say something about what I think would be needed for a vanilla conversion

#

I would need to take every single vanilla gun, and essentially remake the models to be compatible with fire cycling, real time mag display, part swaps, quality grades, cosmetic variants....

#

and every gun part would need its own stats

#

as my pipe rifle is designed to have no stats without gun parts attached

#

it's entirely part dependant

willow tulip
#

Some alloy tips from my game Brutal Nature: Iron<Bronze (Needs hard to find tin+easy to find copper)<Steel(Needs high end furnace)<Tool Steel (Needs molybdenum)<High speed Steel (Needs tungsten)

vast pier
willow tulip
#

Not that you'd make a gun outta HSS... but you could! πŸ˜›

vast pier
#

so I would need to do that individually for every single vanilla gun

willow tulip
#

(and HSS makes great tools in general)

#

I once heated up a HSS planer blade to red hot, supported it on either end (6" x 1" x 1/4" blade)

#

and hit it with my biggest hammer. what do you think happened?

vast pier
#

Definitely not being made any time soon.
I dread having to add in a single new gun to the mod, let alone 22 vanilla ones

#

yes the toy guns are included in that list, as you could theoretically use parts from them to make a functional gun

willow tulip
#

I dented my hammer πŸ™‚

vast pier
#

hah

willow tulip
#

Dispite the HSS being literally red hot, it didn't bend at all. It didn't even get a scratch

vast pier
#

Also metal alloys means more complex tool options for gun smithing

#

currently I have it set to use specifically a ballpeen hammer

#

but I plan to go further than just that

#

it will need to be a BRASS ballpeen hammer, otherwise there will be a chance to damage the gun part(s)

#

but that can't be implemented until I make my smithing mod

willow tulip
#

Hehe.

vast pier
#

so normal ballpeen is what it is

willow tulip
#

Yea, I just went with higher alloy tools counted as 'more'

vast pier
willow tulip
#

I had a weird system in Brutal Nature where basically, a recipe required a number of 'tools' and returned less than it used

#

Like, you'd require 10 files to make this, and it would return 8

#

the number of 'files' you had was basically a 'tech level'

vast pier
#

that sounds absurd ngl bro

willow tulip
#

(there was also hammers, chisels, etc)

#

So you'd make more tools to get 'higher tech' and then spend your tools (and hence tech level) to make things

#

the idea was to simulat that the fact IRL, you don't just buy a hammer and call it good.. You get a 4PC set of ball peens of different sizes.. then you get a cross peen. then you get a mini sledge.. and a deadblow.. and a rubber mallot.. and so forth.

vast pier
willow tulip
#

You can do a lot with just 'one' hammer, but realistically you eventually need all sorts of different hammers

#

same with files, chisels, etc.

vast pier
#

Since each part has its own stat values, you could theoretically minmax beyond vanilla guns if you had the right parts

#

Which is fine, but I think it would be hard to balance

#

Currently the pipe rifle with best in slot parts will just slightly be outperformed by the vanilla M16

#

so you can imagine being able to take parts from the m16 and slap them on the pipe rifle, might be a bit problematic balance wise

willow tulip
#

Yea

vast pier
#

I don't want them to be so ass that you would never invest time into crafting one

#

which is why I think the repair update will be so important

#

as there will be a lot more to manage compared to a basic gun, in exchange for above average performance

#

Idk how balanced the gun is currently, I've been focused on foundation as I've said multiple times now xd

#

stats can be changed any time with little to no repercussions

#

Speaking of repercussions from stat changes, that will also be a balancing issue in the future

#

Because I plan for there to be multiple gun cores, each with parts that can be swapped through a handful of compatible guns.
Not all parts will be interchangeable, but some will.
I forsee this being a possible balancing issue, as changing the stats of these parts will not simply affect the balance of a single gun, but instead the balance of every gun it can be attached to.

#

For example
a buff to a part to try to elevate the pipe rifle, could accidentally overbuff an smg that was overlooked and make it meta

#

I don't want to shirk away from this design though, as the mod's entire premise rides on modularity.
It's Salty's Modular Weapons, not Salty's Static Weapons

#

Will just have to be mindful when doing stat balancing

#

I spend so much time theorycrafting my mods...... no wonder this has taken a year to get to this point lmao

vast pier
vast pier
#

Different materials being better for different parts

vast pier
#

Fancy wood club

#

I foresee the implementation of dynamic melee weapons to be easier than it has been for guns, so I haven't bothered messing with them yet

vast pier
#

I feel like I remember seeing something about being able to have floating point outputs in recipes?
The example showed a recipe outputting [1.7] m9s or something of the sort ?
I can't find the original message(s)

#

@silent zealot I think you might have been involved ?

silent zealot
#

as in, a floating point number of items?

vast pier
#

yeah the output of the recipe that was shown in an image had 1.7 of an m9

silent zealot
vast pier
#

I can't remember anything related to it though

silent zealot
#

I mean CraftRecipe output is an array of OutputScipt, and OuputScript.amount is... a float

vast pier
#

I remember it had something to do with the amount of items used in the input of the recipe

#

where the output was based off how much the input total was

silent zealot
#

I assume it's so you could output 1.7 litres of coffee or something

vast pier
#

I would assume so yeah, but it was being used for an item, not a fluid

#

I'm trying to find the original conversation but can't remember enough to use the search function

#

it really bothers me because this niche recipe functionality could be useful for some ideas I have

silent zealot
#

This si what I got when searching... not exactly helpful πŸ˜›

#

try it out and see?

#

I would not be suprised if in reality getAmountInt() is used, or the float is converted to an imt.

#

At least when it's a inventory object

vast pier
#

This is aching my brain so much because the important part of the recipe I am interested in is the fact that the player could change how much was being inputted

#

which would directly affect the amount outputted

#

but I can't remember who sent the recipe screenshot

vast pier
silent zealot
#

Fun code quirk of the day: A character wearing combat boots isn't just cooler looking than a character wearing sandals and a fanny pack, he runs faster.

vast pier
#

Maybe i made it up in a dream

buoyant violet
#

idk if you mean exactly system to implement that black but, thats exactly 3 features that are on the framework morrojoy

buoyant violet
#

my AR15 family takes like 15 mags and they can be loaded with mix of ammos

#

imma record a video

#

its time to do some marketing

glass osprey
#

marz gonna deliver us with the next big firearms mod

buoyant violet
#

while I do have a weapon mods in the making

#

I mainly want to provide a framework for other authors to use

#

its kinda to create a little bit of a compatibility layer

#

and also so other authors that may not have the coding skills can have a set of tools to implement cool things

glass osprey
#

i think your vfe fork and firearms are the only working packs without a bunch of bugs in them rn

glass osprey
buoyant violet
#

VFE is a mess because its a port haha

#

but my own firearmas mod will really have creative freedom for me to implement cool things

willow tulip
#

(I feel like silencers are more ammo size specific and less gun specific)

buoyant violet
#

one example hee

#

mix ammo inside of the magazine

#

cue look at the tracers and the subsonics are manually rack to extract

glass osprey
# buoyant violet

i think its probably going to be niche and might not see too much use but thats still really cool and should definitely be implemented

buoyant violet
#

I came to the conclusion tha the average user just wants tons of content or weapon without much consideration on this details

#

but still its more of a project for Myself than what the users want

glass osprey
buoyant violet
#

yes

#

RAF is included in the framework

#

a new version of it

glass osprey
#

looks insane there

buoyant violet
#

and that all im sharing for today

#

thank you for listening to my TED talk

glass osprey
# buoyant violet

im assuming without using the ammo loader itll either auto reload with whatever you have the most of, or what you set to as preference, or what would most commonly be used?

buoyant violet
#

so for auto reloads it defaults to the standard ammo

#

of the weapon

#

one last thing is, modifyin stats on the fly on weapons. Ammo does it, also example here the stock look at the console im doing an example of changing reload time, when folded is lower when deployed is another

glass osprey
#

i think the ammo box on the m60 could probably get slightly more work done to it

buoyant violet
#

no more changing to a whole new weapon for something like this

buoyant violet
glass osprey
buoyant violet
#

VFE does it

#

but I dont want to rework the whole system for a mod that is not mine

#

(will be gone when the official releases)