Jump to content

[LE] Allow multiple Nightingale Powers - Modifying quest script


Recommended Posts

Hi Nexus!

 

I'm getting more confident with the Object Manager, but am still new to scripts.

 

First off; I want to make it so that a player can have all three Nightingale Powers from the Thieves Guild Quest line at the same time, and instead switch between a trio of passives (like they switch between a selection of powers now).

 

 

  Reveal hidden contents

 

 

I can deduce that the powers are controlled through a quest: TGNightingalePowerHandler

This quest has little info beyond two scripts, which I've copied below (inelegantly).

 

 

  Reveal hidden contents

 

 

And I've had a look at the TGNQuestScript

 

  Reveal hidden contents

 

It seems to be that the TGNQuestScript removes all the powers... ? But in that case how is the proper one added afterwards?

 

To be concise

How do I let players pick up all powers simultaneously, and never lose them.

What would I have to change/replicate to let players switch between a (new) set of passives, but always keep all 3 active powers?

 

If anyone can help me clear this up, it'd be much appreciated.

Edited by Littlebigpeach
Link to comment
Share on other sites

TGNQuestScript does not remove all the powers, but just defines the function that can do it. The script which calls this function is TG09CircleTriggerScript :

 

 

  Reveal hidden contents

 

Edited by shumkar
Link to comment
Share on other sites

Ah, okay.

 

I also found TG09ShadowScript, -strifescript, -subterfugescript. They look like this:

 

  Reveal hidden contents

 

 

I don't get when/where the game defines pTG09Spell though.

 

I need the Cleanupspells (which I assume removes all three powers) to instead remove 3 custom buffs, and the new added ability should be a new custom ability that I made.

However; I still want the player to get (and permanently keep) all three powers somehow.

 

I'm guessing now:

In TGNQuestScript I change the lines

Function CleanUpSpells()

    Game.GetPlayer().RemoveSpell(pNightingaleShadowPerkSpell)
    Game.GetPlayer().RemoveSpell(pNightingaleSubterfuge)
    Game.GetPlayer().RemoveSpell(pNightingaleStrife)

to

Function CleanUpSpells()

	Game.GetPlayer().RemoveSpell(pShadowNewPassive)
	Game.GetPlayer().RemoveSpell(pSubterfugeNewPassive)
	Game.GetPlayer().RemoveSpell(pStrifeNewPassive)

But how do I define these new objects? And how do I make the game also add the old powers (and not remove them again)

 

 

 

I'm not sure which bits to edit where...

 

-Also, sorry for the late reply.

Edited by Littlebigpeach
Link to comment
Share on other sites

  On 2/16/2020 at 4:02 PM, Littlebigpeach said:

I still want the player to get (and permanently keep) all three powers somehow.

 

The author of Better Nightingale Powers adds the 3 powers with console commands player.addspell 000f1987, player.addspell 000f1986, player.addspell 00017122. Sure, this could be done with Papyrus: https://www.creationkit.com/index.php?title=AddSpell_-_Actor

 

  On 2/16/2020 at 4:02 PM, Littlebigpeach said:

I'm guessing now:

 

In TGNQuestScript I change the lines

 

I would recommend you to create your own functions in your own scripts... You could attach your scripts to your quest: https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts (and also see the next link below).

 

  On 2/16/2020 at 4:02 PM, Littlebigpeach said:

But how do I define these new objects?

 

To be able to work with any object in a Papyrus script you need to define it as property. An example (with 2 properties: a spell and the player). The property value can be auto-filled or assigned manually while attaching the script in CK (to a quest, or to something else, does not matter to what).

Edited by shumkar
Link to comment
Share on other sites

  On 2/16/2020 at 7:45 PM, shumkar said:

 

 

The author of Better Nightingale Powers adds the 3 powers with console commands player.addspell 000f1987, player.addspell 000f1986, player.addspell 00017122. Sure, this could be done with Papyrus: https://www.creationkit.com/index.php?title=AddSpell_-_Actor

 

 

I would recommend you to create your own functions in your own scripts... You could attach your scripts to your quest: https://www.creationkit.com/index.php?title=Dynamically_Attaching_Scripts (and also see the next link below).

 

 

 

So if I create a new quest, how would I run it? It still needs to coincide with the old mechanics (talking to Nocturnal, activating one of the moon crests in Twilight Sepulcher)

 

And even if I did add all three powers to the player ("game().GetPlayer().AddSpell( Name of Spell)") I'd still have to modify the original mod script to prevent removing the powers again when player revisits the crests.

 

i.e.

  • When player first completes Darkness Returns they should get All three Power spells (I could add these to the original quest script; in whatever part comes after talking to Nocturnal, I guess).
  • When player afterwards chooses a Crest (Half Moon, Full Moon, Crescent Moon) NOTHING HAPPENS TO THE POWERS (which would normally be (partially) removed), but they get one new passive.
  • The player can then switch Moon Crest once per day (or week?), removing any previous passives and adding a new one. But retaining all the active power spells.

 

Edit: I might just be in over my head here. I've never really tried scripting before (except for one, very simple mod where I had an On-Game-Start quest that added a bunch of perks to player permanently, but that was much simpler than this dynamic back and forth Nightingale system).

Edited by Littlebigpeach
Link to comment
Share on other sites

Unfortunately, my progress in the Thieves Guild is low so I don't know all these specifics.

 

Yeah, the most difficult part here is not scripting as such (unlikely the script would be long and complex; just adding/switching spells) but understanding to which object(s) your script(s) should be attached (may be it's better to attach not to your quest, but to something else), and which event(s) it should contain, to cover all cases that you described. There is a plenty of events in Papyrus https://www.creationkit.com/index.php?title=Category:Events

 

Edit: I don't have yet much experience in creating mods either.

Edited by shumkar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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