Mods / Vintage Story Plugin for Blockbench

Tags: #Utility
Author: Darkluke1111
Side: Both
Created: Feb 18th at 5:59 PM
Last modified: Feb 20th at 8:01 PM
Downloads: 185
Follow Unfollow 45

Latest version:
UnpackMe_vs_plugin.zip


Most recent releases can be found here from now on: https://github.com/Darkluke1111/BlockbenchPlugins/releases

What this is:

A Blockbench (BB) plugin that handles importing and exporting from and to the Vintage Story (VS) shape format to make it a viable alternative to Vintage Story Model Creator (VSMC). The VS shape format is similar to the BB format but still different in a few key aspects.

How to install:

Open Blockbench and select "File->Plugins..." then drag-and-drop the vs_plugin.js  file into the window that opens and you are ready to go.

Basic use:

After the plugin is installed it should be possible to open VS shape files via "File->Open Model" or create new ones with "File->New->Vintage Story Base Format". There should also be new Actions in the Import and Export sections to import from and export to VS shape format.

For Blockbench to figure out texture paths from the base game on its own, I added a setting under "File->Preferences->Settings". Under "General" right at the bottom should be a folder icon called "Game Path". When clicking on it you should be able to select the path to your game folder.

This still needs work:

  • Animation export and import not implemented yet
  • Automatic BackDropShape handling not implemented yet
  • Attachment points not implemented yet
  • Reexported file structure is more complicated than it needs to be

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v0.5.1
89 Feb 20th at 8:01 PM Show UnpackMe_vs_plugin.zip
v0.5
5 Feb 20th at 7:52 PM Show UnpackMe_vs_plugin.zip
v0.4
14 Feb 20th at 1:53 PM Show UnpackMe_vs_plugin.zip
v0.3
27 Feb 19th at 7:32 PM Show UnpackMe_vs_plugin.zip
v0.2
24 Feb 19th at 11:59 AM Show UnpackMe_vs_plugin.zip
v0.1
26 Feb 18th at 6:51 PM Show UnpackMe_vsplugin.zip

18 Comments (oldest first | newest first)

💬 Darkluke1111 , Mar 5th at 10:57 AM

Ket This should be already fixed in the latest release on github (v0.7.0)

💬 Ket, Mar 4th at 2:25 PM

Been working on learning how to use blockbench, not confident in reporting issues with the plugin yet until I know its not just me not knowing how to use it. However: I did notice that no matter what version of the plugin I install, blockbench lists the version as 1.0.0 Is it possible to update that? I'm a little worried about thinking I'm using the most up to date version when I'm not at all doing so.

💬 Darkluke1111 , Mar 4th at 1:51 PM

Xorberax Thanks for the kind words. I still find or get reports of bugs every other day but the plugin is getting along nicely I think :) As long as you don't want to do animation or anything armor related that requires backdrop shape stuff  it is pretty usable at this point. And the BackdropShape feature is already quite far and is in a usable state soon hopefully ;)

💬 Xorberax, Mar 3rd at 5:03 PM

I can vouch for this plugin. I found VSMC extremely tedious to work in, while using Blockbench felt quick and intuitive. The only thing I have to tweak after exporting my model/shape is fixing up the texture paths (which takes just a few seconds).

This has made modeling for VS magnitudes more accessible for me. I also had no experience using Blockbench prior to trying this plugin, and was able to pick it up very quickly.

💬 Xorberax, Mar 1st at 5:33 AM

Thank you for this plugin.

💬 Darkluke1111 , Feb 24th at 12:44 PM

Bendle I'm not 100% sure what you have tried exactly here from your post. A thing that should work (from looking at BB's code, although I never tried it) is to convert a BB format like "Generic Model" into the "Vintage Story Base Format" as long as it does not have things that are completely disabled in the VS format (like arbitrary meshes). The option is under "File->Convert Project". There are some properties that VS needs and don't really have an equivalent in BB (Those I potentially can set to default values on export). If you visit Blender on your conversion route to VS anyway, you could also try https://github.com/phonon/blender-vintagestory-json , but it of course has its own limitations. If you are really interested you can also hit me up on Discord (same name) on the Vintage Story Discord. I'm always interested in workflows that others want to get going and how my plugin can maybe help with it.

💬 Darkluke1111 , Feb 24th at 12:23 PM

NekoBoiNick Pretty hard to pinpoint the issue with the picture alone. If you could share the original VSMC model, that would enable me to test it myself. If you are on Discord, you can find me under the same name (Darkluke1111) on the Vintage Story Discord.

💬 NekoBoiNick, Feb 23rd at 7:33 PM

Coordinates don't seem to export completely properly. Here is an example from BlockBench to the VSModelEditor (It displays in the game the same way as the VSModelEditor)
Model Coordinate difference for some reason?
If you need any more information feel free to ask.

💬 Bendle, Feb 22nd at 9:57 PM

Hey. Thanks a lot for the mod. I've played around with the plugin for a bit, and I've hit a bit of a wall i think. I've been experimenting with methods on how to import external 3D models and somehow make them compatible with Vintage Story. This is a little complicated seeing as Vintage Story works off of square or rectangular voxels, so I've improvised a bit. One of the solutions I came up with was to make a 3D model inside of Blender or something similar, import that into a voxel generator to convert the model into voxels (I currently use drububu to do this), and then export the data output from drububu into Blockbench. All is well and good so far, and Blockbench receives all of the voxels generated. The wall I keep hitting is trying to convert that data into the Vintage Story format that you've set up within blockbench.

Can you think of any way to make an addition to the plugin, so that you're able to use the "Import Project" function inside of blockbench in order to fetch data from another blockbench project file into the Vintage Story format? My experience with trying to do this so far leaves the file completely empty, even though i have hundreds of voxel cubes inside of the blockbench project file I'm trying to import.

If you solve this somehow, there will be a very handy pipeline for people to bring 3D models of their own into Vintage Story. Right now I think it's the only feasible way to do so, but I could be wrong.

Hope the suggestion and the predicament makes sense. Thanks again.

💬 Silhouette, Feb 21st at 1:38 AM

Doing God's work! Love blockbench.

💬 Darkluke1111 , Feb 20th at 5:07 PM

Brady_The Finally some proper bug reports! :D

  1. Object key ordering isn't a thing in js unfortunately. Maybe there is a fancy way to do this that I haven't thought of but for now I guess it will stay how js wants it to be. EDIT: Never mind it works now xD
  2. Yup, didn't see the backDropShape problem, but I fixed it now for the next release :)
  3. I currently have textureWidth and textureHeight stored in the texture data in BB. This doesn't work if there are no textures defined in the file of course. I'll think of a better solution for this. EDIT: fixed
  4. I haven't covered textureSizes yet, because I don't know what it does. :P EDIT: should work now
  5. I didn't know that texture links on faces that don't have an entry in the textures attribute are a thing. That should be fixable though.
  6. Yup the numbers go crazy sometimes, due to floatingpoint imprecision. I will probably just round them to like 4 decimals and hope that will fix it :/ EDIT: Maybe fixed? xD
  7. Better styling for less linebreaks and more readability is already on the todo list. EDIT: Should be muuuch better now
  8. The BB format does not support groups with attached geometry. So cubes that are in the middle of the hierarchy need to be split up into a group and a separate cube. The leaves of the hierarchy tree ofc don't need that treatment, but are still split up currently. Probably something I improve when I do the animation stuff. The same goes for merging the split nodes back when exporting into VS format. I also think that the increased size is mostly because of all the whitespaces though :P
  9. The origin in BB is in the corner of the grid by default, so stuff is centered although it looks like it is not :P

Thanks again for the bug report :)

💬 Brady_The, Feb 20th at 2:50 PM

I never used Blockbench before, but alone the fact that one can move cubes on a local axis is a life-saver. Great effort from your side!

In my test (a straight import and export) the latest update seem to break quite a bit more than the previous versions, though.

The test files: https://gitlab.com/Brady_The/blockbenchvsplugintestfiles

  • "editor" key moved all the way to the bottom of the file, existing parameters removed, empty backDropShape parameter added (on opening the file in VSMC this forces the "select back drop shape" dialogue)
  • "textureWidth" key removed
  • "textureHeight" key removed
  • "textureSizes" key removed
  • "textures" key moved to the bottom of the file
  • texture references in cubes are completely stripped (includes "autoUv" properties) - related to the absence of "texture" definitions in the file (they are supplied via blocktypes, but "dummy" definitions within the shape file will prevent this and the removal of width/height keys. i am probably the only one affected by this, but it might be still good to know)
  • Weird number games with decimal places (compare BracketStairs)
  • Line breaks galore. File size trippled from 5,13 KB to 18,2 KB.

Ideally the file structure would stay the same. The defaults at the top, elements below.

Not mentioned in this list, because this occured already in previous versions: It would be nice, when BB wouldn't pack existing objects into new empty groups/objects, if technically possible. It probably doesn't mess with the shapes in-game, but it adds to the file sizes (5,13 KB vs 7,09 KB).

Thanks for your hard work!

Edit: Testing a vanilla shape (found with the test files) delivers a somewhat different result. Confused I will return to the drawing board.

  • I tested with chest (normal.json) and door (solid.json). both are for some reason off-centred in the view, but will export in their correct positions. Maybe related to animations? (The animations key is stripped in the export.)
💬 Noleadge, Feb 20th at 6:41 AM

im so excited thank you

 

💬 tomislav, Feb 18th at 9:38 PM

Holy moly i cannot thank you enough for this. Exactly what i was wishing for. you're the best dude, thanks so much. this is going to speed up workflow IMMENSELY

💬 Darkluke1111 , Feb 18th at 9:05 PM

@Ket Defnetly on my backlog, since I originally wanted to make an armor and was annoyed by VSMC xD

💬 Ket, Feb 18th at 8:34 PM

Ooooh, I'll give this a try. VSModel creator is pretty clunky. Thanks!

update: I imported my current project and I know you are working on bugfixes rn but when you have time: if it is possible could you add the backdrop shape feature from the model creator? It is pretty impossible to do clothes or mount attachments without it afaik. I'll try another project later though :D

💬 Darkluke1111 , Feb 18th at 7:59 PM

Well the first bug report went in and it seems I still got more work to do xD

💬 Wandour, Feb 18th at 7:56 PM

YES MY WISH CAME TRUE I LOVE YOU SO MUCH MAN!!!! 
THANK YOUUUU !!!!

I hope you can make it so we can use block bench for modeling texturing and animation
my biggest issue with VS modding is their tool, its such a pain to use
but in blockbench i tend to be able to create big projects with much ease

let me know if i can support you in anyway to make this a reality

 (edit comment delete)