Jump to content


Photo

Innates Set to Level One bug


  • Please log in to reply
10 replies to this topic

#1 Tonton Fred

Tonton Fred
  • Member
  • 122 posts

Posted 10 August 2012 - 12:18 PM

This mod, part of the BWP install, screws up the Ritual Scroll in Watcher's Keep, effectively preventing the resolution of the dungeon (other than directly fighting the Imprisoned One). PLOT01.itm (the Ritual Scroll) uses SPIN593.SPL, which is set to level 1 by the mod. Setting it back to the original value (5) allows the plot to proceed when using the scroll.

The bug has apparently been around since 2005, involving various mods that modify innates' levels.

EDIT : same thing happens with the second scroll that the ghostly spirit gives you after you leave (PLOT01Q.ITM and SPIN592.SPL).

Edited by Tonton Fred, 10 August 2012 - 12:38 PM.


#2 -Casper-

-Casper-
  • Guest

Posted 10 August 2012 - 08:42 PM

Funny how nobody has reported it O_O

Is there some way to fix this before the install or after the install? Like modify one of the files?

#3 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 10 August 2012 - 09:52 PM

HasSpell() and HasSpellRES() on non level-1 innates causes crashes...
SpellCaseInnate() on erroneously level-1'ed innates causes script shittiness... This topic is a font of knowledge here :P

How does someone go about fixing this? :blink: Probably look at the spells referenced by SpellCastInnate() on a case by case basis because HasSpell(RES) can refer to a MUCH broader group of spells :P

So far only found these references and this is some rough but working code to fix this within both BPv180 and the InnateFixer used by the BWP. I'm sure someone could streamline it even further though :P (how the hell do you trim strings in WeiDU? :blink:)

The TRUE_SIGHT references come from the Tower of Deception mod and aren't used in vanilla or BP :D

Spoiler


If someone doesn't, I'll upload the BP and InnateFix files with the above code when in about half a day :P I'll need to apply the BWPFixpack patches on BPv180 before adding this so... :crying:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#4 -Casper-

-Casper-
  • Guest

Posted 10 August 2012 - 10:08 PM

So many important bugs getting fixed these days :clap: I was *just* about to start "the install of all installs", but I will await your fixed file Lollorian. Thanks so much for all the work you do for this community.

#5 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 10 August 2012 - 10:20 PM

You could start your install actually :P The fixes would keep coming as long as BG modding is alive :lol: And it may be a while before the BWPFixpack gets an update... speaking of which it might be good to add this to their thread :P

Besides... I'll also be adding that block into the lolfixer soon for easy post biffing fixing :D Relevant but kinda ancient lolfixer topic here :unsure: (It's the Wrye Bash for BGII :mwaha:)

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#6 -Casper-

-Casper-
  • Guest

Posted 10 August 2012 - 11:02 PM

Yeah like I don't know :D every time I do a BWS install, I read the day after about "some great fix" :P this always keeps me from doing a proper Baldur's Gate playthrough :lol2:

And, I know the BWPFixpack is not being updated regularly - so may I ask you if you could put the fixed file here in the meantime? I wish I understood your code so I could do this instead, but alas.. :crying:

#7 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 11 August 2012 - 12:32 AM

And here ya go ^_^ You'll be surprised at how easy it was to add that code :lol:

Small note though: I've changed the original condition for setting innates to level 1

Original: check level = 0 and check level > 1
Now: check level != 1 :P (shouldn't cause problems unless a spell has -1 as a level... in which case it should probably be set to 1 - the new condition does that :D)

EDIT: Attachment was stupid and hence removed, check out newer fixed stuff a couple of posts down :D

Edited by Lollorian, 13 August 2012 - 12:31 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#8 -Casper-

-Casper-
  • Guest

Posted 12 August 2012 - 11:29 PM

Wow thanks again Lollorian! :Bow:

There is one peculiar thing however... after BWP Fixpack has done it's job, I overwrite the 2 files with your files posted here, and then, when starting installing Big Picture, it gives this error:

Spoiler


Note that I never did try to install Big Picture without your file (I haven't had the time). So maybe it isn't your file that's causing it. But I just thought id throw it out there, in case it is, so that you could have a look if you get the time :) again thanks for your fixes!

#9 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 13 August 2012 - 12:30 AM

Shit I fucked up :P Sorry about that... needed a BEGIN in line 5925 (BP.tp2) and 45 (InnateFix.tp2)

Attached Files


"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#10 -Casper-

-Casper-
  • Guest

Posted 17 August 2012 - 09:34 PM

Yes shame on you Lollorian! :P

Seriously though, the new files worked like a charm :D thanks again.

Now I shall play. Finally. In the meantime I will treat any further bugfix posts as lies. :ROFL:

#11 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 19 September 2012 - 05:59 AM

A small update to this, it seems INQUIS_TRUE_SIGHT and HELM_TRUE_SIGHT are used un HaveSpell() checks by a LOT of mods so a better exclusion list was attached to this post :cheers:

New code just in case:
READ_SHORT 0x1c "spell_type"
    READ_LONG  0x34 "spell_level"

    PATCH_IF (%spell_type% = 4) BEGIN
	  PATCH_IF (((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL412~) AND (%spell_level% != 4)) OR // SET_SNARE_TRAP
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL414~) AND (%spell_level% != 4)) OR // SET_SPECIAL_SNARE_TRAP
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN592~) AND (%spell_level% != 5)) OR // HELM_RITUAL_SCROLL - TOD
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN593~) AND (%spell_level% != 5)) OR // ODREN_RITUAL_SCROLL
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN642~) AND (%spell_level% != 6)) OR // POISONOUS_CLOUD - eSeries
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN666~) AND (%spell_level% != 6)) OR // ZOMBIE_LEVEL_DRAIN
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL910~) AND (%spell_level% != 9)) OR // ROGUE_SET_SPIKE_TRAP
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL911~) AND (%spell_level% != 9)) OR // ROGUE_SET_EXPLODING_TRAP
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL912~) AND (%spell_level% != 9)) OR // ROGUE_SET_TIME_TRAP
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN940~) AND (%spell_level% != 9)) OR // MEPHIT_STINKING_CLOUD - eSeries
			    ((~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN979~) AND (%spell_level% != 9))) BEGIN // GOLEM_GASCLOUD - eSeries
	    PATCH_PRINT "%SOURCE_FILE% error: Innate Spell is referenced by CastSpellInnate() and has mismatched index with SPELL.IDS! Correcting..."
	    PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL412~) OR
				 (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL414~) BEGIN
		  WRITE_LONG 0x34 ~4~
	    END ELSE
	    PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN592~) OR
				 (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN593~) BEGIN
		  WRITE_LONG 0x34 ~5~
	    END ELSE
	    PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN642~) OR
				 (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN666~) BEGIN
		  WRITE_LONG 0x34 ~6~
	    END ELSE
	    PATCH_IF (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL910~) OR
				 (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL911~) OR
				 (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPCL912~) OR
				 (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN940~) OR
				 (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SPIN979~) BEGIN
		  WRITE_LONG 0x34 ~9~
	    END
	  END ELSE
	  PATCH_IF (%spell_level% != 1) BEGIN
	    PATCH_PRINT "%SOURCE_FILE% error: Innate Spell is not Level 1! Setting level to 1..."
	    WRITE_LONG 0x34 ~1~
	  END
    END

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod