View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0013512 | Dwarf Fortress | Legends Mode -- General | public | 2026-05-27 12:13 | 2026-05-27 22:52 |
| Reporter | donottellmetonottellyou | Assigned To | |||
| Priority | high | Severity | major | Reproducibility | have not tried |
| Status | new | Resolution | open | ||
| Product Version | 53.14 | ||||
| Summary | 0013512: Legends Mode XML export is malformed with some of the newer events added, prevents use of export | ||||
| Description | Example bad xml in xxx-legends.xml (notice the missing > after </topic): ``` <historical_event> <id>102115</id> <year>119</year> <seconds72>126883</seconds72> <type>peace rejected</type> <site_id>-1</site_id> <failed/> <result_magnitude>-1</result_magnitude> <topic>peace treaty</topic <topic>unconditional surrender</topic <topic>alliance</topic <topic>make contact</topic <topic>improve trade</topic <initiator_hfid>3357</initiator_hfid> <initiator_entity_id>289</initiator_entity_id> <target_hfid>11364</target_hfid> <target_entity_id>295</target_entity_id> <target_ep_id>-1</target_ep_id> <target_ep_entity_id>654</target_ep_entity_id> </historical_event> ``` This completely breaks the export for anyone who triggers the bug, forcing users to manually edit the xml to fix it. | ||||
| Steps To Reproduce | - Create world - Create a fortress - Engage in activities that trigger recording of the new event topics such as the following: - peace treaty - unconditional surrender - alliance - make contact - improve trade such as a historical event of the type "peace rejected" | ||||
| Additional Information | In addition, my editor complains about invalid XML unicode character 0x11, but this might be a separate issue This was discovered because it breaks Legendsviewer-Next https://github.com/Kromtec/LegendsViewer-Next/issues/65 This needs to be reproduced | ||||
| Tags | diplomacy, diplomat, event, leg, legends mode | ||||
|
|
To be clear, the last step would be to export the legends and find the bad code by searching for it in the xml |
|
|
There are actually 2 different bugs here, both in the same function (history_support_eventst::xml_dump):1. The code for exporting negotiation result topic data is missing the ">" characters at the end of the tags 2. The switch (negotiation_result->topic) block is missing break; statements between each case, so "peace treaty" prints all 5, "unconditional surrender" prints 4, etc., and only "improve trade" prints by itself. |
|
|
The error about "invalid XML unicode character 0x11" might be a problem with your XML editor not obeying (or understanding) the "charset='CP437'" at the very top of the document. |
|
|
My editor just doesn't support that old encoding. I made an issue here but I guess we'll have to see if they fix it: https://github.com/helix-editor/helix/issues/15804 Yeah I thought that was weird with the topics, but as you said it was a different issue so I didn't pay attention to it. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-05-27 12:13 | donottellmetonottellyou | New Issue | |
| 2026-05-27 12:13 | donottellmetonottellyou | Tag Attached: diplomacy | |
| 2026-05-27 12:13 | donottellmetonottellyou | Tag Attached: diplomat | |
| 2026-05-27 12:13 | donottellmetonottellyou | Tag Attached: event | |
| 2026-05-27 12:13 | donottellmetonottellyou | Tag Attached: leg | |
| 2026-05-27 12:13 | donottellmetonottellyou | Tag Attached: legends mode | |
| 2026-05-27 12:27 | donottellmetonottellyou | Note Added: 0043233 | |
| 2026-05-27 18:19 | Quietust | Note Added: 0043234 | |
| 2026-05-27 18:20 | Quietust | Note Edited: 0043234 | |
| 2026-05-27 18:27 | Quietust | Note Added: 0043235 | |
| 2026-05-27 22:52 | donottellmetonottellyou | Note Added: 0043236 |