This repository has been archived by the owner on Jun 7, 2018. It is now read-only.
/
quest.dox
81 lines (72 loc) · 3.8 KB
/
quest.dox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
\page quest Solarus 1.0 - Quest data files specification
We explain here how a quest is built.
A quest is a data package that may be run by the Solarus C++ engine
(the Solarus executable file).
When you run the \c solarus executable file, it needs the path of the quest
to launch.
This can be done at runtime by specifying the path as a command-line argument:
<tt>solarus path/to/your/quest</tt>.
If the quest path is not specified, the current directory is considered by
default, unless you compiled Solarus with another default quest path.
The quest in this path may have one of the following two forms:
- A zip archive called \c data.solarus and containing all data of your quest.
This archive form is useful when your quest is finished and you distribute it
to people.
- A directory called \c data and containing all data of your quest.
This form is handy when you are developing your quest. It is also the only
possible form to edit your quest with Solarus Quest Editor.
In fact, when you modify a map in the editor, you don't even need to restart
the game.
The data files represent all resources used by both the engine and the quest,
such as sounds, musics, images, sprites, dialogs, maps and Lua scripts.
We specify here the details for all those files.
Here is the full structure of the \c data directory / \c data.solarus
archive of a quest and the syntax of each file.
- \subpage quest_properties_file "quest.dat": global properties of your quest.
- \subpage quest_resource_file "project_db.dat": list of all resources
(maps, sprites, enemies...) with their id and human-readable name.
- \subpage quest_main_script "main.lua": main Lua script of your quest.
- \c *.lua: other Lua scripts, possibly organized in subdirectories.
- \subpage quest_sounds "sounds/": contains all sound effects.
- \c sounds/*.ogg: your sound files.
- \subpage quest_musics "musics/": contains all musics.
- \c musics/*.{ogg, it, spc}: your music files.
- \c text/: contains the fonts used to draw text in your quest.
- \subpage quest_font_list_file "text/fonts.dat": the list of fonts and
their properties.
- \c text/*.{ttf, fon, png, ...}: your font files.
- \c languages/: contains the language-specific files.
- \subpage quest_language_list_file "languages/languages.dat": list of
supported languages.
- \subpage quest_language_strings "languages/xx/text/strings.dat": strings of
language \c "xx".
- \subpage quest_language_dialogs "languages/xx/text/dialogs.txt": dialogs of
language \c "xx".
- languages/xx/images/: contains all images
that have text in them in language \c "xx".
- \c languages/xx/images/*.png: your language-specific images.
- \c sprites/: contains all animated sprites, possibly organized in
subdirectories.
- \subpage quest_sprite_data_file "sprites/xx.dat": definition of sprite
\c "xx".
- \c sprites/*.png: images used by your sprites (except the
tileset-dependent ones).
- \c maps/: contains all maps of your quest.
- \subpage quest_map_data_file "maps/xx.dat": definition of map \c "xx" and all
its entities.
- \ref lua_api_map "maps/xx.lua": Lua script of map \c "xx".
- \c tilesets/: contains all tilesets available to maps.
- \subpage quest_tileset_data_file "tilesets/xx.dat": definition of tileset
\c "xx" and all its tile patterns.
- tilesets/xx.tiles.png": image with all
tile patterns of tileset \c "xx".
- tilesets/xx.entities.png: image
with all tileset-dependent sprite animations for tileset \c "xx".
- \c items/: contains all equipment item Lua scripts.
- \ref lua_api_item "items/xx.lua": Lua script that defines the
properties and the behavior of equipment item \c "xx".
- \c enemies/: contains all enemy Lua scripts.
- \ref lua_api_enemy "enemies/xx.lua": Lua script that defines the
properties and the behavior of the enemy model \c "xx".
*/