Dungeon Link Wiki
Advertisement

Hero data is stored on the wiki in lua tables (data structures) that are stored as sub-pages of Module:Hero (such as Module:Hero/Orc). The name of the hero on the subpage title should exactly match the name of the hero in-game as is seen in the hero list, including capitalization (ex: "Module:Hero/Akayuki the Samurai"). A list of Module:Hero subpages can be found using Special:PrefixIndex.

Data is stored like this, as it makes it much more manageable and flexible to use, as well as boosting performance over storing the info directly in a template / article page.

Syntax[]

To keep information as centralized as possible and avoid needless duplication of information, "star" forms (evolutions) of heroes are stored on the hero table in a sub table ("star table") marked as "evolutions". When a hero's information is retrieved, the star table will be merged onto the "base table". So if the base table has an attribute (such as "image"), that value will be used unless the star table also has an "image" value (in which case it will "overwrite" the "base" value).

Things marked "optional" do not need to be included in the table at all if the hero does not have them (a required parameter does not need to be included in the "base table" so long as it's included in all the "star" tables).

Below is an example of all the possible values that can be used, as well as comments explaining what they are.

return {
    --------------------
    -- "base table"
    --------------------
    name        = "Name", -- Name of the hero
    image       = "Name 2.png", -- Name of the image for this hero (without "File:"). This will be overwitten in the "star tables" for story heroes.
    type        = "attack", -- Hero's type [attack, fire, water, wood, support]
    base        = "normal", -- Hero's base affinity [normal, story, raid, fairy]
    desc        = "I know ka-ra-tay!", -- Hero's official "tagline"
    
    -- Tier - The hero's unofficial "tier" in certain gameplay areas.
    -- [G, S+, S, A+, A, B+, B, C, D, F]
    tierPvE     = "G",
    tierPvP     = "A+",
    tierTower   = "S+",
    
    -- Hero's dash skill type ("dashValue"/"dashValue2" set in "star tables")
    -- [ none, 4/8 adjacent, heal, buff, vertical, horizontal, 2 radius, repeats, path, machine gun, bomb ]
    -- ("path" uses "dashValue2" for it's percent (defaults to 75))
    dash        = "4 adjacent",
    -- Skill name as it appear in game ("skillLevel" set in "star tables")
    -- The values for the skill are then retrieved from a seperate module based on the Skill name and level.
    skill       = "Myriad Slashes",
    -- The type of passive ability hero has ("passiveValue"/"passiveValue2" set in "star tables")
    -- [ critical, attack, fire, water, wood, elemental, defense, hp, perfect, super, mp, revive, chain (ATK/Heal for chains), revival, lastdungeon, superdecrease ]
    passive     = "critical",
    
    --------------------
    -- "star tables" - the number before each table ("[3] = ") denotes the star version of that hero.
    -- Even if a hero only has 1 "star" form (evolution), an evolutions table is still needed (it doesn't need anything
    -- in it, but stats should go in it to remain consistent)
    --------------------
    evolutions  = {
        [2] = {
            stars           = 2, -- star value (same as "[2] = " on the line above)
            -- base stats (when hero is level 1 with no runes)
            attack          = 25, -- (optional) The hero's attack stat
            heal            = 200, -- (optional) The hero's heal stat
            hp              = 200, -- The hero's heath stat
            taunt           = 15, -- The hero's taunt stat (this can instead be listed on the "base table" if it doesn't change)
            defense         = 5, -- The hero's defense stat
            freeze          = 1, -- (optional) The hero's freeze percent
            critical        = 4, -- The hero's critical hit chance
            buff            = 10, -- (optional) The hero's attack buff percent
            fire            = 25, -- (optional) The hero's fire stat
            water           = 25, -- (optional) The hero's water stat
            wood            = 25, -- (optional) The hero's wood stat
            
            dashValue       = 50, -- The level of the hero's "skill" (as defined in the "base table" above).
            skillLevel      = 1, -- The level of the hero's "skill" (as defined in the "base table" above).
            passiveValue    = 1, -- The level of the hero's "skill" (as defined in the "base table" above).
        },
        [3] = {
            stars            = 3,
            image           = "Name 3.png", -- if this was a story hero, you may have to have a different image depending on star type.
            -- same as above otherwise, but with updated values
        },
        [4] = {
            stars            = 4,
            dash            = "8 adjacent", -- Something the dash type changes after an evolution
            -- same as above
        },
    }
}

Quick Copy-Paste[]

return {
    name        = "nnnnnn",
    image       = "nnnnnn 6.png",
    type        = "zzzzzzzzzzz",
    base        = "zzzzzzzzzzz",
    desc        = "zzzzzzzzzzz",
 
    tierPvE     = "zzzzzzzzzzz",
    tierPvP     = "zzzzzzzzzzz",
    tierTower   = "zzzzzzzzzzz",
 
    dash        = "zzzzzzzzzzz",
    skill       = "zzzzzzzzzzz",
    passive     = "zzzzzzzzzzz",
 
    evolutions  = {
        [qqqqq] = {
            stars           = qqqqq,
            image           = "nnnnnn qqqqq.png",
            attack          = zzzzzzzzzzz,
            heal            = zzzzzzzzzzz,
            hp              = zzzzzzzzzzz,
            taunt           = zzzzzzzzzzz,
            defense         = zzzzzzzzzzz,
            freeze          = zzzzzzzzzzz,
            critical        = zzzzzzzzzzz,
            buff            = zzzzzzzzzzz,
            fire            = zzzzzzzzzzz,
            water           = zzzzzzzzzzz,
            wood            = zzzzzzzzzzz,
            
            dash            = "zzzzzzzzzzz", -- only needed here for different adjacent dash types
            dashValue       = zzzzzzzzzzz,
            skillLevel      = zzzzzzzzzzz,
            passiveValue    = zzzzzzzzzzz,
        },
    }
}
Advertisement