Talk:AddScriptPackage

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

Missing reference[edit source]

There should be a reference to all those PackageID.. --HawkFest 04:51, 22 January 2008 (EST)

Not sure I follow. Do you mean a list of all PackageIDs?--Haama 11:31, 22 January 2008 (EST)
Yes. --HawkFest 08:15, 6 February 2008 (EST)
The packages used by this function are the same packages that are listed in the packages window, listing them all on the Wiki would be pointless. You'll have to look up the specifics of a package in the CS anyway, the package ID doesn't tell you much.
Perhaps the first sentence should be changed to: Add a package to the calling actor. Scripting package could cause confusion and implies the packages used by this function are different from regular packages.
--Qazaaq 18:22, 6 February 2008 (EST)
Yes i know I just have to scroll the list... Bah, I was lazy asking for this, I would've liked a list in a text file that I could scroll easily (and that I could import into an Excel spreadsheet), so I could copy/paste those IDs into my scripts instead of typing the whole name, and so I could also add notes near each one that I am using/creating (about what they do, their particularities, etc), a question of usefulness and proficiency in the end... But I can do it myself, underneath the question I was wondering if such a list existed to start with. Thanks! --HawkFest 21:56, 6 February 2008 (EST)

AI overload risk?[edit source]

When using this feature, I found that adding a package to more than one NPC at a time caused AI processing to seize up. Just a random occurrence, or something that should be avoided? --cbh 05:32, 5 May 2009 (EDT)

Early re-evaluation[edit source]

Just an additional observation, it appears that addscriptpackage "expires" once the current procedure has completed as opposed to the complete package, whatever you may have specified with setpackduration; e.g. if you add a wander package and tell it to run for, say, 1,800 seconds, it'll expire either once that 1,800 seconds is up or when the NPC has completed the current component of that wander, whichever happens first: and since a wander package is made up of numerous small wanders interspersed with other activities, the package can complete much sooner than expected.

I've seen a suggestion that ticking the "must complete" box may help with this, but if you do this for a non-completing package such as wander or eat, Construction Set will moan at you when you start it up, and I'm not sure if it actually works anyway.

Of course this observation may be influenced by other factors, such as the aforementioned AI overload (or whatever was the issue at hand) but at this stage it seems to be the case. However, I'm not quite confident enough to change the article text to reflect this finding! At least not yet, anyway. --cbh 17:13, 6 May 2009 (EDT)


Issue if NPC is in dialog[edit source]

From a few tests: AddScriptPackage does not work if NPC is in dialog with another NPC. As far as I can deduct from test results, if an NPC enter an spontaneous dialog, the engine saves the current AI package, creates and runs a temporary package (FormID: "FFxxxxxx") and, at the end, restores the saved package.

If a script issues an AddScriptPackage during this period, the NPC goes on with the dialog and, when finished, goes back to whatever he was doing before. The added package seems to run together with the dialog package for a while.

Example: an NPC has no AI packages. A script add a Wander package in location A. NPC reaches location A and, while wandering, enters dialog with another NPC. A script adds a Travel package to location B. The NPC starts walking toward the new location while still talking. Midway, the dialog finishes and the NPC resumes the initial Wander package, disregarding the new Travel package (with Must reach location flag). Hence the deduction that the engine saves/restores packages in this scenario. QQuix 13:18, 2 October 2009 (EDT)