Help understanding the Storyteller XML

Started by RetPaladinlol, August 15, 2016, 10:01:17 AM

Previous topic - Next topic

RetPaladinlol

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?

CannibarRechter

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>

CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

CallMeDio

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.
QuoteYou may need a rubber duck.  Also, try some caveman debugging.

Released mods: No Mood Loss on Prisoner Sold or Died

RetPaladinlol

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.

1000101

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.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

RetPaladinlol

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.

milon

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.

CannibarRechter

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?
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

hendrikpfaff

If you have the storytellers def filled and done why dont it show up in story tellers selection?

CannibarRechter

Not sure. Mine does, so it definitely works.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects