I am making an idle game involving loot collection, crafting of items, and outfitting heroes.
I want the items to be somewhat complex for depth of gameplay/planning. Think Diablo/POE. The mods must have a stat type (e.g., health), value (e.g., 5), range (e.g., 0-10), level requirement (e.g., 1), string for displaying text on the item (e.g., "adds X to maximum health"), tier (having a different range), etc. and more. Some of these are necessary for the crafting features of the game, e.g., reroll the value within the mod range or change the mod for the same mod type but a different tier.
I always though I'd have an excel-like large table of mod data. I can write simple functions to select random rows of that table to generate a mod, or filter the mod table based on conditions (e.g., drop zone, level requirement, etc.). However, I have no clue how to set up a data table in C#/unity and cannot find any tutorials for that.
My questions:
- am I going about it in the wrong way? Should I not be thinking about an excel-like data table? I suppose I could alternatively make each mod as a scriptableobject and add them to a list of modpool, but would this be easy to manipulate (e.g., to filter the mod pool)?
- if a data table is a viable approach, how can i set one up? I am aware of multidimensional arrays [,,,,] but am I relegated to manually writing up each row of mod data in the array?
- where should I store my mod pool data? right now, i dont know where else i would store it except in a script attached to a gameobject or scriptableobject as mentioned above.
I am a beginner, so please let me know if I'm not even asking the right questions.
