~ubuntu-branches/ubuntu/lucid/warzone2100/lucid

« back to all changes in this revision

Viewing changes to data/base/stats-sql/stats-db2.schema.sql

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger, Paul Wise, Christoph Egger
  • Date: 2009-06-29 17:12:52 UTC
  • mfrom: (1.1.11 upstream) (2.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090629171252-5ddnlfg3zfchrega
Tags: 2.2.1+dfsg1-1
[ Paul Wise ]
* New upstream release (Closes: #534962)
* Adjust the flex build-depends to take account of the conflict
  with all the versions of flex 2.5.34 (LP: #372872)
* Make the -music Recommends more strict, 2.1 music doesn't work
  with 2.2.
* Upstream moved the downloads to sourceforge, update the watch file
* Bump Standards-Version, no changes needed
* Drop use of dh_desktop since it no longer does anything
* Recommend the new warzone2100-video package, version 2.2 or similar
* Mention the warzone2100 crash reports in the -dbg package description

[ Christoph Egger ]
* Replace CC-2.0 graphic from cybersphinx, create a new tarball
* Add myself to uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- This file is generated automatically, do not edit, change the source (../../../src/stats-db2.tpl) instead.
 
2
 
 
3
-- Elements common to all stats structures
 
4
CREATE TABLE `BASE` (
 
5
        -- Automatically generated ID to link the inheritance hierarchy.
 
6
        unique_inheritance_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
 
7
 
 
8
        -- Unique language independant name that can be used to identify a specific
 
9
        -- stats instance
 
10
        pName TEXT NOT NULL UNIQUE
 
11
);
 
12
 
 
13
CREATE VIEW `BASES` AS SELECT
 
14
        -- Automatically generated ID to link the inheritance hierarchy.
 
15
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
16
        -- Unique language independant name that can be used to identify a specific
 
17
        -- stats instance
 
18
        `BASE`.`pName` AS `pName`
 
19
        FROM `BASE`;
 
20
 
 
21
-- Stats common to all (droid?) components
 
22
CREATE TABLE `COMPONENT` (
 
23
        -- Automatically generated ID to link the inheritance hierarchy.
 
24
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
25
 
 
26
        -- Power required to build this component
 
27
        buildPower INTEGER NOT NULL,
 
28
 
 
29
        -- Build points (which are rate-limited in the construction units) required
 
30
        -- to build this component.
 
31
        buildPoints INTEGER NOT NULL,
 
32
 
 
33
        -- Weight of this component
 
34
        weight INTEGER NOT NULL,
 
35
 
 
36
        -- Body points of this component
 
37
        body INTEGER NOT NULL,
 
38
 
 
39
        -- Indicates whether this component is "designable" and can thus be used in
 
40
        -- the design screen.
 
41
        designable INTEGER NOT NULL,
 
42
 
 
43
        -- The "base" IMD model representing this component in 3D space.
 
44
        pIMD TEXT
 
45
);
 
46
 
 
47
CREATE VIEW `COMPONENTS` AS SELECT
 
48
        -- Automatically generated ID to link the inheritance hierarchy.
 
49
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
50
        -- Unique language independant name that can be used to identify a specific
 
51
        -- stats instance
 
52
        `BASE`.`pName` AS `pName`,
 
53
 
 
54
        -- Power required to build this component
 
55
        `COMPONENT`.`buildPower` AS `buildPower`,
 
56
 
 
57
        -- Build points (which are rate-limited in the construction units) required
 
58
        -- to build this component.
 
59
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
60
 
 
61
        -- Weight of this component
 
62
        `COMPONENT`.`weight` AS `weight`,
 
63
 
 
64
        -- Body points of this component
 
65
        `COMPONENT`.`body` AS `body`,
 
66
 
 
67
        -- Indicates whether this component is "designable" and can thus be used in
 
68
        -- the design screen.
 
69
        `COMPONENT`.`designable` AS `designable`,
 
70
 
 
71
        -- The "base" IMD model representing this component in 3D space.
 
72
        `COMPONENT`.`pIMD` AS `pIMD`
 
73
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id`;
 
74
 
 
75
CREATE TABLE `PROPULSION` (
 
76
        -- Automatically generated ID to link the inheritance hierarchy.
 
77
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
78
 
 
79
        -- Max speed for the droid
 
80
        maxSpeed INTEGER NOT NULL,
 
81
 
 
82
        -- Type of propulsion used - index into PropulsionTable
 
83
        propulsionType TEXT NOT NULL
 
84
);
 
85
 
 
86
CREATE VIEW `PROPULSIONS` AS SELECT
 
87
        -- Automatically generated ID to link the inheritance hierarchy.
 
88
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
89
        -- Unique language independant name that can be used to identify a specific
 
90
        -- stats instance
 
91
        `BASE`.`pName` AS `pName`,
 
92
 
 
93
        -- Power required to build this component
 
94
        `COMPONENT`.`buildPower` AS `buildPower`,
 
95
 
 
96
        -- Build points (which are rate-limited in the construction units) required
 
97
        -- to build this component.
 
98
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
99
 
 
100
        -- Weight of this component
 
101
        `COMPONENT`.`weight` AS `weight`,
 
102
 
 
103
        -- Body points of this component
 
104
        `COMPONENT`.`body` AS `body`,
 
105
 
 
106
        -- Indicates whether this component is "designable" and can thus be used in
 
107
        -- the design screen.
 
108
        `COMPONENT`.`designable` AS `designable`,
 
109
 
 
110
        -- The "base" IMD model representing this component in 3D space.
 
111
        `COMPONENT`.`pIMD` AS `pIMD`,
 
112
 
 
113
        -- Max speed for the droid
 
114
        `PROPULSION`.`maxSpeed` AS `maxSpeed`,
 
115
 
 
116
        -- Type of propulsion used - index into PropulsionTable
 
117
        `PROPULSION`.`propulsionType` AS `propulsionType`
 
118
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id` INNER JOIN `PROPULSION` ON `COMPONENT`.`unique_inheritance_id` = `PROPULSION`.`unique_inheritance_id`;
 
119
 
 
120
CREATE TABLE `SENSOR` (
 
121
        -- Automatically generated ID to link the inheritance hierarchy.
 
122
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
123
 
 
124
        -- Sensor range.
 
125
        range INTEGER NOT NULL,
 
126
 
 
127
        -- Sensor power (put against ecm power).
 
128
        power INTEGER NOT NULL,
 
129
 
 
130
        -- specifies whether the Sensor is default or for the Turret.
 
131
        location TEXT NOT NULL,
 
132
 
 
133
        -- used for combat
 
134
        type TEXT NOT NULL,
 
135
 
 
136
        -- Time delay before the associated weapon droids 'know' where the attack is
 
137
        -- from.
 
138
        time INTEGER NOT NULL,
 
139
 
 
140
        -- The turret mount to use.
 
141
        pMountGraphic TEXT
 
142
);
 
143
 
 
144
CREATE VIEW `SENSORS` AS SELECT
 
145
        -- Automatically generated ID to link the inheritance hierarchy.
 
146
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
147
        -- Unique language independant name that can be used to identify a specific
 
148
        -- stats instance
 
149
        `BASE`.`pName` AS `pName`,
 
150
 
 
151
        -- Power required to build this component
 
152
        `COMPONENT`.`buildPower` AS `buildPower`,
 
153
 
 
154
        -- Build points (which are rate-limited in the construction units) required
 
155
        -- to build this component.
 
156
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
157
 
 
158
        -- Weight of this component
 
159
        `COMPONENT`.`weight` AS `weight`,
 
160
 
 
161
        -- Body points of this component
 
162
        `COMPONENT`.`body` AS `body`,
 
163
 
 
164
        -- Indicates whether this component is "designable" and can thus be used in
 
165
        -- the design screen.
 
166
        `COMPONENT`.`designable` AS `designable`,
 
167
 
 
168
        -- The "base" IMD model representing this component in 3D space.
 
169
        `COMPONENT`.`pIMD` AS `pIMD`,
 
170
 
 
171
        -- Sensor range.
 
172
        `SENSOR`.`range` AS `range`,
 
173
 
 
174
        -- Sensor power (put against ecm power).
 
175
        `SENSOR`.`power` AS `power`,
 
176
 
 
177
        -- specifies whether the Sensor is default or for the Turret.
 
178
        `SENSOR`.`location` AS `location`,
 
179
 
 
180
        -- used for combat
 
181
        `SENSOR`.`type` AS `type`,
 
182
 
 
183
        -- Time delay before the associated weapon droids 'know' where the attack is
 
184
        -- from.
 
185
        `SENSOR`.`time` AS `time`,
 
186
 
 
187
        -- The turret mount to use.
 
188
        `SENSOR`.`pMountGraphic` AS `pMountGraphic`
 
189
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id` INNER JOIN `SENSOR` ON `COMPONENT`.`unique_inheritance_id` = `SENSOR`.`unique_inheritance_id`;
 
190
 
 
191
CREATE TABLE `ECM` (
 
192
        -- Automatically generated ID to link the inheritance hierarchy.
 
193
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
194
 
 
195
        -- ECM range.
 
196
        range INTEGER NOT NULL,
 
197
 
 
198
        -- ECM power (put against sensor power).
 
199
        power INTEGER NOT NULL,
 
200
 
 
201
        -- Specifies whether the ECM is default or for the Turret.
 
202
        location INTEGER NOT NULL,
 
203
 
 
204
        -- The turret mount to use.
 
205
        pMountGraphic TEXT
 
206
);
 
207
 
 
208
CREATE VIEW `ECMS` AS SELECT
 
209
        -- Automatically generated ID to link the inheritance hierarchy.
 
210
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
211
        -- Unique language independant name that can be used to identify a specific
 
212
        -- stats instance
 
213
        `BASE`.`pName` AS `pName`,
 
214
 
 
215
        -- Power required to build this component
 
216
        `COMPONENT`.`buildPower` AS `buildPower`,
 
217
 
 
218
        -- Build points (which are rate-limited in the construction units) required
 
219
        -- to build this component.
 
220
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
221
 
 
222
        -- Weight of this component
 
223
        `COMPONENT`.`weight` AS `weight`,
 
224
 
 
225
        -- Body points of this component
 
226
        `COMPONENT`.`body` AS `body`,
 
227
 
 
228
        -- Indicates whether this component is "designable" and can thus be used in
 
229
        -- the design screen.
 
230
        `COMPONENT`.`designable` AS `designable`,
 
231
 
 
232
        -- The "base" IMD model representing this component in 3D space.
 
233
        `COMPONENT`.`pIMD` AS `pIMD`,
 
234
 
 
235
        -- ECM range.
 
236
        `ECM`.`range` AS `range`,
 
237
 
 
238
        -- ECM power (put against sensor power).
 
239
        `ECM`.`power` AS `power`,
 
240
 
 
241
        -- Specifies whether the ECM is default or for the Turret.
 
242
        `ECM`.`location` AS `location`,
 
243
 
 
244
        -- The turret mount to use.
 
245
        `ECM`.`pMountGraphic` AS `pMountGraphic`
 
246
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id` INNER JOIN `ECM` ON `COMPONENT`.`unique_inheritance_id` = `ECM`.`unique_inheritance_id`;
 
247
 
 
248
CREATE TABLE `REPAIR` (
 
249
        -- Automatically generated ID to link the inheritance hierarchy.
 
250
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
251
 
 
252
        -- FIXME: UDWORD COMPONENT::body; doesn't exist for this component
 
253
        --%csv-file "repair.txt";
 
254
        -- How much damage is restored to Body Points and armour each Repair Cycle.
 
255
        repairPoints INTEGER NOT NULL,
 
256
 
 
257
        -- Whether armour can be repaired or not.
 
258
        repairArmour INTEGER NOT NULL,
 
259
 
 
260
        -- Specifies whether the Repair is default or for the Turret.
 
261
        location INTEGER NOT NULL,
 
262
 
 
263
        -- Time delay for repair cycle.
 
264
        time INTEGER NOT NULL,
 
265
 
 
266
        -- The turret mount to use.
 
267
        pMountGraphic TEXT
 
268
);
 
269
 
 
270
CREATE VIEW `REPAIRS` AS SELECT
 
271
        -- Automatically generated ID to link the inheritance hierarchy.
 
272
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
273
        -- Unique language independant name that can be used to identify a specific
 
274
        -- stats instance
 
275
        `BASE`.`pName` AS `pName`,
 
276
 
 
277
        -- Power required to build this component
 
278
        `COMPONENT`.`buildPower` AS `buildPower`,
 
279
 
 
280
        -- Build points (which are rate-limited in the construction units) required
 
281
        -- to build this component.
 
282
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
283
 
 
284
        -- Weight of this component
 
285
        `COMPONENT`.`weight` AS `weight`,
 
286
 
 
287
        -- Body points of this component
 
288
        `COMPONENT`.`body` AS `body`,
 
289
 
 
290
        -- Indicates whether this component is "designable" and can thus be used in
 
291
        -- the design screen.
 
292
        `COMPONENT`.`designable` AS `designable`,
 
293
 
 
294
        -- The "base" IMD model representing this component in 3D space.
 
295
        `COMPONENT`.`pIMD` AS `pIMD`,
 
296
 
 
297
        -- FIXME: UDWORD COMPONENT::body; doesn't exist for this component
 
298
        --%csv-file "repair.txt";
 
299
        -- How much damage is restored to Body Points and armour each Repair Cycle.
 
300
        `REPAIR`.`repairPoints` AS `repairPoints`,
 
301
 
 
302
        -- Whether armour can be repaired or not.
 
303
        `REPAIR`.`repairArmour` AS `repairArmour`,
 
304
 
 
305
        -- Specifies whether the Repair is default or for the Turret.
 
306
        `REPAIR`.`location` AS `location`,
 
307
 
 
308
        -- Time delay for repair cycle.
 
309
        `REPAIR`.`time` AS `time`,
 
310
 
 
311
        -- The turret mount to use.
 
312
        `REPAIR`.`pMountGraphic` AS `pMountGraphic`
 
313
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id` INNER JOIN `REPAIR` ON `COMPONENT`.`unique_inheritance_id` = `REPAIR`.`unique_inheritance_id`;
 
314
 
 
315
CREATE TABLE `WEAPON` (
 
316
        -- Automatically generated ID to link the inheritance hierarchy.
 
317
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
318
 
 
319
        -- WEAPON's CSV layout differs from the rest for this field
 
320
        -- Max distance to target for short range shot
 
321
        shortRange INTEGER NOT NULL,
 
322
 
 
323
        -- Max distance to target for long range shot
 
324
        longRange INTEGER NOT NULL,
 
325
 
 
326
        -- Min distance to target for shot
 
327
        minRange INTEGER NOT NULL,
 
328
 
 
329
        -- Chance to hit at short range
 
330
        shortHit INTEGER NOT NULL,
 
331
 
 
332
        -- Chance to hit at long range
 
333
        longHit INTEGER NOT NULL,
 
334
 
 
335
        -- Time between each weapon fire
 
336
        firePause INTEGER NOT NULL,
 
337
 
 
338
        -- The number of explosions per shot
 
339
        numExplosions INTEGER NOT NULL,
 
340
 
 
341
        -- The number of rounds per salvo(magazine)
 
342
        numRounds INTEGER NOT NULL,
 
343
 
 
344
        -- Time to reload the round of ammo (salvo fire)
 
345
        reloadTime INTEGER NOT NULL,
 
346
 
 
347
        -- How much damage the weapon causes
 
348
        damage INTEGER NOT NULL,
 
349
 
 
350
        -- Basic blast radius of weapon
 
351
        radius INTEGER NOT NULL,
 
352
 
 
353
        -- Chance to hit in the blast radius
 
354
        radiusHit INTEGER NOT NULL,
 
355
 
 
356
        -- Damage done in the blast radius
 
357
        radiusDamage INTEGER NOT NULL,
 
358
 
 
359
        -- How long the round burns
 
360
        incenTime INTEGER NOT NULL,
 
361
 
 
362
        -- Damage done each burn cycle
 
363
        incenDamage INTEGER NOT NULL,
 
364
 
 
365
        -- Burn radius of the round
 
366
        incenRadius INTEGER NOT NULL,
 
367
 
 
368
        -- speed ammo travels at
 
369
        flightSpeed INTEGER NOT NULL,
 
370
 
 
371
        -- how high the ammo travels for indirect fire
 
372
        indirectHeight INTEGER NOT NULL,
 
373
 
 
374
        -- indicates whether the droid has to stop before firing
 
375
        fireOnMove TEXT NOT NULL,
 
376
 
 
377
        -- the class of weapon
 
378
        weaponClass TEXT NOT NULL,
 
379
 
 
380
        -- the subclass to which the weapon belongs
 
381
        weaponSubClass TEXT NOT NULL,
 
382
 
 
383
        -- which projectile model to use for the bullet
 
384
        movementModel TEXT NOT NULL,
 
385
 
 
386
        -- which type of warhead is associated with the weapon
 
387
        weaponEffect TEXT NOT NULL,
 
388
 
 
389
        -- used to compare with weight to see if recoils or not
 
390
        recoilValue INTEGER NOT NULL,
 
391
 
 
392
        -- amount the weapon(turret) can rotate 0 = none
 
393
        rotate INTEGER NOT NULL,
 
394
 
 
395
        -- max amount the turret can be elevated up
 
396
        maxElevation INTEGER NOT NULL,
 
397
 
 
398
        -- min amount the turret can be elevated down
 
399
        minElevation INTEGER NOT NULL,
 
400
 
 
401
        -- flag to make the (explosion) effect face the player when drawn
 
402
        facePlayer INTEGER NOT NULL,
 
403
 
 
404
        -- flag to make the inflight effect face the player when drawn
 
405
        faceInFlight INTEGER NOT NULL,
 
406
 
 
407
        -- size of the effect 100 = normal, 50 = half etc
 
408
        effectSize INTEGER NOT NULL,
 
409
 
 
410
        -- flag to indicate whether the effect lights up the world
 
411
        lightWorld INTEGER NOT NULL,
 
412
 
 
413
        -- indicates how good in the air - SHOOT_ON_GROUND, SHOOT_IN_AIR or both
 
414
        surfaceToAir INTEGER NOT NULL,
 
415
 
 
416
        -- number of attack runs a VTOL droid can do with this weapon
 
417
        vtolAttackRuns INTEGER NOT NULL,
 
418
 
 
419
        -- flag to indicate whether pentrate droid or not
 
420
        penetrate INTEGER NOT NULL,
 
421
 
 
422
        -- Graphics control stats
 
423
        -- How long a direct fire weapon is visible. Measured in 1/100 sec.
 
424
        directLife INTEGER NOT NULL,
 
425
 
 
426
        -- How long a blast radius is visible
 
427
        radiusLife INTEGER NOT NULL,
 
428
 
 
429
        -- Graphics used for the weapon
 
430
        -- The turret mount to use
 
431
        pMountGraphic TEXT,
 
432
 
 
433
        -- The muzzle flash
 
434
        pMuzzleGraphic TEXT NOT NULL,
 
435
 
 
436
        -- The ammo in flight
 
437
        pInFlightGraphic TEXT NOT NULL,
 
438
 
 
439
        -- The ammo hitting a target
 
440
        pTargetHitGraphic TEXT NOT NULL,
 
441
 
 
442
        -- The ammo missing a target
 
443
        pTargetMissGraphic TEXT NOT NULL,
 
444
 
 
445
        -- The ammo hitting water
 
446
        pWaterHitGraphic TEXT NOT NULL,
 
447
 
 
448
        -- The trail used for in flight
 
449
        pTrailGraphic TEXT
 
450
);
 
451
 
 
452
CREATE VIEW `WEAPONS` AS SELECT
 
453
        -- Automatically generated ID to link the inheritance hierarchy.
 
454
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
455
        -- Unique language independant name that can be used to identify a specific
 
456
        -- stats instance
 
457
        `BASE`.`pName` AS `pName`,
 
458
 
 
459
        -- Power required to build this component
 
460
        `COMPONENT`.`buildPower` AS `buildPower`,
 
461
 
 
462
        -- Build points (which are rate-limited in the construction units) required
 
463
        -- to build this component.
 
464
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
465
 
 
466
        -- Weight of this component
 
467
        `COMPONENT`.`weight` AS `weight`,
 
468
 
 
469
        -- Body points of this component
 
470
        `COMPONENT`.`body` AS `body`,
 
471
 
 
472
        -- Indicates whether this component is "designable" and can thus be used in
 
473
        -- the design screen.
 
474
        `COMPONENT`.`designable` AS `designable`,
 
475
 
 
476
        -- The "base" IMD model representing this component in 3D space.
 
477
        `COMPONENT`.`pIMD` AS `pIMD`,
 
478
 
 
479
        -- WEAPON's CSV layout differs from the rest for this field
 
480
        -- Max distance to target for short range shot
 
481
        `WEAPON`.`shortRange` AS `shortRange`,
 
482
 
 
483
        -- Max distance to target for long range shot
 
484
        `WEAPON`.`longRange` AS `longRange`,
 
485
 
 
486
        -- Min distance to target for shot
 
487
        `WEAPON`.`minRange` AS `minRange`,
 
488
 
 
489
        -- Chance to hit at short range
 
490
        `WEAPON`.`shortHit` AS `shortHit`,
 
491
 
 
492
        -- Chance to hit at long range
 
493
        `WEAPON`.`longHit` AS `longHit`,
 
494
 
 
495
        -- Time between each weapon fire
 
496
        `WEAPON`.`firePause` AS `firePause`,
 
497
 
 
498
        -- The number of explosions per shot
 
499
        `WEAPON`.`numExplosions` AS `numExplosions`,
 
500
 
 
501
        -- The number of rounds per salvo(magazine)
 
502
        `WEAPON`.`numRounds` AS `numRounds`,
 
503
 
 
504
        -- Time to reload the round of ammo (salvo fire)
 
505
        `WEAPON`.`reloadTime` AS `reloadTime`,
 
506
 
 
507
        -- How much damage the weapon causes
 
508
        `WEAPON`.`damage` AS `damage`,
 
509
 
 
510
        -- Basic blast radius of weapon
 
511
        `WEAPON`.`radius` AS `radius`,
 
512
 
 
513
        -- Chance to hit in the blast radius
 
514
        `WEAPON`.`radiusHit` AS `radiusHit`,
 
515
 
 
516
        -- Damage done in the blast radius
 
517
        `WEAPON`.`radiusDamage` AS `radiusDamage`,
 
518
 
 
519
        -- How long the round burns
 
520
        `WEAPON`.`incenTime` AS `incenTime`,
 
521
 
 
522
        -- Damage done each burn cycle
 
523
        `WEAPON`.`incenDamage` AS `incenDamage`,
 
524
 
 
525
        -- Burn radius of the round
 
526
        `WEAPON`.`incenRadius` AS `incenRadius`,
 
527
 
 
528
        -- speed ammo travels at
 
529
        `WEAPON`.`flightSpeed` AS `flightSpeed`,
 
530
 
 
531
        -- how high the ammo travels for indirect fire
 
532
        `WEAPON`.`indirectHeight` AS `indirectHeight`,
 
533
 
 
534
        -- indicates whether the droid has to stop before firing
 
535
        `WEAPON`.`fireOnMove` AS `fireOnMove`,
 
536
 
 
537
        -- the class of weapon
 
538
        `WEAPON`.`weaponClass` AS `weaponClass`,
 
539
 
 
540
        -- the subclass to which the weapon belongs
 
541
        `WEAPON`.`weaponSubClass` AS `weaponSubClass`,
 
542
 
 
543
        -- which projectile model to use for the bullet
 
544
        `WEAPON`.`movementModel` AS `movementModel`,
 
545
 
 
546
        -- which type of warhead is associated with the weapon
 
547
        `WEAPON`.`weaponEffect` AS `weaponEffect`,
 
548
 
 
549
        -- used to compare with weight to see if recoils or not
 
550
        `WEAPON`.`recoilValue` AS `recoilValue`,
 
551
 
 
552
        -- amount the weapon(turret) can rotate 0 = none
 
553
        `WEAPON`.`rotate` AS `rotate`,
 
554
 
 
555
        -- max amount the turret can be elevated up
 
556
        `WEAPON`.`maxElevation` AS `maxElevation`,
 
557
 
 
558
        -- min amount the turret can be elevated down
 
559
        `WEAPON`.`minElevation` AS `minElevation`,
 
560
 
 
561
        -- flag to make the (explosion) effect face the player when drawn
 
562
        `WEAPON`.`facePlayer` AS `facePlayer`,
 
563
 
 
564
        -- flag to make the inflight effect face the player when drawn
 
565
        `WEAPON`.`faceInFlight` AS `faceInFlight`,
 
566
 
 
567
        -- size of the effect 100 = normal, 50 = half etc
 
568
        `WEAPON`.`effectSize` AS `effectSize`,
 
569
 
 
570
        -- flag to indicate whether the effect lights up the world
 
571
        `WEAPON`.`lightWorld` AS `lightWorld`,
 
572
 
 
573
        -- indicates how good in the air - SHOOT_ON_GROUND, SHOOT_IN_AIR or both
 
574
        `WEAPON`.`surfaceToAir` AS `surfaceToAir`,
 
575
 
 
576
        -- number of attack runs a VTOL droid can do with this weapon
 
577
        `WEAPON`.`vtolAttackRuns` AS `vtolAttackRuns`,
 
578
 
 
579
        -- flag to indicate whether pentrate droid or not
 
580
        `WEAPON`.`penetrate` AS `penetrate`,
 
581
 
 
582
        -- Graphics control stats
 
583
        -- How long a direct fire weapon is visible. Measured in 1/100 sec.
 
584
        `WEAPON`.`directLife` AS `directLife`,
 
585
 
 
586
        -- How long a blast radius is visible
 
587
        `WEAPON`.`radiusLife` AS `radiusLife`,
 
588
 
 
589
        -- Graphics used for the weapon
 
590
        -- The turret mount to use
 
591
        `WEAPON`.`pMountGraphic` AS `pMountGraphic`,
 
592
 
 
593
        -- The muzzle flash
 
594
        `WEAPON`.`pMuzzleGraphic` AS `pMuzzleGraphic`,
 
595
 
 
596
        -- The ammo in flight
 
597
        `WEAPON`.`pInFlightGraphic` AS `pInFlightGraphic`,
 
598
 
 
599
        -- The ammo hitting a target
 
600
        `WEAPON`.`pTargetHitGraphic` AS `pTargetHitGraphic`,
 
601
 
 
602
        -- The ammo missing a target
 
603
        `WEAPON`.`pTargetMissGraphic` AS `pTargetMissGraphic`,
 
604
 
 
605
        -- The ammo hitting water
 
606
        `WEAPON`.`pWaterHitGraphic` AS `pWaterHitGraphic`,
 
607
 
 
608
        -- The trail used for in flight
 
609
        `WEAPON`.`pTrailGraphic` AS `pTrailGraphic`
 
610
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id` INNER JOIN `WEAPON` ON `COMPONENT`.`unique_inheritance_id` = `WEAPON`.`unique_inheritance_id`;
 
611
 
 
612
CREATE TABLE `BRAIN` (
 
613
        -- Automatically generated ID to link the inheritance hierarchy.
 
614
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
615
 
 
616
        -- FIXME: UDWORD COMPONENT::body; doesn't exist for this component
 
617
        -- FIXME: bool COMPONENT::designable; doesn't exist for this component
 
618
        --%csv-file "brain.txt";
 
619
        -- Program capacity
 
620
        progCap INTEGER NOT NULL,
 
621
 
 
622
        -- Weapon stats associated with this brain - for Command Droids
 
623
        psWeaponStat INTEGER NOT NULL
 
624
);
 
625
 
 
626
CREATE VIEW `BRAINS` AS SELECT
 
627
        -- Automatically generated ID to link the inheritance hierarchy.
 
628
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
629
        -- Unique language independant name that can be used to identify a specific
 
630
        -- stats instance
 
631
        `BASE`.`pName` AS `pName`,
 
632
 
 
633
        -- Power required to build this component
 
634
        `COMPONENT`.`buildPower` AS `buildPower`,
 
635
 
 
636
        -- Build points (which are rate-limited in the construction units) required
 
637
        -- to build this component.
 
638
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
639
 
 
640
        -- Weight of this component
 
641
        `COMPONENT`.`weight` AS `weight`,
 
642
 
 
643
        -- Body points of this component
 
644
        `COMPONENT`.`body` AS `body`,
 
645
 
 
646
        -- Indicates whether this component is "designable" and can thus be used in
 
647
        -- the design screen.
 
648
        `COMPONENT`.`designable` AS `designable`,
 
649
 
 
650
        -- The "base" IMD model representing this component in 3D space.
 
651
        `COMPONENT`.`pIMD` AS `pIMD`,
 
652
 
 
653
        -- FIXME: UDWORD COMPONENT::body; doesn't exist for this component
 
654
        -- FIXME: bool COMPONENT::designable; doesn't exist for this component
 
655
        --%csv-file "brain.txt";
 
656
        -- Program capacity
 
657
        `BRAIN`.`progCap` AS `progCap`,
 
658
 
 
659
        -- Weapon stats associated with this brain - for Command Droids
 
660
        `BRAIN`.`psWeaponStat` AS `psWeaponStat`
 
661
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id` INNER JOIN `BRAIN` ON `COMPONENT`.`unique_inheritance_id` = `BRAIN`.`unique_inheritance_id`;
 
662
 
 
663
CREATE TABLE `CONSTRUCT` (
 
664
        -- Automatically generated ID to link the inheritance hierarchy.
 
665
        unique_inheritance_id INTEGER PRIMARY KEY NOT NULL,
 
666
 
 
667
        -- The number of points contributed each cycle
 
668
        constructPoints INTEGER NOT NULL,
 
669
 
 
670
        -- The turret mount to use
 
671
        pMountGraphic TEXT
 
672
);
 
673
 
 
674
CREATE VIEW `CONSTRUCTS` AS SELECT
 
675
        -- Automatically generated ID to link the inheritance hierarchy.
 
676
        `BASE`.unique_inheritance_id AS unique_inheritance_id,
 
677
        -- Unique language independant name that can be used to identify a specific
 
678
        -- stats instance
 
679
        `BASE`.`pName` AS `pName`,
 
680
 
 
681
        -- Power required to build this component
 
682
        `COMPONENT`.`buildPower` AS `buildPower`,
 
683
 
 
684
        -- Build points (which are rate-limited in the construction units) required
 
685
        -- to build this component.
 
686
        `COMPONENT`.`buildPoints` AS `buildPoints`,
 
687
 
 
688
        -- Weight of this component
 
689
        `COMPONENT`.`weight` AS `weight`,
 
690
 
 
691
        -- Body points of this component
 
692
        `COMPONENT`.`body` AS `body`,
 
693
 
 
694
        -- Indicates whether this component is "designable" and can thus be used in
 
695
        -- the design screen.
 
696
        `COMPONENT`.`designable` AS `designable`,
 
697
 
 
698
        -- The "base" IMD model representing this component in 3D space.
 
699
        `COMPONENT`.`pIMD` AS `pIMD`,
 
700
 
 
701
        -- The number of points contributed each cycle
 
702
        `CONSTRUCT`.`constructPoints` AS `constructPoints`,
 
703
 
 
704
        -- The turret mount to use
 
705
        `CONSTRUCT`.`pMountGraphic` AS `pMountGraphic`
 
706
        FROM `BASE` INNER JOIN `COMPONENT` ON `BASE`.`unique_inheritance_id` = `COMPONENT`.`unique_inheritance_id` INNER JOIN `CONSTRUCT` ON `COMPONENT`.`unique_inheritance_id` = `CONSTRUCT`.`unique_inheritance_id`;
 
707