AI Package

From the Oblivion ConstructionSet Wiki
(Redirected from Package)
Jump to navigation Jump to search

General[edit | edit source]

An AI-package is a bundle of hidden AI instructions with conditions for when and how to execute it. AI-packages are placed on an actor by dragging them from a CS database to the AI-Object's Package List. Several AI-packages of an actor are organized by the principle of the "cascading list".

When an actor needs to pick a new package, the list is examined from the top. The first package that is found valid based on its time schedule and logical conditions is selected and activated for the actor. At a given time only one AI-package is active for a single actor.

Editing[edit | edit source]

An AI-package can be edited by double-clicking it in the CS database of packages (Menu: Character -> Packages) or in the AI-Object's package list. If you modify the unique ID name of a package, you are asked whether you want to create a new package ("new form") or modify the current package. Both cases can be meaningful for your Mod project. You can always create a new package but great caution has to be applied if you modify a package which hasn't been created newly before, because in this case you would be modifying the behaviour of the original game or an external mod!


600px

Entry Fields[edit | edit source]

  • Package Type: Sets the basic behavior type for the package. Each type enable and disable appropriate fields in the tabs.
  • Flags: A set of flags that modify the behavior or appearance of the actor, or the validity of the package.
  • Door Flags: Any teleport doors that are owned by the actor or the actor's faction and which are in the cell or adjacent cells will be locked or unlocked depending on how these flags are set. This is primarily used by shop merchants in the game.
  • Schedule Tab: Sets the time at which the package can run. The schedule cannot be in less than one hour blocks. As a rule, either set day and month, or day of the week, not both.
  • Note: There is an engine bug where, if a package is supposed to occur on given day(s) of the week or month, but the duration spans past midnight, the after-midnight component will occur a day before it's supposed to, then the package will occur normally, then the before-midnight component will occur a day after it's supposed to (as if the package was repeating and being truncated at the midnights. For example, a package that is to run on a specific day from 18:00 to 02:00 the next day will actually run from 00:00 to 02:00 on the start day, then 18:00-02:00 as intended, and then again at 18:00-00:00 on the end day. Split these packages so that they don't cross midnight to avoid this effect.
  • Conditions Tab: A full set of conditions that must be true for the package to be selected. Only applies if the schedule is valid. "Run on Target" is only valid if the package has a defined Target.
  • Location Tab: Defines the location for the package to occur. It is strongly recommended that you only use the Near Reference option. The In Cell option can produce unexpected behavior. If no location is selected then it defaults to the Near Current Location setting.
    • Near Reference: Select the reference from the render window or from the lists.
    • In Cell: Not recommended. It can produce unexpected behavior.
    • Near Current Location: Centers the package's location on where the NPC is when the package starts.
    • Near Editor Location: Centers the package's location on the default location of the NPC.
    • Radius: The distance from the package's center that is considered valid. The units are Inches.
      • Note: While in most cases the radius means from the actor outward, in the case of "Travel" packages, it means distance from the location.
  • Target Tab: Some packages types have a target that is independent from the location.
    • Specific Reference: Select the reference from the render window or the lists.
    • Any Object: Select a particular object ID or a class of objects.
    • Value: The number of these items, that the package will interact with if it is a Generic Target. It is the distance to the target if it is a specific target.