Enka.Network

Tooltips Guide

Table of Contents

  1. Getting Started
  2. Basic Usage
  3. Advanced Usage
  4. Supported Types
  5. More Examples

Getting Started

You can use the tooltip script to easily display descriptions of items or talents from the game, such as this:

Gatling Gun Talent (hover it with your mouse!)

The script fetches data from Project Amber .
If you encounter any issues or bugs, feel free to reach out to us on  Discord .

To install the tooltip script, link the style and script files in the <head> section of your page. You only need to include one of game modules alongside main script for it to work. You can omit the fonts file if you want to use your own fonts.

<link rel="stylesheet" href=" https://enka.network/js/tooltip/v2/styles/fonts.css " />
<link rel="stylesheet" href=" https://enka.network/js/tooltip/v2/styles/style.css " />
<script src=" https://enka.network/js/tooltip/v2/script.js " defer></script>
<script src=" https://enka.network/js/tooltip/v2/modules/gi.js " defer></script>
<script src=" https://enka.network/js/tooltip/v2/modules/hsr.js " defer></script>
<script src=" https://enka.network/js/tooltip/v2/modules/zzz.js " defer></script>

Basic Usage

For basic usage, you need to set two main attributes, data-[prefix]-type and data-[prefix]-id , on any HTML element you want to attach a tooltip to.
By default, the language used will be English.
For example, look at this Skyward Harp .

<div class="item" data-gi-type="weapon" data-gi-id="15501">Skyward Harp</div>

Or this Flower .

<div class="item" data-gi-type="artifact" data-gi-id="15008">Flower</div>

Replace [prefix] part with the corresponding game prefix:

  • gi – Genshin Impact
  • hsr – Honkai: Star Rail
  • zzz – Zenless Zone Zero

Advanced Usage

data-[prefix]-no-icon

This will disable the icon, for example if you're already using an icon on your page.

data-[prefix]-lang

If you want to set specific language, you can use data-[prefix]-lang attribute. See Supported Languages

data-[prefix]-level

For weapons and talents, you can set their level, like this weapon at level 59. As you can see, it displays the stats according to the specified level.

<div class="item" data-gi-type="weapon" data-gi-id="14516" data-gi-level="59">weapon</div>

data-[prefix]-index

This attribute sets refinement level.
This Harbinger of Dawn is at refinement level 5.

<div class="item" data-gi-type="weapon" data-gi-id="11302" data-gi-index="5">Harbinger of Dawn</div>

The data-[prefix]-index attribute is type-dependant.

For character talent or constellation you need to set the character ID using the data-[prefix]-id attribute.

  • • When used with talent the data-[prefix]-index defines the specific talent you want to display.
  • • For constellation , it specifies the constellation number, starting at 1.

For further info, please refer to Supported Types

data-[prefix]-upgrade

To retrieve information about a character's upgraded version, set the data-[prefix]-upgrade to value 1 or use corresponding upgrade id

Currently relevant for: HSR, ZZZ

Supported Types

For detailed information about the attributes corresponding to each type, please refer to the table below.

◇ data-[prefix]-type◇ data-[prefix]-id◇ data-[prefix]-level◇ data-[prefix]-index◇ data-[prefix]-promote
weaponWeapon IDWeapon LevelRefinement LevelPromotion Level
artifactArtifact Set ID*Slot Index
talentCharacter IDTalent Level*Talent Index
constellationCharacter IDConstellation Index

Slot Index

◇ Index◇ Genshin Impact◇ Honkai: Star Rail
0Flower of LifeHead / Planar Sphere
1Plume of DeathHands / Link Rope
2Sands of EonBody
3Goblet of EonothemFeet
4Circlet of Logos

Talent Index

◇ Index◇ Genshin Impact◇ Honkai: Star Rail◇ Zenless Zone Zero
0Normal AttackBasic ATKBasic Attack
1Elemental SkillSkillDodge
2Elemental BurstUltimateAssist
3Alternate SprintTalentSpecial Attack
4Passive Talent - A1TechniqueChain Attack / Ultimate
5Passive Talent - A4Trace - A2Core Skill
6Passive Talent - Overworld 1Trace - A4
7Passive Talent - Overworld 2Trace - A6
8Memosprite Skill
9Memosprite Talent
>

You can use data-[prefix]-id-b instead if you want to access talent data using the actual ID or index from the API

Languages

◇ Value◇ Description◇ GI◇ HSR◇ ZZZ
ENEnglish
DEGerman
FRFrench
IDIndonesian
ITItalian
JPJapanese
PTPortuguese
RURussian
THThai
TRTurkish
VIVietnamese
KRKorean
CHSChinese Simplified
CHTChinese Traditional

More Examples

Weapons

Artifacts

Talents

Constellations