Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jul 08, 2013 at 03:33 PM by AlucardJay for the following reason:

Question is off-topic or not relevant

avatar image
0
Question by geroppo · Jul 07, 2013 at 02:41 AM · classesrpgdesign

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

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image geroppo · Jul 07, 2013 at 02:44 AM 0
Share

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

avatar image AlucardJay · Jul 08, 2013 at 03:33 PM 0
Share

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.

  • http://forum.unity3d.com/

  • http://answers.unity3d.com/page/newuser.html

  • http://video.unity3d.com/video/7720450/tutorials-using-unity-answers

1 Reply

  • Sort: 
avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges