Jump to content

Can there be multiple instances of a Quest?


Recommended Posts

I have a Quest that is like a building block. It has a simple walking scene that can be configured to send actors to script-defined locations.

 

I would like to be able to make "copies" or instances of this Quest dynamically via script and assign different actors to each, going to different places at the same time.

 

Is that possible with Papyrus and the CK?

 

If so, how do you instantiate a new copy of a Quest?

Link to comment
Share on other sites

You would have better luck using an activator or item placed into the actor's inventory and setting object properties via your quest. I don't believe it is possible to dynamically create quests. If you'd like, you can post your source and I can try to help more. Edited by Reneer
Link to comment
Share on other sites

Isn't this something you'd solve with specific packages? E.g. apply a package to an actor (e.g. walk to point X with keyword Y).

In script you can apply a package to an actor, wait for it to complete, then run another package and so forth in sequence.

Edited by Reginald001
Link to comment
Share on other sites

You would have better luck using an activator or item placed into the actor's inventory and setting object properties via your quest. I don't believe it is possible to dynamically create quests. If you'd like, you can post your source and I can try to help more.

 

Thank you. Unfortunately, I don't think there is any way around it. I'll just have to make a big list of duplicate Quests, serialize them and dole them out as needed.

 

That part I can set up. It just hurts my brain (and pride) having to do things that way. It's always fun to make 20 copies of some thing in CK then realize that they all need some small adjustment.

 

I could use help with a related bug that has me on the ropes. I posted about it here: https://forums.nexusmods.com/index.php?/topic/6572066-setplayeraidriven-causing-all-npcs-to-go-brain-dead/

 

Since the last post in that thread, I have converted the scenes over to their own individual quests. But, that did not fix the issue. Upon stopping the quests, the NPCs all seem to have lost their AI.

 

 

Isn't this something you'd solve with specific packages? E.g. apply a package to an actor (e.g. walk to point X with keyword Y).

In script you can apply a package to an actor, wait for it to complete, then run another package and so forth in sequence.

 

I don't believe that there is a way to apply a package to an actor in script. It would be HUGE if there was. That functionality was added through SKSE for Skyrim and was very helpful. But, I don't believe that the equivalent exists in Fallout 4. Please correct if I am wrong!

 

Instead of that, in Fallout 4, to apply packages you have to use the various CK mechanics (factions, spells, scenes, etc.). In my situation, I am using scenes. And they are proving to be extremely fickle. I am plugging actors into refaliases dynamically. Then starting the scene. That works. But, after I stop the scene, the NPCs have lost their AI. I have spent many hours adjusting order of commands, turning off parts of the code in between, etc. It looks like it has something to do with using SetPlayerAIDriven. But, little is conclusive and I pretty much need that to make the Player walk to a location...

Link to comment
Share on other sites

 

You would have better luck using an activator or item placed into the actor's inventory and setting object properties via your quest. I don't believe it is possible to dynamically create quests. If you'd like, you can post your source and I can try to help more.

 

Thank you. Unfortunately, I don't think there is any way around it. I'll just have to make a big list of duplicate Quests, serialize them and dole them out as needed.

 

That part I can set up. It just hurts my brain (and pride) having to do things that way. It's always fun to make 20 copies of some thing in CK then realize that they all need some small adjustment.

 

I could use help with a related bug that has me on the ropes. I posted about it here: https://forums.nexusmods.com/index.php?/topic/6572066-setplayeraidriven-causing-all-npcs-to-go-brain-dead/

 

Since the last post in that thread, I have converted the scenes over to their own individual quests. But, that did not fix the issue. Upon stopping the quests, the NPCs all seem to have lost their AI.

 

 

Isn't this something you'd solve with specific packages? E.g. apply a package to an actor (e.g. walk to point X with keyword Y).

In script you can apply a package to an actor, wait for it to complete, then run another package and so forth in sequence.

 

I don't believe that there is a way to apply a package to an actor in script. It would be HUGE if there was. That functionality was added through SKSE for Skyrim and was very helpful. But, I don't believe that the equivalent exists in Fallout 4. Please correct if I am wrong!

 

Instead of that, in Fallout 4, to apply packages you have to use the various CK mechanics (factions, spells, scenes, etc.). In my situation, I am using scenes. And they are proving to be extremely fickle. I am plugging actors into refaliases dynamically. Then starting the scene. That works. But, after I stop the scene, the NPCs have lost their AI. I have spent many hours adjusting order of commands, turning off parts of the code in between, etc. It looks like it has something to do with using SetPlayerAIDriven. But, little is conclusive and I pretty much need that to make the Player walk to a location...

 

 

I was going over this: https://www.creationkit.com/index.php?title=Category:Packages

 

And I think it's possible through conditions. Add all potential packages to the actors alias through a quest. Add conditionals to the packages. Depending on the conditions met, the packages should activate.

 

After setting your new conditions in script, run the Actor.EvaluatePackage() function so it picks up on the new conditionals.

 

You can hook into the specific package events for greater control:

https://www.creationkit.com/fallout4/index.php?title=Package_Script

 

I haven't done all this myself, but in theory it should be possible.

 

(edit) A completely different approach might be to use a magic/spell effect!

 

See this note on the actor script page, it's about specific scripts, but it did give me the idea on the magic/spell effect:

 

You may not attach a script to an actor if that actor would be used by a leveled actor list. If an actor is used in a leveled actor list, its "Scripts" section will be disabled.

  • There is a workaround in this in cases where you need actors to be both leveled and scripted - you can create a constant/self magic effect and apply that at the race level. For example, the FXDragonBloodDamageScript handles applying some special blood FX to dragons through combat. Since dragons are used to populate leveled lists, however, we attach this script to AbFXDragonBloodDamage, which is an effect on the AbDragonBloodFX spell. That's then assigned as a special racial ability of the DragonRace. You can look at a similar example in how the WispMothers work, too.
Edited by Reginald001
Link to comment
Share on other sites

It's not possible, but If your purpose is to send actors to different locations (markers), you can do it without a scene. Look at the WorkshopParent quest. It makes all your settlers go to their job places and use their job furniture in the same time while they all use the same packages and the same alias Data.

You can create a refcollection alias with a travel or use idle marker package set to linked reference(+some keyword). Set conditions for the package to work only if the subject HasLinkedRef with your keyword ==1. And use your script to add different actors to the collection and add/remove linked references for each actor.

 

 

If for some reason you need it be a scene, you can add multiple actors to the same scene , but you'll have to create actions or each actor in this case.

Edited by kitcat81
Link to comment
Share on other sites

Thank you for this clarification.

 

I have used some of those other mechanics a bit. But, I found them to be pretty unreliable. I think they work as they are supposed to. But, the problem is that the vanilla game has so many things going, so many layers of keywords and prioritized tasks that there is always something that interferes with your packages.

 

Scenes were the first mechanic I used that could reliably really take over an NPC actor and stop them from doing random things.

Link to comment
Share on other sites

 

I was going over this: https://www.creationkit.com/index.php?title=Category:Packages

 

And I think it's possible through conditions. Add all potential packages to the actors alias through a quest. Add conditionals to the packages. Depending on the conditions met, the packages should activate.

 

After setting your new conditions in script, run the Actor.EvaluatePackage() function so it picks up on the new conditionals.

 

You can hook into the specific package events for greater control:

https://www.creationkit.com/fallout4/index.php?title=Package_Script

 

I haven't done all this myself, but in theory it should be possible.

 

Just coming back to this. I tested this with a test NPC. Gave it two packages with a global 'state' variable as conditional for the package.

Now when I flip the global in script, either of the package activates just as expected.

 

So you can easily add multiple packages, then make them dependent on global state variables.

 

 

Link to comment
Share on other sites

Thank you. That is nifty way to approach it.

 

Though, it still doesn't seem to get us out of having to make multiple copies of the mechanic in order to have it running on a bunch of actors at the same time, dynamically chosen.

 

Also not sure if will over-ride all of the vanilla packages the same way that scenes do. I tried a keyword scheme before and I couldn't eliminate all of the other vanilla keyword interferences.

Link to comment
Share on other sites

Thank you. That is nifty way to approach it.

 

Though, it still doesn't seem to get us out of having to make multiple copies of the mechanic in order to have it running on a bunch of actors at the same time, dynamically chosen.

 

Also not sure if will over-ride all of the vanilla packages the same way that scenes do. I tried a keyword scheme before and I couldn't eliminate all of the other vanilla keyword interferences.

For you keywords you might be able to work with SetLinkedRef()..?

And it should override, if you set the package flags correctly, just like a furniture package overrides other behavior.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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