Hi, I am learning python, but am familiar with Java. I am wanting to make a simple text-based RPG game, and I wanted to get thoughts on a good way to store a bunch of enemy information, such as health, attack, defense, etc. I want to be able to refer to this information by a simple ID number, so that when it comes to making combat, I can create a random encounter by randomizing the IDs of all created enemies and pick one at random, and then pulling all of the information for that monster related to that ID and storing it in an instance. I am not sure the best way to do this. So far, I created a class, and stored all the information that I wish to in instances of this class, i.e there is an instance to store the slime information, an instance for goblin, etc. How would you all approach this? Thanks a million.
submitted by /u/Caspian__C
[link] [comments]
r/learnpython Hi, I am learning python, but am familiar with Java. I am wanting to make a simple text-based RPG game, and I wanted to get thoughts on a good way to store a bunch of enemy information, such as health, attack, defense, etc. I want to be able to refer to this information by a simple ID number, so that when it comes to making combat, I can create a random encounter by randomizing the IDs of all created enemies and pick one at random, and then pulling all of the information for that monster related to that ID and storing it in an instance. I am not sure the best way to do this. So far, I created a class, and stored all the information that I wish to in instances of this class, i.e there is an instance to store the slime information, an instance for goblin, etc. How would you all approach this? Thanks a million. submitted by /u/Caspian__C [link] [comments]
Hi, I am learning python, but am familiar with Java. I am wanting to make a simple text-based RPG game, and I wanted to get thoughts on a good way to store a bunch of enemy information, such as health, attack, defense, etc. I want to be able to refer to this information by a simple ID number, so that when it comes to making combat, I can create a random encounter by randomizing the IDs of all created enemies and pick one at random, and then pulling all of the information for that monster related to that ID and storing it in an instance. I am not sure the best way to do this. So far, I created a class, and stored all the information that I wish to in instances of this class, i.e there is an instance to store the slime information, an instance for goblin, etc. How would you all approach this? Thanks a million.
submitted by /u/Caspian__C
[link] [comments]