#mod_development
1 messages ยท Page 99 of 1
I didnt know if I was allowed to add the link.
This chat allows it . Other chat u cant
@sour island
is it ok to add this compatibility for lootzed and low screen resolution
require "ISUI/ISPanelJoypad"
local ISPanelJoypad_initialise = ISPanelJoypad.initialise
function ISPanelJoypad:initialise()
local screenH = getCore():getScreenHeight()
if self.height > screenH then
self:setHeightAndParentHeight(screenH)
end
return ISPanelJoypad_initialise(self)
end
thanks by the way!
Gave you an award for good luck
LootZed has a window? I was trying to figure out how to use it
It is it has a panel
Enable cheat, right click on container in inventory pane
Ah
Thanks!! your mods are awesome btw FunctionalChainsaw is just epic ๐
And what's going on? the window pops off the side?
It expands beyond the limit of screen and the close is outside (below) screen
this is weird
ERROR: General , 1675198106115> java.nio.file.NoSuchFileException: /lua/EasyConfigChuckedServerConfigs/servertest_config
the file ran away ๐
Did I mess up something to cause this issue or?
You have to manally delete the file - the system wants it dead but doesn't get the 'Lua' right
default issue
same happens for server statistics debug, but it closes now when I click again on button
i just deleted the host and started a new one
That's a good general fix
You just need to delete those files it mentions - still not sure why it does that
Resolution adjustment is always a pain
Wish every panel is resizeable
Scrollable
Wait jab was writing a css thing
I mean, just have a bigger screen 
It night improve all the panels
But what if its a preference
moving it resets the position with in the bounds but it's too big to fit lol
To have the portability
I was being sarcastic ๐
Might need to reduce the H. Does it really have to be that tall
I know it shows a list of stuff but item picker doesnt share the same problem
Mybad
well my host doesnt work lol
guess ill just hijack the dedicated server to do some testing ๐
but no error...
LOG : General , 1675199007514> SERVER: info@alpine shardop mode enabled
LOG : General , 1675199007514> SERVER: status@UI_ServerStatus_Initialising
LOG : General , 1675199024430> SERVER: process-status@terminated
@sour island are you trying to do something like what I am working on?
Ok. Been curious.
the goal was just a debug panel that opened and closed windows using the buttons - but half the UI beahves slightly differently
I firmly sit in the "rewrite" camp
Some were missing sub function calls
Like just rewrite the entire lua folder?
Definitely ISUI
If I had the time I could rewrite the codebase.
As you say the UI are slightly different
A lot of unexplained table structs and deprecated / dead code.
@sour island global name for util table?
Some pseudo fields are shadowed too..
Actually not sure about the structure but I was thinking that stuff should be a module
While that would probably be the best course from a programming view, I'm on the fence for a "patch" to basically scrub the vanilla code
It's a perspective really.. can't ask to simply rewrite a decade of work.
I was going to repo the lua folder to check for changes on releases but it's 30MB+ and I'm not sure if that'd go against ToS
Otherwise you run into the same issues some mods do when vanilla changes stuff and there's no way to tell
The Typescript was an unspoken gesture to modders and the devs to lift parts of the Lua code to Typescript over time as a means of cleaning up the code.
It was a way that I could make this sort of project realistic.
I'm not really familiar with typescript but how would it be different to rewriting all the Lua files?
It's foolish though to expect that to happen.
Typescript has guardrails and type safety
Like conceivably the entire patch could be 1 giant Lua overwrite
It enforces consistency with types.
hm, is it ok to have different commits in pull request?
I don't expect humans to keep track of code this big.. and almost no one documents their code.
Yes the PR is for the branch itself
That is true, and I could have been doing a better job of documenting changes - as in why/how
I can tell that you care about the quality of your work.
Even still, less opportunities for human error is always a good thing.
True
Would it be possible to adopt typescript later or would this be something to do now?
Ten years and many hands on code can really challenge the ability to keep code clean and bug-free.
Both.
You could type one file and have it work with the rest.
It compiles to Lua
You can write interfaces to call native Lua code.
The two caveats ATM is TSTL class metadata not working in a friendly way with PZ's class implementation in Lua and my types generator not seeing 100% of the PZ Lua code due to different code patterns.
(both being things that can be worked out)
Hopefully this helps clarify my position on the matter @sour island
It does
I was able to upload the vanilla lua as a repo - much of the file size was due to translations which gitignore can skip
Thanks for entertaining the idea. I can eventually look at your project and possibly make typings for it.
I don't mind anything that can help - I'm just wary of another new language or tool ๐
If I new how gradle worked I'd try to make the libraries process basically an exe or plugin for intelliJ or other platforms
Heheheh.. Spending 7 months on a project to approach the same problems that you are working on, I'd have to at least let you know.
Heh. I roughly know gradle and I know Kotlin.
maven too.
gradle is pretty tough for people new to it.. heck it's still mean to me.
I should have both groovy gradle and Kotlin gradle scripts on my repo if you need to take a look and see how at least I'm using it.
x)
Are you using them to decompile the game as well?
No. I do this manually.
Each Java container I decompile I clean it up and remove decompilation errors.
okay i've gotten as far as setting a tile to light up on left click from player. also don't have a problem in assigning a location to be a specific object. but now i'm struggling with detecting the light source and essentially undoing it... any ideas? or a way to store the previous value from setting the light so i can set a toggle that changes that tiles specific values back to rgb 0, 0, 0, light strength 0?
I could write something like MCP for PZ where the code is decompiled then patched to compile automagically.. but that would be the easiest way to get nuked by the devs.

I wouldn't see them as lenient on such a tool like Mojang was for Minecraft then.
we are close to not even caring about room defs when it comes to using lightswitches lol
At some point CAPSID could run the game through intelliJ for break point use
I stopped doing that though
I can do that but it requires stupid amounts of tweaks to do.
hasn't really hurt me not having it
Not sure though why one would need to decompile the entire Java code for the game.
If you know your tools, you should only need to do it fully when modifying it.
I use it for intelliSense
The old CAPSID/PZDOC project still works
I know that a few Lua containers in the PZ code say they were generated using IntelliJ
I imagine that's what the devs use for that to appear
Probably.
Hahahaha I really need to stop playing the same drum beat in my head of.. "Oh.. yeah I have PipeWrench."
But the PZ-Libraries / CAPSID/PZDOC decompiles the classes and makes Lua referenceable classes and functions from what's exposed
i can confidently say that those java libs have been half the reason i even understand how to code in lua with pz lol
then again i am a noob mcnoob
That's what concerns me about PZ modding.
fair enough LOL yea it's tricky
It's a steep learning curve.
i do research for around 6-8 hours a day almost every day in my job so i'm just used to having to do way too much research to get a simple answer ๐
It's pen-testing, ethical hacking practices and reverse engineering knowledge that got me over the hump easier.
i thought about easier ways though. i'm trying to document as much as i can to gather a crap ton of use cases for other noobs atm
You know it's funny..
I've said it several times in here now however I wrote a format that allows people to write 3rd party documentation for my TS environment.. Perhaps I can extend a branch over to the Lua community to have that forwarded.
the more examples i can gather the easier it should be for someone new to pz to jump right in with a crap ton of examples
ooo
Who better to document the code than the people who use it the most.
sometimes i have chat gpt document things and then i go back and reference how it's used and will write my own notes lol. i love that idea
it would be sick to see some good documentation
or at least decent
One sec.. finding the same silly picture i've posted here a hundred times.
It is neat seeing the changes between branches using github
alot more tweaks than I realized
between 41.71 and 41.78
It's neat seeing PZ's API changes in my git diffs.
It's a resource that roughly no one knows about. :3
What's that look like?
We see all changes.
Like a hosted decompiled src?
Nope.
Ah for your own project
It'll show you the changes in PipeWrench's typings that reflects all API for the game.
You're looking at PZ's API calls being modified, removed, added, etc.
@iron salmon Is hosting the game's lua files on GitHub for change tracking against ToS? https://github.com/ChuckTheSheep/ProjectZomboid-Vanilla-Lua
You don't see this level of detail for patch notes.
I've seen people host decompiles on github.. also with cheats. I've reported them and seen nothing happen.
It's generally bad to do this and legal action is definitely something if the offended party cares enough. (And should honestly)
For the modified java stuff/cheats?
For hosting decompiled code publicly and for hosting code that exposes / contains PZ's Java code along with hooks for cheats.
All you can do is report it.
The only reason I cared to know about these repositories is because of the anti-cheat patch I made last year.
All of my sensitive research of the game's networking protocol and file formats are private repos. Only I and a few trusted are able to view / push code to it.
IMHO if you ever get that deep @sour island , keep all of that stuff private and locked down.
It becomes nightmare fuel if you expose a vulnerability to the game and it gets leaked. 
This is the lua that comes with the game - unless you mean the decompiling stuff
I mean Java stuff.
Hard to prevent people with enough know-how
Can't do anything about that on its own. You can do something about it if you can modify the game to prevent exploits.
PZ is a great sandbox for when these sorts of issues pops up every now and then.
Great security practice / exercises. A buddy of mine is rewriting some of the network layer on his server.
I should also mention - almost 99% of the debug functions don't check for debug or admin, they just trust the UI isn't visible ๐
Oh yeah absolutely.
That's why I had to write sanity checks in the Java code for the ClientManager packet.
Is there a way to ensure one's mod is loaded last?
I'm thinking the patch should overwrite anything else unless they call on the patch
@fast galleon I'm still seeing issues with lootZed btw
ah I think the issue is when changing window size after opening lootZed
yep that's it
there's also issues with other windows being kept off the edge of the map
The screen?
Yeah
if you change your window size layouts are maintained regardless
even the inventory is off screen
I notices the statistics was too big, but it probably needs to be bigger as it have more elements. I just had that fix for lootzed already.
True.
Nah it works - the issue was how I was testing it
or well, how I tested it revealed more issues
This is honestly a good candidate for !patch
rather than debug tools
But I'm starting to see having 3 separate mods might be more confusing/work ๐
Would have to make each sub-mod compatible if it touches the same stuff
lootzed is debug tool, so it felt more appropriate.
Yes but this is an issue with all windows
with debug tools?
Haha
That reminds me.. I'll probably release a fancy mod loader for server-specific mod content to the public.
It's a simple request API that bounces code from the server to the client, all written in Lua code. It's useful for reloading content without rebooting the server.
resizing is something addressed by me
and there should be no overlap between the different mods
debug tools depending on the framework is perfectly reasonable
I'm just curious, how hard would it be to make a mod (with absolutely no knowledge) for escape ropes to take less time to climb?
Its pretty specific so I don't think they exist
relative question really. is it possible? most likely. really depends on the effort you put in to learn how that stuff works or if someone is willing to give you exactly what you need. here is the timed action for climbing sheetropes though. you can use this to trace whats used to determine how you'd need to edit it to your specifications. other than that i'd check the pins for guides and stuff to at least get a basic understand of what you are even doing though.
here is the vanilla lua code for timed action for climbing sheetropes.
here is a guide on making mods
https://github.com/FWolfe/Zomboid-Modding-Guide
other than that, once you start making headway into understand anything at all. ask questions here and you will start to make sense out of it all
there is no "one size fits all" guide though.
also almost all links for most guides out there.
#mod_development message
Climb sheet rope is a java state, mostly locked.
now that you mention it also. i dont think there is many ways to speed up char is there?
I think those are edited by changing the animation XML though.
hmm
I'll probably just leave it for now xD
I'm taking a java course in school but I got no info on LUA and its a relatively beginner java course
still fun to try stuff out though really
Probably
I tried learning c# which I got to like a beginner level which helped me get ahead of my java class but my teacher isn't the best
For now I'll probably only make a mod if I want something that I can't already find
The rope isn't a huge deal :)
well if you get bored, i challenge you to try to find way to do what you are trying
some concepts (unless someone smart like poltergeist or other tells you otherwise) it's fun to come up with out of the box ways to do things
Yep, thanks for the advice though either way
Yes and the mod ladders by Co' work perfectly , I never stopped using it in multi
Can someone remind me of what exactly broke radios?
Something about the location of players being taken out correct?
From what was said yesterday if someone logins in away from someone else they can't speak over radio until they get close to eachother
Ah so the client A doesn't know that client B logged on.
Looks like it'll take a deeper dive for me at another point in time to investigate and produce a fix for it.
yea and it was tied with the fix for playerlist to non admins
I believe that either location data or a channel listening list / array isn't populating or isn't calculating due to the missing info.
not sure if directly related but it was all at the same time
Someone offered me a bounty for this so if anyone else is interested, there might be some people happy to fund this as a community-patch.
I'm not rly interested in this patch being a commission.
It's a fun problem though.
A fix like this should be for everyone tbh.
the range is also 1k almost exactly btw. if you outside of that range upon login is when they dont work
I've listed my initial suspects for what's causing this. =)
Either location-based or login-notify based.
Makes sense that it could be both.
I'm having trouble adding a custom sprite to the world using Lua. I:
- created a custom texture pack (
testpack.packmade fromtestpack.png) - created a tile definition (
testpack.tileswithtestpackadded) - added
pack=testpackandtiledef=testpack 896to mod.info
When I load in the sprite using the name testpack_01 as the name, it's blank.
However, using the sprite name of e.g. location_community_cemetary_01_31 works (and shows a pole).
Any suggestions?
have you tried just using the tile painter to see how the tile looks from the tile manager?
in admin or debug you can goto cheats and use tile manager
then right click and use the tile manager and search for your tile pack
if you see anything wrong in there, then you def setup the tile pack wrong. also try a high number for your tiledef identifier just to be safe imo
pretty sure you can use up to 10000
Thanks for the pointers, I'll check. ๐
Oh cool. GameMode enum now.
also tile.pack goes into texturepacks folder inside of media, and the .tiles goes right into media. not sure if you did that
OK, so I see the tiles in the tile manager. I figure I must be using the wrong sprite name/texture name?
Tile Manager as in the one in Tilezed, or some debug system in game..?
admin/debug
Hey, how are you doing?
I'm new here to this discord. But not the game itself.
Anyway. Have you guys tried the "STALKER Functional Exoskeletons REFORGED" Modification?
OK, found the issue. I was using testpack_01 and it should be testpack_1.
Finishing up decompiling and cleaning up the ZomboidRadio class.
Cleaning up compiler artifacts..
I also did a thing
tying into a 'onResolutionChange' event
but it's breaking windows lol
Ah, I'm sowwy
all good just get more responses there ๐
The table that you send to UIElement should have a function called ```lua
function MyElement:onresize(oldW, oldH, newW, newH)
-- ...
end
It's hooked into via Java-side.
is that resize of the element or resize of the window?
if (this.getTable() != null && this.getTable().rawget("onResize") != null) {
LuaManager.caller.pcallvoid(
UIManager.getDefaultThread(),
this.getTable().rawget("onResize"),
this.table,
this.getWidth(),
this.getHeight());
}
onResize.. mb
Been a second..
I guess this one only sends the new width and height.
I think the issue is trying to make every isuielement follow the rule lol
going to scale it back to the debug windows themselves
Just letting you know that's a thing.
it's when the element is resized
there's this - function MainScreen.onResolutionChange(oldw, oldh, neww, newh)
and a few other windows have this
but they're added into the event
Events.OnResolutionChange.Add(MainScreen.onResolutionChange)
it's not a default behavior for all windows
Ah. Mixed em up.
One thing I really dislike about UIElement Lua hooks: the color order of parameters.
ARGB in Lua but RGBA in Java.
Should be RGBA IMO. Me thinks a TIS developer who wrote the original interface for the Lua side in ISUIElement previously worked with DirectX.
more likely to change A than RGB perhaps?
Oh the order is up to the person implementing the API.
ARGB is more the norm in DirectX land.
I meant if you're changing alpha more often, typing out nil, nil, nil, 0.8 could get tedious
although creating a sister function would be wiser in that case
There's no null checks for individual color values on the other end of that call.
(At least that I recall. I've been modifying these draw calls on the Java side as of late)
Oh wait.. There's a static tempColor object. My guess is the last colors are used.
Sort of dirty code there IMO.
It's bad to uhh sanity-check render code calls.. otherwise I'd say to absolutely do that. =(
assert all the vars..
Going to try and do something dirty my self ๐
if a uiElement has no parent try to fit it onto the screen - and then apply the same logic for all its children but instead use the parent in lieu of the screen size
When a person comes into range of a person with a radio and then goes outside that range, does the radio act the way it should or does it break?
I'm not familiar with the issue tbh
Okay. Thanks.
@drifting ore
Nippytime โ Yesterday at 7:27 PM
last patch or so
been around for a few months now ish
most don't notice because they logout together when they play together
so when they login they are within non radio range and the radios work fine
but if you login out of 1k range they dont work until you meet face to face
or close to that
@red tiger
Thanks. Answers my question so far.
Probably this calculating it: ```java
private boolean DeviceInRange(int var1, int var2, int var3, int var4, int var5) {
return var1 > var3 - var5
&& var1 < var3 + var5
&& var2 > var4 - var5
&& var2 < var4 + var5
&& Math.sqrt(Math.pow(var1 - var3, 2.0) + Math.pow(var2 - var4, 2.0)) < (double) var5;
}
is there ANY way to refresh animations ingame? this restarting is for the damned BIRDS
This is a square radius range check + exponential dropoff calculation.
Also:
private int GetDistance(int x1, int y1, int x2, int y2) {
return (int) Math.sqrt(Math.pow(x1 - x2, 2.0) + Math.pow(y1 - y2, 2.0));
}
Redundant though because IsoUtils?
ZomboidRadio is weird. o_O
So I'm thinking the issue might be on the client-side.
I'm saying this because the code for players and their radio devices looks to be registering just fine.
My guess is that players receiving signal data when logged in and out of range don't have a device instance ready to handle along with the signal. =(
The game will reload animations and actions for me when I start the game with "-nosteam -debug"
New stuff needs a restart though
it does NOT for me and i AM in debug
i'm trying to fix a twitchy hand animation.
and it's NOT working.
:/
It only works for me when I "-nosteam" it too
Yup. I personally just symlink it from workshop to mods so I can switch as needed
a /J symlinkl?
Oh, I'm on Linux. I'd have to look it up for Windows. Ha
mklink Link Target
Use /D when you want to create a soft link pointing to a directory. like so:
mklink /D Link Target
Use /H when you want to create a hard link pointing to a file:
mklink /H Link Target
Use /J to create a hard link pointing to a directory, also known as a directory junction:
mklink /J Link Target```
oof.
Ah, /D or /J work here.
PZ Java code needs to calm down with condition block conditions
Hahaha
I think I just verified the cause of why radios break from the update. =)
did all that and the anim still wont update.
@drifting ore I think yall were spot-on with the cause of radios breaking.
Are you using ".x" files or ".fbx" for your animations? I've only ever tried with ".x" and the action xmls, maybe doesn't work with ".fbx"?
when the window is resized
Not that I know of that works
well not we go BACK to the issue i have lol.
Oh yea?
however if i remember correctly didnt the entire lua reload when changing resolution
Yes. I did a code dive into ZomboidRadio where I suspected where the issue ends up affecting things. I then went to the packet code for player info being sent to the client and this stuff seems to line up.
Explains why giving admin fixes it also since admin has access to players
I don't believe so - changing the window only calls for certain events
This is a very good thing.
I tried applying my resizer function to all elements but it breaks a few things lol
im still think thonking how im going to deal with it automatically
Question: Is there a way to override item category from Base, doing so in mod does seem to override item, but leaves item category to what it is in Base?
anyway i already scale my uis to the resolution
Only problem in my case is I use cheat menu and it gives access until dc after you get elevated privs
Unrelated?
Unrelated
would just be a matter of tying the position calculation to the event
Nice
All I need to do is push player data to connecting players. (I think)
When I design UIs I usually make everything scaled to fit the size of the window - it's nice to be able to just change the size of the window and ahve all the children fit accordingly
Just one push
yep
Player wave signals are tied to player instances which populate based off of the server sending player data via request packets. =)
but i take it a step further with
local FONT_SCALE = FONT_HGT_SMALL / 14
and everything scales off this
this will be a key part of the new ui system too
@drifting ore Are you able to test a patch?
no more broken uis with different font sizes
Just to doublecheck, changing the 'name' field in the '.info' file during an update won't mess anything up, right? Mod won't get deactivated? I'd hope nothing uses name for identification when there's an 'id' field.
14 is the height of the small font at 1080p btw
What's up modders? Modding hard or hardly modding?
Same - I account for font height in my windows lol
I can shortly when I get back
I'm not sure if I can produce a patch at this time.
I'll interpret this as modding hard
Am I silly? I must've misinterpreted the issue.. Is it that the radios shouldn't be working in a non-radio range? (>1K tiles)?
@drifting ore
I read that description of yours and somehow inverted the logic
Going to take a break from it but I have more understanding of the networking and updating of radios so maybe I can still fix the actual problem lol
Radios just donโt work as normal if you log in to the server over 1k tiles away from another person who logged in. If you never meet face to face or a reasonably close distance at least, (not sure exactly) then you will not be able to communicate over radio
Oh okay so it is like how I originally read that.
This isnโt all exact btw, just roughly my findings after 2 days of testing
Okay well I can patch one file.
Got it working on all elements
tries to match x/y/w/h when possible
children are scaled to the parent
I wonder if I can tap into fontsize
Now users can play on their apple watches in peace
I can see that you're having fun.
Okay @drifting ore I sent you a DM with the experimental patch.
Just wait until I get my CSS code for that HTML project working to support activating / deactivating CSS rules when adjusting the screen size.
Bootstrap when?
<150
"reality bubble" around a player
when you go to use a walkie it should work up to the rated walkie range (though i don't care if this is lost and they just work globally across the map), but instead it only works if you've met up and they've entered the reality bubble first - this information is then lost on death or relog, so you have to meet up with your team of people every time you wanna talk to them and every time you die and any time you relog.
works for admins tho.
same with getOnlinePlayers also
done around same time
but afaik not directly related, just same reasons
So I'll explain what the patch does. It disables a condition block checking if either the player requesting a player's data is staff or is in that relative bubble. This data request is IIRC requested after either the player enters as alive after death and login.
He been doing it today haha
A player doesn't receive the data otherwise. The radio engine (which covers walkies) handles the requests and incoming radio data by reflecting on a players list for the client which is affected by not receiving that player data.
the weird thing is it gives you the list for the scoreboard
i guess it's not the same format or storage location
perhaps lacks the positions
I can't test this patch but with what everyone has said breaks and unbreaks this issue, the check I disabled has all of those conditions.
I'll DM you it.
tyu
If it doesn't work, oh well. Can always look into other code.
But with three hours of reading into logic and following it throughout the client and server, I think this has a chance to work.
based on what i know about the symptoms what you described sounds like a very very likely candidate
๐ค
I think multiplayer was a big misunderstanding.
This map is like... bigger then the state of texus and Altis from Arma3 combined... and yet there's nothing here but all these zumbebs.
The secret java men is holding us back! No wonder this feels like a simulation!
That being said, it's honestly impressive that this game had any sort of clean multiplayer implementation down the line.
Typically when you plan for multiplayer, you better program that shit with it in mind from the start.
(It's why I always make systems in mind with this just in case.)
And this is what drove my endless supply of insanity energy to make Typescript modding a thing so I can plan and scale with proper OOP.
Outside of the fact we are decompiling the game itself, and legal, what's stopping us from going all open source fu on this?
Lawsuits.
Well, not exactly what I mean.
But some wack job made skyrim multiplayer.
There's a lot of access to internals.
I originally found out about this game in 2012-2013 because friends asked me if I could mod multiplayer. Real story.
nice.
As for multiplayer and desync... mmmm
Netcode and the architecture, how things are programmed.
It's p fuckin important.
Yeah. A buddy of mine is rewriting a lot of that under the hood networking stuff to be multi-threaded with RakNet.
usually when a project gets an unexpected late multiplayer, it means they decided to netcode possibly 80% of the game state into the server.
Which even small games can choke on our copper cables.
Oh, and yeah, single threaded, we might be 32 bit still?
If you want my opinion on PZ with multiplayer, I say that the server code and client code should be separate for all entity classes in the game. AKA ServerIsoPlayer, ClientIsoPlayer, and a commons abstract IsoPlayer.
Shit is cave man tech at this point.
Well.
Normally, both the client and the server should interpret the same entity differently.
And pick and choose very specific things to replicate.
The server should be running exactly 0 code that has to do with rendering and animation and visible states, for example.
Mixing the code with isClient / isServer checks throughout easily gets messy.
In Lua, yes. You need to program from the ground up and put it in the respective folder.
(It's a critique, not a stab at the game)
When I work in Unreal Engine, we have the benefit of replication so the engine sort of does everything for us, but funny enough, it's extremely easy to break it too.
Because we have too much control.
I've made quite the list of critiques over the past decade of modding and playing this game. The big difference though between me and my friends / others I know who have their opinions is that I acted on my critiques by writing tools and examples of how to overcome those problems.
I'm more of a build from the ground up sort of person.
It's very awesome the passion people put into very long projects like these.
Architect?
But making a project at all, you need to plan within.... 4-5 years or so.
No, star citizen is not a game.
It's a fucking experiment.
It's not following any principles of game design or industry at all.
I still like that PZ was daring enough to write their own engine.
It's a big plus IMO.
Oh no like I said, this is a really good game and project, and the love over huge time is great.
But we have a word.
And everyone hates it.
Sometimes a pity, but one all tech boys must weep from.
Technical Debt.
Avoid it early, avoid it often.
Practice safe programming.
Or you'll pay for it later.
In child support.
A lot of words to simply say "Plan ahead" xD
Ye.
I wanna see a pre production plan.
Before a single line is written.
I want.
M A C H I N A T I O N S
I wanna see an army of modders writing in Typescript.
Hahaha
C# is better then lua technically anyways.
Typescript is a language designed to compile to other languages, mainly JavaScript. It can compile into languages like Lua with third-party projects.
Lua is great for simplicty, starting out, and game scripting purposes.
Honestly really great, like... I'd honestly do what blizzard did and just straight up have UI be written straight in Lua or some shit like that.
It's a big language in the web industry / node.
C# is the daddy's house of OOP compared probably.
Everything is absolutely fucking strict.
You better know what metadata is.
Lua is good for small-scale things.
Nothing bigger than a few thousand lines at most IMHO.
Anything larger needs structure.
Yeeee.
It's possible in lua and I really like it.
But the whole point is simplicity.
Keep it's endpoint similar in scope.
PLUS.
It's amazing for teaching programming too.
That's whyyy I'm writing my HTML render engine project in TS.
Just basic principles.
Love2D I think isn't too bad for that sort of thing. Learning how to do something in a no-holding-hands environment.
Can actually make something without worrying about
class structuruurres
muh
metadata constructors I gotta make on my owwwwn.
Thought Python was really gunning to be that language.
It ended up being too inbetween, and not worth in performance.
BUT
I've seen so much use in technical stuff.
AI, web, complex stuff.
Now of course.
The 5d kings gambit of mainline programming.
C++
If you can work it, and you can reliably go from A to Z on project with it.
Absolutely killer.
But it takes some time and while C# helps, it's not all to it.
C# I'm p sure was made to be the simplification of C++.
Or at least, not take 4 years of the programmer struggle to find good practices and methods of doing things.
Def one of those things you slowly want to transition to once the feet are thoroughly wet.
If you want to play the dante must die mode of programming you can try out ass fuck or whatever the name of it is.
Here's piet code that interprets brainfuck.
As reference material.
any ideas?
Hey @sour island do you have a second for me to DM you?
Is it difficult to create a radio mod that is just text?
not very difficult, but tedious
follow this guide https://www.youtube.com/watch?v=iv7N7gmowWU
hello everyone and welcome to my basic tutorial on using wordzed!
Here's the link to download the program -- https://drive.google.com/file/d/1vY-08QJBIzh8gxzIzhGuyLs-RP-CV2T3/view?usp=sharing
If I want our mod to contain a new type of magazine to learn the recipes tied to the mod. What files would I add and what code is needed?
To make it spawn and work?
Define it as an item + what recipe it teaches + the recipe itself which will be learnt from it + Distributions and ProceduralDistributions need to be altered
The distributions have regular lua lists in them so you can just insert your item in them + the chance of spawning
You can then mess around in LootZed to see the spawn chances as a percentage
by golly i did it
encoding....
sorry looks like it's too large for embed
redo!
not good with this gif making stuff lol
so it IS possible. i kinda had a hunch that would work out. awesome work!
yea get this
gifs are ancient, just record a video
0 lines of code

how'd you do that via tile properties? I haven't looked at the code, but I thought I saw that the room lights require a roomdef (which player constructions don't have, right?)
turned the lightswitch into a lamp essentially
with a light radius of 10
just working on the bulb part and im good to go
oh I see, damn. I thought you actually made a "real" room light somehow without code, but that makes more sense. that's clever, although I imagine it may not work as well once the lighting update comes out with B42
that's awesome either way though
it actually works better than the current lighting if i were to be honest. but then again i just made a giant radius knowing the walls block the light anyways
pretty stoked though, instantly levels up my mod
Where do I find templates for these things? Our mod already contains the items and their crafting recipes.

here we go i think this will embed this time
https://imgur.com/a/xoc063B
Will do!
The recipe and the items crafted in our mod is already there. I just need info about making spawnable magazine items to teach them. Not the recipes themselves
which is why I sent you this link lol
may be better https://steamcommunity.com/workshop/browse/?appid=108600&searchtext=new+recipes+magazines
Thx. Will take a look at some of these magazine mods
Okay, I have a very bad idea
I need to remove a player's map_sand.bin file from their local copy of the save every time they log onto a server, because that fucker doesn't update properly
Hey all, I made a mod awhile back but I am really not a competent coder, I was wondering if anyone could help me out because otherwise I don't think I can fix this. I haven't touched the code at all in a few months and I was reportedly fine until the latest update: https://steamcommunity.com/sharedfiles/filedetails/?id=2874678809 Here is also a pastebin that someone put in the comments: https://pastebin.com/EkFTUe6j
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Well i can tell you this much: you are indexing something that is not a table in main.lua on #73
local timeToTalk = zombieData.talkTimer:tick()
it seems like it doesn't work the same way anymore
Ahhh shit... Would anyone be able to help me fix this? I'm not really sure what to do without destroying everything
well you are calling a global timer
from another file of yours
as part of talkTimer
u need to create module instead just require the timer file
it can cause problem due to other mods can use same global name for it
Not really sure how to do it any other way, my code was based off something else because I have basically no coding experience really
I too use timer global name for my timers lib and mb this mate have my mod
in ur timer.lua change timer = {} to local timer = {} and add return timer to the end of this file
in main.lua instead require "timer" do local timer = require("timer")
this way don't have 100% chance to fix it but it can be
cos code looks fine

So any time it says timer, just make it say local timer instead?
not for all, just do like I said
when u returning local table in the end of ur file - u creating module instead creating some global one, after u requiring it (lua returns ur module) and it will be done as local instead global so it won't collide with same global variable
they know even less than me lol
I know nothing
it's fine 
I bashed my head on a keyboard for hours and I managed to make it work
But I don't think I can solve this lol
I assume the "main.lua" file is the issue though
hah
btw yea
better to name each file by some unique name
or just create folder with unique name and then there can use any name of files
btw may be problem with name of timer.lua
too simple name
I think it's more likely to cause a conflict
If I rename it, and fix that in the code elsewhere, it could fix it?
this is sort of pandora's box because renaming a file is going to cause big issues for servers
btw u know what u should never delete any lua files from ur mod after workshop publish, hats off to you
you can replace it with an empty one instead but then it's going to replace all timer.luas with a blank file so it doesn't fully solve the original issue with having a generic file name
btw it's single error that ppl sent u in workshop comments?
I just thought if timer.lua will be problem then error have to be raised on timer:new
Not sure, 2 days ago people have been saying that is has been causing issues
Haven't updated my mod since 21st of October with minimal complaints of any issues
I'm playing with ur mod and 50+ (mb even 100+ idk) other one, it's fine for me so strange bug
at least u just can add condition if not zombieData.talkTimer then return end but it's won't solve the original problem
just a crutch
i'm gonna guess you used another mod or something as your template that also required that same file lol? and those people are using both
The other mod only has like 2000 subscribers, so i'm doubting that is the case. I editted that one to create mine
i mean you just had someone say they are using your mod with no issues
so that is more likely than anything really
Hmmm
there haven't been updates so issues suddenly coming up is absolutely a mod conflict
Like 5 recent complaints out of nowhere :O? Errr, must be a new mod then or something?
Ow lingering uses lua timers? Interesting
Hi everyone
Hello
i just created a code using chatgpt
and wanted to see if this is actually working
local item_id = "item_id" -- The ID of the item you want to spawn
local x, y = 0, 0 -- The x and y coordinates of where you want to spawn the item
local item = IsoObject.new(x, y, 0) -- Create a new IsoObject at the specified coordinates
item:setType(item_id) -- Set the type of the item to the specified item ID
item:setName("Item Name") -- Set the name of the item
item:setDesc("Item Description") -- Set the description of the item
-- Add the item to the world
Map objectMap = getWorld():getMap()
objectMap:addObject(item, x, y, 0, 0)
nope, own lib
Is this code actually legit workable code?
cuz it's helpful on learning if it's actually working code
no
thought so.. cuz there's some methods that doesn't exist on the API
Don't think I can solve my issue then, if anyone could create a fix that would be greatly appreciated, otherwise i'll probably just leave the mod as is since I can't create a fix
as I said u can try to create new files but with 100% unique name (just add name/id of ur mod to name of ur files) and leave empty old files as u did with ur settings.lua file
i just love how active this place is. I really appreciate all you guys for helping
im learning alot
You can try to fine-tune a GPT model. They offer some free credit
Your over estimating my ability to understand lol, I don't know how to do anything
how did u create this mod? ha-ha
copy each ur lua file but give them unique name
true true
So if I make duplicates of all of the files, have it so that all those old files are empty, then add "LW-" before all of the names of the duplicate ones, then anytime they are called in other code, I change them to call the LW- variants, should it work?
also it kinda helps me where to start
hmmm btw I thinking will it can be cause issue for other mods ๐ค
bruhh, bad situation
hmmmmmmmmmmmmmm
but anyway it's single way so nothing to do more
yea, duplicate all files and give new unique name for each, like main.lua > lingering_whispers_main.lua
and for old files do same thing as u did for settings.lua
Hmm, alright
and don't forgot in each file change requiring files
require "timer"
require "settings"
require "talking"
>>>
require "lingering_whispers_timer"
require "lingering_whispers_settings"
require "lingering_whispers_talking"
Ahh okay, i'll see if that works
๐
So it would likely cause issues elsewhere with other mods? Orrrr...?
it won't cause new problems
cos u already have files with bad names and u can't delete them
So editing it also here is what I should be doing?
With this, should I change all "responses" to "LWresponses" as well I guess?
What about line 22, "function conversationLine:getResponse() " to "function conversationLine:getLWResponse() "?
change only global variable
here are responses and conversationLne
LWconversationLine:getResponse()
objectMap = getWorld():getMap()
objectMap:addObject(item, x, y, 0, 0)
in this addObject function is diff.
compared to addobject method in Class GlobalObjectLookup
Which is :
addObject(GlobalObject globalObject)
And I don't see addobject methods in any other classes (Class Isoworld for example)
do "
getItemFromXYZIndexBuffer(ByteBuffer byteBuffer) " do the same trick?
Can I make mod by using lua that force player turn on pvp mode in specific area ?
ye
I don't how function I should use. Can you guide me ?
getPlayerSafetyUI(0):toggleSafety()
getPlayer():getSafety():toggleSafety();
getPlayer():toggleSafety()
IsoPlayer.setCoopPVP(not IsoPlayer.getCoopPVP())
self.safety:isEnabled()
I think i managed to fix my issue
Thank you very much all
We shall see if it worked lol
is it easy to make a patch for a mod if you know what needs to be changed?
oh i can probably look at the code of someone else's patch for a mod
Anyone familiar with smoking trait in PZ? It does some funny things to stress. Didn't find a source of the behavior in zdoc-lua, but maybe I'm missing something.
I got a trait that supposed to remove a bit of stress every time you kill a zombie, right?
local function onZombieKill(zombie)
local player = getPlayer();
if player:HasTrait("Bloodlust") and player:DistTo(zombie) <= 4 then
local bodydamage = player:getBodyDamage();
local stats = player:getStats();
local stressFromCigarettes = stats:getStressFromCigarettes(); -- added in fix attempt
local unhappiness = bodydamage:getUnhappynessLevel(); -- 0-100
local stress = stats:getStress(); -- 0-1
local panic = stats:getPanic(); -- 0-100
stats:setStressFromCigarettes(0); -- added in fix attempt
bodydamage:setUnhappynessLevel(math.max(0, unhappiness - 4));
stats:setStress(math.max(0, stress - 0.04));
stats:setPanic(math.max(0, panic - 4));
if debug() then <long print() here> end
stats:setStressFromCigarettes(stressFromCigarettes); -- added in fix attempt
end
end```
But it keeps increasing stress with each kill if player has StressFromCigarettes value. I tried to bypass that by setting it to 0 momentarily, but it doesn't work. I assume StressFromCigarettes multiplies stress or something
<long print() here>
is
if debug() then print("ETW Logger: Bloodlust kill. Unhappiness:"..unhappiness.."->"..bodydamage:getUnhappynessLevel()..", stress: "..stress.."->"..stats:getStress()..", panic: "..panic.."->"..stats:getPanic()) end
it shows stats before I did my stuff to them and after
(also yes, I temporarily added OnTick event that prints out stress level)
OOOOOOOOH
I think I know what's up
I'll confirm and get back
i believe smoking trait has its own stress value for when you dont smoke
Nah, not that
ah
Well, not exactly
Anyway, this fixes it
local function onZombieKill(zombie)
local player = getPlayer();
if player:HasTrait("Bloodlust") and player:DistTo(zombie) <= 4 then
local bodydamage = player:getBodyDamage();
local stats = player:getStats();
local stressFromCigarettes = stats:getStressFromCigarettes();
local unhappiness = bodydamage:getUnhappynessLevel(); -- 0-100
local stress = math.max(0, stats:getStress() - stressFromCigarettes); -- 0-1
local panic = stats:getPanic(); -- 0-100
bodydamage:setUnhappynessLevel(math.max(0, unhappiness - 4));
stats:setStress(math.max(0, stress - 0.04));
stats:setPanic(math.max(0, panic - 4));
if debug() then print("ETW Logger: Bloodlust kill. Unhappiness:"..unhappiness.."->"..bodydamage:getUnhappynessLevel()..", stress: "..math.min(1, stress + stressFromCigarettes).."->"..stats:getStress()..", panic: "..panic.."->"..stats:getPanic()) end
end
end
in case anyone runs into problems with setting stress when players have smoker trait, you have to substract stress generated by smoking before doing your stff to it, otherwise it'll add smoking stress on top of what you set, so effectively, every time you set stress you duplicate stressFromCiggaretes value
hm i gotta fix all my setStress() now
cuz it duplicates smoking stress at the moment

Sounds like something good for the community framework ๐
Is it cuz if your mod? Btw you dont need to use ontick for print
You can just ipen general debuggers all stats are there
Can you fix my stress too? 
It doesn't help if I want very prcise numbers right before and after my code runs
So no, I need onTick print
Ahhh got ya
yall
what does a basic custom timed action look like?
actually
i could prob check the game's code
but im lazy af

and it's full of shit the basic one might not need
Id the stress is comming from your mod then just create a reverse value ontick
If ever
Or not ontick i think stress has an event too
Goodluck with that
๐ cool
then do it 
btw I can give advance print module (to print not only string but table/array) and benchmark module. mb will useful for ur git repo, idk
Sure, what's a bench mark module?
to test performance of different ways to do smth
local benchmark = require("benchmark")
local getmetatable, type = getmetatable, type
local string_meta = getmetatable("")
local str = "string"
benchmark({
["equal"] = function()
local x = type("abc") == str
end,
["meta"] = function()
local x = getmetatable("abc") == string_meta
end,
}, 10000000)
btw strange but meta should be faster but seems not in pz 
local tbl = {
["abc"] = {true, 123, ArrayList.new()},
}
local array = ArrayList.new()
array:add(tbl)
array:add("abc")
array:add("blah")
local tbl2 = {true, false, 777, array}
advance_print(tbl2)
--[[ output
{
1 = true,
2 = false,
3 = 777,
4 = [
1 = {
abc = {
1 = true,
2 = 123,
3 = [
],
},
},
2 = "abc",
3 = "blah",
],
}
]]
don't look at almost same functions in advance_print, was lazy to merge in single ๐
This is a stress test?
Damn thats useful
So this is based on client specs?
just good looking print for tables/arrays
I saved as snippet for future use if ever i need sonehmthing like it. Could cone in handy
u can print array not it will in one line, for tables no print at all
first is benchmark, no depends specs cos u just compare speed of two functions
feel free to add those if you'd like
I think those fit in debug tools more so than frameworks
sure
trying to debug twitch integration for EHE
I think I have EHE running in the client's server (???)
and managed to get twitch interation running in the server's server
sure
Normally occurring events show up in console
twitch fired events show in in co-op console
and all the code is in /server
so I'm kind of confused what I'm doing lol
the idea was it fired in /server and updated clients over time - but I suppose I misunderstood server/client again
OnTick fires for servers though right?
OnTick should work everywhere
Trying to figure out why the twitch fired events launch but don't seem to update
also all this server but not actually server stuff is breaking my brain
ah the update loop is running
on co-op console
it's just giving any info to the actual players ๐ค
his typing again
chuck i have an modding related question
what code you use to make the helicopter move i want help my friend to make superb survivors work in mp
like making an moving object
I don't think the two can be corelated
yeah i know but i want make an npc like meta event soo it can spawn in mp
why no one want help me in the modding part
Can't help if you don't start - also your idea is pretty complex and is literally a several year long endeavor
Scripts
And an item texture. Alongside a worldmodel if you want them to appear 3D on the ground
Ahh man.. Sad that last night's experiment failed. Also, good morning.
Morning
oh yeah
Hopefully me and my bud get some progress on our windturbine mod today after studying the Lua mord
i see what you mean from a mod that adds items
that kinda seems like it's too simple though-
Reference existing game items and such. When i come home i can explain more in depth. Can give you the turbine alternator item I made as example
sure, i have work soon though so you can dm me it and ill take a look after work
would appreciate it a lot
Started working on complete guides about PZ modding for PZWiki. What articles you want to see? (I will try research all sources and create complete guide)
Hmm. Hardest things to get started imo is gathering up that documentation by hand. It's what got me really slow to run around.
you should have different types of levels
such as for "beginners" how to do basic timed actions or basic custom items
Do you need community help?
and the higher level you go the more it's built upon
to add custom functionality and such
I've personally documented over the years where I need.
it would be SUPER helpfull
cause it's not like i suck at lua (i have 2 years of experience) but just getting started with modding a game with little to no real documentation is really hard
I can forward documentation to PipeWrench (The Typescript modding solution)
I will need help with correct my English text ๐ Because I will write in my native lang, and then translate to English
so slowly letting players follow from start to a finished mod would inspire a lot of people
This is a highest-priority focus for my own work so I'd like to get involved.
Also will need help from car modders and map modders
Yep. Basic example scripts like my "make all zombies explode on death" are great ways to get people to go "aha" on a lot of very key things.
@faint jewel
exactly
never expected adding items would be this simple though
Writing the thought process going through it too, all that.
hot damn
?
yaml is like json but I don't have to cry.
whats so bad about json
Alteron This is what I'm working on. I have an application WIP that documents third-party and bakes into my typescript definitions.
rip the ping
Yeah. Apparently that role is disabled from pings.
That's.. disturbing lol
lmao
What is this?
I created a Typescript modding alternative that compiles to Lua last year called PipeWrench. This allows modders to mod with strong types, type-safety checks, and OOP provided by the language.
PZWiki has a link to the project.
also you should also show the optimal way of organizing your mod's folders
because some people may have questions like
"oh should i put this in a seperate folder"
This program allows me to create and export documentation and further clarification of types for the Lua code.
or "whats the best folder layout"
Honestly the documentation exporting is already a huge plus.
If you want to see the whitepaper or the repositories, let me know.
Like I said, one of the biggest things atm is a lack of docs.
Can you send me example of mod, done in TypeScript (before compile to Lua)
Sure thing. One moment.
@red tiger Also I think Ii will need your help with guides about TypeScript modding
Anyone know where the game decides that your off-hand hammer (and I'm guessing many other weapons) will be carried weirdly?
(Honestly hoping maybe Aiteron knows, trying to grab a screen.)
(But I hate pinging pros lol.)
Yeah I can do that. This is my baby after all.
We do automated generation of PZ's Java and Lua API.
(We see every API change in Git diffs)
You mean incorrect model show? Or type of using weapon (onehand, 2hand)?
I'm actually a recent modder here so I got that first eyes view on things too. Without proper documentation on available functions (and best practices using them for certain things, like ui, actions, loot, item creation, exc) you pretty much have to effectively decompile and dive into code using resources from the work of other modders, and mostly take from other mods as examples in general.
Dunno if anyone else thinks the same though.
So, that's why I started working on modding guide
yessss.
Wow. GitHub is so slow for me right now.
Hmmm. Try ask in modelling chat
Instead of pointing down like you're about to hit something with it, it points awkwardly sideways
i know the issue.
makes dual wield mods look wonky
the stupid bone.
Can it be easily fixed or not? @faint jewel
But yeah, I think getting very common example code out there, writing the process as if teaching (always good to teach people how your game works!) will go a long way for people to get started.
if you redo ALL the animations to rotate that bone lol.
๐ฆด
me trying to figure out timed actions from scratch (confusing af)
never done timed actions
You mean e.g. standing, running, etc? @faint jewel
Me neither, and timed actions actually sounds like the "most" documented thing too.
but yeee
all of them.
Good luck with it all @ aiteron.
i THINK you might be able to make a seperate model for the offhand though.
haha right but how many weapon carrying animations are there really? 4? 10? 120?
probably around 40-50
@tame mulch This is the template.
https://github.com/asledgehammer/PipeWrench-Template
This is a project I'm working on right now for rendering HTML elements as UI elements in PZ using Typescript:
https://github.com/asledgehammer/PipeWrench-UI
This is an example mod made by someone else entirely:
https://steamcommunity.com/sharedfiles/filedetails/?id=2851206870
This is the original whitepaper. (API has changed, so don't rely on this for documentation)
https://github.com/asledgehammer/PipeWrench-Template/wiki/pipewrench_paper
This is the example files / format for my third-party documentation application:
https://github.com/asledgehammer/PipeWrench-Models
If you need more clarifications and introduction to this project, let me know. I will help you. My goal is to have this help people get over a lot of the issues new modders have when working on PZ.
Thanks.
you shouldn't expect the anims to support something that wasn't planned for the vanilla game, imo
I used quotation marks for a reason. ๐
They have meaning and it is not, "I expect this to work the way I want."
But, yes, I agree with you.
I do not expect anything to work as expected outside the scope of their design.
That said, who carries a hammer that way? ;P
true, I was actually gonna type "but you did have the quotes there" 
And carrying things in your off-hand IS vanilla design.
just bags though, right? 
I'm just saying... I don't carry hammers like that in my left hand.
I hand the head low like a normal human
skill issue (pro carpenters carry them that way, trust me)
You would have to fight gravity to hold it the way vanilla holds it.
shrug if you say so, I've seen a lot of experienced carpenters with hammers and never noticed any holding it sideways
And if that IS true, why don't they do it that way in the right hand?
I was joking
no worries
no one holds a hammer that way (i hope)
Hard to tell sarcasm in text.
true, poe's law
i wish we could rotate held models via the txt
That would be clutch.
This is discouraging my dual wielding effort bigtime lol
I thought I'd have to do 1, 2, maybe 3 custom animations.
Not fix 50 vanilla ones.
{
offset = 0.0000 0.0000 0.0000,
rotate = 90.0000 0.0000 0.0000,
}
I haven't touched the model scripts, but can you not rotate the attachment point? may be easier to fix the current objects (i.e. bags) that can go in the secondary, than rewriting all of the weapons in the game
I do not know how an item model gets attached to your hand to be honest.
I don't know where that occurs in the code.
And how much control we have over it depends on where it is in the code.
Seems like a custom two-handed weapon animation combo mod would be infinitely easier as a way to look cooler doing melee stuff, now that I am hitting this wall. Idk anymore.
Could do all kinds of two-handed attacks that would already look fine.
@late hound you around?
seems like the scripts may be an option, but it'll depend on where the entrypoint for this data is (this is from models_items.txt):
attachment bighikingbagrighthand
{
offset = 0.8920 -0.1530 -0.0670,
rotate = -178.0000 -15.0000 100.0000,
bone = Bip01_R_Hand,
}
attachment bighikingbaglefthand
{
offset = 0.8790 0.2000 -0.0740,
rotate = 178.0000 -15.0000 77.0000,
bone = Bip01_L_Hand,
}```
Huh.... interesting... I will look there.
if you can search the code for "bighikingbaglefthand" you should find the entrypoint pretty easily, I think - it may be fed into another script file though (like the item definition, or the model definition for the bag, etc.)
and from there it should be fairly straightforward to implement your own entry for the weapons and such, I'd guess
Yeah, here's maybe the problem?
model Hammer
{
mesh = Weapons/1Handed/Hammer,
attachment world
{
offset = 0.0150 0.1100 0.0000,
rotate = 180.0000 0.0000 180.0000,
}
}
Only one way to hold a hammer.
No alt for left hand vs right hand
I wonder what code calls this
And uses the attachment data here...
that's not the hold animation there, because the attachment point is world
it's likely that the hammer uses a different animation, either from a similar item or from a generic type
but that's just a guess
that's what I meant by "generic type"
my brain hurts just from reading ๐
It sure looks in this file like there are no other left-hand right-hand specifications that could serve as a generic @finite radish
What program do I need to open the .pack format?
At a glance, this file seems to be for stuff treated as worn, rather than stuff treated as equipped.
I don't know, certain details about holding weapons seem to be absent entirely
uh... here i was thinking discord connectivity would be a pain for the integration mod, but they actually have a .net library ๐
Like how does it know whether to attach hammer to left or right hand in this file? it just has an attachment definition for the world. But some items do have left and right hand definitions... but the items that do are not fighting items.
E.g. if you hold a backpack in your left hand, this file has info for that condition, but there's no info at all about handedness in relation to machetes.
looks like they're actually dynamically handled, rather than explicit like the bags are: AttachmentType = Hammer, inside items_weapons.txt
I don't have a decomp on my current PC otherwise I'd look, but you should be able to figure something out from there if you do. item:getAttachmentType() is used a few times in the hotbar code, for reference
so if you could technically cook up something like LeftHammer as a new attachment type, and then assign that via something like setAttachmentType() if it exists, then you're in business!
given that it's generic you wouldn't have to do it for each item either:
if item:getAttachmentType() == "Hammer" then
item:setAttachmentType(LeftHammer)
end```
it won't be that direct and the set function may not even exist in that form, but hopefully you get the idea from that
I do see what you're saying. I don't know if I can do that on an item at the moment of equipping it, but I think I get the vague idea.
Question becomes how to mod in an attachment type properly... Can I just say:
module Base
{
model FemaleBody
{
mesh = Skinned/FemaleBody,
static = false,
animationsMesh = Human,
attachment LeftHandHammerFix
{
offset = 0.8920 -0.1530 -0.0670,
rotate = ??? ??? ???,
bone = Bip01_L_Hand,
}
}
}
Or do I create my own module?
And then say setAttachmentType("MyModule.LeftHandHammerFix")?
Or do I need to check and handle body type?
I'd guess probably not, since the types aren't defined there - there's no entry for Hammer in that file. my guess would be that they're defined somewhere in Java
but they should be relatively exposed, enough to make your own at least
take a look at the tables the hotbar code uses alongside getAttachmentType() for some hints
There actually is an entry for Hammer in models_items.txt. Is that not what items_weapons.txt references?
it wouldn't be for hammer.
that's an entry for the model, and it only defines the world attachment point - aka whenever you do "Place Item" - that's the behavior it'll use
prop2 doesn't exist in models_items.txt
the attachment point and an "AttachmentType" are two different things
Nor in items_weapons.txt @faint jewel
skizot was mistaken on what you were actually looking for
I see. I just figured they somehow used that world attachment in items_weapon.txt to figure out how to do a hand attachment...
i'm just trying ot explain it from the model POV. the prop2 bone needs to rotate 90 degrees to correct the placement.
however the hell you wanna accomplish that.
Guys you never replied to this...
Anyways check tilezed you can also ask mapping for nore advice related to that file
you don't want to rotate the bone, you want to rotate the item that's attached to the bone
So you're thinking the Hammer attachment data referenced in items_weapon.txt is actually somewhere else? @finite radish
it has to be, otherwise the entry in that script would be meaningless. that's basically how the scripts work - they just store data, and then that data is fed into actual code that takes the representations in the scripts and does things with them
Are you suggesting prop2 is wrong for every item in the game?
Thanks, I still found a program on github that extracts those files. Thanks also
yes. feel free to test. if it's not the umbrella, it's wrong.
shush you. i KNOW the problem and it affects me too.
i have to modify that stupid bone everytime i make a new animation.
yes, but you're giving the wrong solution - you shouldn't rotate the entire bone at all unless you're doing it via an animation
I understand generally how scripts work, I just don't understand how THIS script works.