Ludeon Forums

RimWorld => Mods => Help => Topic started by: RetPaladinlol on August 15, 2016, 10:01:17 AM

Title: Help understanding the Storyteller XML
Post by: RetPaladinlol on August 15, 2016, 10:01:17 AM
Hey guys, I'm looking through the various storytellers and I'm having some trouble understanding what some parts of the XML dictate.

<li Class="StorytellerCompProperties_ClassicIntro"/>
      <li Class="StorytellerCompProperties_ThreatCycle">
        <minDaysPassed>3</minDaysPassed>
        <mtbDaysThreatSmall>3.75</mtbDaysThreatSmall>
        <mtbDaysThreatBig>1.25</mtbDaysThreatBig>
        <threatCycleLength>5</threatCycleLength>
        <minDaysBetweenThreatBigs>1.9</minDaysBetweenThreatBigs>
      </li>
      <li Class="StorytellerCompProperties_CategoryMTB">
        <minDaysPassed>5</minDaysPassed>
        <category>Misc</category>
        <mtbDays>1.50</mtbDays>
      </li>

Some of these tags seem pretty obvious but there are others I'm not sure about. Like mtbDaysThreatSmall and mtbDaysThreatBig. The smaller the number the more frequent the threats occur? I think threatCycleLength dictates how many days in between threats happen? So if I lower this number will threats occur more frequently?
Title: Re: Help understanding the Storyteller XML
Post by: CannibarRechter on August 15, 2016, 10:17:28 AM
Has anyone read the source? I would really appreciate a line-by-line explanation of each item. Particularly these two, which are strangely similar:

     <mtbDaysThreatBig>1.25</mtbDaysThreatBig>
        <minDaysBetweenThreatBigs>1.9</minDaysBetweenThreatBigs>

Title: Re: Help understanding the Storyteller XML
Post by: CallMeDio on August 16, 2016, 10:11:29 AM
Some of those like the cycle I don't know, but the ones with mtb can be found on a lot of places and they are a random chance of something happening around this number of days, I don't know how they are calculated but they can be found on diseases with vomit as vomitmtbdays, and mtbdays for wander confused in case of Alzheimer's, orbital trade arrival also has mtb days, the smaller the number the more frequent it is, and for minDaysBetween it is something to avoid big threats from happening too often, as the mtb is 1.25 it could happen every one day or even less.
Title: Re: Help understanding the Storyteller XML
Post by: RetPaladinlol on August 16, 2016, 11:50:58 AM
Quote from: CallMeDio on August 16, 2016, 10:11:29 AM
Some of those like the cycle I don't know, but the ones with mtb can be found on a lot of places and they are a random chance of something happening around this number of days, I don't know how they are calculated but they can be found on diseases with vomit as vomitmtbdays, and mtbdays for wander confused in case of Alzheimer's, orbital trade arrival also has mtb days, the smaller the number the more frequent it is, and for minDaysBetween it is something to avoid big threats from happening too often, as the mtb is 1.25 it could happen every one day or even less.

I did some testing and I found that the Cycle tag dictates the maximum amount of days you can go without that incident happening. If I set the Cycle length to 1 day I will get a raid every day. Thanks for the info on the other tags.
Title: Re: Help understanding the Storyteller XML
Post by: 1000101 on August 16, 2016, 12:50:09 PM
The easiest way to find out what anything means is to open a decompiler such as IlSpy or dotPeek and navigate to the class and then find the references on the field/property/method in question.
Title: Re: Help understanding the Storyteller XML
Post by: RetPaladinlol on August 17, 2016, 05:16:31 AM
Quote from: 1000101 on August 16, 2016, 12:50:09 PM
The easiest way to find out what anything means is to open a decompiler such as IlSpy or dotPeek and navigate to the class and then find the references on the field/property/method in question.

Thanks for the suggestion, will give this a go.
Title: Re: Help understanding the Storyteller XML
Post by: milon on August 17, 2016, 09:05:02 AM
I believe mtb stands for Mean Time Between, so it's a general rule of thumb for the pacing of events.  The minimum time between gives you a guaranteed cushion before something bad happens again.

Feel free to look at my auto-document (see signature) showing RimWorld's XML uses.  There's no user comments or description, but it's helpful nonetheless.
Title: Re: Help understanding the Storyteller XML
Post by: CannibarRechter on August 17, 2016, 01:51:11 PM
Quote from: milon on August 17, 2016, 09:05:02 AM
I believe mtb stands for Mean Time Between,

I believe you are right. But consider this:

   <mtbDaysThreatBig>1.25</mtbDaysThreatBig>
   <minDaysBetweenThreatBigs>1.9</minDaysBetweenThreatBigs>


If I expand it, it becomes:

   <meanTimeBetweenDaysThreatBig>1.25</meanTimeBetweenDaysDaysThreatBig>
   <minDaysBetweenThreatBigs>1.9</minDaysBetweenThreatBigs>


That's really confusing. Any ideas?
Title: Re: Help understanding the Storyteller XML
Post by: hendrikpfaff on August 22, 2016, 04:07:48 PM
If you have the storytellers def filled and done why dont it show up in story tellers selection?
Title: Re: Help understanding the Storyteller XML
Post by: CannibarRechter on August 22, 2016, 04:54:45 PM
Not sure. Mine does, so it definitely works.