Inspiration

We are avid D&D players in the same campaign, so it was only right to dedicate our first hackathon project to the game that bonds us.

What it does

Our code randomly decides the race, background, and class of the character being generated, and saves any character quirks into respective variables. It also can roll for the six main stats of D&D, allowing for both full randomization of the character OR user inputs for where the rolls are allocated.

How we built it

We exclusively used Python for our code. We used the built-in random library for helping with our randomization. We also used Visual Studio Code to write all our code and GitHub to share it when there were issues or large updates.

Challenges we ran into

Because the majority of our group is either new to coding or to Python, there were many functions that we had to learn on top of the syntactical difference for us to learn. The most complicated code any of us had written in Python before this project was 15 lines long. 2 out of the 3 of us downloaded Python at the beginning of the hackathon. Our work not only included writing the code but teaching ourselves how to code every step of the way. A big challenge for us was learning how to implement functions into our code. We managed to incorporate a handful with what we learned, and those we used worked as intended. We also attempted to save all of the information on to the PDF version of the blank character sheet too. However, this fell through once we realized we did not have enough information to print on it, as well as the PDF library we used not functioning as we'd hoped.

Accomplishments that we're proud of

Our biggest accomplishment is that we made a final product that runs with almost everything we set out to code. We are in no way experts in Python now, but we knew our limits from the very beginning of the project and effectively worked together to communicate our abilities. As players of D&D, we ourselves would use this code to generate characters for ourselves, which is exactly what we set out to do.

What we learned

Everything we did today was a learning experience, from downloading Python and additional libraries, to managing and pulling from a repository on GitHub, to even managing our time in a hackathon! We learned about the random library in Python and the extent of how strings can be used and called upon.

What's next for DND Character Generator

The content that we accomplished is merely tip of the iceberg of DND rule and class set. We only covered 4-character races, 4 background, and 4 classes. There are over 15 races, backgrounds, and possible classes that we didn't implement. We also could add to the customizability of the character. Random generation was our initial intent for the project, but we think it would be interesting to explore a version with more freedom to decide what the character looks like. Finally, we have our project printing out to the terminal, but we would like to create a better user interface.

Built With

Share this project:

Updates