Module:Game: Difference between revisions

From Path of Exile 2 Wiki
Jump to navigation Jump to search
>OmegaK2
(missing generation types added)
>OmegaK2
No edit summary
Line 577: Line 577:
         short_upper = 'Tempest',
         short_upper = 'Tempest',
         short_lower = 'tempest',
         short_lower = 'tempest',
    },
    [9] = {
        full = 'Talisman',
        short_upper = 'Talisman',
        short_lower = 'talisman',
    },
    [10] = {
        full = 'Enchantment',
        short_upper = 'Enchantment',
        short_lower = 'enchantment',
     },
     },
}
}


return game
return game

Revision as of 10:13, 4 March 2016

Module documentation[view] [edit] [history] [purge]


This is a meta module.

This module is meant to be used only by other modules. It should not be invoked in wikitext.

Overview

This module holds some constants and functions related to path of exile in general.

Stucture

The module has the following structure

game.constants General game constants, such as the attributes or classes
game.constants.item item constants
game.constants.mod Mod constants

Data

Table Id Description Available keys Extra keys
full long_upper long_lower short_upper short_lower
game.constants.characters Character No No No No No
  • id - internal id
game.constants.ascendancy Ascendancy class No No No No No
  • id - internal id
  • character - character id
game.constants.attributes Attributes No Yes Yes Yes Yes
game.constants.damage_types Damage type No No No Yes Yes
game.constants.difficulties Difficulties Yes Yes Yes No No
  • resistances - resist cap
  • minimum_level - minimum required level to enter
  • label - one letter label
game.constants.passive_types Passive skill No Yes No Yes No
  • type - 'normal' or 'ascendancy'
game.constants.tags internal tags Yes No No No No
game.constants.item.rarity Rarity Yes Yes Yes No No
game.constants.item.class Item class Yes Yes Yes No No
game.constants.item.gem_tags Gem tags Yes Yes Yes Yes Yes
game.constants.mod.domains Mod Domain No No No Yes Yes
game.constants.mod.generation_types Mod Generation Type Yes No No Yes Yes

Usage

This module should be loaded with mw.loadData().


local game = {}

game.constants = {}
game.constants.attributes = {
    {
        long_upper = 'Strength',
        long_lower = 'strength',
        short_upper = 'Str',
        short_lower = 'str',
    }, 
    {
        long_upper = 'Dexterity',
        long_lower = 'dexterity',
        short_upper = 'Dex',
        short_lower = 'dex',
    }, 
    {
        long_upper = 'Intelligence',
        long_lower = 'intelligence',
        short_upper = 'Int',
        short_lower = 'int',
    },
}

game.constants.damage_types = {
    {
        short_upper = 'Physical',
        short_lower = 'physical',
    },
    {
        short_upper = 'Fire',
        short_lower = 'fire',
    },
    {
        short_upper = 'Cold',
        short_lower = 'cold',
    },
    {
        short_upper = 'Lightning',
        short_lower = 'lightning',
    },
    {
        short_upper = 'Chaos',
        short_lower = 'chaos',
    },
}

game.constants.item = {}

game.constants.item.rarity = {
    {
        full = 'Normal',
        long_upper = 'Normal',
        long_lower = 'normal',
    },
    {
        full = 'Magic',
        long_upper = 'Magic',
        long_lower = 'magic',
    },
    {
        full = 'Rare',
        long_upper = 'Rare',
        long_lower = 'rare',
    },
    {
        full = 'Unique',
        long_upper = 'Unique',
        long_lower = 'unique',
    },
}

-- ItemClassDisplay.dat
game.constants.item.class = {
    [1] = {
        full = 'Life Flasks',
        long_upper = 'Life Flasks',
        long_lower = 'life flasks',
    },
    [2] = {
        full = 'Mana Flasks',
        long_upper = 'Mana Flasks',
        long_lower = 'mana flasks',
    },
    [3] = {
        full = 'Hybrid Flasks',
        long_upper = 'Hybrid Flasks',
        long_lower = 'hybrid flasks',
    },
    [4] = {
        full = 'Currency',
        long_upper = 'Currency',
        long_lower = 'currency',
    },
    [5] = {
        full = 'Amulets',
        long_upper = 'Amulets',
        long_lower = 'amulets',
    },
    [6] = {
        full = 'Rings',
        long_upper = 'Rings',
        long_lower = 'rings',
    },
    [7] = {
        full = 'Claws',
        long_upper = 'Claws',
        long_lower = 'claws',
    },
    [8] = {
        full = 'Daggers',
        long_upper = 'Daggers',
        long_lower = 'daggers',
    },
    [9] = {
        full = 'Wands',
        long_upper = 'Wands',
        long_lower = 'wands',
    },
    [10] = {
        full = 'One Hand Swords',
        long_upper = 'One Hand Swords',
        long_lower = 'one hand swords',
    },
    [11] = {
        full = 'Thrusting One Hand Swords',
        long_upper = 'Thrusting One Hand Swords',
        long_lower = 'thrusting one hand swords',
    },
    [12] = {
        full = 'One Hand Axes',
        long_upper = 'One Hand Axes',
        long_lower = 'one hand axes',
    },
    [13] = {
        full = 'One Hand Maces',
        long_upper = 'One Hand Maces',
        long_lower = 'one hand maces',
    },
    [14] = {
        full = 'Bows',
        long_upper = 'Bows',
        long_lower = 'bows',
    },
    [15] = {
        full = 'Staves',
        long_upper = 'Staves',
        long_lower = 'staves',
    },
    [16] = {
        full = 'Two Hand Swords',
        long_upper = 'Two Hand Swords',
        long_lower = 'two hand swords',
    },
    [17] = {
        full = 'Two Hand Axes',
        long_upper = 'Two Hand Axes',
        long_lower = 'two hand axes',
    },
    [18] = {
        full = 'Two Hand Maces',
        long_upper = 'Two Hand Maces',
        long_lower = 'two hand maces',
    },
    [19] = {
        full = 'Active Skill Gems',
        long_upper = 'Active Skill Gems',
        long_lower = 'active skill gems',
    },
    [20] = {
        full = 'Support Skill Gems',
        long_upper = 'Support Skill Gems',
        long_lower = 'support skill gems',
    },
    [21] = {
        full = 'Quivers',
        long_upper = 'Quivers',
        long_lower = 'quivers',
    },
    [22] = {
        full = 'Belts',
        long_upper = 'Belts',
        long_lower = 'belts',
    },
    [23] = {
        full = 'Gloves',
        long_upper = 'Gloves',
        long_lower = 'gloves',
    },
    [24] = {
        full = 'Boots',
        long_upper = 'Boots',
        long_lower = 'boots',
    },
    [25] = {
        full = 'Body Armours',
        long_upper = 'Body Armours',
        long_lower = 'body armours',
    },
    [26] = {
        full = 'Helmets',
        long_upper = 'Helmets',
        long_lower = 'helmets',
    },
    [27] = {
        full = 'Shields',
        long_upper = 'Shields',
        long_lower = 'shields',
    },
    [28] = {
        full = 'Small Relics',
        long_upper = 'Small Relics',
        long_lower = 'small relics',
    },
    [29] = {
        full = 'Medium Relics',
        long_upper = 'Medium Relics',
        long_lower = 'medium relics',
    },
    [30] = {
        full = 'Large Relics',
        long_upper = 'Large Relics',
        long_lower = 'large relics',
    },
    [31] = {
        full = 'Stackable Currency',
        long_upper = 'Stackable Currency',
        long_lower = 'stackable currency',
    },
    [32] = {
        full = 'Quest Items',
        long_upper = 'Quest Items',
        long_lower = 'quest items',
    },
    [33] = {
        full = 'Sceptres',
        long_upper = 'Sceptres',
        long_lower = 'sceptres',
    },
    [34] = {
        full = 'Utility Flasks',
        long_upper = 'Utility Flasks',
        long_lower = 'utility flasks',
    },
    [35] = {
        full = 'Critical Utility Flasks',
        long_upper = 'Critical Utility Flasks',
        long_lower = 'critical utility flasks',
    },
    [36] = {
        full = 'Maps',
        long_upper = 'Maps',
        long_lower = 'maps',
    },
    [37] = {
        full = '',
        long_upper = '',
        long_lower = '',
    },
    [38] = {
        full = 'Fishing Rods',
        long_upper = 'Fishing Rods',
        long_lower = 'fishing rods',
    },
    [39] = {
        full = 'Map Fragments',
        long_upper = 'Map Fragments',
        long_lower = 'map fragments',
    },
    [40] = {
        full = 'Hideout Doodads',
        long_upper = 'Hideout Doodads',
        long_lower = 'hideout doodads',
    },
    [41] = {
        full = 'Microtransactions',
        long_upper = 'Microtransactions',
        long_lower = 'microtransactions',
    },
    [42] = {
        full = 'Jewel',
        long_upper = 'Jewel',
        long_lower = 'jewel',
    },
    [43] = {
        full = 'Divination Card',
        long_upper = 'Divination Card',
        long_lower = 'divination card',
    },
}

game.constants.item.gem_tags = {
    {
        full = 'Fire',
        long_upper = 'Fire',
        long_lower = 'fire',
        short_upper = 'Fire',
        short_lower = 'fire',
    },
    {
        full = 'Cold',
        long_upper = 'Cold',
        long_lower = 'cold',
        short_upper = 'Cold',
        short_lower = 'cold',
    },
    {
        full = 'Lightning',
        long_upper = 'Lightning',
        long_lower = 'lightning',
        short_upper = 'Lightning',
        short_lower = 'lightning',
    },
    {
        full = 'Chaos',
        long_upper = 'Chaos',
        long_lower = 'chaos',
        short_upper = 'Chaos',
        short_lower = 'chaos',
    },
    {
        full = 'Spell',
        long_upper = 'Spell',
        long_lower = 'spell',
        short_upper = 'Spell',
        short_lower = 'spell',
    },
    {
        full = 'Projectile',
        long_upper = 'Projectile',
        long_lower = 'projectile',
        short_upper = 'Projectile',
        short_lower = 'projectile',
    },
    {
        full = 'Bow',
        long_upper = 'Bow',
        long_lower = 'bow',
        short_upper = 'Bow',
        short_lower = 'bow',
    },
    {
        full = 'Melee',
        long_upper = 'Melee',
        long_lower = 'melee',
        short_upper = 'Melee',
        short_lower = 'melee',
    },
    {
        full = 'Minion',
        long_upper = 'Minion',
        long_lower = 'minion',
        short_upper = 'Minion',
        short_lower = 'minion',
    },
    {
        full = '',
        long_upper = '',
        long_lower = 'strength',
        short_upper = '',
        short_lower = 'strength',
    },
    {
        full = '',
        long_upper = '',
        long_lower = 'dexterity',
        short_upper = '',
        short_lower = 'dexterity',
    },
    {
        full = '',
        long_upper = '',
        long_lower = 'intelligence',
        short_upper = '',
        short_lower = 'intelligence',
    },
    {
        full = 'Aura',
        long_upper = 'Aura',
        long_lower = 'aura',
        short_upper = 'Aura',
        short_lower = 'aura',
    },
    {
        full = 'Attack',
        long_upper = 'Attack',
        long_lower = 'attack',
        short_upper = 'Attack',
        short_lower = 'attack',
    },
    {
        full = 'AoE',
        long_upper = 'AoE',
        long_lower = 'area',
        short_upper = 'AoE',
        short_lower = 'area',
    },
    {
        full = 'Duration',
        long_upper = 'Duration',
        long_lower = 'duration',
        short_upper = 'Duration',
        short_lower = 'duration',
    },
    {
        full = 'Support',
        long_upper = 'Support',
        long_lower = 'support',
        short_upper = 'Support',
        short_lower = 'support',
    },
    {
        full = 'Curse',
        long_upper = 'Curse',
        long_lower = 'curse',
        short_upper = 'Curse',
        short_lower = 'curse',
    },
    {
        full = 'Chaining',
        long_upper = 'Chaining',
        long_lower = 'chaining',
        short_upper = 'Chaining',
        short_lower = 'chaining',
    },
    {
        full = 'Totem',
        long_upper = 'Totem',
        long_lower = 'totem',
        short_upper = 'Totem',
        short_lower = 'totem',
    },
    {
        full = 'Trap',
        long_upper = 'Trap',
        long_lower = 'trap',
        short_upper = 'Trap',
        short_lower = 'trap',
    },
    {
        full = 'Mine',
        long_upper = 'Mine',
        long_lower = 'mine',
        short_upper = 'Mine',
        short_lower = 'mine',
    },
    {
        full = 'Movement',
        long_upper = 'Movement',
        long_lower = 'movement',
        short_upper = 'Movement',
        short_lower = 'movement',
    },
    {
        full = 'Cast',
        long_upper = 'Cast',
        long_lower = 'cast',
        short_upper = 'Cast',
        short_lower = 'cast',
    },
    {
        full = 'Vaal',
        long_upper = 'Vaal',
        long_lower = 'vaal',
        short_upper = 'Vaal',
        short_lower = 'vaal',
    },
    {
        full = '',
        long_upper = '',
        long_lower = 'active_skill',
        short_upper = '',
        short_lower = 'active_skill',
    },
    {
        full = 'Trigger',
        long_upper = 'Trigger',
        long_lower = 'trigger',
        short_upper = 'Trigger',
        short_lower = 'trigger',
    },
    {
        full = 'Warcry',
        long_upper = 'Warcry',
        long_lower = 'warcry',
        short_upper = 'Warcry',
        short_lower = 'warcry',
    },
    {
        full = 'Golem',
        long_upper = 'Golem',
        long_lower = 'golem',
        short_upper = 'Golem',
        short_lower = 'golem',
    },
}

-- ModDomains.dat, reversed
game.constants.mod = {}
game.constants.mod.domains = {
    [1] = {
        short_upper = 'Item',
        short_lower = 'item',
    },
    [2] = {
        short_upper = 'Flask',
        short_lower = 'flask',
    },
    [3] = {
        short_upper = 'Monster',
        short_lower = 'monster',
    },
    [4] = {
        short_upper = 'Chest',
        short_lower = 'chest',
    },
    [5] = {
        short_upper = 'Area',
        short_lower = 'area',
    },
    --[6] = {},
    --[7] = {},
    --[8] = {},
    [9] = {
        short_upper = 'Stance',
        short_lower = 'stance',
    },
    [10] = {
        short_upper = 'Master',
        short_lower = 'master',
    },
    [11] = {
        short_upper = 'Jewel',
        short_lower = 'jewel',
    },
}

game.constants.mod.generation_types = {
    [1] = {
        full = 'Prefix',
        short_upper = 'Prefix',
        short_lower = 'prefix',
    },
    [2] = {
        full = 'Suffix',
        short_upper = 'Suffix',
        short_lower = 'suffix',
    },
    -- given mod
    [3] = {
        full = 'Unique',
        short_upper = 'Unique',
        short_lower = 'unique',
    },
    [4] = {
        full = 'Nemesis',
        short_upper = 'Nemesis',
        short_lower = 'nemesis',
    },
    [5] = {
        full = 'Corrupted',
        short_upper = 'Corrupted',
        short_lower = 'corrupted',
    },
    [6] = {
        full = 'Bloodlines',
        short_upper = 'Bloodlines',
        short_lower = 'bloodlines',
    },
    [7] = {
        full = 'Torment',
        short_upper = 'Torment',
        short_lower = 'Torment',
    },
    [8] = {
        full = 'Tempest',
        short_upper = 'Tempest',
        short_lower = 'tempest',
    },
    [9] = {
        full = 'Talisman',
        short_upper = 'Talisman',
        short_lower = 'talisman',
    },
    [10] = {
        full = 'Enchantment',
        short_upper = 'Enchantment',
        short_lower = 'enchantment',
    },
}

return game