turn based combat system

hi I am making an rpg with a battle system like final fantasy and other turn based rpg’s so I am wondering if there are
any tutorials like that in c# the hack and slash is good but I don’t think It teaches you about turn based combat just
combat for games like world of warcraft. here is the battle layout:

row1:enemy line
row2:attacking line
row3:battle party(only 3 party members in battle.)

if someone can show me how to make something like this in c# that would be great?

I have seen on youtube the advanced tutorials of making an rpg but it is in java script and incomplete, so I was thinking how do I go about
making a script like that but in c#

Question for you, do you know how to develop a flow chart?

kind of you see I know c# because I use it for games I make in unity and I was thinking of making a rpg that its combat is the
same as those turn based rpg’s where the screen goes black and you have the battle scene. I just need some help in getting
started? because I can’t seem to find any turn based combat tutorials on youtube for c#

A flowchart will allow you to design a turn based combat system that can be built in any language, not just C#. The problem with online tutorials, from my own personal experience, is that they are often times tailored only for a specific implementation for a specific game, and not for YOUR game. In addition, just giving you code will not allow you to learn how to build a turn based combat system.

Here’s a youtube video on flowcharting: http://youtu.be/_GhW2wq-Ajw

Do your flowchart first. A turn based combat system is quite easy, including ATBs (Active Time Battle system; this is what Final Fantasy uses). Think of your flowchart as the blueprint to the system. Then you can code your battle system in C#.

ok thanks for your help I got some scripts going like my playerstats and another one that goes with it

To implement a turn based system like the one you are trying to implement would require a new scene to be loaded once “battle mode” has started. Once the scene is loaded, I would make a plane with a grid system attached to it. This would allow you to set up your enemies in a line like you want. The next would be the actual combat system, which could be anything from pretty fairly simple to painstakingly complicated. The enemies would have to have stats as well as the player. You would have to keep track of the enemies vitals (such as health, mana, etc), as well as the players’. You would also need a reference to the enemies’, and players’ stats. You would also need to keep track of time to know when the players/enemies turn is up. Once you have this in place, it would just be a matter of getting the turns implemented. Maybe something like a switch case would do the trick.

ok I already have a script called PlayerStats that has my all of my stats(HP,MP,strangth,etc) some people on these forums said I should keep my playerstats as monobehaviour and put all my character’s stats in my playerstats here is the code that
some people helped me with

[System.Serializable]
public class PlayerStats : MonoBehaviour {

	public int level;
	public string name;
	public Stat Hp = new Stat();
	public Stat Mp = new Stat();
	
	
	public int STR;
	public int DEX;
	public int DEF;
	public int vital;
	public int Magic;
	public int luck;
	public int Speed;
	public int Agility;
	
	public int melee;
	public int ranged;
	public int MagA;
	public int MagD;
	public float active;
	
	public Stat exp = new Stat();
	
	public void addexp(int ex){
		
		exp.Cur += ex;
		while(exp.Cur >= exp.Max  level < 99){
			exp.Cur -= exp.Max;
			exp.Max = level *(level+1)* 500;
			level++;
			upstats();
		}
	
	}
	
	void upstats(){
		STR++;
		DEX++;
		DEF++;
		vital++;
		Magic++;
		luck++;
		Speed++;
		Agility++;
	
		
		melee =(level*7)+STR;
		ranged =(level*7)+DEX;
		DEF =(level*2)+ Agility;
		MagA =(level*7)+ Magic;
		MagD =(level*2)+ luck;
		
		active =20+((Speed * level)/1500);
		
		Hp.Max =((level * 5)+ vital)*10;
		Hp.Cur = Hp.Max;
		Mp.Max =((level * 5)+ Magic)*10;
		Mp.Cur = Mp.Max;
		
	}
	
	    public class Stat{
		public int Cur;
		public int Max;
		
	}		
	
		public PlayerStats(int level,string name,int STR,int DEX,int DEF,int vital,int Magic,int luck,int speed,int Agility,int exp){
		this.level = 1;
		this.name = name;
		this.STR = STR;
		this.DEF = DEF;
		this.vital = vital;
		this.Magic = Magic;
		this.luck = luck;
		this.Speed = speed;
		this.Agility = Agility;
		addexp(exp);
	}	
	

}

I also need to know do I put an attacking class in this script or make a new script that has
attacking ratio, defending ratio by if they hit or miss the target for both enemy and characters