Jump to content


Photo

Conflict with D0Quest Creatures&Area Improvements


  • Please log in to reply
22 replies to this topic

#1 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 14 August 2006 - 08:11 AM

Hello!

This is for seanas/Horred,

after installing Big Picture WeiDu 177, I can no longer install the Creatures&Area improvements from Ding0's Quest Pack which was working fine in version 176.

The error message is the following:

ERROR: Failure("STAF15.ITM: read out of bounds")
PLEASE email the file SETUP-D0QUESTPACK.DEBUG to SimDing0@hotmail.com
Using Language [English]
[English] has 1 top-level TRA files
[questpack/translations/english/d0quest.tra] parsed
[questpack/translations/english/d0quest.tra] has 344 translation strings

Can you please investigate ? Thanks! :cheers:

Edited by Salk, 14 August 2006 - 08:15 AM.


#2 seanas

seanas
  • Modder
  • 1906 posts

Posted 14 August 2006 - 08:36 AM

the code for BP v177 and BP v175 is identical (i haven't got v176 to check - but if it didn't change betwen v175 and v177, it wouldn't have changed in v176).

ok, i've just dug out a copy of BP v176 as well: the code block relating to STAF15.itm in all three versions - 175, 176, 177 - is identical. so whatever is causing yr out-of-bounds error is being caused by something else.

Edited by seanas, 14 August 2006 - 09:01 AM.

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#3 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 14 August 2006 - 09:00 AM

Found. 2 critical bugs in BP's TP2 (can even cause CTD).

Patching of STAF15.ITM and WAND14.ITM (both near line #4114 - for a fixed TP2 that posted in a workroom though).
For both items
SET extra_effects = 0
must be added. So, it should look like:
COPY_EXISTING ~STAF15.ITM~  ~override~
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a  "eff_offset"
 SET extra_effects = 0
 SET found = 0
 SET offset = 0
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x38)  "type"

   PATCH_IF( found>0 ) THEN BEGIN	//shift effects indexes for all possible abilities after 1st effect entry
	 READ_SHORT ("%ability_offset%"+cnt*0x38+0x20)  eff_idx
	 WRITE_SHORT ("%ability_offset%"+cnt*0x38+0x20) eff_idx+extra_effects
   END

   PATCH_IF( "%type%"=3 AND found=0 ) BEGIN  //necessary ability found - Magical
	 READ_SHORT ("%ability_offset%"+cnt*0x38+0x1e)  eff_cnt
	 READ_SHORT ("%ability_offset%"+cnt*0x38+0x20)  eff_idx
	 FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
	   READ_SHORT ("%eff_offset%"+0x30*(cnt2+eff_idx))  "eff_type"
	   PATCH_IF( "%eff_type%" = 39 ) THEN BEGIN	   //right ability
		 SET offset = "%eff_offset%"+0x30*(cnt2+eff_idx)
	   END
	   PATCH_IF( "%eff_type%"=282 AND offset>0 ) THEN BEGIN	   //effect found
		 found=1
	   END
	 END
   END

   PATCH_IF( found=0 AND offset>0 ) THEN BEGIN
	   WRITE_SHORT ("%ability_offset%"+cnt*0x38+0x1e)  eff_cnt+1
	   INSERT_BYTES offset	0x30			   //1 new effect
	   WRITE_SHORT  offset	282				//effect
	   WRITE_BYTE   offset+2  2				  //TargetSelf
	   WRITE_BYTE   offset+3  0				  //Power
	   WRITE_LONG   offset+4  11				 //stars
	   WRITE_LONG   offset+8  24				 //code
	   WRITE_BYTE   offset+12 0				  //Instant/Limited
	   WRITE_BYTE   offset+13 2				  //Not Dispell/Not Bypass Resistance
	   WRITE_LONG   offset+14 6		   //Time
	   WRITE_BYTE   offset+18 100		  //Probability 1
	   WRITE_BYTE   offset+19 0		  //Probability 2
	   SET extra_effects = extra_effects + 1
	   SET found = 1
   END
 END //FOR - ability loop
BUT_ONLY_IF_IT_CHANGES  //COPY_EXISTING


COPY_EXISTING ~WAND14.ITM~  ~override~
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a  "eff_offset"
 SET extra_effects = 0
 SET found = 0
 SET offset = 0
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x38)  "type"

   PATCH_IF( found>0 ) THEN BEGIN	//shift effects indexes for all possible abilities after 1st effect entry
	 READ_SHORT ("%ability_offset%"+cnt*0x38+0x20)  eff_idx
	 WRITE_SHORT ("%ability_offset%"+cnt*0x38+0x20) eff_idx+extra_effects
   END

   PATCH_IF( "%type%"=3 AND found=0 ) BEGIN  //necessary ability found - Magical
	 READ_SHORT ("%ability_offset%"+cnt*0x38+0x1e)  eff_cnt
	 READ_SHORT ("%ability_offset%"+cnt*0x38+0x20)  eff_idx
	 FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
	   READ_SHORT ("%eff_offset%"+0x30*(cnt2+eff_idx))  "eff_type"
	   PATCH_IF( "%eff_type%" = 157 ) THEN BEGIN	   //right ability
		 SET offset = "%eff_offset%"+0x30*(cnt2+eff_idx)
	   END
	   PATCH_IF( "%eff_type%"=282 AND offset>0 ) THEN BEGIN	   //effect found
		 found=1
	   END
	 END
   END

   PATCH_IF( found=0 AND offset>0 ) THEN BEGIN
	   WRITE_SHORT ("%ability_offset%"+cnt*0x38+0x1e)  eff_cnt+1
	   INSERT_BYTES offset	0x30			   //1 new effect
	   WRITE_SHORT  offset	282				//effect
	   WRITE_BYTE   offset+2  2				  //TargetSelf
	   WRITE_BYTE   offset+3  0				  //Power
	   WRITE_LONG   offset+4  14				 //stars
	   WRITE_LONG   offset+8  24				 //code
	   WRITE_BYTE   offset+12 0				  //Instant/Limited
	   WRITE_BYTE   offset+13 2				  //Not Dispell/Not Bypass Resistance
	   WRITE_LONG   offset+14 6		   //Time
	   WRITE_BYTE   offset+18 100		  //Probability 1
	   WRITE_BYTE   offset+19 0		  //Probability 2
	   SET extra_effects = extra_effects + 1
	   SET found = 1
   END
 END //FOR - ability loop
BUT_ONLY_IF_IT_CHANGES  //COPY_EXISTING

Edited by King Diamond, 14 August 2006 - 09:04 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#4 seanas

seanas
  • Modder
  • 1906 posts

Posted 14 August 2006 - 09:04 AM

ahh - interesting.

it hasn't caused problems (well, not out of bounds errors) until now: is this coming to light because a resource ahs been cleaned up by the fixpack, by any chance? (ie: what has changed that Salk is seeing the eror now, when previously it wasn't showing up, but the code was identical?)

added to my list of fixes.

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#5 radish_hoedown

radish_hoedown
  • Member
  • 201 posts

Posted 14 August 2006 - 09:05 AM

hooray KD! ^^ :cheers:

#6 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 14 August 2006 - 09:07 AM

ahh - interesting.

it hasn't caused problems (well, not out of bounds errors) until now: is this coming to light because a resource ahs been cleaned up by the fixpack, by any chance? (ie: what has changed that Salk is seeing the eror now, when previously it wasn't showing up, but the code was identical?)

added to my list of fixes.

NI doesn't show any error there :) It shows everything fine but the real indexes are totally wrong.
I've found it absolutely accidently trying to apply a patch for STAF15 from a separate TP2
So call me lucky..... :D

And no, FixPack don't have any chance to fix that.... B)

Edited by King Diamond, 14 August 2006 - 09:08 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#7 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 14 August 2006 - 10:40 AM

NI doesn't show any error there :) It shows everything fine but the real indexes are totally wrong.
I've found it absolutely accidently trying to apply a patch for STAF15 from a separate TP2
So call me lucky..... :D

And no, FixPack don't have any chance to fix that.... B)


Thank you for investigating and fixing this KD!

And apologies for having "accused" unfairly Check the Bodies in another forum!

seanas,

in case of prolonged absence of Horred, would it be possible for you to upload a fixed for version 177 of BP ?

It seems to me that critical bugs like these ones would deserve being dealt with promptly...

Cheers to you both! :cheers:

#8 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 14 August 2006 - 12:01 PM

Yeah, a similar hidden effect index error lay dormant in Weimer's Item Upgrade for months, if not years. No editors detect them AFAIK and it was only the age of the FOR loop that exposed it. :)

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#9 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 18 August 2006 - 02:17 PM

Are you talking about C2BLUN02.ITM?

Edited by GeN1e, 18 August 2006 - 02:17 PM.

Retired from modding.


#10 J Beau

J Beau
  • Member
  • 85 posts

Posted 19 August 2006 - 02:18 AM


NI doesn't show any error there :) It shows everything fine but the real indexes are totally wrong.
I've found it absolutely accidently trying to apply a patch for STAF15 from a separate TP2
So call me lucky..... :D

And no, FixPack don't have any chance to fix that.... B)


Thank you for investigating and fixing this KD!

And apologies for having "accused" unfairly Check the Bodies in another forum!

seanas,

in case of prolonged absence of Horred, would it be possible for you to upload a fixed for version 177 of BP ?

It seems to me that critical bugs like these ones would deserve being dealt with promptly...

Cheers to you both! :cheers:


Or maybe you can upload just an updated TP2, if that would address most things.
Tempus fugit - memento mori
Time flies - remember death

#11 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 19 August 2006 - 03:11 AM

Are you talking about C2BLUN02.ITM?

Yeah, exactly. (It's fixed in IU v33.)

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#12 melkor_morgoth75

melkor_morgoth75

    Lord

  • Modder
  • 1509 posts

Posted 22 August 2006 - 12:55 AM

I know now why it happened the same error with WAND14.ITM between BP & D0Creature Improvements ... i solved it installing D0C&AI BEFORE BP,

mm75

Tired of the same boring spawned creatures u face in BG? Try BGSpawn


#13 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 25 October 2006 - 04:04 AM

It appears the same bugs are present in BP Detectable Stats 1.2--any chance of an update there as well?

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#14 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 28 October 2006 - 12:07 PM

This bit will also remove the issue of BP DS being installed after Ascension or Kelsey:

COPY_EXISTING ~stats.ids~ ~override~
	READ_ASCII 0x00 "test" (1)
	PATCH_IF ("%test%" = 1) BEGIN // if file doesn't start with carriage return
	  REPLACE_TEXTUALLY ~^1 MAXHITPOINTS~ ~
1 MAXHITPOINTS~
	END
	BUT_ONLY_IF_IT_CHANGES

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#15 seanas

seanas
  • Modder
  • 1906 posts

Posted 29 October 2006 - 06:39 AM

thanks CD: i'll chuck these together asap and put out a BP DetectStats v1.3.

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#16 cirerrek

cirerrek
  • Member
  • 193 posts

Posted 30 October 2006 - 09:36 PM

Ah!!!!!!!! Not another version of BP Detectable Spells (...not that it isn't very useful for what it does...and you've got to love that table thingee built into the install)...but...

Horred delivered his mostly finished re-vamped version of Detectable Spells to me. I told him I would find a way to get in finished and rolled out.

Why don't we start now? I think we can dump all the code to the wiki at G3 for all to see, give it a (day, week, two weeks?) for all to debate and then finish it and go from there.

Then comes the fun of recoding all our mods and getting earlier DS adopters to adopt the new code as well...but that is there, rather than here.

Watcha think?

#17 Salk

Salk
  • Modder
  • 1419 posts

Donator

Posted 31 October 2006 - 01:05 AM

I do think Cirerrek is absolutely right here... :cheers:

#18 seanas

seanas
  • Modder
  • 1906 posts

Posted 31 October 2006 - 02:40 AM

Ah!!!!!!!! Not another version of BP Detectable Spells (...not that it isn't very useful for what it does...and you've got to love that table thingee built into the install)...but...

Horred delivered his mostly finished re-vamped version of Detectable Spells to me. I told him I would find a way to get in finished and rolled out.

Why don't we start now? I think we can dump all the code to the wiki at G3 for all to see, give it a (day, week, two weeks?) for all to debate and then finish it and go from there.

cool cool - that sounds like a much better idea to me.

we don't use BP Detect Stats (the mod) in BP, so i was only going to put out a patched version anyway - if it's not going to be of any use (or worse, is going to create BDv1.6 nightmares) then i won't do it. if you want to take up Horred's mission to unify STATS.IDS on all games, that'd be excellent. i'll help out as i can, even tho it won't be much.

"A simple test of the relative merits of science and religion is to compare lighting your house at night by prayer or electricity" - A. C. Grayling
"EFF files have saves, too." - CamDawg
|| this is radio seanas || BP Series v3 || seanas at work ||


#19 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 01 November 2006 - 05:03 AM

This makes me very, very happy. I'm willing to handle the technical aspects (i.e. coding), though I'm more than willing to pass it off if someone else wants to do it. :) Not being an AI scripter or a BP(-[Aa-Zz0-9]+)* player, though, I would definitely need assistance determining which spell/item/eff gets what stats, particularly for the BP(-[Aa-Zz0-9]+)*-added stuff.

I'd suggest we start a new thread (here or G3, doesn't matter) with the new DS specs that horred et al discussed; I believe we may even have an alpha laying around somewhere. This won't be successful unless we can actually get everything updated to the new specs. I don't think it will be too difficult, just keep in mind that outreach is going to be a big part of the project, even to the point of re-coding for some folks if they're absent/can't be bothered.

From a technical standpoint, I'd suggest the new package have the following properties:

Coded as a library. This allows anyone who wants to use DS to add it to their mod with a simple INCLUDE statement. It also has maintenance benefits down the road in that an abandoned mod can be updated to the newest DS package with a simple file replace.

Can be installed multiple times from multiple sources. Originally, I had hoped that something like Fixpack could include DS, negating the need for other mods to include it. However, there will always be mods that overwrite ids files/items/spells, etc., and expecting every mod that creates new items and spells to include the proper DS effects is wishful thinking. As such, it's better to make the package modular (see above), able to be installed multiple times without making 18 effects in one spell to set the same stat, and account for mod items and spells. Every mod that has DS can then account for any mod that has come before it, mitigating (if not eliminating) install order issues.

Accounts for mod spells and items. As above, I don't think it's realistic to place the burden of making new mod spells and items detectable on mod authors--at worst, they have no idea what DS is, or, at best, it's someone like me who knows of DS but doesn't know which stats to assign to new spells and items. Along with the lookup table (below) it should be pretty easy to add new mod items and spells.

Ease of maintenance. I thought King Diamond's lookup table was a great way to accomplish this; I don't see any reason why we shouldn't keep the idea.

Edited by CamDawg, 01 November 2006 - 05:04 AM.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#20 Kaeloree

Kaeloree

    Head Molder

  • Administrator
  • 9200 posts

Posted 01 November 2006 - 09:16 PM

Would you guys like a workroom and forum for Detect Stats? I'd be absolutely happy to set one up :)