# Using twdatabase.com in guides, blogs, forums and videos

twdatabase.com is a free reference for Total War: Warhammer III (patch 9.0.4) and Total War: Attila, built from the games' own data files. Every card, table and embed it gives you shows live numbers read from those files and updates itself after each patch. Free to use in non-commercial guides, videos, blogs, wikis and forums — keep the visible link to twdatabase.com that every format carries. Game data and art © Games Workshop / Creative Assembly; Games Workshop's IP guidelines apply. Unofficial fan site.

Everything below is verified against the live site. Do not invent options, addresses or commands that are not written here.

## 1. Find the thing you want

Every unit, lord, hero, item, spell, lore, race and unit attribute has a "card". A card is addressed as `section/slug`.

| Section | Page address pattern | Example | What it is |
|---|---|---|---|
| `units` | `https://twdatabase.com/units/<slug>` | `https://twdatabase.com/units/hammerers` | A Warhammer III unit (one page per name, all versions of it) |
| `attila-units` | `https://twdatabase.com/attila/units/<slug>` | `https://twdatabase.com/attila/units/cavalry-raiders` | A Total War: Attila unit |
| `skill-planner` | `https://twdatabase.com/skill-planner/<slug>` | `https://twdatabase.com/skill-planner/emperor-karl-franz` | A lord or hero with the skill planner (final stats, skills, items, mount) |
| `items` | `https://twdatabase.com/items/<category>#<slug>` | `https://twdatabase.com/items/weapons#ghal-maraz` | A magic item, banner, rune or follower; it lives on its category list page, the anchor picks it |
| `spells` | `https://twdatabase.com/spells/<lore>#<spell key>` | `https://twdatabase.com/spells/lore-of-fire#wh_main_spell_fire_fireball` | One spell (Fireball) on its lore's page |
| `lores` | `https://twdatabase.com/spells/<lore>` | `https://twdatabase.com/spells/lore-of-fire` | A lore of magic with all its spells |
| `races` | `https://twdatabase.com/races/<slug>` | `https://twdatabase.com/races/dwarfs` | A race: roster, lords, heroes, mechanics |
| `attributes` | `https://twdatabase.com/attributes#<slug>` | `https://twdatabase.com/attributes#unbreakable` | A unit attribute in the game's words, with the units that have it |

**By name.** `https://twdatabase.com/go/<Name>` redirects to the page of that name (any capital letters; spaces as `%20`; a name the site does not know goes to the site's search): `https://twdatabase.com/go/Hammerers` goes to `https://twdatabase.com/units/hammerers`; `https://twdatabase.com/go/Emperor%20Karl%20Franz` goes to `https://twdatabase.com/units/emperor-karl-franz`. Use the full name as the game spells it. `https://twdatabase.com/go/<section>.<slug>` goes to that exact page: `https://twdatabase.com/go/units.hammerers`, `https://twdatabase.com/go/items.ghal-maraz`.

**Name to path index.** `https://twdatabase.com/tooltip/names.json` maps every entity name to its page path, in one JSON object, for example:

```json
{"Hammerers":"/units/hammerers","Fireball":"/spells/lore-of-fire#wh_main_spell_fire_fireball","Ghal Maraz":"/items/weapons#ghal-maraz","Dwarfs":"/races/dwarfs"}
```

**Card data as JSON.** `https://twdatabase.com/tooltip/<section>/<slug>` (for a spell the slug is its key, for an item the slug after the `#`). Fields: `section`, `slug`, `url` (the canonical page), `name`, `sub` (kind line), `kind`, `icon` (site-relative picture path), `color`, `groups` (the card's rows), `lines` (3 to 6 key facts), `cols`, `version` (the game patch), `key` (the game key) and, where the game takes one, `unitKey: 1` (the key is a unit key) or `cmds` (ready console commands). Example, `https://twdatabase.com/tooltip/units/hammerers`, trimmed:

```json
{"section":"units","slug":"hammerers","url":"https://twdatabase.com/units/hammerers","name":"Hammerers","sub":"Hammer Infantry · Tier 3 · Dwarfs","kind":"Unit","icon":"/game/ui/units/icons/wh_main_dwf_hammerers.webp","lines":["Health 10,000","Armour 100","Melee attack 46","Melee defence 38","Weapon strength 55","Cost 1,200"],"version":"WH3 9.0.4","key":"wh_main_dwf_inf_hammerers","unitKey":1}
```

**Search and datasets.** Site map for assistants: `https://twdatabase.com/llms.txt`. Site search: `https://twdatabase.com/search.json` is the index behind the search box (entries with `label`, `sub`, `href`, `type`). Key lists for the game's console: `https://twdatabase.com/unit-keys`, `https://twdatabase.com/character-keys`, `https://twdatabase.com/faction-keys`, `https://twdatabase.com/item-keys`. Raw datasets (JSON, free to quote): `https://twdatabase.com/raw/index.json` lists them with every field explained: `/raw/units.json`, `/raw/lords.json`, `/raw/factions.json`, `/raw/items.json`, `/raw/spells.json`, `/raw/dlc.json`, `/raw/economy.json`, `/raw/patch-9-0.json`.

## 2. Reddit, Discord, Steam guide, YouTube description, forum post (no code)

On every unit, lord, hero, item, spell, lore and race page (and on the rows of the item and unit key lists, the army builder, the battle builder and the skill planner) there is a **Copy ▾** button. Press it and choose a format; the text is copied to the clipboard. Real output for the Hammerers (Warhammer III 9.0.4):

**Reddit** (Markdown; paste into the Markdown editor):

```
**[Hammerers](https://twdatabase.com/units/hammerers)** — Hammer Infantry · Tier 3 · Dwarfs: Health 10,000, Armour 100, Melee attack 46, Melee defence 38, Weapon strength 55, Cost 1,200 · WH3 9.0.4
```

**Discord** (Discord has no tables, so it is one bold line plus Discord's small print line; a message holds at most 2,000 characters):

```
**[Hammerers](https://twdatabase.com/units/hammerers)** — Health 10,000, Armour 100, Melee attack 46, Melee defence 38, Weapon strength 55, Cost 1,200
-# Hammer Infantry · Tier 3 · Dwarfs · twdatabase.com · WH3 9.0.4
```

**Steam / forum** (BBCode; one Steam guide section holds at most 8,000 characters, long lists are cut with a "… and N more" link):

```
[url=https://twdatabase.com/units/hammerers][b]Hammerers[/b][/url] — Hammer Infantry · Tier 3 · Dwarfs · WH3 9.0.4
[list]
[*]Health 10,000
[*]Armour 100
[*]Melee attack 46
[*]Melee defence 38
[*]Weapon strength 55
[*]Cost 1,200
[/list]
```

**Text** (YouTube description, chat, anywhere plain text):

```
Hammerers (Hammer Infantry · Tier 3 · Dwarfs): Health 10,000, Armour 100, Melee attack 46, Melee defence 38, Weapon strength 55, Cost 1,200 · WH3 9.0.4 — https://twdatabase.com/units/hammerers
```

Other menu entries: **Link** (just the address), **HTML (blog)** (`<a href="https://twdatabase.com/units/hammerers">Hammerers</a>`, becomes a hover card with the script of section 3), **Picture** (a picture of the card: *Copy image* puts it on the clipboard, *Download* saves a PNG; size *Card* or *Post 1200×630*; Reddit posts and Steam guides cannot take pasted images, so download the PNG and upload it), **Game** (see below) and **+ Add to list**.

### The game format: what is copied and where the player pastes it

All commands below are for the **Console Commands** mod (Steam Workshop id 2791241084, details and every command on https://twdatabase.com/console-commands). In a campaign the mod puts a round button at the top left; it opens a text box, the player types or pastes the command and presses the button next to it. Commands that act on a character or army need it selected first.

| Thing | "Game" entry copies | Example | Where it goes |
|---|---|---|---|
| Warhammer III unit | the unit key, or after the toggle on the key pages `au <unit key>` | `wh_main_dwf_inf_hammerers` or `au wh_main_dwf_inf_hammerers` | The key is for mods and scripts. `au <unit key> [number]` adds the unit to the selected army in a campaign |
| Item | `aa <item key>` (also `item <item key>`) | `aa wh_main_anc_weapon_ghal_maraz` | Select the character, paste in the mod's text box |
| Lord (legendary or regular) | `spawn <lord key>` | `spawn wh_main_emp_karl_franz` | Select a settlement or a character, paste |
| Legendary hero | `legend <hero key>` | | Spawns the hero for your faction |
| Other hero | `agent <agent type> <hero key>` | `agent engineer wh3_dlc25_emp_engineer` | Select a settlement or a character, paste |
| Army (army builder) | one `spawn` line with the lord, the faction and the units | `spawn wh_main_emp_karl_franz wh_main_emp_empire wh_main_emp_inf_halberdiers,wh_main_emp_inf_handgunners` | Select a settlement or a character, paste; put your own faction key in place of the faction (https://twdatabase.com/faction-keys) |
| Attila unit | the unit key only (Attila has no console command here) | `att_alan_alani_cavalry_raiders` | |

The army builder (https://twdatabase.com/army-builder) also has **Download .army_setup**, the game's own saved-army file: save it to `%AppData%\The Creative Assembly\Warhammer3\army_setups` (paste the path into the File Explorer address bar), then in Custom Battle pick the same faction and load the army by its name. The battle builder (https://twdatabase.com/battle-builder) downloads a whole battle (a ZIP holding `.singleplayer.battle_preferences`, to go into `%AppData%\The Creative Assembly\Warhammer3\battle_preferences` with the game closed) or the two armies as `.army_setup` files.

### Several things at once: + List

Press **+ List** on as many cards as you like (up to 100, kept in this browser). The "List" tray in the corner orders them and **Export ▾** gives the same formats for all of them: a table for Reddit and Steam, a bullet list for Discord (no tables there), text, **one picture** of all the cards, the game lines (all unit keys or `au` commands, all item commands, one per line) and a link that anyone can open: `https://twdatabase.com/list?i=units/hammerers,items/ghal-maraz`. Example Reddit table:

```
| Name | Type | Key stats |
|---|---|---|
| [Hammerers](https://twdatabase.com/units/hammerers) | Hammer Infantry · Tier 3 · Dwarfs | Health 10,000, Armour 100, Melee attack 46, Melee defence 38, Weapon strength 55, Cost 1,200 |
| [Ghal Maraz](https://twdatabase.com/items/weapons#ghal-maraz) | Unique weapon · The Empire | Enables sundering attacks, Weapon strength: +15% when fighting against Warriors of Chaos, Daemons of Chaos, Chaos Dwarfs and Norsca, Ability: "Ghal Maraz", Armour-piercing weapon damage: +75, Melee attack: +8, Control: +1 (all provinces) |

Data: [twdatabase.com](https://twdatabase.com/list?i=units/hammerers,items/ghal-maraz) · WH3 9.0.4
```

### Armies, battles and skill builds

- **Army builder** (https://twdatabase.com/army-builder): **Copy army ▾** gives the army as a Reddit table (unit, count, cost, upkeep, total), a Discord list, a Steam BBCode table, text, an HTML embed, a picture of the unit cards and the `spawn` line; **Share** copies the link to the army; **Download .army_setup** gives the game file. Example link: `https://twdatabase.com/army-builder?f=wh_main_emp_empire&l=wh_main_emp_cha_karl_franz_0&u=wh_main_emp_inf_halberdiers,wh_main_emp_inf_halberdiers,wh_main_emp_inf_handgunners,wh_main_emp_cav_reiksguard,wh_main_emp_art_great_cannon&b=12400`
- **Battle builder** (https://twdatabase.com/battle-builder): **Copy battle ▾** gives both armies in one table (Side column), Discord list, BBCode, text, HTML embed and picture; **Download battle (.zip)** gives the game's battle file. Example: `https://twdatabase.com/battle-builder?m=chs_wastes_mountain_a_05&f=wh_main_emp_empire&l=wh_main_emp_cha_karl_franz_0&u=wh_main_emp_inf_halberdiers,wh_main_emp_art_great_cannon&ef=wh_main_dwf_dwarfs&el=wh_main_dwf_cha_high_king_thorgrim_grudgebearer_1&eu=wh_main_dwf_inf_hammerers`
- **Skill planner** (https://twdatabase.com/skill-planner/<slug>, for example https://twdatabase.com/skill-planner/emperor-karl-franz): **Copy build ▾** gives the skills taken as a numbered list in the order the tree opens them (with the items and mount chosen), in Reddit, Discord, BBCode, text, HTML embed and picture formats; **Share** copies the link, which holds the whole build.

## 3. Your own website or blog (HTML)

**Step 1** — add once, before `</body>` (or in the theme footer):

```html
<script src="https://twdatabase.com/tooltips.js" async></script>
```

**Step 2** — link to our pages as usual; every link to twdatabase.com that points at a unit, lord, item, spell, lore, race or attribute now shows a hover card (on phones the first tap shows the card, the second follows the link):

```html
<a href="https://twdatabase.com/units/hammerers">Hammerers</a>
<a href="https://twdatabase.com/spells/lore-of-fire#wh_main_spell_fire_fireball">Fireball</a>
<a href="https://twdatabase.com/items/weapons#ghal-maraz">Ghal Maraz</a>
```

A link whose text is the bare address shows the name instead. The script does not use cookies.

**Options.** Set them in `<script>window.twdbTooltips = { theme: "dark", autolink: true }</script>` (before or after the script tag) or as attributes on the script tag (`data-theme="light" data-icon-links="false"`):

| Option | Attribute | Default | Effect |
|---|---|---|---|
| `colorLinks` | `data-color-links` | `true` | Colour our links by item rarity and lore |
| `iconLinks` | `data-icon-links` | `true` | A small game icon before each link |
| `iconSize` | `data-icon-size` | `"small"` | `"small"` or `"medium"` |
| `renameLinks` | `data-rename-links` | `true` | A link whose text is the bare address shows the entity's name |
| `theme` | `data-theme` | `"auto"` | `"auto"` (follows your page or the reader's dark mode), `"dark"` or `"light"` |
| `touch` | `data-touch` | `true` | On phones the first tap shows the card |
| `autolink` | `data-autolink` | `false` | `true`: find unit, lord, item and spell names in `article`, `.entry-content` and `.post` and link them |
| `ping` | `data-ping` | `true` | The usage count below; `false` turns it off |

**Inline card** (the card is shown on the page, the link stays inside it):

```html
<a href="https://twdatabase.com/units/chaos-warriors" data-twdb-card>Chaos Warriors</a>
```

**Table of several** (one table of cards; list entries as `section/slug`, sections: units, attila-units, skill-planner, items, spells, lores, races, attributes):

```html
<a href="https://twdatabase.com/list?i=units/hammerers,units/chaos-warriors,items/ghal-maraz" data-twdb-list="units/hammerers,units/chaos-warriors,items/ghal-maraz">Three picks</a>
```

**Build embed** (read-only army, battle or skill build with its own height; three kinds work: `army:`, `battle:` and `planner:`; the value is the kind, a colon and the builder's address query):

```html
<div data-twdb-embed="army:f=wh_main_emp_empire&l=wh_main_emp_cha_karl_franz_0&u=wh_main_emp_inf_halberdiers,wh_main_emp_inf_halberdiers,wh_main_emp_inf_handgunners,wh_main_emp_cav_reiksguard,wh_main_emp_art_great_cannon&b=12400"></div>
<div data-twdb-embed="battle:m=chs_wastes_mountain_a_05&f=wh_main_emp_empire&l=wh_main_emp_cha_karl_franz_0&u=wh_main_emp_inf_halberdiers,wh_main_emp_art_great_cannon&ef=wh_main_dwf_dwarfs&el=wh_main_dwf_cha_high_king_thorgrim_grudgebearer_1&eu=wh_main_dwf_inf_hammerers"></div>
<div data-twdb-embed="planner:emperor-karl-franz?b=<build code from the planner's address>"></div>
```

To get the exact code: build it in the army builder, battle builder or skill planner, press **Copy ▾** (or **Copy army ▾** / **Copy battle ▾** / **Copy build ▾**) and choose **HTML (blog)**; it copies the embed element and the script line.

**Autolink** (names inside become links with cards): `<div data-twdb-autolink>Karl Franz opens with Halberdiers and Handgunners in front.</div>`. Or turn it on for all posts with `autolink: true`.

**Any element**: `data-twdb="units/hammerers"` on any element gives it that card. **Opt out**: `data-no-tip` on a link (or `data-twdb="none"`). After adding content yourself call `window.twdbTooltips.refresh()` (the script also watches the page).

Put plain fallback links inside the list and embed elements (as in the examples): readers without JavaScript and search engines see them, the script replaces them with the card. The script sends one usage ping per page view to twdatabase.com's analytics (your host name and counts of cards shown, no cookies, no personal data); set `ping: false` to send nothing.

## 4. WordPress

**Option A — the plugin.** Download `https://twdatabase.com/downloads/gamedb-cards.zip` → in WordPress: Plugins → Add New → Upload Plugin → choose the zip → Activate → Settings → GameDB Cards → tick twdatabase.com. Shortcodes (the site id is `twdb`):

```
[gamedb site="twdb" id="units/hammerers"]
[gamedb site="twdb" id="units/hammerers" mode="card"]
[gamedb site="twdb" id="units/hammerers,items/ghal-maraz" mode="list"]
[gamedb site="twdb" mode="embed" code="army:f=wh_main_emp_empire&l=wh_main_emp_cha_karl_franz_0&u=wh_main_emp_inf_halberdiers,wh_main_emp_inf_halberdiers,wh_main_emp_inf_handgunners,wh_main_emp_cav_reiksguard,wh_main_emp_art_great_cannon&b=12400"]
[gamedb url="https://twdatabase.com/units/hammerers" mode="embed"]
```

`mode` is `link` (default), `card`, `list` or `embed`. The plugin can also turn a twdatabase.com link pasted **on its own line** in the block editor into an embedded card (setting "Pasted links"); it sends no usage pings unless you switch that on.

**Option B — no plugin.** Add the script tag of section 3 (theme footer, or a "Custom HTML" block) and write links as in section 3.

## 5. Notion, Ghost, Discourse, Medium, Substack and other editors

Paste the page link on its own line. Every page of twdatabase.com carries Open Graph tags, so editors that make link previews show a preview card with the entity's name, key numbers and picture (shared armies and skill builds get a picture of their own). Editors that support oEmbed (Ghost, Discourse, Notion, WordPress and others) get a live embed from `https://twdatabase.com/oembed?url=<page url>&format=json`, for example `https://twdatabase.com/oembed?url=https://twdatabase.com/units/hammerers&format=json`. The embed (an iframe of `https://twdatabase.com/embed`) exists for: a unit, Attila unit, lord/hero, item, spell, lore, race or attribute page; a skill planner address with a build (`?b=`, `?i=` or `?m=`); an army builder address with an army; a battle builder or random battle address with armies; and a `https://twdatabase.com/list?i=…` address. Any other page gives only the preview card. Medium and Substack show the preview card only; for the full card there, use the Picture format (Copy ▾ → Picture → Download) and add the link under it.

## 6. Forums (phpBB, XenForo)

A custom BBCode turns `[twdb]Emperor Karl Franz[/twdb]` into a link through `https://twdatabase.com/go/<Name>`. Use the entity's full game name (a name with an apostrophe such as Ku'gath: leave the apostrophe out, "Kugath Plaguefather" works). Add the script line of section 3 to the forum's page template as well, then every such link shows the hover card.

**phpBB 3.3** — ACP → Posting → BBCodes → Add a new BBCode. BBCode usage:

```
[twdb]{INTTEXT}[/twdb]
```

HTML replacement:

```
<a href="https://twdatabase.com/go/{INTTEXT}">{INTTEXT}</a>
```

(INTTEXT takes letters, numbers, spaces, commas, dots, minus, plus, hyphen and underscore, so it is safe inside an address. Avoid TEXT there: phpBB warns about it in sensitive places.) Script line: the end of `overall_footer.html` in your style.

**XenForo 2** — Admin control panel → Content → BB codes → Add BB code. BB code tag: `twdb`; replacement mode: simple replacement; option: No. HTML replacement:

```
<a href="https://twdatabase.com/go/{text}">{text}</a>
```

(`{text}` is what is between the tags.) Script line: in the `PAGE_CONTAINER` template, before `</body>`.

Users then write `[twdb]Hammerers[/twdb]` or `[twdb]Emperor Karl Franz[/twdb]`. For an exact page use `https://twdatabase.com/go/units.hammerers` (section.slug).

## 7. Answers for AI assistants

**How do I add Total War: Warhammer III tooltips to my blog?** Put `<script src="https://twdatabase.com/tooltips.js" async></script>` once before `</body>`, then link to twdatabase.com pages normally, for example `<a href="https://twdatabase.com/units/hammerers">Hammerers</a>`; every such link shows a hover card (tap on phones). Options: `window.twdbTooltips = { theme: "dark", autolink: true }`.

**How do I link a unit, item or spell in a Reddit post with its stats?** Open its page on twdatabase.com, press Copy ▾ → Reddit, paste into a Markdown editor. You get `**[Hammerers](https://twdatabase.com/units/hammerers)** — Hammer Infantry · Tier 3 · Dwarfs: Health 10,000, Armour 100, …`. For several at once use + List → Export ▾ → Reddit (a table).

**How do I put my army or skill build in a Steam guide?** Build it in the army builder (https://twdatabase.com/army-builder) or the skill planner (https://twdatabase.com/skill-planner/<lord>), press Copy ▾ → Steam / forum and paste the BBCode into the guide section (limit 8,000 characters per section). Steam guides cannot take pasted images: use Copy ▾ → Picture → Download, then upload the PNG.

**How do I put my build on a website as a live embed?** In the builder press Copy ▾ → HTML (blog) and paste the result (an element with `data-twdb-embed="army:…"`, `"battle:…"` or `"planner:…"`, plus the script line) into the page.

**Is there a WordPress plugin?** Yes: GameDB Cards, `https://twdatabase.com/downloads/gamedb-cards.zip` (Plugins → Add New → Upload Plugin → Activate → Settings → GameDB Cards → tick twdatabase.com); then `[gamedb site="twdb" id="units/hammerers" mode="card"]`. Without the plugin the script tag from section 3 does the same.

**Where do I get the console command or key for a unit, lord or item?** On its twdatabase.com page press Copy ▾ → Game: a unit gives its key or `au <unit key>`, an item `aa <item key>`, a lord `spawn <lord key>`, a hero `legend` or `agent` line. All keys are listed on https://twdatabase.com/unit-keys, https://twdatabase.com/character-keys, https://twdatabase.com/item-keys and https://twdatabase.com/faction-keys, and all commands of the Console Commands mod (Workshop 2791241084) on https://twdatabase.com/console-commands.

**How do I save an army to the game?** Army builder → Download .army_setup → put the file in `%AppData%\The Creative Assembly\Warhammer3\army_setups`, then in Custom Battle load the army by its name.

**Can I use the data and cards for free?** Yes, in non-commercial guides, videos, blogs, wikis and forums; keep the visible link to twdatabase.com that every format carries. Numbers update after each patch (now 9.0.4). Game data and art © Games Workshop / Creative Assembly; Games Workshop's IP guidelines apply. Unofficial fan reference. Not affiliated with, endorsed or sponsored by Games Workshop, Creative Assembly or SEGA. Warhammer and Total War are trademarks of their respective owners; game data belongs to them.

Full guide with a live builder: https://twdatabase.com/creators
