Basic Fantasy RPG Core Rules 4th Edition

Creating game materials? Monsters, spells, classes, adventures? This is the place!
User avatar
Solomoriah
Site Admin
Posts: 12539
Joined: Thu Nov 13, 2008 8:15 pm
Location: LaBelle, Missouri
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by Solomoriah »

Yeah, that is weird. It drops me in the right place.
My personal site: www.gonnerman.org
User avatar
lars_alexander
Posts: 299
Joined: Thu Feb 21, 2013 3:10 pm
Location: Germany
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by lars_alexander »

Regarding the document outline of the PDF files: the styles of the headings have to be properly defined as to which outline level each heading has. With r125 LibreOffice Navigator (F5) does not show any headings, because none of the heading styles has its outline level defined. The current styles, their definitions, and their inheritance seem to be a little mismatched (main heading is inheriting from subheading, and not vice versa...), too.

Here's a screenshot of a test I did with r125 and the main heading style set to outline level 1:
Screenshot_2023-03-30_09-34-43.png
Screenshot_2023-03-30_09-34-43.png (28.75 KiB) Viewed 322 times
Once the styles are defined correctly, the PDF can be generated (export as... with options) with the corresponding document outline.
User avatar
Boggo
Posts: 1426
Joined: Thu Oct 27, 2022 7:17 pm
Location: Down under Down under

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by Boggo »

I just tried this on my Deep Lands document which had the same issue, and it fixed it and when Libre Office creates the PDF it now does it with Bookmarks, thanks! literally took about a minute as you just need to set the level in the paragraph style
No matter where you go...there you are
User avatar
JugglinDan
Posts: 302
Joined: Mon Mar 20, 2023 4:56 am
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by JugglinDan »

If the styles can be updated, then that should work. But if they can't, I already have some Python code that seems to parse the section headings from Core Rules r125. I only print the extracted page numbers so far, but the API to write bookmarks into the file is simple.

PDF files are designed for precise print layouts though, not for text extraction and manipulation - there is no DOM to parse. I had to resort to a pattern matching approach. It works, but needs a new regex pattern if the format of the TOC changes.
I'm also on RPGG
User avatar
lars_alexander
Posts: 299
Joined: Thu Feb 21, 2013 3:10 pm
Location: Germany
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by lars_alexander »

I'd prefer to have the style definitions updated, and then applied for all the Basic Fantasy document templates, as well. This keeps everything in the LibreOffice source files, and should be easier to maintain, and modify. LibreOffice has all the necessary tools for these cases.

That being said, your programming skills are much appreciated. :D
User avatar
JugglinDan
Posts: 302
Joined: Mon Mar 20, 2023 4:56 am
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by JugglinDan »

lars_alexander wrote: Thu Mar 30, 2023 3:55 am I'd prefer to have the style definitions updated, and then applied for all the Basic Fantasy document templates, as well. This keeps everything in the LibreOffice source files, and should be easier to maintain, and modify. LibreOffice has all the necessary tools for these cases.

That being said, your programming skills are much appreciated. :D
Oh, I think that updating the styles is the best approach too. But as I said when I first mentioned this, I have hundreds of PDFs from DTRPG that are not bookmarked, and I can modify the script I'm writing to handle those. I enjoy creating small scripts like this, and this one will serve me well regardless.

Edit: I can confirm that setting the Outline Level on a copy (just in case) of the CC odt that I have for proofing adds lovely bookmarks. I didn't change anything else - I don't want to mess with the styles or inheritance at all!

For this, I set MainHeading to level 1, SubHeading to Level 2, and NPCHeading to level 3.
CC bookmarks.jpg
CC bookmarks.jpg (86.67 KiB) Viewed 307 times
I'm also on RPGG
User avatar
JugglinDan
Posts: 302
Joined: Mon Mar 20, 2023 4:56 am
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by JugglinDan »

I downloaded r125 odt and did some experiments. To get the right bookmark hierarchy, I needed to give the "Part n:" headings a different style to MainHeading. I cloned MainHeading to SectionHeading and give it outline level 1, then MainHeading got level 2, and SubHeading level 3.

That mostly worked, except that the Clerics vs. Undead Table also uses MainHeading, causing the bookmark to sort out of order. This is possibly also an issue to fix. I would have thought that Clerics vs. Undead Table would use SubHeading just like the Attack Bonus Table. This means that the Cleric vs. Undead Table heading is centred, while Attack Bonus Table is not.

Changing the Clerics vs. table to SubHeading in my local copy and then exporting a PDF gives these bookmarks:
Screenshot 2023-03-30 212556.jpg
Screenshot 2023-03-30 212556.jpg (98 KiB) Viewed 300 times
I have no idea why the two tables still sort to the top of the list. Everything else is nested correctly. Possibly something to do with how the tables are inserted in the document.

With the current styles, SpellHeading can't be given an outline level. Well, it can, but the same style is used for the spell range information on the same line as the heading. This works, but the PDF bookmark contains both the spell name and range.

With these changes it's almost there.
I'm also on RPGG
User avatar
JugglinDan
Posts: 302
Joined: Mon Mar 20, 2023 4:56 am
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by JugglinDan »

Lest this issue be lost in my bookmark experiments post, I will restate it here.

The Clerics vs. Undead Table uses MainHeading style, while other similarly titled tables like the Attack Bonus Table use the SubHeading style.
I'm also on RPGG
User avatar
toddlyons
Posts: 890
Joined: Fri Sep 18, 2020 5:25 am
Location: Unceded Algonquin Territory
Contact:

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by toddlyons »

JugglinDan wrote: Thu Mar 30, 2023 4:06 am Edit: I can confirm that setting the Outline Level on a copy (just in case) of the CC odt that I have for proofing adds lovely bookmarks.
Nice! :D
User avatar
Boggo
Posts: 1426
Joined: Thu Oct 27, 2022 7:17 pm
Location: Down under Down under

Re: Basic Fantasy RPG Core Rules 4th Edition

Post by Boggo »

JugglinDan wrote: Thu Mar 30, 2023 5:33 am I downloaded r125 odt and did some experiments. To get the right bookmark hierarchy, I needed to give the "Part n:" headings a different style to MainHeading. I cloned MainHeading to SectionHeading and give it outline level 1, then MainHeading got level 2, and SubHeading level 3.

That mostly worked, except that the Clerics vs. Undead Table also uses MainHeading, causing the bookmark to sort out of order. This is possibly also an issue to fix. I would have thought that Clerics vs. Undead Table would use SubHeading just like the Attack Bonus Table. This means that the Cleric vs. Undead Table heading is centred, while Attack Bonus Table is not.

Changing the Clerics vs. table to SubHeading in my local copy and then exporting a PDF gives these bookmarks:
Screenshot 2023-03-30 212556.jpg
I have no idea why the two tables still sort to the top of the list. Everything else is nested correctly. Possibly something to do with how the tables are inserted in the document.

With the current styles, SpellHeading can't be given an outline level. Well, it can, but the same style is used for the spell range information on the same line as the heading. This works, but the PDF bookmark contains both the spell name and range.

With these changes it's almost there.
The table issue is because their index level is set to 1 in their Index Entry as these are set manually in the document for the TOC rather than in the style, you need to remove the TOC index entry from those 2 headers, and re-add them at level 2 instead of 1
No matter where you go...there you are
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 117 guests