Jump to content

Help assigning packages to NPCs via dialogue


json4639

Recommended Posts

I'm brand new to modding and I'm having a problem which hopefully has a simple solution I'm overlooking. The forum has been helpful but none of the solutions posted worked for me. I basically want to talk to an NPC and after a successful persuade check, have them go to a location and stay there. Here is what I did:

 

1. Created a new NPC with no AI packages and put them in the Sleeping Giant Inn in Riverwood.

2. Created a new location and a new faction.

3. Created a new sandbox package and attached it to an XMarkerHeading in my new location. The package has a conditional for only members of this faction.

4. I added a script property for my faction and after I'm done talking to the NPC I put this:

akSpeaker.AddToFaction(MyFaction)
akSpeaker.EvaluatePackage()

I assumed they would now have the new package and go to that location and start sandboxing. I can get through the dialogue and the NPC agrees, but he just stays there in the Inn. The other things I tried were:

 

Created a new reference alias for my quest, with a specific reference to my XMarkerHeading and in the Alias Package Data section I put my package. I created a ReferenceAlias property and put this in my end dialogue fragment.

MyPackageReferenceAlias.ForceRefTo(akSpeaker)
akSpeaker.EvaluatePackage()

One other thing I tried was creating a property for the package itself and doing this in the dialog fragment.

ActorUtil.addPackageOverride(akSpeaker,MyPackage)
akSpeaker.EvaluatePackage()

No matter what I do, my NPC just stays where he is. Can anyone help with what I'm doing wrong, or maybe share any debugging tips so I can hopefully figure it out myself?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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