How to force a package on an actor with a script?

Post » Thu Jun 21, 2012 5:11 am

I remember it was very easy in oblivion ("AddScriptPackage") but I can't figure out how to do it in skyrim! ._.

I just want to make a spell that sends the target to the nearest bed. I made the package, I made the spell... but now I don't know how to make them work together!
User avatar
Lindsay Dunn
 
Posts: 3247
Joined: Sun Sep 10, 2006 9:34 am

Post » Wed Jun 20, 2012 11:01 pm

Have the spell start a quest, and in that quest have an optional reference alias set to use the package. Then in the spell, after you start the quest, force the spell's target into that reference alias.
User avatar
Andrea Pratt
 
Posts: 3396
Joined: Mon Jul 31, 2006 4:49 am

Post » Thu Jun 21, 2012 3:42 am

Ummmm... English please? ^^ I mean all I know about quests is how to attach dialogue to them. I totally have no idea what to do with aliases, scenes and other stuff like that...

Are you sure that's the only way? Because if so: stupid bethesda! Why complicate something that used to be so easy!
User avatar
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Wed Jun 20, 2012 9:21 pm

It's less complicated than it sounds, it's just one step more... Best read up on the wiki!

http://www.creationkit.com/Alias
User avatar
Melis Hristina
 
Posts: 3509
Joined: Sat Jun 17, 2006 10:36 pm

Post » Thu Jun 21, 2012 5:28 am

It's less complicated than it sounds, it's just one step more... Best read up on the wiki!

http://www.creationkit.com/Alias

I read it a million times

Didn't help ._.

And if I understand it right it has potential for all sorts of problems for example:

If this spell has an area and several actors get caught up in it do all of them fill the alias and proceed to perform the package?
If I cast this spell on one actor and then on another will the first actor keep performing the package?
If I stop this fake quest will the aliased actor (or actors!) keep performing the package?

If answer to any of these questions is no then it's a step backwards from oblivion and not what I'm looking for (and bethesda is stupid and SKSE functions can't come soon enough!)
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Wed Jun 20, 2012 11:25 pm

If this spell has an area and several actors get caught up in it do all of them fill the alias and proceed to perform the package?

No, this is why I suggested you mark the alias as optional and then force the spell target into it.

If I cast this spell on one actor and then on another will the first actor keep performing the package?

No, if you want to be able to cast it and have it active on multiple NPCs at once, you'd need to create a number of reference aliases and write some code in the spell to loop through them and fill the first available one. Or, create multiple quests and loop through them, testing whether they are running.

If I stop this fake quest will the aliased actor (or actors!) keep performing the package?

No, in fact this is how you'd remove the package, by stopping the quest.

If answer to any of these questions is no then it's a step backwards from oblivion and not what I'm looking for

It may be a step backwards from Oblivion, but it's the way things need to be done in Skyrim. Don't shoot the messenger.
User avatar
Agnieszka Bak
 
Posts: 3540
Joined: Fri Jun 16, 2006 4:15 pm

Post » Thu Jun 21, 2012 6:36 am

If the effect has an area effect, you could use more than one package.

Not sure if the package is cleanned on it's own or you need to clean it first. But it could be interesting to test what happens if you didn't clean it.

If the quest stops, the alias goes and the package with it.

Yes, it's a step backwards. Aliases are a nice addition, but they shouldn't take out the direct package adding functionality (which by the way can be done with the console).
User avatar
kirsty williams
 
Posts: 3509
Joined: Sun Oct 08, 2006 5:56 am

Post » Thu Jun 21, 2012 1:30 am

Yes, and if you can wait, there's always the chance that SKSE will add back the capability to directly add and remove packages to actors. The alias system complicates that, though, because packages added via alias will always take priority over packages directly on the actor.
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Thu Jun 21, 2012 5:46 am

I would argue that filling a quest alias with an already attached AI package via script is a step forward from having to directly force an AI package on an NPC. Most professional programmers would agree. It's a cleaner process and you never have to modify the NPC via script to begin with. You should never directly modify an NPC via script if it can be at all avoided.
User avatar
Hope Greenhaw
 
Posts: 3368
Joined: Fri Aug 17, 2007 8:44 pm

Post » Wed Jun 20, 2012 8:25 pm

(which by the way can be done with the console).

Sooooo depressing... ._.

Whatever. It's one of the tiniest parts of my mod. It doesn't deserve to be so complicated to make so I won't even try. I'll wait for SKSE functions...
User avatar
Sammygirl
 
Posts: 3378
Joined: Fri Jun 16, 2006 6:15 pm


Return to V - Skyrim