Original Post
Hey, guys. This is my first post so I hope that this goes well, otherwise I will find myself in the corner of my faded-blue room sobbing profusely.
So I'm trying to write, with my limited knowledge of c and c++ (the latter I taught myself the basics in a few weeks over the summer), a somewhat-basic D&D Character sheet program.
The concept is somewhat skewed since my mind can't seem to wrap around what I want to achieve when rolling for ability scores and such. So far, I'm just striving for a simple program that can execute(Of course, without failing), take the input of the character's name, race, and possibly pick some storyline options, and then output them onto a .txt file on their desktop (which I'm trying to find a way to do through precise direction of the fopen deal), and such and such.
Sorry if this seems a bit mushy, I haven't slept much. Ha...
Anyway, what I'm trying to ask is;
How would one randomize four integers, being equal to that of a six sided dice, and then take the four numbers I get and remove the lowest integer, then add them together? I can't seem to wrap my brain around how I could pick out the lowest integer if something happens to come up the same, such as two fours, and two fives, how would i code it to remove just one of the fours, not both of them, so someone doesn't get the ability score of Ten?
If none of what I have just asked makes sense, I'm willing to answer any questions you might have.
And I know of the rule about no homework assignments on here, so to let you guys know this is strictly for pleasure. I'm trying to impress my RP Crew with this simple executable program that everyone can use to make five character sheets in five minutes instead of taking about 4 hours.
If someone can help me piece this together, I should be able to make an efficent program. Hopefully!
So I'm trying to write, with my limited knowledge of c and c++ (the latter I taught myself the basics in a few weeks over the summer), a somewhat-basic D&D Character sheet program.
The concept is somewhat skewed since my mind can't seem to wrap around what I want to achieve when rolling for ability scores and such. So far, I'm just striving for a simple program that can execute(Of course, without failing), take the input of the character's name, race, and possibly pick some storyline options, and then output them onto a .txt file on their desktop (which I'm trying to find a way to do through precise direction of the fopen deal), and such and such.
Sorry if this seems a bit mushy, I haven't slept much. Ha...
Anyway, what I'm trying to ask is;
How would one randomize four integers, being equal to that of a six sided dice, and then take the four numbers I get and remove the lowest integer, then add them together? I can't seem to wrap my brain around how I could pick out the lowest integer if something happens to come up the same, such as two fours, and two fives, how would i code it to remove just one of the fours, not both of them, so someone doesn't get the ability score of Ten?
If none of what I have just asked makes sense, I'm willing to answer any questions you might have.
And I know of the rule about no homework assignments on here, so to let you guys know this is strictly for pleasure. I'm trying to impress my RP Crew with this simple executable program that everyone can use to make five character sheets in five minutes instead of taking about 4 hours.
If someone can help me piece this together, I should be able to make an efficent program. Hopefully!