Jump to content


Photo

BP Dispel/Remove Magic Spell.ids entries


  • Please log in to reply
1 reply to this topic

#1 aVENGER

aVENGER
  • Modder
  • 1680 posts

Posted 31 July 2009 - 06:19 PM

Hi,

I've recently noticed that the main component of Big Picture renames the Spell.ids entries for Dispel and Remove Magic. Unfortunately, it does it in a way which might interfere with the script compiling process of other mods. Originally, the BG2 developers named these spells somewhat awkwardly in the unmodded game:

2302 WIZARD_DISPEL_MAGIC // in the unmodded game, this is actually Remove Magic
2326 WIZARD_TRUE_DISPEL_MAGIC // in the unmodded game, this is plain Dispel Magic

Now, here's the Spell.ids from Big Picture 1.77:

2302 WIZARD_REMOVE_MAGIC
2326 WIZARD_DISPEL_MAGIC

As you can see, Big Picture adds a textual reference for 2326 which is identical to the textual reference for 2302 from the unmodded game. This will cause any scripts that use the textual reference from the unmodded game to compile wrongly. For example, this simple script block:

IF
	HaveSpell(WIZARD_DISPEL_MAGIC)
THEN
	RESPONSE #100
		Spell(Myself,WIZARD_DISPEL_MAGIC)
END

will compile to this in the unmodded game:

SC
CR
CO
TR
16433 2302 0 0 0 "" "" OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
TR
CO
RS
RE
100AC
31OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
OB
0 0 0 0 0 0 0 1 0 0 0 0 ""OB
OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
2302 0 0 0 0"" "" AC
RE
RS
CR
SC

However, with the modified Spell.ids entries from Big Picture, it will compile to this instead:

SC
CR
CO
TR
16433 2326 0 0 0 "" "" OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
TR
CO
RS
RE
100AC
31OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
OB
0 0 0 0 0 0 0 1 0 0 0 0 ""OB
OB
0 0 0 0 0 0 0 0 0 0 0 0 ""OB
2326 0 0 0 0"" "" AC
RE
RS
CR
SC


So, with BP's changes, any script which uses the text reference for WIZARD_DISPEL_MAGIC will now compile to 2326 (Dispel Magic) instead of 2302 (Remove Magic). To fix this, remove the following line from Setup-BPv177.tp2:

APPEND ~SPELL.IDS~ ~2326 WIZARD_DISPEL_MAGIC~ UNLESS ~2326 WIZARD_DISPEL_MAGIC~


#2 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 03 August 2009 - 01:56 PM

Thanks for bringing this to light, aVENGER. I can see how it could make things messy. And you were absolutely correct; my only real complaint was the poor language choice. I have this added to the compilated fixes we're getting together for a new BP release. Textpad made it a 5-minute job, so t'was a no-brainer.
Keep me posted if you see other issues like this. ;)