1 #ifndef CSM_WOLRD_COLUMNS_H 2 #define CSM_WOLRD_COLUMNS_H 3 4 #include <string> 5 #include <vector> 6 7 #include "columnbase.hpp" 8 9 namespace CSMWorld 10 { 11 namespace Columns 12 { 13 enum ColumnId 14 { 15 ColumnId_Value = 0, 16 ColumnId_Id = 1, 17 ColumnId_Modification = 2, 18 ColumnId_RecordType = 3, 19 ColumnId_ValueType = 4, 20 ColumnId_Description = 5, 21 ColumnId_Specialisation = 6, 22 ColumnId_Attribute = 7, 23 ColumnId_Name = 8, 24 ColumnId_Playable = 9, 25 ColumnId_Hidden = 10, 26 ColumnId_MaleWeight = 11, 27 ColumnId_FemaleWeight = 12, 28 ColumnId_MaleHeight = 13, 29 ColumnId_FemaleHeight = 14, 30 ColumnId_Volume = 15, 31 ColumnId_MinRange = 16, 32 ColumnId_MaxRange = 17, 33 ColumnId_SoundFile = 18, 34 ColumnId_MapColour = 19, 35 ColumnId_SleepEncounter = 20, 36 ColumnId_Texture = 21, 37 ColumnId_SpellType = 22, 38 ColumnId_Cost = 23, 39 ColumnId_ScriptText = 24, 40 ColumnId_Region = 25, 41 ColumnId_Cell = 26, 42 ColumnId_Scale = 27, 43 ColumnId_Owner = 28, 44 ColumnId_Soul = 29, 45 ColumnId_Faction = 30, 46 ColumnId_FactionIndex = 31, 47 ColumnId_Charges = 32, 48 ColumnId_Enchantment = 33, 49 ColumnId_CoinValue = 34, 50 ColumnId_Teleport = 35, 51 ColumnId_TeleportCell = 36, 52 ColumnId_LockLevel = 37, 53 ColumnId_Key = 38, 54 ColumnId_Trap = 39, 55 ColumnId_BeastRace = 40, 56 ColumnId_AutoCalc = 41, 57 ColumnId_StarterSpell = 42, 58 ColumnId_AlwaysSucceeds = 43, 59 ColumnId_SleepForbidden = 44, 60 ColumnId_InteriorWater = 45, 61 ColumnId_InteriorSky = 46, 62 ColumnId_Model = 47, 63 ColumnId_Script = 48, 64 ColumnId_Icon = 49, 65 ColumnId_Weight = 50, 66 ColumnId_EnchantmentPoints = 51, 67 ColumnId_Quality = 52, 68 // unused 69 ColumnId_AiHello = 54, 70 ColumnId_AiFlee = 55, 71 ColumnId_AiFight = 56, 72 ColumnId_AiAlarm = 57, 73 ColumnId_BuysWeapons = 58, 74 ColumnId_BuysArmor = 59, 75 ColumnId_BuysClothing = 60, 76 ColumnId_BuysBooks = 61, 77 ColumnId_BuysIngredients = 62, 78 ColumnId_BuysLockpicks = 63, 79 ColumnId_BuysProbes = 64, 80 ColumnId_BuysLights = 65, 81 ColumnId_BuysApparati = 66, 82 ColumnId_BuysRepairItems = 67, 83 ColumnId_BuysMiscItems = 68, 84 ColumnId_BuysPotions = 69, 85 ColumnId_BuysMagicItems = 70, 86 ColumnId_SellsSpells = 71, 87 ColumnId_Trainer = 72, 88 ColumnId_Spellmaking = 73, 89 ColumnId_EnchantingService = 74, 90 ColumnId_RepairService = 75, 91 ColumnId_ApparatusType = 76, 92 ColumnId_ArmorType = 77, 93 ColumnId_Health = 78, 94 ColumnId_ArmorValue = 79, 95 ColumnId_BookType = 80, 96 ColumnId_ClothingType = 81, 97 ColumnId_WeightCapacity = 82, 98 ColumnId_OrganicContainer = 83, 99 ColumnId_Respawn = 84, 100 ColumnId_CreatureType = 85, 101 ColumnId_SoulPoints = 86, 102 ColumnId_ParentCreature = 87, 103 ColumnId_Biped = 88, 104 ColumnId_HasWeapon = 89, 105 // unused 106 ColumnId_Swims = 91, 107 ColumnId_Flies = 92, 108 ColumnId_Walks = 93, 109 ColumnId_Essential = 94, 110 ColumnId_BloodType = 95, 111 // unused 112 ColumnId_OpenSound = 97, 113 ColumnId_CloseSound = 98, 114 ColumnId_Duration = 99, 115 ColumnId_Radius = 100, 116 ColumnId_Colour = 101, 117 ColumnId_Sound = 102, 118 ColumnId_Dynamic = 103, 119 ColumnId_Portable = 104, 120 ColumnId_NegativeLight = 105, 121 ColumnId_EmitterType = 106, 122 // unused (3x) 123 ColumnId_Fire = 110, 124 ColumnId_OffByDefault = 111, 125 ColumnId_IsKey = 112, 126 ColumnId_Race = 113, 127 ColumnId_Class = 114, 128 Columnid_Hair = 115, 129 ColumnId_Head = 116, 130 ColumnId_Female = 117, 131 ColumnId_WeaponType = 118, 132 ColumnId_WeaponSpeed = 119, 133 ColumnId_WeaponReach = 120, 134 ColumnId_MinChop = 121, 135 ColumnId_MaxChip = 122, 136 Columnid_MinSlash = 123, 137 ColumnId_MaxSlash = 124, 138 ColumnId_MinThrust = 125, 139 ColumnId_MaxThrust = 126, 140 ColumnId_Magical = 127, 141 ColumnId_Silver = 128, 142 ColumnId_Filter = 129, 143 ColumnId_PositionXPos = 130, 144 ColumnId_PositionYPos = 131, 145 ColumnId_PositionZPos = 132, 146 ColumnId_PositionXRot = 133, 147 ColumnId_PositionYRot = 134, 148 ColumnId_PositionZRot = 135, 149 ColumnId_DoorPositionXPos = 136, 150 ColumnId_DoorPositionYPos = 137, 151 ColumnId_DoorPositionZPos = 138, 152 ColumnId_DoorPositionXRot = 139, 153 ColumnId_DoorPositionYRot = 140, 154 ColumnId_DoorPositionZRot = 141, 155 ColumnId_DialogueType = 142, 156 ColumnId_QuestIndex = 143, 157 ColumnId_QuestStatusType = 144, 158 ColumnId_QuestDescription = 145, 159 ColumnId_Topic = 146, 160 ColumnId_Journal = 147, 161 ColumnId_Actor = 148, 162 ColumnId_PcFaction = 149, 163 ColumnId_Response = 150, 164 ColumnId_Disposition = 151, 165 ColumnId_Rank = 152, 166 ColumnId_Gender = 153, 167 ColumnId_PcRank = 154, 168 ColumnId_ReferenceableId = 155, 169 ColumnId_ContainerContent = 156, 170 ColumnId_ItemCount = 157, 171 ColumnId_InventoryItemId = 158, 172 ColumnId_CombatState = 159, 173 ColumnId_MagicState = 160, 174 ColumnId_StealthState = 161, 175 ColumnId_EnchantmentType = 162, 176 ColumnId_Vampire = 163, 177 ColumnId_BodyPartType = 164, 178 ColumnId_MeshType = 165, 179 ColumnId_ActorInventory = 166, 180 ColumnId_SpellList = 167, 181 ColumnId_SpellId = 168, 182 ColumnId_NpcDestinations = 169, 183 ColumnId_DestinationCell = 170, 184 ColumnId_PosX = 171, // these are float 185 ColumnId_PosY = 172, // these are float 186 ColumnId_PosZ = 173, // these are float 187 ColumnId_RotX = 174, 188 ColumnId_RotY = 175, 189 ColumnId_RotZ = 176, 190 // unused 191 ColumnId_OwnerGlobal = 178, 192 ColumnId_DefaultProfile = 179, 193 ColumnId_BypassNewGame = 180, 194 ColumnId_GlobalProfile = 181, 195 ColumnId_RefNumCounter = 182, 196 ColumnId_RefNum = 183, 197 ColumnId_Creature = 184, 198 ColumnId_SoundGeneratorType = 185, 199 ColumnId_AllowSpellmaking = 186, 200 ColumnId_AllowEnchanting = 187, 201 ColumnId_BaseCost = 188, 202 ColumnId_School = 189, 203 ColumnId_Particle = 190, 204 ColumnId_CastingObject = 191, 205 ColumnId_HitObject = 192, 206 ColumnId_AreaObject = 193, 207 ColumnId_BoltObject = 194, 208 ColumnId_CastingSound = 195, 209 ColumnId_HitSound = 196, 210 ColumnId_AreaSound = 197, 211 ColumnId_BoltSound = 198, 212 213 ColumnId_PathgridPoints = 199, 214 ColumnId_PathgridIndex = 200, 215 ColumnId_PathgridPosX = 201, // these are int 216 ColumnId_PathgridPosY = 202, // these are int 217 ColumnId_PathgridPosZ = 203, // these are int 218 ColumnId_PathgridEdges = 204, 219 ColumnId_PathgridEdgeIndex = 205, 220 ColumnId_PathgridEdge0 = 206, 221 ColumnId_PathgridEdge1 = 207, 222 223 ColumnId_RegionSounds = 208, 224 ColumnId_SoundName = 209, 225 ColumnId_SoundChance = 210, 226 227 ColumnId_FactionReactions = 211, 228 ColumnId_FactionReaction = 213, 229 230 ColumnId_EffectList = 214, 231 ColumnId_EffectId = 215, 232 ColumnId_EffectRange = 217, 233 ColumnId_EffectArea = 218, 234 235 ColumnId_AiPackageList = 219, 236 ColumnId_AiPackageType = 220, 237 ColumnId_AiWanderDist = 221, 238 ColumnId_AiDuration = 222, 239 ColumnId_AiWanderToD = 223, 240 // unused 241 ColumnId_AiWanderRepeat = 225, 242 ColumnId_AiActivateName = 226, 243 // use ColumnId_PosX, etc for AI destinations 244 ColumnId_AiTargetId = 227, 245 ColumnId_AiTargetCell = 228, 246 247 ColumnId_PartRefList = 229, 248 ColumnId_PartRefType = 230, 249 ColumnId_PartRefMale = 231, 250 ColumnId_PartRefFemale = 232, 251 252 ColumnId_LevelledList = 233, 253 ColumnId_LevelledItemId = 234, 254 ColumnId_LevelledItemLevel = 235, 255 ColumnId_LevelledItemType = 236, 256 ColumnId_LevelledItemTypeEach = 237, 257 ColumnId_LevelledItemChanceNone = 238, 258 259 ColumnId_PowerList = 239, 260 ColumnId_Skill = 240, 261 262 ColumnId_InfoList = 241, 263 ColumnId_InfoCondition = 242, 264 ColumnId_InfoCondFunc = 243, 265 ColumnId_InfoCondVar = 244, 266 ColumnId_InfoCondComp = 245, 267 ColumnId_InfoCondValue = 246, 268 269 ColumnId_OriginalCell = 247, 270 271 ColumnId_NpcAttributes = 248, 272 ColumnId_NpcSkills = 249, 273 ColumnId_UChar = 250, 274 ColumnId_NpcMisc = 251, 275 ColumnId_Level = 252, 276 // unused 277 ColumnId_Mana = 255, 278 ColumnId_Fatigue = 256, 279 ColumnId_NpcDisposition = 257, 280 ColumnId_NpcReputation = 258, 281 ColumnId_NpcRank = 259, 282 ColumnId_Gold = 260, 283 ColumnId_NpcPersistence = 261, 284 285 ColumnId_RaceAttributes = 262, 286 ColumnId_Male = 263, 287 // unused 288 ColumnId_RaceSkillBonus = 265, 289 // unused 290 ColumnId_RaceBonus = 267, 291 292 ColumnId_Interior = 268, 293 ColumnId_Ambient = 269, 294 ColumnId_Sunlight = 270, 295 ColumnId_Fog = 271, 296 ColumnId_FogDensity = 272, 297 ColumnId_WaterLevel = 273, 298 ColumnId_MapColor = 274, 299 300 ColumnId_FileFormat = 275, 301 ColumnId_FileDescription = 276, 302 ColumnId_Author = 277, 303 304 ColumnId_MinMagnitude = 278, 305 ColumnId_MaxMagnitude = 279, 306 307 ColumnId_CreatureAttributes = 280, 308 ColumnId_AttributeValue = 281, 309 ColumnId_CreatureAttack = 282, 310 ColumnId_MinAttack = 283, 311 ColumnId_MaxAttack = 284, 312 ColumnId_CreatureMisc = 285, 313 314 ColumnId_Idle1 = 286, 315 ColumnId_Idle2 = 287, 316 ColumnId_Idle3 = 288, 317 ColumnId_Idle4 = 289, 318 ColumnId_Idle5 = 290, 319 ColumnId_Idle6 = 291, 320 ColumnId_Idle7 = 292, 321 ColumnId_Idle8 = 293, 322 323 ColumnId_RegionWeather = 294, 324 ColumnId_WeatherName = 295, 325 ColumnId_WeatherChance = 296, 326 327 ColumnId_Text = 297, 328 329 ColumnId_TextureNickname = 298, 330 ColumnId_PluginIndex = 299, 331 ColumnId_TextureIndex = 300, 332 ColumnId_LandMapLodIndex = 301, 333 ColumnId_LandNormalsIndex = 302, 334 ColumnId_LandHeightsIndex = 303, 335 ColumnId_LandColoursIndex = 304, 336 ColumnId_LandTexturesIndex = 305, 337 338 ColumnId_RankName = 306, 339 ColumnId_FactionRanks = 307, 340 ColumnId_FactionPrimSkill = 308, 341 ColumnId_FactionFavSkill = 309, 342 ColumnId_FactionRep = 310, 343 ColumnId_FactionAttrib1 = 311, 344 ColumnId_FactionAttrib2 = 312, 345 346 // Allocated to a separate value range, so we don't get a collision should we ever need 347 // to extend the number of use values. 348 ColumnId_UseValue1 = 0x10000, 349 ColumnId_UseValue2 = 0x10001, 350 ColumnId_UseValue3 = 0x10002, 351 ColumnId_UseValue4 = 0x10003, 352 353 // Allocated to a separate value range, so we don't get a collision should we ever need 354 // to extend the number of attributes. Note that this is not the number of different 355 // attributes, but the number of attributes that can be references from a record. 356 ColumnId_Attribute1 = 0x20000, 357 ColumnId_Attribute2 = 0x20001, 358 359 // Allocated to a separate value range, so we don't get a collision should we ever need 360 // to extend the number of skills. Note that this is not the number of different 361 // skills, but the number of skills that can be references from a record. 362 ColumnId_MajorSkill1 = 0x30000, 363 ColumnId_MajorSkill2 = 0x30001, 364 ColumnId_MajorSkill3 = 0x30002, 365 ColumnId_MajorSkill4 = 0x30003, 366 ColumnId_MajorSkill5 = 0x30004, 367 368 ColumnId_MinorSkill1 = 0x40000, 369 ColumnId_MinorSkill2 = 0x40001, 370 ColumnId_MinorSkill3 = 0x40002, 371 ColumnId_MinorSkill4 = 0x40003, 372 ColumnId_MinorSkill5 = 0x40004, 373 374 ColumnId_Skill1 = 0x50000, 375 ColumnId_Skill2 = 0x50001, 376 ColumnId_Skill3 = 0x50002, 377 ColumnId_Skill4 = 0x50003, 378 ColumnId_Skill5 = 0x50004, 379 ColumnId_Skill6 = 0x50005, 380 ColumnId_Skill7 = 0x50006 381 }; 382 383 std::string getName (ColumnId column); 384 385 int getId (const std::string& name); 386 ///< Will return -1 for an invalid name. 387 388 bool hasEnums (ColumnId column); 389 390 std::vector<std::pair<int,std::string>> getEnums (ColumnId column); 391 ///< Returns an empty vector, if \a column isn't an enum type column. 392 } 393 } 394 395 #endif 396