steve40 Posted August 10, 2012 Share Posted August 10, 2012 (edited) Need some help. Banging my head on this one. I've added a new spell to the game, say mm_VampiricEvasionFledgling. I have updated the PlayerVampireQuestScript so that the new spell is referenced as such: Spell Property mm_VampiricEvasionFledgling Auto And in the script I have added the following (Note: The debug.Messagebox to help with tracing) Debug.MessageBox("Adding abilities") Player.AddSpell(mm_VampiricEvasionFledgling, abVerbose = true) mm_VampiricEvasionFledgling is the EditorId of the new spell. The Debug Message box shows up, so I know it's using my updated script. But the spell is not added. I can drop down to the console and add it via ID. I had this EXACT same thing happen to me with my "Sunnie's Ring of Woe" script. I had a script attached to a ring that called Player.AddPerk(mm_SunniesRingofWoePerk). I was able to resolve it by going into the Properties of the script, and resolving the Property to the spell but the Papyrus Script Manager doesn't seem to have that option. Any thoughts? Pulling my hair out. Ok, I have no hair but I would be!!! -MM The code should be like this: Debug.MessageBox("Adding abilities") Player.AddSpell(mm_VampiricEvasionFledgling, true) Edited August 10, 2012 by steve40 Link to comment Share on other sites More sharing options...
steve40 Posted August 10, 2012 Share Posted August 10, 2012 If you're adding a spell to a stage of vampirism that you're already in then yes it's probably cause it's already active but it should just a matter of moving between stages for it add the spell. Did you also add a removespell as well? Unless of course you want it to say even if you drop stages. I retrigger VampireProgression (and have rewritten much of it). Here's a snippet: Function VampireProgression(Actor Player, int VampireStage) Debug.MessageBox("VampireProgression") ;Swap out abilities depending on stage of Vampirism If VampireStage == 2 ...<snip> ElseIf VampireStage == 1 ; Player is a Fledgling Vampire VampireTransformIncreaseISMD.applyCrossFade(2.0) utility.wait(2.0) imageSpaceModifier.removeCrossFade() Debug.MessageBox("Entering Stage 1") RemoveVampireAbilities(Player) Debug.MessageBox("Adding abilities") Player.AddSpell(mm_VampireFortifyCarryWeightFledgling, abVerbose = True) Player.AddSpell(mm_VampireResistDisease, abVerbose = True) Player.AddSpell(mm_VampireResistPoison, abVerbose = True) Player.AddSpell(mm_VampiricAttackDamageFledgling, abVerbose = True) Player.AddSpell(mm_VampiricCombatHealthRegenFledgling, abVerbose = True) Player.AddSpell(mm_VampiricEvasionFledgling, abVerbose = True) Player.AddSpell(mm_VampiricHealthRegenFledgling, abVerbose = True) Player.AddSpell(mm_VampiricStepFledgling, abVerbose = True) Debug.MessageBox("Done adding abilities") EndIf EndFunction I am triggering the VampireProgression code by feeding. I know I'm in the correct ELSEIF/ENDIF codeblock because the MessageBoxes are showing up (it's the only one I set them in). Yet it still doesn't add the spells. It's still acting as if it isn't aware of the new spells. I also just took one of the previous vampire spells and added it back into that section but with abVerbose also set to true and get the notification that it's added when I feed. It's still just acting like the property isn't validating. -MM P.S. Thanks for the assistance thus far! The code has a bug, it should be like this: Function VampireProgression(Actor Player, int VampireStage) Debug.MessageBox("VampireProgression") ;Swap out abilities depending on stage of Vampirism If VampireStage == 2 ...<snip> ElseIf VampireStage == 1 ; Player is a Fledgling Vampire VampireTransformIncreaseISMD.applyCrossFade(2.0) utility.wait(2.0) imageSpaceModifier.removeCrossFade() Debug.MessageBox("Entering Stage 1") RemoveVampireAbilities(Player) Debug.MessageBox("Adding abilities") Player.AddSpell(mm_VampireFortifyCarryWeightFledgling, True) Player.AddSpell(mm_VampireResistDisease, True) Player.AddSpell(mm_VampireResistPoison, True) Player.AddSpell(mm_VampiricAttackDamageFledgling, True) Player.AddSpell(mm_VampiricCombatHealthRegenFledgling, True) Player.AddSpell(mm_VampiricEvasionFledgling, True) Player.AddSpell(mm_VampiricHealthRegenFledgling, True) Player.AddSpell(mm_VampiricStepFledgling, True) Debug.MessageBox("Done adding abilities") EndIf EndFunction Link to comment Share on other sites More sharing options...
steve40 Posted August 10, 2012 Share Posted August 10, 2012 (edited) P.S. Thanks for the assistance thus far! As another twist, I have a new Global Value that should be getting set to 1, which does not either. Changes to the script are taking effect, new properties such as globals and spells, added to the script do not get acted on, even after auto-filling them from the Quest Script Properties. -MM I've worked around the dilemma. Seems that once the quest is started, while updates to the script logic will work, i.e. new functions, etc,. new properties, specifically global values and new spells will not. To trigger it, you have to STOP and START the quest again. If anyone can figure out a workaround that would be great. -MM To update cached global variables in a QUEST, you must use this function: UpdateCurrentInstanceGlobal Edited August 10, 2012 by steve40 Link to comment Share on other sites More sharing options...
Recommended Posts