mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-07 13:15:53 +02:00
Added some personality characteristics
This commit is contained in:
@@ -52,6 +52,11 @@ class Character():
|
||||
sleight_of_hand = Skill(ability='dexterity')
|
||||
stealth = Skill(ability='dexterity')
|
||||
survival = Skill(ability='wisdom')
|
||||
# Characteristics
|
||||
personality_traits = ""
|
||||
ideals = ""
|
||||
bonds = ""
|
||||
flaws = ""
|
||||
# Inventory
|
||||
cp = 0
|
||||
sp = 0
|
||||
|
||||
@@ -13,6 +13,14 @@ from dungeonsheets.stats import mod_str
|
||||
"""Program to take character definitions and build a PDF of the
|
||||
character sheet."""
|
||||
|
||||
def text_box(string):
|
||||
"""Format a string for displaying in a text box."""
|
||||
# Remove line breaks
|
||||
new_string = string.replace('\n', ' ').replace('\r', ' ')
|
||||
# Remove multiple whitespace
|
||||
new_string = ' '.join(new_string.split())
|
||||
return new_string
|
||||
|
||||
def load_character_file(filename):
|
||||
"""Create a character object from the given definition file.
|
||||
|
||||
@@ -101,6 +109,11 @@ def create_fdf(character, fdfname):
|
||||
# Hit points
|
||||
('HDTotal', character.hit_dice),
|
||||
('HPMax', character.hp_max),
|
||||
# Personality traits
|
||||
('PersonalityTraits ', text_box(character.personality_traits)),
|
||||
('Ideals', text_box(character.ideals)),
|
||||
('Bonds', text_box(character.bonds)),
|
||||
('Flaws', text_box(character.flaws)),
|
||||
# Inventory
|
||||
('CP', character.cp),
|
||||
('SP', character.sp),
|
||||
|
||||
Binary file not shown.
@@ -31,3 +31,17 @@ sp = 75
|
||||
ep = 50
|
||||
gp = 120
|
||||
pp = 0
|
||||
|
||||
# Backstory
|
||||
personality_traits = """I never have a plan, but I’m great at making things up as I go
|
||||
along. Also, the best way to get me to do something is to tell me I
|
||||
can’t do it."""
|
||||
|
||||
ideals = """People. I’m loyal to my friends, not to any ideals. Everyone else can
|
||||
take a trip on the River Styx for all I care."""
|
||||
|
||||
bonds = """Qelline Alderlead, my aunt, has a farm in Phandalin. I always give
|
||||
her some of my ill-gotten gains."""
|
||||
|
||||
flaws = """My aunt must never know the deeds I did as a member of the
|
||||
Redbrands."""
|
||||
|
||||
Reference in New Issue
Block a user