Help making a turn-based battle system for my JRPG?

I’ve been given an assignment a couple weeks ago to create my own game and I’ve spent 3 of the 9 weeks researching (had to wait to get back to college and ask my teacher a few things) so the next 6 weeks are for building the game. I’m making a turn based JRPG aimed at 12 years old to young adults and I’m planning on the combat being similar to Pokemon or Final Fantasy, with a traditional turn based battle system.

A few weeks ago I posted a forum post here and have received some amazing help when it comes to some of the more technical content (data tables, structures) but my teacher today told me to focus on the battle system itself first as I don’t want to be 6 weeks in without an actual game and just a load of complex information. Right now I’ve got the structures for: Party Member, Monsters, Items, Loot, Moves and Stats, and data tables for Monsters, Party Members and Moves although still need to add things like an XP/Levelling system to connect these all together. I’ve been looking online but I can’t seem to find any tutorials when it comes to a turn based RPG combat system, so I was wondering if anyone could help me with the basics first and hopefully I’ll be able to research/understand myself or play around from there. So essentially in order to make this game I’d require some information to actually start the battle system and then I’ll be able to expand (you can’t build upon nothing!)

I’m planning on using three of the Paragon characters as a Fighter, Mage and Cleric since apart from the Infinity Blade warriors, they are the only free character models/animations available in Unreal Engine. Then with the enemies, I’ll be using the Infinity Blade Adversaries as I’d rather not spend any money on this college assignment, or at least until I know this game is done and then I can safely replace the characters with paid ones (also I’m not too good when it comes to 3D Modelling or Photoshop.)

All in all, would anyone be able to help me in understanding this turn based battle system? Thanks in advance!!

By the way, in my Game Development course so far with UE4, we’ve learnt about blueprints, AI, HUD and trigger boxes: I’ve had to teach myself about data tables and structures via the internet and some helpful people on here.

Good to see you things are off to a good start. Since the RPG I made wasn’t actually turn-based, I’m not sure I could offer as many detailed pointers as I did in your other thread. But I’ll give a shot. Ultimately, my suggestion is to visualize what kind of data you want to keep track of during a fight. Things like who is attacking, who’s turn it is, who is KO’d, etc.

You would definitely need a boolean to determine if you are in a battle. You might want to put this in either the Player Controller or Game Mode Blueprints. If it’s just one on one battles, you could also just use a boolean to determine whose turn it is. To get a character to attack, you would just use an Event that would run all the calculations need for the amount of damage you do. And once that calculation is complete, you would check to see if the character got KO’d to see if the battle needs to end.

For enemy controls, you probably won’t have to use AI too much, but you can if you want to. In my own game, I just had the enemies choose a move at random via RandomIntInRange. That int being whatever the index of the move you have.

As for where to put these functions, that’s up to you, but for the scope of your project, just having all the battle-related blueprints in the GameMode object would suffice.

Beyond that, I’m not sure what else I could offer unless I were to create a prototype for myself. But I guess experimentation is part of the learning process for Unreal Engine.

@Krayfishkarl Hey :slight_smile: I’ve been a bit busy with other assignments and building my developer diary for this game to focus on it but I’ve generally been struggling to develop a random encounter feature. I found one guide but I’m not so sure on how it would work since it only provides an image of the blueprint with no description (had to make different variables with no specific context like “Battle Encounters”, Character Movement and Current Encounter Number, and there’s no information on how to implement these variables into the game: right now they are just words or numbers of 0 or 1 depending on the variable type) https://aaronketts.wixsite.com/aaronk/single-post/2015/11/27/UE4-Random-Turn-Based-Battles-WIP

I’ve been using discord but people on there are much more well known with Unreal Engine 4 so I don’t understand much of what’s going on there or how to implement certain features to create a random battle system… Basically, in essence it’s like I’ve got all the ingredients for a recipe but I have no idea how to combine those ingredients into a complete product. One good thing is that as long as I have a good developer diary discussing about my progress in the development, what research I’ve made, decisions that have changed or things that went wrong, I should get a decent grade. It’s just that I’d feel kinda bad for having 9 weeks for this but not having an actual playable game.

By the way, I’ve seen two other posts in the UE Forums, with one offering free UE4 RPG systems (currently only have the Inventory system iirm) and another in my spot back in March where they can’t find any tutorials and need help making a game so I might check those every now and then for anything else that could help me.

Glad to hear. RPG systems from the marketplace do sound like a good idea if you’re still under those time constraints. But looking at the Blueprint you showed me, there’s a lot you could actually cut out if you want to make it more simplified.

It’s been some time since I worked on an RPG myself, but I think I’ll give a crack at a quick demo just to better understand it for myself.

UPDATE: After a bit of experimentation, I made an extremely simplified version on how to get the random encounter feature started up.

This is completely barebones on the default third person project. But basically, this is located in a Player Controller Blueprint. I have a boolean called “Random Encounters” which is toggleable depending on where you are in the world. I also have it so that it triggers based on your speed. If you’re moving, then a random integer starts to generate. If that number is less than a certain value, it will trigger the battle. You would just call on whatever blueprints you’ve set up to start the battle.

Thanks again! I’ve tried out the blueprint and created a box collision around the actor and it works, at least I think. When running in the overworld, the level seems to change since the light changes from the overworld to battle mode. So yeah, I think the only thing I need to work on now is actually working on the levels themselves and I should hopefully have a random battle encounter system (although I’ll then need to work on the UI, and then exiting the battle mode.) I’ll post a few images to show the difference. I think the encounter rate might be a bit too high so would you have any ideas on how to change that?

Cool! Nice to see some progress has been made!

As for changing the encounter rate, the part of the blueprint that controls it is where it says Random Integer in Range 0 - 1500. Basically, the way this works is that every tick you are moving, a random number is generated in that range and if that random number is less than 10, then a battle will start. You could change the 1500 to a much higher number like 3000 and lower where it says < 10 to something like < 5. Alternatively, you could add a delay node so that it’s not called every tick. Say, it’ll generate the random number every 0.3 seconds rather than every tick. You’ll just have to play around with the numbers to see what suits you.

If you plan to go long term with this, I’d also recommend making the overworld their own separate levels so that as your world gets bigger, you could load and unload chunks of the overworld to save on processing power. For example, you would have dungeons and towns as their own separate levels. The persistent level is always loaded so I tend to use it for things like portals to other areas.

@Krayfishkarl Thanks again! I’ve started to think that maybe having a JRPG as my first Unreal Engine/Game Development Project might be a bit too much so I’m considering moving away from the whole turn based JRPG because of the amount of time I’ve spent just researching and looking for tutorials (8 weeks.) I’ll consider making a JRPG on Unreal Engine in the future once I have more game development knowledge and use the tips you’ve given but for now I might have a look at the Virtus Learning Hub “Let’s Create an RPG” playlist and follow some of that so I actually have a game to show for my assignment. Then after the assignment is done, I might see if I can find another different game engine for making a JRPG (thinking either RPG Maker or Unity) I know having a JRPG as my first ever Unreal Engine project with hardly any practise beforehand may have been a bad idea but then again that’s pretty much the only genre of games that I play (as well as fighting and simulation games due to my motion sickness)

Understandable. Unreal Engine wasn’t designed with JRPG’s in mind, but of course they can still made. Just look at Final Fantasy 7 Remake and Kingdom Hearts 3. While Unreal Engine doesn’t have any prebuilt templates to go with JRPG’s, action and puzzle games work very well. You can do a lot with the physics and destructible meshes alone. Or you might not even need to do a whole lot with blueprints. There’s a ton of games on these forums that instead put most of their focus on good visuals and storytelling.

As for making an RPG, I’ve never used Unity so I can’t say much about it, but I actually gave RPG Maker a spin a while back. It has all the RPG systems in place for you, pretty much skipping the hard parts. I haven’t made a fully fledged game out of it yet, but if you want to put together a system quickly without doing a lot of hardcoding, RPG Maker can achieve a lot. The base software has the leveling system, random encounters, dialogue and events all done for you. On top of that, there’s tons of downloadable plugins you can use to customize further.

But anyway, good luck on your first game whatever you decide it to be!

Understandable. Unreal Engine wasn’t designed with JRPG’s in mind, but of course they can still made. Just look at Final Fantasy 7 Remake and Kingdom Hearts 3. While Unreal Engine doesn’t have any prebuilt templates to go with JRPG’s, action and puzzle games work very well. You can do a lot with the physics and destructible meshes alone. Or you might not even need to do a whole lot with blueprints. There’s a ton of games on these forums that instead put most of their focus on good visuals and storytelling.

As for making an RPG, I’ve never used Unity so I can’t say much about it, but I actually gave RPG Maker a spin a while back. It has all the RPG systems in place for you, pretty much skipping the hard parts. I haven’t made a fully fledged game out of it yet, but if you want to put together a system quickly without doing a lot of hardcoding, RPG Maker can achieve a lot. The base software has the leveling system, random encounters, dialogue and events all done for you. On top of that, there’s tons of downloadable plugins you can use to customize further.

But anyway, good luck on your first game whatever you decide it to be!
[/QUOTE]

Thank you! I’m going to try out the RPG provided in the Virtus Learning Hub playlist for this assignment but I think once that’s done or on the side and I have some more money to spend, I might look into buying an RPG Maker program. Setting everything up is by far the most difficult aspect of this project, so having all that set up is perfect. With that, I’d be able to actually implement my own ideas rather than having to copy ideas and have no idea myself as to how to adapt them into my own game. I think I’ll try out this RPG first though, even though it’s a more Action/Western RPG rather than JRPG but hey, at least I’ll know how to make a good level design and various aspects like an inventory system, levelling up and stats. I might update this/message you if I decide to get back to making a JRPG on Unreal Engine once I know more about the program

TY for the post. I’m attempting to basically copy and improve the old Disciples game to get it into 64bit graphics. I still play it on the old Win Vista machine I have, and I want to use it as a template, because the math is already worked out.

Are you looking for something like this for battle system?

https://forums.unrealengine.com/unreal-engine/marketplace/1533463-turn-based-rpg-template