-
Notifications
You must be signed in to change notification settings - Fork 1
/
conqinit.txt
1226 lines (942 loc) · 48.1 KB
/
conqinit.txt
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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
CONQINIT, the Unrated Edition.
CONTENTS:
## OVERVIEW
## conqinitrc
## global
## shiptype
## planet
## texturesrc or user .trc files
## texture
## animation
## animdef
# istate subsection
# texanim subsection
# colanim subsection
# geoanim subsection
# toganim subsection
## soundrc or user .src files
## soundconf
## music
## effect
## conqinit utility
## example of a user overriding a system defined texture.
# overriding a texture image
# overriding a texture definition
## conquest's texture format
## OVERVIEW
This document describes the 'conqinit' (CQI)
parser/configurator used in Conquest as of 8.1.2a (devel), as
well as the format of the new configuration files (conqinitrc,
texturesrc, and soundrc).
CQI is a lex/yacc parser that reads certain configuration files
and builds up an internal, validated representation of the data
contained therein.
This document is intended for developers, or those who want to
modify the characteristics of their conquest experience :)
If you are not interested in any of that, there is probably no
point in reading further :)
CQI data is currently used to represent the following
information in Conquest:
- global data. Used to decide how many planets, ships,
messages, et are supported in the universe.
- planet data (name, size, type, team, etc). Used for
initializing the Planets in the common block.
- texture data (Well Known Name (WKN)),
filename, color). Used for texture drawing.
- animation data (WKN, animdef). Drawing.
- animdef data (name, animation characteristics). Drawing.
- sound data (name, music/effect configuration, files, limits,
etc).
A detailed description of each of these is given below.
Currently, CQI can be used to parse these types of files:
- <prefix>/etc/conqinitrc
file that decribes certain characteristics of the game,
such as how many ships can play, detailed descriptions of
each of the planets, and other related data. The format of
the sections in the conqinitrc file will be described
below.
- <prefix>/etc/texturesrc
- <prefix>/etc/*.trc
- ~/.conquest/*.trc
These files describe the characteristics of textures,
colors, animations, and animdefs used by conquest for
rendering.
- <prefix>/etc/soundrc
- <prefix>/etc/*.src
- ~/.conquest/*.src
These files describe the characteristics of sound
configuration, effect definitions, and music definitions
The <prefix>/etc/conqinitrc, soundrc, and texturesrc files
are overwritten on an update or a 'make install'. If you
want to make changes to these files, copy them with a
'.local' extension. The Conquest executables will look for
and load a '.local' variant, if it exists, before loading the
default files.
The general syntax of a section entry in these files is as
follows:
sectionname {
variable value
...
}
Comments are preceded by a '#' character.
# like this
The types of <value> depend on the variable being defined.
Currently, the following types are supported:
Type Valid Values
-------- ------------
STRING: "some characters" enclosed in double quotes
BOOL: STRING equal to: "yes", "no", "on", or "off"
NUMBER: any valid integer value
RATIONAL: any valid floating point value
COLOR: STRING equal to a 32b hex value: "ffabcdef"
in AARRGGBB format (8 bits per component).
In the descriptions below, these types will be referenced.
## conqinitrc
The conqinitrc file is used to specify the global, shiptype,
and planet information used in conquest.
These are the valid sections that can appear in the conqinitrc
file.
## global
The global section describes the various limits for
conquest. With v9.0 or better, these can be used to tailor
a universe to your liking. Want to support 50 ships? Go
right ahead!
The Common Block (Universe) is dependant on these values -
if you change them, then you will need to re-initialize a
new universe via conqoper before you will be able start a
server.
global {
planetmax 60
shipmax 20
usermax 500
histmax 40
msgmax 60
}
planetmax: NUMBER
specifies the maximum number of planets in the
universe. 256 is the maximum.
shipmax: NUMBER
specifies the maximum number of ships that can
play. 256 is the maximum.
usermax: NUMBER
specifies the maximum number of users the game
can handle (and store stats for). 65535 is the
maximum.
histmax: NUMBER
specifies the maximum number of history entries
that can be stored. 256 is the maximum.
msgmax: NUMBER
The maximum number of message slots available.
256 is the maximum.
## shiptype
The shiptype sections are currently ignored. They could be
used someday to allow the creation of new shiptypes with
differing characteristics. For now, just leave them as is.
shiptype {
name "Destroyer"
engfac 1.000000
weafac 1.000000
accelfac 1.000000
torpwarp 12
warpmax 9
armymax 9
shmax 100
dammax 100
torpmax 9
fuelmax 999
}
name: STRING
specifies the name of the shiptype.
engfac: RATIONAL
engine mult factor
weafac: RATIONAL
weapon mult factor
accelfac: RATIONAL
acceleration mult factor
torpwarp: NUMBER
speed of the ship's torpedos
warpmax: NUMBER
maximum speed of the ship
armymax: NUMBER
maximum number of armies that can be carried by
the ship
shmax: NUMBER
maximum shield strength
dammax: NUMBER
maximum damage before exploding
torpmax: NUMBER
maximum number of torps a ship can carry/fire
fuelmax: NUMBER
maximum fuel that can be carried
## planet
The planet sections are used to describe all of the planets
and their characteristics in conquest. This data is used to
initialize conquest's planet list on a game reset or
universe init. This should allow budding universe builders
alot of freedom.
planet {
name "Klingus"
primary "Kejela"
angle 136.215891
velocity -7.284646
radius 2600.000000
ptype "M"
pteam "K"
armies 50
visible "yes"
core "yes"
homeplanet "yes"
x -9655.250220
y 9577.226313
size 300
}
name: STRING
the name of the planet
primary: STRING
The name of the body this planet orbits. If set
to be the same as the planet's name, then the
planet is marked as not orbiting anything
(stationary). The default, if unspecified is
itself (ie: Stationary).
angle: RATIONAL
The starting angle of the planet relative to
it's primary. If the angle is negative, a
random angle is chosen when the planet is
initialized.
velocity: RATIONAL
The velocity of the planet in degrees per
minute. A positive number has the planet orbit
it's primary counterclockwise, while negative
orbits clockwise.
radius: RATIONAL
The distance of the planet from it's primary (in
Conquest Units (CU)).
ptype: STRING
The planet type. Valid values are:
"M" Class M (fuel)
"D" Class D (dead)
"S" Sun
"m" Moon
"G" Ghost
"A" Class A
"O" Class O
"Z" Class Z
pteam: STRING
The planet's team. Valid values are:
"F" Federation
"R" Romulan
"K" Klingon
"O" Orion
"S" Self Ruled
"N" No Team (non)
"G" God
"E" Empire
armies: NUMBER, NUMBER PAIR
specifies the number of armies put on the planet
at init time. The value can be a single NUMBER,
or a pair of NUMBERs.
armies 20
20 armies placed on planet
armies 80 180
a random number of armies, between 80
and 180, placed on the planet. This
form is typically used for suns where
you want it's 'damage potential' to vary
randomly with each new game.
visible: BOOL
whether the planet is visible
core: BOOL
wether the planet must be taken in order to
conquer the universe.
homeplanet: BOOL whether this planet is one of the owner
team's homeplanets. This is only valid for the
standard 4 teams, Federation, Klingon, Orion,
and Romulan. Each of the 4 teams MUST have at
least one homeplanet.
x: RATIONAL
starting x coordinate of the planet's location.
This value is ignored if the planet is not
stationary.
y: RATIONAL
starting y coordinate of the planet's location.
This value is ignored if the planet is not
stationary.
size: NUMBER
size (diameter) of the planet in CU's.
Currently in conquest, the following steps are made to
determine the proper texture to use to display a planet:
1. see if a texture exists with the same name (case sensitive)
as the planet, if so use it.
2. if all else fails, use the default textures 'classm',
'classd', 'star' etc, depending on the planet's ptype.
If you want a specific texture to be displayed for a planet,
just create a texture definition with the same name as the
planet and add an entry for it in the texturesrc (or a user
.trc) file.
## texturesrc or user .trc files
These files contain sections that describe each of the
texture, animation, and animdef's used in conquest.
A texture section specifies a texture by a Well Known Name (WKN),
the base filename that contains the image data used to draw the
texture, and the base color of the texture. If the filename of
a texture is equal to "", then this indicates that only a color
is described therein (no texture image data is used).
Users can override the system's texture definitions (defined in
<prefix>/etc/texturesrc). After conquest parses the main
texturesrc file, it will then load and parse any *.trc files it
finds in your ~/.conquest/ directory. These files have the
same format as texturesrc. Texture image (PNG) files can be
provided in a user's ~/.conquest/img/ directory, which will
also be searched when texture loading starts. This allows
users to override the games textures if they wish.
The ability for a user to create his/her own .trc files and
supply their own texture images (TGA) allows them to modify or
override the system entries as they prefer. Much better than
having to hack the src code :)
Most of these sections have a Well Known Name (WKN) that
'labels' the entry. These labels are used by conquest to look
up the information they contain. For example, to find out the
texture and color used for the generic 'torpedo' texture,
conquest will look up the WKN 'torp' in the texture list and
use it's data to draw one.
The WKN of an entry should never be changed, as these are
hard-coded into conquest. The other data related to a WKN can
of course be modified.
The following provides a detailed description of the valid
texturesrc sections that can appear in the global texturesrc
file or a user's ~/.conquest/*.trc files.
## texture
A texture section specifies the characteristics of a
texture (or color) to conquest by it's WKN.
texture {
name "conqlogoF"
filename "conq-fed" # optional
color "ffe6e6e6"
mipmap "yes" # optional
luminance "yes" # optional
prescale 1.0 # optional
texarea { # optional
name "somerect_in_texture"
x 10.0
y 10.0
w 10.0
h 10.0
}
}
name: STRING
the WKN of the texture. In the above example,
this texture refers the the conquest logo for
Federation players, and is composed of the word
'conqlogo' followed by the first (case
sensitive) character of the team. This is what
conquest will use when looking for the
Federation Conquest Logo texture.
filename: STRING
optional. This field specifies the base name of
the texture file that contains the texture image
data (without an extension). In the above
example, conquest will look for and load a
texture image file called 'conq-fed.png' in the
texture image directory(s).
If the filename is specified as "", then this
indicates that there is no image data associated
with this texture, and that only a color is
stored there.
If the filename specified an '@' symbol as the
first character of the filename, then the rest
of the filename (without the '@') is interpreted
as a texture reference.
When a texture reference is encountered, the
referenced texture is looked up, and it's values
are assigned to the current texture (flags,
filename, color, and prescale). The referenced
texture must have been already defined
previously.
If the filename is not specified at all, then
the default is to use the same name as 'name'
when loading the texture.
color: COLOR
Specifies the base vertex color of the texture
used when it is rendered. If it's not
specified, a CQI warning will be issued to
stderr and the logfile, since a texture with no
color would usually be drawn black and
transparent, making it a bit hard to see :)
mipmap: BOOL
optional. If set to yes, generate mipmaps for
this texture. This is useful for the ships,
planets, and the doomsday machine and certain
other textures. It improves the quality of the
texture at different sizes, at the expense of
requiring more texture memory and rendering
work. The default is "no".
luminance: BOOL
optional. If set to yes, then instantiate this texture
as a luminance texture (greyscale) instead of a
normal RGB[A] texture.
prescale: RATIONAL
optional. The default for all textures, if
unspecified, is 1.0. This variable can be used
to pre-scale the rendered texture size of the
texture during rendering. Suns tend to need
this to look correct. This is only implemented
for ships, planets, and the doomsday machine for
now.
texarea: SUBSECTION
optional. A texarea subsection is used to
describe a named rectangle within the texture.
These can be looked up by the game and used to
describe and position areas within a texture.
The x, y, w, and h parameters describe a
rectangle within the texture.
The decal textures use these to describe the
locations within the texture of where the fuel
gauge scale, for example, is positioned.
The above texture section example does not need
a texarea section - it is provided for
documentation/example purposes.
## animation
An animation section is used to provide a WKN to conquest
for a given animation, and to specify the 'animdef' to be
used to render the animation, based on it's current 'state'.
This provides the ability to have several animations use the
same 'animdef'.
animation {
name "explosion"
animdef "explode" # optional
animdef { # optional inlined animdef
...
}
}
name: STRING
the WKN of the animation. In the above example,
this animation refers to the animation that is
used when something is exploding.
animdef: STRING
optional. Specifies the name of the animdef
section to use for this animation. In this
example, an animdef named 'explode' will be used
to modify the animation's state.
If 'animdef' is not specified, then the default
is to look for an animdef with the same WKN of
the animation section.
anumdef {}: An animdef section (see description below) can
also be defined inline within an animation
section.
If an animdef name was also specified for the
animation, then that animdef (which must have
already been defined) is used to initialize the
inlined animdef base data. In this usage, the
inlined animdef section can be used to override
characteristics of an already pre-defined
animdef.
In this way, animations can be derived from
common, previously defined animdefs.
If no animdef name was specified as part of the
animation, then the inlined animdef section is
treated as just another (private) animdef, only
usable with this animation.
Get all that? :)
## animdef
An animdef section is used to describe the specific
characteristics of how to 'run' an animation. It is
composed of base data, and one or more nested animation
types, for each animation type supported.
Animdefs are 'compiled' at parse time and represent a series
of operations to perform on a programmer specified animation
'state' within conquest at defined intervals. Animation
drawing states are used throughout conquest to draw
explosions, torpedo's, and several other things.
An animation drawing 'state' in conquest is defined as a
structure that contains the following variables:
id - current texture id
s, t - texture S and T coordinate
offset (defaults to S=0.0
and T=0.0)
color (ARGB) - current color
geometry (size, rotation, x, y) - current geo info
armed - current toggle value (on/off)
An animdef is soley responsible for defining how these
values will be modified as the animation is 'executed'.
Which elements of the animation state that are actually
modified also depends entirely on the animdef specification.
An animdef can be declared globally, or inlined. Inlined
animdef's are defined within the animation definition itself,
and are only usable by that animation.
Global animdefs can be used by any animation. Inlining them
within an animation allows for deriving new animdefs based
on previously defined (global) animdefs.
Each animdef can contain specifications for up to 4
different animation types that can be executed to change
the various components of it's relevant 'state'. The 4
types are:
texanim: Specifies parameters for a texture
animation. Modifies state's 'id' and 'color'
values. If deltas and deltat
offsets/incrementors are present, modifies
texture's S and T coordinates.
colanim: Specifies parameters for a color animation.
Modfies the state's 'color' values.
colanim's can only run if no texanim is
currently executing.
geoanim: Specifies parameters for a geometry animation.
Modfies the state's 'geometry' values.
geoanim's can only run if no texanim is
currently executing.
toganim: Specifies parameters for a toggle (on/off)
animation. Modfies the state's 'armed' value.
When these animations expire, their state is automatically
removed from the animator's run que. It's important that
you ensure that any animations that conquest is expecting to
expire at some future point, actually do expire at some
future point :).
Here is an example of the most complicated animdef currently
provided. Although this example incorporates components
that are not really used for the 'explode' animdef, all
possible options are listed here anyway for completeness and
documentation purposes.
animdef {
name "explode" # required for
# global animdefs,
# otherwise ignored
texname "exp" # semi-optional
timelimit 3000 # optional
# initial state
istate { # optional
size 450 # in CU's # optional
angle -1.0 # random # optional
}
texanim { # optional
stages 16
loops 1 # optional
delayms 100
deltas 0.02 # optional
deltat 0.02 # optional
}
# this runs when texanim has expired
colanim { # optional
stages 10
loops 1 # optional
delayms 80
deltaa -0.1 # optional
deltar 0.0 # optional
deltag -0.001 # optional
deltab -0.01 # optional
}
# this runs when texanim has expired
geoanim { # optional
stages 10
loops 1 # optional
delayms 100
deltas 10.0 # optional (in CU's)
}
toganim { # optional
delayms 250
}
}
name: STRING
the name of the animdef, referenced by the WKN
of an 'animation' section as described earlier.
'name' is required for global (non-inlined)
animdefs. An inlined animdef is an animdef
defined within an animation section.
'name' is ignored for inlined animdefs, unless
your intent is to use an already defined animdef
and simply override some of it's values.
texname: STRING
semi-optional. Specifies the WKN of a texture
to use in the default anim state (ie: when an
animation state is first initialized). If a
texanim section is specified, then this field is
required.
If the animdef specifies a texanim, then this
name is used to look up the textures for each of
the stages in the texanim, by concatenating the
stage number onto the texname, but only if there
is more than one stage (texture). In the example
above, the texanim will look for and use, WKN
textures named 'exp0', 'exp1', ..., 'exp15',
since there are 16 stages defined for the
texanim.
If the texanim only specifies 1 stage, then
texname is used directly to lookup the texture,
without appending the stage number first.
timelimit NUMBER
optional. Specifies the maximum time in
milliseconds this animdef should run on a state.
When the timelimit expires, all animation types
making up the animdef are expired for the state
regardless of their own defined parameters.
# istate subsection
optional. This subsection is provided to allow you to
specify certain 'starting' conditions to be used when an
animation state is reset for a run.
size: NUMBER
optional. Allows you to specify the initial
value of the 'size' anim state variable when the
animation is reset for a run. Value is in
CU's.
angle: RATIONAL
optional. Allows you to specify the initial
value of the 'angle' anim state variable when the
animation is reset for a run.
If a negative value is specified as the angle,
then a random angle will be chosen every time
the anim state is reset for a run.
color: STRING
optional. Specify a starting color.
# texanim subsection
optional. This subsection is used to describe the
charactistics of a texture animation type. A texture
animation is a sequence of textures, displayed in
ascending order at a given time interval. The number of
textures displayed depends on the 'stages' field of the
texanim definition.
stages: NUMBER
a non-zero number specifying the number of
individual textures that make up the texanim.
For texanims that contain only a single stage
(texture), the texname specified for the
animdef is used directly to lookup the
texture.
Setting stages to 0 disables the anim type.
This is useful for derived inline animdefs.
loops: NUMBER
optional. defaults to 1. Specifies how many
times to to display all of the textures. In
the above example, the 16 textures are
displayed only once, in the sequence 'exp0',
'exp1', ..., 'exp15', and then the texanim is
expired.
delayms: NUMBER
The delay, in milliseconds, before advancing
onto the next stage.
deltas: RATIONAL
Specify an offset to be applied to the texture
state's S coordinate variable.
deltat: RATIONAL
Specify an offset to be applied to the texture
state's T coordinate variable.
# colanim subsection
optional. This subsection is used to describe a 'color'
animation type. A color animation is used to modify 1 or
more of the Alpha (A), Red (R), Green (G), and/or Blue (B)
channels of the animdef's color anim state at predefined
time intervals.
If a texanim was specified as part of the animdef, then a
color anim will not run until it (the texanim) has
expired.
All resulting color channels (ARGB) are clamped to a value
between 0.0 (black) to 1.0 (white) before being placed in
the anim's active color state. For alpha, the values are
clamped to 0.0 (fully transparent) to 1.0 (fully opaque).
stages: NUMBER
a number specifying the number of iterations
to perform.
Setting stages to 0 disables the anim type.
This is useful for derived inline animdefs.
loops: NUMBER
optional. defaults to 1. If equal to 0, loop
'stages' forever. Generally you will never
want to do this.
delayms: NUMBER
The delay, in milliseconds, before advancing
onto the next stage.
deltaa: RATIONAL
optional. delta to apply to the anim state's
alpha color channel per stage iteration.
deltar: RATIONAL
optional. delta to apply to the anim state's
red color channel per stage iteration.
deltag: RATIONAL
optional. delta to apply to the anim state's
green color channel per stage iteration.
deltab: RATIONAL
optional. delta to apply to the anim state's
blue color channel per stage iteration.
# geoanim subsection
optional. This subsection is used to describe a 'geometry'
animation type. A geometry animation modifies the
geometry values in the anim's state by applying a
specified delta to a geometry component at a specified
interval.
If a texanim was specified as part of the animdef, then a
geometry anim will not run until it (the texanim) has
expired.
The current geometry state includes X/Y coordinates,
rotation, and size. These state variables are modified
according to the deltas supplied.
stages: NUMBER
a number specifying the number of iterations
to perform.
Setting stages to 0 disables the anim type.
This is useful for derived inline animdefs.
loops: NUMBER
optional. defaults to 1. If equal to 0, loop
'stages' forever. Generally you will never
want to do this.
delayms: NUMBER
The delay, in milliseconds, before advancing
onto the next stage.
deltax: RATIONAL
optional. delta to apply to the anim state's
X geometry variable per stage iteration.
deltay: RATIONAL
optional. delta to apply to the anim state's
Y geometry variable per stage iteration.
deltas: RATIONAL
optional. In CU's. delta to apply to the anim
state's size geometry variable per stage iteration.
deltar: RATIONAL
optional. delta to apply to the anim state's
rotation geometry variable per stage iteration.
# toganim subsection
optional. This subsection is used to describe a 'toggle'
animation type. A toggle animation simply toggles the
animation state's 'armed' variable on or off at a specified
time interval.
An animdef composed solely of a toganim always runs
forever (it never expires). These types of animdefs are
refered to as 'blinker' anims in conquest, and are used
for things like blinking the "SELF DESTRUCT IN XX" message
in conquest.
A toganim combined with another animation type will expire
as soon as all other specified animation types have expired.
delayms: NUMBER
The delay, in milliseconds, before toggling
the state's 'armed' variable.
setting delayms to 0 disables the anim type.
This is useful for derived inline animdefs.
## soundrc or user .src files
These files contain basic sound configuration support (fx
channels, samplerate, etc), definitions for sound effects
(phaser firing, explosions, etc), and music definitions.
Music definitions and music files are not supplied in the
conquest src tarball due to their size. They are supplied in a
seperate 'music pak' tarball that must be unpacked in your
~/.conquest/ directory. I recommend it for the full experience
:)
Users can override the system's sound definitions (defined in
<prefix>/etc/soundrc and <prefix>/etc/*.src). After conquest
parses the main soundrc file, it will then load and parse any
*.src files it finds in your ~/.conquest/ directory. These
files have the same format as soundrc. Sound files (.wav or
.ogg) can be provided in a user's ~/.conquest/sound/ directory,
which will also be searched when sound loading starts. This
allows users to override the games sounds if they wish.
Like textures, sound effects and music are known by a Well
Known Name (WKN) that is hardcoded into conquest. The WKN's
should never be modified, however any data associated with them
can be overridden by the user or the operator.
So, without further ado, here are the valid sections that can be
present in a soundrc file. In each section, all possible
variables and their values will be shown.
## soundconf
A soundconf section specifies certain parameters for the SDL
mixer API, which is used to provide sound. Feel free to
change these if you'd like, though the defaults should be
ok on most modern systems.
soundconf {
samplerate 44100
stereo "yes"
fxchannels 16
chunksize 512 # low latency
}
samplerate: NUMBER
The specified the samplerate the mixer will
use. If you have a slow processor (but a decent
sound card that can resample in hw) try 22050 to
reduce CPU requirements somewhat.
stereo: BOOL
Indicates whether to use stereo or not.
fxchannels: NUMBER
The number of channels to allocate for the
effects pool. This is a decent number. I doubt
you would need more than this.
chunksize: NUMBER
This value determines the chunksize the mixer
will use. A slow CPU might need a larger
chunksize, but will introduce latency. 256 is
the minimum, 8192 is the maximum. 512 (the
default) is a good balance for low latency.
## effect
## music
The effect sections describe an effect for conquest. Effects
include engine rumble, phasers, explosions, beaming, bombing,
etc... Effects can be modified or overriden by the user in a
.src file.
Effect and Music files have the same information associated
with them, so we will only use an effect section below to
describe it's parts. A music definition looks the same,
though some options do not make sense for music. A music
section for the intro music is shown below.
music {
name "intro"