Help - Search - Members - Calendar
Full Version: Replacing Protagonist with the 6th NPC
The Black Wyrm's Lair - Forums > Mod development resources & discussion > Tutorials, hints & tips
Vlad
About 8 years ago, when I started modding, I solved the problem of removing your protagonist from the game and replacing him/her with another NPC. I'd like to put this code here by memory, so if someone wants to make this trick, he/she can do this. Just please don't forget to mention that this code is mine, and not yours. The first script block codes whichever trap or trigger, which triggers this script:

IF
IsOverMe(Player2)
THEN
RESPONSE #100
StartCutScene("RemProt")
END

The following block removes Protagonist (kills him/her instantly) and replaces him/her with Player 2, for example Imoen. Then you'll have an empty spot for the sixth NPC. Just a note, if you have some romances, don't try this. wink.gif

RemProt.bcs:

IF
Global("VP_Kill_Protagonist","GLOBAL",0)
THEN
RESPONSE #100
CutSceneId(Player2)
SetGlobal("VP_Kill_Protagonist","GLOBAL",1)
ActionOverride(Player1,PlayDead(0))
FadeToColor([20.0],0)
ForceSpell(Player1,SKIN_DANCER_RESTORE)
ActionOverride("TR...01",DestroySelf())
FadeFromColor([20.0],0)
EndCutSceneMode()
END

"TR...01" - is a death variable of the Skin Dancer creature who reveals himself in Trademeet. I don't rememebr by heart, but you can find it in NI.
Ardanis
I remember reading about it a couple of years ago here on BWL. Was quite surprised to know that was possible.

For a little more detail - the replacement is carried out by the "151 - replace creature" opcode (which is being used by the SKIN_DANCER_RESTORE spell).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.