#π Help Organizing First Solo Project
52 messages Β· Page 1 of 1 (latest)
@spark finch
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.
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.
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
good question. Would a CLI for building a character and GUI for playing the character make sense? Or would it make sense to use one interface for both things?
I think I need help organizing the frameworks/formats?
seeing how the data is laid out in the character sheets it might make sense to try and mimic that with a gui
you can try PySimpleGUI for that
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?
you can probably store everything in one big dictionary with nesting, and dump it to json
I haven't done anything with GUIs before, so that will make a good project
dump to json? Why would you do that?
are there dependencies between the individual data fields in the sheet? or are they all just individual bits until you start playing
to save the data outside your program and be able to load it later
the combat values on the upper left of the second page are combinations of your attributes
health is determined by level + might, etc.
cool makes sense
so you would 'save' your character sheet by writing it to a .json file?
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
yes
it wont be particularly pretty for a human to read but thats what the GUI is for
awesome
so the data is being stored in a .json, and displayed via a GUI. How should I go about collecting it?
let the user enter it into editable fields in the GUI
oh cool!
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
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?
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
oh... good to know now before I sink a ton of time into that tool XD
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
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
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
This is a tutorial I've used with PySide in the past: https://www.pythonguis.com/pyside6/
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.
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
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π€
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.