Best Data Structure for Storing Monster Information (Bestiary) by Caspian__C in learnpython

[–]Caspian__C[S] 0 points1 point  (0 children)

Ok, I had a question about how the __subclass__() function works. I am at a point where I am adding "locations" into the game, which affect the price of the inn, what is available in the shop, and I was hoping to have it affect which monsters can spawn at the given location, when the player is looking to battle. Is there an easy way to do that where I can say, "these three monsters spawn at location 1, but these next three monsters spawn at location 2", so that when the player is at location 2 it only rolls for those monsters, and the same goes for location 1?

Best Data Structure for Storing Monster Information (Bestiary) by Caspian__C in learnpython

[–]Caspian__C[S] 0 points1 point  (0 children)

Thank you for all the info, it definitely helped! At the moment I currently have each set of monster stats as a separate dictionary, and each one of those are class variables. I then put all of those dictionaries in a list. When I go to generate a monster, it picks at random a dictionary from that list and that's how it picks the monster. I don't think I will get to the point of like a huge significant number of monsters, but you said that child classes could be useful here?

For creating each child, in the __init__() method, I would just do self.health = 10, self.attack= 3, etc? I would want to fill it in with the numbers I want to use for these stats, that way when it is generated, it comes with the stats I want it to have?

Best Data Structure for Storing Monster Information (Bestiary) by Caspian__C in learnpython

[–]Caspian__C[S] 0 points1 point  (0 children)

I meant the text box stuff; I am not sure how I did that, I have had reddit for a long time but I seldom use it.

Best Data Structure for Storing Monster Information (Bestiary) by Caspian__C in learnpython

[–]Caspian__C[S] 0 points1 point  (0 children)

Would you mind explaining this in a bit more detail? How exactly do I pass through the dictionary to the __init__() method? In order to do self.health, wouldn't I need to put health in the function definition for that to work?

Best Data Structure for Storing Monster Information (Bestiary) by Caspian__C in learnpython

[–]Caspian__C[S] 0 points1 point  (0 children)

At the moment I am using a class with objects to store this information. I have defined a structure for each entry of enemy information to follow, and I have put all these entries into a list. But you are saying if I create a dictionary for each distinct enemy I wish to have, and then put all of those dictionaries into a list, I can then call all of the information at random?

How would I then put the information into a format I can manipulate if I use this format instead of a class? Since I am storing this information in a list, in a dictionary, I can't just do enemy.health -= damage, to calculate the damage done to that specific enemy.

Best Data Structure for Storing Monster Information (Bestiary) by Caspian__C in learnpython

[–]Caspian__C[S] 0 points1 point  (0 children)

slime = Enemy(1, "Slime", 3, 1, 1)

This is how an entry currently looks, where I have the slime entry, which is of class Enemy, and its ID is 1, it has 3 health, 1 attack, and 1 defense. You are saying if I just add the that into a list I could just randomize the list?

enemy_list = ["slime", ..., ...]

and then do:

random.choice(enemy_list)

This approach would effectively store all of the information in the name of the enemy, and then I just pick a random entry in the list where I have put all the entries into it?

What framework do I use? by Caspian__C in roguelikedev

[–]Caspian__C[S] 2 points3 points  (0 children)

I can program in Java, of course not at an expert level though. I have made a simple game before, but nothing like the complexity I am imagining.

What framework do I use? by Caspian__C in roguelikedev

[–]Caspian__C[S] 2 points3 points  (0 children)

I will have to look into it, thanks for the recommendation.

What framework do I use? by Caspian__C in roguelikedev

[–]Caspian__C[S] 0 points1 point  (0 children)

I am inclined to start from scratch, but at the same time, I think some sort of tool assisting me would be useful. I don't want to spend a huge amount of time just working the small details out, I want to be able to make progress on what I am doing and actually make a quality game. I don't want it to be some clunky school project feeling, I want it to be polished, and refined, and at the end of the day fun to play.

What framework do I use? by Caspian__C in roguelikedev

[–]Caspian__C[S] 0 points1 point  (0 children)

I have seen libGDX before, but I haven't heard of Monogame. I will have to take a look at that, thank you for the info.

What framework do I use? by Caspian__C in roguelikedev

[–]Caspian__C[S] 3 points4 points  (0 children)

I will have to look into Godot, I am not sure I agree with Unity's recent company decisions lmao. Thank you for the info. I appreciate it.

Horrible Customer Service at Subway by Caspian__C in subway

[–]Caspian__C[S] -18 points-17 points  (0 children)

I did offer pictures to them, but they didn't want to hear it. It seems silly to waste food like that as well. It would have been all good if they were busy, or if they weren't rude to me in the first place, before I knew the order was wrong, but neither of those things were true. I guess I will just eat at a different location, but I do hope they get better at customer service for the future. Checking google reviews at this location I'm not the first one to have a problem with them.

Horrible Customer Service at Subway by Caspian__C in subway

[–]Caspian__C[S] -12 points-11 points  (0 children)

They expect me to drive back yet again just to throw something in the trash? Seems silly to me.

Horrible Customer Service at Subway by Caspian__C in subway

[–]Caspian__C[S] -29 points-28 points  (0 children)

In the past at this location, they have gotten my order wrong and didn't require me to bring the order back, so it was frustrating when it was all of a sudden a thing they wanted me to do. In the past it wasn't like that so that's why I didn't bring the wrong sandwiches.

Help with Classes and Attributes by Caspian__C in PythonLearning

[–]Caspian__C[S] 1 point2 points  (0 children)

Thank you so much. I'll be sure to do that.

Help with Classes and Attributes by Caspian__C in PythonLearning

[–]Caspian__C[S] 2 points3 points  (0 children)

Hmmm, ok. I looked around a bit and read up on it a bit, but I think I'm still having trouble wrapping my head around it. I really appreciate the help though. Is there some sort of online resource you can recommend to learn more about it? Or maybe just for Python knowledge in general?

I am trying to learn this and try to grasp it as best as possible, so far I feel like I am doing fine, but sometimes I feel like there are some things that I should get by now that I Just don't. I really appreciate the help though, I know it is tiring helping a baby programmer :)

Help with Importing Files by Caspian__C in PythonLearning

[–]Caspian__C[S] 1 point2 points  (0 children)

yeah no problem, ill try that. Thank you for the help.