Jump to content

Possible bug


Salk

Recommended Posts

I get this error when I try installing the following component from Ding0's Quest pack (latest version) using BG2 Fixpack Beta 2:

 

Install Component [Creature & Area Improvements]?

[R]e-install, [N]o Change, ninstall, [Q]uit or choose one:

1] All Creature & Area Improvements

2] All Creature Improvements (currently installed)

3] Boss Improvements Only (currently installed)

 

No matter which one I choose, I always get this error:

 

ERROR: illegal 2-byte read from offset 1338 of 1194-byte file STAF15.ITM

ERROR: [sTAF15.ITM] -> [override/STAF15.ITM] Patching Failed (COPY) (Failure("STAF15.ITM: read out of bounds"))

Stopping installation because of error.

Stopping installation because of error.

Stopping installation because of error.

 

Thanks for your help! :)

Link to comment

Hmm. I assume the menu indicating you've got two mutually exclusive subcomponents installed simultaneously is just a bad copy and paste. :)

 

Could you do a search through your BG2 folder and see which mods have staf15.itm in their backup folder? The staff looks fine post-Fixpack.

Link to comment

Hello, Cam!

 

The culprit should be Check the Bodies which is the only Mod that has staf15.itm together with BG2 Tweakpack (which I installed later so it can't be that!).

 

I guess I will report this at King Diamond's attention....Thanks!

 

P.S. The menu telling me that I have two simultaneously installed elements of the same component is not unfortunately a bad copy/paste...It's the result of the error I got...

Link to comment
P.S. The menu telling me that I have two simultaneously installed elements of the same component is not unfortunately a bad copy/paste...It's the result of the error I got...

This is probably caused by a bad command (a DESIGNATED 2 somewhere on the file) in Quest Pack's TP2, so several components share the same component number.

Link to comment
The culprit should be Check the Bodies which is the only Mod that has staf15.itm together with BG2 Tweakpack (which I installed later so it can't be that!).

Where do you see it in CtB?

 

NONE of the big mods (SoD, RoT, CtB, BGT, TDD, TS-BP) touches staf15.itm.

As well as FixPack doesn't corrupt it. So look somewhere else...

Link to comment

The culprit should be Check the Bodies which is the only Mod that has staf15.itm together with BG2 Tweakpack (which I installed later so it can't be that!).

Where do you see it in CtB?

 

NONE of the big mods (SoD, RoT, CtB, BGT, TDD, TS-BP) touches staf15.itm.

As well as FixPack doesn't corrupt it. So look somewhere else...

 

This is really weird. I had just used the "Search" function of Windows to look for staf15.itm and that file was present in the Override folder, in the CTB\items\ folder and in the Tweak pack folder...

 

UPDATE: I was just confused by finding the staf15.itm in the backup override of CTB! CTB is then absolutely innocent! Sorry about the false impression!

 

Now I have unfortunately uninstalled everything and can't double check this but I will report more infos once I put everything up again...

Link to comment

The culprit should be Check the Bodies which is the only Mod that has staf15.itm together with BG2 Tweakpack (which I installed later so it can't be that!).

Where do you see it in CtB?

 

NONE of the big mods (SoD, RoT, CtB, BGT, TDD, TS-BP) touches staf15.itm.

As well as FixPack doesn't corrupt it. So look somewhere else...

 

This is really weird. I had just used the "Search" function of Windows to look for staf15.itm and that file was present in the Override folder, in the CTB\items\ folder and in the Tweak pack folder...

 

UPDATE: I was just confused by finding the staf15.itm in the backup override of CTB! CTB is then absolutely innocent! Sorry about the false impression!

 

Now I have unfortunately uninstalled everything and can't double check this but I will report more infos once I put everything up again...

 

 

I recall having a conflict with installing a mod (I believe it was e series scripts actually) with fixpack installed, specificly giving me a message about staf15. I removed fixpack, went back to baldurdash instead, and never saw the problem again.

Link to comment

The fixpack makes only a single change to staf15, and I personally can't find anything whatsoever wrong with the code; also note that the exact same change is made to over a dozen other files, so if there is indeed a problem, it's likely other files are affected as well. For convenience, here's the code:

 

// elven sleep/charm immunity
COPY_EXISTING ~clck07.itm~   ~override~ // cloak of the nymph
		  ~dagg13.itm~   ~override~ // pixie prick +3
		  ~dwbolt01.itm~ ~override~ // drow bolt o' sleep
		  ~gorwom1.itm~  ~override~ // undroppable nalmissra weapon - charm effect
		  ~hgnymph.itm~  ~override~ // undroppable nymph weapon - charm effect
		  ~misc2p.itm~   ~override~ // harp; appears unused
		  ~misc9x.itm~   ~override~ // illithid control circlet
		  ~psdclaw.itm~  ~override~ // ToB pseudodragon melee weapon
		  ~regisamu.itm~ ~override~ // Ruby Pendant of Beguiling on Regis
		  ~ring03.itm~   ~override~ // Ring of Animal Friendship
		  ~ring30.itm~   ~override~ // Ring of Human Influence
		  ~staf09.itm~   ~override~ // staff of command
		  ~staf14.itm~   ~override~ // staff of the woodlands
		  ~staf15.itm~   ~override~ // staff of air
		  ~wand08.itm~   ~override~ // wand of sleep
 READ_LONG  0x64 "abil_off" ELSE 0
 READ_SHORT 0x68 "abil_num" ELSE 0
 READ_LONG  0x6a "fx_off"   ELSE 0
 SET "abil_length" = 0x38
 SET "fx_delta" = 0
 FOR (index = 0; index < abil_num; index = index + 1) BEGIN // start iterating through abilities
READ_SHORT  ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "abil_fx_num"
READ_SHORT  ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) "abil_fx_idx"
SET "abil_fx_idx" = ("%abil_fx_idx%" + "%fx_delta%")
WRITE_SHORT ("%abil_off%" + 0x20 + ("%abil_length%" * "%index%")) ("%abil_fx_idx%")
FOR (index2 = 0; index2 < abil_fx_num; index2 = index2 + 1) BEGIN
  READ_SHORT ("%fx_off%" +		(0x30 * ("%abil_fx_idx%" + "%index2%"))) "opcode"
  PATCH_IF (("%opcode%" = 39) OR ("%opcode%" = 5)) BEGIN // if there's a sleep or charm opcode
	READ_BYTE  ("%fx_off%" + 0x02 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "target"
	READ_BYTE  ("%fx_off%" + 0x12 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob1"
	READ_BYTE  ("%fx_off%" + 0x13 + (0x30 * ("%abil_fx_idx%" + "%index2%"))) "prob2"
	PATCH_IF ("%opcode%" = 5) BEGIN // if charm
	  SET "new_fx" = 14
	END ELSE BEGIN
	  SET "new_fx" = 10
	END
	SET "fx_delta" = "%fx_delta%" + "%new_fx%"
	FOR (index4 = 2; index4 < 4; index4 = index4 + 1) BEGIN
	  FOR (index3 = 0; index3 < (("%new_fx%" / 2)); index3 = index3 + 1) BEGIN
		INSERT_BYTES  ("%fx_off%" +		(0x30 * "%abil_fx_idx%")) 0x30 // insert new effect
		  WRITE_SHORT ("%fx_off%" +		(0x30 * "%abil_fx_idx%")) 177		   // use eff file
		  WRITE_BYTE  ("%fx_off%" + 0x02 + (0x30 * "%abil_fx_idx%")) "%target%"	// preserve target
		  WRITE_LONG  ("%fx_off%" + 0x04 + (0x30 * "%abil_fx_idx%")) "%index4%"	// elf or half elff
		  WRITE_LONG  ("%fx_off%" + 0x08 + (0x30 * "%abil_fx_idx%")) 4			 // race.ids
		  WRITE_BYTE  ("%fx_off%" + 0x12 + (0x30 * "%abil_fx_idx%")) ("%prob2%" + ((21 - ("%index4%" * 6)) * ("%prob1%" - "%prob2%") / 10)) // 90%
		  WRITE_BYTE  ("%fx_off%" + 0x13 + (0x30 * "%abil_fx_idx%")) "%prob2%"	 // base prob
		  WRITE_EVALUATED_ASCII ("%fx_off%" + 0x14 + (0x30 * "%abil_fx_idx%")) ~cdelfcm%index3%~	// eff file
		PATCH_IF ("%opcode%" = 39) BEGIN
		  WRITE_ASCII ("%fx_off%" + 0x19 + (0x30 * "%abil_fx_idx%")) ~sl~ #2 // eff file
		END
	  END
	END
	SET "index2" = "%index2%" + "%new_fx%"
	SET "abil_fx_num" = "%abil_fx_num%" + "%new_fx%"
  END
END
WRITE_SHORT  ("%abil_off%" + 0x1e + ("%abil_length%" * "%index%")) "%abil_fx_num%"
 END
 BUT_ONLY_IF_IT_CHANGES

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...