Debian Codegraph @

doc/charedit.lyx

raw
1 #LyX 1.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 2.15
3 \textclass article
4 \language default
5 \inputencoding latin1
6 \fontscheme default
7 \graphics default
8 \paperfontsize default
9 \spacing single
10 \papersize Default
11 \paperpackage a4wide
12 \use_geometry 0
13 \use_amsmath 0
14 \paperorientation portrait
15 \secnumdepth 3
16 \tocdepth 3
17 \paragraph_separation indent
18 \defskip medskip
19 \quotes_language english
20 \quotes_times 2
21 \papercolumns 1
22 \papersides 1
23 \paperpagestyle default
24
25 \layout Title
26
27 The Character Editor
28 \layout Author
29
30 Kai Sterker
31 \layout Section
32
33 Overview
34 \layout Standard
35
36 The character editor is used to create and edit the non player characters
37 (NPC's) that will populate the gameworld.
38 With the editor you can set all the character's attributes such as it's
39 name, race and gender, the different animations, events specific to that
40 character and his schedule and dialogue scripts.
41 Each of that, as well as how to use the editor is explained in the correspondin
42 g section.
43 \layout Section
44
45 Attributes
46 \layout Standard
47
48 The editor starts with this section displayed.
49 You can enter the character's name and select his race and gender from
50 the optionmenus.
51 Below is a list with further attributes, which usually will already contain
52 some default attributes.
53 This shall save you some typing.
54 You can change the list of default attributes by editing the file
55 \emph on
56 attributes.txt
57 \emph default
58 in the editior's directory.
59 \layout Itemize
60
61 To
62 \series bold
63 add
64 \series default
65 a new attribute, enter it's name into the
66 \emph on
67 Attribute
68 \emph default
69 field, it's value into the
70 \emph on
71 Value
72 \emph default
73 field.
74 Then click
75 \emph on
76 Update
77 \emph default
78 .
79 \layout Itemize
80
81 To
82 \series bold
83 change
84 \series default
85 an entry, select it from the list.
86 Then change the value and also click
87 \emph on
88 Update
89 \emph default
90 .
91 \layout Itemize
92
93 To
94 \series bold
95 remove
96 \series default
97 an entry, select it from the list and click
98 \emph on
99 Remove
100 \emph default
101 .
102 \layout Standard
103
104 A word on the character's name.
105
106 \series bold
107 It
108 \series default
109 is probably the most important attribute for the character, as the game
110 engine needs it to distinguish all the different NPC's.
111 For most operations on a NPC, the engine utilizes it's name.
112 For that reason, each character
113 \emph on
114 must
115 \emph default
116 have an unique name.
117 This is partly ensured by using the character name as the file name, so
118 you won't be able to create two characters with the same name in the same
119 directory.
120 \layout Standard
121
122 What attributes and flags to add to the list may vary from character to
123 character.
124 Currently, it's too early to say which ones we'll need for sure.
125 \layout Section
126
127 Graphics
128 \layout Standard
129
130 Once we know what graphics a character needs, you'll be able to assign them
131 here.
132 Until then, this part of the editor is left blank.
133 \layout Section
134
135 Events
136 \layout Standard
137
138 Here you can assign event handlers to that particular character.
139 That is, they will only react if an event was triggered by this very character.
140 Apart from that you can specify other limitations for each event.
141 See the event documentation for more details.
142 \layout Itemize
143
144 To
145 \series bold
146 add
147 \series default
148 an event, select the event type from the optionmenu and click
149 \emph on
150 Add
151 \emph default
152 .
153 \layout Itemize
154
155 To
156 \series bold
157 change
158 \series default
159 an event, select it from the list and click
160 \emph on
161 Update
162 \emph default
163 .
164 Note that you cannot change the event type itself, only the additional
165 parameters.
166 \layout Itemize
167
168 To
169 \series bold
170 remove
171 \series default
172 an event, select it from the list and click
173 \emph on
174 Remove
175 \emph default
176 .
177 \layout Standard
178
179 When adding or changing an event, a new dialog will pop up where you can
180 enter the script that will get executed whenever the event occurs.
181 Either type in the filename without any path and file extension (e.g.
182 to add the /home/me/scripts/event_handler.py type event_handler), or click
183 on
184 \emph on
185 Browse
186 \emph default
187 to open a file browser.
188 Note, that the script needs to be placed in
189 \emph on
190 <data>/scripts/events/
191 \emph default
192 for the game engine to find it.
193 \layout Standard
194
195 Each event has some additional parameters that control when it will be triggered.
196 You can change them by selecting a entry from the list, entering a value
197 and clicking the
198 \emph on
199 Update
200 \emph default
201 button.
202 To find out what attributes are available for a certain type of event,
203 what values are allowed and what for they are, look at the event documentation.
204 \layout Section
205
206 Actions
207 \layout Standard
208
209 Here you can specify the initial schedule and dialogue script of a character.
210 The schedule controls it's movements on the map, the dialogue is used for
211 conversations with the player.
212 Those scripts can be changed within the game from event, schedule and dialogue
213 scripts.
214 See the corresponding documention on how to do that.
215 \layout Standard
216
217 To set those scrips, either type in the filename without any path and file
218 extension, or click on
219 \emph on
220 Browse
221 \emph default
222 to open a file browser.
223 Schedule scripts have to be placed into
224 \emph on
225 <data>/scripts/schedules/
226 \emph default
227 and dialogue scripts into
228 \emph on
229 <data>/scripts/dialogues/
230 \emph default
231 for the game engine to find them.
232 \layout Section
233
234 Saving and Loading
235 \layout Standard
236
237 For editiing purpose, each character is saved in an ASCII file of it's own.
238 If you want, you can edit this file with your favourite text editor, but
239 errors in that file might crash the editor, so be careful.
240 (If you don't like this, write a more flexible parser!)
241 \layout Standard
242
243 For use in the game, all character files of a specific directory are merged
244 into a single, binary file that will be loaded at startup of the game.
245 So make sure to store all characters belonging to the same project in the
246 same directory.
247 \layout Section
248
249 Creating the character.data
250 \layout Standard
251
252 To merge all characters to the file that is read by the game engine, you
253 can use the
254 \emph on
255 mergechars
256 \emph default
257 command line tool (which will later be integrated with charedit).
258 Its usage is
259 \layout LyX-Code
260
261 mergechars <character directory> [outfile]
262 \layout Standard
263
264 It will add all characters in the
265 \emph on
266 character directory
267 \emph default
268 either to the optional
269 \emph on
270 outfile
271 \emph default
272 , or to a file called character.data it creates in the current working directory.
273 If the file already exists, it will be overwritten.
274 \the_end