Mods / Auto Layer Clay Forming

Tags: #QoL #Simplification #Tweak
Author: zinkless
Side: Client
Created: Aug 17th at 12:52 AM
Last modified: Sep 3rd at 11:25 PM
Downloads: 7450
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 IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.0.3 zinkmodautoclay
1.20.12 - 1.21.1-rc.1
6311 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
1.20.12 - 1.21.0-rc.6
707 Aug 17th at 6:58 PM ZinkModAutoClay.zip 1-click install

Add the "Side" attribute to the modinfo.json
"side" : "Client"
to ensure the mod is handled as a client-side mod

1.0.1 zinkmodautoclay
1.20.12 - 1.21.0-rc.6
361 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.
Only tested with versions 1.20.12 & 1.21.0-rc.5

1.0.0 zinkmodautoclay 71 Aug 17th at 12:54 AM ZinkModAutoClay.zip 1-click install

Initial Commit


14 Comments (oldest first | newest first)

💬 Snow_the_awa, Sep 21st at 9:47 AM

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?

💬 IILordTempestII, Sep 11th at 3:04 AM

Is this mod safe to use on servers that dont have it by default?

💬 zinkless , Sep 3rd at 11:23 PM

Zncon Thank you for the kind words!

💬 zinkless , Sep 3rd at 11:21 PM (modified Sep 3rd at 11:27 PM)

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!

💬 Zncon, Sep 2nd at 8:42 PM

Thank you for saving my poor hands!

💬 Shion, Sep 1st at 4:56 PM

Any plans for visual changes like changing the icon and renaming the action to "Autocomplete"?

💬 V4Tr, Aug 23rd at 6:53 PM

 Currently 1.21.0-rc7, It'll still rubberband as the server tries to catch up but it works just fine now.

 

Bless c:

💬 zinkless , Aug 22nd at 10:13 PM

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.

💬 V4Tr, Aug 20th at 11:28 PM

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.

💬 TrainDoc, Aug 17th at 8:40 PM

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. :)

💬 zinkless , Aug 17th at 6:15 PM

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 )

💬 TrainDoc, Aug 17th at 5:13 PM

If I'm already using knapster, what benefit does this mod give me?

💬 zinkless , Aug 17th at 3:15 AM

nick6788 Thank you for testing and letting me know!

💬 nick6788, Aug 17th at 3:10 AM

I tested this in v1.21.0-rc.5, works flawlessly!

 (edit comment delete)
Основной веб-сайт | Почтовый сервер | FTP сервер | Административная панель | API интерфейс | Content Delivery Network | Статические файлы | Ресурсы сайта | Изображения | Файловое хранилище | Блог | Интернет-магазин | Техническая поддержка | Справочная система | Документация | Форум | Новости | Загрузки | Демонстрация | Тестовая среда | Приложение | Медиа контент | Разработка | Промежуточная среда | Бета версия | Безопасная зона | Вход в систему | Панель управления | Портал | Система управления контентом