Jump to content

[LE] Can you change an actor's AI package list?


Cheyron

Recommended Posts

I have a mod where I am trying to change the AI packages the character uses when it evaluates their package list. I added some of my own and edited some existing ones but when I go in game the character seems to be running their original packages. Would it be because he was already loaded by the game? Can I just update actor's package list in creation kit and have the change reflected in game or does it not work if they are already loaded in the game? Would there be a way to completely reset the character??

Link to comment
Share on other sites

You can absolutely edit/change packages. But there's honestly a number of things that could cause a package not to work. Here's a few that come to mind:

  1. Incorrect Conditions - Make sure the conditions are set correctly. Keep in mind that some condition functions don't function as clearly as they might seem; if you post the conditions of the package, I could double-check them for you.
  2. Priority - Packages function with a priority system: Scene Packages > Alias Packages > Actor Form Packages. A scene package wouldn't be the problem here, but maybe an Alias Package is overwriting your packages? For most NPCs, this wouldn't be the problem, but I don't know which NPC you're editing, so it's worth a mention.
  3. Incorrect Package Configuration - A lot of packages are pretty straightforward in setup, but, like condition functions, some don't function as clearly as they appear to. As with the conditions, if you post the packages/procedures, I'll double-check them for you.
  4. You did something stupid - Maybe you didn't fill a parameter, set a value, or add the package to the NPC. We've all been there. Hell, I spent the better half of a year trying to stop the snakes in my mod Zebsirious from flying, and not once did it dawn on me to uncheck the "flies" box on the race form.

It could be something else as well, probably, but I'd definitely look into these four, at least. A little bit more detail would help, as well.

Link to comment
Share on other sites

I agree with zebsi.

 

I'd add that if you COC into a cell actors don't work correctly in a lot of respects. They may not be evaluating their packages. Entering a cell through a proper load door rectifies this issue.

 

Also, if you're using a save that has already been tested on, before you made the package changes, regardless of whether you saved at the time or not, that can cause them to run their old packages.

 

Often, in game, quests run a line of script to get actors and alias actors to 'EvaluatePackages().

Link to comment
Share on other sites

  • 8 months later...

I have

 

I have a mod where I am trying to change the AI packages the character uses when it evaluates their package list. I added some of my own and edited some existing ones but when I go in game the character seems to be running their original packages. Would it be because he was already loaded by the game? Can I just update actor's package list in creation kit and have the change reflected in game or does it not work if they are already loaded in the game? Would there be a way to completely reset the character??

Don't know why I never replied but I am working on this again now after so many months. I gave up trying to make this stupid NPC do what I want. It is the NPC Terek. When you first buy Breezehome he is in there saying you have to kill him. I'm not going to do that so I wanted to make a quest where I threaten him and then he backs down and leaves. So his original packages have him sandboxing or sleeping near his editor location... so i made a global variable to act as a flag when i had kicked him out... and then on the conditions for his original packages i made sure the flag = 0 in order for his original packages to run and i set the variable to 1 in a topic on end script. And then I have the actor evaluate his packages. I also made new packages which tell him to sandbox in the bannered mare cell if the global variable is set to 1. So shouldn't all his original packages be blocked and only the ones that have conditions where my global = 1 would run. I don't know maybe i will take some screenshots and show you cause this problem is annoying... this guy just stands there after I do the dialogue that runs the script to edit the global and evaluate his packages even though no package telling him to do stuff near the editor location should be running. The guy actually does nothing... just stands there. Does he not know how to leave the house or something?

 

1. Terek NPC has 3 original packages, DefaultSandboxEditorLoc, DefaultSleepEditorLoc, SandboxBreezehome. These 3 packages have no conditions other than a schedule attached. I then edited them to only allow them to run if my global variable = 0. Then I duplicated the sleep and sandbox editor loc package (not the breezehom one, that one i just block). Then in these new packages i tell him to sleep and sandbox in the bannered mare cell. So he will follow the same schedule as his orginal packages but now the condition for these 2 duplicated packages are when my global variable = 1.

 

2. I searched in creation kit and he does not get used in any alias references. This is a very basic npc who does literally nothing but sandbox around breezehome and keeps repeating dialogues. He is only referenced ever in the topic infos for the WhiterunDialogue quest.

 

3. I would hope the package configuration is fine since all i did was duplicate the two editor location packages and added conditions to run either the original or the edited ones based on if i selected the dialogue to threaten him. I will post screenshots but if you want you can open creation kit (if you have installed) and just filter for Terek under Actors. I can post screenshots... is that what you mean?

 

4. Yeah possibly but all i did was add two new packages... set a condition for original packages to run on when global variable = 0 ... then i have dialogue with npc that runs a script on end of topic info dialogue to set the global variable to 1 and then for akSpeaker "Terek" to EvaluatePackage(). Which will now block all his original packages and run the two duplicated packages which have the condition global = 1 and instead of editor location in the duplicated packages it is now location = in cell bannered mare.

Edited by Cheyron
Link to comment
Share on other sites

I agree with zebsi.

 

I'd add that if you COC into a cell actors don't work correctly in a lot of respects. They may not be evaluating their packages. Entering a cell through a proper load door rectifies this issue.

 

Also, if you're using a save that has already been tested on, before you made the package changes, regardless of whether you saved at the time or not, that can cause them to run their old packages.

 

Often, in game, quests run a line of script to get actors and alias actors to 'EvaluatePackages().

im not sure what COC means... iirc it is a console command but i never have used it. I am walking into Breezehome through the front door and I am trying to update Terek's package stack after I update a global variable that his packages consider in their conditions. Check my images below I just added... you can see when I update their packages in the topic response.

Edited by Cheyron
Link to comment
Share on other sites

75qtmQL.png

 

Uses of the Actor:

AWn2lxT.png

 

Me kicking him out:

XeteDeh.png

 

Original Sleep Package:

VgkJJm0.png

 

Original Sleep Package Updated Conditions:

HlRNffx.png

 

The added package to replace the above one when the global variable = 1:

4nJCfyq.png

 

And the condition for the "streets" version of the sleep package:

rwSivAb.png

Link to comment
Share on other sites

So anyways, I can get the dialogue from my quest to show up in game and it runs the code seen above so shouldnt it result in him going to the bannered mare? The example above shows the package for when he sleeps but the package for sandboxing is identical it just uses the sandboxing template... i still tell him to sandbox in the bannered mare. In my game he just stands there and does nothing.

Edited by Cheyron
Link to comment
Share on other sites

Well I decided to attach scripts to all of his packages to notify me when they start, end or change and none of his packages attached to his actor print messages when they are supposed to start. It makes me feel like all the package changes I am making are not being reflected in game. And I even checked with TES5Edit to make sure all the Skyrim stuff I edited like the Terek actor is not being overwritten by another esp. So i know my changes are updated in the load order but they do not seem to be reflected in game. I was able to use a scene to get him to first activate the breeze home door, then to activate the bannered mare door and then when the scene ends to evaluate his packages and lo and behold he goes to the bannered mare and i find him leaning up against a wall in there... so it appears the only way i could get it done was with a scene. I just wonder why not using conditions on packages would not evaluate correctly. Anyways I guess I am over it but if anyone knows or wants to test out what I am doing I wouldn't mind knowing what I did wrong. I didn't think I would have had to instruct him how to get to the bannered mare. Thanks.

Edited by Cheyron
Link to comment
Share on other sites

  • Recently Browsing   0 members

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