master
entuland 2018-05-16 14:42:10 +02:00
commit ce30e65702
1 changed files with 16 additions and 9 deletions

View File

@ -5,6 +5,8 @@ Developed and tested on Minetest 0.4.16 - try in other versions at your own risk
If you like my contributions you may consider reading http://entuland.com/en/support-entuland
WIP MOD forum thread: https://forum.minetest.net/viewtopic.php?f=9&t=20115
# Recipe for the Canvas block
wesh:canvas
@ -16,28 +18,28 @@ If you like my contributions you may consider reading http://entuland.com/en/sup
WBW
WWW
[Canvas recipe](/screenshots/canvas-recipe.png)
![Canvas recipe](/screenshots/canvas-recipe.png)
# How to use
Place down a Canvas block, you'll see that it extends beyond its node space marking a 16x16x16 space.
[Empty canvas](/screenshots/canvas-empty.png)
![Empty canvas](/screenshots/canvas-empty.png)
In this space you can build anthing you like by using colored wool blocks.
[Building inside the canvas](/screenshots/canvas-build.png)
![Building inside the canvas](/screenshots/canvas-build.png)
Once you're done with your build, go to the Canvas block and right click it: you'll be asked to provide a name for your mesh (you can type any text in there, with uppercases and any symbol).
[Request for name](/screenshots/prompt-name.png)
![Request for name](/screenshots/prompt-name.png)
When you confirm such name (you can cancel it by hitting the ESC key) you'll likely get a confirmation like this:
[Save confirmation](/screenshots/save-confirm.png)
![Save confirmation](/screenshots/save-confirm.png)
If you confirm the name by hitting ENTER you may not be presented with the above confirmation. It will appear in the chat as well just in case.
Upon saving a few temporary files will be created in the "/modstorage/wesh" subfolder in your world's folder:
Upon saving a few temporary files will be created in the "/mod_storage/wesh" subfolder in your world's folder:
- the .obj file will contain a model with your build scaled down 16 times (so that it will occupy only one block)
- the .dat file will contain the original name you have chosen for your mesh, along with some other data (read the section about using custom textures below)
- the .matrix.dat file will contain a serialized version of your build, that may eventually get used to rebuild / reimport it in the game allowing you to alter it (right now you can't import them, so make sure you don't dismantle your build if you want to alter and capture it again)
@ -46,16 +48,20 @@ The above files are saved there only temporarily because mods don't have writing
During world startup the mod will move all the temporary files to the "/models" folder and will load them.
You can't have two meshes with the same name (during the saving process the mod checks both the temporary meshes that haven't been loaded yet and those that have been already moved to the mod's folder).
If you want to delete a mesh you need to delete its files from either the world's folder (if you haven't restarted it since you captured the mesh you want to delete) or from the mod's folder (if such mesh has been already moved by a world reload).
By default, two versions of each mesh will be available:
- plain version: it uses flat colors averaged from the colors of each wool block
[Plain version](/screenshots/version-plain.png)
![Plain version](/screenshots/version-plain.png)
- wool version: it will use the actual textures used by the wool blocks
[Wool version](/screenshots/version-wool.png)
![Wool version](/screenshots/version-wool.png)
Such new blocks can't be crafted (I plan to make sort of a crafting station where you put some material and chose the model you want to craft), so you either need to give them to yourself or to find them in the Creative inventory. All such meshes show up if you filter for either "wesh" or "mesh".
[Creative search](/screenshots/creative-search.png)
![Creative search](/screenshots/creative-search.png)
Looking at the filename (or knowing how the name gets converted) you can also work out the actual nodename to be used in your "/give" or "/giveme" chat command, for example:
- chosen name: "Test One!"
@ -64,6 +70,7 @@ Looking at the filename (or knowing how the name gets converted) you can also wo
# Using custom textures
In the .dat file of each mesh you'll find something like this:
return {
description = "Your mesh name",
variants = {