Dungeons and Dragons
h
ChrisWill (16)

Just a character creator, feel free to share your suggestions for simplifying my code.

You are viewing a single comment. View All
ChrisWill (16)

@Highwayman I made it for 5th edition, however, I have not done spells or all of the equipment, proficiency, and a few other things.

Highwayman (637)

@ChrisWill may I make a few suggestions

Highwayman (637)

@ChrisWill so sorry, I didn’t notice you had responded! Very sorry. Anyways. Lists are dynamic, right? So instead of making each individual prof stat and then asking for each one, make an empty list and each time you ask for another prof, add that new entry to the list with the proper modifier.

Highwayman (637)

@ChrisWill also, instead of using the actual class names to pick their class, I suggest using numbers that you put next to the names so you can use a nice switch statement to reduce size a little.
Edit: sorry I guess I didn’t look far enough, instead maybe put the names in an array and then rand choice from there.

Also for loops. Consider them. Remember DRY

ChrisWill (16)

@Highwayman Thanks for the suggestions, I will look at that. I did notice it was quite annoying to have to write out every response as the player.