StringConstants.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. /*
  2. * constants/StringConstants.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "GameConstants.h"
  12. VCMI_LIB_NAMESPACE_BEGIN
  13. ///
  14. /// String ID which are pointless to move to config file - these types are mostly hardcoded
  15. ///
  16. namespace GameConstants
  17. {
  18. const std::string RESOURCE_NAMES [RESOURCE_QUANTITY] = {
  19. "wood", "mercury", "ore", "sulfur", "crystal", "gems", "gold", "mithril"
  20. };
  21. const std::string PLAYER_COLOR_NAMES [PlayerColor::PLAYER_LIMIT_I] = {
  22. "red", "blue", "tan", "green", "orange", "purple", "teal", "pink"
  23. };
  24. const std::string ALIGNMENT_NAMES [3] = {"good", "evil", "neutral"};
  25. }
  26. namespace NPrimarySkill
  27. {
  28. const std::string names [GameConstants::PRIMARY_SKILLS] = { "attack", "defence", "spellpower", "knowledge" };
  29. }
  30. namespace NSecondarySkill
  31. {
  32. const std::string names [GameConstants::SKILL_QUANTITY] =
  33. {
  34. "pathfinding", "archery", "logistics", "scouting", "diplomacy", // 5
  35. "navigation", "leadership", "wisdom", "mysticism", "luck", // 10
  36. "ballistics", "eagleEye", "necromancy", "estates", "fireMagic", // 15
  37. "airMagic", "waterMagic", "earthMagic", "scholar", "tactics", // 20
  38. "artillery", "learning", "offence", "armorer", "intelligence", // 25
  39. "sorcery", "resistance", "firstAid"
  40. };
  41. const std::vector<std::string> levels =
  42. {
  43. "none", "basic", "advanced", "expert"
  44. };
  45. }
  46. namespace EBuildingType
  47. {
  48. const std::string names [44] =
  49. {
  50. "mageGuild1", "mageGuild2", "mageGuild3", "mageGuild4", "mageGuild5", // 5
  51. "tavern", "shipyard", "fort", "citadel", "castle", // 10
  52. "villageHall", "townHall", "cityHall", "capitol", "marketplace", // 15
  53. "resourceSilo", "blacksmith", "special1", "horde1", "horde1Upgr", // 20
  54. "ship", "special2", "special3", "special4", "horde2", // 25
  55. "horde2Upgr", "grail", "extraTownHall", "extraCityHall", "extraCapitol", // 30
  56. "dwellingLvl1", "dwellingLvl2", "dwellingLvl3", "dwellingLvl4", "dwellingLvl5", // 35
  57. "dwellingLvl6", "dwellingLvl7", "dwellingUpLvl1", "dwellingUpLvl2", "dwellingUpLvl3", // 40
  58. "dwellingUpLvl4", "dwellingUpLvl5", "dwellingUpLvl6", "dwellingUpLvl7"
  59. };
  60. }
  61. namespace NFaction
  62. {
  63. const std::string names [GameConstants::F_NUMBER] =
  64. {
  65. "castle", "rampart", "tower",
  66. "inferno", "necropolis", "dungeon",
  67. "stronghold", "fortress", "conflux"
  68. };
  69. }
  70. namespace NArtifactPosition
  71. {
  72. const std::string namesHero [19] =
  73. {
  74. "head", "shoulders", "neck", "rightHand", "leftHand", "torso", //5
  75. "rightRing", "leftRing", "feet", //8
  76. "misc1", "misc2", "misc3", "misc4", //12
  77. "mach1", "mach2", "mach3", "mach4", //16
  78. "spellbook", "misc5" //18
  79. };
  80. const std::string namesCreature[1] =
  81. {
  82. "creature1"
  83. };
  84. const std::string namesCommander[6] =
  85. {
  86. "commander1", "commander2", "commander3", "commander4", "commander5", "commander6",
  87. };
  88. const std::string backpack = "backpack";
  89. }
  90. namespace NMetaclass
  91. {
  92. const std::string names [16] =
  93. {
  94. "",
  95. "artifact", "creature", "faction", "experience", "hero",
  96. "heroClass", "luck", "mana", "morale", "movement",
  97. "object", "primarySkill", "secondarySkill", "spell", "resource"
  98. };
  99. }
  100. namespace NPathfindingLayer
  101. {
  102. const std::string names[EPathfindingLayer::NUM_LAYERS] =
  103. {
  104. "land", "sail", "water", "air"
  105. };
  106. }
  107. namespace MappedKeys
  108. {
  109. static const std::map<std::string, BuildingID> BUILDING_NAMES_TO_TYPES =
  110. {
  111. { "special1", BuildingID::SPECIAL_1 },
  112. { "special2", BuildingID::SPECIAL_2 },
  113. { "special3", BuildingID::SPECIAL_3 },
  114. { "special4", BuildingID::SPECIAL_4 },
  115. { "grail", BuildingID::GRAIL },
  116. { "mageGuild1", BuildingID::MAGES_GUILD_1 },
  117. { "mageGuild2", BuildingID::MAGES_GUILD_2 },
  118. { "mageGuild3", BuildingID::MAGES_GUILD_3 },
  119. { "mageGuild4", BuildingID::MAGES_GUILD_4 },
  120. { "mageGuild5", BuildingID::MAGES_GUILD_5 },
  121. { "tavern", BuildingID::TAVERN },
  122. { "shipyard", BuildingID::SHIPYARD },
  123. { "fort", BuildingID::FORT },
  124. { "citadel", BuildingID::CITADEL },
  125. { "castle", BuildingID::CASTLE },
  126. { "villageHall", BuildingID::VILLAGE_HALL },
  127. { "townHall", BuildingID::TOWN_HALL },
  128. { "cityHall", BuildingID::CITY_HALL },
  129. { "capitol", BuildingID::CAPITOL },
  130. { "marketplace", BuildingID::MARKETPLACE },
  131. { "resourceSilo", BuildingID::RESOURCE_SILO },
  132. { "blacksmith", BuildingID::BLACKSMITH },
  133. { "horde1", BuildingID::HORDE_1 },
  134. { "horde1Upgr", BuildingID::HORDE_1_UPGR },
  135. { "horde2", BuildingID::HORDE_2 },
  136. { "horde2Upgr", BuildingID::HORDE_2_UPGR },
  137. { "ship", BuildingID::SHIP },
  138. { "dwellingLvl1", BuildingID::DWELL_LVL_1 },
  139. { "dwellingLvl2", BuildingID::DWELL_LVL_2 },
  140. { "dwellingLvl3", BuildingID::DWELL_LVL_3 },
  141. { "dwellingLvl4", BuildingID::DWELL_LVL_4 },
  142. { "dwellingLvl5", BuildingID::DWELL_LVL_5 },
  143. { "dwellingLvl6", BuildingID::DWELL_LVL_6 },
  144. { "dwellingLvl7", BuildingID::DWELL_LVL_7 },
  145. { "dwellingUpLvl1", BuildingID::DWELL_LVL_1_UP },
  146. { "dwellingUpLvl2", BuildingID::DWELL_LVL_2_UP },
  147. { "dwellingUpLvl3", BuildingID::DWELL_LVL_3_UP },
  148. { "dwellingUpLvl4", BuildingID::DWELL_LVL_4_UP },
  149. { "dwellingUpLvl5", BuildingID::DWELL_LVL_5_UP },
  150. { "dwellingUpLvl6", BuildingID::DWELL_LVL_6_UP },
  151. { "dwellingUpLvl7", BuildingID::DWELL_LVL_7_UP },
  152. };
  153. static const std::map<std::string, BuildingSubID::EBuildingSubID> SPECIAL_BUILDINGS =
  154. {
  155. { "mysticPond", BuildingSubID::MYSTIC_POND },
  156. { "artifactMerchant", BuildingSubID::ARTIFACT_MERCHANT },
  157. { "freelancersGuild", BuildingSubID::FREELANCERS_GUILD },
  158. { "magicUniversity", BuildingSubID::MAGIC_UNIVERSITY },
  159. { "castleGate", BuildingSubID::CASTLE_GATE },
  160. { "creatureTransformer", BuildingSubID::CREATURE_TRANSFORMER },//only skeleton transformer yet
  161. { "portalOfSummoning", BuildingSubID::PORTAL_OF_SUMMONING },
  162. { "ballistaYard", BuildingSubID::BALLISTA_YARD },
  163. { "stables", BuildingSubID::STABLES },
  164. { "manaVortex", BuildingSubID::MANA_VORTEX },
  165. { "lookoutTower", BuildingSubID::LOOKOUT_TOWER },
  166. { "library", BuildingSubID::LIBRARY },
  167. { "brotherhoodOfSword", BuildingSubID::BROTHERHOOD_OF_SWORD },//morale garrison bonus
  168. { "fountainOfFortune", BuildingSubID::FOUNTAIN_OF_FORTUNE },//luck garrison bonus
  169. { "spellPowerGarrisonBonus", BuildingSubID::SPELL_POWER_GARRISON_BONUS },//such as 'stormclouds', but this name is not ok for good towns
  170. { "attackGarrisonBonus", BuildingSubID::ATTACK_GARRISON_BONUS },
  171. { "defenseGarrisonBonus", BuildingSubID::DEFENSE_GARRISON_BONUS },
  172. { "escapeTunnel", BuildingSubID::ESCAPE_TUNNEL },
  173. { "attackVisitingBonus", BuildingSubID::ATTACK_VISITING_BONUS },
  174. { "defenceVisitingBonus", BuildingSubID::DEFENSE_VISITING_BONUS },
  175. { "spellPowerVisitingBonus", BuildingSubID::SPELL_POWER_VISITING_BONUS },
  176. { "knowledgeVisitingBonus", BuildingSubID::KNOWLEDGE_VISITING_BONUS },
  177. { "experienceVisitingBonus", BuildingSubID::EXPERIENCE_VISITING_BONUS },
  178. { "lighthouse", BuildingSubID::LIGHTHOUSE },
  179. { "treasury", BuildingSubID::TREASURY }
  180. };
  181. static const std::map<std::string, EMarketMode> MARKET_NAMES_TO_TYPES =
  182. {
  183. { "resource-resource", EMarketMode::RESOURCE_RESOURCE },
  184. { "resource-player", EMarketMode::RESOURCE_PLAYER },
  185. { "creature-resource", EMarketMode::CREATURE_RESOURCE },
  186. { "resource-artifact", EMarketMode::RESOURCE_ARTIFACT },
  187. { "artifact-resource", EMarketMode::ARTIFACT_RESOURCE },
  188. { "artifact-experience", EMarketMode::ARTIFACT_EXP },
  189. { "creature-experience", EMarketMode::CREATURE_EXP },
  190. { "creature-undead", EMarketMode::CREATURE_UNDEAD },
  191. { "resource-skill", EMarketMode::RESOURCE_SKILL },
  192. };
  193. }
  194. VCMI_LIB_NAMESPACE_END