Comiconomist Posted November 15, 2016 Share Posted November 15, 2016 I'm working on a mod to make Minutemen patrols called by the flare gun follow you around for a while longer, including follow you indoors. I'm looking at the behavior of Travis in "Confidence Man" to try and figure out the AI part, but for now I'm struggling to understand how quest stages work. Here's what I have figured out so far: The quest that handles minutemen called by flares is "MinFlareGun". It is triggered by the flare gun explosion which sends a keyword to the Story Manager. Stage 10 uses MinFlareGunQuestScript to spawn the Minutemen after a brief delay (and also fires another flare if they are coming but aren't right next to you yet, which is cool). The quest has a single scene, MinFlareGunScene. Phase 1 of this scene ends when one of three things happens: the player runs far away, 300 seconds pass, or the minutemen reach the player. Upon the completion of Phase 1 the quest moves to Stage 100 (there is an explicit "Set parent quest stage" to 100 at the end of Phase 1) and the scene moves on to Phase 2. Phase 2 is 60 second timer. The comes Phase 3, where one of the Minutemen says a line like "Stay safe, General." and they move on. In addition to the above there are two other stages for the quest, stages 20 and 50 which are respectively for when the Minutemen have engaged in combat and when one of them have died (these affect dialogue the Minutemen say). These stages appear to be set by scripts attached to the reference aliases to the spawned Minutemen. I am confused by two things: 1) What triggers the quest to proceed from stage 100 to stage 200? As I noted, there is an explicit "Set parent quest stage" to move to 100 at the end of Phase 1, but there does not appear to be a similar statement at the end of Phase 2 or 3, nor can I find a "setstage" command anywhere. Have I missed some code somewhere or is there an implicit rule I do not know? I have verified in game by using "getstage" that the quest does reach stage 200 after the dialogue said in Phase 3. 2) Why doesn't the game move to stage 20 from stage 100? I have verified in game that if the minutemen engage in combat before reaching the player they will go to stage 20 and then reach stage 100 once combat has been resolved and they have reached the player. However, if they reach the player once combat has been resolved and I then spawn some enemies to trigger combat again, the quest stays at stage 100. The scripts triggering stages 20 and 50 do not appear to condition on the current quest stage, though they do use a "TryToSetStage" command I haven't found documentation on. Is there a rule that quest stages can only increase, not decrease? My plan is to introduce a new stage, stage 150, in which the Minutemen follow the player for some time. I need to understand (1) since if I don't know why the game goes to stage 200 after stage 100, I can't make it go to stage 150 instead. And I need to know (2) to understand if a line like "while in stage 150, follow player" will break the minute the Minutemen enter combat. Link to comment Share on other sites More sharing options...
pndr Posted November 15, 2016 Share Posted November 15, 2016 (edited) REScript seems to be controlling what you are looking for. It seems to creating arrays to set the quest stages and then a papyrus fragment seems to set the quest stages. Fragments:Quests:QF_MinFlareGun_00157CA4 I really can't help you anymore then that as I can read papyrus, but can't really write it. Edited November 15, 2016 by pndr Link to comment Share on other sites More sharing options...
Recommended Posts