Import Help 1.1.0: doc, doc_items, doc_identifier

This commit is contained in:
Wuzzy 2017-03-18 01:00:20 +01:00
parent 265522435c
commit 2be856f3d1
38 changed files with 4398 additions and 0 deletions

18
mods/HELP/doc/README.md Normal file
View File

@ -0,0 +1,18 @@
# Help
MineClone 2 uses some of the mods found in the Help modpack by Wuzzy.
The goal of this modpack is to make using Minetest and mods easier for both
newcomers and advanced users.
It makes it easier for newcomers by making help more accessible.
It makes life easier for advanced user by making it more convenient to use, by
centralizing the help where you most need it: Inside the game. This modpack
will also make the life of modder easier by allowing them to add help texts
directly into mods (via `doc_items`).
More information is given in the respective mods.
Overview of the mods used in MineClone 2:
* `doc`: Documentation System. Core API and user interface. Mods can add arbitrary categories and entries
* `doc_items`: Item Help. Adds automatically generated help texts for items and an API
* `doc_identifier`: Lookup Tool. A tool to identify and show help texts for pointed things

View File

@ -0,0 +1 @@
Provides an extensible in-game help with texts about gameplay basics (such a crafting), items and advanced usage.

543
mods/HELP/doc/doc/API.md Normal file
View File

@ -0,0 +1,543 @@
# API documentation for the Documentation System
## Core concepts
As a modder, you are free to write basically about everything and are also
relatively free in the presentation of information. There are no
restrictions on content whatsoever.
### Categories and entries
In the Documentation System, everything is built on categories and entries.
An entry is a single piece of documentation and is the basis of all actual
documentation. Categories group multiple entries of the same topic together.
Categories also define a template function which is used to determine how the
final result in the tab “Entry list” looks like. Entries themselves have
a data field attached to them, this is a table containing arbitrary metadata
which is used to construct the final formspec in the Entry tab. It may also
be used for sorting entries in the entry list.
## Advanced concepts
### Viewed and hidden entries
The mod keeps track of which entries have been viewed on a per-player basis.
Any entry which has been accessed by a player is immediately marked as
“viewed”.
Entries can also be hidden. Hidden entries are not visible or otherwise
accessible to players until they become revealed by function calls.
Marking an entry as viewed or revealed is not reversible with this API.
The viewed and hidden states are stored in the file `doc.mt` inside the
world directory. You can safely delete this file if you want to reset
the player states.
### Entry aliases
Entry aliases are alternative identifiers for entry identifiers. With the
exception of the alias functions themselves, for functions demanding an
`entry_id` you can either supply the original `entry_id` or any alias of the
`entry_id`.
## Possible use cases
This section shows some possible use cases to give you a rough idea what
this mod is capable of and how these use cases could be implemented.
### Simple use case: Minetest basics
Let's say you want to write in free form short help texts about the basic
concepts of Minetest or your subgame. First you could define a category
called “Basics”, the data for each of its entry is just a free form text.
The template function simply creates a formspec where this free form
text is displayed.
This is one of the most simple use cases and the mod `doc_basics` does
exactly that.
### Complex use case: Blocks
You could create a category called “Blocks”, and this category is supposed to
contain entries for every single block (i.e. node) in the game. For this use
case, a free form approach would be very inefficient and error-prone, as a
lot of data can be reused.
Here the template function comes in handy: The internal entry data
contain a lot of different things about a block, like block name, identifier,
custom description and most importantly, the definition table of the block.
Finally, the template function takes all that data and turns it into
sentences which are just concatenated, telling as many useful facts about
this block as possible.
## Functions
This is a list of all publicly available functions.
### Overview
The most important functions are `doc.add_category` and `doc.ad_entry`. All other functions
are mostly used for utility and examination purposes.
If not mentioned otherwise, the return value of all functions is `nil`.
These functions are available:
#### Core
* `doc.add_category`: Adds a new category
* `doc.add_entry`: Adds a new entry
#### Display
* `doc.show_entry`: Shows a particular entry to a player
* `doc.show_category`: Shows the entry list of a category to a player
* `doc.show_doc`: Opens the main help form for a player
#### Query
* `doc.get_category_definition`: Returns the definition table of a category
* `doc.get_entry_definition`: Returns the definition table of an entry
* `doc.entry_exists`: Checks whether an entry exists
* `doc.entry_viewed`: Checks whether an entry has been viewed/read by a player
* `doc.entry_revealed`: Checks whether an entry is visible and normally accessible to a player
* `doc.get_category_count`: Returns the total number of categories
* `doc.get_entry_count`: Returns the total number of entries in a category
* `doc.get_viewed_count`: Returns the number of entries a player has viewed in a category
* `doc.get_revealed_count`: Returns the number of entries a player has access to in a category
* `doc.get_hidden_count`: Returns the number of entries which are hidden from a player in a category
* `doc.get_selection`: Returns the currently viewed entry/category of a player
#### Modify
* `doc.set_category_order`: Sets the order of categories in the category list
* `doc.mark_entry_as_viewed`: Manually marks an entry as viewed/read by a player
* `doc.mark_entry_as_revealed`: Make a hidden entry visible and accessible to a player
* `doc.mark_all_entries_as_revealed`: Make all hidden entries visible and accessible to a player
#### Aliases
* `doc.add_entry_alias`: Add an alternative name which can be used to access an entry
#### Special widgets
This API provides functions to add unique “widgets” for functionality
you may find useful when creating entry templates. You find these
functions in `doc.widgets`.
Currently there is a widget for scrollable multi-line text and a
widget providing an image gallery.
### `doc.add_category(id, def)`
Adds a new category. You have to define an unique identifier, a name
and a template function to build the entry formspec from the entry
data.
**Important**: You must call this function *before* any player joins.
#### Parameters
* `id`: Unique category identifier as a string
* `def`: Definition table with the following fields:
* `name`: Category name to be shown in the interface
* `description`: (optional) Short description of the category,
will be shown as tooltip. Recommended style (in English):
First letter capitalized, no punctuation at the end,
max. 100 characters
* `build_formspec`: The template function (see below). Takes entry data
as its first parameter (has the data type of the entry data) and the
name of the player who views the entry as its second parameter. It must
return a formspec which is inserted in the Entry tab.
* `sorting`: (optional) Sorting algorithm for display order of entries
* `"abc"`: Alphabetical (default)
* `"nosort"`: Entries appear in no particular order
* `"custom"`: Manually define the order of entries in `sorting_data`
* `"function"`: Sort by function defined in `sorting_data`
* `sorting_data`: (optional) Additional data for special sorting methods.
* If `sorting=="custom"`, this field must contain a table (list form) in which
the entry IDs are specified in the order they are supposed to appear in the
entry list. All entries which are missing in this table will appear in no
particular order below the final specified one.
* If `sorting=="function"`, this field is a compare function to be used as
the `comp` parameter of `table.sort`. The parameters given are two entries.
* This field is not required if `sorting` has any other value
* `hide_entries_by_default` (optional): If `true`, all entries
added to this category will start as hidden, unless explicitly specified otherwise
(default: `false`)
Note: For function-based sorting, the entries provided to the compare function
will have the following format:
{
eid = e, -- unique entry identifier
name = n, -- entry name
data = d, -- arbitrary entry data
}
#### Using `build_formspec`
For `build_formspec` you can either define your own function which
procedurally generates the entry formspec or you use one of the
following predefined convenience functions:
* `doc.entry_builders.text`: Expects entry data to be a string.
It will be inserted directly into the entry. Useful for entries with
a free form text.
* `doc.entry_builders.text_and_gallery`: For entries with text and
an optional standard gallery (3 rows, 3:2 aspect ratio). Expects
entry data to be a table with these fields:
* `text`: The entry text
* `images`: The images of the gallery, the format is the same as the
`imagedata` parameter of `doc.widgets.gallery`. Can be `nil`, in
which case no gallery is shown for the entry
* `doc.entry_builders.formspec`: Entry data is expected to contain the
complete entry formspec as a string. Useful if your entries. Useful
if you expect your entries to differ wildly in layouts.
##### Formspec restrictions
When building your formspec, you have to respect the size limitations.
The help form currently uses a size of 15×10.5 and you must make sure
all entry widgets are inside a boundary box. The remaining space is
reserved for widgets of the help form and should not be used to avoid
overlapping.
Read from the following variables to calculate the final formspec coordinates:
* `doc.FORMSPEC.WIDTH`: Width of help formspec
* `doc.FORMSPEC.HEIGHT`: Height of help formspec
* `doc.FORMSPEC.ENTRY_START_X`: Leftmost X point of bounding box
* `doc.FORMSPEC.ENTRY_START_Y`: Topmost Y point of bounding box
* `doc.FORMSPEC.ENTRY_END_X`: Rightmost X point of bounding box
* `doc.FORMSPEC.ENTRY_END_Y`: Bottom Y point of bounding box
* `doc.FORMSPEC.ENTRY_WIDTH`: Width of the entry widgets bounding box
* `doc.FORMSPEC.ENTRY_HEIGHT`: Height of the entry widgets bounding box
Finally, to avoid naming collisions, you must make sure that all identifiers
of your own formspec elements do *not* begin with “`doc_`”.
##### Receiving formspec events
You can even use the formspec elements you have added with `build_formspec` to
receive formspec events, just like with any other formspec. For receiving, use
the standard function `minetest.register_on_player_receive_fields` to register
your event handling. The `formname` parameter will be `doc:entry`. Use
`doc.get_selection` to get the category ID and entry ID of the entry in question.
### `doc.add_entry(category_id, entry_id, def)`
Adds a new entry into an existing category. You have to define the category
to which to insert the entry, the entry's identifier, a name and some
data which defines the entry. Note you do not directly define here how the
end result of an entry looks like, this is done by `build_formspec` from
the category definition.
**Important**: You must call this function *before* any player joins.
#### Parameters
* `category_id`: Identifier of the category to add the entry into
* `entry_id`: Unique identifier of the new entry, as a string
* `def`: Definition table, it has the following fields:
* `name`: Entry name to be shown in the interface
* `hidden`: (optional) If `true`, entry will not be displayed in entry list
initially (default: `false`); it can be revealed later
* `data`: Arbitrary data attached to the entry. Any data type is allowed;
The data in this field will be used to create the actual formspec
with `build_formspec` from the category definition
### `doc.set_category_order(category_list)`
Sets the order of categories in the category list.
The help starts with this default order:
{"basics", "nodes", "tools", "craftitems", "advanced"}
This function can be called at any time, but it recommended to only call
this function once for the entire server session and to only call it
from subgame mods, to avoid contradictions. If this function is called a
second time by any mod, a warning is written into the log.
#### Parameters
* `category_list`: List of category IDs in the order they should appear
in the category list. All unspecified categories will be appended to
the end
### `doc.show_doc(playername)`
Opens the main help formspec for the player (“Category list” tab).
#### Parameters
* `playername`: Name of the player to show the formspec to
### `doc.show_category(playername, category_id)`
Opens the help formspec for the player at the specified category
(“Entry list” tab).
#### Parameters
* `playername`: Name of the player to show the formspec to
* `category_id`: Category identifier of the selected category
### `doc.show_entry(playername, category_id, entry_id, ignore_hidden)`
Opens the help formspec for the player showing the specified entry
of a category (“Entry” tab). If the entry is hidden, an error message
is displayed unless `ignore_hidden==true`.
#### Parameters
* `playername`: Name of the player to show the formspec to
* `category_id`: Category identifier of the selected category
* `entry_id`: Entry identifier of the entry to show
* `ignore_hidden`: (optional) If `true`, shows entry even if it is still hidden
to the player; this will automatically reveal the entry to this player for the
rest of the game
### `doc.get_category_definition(category_id)`
Returns the definition of the specified category.
#### Parameters
* `category_id`: Category identifier of the category to the the definition
for
#### Return value
The category's definition table as specified in the `def` argument of
`doc.add_category`. The table fields are the same.
### `doc.get_entry_definition(category_id, entry_id)`
Returns the definition of the specified entry.
#### Parameters
* `category_id`: Category identifier of entry's category
* `entry_id`: Entry identifier of the entry to get the definition for
#### Return value
The entry's definition table as specified in the `def` argument of
`doc.add_entry`. The table fields are the same.
### `doc.entry_exists(category_id, entry_id)`
Checks whether the specified entry exists and returns `true` or `false`.
Entry aliases are taken into account.
#### Parameters
* `category_id`: Category identifier of the category to check
* `entry_id`: Entry identifier of the entry to check for its existence
#### Return value
Returns `true` if and only if:
* The specified category exists
* It contains the specified entry
Otherwise, returns `false`.
### `doc.entry_viewed(playername, category_id, entry_id)`
Tells whether the specified entry is marked as “viewed” (or read) by
the player.
#### Parameters
* `playername`: Name of the player to check
* `category_id`: Category identifier of the category to check
* `entry_id`: Entry identifier of the entry to check
#### Return value
`true`, if entry is viewed, `false` otherwise.
### `doc.entry_revealed(playername, category_id, entry_id)`
Tells whether the specified entry is marked as “revealed” to the player
and thus visible and accessible to the player.
#### Parameters
* `playername`: Name of the player to check
* `category_id`: Category identifier of the category to check
* `entry_id`: Entry identifier of the entry to check
#### Return value
`true`, if entry is revealed, `false` otherwise.
### `doc.mark_entry_as_viewed(playername, category_id, entry_id)`
Marks a particular entry as “viewed” (or read) by a player. This will
also automatically reveal the entry to the player for the rest of
the game.
#### Parameters
* `playername`: Name of the player for whom to mark an entry as “viewed”
* `category_id`: Category identifier of the category of the entry to mark
* `entry_id`: Entry identifier of the entry to mark
### `doc.mark_entry_as_revealed(playername, category_id, entry_id)`
Marks a particular entry as “revealed” to a player. If the entry is
declared as hidden, it will become visible in the list of entries for
this player and will always be accessible with `doc.show_entry`. This
change remains for the rest of the game.
For entries which are not normally hidden, this function has no direct
effect.
#### Parameters
* `playername`: Name of the player for whom to reveal the entry
* `category_id`: Category identifier of the category of the entry to reveal
* `entry_id`: Entry identifier of the entry to reveal
### `doc.mark_all_entries_as_revealed(playername)`
Marks all entries as “revealed” to a player. This change remains for the
rest of the game.
#### Parameters
* `playername`: Name of the player for whom to reveal the entries
### `doc.add_entry_alias(category_id_orig, entry_id_orig, category_id_alias, entry_id_orig)`
Adds a single alias for an entry. If an entry has an alias, supplying the
alias to a function which demand `category_id` and `entry_id` will work as expected.
When using this function, you must make sure the category already exists.
This function could be useful for legacy support after changing an entry ID or
moving an entry to a different category.
#### Parameters
* `category_id_orig`: Category identifier of the category of the entry in question
* `entry_id_orig`: The original (!) entry identifier of the entry to create an alias
for
* `category_id_alias`: The category ID of the alias
* `entry_id_alias`: The entry ID of the alias
#### Example
doc.add_entry_alias("nodes", "test", "craftitems", "test2")
When calling a function with category ID “craftitems” and entry ID “test2”, it will
act as if you supplied “nodes” as category ID and “test” as entry ID.
### `doc.get_category_count()`
Returns the number of registered categories.
#### Return value
Number of registered categories.
### `doc.get_entry_count(category_id)`
Returns the number of entries in a category.
#### Parameters
* `category_id`: Category identifier of the category in which to count entries
#### Return value
Number of entries in the specified category.
### `doc.get_viewed_count(playername, category_id)`
Returns how many entries have been viewed by a player.
#### Parameters
* `playername`: Name of the player to count the viewed entries for
* `category_id`: Category identifier of the category in which to count the
viewed entries
#### Return value
Amount of entries the player has viewed in the specified category. If the
player does not exist, this function returns `nil`.
### `doc.get_revealed_count(playername, category_id)`
Returns how many entries the player has access to (non-hidden entries)
in this category.
#### Parameters
* `playername`: Name of the player to count the revealed entries for
* `category_id`: Category identifier of the category in which to count the
revealed entries
#### Return value
Amount of entries the player has access to in the specified category. If the
player does not exist, this function returns `nil`.
### `doc.get_hidden_count(playername, category_id)`
Returns how many entries are hidden from the player in this category.
#### Parameters
* `playername`: Name of the player to count the hidden entries for
* `category_id`: Category identifier of the category in which to count the
hidden entries
#### Return value
Amount of entries hidden from the player. If the player does not exist,
this function returns `nil`.
### `doc.get_selection(playername)`
Returns the currently or last viewed entry and/or category of a player.
#### Parameter
* `playername`: Name of the player to query
#### Return value
It returns up to 2 values. The first one is the category ID, the second one
is the entry ID of the entry/category which the player is currently viewing
or is the last entry the player viewed in this session. If the player only
viewed a category so far, the second value is `nil`. If the player has not
viewed a category as well, both returned values are `nil`.
### `doc.widgets.text(data, x, y, width, height)`
This is a convenience function for creating a special formspec widget. It creates
a widget in which you can insert scrollable multi-line text.
As of Minetest 0.4.14, this function is only provided because Minetest lacks
native support for such a widget. When Minetest supports such a widget natively,
this function may become just a simple wrapper.
#### Parameters
* `data`: Text to be written inside the widget
* `x`: Formspec X coordinate (optional)
* `y`: Formspec Y coordinate (optional)
* `width`: Width of the widget in formspec units (optional)
* `height`: Height of the widget in formspec units (optional)
The default values for the optional parameters result in a widget which fills
nearly the entire entry page.
#### Return value
Two values are returned, in this order:
* string: Contains a complete formspec definition building the widget
* string: Formspec element ID of the created widget
#### Note
If you use this function to build a formspec string, do not use identifiers
beginning with `doc_widget_text` to avoid naming collisions, as this function
makes use of such identifiers internally.
### `doc.widgets.gallery(imagedata, playername, x, y, aspect_ratio, width, rows, align_left, align_top)`
This function creates an image gallery which allows you to display an
arbitrary amount of images aligned horizontally. It is possible to add more
images than the space of an entry would normally held, this is done by adding
“scroll” buttons to the left and right which allows the user to see more images
of the gallery.
This function is useful for adding multiple illustration to your entry without
worrying about space too much. Adding illustrations can help you to create
entry templates which aren't just lengthy walls of text. ;-)
You can define the position, image aspect ratio, total gallery width and the
number of images displayed at once. You can *not* directly define the image
size, nor the resulting height of the overall gallery, those values will
be derived from the parameters.
You can only really use this function efficiently inside a *custom*
`build_formspec` function definition. This is because you need to pass a
`playername`. You can currently also only add up to one gallery per entry;
adding more galleries is not supported and will lead to bugs.
### Parameters
* `imagedata`: List of images to be displayed in the specified order. All images must
have the same aspect ratio. It's a table of tables with this format:
* `imagetype`: Type of image to be used (optional):
* `"image"`: Texture file (default)
* `"item"`: Item image, specified as itemstring
* `image`: What to display. Depending on `imagetype`, a texture file or itemstring
* `playername`: Name of the player who is viewing the entry in question
* `x`: Formspec X coordinate of the top left corner (optional)
* `y`: Formspec Y coordinate of the top left corner (optional)
* `aspect_ratio`: Aspect ratio of all the images (width/height)
* `width`: Total gallery width in formspec units (optional)
* `rows`: Number of images which can be seen at once (optional)
* `align_left`: If `false`, gallery is aligned to the left instead of the right (optional)
* `align_right`: If `false`, gallery is aligned to the bottom instead of the top (optional)
The default values for the optional parameters result in a gallery with
3 rows which is placed at the top left corner and spans the width of the
entry and assumes an aspect ratio of two thirds.
If the number of images is greater than `rows`, “scroll” buttons will appear
at the left and right side of the images.
#### Return values
Two values are returned, in this order:
* string: Contains a complete formspec definition building the gallery
* number: The height the gallery occupies in the formspec
## Extending this mod (naming conventions)
If you want to extend this mod with your own functionality, it is recommended
that you put all API functions into `doc.sub.<name>`.
As a naming convention, if you mod *primarily* depends on `doc`, it is recommended
to use a short mod name which starts with “`doc_`”, like `doc_items`,
`doc_minetest_game`, or `doc_identifier`.
One mod which uses this convention is `doc_items` which uses the `doc.sub.items`
table.

View File

@ -0,0 +1,52 @@
# Documentation System [`doc`]
This mod provides a simple and highly extensible form in which the user
can access help pages about various things and the modder can add those pages.
The mod itself does not provide any help texts, just the framework.
It is the heart of the Help modpack, on which the other Help mods depend.
Current version: 1.0.1
## For players
### Accessing the help
To open the help, there are multiple ways:
- Use the `/helpform` chat command. This works always.
- If you use one of these mods, there's a help button in the inventory menu:
- Unified Inventory [`unified_inventory`]
- Simple Fast Inventory Buttons [`sfinv_buttons`]
- Inventory++ [`inventory_plus`]
The help itself should be more or less self-explanatory.
This mod is useless on its own, you will only need this mod as a dependency
for mods which actually add some help entries.
### Hidden entries
Some entries are initially hidden from you. You can't see them until you
unlocked them. Mods can decide for themselves how particular entries are
revealed. Normally you just have to proceed in the game to unlock more
entries. Hidden entries exist to avoid spoilers and give players a small
sense of progress.
Players with the `help_reveal` privilege can use the `/help_reveal` chat
command to reveal all hidden entries instantly.
### Maintenance
The information of which player has viewed and revealed which entries is
stored in the world directory in the file `doc.mt`. You can safely reset
the viewed/revealed state of all players by deleting this file. Players
then need to start over revealing all entries.
## For modders and subgame authors
This mod helps you in creating extensive and flexible help entries for your
mods or subgame. You can write about basically anything in the presentation
you prefer.
To get started, read `API.md` in the directory of this mod.
Note: If you want to add help texts for items and nodes, refer to the API
documentation of `doc_items`, instead of manually adding entries.
For custom entities, you may also want to add support for `doc_identifier`.
## License of everything
MIT License

View File

@ -0,0 +1,5 @@
intllib?
unified_inventory?
sfinv_buttons?
central_message?
inventory_plus?

View File

@ -0,0 +1 @@
A simple in-game documentation system which enables mods to add help entries based on templates.

1270
mods/HELP/doc/doc/init.lua Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,42 @@
< = <
> = >
Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. = Der Zugriff auf den angeforderten Eintrag wurde verweigert; dieser Eintrag ist geheim. Sie können durch weiteren Spielfortschritt den Zugriff freischalten. Finden Sie selbst heraus, wie Sie diesen Eintrag freischalten können.
All entries read. = Alle Einträge gelesen.
All help entries revealed! = Alle Hilfseinträge aufgedeckt!
All help entries are already revealed. = Alle Hilfseinträge sind schon aufgedeckt.
Allows you to reveal all hidden help entries with /help_reveal = Ermöglicht es Ihnen, alle verborgenen Hilfseinträge mit /help_reveal freizuschalten
Category list = Kategorienliste
Currently all entries in this category are hidden from you.\nUnlock new entries by progressing in the game. = Momentan sind alle Einträge in dieser Kategorie vor Ihnen verborgen.\nSchalten Sie neue Einträge frei, indem Sie im Spiel fortschreiten.
Help = Hilfe
Entry = Eintrag
Entry list = Eintragsliste
Error: Access denied. = Fehler: Zugriff verweigert.
Error: No help available. = Fehler: Keine Hilfe verfügbar.
Go to category list = Zur Kategorienliste
Go to entry list = Zur Eintragsliste
Help > (No Category) = Hilfe > (Keine Kategorie)
Help > @1 = Hilfe > @1
Help > @1 > @2 = Hilfe > @1 > @2
Help > @1 > (No Entry) = Hilfe > @1 > (Kein Eintrag)
Hidden entries: @1 = Verborgene Einträge: @1
New entries: @1 = Neue Einträge: @1
New help entry unlocked: @1 > @2 = Neuen Hilfseintrag freigeschaltet: @1 > @2
No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again. = Es wurden keine Kategorien registriert, aber sie werden benötigt, um die Hilfe anbieten zu können.\nDas Dokumentationssystem [doc] bringt von sich aus keine eigenen Hilfsinhalte mit, es benötigt zusätzliche Mods, um sie hinzuzufügen. Bitte stellen Sie sicher, dass solche Mods für diese Welt aktiviert sind und versuchen Sie es erneut.
Number of entries: @1 = Anzahl der Einträge: @1
OK = OK
Open a window providing help entries about Minetest and more = Ein Fenster mit Hilfseinträgen über Minetest und mehr öffnen
Please select a category you wish to learn more about: = Bitte wählen Sie eine Kategorie, über die Sie mehr erfahren möchten, aus:
Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia. = Empfohlene Mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.
Reveal all hidden help entries to you = Alle für Sie verborgenen Hilfseinträge freischalten
Show entry = Eintrag zeigen
Show category = Kategorie zeigen
Show next entry = Nächsten Eintrag zeigen
Show previous entry = Vorherigen Eintrag zeigen
This category does not have any entries. = Diese Kategorie hat keine Einträge.
This category has the following entries: = Diese Kategorie hat die folgenden Einträge:
This category is empty. = Diese Kategorie ist leer.
This is the help. = Dies ist die Hilfe.
You haven't chosen a category yet. Please choose one in the category list first. = Sie haben noch keine Kategorie gewählt. Bitte wählen Sie zuerst eine Kategorie in der Kategorienliste aus.
You haven't chosen an entry yet. Please choose one in the entry list first. = Sie haben noch keinen Eintrag gewählt. Bitte wählen Sie zuerst einen Eintrag in der Eintragsliste aus.
Nameless entry (@1) = Namenloser Eintrag (@1)
Collection of help texts = Sammlung von Hilfstexten

View File

@ -0,0 +1,42 @@
< =
> =
Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry. =
All entries read. =
All help entries revealed! =
All help entries are already revealed. =
Allows you to reveal all hidden help entries with /help_reveal =
Category list =
Currently all entries in this category are hidden from you.\\nUnlock new entries by progressing in the game. =
Help =
Entry =
Entry list =
Error: Access denied. =
Error: No help available. =
Go to category list =
Go to entry list =
Help > @1 =
Help > @1 > @2 =
Help > @1 > (No Entry) =
Help > (No Category) =
Hidden entries: @1 =
Nameless entry (@1) =
New entries: @1 =
New help entry unlocked: @1 > @2 =
No categories have been registered, but they are required to provide help.\nThe Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again. =
Number of entries: @1 =
OK =
Open a window providing help entries about Minetest and more =
Please select a category you wish to learn more about: =
Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia. =
Reveal all hidden help entries to you =
Show entry =
Show category =
Show next entry =
Show previous entry =
This category does not have any entries. =
This category has the following entries: =
This category is empty. =
This is the help. =
You haven't chosen a category yet. Please choose one in the category list first. =
You haven't chosen an entry yet. Please choose one in the entry list first. =
Collection of help texts =

View File

@ -0,0 +1 @@
name = doc

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

View File

@ -0,0 +1,40 @@
# Minimal API for `doc_identifier`
## Introduction
The tool can identify blocks and players natively, and also handles falling
nodes (`__builtin:falling_node`) and dropped items (`__builtin:item`) on its
own.
However, the identifier can't “identify” (=open the appropriate entry) custom
objects because the mod doesn't know which help entry to open (if there is
any). One example would be the boat object (`boats:boat`) from the boats mod
in Minetest Game.
If the player tries to use the tool on an unknown object, an error message is
shown.
Because of this, this mod provides a minimal API for mods to assign a help
entry to an object type: `doc_identifier.register_object`.
## `doc.sub.identifier.register_object(object_name, category_id, entry_id)`
Registers the object/entity with the internal name `object_name` to the
entry `entry_id` in the category `category_id`.
It is in the modder's responsibility to make sure that both the category and
entry already exist (use `doc.entry_exists` or depend (optionally or not) on
the respective mods) at the time of the function call, otherwise, stability can
not be guaranteed.
Returns `nil`.
### Example
From `doc_minetest_game`:
if minetest.get_modpath("doc_identifier") ~= nil then
doc.sub.identifier.register_object("boats:boat", "craftitems", "boats:boat")
end
This enables the tool to be used on the boat object itself. The conditional is
an idiom to check for the existence of this mod.
## Note on dependencies
If you just need `doc.sub.identifier.register_object` using only an **optional**
dependency for your mod is probably enough.

View File

@ -0,0 +1,29 @@
# Lookup Tool [`doc_identifier`]
Version: 1.2.1
## Description
The lookup tool is an useful little helper which can be used to quickly learn
more about about one's closer environment. It identifies blocks, dropped items
and other objects and it shows extensive information about the item on which it
is used, provided documentation is available.
## How to use the lookup tool
Punch any block or item about you wish to learn more about. This will open up
the help entry of this particular item.
The tool comes in two modes which are changed by a right-click. In liquid mode
(blue) this tool points to liquids as well while in solid mode (red) this is not
the case. Liquid mode is required if you want to identify a liquid.
## For modders
If you want the tool to identify nodes and (dropped) items, you probably don't
have to do anything, it is probably already supported. The only thing you have
to make sure is that all pointable blocks and items have a help entry, which
is already the case for most items, but you may want to do some testing on
“tricky” items. Consult the documentation of Documentation System [`doc`]
and Item Help [`doc_items`] for getting the item documentation right.
For the lookup tool to be able to work on custom objects/entities, you have to
use the tiny API of this mod, see `API.md`.
## License
Everything in this mod is licensed under the MIT License.

View File

@ -0,0 +1,5 @@
doc
doc_items
doc_basics?
default?
intllib?

View File

@ -0,0 +1 @@
Adds a tool which shows help entries about almost anything which it punches.

View File

@ -0,0 +1,190 @@
-- Boilerplate to support localized strings if intllib mod is installed.
local S
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function(s) return s end
end
local doc_identifier = {}
doc_identifier.registered_objects = {}
-- API
doc.sub.identifier = {}
doc.sub.identifier.register_object = function(object_name, category_id, entry_id)
doc_identifier.registered_objects[object_name] = { category = category_id, entry = entry_id }
end
-- END OF API
doc_identifier.identify = function(itemstack, user, pointed_thing)
local username = user:get_player_name()
local show_message = function(username, itype, param)
local vsize = 2
local message
if itype == "error_item" then
message = S("No help entry for this item could be found.")
elseif itype == "error_node" then
message = S("No help entry for this block could be found.")
elseif itype == "error_unknown" then
vsize = vsize + 3
local mod
if param ~= nil then
local colon = string.find(param, ":")
if colon ~= nil and colon > 1 then
mod = string.sub(param,1,colon-1)
end
end
message = S("Error: This node, item or object is undefined. This is always an error.\nThis can happen for the following reasons:\n• The mod which is required for it is not enabled\n• The author of the subgame or a mod has made a mistake")
message = message .. "\n\n"
if mod ~= nil then
if minetest.get_modpath(mod) ~= nil then
message = message .. string.format(S("It appears to originate from the mod “%s”, which is enabled."), mod)
message = message .. "\n"
else
message = message .. string.format(S("It appears to originate from the mod “%s”, which is not enabled!"), mod)
message = message .. "\n"
end
end
if param ~= nil then
message = message .. string.format(S("Its identifier is “%s”."), param)
end
elseif itype == "error_ignore" then
message = S("This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.")
elseif itype == "error_object" or itype == "error_unknown_thing" then
message = S("No help entry for this object could be found.")
elseif itype == "player" then
message = S("This is a player.")
end
minetest.show_formspec(
username,
"doc_identifier:error_missing_item_info",
"size[12,"..vsize..";]" ..
"label[0,0.2;"..minetest.formspec_escape(message).."]" ..
"button_exit[4.5,"..(-0.5+vsize)..";3,1;okay;"..minetest.formspec_escape(S("OK")).."]"
)
end
if pointed_thing.type == "node" then
local pos = pointed_thing.under
local node = minetest.get_node(pos)
if minetest.registered_nodes[node.name] ~= nil then
local nodedef = minetest.registered_nodes[node.name]
if(node.name == "ignore") then
show_message(username, "error_ignore")
elseif doc.entry_exists("nodes", node.name) then
doc.show_entry(username, "nodes", node.name, true)
else
show_message(username, "error_node")
end
else
show_message(username, "error_unknown", node.name)
end
elseif pointed_thing.type == "object" then
local object = pointed_thing.ref
local le = object:get_luaentity()
if object:is_player() then
if minetest.get_modpath("doc_basics") ~= nil and doc.entry_exists("basics", "players") then
doc.show_entry(username, "basics", "players", true)
else
-- Fallback message
show_message(username, "player")
end
-- luaentity exists
elseif le ~= nil then
local ro = doc_identifier.registered_objects[le.name]
-- Dropped items
if le.name == "__builtin:item" then
local itemstring = ItemStack(minetest.deserialize(le:get_staticdata()).itemstring):get_name()
if doc.entry_exists("nodes", itemstring) then
doc.show_entry(username, "nodes", itemstring, true)
elseif doc.entry_exists("tools", itemstring) then
doc.show_entry(username, "tools", itemstring, true)
elseif doc.entry_exists("craftitems", itemstring) then
doc.show_entry(username, "craftitems", itemstring, true)
elseif minetest.registered_items[itemstring] == nil or itemstring == "unknown" then
show_message(username, "error_unknown", itemstring)
else
show_message(username, "error_item")
end
-- Falling nodes
elseif le.name == "__builtin:falling_node" then
local itemstring = minetest.deserialize(le:get_staticdata()).name
if doc.entry_exists("nodes", itemstring) then
doc.show_entry(username, "nodes", itemstring, true)
end
-- A known registered object
elseif ro ~= nil then
doc.show_entry(username, ro.category, ro.entry, true)
-- Undefined object (error)
elseif minetest.registered_entities[le.name] == nil then
show_message(username, "error_unknown", le.name)
-- Other object (undocumented)
else
show_message(username, "error_object")
end
else
--show_message(username, "error_object")
show_message(username, "error_unknown")
end
elseif pointed_thing.type ~= "nothing" then
show_message(username, "error_unknown_thing")
end
return itemstack
end
function doc_identifier.solid_mode(itemstack, user, pointed_thing)
return ItemStack("doc_identifier:identifier_solid")
end
function doc_identifier.liquid_mode(itemstack, user, pointed_thing)
return ItemStack("doc_identifier:identifier_liquid")
end
minetest.register_tool("doc_identifier:identifier_solid", {
description = S("Lookup tool"),
_doc_items_longdesc = S("This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used."),
_doc_items_usagehelp = S("Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid."),
_doc_items_hidden = false,
tool_capabilities = {},
range = 10,
wield_image = "doc_identifier_identifier.png",
inventory_image = "doc_identifier_identifier.png",
liquids_pointable = false,
on_use = doc_identifier.identify,
on_place = doc_identifier.liquid_mode,
on_secondary_use = doc_identifier.liquid_mode,
})
minetest.register_tool("doc_identifier:identifier_liquid", {
description = S("Lookup tool"),
_doc_items_create_entry = false,
tool_capabilities = {},
range = 10,
groups = { not_in_creative_inventory = 1, not_in_craft_guide = 1 },
wield_image = "doc_identifier_identifier_liquid.png",
inventory_image = "doc_identifier_identifier_liquid.png",
liquids_pointable = true,
on_use = doc_identifier.identify,
on_place = doc_identifier.solid_mode,
on_secondary_use = doc_identifier.solid_mode,
})
minetest.register_craft({
output = "doc_identifier:identifier_solid",
recipe = { {"group:stick", "group:stick" },
{"", "group:stick"},
{"group:stick", ""} }
})
if minetest.get_modpath("default") ~= nil then
minetest.register_craft({
output = "doc_identifier:identifier_solid",
recipe = { { "default:glass" },
{ "group:stick" } }
})
end
minetest.register_alias("doc_identifier:identifier", "doc_identifier:identifier_solid")
doc.add_entry_alias("tools", "doc_identifier:identifier_solid", "tools", "doc_identifier:identifier_liquid")

View File

@ -0,0 +1,13 @@
Error: This node, item or object is undefined. This is always an error.\nThis can happen for the following reasons:\n• The mod which is required for it is not enabled\n• The author of the subgame or a mod has made a mistake = Fehler: Dieser Node, Gegenstand oder dieses Objekt ist nicht definiert.\nDas ist immer ein Fehler.\nDies kann aus folgenden Gründen passieren:\n• Die Mod, die dafür benötigt wird, ist nicht aktiv\n• Der Subgame-Autor oder ein Mod-Autor machte einen Fehler
It appears to originate from the mod “%s”, which is enabled. = Es scheint von der Mod »%s« zu stammen. Sie ist aktiv.
It appears to originate from the mod “%s”, which is not enabled! = Es scheint von der Mod »%s« zu stammen. Sie ist nicht aktiv!
Its identifier is “%s”. = Der Identifkator ist »%s«.
Lookup tool = Nachschlagewerkzeug
No help entry for this block could be found. = Für diesen Block konnte kein Hilfseintrag gefunden werden.
No help entry for this item could be found. = Für diesen Gegenstand konnte kein Hilfseintrag gefunden werden.
No help entry for this object could be found. = Für dieses Objekt konnte kein Hilfseintrag gefunden werden.
OK = OK
Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid. = Schlagen Sie einen beliebigen Block, Gegenstand oder irgendwas, worüber Sie mehr erfahren wollen. Das wird den passenden Hilfseintrag öffnen. Das Werkzeug hat zwei Modi, welcher mit einem Rechtsklick gewechselt werden kann. Im Flüssigmodus (blau) zeigt das Werkzeug auch auf Flüssigkeiten. Im Festmodus (rot) ist das nicht der Fall. Der Flüssigmodis ist notwendig, wenn Sie eine Flüssigkeit identifizieren wollen.
This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds. = Dieser Block kann nicht identifiziert werden, weil sich die Welt an dieser Stelle noch nicht materialisiert hat. Versuch es in ein paar Sekunden erneut.
This is a player. = Dies ist ein Spieler.
This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used. = Dieser nützliche kleine Helfer kann benutzt werden, um schnell etwas über die nähere Umgebung zu erfahren. Er identifiziert und analysiert Blöcke, Gegenstände und andere Dinge und zeigt ausführliche Informationen über all das, worauf man ihn anwendet.

View File

@ -0,0 +1,13 @@
Error: This node, item or object is undefined. This is always an error.\\nThis can happen for the following reasons:\\n• The mod which is required for it is not enabled\\n• The author of the subgame or a mod has made a mistake =
It appears to originate from the mod “%s”, which is enabled. =
It appears to originate from the mod “%s”, which is not enabled! =
Its identifier is “%s”. =
Lookup tool =
No help entry for this block could be found. =
No help entry for this item could be found. =
No help entry for this object could be found. =
OK =
Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid. =
This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds. =
This is a player. =
This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used. =

View File

@ -0,0 +1 @@
name = doc_identifier

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

View File

@ -0,0 +1,357 @@
# API documentation for `doc_items`
## Introduction
This document explains the API of `doc_items`. It contains a reference of
all functions.
## Quick start
The most common use case for using this API requires only to set some
hand-written help texts for your items.
The preferred way is to add the following optional fields to the
item definition when using `minetest.register_node`, etc.:
* `_doc_items_longdesc`: Long description of this item.
Describe here what this item is, what it is for, its purpose, etc.
* `_doc_items_usagehelp`: Description of *how* this item can be used.
Only set this if needed, e.g. standard mining tools don't need this.
Example:
minetest.register_node("example:dice", {
description = "Dice",
_doc_items_longdesc = "A decorative dice which shows the numbers 1-6 on its sides.",
_doc_items_usagehelp = "Right-click the dice to roll it.",
tiles = { "example_dice.png" },
is_ground_content = false,
--[[ and so on … ]]
})
When using this method, your mod does not need additional dependencies.
See below for some recommendations on writing good help texts.
If you need more customization, read ahead. ;-)
## New item fields
This mod adds support for new fields of the item definition. They allow for
easy and quick manipulation of the item help entries. All fields are optional.
* `_doc_items_longdesc`: Long description
* `_doc_items_usagehelp`: Usage help
* `_doc_items_image`: Entry image (default: inventory image)
* `_doc_items_hidden`: Whether entry is hidden (default: `false` for air and hand, `true` for everything else)
* `_doc_items_create_entry`: Whether to create an entry for this item (default: `true`)
* `_doc_items_entry_name`: The title of the entry. By default, this is the same as the `description` field
of the item. This field is required if the `description` is empty
* `_doc_items_durability`: This field is for describing how long a tool can be used before it breaks. Choose one data type:
* It it is a `number`: Fixed number of uses before it breaks
* If it is a `string`: Free-form text which explains how the durability works. Try to keep it short and only use it if the other types won't work
A full explanation of these fields is provided below.
## Concepts
This section explains the core concepts of an item help entry in-depth.
### Factoids
Basically, a factoid is usually a single sentence telling the player a specific
fact about the item. The task of each factoid is to basically convert parts
of the item definition to useful, readable, understandable text.
Example: It's a fact that `default:sand` has the group `falling_node=1`.
A factoid for this is basically just a simple conditional which puts the
the sentence “This block is affected to gravity and can fall.” into the
text if the node is member of said group.
Factoids can be more complex than that. The factoid for node drops needs to
account for different drop types and probabilities, etc.
`doc_items` has many predefined factoids already. This includes all “special”
groups (like `falling_node`), drops, mining capabilities, punch interval,
and much more.
Custom factoids can be added with `doc.sub.items.register_factoid`.
The idea behind factoids is to generate as much information as possible
automatically to reduce redundancy, inconsistencies and the workload of hand-
written descriptions.
### Long description and usage help
Factoids are not always sufficient to describe an item. This is the case
for facts where the item definition can not be used to automatically
generate texts. Examples: Custom formspecs, ABMs, special tool action
on right-click.
That's where the long description and usage help comes into play.
Those are two texts which are written manually for a specific item.
Roughly, the long description is for describing **what** the item is, how it
acts, what it is for. The usage help is for explaining **how** the
item can be used. It is less important for standard mining tools and weapons.
There is no hard length limit for the long description and the usage help.
#### Recommendations for long description
The long description should roughly contain the following info:
* What the item does
* What it is good for
* How it may be generated in the world
* Maybe some background info if you're in a funny mood
* Notable information which doesn't fit elsewhere
The description should normally **not** contain:
* Information which is already covered by factoids, like digging groups,
damage, group memberships, etc.
* How the item can be used
* Direct information about other items
* Any other redundant information
* Crafting recipes
One exception from the rule may be for highlighting the most important
purpose of a simple item, like that coal lumps are primarily used as fuel.
Sometimes, a long description is not necessary because the item is already
exhaustively explained by factoids.
For very simple items, consider using one of the template texts (see below).
Minimal style guide: Use complete sentences.
#### Recommendations for usage help
The usage help should only be set for items which are in some way special
in their usage. Standard tools and weapons should never have an usage help.
The rule of thumb is this: If a new player who already knows the Minetest
basics, but not this item, will not directly know how to use this item,
then the usage help should be added. If basic Minetest knowledge or
existing factoids are completely sufficient, usage help should not be added.
The recommendations for what not to put into the usage help is the same
as for long descriptions.
#### Template texts
For your convenience, a few template texts are provided for common texts
to avoid redundancy and to increase consistency for simple things. Read
`init.lua` to see the actual texts.
##### Long description
* `doc.sub.items.temp.build`: For building blocks like the brick block in Minetest Game
* `doc.sub.items.temp.deco`: For other decorational blocks.
* `doc.sub.items.temp.craftitem`: For items solely or almost solely used for crafting
##### Usage help
* `doc.sub.items.temp.eat`: For eatable items using the `on_use=minetest.item_eat(1)` idiom
* `doc.sub.items.temp.eat_bad`: Same as above, but eating them is considered a bad idea
* `doc.sub.items.temp.rotate_node`: For nodes with `on_place=minetest.rotate_node`,
explains placement and rotation
### Entry creation
By default, an entry for each item is added automatically, except for items
without a description (`description == nil`). This behaviour can be changed
on a per-item basis.
By setting the item definition's field `_doc_items_create_entry` to `true`
or `false`you can explicitly define whether this item should get its own
entry.
Suppressing an entry is useful for items which aren't supposed to be directly
seen or obtained by the player or if they are only used for technical
and/or internal purposes. Another possible reason to suppress an entry is
to scrub the entry list of lots of very similar related items where the
difference is too small to justify two separate entries (e.g.
burning furnace vs inactive furnace, because the gameplay mechanics are
identical for both).
### Hidden entries
Hidden entries are entries which are not visible in the list of entries. This
concept directly comes from the Documentation System. The entry will still be
created, it is just not selectable by normal means. Players might be able to
“unlock” an entry later. Refer to the API documentation of the Documentation
System to learn more.
By default, all entries are hidden except air and the hand.
To mark an entry as hidden, add the field `_doc_items_hidden=true` to its
item definition. To make sure an entry is never hidden, add
`_doc_items_hidden=false` instead (this rarely needs to be specified
explicitly).
### Hand and air
The mod adds some default help texts for the hand and the air which are
written in a way that they probably are true for most subgames out of the
box, but especially the hand help text is kept intentionally vague.
If you want to change these help texts or the entry names or other
attributes, just add `_doc_items_*` fields to the item definition, either
by re-defining or overwriting these items (e.g. with
`minetest.override_item`).
In the mod `doc_minetest_game`, the default hand help text is overwritten
to explain the hand in more detail, especially the hand behaviour in
Creative Mode.
## Functions
This is the reference of all available functions in this API.
### `doc.sub.items.register_factoid(category_id, factoid_type, factoid_generator)`
Add a custom factoid (see above) for the specified category.
* `category_id`: The help category for which the factoid applies:
* `"nodes"`: Blocks
* `"tools"`: Tools and weapons
* `"craftitems"`: Misc. items
* `nil`: All of the above
* `factoid_type`: Rough categorization of the factoid's content, used to
optimize the final text display. This currently determines where in the
entry text the factoid appears. Possible values:
* For all items:
* `"use"`: It's about using the item in some way (written right after the fixed usage help)
* `"groups"`: Group-related factoid (very vague)
* `"misc"`: Factoid doesn't fit anywhere else, is shown near the end
* For nodes only:
* `damage`: Related to player/mob damage or health
* `movement`: Related to player movement on, in or at node
* `sound`: Related to node sounds
* `gravity`: Related to gravity (e.g. falling node)
* `drop_destroy`: Related to node being destroyed or node dropping as an item
* `light`: Related to node light (luminance)
* `mining`: Related to mining
* `drops`: Related to node drops
* `factoid_generator`: A function which turns item definition into a string
(see blow)
#### `factoid_generator(itemstring, def)`
`itemstring` is the itemstring of the item to be documented, and `def` is the
complete item definition table (from Minetest).
This function must return a helpful string which turns a part of the item's
definition into an useful sentence or text. The text can contain newlines,
but it must not end with a newline.
This function must **always** return a string. If you don't want to add any text,
return the empty string.
Style guide: Try to use complete sentences and avoid too many newlines.
#### Example
This factoid will add the sentence “This block will extinguish nearby fire.”
to all blocks which are member of the group `puts_out_fire`.
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
if def.groups.puts_out_fire ~= nil then
return "This block will extinguish nearby fire."
else
return ""
end
end)
### `doc.sub.items.disable_core_factoid(factoid_name)`
This function removes a core (built-in) factoid entirely, its text will never be displayed in any
entry then.
#### Parameter
`factoid_name` chooses the factoid you want to disable. The following core factoids can be disabled:
* `"node_mining"`: Mining properties of nodes
* `"tool_capabilities"`: Tool capabilities such as digging times
* `"groups"`: Group memberships
* `"fuel"`: How long the item burns as a fuel and if there's a leftover
* `"itemstring"`: The itemstring
* `"drops"`: Node drops
* `"connects_to"`: Tells to which nodes the node connects to
* `"light"`: Light and transparency information for nodes
* `"drop_destroy"`: Information about when the node causes to create its “drop” and if it gets destroyed by flooding
* `"gravity"`: Factoid for `falling_node` group
* `"sounds"`: Infos about sound effects related to the item
* `"node_damage"`: Direct damage and drowning damage caused by nodes
* `"node_movement"`: Nodes affecting player movement
* `"liquid"`: Liquid-related infos of a node
* `"basics"`: Collection of many basic factoids: The custom help texts, pointability, collidability, range, stack size, `liquids_pointable`, “punches don't work as usual”. Be careful with this one!
#### Background
Normally, the core factoids are written in a very general-purpose style, so this function might
not be needed at all. But it might be useful for subgames and mods which radically break with
some of the underlying core assumptions in Minetest. For example, if your mod completely changes
the digging system, the help texts provided by `doc_items` are probably incorrect, so you can
disable `node_mining` and register a custom factoid as a replacement.
Please do not use this function lightly because it touches the very core of `doc_items`. Try to
understand a core factoid before you consider to disable it. If you think a core factoid is just
broken or buggy in general, please file a bug instead.
### `doc.sub.items.add_friendly_group_names(groupnames)`
Use this function so set some more readable group names to show them
in the formspec, since the internal group names are somewhat cryptic
to players.
`groupnames` is a table where the keys are the “internal” group names and
the values are the group names which will be actually shown in the
Documentation System.
***Note***: This function is mostly there to work around a problem in
Minetest as it does not support “friendly” group names, which means exposing
groups to an interface is not pretty. Therefore, this function may be
deprecated when Minetest supports such a thing.
### `doc.sub.items.get_group_name(internal_group_name)`
Returns the group name of the specified group as displayed by this mod.
If the setting `doc_items_friendly_group_names` is `true`, this might
return a “friendly” group name (see above). If no friendly group name
exists, `internal_group_name` is returned.
If `doc_items_friendly_group_names` is `false`, the argument is always
returned.
### `doc.sub.items.add_notable_groups(groupnames)`
Add a list of groups you think are notable enough to be mentioned in the
“This item belongs to the following groups: (…)” factoid. This factoid
is intended to give a quick rundown of misc. groups which don't fit
to other factoids, yet they are still somewhat relevant to gameplay.
`groupnames` is a table of group names you wish to add.
#### What groups should be added
What is “notable” is subjective, but there are some guidelines:
Do add a group if:
* It is used in an ABM
* It is used for a custom interaction with another item
* It is simple enough for the player to know an item is member of this group
* You want to refer to this group in help texts
* The “don'ts” below don't apply
Do not add a group if:
* It is *only* used for crafting, `connects_to`, mining times or damage groups
* A factoid covering this group already exists
* The group membership itself requires an explanation (consider writing a factoid instead)
* The group has no gameplay relevance
* Group rating is important to gameplay (consider writing a factoid instead)
Groups which are used for crafting or in the `connects_to` field of item
definitions are already automatically added to this factoid.
##### Examples for good additions
* A group where its members can be placed in bookshelves.
so this group meets the “custom interaction” criterion
* `water` in Minetest Game: Used for water nodes in the obsidian ABM
* `sand` in Minetest Game: Used for the cactus growth ABM, but also crafting.
Since it is not *only* used for crafting, it is OK to be added
##### Examples for bad additions
* `stick` in Minetest Game: This group appears in many crafting recipes and
has no other use. It is already added automatically
* A group in which members turn into obsidian when they touch water (ABM):
This group is not trivial and should be introduced in a factoid instead
* `cracky` in Min
* `dig_immediate`: This group is already covered by the default factoids of this
mod
## Dependencies
If you only add the custom fields to your items, you do *not* need to depend
on this mod. If you use anything else from this mod (e.g. a function), you
probably *do* need to depend (optionally or mandatorily) on this mod.

View File

@ -0,0 +1,68 @@
# Item Help [`doc_items`] (Version 1.1.0)
## Description
Automatically generated help texts of blocks, tools, weapons, crafting
items and other items.
The goal is to tell the player as much about basically almost all items as
possible, making it very convenient to look up simple things.
The ultimate goal of this mod is that eventually all relevant items have
a complete in-game documentation so no item leaves you confused.
This mod is useful to learn the hard facts about practically all items, like
how much damage weapon XYZ deals or whether you can dig that block.
This mod does *not* give you long explanations about how to use certain
nontrivial things, like the furnace from Minetest Game. This info might be
provided by other mods and insert it into the help.
This mod provides 3 new help categories (using the
Documentation System [`doc`]):
* Blocks (e.g. dirt, stone, wooden stair)
* Tools and weapons (e.g. wooden pickaxe, steel sword, screwdriver)
* Misc. items (e.g. dye, stick, flour)
Entries are automatically added. The information in the entries is
mostly automatically generated. It contains information about a wide range
of topics:
* Blocks
* Physics
* Digging properties
* Drops (including probabilities)
* Liquid information
* Pointability
* Luminance
* Much more
* Tools and weapons
* Mining capabilities
* Damage
* Durability
* More
* All items
* Range
* Stack size
* Group memberships
* Other information added by mods
This mod also allows for mods to adding custom written description
and usage help texts in free-form and even custom automatically generated texts
for mod-specific information like flammability in Minetest Game. This is
one of the core features of this mod; the mod relies on other mods to
provide their custom help texts for a complete help.
If you find a particular item which is lacking an explanation on usage,
request the mod author to add `doc_items` support.
## API
This mod has an API so that modders can add their own custom help texts,
custom factoids (single pieces of information extracted from the
item definition) and more.
For example, if your mods have some complex items which need
explanation, this mod can help you in adding help texts for them.
Read `API.md` to learn more.
## License
Everything in this mod is licensed under the MIT License.

View File

@ -0,0 +1,2 @@
doc
intllib?

View File

@ -0,0 +1 @@
Adds automatically generated help texts for items.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,140 @@
\sUsing it as fuel turns it into: @1. = \sWird dieser Gegenstand als Brennstoff verwendet, verwandelt er sich zu: @1.
@1 seconds = @1 Sekunden
# Item count times item name
@1×@2 = @1×@2
# Itemname (25%)
@1 (@2%) = @1 (@2%)
# Itemname (<0.5%)
@1 (<0.5%) = @1 (<0,5%)
# Itemname (ca. 25%)
@1 (ca. @2%) = @1 (ca. @2%)
# List separator (e.g. “one, two, three”)
,\s = ,\s
# Final list separator (e.g. “One, two and three”)
\sand\s = \sund\s
1 second = 1 Sekunde
A transparent block, basically empty space. It is usually left behind after digging something. = Ein transparenter Block, praktisch leerer Raum. Er wird üblicherweise hinterlassen, nachdem man etwas ausgegraben hat.
Air = Luft
Blocks = Blöcke
Building another block at this block will place it inside and replace it. = Wird ein anderer Block an diesem Block gebaut, wird dieser andere Block seine Stelle einnehmen.
Building this block is completely silent. = Das Bauen dieses Blocks ist völlig lautlos.
Collidable: @1 = Kollidiert: @1
Description: @1 = Beschreibung: @1
Falling blocks can go through this block; they destroy it when doing so. = Fallende Blöcke können diesen Block durchdringen; sie zerstören ihn dabei.
Full punch interval: @1 s = Schlagintervall: @1 s
Hand = Hand
Hold it in your hand, then leftclick to eat it. = Halten Sie es in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um es zu essen.
Hold it in your hand, then leftclick to eat it. But why would you want to do this? = Halten Sie es in Ihrer Hand, dann klicken Sie mit der linken Maustaste, um es zu essen. Aber warum sollten Sie das tun wollen?
Item reference of all wieldable tools and weapons = Gegenstandsreferenz aller tragbaren Werkzeugen und Waffen
Item reference of blocks and other things which are capable of occupying space = Gegenstandsreferenz aller Blöcke und anderen Dingen, die Raum belegen
Item reference of items which are neither blocks, tools or weapons (esp. crafting items) = Gegenstandsreferenz aller Gegenstände, welche weder Blöcke, Werkzeuge oder Waffen sind (insb. Fertigungsgegenstände)
Liquids can flow into this block and destroy it. = Flüssigkeiten können in diesen Block hereinfließen und ihn zerstören.
Maximum stack size: @1 = Maximale Stapelgröße: @1
Mining level: @1 = Grabestufe: @1
Mining ratings: = Grabewertungen:
• @1, rating @2: @3 s - @4 s = • @1, Wertung @2: @3 s - @4 s
• @1, rating @2: @3 s = • @1, Wertung @2: @3 s
Mining times: = Grabezeiten:
Mining this block is completely silent. = Das Abbauen dieses Blocks ist völlig lautlos.
Miscellaneous items = Sonstige Gegenstände
No = Nein
Pointable: No = Zeigbar: Nein
Pointable: Only by special items = Zeigbar: Nur von besonderen Gegenständen
Pointable: Yes = Zeigbar: Ja
Punches with this block don't work as usual; melee combat and mining are either not possible or work differently. = Schläge mit diesem Block funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise.
Punches with this item don't work as usual; melee combat and mining are either not possible or work differently. = Schläge mit diesem Gegenstand funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise.
Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently. = Schläge mit diesem Werkzeug funktionieren nicht auf die übliche Weise; Nahkampf und Graben sind damit entweder nicht möglich oder funktionieren auf andere Weise.
Range: @1 = Reichweite: @1
# Range: <Hand> (<Range>)
Range: @1 (@2) = Reichweite: @1 (@2)
Range: 4 = Reichweite: 4
# Rating used for digging times
Rating @1 = Wertung @1
Rating @1-@2 = Wertung @1-@2
The fall damage on this block is increased by @1%. = Der Fallschaden auf diesem Block ist um @1% erhöht.
The fall damage on this block is reduced by @1%. = Der Fallschaden auf diesem Block ist um @1% reduziert.
This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly. = Dieser Block ist lichtdurchlässig mit einen geringfügigen Helligkeitsverlust; Sonnenlicht passiert jedoch ohne Verlust.
This block allows light to propagate with a small loss of brightness. = Dieser Block ist lichtdurchlässig mit einen geringfügigen Helligkeitsverlust.
This block allows sunlight to propagate without loss in brightness. = Dieser Block ist vollkommen durchlässig für Sonnenlicht.
This block belongs to the @1 group. = Dieser Block gehört zur Gruppe »@1«.
This block belongs to these groups: @1. = Dieser Block gehört zu den folgenden Gruppen: @1.
This block can be climbed. = Dieser Block kann beklettert werden.
This block can be destroyed by any mining tool immediately. = Dieser Block kann von einem beliebigen Grabewerkzeug sofort zerstört werden.
This block can be destroyed by any mining tool in half a second. = Dieser Block kann von einem beliebigen Grabewerkzeug in einer halben Sekunde zerstört werden.
This block can be mined by any mining tool immediately. = Dieser Block kann von einem beliebigen Grabewerkzeug sofort abgebaut werden.
This block can be mined by any mining tool in half a second. = Dieser Block kann von einem beliebigen Grabewerkzeug in einer halben Sekunde abgebaut werden.
This block can be mined by mining tools which match any of the following mining ratings and its toughness level. = Dieser Block kann von Grabewerkzeugen abgebaut werden, falls sie auf eine der folgenden Grabewertungen sowie seinem Härtegrad passen.
This block can not be destroyed by ordinary mining tools. = Dieser Block kann nicht von Grabewerkzeugen zerstört werden.
This block can not be mined by ordinary mining tools. = Dieser Block kann nicht von gewöhnlichen Grabewerkzeugen abgebaut werden.
This block can serve as a smelting fuel with a burning time of @1. = Dieser Block kann als Brennstoff mit einer Brenndauer von @1 dienen.
This block causes a damage of @1 hit point per second. = Dieser Block richtet einen Schaden von @1 Trefferpunkt pro Sekunde an.
This block causes a damage of @1 hit points per second. = Dieser Block richtet einen Schaden von @1 Trefferpunkten pro Sekunde an.
This block connects to blocks of the @1 group. = Dieser Block verbindet sich mit Blöcken der Gruppe »@1«.
This block connects to blocks of the following groups: @1. = Dieser Block verbindet sich mit Blöcken der folgenden Gruppen: @1.
This block connects to these blocks: @1. = Dieser Block verbindet sich mit den folgenden Blöcken: @1.
This block connects to this block: @1. = Dieser Block verbindet sich mit diesem Block: @1.
This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds. = Dieser Block reduziert Ihren Atem und verursacht beim Ertrinken einen Schaden von @1 Trefferpunkt alle 2 Sekunden.
This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds. = Dieser Block reduziert Ihren Atem und verursacht beim Ertrinken einen Schaden von @1 Trefferpunkten alle 2 Sekunden.
This block glows faintly. It is barely noticable. = Dieser Block leuchtet schwach. Es ist kaum merklich.
This block is a light source with a light level of @1. = Dieser Block ist eine Lichtquelle mit einer Helligkeitsstufe von @1.
This block glows faintly with a light level of @1. = Dieser Block leuchtet schwach mit einer Helligkeitsstufe von @1.
This block is a building block for creating various buildings. = Dieser Block ist für den Bau diverser Gebäude vorgesehen.
This block is a liquid with these properties: = Dieser Block ist eine Flüssigkeit mit folgenden Eigenschaften:
This block is affected by gravity and can fall. = Dieser Block wird von der Schwerkraft beeinflusst und kann fallen.
This block is completely silent when mined or built. = Dieser Block kann vollkommen lautlos gebaut oder abgebaut werden.
This block is completely silent when walked on, mined or built. = Es ist vollkommen lautlos, wenn man auf diesen Block geht, ihn baut oder abbaut.
This block is destroyed when a falling block ends up inside it. = Dieser Block wird zerstört, wenn ein fallender Block in ihm landet.
This block negates all fall damage. = Auf diesem Block gibt es keinen Fallschaden.
This block points to liquids. = Mit diesem Block zeigt man auf Flüssigkeiten.
This block will drop as an item when a falling block ends up inside it. = Dieser Block wird sich als Gegenstand abwerfen, wenn ein fallender Block in ihn landet.
This block will drop as an item when it is not attached to a surrounding block. = Dieser Block wird sich als Gegenstand abwerfen, wenn er nicht an einen benachbarten Block befestigt ist.
This block will drop as an item when no collidable block is below it. = Dieser Block wird sich als Gegenstand abwerfen, wenn kein kollidierender Block unter ihn liegt.
This block will drop the following items when mined: %s. = Dieser Block wird nach dem Abbauen die folgenden Gegenstände abwerfen: %s.
This block will drop the following when mined: @1×@2. = Dieser Block wird nach dem Abbauen folgendes abwerfen: @1×@2.
This block will drop the following when mined: @1. = Dieser Block wird nach dem Abbauen folgendes abwerfen: @1.
This block will drop the following when mined: %s. = Dieser Block wird nach dem Abbauen folgendes abwerfen: %s.
This block will make you bounce off with an elasticity of @1%. = Dieser Block wird Sie mit einer Elastizität von @1% abprallen lassen.
This block will randomly drop one of the following when mined: %s. = Dieser Block wird nach dem Abbauen zufällig eines von den folgenden Dingen abwerfen: %s.
This block will randomly drop up to %d drops of the following possible drops when mined: %s. = Dieser Block nach dem Abbauen wird zufällig bis zu %d Abwürfe von den folgenden möglichen Abwürfen abwerfen: %s.
This block won't drop anything when mined. = Dieser Block wird nach dem Abbauen nichts abwerfen.
This is a decorational block. = Dieser Block dient zur Dekoration.
This is a melee weapon which deals damage by punching. = Dies ist eine Nahkampfwaffe, welche Schaden durch Schläge verursacht.
Maximum damage per hit: = Maximaler Schaden pro Treffer:
This item belongs to the @1 group. = Dieser Gegenstand gehört zur Gruppe »@1«.
This item belongs to these groups: @1. = Dieser Gegenstand gehört zu den folgenden Gruppen: @1.
This item can serve as a smelting fuel with a burning time of @1. = Dieser Gegenstand kann als Brennstoff mit einer Brenndauer von @1 dienen.
This item is primarily used for crafting other items. = Dieser Gegenstand wird primär für die Fertigung von anderen Gegenständen benutzt.
This item points to liquids. = Mit diesem Gegenstand zeigt man auf Flüssigkeiten.
This tool belongs to the @1 group. = Dieses Werkzeug gehört zur Gruppe »@1«.
This tool belongs to these groups: @1. = Dieses Werkzeug gehört zu den folgenden Gruppen: @1.
This tool can serve as a smelting fuel with a burning time of @1. = Dieses Werkzeug kann als Brennstoff mit einer Brenndauer von @1 dienen.
This tool is capable of mining. = Dies ist ein Grabewerkzeug.
Maximum toughness levels: = Maximale Härtegrade:
This tool points to liquids. = Mit diesem Werkzeug zeigt man auf Flüssigkeiten.
Tools and weapons = Werkzeuge und Waffen
Unknown Node = Unbekannter Node
Usage help: @1 = Benutzung: @1
Walking on this block is completely silent. = Auf diesem Block sind Schritte lautlos.
Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand. = Wenn Sie keinen Gegenstand halten, benutzen Sie die Hand, welches als ein Werkzeug mit seinen eigenen Fägihkeiten dient. Wenn Sie einen Gegenstand halten, der kein Grabewerkzeug oder eine Waffe ist, wird er sich verhalten als wäre er die Hand.
Yes = Ja
You can not jump while standing on this block. = Man kann von diesem Block nicht abspringen.
any level = beliebige Stufe
level 0 = Stufe 0
level 0-@1 = Stufen 0-@1
unknown = unbekannt
Unknown item (@1) = Unbekannter Gegenstand (@1)
• @1: @2 = • @1: @2
• @1: @2 HP = • @1: @2 TP
• @1: @2, @3 = • @1: @2, @3
• Flowing range: @1 = • Fließweite: @1
• No flowing = • Kein Fließen
• Not renewable = • Nicht erneuerbar
• Renewable = • Erneuerbar
• Viscosity: @1 = • Zähflüssigkeit: @1
Itemstring: "@1" = Itemstring: »@1«
Durability: @1 uses = Haltbarkeit: @1 Benutzungen
Durability: @1 = Haltbarkeit: @1
Mining durability: = Grabehaltbarkeit:
• @1, level @2: @3 uses = • @1, Stufe @2: @3 Benutzungen
• @1, level @2: Unlimited = • @1, Stufe @2: Unbegrenzt
This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead. = Die Rotation dieses Blocks hängt davon ab, wie sie ihn platzieren: Platzieren Sie ihn auf den Boden oder an die Decke, um ihn vertikal aufzustellen; platzieren Sie in an der Seite für eine horizontale Ausrichtung. Wenn Sie während des Bauens schleichen, wird der Block stattdessen senkrecht zur üblichen Ausrichtung rotiert.

View File

@ -0,0 +1,140 @@
\sUsing it as fuel turns it into: @1. =
@1 seconds =
# Item count times item name
%@1×@2 =
# Itemname (25%)
@1 (@2%) =
# Itemname (<0.5%)
@1 (<0.5%) =
# Itemname (ca. 25%)
@1 (ca. @2%) =
# List separator (e.g. “one, two, three”)
,\s =
# Final list separator (e.g. “One, two and three”)
\sand\s =
1 second =
A transparent block, basically empty space. It is usually left behind after digging something. =
Air =
Blocks =
Building another block at this block will place it inside and replace it. =
Building this block is completely silent. =
Collidable: @1 =
Description: @1 =
Falling blocks can go through this block; they destroy it when doing so. =
Full punch interval: @1 s =
Hand =
Hold it in your hand, then leftclick to eat it. =
Hold it in your hand, then leftclick to eat it. But why would you want to do this? =
Item reference of all wieldable tools and weapons =
Item reference of blocks and other things which are capable of occupying space =
Item reference of items which are neither blocks, tools or weapons (esp. crafting items) =
Liquids can flow into this block and destroy it. =
Maximum stack size: @1 =
Mining level: @1 =
Mining ratings: =
• @1, rating @2: @3 s - @4 s =
• @1, rating @2: @3 s =
Mining times: =
Mining this block is completely silent. =
Miscellaneous items =
No =
Pointable: No =
Pointable: Only by special items =
Pointable: Yes =
Punches with this block don't work as usual; melee combat and mining are either not possible or work differently. =
Punches with this item don't work as usual; melee combat and mining are either not possible or work differently. =
Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently. =
Range: @1 =
# Range: <Hand> (<Range>)
Range: @1 (@2) =
Range: 4 =
# Rating used for digging times
Rating @1 =
# @1 is minimal rating, @2 is maximum rating
Rating @1-@2 =
The fall damage on this block is increased by @1%. =
The fall damage on this block is reduced by @1%. =
This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly. =
This block allows light to propagate with a small loss of brightness. =
This block allows sunlight to propagate without loss in brightness. =
This block belongs to the @1 group. =
This block belongs to these groups: @1. =
This block can be climbed. =
This block can be destroyed by any mining tool immediately. =
This block can be destroyed by any mining tool in half a second. =
This block can be mined by any mining tool immediately. =
This block can be mined by any mining tool in half a second. =
This block can be mined by mining tools which match any of the following mining ratings and its toughness level. =
This block can not be destroyed by ordinary mining tools. =
This block can not be mined by ordinary mining tools. =
This block can serve as a smelting fuel with a burning time of @1. =
This block causes a damage of @1 hit point per second. =
This block causes a damage of @1 hit points per second. =
This block connects to blocks of the @1 group. =
This block connects to blocks of the following groups: @1. =
This block connects to these blocks: @1. =
This block connects to this block: @1. =
This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds. =
This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds. =
This block is a light source with a light level of @1. =
This block glows faintly with a light level of @1. =
This block is a building block for creating various buildings. =
This block is a liquid with these properties: =
This block is affected by gravity and can fall. =
This block is completely silent when mined or built. =
This block is completely silent when walked on, mined or built. =
This block is destroyed when a falling block ends up inside it. =
This block negates all fall damage. =
This block points to liquids. =
This block will drop as an item when a falling block ends up inside it. =
This block will drop as an item when it is not attached to a surrounding block. =
This block will drop as an item when no collidable block is below it. =
This block will drop the following items when mined: %s. =
This block will drop the following when mined: @1×@2. =
This block will drop the following when mined: @1. =
This block will drop the following when mined: %s. =
This block will make you bounce off with an elasticity of @1%. =
This block will randomly drop one of the following when mined: %s. =
This block will randomly drop up to %d drops of the following possible drops when mined: %s. =
This block won't drop anything when mined. =
This is a decorational block. =
This is a melee weapon which deals damage by punching. =
Maximum damage per hit: =
This item belongs to the @1 group. =
This item belongs to these groups: @1. =
This item can serve as a smelting fuel with a burning time of @1. =
This item is primarily used for crafting other items. =
This item points to liquids. =
This tool belongs to the @1 group. =
This tool belongs to these groups: @1. =
This tool can serve as a smelting fuel with a burning time of @1. =
This tool is capable of mining. =
Maximum toughness levels: =
This tool points to liquids. =
Tools and weapons =
Unknown Node =
Usage help: @1 =
Walking on this block is completely silent. =
Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand. =
Yes =
You can not jump while standing on this block. =
any level =
level 0 =
level 0-@1 =
unknown =
Unknown item (@1) =
• @1: @2 =
• @1: @2 HP =
• @1: @2, @3 =
• Flowing range: @1 =
• No flowing =
• Not renewable =
• Renewable =
• Viscosity: @1 =
Itemstring: "@1" =
Durability: @1 uses =
Durability: @1 =
Mining durability: =
• @1, level @2: @3 uses =
• @1, level @2: Unlimited =
This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead. =

View File

@ -0,0 +1 @@
name = doc_items

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,16 @@
#This feature is experimental!
#If enabled, the mod will show alternative group names which are a bit
#more readable than the internally used (but canonical) group names. For
#example, the group “wood” may be rendered as “Wood”, “leaves” as
#“Leaves and Needles”, “oddly_breakable_by_hand” as “Hand-breakable”,
#and so on. Note that these alternative names are only used for better
#understanding, they are not official.
#This feature might be removed in later versions if it becomes obsolete.
doc_items_friendly_group_names (Show “friendly” group names) bool false
#If enabled, the mod will show the itemstring of the entry for each item to
#all players. If disabled, the itemstring will only be shown to players
#with the “give” or “debug” privilege.
#The itemstring is useful to power users and programmers and
#is used e.g. for the /give and /giveme commands.
doc_items_show_itemstrings (Show itemstrings) bool false

View File