Jump to content

Spells not applying to player alias on startup quest


Recommended Posts

My intention is to apply some magic effects to a player from the beginning (character creation) and to have those effects bundled into a single item on the active effects menu. It would be similar to a racial ability, but in this case is not to do with race.

I have set up the spell and included magic effects and the startup quest that uses the player alias to apply items, spells, etc. when the player loads. I know the quest works because I can give the player items through Alias Inventory, but I have been unable to apply the spell using Alias Spells.

I have unticked all Hide in UI options and tested by applying visual effects if any component of the mod is functional--nothing happened. I've looked at the Creation Wiki and a similar mod in Creation Kit but I still don't know why the spell does not apply. Can someone please tell me what I am missing?

Link to comment
Share on other sites

I use quests to give out abilities/spells and items which works every time. You may have missed something making it, here's a clear step by step in a post from FrankFamily.

 

You have to make a quest, mark it as start game enabled

 

In the Object Window, navigate to Quest under the Character category. Create a new quest by right-clicking on the list and choosing 'New'. For this tutorial we will be naming the quest mymodQuest. Make sure that Start Game Enabled in the Quest Data tab is checked. Click on the Quest Alias tab, then right-click in the empty list and choose 'New Reference Alias'. We will name this alias PlayerAlias. In the Reference Alias window, under Fill Type, select the Specific Reference option and click the 'Select Forced Reference' button. Under Cell choose (any), and Ref should default to PlayerRef (Player). If not, select it from the dropdown menu.

 

Then add the spells to that alias.

Added some extra info that's handy to know concerning this.

 

That quest only fires once, not on every load, so if you go adding anything into the quest on a save where that quest has fired on it won't add the new additions, you will need a new save or console them in.

Edited by Dashyburn
Link to comment
Share on other sites

Thanks for your reply. Unfortunately, I have already looked at that post. I checked it again now anyway. Nothing appears to be different in my mod from the described steps.

I found a line on this page: https://ck.uesp.net/wiki/Quest_Alias_Tab#Reference_Alias_data:


 

Spells: The specified spells will be added to the reference that fills the alias, and removed when the reference leaves the alias.

Maybe this has something to do with being able to apply inventory items, which are said to persist, but not spells. But, as you said, you are able to hand out spells with the above method regardless. Puzzling.

I am thinking it could be the spell itself or even the magic effects. The spell is set to an Ability, and Constant Effect on Self is determined by its magic effects. Checking on/off PC Start Spell has no effect.

Been using a new save game every time I want to test this. All mods other than unofficial patch, alternate start, racemenu, xpmse, and this one are disabled.

Edited by Guest
Link to comment
Share on other sites

You can compare your quest with mine, if it's all done the same it must be the spell not functioning, you will see I have added a spell in spell alias, it's a constant effect self spell so you can add them.

 

If you find its the spell and need assistance you can PM me, spells are my specialty.

 

EDIT Forgot the link, here it is http://www.nexusmods.com/skyrimspecialedition/mods/70085

Edited by Dashyburn
Link to comment
Share on other sites

I took some screenshots to compare side-by-side and I can see the quests are setup identically. I'll rule out that, leaving the problem with the spell or the magic effects. Your aaaCeleritySlowFix--the one seen in the startup quest--is the same as mine except I have checked the Disallow Spell Absorb/Reflect and Ignore Resistance boxes. There are also 5 magic effects in the spell whereas yours has one. In my magic effects there is the biggest difference from yours. I have all checkboxes filled except for Hostile, Detrimental, No Magnitude, and Gory Visuals. Each magic effect also has a condition, GetIsSex, to apply the effect only if that is true. I have tried removing the condition or changing to GetPlayerIsSex, though, and it hasn't made a difference. I have yet to try removing all magic effect conditions and placing the condition (they are all the same) in the startup quest so that the spell is applied or not.

I'll try and return tomorrow and sleep on it for now. Thanks again for all your help so far.

Link to comment
Share on other sites

Here's a good explanation of magic effect flags, you shouldn't have snap to navmesh ticked that only concerns summoning creatures https://www.creationkit.com/index.php?title=Magic_Effect

 

Here's a page explaining conditions, such as GetIsSex, http://www.creationkit.com/index.php?title=Category:Condition_Functions

 

It's not obvious what some of the flags do so that page is a handy read, eg. Recovery.

Link to comment
Share on other sites

You dont need a quest or aliasing to autogrant things

 

Any Form record will do. Say.... a book. Attach a script to it which extends Form. You dont even place this anywhere in the world, just using the record for the OnInit() Event. Boom grant whatever immediately, one time, no worries about a quest running or aliasing anyone etc

 

Bonus if its just one spell you dont even need to declare a property. If using a book just set that as its spell and use the SKSE call of GetSpell()

 

Event OnInit()

Game.GetPlayer().AddSpell(((Self as Form) as Book).GetSpell(),False)

EndEvent

 

; In above case you could simply extend Book instead of Form and do Game.GetPlayer().AddSpell(GetSpell(),False) either way same result

 

Or ofc just declare properties or throw them into a formlist. Whatever. Only real benefit of the quest route is for people that have unjust issues with scripts. This one fires one time and never does anything after that. Done deal and great for projects you are working and want quick testing

Link to comment
Share on other sites

Here's a good explanation of magic effect flags, you shouldn't have snap to navmesh ticked that only concerns summoning creatures https://www.creationkit.com/index.php?title=Magic_Effect

I forget to mention Snap to Navmesh wasn't ticked because it was greyed out. Those pages are useful.

 

This one fires one time and never does anything after that. Done deal and great for projects you are working and want quick testing

 

Really handy post to keep in mind for the future. I was wary of that approach because I wasn't sure if the script would contribute to bloat.

 

After looking at the Dashyburn's mod and some more vanilla objects in CK, I got the spell and all its effects to auto-apply as intended. The problem was that I was putting conditions in the wrong spot. The correct place for conditions is in the spell's effect items window after adding the effect. I removed all conditions from the quest and magic effects themselves.

 

Solved! Now I am looking at how to apply the same effects to the NPCs the player does battle with either by using Delivery: Contact or by reverting the buffs/nerfs on the player in relation to the type of NPC contacted.

Edited by Guest
Link to comment
Share on other sites

Great you got it working, you can use a cloak spell to easily apply a buff/debuff to targets at whatever range you wish, have a look at one of the cloak spells in the CK to see how it's set up. You can change the effect of the cloak from damaging health to mostly whatever you want, calm, lower resistance, damage a stat or skill, detect life, whatever. Note, In the cloak spells themselves you will see the magnitude always set as 10 (10 ft radius) adjust that magnitude to increase range.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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