Jump to content


Photo

ADD_SPELL_EFFECT and opcode 12


3 replies to this topic

#1 subtledoctor

subtledoctor
  • Modders
  • 2476 posts
  • Gender:Male

Posted 08 January 2018 - 08:14 AM

Opcode 12 seems to be one of these ones that splits parameter2 into two functions - in NI it shows as
- Mode: Normal (0)
- Damage Type: FIRE - 8

Anyone know how to use the Weidu XYZ_EFFECT functions with this? Is it, mode = bytes 1-2, and type = bytes 3-4? Should I convert it to a hex value?

What I'm trying to do, btw, is add an effect that does 'stunning' damage (mode 0, type 2048)

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#2 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2588 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 08 January 2018 - 08:39 AM

parameter2= 0 + ( 2048 << 16 )


Retired from modding.


#3 Avenger

Avenger
  • Modders
  • 3794 posts
  • Gender:Male
  • Location:Hungary

Posted 08 January 2018 - 08:40 AM

You can simply multiply type by 65536. But you can always try to do something fancier.



#4 subtledoctor

subtledoctor
  • Modders
  • 2476 posts
  • Gender:Male

Posted 08 January 2018 - 09:19 AM

Ah, shift the type value 2 bytes over. I get it. Cool.

(Didn't think of multiplying, heh)

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users