Skip to content

dead-noble: recover from a deceased baron/count/duke - #1653

Merged
ab9rf merged 5 commits into
DFHack:masterfrom
ab9rf:dead-noble
Dec 2, 2026
Merged

ab9rf merged 5 commits into
DFHack:masterfrom
ab9rf:dead-noble

Conversation

@ab9rf

@ab9rf ab9rf commented Nov 12, 2026

Copy link
Copy Markdown
Member

This script provides tools for recovering from a deceased baron/count/duke.

When the landholder dies, the game selects a successor, but this successor is almost always at another site. The game is supposed to push the successor into an army that will path to the site and join it as the new landholder, but the vanilla code to do this includes a test that prevents it from working for landholders (it works for any other civ-level noble position where this happens, just not for landholders. go figure.) so clearly this is what is supposed to happen, it just doesn't because Toady's code is broken.

This script finds the already-appointed successor, creates an army, shoves the successor into it, and emulates a unitless "makeown" so that when the successor arrives they'll (re)join the site as the new landholder automatically.

Tested on a fort with a dead baron obtained from BlindIRL.

This script provides tools for recovering from a deceased baron/count/duke.

When the landholder dies, the game selects a successor, but this successor is almost always at another site. The game is supposed to push the successor into an army that will path to the site and join it as the new landholder, but the vanilla code to do this includes a test that prevents it from working for landholders (it works for any _other_ civ-level noble position where this happens, just not for landholders. go figure.) so clearly this is what is _supposed_ to happen, it just doesn't because Toady's code is broken.

This script finds the already-appointed successor, creates an army, shoves the successor into it, and emulates a unitless "makeown" so that when the successor arrives they'll (re)join the site as the new landholder automatically.

Tested on a fort with a dead baron obtained from BlindIRL.
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved

@SilasD SilasD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicky stuff, not the important stuff Quietust flagged.

I'll try to give it more attention later.

Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
@ab9rf

ab9rf commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

Verified that the updated version still works in the test fort I'm using, at least for dead-noble fetch

@Bumber64 Bumber64 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just skimmed, but noticed a few things.

Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread docs/dead-noble.rst Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
Comment thread dead-noble.lua Resolved
@ab9rf

ab9rf commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Again verified that, after these changes, dead-noble fetch correctly fetches the site's missing baron and instates them when they arrive.

@ab9rf
ab9rf merged commit da424a9 into DFHack:master Dec 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants