Jump to content

Forcing AI Packages to run?


Guest Messenjah

Recommended Posts

Guest Messenjah

So, I recently posted this issue I'm having with AI packages:

 

http://forums.nexusmods.com/index.php?/topic/981232-ai-scripting-problem-help-please/

 

Mind you, I may have not phrased it the best, so I will try to ask again here.

 

Mainly, what I need to know, is there a way to force an Package to run or to stop certain packages from running via script? Even more preferable would be to remove the package via script and add the one I want back in via quest script. I just haven't been able to figure out how to do it in Papyrus. It WAS possible in FO3/NV but it appears we can't do this in Skyrim, which poses a major issue with modding in general.

 

 

I'm also wondering if anyone else has seen a similar problem to this? Do I need specific, indepedent conditions set up for each AI package? I remember a bug in FO:NV where if you used too many travel packages on one npc, they would all try to run at the same time, thus none of them would work correctly. The only way to fix it was either to remove/add the packages in via scripted events, or to give them independent variables.

 

Any ideas?

 

I'm noticing that my NPC stutters forward every 15 seconds or so, like it wants to use the package but something stops it from working. However, due to the conditons, no other package should conflict wth it and all conditions are set for the only package that I want to run, to run.

Link to comment
Share on other sites

So, I recently posted this issue I'm having with AI packages:

 

http://forums.nexusmods.com/index.php?/topic/981232-ai-scripting-problem-help-please/

 

Mind you, I may have not phrased it the best, so I will try to ask again here.

 

Mainly, what I need to know, is there a way to force an Package to run or to stop certain packages from running via script? Even more preferable would be to remove the package via script and add the one I want back in via quest script. I just haven't been able to figure out how to do it in Papyrus. It WAS possible in FO3/NV but it appears we can't do this in Skyrim, which poses a major issue with modding in general.

 

 

I'm also wondering if anyone else has seen a similar problem to this? Do I need specific, indepedent conditions set up for each AI package? I remember a bug in FO:NV where if you used too many travel packages on one npc, they would all try to run at the same time, thus none of them would work correctly. The only way to fix it was either to remove/add the packages in via scripted events, or to give them independent variables.

 

Any ideas?

 

I'm noticing that my NPC stutters forward every 15 seconds or so, like it wants to use the package but something stops it from working. However, due to the conditons, no other package should conflict wth it and all conditions are set for the only package that I want to run, to run.

 

Currently you can only force re-evaluation of package stacks. In this respect Skyrim is a little different compared to Fallout NV it will only ever run the first valid package and never anything else (Naturally speaking a Package Re-Eval takes place every game hour while the player is not around and once every 10 game minutes when the player is around....Not so sure on that last one it might actually be faster then that.) what you can do is set up a global as a condition on the package and manipulate that global via a script for it to run or not then force a package re-evaluation. quest packages Will be a priority over an actors base package stack and scene packages take priority over quest packages generally speaking there are times where this isn't the case.

 

Your NPC stuttering could be any number of reasons, crappy NavMesh, Travel destination is invalid, using a Wait Procedure with disable movement data enabled, another quest package overtaking yours which is telling them to wait... More info on your package design and Quest would be nice. Also Forcing a Package Re-eval via scripting is not always a good idea can cause to npcs be confused (fidget around) or just plainly break their stacks and really it shouldn't be necessary if you design your package correctly. (If you are using a Travel Package honestly I don't see a need for a Re-eval since it will be considered complete when the npc reaches their destination or even if it didn't and a natural pack re-eval came up and a prior package was selected they will start that one up anyway.)

 

Finally are your Papyrus fragments on your packages? when a package is Reset, Completed or Thrown out the script attached to it will reset to so if your using local variables those will be lost.

Edited by BotOwned
Link to comment
Share on other sites

Guest Messenjah

Well, it is a custom quest with completely custom npc's and no other quests have anything interfering with the npc's behaviour. Custom location, custom navmesh. I would say it could be the navmesh, however, it looks fine and when the AI packages work, the npc move along their paths just fine.

 

Basically, it is a brothel. Normally, they are supposed to walk around the brothel and sit at tables, etc. That is their defauit package. However, when the player pays them, they tell the player to follow them. When they reach the trigger marker in the bed chamber area, they will forcegreet the player, asking them if they are ready. The player can still back out, which resets her to her default behaviour, or the player can proceed, or if the player doesn't go back at all, her scripts reset and she returns to default behaviour anyway. There aren't any fragments/scenes attached to the packages.

 

Basically, everything works great if the player goes through with "the deed." When the "deed," is done, (via fade-in/fade-out scenes), she uses an AI package that tells her to sleep in the bed. After 180 seconds, she defaults and returns. I've noticed if she goes to stage 3 (sleep), then defaults, it works better, than if she goes from stage 2 (forcegreet) to default. I also noticed that after she returns to her default behaviour, if you ask her again, she will take you into the room (so the follow package works), but she will not forcegreet the player again.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...