PDA

View Full Version : BUG: SWADE books in reverse order on reader. Problem with subchapters?



Lonewolf
November 9th, 2025, 04:31
I only have one example of this error so far where order is totally reversed. S2P10508ADV2
https://www.fantasygrounds.com/library/sw/fantasy-companion-earthshaker/

How it appears in FG. Note order of index. This book has subchapters
65759

On reader chapter 2 comes first and the cover is the last page of the book
65758

The first section of the book is the NPCs section from sub chapter 2

Another example where the book is in the right order but the just the cover is moved to another chapter S2P10508ADV3
https://www.fantasygrounds.com/library/sw/fantasy-companion-the-turning-of-the-leaves/fantasy-companion-turning-of-the-leaves/#preface

65760

Moon Wizard
November 9th, 2025, 04:36
Thanks for reporting. Escalated to Thomas to review.

Regards,
JPG

Molster
November 9th, 2025, 05:12
Thanks for the report on this!

I made a change for some other titles that dont have orders in their xml, and it looks like it also effected these, switching them to alpha when no order property is present, Ill fix that up over the weekend, and see if I can also add support for the indent tag when generating header levels.

Molster
November 9th, 2025, 07:06
Alright, I made some changes and re-uploaded Earthshaker. If thats looking good ill be running a script to find other titles using the same xml style as this and auto re-running and uploading on those.

Update: ran a script and it looks like 8 titles were affected by the ordering issue there. they should now be updated.

One thing I just wanted to share, so the knowledge is out there: because so many titles use subchapters and chapters differently (some titles only ever use a single subchapter and so on) I end up only including the subchapter name as a H2 if any chapter has more than 2 subchapters. Otherwise it includes the refpage name as the H2s. (this is to make sure the ToC can populate with good links, else it would only include 2 things)

I now check for an <indent>, and will start it at an h3 if indent is 1 and so on (so you should see some more nesting there)

But Because it only has two subchapters, Earthsaker and Characters & Creatures do not get included as H2s