Need some help with special AI PackagesDialogue stuff

Post » Thu Jun 21, 2012 3:26 am

I have a control quest I'm using for special functions. In this quest, I have an empty reference alias that I plan to fill later with random NPC's. These NPC's could be guards, peasants, bandits, or anything else really. These actors could be hostile to the player, or they could be allies.

I want this reference alias to ignore any and all previous AI/Dialogue/hostility data, and instead, force them to stand completely still, and not start combat with the player. The reference alias would then have special dialogue available with the player (Which again, would not contain any of the previous dialogue options that they had before.)

How exactly do I do this? I know there's a section in the reference alias window for AI packages, but quite frankly I'm lost about the hostility factor, and I'm not sure if simply adding new dialogue would void the old.

Is what I want to do actually possible? If so, can anyone point me in the right direction?
User avatar
Smokey
 
Posts: 3378
Joined: Mon May 07, 2007 11:35 pm

Post » Wed Jun 20, 2012 5:35 pm

Sounds like it should be possible.

There is a http://www.creationkit.com/Wait_(Procedure) that should hold the actor motionless, which you can apply to the alias via a package. You may need to also have a combat override package which also applies a wait package, to prevent hostile actors from initiating combat.

In extreme cases you can also http://www.creationkit.com/EnableAI_-_Actor, although I don't think that will be necessary.

And you can override the actor's normal dialogue by using http://www.creationkit.com/Dialogue_Branch attached to your quest--dialogue that "blocks" other topics from appearing.
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Thu Jun 21, 2012 6:37 am

Sounds like it should be possible.

There is a http://www.creationkit.com/Wait_(Procedure) that should hold the actor motionless, which you can apply to the alias via a package. You may need to also have a combat override package which also applies a wait package, to prevent hostile actors from initiating combat.

In extreme cases you can also http://www.creationkit.com/EnableAI_-_Actor, although I don't think that will be necessary.

And you can override the actor's normal dialogue by using http://www.creationkit.com/Dialogue_Branch attached to your quest--dialogue that "blocks" other topics from appearing.
Cool, thanks for the info. I'll play around with it and see if I can make it work.
User avatar
Zosia Cetnar
 
Posts: 3476
Joined: Thu Aug 03, 2006 6:35 am

Post » Thu Jun 21, 2012 2:17 am

Well, I've successfully managed to make the actor stop combat with he player using the "Wait" sequence in a package, but the actor is still "hostile" to the Player, and I can't seem to prevent that. Anyone have any ideas?
User avatar
maria Dwyer
 
Posts: 3422
Joined: Sat Jan 27, 2007 11:24 am

Post » Wed Jun 20, 2012 5:48 pm

In the same reference alias, you can apply new factions to the actor--so you could try adding a faction to them that is an ally of the player.

If that doesn't work you could also try directly setting the relationship between the specific actor filling the alias and the player via http://www.creationkit.com/SetRelationshipRank_-_Actor.
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am

Post » Thu Jun 21, 2012 12:30 am

In the same reference alias, you can apply new factions to the actor--so you could try adding a faction to them that is an ally of the player.

If that doesn't work you could also try directly setting the relationship between the specific actor filling the alias and the player via http://www.creationkit.com/SetRelationshipRank_-_Actor.
Thanks for responding again. Adding a faction to him that has the PlayerFaction set as an "Ally" has seemed to work well at making him not hostile, and I even got the proper dialogue I want running. Unfortunately however, I'm still having a few issues.

Here's everything I'm wanting to do with the alias.
1) I want to prevent the player from being able to damage the actor, and I want the actor to ignore all attacks made against him by the Player.
2) I then want one of the dialogue options to cause the actor to attack the Player. This option would also of course make him able to lose health again.
3) Once the actor dies (the refalias is essential so once he goes into bleedout) I want to disable him, put him back where I want him, and then re-enable in 24 game hours.
4) Once enabled, he should not attack the player, become invulnerable once more, and have the same dialogue options available.
The above would repeat for as long as I tell it to.

Most of that I can handle working out on my own (and have, for the most part), however, there is one part that I don't know how to fix.
During 4), the actor immediately starts combat with the player the moment he sees him, and never de-agro's. I've tried using StopCombat() on him, but he just starts it up again right after.
I'd prefer not to use SetRelationShipRank if I don't have to, seeing as how according to the wiki, that doesn't save properly with some actors.

Any ideas?
User avatar
Daniel Lozano
 
Posts: 3452
Joined: Fri Aug 24, 2007 7:42 am

Post » Wed Jun 20, 2012 11:40 pm

(1) SetInvulnerable? (This applies to the ActorBase though, not so great if the actor is not unique, maybe just increase their health by a lot)
(1.5) SetIgnoreFriendlyHits
(2) StartCombat(player) and undo what you did in (1)
(3) Attach an alias script for OnBleedout
(4) StopCombatAlarm, if he doesn't have allied factions add them.

Factions and I believe relationship ranks determine hostility between an actor and yourself.
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Post » Wed Jun 20, 2012 11:09 pm

(1) SetInvulnerable? (This applies to the ActorBase though, not so great if the actor is not unique, maybe just increase their health by a lot)
(1.5) SetIgnoreFriendlyHits
(2) StartCombat(player) and undo what you did in (1)
(3) Attach an alias script for OnBleedout
(4) StopCombatAlarm, if he doesn't have allied factions add them.

Factions and I believe relationship ranks determine hostility between an actor and yourself.
As far as the invulnerability is concerned, I ended up using SetGhost to prevent him from being able to be attacked. However, I'm still having issues with 4)

I'm using a faction that has the player set as an ally, and I'm calling "IgnoreFriendlyHits" as well as "StopCombatAlarm", however he is still hostile once I re-enable him. Not too sure why he's refusing to leave the player alone. Any ideas?
User avatar
benjamin corsini
 
Posts: 3411
Joined: Tue Jul 31, 2007 11:32 pm

Post » Wed Jun 20, 2012 4:37 pm

Does your reference alias have the "allow disabled" checkbox checked? If not, the NPC will be forced out of the alias when disabled, and you'd need to manually add them back in or refresh the quest when they are re-enabled.
User avatar
James Baldwin
 
Posts: 3366
Joined: Tue Jun 05, 2007 11:11 am

Post » Thu Jun 21, 2012 1:04 am

Does your reference alias have the "allow disabled" checkbox checked? If not, the NPC will be forced out of the alias when disabled, and you'd need to manually add them back in or refresh the quest when they are re-enabled.
Yep. If he didn't, wouldn't that prevent him from being re-enabled after the 24 hours passed? The issue is that he is remembering his previous combat state from before he was disabled.
User avatar
Marta Wolko
 
Posts: 3383
Joined: Mon Aug 28, 2006 6:51 am

Post » Wed Jun 20, 2012 9:00 pm

Aha! Turns out I needed to call "StopCombatAlarm" on both the alias, as well as the player. I was just calling it on the alias, so that wasn't enough.

I was pretty lost on the whole thing, and then I remembered the brawl quests do pretty much exactly what I'm trying to do. (Force combat, and then on bleedout revive the alias and stop combat) So I went and checked out their script and that was what they had done.

Dunno why I didn't think about checking that quest to begin with ><. Thanks for all the help guys.
User avatar
Len swann
 
Posts: 3466
Joined: Mon Jun 18, 2007 5:02 pm


Return to V - Skyrim