Module Game

Game constants


See also:

Tables

Game
Game specific information

Tables

Game

Game specific information

Fields:

  1. maxUnits number
  2. maxTeams number
  3. maxPlayers number
  4. squareSize number Divide Game.mapSizeX or Game.mapSizeZ by this to get engine's "mapDims" coordinates. The resolution of height, yard and type maps.
  5. metalMapSquareSize number The resolution of metalmap (for use in API such as Spring.GetMetalAmount etc.)
  6. gameSpeed number
  7. startPosType number
  8. ghostedBuildings bool
  9. mapChecksum string
  10. modChecksum string
  11. mapDamage bool
  12. mapName string
  13. mapDescription string = string Game.mapHumanName
  14. mapHardness number
  15. mapX number
  16. mapY number
  17. mapSizeX number in worldspace/opengl coords. Divide by Game.squareSize to get engine's "mapDims" coordinates
  18. mapSizeZ number in worldspace/opengl coords. Divide by Game.squareSize to get engine's "mapDims" coordinates
  19. gravity number
  20. tidal number
  21. windMin number
  22. windMax number
  23. extractorRadius number
  24. waterDamage number
  25. envDamageTypes table Containing {def}IDs of environmental-damage sources
  26. gameName string
  27. gameShortName string
  28. gameVersion string
  29. gameMutator string
  30. gameDesc string
  31. requireSonarUnderWater bool
  32. transportAir number
  33. transportShip number
  34. transportHover number
  35. transportGround number
  36. fireAtKilled number
  37. fireAtCrashing number
  38. constructionDecay bool
  39. reclaimAllowEnemies bool
  40. reclaimAllowAllies bool
  41. constructionDecayTime number
  42. constructionDecaySpeed number
  43. multiReclaim number
  44. reclaimMethod number
  45. reclaimUnitMethod number
  46. reclaimUnitEnergyCostFactor number
  47. reclaimUnitEfficiency number
  48. reclaimFeatureEnergyCostFactor number
  49. repairEnergyCostFactor number
  50. resurrectEnergyCostFactor number
  51. captureEnergyCostFactor number
  52. springCategories table
     example: {
       ["vtol"]         = 0,  ["special"]      = 1,  ["noweapon"]     = 2,
       ["notair"]       = 3,  ["notsub"]       = 4,  ["all"]          = 5,
       ["weapon"]       = 6,  ["notship"]      = 7,  ["notland"]      = 8,
       ["mobile"]       = 9,  ["kbot"]         = 10, ["antigator"]    = 11,
       ["tank"]         = 12, ["plant"]        = 13, ["ship"]         = 14,
       ["antiemg"]      = 15, ["antilaser"]    = 16, ["antiflame"]    = 17,
       ["underwater"]   = 18, ["hover"]        = 19, ["phib"]         = 20,
       ["constr"]       = 21, ["strategic"]    = 22, ["commander"]    = 23,
       ["paral"]        = 24, ["jam"]          = 25, ["mine"]         = 26,
       ["kamikaze"]     = 27, ["minelayer"]    = 28, ["notstructure"] = 29,
       ["air"]          = 30
     }
    
  53. armorTypes table

    (bidirectional)

     example: {
       [1]  = amphibious,   [2] = anniddm,     [3] = antibomber,
       [4]  = antifighter,  [5] = antiraider,  [6] = atl,
       [7]  = blackhydra,   [8] = bombers,     [9] = commanders,
       [10] = crawlingbombs, ...
    
       ["amphibious"]   = 1, ["anniddm"]    = 2, ["antibomber"] = 3
       ["antifighter"]  = 4, ["antiraider"] = 5, ["atl"]        = 6
       ["blackhydra"]   = 7, ["bombers"]    = 8, ["commanders"] = 9
       ["crawlingbombs"]= 10, ...
     }