- Home /
Question is off-topic or not relevant
Abilities design class in a clasic RPG
Hi there, first of all, what i mean by "clasic RPG" is something like final fantasy 1 2 3 etc, where in their battle system you had a simple menu with "Actions" or commands, and each command made a different move or action. Im struggling in how could i design these commands in a way that can be efficient and easy to manage.
What i first thought is make a base class for all abilities , and then make one class per ability ( of course that if 100 magics are the same in functionality, i would use that same class for everyone). But that left me with over 50 clases ( or even more in the future ) of abilities to manage, and didn't seem right to me. Then of course i could just make 4 o 5 classes for base abilities, i.e :
A magic is just an animation that does damage (among other things) so i could just derive from the base class one called "Magic" and just make instances of that. but that would limit me from making new or innovative spells ( if i would like spells to apply some effect, that would be another class derived from magic ), but again, seems too "reestricting" or maybe im being paranoid.
Is there a "standard" or some common approach to this kind of things ?.
Thanks in advance
lol now that i read what i wrote one more time, i noticed that the 2 examples i gave are basically the same, sorry for that :P
Sorry, but your question is not suitable for Unity Answers. Please use the Unity Forum for discussions such as "How to ...". Unity Answers is here to help you solve any specific problems you have.
Answer by tw1st3d · Jul 08, 2013 at 03:28 PM
You will want to create two enums,
enum Physical {};
enum Magical {};
Base your skills off of the knowledge that they are either one or the other, then build a set of parameters for Physical and Magical.
Follow this Question
Related Questions
How should I begin to program an rpg? 1 Answer
Where to put debug methods and variables 0 Answers
How should i program my rpg? 0 Answers
rpg, skills and characters the structure, confused 0 Answers
Tetris Unity game structure C# 3 Answers