Jump to content

What are the "effect codes"?


Recommended Posts

What are you supposed to use in these two commands?

 

SetMagicEffectLight

SetMagicEffectLightC

 

I want to change the Light used by the LGHT Magic Effect, which is currently set to Light object SpellILightSpellMedium.

 

I want to change the LGHT effect to use my light instead:

SetMagicEffectLightC RFSpellILightSpellOrangerLarge effectCode:long            What is a effectCode:long?? I can't find these anywhere.  Is there a number for LGHT?
SetMagicEffectLight RFSpellILightSpellOrangerLarge effect:ref                  What is that supposed to be?

Thanks!!!

Edited by GamerRick
Link to comment
Share on other sites

Effect code itself is nothing more than chars of effect in Ascii numbers. OBSE has commands to convert them both ways, for you it would be GetMagicEffectCode or MagicEffectCodeFromChars. The rest should be easy. Docs for these commands are in "Magic Effect Setting" part.

 

For example:

int ef_code
ref my_light
begin (something)
  ...............
  set my_light to (your light object)
  let ef_code := GetMagicEffectCode "LGHT" ;or try MECodeFromChars
  if ef_code != 0
     SetMagicEffectLightC my_light ef_code
  endif
end

In your older thread regarding opposite effects there are examples how to work with them (they use codes conversion to characters).

Edited by RomanR
Link to comment
Share on other sites

Thanks RomanR! Strange this is another thing you have to do a GetXxxx command on. I would think the LGHT code would always have the same number assigned to it. Somewhere they said that the number is equal to LGHT, which makes about as much sense as many of their design decisions. What you would get from that get command would always be the same number, wouldn't it? And I can just enter that number in my command, no?

 

I copied all of your code into a text doc, because there is a lot in there, but when I looked through it yesterday, I didn't spot anything for this question.

Edited by GamerRick
Link to comment
Share on other sites

I got this to work, but not as I hoped it would.

 

  1. The Light objects of a LGHT Spell is apparently only used for the tint color. The radius isn't used.
  2. Setting the LGHT Light object does not affect a light spell currently active. I gotta recast the spell to see an effect.
scn RFLightSpellQuestScript
float fQuestDelayTime
ref rCurrLight
ref rNextLight
long iHotKey
long iLGHTCode

Begin GameMode
;return
if GetGameLoaded
  set fQuestDelayTime to 0.01
  set iHotKey to 211   ; Delete key
  let iLGHTCode := GetMagicEffectCode LGHT
 
  if rCurrLight == 0
   set rCurrLight to SpellILightSpellMedium
  else
   SetMagicEffectLightC rCurrLight iLGHTCode
   PrintC "Light set to %n" rCurrLight
  endif
endif
if OnKeyDown iHotKey == 1
  if rCurrLight == 0 || rCurrLight == RFSpellILightSpellOrangerDark
   set rCurrLight to SpellILightSpellMedium
  elseif rCurrLight == SpellILightSpellMedium    ; Default Light object used by LGHT
   set rCurrLight to RFSpellILightSpellOrangerLight
  else
   set rCurrLight to RFSpellILightSpellOrangerDark
  endif
  SetMagicEffectLightC rCurrLight iLGHTCode
endif
 
end

I can see a small change in tint between the three lights I am using. So, it's useful maybe when the standard brightness is too much.

Edited by GamerRick
Link to comment
Share on other sites

  • Recently Browsing   0 members

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