Jump to content

need help creating toggleable spells


DarkRaven666

Recommended Posts

Hi there everyone,

I wish to create some lesser powers for my custom race, including toggleable cameleon, personality boost, harmless fire damage (0 magnitude and togglable duration, just for look) and other such lesser powers, but I didn't manage to make them toggleable. I chose 0 duration, believing this would make it permanent, but instead it made them not work at all. So please tell me what should I do.

Thanks in advance!

Link to comment
Share on other sites

Your only real option is to use scripting. For starters, turn the magic effects you want into Abilities and append "effect" to their IDs. Then, go to Gameplay/Edit Scripts, create a new one, and make sure the Type drop-down box is set to Magic Effect. The script in question should go, for example...

 

scn MyRaceChameleonScript;scn is short for Scriptname.  All scripts need to be named on their first line.

Begin ScriptEffectStart;A Begin/End block determines under what conditions the script's functions run.
;All functions need to be in a Begin/End block.  ScriptEffectStart runs when the effect is first added to its subject, say, after being hit by the spell.

  if (IsSpellTarget MyRaceChameleonEffect);The contents of an if/endif block only run if the conditions inside are true.
;In this case, if the spell's subject also has MyRaceChameleonEffect active...

  message " ", 1;Two of the same message in a row will clear out the message queue.
  message " ", 1;It's used here to stop the player getting a "Spell Removed" message.  Not strictly necessary.

  RemoveSpell MyRaceChameleonEffect;If the player is already under the Chameleon effect, this will turn it off.
;Since this is attached to a Magic Effect, it will assume we're talking about the effect's subject if we don't specify otherwise.

  else;The Else part of an If/Endif block only runs if the conditions are false.  So, if you don't have the Chameleon effect...

  message " ", 1
  message " ", 1
  AddSpell MyRaceChameleonEffect
  endif
end

 

Create a new Lesser Power and give it a 0-duration Script Effect. Keep the effect On Self, and with a duration of 0. Under Script, select MyRaceChameleonScript. If it's not an option, you didn't set the script's Type to Magic Effect, so just do that. Script Name is what will appear when the spell is selected or you look at your Active Effects, where Fire Damage would appear on a Fireball spell. You can name it something fancy like Air Distortion, or functional like Toggle Chameleon. Since this is a Lesser Power, School doesn't matter. Visuals Effect determines what it looks like when you cast it; Setting it to Chameleon would give it the basic Illusion effects. Check Immune to Silence if you want the player to have access to it when silenced, and add it to your race.

 

You'd have to do it a bit differently for Fire Damage, since I'm not sure Magnitude 0 effects work. Instead of putting Fire Damage in the ability, you'd give it another Script Effect.

 

scn MyRaceBurningEffectScript

Begin ScriptEffectStart
  pms EffectFireDamage;PMS stands for PlayMagicShaderVisuals.
end

Begin ScriptEffectFinish;ScriptEffectFinish blocks run when the effect is removed. 
;Generally when the Duration runs out, here when it's toggled off.

  sms EffectFireDamage
end

Link to comment
Share on other sites

But the cs program can't recognize the words "the" and "script" so it doesnt save the script. I typed the script exactly as written, I even counted the free spaces (since it doesn't work with copy/paste command), and the cs program was started with wrye bash command "launch tescs+obse". I also tried without obse and still the same effect. What can be wrong with it?
Link to comment
Share on other sites

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

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