Advertisement

In C#, how would I code a Tactics RPG ability menu?

Started by January 31, 2019 09:26 AM
7 comments, last by LuckyDucky12 5 years, 7 months ago

Have you ever played Tactics Ogre or Final Fantasy Tactics? In those games, units can use a variety of skills, from throwing stones to casting magic, with the use of their abilities. I have a fully functional TRPG made in unity, but I'm lacking these functions. My game is going to be a LOT less cool without these, so I'd appreciate the help!

What's the simplest way I can code a similar menu into my game? I'd probably need it to work with the stats of the unit too, but I can worry about that later.

Hi and welcome.

I'm not sure, is this mainly a Unity question or C# question? I haven't played those games, maybe you could give some more detail about your requirements.

Sounds like a coding question not design.

Developer since 1994. Programming since '80. Still like it.

Advertisement

fully functional means you have skills in some kind of datastructure? add some display related info to those, like icon and menu-title or description. then write a function to create those buttons from the prefab using the info from the skills' data. check this: https://answers.unity.com/questions/1085263/dynamic-menu-creation.html

This is not a Game Design question. Moving to a more appropriate forum.

 

4 hours ago, duke_meister said:

Sounds like a coding question not design.

Exactly.

-- Tom Sloper -- sloperama.com

7 hours ago, duke_meister said:

Hi and welcome.

I'm not sure, is this mainly a Unity question or C# question? I haven't played those games, maybe you could give some more detail about your requirements.

Sounds like a coding question not design.

Sure, I'll just fully detail what I mean and link a video to fully show it off. And sorry about posting in the wrong part of the forum!

I'm doing this in Unity, but I know how to follow simple C# tutorials and apply that to Unity. In my game, I can move the Units and attack. Both my Player and Enemy have scripts that gives the units stats and they can even die when their health stat. Right now, they can only do basic attacks when clicked.

In this video, from 11:34 to 11:43, you can see a character open a menu, select an ability, select a target, and then use that ability (the link will show you starting at 11:34). I'm looking to replicate this because my game is pretty bland without it.

 

6 hours ago, ninnghazad said:

fully functional means you have skills in some kind of datastructure? add some display related info to those, like icon and menu-title or description. then write a function to create those buttons from the prefab using the info from the skills' data. check this: https://answers.unity.com/questions/1085263/dynamic-menu-creation.html

Fully functional as in you could easily call it a playable game, even if it isn't a fun one. I don't have any skills in a datastructure, but now I know to make one for the skills, so thanks!

Advertisement
2 hours ago, LuckyDucky12 said:

Fully functional as in you could easily call it a playable game, even if it isn't a fun one. I don't have any skills in a datastructure, but now I know to make one for the skills, so thanks!

ok I can see what you mean. You want a system to induce epileptic fits. Just kidding, but seriously that's a lot of annoying pop-ups. Anyway not really a data structures issue. More of a Unity, or even general UI question IMO. I'll leave that for others :)

 

Developer since 1994. Programming since '80. Still like it.

7 minutes ago, duke_meister said:

ok I can see what you mean. You want a system to induce epileptic fits. Just kidding, but seriously that's a lot of annoying pop-ups. Anyway not really a data structures issue. More of a Unity, or even general UI question IMO. I'll leave that for others :)

 

Funny enough, right after I responded I had the same thought as you. So I streamlined it to where you just open a menu on your turn, or you just click an enemy and attack.

Right now, the only thing I have to do is create the actual attacks, and I think I can do that by coding individual attacks that I can place on a unit (or maybe a class for a unit) and then they can access that move (hopefully).

This topic is closed to new replies.

Advertisement