1(game-module "space-civ"
2  (title "Space Civilization")
3  (blurb "Advanced space-colonizing game by Lincoln Peters.")
4  (instructions "Boldly go where no one has gone before!")
5  (notes "This game is similar to Civilization, but on a galactic scale. Each side starts with one M-class (earthlike) planet and technology circa Earth 2000. The ideas used in the game come from many different sources (you might see quite a bit of Star Trek in it, for example).")
6  (version "0.5")
7  (variants
8    (world-seen)
9    (see-all)
10    (sequential)
11    (world-size (120 60 720))
12    ("Last side wins" last-side-wins
13     "If set, the last civilization left in the game wins"
14     true
15     (true
16       (scorekeeper (do last-side-wins))))
17    ("Last alliance wins" last-alliance-wins
18     "If set, the last group of allied civilizations left in the game wins"
19     (true
20       (scorekeeper (do last-alliance-wins))))
21    ("More starters" more-starters
22     "Give each side all of the essential units immediately"
23     (true
24       (add telescope start-with 1)
25       (add probe start-with 6)
26       (add shipyard start-with 1)
27       (add antimatter-plant start-with 1)
28       (add shuttle start-with 1)
29       (add engineers start-with 2)))
30    ("More inhabited worlds" more-inhabited-worlds
31     "Generate more civilizations on inhabitable planets"
32     (true
33
34(table independent-density
35  (civ-0 g-planet 60)
36  (civ-0 h-planet 80)
37  (civ-0 l-planet 240)
38  (civ-0 m-planet 720)
39  (civ-0 n-planet 480)
40
41  (civ-1 g-planet 30)
42  (civ-1 h-planet 45)
43  (civ-1 l-planet 120)
44  (civ-1 m-planet 360)
45  (civ-1 n-planet 180)
46
47  (civ-2 g-planet 4)
48  (civ-2 h-planet 6)
49  (civ-2 l-planet 8)
50  (civ-2 m-planet 24)
51  (civ-2 n-planet 12)
52
53  (civ-3 m-planet 2)
54
55)))
56
57
58  )
59)
60
61;; Economy settings added by M. Skala, 2005/02/19; these settings seem to
62;; make the game a lot more playable.
63(set backdrop-model 1)
64(set backdrop-ignore-doctrine true)
65
66(include "ng-weird")
67
68;; Terrain is set up to be a little too simple.  It's OK for testing, but not release.
69(terrain-type vacuum (image-name "vacuum") (occurrence 100))
70	;; Needs nebulae, and some way to make planets tend to be near
71	;; stars.  Perhaps nebulae could be used as a coating type?
72        ;; Also, perhaps if multiple maps becomes possible, there could be
73        ;; individual maps for galactic, stellar, and planetary level activity?
74        ;; We might need our own synthesis-method for star systems.
75
76;; Unlike in most space games, planets are defined as terrain types (not unit types).
77;; Planet pictures, however, are designed for units and don't render very nicely.
78(terrain-type a-planet (image-name "gas-giant")
79  (help "A-class world: gas giant that radiates heat"))
80(terrain-type b-planet (image-name "gas-giant")
81  (help "B-class world: non-radiant gas giant"))
82(terrain-type c-planet (image-name "moon")
83  (help "C-class world: metallic surface and unbrethable atmosphere"))
84(terrain-type d-planet (image-name "moon")
85  (help "D-class world: a large captured asteroid"))
86(terrain-type e-planet (image-name "moon")
87  (help "E-class world: highly volcanic"))
88(terrain-type f-planet (image-name "moon")
89  (help "F-class world: developing planet, mostly molten"))
90(terrain-type g-planet (image-name "moon")
91  (help "G-class world: habitable but very little water"))
92(terrain-type h-planet (image-name "planet")
93  (help "H-class world: has vegetation but unbrethable atmosphere"))
94(terrain-type i-planet (image-name "moon")
95  (help "I-class world: molten surface, very dense atmoshpere"))
96(terrain-type j-planet (image-name "moon")
97  (help "J-class world: small moon with no atmosphere"))
98(terrain-type k-planet (image-name "moon")
99  (help "K-class world: thin atmosphere, no water"))
100(terrain-type l-planet (image-name "planet")
101  (help "L-class world: inhabited but no vegetation"))
102(terrain-type m-planet (image-name "planet")
103  (help "M-class world: lots of water, complex ecosystem"))
104(terrain-type n-planet (image-name "planet")
105  (help "N-class world: covered by water, supports aquatic life"))
106
107(terrain-type star
108  (help "What a planet orbits"))
109
110(define living-worlds (g-planet h-planet l-planet m-planet n-planet))
111(define dead-worlds (a-planet b-planet c-planet d-planet e-planet f-planet i-planet j-planet k-planet))
112
113(add t* capacity 4)
114
115;; If a planet is inhabited, it will support a civilization.
116#| Perhaps there are not enough civilizations defined;
117   the theory that this is based on does not take pre-industrial civilizations into account.
118
119Pre-level 0 civilizations might be:
120-Sumerian
121-Babylonian (too similar to Sumerian?)
122-Egyptian (not sure about this; too much disagreement about Egyptian history)
123-Greek
124-Roman
125-Islamic (not medieval; that would be a downgrade from Roman)
126-Renaissance
127-Pre-Industrial Revolution
128
129There would still be problems, such as how to model civilizations that are divided into nations.
130(the above problem already exists with the current Level 0 civilizations)
131|#
132
133#| This is *almost* ready to be used...
134   (specifically, needs a lot of fact-checking and revisions)
135(unit-type civ-1 (image-name "tribe")
136  (help "Level 1 civilization: dawn of civilization")
137  (notes "A Level 1 civilization is less than 1,000 years old, and most closely resembles ancient Sumer."))
138(unit-type civ-2 (image-name "village-2")
139  (help "Level 2 civilization: boasts greater art and religion")
140  (notes "A Level 2 civilization is still primitive, but may boast a more powerful church.  It most closely resembles ancient Babylon.")))
141(unit-type civ-3 (image-name "pyramid")
142  (help "Level 3 civilization: boasts advanced in mathematics")
143  (notes "A Level 3 civilization benefits from advannnces, especially in mathematics, that allow for new architectural and technological advances.  It most closely resembles ancient Egypt."))
144(unit-type civ-4 (image-name "parthenon")
145  (help "Level 4 civilization: boasts further advances in mathematics, esp. geometry")
146  (notes "A Level 4 civilization benefits from knowledge of geometry, and while not necessarily as driven to build wonders as a Level 3 civilization might be, it does show improvements in seafaring and architecture.  It most closely resembles ancient Greece."))
147(unit-type civ-5 (image-name "village")
148  (help "Level 5 civilization: boasts significant advances in government")
149  (notes "The most impressive feature of a Level 5 civilization is the republic, which is one of the most effective form of government known even today.  It also boasts technological advances that improve the lives of the entire population, such as the aqueduct.  It most closely resembles ancient Rome."))
150(unit-type civ-6 (image-name "city15")
151  (help "Level 6 civilization: boasts advances in economics"))
152  ;; (need notes; I need to research ancient Islamic civilization!)
153(unit-type civ-7 (image-name "town20")
154  (help "Level 7 civilization: boasts advances in writing and metalworking")
155  (notes "A Level 7 civilization is best remembered for creating the printing press.  It also boasts advances in metalworking, which lay the foundation for the industrial advances of the next two levels.  It most closely resembles Europe during the Rennaissance era."))
156(unit-type civ-8 (image-name "city18")
157  (help "Level 8 civilization: boasts advances in transportation")
158  (notes "A Level 8 civilization is best known for advances in terrestrial transportation, such as sailing ships, that allow it to extend its reach to distant lands.  It is also on the brink of industrialization.  It most closely resembles Europe circa 1500-1850AD."))
159(unit-type civ-9 (image-name "city19")
160  (help "Level 9 civilization: the industrial revolution begins")
161  (notes "A Level 9 civilization begins with industrialization.  It is marked by significant advances in metalworking, agriculture, medicine, and literacy.  It most closely resembles Europe and North America circa 1850-1950AD."))
162(unit-type civ-10 (image-name "city20")
163  (help "Level 10 civilization: the information age begins")
164  (notes "A Level 10 civilization begins with the discovery and spread of computers.  With computers, technology in this civilization advances at an unparalleled rate, dwarfing even that of the Industrial Revolution.  It most closely resembles Earth circa 1950-2000AD."))
165(unit-type civ-11 (image-name "town22")
166  (help "Level 11 civilization: free of fossil fuels")
167  (notes "The key factor that differentiates a Level 11 civilization from a Level 10 civilization is that Level 11 is completely independent from fossil fuels.  All of its energy demands are satisfied by renewable sources such as solar power."))
168(unit-type civ-12 (image-name "city22")
169  (help "Level 12 civilization: the space age begins")
170  (notes "A Level 12 civilization begins when the civilization successfully establishes a colony on another world within its solar system.  Once this happens, it is certain that the civilization will remain in space for a very long time."))
171(unit-type civ-13 (image-name "ancient-yellow-castle")
172  (help "Level 13 civilization: civilization on a galactic scale")
173  (notes "A Level 13 civilization begin when, having colonized all colonizable worlds within its own solar system, the civilization pushes outward and encompasses other star systems.  If nothing gets in its way, it could eventually grow to encompass the entire galaxy!"))
174|#
175
176;; I'm giving up on this model; it completely omitted pre-industrial civilizations...
177(unit-type civ-0 (image-name "parthenon")
178  (hp-max 25) (hp-recovery 0.1) (cp 10) (point-value 128)
179  (help "Level-0 civilization: dependent on fossil fuels")
180  (notes "A Level 0 civilization is dependent on fossil fuels for its energy, and may be divided along racial (subspecies) lines.  It can survive for about 500 years, but will fall apart if it cannot develop renewable energy sources.  It is also vulnerable to natural disasters and may be weakened by them."))
181(unit-type civ-1 (image-name "city19")
182  (hp-max 50) (hp-recovery 0.2) (cp 20) (point-value 256)
183  (help "Level-1 civilization: beyond fossil fuel, and a unified race")
184  (notes "By Level 1, a civilization is unified as a single species and is independent of fossil fuels.  At this point, no natural disaster could destroy it, and it is resilient to alien invsasions."))
185(unit-type civ-2 (image-name "city20")
186  (hp-max 100) (hp-recovery 0.5) (cp 30) (point-value 512)
187  (help "Level-2 civilization: encompasses an entire star system"))
188(unit-type civ-3 (image-name "city22")
189  (hp-max 200) (hp-recovery 1) (cp 40) (point-value 1024)
190  (help "Level-3 civilization: has the power to go beyond deep space"))
191
192
193#| This was my original idea, but it didn't work as I had hoped...
194(unit-type civilization (image-name "city20")
195  (hp-max 25) (hp-recovery 0.1) (cp 10)
196  (help "Sentient inhabitants of a habitable world"))
197  ;; The level of a civilization is determined by its facilities.
198|#
199
200
201(unit-type terraforming-station (image-name "town22")
202  (hp-max 4) (hp-recovery 0.1) (acp-per-turn 1) (cp 50) (point-value 16)
203  (help "Station that transforms a planet"))
204
205(unit-type ruins (image-name "ruins")
206  (hp-max 25) (point-value 0)
207  (help "Ruins of a dead civilization"))
208
209(define civilizations (civ-0 civ-1 civ-2 civ-3))
210(add civilizations wrecked-type ruins)
211
212;; Artificial colonies
213(unit-type settlement (image-name "domed-city")
214  (hp-max 10) (hp-recovery 0.2) (cp 10) (point-value 32)
215  (help "Artificial colony for inhospitable worlds"))
216(unit-type space-colony (image-name "space-station")
217  (hp-max 10) (hp-recovery 0.2) (cp 5) (point-value 24)
218  (help "A city in outer space"))
219
220;; Orbital facilities
221(unit-type shipyard (image-name "spaceyard")
222  (hp-max 10) (acp-per-turn 1) (cp 20) (point-value 8)
223  (help "Your only way to build large spaceships"))
224(unit-type dysen-sphere (image-name "death-star")
225  (hp-max 100) (hp-recovery 0.1) (cp 80) (point-value 96)
226  (help "The ultimate solar collector"))
227
228;; Deep space stations
229(unit-type outpost (image-name "saucerpad")
230  (hp-max 15) (acp-per-turn 0) (cp 25) (point-value 4)
231  (help "Increases the range at which you can trade materials"))
232
233;; Ground facilities
234(unit-type telescope (image-name "spysat")
235  (hp-max 1) (cp 10) (point-value 0)
236  (help "Orbital telescope sees things far away"))
237(unit-type spaceport (image-name "airbase")
238  (hp-max 2) (cp 10) (point-value 0)
239  (help "Landing site for small spacecraft; allows long-distance trade"))
240(unit-type elevator (image-name "wiz-guild")
241  (hp-max 3) (cp 30) (point-value 2)
242  (help "Space elevator: the ultimate path from land to space"))
243(unit-type arcology (image-name "tower")
244  (hp-max 5) (cp 20) (point-value 1)
245  (help "An entire city enclosed in a very tall building"))
246
247(unit-type antimatter-plant (image-name "facility")
248  (hp-max 4) (cp 20) (point-value 1)
249  (help "Produces matter and antimatter for starships"))
250(unit-type torpedo-industry (image-name "shell")
251  (hp-max 4) (cp 20) (point-value 1)
252  (help "Produces photon torpedoes"))
253(unit-type ore-processor (image-name "iron-mine")
254  (hp-max 3) (cp 15) (point-value 0)
255  (help "Streamlines the production of ores"))
256(unit-type academy (image-name "corps-hq")
257  (hp-max 3) (cp 15) (point-value 0)
258  (help "Boosts the production of personnel"))
259(unit-type wcs (image-name "city30")
260  (hp-max 2) (cp 30) (point-value 0)
261  (help "Ensures good weather; doubles food production"))
262
263(unit-type solar-plant (image-name "refinery")
264  (hp-max 2) (cp 25) (point-value 0)
265  (help "Network of solar panels; frees a planet from fossil fuels"))
266
267;; Small spacecraft
268(unit-type probe (image-name "spysat")
269  (hp-max 1) (acp-per-turn 3) (cp 3) (point-value 0)
270  (help "Slow spacecraft used for exploration"))
271(unit-type shuttle (image-name "sr71")
272  (hp-max 2) (acp-per-turn 2) (cp 8) (point-value 1)
273  (help "Small spacecraft for short-range transport"))
274
275;; Test units
276#| No longer needed.
277(unit-type cargoliner (image-name "gxy-st")
278  (hp-max 3) (acp-per-turn 4) (cp 20)
279  (help "Large spacecraft for transporting people and supplies"))
280(unit-type mothership (image-name "mothership")
281  (hp-max 5) (acp-per-turn 6) (cp 30)
282  (help "Carries lots of people and smaller spacecraft"))
283  ; Is this a good idea?
284|#
285
286;; Federation starships
287(unit-type vws (image-name "4e")
288  (hp-max 1) (acp-per-turn 3) (cp 12)
289  (help "Vulcan warp shuttle: small, fast, and cheap"))
290(unit-type s-deadalus (image-name "gxy-lc")
291  (hp-max 4) (acp-per-turn 5) (cp 20)
292  (help "Deadalus-class starship: primitive, slow, and weak"))
293(unit-type s-oberth (image-name "gxy-f1")
294  (hp-max 3) (acp-per-turn 6) (cp 25)
295  (help "Oberth-class starship: the preferred science vessel"))
296(unit-type s-constitution1 (image-name "gxy-cc")
297  (hp-max 6) (acp-per-turn 6) (cp 30)
298  (help "Constitution-class starship: well-rounded, best of its age"))
299(unit-type s-constitution2 (image-name "gxy-cc")
300  (hp-max 7) (acp-per-turn 7) (cp 35)
301  (help "Constitution-class starship, new and improved"))
302(unit-type s-miranda (image-name "gxy-st")
303  (hp-max 8) (acp-per-turn 6) (cp 40)
304  (help "Miranda-class starship: built for power"))
305(unit-type s-constellation (image-name "gxy-cc")
306  (hp-max 7) (acp-per-turn 8) (cp 45)
307  (help "Constellation-class starship: preferred deep-space vessel"))
308(unit-type s-excelsior (image-name "gxy-cc")
309  (hp-max 9) (acp-per-turn 9) (cp 50)
310  (help "Excelsior-class starship: superior to Constitution-class"))
311(unit-type s-ambassador (image-name "gxy-cc")
312  (hp-max 10) (acp-per-turn 10) (cp 55)
313  (help "Ambassador-class starship: first ship with detachable hulls"))
314(unit-type s-nebula (image-name "gxy-st")
315  (hp-max 14) (acp-per-turn 12) (cp 60)
316  (help "Nebula-class starship: built for power, but less than Galaxy-class"))
317(unit-type s-galaxy (image-name "gxy-cc")
318  (hp-max 15) (acp-per-turn 12) (cp 65)
319  (help "Galaxy-class starship: most powerful starship to date"))
320
321;; Other units
322(unit-type engineers (image-name "worker")
323  (hp-max 1) (acp-per-turn 1) (cp 6)
324  (help "Builds colonies and space stations"))
325(unit-type ground-troops (image-name "soldiers")
326  (hp-max 1) (acp-per-turn 1) (cp 4)
327  (help "Soldiers that capture and defend worlds"))
328
329(add civilizations namer "generic-names")
330
331;; Basic resources
332(material-type food (resource-icon 1) (image-name "green")
333  (help "Sustains life on a planet or station"))
334(material-type fuel (resource-icon 2) (image-name "red")
335  (help "Hydrogen-based fuel: powers short-range spacecraft"))
336(material-type ores (resource-icon 3) (image-name "grey")
337  (help "Used to build anything"))
338(material-type solar (resource-icon 4) (image-name "yellow")
339  (help "Used to power civilizations"))
340
341;; Advanced resources
342;; (should personnel be a basic resource?)
343(material-type petroleum
344  (help "Powers level 0 civilizations, but runs out quickly"))
345(material-type matter
346  (help "Warp-drive matter fuel: needed for interstellar travel"))
347(material-type antimatter
348  (help "Warp-drive antimatter fuel: needed for interstellar travel"))
349(material-type personnel (resource-icon 4) (image-name "blue")
350  (help "Required to operate virtually everything"))
351(material-type torpedoes
352  (help "Photon torpedoes: can be fired at enemies from a distance"))
353
354;; Special resources
355(material-type protomatter
356  (help "Required to terraform a planet"))
357
358; The idea behind having ores _and_ personnel is a limiting-reagent
359; problem.  The intent is to prevent any one construction task from
360; sucking up all resources.
361
362(define worlds (living-worlds dead-worlds))
363(define stations (settlement space-colony))
364
365(define places (civilizations stations))
366(define stars (star))
367(define sr-spacecraft (shuttle))
368(define lr-spacecraft (vws s-deadalus s-oberth s-constitution1
369                       s-constitution2 s-miranda s-constellation
370                       s-excelsior s-ambassador s-nebula s-galaxy))
371(define armies (ground-troops))
372(define spacecraft (sr-spacecraft lr-spacecraft))
373(define facilities (telescope spaceport elevator arcology antimatter-plant
374                    torpedo-industry ore-processor academy solar-plant wcs))
375(define o-facilities (shipyard dysen-sphere outpost))
376
377(define lr-fuel (matter antimatter))
378
379;; Hints for the AI
380(add facilities facility true)
381(add armies ground true)
382(add engineers colonizer true)
383(add sr-spacecraft air true)
384(add lr-spacecraft naval true)
385
386
387
388;;; ADVANCES
389#| Not yet ready to be used...
390;; (Note that the levels of advances are in no way related to the levels of civilization.
391;; It is simply easier to track the development of virtually everything using levels.)
392;; Level 1
393
394(advance-type solar-plant
395  (help "Renewable energy for civilizations")
396  (help "Solar energy replaces petroleum products in Level 1 civilizations.  It is essential for even a Level 0 civilization to have energy, but unlike petroleum, solar energy can never be depleted."))
397(advance-type dilithium
398  (help "Superconductor for antimatter reactors")
399  (help "Dilithium is an essential ingredient for controlling an antimatter reaction.  It is the only known crystal that can conduct the energy produced by such a reactor."))
400(advance-type fuel-cell
401  (help "Hydrogen-based fuel")
402  (help "Hydrogen is used by fuel cells for most short-range travel.  Although the fuel cell is not as efficent as an antimatter reactor, it is much easier to build."))
403(advance-type reusable-spacecraft
404  (help "Spacecraft that can take off and land with little fuss")
405  (notes "In order to make space travel viable enough to even think about colonization, spacecraft need to be completely reusable.  Modern space shuttles don't count because they have to drop their booster rockets and external tank in order to reach orbit."))
406(advance-type quantum-physics
407  (help "The laws of motion for really small objects")
408  (notes "Before many futuristic machines like the transporter can be invented, it is necessary to discover the laws of physics that apply to both the microscopic and the macroscopic world."))
409(advance-type cold-fusion
410  (help "The most powerful form of nuclear energy")
411  (notes "Cold fusion allows nuclear reactions to produce far more energy than old-style fission, and it produces no radioactive waste."))
412(advance-type biotech
413  (help "The technology to create and control living organisms"
414  (notes "A good knowledge of biotechnology makes it possible to construct completely self-sufficient biosystems.  It is essential to colonize inhospitable worlds."))
415(advance-type isolinear-rod
416  (help "High-speed semiconductor for powerful computers")
417  (notes "Isolinear rods replace silicon wafers in computers.  They allow for a far greater density of transistors, allowing computers to perform tasks of the speed and size needed for transporters, among other things."))
418
419;; Level 2
420
421(advance-type antimatter
422  (help "The ultimate energy source")
423  (help "When normal matter and antimatter are mixed, they are both converted into pure energy.  This reaction is the only way to produce enough energy to travel faster than light."))
424(advance-type pressure-dome
425  (help "Domed, self-contained cities")
426  (notes "Domed cities are the only way to colonize an inhospitable world, as they allow a city to have its own atmosphere.  When combined with agricultural facilities, the pressure dome makes any planet habitable."))
427(advance-type warp-field
428  (help "Controlled space-time distortion")
429  (notes "Warp fields allow a starship to move through space faster than the speed of light.  It is the single most important advance for a galactic civilization."))
430(advance-type artificial-gravity
431  (help "Good for astronaut's health")
432  (notes "Artificial gravity is necessary on starships because it forces the body to maintain its normal bone density.  Otherwise, astronauts would rather quickly develop osteoporosis."))
433(advance-type gas-exchange-device
434  (help "Recirculates oxygen")
435  (notes "Gas Exchange Devices, or GED's, transform carbon dioxide gas into oxygen gas, making it possible to run spaceships without arboretums or re-supplying oxygen."))
436(advance-type terraforming
437  (help "The ability to transform an entire planet")
438  (help "Terraforming technology makes it possible to transform the most inhospitable worlds into paradises.  Of course, no such trnsformation every happens overnight."))
439(advance-type materialization
440  (help "Ordered conversion of energy into matter")
441  (notes "Materialization technology allows anything to be produced from pure energy.  However, it requires tremendous energy and a computer than can handle the patterns."))
442(advance-type deflector-shield
443  (help "Energy bubble that shields against most weaponry")
444  (notes "A spaceship equipped with a deflector shield is far less vulnerable in combat.  It is also less prone to accidents such as stray asteroids.")))
445
446;; Level 3
447
448(advance-type transporter
449  (help "Dematerialization of an object, followed by rematerialization somewhere else")
450  (notes "The transporter allows for easy movement of people supplies over short distances without shuttles.  However, it does not work at distances greater than about 1,000 kilometers."))
451(advance-type solar-fusion
452  (help "The fusion that happens in a star")
453  (notes "A thourogh understanding of solar fusion allows for new technologies such as terraforming and photon-based devices.  In the military, the best-known application is the photon torpedo."))
454;; (need intermediate advances for the replicator)
455
456;; Level 4
457
458(advance-type photon-torpedo
459  (help "Long-range weapon based on light energy")
460  (notes "The photon torpedo is the most effective means of fleet combat.  It allows a starships to attack from a distance and do twice as much damage as with phasers.  On the other hand, the advantage is unclear if your opponent has photon torpedoes."))
461(advance-type replicator
462  (help "Machine that converts energy into matter")
463  (notes "The ability to store transporter patterns in long-term computer memory allowed for the creation of the replicator.  It made it possible to replicate things such as food and some starship parts, thus allowing starships to run longer missions without having to resupply."))
464
465
466(table advance-needed-to-research
467  (a* a* false)
468
469  (antimatter cold-fusion true)
470  (pressure-dome biotech true)
471  (warp-field quantum-physics true)
472  (artificial-gravity quantum-physics true)
473  (gas-exchange-device biotech true)
474  (terraforming biotech true)
475  (materialization quantum-physics true)
476  (transporter materialization true)
477  (transporter isolinear-rod true)
478  (solar-fusion cold-fusion true)
479  (photon-torpedo quantum-physics true)
480  (photon-torpedo solar-fusion true)
481  (replicator transporter true)
482
483
484)
485
486Still need:
487-Antimatter
488-Deflector shield
489-Detachable hull (that'll be _really_ hard!)
490-Synthehol?
491
492It may also become necessary to use the tech code due to the number of small, unpredictable advances that would be necessary for many futuristic units.
493It could also represent things like time to make blueprints and such.
494(won't the tech/toolup code need to be re-worked for that to be doable?)
495
496|#
497
498;;; SIDES
499
500
501;; Taken from the "Life Forms" listing in the _Star Trek Encyclopedia_
502;; Some of the noncorporeal (e.g. Calamarain) and/or more primitive (e.g. denebian slime devil) species have been omitted.
503(set side-library '(
504  ((noun "Acamarian"))
505  ((noun "Aldean"))
506  ((noun "Andorian"))
507  ((noun "Angosian"))
508  ((noun "Antican"))
509  ((noun "Antidean"))
510  ((noun "Arbazan"))
511  ((noun "Argelian"))
512  ((noun "Argosian"))
513  ((noun "Bajoran"))
514  ((noun "Bandi") (plural-noun "Bandi"))
515  ((noun "Barolian"))
516  ((noun "Barzan"))
517  ((noun "Benzite"))
518  ((noun "Berellian"))
519  ((noun "Betazoid"))
520  ((noun "Bolian"))
521  ((noun "Breen") (plural-noun "Breen"))
522  ((noun "Brekkian"))
523  ((noun "Bynar"))
524  ((noun "Caldonian"))
525  ((noun "Calnoth"))
526  ((noun "Capellan"))
527  ((noun "Cardassian"))
528  ((noun "Chrysalian"))
529  ((noun "Cytherian"))
530  ((noun "Dachlyds"))
531  ((noun "Deltan"))
532  ((noun "Dopterian"))
533  ((noun "Edo"))
534  ((noun "Ekosian"))
535  ((noun "Elasian"))
536  ((noun "Excalabian"))
537  ((noun "Fabrini") (plural-noun "Fabrini"))
538  ((noun "Ferengi"))
539  ((noun "Frunalain"))
540  ((noun "Gemarian"))
541  ((noun "Gorn"))
542  ((noun "Haliian"))
543  ((noun "Halkan"))
544  ((noun "Human"))
545  ((noun "Hupyrian"))
546  ((noun "Husnock"))
547  ((noun "Iconian"))
548  ((noun "Iotian"))
549  ((noun "J'naii") (plural-noun "J'naii"))
550  ((noun "Jaradan"))
551  ((noun "Kalandan"))
552  ((noun "Kelvan"))
553  ((noun "Kerelian"))
554  ((noun "Klingon"))
555  ((noun "Kobliad"))
556  ((noun "Ktarian"))
557  ((noun "Legaran"))
558  ((noun "Lenarian"))
559  ((noun "Leyron"))
560  ((noun "Ligonian"))
561  ((noun "Malcorian"))
562  ((noun "Malurian"))
563  ((noun "Medusan"))
564  ((noun "Melkotian"))
565  ((noun "Menthar"))
566  ((noun "Metron"))
567  ((noun "Mikulak"))
568  ((noun "Minosian"))
569  ((noun "Mintakan"))
570  ((noun "Miradorn"))
571  ((noun "Mizarian"))
572  ((noun "Moropan"))  ;; is this correct spelling of species name?
573  ((noun "Nausicaan"))
574  ((noun "Orion"))
575  ((noun "Ornaran"))
576  ((noun "Pakled"))
577  ((noun "Paxan"))
578  ((noun "Pentaran"))
579  ((noun "Promellian"))
580  ((noun "Rakhari") (plural-noun "Rakhari"))
581  ((noun "Rigelian"))
582  ((noun "Romulan"))
583  ((noun "Rutian"))
584  ((noun "Satarran"))
585  ((noun "Scalosian"))
586  ((noun "Selay") (plural-noun "Selay"))
587  ((noun "Tagran"))
588  ((noun "Takaran"))
589  ((noun "Talarian"))
590  ((noun "Talosian"))
591  ((noun "Tamarian"))
592  ((noun "Tanugan"))
593  ((noun "Tarellian"))
594  ((noun "Tellarite"))
595  ((noun "Tholian"))
596  ((noun "Trill"))
597  ((noun "Troyian"))
598  ((noun "Ullian"))
599  ((noun "Valerian"))
600  ((noun "Ventaxian"))
601  ((noun "Vian"))
602  ((noun "Vorgon"))
603  ((noun "Vulcan"))
604  ((noun "Yridian"))
605  ((noun "Zakdorn"))
606  ((noun "Zaldan"))
607  ((noun "Zeon"))
608  ((noun "Zetarian"))
609  ((noun "Zibalian"))
610))
611
612(set sides-min 1)
613
614;;; ENVIRONMENT
615
616(add t* occurrence 1)
617(add vacuum occurrence 100)
618
619(add civ-2 start-with 1)
620;; (add oil-plant start-with 1)
621
622(add m-planet country-terrain-min 1)
623
624(table favored-terrain
625  (u* t* 0)
626  (civilizations m-planet 100)
627  (o-facilities vacuum 100)
628)
629
630(add civilizations advanced true)
631(add stations advanced true)
632(add civilizations acp-independent true)
633(add stations acp-independent true)
634(add shipyard acp-independent true)
635(add civilizations acp-per-turn 0)
636(add stations acp-per-turn 0)
637(add shipyard acp-per-turn 0)
638
639;; Solar energy is available in any part of the universe, but in varying quantities.
640;; Food and ores, however, are restricted to planets.
641;; (shouldn't availability of solar depend on proximity to stars?)
642
643(table production-from-terrain
644  ;; Planets provide food, fuel, and ores, depending on their type.
645  (a-planet fuel 100)
646  (b-planet fuel 50)
647  (c-planet fuel 10)
648  (c-planet ores 2)
649  (d-planet ores 10)
650  (e-planet fuel 15)
651  (e-planet ores 20)
652  (f-planet fuel 5)
653  (f-planet ores 10)
654  (g-planet food 1)
655  (g-planet fuel 15)
656  (g-planet ores 15)
657  (g-planet personnel 1)
658  (h-planet food 1)
659  (h-planet fuel 10)
660  (h-planet ores 30)
661  (h-planet personnel 1)
662  (i-planet fuel 20)
663  (i-planet ores 15)
664  (j-planet fuel 20)
665  (j-planet ores 20)
666  (k-planet fuel 5)
667  (k-planet ores 25)
668  (l-planet food 2)
669  (l-planet fuel 10)
670  (l-planet ores 20)
671  (l-planet personnel 1)
672  (m-planet food 8)
673  (m-planet fuel 25)
674  (m-planet ores 20)
675  (m-planet personnel 2)
676  (n-planet food 4)
677  (n-planet fuel 10)
678  (n-planet ores 5)
679  (n-planet personnel 1)
680
681  ;; There is solar energy in space...
682  (t* solar 1)
683  (vacuum solar 2)
684  ;; ...but it is most concentrated in stars.
685  (star solar 100)
686)
687
688;; Different levels of civilizations can grow to different sizes.
689;; The higher the level, the larger it can get, so it is desirable to
690;; upgrade to higher civilizations as quickly as possible.
691(add civ-0 minimal-size-goal 1)
692(add civ-1 minimal-size-goal 2)
693(add civ-2 minimal-size-goal 4)
694(add civ-3 minimal-size-goal 8)
695;; (add civilization minimal-size-goal 6)
696(add space-colony minimal-size-goal 1)
697(add settlement minimal-size-goal 2)
698
699(add civ-0 reach 1)
700(add civ-1 reach 2)
701(add civ-2 reach 4)
702(add civ-3 reach 8)
703;; (add civilization reach 8)
704(add space-colony reach 2)
705(add settlement reach 2)
706
707#| Spaceports should extend the reach of a civilization, but that is not
708   possible with Xconq (yet).  The following tables were a feeble attempt to
709   make spaceports useful for stuff other than longer supply lines.
710(table size-limit-without-occupant
711  (civilizations spaceport 6)
712)
713
714(table occ-multiply-maxcells
715  (civilization spaceport 200)
716)
717|#
718
719(table size-limit-without-occupant
720  (civilizations spaceport 6)	;; Need a spaceport to grow beyond 6 billion people.
721  (civilizations elevator 12)	;; Need a space elevator to grow beyond 12 billion people.
722)
723
724(table occ-add-maxcells
725  (civilizations spaceport 1)	;; A spaceport allows a civilization to cover an extra planet.
726)
727
728(table occ-multiply-maxcells
729  (civilizations elevator 200)	;; A space elevator allows a civilization to cover twice as many planets.
730)
731
732(add u* free-acp 1)
733
734(add civilizations speed 0)
735(add settlement speed 0)
736(add space-colony speed 0)
737(add facilities speed 0)
738(add o-facilities speed 0)
739
740(table vanishes-on
741  (armies vacuum true)
742  (engineers vacuum true)
743  (settlement vacuum true)
744
745  (stations t* true)
746  (stations vacuum false)
747  (settlement t* false)
748  (settlement vacuum true)
749
750  (o-facilities t* true)
751  (o-facilities vacuum false)
752
753  (u* star true)
754  (dysen-sphere t* true)
755  (dysen-sphere star false)
756
757)
758
759(table mp-to-enter-terrain
760  (armies vacuum 99)
761  (engineers vacuum 99)
762
763  (u* star 99)
764)
765
766(table independent-density
767  ;; There is a small probability that a planet will be inhabited, if it can
768  ;; support life.
769  ;; It is also possible, although highly unlikely, that a level 3
770  ;; civilization will be found somewhere at the beginning of the game.
771  ;; (that would be like finding an abandoned aircraft carrier on a beach!)
772
773  (civ-0 g-planet 15)
774  (civ-0 h-planet 20)
775  (civ-0 l-planet 60)
776  (civ-0 m-planet 180)
777  (civ-0 n-planet 120)
778
779  (civ-1 g-planet 10)
780  (civ-1 h-planet 15)
781  (civ-1 l-planet 40)
782  (civ-1 m-planet 120)
783  (civ-1 n-planet 60)
784
785  (civ-2 g-planet 2)
786  (civ-2 h-planet 3)
787  (civ-2 l-planet 4)
788  (civ-2 m-planet 12)
789  (civ-2 n-planet 6)
790
791  (civ-3 m-planet 1)
792
793  #|
794  (civilization g-planet 10)
795  (civilization h-planet 15)
796  (civilization l-planet 40)
797  (civilization m-planet 120)
798  (civilization n-planet 60)
799  |#
800)
801
802;;; CONSTRUCTION
803
804(table acp-to-create
805  (civilizations ground-troops 1)
806  (civilizations engineers 1)
807  (civilizations facilities 1)
808  (civilizations sr-spacecraft 1)
809  (civilizations probe 1)
810
811  (stations ground-troops 1)
812  (stations sr-spacecraft 1)
813  (stations engineers 1)
814  (stations facilities 1)
815  (stations probe 1)
816
817  (shipyard sr-spacecraft 1)
818  (shipyard lr-spacecraft 1)
819
820;  (spaceport shuttle 1)
821
822  (engineers settlement 1)
823  (engineers civ-1 1)
824  (engineers space-colony 1)
825  (engineers o-facilities 1)
826  (engineers terraforming-station 1)
827
828  (civ-0 civ-1 1)
829  (civ-1 civ-2 1)
830  (civ-2 civ-3 1)
831)
832
833(table acp-to-build
834  (civilizations ground-troops 1)
835  (civilizations engineers 1)
836  (civilizations facilities 1)
837  (civilizations sr-spacecraft 1)
838  (civilizations probe 1)
839  (stations ground-troops 1)
840
841  (shipyard sr-spacecraft 1)
842  (shipyard lr-spacecraft 1)
843
844  (stations engineers 1)
845  (stations shuttle 1)
846  (stations facilities 1)
847  (stations probe 1)
848
849;  (spaceport shuttle 1)
850
851  (engineers settlement 1)
852  (engineers civ-1 1)
853  (engineers space-colony 1)
854  (engineers o-facilities 1)
855  (engineers terraforming-station 1)
856
857  (civ-0 civ-1 1)
858  (civ-1 civ-2 1)
859  (civ-2 civ-3 1)
860)
861
862(table create-range
863  (engineers space-colony 1)
864  (engineers o-facilities 1)
865)
866
867(table build-range
868  (engineers space-colony 1)
869  (engineers o-facilities 1)
870)
871
872;;; MATERIALS
873
874(table unit-storage-x
875#| (should this be in a terrain-storage table?)
876  (a-planet fuel 30000)
877  (b-planet fuel 25000)
878  (c-planet fuel 10000)
879  (c-planet ores 1000)
880  (d-planet ores 500)
881  (e-planet fuel 5000)
882  (e-planet ores 3000)
883  (f-planet fuel 1000)
884  (f-planet ores 4000)
885  (g-planet food 500)
886  (g-planet fuel 1000)
887  (g-planet ores 8000)
888  (g-planet personnel 100)
889  (h-planet food 300)
890  (h-planet fuel 1000)
891  (h-planet ores 1000)
892  (h-planet personnel 60)
893  (i-planet fuel 2000)
894  (i-planet ores 1000)
895  (j-planet fuel 500)
896  (j-planet ores 600)
897  (k-planet fuel 1000)
898  (k-planet ores 800)
899  (l-planet food 500)
900  (l-planet fuel 1200)
901  (l-planet ores 1500)
902  (l-planet personnel 100)
903  (m-planet food 2000)
904  (m-planet fuel 5000)
905  (m-planet ores 2000)
906  (m-planet personnel 400)
907  (n-planet food 1500)
908  (n-planet fuel 1500)
909  (n-planet ores 500)
910  (n-planet personnel 250)
911|#
912
913  (civ-0 food 300)
914  (civ-1 food 600)
915  (civ-2 food 1200)
916  (civ-3 food 2400)
917
918  (civ-0 fuel 100)
919  (civ-1 fuel 200)
920  (civ-2 fuel 400)
921  (civ-3 fuel 800)
922
923  (civ-0 ores 300)
924  (civ-1 ores 600)
925  (civ-2 ores 1200)
926  (civ-3 ores 2400)
927
928  (civ-0 personnel 300)
929  (civ-1 personnel 600)
930  (civ-2 personnel 1200)
931  (civ-3 personnel 2400)
932
933  (civ-0 petroleum 500)
934  (civ-1 solar 1000)
935  (civ-2 solar 2000)
936  (civ-3 solar 4000)
937
938  (civ-0 lr-fuel 10)
939  (civ-1 lr-fuel 100)
940  (civ-2 lr-fuel 1000)
941  (civ-3 lr-fuel 10000)
942
943  (civ-0 torpedoes 20)
944  (civ-1 torpedoes 40)
945  (civ-2 torpedoes 80)
946  (civ-3 torpedoes 160)
947
948#|
949  (civilization food 2400)
950  (civilization fuel 800)
951  (civilization ores 2400)
952  (civilization personnel 2400)
953  (civilization petroleum 500)
954  (civilization solar 4000)
955  (civilization lr-fuel 4000)
956|#
957
958  (settlement food 300)
959  (settlement fuel 150)
960  (settlement ores 300)
961  (settlement personnel 200)
962  (settlement solar 750)
963  (settlement lr-fuel 2000)
964
965  (space-colony food 100)
966  (space-colony fuel 1500)
967  (space-colony ores 100)
968  (space-colony personnel 20)
969  (space-colony solar 1000)
970  (space-colony lr-fuel 8000)
971
972  (shipyard fuel 800)
973  (shipyard ores 300)
974  (shipyard lr-fuel 3000)
975  (shipyard personnel 200)
976  (shipyard torpedoes 100)
977  (shipyard solar 100)
978
979  (dysen-sphere solar 1000)
980
981  (outpost fuel 500)
982  (outpost ores 1800)
983  (outpost personnel 50)
984  (outpost lr-fuel 1000)
985  (outpost torpedoes 50)
986  (outpost solar 100)
987
988  (spaceport m* 200)
989  (spaceport food 0)
990
991  (terraforming-station protomatter 1000)
992
993  (shuttle fuel 18)
994
995#|
996  (cargoliner fuel 100)
997  (cargoliner ores 50)
998  (mothership fuel 200)
999|#
1000
1001  (s-deadalus lr-fuel 100)
1002  (s-oberth lr-fuel 150)
1003  (s-constitution1 lr-fuel 250)
1004  (s-constitution2 lr-fuel 300)
1005  (s-miranda lr-fuel 200)
1006  (s-constellation lr-fuel 600)
1007  (s-excelsior lr-fuel 400)
1008  (s-ambassador lr-fuel 500)
1009  (s-nebula lr-fuel 800)
1010  (s-galaxy lr-fuel 1000)
1011
1012  ;; Starships that can carry a shuttle should have fuel reserves for them.
1013  (s-deadalus fuel 64)
1014  (s-oberth fuel 80)
1015  (s-constitution1 fuel 128)
1016  (s-constitution2 fuel 196)
1017  (s-miranda fuel 128)
1018  (s-constellation fuel 196)
1019  (s-excelsior fuel 256)
1020  (s-ambassador fuel 384)
1021  (s-nebula fuel 256)
1022  (s-galaxy fuel 512)
1023
1024  ;; Starships only can carry photon torpedoes if they were invented after
1025  ;; photon torpedoes.
1026  (s-constitution1 torpedoes 10)
1027  (s-constitution2 torpedoes 20)
1028  (s-miranda torpedoes 50)
1029  (s-constellation torpedoes 25)
1030  (s-excelsior torpedoes 40)
1031  (s-ambassador torpedoes 80)
1032  (s-nebula torpedoes 200)
1033  (s-galaxy torpedoes 500)
1034
1035  ;; Facilities that produce advanced resources can stockpile for later use.
1036  ;; (also helpful if the civilization or colony has a low capacity for the
1037  ;; material in question!)
1038  ;; Antimatter plants should produce equal amounts of matter and antimatter,
1039  ;; but it seems that matter is supplied to starships less readily than
1040  ;; antimatter, so try to compensate on the supply side.
1041  (antimatter-plant lr-fuel 100)
1042  (torpedo-industry torpedoes 50)
1043
1044;  (engineers ores 25)
1045)
1046
1047(table base-production
1048  ;; Artificial colonies must be equipped to make their own supplies.
1049  (settlement food 3)
1050  (settlement personnel 1)
1051  (space-colony food 2)
1052  (space-colony fuel 5)
1053  (space-colony ores 1)
1054  (space-colony personnel 1)
1055
1056  (shipyard fuel 1)
1057
1058  (arcology food 4)
1059  (arcology fuel 10)
1060  (arcology personnel 1)
1061
1062  (antimatter-plant lr-fuel 60)
1063  (torpedo-industry torpedoes 10)
1064
1065  (terraforming-station protomatter 1)
1066
1067  ;; Solar plants actually produce petroleum as quickly as it is consumed.
1068  ;; This is unrealistic, but it does allow a civilization to function without
1069  ;; additional complexities.
1070  ;; (What if there were an oil-plant and a solar-plant that both produced a
1071  ;; generic energy material, but the oil-plant required petroleum and would
1072  ;; starve without it?)
1073  (solar-plant petroleum 1)
1074
1075  (dysen-sphere solar 100)
1076)
1077
1078(table unit-initial-supply
1079  ;; Most civilizations start out with nothing.  However, level 0
1080  ;; civilizations are dependant on petroleum, and therefore need a supply
1081  ;; of oil that will last them until they can upgrade to level 1.
1082  (civ-0 petroleum 500)
1083
1084  ;; In case "More starters" is used, there are some units that need to be fueled,
1085  ;; otherwise they'll die immediately!
1086  (sr-spacecraft fuel 9999)
1087  (lr-spacecraft lr-fuel 9999)
1088)
1089
1090(table base-consumption
1091;  (shipyard fuel 1)
1092
1093  (sr-spacecraft fuel 1)
1094  (lr-spacecraft lr-fuel 1)
1095
1096  (civ-0 petroleum 1)
1097)
1098
1099(table supply-on-completion
1100  ;; See above for explanation
1101  (civ-0 petroleum 500)
1102)
1103
1104(table occupant-multiply-production
1105  (solar-plant solar 200)	;; This is useful to Level >0 civilizations.
1106  (ore-processor ores 200)
1107  (academy personnel 200)
1108  (wcs food 200)
1109)
1110
1111(table consumption-as-occupant
1112  ;; Nothing consumes anything if it's docked in something else.
1113  (u* m* 0)
1114)
1115
1116(table material-to-move
1117  (sr-spacecraft fuel 1)
1118  (lr-spacecraft lr-fuel 1)
1119)
1120
1121(table consumption-per-move
1122  (sr-spacecraft fuel 1)
1123  (lr-spacecraft lr-fuel 1)
1124)
1125
1126(table unit-consumption-per-size
1127  (civilizations food 1)
1128  (stations food 1)
1129)
1130
1131#| This is not allowed by Xconq (yet).
1132(table unit-production-per-size
1133  (civilizations ores 1)
1134  (stations ores 1)
1135)
1136|#
1137
1138(table unit-consumption-to-grow
1139  (civilizations food 50)
1140  (stations food 50)
1141)
1142
1143(table hp-per-starve
1144  (sr-spacecraft fuel 2.00)
1145  (lr-spacecraft lr-fuel 1.00)
1146)
1147
1148(set event-notices '(
1149  ((unit-starved sr-spacecraft) (0 " runs out of fuel and disappears!"))
1150  ((unit-starved lr-spacecraft) (0 " runs out of fuel and disappears!"))
1151))
1152
1153(table unit-consumption-per-cp
1154  ;; Solar is required for everything.  However, there should be some way
1155  ;; to allow a civ-0 to use petroleum instead of solar.
1156
1157  (u* ores 5)
1158  (u* solar 1)
1159  (solar-plant solar 0)
1160  (facilities ores 10)
1161  (facilities solar 2)
1162  (armies ores 2)
1163  (armies personnel 2)
1164  (armies solar 1)
1165  (engineers ores 1)
1166  (engineers personnel 4)
1167  (engineers solar 1)
1168  (sr-spacecraft ores 10)
1169;  (sr-spacecraft personnel 1)
1170  (lr-spacecraft ores 25)
1171;  (lr-spacecraft personnel 1)
1172  (civilizations ores 5)
1173
1174
1175)
1176
1177#| Needs more work than I'm willing to put in right now.
1178(table material-to-create
1179  (u* ores 1)
1180  (u* personnel 1)
1181
1182  (civilizations ores 0)
1183  (civilizations personell 0)
1184)
1185|#
1186
1187#| Can't seem to do this either.
1188(table consumption-per-create
1189  (u* ores 1)
1190  (u* personnel 1)
1191)
1192|#
1193
1194(table material-to-build
1195  (civilizations solar 1)
1196  (civ-0 solar 0)
1197  (civ-0 petroleum 1)
1198)
1199
1200(table consumption-per-build
1201  (civilizations solar 1)
1202  (civ-0 solar 0)
1203  (civ-0 petroleum 1)
1204)
1205
1206; The setup with out-length and in-length allows every stationery unit to
1207; exchange any material except food (exchanging food causes weird things
1208; to happen).  All units can exchange anything with an adjacent unit, but
1209; shipyards can receive any supplies from 2 cells away (and anything can
1210; send them there up to 2 cells away).  Spaceports and outposts increase
1211; their range to 8, with no theoretical upper limit.
1212
1213(table out-length
1214  (civilizations m* 2)			;; Anything can send 2 cells away.
1215  (stations m* 1)			;; But stations can only send 1 cell away.
1216  (dysen-sphere solar 8)		;; The Dysen Sphere can send lots of solar energy to distant worlds.
1217  (spaceport m* 8)			;; A spaceport allows anything to go 8 cells.
1218  (outpost m* 8)			;; Outposts relay supplies up to 8 cells.
1219  (lr-spacecraft m* -1)			;; Starships should not automatically give materials.
1220  (lr-spacecraft fuel 0)		;; ...except fuel to shuttles.
1221  (antimatter-plant lr-fuel 2)		;; Allow antimatter plants to send fuel wherever it can be stored.
1222  (torpedo-industry torpedoes 2)	;; Likewise for torpedo industries.
1223  (u* food 0)				;; Food never travels between units.
1224)
1225
1226(table in-length
1227  (civilizations m* 1)			;; Planets can receive from adjacent units.
1228  (stations m* 1)			;; Same for stations.
1229  (shipyard m* 2)			;; Shipyards can receive from 2 cells away.
1230  (spaceport m* 8)			;; A spaceport can receive from 8 cells away.
1231  (outpost m* 8)			;; Outposts relay supplies up to 8 cells.
1232  (u* food 0)				;; Food never travels between units.
1233)
1234
1235;;; ENGINEERING
1236
1237;; Terraforming
1238
1239(table acp-to-add-terrain
1240  (terraforming-station living-worlds 1)
1241)
1242
1243(table acp-to-remove-terrain
1244  (terraforming-station dead-worlds 1)
1245)
1246
1247(table material-to-add-terrain
1248  (terraforming-station protomatter 1000)
1249)
1250
1251(table consumption-per-add-terrain
1252  (living-worlds protomatter 1000)
1253)
1254
1255(add terraforming-station acp-to-disband 1)
1256(add terraforming-station hp-per-disband 4)
1257
1258;;; VISION
1259
1260(add civilizations initial-seen-radius 4)
1261(add telescope vision-range 8)
1262
1263;; Short-range sensors
1264(add s-deadalus vision-range 2)
1265(add s-oberth vision-range 4)
1266(add s-constitution1 vision-range 3)
1267(add s-constitution2 vision-range 4)
1268(add s-miranda vision-range 3)
1269(add s-constellation vision-range 5)
1270(add s-excelsior vision-range 5)
1271(add s-ambassador vision-range 6)
1272(add s-nebula vision-range 7)
1273(add s-galaxy vision-range 8)
1274
1275;; Long-range sensors
1276(add telescope spy-chance 10000)
1277(add lr-spacecraft spy-chance 10000)
1278
1279(add telescope spy-range 32)
1280
1281(add s-deadalus spy-range 4)
1282(add s-oberth spy-range 8)
1283(add s-constitution1 spy-range 6)
1284(add s-constitution2 spy-range 8)
1285(add s-miranda spy-range 6)
1286(add s-constellation spy-range 10)
1287(add s-excelsior spy-range 10)
1288(add s-ambassador spy-range 12)
1289(add s-nebula spy-range 14)
1290(add s-galaxy spy-range 16)
1291
1292(table spy-quality
1293  (lr-spacecraft lr-spacecraft 75)
1294  (lr-spacecraft sr-spacecraft 50)
1295  (lr-spacecraft civilizations 100)
1296)
1297
1298;;; UNIT-UNIT RELATIONSHIPS
1299
1300(doctrine engineer-doctrine
1301  (construction-run (u* 1)))
1302
1303(doctrine place-doctrine
1304  (construction-run (facilities 1)))
1305
1306(side-defaults
1307  (doctrines (engineers engineer-doctrine)
1308  (civilizations place-doctrine)
1309  (stations place-doctrine))
1310)
1311
1312;;; CAPACITANCE
1313
1314(add civilizations capacity 32)
1315(add stations capacity 16)
1316(add shipyard capacity 4)
1317(add outpost capacity 2)
1318(add terraforming-station capacity 4)
1319
1320(add shuttle capacity 1)
1321; (add cargoliner capacity 8)
1322; (add mothership capacity 12)
1323(add lr-spacecraft capacity 1)
1324(add s-constitution1 capacity 2)
1325(add s-constitution2 capacity 2)
1326(add s-excelsior capacity 3)
1327(add s-ambassador capacity 4)
1328(add s-galaxy capacity 8)
1329;(add spaceport capacity 32)
1330
1331#|
1332(table terrain-capacity-x
1333  (engineers living-worlds 1)
1334  (engineers dead-worlds 1)
1335  (settlement dead-worlds 1)
1336)
1337|#
1338
1339(table unit-size-in-terrain
1340  (u* t* 1)
1341  (civilizations t* 4)
1342  (terraforming-station t* 4)
1343)
1344
1345(table unit-size-as-occupant
1346  (u* u* 999)
1347  (armies civilizations 1)
1348  (armies lr-spacecraft 1)
1349  (armies stations 1)
1350  (engineers u* 1)
1351  (facilities u* 0)
1352  (facilities o-facilities 999)
1353
1354
1355  (sr-spacecraft u* 999)
1356  (sr-spacecraft stations 1)
1357  (sr-spacecraft o-facilities 1)
1358  (sr-spacecraft civilizations 1)
1359  (sr-spacecraft lr-spacecraft 1)
1360  (lr-spacecraft u* 999)
1361  (lr-spacecraft o-facilities 1)
1362  (lr-spacecraft space-colony 4)
1363
1364  (probe u* 1)
1365  (probe terraforming-station 999)
1366
1367  (o-facilities u* 999)
1368
1369  (armies shuttle 1)
1370  (engineers shuttle 1)
1371
1372  (civ-1 civ-0 0)
1373  (civ-2 civ-1 0)
1374  (civ-3 civ-2 0)
1375)
1376
1377(table occupant-max
1378  (armies civilizations 24)
1379  (engineers civilizations 16)
1380  (sr-spacecraft civilizations 8)
1381  (probe civilizations 12)
1382
1383  (armies stations 8)
1384  (engineers stations 6)
1385  (sr-spacecraft stations 12)
1386  (probe stations 4)
1387)
1388
1389;;; COMBAT
1390
1391(table acp-to-attack
1392  (u* u* 1)
1393  (engineers u* 0)
1394  (probe u* 0)
1395)
1396
1397(add lr-spacecraft acp-to-fire 1)
1398(add s-deadalus acp-to-fire 0)
1399(add s-oberth acp-to-fire 0)
1400
1401(add s-constitution1 range 3)
1402(add s-constitution2 range 4)
1403(add s-miranda range 3)
1404(add s-constellation range 5)
1405(add s-excelsior range 5)
1406(add s-ambassador range 6)
1407(add s-nebula range 7)
1408(add s-galaxy range 8)
1409
1410(table acp-to-capture
1411;; (engineers dead-worlds 1)
1412)
1413
1414(table hp-to-garrison
1415  (engineers civilizations 1)
1416  (engineers stations 1)
1417  (engineers o-facilities 1)
1418
1419  (civ-0 civ-1 25)
1420  (civ-1 civ-2 50)
1421  (civ-2 civ-3 100)
1422)
1423
1424(table hit-chance
1425  (u* u* 50)
1426  (probe u* 0)
1427  (engineers u* 0)
1428)
1429
1430(table damage
1431  (u* u* 1)
1432  (probe u* 0)
1433  (engineers u* 0)
1434)
1435
1436(table fire-damage
1437  (lr-spacecraft u* 2)
1438)
1439
1440(table capture-chance
1441  (armies civilizations 20)
1442  (armies stations 30)
1443
1444  (s-constitution1 civilizations 15)
1445  (s-constitution2 civilizations 15)
1446  (s-excelsior civilizations 20)
1447  (s-ambassador civilizations 25)
1448  (s-galaxy civilizations 30)
1449)
1450
1451(table material-to-attack
1452  (lr-spacecraft antimatter 1)
1453)
1454
1455(table consumption-per-attack
1456  (lr-spacecraft antimatter 1)
1457)
1458
1459(table material-to-fire
1460  (lr-spacecraft torpedoes 1)
1461)
1462
1463(table consumption-per-fire
1464  (lr-spacecraft torpedoes 1)
1465)
1466
1467(table hit-by
1468  (u* antimatter 1)
1469  (u* torpedoes 1)
1470)
1471
1472(table protection
1473  (armies civilizations 0.40)
1474  (armies stations 0.50)
1475
1476  (lr-spacecraft armies 0.00)
1477)
1478
1479(table stack-protection
1480  ;; Few things can wipe out a large military force, even with futuristic technology.
1481  (armies armies 0.50)
1482  (armies engineers 0.00)
1483)
1484
1485;;; REPAIR
1486
1487(table auto-repair
1488  (shipyard sr-spacecraft 2.00)
1489  (shipyard lr-spacecraft 1.00)
1490
1491  (outpost sr-spacecraft 1.00)
1492  (outpost lr-spacecraft 0.50)
1493
1494  (civilizations armies 1.00)		;; Currently useless; the only army has 1 HP!
1495)
1496
1497;;; TOOLING
1498
1499(table acp-to-toolup
1500  (u* u* 1)
1501)
1502
1503(table tp-to-build
1504  ;; Make sure that it defaults to zero!
1505  (u* u* 0)
1506
1507  ;; It is generally more difficult to build constructive units than to
1508  ;; produce destructive units.  Therefore, engineers require more tooling
1509  ;; than armies.
1510  (civilizations armies 1)
1511  (civilizations engineers 2)
1512
1513  ;; The more advanced a starship, the more tooling needed to build it.
1514  (shipyard vws 4)
1515  (shipyard s-deadalus 12)
1516  (shipyard s-oberth 14)
1517  (shipyard s-constitution1 18)
1518  (shipyard s-constitution2 20)
1519  (shipyard s-miranda 22)
1520  (shipyard s-constellation 24)
1521  (shipyard s-excelsior 28)
1522  (shipyard s-ambassador 30)
1523  (shipyard s-nebula 34)
1524  (shipyard s-galaxy 38)
1525
1526  ;; No tooling needed for facilities (they *are* tooling, in their own way).
1527)
1528
1529(table tp-max
1530  ;; Make sure that it defaults to zero!
1531  (u* u* 0)
1532
1533  ;; It is generally more difficult to build constructive units than to
1534  ;; produce destructive units.  Therefore, engineers require more tooling
1535  ;; than armies.
1536  (civilizations armies 1)
1537  (civilizations engineers 2)
1538
1539  ;; The more advanced a starship, the more tooling needed to build it.
1540  (shipyard vws 4)
1541  (shipyard s-deadalus 12)
1542  (shipyard s-oberth 14)
1543  (shipyard s-constitution1 18)
1544  (shipyard s-constitution2 20)
1545  (shipyard s-miranda 22)
1546  (shipyard s-constellation 24)
1547  (shipyard s-excelsior 28)
1548  (shipyard s-ambassador 30)
1549  (shipyard s-nebula 34)
1550  (shipyard s-galaxy 38)
1551
1552  ;; No tooling needed for facilities (they *are* tooling, in their own way).
1553)
1554
1555#| Can't seem to make tooling depend on materials.  That needs to be fixed.
1556(table material-to-toolup
1557  (u* ores 1)
1558)
1559
1560(table consumption-to-toolup
1561  (u* ores 1)
1562)
1563|#
1564
1565;;; UPGRADING
1566
1567(table can-change-type-to 0
1568  (civ-0 civ-1 true)
1569  (civ-1 civ-2 true)
1570  (civ-2 civ-3 true)
1571)
1572
1573(table acp-to-change-type
1574  (civ-0 civ-1 1)
1575  (civ-1 civ-2 1)
1576  (civ-2 civ-3 1)
1577)
1578
1579;;; SYNTHESIS
1580
1581(set synthesis-methods '(make-random-terrain make-countries make-independent-units make-initial-materials name-units-randomly))
1582
1583