Hello, I’m trying to figure out how I should best store information (using C#) to use during instantiation of a prefab or a weapon or item. Originally I thought XML, but am not sure if that is the best option (I know the basics of XML, only).
The information for each item I’m looking to store is similar to this:
- Name: “Butter Knife”
- WeaponType: “Dagger”
- DamageType: “Stabbing”
- Named: false
- BaseDamage: 5
- CritChance: 15
Etc. I’ve figured out how to pull this information into an instantiation call, so I just need to figure out how to get this out of a file.
My goal is to be able to write functions along the lines of ‘generate random dagger’ or ‘generate random stabbing type weapon’, so I’m also looking for a way to get handles on this information. I assume no matter where I store the information, I will need to put it all into some kind of index.
I don’t want to hard code this, but keep it in another file for ease of access and editing. Could anyone point me in the right direction or give me some ideas? I’ll be honest, my searches are mostly coming up with information on inventory systems overall, so I’m not finding much.
Thanks for your time!