2.6.1 • Published 8 months ago
dota2-css-hero-sprites v2.6.1
Dota2 Minimap Hero Sprites
This is a CSS spritesheet for Dota 2 Minimap Hero Icons.
Demo & Usage
Add class d2mh to <i> tag and reference the wanted hero by adding an additional class in the format of <heroname>, npc_dota_hero_<heroname> or hero-<hero_id>:
<i class="d2mh axe"></i>
<i class="d2mh npc_dota_hero_gyrocopter"></i>
<i class="d2mh hero-5"></i>Output:
![]()
Installation
a) npm
Install via npm:
npm install dota2-minimap-hero-spritesAnd embed the stylesheet:
<link rel="stylesheet" type="text/css" href="./node_modules/dota2-css-hero-sprites/assets/stylesheets/dota2minimapheroes.css">b) copy files
Just copy the assets folder and link to the stylesheet in your HTML like above.
For Contributors: Update Workflow
- Update
src/heroes.jsonwith latest json output fromhttp://api.steampowered.com/IEconDOTA2_570/GetHeroes/v1?language=en_us&key=<your steam web api key>(I just update it manually) - Download Source 2 Viewer from
https://valveresourceformat.github.io/ - Search for
materials/vgui/hud/minimap_hero_sheet.vmat_c, right clickDecompile & Exportand choose a directory - In the output directory, copy the exported png file
minimap_hero_sheetintoassets/imagesin this repository - Using the Search functionality at the top, search for
mod_textures.txt, copy intomod_textures.txtin this repository - Run
npm installto get the required packages for the generator script - Run
npm run generate - Update version in
package.json - Reminder for me, run
npm publishto push the update to NPM
All game images and names are property of Valve Corporation.