Ludeon Forums

RimWorld => Mods => Unfinished => Topic started by: AngleWyrm on March 24, 2017, 05:05:16 PM

Title: [A16][WIP] Backstories
Post by: AngleWyrm on March 24, 2017, 05:05:16 PM

First look at the editor componant
The purpose of this tool is backstory authorship. It is being designed so that the story writer has no need of programming knowledge, and it should run on virtually any browser-capable device.

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.

There is also self-correcting error catching going on both in front and behind the scenes. The data files generated by the editor are an intermediary between the game's API and the user's story. This prevents a variety of hasty errors and troubles that arise in direct editing of the game files. It also insulates the editor from changes in the API, thereby future-proofing it from modifications as Rimworld evolves.

There will be an edit window in the browser, and a display window so the artist may verify that what they intended to create was indeed what they created. Once they are satisfied with the production there will be an option to export to game.

The preview mock-up on the right is attached as data entry form *.htm that should just work in your browser by clicking on it.

Also attached is the complete collection of backstories from Basic, Tribal and Storybook in a readable format for easy searching.

(https://s6.postimg.org/oljwvew9d/screenshot.jpg)

[attachment deleted by admin due to age]
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 24, 2017, 06:54:01 PM
So... what exactly are you planning to do?

Are you going to try and create an application that makes it easy for players to write backstories for this mod (https://ludeon.com/forums/index.php?topic=30749.msg317704#msg317704) without any actual xml experience? Or did you change your mind?

It's nice and all that you provide us a screenshot and some files but it would be a lot better if you properly described your goal first. This is a new thread, after all. How else would people that visit this page know what this is in the first place?


And you finally edited your first post, thanks.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 25, 2017, 10:01:07 AM

Data Engineering

This is a fairly good representation of the information contained in a backstory record, but it has a ways to go before it reaches the structural integrity of normal form (https://en.wikipedia.org/wiki/Database_normalization) for a database record.

Some of the things that can be addressed through well-formed design (some of which are already in the game engine)
  • It is possible to specify a required work type, such as Intellectual and then also declare that work type to be forbidden.
  • That same issue occurs again with the character traits.
  • The set of traits available aren't random strings, but drawn from a pool supplied by the game and it's mods.
  • The key that identifies a backstory in the set of all backstories can be enforced as unique
  • The tag specifying a story belongs to the set of adults or children is better than the optional but redundant separation of those two categories into two different files.
These aren't all issues to be resolved by the game engine (although some have been), which can be considered legacy technology through which to interface. Thus the separation through mapping from game representation to something that can be tuned to include validation of expected inputs, which can then be mapped right back into the game representation for use by the engine.

Two Questions
  • Why is there a third optional declaration for body type, beyond the set for male and the set for female?
  • There is what appears to be a potency factor attached to traits, with a five-point range of -2 to +2. Any details on the effect?
(https://s6.postimg.org/gz613s1jl/Authorship.png)
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 25, 2017, 12:05:50 PM
Quote from: AngleWyrm on March 25, 2017, 10:01:07 AMThis is a fairly good representation of the information contained in a backstory record, but it has a ways to go before it reaches the structural integrity of normal form for a database record.

As I've endeavored to explain to you repeatedly, you CANNOT simply alter the tags and organization of an XML file arbitrarily and expect it to work. My "Editable Backstories" mod reads XML files that are structured in the same manner as the default backstory data files. Whether you like that structure or not doesn't change the fact that that structure, and that structure alone, is what the code will recognize and read.

Quote from: AngleWyrm on March 25, 2017, 10:01:07 AMThe tag specifying a story belongs to the set of adults or children is better than the optional but redundant separation of those two categories into two different files.

There's already a tag in the XML files that defines whether a backstory belongs to the adult set or the child set. It's the "Slot" tag. The "ageGroup" tag with which you've replaced it WILL NOT BE UNDERSTOOD by the code. I really don't see how this is a difficult concept to grasp.

As to the "redundant" separation of the definitions into separate XML files, that's something I did because it was an easy way for me to keep the data files organized. As I mention in the mod's documentation, though, you can have as many or as few XML backstories as you see fit, organized in whatever way works for you. You could have all your backstories in one single, very large file, if that's what you prefer. You could even have a separate XML file for each backstory if you really wanted to. You can organize the files in whatever way you see fit, but you still have to make sure the individual XML definitions are correct.

Quote from: AngleWyrm on March 25, 2017, 10:01:07 AMWhy is there a third optional declaration for body type, beyond the set for male and the set for female?

The global declaration can be (but doesn't have to be) used instead of individual male and female declarations if you want particular backstories to always be attached to "Fat," "Thin" or "Hulk" pawns.

Quote from: AngleWyrm on March 25, 2017, 10:01:07 AMThere is what appears to be a potency factor attached to traits, with a five-point range of -2 to +2. Any details on the effect?

Some traits, such as drug dependency and movement speed, are "spectrum" rather than singular traits, with various values possible. This is one of several points I'll be addressing in more detail in expanded documentation in the next release, but in the meantime, if you simply look at the core game's traits definition files, you'll find everything you need.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 25, 2017, 02:49:18 PM



(https://s6.postimg.org/towu81975/assassin.jpg)
Quote from: dburgdorf on March 25, 2017, 12:05:50 PM
As I've endeavored to explain to you repeatedly, you CANNOT simply alter the tags and organization of an XML file arbitrarily and expect it to work.
Here's a quote from the author of a book on the subject. Click the cover art if you wish to read it.

Quote from: Michael KayXSLT (Extensible Stylesheet Language: Transformations) is a language that, according to the very first sentence in the specification (found at http://www.w3.org/TR/xslt20/), is primarily designed for transforming one XML document into another. However, XSLT is also capable of transforming XML to HTML and many other text-based formats, so a more general definition might be as follows:

XSLT is a language for transforming the structure and content of an XML document.
(https://s6.postimg.org/4lt6wvbv5/cover.png) (http://197.14.51.10:81/pmb/INFORMATIQUE/XSLT2.0%20and%20XPATH%202.0.pdf)
(https://s6.postimg.org/gntmo4rf5/Rimworld_API.png)

To the left is an image of what we might call the Rimworld API, the data structure as the game presents and understands it. To the right is an image of a transform from the API to another potentially different arrangement.
(https://s6.postimg.org/jueiwwg5t/Adults_to_Authorship.png)


Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 25, 2017, 03:53:14 PM
Quote from: AngleWyrm on March 25, 2017, 02:49:18 PMHere's a quote from the author of a book on the subject.... XSLT... is a language that... is primarily designed for transforming one XML document into another.

At this point, I honestly hope you're trolling.

Sure, you can transform one XML document into another. But when you do so, the new document WILL NOT BE UNDERSTOOD by code designed to read the old document, because the tags in the new document WILL NOT BE the tags the code is expecting.

You can easily verify this by trying to use your "transformed" XML backstories file with my mod, and seeing for yourself the long list of errors which will show up in your log file as a result.


Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 25, 2017, 05:24:31 PM

(https://s6.postimg.org/3k9595xzl/moxxi.jpg)Can't say he didn't have an opportunity.

Meanwhile back at the ranch, I've compiled documentation for the backstory API as presented by Rimworld to and from data consumers. It's html; as always just start at the index of the root directory. Lemme know if I've missed anything ;)

One of the oddities that comes up in backstory creation is that authors have differing ideas about favorite skills, and so the distribution of buffs/debuffs in the backstories is unlikely to be a neat mathematical model, instead reflecting various biases.

It may be useful to tabulate how the skills are distributed, and use the sight of that as part of the character backstory creation process. This sounds like a job for transforms :P

[attachment deleted by admin due to age]
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 25, 2017, 08:50:41 PM
(https://media.giphy.com/media/OYgcKl4X7fvyM/giphy.gif)

What I like the most is that you try so hard to seem like a professional, yet anyone with the least amount of modding experience knows you have no idea what you're doing.

(https://media.giphy.com/media/tFK8urY6XHj2w/giphy.gif)

As Dr. Pingas Robotnik would say: "Happiness is so much more enjoyable when it's based on the misery of others."

(http://orig03.deviantart.net/6083/f/2014/100/6/2/pingas_seal_of_approval_for_phantom_games__by_imacg4-d7dxniy.jpg)

Please do continue. I want to see the part where you realize this and actually improve, too. Dunno how long will that take, though.

Now where's my second popcorn?
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 26, 2017, 02:15:04 AM

(https://s6.postimg.org/yubacc8gh/Tink_Kickin_Ass.jpg)Skills Distribution (https://drive.google.com/file/d/0B56ASdbmNsIoV1NkVUtFNlZua0U/view?usp=sharing) spreadsheet with pages by skill, by adjustment, and 2-D view.

No humans were forced to hand-type data for the above spreadsheet, and the Robot Council of Fair Practice between Humans and Machines has been appeased of their complaint for infringement on duties more suitable to machines.

Observations
  • The set of adult backstories doesn't have any -1s to skill.
  • There's an unusually large proportion of bonuses to melee
  • Mining and Cooking are under-represented
If taken as equally likely, the set of basic adult backstories doesn't match the typical needs and uses of a prosperous colony.
(https://s6.postimg.org/xtga6hbrl/buff_x_count.png)

Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 26, 2017, 10:10:08 AM
Quote from: AngleWyrm on March 26, 2017, 02:15:04 AM
There's an unusually large proportion of bonuses to melee
That might be because it's the hardest to train of all skills. Additionally, the majority thinks melee is underperforming compared to ranged.

Quote from: AngleWyrm on March 26, 2017, 02:15:04 AM
Mining and Cooking are under-represented
High mining skill is one of the least important things. It can also be trained extremely easily in all biomes but one, and in that one you don't use it anyway since there are no rocks.
Cooking is used from the start, throughout the lifetime of a colony and therefore trains constantly.

It's almost like you can't just balance the average skill point distribution by mathematically equalizing everything. I wonder why.  ::)  ::)  ::)

Quote from: AngleWyrm on March 26, 2017, 02:15:04 AM
If taken as equally likely, the set of basic adult backstories doesn't match the typical needs and uses of a prosperous colony.

It's almost like backstories weren't balanced for lategame when you can train anyone in most skills easily. I mean, it's totally not because preset skill levels matter the most for earlygame. Nope, not at all.  ::)  ::)  ::)

(https://media.giphy.com/media/3o7abu6MhmCNxqUT4I/giphy.gif)
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 26, 2017, 11:35:39 AM
(https://s6.postimg.org/k4vor3qhd/Hotties_And_Notties.png)Finished the schemas for Rimworld API and backstories authorship. When writing a new xml of backstories, associate it with the backstories authorship schema and most modern editors will offer prompts for the next valid tag, and value ranges for enumerated data types.

The data mappers (both *.dm and *.xslt) are for translating the human-readable xml to a game-readable xml. I've tried using it to translate the example code below and then copy/pasting from the output file to the end of the adults xml and it works fine in-game. More automation to come.

If you're working directly with a game-readable xml, associating the Rimworld API schema should provide similar but less legible results. Also, you take full responsibility for mucking about in your game files if you do so.

Here's an example of what it looks like to type a backstory with the Backstories Authorship schema associated:<?xml version="1.0" encoding="UTF-8"?>
    <backStories xsi:noNamespaceSchemaLocation="file:///C:/Documents%20and%20Settings/Jonathan/Desktop/Rimworld/Backstories/Schemas/Backstories%20Authorship.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

        <backStory storyID="Leader1">
            <title>Leader in Botany</title>
            <shortTitle>Botanist</shortTitle>
            <description>NAME is a recognized leader in the field of botany.</description>
            <ageGroup>Adulthood</ageGroup>
            <eligibleFactions>
                <faction>Civil</faction>
                <faction>Raider</faction>
                <faction>Slave</faction>
                <faction>Trader</faction>
                <faction>Traveler</faction>
            </eligibleFactions>
            <workPrerequisites>
                <work>PlantWork</work>
                <work>Animals</work>
                <work>Caring</work>
            </workPrerequisites>
            <skillChanges>
                <change>
                    <skill>Growing</skill>
                    <adjustment>+3</adjustment>
                </change>
                <change>
                    <skill>Animals</skill>
                    <adjustment>+2</adjustment>
                </change>
                <change>
                    <skill>Medicine</skill>
                    <adjustment>+1</adjustment>
                </change>
            </skillChanges>
</backStory>

</backStories>


[attachment deleted by admin due to age]
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 26, 2017, 05:46:41 PM

(https://s6.postimg.org/kycvxglw1/Harley.png)

The <Defs> tag doesn't mind attributes, and the game carries on parsing backstory xmls just fine. So it's possible to place unique IDs in the tag as an attribute, which is the normal way of assigning IDs.

For example, <Defs storiesID="MyBackstoriesCollection"> is an acceptable node as far as the game is concerned.

Which begins to look like support for multiple sets of backstories.
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 26, 2017, 08:19:59 PM
Quote from: AngleWyrm on March 26, 2017, 11:35:39 AM
The data mappers (both *.dm and *.xslt) are for translating the human-readable xml to a game-readable xml. I've tried using it to translate the example code below and then copy/pasting from the output file to the end of the adults xml and it works fine in-game.
FINALLY! Took you long enough. You should've started with this instead of making fancy databases of existing backstories or posting mostly irrelevant pictures noone cares about. (No, I'm not talking about your obsession with random female pictures in every post you ever make, I got used to that already. I'm talking about all those pictures containing data which you describe in your posts anyway, effectively repeating yourself over and over.)

Starting with compatibility, then adding functions while relentlessly testing compatibility. That's how it should've been from the start. You've finally reached the point where you added compatibility, good job.

(https://media.giphy.com/media/b9aScKLxdv0Y0/giphy.gif)

Took you severeal days, though.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 27, 2017, 05:59:07 AM

(https://s6.postimg.org/vve7m88nl/tease.jpg)Yes, well File/Save-As is an important feature and it seemed pretty obvious that a lossless information mapping could go both ways.

Colony Leadership & Teaching collection
For the mod Colony Leadership & Teaching (https://ludeon.com/forums/index.php?topic=29847.0) by Nanodalt (https://ludeon.com/forums/index.php?action=profile;u=58544), this is a set of four adult backstories, applicable to any faction. Each backstory gives three bonuses in the form of a primary and two secondary skills that are what that leader can teach.

In order to teach those skills a leader must have skill proficiency of 8+ in them. So when using EdB's (https://ludeon.com/forums/index.php?action=profile;u=11058) Prepare Carefully (https://ludeon.com/forums/index.php?topic=6261.0), the mouse-over that shows the bonuses for a given backstory is helpful in setting up characters that will be able to teach the full range of a given class of leader.

<Defs storiesID="LeadershipAndTeaching">
    <REB_Code.BackstoryDef>
<defName>GeneralW01</defName>
<Slot>Adulthood</Slot>
<Title>Leader in botany</Title>
<TitleShort>Botanist</TitleShort>
<BaseDesc>NAME is a recognized leader in the field of botany, and HIS peer-reviewed work on genetic updates to haygrass has been published in science journals.</BaseDesc>
<requiredWorkTags>
<li>PlantWork</li>
<li>Animals</li>
<li>Caring</li>
</requiredWorkTags>
<SkillGains>
<li><key>Growing</key><value>5</value></li>
<li><key>Animals</key><value>3</value></li>
<li><key>Medicine</key><value>3</value></li>
<li><key>Shooting</key><value>-1</value></li>
<li><key>Melee</key><value>-1</value></li>
</SkillGains>
<BodyTypeMale>Male</BodyTypeMale>
<BodyTypeFemale>Female</BodyTypeFemale>
<SpawnCategories>
<li>Civil</li>
<li>Raider</li>
<li>Slave</li>
<li>Trader</li>
<li>Traveler</li>
</SpawnCategories>
</REB_Code.BackstoryDef>

<REB_Code.BackstoryDef>
<defName>GeneralW02</defName>
<Slot>Adulthood</Slot>
<Title>Leader in science</Title>
<TitleShort>Scientist</TitleShort>
<BaseDesc>NAME is a recognized leader in general science. HE holds several patents on DNA resequencing in live organisms, and HECAP is traveling to a planet where authorization has been given to run experiments with outbreak potential.</BaseDesc>
<requiredWorkTags>
<li>Intellectual</li>
<li>Animals</li>
<li>Caring</li>
</requiredWorkTags>
<SkillGains>
<li><key>Research</key><value>5</value></li>
<li><key>Animals</key><value>3</value></li>
<li><key>Medicine</key><value>3</value></li>
<li><key>Shooting</key><value>-1</value></li>
<li><key>Melee</key><value>-1</value></li>
</SkillGains>
<BodyTypeMale>Male</BodyTypeMale>
<BodyTypeFemale>Female</BodyTypeFemale>
<SpawnCategories>
<li>Civil</li>
<li>Raider</li>
<li>Slave</li>
<li>Trader</li>
<li>Traveler</li>
</SpawnCategories>
</REB_Code.BackstoryDef>

<REB_Code.BackstoryDef>
<defName>GeneralW03</defName>
<Slot>Adulthood</Slot>
<Title>Leader in warfare</Title>
<TitleShort>Warrior</TitleShort>
<BaseDesc>NAME has fought HIS way up through the ranks from squad leader to master seargent, and has led several successful missions teaching the local rebels how to conduct raids.</BaseDesc>
<requiredWorkTags>
<li>Violent</li>
<li>Scary</li>
<li>Caring</li>
</requiredWorkTags>
<SkillGains>
<li><key>Shooting</key><value>5</value></li>
<li><key>Melee</key><value>3</value></li>
<li><key>Medicine</key><value>3</value></li>
<li><key>Social</key><value>-2</value></li>
</SkillGains>
<BodyTypeMale>Male</BodyTypeMale>
<BodyTypeFemale>Female</BodyTypeFemale>
<SpawnCategories>
<li>Civil</li>
<li>Raider</li>
<li>Slave</li>
<li>Trader</li>
<li>Traveler</li>
</SpawnCategories>
</REB_Code.BackstoryDef>

<REB_Code.BackstoryDef>
<defName>GeneralW04</defName>
<Slot>Adulthood</Slot>
<Title>Leader in carpentry</Title>
<TitleShort>Carpenter</TitleShort>
<BaseDesc>NAME began HIS career as a construction worker, where HECAP took an interest in design flaws. HECAP went to night school and became an architect to improve upon them.</BaseDesc>
<requiredWorkTags>
<li>Artistic</li>
</requiredWorkTags>
<SkillGains>
<li><key>Construction</key><value>5</value></li>
<li><key>Crafting</key><value>3</value></li>
<li><key>Artistic</key><value>3</value></li>
<li><key>Mining</key><value>-2</value></li>
</SkillGains>
<BodyTypeMale>Male</BodyTypeMale>
<BodyTypeFemale>Female</BodyTypeFemale>
<SpawnCategories>
<li>Civil</li>
<li>Raider</li>
<li>Slave</li>
<li>Trader</li>
<li>Traveler</li>
</SpawnCategories>
</REB_Code.BackstoryDef>
</Defs>
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 27, 2017, 10:21:30 AM
Your insistence that you're somehow converting between human-readable and game-readable XML code is completely ridiculous. All XML code, by definition, is human-readable. There is absolutely nothing in the default backstory files that can't be easily understood by a human being. The only issue is that you simply don't like the tags that are used.

When all is said and done, what you've created is a tool which will take XML files which can already be easily read by human beings and which can also be understood by the game code that has to read them, and convert them into XML files which are no easier for humans to read, but which *can't* be read by the game code... and then convert them back again.

I am underwhelmed.

I assume you've also added some sort of error checking. While error checking is obviously useful, unlike your silly transform-and-transform-back gimmick, I'd point out there there are still potential problems with anything more than basic XML structure validation, which of course doesn't require your tool, anyway.

Any sort of data validation would of necessity be based upon entries which are valid in a vanilla game build. So what happens if, for example, someone wants to create backstories utilizing traits, or skills, or spawn categories, added by mods?

Sorry, but I'll continue to use Notepad or Notepad++ for my XML editing, and will continue to recommend that users of my "Editable Backstories" mod do the same.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 27, 2017, 12:22:12 PM

(https://s6.postimg.org/4m7flgwy9/darkwing.jpg)Oh hi, it's you again -- shouldn't you be out modding something?

You can tell when a mod has reached it's final stages of usefulness to the public when the developer effort is more towards the destruction of their mod's use through nerfs, gameplay vandalism and general distain. I wonder if the same can be said for developers.

My latest iteration of human-readable, attached.

[attachment deleted by admin due to age]
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 27, 2017, 02:11:35 PM
Quote from: AngleWyrm on March 27, 2017, 12:22:12 PMOh hi, it's you again -- shouldn't you be out modding something?

Since, as I'd think would be self-evident, I mod as a hobby, "should" or "shouldn't" really aren't relevant concepts. As it happens, yes, I'm working on updates to several of my mods, but that's hardly something I'm going to do to the exclusion of any other possible use of my time.

And besides, as this little project of yours exists solely in response to and as a supposed supplement for one of my own mods, I feel an obligation to keep tabs on it. And believe it or not, I'd actually be thrilled if you came up with something worthwhile.

Quote from: AngleWyrm on March 27, 2017, 12:22:12 PMYou can tell when a mod has reached it's final stages of usefulness to the public....

Well, as I'm still actively working to make my mods more useful, consistent with the feedback I'm getting from those actually using them, I'm not sure what relevance this comment might have.

I do recall seeing you say essentially the same thing in another thread, though, as part of a diatribe against the entire concept of game balance. The very clear impression I got from that message was that you felt that unless a mod was being developed in a way that allowed you to do more stuff without restrictions or penalties, its developer was "destroying" it. So forgive me if I take your opinion of what constitutes "the final stages" of a mod's usefulness with a pretty large grain of salt.

Quote from: AngleWyrm on March 27, 2017, 12:22:12 PMMy latest iteration of human-readable, attached.

Again, all XML is, by definition, human-readable.  So what you actually mean here is:

Quote from: AngleWyrm on March 27, 2017, 12:22:12 PMMy latest iteration of code that has XML tags that I like, even though they're incorrect and won't work unless you change them back to what they're supposed to be, attached.

Anyway....

So, I take it you're going to completely ignore the actual content of my previous post as regards the pointlessness of a transformation that accomplishes nothing and has to be undone before the resulting file can actually be used, or the problems of hard-coding data validation that doesn't allow for the possibility that other mods might add usable elements?
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 27, 2017, 05:55:48 PM
Ok, so let's recap the short history behind this.

A makes X. B thinks X isn't easily understandable, therefore proposes the creation of Y. A tells B that X is actually easily understandable and Y would achieve little-to-no change. B decides to make Y anyway and, after a few days finishes the basis of Y which is exactly what A predicted would be.

Right now we can see A telling B that he was right (which is indeed the case) while also raising awareness that Y has no mod support whatsoever, further limiting it's usefullness. In response B implies that A probably tries to demote or sabotage Y because he can't make X better or thinks Y is endangering the existence of X.

It appears that B forgot that the sole reason for Y's existence is to serve X, therefore Y's maximum quality is always equal or less than X's maximum quality. B also seems to ignore that X is in no way a finished product; in fact, X is more like a gateway for others to add their content. Therefore the proposition that X can't evolve further is moot; it's up to the user to improve it. Let's not forget that A was right from the beginning: X is easily understandable; Y has no possibility for proper mod support; Y's very existence was unnecessary.

Throughout the conversation between A and B, A tries more and more desperately to make B understand how Y is still unnecessary and destined to be subpar compared to just using X. B continues to ignore this and now is actually mocking A, forgetting that since Y is dependant on X, A has an easy way to screw B and Y over if B becomes pesky enough.

All the while C is watching with a grin and eating popcorn.

(https://media.giphy.com/media/tFK8urY6XHj2w/giphy.gif)
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 27, 2017, 07:02:37 PM
Quote from: Granitecosmos on March 27, 2017, 05:55:48 PMOk, so let's recap the short history behind this....

Even simpler recap: "A" let himself get dragged back into a pointless conversation with "B" that he'd already decided to abandon, until "C" reminded him of just how fruitless the entire silly pissing match actually was.

You'd think after three decades posting to various online forums, I -- er, "A" -- would have learned better.  :D
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 28, 2017, 06:38:49 AM


(https://s6.postimg.org/dhhgnh0i9/crafter.png)
Please find a way to get back into the game
  • I seem to recall some interest in working with data tags (https://ludeon.com/forums/index.php?topic=30749.msg318944#msg318944l) to support the concept of backstory rarity. How's that coming along?
  • There was also an assertion of presenting details on the spectrum mechanic (https://ludeon.com/forums/index.php?topic=31306.msg320977#msg320977) of traits. Where are you on that?

Further analysis of the backstory set
I've combined the Adult and Child story set to get a better overall picture of how the skill adjustments are distributed. In the set of about 250 backstories each skill sums up to 54 +/- 25. There are three outliers to the set: Melee, Cooking and Social.

(https://s6.postimg.org/wg70u561d/skill_adjustments_by_skill.png)
Food service industry backstory collection

To address the shortage of cooks that are seen coming and going in the game, I've made a set of five cook backstories. Two are childhood and three are adulthood, and they can appear in any group of arrivals.

BTW, the file they appear in is irrelevant as far as the game is concerned; it reads the tag not the filename.

Click the attached *.htm to read about them.

Quote from: SpaceDorf on March 28, 2017, 09:01:50 AM
@AngelWyrm ..
This Tool would surely be awesome and quite useful .. but maybe quite the PITA to update if Versions Change to much.
Fortunately the tools I have available make working with changes a breeze.

Some of the data is well-suited to a relational database model: The tags that form enumerated data such as faction types, body types, work types and so on could be better handled as separate look-up tables so that they may change whenever other developers find reason to do so.

Another example is in pulling together the list of mod-able traits, where looking up or entering a valid trait can be different from one user to another.

Lots to do :)

[attachment deleted by admin due to age]
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 28, 2017, 10:04:36 AM
Quote from: AngleWyrm on March 28, 2017, 06:38:49 AMI seem to recall some interest in working with data tags to support the concept of backstory rarity. How's that coming along? There was also an assertion of presenting details on the spectrum mechanic of traits. Where are you on that?

I expect to have an updated version of "Editable Backstories" released before the weekend. The main thing I still have left to finish is the database. I'm roughly doubling the number of backstories in the "out of the box" default data set, and that involves a lot of cleanup work on the entries.

The expanded documentation is mostly complete at this point, including detailed information regarding (vanilla) traits, work types, etc.

The implementation of backstory rarity is already completed. What I've done is add a new (optional) tag to the "spawnCategory" list. Viable options are "Common," "Uncommon," "Rare" and "Legendary." (If undefined, it of course defaults to "Common.")

So, for example, you might define a backstory's spawn categories as:

<SpawnCategory>
    <li>Civil</li>
    <li>Trader</li>
    <li>Traveler</li>
    <li>Uncommon</li>
</SpawnCategory>

In terms of frequency of appearance, assuming an equal number of backstories in each of the four categories in the database, you could expect to see among the backstories of pawns in your game roughly 67.5% common, 22.5% uncommon, 7.5% rare and 2.5% legendary.  Of course, most players won't have equal numbers of backstories in each of the categories. Assuming a more natural set, with more common than uncommon, more uncommon than rare, and more rare than legendary, the appearance percentages will skew more toward the common, with the result that for most players, the distribution of backstory rarities will end up closely matching standard deviations on a normal bell curve. (I bring that up because you did, after all, specifically request it.)

I also have a potential incompatibility issue with "Humanoid Alien Framework" that I need to take a look at, but if that doesn't turn out to be something I can identify and fix quickly, I won't let it hold up the next release.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 28, 2017, 10:28:21 AM

(https://s6.postimg.org/vui1y1az5/blondebraids.jpg)
Quote from: dburgdorf on March 28, 2017, 10:04:36 AM
So, for example, you might define a backstory's spawn categories as:

<SpawnCategory>
    <li>Civil</li>
    <li>Trader</li>
    <li>Traveler</li>
    <li>Uncommon</li>
</SpawnCategory>

Yeah that works. Looking forward to a better understanding of the spectrum mechanic.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 29, 2017, 08:22:35 AM

(https://s6.postimg.org/uy0e3u1n5/ThrumboRider.png)Animal Handlers

After spending some time enjoying leonlim007's (https://ludeon.com/forums/index.php?action=profile;u=71536) Minions (https://ludeon.com/forums/index.php?topic=30647.0) mod, I developed a need for animal handlers and trainers. So many little yellow mouths to feed.

So here then is a collection of five animal handler backstories; two childhood and three adult.

Click the attached *.html to read about them.

[attachment deleted by admin due to age]
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 29, 2017, 09:23:07 AM
Quote from: AngleWyrm on March 29, 2017, 08:22:35 AM

(https://s6.postimg.org/uy0e3u1n5/ThrumboRider.png)Animal Handlers

After spending some time enjoying leonlim007's (https://ludeon.com/forums/index.php?action=profile;u=71536) Minions (https://ludeon.com/forums/index.php?topic=30647.0) mod, I developed a need for animal handlers and trainers. So many little yellow mouths to feed.

So here then is a collection of five animal handler backstories; two childhood and three adult.

Click the attached *.html to read about them.

This is what you shouldn't post in a thread in the Unfinished Mods section. Most people don't come here for content, that's what the Released Mods section is for. If you want to share the xml go to the appropriate thread (https://ludeon.com/forums/index.php?topic=30749) and post it there. If you leave it here you won't find many people downloading it, especially considering your first post still doesn't properly describe your goal.

Finally, you added the info to the first post. Should've started with that, to be honest.
Title: Re: [A16][WIP] Backstories
Post by: WalkingProblem on March 29, 2017, 11:15:59 AM
Quote from: Granitecosmos on March 27, 2017, 05:55:48 PM
Ok, so let's recap the short history behind this.

A makes X. B thinks X isn't easily understandable, therefore proposes the creation of Y. A tells B that X is actually easily understandable and Y would achieve little-to-no change. B decides to make Y anyway and, after a few days finishes the basis of Y which is exactly what A predicted would be.

Right now we can see A telling B that he was right (which is indeed the case) while also raising awareness that Y has no mod support whatsoever, further limiting it's usefullness. In response B implies that A probably tries to demote or sabotage Y because he can't make X better or thinks Y is endangering the existence of X.

It appears that B forgot that the sole reason for Y's existence is to serve X, therefore Y's maximum quality is always equal or less than X's maximum quality. B also seems to ignore that X is in no way a finished product; in fact, X is more like a gateway for others to add their content. Therefore the proposition that X can't evolve further is moot; it's up to the user to improve it. Let's not forget that A was right from the beginning: X is easily understandable; Y has no possibility for proper mod support; Y's very existence was unnecessary.

Throughout the conversation between A and B, A tries more and more desperately to make B understand how Y is still unnecessary and destined to be subpar compared to just using X. B continues to ignore this and now is actually mocking A, forgetting that since Y is dependant on X, A has an easy way to screw B and Y over if B becomes pesky enough.

All the while C is watching with a grin and eating popcorn.

(https://media.giphy.com/media/tFK8urY6XHj2w/giphy.gif)

What an awesome summary, although I got lost about who is A and who is B. LOL!

-------

Quote from: AngleWyrm on March 29, 2017, 08:22:35 AM

(https://s6.postimg.org/uy0e3u1n5/ThrumboRider.png)Animal Handlers

After spending some time enjoying leonlim007's (https://ludeon.com/forums/index.php?action=profile;u=71536) Minions (https://ludeon.com/forums/index.php?topic=30647.0) mod, I developed a need for animal handlers and trainers. So many little yellow mouths to feed.

So here then is a collection of five animal handler backstories; two childhood and three adult.

Click the attached *.html to read about them.

Woot woot! Thanks for enjoying.

I'm fascinated by the world you are doing in this seemingly obscured thread. The data analysis is absolutely fascinating although I do not fully understand everything you talked about. 

But Granitecosmos is right, you should actually compile all the backstories and release it as a full mod (or perhaps you are not ready to do that yet) =D
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 29, 2017, 11:20:03 AM


(https://s-media-cache-ak0.pinimg.com/564x/39/37/c5/3937c5981526c19383c2fa30074b5811.jpg)Thanks bunches, and yes it's still very much a Work In Progress.

Eventually I'd like to get it to the place where backstory collections can be just dropped into a folder, but that's a ways off.
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 29, 2017, 12:11:45 PM
Quote from: AngleWyrm on March 29, 2017, 11:20:03 AMEventually I'd like to get it to the place where backstory collections can be just dropped into a folder, but that's a ways off.

I'm a bit confused by this comment, since "just dropping the backstory files into a folder" is exactly what's possible right now with "Editable Backstories," the mod that started this whole discussion.

That said, if you'd like me to include your backstory XML files with the next release -- credited to you, of course -- I'd be happy to do so.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 29, 2017, 01:40:12 PM

(https://s6.postimg.org/hw8bia4lt/soldier.jpg)The Creation of Law and Order
Within the backstory definition are three variables for body types: male, female and global. Each of these variables are sets that can be a list of values drawn from a specific pool of choices.

And they overlap. There is a Thin for males, females and global, and there is a Male for males and global. If these values are stored more than once then the opportunity for errors creeps in. Maybe I forgot to capitalize one version but not another. It also becomes a maintenance headache if ever a value changes and the developer has to chase down all the copies sprinkled about.

So the goal is to achieve a state where there is only a single value stored for every possibility. That way there's no opportunity for conflicting copies and no need to hunt for duplicates to change.
(https://s6.postimg.org/6ils72u35/Body_Types.png)

This is what the schema looks like that creates the underlying framework to enforce that data integrity. Each possible value exists only once, and is referenced where needed by structures which are then used as the data type for the variables that appear in a backstory entry.
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 29, 2017, 02:50:27 PM
... Should I take the oddly irrelevant side-rant as a "no," then, on the question of whether you'd like me to actually distribute your backstory files along with the mod that can use them?
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 29, 2017, 05:40:59 PM
Quote from: AngleWyrm on March 29, 2017, 01:40:12 PM
And they overlap. There is a Thin for males, females and global, and there is a Male for males and global. If these values are stored more than once then the opportunity for errors creeps in. Maybe I forgot to capitalize one version but not another. It also becomes a maintenance headache if ever a value changes and the developer has to chase down all the copies sprinkled about.

That sucks. But hey, you were the one insisting on doing this. I had no problem with writing xml for the original mod.

Actually... What is it that you try to make here, again? At first I tought you were making an editor that's supposed to be more user-friendly but all I've seen is a converter that prints text and information that can already be easily accessed, read and understood. Oh well, this is Not My Problemâ„¢.

Quote from: dburgdorf on March 29, 2017, 02:50:27 PM
... Should I take the oddly irrelevant side-rant as a "no," then, on the question of whether you'd like me to actually distribute your backstory files along with the mod that can use them?

I don't think OP is interested. People with interests usually show some reaction to offers, after all.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 30, 2017, 06:53:17 AM
(https://s6.postimg.org/6mflnbzkh/gems.jpg)
Quote from: dburgdorf on March 29, 2017, 02:50:27 PM
... Should I take the oddly irrelevant side-rant as a "no"
Irrelevant side-rant, what a fitting description.

On the topic of copyright law
In keeping with the principles of modding and maintaining an open-source environment, I release all content to the public domain, free of charge and without obligation. Do with it as you will.

Quote from: Granitecosmos on March 29, 2017, 05:40:59 PM
That sucks. But hey, you were the one insisting on doing this.
Apparently you stopped reading after the problem description, and didn't bother to read the solution. But, as you say, I have no problem with building my house on a solid foundation.
Title: Re: [A16][WIP] Backstories
Post by: Razzoriel on March 30, 2017, 07:49:12 AM
Thank you for this amazing mod, dear sir. I only have one problem with it:

I don't want my colonists to have Pirate King/tribal backstories. How do I proceed about making the backstories' rationale work as vanilla, and only have the editting/adding/removing aspect preserved?
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 30, 2017, 07:57:24 AM
Quote from: AngleWyrm on March 30, 2017, 06:53:17 AM
Quote from: Granitecosmos on March 29, 2017, 05:40:59 PM
That sucks. But hey, you were the one insisting on doing this.
Apparently you stopped reading after the problem description, and didn't bother to read the solution. But, as you say, I have no problem with building my house on a solid foundation.

Apparently you didn't understand what I said. It sucks because you had to fix yet another problem. It almost looks like it would be easier for everyone to just write the xml themselves instead of using a third party program.

Your ignorance entertains me.

Quote from: Razzoriel on March 30, 2017, 07:49:12 AM
Thank you for this amazing mod, dear sir. I only have one problem with it:

I don't want my colonists to have Pirate King/tribal backstories. How do I proceed about making the backstories' rationale work as vanilla, and only have the editting/adding/removing aspect preserved?

OP didn't make the mod. Your compliments belong to Rainbeau a.k.a. dburgdorf (https://ludeon.com/forums/index.php?topic=30749.0). (You know, the guy who actually made the Backstories mod.) This thread has nothing to do with the Backstories mod. Now that I think about it, this is a very misleading thread title. OP please change the title so you don't mislead people to believe this is about the Backstories mod. (Which is not, it's about your third party converter program.)

...Or I can just flag it for the moderators to change it.
Title: Re: [A16][WIP] Backstories
Post by: Razzoriel on March 30, 2017, 08:21:21 AM
Oh I thought this was his topic, didn't even check. Thanks.
Title: Re: [A16][WIP] Backstories
Post by: Ramsis on March 30, 2017, 11:29:48 AM
I'm going to put my foot down at this point as I read through this thread for the.... third time.

You're all being moronic about this; Wyrm has the right to work on this project, Dorf has the right to have his work referenced by Wyrm's OP as (I believe) Wyrm's project will still require Dorf's work? Sorry, that bit is confusing. Wyrm stop slapping Dorf or I'll ban you, Dorf stop taking the b8 m8.

@Granite you literally have no place in here and are on the hairy edge of a three day ban for adding nothing to this thread but idiocy and insults. Take the admin's advice and back off now, I won't be repeating myself.
Title: Re: [A16][WIP] Backstories
Post by: WalkingProblem on March 30, 2017, 11:32:52 AM
Honestly, I already lost track of what is this "mod" is about actually... after than the simple facts that new backstories are added... =\

I maybe I dun understand what is being attempted here?
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 30, 2017, 12:02:43 PM

(https://s6.postimg.org/yd8p8upxt/855b8e1e2a3c9c716fbe9f55056e3bd6.jpg)
Quote from: leonlim007 on March 30, 2017, 11:32:52 AM
I already lost track of what is this "mod" is about actually... after than the simple facts that new backstories are added...

See the First post (https://ludeon.com/forums/index.php?topic=31306.msg320813#msg320813).
  • The new sets of backstories are attached there
  • The current uses for what I'm building are also listed there
The rest of this WIP development thread pretty much requires training in computer science, so it has a narrow target audience.
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on March 30, 2017, 12:36:41 PM
Quote from: Ramsis on March 30, 2017, 11:29:48 AMDorf stop taking the b8 m8.

Your point is well taken, and I apologize for my role in perpetuating the, shall we say, "less productive aspects" of this thread. As I said in an earlier comment, as long as I've been participating in online forums, I really ought to know better by now. ;)

Quote from: leonlim007 on March 30, 2017, 11:32:52 AM
Honestly, I already lost track of what is this "mod" is about actually....

AngleWyrm's goal, as I understand it, is to create a tool intended to simplify the editing of backstory XML files that can be used in my "Editable Backstories" mod. Whatever might come of that tool, the actual backstories he's thus far written will be included (with his permission) in the next update of my mod.
Title: Re: [A16][WIP] Backstories
Post by: Ramsis on March 30, 2017, 12:40:21 PM
Quote from: dburgdorf on March 30, 2017, 12:36:41 PM
As I said in an earlier comment, as long as I've been participating in online forums, I really ought to know better by now. ;)

There's a reason why I didn't threaten to ban you but threatened to ban the others ;)
Title: Re: [A16][WIP] Backstories
Post by: Granitecosmos on March 30, 2017, 04:56:52 PM
Quote from: Ramsis on March 30, 2017, 11:29:48 AM
Take the admin's advice and back off now, I won't be repeating myself.

Point taken. I shall respect the authority.

Quote from: AngleWyrm on March 30, 2017, 12:02:43 PM
See the First post (https://ludeon.com/forums/index.php?topic=31306.msg320813#msg320813).
  • The new sets of backstories are attached there
  • The current uses for what I'm building are also listed there
The rest of this WIP development thread pretty much requires training in computer science, so it has a narrow target audience.

Hey, you've finally edited your post like I asked. Thanks! Took your time but hey, better late than never.

Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on March 31, 2017, 05:58:41 PM

(https://s6.postimg.org/sv6ga6z0x/egg.jpg) A first look at the backstory editor; see first post (https://ludeon.com/forums/index.php?topic=31306.0).
Title: Re: [A16][WIP] Backstories
Post by: Dragoon on April 01, 2017, 11:44:36 AM
I only have one question. I saw it stated it would rely on editable backstories, but I'm not entirely sure. Do need to get that? I 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.
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on April 01, 2017, 12:26:01 PM
Quote from: Dragoon on April 01, 2017, 11:44:36 AMI saw it stated it would rely on editable backstories, but I'm not entirely sure. Do need to get that? I 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 far as I'm aware, AngleWyrm's project, if anything actually comes of it, will simply be an XML file editor.

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"), but I'm not quite sure I see the value, myself. But then, my original motivation in creating EB was less a desire to add anything to the database and more a desire to clean up the mess that I consider many of the default backstories to be.  ;)
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on April 01, 2017, 04:07:35 PM

(https://s-media-cache-ak0.pinimg.com/736x/48/79/19/48791933f81c7e6699fcb177d5d2a92d.jpg)
Quote from: Dragoon on April 01, 2017, 11:44:36 AM
I only have one question. I saw it stated it would rely on editable backstories, but I'm not entirely sure. Do need to get that? I 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.
The Editable Backstories mod brings backstory files out into the open so that they may be edited. The tool I'm working on is an editor for them.

The current set of backstories from the Editable Backstoris mod that includes basic, tribal and storyteller is available as a readable and searchable *.htm attached to the first post.

The list of stories on the Wiki differs from the list of stories in that compilation.

Attached are two collections, one called 'Missing' which returns a couple stories that are on the wiki into the game, and another called 'Variants' which creates alternate versions of some backstories without over-writing the original, so that both can co-exist in the game.

[attachment deleted by admin due to age]
Title: Re: [A16][WIP] Backstories
Post by: WalkingProblem on April 02, 2017, 12:54:10 AM
Quote from: AngleWyrm on April 01, 2017, 04:07:35 PM

(https://s-media-cache-ak0.pinimg.com/736x/48/79/19/48791933f81c7e6699fcb177d5d2a92d.jpg)
Quote from: Dragoon on April 01, 2017, 11:44:36 AM
I only have one question. I saw it stated it would rely on editable backstories, but I'm not entirely sure. Do need to get that? I 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.
The Editable Backstories mod brings backstory files out into the open so that they may be edited. The tool I'm working on is an editor for them.

The current set of backstories from the Editable Backstoris mod that includes basic, tribal and storyteller is available as a readable and searchable *.htm attached to the first post.

The list of stories on the Wiki differs from the list of stories in that compilation.

Attached are two collections, one called 'Missing' which returns a couple stories that are on the wiki into the game, and another called 'Variants' which creates alternate versions of some backstories without over-writing the original, so that both can co-exist in the game.

lol... finally you explained clearly...

I dun remember the first post looks like what it is now... maybe I didnt read carefully the first time round~ Go Go Go!!!

=D
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on April 02, 2017, 04:46:17 AM

(https://s-media-cache-ak0.pinimg.com/564x/fb/b1/7d/fbb17d8f8415cdc611a87ee2c9e7d2fb.jpg)
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 (https://ludeon.com/forums/index.php?topic=31306.0) screen shot and attached data entry xml to show the current state of the work.
Title: Re: [A16][WIP] Backstories
Post by: dburgdorf on April 02, 2017, 11:51:28 PM
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 (https://ludeon.com/forums/index.php?topic=30749.msg322778#msg322778), 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.
Title: Re: [A16][WIP] Backstories
Post by: Dragoon on April 03, 2017, 07:03:42 PM
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 (https://ludeon.com/forums/index.php?topic=30749.msg322778#msg322778), 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.
Title: Re: [A16][WIP] Backstories
Post by: The-Eroks on April 03, 2017, 08:07:03 PM
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!
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on April 06, 2017, 10:20:50 AM


(https://s6.postimg.org/se8xrmz0x/dependencies.png)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?


(https://s6.postimg.org/a525xbu1d/Traits.png)
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on April 07, 2017, 11:01:16 AM
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.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on April 08, 2017, 11:38:24 AM

(https://s6.postimg.org/67x9qw0r5/Schema.png)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 (https://www.oxygenxml.com/) 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
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on April 09, 2017, 10:39:26 AM

(https://s6.postimg.org/um05c9n81/Authorship_schema.png)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.
Title: Re: [A16][WIP] Backstories
Post by: AngleWyrm on April 10, 2017, 11:21:16 AM

(https://s6.postimg.org/ijmuij1e9/API_schema.png)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.
Title: Re: [A16][WIP] Backstories
Post by: WalkingProblem on June 01, 2017, 10:34:35 AM
Quote from: AngleWyrm on April 10, 2017, 11:21:16 AM

(https://s6.postimg.org/ijmuij1e9/API_schema.png)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....