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
|
(game-module "roman"
(title "Ancient Rome")
(blurb "base module for ancient Rome, ca 100 BC to 200 AD")
(notes
("The Roman Republic and Empire from 100 BC to 200 AD."
""
"Massimo Campostrini <campo@mailbox.difi.unipi.it>"
))
(variants
(world-seen false)
(see-all false)
(world-size (60 30 360))
(sequential false)
("Mostly Land" mostly-land
(true
;; Adjust so that sea is 20% instead of 50% of the world.
(add sea alt-percentile-max 20)
(add shallows alt-percentile-min 20)
(add shallows alt-percentile-max 21)
(add swamp alt-percentile-min 21)
(add swamp alt-percentile-max 23)
(add (desert plains forest) alt-percentile-min 21)
))
("All Land" all-land
(true
;; Adjust sea and shallows out of existence, let swamp take all the low spots.
(add sea alt-percentile-min 0)
(add sea alt-percentile-max 0)
(add shallows alt-percentile-min 0)
(add shallows alt-percentile-max 0)
(add swamp alt-percentile-min 0)
(add swamp alt-percentile-max 2)
(add swamp wet-percentile-min 0)
(add swamp wet-percentile-max 100)
(add (desert plains forest) alt-percentile-min 2)
;; Counterproductive to try to set up near water.
(add sea country-terrain-min 0)
))
("Large Countries" large
(true (set country-radius-max 100))
)
)
)
(unit-type infantry (image-name "pikeman")
(help "light infantry")
(notes "pay attention to wood supply before building")
)
(unit-type cavalry (image-name "cavalry")
(help "light cavalry")
)
(unit-type archer (image-name "archer")
(help "archers and slingers")
(notes "pay attention to arrow supply")
)
(unit-type legion (image-name "legion") (char "L")
(possible-sides "roman")
(help "\"division\" of armored soldiers")
(notes "pay attention to wood supply before building")
)
(unit-type bireme (image-name "bireme") (char "B")
(help "small two-decked ship")
)
(unit-type trireme (image-name "trireme") (char "T")
(possible-sides (not "barbarian"))
(help "three-decked ship - mainstay of the navies")
)
(unit-type barge (image-name "barge") (char "U")
(help "troop transport, slow and weak")
)
(unit-type siege-engine (name "siege engine") (image-name "catapult") (char "S")
(possible-sides (not "barbarian"))
(help "built by infantry for attacking cities")
)
(unit-type camp (image-name "tents") (char "/")
(help "fortified camp")
)
(unit-type tribe (image-name "tribe") (char "X")
; (possible-sides (or "barbarian" "independent")) ; is this a good idea?
(help "wandering barbarian tribe")
)
(unit-type oppidum (image-name "village-2") (char "V")
(help "village")
)
(unit-type civitas (image-name "walltown") (char "*")
(help "typical city")
)
(unit-type urbs (image-name "parthenon") (char "@")
(possible-sides (not "barbarian"))
(help "large city")
)
(material-type food
(help "what everybody has to eat"))
(material-type wood
(help "raw materials for building things"))
(material-type stones
(help "ammo for siege engines"))
(material-type arrows
(help "ammo for archers"))
(include "stdterr")
(define i infantry)
(define c cavalry)
(define a archer)
(define L legion)
(define B bireme)
(define T trireme)
(define U barge)
(define S siege-engine)
(define / camp)
(define X tribe)
(define V oppidum)
(define * civitas)
(define @ urbs)
(define cities (V * @))
(define makers (X V * @))
(define places (/ V * @))
(define troops (i c a L S))
(define ships (B T U))
(define movers (i c a L B T U S X))
(define water (sea shallows))
(define land (swamp plains forest desert mountains))
;;; Static relationships.
(table vanishes-on
(troops water true)
(places water true)
(ships land true)
(ships road true)
(u* ice true)
)
;; Unit-unit capacities.
(table unit-size-as-occupant
(u* u* 500)
; i c a L B T U S X
(movers u* (1 2 1 4 2 4 6 500 500))
)
(add (B T U S / V X * @) capacity
(1 2 4 4 8 12 16 25 100)
)
(table occupant-max
(u* u* 100)
(S u* 1)
(ships ships 0)
)
;;; Unit-terrain capacities.
;; Limit units to 4 in one cell.
;; Places cover the entire cell, however.
(table unit-size-in-terrain
(u* t* 4)
(L t* 8)
(places t* 16)
)
(add t* capacity 16)
;;; Unit-material capacities.
(table unit-storage-x
(u* m* 0)
; i c a L B T U S / X V * @
(u* food ( 5 8 5 10 10 20 40 5 10 30 30 50 200))
(u* wood ( 16 4 4 24 12 16 25 0 20 20 30 50 150))
(u* stones ( 2 1 1 4 4 6 12 5 10 10 30 50 150))
(u* arrows ( 2 1 4 4 4 6 10 0 10 15 20 30 100))
)
;; A game's starting units will be full by default.
(table unit-initial-supply (u* m* 9999))
; i c a L B T U S / X V * @
(add places already-seen 100)
(add X already-seen 100)
(add cities see-always true)
(table visibility
(u* t* 100)
(movers (mountains forest) 10)
((i a) (swamp plains desert) 30)
((S X) (mountains forest) 30)
)
; i c a L B T U S / X V * @
(add u* stack-order (1 3 2 4 5 7 6 8 9 10 11 12 13))
;;; Actions.
; i c a L B T U S / X V * @
(add u* acp-per-turn ( 2 8 2 4 4 4 2 1 1 2 1 2 4))
(add movers acp-min (-2 -8 -2 -4 -4 -4 -3 -3 -2))
;;; Movement.
(add places speed 0)
(add movers speed 100)
(table mp-to-enter-unit
(u* u* 0)
((i c a L) ships (2 8 2 4))
)
(table mp-to-enter-terrain
(u* t* 99)
(troops land 2)
(L land 4)
(c (forest mountains) 8)
((S X) land 2)
(ships water 1)
(troops road 0)
; i c a L S
(troops river (2 8 2 4 99))
(X river 2)
)
(table mp-to-traverse
(u* (river road) 99)
(ships river 2)
(troops road 1)
((L c S X) road 2)
)
;;; Construction.
; i c a L B T U S / X V * @
(add u* cp (12 30 20 40 32 48 24 20 16 1 1 1 1))
(table acp-to-create
((i L) (S /) 1)
(cities troops 1)
(cities ships 1)
(X troops 1)
(X ships 1)
((X V) (L T) 0)
)
(table cp-on-creation
((i L) (S /) 2)
(cities troops 2)
(cities ships 2)
)
(table acp-to-build
((i L) (S /) 1)
(cities troops 1)
(cities ships 1)
(X troops 1)
(X ships 1)
((X V) (L T) 0)
)
(table cp-per-build
((i L) (S /) 2)
(cities troops 2)
(cities ships 2)
)
(table occupant-can-construct
(u* u* false)
)
(table consumption-on-creation
((B T U S /) wood (15 25 15 8 8))
)
;; Automatic repair work.
(add troops hp-recovery 0.25)
(add ships hp-recovery 0.25)
(add cities hp-recovery 0.50)
;;; Production.
;; should actually get food and wood from terrain
(table base-production
(troops food 1)
(c food 2)
((/ X V * @) food (5 5 10 20 40))
((/ X V * @) wood (1 3 2 3 5))
((/ X V * @) arrows (1 1 1 2 3))
((/ X V * @) stones (1 1 1 2 3))
)
(table productivity
(u* t* 0)
(troops (plains forest) 100)
(c forest 50)
(/ land-t* (30 100 50 30))
(X land-t* (30 100 50 30))
(V land-t* (30 100 50 30))
(* land-t* (30 100 50 30))
(@ land-t* (30 100 50 30))
)
(table base-consumption
((i a L) food 1)
(c food 2)
)
(table hp-per-starve
(movers food 0.5)
)
;;; Combat.
(table acp-to-attack
(u* u* 1)
((a S) u* 0)
)
(table acp-to-defend
(u* u* 1)
(u* a 0)
)
(add (a S) range 1)
(add (a S) acp-to-fire 1)
; i c a L B T U S / X V * @
(add u* hp-max (2 3 2 8 3 6 2 2 5 20 20 50 200))
(table hit-chance
(u* u* 50) ; basic hit chance
(troops ships 20)
(ships troops 20)
(a c 25)
(S movers 0)
(U u* 0)
)
(table damage
(u* u* 1)
(S (V * @) 4)
)
(table capture-chance
(i (/ X V * @) (20 15 15 10 5))
(c (/ X V * @) (20 20 10 5 2))
(L (/ X V * @) (40 40 40 20 10))
)
(table independent-capture-chance
(i (/ X V * @) (40 20 30 20 10))
(c (/ X V * @) (40 30 20 10 5))
(L (/ X V * @) (70 50 70 35 20))
)
(table ferry-on-entry
(u* u* over-own)
(ships movers over-border)
)
(table ferry-on-departure
(u* u* over-own)
(ships movers over-border)
)
(table protection
(/ movers 80)
(V movers 65)
(* movers 50)
(@ movers 25)
)
(table consumption-per-attack
(a arrows 1)
(S stones 1)
)
(table hit-by
(u* arrows 1)
(places stones 1)
(ships stones 1)
)
(table surrender-range (u* u* 1))
(add u* acp-to-change-side 1)
(add u* point-value 0)
(add makers point-value (1 1 3 9))
(table favored-terrain
(u* t* 0)
(u* plains 100)
(u* forest 20)
(ships t* 0)
(ships water 100)
(X (plains desert forest mountains) (30 20 100 30))
(V (desert forest mountains) (20 50 30))
(* (desert forest mountains) (10 30 20))
)
(table independent-density
;; X V * @
(makers plains (20 120 60 15))
(makers forest (80 80 30 1))
(makers mountains (20 40 10 1))
(makers desert (10 20 5 1))
)
;; Initial setup.
; more land, more forest
; sea sha swa des pla for mou ice
(add cell-t* alt-percentile-min ( 0 48 50 50 51 51 90 99))
(add cell-t* alt-percentile-max ( 48 50 51 90 90 90 99 100))
(add cell-t* wet-percentile-min ( 0 0 20 0 20 60 0 0))
(add cell-t* wet-percentile-max (100 100 100 20 60 100 100 100))
(table road-chance
(* (* @) ( 1 5))
(@ (* @) (10 90))
)
(table road-chance ((* @) (* @) (10 90)))
(set country-radius-min 3)
(set country-separation-min 16)
(set country-separation-max 48)
(add makers start-with (1 3 2 1))
;; Naming.
(namer urbs-names (random
"Alexandria" "Antiochia" "Athenae" "Chartago" "Constantinopolis"
"Ecbatana" "Roma" "Seleucia"
))
(add urbs namer "urbs-names")
(namer civitas-names (random
"Apollonia" "Aquileia" "Artaxata" "Berytus" "Bysanthium"
"Caesarea" "Capua" "Corinthus" "Cyrene" "Durcotorum" "Dyrrachium"
"Eburacum" "Ephesus" "Gazaca" "Ierusalem" "Leptis Magna" "Lugudunum"
"Magontiacum" "Massilia" "Mediolanum" "Memphis" "Messana"
"Narbo Martius" "Nicaea" "Nicomedia" "Nova Carthago" "Numantia"
"Palmyra" "Pergamum" "Petra" "Ravenna" "Rhodos" "Sais" "Salamis"
"Salonae" "Sinope" "Susa" "Syracusae" "Tarentum" "Tarraco" "Thebae"
"Thessalonica" "Tingis" "Trapezus" "Tyrus" "Utica"
))
(add civitas namer "civitas-names")
(namer oppidum-names (random
"Aduatuca" "Aelana" "Aleria" "Alesia" "Amisus" "Ammonium" "Ancona"
"Ancyra" "Aquincum" "Attalea" "Baracara Augusta" "Boreum"
"Brundisium" "Caralis" "Carana" "Catabathmus Maior" "Cenabum"
"Cidamus" "Colonia Agrippina" "Damascus" "Delphi" "Dioscurias"
"Gades" "Gaza" "Gergovia" "Glevum" "Gortyna" "Halicarnassus"
"Heliopolis" "Heraclea" "Hermopolis Magna" "Hippo Regius" "Hispalis"
"Iconium" "Ilerda" "Lancia" "Lix" "Londinium" "Luni" "Lutecia"
"Lysimachia" "Melitene" "Naissus" "Nicopolis" "Nicopolis" "Noreia"
"Olbia" "Olisipo" "Panormus" "Panticapaeum" "Patavium" "Pelusium"
"Philippopolis" "Pisae" "Ptolemais Hermiu" "Rhegium" "Rusaddir"
"Sabrata" "Sala" "Sirmium" "Smyrna" "Sparta" "Tacapae" "Tanais"
"Tarsus" "Teredon" "Thapsacus" "Thapsus" "Toletum" "Tolosa" "Tomis"
"Volubilis"
))
(add oppidum namer "oppidum-names")
(namer tribe-names (random
"Aestii" "Alani" "Amadoci" "Bastarnae" "Batavi" "Burgunti" "Chatti"
"Chauci" "Cimbri" "Daci" "Frisii" "Getae" "Gothi" "Hiberni"
"Iazyges" "Langobardi" "Marcomanni" "Massagetae" "Picti" "Roxolani"
"Rugii" "Sarmati" "Siraces" "Suebi" "Sugambri" "Tauri" "Venedae"
))
(add tribe namer "tribe-names")
;; Sides.
(set sides-min 2)
(scorekeeper (do last-side-wins)) ; for now
; the side library really needs work (what about emblems?)
(set side-library '(
((name "Marius")
(class "roman"))
((name "Sulla")
(class "roman"))
((name "Parthia") (long-name "Regnum Parthorum") (adjective "Parthian")
(class "civilized"))
((name "Macedonia") (long-name "Regnum Macedoniae") (adjective "Macedonian")
(class "civilized"))
((name "Carthago") (adjective "Punic")
(class "civilized"))
((name "Aedui") (adjective "Aeduan")
(class "barbarian"))
((name "Teutones") (adjective "Teutonian")
(class "barbarian"))
))
|