I was thinking about doing a big SRPG and I thought I'd just store everything in a HUGE array, that way it's very easy to parent objects to creatures and stuff like that. As for how I was gonna' access the stats I was going to use a set of CONSTs as offsets within the array structure, ie.
strength = entity (id,STAT_STRENGTH)
Where id is just the id of the creature and STAT_STRENGTH the constant. The only problem with this approach is that all your data has to be of the same type (no doubt integer in an RPG I would think) so things like name$ would have to be dealt with separately. Though in mine the would be a very finite number of names as it was really a wizard against a load of creatures who'd all be "skeleton"'s or "zombie"'s.
As for how I was going to store the default settings for everything, I was gonna' opt for text files with a parser, just because it's a really nice and readable way to store stuff and you can edit the values very easily that way.
But that's just me. What do I know? :)
strength = entity (id,STAT_STRENGTH)
Where id is just the id of the creature and STAT_STRENGTH the constant. The only problem with this approach is that all your data has to be of the same type (no doubt integer in an RPG I would think) so things like name$ would have to be dealt with separately. Though in mine the would be a very finite number of names as it was really a wizard against a load of creatures who'd all be "skeleton"'s or "zombie"'s.
As for how I was going to store the default settings for everything, I was gonna' opt for text files with a parser, just because it's a really nice and readable way to store stuff and you can edit the values very easily that way.
But that's just me. What do I know? :)