RimWorld

RimWorld

RIMMSqol
Razuhl  [developer] 5 Apr, 2020 @ 5:20pm
Custom Storyteller Manual/FAQ
Post questions, answers discussion here. Answers to question will be consolidated into the first post.
Last edited by Razuhl; 5 Apr, 2020 @ 5:23pm
< >
Showing 1-3 of 3 comments
Razuhl  [developer] 5 Apr, 2020 @ 5:20pm 
At the top a template can be chosen. It displays a tooltip about what it does. Then it can be loaded to replace the currently active custom storyteller.

If the custom storyteller should be exclusively responsible for event generation then the vanilla storyteller can be disabled.

The stats below are necessary to debug and understand the timings used in storytelling. Events are checked every Interval, whith an interval being 1000 turns or 24 in-game minutes. An in-game day has 60 intervals.

Below those stats is the actual storyteller. It is a tree structure that gets evaluated to determine if and what event should fire. By clicking the plus button a selection of possible steps is brought up.

The button with the steps label/name brings up an editing dialog to change its properties. It also provides a description of the steps functionality and tooltips for all properties.

The left and right button are used to change the order of steps. The steps are processed from top to bottom.

The "C" button allows copies the step and all underlying steps(called a subtree) and the "P" button allows pasting the subtree. A subtree cannot be pasted into itself.

The "X" button removes the subtree.

A simple case would be "Send a raid every 4-7 days.". Clicking the plus on the root button brings up the available steps. We select cooldown.
Then we click on the step itself and change the Interval-Min and -Max to 240(4*60) and 420(7*60). It's a good idea to label the step so we know what it's doing at a glance. Thats done by changing the label to "4-7 days".
Now we click the plus on the cooldown step and select Incident. We click the new step and select "enemy raid" as incident and setting the label to "raid".
When unpausing the game with this the storyteller processes the steps from top to bottom. The cooldown acts as a filter and only allows us to reach the raid as long as it isn't on cooldown. Since it didn't run before it allows
passage and we reach the raid. The raid is now triggered with standard values, strength based on wealth etc. and the cooldown gets started. It will roll an interval between the next 240-420 intervals and won't allow passage until
that interval has been reached. The chosen interval can be seen(and edited) in the cooldown steps properties as "Wait until Interval".

Lets say we want to modify the event so that the raid only happens at our largest colony/caravan(since puny raids on mining outpost are no fun). We click the plus on the cooldown and select "Filter Target". Then we edit the
new step deactivating "Whitelist" and select under "Pick" "largest" as well as renaming it to "largest target". Now the "raid" must be placed below the "largest target". For that we click the "C" button behind "raid" and then
the "P" button behind "largest target". After that we delete the original "raid" by clicking the "X" button.

In the same way the raid strategy or points can be modified by adding the "Incident Properties" step above the "raid".

A few things to remember:
  • Don't use ironman mode.
  • Look at the in-game documentation first, just like in the settings menu tooltips detail exactly whats what. If something is missing there or unclear refer to it so it can be changed for the benefit of all.
  • Sometimes incidents can not be triggered according to the game rules(a heatwave can only happen if it's warm enough in the current biome season). You can check on that by using the mod menu to start an incident. It will be labeled with a "[No]". The "Incident Properties" step has a property to force the incident(s) through.
  • Explore the templates to get an idea on how things can be done. The "additional events" showcase more exotic applications in which existing events are combined to create a bigger challenge.
Last edited by Razuhl; 5 Apr, 2020 @ 5:22pm
Midnight 19 Apr, 2020 @ 9:39pm 
I'm not sure Cooldown is working... I did the same thing you did in your example, but with quests: Cooldown with interval of, say, 60 to 240, and Incident Category "GiveQuest", pick "all".

This will, instead of giving a random quest every 1 to 4 days, give a quest every few moments - sometimes even more than one at a time.

Looking at your "Additional Events" template, it looks like you use Loop instead? But I'm not sure how that works.
Last edited by Midnight; 19 Apr, 2020 @ 9:39pm
Razuhl  [developer] 20 Apr, 2020 @ 9:47am 
Sounds like you placed the incident category under root and not under cooldown?

The last sentence on the "Pick" tooltip reads "This can result in multiple incidents firing.". If you pick all then what happens is every incident in the category is tried on every target available and all valid combinations will be used. In vanilla the give quest category has only two entries which target the world. So it shouldn't make much of a difference but if your game has more entries and maybe even quests that target maps then you need to filter targets and incidents down to one via randomized picks.

The cooldown has the property "Wait until interval". Check if that is being set after a quest is triggered and nothing below the cooldown should be processed if that number is higher than the current interval. You can also set it manually to test this. Setting it to 0 will turn the cooldown off and allow the incidents below to trigger.

If the vanilla storyteller is active it can create additional quests through random chance.

Loop is there to repeat a target selection. That is necessary if you randomly picked a target and then whant to trigger an incident multiple times on that target. For example a raid for every throne placed on a map.

With Filter target you determine which targets are valid. With pick in Incident Category you choose which incidents are valid.
< >
Showing 1-3 of 3 comments
Per page: 1530 50