I am currently making a rpg and I ran into a problem. I created the player’s level up system with the enemies giving XP when they die. But my problem is once the player has purchased a certain skill the enemies end up becoming a joke. My question is…is there a way to scale the enemies’ level to the player’s level or should I just make a variable and manually set the enemy levels?
Sure, it really depends on what parameters you use to determine the player’s level. For example, are you looking at their Health, Strength, Speed, Endurance etc. and then adding all of these together to represent the player’s skill level?
What I would do is simply create a system to check what the player’s skill level is and then when it gets to a certain threshold, increase the appropriate values in your enemies. IE Damage, speed etc. There’s something to be said for being able to come back and stomp on enemies that previously kicked your butt, but it really depends on how you design your world.
At the moment the the player is able to upgrade skills with skill points. I tried to tie in the enemy scaling through the player’s actual level, skill points, and health but the only thing I managed to do was level the enemies when they die. For example, if I killed an enemy that now dead enemy would level. I wanted the still alive enemies to level. I have a base enemy and I have enemies that are child actors of the base enemy. The scaling function is on the base enemy. I thought that would affect all the enemies on the map. I think I’m going about this wrong.
If your enemy stats are all variables those could be called during run time and updated as the player is updated. If your enemy stats are all hardcoded, I’d suggest going back and changing them to variables in the base class.
If your enemy base class has all the variables as the player improves you would get an array of all enemy base class, then foreachloop update them all with new stats.
I can’t do a visual for you right now but that should point you in a good direction!
Thanks for the information but I thought about it and I will manual set the levels so the players will know that they’re in a area that is too high level for them. But what I will do is work on and take notes on what you said. I think I will use it in my next project.
This is actually a very complex question too not even getting into the BP but the concept of scaling.
As said above there is a certain FUN to going back and trashing earlier monsters. But also if something causes you to get stuck in area or whatever you dont want the player just grinding level 1 slime until max level at the same rate.
Typically it is dealt with by giving each “zone” a level range as the player progresses. Or by directly scaling vs the player as you are now.
In Zones, they usually scale the amount xp a player gets from a monster by comparing the player lvl vs the enemy level. Forcing the player to move forward just out of the boredom of the grind becoming worthless
Your method is a lot like skyrim’s way. As you level the world levels around you (skyrim and it’s younger brothers/sisters) also start adding in enemies you havent seen before, give the enemies access to new skills etc.
Game/Skill balance becomes huge in these if you can select what levels up. Monsters just go off your LEVEL, but not what skills grant you that level. So you take some time off right at the beginning and build up lock-picking/smiting/illusion spells you can end up in quite a bit of trouble in a fight, as the monsters are level 30+ or whatever and you have the combat skills of level 1.
Feel free to share some of your results and thoughts as you work on this project, this area is something I just find a nerdy perverse enjoyment in. Trying balance it all and make it feel okay and natural.