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 /
avatar image
0
Question by WesterlyCarrot9 · Mar 12, 2013 at 10:26 AM · c#characterclassrpgstatistics

Simplest way for some stat presets for RPG classes?

So let's say that the game has three classic RPG character classes like Figher,Archer and Wizard. Which is the easiest way to make some stat presets for them? And by stat presets i mean for example entering the character creation screen and to have 3 GUI Buttons and each one of them creates a character with a certain preset of stats. For example:

Figher:

Strength:12 Vitality:10 Dexterity:9 Wisdom:8

Healer:

Strength:8 Vitality:9 Dexterity:8 Wisdom:12

Archer:

Strength:9 Vitality:10 Dexterity:12 Wisdom:10

I read somewhere about a simple way which was to make a txt file outside of Unity with the stats you want and then import it into Unity using the TextAsset or something like that.

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 Professor Snake · Mar 12, 2013 at 10:30 AM 1
Share

I might be misunderstanding the question, but wouldn't the usage of a simple int array for data storage be enough? If you want to save and load the stats to and from somewhere, i can write an answer with some exemplary code.

avatar image WesterlyCarrot9 · Mar 12, 2013 at 10:45 AM 0
Share

To be honest i don't really know exactly what's that you are talking about but from the name of it.."data storage" i think it might be what i am looking for. Well, imagine that you enter a game and you press the "Create Character" button and then the classes show up and you choose the one you want to play with. But the only thing you can edit at that time is the name of the character. The stats are different presets for each class. The only time you will be able to spend some "attribute points" will be when you level up and you will have let's say 5 of them to spend. Like the Diablo series. Diablo 1 and 2 you know :)

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by BerggreenDK · Mar 12, 2013 at 11:26 AM

I usually create a "class" with properties/variables.

You could easily make a "class Character" as stated.

Just add a private variable for each property of the class + a variable to control what type this character is, or you will need a character class pr. type.

Regarding presets, if these arent supposed to be edited ever, you can just build a function that based on a parametre, initializes the variables on your class instance.

Comment
Add comment · Show 1 · 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
avatar image WesterlyCarrot9 · Mar 12, 2013 at 12:40 PM 0
Share

Could you give me an example? :)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

13 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

Related Questions

How do you make RPG class stat presets? 1 Answer

Creation of RPG Class Stat Presets? 1 Answer

Character Attributes Question 1 Answer

Multiple Cars not working 1 Answer

Question about classes C# 1 Answer


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