File: charedit.lyx

package info (click to toggle)
adonthell 0.3.8-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,416 kB
  • sloc: cpp: 50,659; sh: 5,142; python: 3,307; makefile: 338; lex: 216; sed: 16
file content (274 lines) | stat: -rw-r--r-- 6,544 bytes parent folder | download | duplicates (9)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
#LyX 1.1 created this file. For more info see http://www.lyx.org/
\lyxformat 2.15
\textclass article
\language default
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4wide
\use_geometry 0
\use_amsmath 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Title

The Character Editor
\layout Author

Kai Sterker
\layout Section

Overview
\layout Standard

The character editor is used to create and edit the non player characters
 (NPC's) that will populate the gameworld.
 With the editor you can set all the character's attributes such as it's
 name, race and gender, the different animations, events specific to that
 character and his schedule and dialogue scripts.
 Each of that, as well as how to use the editor is explained in the correspondin
g section.
\layout Section

Attributes
\layout Standard

The editor starts with this section displayed.
 You can enter the character's name and select his race and gender from
 the optionmenus.
 Below is a list with further attributes, which usually will already contain
 some default attributes.
 This shall save you some typing.
 You can change the list of default attributes by editing the file 
\emph on 
attributes.txt
\emph default 
 in the editior's directory.
\layout Itemize

To 
\series bold 
add
\series default 
 a new attribute, enter it's name into the 
\emph on 
Attribute
\emph default 
 field, it's value into the 
\emph on 
Value
\emph default 
 field.
 Then click 
\emph on 
Update
\emph default 
.
\layout Itemize

To 
\series bold 
change
\series default 
 an entry, select it from the list.
 Then change the value and also click 
\emph on 
Update
\emph default 
.
\layout Itemize

To 
\series bold 
remove
\series default 
 an entry, select it from the list and click 
\emph on 
Remove
\emph default 
.
\layout Standard

A word on the character's name.
 
\series bold 
It
\series default 
 is probably the most important attribute for the character, as the game
 engine needs it to distinguish all the different NPC's.
 For most operations on a NPC, the engine utilizes it's name.
 For that reason, each character 
\emph on 
must 
\emph default 
have an unique name.
 This is partly ensured by using the character name as the file name, so
 you won't be able to create two characters with the same name in the same
 directory.
\layout Standard

What attributes and flags to add to the list may vary from character to
 character.
 Currently, it's too early to say which ones we'll need for sure.
\layout Section

Graphics
\layout Standard

Once we know what graphics a character needs, you'll be able to assign them
 here.
 Until then, this part of the editor is left blank.
\layout Section

Events
\layout Standard

Here you can assign event handlers to that particular character.
 That is, they will only react if an event was triggered by this very character.
 Apart from that you can specify other limitations for each event.
 See the event documentation for more details.
\layout Itemize

To 
\series bold 
add
\series default 
 an event, select the event type from the optionmenu and click 
\emph on 
Add
\emph default 
.
\layout Itemize

To 
\series bold 
change
\series default 
 an event, select it from the list and click 
\emph on 
Update
\emph default 
.
 Note that you cannot change the event type itself, only the additional
 parameters.
\layout Itemize

To 
\series bold 
remove
\series default 
 an event, select it from the list and click 
\emph on 
Remove
\emph default 
.
\layout Standard

When adding or changing an event, a new dialog will pop up where you can
 enter the script that will get executed whenever the event occurs.
 Either type in the filename without any path and file extension (e.g.
 to add the /home/me/scripts/event_handler.py type event_handler), or click
 on 
\emph on 
Browse
\emph default 
 to open a file browser.
 Note, that the script needs to be placed in 
\emph on 
<data>/scripts/events/
\emph default 
 for the game engine to find it.
\layout Standard

Each event has some additional parameters that control when it will be triggered.
 You can change them by selecting a entry from the list, entering a value
 and clicking the 
\emph on 
Update
\emph default 
 button.
 To find out what attributes are available for a certain type of event,
 what values are allowed and what for they are, look at the event documentation.
\layout Section

Actions
\layout Standard

Here you can specify the initial schedule and dialogue script of a character.
 The schedule controls it's movements on the map, the dialogue is used for
 conversations with the player.
 Those scripts can be changed within the game from event, schedule and dialogue
 scripts.
 See the corresponding documention on how to do that.
\layout Standard

To set those scrips, either type in the filename without any path and file
 extension, or click on 
\emph on 
Browse
\emph default 
 to open a file browser.
 Schedule scripts have to be placed into 
\emph on 
<data>/scripts/schedules/ 
\emph default 
and dialogue scripts into 
\emph on 
<data>/scripts/dialogues/
\emph default 
 for the game engine to find them.
\layout Section

Saving and Loading
\layout Standard

For editiing purpose, each character is saved in an ASCII file of it's own.
 If you want, you can edit this file with your favourite text editor, but
 errors in that file might crash the editor, so be careful.
 (If you don't like this, write a more flexible parser!)
\layout Standard

For use in the game, all character files of a specific directory are merged
 into a single, binary file that will be loaded at startup of the game.
 So make sure to store all characters belonging to the same project in the
 same directory.
\layout Section

Creating the character.data
\layout Standard

To merge all characters to the file that is read by the game engine, you
 can use the 
\emph on 
mergechars
\emph default 
 command line tool (which will later be integrated with charedit).
 Its usage is
\layout LyX-Code

mergechars <character directory> [outfile]
\layout Standard

It will add all characters in the 
\emph on 
character directory
\emph default 
 either to the optional 
\emph on 
outfile
\emph default 
, or to a file called character.data it creates in the current working directory.
 If the file already exists, it will be overwritten.
\the_end