2021-09-18 09:05:17 +00:00
|
|
|
# MineClone2 Formspec Guide
|
|
|
|
|
2022-09-09 18:42:28 +00:00
|
|
|
**_This guide will learn you rules about creation of formspecs for the MineClone2 game._**
|
2021-09-17 21:58:58 +00:00
|
|
|
|
2021-09-18 09:05:17 +00:00
|
|
|
Formspecs are an important part of game and mod development.
|
2021-09-17 21:58:58 +00:00
|
|
|
|
|
|
|
First of all, MineClone2 aims to support ONLY last formspec version. Many utility functions will not work with formspec v1 or v2.
|
|
|
|
|
2021-09-18 09:05:17 +00:00
|
|
|
The typical width of an 9 slots width inventory formspec is `0.375 + 9 + ((9-1) * 0.25) + 0.375 = 11.75`
|
2021-09-17 21:58:58 +00:00
|
|
|
|
2022-09-09 18:42:28 +00:00
|
|
|
Margins is 0.375.
|
|
|
|
|
|
|
|
The labels color is `mcl_formspec.label_color`
|
2021-09-18 09:05:17 +00:00
|
|
|
|
2021-09-18 07:53:45 +00:00
|
|
|
Space between 1st inventory line and the rest of inventory is 0.45
|
2021-09-17 21:58:58 +00:00
|
|
|
|
|
|
|
Labels should have 0.375 space above if there is no other stuff above and 0.45 between content
|
2021-09-17 22:36:33 +00:00
|
|
|
|
2022-09-09 18:42:28 +00:00
|
|
|
- 0.375 under
|
|
|
|
|
|
|
|
According to minetest modding book, table.concat is faster than string concatenation, so this method should be prefered (the code is also more clear)
|