Fix bone-attached entities (#10015)
[oweals/minetest.git] / doc / texture_packs.txt
1 Minetest Texture Pack Reference
2 ===============================
3
4 Texture packs allow you to replace textures provided by a mod with your own
5 textures.
6
7 Texture pack directory structure
8 --------------------------------
9
10     textures
11     |-- Texture Pack
12     |   |-- texture_pack.conf
13     |   |-- screenshot.png
14     |   |-- description.txt
15     |   |-- override.txt
16     |   |-- your_texture_1.png
17     |   |-- your_texture_2.png
18     `-- Another Texture Pack
19
20 ### Texture Pack
21 This is a directory containing the entire contents of a single texture pack.
22 It can be chosen more or less freely and will also become the name of the
23 texture pack. The name must not be “base”.
24
25 ### `texture_pack.conf`
26 A key-value config file with the following keys:
27
28 * `title` - human readable title
29 * `description` - short description, shown in the content tab
30
31 ### `description.txt`
32 **Deprecated**, you should use texture_pack.conf instead.
33
34 A file containing a short description of the texture pack to be shown in the
35 content tab.
36
37 ### `screenshot.png`
38 A preview image showing an in-game screenshot of this texture pack; it will be
39 shown in the texture packs tab. It should have an aspect ratio of 3:2 and a
40 minimum size of 300×200 pixels.
41
42 ### `your_texture_1.png`, `your_texture_2.png`, etc.
43 Any other PNG files will be interpreted as textures. They must have the same
44 names as the textures they are supposed to override. For example, to override
45 the apple texture of Minetest Game, add a PNG file named `default_apple.png`.
46
47 The custom textures do not necceessarily require the same size as their
48 originals, but this might be required for a few particular textures. When
49 unsure, just test your texture pack in-game.
50
51 Texture modifiers
52 -----------------
53
54 See lua_api.txt for texture modifiers
55
56 Special textures
57 ----------------
58
59 These texture names are hardcoded into the engine but can also be overwritten
60 by texture packs. All existing fallback textures can be found in the directory
61 `textures/base/pack`.
62
63 ### Gameplay textures
64
65 * `bubble.png`: the bubble texture when the player is drowning
66                 (default size: 12×12)
67 * `bubble_gone.png`: like `bubble.png`, but denotes lack of breath
68                      (transparent by default, same size as bubble.png)
69
70 * `crack_anylength.png`: node overlay texture when digging
71
72 * `crosshair.png`
73     * the crosshair texture in the center of the screen. The settings
74       `crosshair_color` and `crosshair_alpha` are used to create a cross
75       when no texture was found
76
77 * `halo.png`: used for the node highlighting mesh
78
79 * `heart.png`: used to display the health points of the player
80                (default size: 12×12)
81 * `heart_gone.png`: like `heart.png`, but denotes lack of health points
82                     (transparent by default, same size as heart.png)
83
84 * `minimap_mask_round.png`: round minimap mask, white gets replaced by the map
85 * `minimap_mask_square.png`: mask used for the square minimap
86 * `minimap_overlay_round.png`: overlay texture for the round minimap
87 * `minimap_overlay_square.png`: overlay texture for the square minimap
88 * `object_marker_red.png`: texture for players on the minimap
89 * `player_marker.png`: texture for the own player on the square minimap
90
91 * `player.png`: front texture of the 2D upright sprite player
92 * `player_back.png`: back texture of the 2D upright sprite player
93
94 * `progress_bar.png`: foreground texture of the loading screen's progress bar
95 * `progress_bar_bg.png`: background texture of the loading screen's progress bar
96
97 * `moon.png`: texture of the moon. Default texture is generated by Minetest
98 * `moon_tonemap.png`: tonemap to be used when `moon.png` was found
99 * `sun.png`: texture of the sun. Default texture is generated by Minetest
100 * `sun_tonemap.png`: tonemap to be used when `sun.png` was found
101 * `sunrisebg.png`: shown sky texture when the sun rises
102
103 * `smoke_puff.png`: texture used when an object died by punching
104
105 * `unknown_item.png`: shown texture when an item definition was not found
106 * `unknown_node.png`: shown texture when a node definition was not found
107 * `unknown_object.png`: shown texture when an entity definition was not found
108
109 * `wieldhand.png`: texture of the wieldhand
110
111 Note: The default textures of `player.png`, `player_back.png` and `wieldhand.png`
112 are placeholders intended to be overwritten by the game.
113
114 ### Mainmenu textures
115
116 * `menu_bg.png`: used as mainmenu background when the clouds are disabled
117 * `menu_header.png`: header texture when no texture pack is selected
118
119 * `no_screenshot.png`
120     * texture when no screenshot was found for a texture pack or mod
121
122 * `server_flags_creative.png`: icon for creative servers
123 * `server_flags_damage.png`: icon for enabled damage on servers
124 * `server_flags_favorite.png`: icon for your favorite servers
125 * `server_flags_pvp.png`: icon for enabled PvP on servers
126
127 ### Android textures
128
129 * `down_arrow.png`
130 * `left_arrow.png`
131 * `right_arrow.png`
132 * `up_arrow.png`
133
134 * `drop_btn.png`
135 * `fast_btn.png`
136 * `fly_btn.png`
137 * `jump_btn.png`
138 * `noclip_btn.png`
139
140 * `camera_btn.png`
141 * `chat_btn.png`
142 * `inventory_btn.png`
143 * `rangeview_btn.png`
144
145 * `debug_btn.png`
146 * `gear_icon.png`
147 * `rare_controls.png`
148
149 Texture Overrides
150 -----------------
151
152 You can override the textures of nodes and items from a
153 texture pack using texture overrides. To do this, create one or
154 more files in a texture pack called override.txt
155
156 Each line in an override.txt file is a rule. It consists of
157
158         itemname target texture
159
160 For example,
161
162         default:dirt_with_grass sides default_stone.png
163
164 or
165
166         default:sword_steel inventory my_steel_sword.png
167
168 You can list multiple targets on one line as a comma-separated list:
169
170         default:tree top,bottom my_special_tree.png
171
172 You can use texture modifiers, as usual:
173
174         default:dirt_with_grass sides default_stone.png^[brighten
175
176 Finally, if a line is empty or starts with '#' it will be considered
177 a comment and not read as a rule. You can use this to better organize
178 your override.txt files.
179
180 Here are targets you can choose from:
181
182 | target        | behavior                                          |
183 |---------------|---------------------------------------------------|
184 | left          | x- face                                           |
185 | right         | x+ face                                           |
186 | front         | z- face                                           |
187 | back          | z+ face                                           |
188 | top           | y+ face                                           |
189 | bottom        | y- face                                           |
190 | sides         | x-, x+, z-, z+ faces                              |
191 | all           | All faces. You can also use '*' instead of 'all'. |
192 | inventory     | The inventory texture                             |
193 | wield         | The texture used when held by the player          |
194
195 Nodes support all targets, but other items only support 'inventory'
196 and 'wield'
197
198 Designing leaves textures for the leaves rendering options
199 ----------------------------------------------------------
200
201 Minetest has three modes for rendering leaves nodes if the node has the
202 `allfaces_optional` drawtype.
203
204 ### Fancy
205
206 Uses the texture specified in the `tiles` nodedef field.
207 The texture should have some transparent pixels and be in the RGBA format so
208 that the transparent pixels can have color information.
209 Faces of every leaves node are rendered even if they are inside a solid volume
210 of leaves; this gives a dense appearance.
211
212 ### Opaque
213
214 Uses the texture specified in `tiles` but makes it opaque by converting each
215 transparent pixel into an opaque pixel that uses the color information of that
216 transparent pixel.
217 Due to this the `tiles` texture format must be RGBA not 'indexed alpha' to allow
218 each transparent pixel to have color information.
219
220 The colors of the transparent pixels should be set for a good appearance in
221 `opaque` mode. This can be done by painting the pixels the desired colors then
222 erasing them. Then when saving the texture, use the 'save color information from
223 transparent pixels' option (or equivalent).
224
225 ### Simple
226
227 Uses the texture specified in the `special_tiles` nodedef field if it exists, if
228 not, the `tiles` texture.
229 The `special_tiles` texture should have fewer transparent pixels than the
230 `tiles` texture and be in the 'indexed alpha' format.
231
232 This mode is between the other two in terms of appearance and rendering load.
233 The nodes are rendered using the `glasslike` drawtype, only showing the surface
234 faces for any solid volume of leaves, not the internal faces.
235 Due to this the `tiles` texture might appear lacking in density, so optionally a
236 `special_tiles` texture can be used to provide a texture with fewer transparent
237 pixels for a denser appearance.