Help - Search - Members - Calendar
Full Version: Creating a Portable Character Format
Dumpshock Forums > Discussion > Shadowrun
Kagetenshi
I'm looking to create a specification for a YAML representation of any legal SR3 character. I've made half-hearted attempts at it before, but it's actually a surprisingly tricky endeavor, at least if you want to avoid losing a bunch of information.

I'm planning to do this in two general phases, each comprising several stages: first, by formally specifying key parts of characters like attributes, skills, metatype, so on and soforth, working from the inside out to create a complete character, and second by working from the outside in to take gearlists originally specified as lists of strings and change anything that should hold information in and of itself into a structure with a specification of its own.

While I'm eventually planning on producing a proper BNF specification, for right now it'll be just descriptive text.

So the first thing I need from the community is help specifying primary attributes (Body, Quickness, Strength, Intelligence, Willpower, Charisma). This gets made meaningfully more complicated by the existence of Otaku, who have their RML modified without a corresponding bonus to the attribute, and by the fact that some things add attribute points (permanently or temporarily) but don't affect skill cost or pool size. Does anyone see any additional information that needs to be preserved other than the following? The structure is what I plan on using, but all values are strings giving information on what data type should be present in actual attribute data. Where data has additional constraints not reflected in formal datatype, I've noted it in parentheses.

CODE
%YAML 1.1   # Character specification
---!Primary_Attribute

attribute_name: "Unicode string"

natural_value: "Integer (natural number <= rml)"
augmented_offset: "Integer" # offset from natural value due to cyberware or other causes that do not affect pools or training costs. Optional, default = 0
temporary_offset: "Integer" # offset from temporary causes that affect pools but not training costs. Optional, default = 0

rml: "Integer (natural number)" # including modifiers from metatype or high values of Infirm. Optional, default = rmax. One of the two must be specified.

rmax: "Integer (natural number >= rml)" # optional, default = ceiling(1.5*rml)


...


Anything I missed?

~J
Kagetenshi
I've written some examples, which have helped me make modifications to my specification; see the changes above.


CODE
%YAML 1.1   # Character specification
---!Primary_Attribute # Strength for an average human

attribute_name: "Strength"

natural_value: 3

rml: 6

...
---!Primary_Attribute # Strength for a human Otaku

attribute_name: "Strength"

natural_value: 3

rml: 5

...
---!Primary_Attribute # Intelligence for a human Otaku

attribute_name: "Intelligence"

natural_value: 7

rml: 7

...


More examples later.

~J
Ryu
You might want to save the specific use of the augmented offset. Body at least might have several offsets (damage resistance, endurance come to mind).
Kagetenshi
Ugh, you're right—those and the Dwarf's resistance-to-toxins schtick. That information might be better stored elsewhere, though, since it's not really part of the stat and it would make the number of special values balloon (one for "only damage resistance", one for "only disease/toxin resistance", one for "only for spell resistance", etc. etc. etc.)—I'll have to think about it.

Thanks for pointing that one out.

~J
Ryu
Hmm. Didn´t think of that, but couldn´t you derive that from race if need be? I´m afraid I don´t know YAML.

Glad to be of service smile.gif
Ryu
One nights sleep later...

I don´t know exactly what you are trying to achive. If your concern is saving data without loss, all information is secured if you save current attibute value and RML - the race and ware information would allow you to derive all special case - modifiers.

If your concern is storing data in a directly readable format it gets tricky. I´d suggest taking important pools (DR, maybe toxin resistance) and define them in their own section as secondary values. Is it possible to allow for case-by-case extensions of the basic format?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Dumpshock Forums © 2001-2012