Jump to content

Need help adding NEW spell to player in UPDATED script


MofoMojo

Recommended Posts

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

Link to comment
Share on other sites

Sounds like you need to go to the object that the script is attached to (i.e. the quest) and do it from there. I assume you just edited the PlayerVampireQuestScript from the manager and didn't actually go to the quest.

 

Thanks Ocyris. You are absolutely correct, I didn't even realize you COULD do that. My heart skipped, I auto-filled and saved everything. Alas, still no go. Is it possible this is because the original "quest" is already active in my save?

 

-MM

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

Only guess I've got is that some of the script data is stored in the save file if the script is running. Seem kind of weird but I'm running into all kinds of oddities right now.

 

If anything else pops up just quote my reply and the board will notify me.

Link to comment
Share on other sites

  • 5 months later...
  • Recently Browsing   0 members

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