summaryrefslogtreecommitdiff
path: root/doc/texture_packs.txt
diff options
context:
space:
mode:
authorHugues Ross <hugues.ross@gmail.com>2020-04-14 14:41:29 -0400
committerGitHub <noreply@github.com>2020-04-14 20:41:29 +0200
commit5cf6318117edcae6bf30d829d9e9dd9dbf1d4bf7 (patch)
treede590965f9f1cf68a4b6ee7ca802aaa5c0b987ee /doc/texture_packs.txt
parent7e21b3cd4883eb8b9eb7e9ca49e50f6f0c7bc0d6 (diff)
downloadminetest-5cf6318117edcae6bf30d829d9e9dd9dbf1d4bf7.tar.gz
minetest-5cf6318117edcae6bf30d829d9e9dd9dbf1d4bf7.tar.bz2
minetest-5cf6318117edcae6bf30d829d9e9dd9dbf1d4bf7.zip
Refactor texture overrides and add new features (#9600)
* Refactor texture overrides, and add new features: - Texture overrides can support multiple targets in one line - Texture override files can have comment lines - Item images/wield images can be overridden * Formatting changes * Address soime feedback - Pass vectors by const reference - Log syntax errors as warnings - Remove 'C' prefix from TextureOverrideSource * Simplify override target checks with an inline helper function * make linter happy * Apply feedback suggestions Co-Authored-By: rubenwardy <rw@rubenwardy.com> * Remove remaining != 0 checks * Update copyright notice Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: rubenwardy <rw@rubenwardy.com>
Diffstat (limited to 'doc/texture_packs.txt')
-rw-r--r--doc/texture_packs.txt45
1 files changed, 31 insertions, 14 deletions
diff --git a/doc/texture_packs.txt b/doc/texture_packs.txt
index 7ab0aca94..4e7bc93c4 100644
--- a/doc/texture_packs.txt
+++ b/doc/texture_packs.txt
@@ -145,34 +145,51 @@ are placeholders intended to be overwritten by the game.
Texture Overrides
-----------------
-You can override the textures of a node from a texture pack using
-texture overrides. To do this, create a file in a texture pack
-called override.txt
+You can override the textures of nodes and items from a
+texture pack using texture overrides. To do this, create one or
+more files in a texture pack called override.txt
Each line in an override.txt file is a rule. It consists of
- nodename face-selector texture
+ itemname target texture
For example,
default:dirt_with_grass sides default_stone.png
-You can use ^ operators as usual:
+or
+
+ default:sword_steel inventory my_steel_sword.png
+
+You can list multiple targets on one line as a comma-separated list:
+
+ default:tree top,bottom my_special_tree.png
+
+You can use texture modifiers, as usual:
default:dirt_with_grass sides default_stone.png^[brighten
-Here are face selectors you can choose from:
+Finally, if a line is empty or starts with '#' it will be considered
+a comment and not read as a rule. You can use this to better organize
+your override.txt files.
+
+Here are targets you can choose from:
-| face-selector | behavior |
+| target | behavior |
|---------------|---------------------------------------------------|
-| left | x- |
-| right | x+ |
-| front | z- |
-| back | z+ |
-| top | y+ |
-| bottom | y- |
-| sides | x-, x+, z-, z+ |
+| left | x- face |
+| right | x+ face |
+| front | z- face |
+| back | z+ face |
+| top | y+ face |
+| bottom | y- face |
+| sides | x-, x+, z-, z+ faces |
| all | All faces. You can also use '*' instead of 'all'. |
+| inventory | The inventory texture |
+| wield | The texture used when held by the player |
+
+Nodes support all targets, but other items only support 'inventory'
+and 'wield'
Designing leaves textures for the leaves rendering options
----------------------------------------------------------