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
1
Question by hardmode2236 · Nov 25, 2013 at 05:54 PM · objectdataconstruction

where do i save premade objects?

in my rpg i need to use my armor class to construct a premade piece of armor. like how in the elder scrolls series they have premade armor sets(iron, steel, ebony, etc) my question is: where do i save the info required to construct those armors? is there separate files that hold info on constructing items. or would all that info be stored the armor class's constructor, ready to be constructed via some parameter like:

var steelBoots = Armor("Steel Boots");

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer Wiki

Answer by PhilRousse · Nov 25, 2013 at 07:06 PM

It's really depend on how do you plan to organize your game. Without more information, here how I would achieve that.

Let's start by a character (Class character). He got base stats (HP, MP, ATK, DEF...). Eventually, these base stat get modified at level up. The character also got equipment that add up to these stats.

The equipment are store in an array or dictionary inside your character. Your equipment should all have the sa,e base class or implementing an interface to allow polymorphism. When these item are created, they go seek the data into an XML file containing all the stats, description, image path, model name, etc.

XML are a standardize way to store data. Here some link on the subject:

  • Unity Answers - Easy XML Parsing

  • Unity Noobs - Loading data from a xml file.

If you need more specific information, please comment.

Comment
Add comment · Show 2 · 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 hardmode2236 · Nov 26, 2013 at 12:32 AM 0
Share

i think i got all that, but i'm not sure what an X$$anonymous$$L file is. I can just Google that though, thanks for taking the time :)

avatar image PhilRousse · Nov 26, 2013 at 02:05 PM 0
Share

Updated the anwser with more info on X$$anonymous$$L and Polymorphism.

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

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 to access the data in a list that save any class inside 1 Answer

Adding data to a set of transforms 1 Answer

Is it possible to use a custom object in java (my WeaponObject) as a data type (like Vector3) 1 Answer

Constructing an object from prefabs 0 Answers

how to store data (Varibles) without losing them each scene? 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