Jump to content

Kill multiple NPCs in random order


Recommended Posts

So I'm working on an update for my mod You're Not Okay, and I wanted to add something new. I have very little experience with scripting, and the lack of proper documentation makes this a hair-pulling experience at the best of times. What I'm currently trying to do is make a hidden quest that starts on game start and requires you to kill each of the named raider bosses that you encounter throughout the game. Once that hidden objective is completed, the real quest can begin, where you have to fight a Ebony Warrior-style endboss. For this concept of killing multiple bosses, I needed the player to be able to do so in a random order, since the objectives will be hidden and this is just supposed to be accomplished via normal gameplay instead of something you seek out to complete.

I started with Seddon4494's quest tutorials on YouTube, since while not perfect, it's a far sight better than anything I could do myself, and I managed to get a very generic quest called Kill where the PC had to go and murder Ack-Ack. It worked well enough, so I moved on to adding Chancer, and I looked to the Silver Shroud quest to see how Smiling Kate and Noprthy were handled, since you had the optional objective to kill either one first. idid some finagling, and I got it so that you now can kill either one and both objectives show up at once, but now it no longer recognizes when either one is killed (quest doesn't update) and on top of it, now the quest no longer starts on game launch.

I've been working on this update for nearly a year at this point. AAnybody able to help? I can provide any documentation needed.

Link to comment
Share on other sites

As long as the actors are persistent named uniques who are placed/instantiated in the game at start then its absolutely zero hassle.

 

Gimme the actor names and I can have a quest up and running in 30 mins.

 

Just one thing, if they have to be killed killed by player that can be tricky as its the "last shot" that counts, in which case they have to be made protected which I cant participate in (base game hackery).

Link to comment
Share on other sites

Maybe should just check it off if they are dead by whatever means, companions and assisting allies would otherwise be a complicating factors.

Tracking too ridgidly for certain could interfere with Sim Settlements: Conqueor as it has Jared, Red, and think it was Ack-Ack that need to be killed for that starting quest.

Link to comment
Share on other sites

As long as the actors are persistent named uniques who are placed/instantiated in the game at start then its absolutely zero hassle.

 

By persistent named uniques, do you mean actor markers or actual actors placed in the world? Because in the vanilla game, they're markers that spawn actors on loading. They have no other quests that they're involved in whatsoever. Can I send the .esp so you can look it over?

Link to comment
Share on other sites

Gimme names I give you quest. I'm fast. I don't look at other peoples stuff any more, usually takes far longer trying to work out WTF is going down.

That's fair. I need to set up an invisible quest that begins on game start and requires the player to kill these NPCs in no particular order.

Ack-Ack - USAF Olivia
Bosco - D.B. Technical High School
Chancer - Andrew Station
Cinder - Revere Beach Station
Clutch - Back Street Apparel
Helter Skelter - Malden Center
Jared - Corvega Assembly Plant
Zeller - East Boston Preperatory School (Deb-Kessler)
Red Tourette - Federal Ration Stockpile
Slab - Pickman Gallery
Sinjin - Milton General Hospital (Silver Shroud)
Sully Mathis - Thicket Excavations
Tower Tom - Beantown Brewery
Walter - Walden Pond
Wire - Libertalia (Only if Synth Retention not started yet, otherwise count as dead)
Once they are all dead the player is approached by an NPC named Rampage who invites them to a duel (different quest) and the invisible quest is marked complete, starting the duel quest.
I don't need all of them coded, if you can show me how to do two or three I'm sure I can figure out the rest. Any help would be immensely appreciated.
Link to comment
Share on other sites

Here ya go CLICKY DOWNLOAD SKKTrackActorKills esp, ba2 and source scripts.

 

This is a quick (and possibly dirty, but never had an issue) way to manage specific ObjectReferences with a FormList rather than faffing about trying to pick quest alias fill conditions. The first 4 actors have been added to the form list SKK_TAKActorList and tested fine.
You need to drag the rest in: CreationKit Menu:Edit:FindText Actor name: Sort Actor : Right click Use Info: Double click Used - In cell view window drag the actor editor ID into form list (do not pick the Reset version).
If you look at the scripts there are heaps of ways to track state, I use GlobalVariables a lot as they are easy dependency free access between mods via GetFormFromFile.
Heaps of debug output so you can follow it through, and helps quickly console player.moveto then kah for testing.
Whatever your follow on is can sit in that quest or if external then RegisterForRemoteEvent(pSKK_TAKQuest, "OnStageSet") and look for (auiStageID == 1000) which is completion.
Enjoy !
Link to comment
Share on other sites

First of all, thank you. This is far better and more streamlined than anything I've ever seen. As practially a beginner when it comes to papyrus scripting, this is a godsend.

Second, I don't get it. But let me explain: I can't tell if the quest is running in-game (when I use SetStage 10 in the console, it doesn't return any errors, but the quest isn't visible either)

Edit: Okay, after some research it turns out that for a quest to show up you have to have at least one objective set, so I did that and it works and shows up now, but still doesn't show any quest markers on the specific actors. But that shouldn't be an issue since they're all clearly labelled in the CK as need to die.

So the way it looks to me, is instead of doing a lot of complex scripting, you set it up to track a global variable of 'number to kill' and 'number killed' that both reference a specific list with the exact actors marked in it. By setting it to mark the specific actors and not the cells, you were able to ensure that this would work even if installed halfway through a save file by checking the specific reference alias to see if it were still active in the game. (Going to check this now, brb) Yep, it works if I kill them all with the mod loaded, and it works if I only kill some and then load the mod to kill the rest. No idea how, but it does so huzzah.

I cannot think of any future issues with this part (that I've spent almost a solid month trying to figure out, but hey) and the rest should honestly be cake. So thank you again! With a few modifications to help me guide through it, I should be able to port it into my work with ease and minimal hassle.

Link to comment
Share on other sites

The quest is not listed and the actors are not marked because in your "specification of requirements":

 

Once that hidden objective is completed

since the objectives will be hidden

 

If you want the quest to show up then it needs to be given a category and an objective that points to the alias, trivial 30 second job if your clear on input requirements.

 

I even included a console command in the script so you can quickly check status in the debug log; [ cqf SKK_TAKQuest "SKK_TAKQuestScript.GetStats" ] or you can use basic console commands [ sqv SKK_TAKQuest ] or [ show SKK_TAKActorsToGo ] or [ show SKK_TAKActorsKilled ] or ... testing mods console commands 101

Link to comment
Share on other sites

  • Recently Browsing   0 members

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