Card IDs

Jerome Leclanche edited this page Aug 13, 2015 · 3 revisions

Fireplace uses the original Hearthstone Card IDs to implement cards.

For example, Wisp is CS2_231. To give a Wisp to a player, you would then do:


This is a bit impractical. The function helps us find cards programmatically by name. Note that the names from the enUS locale are used, no other name is currently available in Fireplace.

>>> import

Note that names are not necessarily unique. In fact, many Choose One druid cards have duplicate names, so do not rely on them to find the card you want. You can add collectible=True to the filter() call to filter on collectible cards only, eliminating most duplicates.

Finding IDs

If you need to figure out which ID a card is, unfortunately, neither Hearthpwn nor the Hearthstone Wiki currently display them. However, the CardDefs.xml file in fireplace/cards/data/CardDefs.xml does. It is human-readable, so it is easy to find cards and match them up to their ID or description.

Buffs, summoned tokens and other "related" cards often have the ID of the main card, with a suffix of some kind. Some examples:

The tests/ script will also output a list of all card names and their IDs. It's easy to find a card from there.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.