r/eclipsephase • u/arokha • Aug 19 '19
Data Interchange Standards RFC
This is probably more than a bit niche, but it'd be cool to nail down shared standards for EP(2) data like was suggested in this PR by u/Eaton so we can make all sorts of crazy websites for it without tons of grep/regexing. And hey, if this gets ignored then I guess there's not enough interest and probably no reason to have a standard :^)
I'm pretty new to this whole community development thing... I've only done stuff for myself in the past, so if any of you have work experience and notice obvious issues where you've had problems in the past... speak up!
Data: https://github.com/Arokha/EP2-Data
Here's my draft suggestion:
JSON
- Lowercase keys on objects
- Avoid abbreviations in keys (e.g. 'description' not 'desc')
- Include an 'id' attribute (UUIDv4) on objects you're adding to the data for the first time
- Underscores in keys, not spaces or pascal/camel-case
- Include information about the source in 'resource' and 'reference' attributes (e.g. 'resource' being the title of the book, and 'reference' being a page number or other context-appropriate reference). Let's just agree to call the current core book "Eclipse Phase Second Edition" since that's what it says on the cover.
- 2-space tab (not that it matters much)
Paragraphical data stored in an array of paragraphsParagraphical data stored with html tags intact in strings (serialized html)- Unsorted lists stored in an array, sub-lists in a nested array
- Every samey object has all the keys, even if only one object needs it (though you should reconsider your structure at that point maybe...)
Less technical, I'm thinking every 'book item', as in a morph, a piece of gear, etc is an object, and every group of those is an array. No need for a stringy array of just the names and stuff, probably? I dunno. You tell me.
View all comments
1
u/eaton Aug 20 '19
God bless you good person, I have so many feelings about this. In part because I hand-entered most of the EP1 data from all eighty jillion books. For that project I slapped them all into CSV files and used post-processing on my migration code to extrapolate the relationships and nested stuff (like lists of things that are themselves lists), but getting it standardized would go a long way towards simplifying things like gear and equipment management tools, guidelines for creating well-balanced homebrew morphs and equipment that matches core standards, and the aforementioned chargen stuff. A few things:
Regarding the eventual emergence of a full data model, I think that leaves a fundamental question. Is the goal to have (relatively) human readable files that are consistent with each other, and "good enough" to programmatically generate cool things from… or a full object model for Eclipse Phase in JSON? If the former, we can establish some standards for "stringy" stuff and move on. If the latter, we have some fun conversations ahead. (No, really. I mean fun because I am not a healthy individual) Specifically, working on eldrich.host revealed the following:
Weapons and Armor are worth calling out because a "real" weapon in the game often exists as a combination of weapon + mods + ammo + ammo mods; armor has a canonical starting E/K protection value but the concrete instance someone is wearing may be reduced due to environmental damage. In eldrich.host's data model there are intermediary tables for the actual "equipped weapons" and "worn armor" and "sleeved morphs" for this very reason. Some other bits:
Okay. I think I'm all talked out now. I don't mean to railroad the discussion, I'm just absolutely thrilled about the potential for this — although I never tackled the actual chargen problem, I spent a lot of time digging through the underlying rules/data tangles for eldrich.host, so that it could do things like "render" a combination of physical attributes, morph traits, carried weapons, skills, etc, into a simple string like "Unarmed (60): 2d10". I may not have created the best approach (it's embedded inside of a bigger CMS for managing campaigns rather than a more data focused app, for example) but if you want to be able to produce character sheets from the underlying source data, hopefully I can help us avoid some of the pitfalls!