How to start a Single-Player turn based RPG?

So, I want to make a Turn-Based RPG combat system within my game, as my first step into my first game, with a party, and enemy NPC’s. But I don’t have that much experience in scripting, besides the most basic ones. If anyone could teach me the fundamentals of how to work out a Turn-Based system, then I would like to hear you out! I was thinking of a style of combat combination of Shin Megami Tensei, Paper Mario, and SP: The Stick of Truth.

6 Likes

So, first you will want to make a GUI. It doesn’t have to be too complex, just like these options: fight, item, and run (other actions you want to)

Program these to open a new ScreenGui when you click them. Use a scrolling frame with a bunch of buttons in it to fit all the actions the player will have. Do the same exact thing for items except . . . with items.

Now, the hard part. Let’s make a test dummy, and add a prompt in it’s head. Change the prompt’s text to say fight.

Next, add a script that reacts to the prompt and opens the GUI to fight.

One of the harder parts is you are going to have to move around the camera somewhat. I suggest slightly panning to the left and the right repeatedly. Up and down too if you can!

Then, you are going to want to move the NPC accordingly, your options with this are this:

1: You can move them into a stadium like area where the player didn’t actually challenge the NPC (like most Pokemon games)
2: MY FAVORITE!! Move the NPC so it is not on any trees or anything, and is farther away from the player.

Whichever you do, you should probably make the NPC have an idle animation.

Next (the scripting heavy part) you need to make the playing part. So, put a bool value called playerTurn and start it off to be True (unless of course you want the enemy to start)

Next, you should put a list of what attacks the enemy can do inside it. Make a folder in the enemy called attacks. Each attack should be a folder that contains damage, name, and whatever else you want. You can add animations later on.

Next, make sure the player has some actions. For now something filler.

Okay, here comes the hard part. We’re going to make a script that will tell whether or not it’s the player’s turn. If it isn’t, it uses a remote event to let the NPC know and prompts a script to select NPC choice.

For now make the NPC choice random, later on add some logic in with those choices.

Add health bars for the player to see their and the enemy’s health.

Make sure you make it so when the game ends or the player runs away the GUI hides and the player health is set back to 100.

4 Likes

Mind giving me a few example scripts so that I can test it out? I’ll eventually get used to it and make my own.

image_2023-02-27_234422216

For my idea, this is a mock-up of the visuals of combat.

1 Like

Sure! You’re going to have to give me a good amount of time.

1 Like

Thank you very much, sounds good!

1 Like

How’s progress going so far on the script?

I’m genuinely sorry, unless you want me to make a script for you – which maybe, but I wouldn’t want to make a whole system for someone without a reason (like, if I needed it for a game of mine, or they hired me) – I hope my explanation can do.

If you want me to make the script for you please DM and we can talk.