Spaces:
Runtime error
Runtime error
import streamlit as st | |
from PIL import Image | |
# Define the character sheet image | |
image = Image.open("mage_character_sheet.png") | |
# Set the page title | |
st.set_page_config( | |
page_title="Mage: The Ascension Character Sheet", | |
layout="wide", | |
initial_sidebar_state="expanded" | |
) | |
# Create the title | |
st.title("Mage: The Ascension Character Sheet") | |
# Display the image | |
st.image(image) | |
# Create input fields for character information | |
with st.form("character_info"): | |
st.subheader("Character Information") | |
name = st.text_input("Name:") | |
player = st.text_input("Player:") | |
chronicle = st.text_input("Chronicle:") | |
nature = st.text_input("Nature:") | |
demeanor = st.text_input("Demeanor:") | |
essence = st.text_input("Essence:") | |
affiliation = st.text_input("Affiliation:") | |
sect = st.text_input("Sect:") | |
concept = st.text_input("Concept:") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for attributes | |
with st.form("attributes"): | |
st.subheader("Attributes") | |
st.columns(3) | |
with st.column(1): | |
st.subheader("Physical") | |
strength = st.slider("Strength", 0, 5, 0, key="strength") | |
dexterity = st.slider("Dexterity", 0, 5, 0, key="dexterity") | |
stamina = st.slider("Stamina", 0, 5, 0, key="stamina") | |
with st.column(1): | |
st.subheader("Social") | |
charisma = st.slider("Charisma", 0, 5, 0, key="charisma") | |
manipulation = st.slider("Manipulation", 0, 5, 0, key="manipulation") | |
appearance = st.slider("Appearance", 0, 5, 0, key="appearance") | |
with st.column(1): | |
st.subheader("Mental") | |
perception = st.slider("Perception", 0, 5, 0, key="perception") | |
intelligence = st.slider("Intelligence", 0, 5, 0, key="intelligence") | |
wits = st.slider("Wits", 0, 5, 0, key="wits") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for abilities | |
with st.form("abilities"): | |
st.subheader("Abilities") | |
st.columns(3) | |
with st.column(1): | |
st.subheader("Talents") | |
alertness = st.slider("Alertness", 0, 5, 0, key="alertness") | |
art = st.slider("Art", 0, 5, 0, key="art") | |
athletics = st.slider("Athletics", 0, 5, 0, key="athletics") | |
awareness = st.slider("Awareness", 0, 5, 0, key="awareness") | |
brawl = st.slider("Brawl", 0, 5, 0, key="brawl") | |
empathy = st.slider("Empathy", 0, 5, 0, key="empathy") | |
expression = st.slider("Expression", 0, 5, 0, key="expression") | |
intimidation = st.slider("Intimidation", 0, 5, 0, key="intimidation") | |
leadership = st.slider("Leadership", 0, 5, 0, key="leadership") | |
streetwise = st.slider("Streetwise", 0, 5, 0, key="streetwise") | |
subterfuge = st.slider("Subterfuge", 0, 5, 0, key="subterfuge") | |
with st.column(1): | |
st.subheader("Skills") | |
crafts = st.slider("Crafts", 0, 5, 0, key="crafts") | |
drive = st.slider("Drive", 0, 5, 0, key="drive") | |
etiquette = st.slider("Etiquette", 0, 5, 0, key="etiquette") | |
firearms = st.slider("Firearms", 0, 5, 0, key="firearms") | |
martial_arts = st.slider("Martial Arts", 0, 5, 0, key="martial_arts") | |
meditation = st.slider("Meditation", 0, 5, 0, key="meditation") | |
melee = st.slider("Melee", 0, 5, 0, key="melee") | |
research = st.slider("Research", 0, 5, 0, key="research") | |
stealth = st.slider("Stealth", 0, 5, 0, key="stealth") | |
survival = st.slider("Survival", 0, 5, 0, key="survival") | |
technology = st.slider("Technology", 0, 5, 0, key="technology") | |
with st.column(1): | |
st.subheader("Knowledges") | |
academics = st.slider("Academics", 0, 5, 0, key="academics") | |
computer = st.slider("Computer", 0, 5, 0, key="computer") | |
cosmology = st.slider("Cosmology", 0, 5, 0, key="cosmology") | |
enigmas = st.slider("Enigmas", 0, 5, 0, key="enigmas") | |
esoterica = st.slider("Esoterica", 0, 5, 0, key="esoterica") | |
investigation = st.slider("Investigation", 0, 5, 0, key="investigation") | |
law = st.slider("Law", 0, 5, 0, key="law") | |
medicine = st.slider("Medicine", 0, 5, 0, key="medicine") | |
occult = st.slider("Occult", 0, 5, 0, key="occult") | |
politics = st.slider("Politics", 0, 5, 0, key="politics") | |
science = st.slider("Science", 0, 5, 0, key="science") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for spheres | |
with st.form("spheres"): | |
st.subheader("Spheres") | |
st.columns(2) | |
with st.column(1): | |
correspondence = st.slider("Correspondence", 0, 5, 0, key="correspondence") | |
entropy = st.slider("Entropy", 0, 5, 0, key="entropy") | |
forces = st.slider("Forces", 0, 5, 0, key="forces") | |
with st.column(1): | |
life = st.slider("Life", 0, 5, 0, key="life") | |
matter = st.slider("Matter", 0, 5, 0, key="matter") | |
mind = st.slider("Mind", 0, 5, 0, key="mind") | |
prime = st.slider("Prime", 0, 5, 0, key="prime") | |
spirit = st.slider("Spirit", 0, 5, 0, key="spirit") | |
time = st.slider("Time", 0, 5, 0, key="time") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for advantages | |
with st.form("advantages"): | |
st.subheader("Advantages") | |
st.columns(2) | |
with st.column(1): | |
st.subheader("Arete") | |
arete = st.slider("Arete", 0, 5, 0, key="arete") | |
with st.column(1): | |
st.subheader("Health") | |
bruised = st.slider("Bruised", 0, 5, 0, key="bruised") | |
hurt = st.slider("Hurt", 0, 5, 0, key="hurt") | |
injured = st.slider("Injured", 0, 5, 0, key="injured") | |
wounded = st.slider("Wounded", 0, 5, 0, key="wounded") | |
mauled = st.slider("Mauled", 0, 5, 0, key="mauled") | |
crippled = st.slider("Crippled", 0, 5, 0, key="crippled") | |
incapacitated = st.slider("Incapacitated", 0, 5, 0, key="incapacitated") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for willpower | |
with st.form("willpower"): | |
st.subheader("Willpower") | |
willpower = st.slider("Willpower", 0, 5, 0, key="willpower") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for backgrounds | |
with st.form("backgrounds"): | |
st.subheader("Backgrounds") | |
backgrounds = st.text_area("Backgrounds", height=100) | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for other traits | |
with st.form("other_traits"): | |
st.subheader("Other Traits") | |
other_traits = st.text_area("Other Traits", height=100) | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for experience | |
with st.form("experience"): | |
st.subheader("Experience") | |
experience = st.text_area("Experience", height=100) | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for quintessence | |
with st.form("quintessence"): | |
st.subheader("Quintessence") | |
quintessence = st.slider("Quintessence", 0, 5, 0, key="quintessence") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") | |
# Create input fields for paradox | |
with st.form("paradox"): | |
st.subheader("Paradox") | |
paradox = st.slider("Paradox", 0, 5, 0, key="paradox") | |
# Create a submit button | |
submit = st.form_submit_button("Submit") |