» Sat Nov 17, 2012 4:42 am
h4vent and Sollar - thank you so much for your advices, they are the most enlightening. Jediborg and Dreamking's solution does seem to be a lot of hassle, and I would have to tailor it specifically to my needs, however it inspired me to come up with a different solution, which perhaps is not as sophisticated, but it works. Kinda. But it's a good place to start, I guess. I haven't had a chance to look into what Sollar suggested, but I will give it a try once I'm back from work.
I'll be happy to share what I have accomplished so far, but let me provide you with a little background first:
We have a quest, let's call it CustomQuest. The guest is given by a NPC called QuestGiver, an apprentice mage at the College of Winterhold, worried about her missing twin sister (let's call her QuestTarget), who ran away after a violent argument, never to be seen again.
Personae dramatis:
1. QuestGiver - relationship is set to ally with player. No factions. Three AI packages, from the top to the bottom:
- ForceGreetPackage with the following condition: GetStage(CustomQuest) == 70
- PlayerFollowerPackage with the following condition: GetStage(CustomQuest) == 20 AND GetStage(CustomQuest) < 70
- Sandbox package with no conditions, set to Hall of Attainment at Winterhold College.
2. QuestTarget - relationship is set to ally with player. No factions. Two AI packages:
- SitInPrison with the following condition: GetStage(CustomQuest) >10 AND GetStage(CustomQuest) < 70
- Sandbox, exact copy of QuestGiver's package with the following condition: GetIsCompleted(CustomQuest) == 1
Now the quest itself:
Stage 0 - PC meets QuestGiver in the College and is asked for help with finding QuestTarget. If the PC agrees, they are asked to give QuestGiver a little time to get ready and talk to her again, quest progresses to stage 10.
Stage 10 - PC asks QuestGiver where should they start, and is advised to go the Winterhold inn. At this point the quest progresses to stage 20, QuestGiver joins CurrentFollowerFaction with rank of 1 and PotentialFollowerFaction with rank of 0, is forced to evaluate her packages and starts following the player. This part works without a hitch.
Stage 20 - PC and QuestGiver visit Winterhold inn, and are advised to investigate another place. Upon the end of the conversation the quest progressed to stage 30. At this point, for some reason, QuestGiver loses her interest in following the PC around and returns to Hall of Attainment, apparently switching over to her sandbox package.
Stage 30, 35, 40, 45 and 50 are irrelevant here.
Stage 60 - PC and QuestGiver find QuestTarget. Quest progresses to stage 70.
Stage 70 - QuestGiver approaches the PC (via ForceGreet package), thanks them for their help. At this point both QuestGiver and QuestTarget switch their factions and ranks to -1 @ CurrentFollowerFaction, and 0 @ PotentialFollowerFaction. Their packages are evaluated once again, and they start walking towards the setting sun, with PC having two new possible followers. Quest progresses to stage 80.
Stage 80 - Quest is completed, fanfares and such.
At this point I haven't tested stage 70 yet. As I said before, my solution works to some degree for stage 20, but it fails miserably at further stages. Do I have to force QuestGiver to evaluate her AI packages upon completion of every single stage? I'm not sure why the follower package stops working all of a sudden.