Explain solution files briefly
This commit is contained in:
parent
c1f10191b9
commit
97da75d2f5
@ -14,7 +14,12 @@ To add a new level pack, a new Luanti mod must be created containing these thing
|
|||||||
This file also defines the level order. Levels at the top will be played first.
|
This file also defines the level order. Levels at the top will be played first.
|
||||||
3) Lua code to register the level pack (see below)
|
3) Lua code to register the level pack (see below)
|
||||||
|
|
||||||
The Lua mod must depend on `lzr_levels`.
|
The mod must depend on `lzr_levels`.
|
||||||
|
|
||||||
|
The mod *should* follow the naming convention `lzr_pack_<name>`.
|
||||||
|
|
||||||
|
Apart from this, the mod can be like any other mod and may add or
|
||||||
|
change other things on top of just the levels themselves.
|
||||||
|
|
||||||
## File structure
|
## File structure
|
||||||
|
|
||||||
@ -45,7 +50,7 @@ If successful, the level pack will appear in the game under the custom levels me
|
|||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
||||||
* `name`: level pack ID (string, allowed characters are `a-z`, `A-Z`, `0-9` and `_` (underscore))
|
* `name`: Level pack ID (string, allowed characters are `a-z`, `A-Z`, `0-9` and `_` (underscore))
|
||||||
* `info`: Table of optional additional information, with these fields:
|
* `info`: Table of optional additional information, with these fields:
|
||||||
* `title`: human-readable level pack title
|
* `title`: human-readable level pack title
|
||||||
* `description`: short description/explanation about this level pack. 1-3 sentences.
|
* `description`: short description/explanation about this level pack. 1-3 sentences.
|
||||||
@ -53,42 +58,50 @@ Parameters:
|
|||||||
* `textdomain_npc_texts`: textdomain of the translation file containing the translated texts for NPCs like Goldie the Parrot (default: no translation)
|
* `textdomain_npc_texts`: textdomain of the translation file containing the translated texts for NPCs like Goldie the Parrot (default: no translation)
|
||||||
* `level_data_file`: Path to CSV file containing metadata of all levels (default: `<modpath>/data/level_data.csv`)
|
* `level_data_file`: Path to CSV file containing metadata of all levels (default: `<modpath>/data/level_data.csv`)
|
||||||
* `schematic_path`: Path to directory containing the level '.mts' schematic files (default: `<modpath>/schematics`)
|
* `schematic_path`: Path to directory containing the level '.mts' schematic files (default: `<modpath>/schematics`)
|
||||||
* `solutions_path`: Path to directory containing the OPTIONAL level '.sol.csv' solution files (default: `<modpath>/solutions`)
|
* `solutions_path`: Path to directory containing the *optional* level '.sol.csv' solution files (default: `<modpath>/solutions`)
|
||||||
|
|
||||||
If successful, the level pack will appear in the game under the custom levels menu.
|
If successful, the level pack will appear in the game under the custom levels menu.
|
||||||
|
|
||||||
|
#### A note about solution files
|
||||||
|
|
||||||
|
Solution files exist for internal purposes, for the quality assurance and game stability of
|
||||||
|
Lazarr! to ensure the levels still work after major changes to the game. This feature mainly
|
||||||
|
exists for the core levels and it’s not neccessary for custom level packs to create them.
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
A simple example with one level, translated into German.
|
A simple example with one level, translated into German.
|
||||||
|
|
||||||
First, the file structure:
|
We call the mod `lzr_pack_example`.
|
||||||
|
|
||||||
|
Here’s the file structure:
|
||||||
|
|
||||||
* `mod.conf`
|
* `mod.conf`
|
||||||
* `init.lua`
|
* `init.lua`
|
||||||
* `schematics`
|
* `schematics`
|
||||||
* `example.mts`
|
* `lzr_pack_example_example.mts`
|
||||||
* `data`
|
* `data`
|
||||||
* `level_data.csv`
|
* `level_data.csv`
|
||||||
* `locale`
|
* `locale`
|
||||||
* `example_levels.pot`
|
* `lzr_pack_example.pot`
|
||||||
* `example_levels.po.de`
|
* `lzr_pack_example.po.de`
|
||||||
* `example_levels_level_names.pot`
|
* `lzr_pack_example_level_names.pot`
|
||||||
* `example_levels_level_names.de.po`
|
* `lzr_pack_example_level_names.de.po`
|
||||||
* `example_levels_npc_texts.pot`
|
* `lzr_pack_example_npc_texts.pot`
|
||||||
* `example_levels_npc_texts.de.po`
|
* `lzr_pack_example_npc_texts.de.po`
|
||||||
|
|
||||||
The code of `init.lua`:
|
The code of `init.lua`:
|
||||||
|
|
||||||
```
|
```
|
||||||
local S = minetest.get_translator("example_levels")
|
local S = minetest.get_translator("lzr_pack_example")
|
||||||
|
|
||||||
lzr_levels.register_level_pack("example",
|
lzr_levels.register_level_pack("example",
|
||||||
{
|
{
|
||||||
title = S("My Example Levels"),
|
title = S("My Example Levels"),
|
||||||
description = S("Some example levels to test things."),
|
description = S("Some example levels to test things."),
|
||||||
textdomain_npc_texts = "example_levels_npc_texts",
|
textdomain_level_names = "lzr_pack_example_level_names",
|
||||||
textdomain_level_names = "example_levels_level_names",
|
textdomain_npc_texts = "lzr_pack_example_npc_texts",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user