Announcement

Collapse
No announcement yet.

Making a JRPG - thoughts and where to start?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Break down the features you want in your game and watch tutorials on Youtube.
    Here is my Action jRPG:
    https://forums.unrealengine.com/unre...-jrpg-template

    Video:

    Leave a comment:


  • replied
    Sounds like a massive undertaking for nine weeks.. If I was you, I would look at similar games and start reverse engineering them.. That's how I did it with my game anyway

    Leave a comment:


  • replied
    Also check this out:

    https://forums.unrealengine.com/unre...-jrpg-template

    Leave a comment:


  • replied
    Are you looking for something like this for battle system?

    https://forums.unrealengine.com/unre...d-rpg-template

    Leave a comment:


  • replied
    Originally posted by Krayfishkarl View Post
    Your best bet to achieving this sort of thing might be level streaming. Especially if you are going between separate overworld and battle areas, level streaming is much faster than using the "open level" function.

    As for random encounters, while on the overworld, you would have a float variable that gets set to a random number as you are walking. If the number happens to be set to a specific value (specified by another variable which would be your encounter rate, i.e. 5%, 10%), then you would trigger an event for the battle start. Because you are using your battle area as a separate level, you would also need to store a transform variable that remembers the coordinates of any NPC's or characters you have. So that when you reload the overworld again, they would appear in the spots they were before. Level Streaming will also allow any data in the GameMode Blueprint to be remembered between levels so you should be able to use that or the Player Controller Blueprint to store the information you need.

    Also, if you go with level streaming, your title screen would be its own level. It's up to you if you actually want to show any 3D visuals, or you could just have the whole thing UMG. In either case, you would also disable movement for the player character, and then reenable it once you are in the game proper.



    This is a video on level streaming I came across. In the marketplace, there's also a free project called "ContentExamples" which also has an example of level streaming. Rather than trigger boxes to load other levels, you may want to use Level Streaming Volumes which make things a bit more streamlined. You can just place these volumes around the levels you want to stream rather than having a trigger box at specific points.
    Thank you! I've never heard of level streaming before so I'll have a look at that in a bit! Hopefully now that I have something to work on, I can use my creativity to expand on this and make a great game!

    Leave a comment:


  • replied
    Your best bet to achieving this sort of thing might be level streaming. Especially if you are going between separate overworld and battle areas, level streaming is much faster than using the "open level" function.

    As for random encounters, while on the overworld, you would have a float variable that gets set to a random number as you are walking. If the number happens to be set to a specific value (specified by another variable which would be your encounter rate, i.e. 5%, 10%), then you would trigger an event for the battle start. Because you are using your battle area as a separate level, you would also need to store a transform variable that remembers the coordinates of any NPC's or characters you have. So that when you reload the overworld again, they would appear in the spots they were before. Level Streaming will also allow any data in the GameMode Blueprint to be remembered between levels so you should be able to use that or the Player Controller Blueprint to store the information you need.

    Also, if you go with level streaming, your title screen would be its own level. It's up to you if you actually want to show any 3D visuals, or you could just have the whole thing UMG. In either case, you would also disable movement for the player character, and then reenable it once you are in the game proper.



    This is a video on level streaming I came across. In the marketplace, there's also a free project called "ContentExamples" which also has an example of level streaming. Rather than trigger boxes to load other levels, you may want to use Level Streaming Volumes which make things a bit more streamlined. You can just place these volumes around the levels you want to stream rather than having a trigger box at specific points.

    Leave a comment:


  • replied
    Originally posted by Krayfishkarl View Post
    Monster Structure from left to right:

    Text, Text, Stats Structure (made of an integers), Loot Strucure (made of two integers and two arrays of names), array of names

    Party structure from left to right

    Name (you can use Text instead as I was planning to implement the ability to rename characters), integer, boolean, stats structure, xp structure (made of integers), array of names, array of names, float

    Unfortunately, I can't say I know of any tutorials on how to specifically make JRPG's, but this one on data tables may be of use:

    http://www.ue4u.xyz/2015/09/09/datatables-without-c/
    Hey, have another question! I'm trying to focus on the basics, and I've made another level named Battle_Mode which, you guessed it, will be where battling will take place. I want to try and implement a random encounter system where in the overworld, or at least specific places like Grass (although i'll consider that later on) when moving, there's a chance of a random encounter with an enemy. I feel like this will be better than overworld encounters as it seems easier both in development and on the system due to less enemy models running around everywhere. At the moment, I'm struggling on connecting the overworld level with the battle level and I was wondering if it'd be easier/more simple to try and implement a random encounter system alongside the transition between levels, or focus on transitioning between the overworld and battle levels, then connect that to the trigger boxes and then look at random encounters. Would you be able to help at all or point me to any tutorials? I had a look at the HUD Quick Guide in the UE4 Tutorial document but that's more towards building levels, and I'm not sure how I'd be able to change from pressing play on the main menu for it to transition to the main game, all the way to walking around in the overworld transitioning to the battle level at random odds.

    Leave a comment:


  • replied
    Monster Structure from left to right:

    Text, Text, Stats Structure (made of an integers), Loot Strucure (made of two integers and two arrays of names), array of names

    Party structure from left to right

    Name (you can use Text instead as I was planning to implement the ability to rename characters), integer, boolean, stats structure, xp structure (made of integers), array of names, array of names, float

    Unfortunately, I can't say I know of any tutorials on how to specifically make JRPG's, but this one on data tables may be of use:

    http://www.ue4u.xyz/2015/09/09/datatables-without-c/

    Leave a comment:


  • replied
    Thanks! I think having something visual to look at helped a lot, although now as I'm trying to make the structures, I'm having some difficulties. First of all, what variable type did you use for each row, at least when it comes to the monster structure and party member structure? I've made the base stats an integer array but for some reason it doesn't let me edit the name of each stat. What I'm trying to do now is I've made the basic premise of each structure, like an empty shell, I'm just now trying to connect them to the data tables via level blueprint, aka. filling the empty shell with content. I'm just not sure how to connect the stat structure (with Current and Max for HP, MP, Atk, Def, M-Atk, M-Def, Speed) to the party member structure/data table and the monster structure/data table. In short, are there any tips for building the structure, as I'd presume these are what actually form the data tables, and allow you to enter info into the data tables. Also, would you happen to know any good tutorial sites or videos/playlists for someone developing a JRPG, or videos which cover key areas such as building stats?

    EDIT: Just found out you can directly link two structures together, as I was using Integer for the Base Stats, and not the actual structure itself. Although now I've got a bit of a problem since in the stats structure, I have Current and Max for HP, MP, Atk, etc. (previously mentioned) rather than a Base Stat... (the current and max relates to the level, not the base stat)
    Last edited by DanF2000; 04-10-2018, 07:28 AM.

    Leave a comment:


  • replied
    Here's what a couple of my data tables look like to give you an idea:

    Item Data Table

    Click image for larger version  Name:	ItemDataTable.png Views:	1 Size:	234.1 KB ID:	1454677

    Default Party Member Data

    Click image for larger version  Name:	DefaultPartyDataTable.png Views:	1 Size:	92.1 KB ID:	1454678

    Skills Data

    Click image for larger version  Name:	SkillDataTable.png Views:	1 Size:	196.7 KB ID:	1454679

    Monster Data

    Click image for larger version  Name:	MonsterDataTable.png Views:	1 Size:	257.4 KB ID:	1454680

    The way data tables work is that they're based off just one structure. However, within that structure, you can have smaller structures. Like in the Party Member Data table, I have a smaller structure which contains a Name and a Boolean. The name is whatever move they have, and the boolean is whether or not that move is unlocked - which is useful for skill trees. I don't actually have a class system in my game, but the party member data table contains all the moves that character could potentially use at some point, just locked away. The skill tree is generated based on what moves are in that particular data table.

    And to answer your question as to where the item data table connects, it's only on the loot. The default party member data doesn't use any items since I chose to store the items in a collective Inventory array on the Game Instance.

    The loot is made up of the following:

    Click image for larger version  Name:	LootStructure.png Views:	1 Size:	66.6 KB ID:	1454681
    The first structure lists the XP and money you get. The other two use another structure to determine what chance you get an item. My game's items and equipment are structured differently so that's why I have them separate.
    Click image for larger version  Name:	LootStructureChance.png Views:	1 Size:	60.2 KB ID:	1454682
    This other structure specifies parameters for the chance of loot. For the name variable, you put in whatever row number in the item data table you want. Chance is a float that just picks a random number between 0.0 and 1.0. So if you enter 0.7, you have a 70% chance of getting that item. And lastly, quantity means how many of that item gets added.

    Also, thanks for all the questions!. The more and more I'm talking about this, the more inclined I'm feeling to revisit this project again. Perhaps when I get the chance, I'll take this project off hiatus.
    Last edited by Krayfishkarl; 04-03-2018, 12:07 PM.

    Leave a comment:


  • replied
    Originally posted by Krayfishkarl View Post
    No problem!

    It's up to you whether you enter the data directly into UE4 or use a program like Excel to edit them. Basically, in UE4 you would create the structure first followed by the data table. Then, you can export the data table as a CSV file. This way, people who don't have UE4 on their computer can edit the file and send it back to you when they are done editing. As for what you've learned in class, I think you should have no problem figuring out Game Instances, Data Tables and Structures. The advantage you have over me is that you have that structured learning environment so these things might come to you a bit quicker than it did to me.

    If you have only 7 hours of experience but broad knowledge of how UE4 works in general, I could easily see you getting an early prototype of a bare bones battle system within a week. Perhaps another week for some additional polish and you can spend the rest of that time putting the game itself together. If you optimize your time to the fullest, I think you should easily be able to get it done in time.
    Thanks again! I know it's been a few days since (due to Easter) but I've done some work into this and made some data tables on excel as practise, just so I know what to enter into the data table in UE4. I was just wondering what you'd enter in specifically for them, such as the class, stats, weapon type and starting Level for the main characters. I'll probably spend more time working once I'm back at college though (working at home isn't too efficient due to the "home" environment compared with the school and college environment.) Also, with the data tables, what did you connect to which structure? I'm just wondering if the item data table would connect to the loot, or the party characters.
    Last edited by DanF2000; 04-03-2018, 09:12 AM.

    Leave a comment:


  • replied
    No problem!

    It's up to you whether you enter the data directly into UE4 or use a program like Excel to edit them. Basically, in UE4 you would create the structure first followed by the data table. Then, you can export the data table as a CSV file. This way, people who don't have UE4 on their computer can edit the file and send it back to you when they are done editing. As for what you've learned in class, I think you should have no problem figuring out Game Instances, Data Tables and Structures. The advantage you have over me is that you have that structured learning environment so these things might come to you a bit quicker than it did to me.

    If you have only 7 hours of experience but broad knowledge of how UE4 works in general, I could easily see you getting an early prototype of a bare bones battle system within a week. Perhaps another week for some additional polish and you can spend the rest of that time putting the game itself together. If you optimize your time to the fullest, I think you should easily be able to get it done in time.

    Leave a comment:


  • replied
    Originally posted by Krayfishkarl View Post

    Sure thing! I'll try to give a basic outline to explain as best I can for what I did for my project called Dreamwalkers: Sleep Descent. What it boiled down to was just a series of data tables and structures. There's certainly other ways to do it but this was a method I found to work pretty well for me. And of course, this only skims the surface but hopefully, it'll be enough to point you in the right direction.

    Data Tables

    -Default party member data table - This would be used to store the default party information when you start the game for the first time. It can alternatively serve as a place to load placeholder stats in case you somehow start the game without choosing a file from the save menu. This table is made of the party member structure.
    -Monster data table - All the creatures in the game. The row names are like your monster ID's. An object that contains a name variable that points to these row names would be able to load the corresponding monster data. This table is made of the monster structure.
    -Move data table- The list of all moves usable in the game for both party members and enemies. This table is made of the Move structure.
    -Item data table - Used for all the items.
    -Encounter table - I have a list of all locations in the game as well as an array for possible encounters that are chosen at random. Scattered throughout the world are trigger boxes that set the name of the current location. Think of these trigger boxes as the spots in Pokemon where you go between cities and routes. And of course, that also means if you somehow avoid these trigger boxes, you could get monsters spawning in the wrong locations (which is how the Missingno glitch can happen in the original games).
    -Dialogue table - All the text in the game. Whenever I call on the dialogue box, I'd just call the data table row to determine which message to display. I had planned a ton of dialogue so I actually broke it up into multiple data tables, but for the scope of your project, you should be able to get away with just one.

    Structures
    -Move structure - All your move stats would go here. I'd have a String variable for the name of the move and a description, an int for some damage/healing values, a float for accuracy. If you want, you can also put a custom enum here for different move types.
    -Stats structure - Basically a bunch of ints to contain the stats. I have two for every stat in the game, one to indicate your current level and the other indicate your max. So for example, for the Attack stat, I would have a "Current Attack" and a "Max Attack". Whenever you level up, you could just add to the Max stat.
    -Party member structure - I put in a String for the character's name. Also an array for the moves your character has. Essentially, what you would type in are the names of the data table rows that point to the move's attributes on your move data table. And it also contains a stats structure.
    -Monster data structure - What your monster data table is made of. It's very similar to the party member structure except I also include an additional structure for the chance of loot.
    -Loot structure - Used for the monsters and also treasure chests. It's made of a smaller structure that uses a name for the actual item as well as a float for the chance of that loot appearing.

    Other Variables

    I used the Game Instance blueprint to store things like party member data as well as the coordinates to your current location in the world.

    -Your current party member data - Basically your party's stats. You can use the party member structure for this one and store it as an array for your number of party members.
    -Your inventory - An array of items. I had a separate array for my equipment since I happened to code the two quite differently.
    -An int for your money
    -A vector for your current world coordinates. It's up to you whether you can save anywhere or limit it only to designated spots.
    -A name variable for the current zone you are in. I use this primarily to determine what music to play in the area as well as what encounters you'll run into.


    Battle system

    For my Dreamwalkers game, I actually had a semi-real time system similar to the active time battle system from the SNES Final Fantasy games, but the way battles start is a similar principle to most JRPG's. In the field, I have an actor to represent encounters which is basically a trigger box with several scene roots. I also spawn an additional monster actor that if the player touches will start a battle. When you touch that monster, it spawns the first three characters of your party in designated spots as well as three monsters in their spots. The trigger box pulls from the random encounter list to determine what monsters to spawn (and I also made it so that you can have scripted encounters). This places the spawned party members and characters right in the world itself so don't forget to turn your player character invisible while this is happening.

    For the spawned beings itself, I used a separate actor which I called "Battle Character". Depending on what I specified for the party member and monster data tables, it'll change to the appropriate mesh and movesets. This makes it pretty easy to add more monsters and more moves. I'm sure you could also spawn each of them as their own separate actors, but this way worked for me.

    For your game, it might be simpler to do one vs. one, but for Dreamwalkers, it was 3 vs. 3. I had to take into account some additional considerations like moves being able to target multiple enemies. Just for kicks, I also threw in the ability to attack your own party members too, but I had an additional variable for the moves to determine by default which targets get selected first. That way, you don't heal an enemy by accident by clicking too fast.

    What you'd want to do from here is generate your menu based on your party members and your moves. Scrollboxes were very useful here which allowed me to make the lists as long as needed. I'd also designate each character in the battlefield with an int ID number so that they would be selectable using the menus.


    Blueprints

    I put all the blueprints for determining how moves affect the targets in the GameMode blueprint. This is not necessarily the best choice because after putting in so much move data, it started to take ridiculously long to compile, so you might be better off having a dedicated actor to handle all of this.

    When it comes to move effects, what it boils down to is a massive switch statement for the moves that you call upon in battle. So basically, if this move is used, it will apply these effects. I did manage to clean up the code a little by adding my own little shortcuts which analyze what kind of move it does based on certain keywords in a phrase. (You could say it's almost like my own scripting language except very primitive). But that's probably a bit outside the scope of your project. That's something for the long term if you have hundreds of different possible moves and items.

    Conclusion
    It took me maybe a couple weeks to do all this, but that was partially because I didn't know what I was doing and I was new to Unreal Engine 4 at the time (and I'm still learning things two years later). Ultimately, to figure out which additional data tables and structures you would need, I'd just try to create a flow chart of information on how things get passed on to one another. In theory, you should be able to get the battle system up and running without any kind of visuals. You could also think of it in terms of it being either a card game or board game.

    As for my own project, I don't want to sound too daunting, but the reason why I switched away from my JRPG game was because the blueprints became so complex that I lost track of what did what when I needed to go back and fix some bugs or add new features (in part because I was extremely sparse on the commenting). I was better off redoing two year old blueprints from the ground up, but I figured I'd take a break just to get a change of pace by making a different kind of game. One day, maybe I'll come back to it.

    But hopefully, things will turn out way better for you. I wish you the best of luck and I look forward to seeing what you come up with!
    Thank you so much for this! I've just got a few questions: with the data tables, would you enter data into a spreadsheet, and then import that into the UE4 Project? It's just that we haven't done anything regarding Game Instance, Data Tables or Structures. The only thing we have worked on in class are Blueprints (specifically for the ThirdPersonCharacter, HUD/User Interface and Textures.), AI, Landscapes and Sequencing. Second and last question is how long would you say it'd take for a beginner to UE4 (well, someone who's used it for about 7 hours) to create a turn-based RPG battle system? I'm hoping to have this aspect finished by the end of next week, so if I spent around 2 hours a day (apart from Easter), I might get it done. Once again, thanks for the information!!
    Last edited by DanF2000; 03-29-2018, 04:35 AM.

    Leave a comment:


  • replied
    Originally posted by DanF2000 View Post

    Thanks! I think I might cut down on some mechanics like the skill tree, class system and the overworld UI/map and maybe sidequests, at least for now. So in this project I think I might focus on the combat system first, so the levelling/EXP system, Health and the UI and combat. I might make a combat system similar to Pokemon with four moves for each character, with the attacking attribute or healing attribute for the cleric. And to be honest, I feel the aspects that are the most important to show off are the battle system and the exploration (finding items/chests.) I mentioned it earlier but right now I'm following the Virtus Building an RPG playlist as well as the Unreal Engine 4 tutorials, and thought I might start by making a main menu since that's the latest thing we've learnt in lessons. So yeah, would you be able to share how you made the party members and battle system? I think I'd be able to find how to make a levelling system through tutorials on youtube since that's a core mechanic for all (or at least most) RPGs. Thanks in advance!
    Sure thing! I'll try to give a basic outline to explain as best I can for what I did for my project called Dreamwalkers: Sleep Descent. What it boiled down to was just a series of data tables and structures. There's certainly other ways to do it but this was a method I found to work pretty well for me. And of course, this only skims the surface but hopefully, it'll be enough to point you in the right direction.

    Data Tables

    -Default party member data table - This would be used to store the default party information when you start the game for the first time. It can alternatively serve as a place to load placeholder stats in case you somehow start the game without choosing a file from the save menu. This table is made of the party member structure.
    -Monster data table - All the creatures in the game. The row names are like your monster ID's. An object that contains a name variable that points to these row names would be able to load the corresponding monster data. This table is made of the monster structure.
    -Move data table- The list of all moves usable in the game for both party members and enemies. This table is made of the Move structure.
    -Item data table - Used for all the items.
    -Encounter table - I have a list of all locations in the game as well as an array for possible encounters that are chosen at random. Scattered throughout the world are trigger boxes that set the name of the current location. Think of these trigger boxes as the spots in Pokemon where you go between cities and routes. And of course, that also means if you somehow avoid these trigger boxes, you could get monsters spawning in the wrong locations (which is how the Missingno glitch can happen in the original games).
    -Dialogue table - All the text in the game. Whenever I call on the dialogue box, I'd just call the data table row to determine which message to display. I had planned a ton of dialogue so I actually broke it up into multiple data tables, but for the scope of your project, you should be able to get away with just one.

    Structures
    -Move structure - All your move stats would go here. I'd have a String variable for the name of the move and a description, an int for some damage/healing values, a float for accuracy. If you want, you can also put a custom enum here for different move types.
    -Stats structure - Basically a bunch of ints to contain the stats. I have two for every stat in the game, one to indicate your current level and the other indicate your max. So for example, for the Attack stat, I would have a "Current Attack" and a "Max Attack". Whenever you level up, you could just add to the Max stat.
    -Party member structure - I put in a String for the character's name. Also an array for the moves your character has. Essentially, what you would type in are the names of the data table rows that point to the move's attributes on your move data table. And it also contains a stats structure.
    -Monster data structure - What your monster data table is made of. It's very similar to the party member structure except I also include an additional structure for the chance of loot.
    -Loot structure - Used for the monsters and also treasure chests. It's made of a smaller structure that uses a name for the actual item as well as a float for the chance of that loot appearing.

    Other Variables

    I used the Game Instance blueprint to store things like party member data as well as the coordinates to your current location in the world.

    -Your current party member data - Basically your party's stats. You can use the party member structure for this one and store it as an array for your number of party members.
    -Your inventory - An array of items. I had a separate array for my equipment since I happened to code the two quite differently.
    -An int for your money
    -A vector for your current world coordinates. It's up to you whether you can save anywhere or limit it only to designated spots.
    -A name variable for the current zone you are in. I use this primarily to determine what music to play in the area as well as what encounters you'll run into.


    Battle system

    For my Dreamwalkers game, I actually had a semi-real time system similar to the active time battle system from the SNES Final Fantasy games, but the way battles start is a similar principle to most JRPG's. In the field, I have an actor to represent encounters which is basically a trigger box with several scene roots. I also spawn an additional monster actor that if the player touches will start a battle. When you touch that monster, it spawns the first three characters of your party in designated spots as well as three monsters in their spots. The trigger box pulls from the random encounter list to determine what monsters to spawn (and I also made it so that you can have scripted encounters). This places the spawned party members and characters right in the world itself so don't forget to turn your player character invisible while this is happening.

    For the spawned beings itself, I used a separate actor which I called "Battle Character". Depending on what I specified for the party member and monster data tables, it'll change to the appropriate mesh and movesets. This makes it pretty easy to add more monsters and more moves. I'm sure you could also spawn each of them as their own separate actors, but this way worked for me.

    For your game, it might be simpler to do one vs. one, but for Dreamwalkers, it was 3 vs. 3. I had to take into account some additional considerations like moves being able to target multiple enemies. Just for kicks, I also threw in the ability to attack your own party members too, but I had an additional variable for the moves to determine by default which targets get selected first. That way, you don't heal an enemy by accident by clicking too fast.

    What you'd want to do from here is generate your menu based on your party members and your moves. Scrollboxes were very useful here which allowed me to make the lists as long as needed. I'd also designate each character in the battlefield with an int ID number so that they would be selectable using the menus.


    Blueprints

    I put all the blueprints for determining how moves affect the targets in the GameMode blueprint. This is not necessarily the best choice because after putting in so much move data, it started to take ridiculously long to compile, so you might be better off having a dedicated actor to handle all of this.

    When it comes to move effects, what it boils down to is a massive switch statement for the moves that you call upon in battle. So basically, if this move is used, it will apply these effects. I did manage to clean up the code a little by adding my own little shortcuts which analyze what kind of move it does based on certain keywords in a phrase. (You could say it's almost like my own scripting language except very primitive). But that's probably a bit outside the scope of your project. That's something for the long term if you have hundreds of different possible moves and items.

    Conclusion
    It took me maybe a couple weeks to do all this, but that was partially because I didn't know what I was doing and I was new to Unreal Engine 4 at the time (and I'm still learning things two years later). Ultimately, to figure out which additional data tables and structures you would need, I'd just try to create a flow chart of information on how things get passed on to one another. In theory, you should be able to get the battle system up and running without any kind of visuals. You could also think of it in terms of it being either a card game or board game.

    As for my own project, I don't want to sound too daunting, but the reason why I switched away from my JRPG game was because the blueprints became so complex that I lost track of what did what when I needed to go back and fix some bugs or add new features (in part because I was extremely sparse on the commenting). I was better off redoing two year old blueprints from the ground up, but I figured I'd take a break just to get a change of pace by making a different kind of game. One day, maybe I'll come back to it.

    But hopefully, things will turn out way better for you. I wish you the best of luck and I look forward to seeing what you come up with!

    Leave a comment:


  • replied
    Actually there are free animation packs. Goto the store and look in the "free" tab. You could get crazy and use the new paragon characters they all have attack animations, but have a very big install. I think the Infinity Blade Character assets might have animations in them but not 100% sure on that. As far as the combat goes I used a struct and put all the variables in (Animation, Damage, Speed ect) then make a "Parent" AI that all your enemies can derive from. Then u can work on the combat(check speed to see who goes first, get random animation, deal damage ect) If you get done with that you can implement spawning random monsters into the battle, using battle items. The beauty of programming is that there is a million ways to do everything

    Leave a comment:

Working...
X