Jump to content

On command AI packages: What am I doing wrong?


Vicyntae

Recommended Posts

Creation kit being frustrating, so I have to ask more questions. I have a quest loaded up with aliases with all actors surrounding the player, so that I can monitor them. However, I also want to be able to cause them to run certain AI packages when called by a script. I made the packages and conditionalized them with a magic effect, which I have the actor cast on themselves with the script. The magic effect itself has a script that calls evaluatepackage() on the actor when it starts and finishes. The packages themselves are acquire packages set to seek out food items in the vicinity of the actor, end when food is found, and presumably end when the magic effect expires. I also set the quest priority to 1 for testing purposes.

 

Annnnnnnnd nothing happens. I put on the monitor a debug message to tell me when they change packages, but the message never comes. I force cast the spell using the console, check if they have the effect (they do), but they continue doing what they were doing (I'm testing on Faendal in Riverwood).

 

Am I doing this right? Has anybody tried this before?

 

I included some pictures of the settings I'm using on the package.

Spoiler

Capture.thumb.PNG.fbdade69e76316737b8e298d4f62725a.PNGCapture2.thumb.PNG.5d4539d1851926be9a3a1b9ab63167c2.PNGCapture3.thumb.PNG.e9cfa51d169fa84f9d64c739b2709017.PNGCapture4.thumb.PNG.79e80411de5f3f69bf7fdac62828183d.PNG

 

Link to comment

I am more than sure that the aliases are filled, and the packages are on each one.

I am not sure what you mean by level. If you mean where I inserted the packages for the actors, they are on the reference aliases of the monitor quest. See below.

There is one other package that I added, but it's conditionalized the same way with a different effect, both of which dispel one another.

 

Spoiler

Capture5.thumb.PNG.c09b56572866ae78ac47e8feee10c2b7.PNG

 

Link to comment

How are you filling that Alias? Are you using ForceRefTo() in a script?

 

If you use in-game console command: sqv questname

You should be able to see if Aliases are filled or not.

 

Also, I notice that you're using 'search own inventory' bool on food. Not sure what base actor inventory looks like, but might be safer to turn it off.

Link to comment
36 minutes ago, Tyrant99 said:

How are you filling that Alias? Are you using ForceRefTo() in a script?

 

If you use in-game console command: sqv questname

You should be able to see if Aliases are filled or not.

 

Also, I notice that you're using 'search own inventory' bool on food. Not sure what base actor inventory looks like, but might be safer to turn it off.

A script on another quest is filling the alias, so that the monitors aren't being filled and cleared constantly.

 

I don't what that does either, so I'll go ahead and try that.

 

EDIT: Nope, didn't work. Question: Would PapyrusUtil work?

Link to comment

Personally, I've used two pretty reliable ways of passing AI conditionally to Aliases.

 

One is Global Variables, set AI conditional to GetGlobal, and then set a GlobalVariable value in script and you can make loop / toggle periodically with a OnUpdateGameTime Event if you want.

 

Another would be to trigger a short scene with specific packages passed through to the Aliases, with no conditions they're designed to either stop or move to next stage upon completion.

 

Your MagicEffect method could work, but I am not sure if it would be the most reliable toggle. CK Wiki mentions the following caveat on HasMagicEffect:

 

  • This function will still return true if the effect is applied to the actor but the condition specified in the spell or magic effect is not met. This function cannot test if the active magic effect is actually affecting the actor.
Link to comment
5 hours ago, Tyrant99 said:

Personally, I've used two pretty reliable ways of passing AI conditionally to Aliases.

 

One is Global Variables, set AI conditional to GetGlobal, and then set a GlobalVariable value in script and you can make loop / toggle periodically with a OnUpdateGameTime Event if you want.

 

Another would be to trigger a short scene with specific packages passed through to the Aliases, with no conditions they're designed to either stop or move to next stage upon completion.

 

Your MagicEffect method could work, but I am not sure if it would be the most reliable toggle. CK Wiki mentions the following caveat on HasMagicEffect:

 

  • This function will still return true if the effect is applied to the actor but the condition specified in the spell or magic effect is not met. This function cannot test if the active magic effect is actually affecting the actor.

Sorry. I gave up and just used Papyrus Util. I just couldn't get it work with the magic effects. Thanks anyway.

Link to comment
On 4/13/2018 at 9:36 AM, Teutonic said:

How does PapyrusUtil help you?

The ActorUtil Script enables you to add package overrides directly to an actor and set the priority. Instead of fiddling with the conditions system, I just add a script to a magic effect that adds the override at the start and removes it when it ends. The only problem so far is that the actor dosen't return immediately to their previous package afterwards, so they just stand there after the package completes.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use