Mods / Auto Layer Clay Forming
Author: zinkless
Side: Client
Created: Aug 17th at 12:52 AM
Last modified: Sep 3rd at 11:25 PM
Downloads: 7439
Follow Unfollow 142
Latest release (for Vintage Story 1.20.12 - 1.21.1-rc.1, potentially outdated):
ZinkModAutoClay_1.0.3.zip
1-click install
Currently only tested with versions 1.20.12 through v1.21.0
User tested v1.21.0-rc.5 and v1.21.0-rc.6
General Information
This makes clay forming as easy as holding down your right mouse button.
Just place a clay down, select your recipe, press F to change mode, select "Duplicate Layer", and finally just hold down the Right mouse button until the clay forming is complete.
More Detailed Information
Uses a Harmony patch for the "OnCopyLayer" function inside the class "Vintagestory.GameContent.BlockEntityClayForm".
The code also attaches to "SendUseOverPacket" to help with communication from the client to the server.
This changes the functionality of the "Duplicate Layer" mode while clay forming to autocomplete the current layer instead of referencing the previous layer.
Renaming the clay forming tool mode is possible but would require looking into translations for every language the game supports, so I will be leaving the text as "Duplicate Layer" for now.
Client Side
The mod is setup to be client-side only so that it can be used without requiring the server to also have the mod.
( the "ShouldLoad" function only returns true for client-side )
The modinfo.json also has the "side" property set as ( "side": "Client" )
Game Balance
The mod keeps the same speed and clay counting logic as to not break the game balance.
The mod decreases the voxel count the same as the default behavior.
The mod increases the voxel count when it removes a voxel ( the same as the default manual process ).
| Mod Version | Mod Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 1.0.3 | zinkmodautoclay | 6301 | Aug 22nd at 10:10 PM | ZinkModAutoClay_1.0.3.zip | 1-click install | ||
|
Fixed issue with Client not sending Packets to the Server Added 1.21.1-rc.1 to the game version list ( untested, but should work ) | |||||||
| 1.0.2 | zinkmodautoclay | 707 | Aug 17th at 6:58 PM | ZinkModAutoClay.zip | 1-click install | ||
|
Add the "Side" attribute to the modinfo.json | |||||||
| 1.0.1 | zinkmodautoclay | 360 | Aug 17th at 3:29 AM | ZinkModAutoClay.zip | 1-click install | ||
|
Removed version specific dependancy in the modinfo.json Added all versions between 1.20.12 to 1.21.0-rc.6 to the list of compatible version. | |||||||
| 1.0.0 | zinkmodautoclay | 71 | Aug 17th at 12:54 AM | ZinkModAutoClay.zip | 1-click install | ||
|
Initial Commit | |||||||
Would it be possible to have a config file or something similar for those of us who would want to speed up or slow down the auto clayforming speed?
Is this mod safe to use on servers that dont have it by default?
Zncon Thank you for the kind words!
Shion It is possible to change the name and icon for the tool mode,
although I have two factors that could make doing either of these potentially difficult.
I plan to continue to add features to this mod, while also balancing its usefulness as a small Client-Side only mod.
The limitation and difficulty I have with the name is creating translations for every supported language.
If it would not be confusing or problematic I could implement the English rename and either use translation tools or user suggestions for the other supported languages.
The limitation for modifying the Icon would be learning the way Vintage Story creates SVG icons with code (this is less of a problem and more of just needing to invest time into learning it).
Thank you for the question and showing interest in the future development of this mod!
Thank you for saving my poor hands!
Any plans for visual changes like changing the icon and renaming the action to "Autocomplete"?
Currently 1.21.0-rc7, It'll still rubberband as the server tries to catch up but it works just fine now.
Bless c:
V4Tr Thank you for testing and letting me know!
I added a new version that fixes the issue you were having.
It should now work fully client-side without needing to add anything to the server.
Works for single player but couldn't get it to work on my 1.21.0-rc6 multiplayer server.
It would place the voxel and immediately "rubberband" back and no voxels are consumed as if nothing ever happened.
I've tried installing the mod on the server too but didn't work either.
...Knapster does still seem to work though.
zinkless Knapster is meant to be hosted on both, yes. And admins can control which options are given to what players.
Thanks for the further clarification. Just wanted to ask in case this added any additional functionality that might be desirable.
I appreciate the quick and kind response given what was originally a very terse question. :)
TrainDoc I haven't used Knapster before, but from what I have tested with it, it seems to have similar behavior for autocompleting clay recipes.
I am unsure if Knapster can be used as a client-side only mod, it seems to be a server-side admin controlled mod.
I would assume if it does require server-side setup then it would mean a user can only use it if they control the server or the server they wish to play on is using it.
I haven't looked into how that mod is programmed or what systems they tie into to make it work, but assuming it touches more than one code location it could make it harder to avoid mod conflicts with other mods.
This mod ( Auto Layer Clay Forming ) only touches one specific internal function and works completely on the client-side.
So Hopefully it shouldn't have any issues with other mods and will be usable on any server.
If a mod conflict does arise since it is such a small point of contact I would imagine it would be easier to implement a fix.
Feel free to use either mod or both ( from what I've tested there does not seem to be any conflicts between our mods )
If I'm already using knapster, what benefit does this mod give me?
nick6788 Thank you for testing and letting me know!
I tested this in v1.21.0-rc.5, works flawlessly!