#πŸ”’ Help Organizing First Solo Project

52 messages Β· Page 1 of 1 (latest)

spark finch
#

I am looking for help designing the structure of my project.

night orbitBOT
#

@spark finch

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

spark finch
#

Background - I have a little over a year of python experience, but most of it is either data analytics specific or figuring out fixes to specific problems. I've done a fair amout of work via DataCamp but nothing
involving larger projects. I'm looking to do a series of solo projects that I can use to get a better understanding of best practices as well as start building a portfolio of projects.

The first project I would like to pursue is to build a character sheet for a simple ttrpg. I have a picture of what the official character sheet looks like, and want to recreate it in python. I'm a little unsure about
how to start, and would greatly appreciate some help organizing what needs done, as well as how to store my functions/data.

First, I would like a series of inputs (base stat allocation, class, key attribute, etc.) which then saves the finished character into a seperate file.

Then, I want to be able to read one of these character files and simulate playing the game with it (attack roles, applying status conditions to myself, etc.)

There are several things I'd like to do afterwards, but I'm trying to start with a smaller, manageable project and go from there.

#

I added .pngs of the character sheet to help illustrate what all I'm looking for.

Please let me know if my question/cry for help isn't clear enough and I'll try and rephrase as needed.

lean chasm
#

do you want recommendations for specific file formats, frameworks, etc to help you achieve this?

#

first i would decide if you want to build a GUI app or a CLI app

spark finch
spark finch
lean chasm
#

you can try PySimpleGUI for that

spark finch
#

This is how I think I should go about doing this. Please poke holes/explain where I could do it better.

A lot of the boxes in teh sheet can be turned into their own dictionary. Attributes&Skills, for example, could be its own dict. Health & healing would then call on the A&S dict?

lean chasm
#

you can probably store everything in one big dictionary with nesting, and dump it to json

spark finch
spark finch
lean chasm
#

are there dependencies between the individual data fields in the sheet? or are they all just individual bits until you start playing

lean chasm
spark finch
#

the combat values on the upper left of the second page are combinations of your attributes

#

health is determined by level + might, etc.

spark finch
#

so you would 'save' your character sheet by writing it to a .json file?

lean chasm
#

this wouldnt be too hard to implement with PySimpleGUI i think. you would just have to handle events such as "health input updated" and then modify dependent fields accordindly

lean chasm
#

it wont be particularly pretty for a human to read but thats what the GUI is for

spark finch
#

awesome

#

so the data is being stored in a .json, and displayed via a GUI. How should I go about collecting it?

lean chasm
#

let the user enter it into editable fields in the GUI

spark finch
#

oh cool!

lean chasm
#

so the functions of collecting data, displaying data, and modifying data are fulfilled by one screen

#

then you could have a separate window for the play simulation

spark finch
#

w i l d

#

do you have any recomendations to learn more about pysimple GUI?

#

or should I just find any ol' yt tutorial series and go from there?

lean chasm
#

yknow what

#

i just looked at their page and looks like the project has been shut down sadly

#

(its been a few years since ive used it)

#

so lets see if theres a similar maintained one

spark finch
#

oh... good to know now before I sink a ton of time into that tool XD

lean chasm
#

you can try tkinter as its shipped with python but i've found it quite tedious to deal with

#

the next best option i see is PySide or PyQt if youd rather learn something not built-in

spark finch
#

thanks for your help! I'd rather use something not built in if its more programmer friendly so I'll probably go with either pyside or pyqt

lean chasm
#

good luck! unfortunately i cant tell you more about PySide or PyQt since i havent used them myself, but it might be a good idea to see which has more resources available for beginners

swift trout
#

I might choose to write this as a web app, which is another option. For that I'd use Django (there are others): https://www.djangoproject.com/

#

These are both opinions, and others will have differing opinions. That is fine. Trying to give a starting point.

lean chasm
#

personally django is too big a tool for a job like this, so if you are interested in the web option i would look at flask for fastapi+jinja2

spark finch
#

honestly I feel so much more confindent that this is a project in my skillset!

#

I'll probably start with the GUI, as getting my data readable and stored is the just the first step

#

I might try the web option later, as reusing a project to learn a different tool is just🀌

night orbitBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.