[A16][WIP] Backstories

Started by AngleWyrm, March 24, 2017, 05:05:16 PM

Previous topic - Next topic

AngleWyrm


Quote from: leonlim007 on April 02, 2017, 12:54:10 AM
I dun remember the first post looks like what it is now... maybe I didnt read carefully the first time round~ Go Go Go!!!

Development is a long walk, and an entertaining journey for those who enjoy it.

I've updated the first post screen shot and attached data entry xml to show the current state of the work.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

dburgdorf

Quote from: dburgdorf on April 01, 2017, 12:26:01 PM
Quote from: Dragoon on April 01, 2017, 11:44:36 AMI was kinda hoping this would be more a revival for the mod that just allows us to add backstories rather then, just an easier way to add ours to a mod that edits them.
So, am I understanding correctly that you'd be interested in a mod which allows you to add backstories to the game, without offering any ability to edit or modify the pre-existing backstories? Such a mod would be a fairly trivial to create (perhaps as a "Lite" version of "Editable Backstories")....

In addition to updating the base version of "Editable Backstories," I also just went ahead and released Editable Backstories Lite, which allows you to add backstories and names to the game, but doesn't allow you to edit or delete anything from the default database.
- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Dragoon

Quote from: dburgdorf on April 02, 2017, 11:51:28 PM
In addition to updating the base version of "Editable Backstories," I also just went ahead and released Editable Backstories Lite, which allows you to add backstories and names to the game, but doesn't allow you to edit or delete anything from the default database.

Thank you so much. I just have to say this. I agree with you mod personally I have seen Countless backstories that I wish weren't for certain people and even ones that completely conflict, to the point where they cancel each other out in every way. However at the same time, I do understand the vanilla ones (some of them) being the way they are and I don't wish to touch on them, I just wanna add my own. So thank you for taking the time to make a lite version.
Quote from: faltonico
I truly can't understand that sense of balancing a LOT of modders have, pouring more resources on something doesn't make it more difficult, but more annoying. It is not engaging, even if i'm swimming in silver at late game ¿why to bother?, why all the effort to get there?.

The-Eroks

Quote from: AngleWyrm on March 24, 2017, 05:05:16 PM
The underlying structure of the supporting data is going to be such that the values presented on-screen are drawn from the set of values the player has in their mod collection. Maybe there are new traits, or new ranges for values. Whatever the case may be the data itself shouldn't be hard-coded but instead imported from the game state.

Excellent. I think this feature will make it very accessible/usable for the rest of the community... keep up the great work!

AngleWyrm

#49


I've been working on formalizing the relationships between the various pieces of data, currently the traits definitions. Both the backstory and the trait XMLs refer to work types, so it makes good sense to separate work types out into it's own definition. That way both XMLs can refer to one set of work types.

Don't get hung up on the API that the game engine expects to see; translation is a trivial task.

There are a couple elements in a traits record I'm still trying to make sense of, commonality and commonalityFemale. Anyone have information on their purpose?



My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

AngleWyrm

Applying the game rules to the data structure
I'm pretty sure that for SingleTrait record types the commonality tag is a probability in the range (0..1], and for SpectrumTrait record types the commonality tag is fixed at 1.

For the commonalityFemale override tag, the same (0..1] range seems most likely.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

AngleWyrm

#51

Unfortunately the editor I was using, Liquid XML Studio 2017 Community Edition, turned out to be crippleWare. The graphical XML interface isn't available in the community edition, making it little more than an XML text editor with a rather long load time.

So I've downloaded Oxygen XML Editor that has the option for an academic license. Maybe this one won't devolve into a text editor in a month. The graphics are a bit more wordy and it looks like I'll end up post-processing svg->png, but the schema production process seems a bit more clear as well.

So here's a Traits collection that contains a set of (1..unbounded) Trait records. Each record has a TraitID attribute that is of the standard XML xs:ID type to provide uniqueness. The TraitsCollection uses a constraint that the Trait elements within it are keyed to the Trait/@TraitID so there's no duplicates in the collection.

TraitsCollection/Trait/@TraitID is synonymous for
what the API calls TraitDefs/TraitDef/defName
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

AngleWyrm

#52

Schema
Ok, so here is a schema that manages to record a complete backstory.

There's still plenty of development and error-catching to do yet
  • Traits are just a string field so anything can be typed in there
  • Enumerated data types such as faction, work and skill may appear multiple times
  • Conflicting work, skills and traits may appear, although some of that behavior is ok

Currently I can generate random backstory XMLs that meet this loosy goosy specification.

Next step is to implement the editor using this schema.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

AngleWyrm

#53

A rendering of the Rimworld backstory API.

This isn't yet a complete expression of what the game engine expects of story input, as the title wants to have only the first letter capitalized.

It appears to be something like an XQuery of the form functx:capitalize-first('Hello World'). Soon as I figure out how to inegrate that, I'll update the schema.

It could be done with a pattern match to a regex "[A-Z][a-z]*", but that breaks language support.

Besides, what if there's a language that doesn't have capital letters? To them, an extra symbol set would seem redundant; maybe a philosophical conversation for a fireside chat over brandy with an Orassian.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

WalkingProblem

Quote from: AngleWyrm on April 10, 2017, 11:21:16 AM

A rendering of the Rimworld backstory API.

This isn't yet a complete expression of what the game engine expects of story input, as the title wants to have only the first letter capitalized.

It appears to be something like an XQuery of the form functx:capitalize-first('Hello World'). Soon as I figure out how to inegrate that, I'll update the schema.

It could be done with a pattern match to a regex "[A-Z][a-z]*", but that breaks language support.

Besides, what if there's a language that doesn't have capital letters? To them, an extra symbol set would seem redundant; maybe a philosophical conversation for a fireside chat over brandy with an Orassian.

this is deep....