{% extends "base.html" %} {% block title %}Legends Mode — df-storyteller{% endblock %} {% block content %}

Legends Mode

The histories and legends of this world

{% if not lore_loaded %}

No legends data loaded. Export from Legends mode in Dwarf Fortress, then restart the server.

{% else %}
{% if not no_llm_mode %}
{% else %}
Write your own epic saga
{% endif %} {% if saved_sagas %}
Saved Sagas ({{ saved_sagas | length }}) {% for saga in saved_sagas | reverse %}
{{ saga.season | default('') | title }} of Year {{ saga.year | default('?') }}
{{ saga.text | inline_images | hotlink | replace('\n', '
') | safe }}
{% endfor %}
{% endif %} {% if eras %}
{% for era in eras %} {{ era.name }} {% if era.start_year %} (from year {{ era.start_year }}){% endif %} {% if not loop.last %} — {% endif %} {% endfor %}
{% endif %} {% if player_civ %}

Your Civilization: {{ lore_link("civilization", player_civ.id, player_civ.name) | safe }} ({{ player_civ.race }})

{% if player_civ.details %}

{{ player_civ.details }}

{% endif %} {% if player_civ.org_data %}
{% if player_civ.org_data.deities %}

Worshipped Deities

    {% for deity in player_civ.org_data.deities %}
  • {{ lore_link("figure", deity.deity_id, deity.name) | safe }} {% if deity.spheres %} — {{ deity.spheres }}{% endif %}
  • {% endfor %}
{% endif %}
{% if player_civ.org_data.guilds %}

Guilds

    {% for guild in player_civ.org_data.guilds %}
  • {{ guild.name }}{% if guild.profession %} — {{ guild.profession }}{% endif %}
  • {% endfor %}
{% endif %} {% if player_civ.org_data.group_counts %}

Groups

    {% for gtype, count in player_civ.org_data.group_counts.items() %}
  • {{ count }} {{ gtype }}{{ 's' if count > 1 else '' }}
  • {% endfor %}
{% endif %}
{% endif %} {% if player_civ.figures %}

Notable Figures

{% for fig in player_civ.figures %}
{{ lore_link("figure", fig.hf_id, fig.name) | safe }}{% if fig.race %} ({{ fig.race }}){% endif %}{% if fig.description %} — {{ fig.description }}{% endif %}
{% endfor %} {% endif %} {% if player_civ.artifacts %}

Artifacts

{% for art in player_civ.artifacts %}
{{ lore_link("artifact", art.artifact_id, art.name) | safe }}{% if art.details %} — {{ art.details }}{% endif %}
{% endfor %} {% endif %}
{% endif %}

World Map

Open full-screen map →
{% if total_counts is defined %}
{% if total_counts.wars %}
{{ total_counts.wars }}Wars
{% endif %} {% if total_counts.battles %}
{{ total_counts.battles }}Battles
{% endif %} {% if total_counts.civilizations %}
{{ total_counts.civilizations }}Civilizations
{% endif %} {% if total_counts.figures %}
{{ total_counts.figures }}Figures
{% endif %} {% if total_counts.artifacts %}
{{ total_counts.artifacts }}Artifacts
{% endif %} {% if total_counts.regions_data %}
{{ total_counts.regions_data }}Regions
{% endif %} {% if total_counts.written_works %}
{{ total_counts.written_works }}Written Works
{% endif %} {% if total_counts.notable_deaths %}
{{ total_counts.notable_deaths }}Notable Deaths
{% endif %}
{% endif %} {% macro pin_btn(entity_type, entity_id, name) %} {% endmacro %} {% macro lore_section(title, items, id, true_total=none, limit=20) %} {% if items %} {% set true_count = true_total if true_total else items | length %}

{{ title }} ({{ true_count }})

{{ caller() }} {% if items | length > limit %}
{% endif %}
{% endif %} {% endmacro %}
{% call lore_section("Wars & Conflicts", wars, "wars", total_counts.wars) %} {% for war in wars %}
{{ pin_btn("war", war.id, war.name) }} {{ lore_link("war", war.id, war.name) | safe }}{% if war.years %} ({{ war.years }}){% endif %} {% if war.details %}
{{ war.details }}{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Notable Battles", battles, "battles", total_counts.battles) %} {% for battle in battles %}
{{ pin_btn("battle", battle.id, battle.name) }} {{ battle.name }}{% if battle.year %} (year {{ battle.year }}){% endif %} {% if battle.details %}
{{ battle.details }}{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Beast Attacks", beast_attacks, "beasts", total_counts.beast_attacks) %} {% for ba in beast_attacks %}
{{ pin_btn("beast_attack", ba.id, ba.name) }} {{ lore_link("beast_attack", ba.id, ba.name) | safe }} {% if ba.year %} — Year {{ ba.year }}{% endif %} {% if ba.site_name %} — at {{ lore_link("site", ba.site_id, ba.site_name) | safe }}{% endif %} {% if ba.defender_name %} — against {{ lore_link("civilization", ba.defender_id, ba.defender_name) | safe }}{% endif %} {% if ba.n_events %} — {{ ba.n_events }} incidents{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Site Conquests", site_conquests, "conquests", total_counts.site_conquests) %} {% for sc in site_conquests %}
{{ pin_btn("site_conquest", sc.id, sc.name) }} {{ lore_link("site_conquest", sc.id, sc.name) | safe }} {% if sc.year %} — Year {{ sc.year }}{% endif %} {% if sc.site_name %} — at {{ lore_link("site", sc.site_id, sc.site_name) | safe }}{% endif %} {% if sc.attacker_name and sc.defender_name %} — {{ lore_link("civilization", sc.attacker_id, sc.attacker_name) | safe }} conquered from {{ lore_link("civilization", sc.defender_id, sc.defender_name) | safe }}{% elif sc.attacker_name %} — by {{ lore_link("civilization", sc.attacker_id, sc.attacker_name) | safe }}{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Persecutions", persecutions, "persecutions", total_counts.persecutions) %} {% for persc in persecutions %}
{{ pin_btn("persecution", persc.id, persc.name) }} {{ lore_link("persecution", persc.id, persc.name) | safe }} {% if persc.year %} — Year {{ persc.year }}{% endif %} {% if persc.target_name %} — targeting {{ lore_link("civilization", persc.target_id, persc.target_name) | safe }}{% endif %} {% if persc.site_name %} — at {{ lore_link("site", persc.site_id, persc.site_name) | safe }}{% endif %} {% if persc.n_events %} — {{ persc.n_events }} incidents{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Duels", duels, "duels", total_counts.duels) %} {% for duel in duels %}
{{ pin_btn("duel", duel.id, duel.name ~ " — " ~ (duel.atk_name or "?") ~ " vs " ~ (duel.def_name or "?") ~ ((" Y" ~ duel.year) if duel.year else "")) }} {{ lore_link("duel", duel.id, duel.name) | safe }} {% if duel.year %} — Year {{ duel.year }}{% endif %} {% if duel.atk_name and duel.def_name %} — {{ lore_link("figure", duel.atk_id, duel.atk_name) | safe }} vs {{ lore_link("figure", duel.def_id, duel.def_name) | safe }}{% endif %} {% if duel.site_name %} — at {{ lore_link("site", duel.site_id, duel.site_name) | safe }}{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Abductions", abductions, "abductions", total_counts.abductions) %} {% for abd in abductions %}
{{ pin_btn("abduction", abd.id, abd.name) }} {{ lore_link("abduction", abd.id, abd.name) | safe }} {% if abd.year %} — Year {{ abd.year }}{% endif %} {% if abd.attacker_name %} — by {{ lore_link("civilization", abd.attacker_id, abd.attacker_name) | safe }}{% endif %} {% if abd.defender_name %} — from {{ lore_link("civilization", abd.defender_id, abd.defender_name) | safe }}{% endif %} {% if abd.site_name %} — at {{ lore_link("site", abd.site_id, abd.site_name) | safe }}{% endif %} {% if abd.n_events %} — {{ abd.n_events }} incidents{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Thefts", thefts, "thefts", total_counts.thefts) %} {% for theft in thefts %}
{{ pin_btn("theft", theft.id, theft.name) }} {{ lore_link("theft", theft.id, theft.name) | safe }} {% if theft.year %} — Year {{ theft.year }}{% endif %} {% if theft.attacker_name %} — by {{ lore_link("civilization", theft.attacker_id, theft.attacker_name) | safe }}{% endif %} {% if theft.site_name %} — at {{ lore_link("site", theft.site_id, theft.site_name) | safe }}{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Purges", purges, "purges", total_counts.purges) %} {% for purge in purges %}
{{ pin_btn("purge", purge.id, purge.name) }} {{ lore_link("purge", purge.id, purge.name) | safe }} {% if purge.adjective %} — {{ purge.adjective }} purge{% endif %} {% if purge.year %} — Year {{ purge.year }}{% endif %} {% if purge.site_name %} — at {{ lore_link("site", purge.site_id, purge.site_name) | safe }}{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Coups & Overthrows", overthrown, "overthrown", total_counts.overthrown) %} {% for ov in overthrown %}
{{ pin_btn("overthrow", ov.id, ov.name) }} {{ lore_link("overthrow", ov.id, ov.name) | safe }} {% if ov.year %} — Year {{ ov.year }}{% endif %} {% if ov.site_name %} — at {{ lore_link("site", ov.site_id, ov.site_name) | safe }}{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Notable Deaths", notable_deaths, "deaths", total_counts.notable_deaths) %} {% for death in notable_deaths %}
{{ pin_btn("figure", death.id, death.name) }} {{ lore_link("figure", death.id, death.name) | safe }}{% if death.details %} — {{ death.details }}{% endif %}
{% endfor %} {% endcall %}
{% call lore_section("Civilizations", civilizations, "civs", total_counts.civilizations) %} {% for civ in civilizations %}
{{ pin_btn("civilization", civ.id, civ.name) }}

{{ lore_link("civilization", civ.id, civ.name) | safe }}{% if civ.race %} ({{ civ.race }}){% endif %}

{% if civ.details %}

{{ civ.details }}

{% endif %} {% if civ.org_data and civ.org_data.deities %}

Deities: {% for d in civ.org_data.deities %}{{ lore_link("figure", d.deity_id, d.name) | safe }}{% if d.spheres %} ({{ d.spheres }}){% endif %}{% if not loop.last %}, {% endif %}{% endfor %}

{% endif %} {% if civ.org_data and (civ.org_data.guilds or civ.org_data.group_counts) %}

{% for g in civ.org_data.guilds %}{{ g.name }}{% if g.profession %} ({{ g.profession }}){% endif %}{% if not loop.last %}, {% endif %}{% endfor %} {% if civ.org_data.guilds and civ.org_data.group_counts %}, {% endif %} {% for gtype, count in civ.org_data.group_counts.items() %}{{ count }} {{ gtype }}{{ 's' if count > 1 else '' }}{% if not loop.last %}, {% endif %}{% endfor %}

{% endif %}
{% endfor %} {% endcall %} {% call lore_section("Notable Figures", figures, "figures", total_counts.figures) %}
{% for fig in figures %}
{{ pin_btn("figure", fig.id, fig.name) }} {{ lore_link("figure", fig.id, fig.name) | safe }}{% if fig.race %} ({{ fig.race }}){% endif %}{% if fig.description %} — {{ fig.description }}{% endif %}
{% endfor %}
{% endcall %} {% call lore_section("Notable Relationships", relationships, "rels", total_counts.relationships) %} {% if relationship_counts %}

{% for rtype, count in relationship_counts.items() %}{{ count }} {{ rtype }}{% if not loop.last %} · {% endif %}{% endfor %}

{% endif %} {% for rel in relationships %}
{{ lore_link("figure", rel.source_id, rel.source_name) | safe }} — {{ rel.label }} — {{ lore_link("figure", rel.target_id, rel.target_name) | safe }} {% if rel.year %} (year {{ rel.year }}){% endif %}
{% endfor %} {% endcall %} {% call lore_section("Assumed Identities — SPOILERS", identities, "identities") %}

Warning: This section reveals hidden identities — vampires, werebeasts, spies, and other secrets. Viewing this may spoil in-game discoveries.

{% for ident in identities %}
{{ pin_btn("figure", ident.id, ident.real_name) }} {{ lore_link("figure", ident.id, ident.real_name) | safe }} → posing as "{{ ident.assumed_name }}"
{% endfor %} {% endcall %}
{% call lore_section("Artifacts", artifacts, "artifacts", total_counts.artifacts) %}
{% for art in artifacts %}
{{ pin_btn("artifact", art.id, art.name) }} {{ lore_link("artifact", art.id, art.name) | safe }}{% if art.details %} — {{ art.details }}{% endif %}
{% endfor %}
{% endcall %} {% call lore_section("Written Works", written_works, "works", total_counts.written_works) %} {% for work in written_works %}
{{ pin_btn("written_work", work.id, work.title) }} {% if work.id %}{{ work.title }}{% else %}{{ work.title }}{% endif %}{% if work.details %} — {{ work.details }}{% endif %}
{% endfor %} {% endcall %} {% if poetic_forms or musical_forms or dance_forms %}

Cultural Forms

{% if poetic_forms %}

Poetic Forms ({{ poetic_forms | length }})

{% for form in poetic_forms[:10] %}
{% set name = form.get("name", "") if form is mapping else "" %} {% set fid = form.get("id", "") if form is mapping else "" %} {% set desc = form.get("description", "") if form is mapping else "" %} {% if name %}{{ pin_btn("cultural_form", fid, name) }}{{ name }}{% endif %} {% if desc %}

{{ desc }}

{% endif %}
{% endfor %} {% endif %} {% if musical_forms %}

Musical Forms ({{ musical_forms | length }})

{% for form in musical_forms[:10] %}
{% set name = form.get("name", "") if form is mapping else "" %} {% set fid = form.get("id", "") if form is mapping else "" %} {% set desc = form.get("description", "") if form is mapping else "" %} {% if name %}{{ pin_btn("cultural_form", fid, name) }}{{ name }}{% endif %} {% if desc %}

{{ desc }}

{% endif %}
{% endfor %} {% endif %} {% if dance_forms %}

Dance Forms ({{ dance_forms | length }})

{% for form in dance_forms[:10] %}
{% set name = form.get("name", "") if form is mapping else "" %} {% set fid = form.get("id", "") if form is mapping else "" %} {% set desc = form.get("description", "") if form is mapping else "" %} {% if name %}{{ pin_btn("cultural_form", fid, name) }}{{ name }}{% endif %} {% if desc %}

{{ desc }}

{% endif %}
{% endfor %} {% endif %}
{% endif %}
{% if regions_data %}

Regions ({{ regions_data | length }})

{% for region in regions_data %}
{{ pin_btn("region", region.id, region.name) }} {% if region.link %}{{ region.name }}{% else %}{{ region.name }}{% endif %}{% if region.details %} — {{ region.details }}{% endif %}
{% endfor %}
{% endif %} {% if geography %}

Landmarks ({{ geography | length }})

{% for geo in geography %}
{{ pin_btn("geography", geo.id, geo.name) }} {% if geo.link %}{{ geo.name }}{% else %}{{ geo.name }}{% endif %}{{ geo.details }}
{% endfor %}
{% endif %}
{% endif %} {% endblock %} {% block scripts %} {% endblock %}