Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0005854Dwarf FortressDwarf Mode -- Diplomacypublic2012-04-30 19:132015-12-02 13:42
Quietust 
Toady One 
normalminorhave not tried
resolvedfixed 
0.34.07 
0.40.05 
0005854: Diplomats don't bring bodyguards
Back in the old 2D versions of Dwarf Fortress, Human diplomats were escorted by a pair of swordsmen, and this behavior was linked to their [PLAINS_SETTLEMENTS] raw token. In version 0.27.173.38a, this behavior was split off to the [DIPLOMAT_BODYGUARDS] token, but at least since 0.28.181.40d it hasn't actually done anything - Human diplomats always arrived alone and unprotected.

In an effort to track down this problem, I located the code for diplomat arrival in 0.34.07 and the check against [DIPLOMAT_BODYGUARDS], and I've determined why it's not working: the game builds a list of valid military professions and then checks whether or not that list is empty before proceeding to create the bodyguards, but the condition is backwards, so it only proceeds if the list is empty (rather than non-empty).

The following binary patch fixes this bug in Win32 v0.34.07 SDL:
00476328 : 85 -> 84
binary patch
related to 0005098resolved Toady One "Friendly" migrants with Trader profession act like on-the-job merchants 
Issue History
2012-04-30 19:13QuietustNew Issue
2012-04-30 19:13QuietustTag Attached: binary patch
2012-04-30 20:49QuietustNote Added: 0022408
2012-05-01 09:06daenythIssue Monitored: daenyth
2012-05-22 12:47eatatreeIssue Monitored: eatatree
2012-05-22 15:03FootkerchiefRelationship addedrelated to 0005098
2012-05-22 21:14QuietustNote Edited: 0022408bug_revision_view_page.php?bugnote_id=0022408#r8443
2012-06-07 06:15QuietustNote Added: 0022890
2012-06-12 13:34QuietustNote Edited: 0022408bug_revision_view_page.php?bugnote_id=0022408#r8562
2014-01-15 14:41Kirig Stonebeard IIIssue Monitored: Kirig Stonebeard II
2014-01-17 10:09Kirig StonebeardIssue Monitored: Kirig Stonebeard
2014-03-25 13:13DwarfuAssigned To => Dwarfu
2014-03-25 13:13DwarfuStatusnew => acknowledged
2014-07-23 10:21Toady OneStatusacknowledged => resolved
2014-07-23 10:21Toady OneFixed in Version => Next Version
2014-07-23 10:21Toady OneResolutionopen => fixed
2014-07-23 10:21Toady OneAssigned ToDwarfu => Toady One
2015-12-02 13:42eatatreeIssue End Monitor: eatatree

Notes
(0022408)
Quietust   
2012-04-30 20:49   
(edited on: 2012-06-12 13:34)
Interestingly, when the diplomat bodyguards do arrive, they show up as "Merchant" in the Units screen if a caravan is present and "Friendly" if no caravan is present, exactly the same as with caravan guards.

(0022890)
Quietust   
2012-06-07 06:15   
Updated patch for Win32 v0.34.11 SDL:
0493E28 : 85 -> 84