Difference between revisions of "AI Storytellers"

From RimWorld Wiki
Jump to navigation Jump to search
(Added a table for the code specifics to make it more clear to compare and did a few word corrections)
Line 208: Line 208:
  
 
== Version history ==
 
== Version history ==
* [[Version/0.0.254B|0.0.254B]] - Added Chill Callie Classic [[storyteller]]
+
* [[Version/0.0.254B|0.0.254B]] - Added Chill Callie Classic [[storyteller]]. Rebalanced Cassandra’s raiders to not send advanced enemies too early, and to pace them a bit slower.
 
* [[Version/0.1.334|00.1.334]] - Kassandra renamed to Cleopatra.
 
* [[Version/0.1.334|00.1.334]] - Kassandra renamed to Cleopatra.
 
* [[Version/0.4.460|0.4.460]] - Storytellers now focus on wealth and let you recover from serious damage.
 
* [[Version/0.4.460|0.4.460]] - Storytellers now focus on wealth and let you recover from serious damage.

Revision as of 06:08, 19 December 2020

Basics Menus Game Creation Gameplay Pawns Plants Resources Gear Mods
Game Creation Scenario system AI Storytellers World Generation Biomes
AI Storytellers Cassandra Classic Phoebe Chillax Randy Random

The AI Storyteller creates events like pirate raids, resource drops, or animal attacks. Storytellers will never entirely disallow events because of population. Their choices will affect the story of your colony.

The gameplay is driven by AI (Artificial Intelligence) Storytellers. The AI Storyteller that you choose will make decisions about what events it wants you to encounter and when based on the situation you are currently in and on the biases of that particular AI.

Choosing an AI will have a great influence on the narrative that is formed as you play. The difficulty is selected separately from the Storyteller but both are changeable mid-game.

Current AI Storytellers

Code Specifics for Storyteller

Name Desired Population Min Desired Population Max Desired Population Critical Threat Cycle Length
AverageIncidentsPerDay(Randy)
Min Days Between Threat Bigs GeneralWeight(Randy) Classic_RandomEventMTBDays ThreatSmallWeight(Randy) Classic_ThreatBigMTBDays LargeThreatWeight(Randy) Classic_ThreatSmallMTBDays MaxThreatBigIntervalDays(Randy)
Cassandra Classic 4 13 18 9.2 1.9 1.00 3.75 1.25
Phoebe Chillax 4 13 18 17 12.5 1.00 8 1.25
Randy Random 4 13 50 1.45 0.79 0.0950 0.095 13

Options

Difficulty

The default values are based on the Rough difficulty level, where most values are at 1.0, or 100%.

Flashstorm, toxic fallout and volcanic winter are disabled in Peaceful difficulty level.

Name Threat scale Colonist mood bonus Base sell price multiplier Crop yield multiplier Disease interval multiplier Enemy reproduction rate factor
Peaceful 0.10 +10 1.00 1.20 3 0.1
Community builder 0.30 +10 1.00 1.20 2.5 0.15
Adventure story 0.60 +5 1.00 1.00 1.5 0.5
Strive to survive 1.00 0 1.00 1.00 1.0 1.0
Blood and dust 1.55 -5 0.90 0.95 0.95 1.0
Losing is fun 2.20 -10 0.80 0.80 0.9 1.0


Commitment Mode (Permadeath)

Commitment mode is an option when selecting difficulty. The player must choose between Commitment and Reload Anytime mode.

In commitment mode, you only get one save file and can only save when quitting the game. You cannot reload the game to fix mistakes, and only when the colony dies, that's it.

This is the way RimWorld was meant to be played with every dramatic turn - whether tragic or hopeful - played out to full impact.

Technical info

New Colonist Events

The formula that calculates the odds of random events that add new colonists has changed in 1.0. It factors in how long a player has been at the location for which the event is generated, and the current population of that colony, including pawns who are traveling on the world map. These events include Refugee chased, Transport pod crash, Wanderer joins and Wild (human) wanders in.

The following code examples and analysis were provided by user Bar0th on Steam, who gave permission for their inclusion here. To summarize these findings: There is a new variable, "PopulationIntent," which replaces the old variables "desiredPopulationMin," "desiredPopulationMax" and "desiredPopulationCritical." It controls the odds of colonist-adding incidents happening on a particular map. The odds based on the time at location decrease until the 10th day, and the odds based on population decrease until the 20th colonist. (For purposes of this formula, prisoners count as half a colonist.) Once both variables have decreased to their long-term minimum, the odds remain stable. Randy's minimum chance is .08%, while for Cassandra and Phoebe the minimum chance is .02%, so Randy is still the best option for players who wish to reach a large colony size.


PopulationIntent (from StorytellerDef):
populationIntentFactorFromPopCurve x populationIntentFactorFromPopAdaptDaysCurve

minIncChancePopulationIntentFactor
Default = 0.05 (from C#)
Randy = 0.20 (from StorytellerDef)

IncidentChanceFactor_PopulationIntent (from C#):
None = 1
IncreaseHard = Max(0.4 + PopulationIntent, minIncChancePopulationIntentFactor)
IncreaseMedium = Max(PopulationIntent, minIncChancePopulationIntentFactor)
IncreaseEasy = Max(-0.4 + PopulationIntent, minIncChancePopulationIntentFactor)

IncidentChanceFinal (from C#):
baseChance (from IncidentDef) x IncidentChanceFactor_PopulationIntent


Example Event: Wanderer Join (baseChance = 0.4, populationEffect = IncreaseEasy)

Day >= 10, 5 Population (PopulationIntent = 1.0)
Randy: 0.24% (0.4 x Max(-0.4 + 1.0, 0.2) = 0.4 x 0.6)
Other: 0.24% (0.4 x Max(-0.4 + 1.0, 0.05) = 0.4 x 0.6)
- They are the same, because of the high PopulationIntent.

Day >= 10, 20+ Population (PopulationIntent = -1.0):
Randy: 0.08% (0.4 x Max(-0.4 + -1.0, 0.2) = 0.4 x 0.2)
Other: 0.02% (0.4 x Max(-0.4 + -1.0, 0.05) = 0.4 x 0.05)
- Here, the low PopulationIntent allows Randy's higher minIncChancePopulationIntentFactor to take effect.

So, there doesn't appear to be a hard cap on any of the storytellers anymore. However, some events can become much rarer at high populations (0.02% chance of a wanderer join, 0.08% if using Randy @ 20+ population). Also, for purposes of population calculation, it searches the entire map for pawns of that colony (ie: includes caravans, etc), and it also includes prisoners of that colony (each prisoner counts as half a colonist).

The multiple colony trick works, because it doesn't check all pawns in the map for all colonies, only the one it is currently determining the event for.

Also, you can check the table for the PopulationIntent from the Debug Logging Menu while in Dev Mode. Search for the population, and you can bring up the table. You'll notice that after 10 days (at the top), and populations > 20 (at the left) the numbers remain the same. That's because of the curves in Storytellers.xml:

<populationIntentFactorFromPopCurve>
<points>

  • 0, 8.0

  • 1, 2.0

  • 5, 1.0

  • 9, 0.4

  • 12, 0.0

  • 20,-1.0

  • </points>
    </populationIntentFactorFromPopCurve>

    <populationIntentFactorFromPopAdaptDaysCurve>
    <points>

  • ( 0, 0)

  • (10, 1.00)

  • </points>
    </populationIntentFactorFromPopAdaptDaysCurve>


    Further investigation and updates are needed.

    Version history

    • 0.0.254B - Added Chill Callie Classic storyteller. Rebalanced Cassandra’s raiders to not send advanced enemies too early, and to pace them a bit slower.
    • 00.1.334 - Kassandra renamed to Cleopatra.
    • 0.4.460 - Storytellers now focus on wealth and let you recover from serious damage.

    The names of the difficulty levels were changed from 1.0 to:

    • Peaceful
    • Builder
    • Medium
    • Rough
    • Savage
    • Merciless

    In 1.1.2647 they have changed again to the following:

    • Peaceful
    • Community builder
    • Adventure story
    • Strive to survive
    • The price of survival is blood
    • Losing is fun

    In 1.1.2654 "The price of survival is blood" was changed.