canismarko / dungeon-sheets

A tool to create character sheets and GM session notes for Dungeons and Dragons fifth edition (D&D 5e).
https://dungeon-sheets.readthedocs.io/en/latest/
GNU General Public License v3.0
161 stars 66 forks source link

MSavage latex template #160

Closed PJBrs closed 6 months ago

PJBrs commented 7 months ago

This PR contains patches that:

I've compiled all examples with these patches.

These patches only touch code used for the MSavage latex template.

PJBrs commented 7 months ago

... made one very small last change:

diff --git a/dungeonsheets/character.py b/dungeonsheets/character.py
index c448e2f..7965636 100644
--- a/dungeonsheets/character.py
+++ b/dungeonsheets/character.py
@@ -771,7 +771,7 @@ class Character(Creature):
         if hasattr(self, "features_and_traits"):
             info_list = []
             N = 30
-            if not self.features_and_traits == "":
+            if re.search(r'\S',  self.features_and_traits):
                 info_list = ["**Other Features**"]
                 info_list += [
                     text.strip()

Does not change output.

PJBrs commented 7 months ago

... I added four more patches to:

  1. Implement the halfcaster sheet that was recently added in Mat Savage's latex template.
  2. Add pdfbookmarks to character sheet, the spellcasting sheet and the backstory sheet.
  3. Use the string "proficiencies_text" in a character module for "Other proficiencies" in the MSavage latex template; it now uses the variable "chosen_tools", but this is not documented, and "proficiencies_text" basically does the same thing
  4. Remove "Unarmed" from the list of weapon proficiencies, just like it is in the fillable pdf form.
PJBrs commented 6 months ago

Removed one patch that wasn't good enough yet :-(