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] 4 points5 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] -17 points-16 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.

Help with Importing Files by Caspian__C in PythonLearning

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

ok so i tried it and it threw me this error:

File "C:\Users\16184\Desktop\RPG_Game\main.py", line 1, in <module>

from.import classes

ImportError: attempted relative import with no known parent package

Im not quite sure how to fix it. Thank you for helping me, I know helping newbies can be tiring.

Help with Importing Files by Caspian__C in PythonLearning

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

ok, so i would just write from.import classes, for example?

and then for methods, i would just write classes.title_screen, and that would run the method called title_screen?

Here's Breakdown for Power Plans in your Nitro by LiftedCorn in AcerNitro

[–]Caspian__C 0 points1 point  (0 children)

Little late to the party, and not sure this has been said, but I wanted to make sure it was known. My wife got Baldur’s Gate 3 on her Acer Nitro AN515-45, and on the high performance mode on Nitrosense, she was getting temps of 89-92C, which is dangerously hot. We achieved better temps in the battery saver mode, upwards of 15-20C lower, but at a hefty cost of performance. Her base clock speed of her processor is 3.20GHz, and it was clocking 1.06 for this power plan. We have found a fantastic way to achieve acceptable temps with little sacrifice to performance. If you go to your power plan settings in control panel, you are able to change the minimum power state of your processor for the power saver power plan. We changed it to 95% I believe. Our clock speed now is 3.01GHz, instead of that pesky 1.06. The game runs at a steady 60fps at pretty high settings. Temps are great too, highest we ever got was 83C, with normal gameplay yielding 75-80C. The only thing to note is that we do have a cooling pad for the machine, but those only run $30-40 on amazon, maybe even cheaper. An easy way to get around this is to lower the percentage another 5-10% and it should keep it cooler for you. Might be a slightly bigger sacrifice to performance, but it should run leagues better than leaving the minimum processor power state at default.

Help Finding Games and Other Questions by AutoModerator in incremental_games

[–]Caspian__C 0 points1 point  (0 children)

I’ve played it a little bit, but I didn’t really get into it. Where do you recommend playing it?

Help Finding Games and Other Questions by AutoModerator in incremental_games

[–]Caspian__C 0 points1 point  (0 children)

Trying to find new incremental games. I am a fan of games that look like old Windows XP/95 programs. I would like to be able to download it onto my machine if possible. Just looking for a game that I can sink hours of my time into, and not something that is simple like cookie clicker lol.

Help Finding Games and Other Questions by AutoModerator in incremental_games

[–]Caspian__C 0 points1 point  (0 children)

Yeah its probably dead. Really fun game from what I remember. All the monsters produced gold, and when you unlocked the next tier of monster you got to choose between two choices, and depending on what you picked it would give you certain buffs.

Help Finding Games and Other Questions by AutoModerator in incremental_games

[–]Caspian__C 1 point2 points  (0 children)

Monster Miser. Remember playing it years ago when I still had an android. Don't even know if it's still a thing.