Skip to content

Conversation

@amade-w
Copy link
Contributor

@amade-w amade-w commented Dec 1, 2025

This PR adds a new tool that will allow players to add pages to codices, quires, or scrolls with written content that have unspecified page_start and page_end.

The number of pages are determined by the type of written content, its style and the strength of the style, with weighted randomization.

It does not actually fix the 1 page codex bug per se, but it lets players who are bothered about having bound codices that are only 1 page long to remedy the issue by adding a number of pages each book item might possibly contain if it wasn't bugged.

@ab9rf
Copy link
Member

ab9rf commented Dec 4, 2025

I'd suggest adding something to the documentation that this doesn't actually retrieve the information from the original quire (which was lost when the quire was bound into a codex), but instead synthesizes new, random information, and that this is a mitigation of the bug in https://dwarffortressbugtracker.com/view.php?id=9268

@amade-w
Copy link
Contributor Author

amade-w commented Dec 4, 2025

Actually, it appears that the page information were never in the original quires.

Due to the aforementioned bug report, I had avoided binding any quires into codices in my current world. When I recently looked through every work ever written post-wg, all of them had page_start and page_end of -1, despite never having been turned into codices. It seems that the bug was never caused by bookbinding in the first place.

If I took a wg-created work that had non -1 pages and have scribes copy them into a quire, then bind them into a codex, the resulting codex will show the appropriate number of pages still preserved. I suspect the written content data never changes after it is created and exists independently of any quire, scroll, or codex that points to it.

Although I'm pretty sure of my findings, I'm reluctant to make the claim that bookbinding doesn't cause the issue in the documentation without peer review on said findings. However, I will add the bit about the tool synthesizing new, random information.

@ab9rf ab9rf merged commit 0b54694 into DFHack:master Dec 6, 2025
26 of 28 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.

2 participants