Why isn't my spell showing on my character?

Post » Mon Jun 18, 2012 11:54 pm

I edited the PlayerVampireQuestScript (backed it up first). Everything works fine. Most of my mod changes work except the spells I have added in the script that call out for the abilities VampiricDrain01, SummonGreaterMinion and SummonLesserMinion.

They show up in the prorporties window and have the proper fields chosen. They also show a 'User' count in the main CK menu that llinks them to the PlayerVampireQuest

but...

When I go in game and create a fresh vampire (which would equal Stage 1) the abilities don't get added to my PC.

Here's what the script looks like. This is the edited PlayerVampireQuestScript from vanilla.

ScriptName PlayerVampireQuestScript extends Quest Conditional;Variable to track if the player is a vampire;0 = Not a Vampire;1 = Vampire;2 = Vampire Stage 2;3 = Vampire Stage 3;4 = Vampire Stage 4Int Property VampireStatus Auto ConditionalMessage Property VampireFeedMessage AutoMessage Property VampireStageProgressionMessage AutoRace Property ArgonianRace  Auto  Race Property ArgonianRaceVampire  Auto  Race Property BretonRace  Auto  Race Property BretonRaceVampire  Auto  Race Property DarkElfRace  Auto  Race Property DarkElfRaceVampire  Auto  Race Property HighElfRace  Auto  Race Property HighElfRaceVampire  Auto  Race Property ImperialRace  Auto  Race Property ImperialRaceVampire  Auto  Race Property KhajiitRace  Auto  Race Property KhajiitRaceVampire  Auto  Race Property NordRace  Auto  Race Property NordRaceVampire  Auto  Race Property OrcRace  Auto  Race Property OrcRaceVampire  Auto  Race Property RedguardRace  Auto  Race Property RedguardRaceVampire  Auto  Race Property WoodElfRace  Auto  Race Property WoodElfRaceVampire  Auto  Race Property CureRace AutoStatic Property XMarker AutoFaction Property VampirePCFaction  Auto  Float Property LastFeedTime AutoFloat Property FeedTimer AutoGlobalVariable Property GameDaysPassed AutoIdle Property VampireFeedingBedRight AutoIdle Property VampireFeedingBedrollRight AutoGlobalVariable Property VampireFeedReady AutoimageSpaceModifier Property VampireTransformIncreaseISMD  AutoimageSpaceModifier Property VampireTransformDecreaseISMD  AutoeffectShader property VampireChangeFX autoEvent OnUpdateGameTime()    ;Feed timer    FeedTimer = GameDaysPassed.Value - LastFeedTime;     debug.trace(self + "Feed Timer is:" + FeedTimer + "days")            ;Vampire progression should not happen if player is in combat or controls are locked or the player can't fast travel    If  Game.IsMovementControlsEnabled() && Game.IsFightingControlsEnabled() && Game.GetPlayer().GetCombatState() == 0        ;If player hasn't fed, progress Vampirism        If (FeedTimer >= 3) && (VampireStatus == 1)            ;add Stage 2 Vampire buffs and spells            VampireFeedReady.SetValue(3)            ;VampireStageProgressionMessage.Show()            VampireStage4Message.Show()            VampireStatus = 2            VampireProgression(Game.GetPlayer(), 2)                        Game.GetPlayer().AddtoFaction(VampirePCFaction)                                    ;stop checking GameTime until the player feeds again            UnregisterforUpdateGameTime()        ElseIf FeedTimer >= 2 && (VampireStatus == 2)            ;add Stage 1 Vampire buffs and spells            VampireFeedReady.SetValue(1)            VampireStageProgressionMessage.Show()            VampireStatus = 1            VampireProgression(Game.GetPlayer(), 1)                Game.GetPlayer().AddtoFaction(VampirePCFaction)        ElseIf FeedTimer >= 1 && (VampireStatus == 2)            ;add Stage 1 Vampire buffs and spells            VampireFeedReady.SetValue(1)            VampireStageProgressionMessage.Show()            VampireStatus = 1            VampireProgression(Game.GetPlayer(), 1)                Game.GetPlayer().AddtoFaction(VampirePCFaction)        EndIf    Endif    EndEventFunction VampireFeedBed()    Game.GetPlayer().PlayIdle(VampireFeedingBedRight)EndFunctionFunction VampireFeedBedRoll()    Game.GetPlayer().PlayIdle(VampireFeedingBedrollRight)EndFunctionFunction VampireChange(Actor Target)    ;Effects for hiding the change    Game.DisablePlayerControls()    VampireChangeFX.play(Target)    VampireTransformIncreaseISMD.applyCrossFade(2.0)    ObjectReference myXmarker = Target.PlaceAtMe(Xmarker)    MAGVampireTransform01.Play(myXmarker)    myXmarker.Disable()    utility.wait(2.0)    imageSpaceModifier.removeCrossFade()    VampireChangeFX.stop(Target)    ;Change player's race, defaults to Nord Vampire    if (Target.GetActorBase().GetRace() == ArgonianRace)        CureRace = ArgonianRace        Target.SetRace(ArgonianRaceVampire)    elseif (Target.GetActorBase().GetRace() == BretonRace)        CureRace = BretonRace        Target.SetRace(BretonRaceVampire)    elseif (Target.GetActorBase().GetRace() == DarkElfRace)        CureRace = DarkElfRace        Target.SetRace(DarkElfRaceVampire)    elseif (Target.GetActorBase().GetRace() == HighELfRace)        CureRace = HighELfRace        Target.SetRace(HighELfRaceVampire)    elseif (Target.GetActorBase().GetRace() == ImperialRace)        CureRace = ImperialRace        Target.SetRace(ImperialRaceVampire)    elseif (Target.GetActorBase().GetRace() == KhajiitRace)        CureRace = KhajiitRace        Target.SetRace(KhajiitRaceVampire)    elseif (Target.GetActorBase().GetRace() == NordRace)        CureRace = NordRace        Target.SetRace(NordRaceVampire)    elseif (Target.GetActorBase().GetRace() == OrcRace)        CureRace = OrcRace        Target.SetRace(OrcRaceVampire)    elseif (Target.GetActorBase().GetRace() == RedguardRace)        CureRace = RedguardRace        Target.SetRace(RedguardRaceVampire)    elseif (Target.GetActorBase().GetRace() == WoodElfRace)        CureRace = WoodElfRace        Target.SetRace(WoodElfRaceVampire)    endif    ;Clear player's diseases    ;VampireCureDisease.Cast(Target)    Target.RemoveSpell(DiseaseBoneBreakFever)    Target.RemoveSpell(DiseaseBrainRot )    Target.RemoveSpell(DiseaseRattles )    Target.RemoveSpell(DiseaseRockjoint )    Target.RemoveSpell(DiseaseWitbane )    Target.RemoveSpell(DiseasePorphyricHemophelia)    ;Make player Vampire Stage 1    VampireStatus = 1    VampireProgression(Game.GetPlayer(), 1)        ;Setup the Feed Timers    RegisterForUpdateGameTime(12)    LastFeedTime =  GameDaysPassed.Value    ;Set the Global for stat tracking    PlayerIsVampire.SetValue(1)        Utility.Wait(1)    Game.EnablePlayerControls()        ;If the player has been cured before, restart the cure quest    If VC01.GetStageDone(200) == 1        VC01.SetStage(25)    EndIf    EndFunctionFunction VampireFeed()    ;Effects for hiding the change    ;VampireChangeFX.play(game.getPlayer())    VampireTransformDecreaseISMD.applyCrossFade(2.0)    utility.wait(2.0)    imageSpaceModifier.removeCrossFade()    ;VampireChangeFX.stop(game.getPlayer())        Game.IncrementStat( "Necks Bitten" )    VampireFeedMessage.Show()    VampireFeedReady.SetValue(0)    ;Game.ForceThirdPerson()    ;Game.GetPlayer().PlayIdle(VampireFeedingBedRight)    ;Player has fed, regress to Stage 1 Vampirisim    ;Remove Stage 2 buffs and spells    LastFeedTime =  GameDaysPassed.Value    VampireStatus = 1    VampireProgression(Game.GetPlayer(), 1)    ;Player is no longer hated            ;Start checking GameTime again if we weren't already    UnregisterforUpdateGameTime()    RegisterForUpdateGameTime(12)        EndFunctionFunction VampireProgression(Actor Player, int VampireStage)    ;Swap out abilities depending on stage of Vampirism        If VampireStage == 2        VampireTransformIncreaseISMD.applyCrossFade(2.0)        utility.wait(2.0)        imageSpaceModifier.removeCrossFade()                Player.RemoveSpell(AbVampire01)        Player.RemoveSpell(AbVampire01b)        Player.AddSpell(AbVampire02b)        Player.AddSpell(AbVampire02)        Player.AddSpell(VampireInvisibilityPC)        Player.RemoveSpell(VampireSunDamage01)        Player.AddSpell(VampireSunDamage02, abVerbose = False)                                            Player.AddSpell(SummonLesserMinion)        Player.RemoveSpell(SummonGreaterMinion)                                ElseIf VampireStage == 1   	 Player.AddSpell(VampireCharm)        Player.AddSpell(ABVampireSkills)        Player.AddSpell(ABVampireSkills02)        Player.AddSpell(VampireCloak)        Player.RemoveSpell(AbVampire02)                        Player.RemoveSpell(AbVampire02b)                Player.AddSpell(AbVampire01)        Player.AddSpell(AbVampire01b)                Player.AddSpell(VampireDrain01)                                                                        Player.RemoveSpell(SummonLesserMinion)                Player.AddSpell(SummonGreaterMinion)                Player.AddSpell(VampireStrength01)                Player.RemoveSpell(VampireSunDamage02)                Player.AddSpell(VampireSunDamage01, abVerbose = False)                Player.AddSpell(VampireCharm)        Player.RemoveSpell(VampireInvisibilityPC)        EndIfEndFunctionFunction VampireCure(Actor Player)        Game.IncrementStat( "Vampirism Cures" )    ;Stop tracking the Feed Timer    UnregisterforUpdateGameTime()    VampireStatus = 0    ;Player is no longer hated    Player.RemoveFromFaction(VampirePCFaction)    Player.SetAttackActorOnSight(False)        ;Remove all abilities    Player.RemoveSpell(ABVampireSkills)    Player.RemoveSpell(ABVampireSkills02)        Player.RemoveSpell(AbVampire01)    Player.RemoveSpell(AbVampire02)    Player.RemoveSpell(AbVampire01b)    Player.RemoveSpell(AbVampire02b)    Player.RemoveSpell(VampireDrain01)    ;Player.RemoveSpell(VampireStrength01)    Player.RemoveSpell(VampireSunDamage01)    Player.RemoveSpell(VampireSunDamage02)        Player.RemoveSpell(VampireCharm)    Player.RemoveSpell(VampireInvisibilityPC)            ;Change player's race, defaults to Nord    if (Player.GetRace() == ArgonianRaceVampire)        Player.SetRace(ArgonianRace)    elseif (Player.GetRace() == BretonRaceVampire)        Player.SetRace(BretonRace)    elseif (Player.GetRace() == DarkElfRaceVampire)        Player.SetRace(DarkElfRace)    elseif (Player.GetRace() == HighELfRaceVampire)        Player.SetRace(HighElfRace)    elseif (Player.GetRace() == ImperialRaceVampire)        Player.SetRace(ImperialRace)    elseif (Player.GetRace() == KhajiitRaceVampire)        Player.SetRace(KhajiitRace)    elseif (Player.GetRace() == NordRaceVampire)        Player.SetRace(NordRace)    elseif (Player.GetRace() == OrcRaceVampire)        Player.SetRace(OrcRace)    elseif (Player.GetRace() == RedguardRaceVampire)        Player.SetRace(RedguardRace)    elseif (Player.GetRace() == WoodElfRaceVampire)        Player.SetRace(WoodElfRace)    endif    ;Set the Global for stat tracking    PlayerIsVampire.SetValue(0)        ;make sure Hunter's Sight is gone    Player.RemoveSpell(VampireHuntersSight)    EndFunctionSpell Property AbVampire01 AutoSpell Property AbVampire02 AutoSpell Property AbVampire01b AutoSpell Property AbVampire02b AutoSpell Property VampireDrain01 AutoSpell Property VampireSunDamage01 AutoSpell Property VampireSunDamage02 AutoSpell Property VampireHuntersSight AutoSpell Property VampireCharm AutoSpell Property VampireCloak AutoSpell Property VampireInvisibilityPC AutoSpell Property VampireCureDisease AutoSpell Property ABVampireSkills AutoSpell Property ABVampireSkills02 AutoSpell Property DiseasePorphyricHemophelia AutoGlobalVariable Property PlayerIsVampire  Auto  Sound  Property MagVampireTransform01  Auto  Spell Property DiseaseAtaxia autoSpell Property DiseaseBoneBreakFever AutoSpell Property DiseaseBrainRot AutoSpell Property DiseaseRattles AutoSpell Property DiseaseRockjoint autoSpell Property DiseaseWitbane AutoSpell Property SummonGreaterMinion AutoSpell Property SummonLesserMinion AutoMessage Property VampireStage4Message AutoQuest Property VC01 AutoFormList Property CrimeFactions  Auto  Perk Property VampireFeed  Auto  




Please help. Thanks.
User avatar
Liv Staff
 
Posts: 3473
Joined: Wed Oct 25, 2006 10:51 pm

Post » Tue Jun 19, 2012 1:47 am

Bueler?
User avatar
OJY
 
Posts: 3462
Joined: Wed May 30, 2007 3:11 pm

Post » Mon Jun 18, 2012 5:01 pm

Under your [Papyrus] section in Skyrim.ini, make sure these are set:


bEnableTrace=1
bEnableLogging=1
bLoadDebugInformation=1
Upon doing that, run your game. When the game runs, any errors will be logged out into your My Games\Skyrim\Logs folder. In the Script folder, you'll see Papyrus.0.log, then Papyrus.1.log, to a total of 3. 0 will be the most recent, 1, before that, 2, etc. Very handy once it's open, use a text editor that will ask you to (or will automatically do), update the contents to match the disk file, so you don't have to actually re-load it, run the game, play through, quit out, go into the editor and look at the file (leave it open for subsequent plays). Should point out where the problem(s) are.

Sadly, reading scripts on here is odd with the dark background I have for here, you can't read any of the scripts in the code sections.

My other suggestion would be not to modify the original script, rename your script to MyVampireUpgrade and extend the original like this:

ScriptName MyVampireUpgrade extends PlayerVampireQuestScript Conditional

Go into the script and remove any sections that are duplicates (since you won't need them), go into the quest add your script in, remove the original. Check the usage of the original, make sure there's no type casting for it, if so, find them and change them to match your new one. Keep in mind that the declared properties/globals, at the top *need* to be present in your new copy, as it'll be the quest's new storage for those variables. Then if there are any problems, and you still can't find it, rename some of the blocks of code in your extended script, to something different (like add an _Mine to the block name), save/compile, try, if the error vanishes, you know it's in that block, if not, take the _Mine out and keep going, but the debug information in the log should provide you with the actual block and line number the error is on.

Good luck.

GuruSR.
User avatar
Queen Bitch
 
Posts: 3312
Joined: Fri Dec 15, 2006 2:43 pm


Return to V - Skyrim