RimWorld

RimWorld

Quest Tab
Merthykins  [developer] 28 Jun, 2019 @ 4:31pm
Adding Compatibility with Mods
If you made a mod that adds custom quests, and you want to make sure it shows up in Quest Tab, this is the guide for you. There are currently two ways to make sure your quest shows up.

1) Convention (TimeoutComp)
Most of the quests in RimWorld create a Site with a TimeoutComp on it. Quest Tab looks for these WorldObjects when displaying quests. So, if your quest follows that convention, and you don't want any custom handling, just do that.

2) Standardized Properties
Quest Tab also looks for certain properties on the WorldObject to determine special handling in the tab. This is great if you have a quest that is different from the convention, or you want some special handling. The following are the properties:

bool QuestTab_IsQuest => true;
If you want your WorldObject to show up as a quest, return true.

int QuestTab_TicksLeft => whatever;
Sort key used for when sort mode is time remaining on quest tab.

bool QuestTab_IsBase => true;
If you want your WorldObject to show up as a base, return true.

int QuestTab_Hostility => whatever;
Sort key used for when sort mode is hostility on quest tab.

string QuestTab_Label => "Label";
The label to display in Quest Tab

string QuestTab_InspectString => "Inspect string";
The inspect string used in quest tab

bool QuestTab_ShouldHide => true;
Set this to true if you want to not display in quest tab. This is especially useful if you have a WorldObject that you want to be hidden in the "All world objects" view.

I'm also considering wrapping this all into a comp. If you're a mod maker and think that'd be a better way to handle this, let's talk!