Topic on Talk:Quests

Jump to navigation Jump to search

Expiration date of peace talks.

4
Frenchua (talkcontribs)

I recently submitted an edit to this page in which I said that Rimworld "Peace Talk" quests will expire after 12-28 days. I based this on my reading of the Rimworld XML defs and decompiled source code. I just want to check in here and see if anyone more knowledgeable of Rimworld's internals knows something I don't. I 'grok-ed' the source code and defs but I'm not a modder. So if anyone here knows more about this than me then please correct me.

I based my "12-28 days" number on the following sources:

https://github.com/RimWorld-zh/RimWorld-Core/blob/85954e64ea75334f51e33e27a4128809191e430e/Core/Defs/Storyteller/Incidents_World_Quests.xml

This file has a reference (on line 88) to the IncidentWorker_QuestPeaceTalks class. I found this class in the decompiled source here:

https://github.com/josh-m/RW-Decompile/blob/d5bbfd741a46452bbfbec3a38b11a122f766f057/RimWorld/IncidentWorker_QuestPeaceTalks.cs

Under the TryExecuteWorker method, on line 33, the number of days before expiration of the quest is set to "SiteTuning.QuestSiteTimeoutDaysRange.RandomInRange".

If we go to the SiteTuning class (https://github.com/josh-m/RW-Decompile/blob/master/RimWorld.Planet/SiteTuning.cs) and look at line 8, QuestSiteTimeoutDaysRange is set to a random integer between 12 and 28. So that is where I got this date range.

I'm like 99% sure that my reading of the source code/xml is correct, but if not I just wanted to add a space on the talk page to clear up any misunderstandings I have.

Sokyran (talkcontribs)

What you're linking to is the XML and source code from 1.0 version of RimWorld. That's very out of date data at this point. For one, I'm pretty sure peace talks are no longer an incident but a quest.

Frenchua (talkcontribs)

Thanks for pointing this out. I didn't notice how old this github repo was. I just checked my Incidents_World_Quests.xml file on my install and it was much different from what was on the github repo.

I'll try to decompile the 1.5 source code with ilspy/dotpeek and figure out what the actual date range for peace talks is. My guess is that my date range is still correct, but that the code has been significantly refactored since 1.0.

Sokyran (talkcontribs)

I did a quick search, seems it's in XML for the peace talks quest: <delayTicks>$(randInt(12,28)*60000)</delayTicks>

Reply to "Expiration date of peace talks."