Jump to content

Adding Spell/Ability to Vanilla Birthsign


Recommended Posts

In the following tuotrial you will add an ability to the player no matter his/her birthsign.

 

To create the new capacity, in the CS go to magic -> abilities or capacities (I use the french version), right-click, new.

Give your capacity an EditorID the other modders are unlikely to use, like your nickname, a short description and the mod's acronym (for example ProjectTitanReflectDamageNPA). Use this advice to all the unique EditorID's you'll create to avoid mod conflicts.

Give your capacitiy the effects you want and save.

Go to gameplay - edit scripts - new and create a quest script looking like this:

 

Scn TheNameYouWantYourScriptToHave

 

short doonce

 

Begin GameMode

if ( player.getavhealth > 0 )

player.addspell YourSpellEditorID

set doonce to 1

endif

end

 

-Go to character - quest - right-click - new

Choose your "quest" EditorID, tick the "start game enabled" box, attach your script, give a priority of 50

Et voilà!

 

 

This should do the job.

 

EDIT: I didn't test it but it seems like you can even check the player's birthsign and capacities accordingly.

Edited by Oblivionaddicted
Link to comment
Share on other sites

In the following tuotrial you will add an ability to the player no matter his/her birthsign.

 

To create the new capacity, in the CS go to magic -> abilities or capacities (I use the french version), right-click, new.

Give your capacity an EditorID the other modders are unlikely to use, like your nickname, a short description and the mod's acronym (for example ProjectTitanReflectDamageNPA). Use this advice to all the unique EditorID's you'll create to avoid mod conflicts.

Give your capacitiy the effects you want and save.

Go to gameplay - edit scripts - new and create a quest script looking like this:

 

Scn TheNameYouWantYourScriptToHave

 

short doonce

 

Begin GameMode

if ( player.getavhealth > 0 )

player.addspell YourSpellEditorID

set doonce to 1

endif

end

 

-Go to character - quest - right-click - new

Choose your "quest" EditorID, tick the "start game enabled" box, attach your script, give a priority of 50

Et voilà!

 

 

This should do the job.

 

EDIT: I didn't test it but it seems like you can even check the player's birthsign and capacities accordingly.

 

Ok I did this with GetIsPlayerBirthSign (instead of health), and it seems to work as intended, attaching a custom spell to The Steed (for the sake of example).

I added a messagebox as a debug to popup if the player has the Steed, and if not, one to popup that you do not have The Steed.

It seems to run on an infinite loop, popping up that message box every 3 seconds or so.

I can remove the messagebox, obviously, but is this supposed to run on an infinite loop, or can I just set this script to execute just once on startup?

 

edit: if not it works 100% fine with the message boxes removed.

Edited by ProjectTitan313
Link to comment
Share on other sites

Think you forgot to add set doonce to 1 at the end.

 

What does your script look like?

 

Just a sec:

ScriptName TitanBirthsignScript

short doonce

Begin GameMode

if ( GetIsPlayerBirthsign BirthSignSteed == 1 )

	player.addspell 00CustomSpellBSSteed

	set doonce to 1

endif

if ( GetIsPlayerBirthsign BirthSignSteed == 0 )
	
	player.removespell 00CustomSpellBSSteed

	set doonce to 1

endif

if ( GetIsPlayerBirthsign BirthSignAtronach == 1 )

	player.addspell 00CustomSpellBSAtronach

	set doonce to 1

endif

if ( GetIsPlayerBirthsign BirthSignAtronach == 0 )
	
	player.removespell 00CustomSpellBSAtronach

	set doonce to 1

endif

end

It works as intended, adding the obvious ability/spell to the matching birthsign (Atronach/Steed) and removing it if it changes, but it iterates the script every 5 seconds (real time not game time). I tested this with MessageBox, and it pops up every 5 seconds (I removed it for being horrifically annoying as seen in the above code).

It just seems like script bloat to have this constantly running. It has not caused any real issues or framerate drops, so if that can't be fixed it's not a major problem.

It is a Quest script, attached to a custom Quest that is enabled at the start of the game.

Link to comment
Share on other sites

Since your script is supposed to work once you don't need it to remove the other birthsigns' ability.

 

You can always help the players update their birthsign ability through a scripted object instead, obtainable through a setstage code for example.

 

The editorID's you gave to your spells are too generic and highly likely to conflict with any other bringing the same feature. You shouldn't begin your editorID's with numbers by the way.

 

I think your script would be more efficient looking like this:

 

 

 

ScriptName TitanBirthsignScript

short doonce

Begin GameMode

if ( GetIsPlayerBirthsign BirthSignSteed == 1 )
player.addspell CustomSpellBSSteed
set doonce to 1

elseif GetIsPlayerBirthsign BirthSignAtronach == 1 )
player.addspell CustomSpellBSAtronach
set doonce to 1

endif

end

Edited by Oblivionaddicted
Link to comment
Share on other sites

Since your script is supposed to work once you don't need it to remove the other birthsigns' ability.

 

You can always help the players update their birthsign ability through a scripted object instead, obtainable through a setstage code for example.

 

The editorID's you gave to your spells are too generic and highly likely to conflict with any other bringing the same feature. You shouldn't begin your editorID's with numbers by the way.

 

I think your script would be more efficient looking like this:

 

 

 

ScriptName TitanBirthsignScript

 

short doonce

 

Begin GameMode

 

if ( GetIsPlayerBirthsign BirthSignSteed == 1 )

player.addspell CustomSpellBSSteed

set doonce to 1

 

elseif GetIsPlayerBirthsign BirthSignAtronach == 1 )

player.addspell CustomSpellBSAtronach

set doonce to 1

 

endif

 

end

 

I see what you mean on conflicts, that I can fix.

The remove spell/ability part was honestly part of testing, using showbirthsignmenu to switch between signs and see if it was working. I know it works know, so yeah I can clean those out and use your example code above.

I run very few mods compared to most people; usually just unofficial patches and about 3-4 of mods I make myself so conflicts aren't as common.

Would this run continuously upon startup or just iterate once?

 

I would like to thank everyone for the enormous amount of help as well.

Link to comment
Share on other sites

It should normally work once, you can always test with a message box.

 

Even if you don't use a lot of mods others use more of them and the more you give original ID's to yoru creations the less the users are likely to suffer conflicts.

 

I'm always glad to help. :-)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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