this thread is supposed to provide an detailed overview on how the Vampire Lord is implemented into Skyrim. Obviously many of us are playing around with the new toys Beth gave us, which also means that we still need to get familar with it. So I figured if we would share our discoveries we could save each other a lot of time

What I'll be doing is to write down what I (think I have) found so far. I will then update this post until it hopefully involved into comprehensive overview/guide on how to aproach the new features of our vampiric friend. I can't really say that I have gotten very far yet, but I hope I will be re-editing that sentence soon

Please feel free to critize or correct what you are reading in this post. If there are any topics I'm not covering please let me know and I will happily include them. But please keep in mind that the contents of this overview should focus on the new elements the update delivered us.
Table of contents
1. Applying abilities and spells to the Vampire Lord
2. Editing the perk tree
3. How to change Armor /Appearance
4. Items
5. ActivationBlocker
6. Fixing the Serana Absorb Bug
7. Compilable Scripts *Update*
1. Applying abilities and spells to the Vampire Lord
Quite frankly I haven't really gotten far on that end. I was hoping that maybe the VL spells would have their own magic school which would categorize the spel asa exclusive VL spell. Unfortunately that is not the case, I don't see how the game knows which spell are supposed to be for human and which for VL form yet. I'm afraid that the script (DLC1_QF_DLC1DialogueVampire_0101964a) might be playing it's part regarding that topic as well. This script shoul further be discussed under 2.
- Update: The spells that are avaialable in VL mode seem to be governed by the script: "DLC1PlayerVampireChangeScript"which is part of the" DLC1PlayerVampireQuest"
2. Editing the perk tree
- All VL perks are governed by the quest "DLC1DialogueVampire"
- The perks trigger by reaching a certain stage of that quest. So from how I see it he quest progression simulates the level progression of the perk tree. Meaning by feeding often enough your quest progresses -> you get a perk as reward.
- The quest has 11 stages (10-110) . Each stage has a unique Function Name and is assigned to the script DLC1_QF_DLC1DialogueVampire_0101964A
- Said script seems to be the real deal in governing the VL perk tree.
- The problem: At the moment the Dawnguard.bsa only contains the .pex file and not the source file (.psc). Therefore it is a nightmare to edit it since you can't edit the properties with the CK nor access the Source Code with the CK. However, you can use the tool "PEX Decompile" (http://skyrim.nexusmods.com/mods/2909/) to change the format .dpex which you can open with text editors. Getting that back to work as a valid compiled script seems to be a pain though. (Please let me know if you made any prgoress on that)
- The functions of that script are structured as the following example:
Spoiler
None FUNCTION Fragment_11() {0}
FLAGS 0
VARS
None ::NoneVar
actor ::temp21
Bool ::temp22
ENDVARS
callstatic game, IncrementStat, ::NoneVar, "NumVampirePerks", 1
callstatic game, GetPlayer, ::temp21
callmethod AddSpell, ::temp21, ::temp22, ::DLC1SupernaturalReflexes_var, true
ENDFUNCTION
None FUNCTION Fragment_11() {0}
FLAGS 0
VARS
None ::NoneVar
actor ::temp21
Bool ::temp22
ENDVARS
callstatic game, IncrementStat, ::NoneVar, "NumVampirePerks", 1
callstatic game, GetPlayer, ::temp21
callmethod AddSpell, ::temp21, ::temp22, ::DLC1SupernaturalReflexes_var, true
ENDFUNCTION
- The Fragments are the function names for the above mentioned quest stages and there represent the exp progression in the perk tree. Here is a list telling you which quest stage is which fragment:
Stage 20: Fragment_2
Stage 30: Fragment_4
Stage 40: Fragment_6
Stage 50: Fragment_9
Stage 60: Fragment_11
Stage 70: Fragment_13
Stage 80: Fragment_15
Stage 90: Fragment_17
Stage 100: Fragment_19
Stage 110: Fragment_21
- Unfortunately I have no idea what the temps are supposed to be yet...
3. How to change Armor /Appearance
- If you take a look at the Vampire Lord Race (DLC1VampireBeastRace) in the preview window you will see that our ugly friend is naked -> There is armor that can be equipped to the Vampire Lord Race. Granting this comunity the oportunity for some epic VL custom armors.
- So far there are 2 armors in the DLC. The standard one that the player's VL is wearing (VampireLordArmorAA) and the way cooler armor that Harkon is wearing in VL mode (VampireLordRoyalArmorAA). Both armors are worn on the ringslot.
- The wings are part of the armor and not of the race model, meaning they could easily be changed.
- The cape is not part of Harkon's armor, but a standalone model. Therefore Harkon's royal armor seems to be defined in the Outfit DLC1dunHarkonVampireLordRoyalOutfit
- Update: The armor are not interpreted by the game as armor but as character assets. I haven't gotten into character assets yet, but I will do some digging later on...
- Update: There is also a female version of Harkon's royal armor
- Update: Just like the spells the player's armor seems to be detemined by the script: "DLC1PlayerVampireChangeScript" which is part of the "DLC1PlayerVampireQuest".
4. Items
- There are 4 artifacts ingame which are equipped in human form buta ffect the stats of the Vampire Lord. Meaning there is a possibility to translate the enchantments of items worn as human over to VL mode.
- I haven't really gotten into this yet...
5. Activation Blocker
- The perk that filters what the VL can interact with is called "DLC1VampireActivationBlocker"
- To modify this filter browse DLC1VampireActivationBlocker in the CK -> Open the perk entry -> Select the "Target" condition tab -> Modifiy the conditions as you desire (the "werewolvecanactivate" keyword seems to be the major interaction filter, preventing you from interacting with most things)
- Many thanks to DarkenDE for the advice!
- Tip: Spare yourself the effort and use DarkenDE's "Vampire Lords can Loot and Activate" mod (http://skyrim.nexusmods.com/mods/21631)
6. Fixing the Serana Absorb Bug
- Simply delete the condition that is attached to the main damage effect (the last one).
- If Serana is set as your follower the condition prevents you from using effect 3 which is the main damage of the spell.
- http://img696.imageshack.us/img696/6522/captureleo.png
- Many thanks to Kinjo for the advice!
7. Compilable Scripts *Update*
- TMPhoenix managed to properly decompile the first DG scripts, I'll list the ones relevant for VLS.
(compiler in that order)
dlc1vampiretrackingquest:
Spoiler
Scriptname DLC1VampireTrackingQuest extends Quest conditionalrace property playerRace auto
vampirequestscript:
Spoiler
ScriptName VampireQuestScript extends Quest ConditionalSpell Property LastPower auto;Variable to track if the player is a vampire;0 = Not a Vampire;1 = Vampire;2 = Vampire Mid-Point;3 = Full VampireInt Property VampireStatus Auto ConditionalSpell Property LastLeftHandSpell auto
DLC1PlayerVampireChangeScript
Spoiler
Scriptname DLC1PlayerVampireChangeScript extends Quest Conditionalimagespacemodifier property VampireChange autoFloat property UnearthlyWillExtensionTimeSeconds auto{How long (in real seconds) that feeding extends vampire time}spell property VampireRaiseThrall03 autospell property DLC1PlayerVampireLvl45AndBelowAbility autoBool property Untimed autospell property DLC1SupernaturalReflexes autoperk property DLC1GargoylePerk autoBool __tryingToShiftBack = falsespell property DLC1VampireDrain09 autoBool property DLC1HasLightfoot autospell property DLC1CorpseCurse autosound property NPCVampireTransformation automagiceffect property DLC1RevertEffect autovisualeffect property FeedBloodVFX auto{Visual Effect on Wolf for Feeding Blood}spell property DLC1VampireRaiseDeadLeftHand03 autospell property DLC1PlayerVampireLvl20AndBelowAbility autospell property AbVampire01 autospell property DLC1PlayerVampireLvl15AndBelowAbility autospell property VampireDrain04 autoglobalvariable property DLC1VampirePerkPoints autoglobalvariable property DLC1BloodMagic autoeffectshader property DLC1VampireChangeBackFXS autoarmor property eruditeRing autoString Ground = "GroundStart"formlist property CrimeFactions autospell property LeveledDrainSpell autospell property VampireHuntersSight autoidle property SpecialFeeding autospell property DLC1VampireDetectLife autospell property VampireDrain03 autoglobalvariable property pDLC1nVampireRingBeast autoQuest property VampireTrackingQuest autospell property AbVampire01b autospell property DLC1VampireMistform autospell property DLC1VampireChange autoString LandStart = "LandStart"armor property gargNecklace autoglobalvariable property DLC1VampireBloodPoints autoarmor property DLC1VampireLordArmor autoperk property DLC1UnearthlyWill autoglobalvariable property DLC1VampireTotalPerksEarned autoperk property DLC1CorpseCursePerk automessage property PlayerVampireFeedMessage autoFloat property StandardDurationSeconds auto{How long (in real seconds) the transformation lasts}spell property VampireDrain01 autospell property DLC1VampireBats autoeffectshader property DLC1VampireChangeBack02FXS autospell property AbVampire04 autospell property VampireInvisibilityPC autoQuest property DialogueGenericVampire autospell property DLC1PlayerVampireLvl25AndBelowAbility autoperk property DLC1MistFormPerk autoglobalvariable property pDLC1nVampireNecklaceGargoyle autospell property DLC1VampireDrain05 autospell property VampireSunDamage03 autoperk property DLC1VampiricGrip autoglobalvariable property PlayerVampireShiftBackTime autoarmor property batNecklace autoglobalvariable property pDLC1nVampireRingErudite autoglobalvariable property GameDaysPassed automessage property PlayerVampireExpirationWarning autospell property LeveledRaiseDeadSpell autospell property DLC1VampireLordSunDamage autoperk property DLC1NightCloakPerk autoglobalvariable property DLC1NightPower autoBool __trackingStarted = falseperk property DLC1VampireBite autorace property VampireLordRace autospell property DLC1VampireRaiseDeadLeftHand01 autoglobalvariable property DCL1VampireLevitateStateGlobal auto{This Global tracks what state the Vampire Lord is in: 0 = Not a Vampire Lord, 1 = Walking, 2 = Levitating}spell property VampireSunDamage04 autoperk property LightFoot autospell property DLC1VampireDrain06 autospell property DLC1Revert automessage property DLC1VampirePerkEarned autospell property DLC1PlayerVampireLvl50AndOverAbility autospell property DLC1AbVampireFloatBodyFX auto{Spell FX Art holder for Levitation Glow.}spell property VampireCharm autospell property DLC1VampireDrain08 autoString Levitate = "LevitateStart"spell property CurrentEquippedLeftSpell autospell property VampireDrain02 autoString BiteStart = "BiteStart"String LiftoffStart = "LiftoffStart"Bool __shiftingBack = falsespell property AbVampire03 autoglobalvariable property DLC1VampireNextPerk autoBool __prepped = falseString TransformToHuman = "TransformToHuman"Bool __shuttingDown = falsespell property DLC1PlayerVampireLvl30AndBelowAbility autospell property DLC1VampireRaiseDeadLeftHand02 autospell property AbVampire04b autoformlist property VampireDispelList autospell property LeveledAbility autoFloat property DLC1BiteHealthRecover autofaction property PlayerVampireFaction autospell property VampireRaiseThrall01 autospell property BleedingFXSpell auto{This Spell is for making the target of feeding bleed.}spell property DLC1VampireDrain07 autoarmor property beastRing autoglobalvariable property VampireFeedReady autospell property DLC1VampireRaiseDeadLeftHand05 autoFloat __durationWarningTime = -1.00globalvariable property TimeScale autospell property DLC1ConjureGargoyleLeftHand autoFloat __UnearthlyWillExtensionTime = -1.00spell property VampireSunDamage01 autoglobalvariable property pDLC1nVampireNecklaceBats autoperk property DLC1VampireActivationBlocker autospell property DLC1PlayerVampireLvl10AndBelowAbility autospell property AbVampire02b autospell property AbVampire03b autoperk property DLC1SupernaturalReflexesPerk autofaction property HunterFaction automessage property DLC1BloodPointsMsg autospell property VampireSunDamage02 autosound property VampireIMODSound autospell property DLC1NightCloak autospell property DLC1VampireRaiseDeadLeftHand04 autospell property AbVampire02 autospell property DLC1VampiresGrip autoimagespacemodifier property VampireWarn autospell property VampireRaiseThrall02 autofaction property DLC1PlayerVampireLordFaction autoFloat property DurationWarningTimeSeconds auto{How long (in real seconds) before turning back we should warn the player}spell property DLC1PlayerVampireLvl40AndBelowAbility autoglobalvariable property DLC1VampireMaxPerks autoPlayerVampireQuestScript property PlayerVampireQuest autoperk property DLC1DetectLifePerk autospell property DLC1PlayerVampireLvl35AndBelowAbility autospell property VampireRaiseThrall04 autospell property FeedBoost autoFunction StartTracking()actor PlayerActor = game.GetPlayer()if (__trackingStarted) returnendif__trackingStarted = trueif (PlayerActor.isEquipped(beastRing)) pDLC1nVampireRingBeast.setValue(1)endifif (PlayerActor.isEquipped(eruditeRing)) pDLC1nVampireRingErudite.setValue(1)endifif (PlayerActor.isEquipped(batNecklace)) pDLC1nVampireNecklaceBats.setValue(1)endifif (PlayerActor.isEquipped(gargNecklace)) pDLC1nVampireNecklaceGargoyle.setValue(1)endifRegisterForEvents()DCL1VampireLevitateStateGlobal.setValue(1)debug.Trace("VAMPIRE: Race swap done; starting tracking and effects.", 0)PlayerActor.UnequipAll()PlayerActor.EquipItem(DLC1VampireLordArmor, false, true)PlayerActor.SetAttackActorOnSight(true)game.SendWereWolfTransformation()PlayerActor.AddToFaction(PlayerVampireFaction)int cfIndex = 0while (cfIndex < CrimeFactions.GetSize()) debug.Trace("VAMPIRE: Setting enemy flag on " + CrimeFactions.GetAt(cfIndex), 0) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(true) cfIndex += 1endwhileHunterFaction.SetPlayerEnemy(true)game.SetPlayerReportCrime(false)__durationWarningTime = RealTimeSecondsToGameTimeDays(DurationWarningTimeSeconds)__UnearthlyWillExtensionTime = RealTimeSecondsToGameTimeDays(UnearthlyWillExtensionTimeSeconds)PlayerActor.RemoveSpell(VampireSunDamage01)PlayerActor.RemoveSpell(VampireSunDamage02)PlayerActor.RemoveSpell(VampireSunDamage03)PlayerActor.RemoveSpell(VampireSunDamage04)PlayerActor.AddSpell(DLC1VampireLordSunDamage, false)PlayerActor.AddSpell(LeveledAbility, false)PlayerActor.AddSpell(VampireHuntersSight, false)PlayerActor.AddSpell(DLC1Revert, false)PlayerActor.AddSpell(DLC1VampireBats, false)PlayerActor.EquipSpell((DialogueGenericVampire as vampirequestscript).LastPower, 2)CheckPerkSpells()if (PlayerActor.HasPerk(LightFoot)) DLC1HasLightfoot = trueelse DLC1HasLightfoot = false PlayerActor.AddPerk(LightFoot)endifFloat currentTime = GameDaysPassed.GetValue()Float regressTime = currentTime + RealTimeSecondsToGameTimeDays(StandardDurationSeconds)if (PlayerActor.HasPerk(DLC1UnearthlyWill)) regressTime += __UnearthlyWillExtensionTimeendifPlayerVampireShiftBackTime.setValue(regressTime)debug.Trace("VAMPIRE: Current day -- " + currentTime, 0)debug.Trace("VAMPIRE: Player will turn back at day " + regressTime, 0)PlayerActor.DispelSpell(DLC1VampireChange)RegisterForUpdate(3.0)SetStage(10)EndFunctionFunction SetUntimed(Bool untimedValue)Untimed = untimedValueif Untimed UnregisterForUpdate()endifEndFunctionFunction UnloadSpells()LeveledDrainSpell.Unload()LeveledRaiseDeadSpell.Unload()DLC1VampiresGrip.Unload()DLC1ConjureGargoyleLeftHand.Unload()DLC1CorpseCurse.Unload()EndFunctionFunction PrepShift()actor PlayerActor = game.GetPlayer()debug.Trace("VAMPIRE: Prepping shift...", 0)VampireChange.Apply(1.00)VampireIMODSound.Play(PlayerActor)game.SetInCharGen(true, true, false)PlayerActor.AddPerk(DLC1VampireActivationBlocker)game.SetBeastForm(true)game.EnableFastTravel(false)PlayerActor.SetActorValue("GrabActorOffset", 70)int count = 0while (count < VampireDispelList.GetSize()) spell gone = VampireDispelList.GetAt(count) as spell if (gone != None) PlayerActor.DispelSpell(gone) endif count += 1endwhilegame.DisablePlayerControls(false, false, true, false, false, false, false, false, 1)game.ForceThirdPerson()game.ShowFirstPersonGeometry(false)EstablishLeveledSpells()PreloadSpells()__prepped = trueEndFunctionFunction Revert()int numPerks = game.QueryStat("NumVampirePerks")debug.Trace("VAMPIRE: Perks stat = " + numPerks, 0)if numPerks >= DLC1VampireMaxPerks.value game.AddAchievement(58)endifUnregisterForUpdate()SetStage(100)EndFunctionFunction Shutdown()if __shuttingDown returnendif__shuttingDown = trueactor PlayerActor = game.GetPlayer()DCL1VampireLevitateStateGlobal.setValue(0)PlayerActor.GetActorBase().SetInvulnerable(false)PlayerActor.SetGhost(false)game.SetBeastForm(false)game.EnableFastTravel(true)game.SetInCharGen(false, false, false)debug.Trace("VAMPIRE: Transform to human done - remove activation blocking perk and allow recast of Vampire Change spell", 0)PlayerActor.RemovePerk(DLC1VampireActivationBlocker)PlayerActor.RemoveSpell(VampireHuntersSight)UnloadSpells()game.EnablePlayerControls(false, false, true, true, true, false, false, false, 1)stop()EndFunctionFunction PreloadSpells()LeveledDrainSpell.Preload()LeveledRaiseDeadSpell.Preload()DLC1VampiresGrip.Preload()DLC1ConjureGargoyleLeftHand.Preload()DLC1CorpseCurse.Preload()EndFunctionFunction ShiftBack()__tryingToShiftBack = trueactor PlayerActor = game.GetPlayer()while (PlayerActor.GetAnimationVariableBool("bIsSynced")) utility.Wait(0.1)endwhile__shiftingBack = falseActuallyShiftBackIfNecessary()EndFunctionFunction RegisterForEvents()debug.Trace("Registering for Animation Events", 0)actor PlayerActor = game.GetPlayer()RegisterForAnimationEvent(PlayerActor, Ground)RegisterForAnimationEvent(PlayerActor, Levitate)RegisterForAnimationEvent(PlayerActor, BiteStart)RegisterForAnimationEvent(PlayerActor, LiftoffStart)RegisterForAnimationEvent(PlayerActor, LandStart)RegisterForAnimationEvent(PlayerActor, TransformToHuman)EndFunctionFunction ActuallyShiftBackIfNecessary()actor PlayerActor = game.GetPlayer()if __shiftingBack returnendif__shiftingBack = truePlayerActor.GetActorBase().SetInvulnerable(true)PlayerActor.SetGhost(true)if !DLC1HasLightfoot PlayerActor.RemovePerk(LightFoot)endifUnregisterForEvents()DCL1VampireLevitateStateGlobal.setValue(1)debug.Trace("VAMPIRE: Player returning to normal.", 0)game.SetInCharGen(true, true, false)UnregisterForUpdate()if PlayerActor.IsDead() debug.Trace("VAMPIRE: Player is dead; bailing out.", 0) returnendifVampireChange.Apply(1.00)VampireIMODSound.Play(PlayerActor)DLC1VampireChangeBackFXS.Play(PlayerActor, 12.00)int count = 0while (count < VampireDispelList.GetSize()) spell gone = VampireDispelList.GetAt(count) as spell if (gone != None) PlayerActor.DispelSpell(gone) endif count += 1endwhileCurrentEquippedLeftSpell = PlayerActor.GetEquippedSpell(0)(DialogueGenericVampire as vampirequestscript).LastLeftHandSpell = CurrentEquippedLeftSpellif (PlayerActor.GetEquippedSpell(2) == DLC1Revert) (DialogueGenericVampire as vampirequestscript).LastPower = DLC1VampireBatselse (DialogueGenericVampire as vampirequestscript).LastPower = PlayerActor.GetEquippedSpell(2)endifPlayerActor.RemoveSpell(LeveledDrainSpell)PlayerActor.RemoveSpell(LeveledAbility)PlayerActor.RemoveSpell(LeveledRaiseDeadSpell)PlayerActor.RemoveSpell(DLC1VampiresGrip)PlayerActor.RemoveSpell(DLC1ConjureGargoyleLeftHand)PlayerActor.RemoveSpell(DLC1CorpseCurse)PlayerActor.RemoveSpell(DLC1VampireDetectLife)PlayerActor.RemoveSpell(DLC1VampireMistform)PlayerActor.RemoveSpell(DLC1VampireBats)PlayerActor.RemoveSpell(DLC1SupernaturalReflexes)PlayerActor.RemoveSpell(DLC1NightCloak)PlayerActor.RemoveSpell(DLC1Revert)PlayerActor.RemoveSpell(DLC1VampireLordSunDamage)PlayerActor.DispelSpell(DLC1VampireDetectLife)PlayerActor.DispelSpell(DLC1VampireMistform)PlayerActor.DispelSpell(DLC1SupernaturalReflexes)PlayerActor.DispelSpell(DLC1Revert)PlayerActor.DispelSpell(VampireHuntersSight)PlayerActor.RemoveSpell(DLC1AbVampireFloatBodyFX)pDLC1nVampireNecklaceBats.setValue(0)pDLC1nVampireNecklaceGargoyle.setValue(0)pDLC1nVampireRingBeast.setValue(0)pDLC1nVampireRingErudite.setValue(0)PlayerVampireQuest.VampireProgression(PlayerActor, PlayerVampireQuest.VampireStatus)Float currHealth = PlayerActor.GetAV("Health")if (currHealth <= 70) debug.Trace("VAMPIRE: Player's health is only " + currHealth + "; restoring.", 0) PlayerActor.RestoreAV("Health", 70 - currHealth)endifdebug.Trace("VAMPIRE: Setting race " + (VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRace + " on " + PlayerActor, 0)PlayerActor.RemoveItem(DLC1VampireLordArmor, 2, true, None)(VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRacePlayerActor.SetRace((VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRace)DLC1VampireChangeBackFXS.stop(PlayerActor)DLC1VampireChangeBack02FXS.Play(PlayerActor, 0.1)game.ShowFirstPersonGeometry(true)PlayerActor.SetAttackActorOnSight(false)HunterFaction.SetPlayerEnemy(false)PlayerActor.RemoveFromFaction(PlayerVampireFaction)int cfIndex = 0while (cfIndex < CrimeFactions.GetSize()) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(false) cfIndex += 1endWhilegame.SetPlayerReportCrime(true)utility.Wait(5)debug.Trace("OnRaceSwitchComplete event took more than 5 seconds, shutting down ourselves.", 0)EndFunctionFunction CheckPerkSpells()actor PlayerActor = game.GetPlayer()if (PlayerActor.HasPerk(DLC1MistFormPerk) && !PlayerActor.HasSpell(DLC1VampireMistform)) PlayerActor.AddSpell(DLC1VampireMistform, false)endifif (PlayerActor.HasPerk(DLC1DetectLifePerk) && !PlayerActor.HasSpell(DLC1VampireDetectLife)) PlayerActor.AddSpell(DLC1VampireDetectLife, false)endifif (PlayerActor.HasPerk(DLC1SupernaturalReflexesPerk) && !PlayerActor.HasSpell(DLC1SupernaturalReflexes)) PlayerActor.AddSpell(DLC1SupernaturalReflexes, false)endifif (PlayerActor.HasPerk(DLC1VampiricGrip) && !PlayerActor.HasSpell(DLC1VampiresGrip)) PlayerActor.AddSpell(DLC1VampiresGrip, false)endifif (PlayerActor.HasPerk(DLC1CorpseCursePerk) && !PlayerActor.HasSpell(DLC1CorpseCurse)) PlayerActor.AddSpell(DLC1CorpseCurse, false)endifif (PlayerActor.HasPerk(DLC1GargoylePerk) && !PlayerActor.HasSpell(DLC1ConjureGargoyleLeftHand)) PlayerActor.AddSpell(DLC1ConjureGargoyleLeftHand, false)endifif (PlayerActor.HasPerk(DLC1NightCloakPerk) && !PlayerActor.HasSpell(DLC1NightCloak)) PlayerActor.AddSpell(DLC1NightCloak, false)endifEndFunctionFloat Function GameTimeDaysToRealTimeSeconds(Float gametime)Float gameSeconds = gametime * 60 * 60 * 24return gameSeconds / (TimeScale.value as Float)EndFunctionFunction Feed(actor victim)EndFunctionFunction WarnPlayer()VampireWarn.Apply(1.00)EndFunctionFunction HandlePlayerLoadGame()if (__prepped) PreloadSpells()endifEndFunctionFunction EstablishLeveledSpells()actor PlayerActor = game.GetPlayer()int playerLevel = PlayerActor.GetLevel()if playerLevel <= 10 LeveledDrainSpell = DLC1VampireDrain05 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand01elseif playerLevel <= 20 LeveledDrainSpell = DLC1VampireDrain06 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand02elseif playerLevel <= 30 LeveledDrainSpell = DLC1VampireDrain07 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand03elseif playerLevel <= 40 LeveledDrainSpell = DLC1VampireDrain08 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand04else LeveledDrainSpell = DLC1VampireDrain09 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand05endifif playerLevel <= 10 LeveledAbility = DLC1PlayerVampireLvl10AndBelowAbilityelseif playerLevel <= 15 LeveledAbility = DLC1PlayerVampireLvl15AndBelowAbilityelseif playerLevel <= 20 LeveledAbility = DLC1PlayerVampireLvl20AndBelowAbilityelseif playerLevel <= 25 LeveledAbility = DLC1PlayerVampireLvl25AndBelowAbilityelseif playerLevel <= 30 LeveledAbility = DLC1PlayerVampireLvl30AndBelowAbilityelseif playerLevel <= 35 LeveledAbility = DLC1PlayerVampireLvl35AndBelowAbilityelseif playerLevel <= 40 LeveledAbility = DLC1PlayerVampireLvl40AndBelowAbilityelseif playerLevel <= 45 LeveledAbility = DLC1PlayerVampireLvl45AndBelowAbilityelse LeveledAbility = DLC1PlayerVampireLvl50AndOverAbilityendifEndFunctionFunction OnAnimationEventUnregistered(objectreference akSource, String asEventName)debug.Trace("Animation Event Unregistered for " + akSource + ": " + asEventName, 0)EndFunctionFunction OnAnimationEvent(objectreference akActor, String akEventName)actor PlayerActor = game.GetPlayer()debug.Trace("VAMPIRE: Animation Event! " + akActor + " " + akEventName, 0)if (akActor == PlayerActor) if (akEventName == TransformToHuman) ActuallyShiftBackIfNecessary() endif if (akEventName == BiteStart) debug.Trace("VAMPIRE: Handle BiteStart", 0) DLC1VampireBloodPoints.value = http://forums.bethsoft.com/topic/1401055-the-vampire-lord-workshop-what-dowe-you-know-so-far/DLC1VampireBloodPoints.value + 1 if DLC1VampireTotalPerksEarned.value < DLC1VampireMaxPerks.value DLC1BloodPointsMsg.Show(0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00) debug.Trace("VAMPIRE: Bite kill move, Blood " + DLC1VampireBloodPoints.value, 0) if DLC1VampireBloodPoints.value >= DLC1VampireNextPerk.value DLC1VampireBloodPoints.value = http://forums.bethsoft.com/topic/1401055-the-vampire-lord-workshop-what-dowe-you-know-so-far/DLC1VampireBloodPoints.value - DLC1VampireNextPerk.value DLC1VampirePerkPoints.value = DLC1VampirePerkPoints.value + 1 DLC1VampireTotalPerksEarned.value = DLC1VampireTotalPerksEarned.value + 1 DLC1VampireNextPerk.value = DLC1VampireNextPerk.value + 2 DLC1VampirePerkEarned.Show(0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00) endif PlayerActor.SetActorValue("VampirePerks", (DLC1VampireBloodPoints.value / (DLC1VampireNextPerk.value as float)) * 100) endif if PlayerActor.HasPerk(DLC1VampireBite) PlayerActor.RestoreActorValue("Health", DLC1BiteHealthRecover) endif PlayerActor.SetActorValue("VampirePerks", (DLC1VampireBloodPoints.value / (DLC1VampireNextPerk.value as float)) * 100) game.IncrementStat("Necks Bitten", 1) endif if (akEventName == LandStart) debug.Trace("VAMPIRE: Handle LandStart", 0) DCL1VampireLevitateStateGlobal.setValue(1) endif if (akEventName == Ground) debug.Trace("VAMPIRE: Handle GroundStart", 0) DCL1VampireLevitateStateGlobal.setValue(1) CurrentEquippedLeftSpell = PlayerActor.GetEquippedSpell(0) debug.Trace("VAMPIRE: saving equipped left spell " + CurrentEquippedLeftSpell, 0) if (CurrentEquippedLeftSpell != None) PlayerActor.UnequipSpell(CurrentEquippedLeftSpell, 0) endif PlayerActor.UnequipSpell(LeveledDrainSpell, 1) PlayerActor.RemoveSpell(LeveledRaiseDeadSpell) PlayerActor.RemoveSpell(DLC1CorpseCurse) PlayerActor.RemoveSpell(DLC1VampiresGrip) PlayerActor.RemoveSpell(DLC1ConjureGargoyleLeftHand) endif if (akEventName == LiftoffStart) debug.Trace("VAMPIRE: Handle LiftoffStart", 0) DCL1VampireLevitateStateGlobal.setValue(2) endif if (akEventName == Levitate) debug.Trace("VAMPIRE: Handle LevitateStart", 0) DCL1VampireLevitateStateGlobal.setValue(2) PlayerActor.EquipSpell(LeveledDrainSpell, 1) if ((DialogueGenericVampire as vampirequestscript).LastLeftHandSpell == None) (DialogueGenericVampire as vampirequestscript).LastLeftHandSpell = DLC1VampireRaiseDeadLeftHand01 endif if (CurrentEquippedLeftSpell == None) CurrentEquippedLeftSpell = (DialogueGenericVampire as vampirequestscript).LastLeftHandSpell debug.Trace("VAMPIRE: Spell from last session set as current last spell = " + CurrentEquippedLeftSpell, 0) endif CheckPerkSpells() PlayerActor.AddSpell(LeveledRaiseDeadSpell, false) PlayerActor.EquipSpell(CurrentEquippedLeftSpell, 0) debug.Trace("VAMPIRE: Last spell left eqiupped = " + CurrentEquippedLeftSpell, 0) PlayerActor.EquipSpell(LeveledDrainSpell, 1) debug.Trace("VAMPIRE: Last spell right eqiupped = " + LeveledDrainSpell, 0) endifendifEndFunctionFunction UnregisterForEvents()debug.Trace("Unregistering for Animation Events", 0)actor PlayerActor = game.GetPlayer()UnRegisterForAnimationEvent(PlayerActor, Ground)UnRegisterForAnimationEvent(PlayerActor, Levitate)UnRegisterForAnimationEvent(PlayerActor, BiteStart)UnRegisterForAnimationEvent(PlayerActor, LiftoffStart)UnRegisterForAnimationEvent(PlayerActor, LandStart)UnRegisterForAnimationEvent(PlayerActor, TransformToHuman)EndFunctionFunction OnUpdate()actor PlayerActor = game.GetPlayer()game.SetInCharGen(false, false, false)int numPerks = game.QueryStat("NumVampirePerks")debug.Trace("VAMPIRE: Perks stat = " + numPerks, 0)if numPerks >= DLC1VampireMaxPerks.value game.AddAchievement(58)endifif Untimed returnendifif PlayerActor.HasMagicEffect(DLC1RevertEffect) && !PlayerActor.IsInKillMove() && !__tryingToShiftBack debug.Trace("VAMPIRE: Revert effect detected", 0) Revert()endifgame.ForceThirdPerson()EndFunctionFunction InitialShift()debug.Trace("VAMPIRE: Player beginning transformation.", 0)actor PlayerActor = game.GetPlayer()VampireWarn.Apply(1.00)if (PlayerActor.IsDead()) debug.Trace("VAMPIRE: Player is dead; bailing out.", 0) returnendifPlayerActor.GetActorBase().SetInvulnerable(true)PlayerActor.SetGhost(true)PlayerActor.SetRace(VampireLordRace)PlayerActor.AddSpell(DLC1AbVampireFloatBodyFX, false)EndFunctionFloat Function RealTimeSecondsToGameTimeDays(Float realtime)Float scaledSeconds = realtime * TimeScale.valuereturn scaledSeconds / (60 * 60 * 24)EndFunction
DLC1_QF_DLC1DialogueVampire_0101964A
Spoiler
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 29Scriptname DLC1_QF_DLC1DialogueVampire_0101964A extends Quest Conditional hidden;BEGIN FRAGMENT Fragment_11Function Fragment_11();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1)game.GetPlayer().AddSpell(DLC1SupernaturalReflexes, true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_6Function Fragment_6();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1)game.GetPlayer().AddSpell(DLC1VampireMistform, true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_9Function Fragment_9();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1)game.GetPlayer().AddSpell(DLC1DetectLife, true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_21Function Fragment_21();BEGIN CODEgame.GetPlayer().AddSpell(DLC1NightCloak, true)game.IncrementStat("NumVampirePerks", 1);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_17Function Fragment_17();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_15Function Fragment_15();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_13Function Fragment_13();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_2Function Fragment_2();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1)if (DLC1VampireLevitateStateGlobal.GetValue() == 2) game.GetPlayer().AddSpell(DLC1ConjureGargoyleLeftHand, true)endif;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_4Function Fragment_4();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1)if (DLC1VampireLevitateStateGlobal.GetValue() == 2) game.GetPlayer().AddSpell(DLC1CorpseCurse, true)endif;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_0Function Fragment_0();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1)if (DLC1VampireLevitateStateGlobal.GetValue() == 2) game.GetPlayer().AddSpell(DLC1VampiresGrip, true)endif;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_19Function Fragment_19();BEGIN CODEgame.IncrementStat("NumVampirePerks", 1);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentspell property DLC1VampireMistform autoglobalvariable property DLC1VampireLevitateStateGlobal autospell property DLC1CorpseCurse autospell property DLC1VampiresGrip autospell property DLC1NightCloak autospell property DLC1ConjureGargoyleLeftHand autospell property DLC1DetectLife autospell property DLC1VampireBats autospell property DLC1SupernaturalReflexes auto