Jump to content

Do you know how to make texture blocks?


DX65

Recommended Posts

4 hours ago, DX65 said:

I am really confused. Please explain to me like a 5 year old what I am suppose to do? I literally don't understand, I need direct steps. Like go to the file enter blank or go to vs mod maker and open file again. Simple steps.

I get it needs a shape and there a certain language and way to use the words to get json file to recognize it as a object in game but what I don't understand is how to do this correctly.

Ha!  I cannot explain it you to like you were 5.  It's a little too complicated for many 5 year olds.  But the gist of it is this:

An in-game BLOCK needs only one thing.  A json file, located in the blocktypes folder of your mod. I will now and forever more refer to this json file as block.json.

To be clear - block.json is not something you create in Vintage Story Model Creator (VSMC).  It is NOT a shape.   

block.json is built entirely using a text editor (like notepad++), and consists of one or more json properties.  These properties describe many many things about the block.  Variants, shapes, sounds, textures, hitbox sizes, collision box sizes.  The list goes on and on and on.

There are many examples of these that you can look at where your game is installed.  Windows i.e.

C:\Users\<userid>\AppData\Roaming\Vintagestory\assets\survival\blocktypes

In your mod you can name block.json whatever you want - something like myfancyblock.json.  And have as many as you want.  It can be in any sub-folder you want.  But it has to be in that blocktypes folder.

Look at the folder structure of your mod.  It has a correct folder structure.  It doesn't have all the possible folders you can have.  Those are listed under AssetCategory in the table here:
https://wiki.vintagestory.at/index.php?title=Modding:The_Asset_System

Before I ramble on any further - The "Modding the Game" section of the wiki is how I learned all of the basics about modding.  There's a ton of information, I read it all, and it took me a week to digest it.  That's how many of us learned how to mod Vintage Story.

https://wiki.vintagestory.at/index.php?title=Main_Page

The one property that every block.json must have is a code.  This code is used to uniquely identify a block in the game.  (Well not a single unique instance of the block, but a unique type of block....i,e,  soil, cobblestone, etc.).  If you look at one of your block.json files, you'll see it.  It's almost always the first property.  But it doesn't have to be.  The properties can be in any order.

code: "dx65flower",


------
Another common property that block.json has is a shape.  This is just a link to the file you created in VSMC.  I'm just going to call this shape.json.  You can rename these shape files to whatever you want.  All of your shape.json files MUST live somewhere in the shapes folder.  Look at your mod.  I stuck the shape files in there.  Then, in your block.json, you can link your block to that shape.
  
shape: { base: "dx65flower" },


That's saying "hey, for this block.json, use a shape file with the name dx65flower.json in my shapes folder."

------
Yet another common attribute that block.json has is a texture. Textures are always .png files (pictures), and they must always live somewhere in the textures folder of your mod.  Look at your mod.  You have that.

Now there's a couple of ways of of linking a texture to your block.json, but one common way is to add a texture property.  In your mod you have one...this:

textures: {
        all: { base: "block/color/flower/dx65flower" }
    },


That's saying that for block.json, use the .png file located in your textures folder, in a subfolder block\color\flower, and the file is named dx65flower.png
Don't worry about the all: or base: parts of that, for now just always copy paste that property and then replace the part in quotes.  Then cross your fingers and hope for the best!

------
And another common property that block.json has is the variantgroups.  These describe "sub types" of that block if you will.  i.e.  lowfertility, mediumfertility, highfertility.  So if you have a block with the code "soil" and the variant groups "lowfertility, mediumfertility, highfertility", you actually are creating three different blocks, all at once in that ONE block.json.

soil-lowfertility
soil-mediumfertility
soil-highfertility

Your mod doesn't currently use the variantgroups property, but it's a big time saver if you have many similar blocks.  All those similar blocks can live in one block.json.

------
PROPERTIES, PROPERTIES, PROPERTIES, so many properties:

https://wiki.vintagestory.at/index.php?title=Modding:Block_Json_Properties

Click on the dark brown squares on that page to expand the sections.  There's a lot of properties!

Now when I created my very first block I followed these instructions:
https://wiki.vintagestory.at/index.php?title=Modding:Basic_Block

And when I fixed up your mod, that's where I ripped some properties from to create your block.json files.  In fact, every time I create a block.json in my mod, I copy the properties from somewhere else.  I don't memorize them, I don't start from scratch.  I think to myself  "what's a block in the game that's most like the block I'm trying to make" and then I track down that block.json and copy/paste it's properties.  Finally I tweak it to my liking.

Whew.  Maybe that will help.  Maybe not.  idk.  :)





 

Edited by Spear and Fang
  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Thanks. I have read those wiki articles so many times but maybe I am slow and still learning so its nice to have someone explain it bit more. I am rest up and try again with your new explanation and wiki. Maybe I will experiment with flat blocks in x shaped patterns.

Oh another thing it doesn't explain very well is entities and animations, is there something out there that can help me understand this and how to example give my blocks something extra example butterflies, another I have been working on is waterfall statue, thought it would interesting inside curved rock alter thing with water falling over rocky surface and splashing motions, maybe hopping goldfish. But I figured maybe its too advance for now but I am still curious if it could be done.

 

Edited by DX65
  • Like 1
Link to comment
Share on other sites

2 hours ago, DX65 said:

Thanks. I have read those wiki articles so many times but maybe I am slow and still learning so its nice to have someone explain it bit more. I am rest up and try again with your new explanation and wiki. Maybe I will experiment with flat blocks in x shaped patterns.

Oh another thing it doesn't explain very well is entities and animations, is there something out there that can help me understand this and how to example give my blocks something extra example butterflies, another I have been working on is waterfall statue, thought it would interesting inside curved rock alter thing with water falling over rocky surface and splashing motions, maybe hopping goldfish. But I figured maybe its too advance for now but I am still curious if it could be done.

 

You must learn to walk before you can run, young Padawan!

Link to comment
Share on other sites

On 4/13/2022 at 9:46 PM, DX65 said:

Well flat cube in X pattern for my new flowers are going to be complicated too:( I can't control the position very well at all.:(

Can we have any other shapes than flat or cubes?

Nope, just flats and cubes.  But you can rotate them on any angle and overlap them if you're careful.  The skies the limit.

Untitled.jpg

Edited by Spear and Fang
Link to comment
Share on other sites

5 hours ago, Spear and Fang said:

And I'm a pretty average modeller.

newfish.jpg

That is some very amazing texturing and modeling. I assume you use something other than VS mod maker.

I tried to do flat cube and positioning it, which really hard to do, then trying to find the correct face, cube I was messing with decided to disappear but yet strangely was there but I couldn't see it. I think I will focus on trying to do regular cubes and how to understand and put together json files.

I get some of stuff but I don't get all details or mechanics about it yet. But I might not. I remember downloading Blender 20 years ago and getting very discouraged too. I kept wanting to learn it, I still watch what I think are really videos about stuff blender can make. I know how exit the program and some tiny things like I made  a jacket with a friend but then I got sick and forget it all so I am going to have relearn what I forgot.

I have been very ill and just trying to find away to creative and learn stuff other than focusing on being ill. Some days really hard. For what seems like weeks I have struggling just get vs mod maker to do actually have my textures show up and then how to get it to do json file, then actually seeing it in the game. I don't know why one day it decided to actually save and make json file but for week there it refused. Ugh

Some days the most I can do is a messy square flower doodle. 

Edited by DX65
Link to comment
Share on other sites

7 hours ago, Spear and Fang said:

 


Nope, I only use Vintage Story Model Creator.

From someone struggling to just position cubes correctly with this program and make pixel images that look half way okay, that you are able to do this is impressive and mind blowing to me. 

Link to comment
Share on other sites

I have been taking a break but hopefully soon I will try again.

One thing I have been thinking about is mirrors because I am chiseling dressing table. It needs mirror texture but due to I am in multiplayer where I am building this I may just have to do it creative single player until I get it down.

So in multiplayer closest I got to that type of texture is block of silver. Which is hassle in survival mode.

So it may be something else I have save up for survival or come up with good block the server will let me get from their creative block shop.

So meanwhile I am looking for all those tutorials on how to make mirror textures. Most of them look like grey and black gradient. I am assuming the texture size for most of these mirror textures are lot bigger than ones we use in game.

But how would that transfer to really small textures like we use in the game?

Has anyone made reflective chrome or some other similar metal texture that could pass off as a mirror block?

Here is unfinished table with no mirror.

 

unfinished dressing table.jpg

Edited by DX65
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.