dontpanic Posted June 3, 2009 Share Posted June 3, 2009 I am creating a quest in where I wish for the player to meet with a specific NPC. After the player accepts the quest through conversation. I want the NPC to move to a new location. I tried creating an AI Package and I am unable to get the NPC to move to the new location after the quest begins. It only performs the first AI package which is a Sandbox AI package. Also After the quest Finishes I would like to Make the NPC go to another location and make that location there home. I have some understanding of the GECK but creating the events I described for the quest has become a bit of a challenge for me. Can someone help me in this? Quest Example LayoutNPC Uses a sanbox AI Package for his starting position.Player accepts his quest and the Quest is startedAfter the conversation is over the NPC will go to a location that the player is told to meet him.Once the player meets the NPC. The player and the NPC assualt a building with the objective of killing a specific person.Upon the Death of the enemy NPC. The quest starter NPC Forces player in to conversation.An item is geven to the player and the NPC Uses a new set of packages to live in a new home. Link to comment Share on other sites More sharing options...
Alundaio Posted June 3, 2009 Share Posted June 3, 2009 Just remove the sandbox refActor.RemoveScriptPackage AIpackageName and if you need to. Add it back refActor.AddScriptPackage AIsandbox That's just an example. Link to comment Share on other sites More sharing options...
dontpanic Posted June 3, 2009 Author Share Posted June 3, 2009 How would I execute the new AI Package to run once the quest has started? Link to comment Share on other sites More sharing options...
anlashok Posted June 3, 2009 Share Posted June 3, 2009 How would I execute the new AI Package to run once the quest has started?If the NPC already has the package, use command ref.evp to immediately re-evaluete the packages. Either that or wait some time (seems to be 10-15 irl seconds for me) and he re-evaluates the packages automatically. I myself prefer to use tokens to control which package is active but I can't tell if that is worse or better solution than removing and re-adding packages. In this case quest variables as package conditions are probably better solution than tokens. As far as I know added packages cannot be given conditions and their priority cannot be set, but those features can probably be scripted. I would probably do something like this: 1. NPC Uses a sanbox AI Package for his starting position.-Have a sandbox package last in NPC's package list (so it's chosen only if no other is)2. Player accepts his quest and the Quest is started3. After the conversation is over the NPC will go to a location that the player is told to meet him.-Have a travel package to the location second last in list and set it to have a condition like yourquest.getstage == [whatever the stage should be]4. Once the player meets the NPC. The player and the NPC assualt a building with the objective of killing a specific person.-I'm not sure how intelligent an assault you can get with a simple packages, but a travel to some suitable room in a building or a find package where the targets are the enemies (not sure if this will work though, finding a good value for range might be tricky) and search is enabled would work somewhat well. You might need to set the amount of targets to find to more than one if there is more than one enemy, or you could just have one-target package which is reiterated until the assault is completed. You probably want to set "weapon drawn" and "pretend in combat" flags and unset "fallout behaviour" flag.5. Upon the Death of the enemy NPC. The quest starter NPC Forces player in to conversation.-I haven't done any dialogues yet but Dialogue package should have some flags which allow you to force the start. If you get stuck, look at some existing NPC's that you know will force the start of conversation in game and see how their packages are done.6. An item is geven to the player and the NPC Uses a new set of packages to live in a new home.-Item is given with "player.additem itemID 1". For the packages create them and set them before any of those previous packages in the list and give them a condition, which is either getquestcompleted yourquest == 1 (should work, but with GECK nothing is sure) or just add a token to the NPC after the quest is completed and check if getitemcount yourquesttoken == 1 (or >= if you want to be sure). Alternatively you may put these new packages to the end of the list and give them no conditions, and in the previous packages either use getquestcompleted yourquest != 1 or getitemcount yourquesttoken < 1 condition. These ways should be equivalent and the choice should be made depending on the amount of packages you want him to have in the end. If there is only one, it probably makes more sense to have a condition in it, but if there is more than was used in quest (4?) it is wiser to have conditions in quest packages. I'm not sure how should you do the evp calling. With travel packages you can just call evp in onend-block of the package but I don't know if that block works for dialogue packages, and if you use one-target find package then onend probably works too - in fact if you have multiple enemies and one-target find package you need to call evp in onend, or your guy will stop for some time before searching for a new enemy. Note that if you don't use the package list order and just have the packages in random order you need to apply additional conditions so that correct package is running as the quest progresses. If you are unsure how the order or conditions work, see GECK wiki for article "How Are Packages Evaluated" . I'm sorry if I made this sound complicated, it really is not once you understand the principles of how the packages are evaluated. Link to comment Share on other sites More sharing options...
mazakala Posted June 3, 2009 Share Posted June 3, 2009 -Have the npc have all the packages from the start-Define several condition variables in the quest scriptFor example:short QuestStarted short GoToMeetLocation short AssaultBuilding short ObjectiveKilled ...and so on. Use dialogue and NPC scripts to set these conditions. The command...set YourQuestName.VariableName to 1...will set the variable to 1, then you can have in the conditions for the package that the variable needs to be 1, or 0. This is how vanilla quests work, and it's the best way to go. Adding the "evp" script command here and there helps since it will make npc re-evalute their packages, but generally they do it quite often anyway. Link to comment Share on other sites More sharing options...
dontpanic Posted June 4, 2009 Author Share Posted June 4, 2009 I tried both methods you guys gave me so hard. All that happens is the NPC remains sitting in his chair and nothing else happens. The first Package is a Travel AI Package for his starting position. The target is a chair and he scessfully sits in it.The second AI Package is a travel Package to a wall marker and I have not been able to get the NPC to execute and compy eve after removing the packages. The packages are set for the "set YourQuestName.VariableName to 1" method and I tried with the "GetStage" Method. For Reference I did use this script for the "QuestScriptVariable" system. It was tied in to the quest. I also made sure all packages were set to the correct order. scn RetributionQuestSCRIPT short QuestStarted short GoToMeetLocation short AssaultBuilding short ObjectiveKilled Quest Layout 1. NPC Uses a Travel AI Package for his starting position. The NPC sits in a chair and the Player accepts his quest. Through the dialog "Result Script End" This is the script used. SetObjectiveDisplayed RetributionQuest 10 1 set RetributionQuest.GoToMeetLocation to 1 NathanSmithREF.RemoveScriptPackage 1NathanBarSit I am unablt to get the NPC to move past this point. He just sits in the chair and never moves to his new location. I have tried using "NathanSmithREF.evp" but he still just sits there. 2. After the Quest is accepted the NPC will go to a location that the player is told to meet him. The following dialog "Result Script End" is used. setStage RetributionQuest 20 set RetributionQuest.GoToMeetLocation to 0 set RetributionQuest.AssaultBuilding to 1 Link to comment Share on other sites More sharing options...
mazakala Posted June 4, 2009 Share Posted June 4, 2009 There's really no need to remove any of the packages, just set a condition for it. Your scripts seem ok now, I'm guessing it's the packages that are causing trouble. Unless you provide me with screenshots or something I'm pretty much unableto assist further. Basically you need to check for the following things in your package, let's say the go to meet location package: -That the package type is travel-That the destination in the Travel tab is set.-In flags tab you should check must complete and must reach location (I'm not sure if they do anything for a travel package, but just to be sure!)-In Schedule tab all should be set to -Any--That the GetQuestVariable RetributionQuest.GoToMeetLocation == 1 condition exists in the Conditions tab-And of course that the NPC has the package in his package list. Link to comment Share on other sites More sharing options...
anlashok Posted June 4, 2009 Share Posted June 4, 2009 If even after checking the above points the package does not work, make sure the sitting package either is below the next package in the package list or gets strictly illegal for the NPC to do (for example with condition GetQuestVariable RetributionQuest.GoToMeetLocation != 1) Link to comment Share on other sites More sharing options...
dontpanic Posted June 5, 2009 Author Share Posted June 5, 2009 It seems that the NPC now goes to his waiting location after the quest is started. Now I have set a "GetStage" for the next set of quest dioluage to execute the assault after the topic is presented. The problem is the quest topic is not showing. I have set the "Getstage quest 10" for the topic. I even tried doing a "getquestvariable" method for it and it never appears. Anyone have ideas? If someone could take a look at the ESP file I would appreciate it? Note: I had at one point everyone in Megaton attack me immediately on entering the Bar. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.