Jump to content

Need help with enabling/spawning an NPC


Ruhadre

Recommended Posts

Hello all, the mod I'm working on is this currently:

 

Keeper Carcette Survives

http://www.nexusmods.com/skyrim/mods/83350/

http://www.nexusmods.com/skyrimspecialedition/mods/9476/

 

I'd like my new Carcette, as well as 3 others, to spawn at the End of the Awakening Quest in the Dawnguard Questline. DLC1VQ01 stage 200

 

I'm trying to accomplish this by having the npc's starting initially disabled. As per steve40's advice, I'd like to add a little fragment at that quest stage that enables the npcs. I just have to add the NPC ref to the fragment as a property.

 

steve40 was kind enough to give me enough information to get started, but unfortunately for me, I seem to be VERY dense when it comes to scripting/quests. I have read and re-read all the Creation Kit tutorials on this, but it wasn't a clear enough answer for me. I'm actually pretty good with the Creation Kit, but this element of it totally escapes me.

 

Rather than continue to bug my friend about it, I figured I'd approach the community for help on this one. I REALLY want to learn how to do this! I feel like I'm just a few steps away from getting this to work.

 

Any help on this would greatly be appreciated! I'd need a very specific step-by-step explanation that even a novice can understand. Seriously, the instructions must be fed to me like baby food, LMAO!

 

If no one is up to the task of explaining this to me, then I am open to inviting another modder on-board the project if they are interested in sorting that part out.

 

Thank you everyone for your support thus far!

Link to comment
Share on other sites

 

http://i.imgur.com/7eavRbb.jpg

 

 

And make sure to fill your property with auto-fill if you've named it the same, or otherwise manually.

 

http://i.imgur.com/o2giHwa.jpg

 

 

Then your script would say something like NewProperty.Enable() - obviously replacing NewProperty with whatever you named it.

Link to comment
Share on other sites

  • 4 weeks later...

Okay, it is no biggie, so lets do it already.

Prelude. Lets assume you want more than one NPC to spawn at the same time, which is when the DLC1VQ01 quest reaches stage 200. You should also take into account it is possible that by the time your mod is installed (and your quest is launched) the DLC1VQ01 quest might be completed yet (*don't know if stage 200 is the last one so we'll check both conditions).

The idea behind it. We could do it smart way. You can have as many NPCs (Objects in general) enabled at once as you'd like. If you place NPCs somewhere and place Xmarker near one of them you could connect them all to the Xmarker and attach script to that marker, but still. I don't know for sure what you are up to in your quest, so we gonna do it differently (more stupid way). And unlike F4, Skyrim doesn't have an OnStageSet() event thus we won't use quest script here and will do it in an old-fashion manner.

Realization. So you place NPCs, mark them as Initally disabled, then go to scripts tab and add a script localy to each NPC (object). You will need to create a new script first but later you can simply attach it localy on the other refs just like any vanilla script.

Script's code (without the first line which will be generated automatically of course):

Quest property DLC1VQ01 auto
 
Auto State Initial   ;starts when the mod gets initialized
Event OnCellAttach()
  if (DLC1VQ01.GetStage() >= 200) || (DLC1VQ01.IsCompleted())
    Self.Enable()
    GoToState("DONE")
  endif
EndEvent 
EndState
 
State DONE  ;empty state
EndState

Now don't forget to fill out the properties. One in this case. You can press Auto-Fill here, cause I named that property right as the quest ID.

Edited by werr92
Link to comment
Share on other sites

  • Recently Browsing   0 members

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