Jump to content


Photo

TobEx vs aTweaks "Opcode out of bounds"?


  • Please log in to reply
6 replies to this topic

#1 WVN777

WVN777
  • Member
  • 5 posts

Posted 20 November 2013 - 05:56 PM

Hi All, I'm starting a fresh new install of BG2 SoA & ToB (Windows XP SP3, yeah I know). Patched, adding a few of my favorite mods, downloading latest versions, testing after each mod. Upon installing aTweaks 4-10, an error message suddenly started appearing in TobEx:

"CEffectSetStat::ApplyEffect(): nOpcode out of bounds (expected maximum 400)"

My WeiDU.log, TobEx.log, and Setup.aTweaks.Debug are attached.

 

Searched for clues, and another SHS thread (http://www.shsforums...bounds-message/) indicated a conflict between TobEx, which adds new opcodes to STATS.IDS, and mods that delete them, including (apparently) aTweaks. Sure enough, Near Infinity showed that STATS.IDS had exactly 200 entries. (Shouldn't that message say "minimum 400" ?) I don't know much about TobEx, but I gather those extra opcodes are important to somebody. Haven't found anything on this one in the other forums or archives. 

 

So have you seen this yourself? Any chance of changing aTweaks not to delete those extra TobEx opcodes? To get around it, I've copied the backup from aTweaks folder 153 back into STATS.IDS with Near Infinity (although in some areas it doesn't quite seem to match), and the TobEx error message seems to have gone away, at least for now. Was that the right thing to do, or is it likely to cause other problems later on?  Any other suggestions?  Thanks ! 

 

~ WVN777 ~

 

 

Attached Files



#2 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 20 November 2013 - 10:54 PM

As in the thread you linked to, it looks like (old) DS is to blame, as it were. Parts of aTweaks likely won't work right without the necessary mappings in stats.ids.



#3 WVN777

WVN777
  • Member
  • 5 posts

Posted 21 November 2013 - 01:12 AM

Hi Wisp!

 

Yes, it looks like aTweaks is installing Detectable Spells, which is deleting the higher opcodes, which is causing the TobEx error message, and presumably or potentially affecting anything (including aTweaks) that might be looking for those missing opcodes later on.

 

From the Setup.aTweaks.Debug listing:


Initializing Detectable Spells installation ...
Copying and patching 1 file ...
[./override/spwi705.spl] loaded, 250 bytes
Copying and patching 1 file ...
[./override/stats.ids] loaded, 5271 bytes
Copying and patching 1 file ...
[aTweaks/LIB/DS/stats.2da] loaded, 1298 bytes
Copying 1 file ...
override/stats.ids copied to atweaks/backup/153/stats.ids, 5271 bytes

(etc)

 

(That's where I got the idea to restore the backed-up STATS.IDS from folder 153.)

 

So ... if you need to install DS for aTweaks, but you also know that it will clobber STATS.IDS (including stuff that you and others may need), would it be possible for you to code around that problem? I'm thinking whether you were to back up, modify, and then restore STATS.IDS after DS runs, or overwrite the STATS.2DA in your DS folder with the current STATS.IDS before installing DS, the objective would be to end up with a correct, TobEx friendly STATS.IDS with all of its 400+ entries at the end. (Sorry to jump to solutioning, just trying to be helpful.)

 

Attached are my STATS.IDS after installing aTweaks (200 entries due to DS) and the version manually restored from aTweaks folder 153 (as above). What I don't know is whether the restored backup has everything aTweaks would need to work right, as you said.

 

Can you take a look at my Restored version and let me know if everything you need is in there, or is anything missing?

 

Thanks!  ~ WVN777 ~

 

Attached Files



#4 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 21 November 2013 - 01:28 AM

aTweaks doesn't need any of the higher stats. It works fine with the DS it ships with. Other mods might need the higher stats and malfunction without them. aTweaks will possibly malfunction without the stats.ids produced by DS.

 

The fix for this is complicated by the need to keep DS consistent among all mods that use DS.



#5 WVN777

WVN777
  • Member
  • 5 posts

Posted 15 December 2013 - 01:50 AM

I'm constantly amazed that so many great mods work together as well as they do!  I don't know who is responsible for DS today, but it needs to work with TobEx, for aTweaks (and others) to work. I had to re-install aTweaks (and others) without the parts that use DS, which is a pity.



#6 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 17 December 2013 - 02:07 PM

A temporary workaround is to restore STATS.IDS from aTweaks' backup folder. If you already have SCS installed, all aTweaks needs will be there.
A permanent solution is obviously to ship a self-updating DS library, which is what I'm pretending to work on currently.

Retired from modding.


#7 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 17 December 2013 - 02:55 PM

A temporary workaround is to restore STATS.IDS from aTweaks' backup folder. If you already have SCS installed, all aTweaks needs will be there.
A permanent solution is obviously to ship a self-updating DS library, which is what I'm pretending to work on currently.

So something very much like this ?

// Original source code added CD_STATE_NOTVALID state to state.ids in multiple mods as an example
APPEND ~STATS.IDS~ ~301 FIGHTERLEVEL~
UNLESS ~FIGHTERLEVEL~ 

with each and everyline after the 301:

 

301 FIGHTERLEVEL
302 MAGELEVEL
303 CLERICLEVEL
304 THIEFLEVEL
305 DRUIDLEVEL
306 RANGERLEVEL
307 EFFECTIVECLERICLEVEL
308 BUTTONDISABLESTEALTH
309 BUTTONDISABLETHIEVING
310 BUTTONDISABLECASTSPELL
311 BUTTONDISABLEQUICKSPELL1
312 BUTTONDISABLEQUICKSPELL2
313 BUTTONDISABLEQUICKSPELL3
314 BUTTONDISABLETURNUNDEAD
315 BUTTONDISABLETALK
316 BUTTONDISABLEUSEITEM
317 BUTTONDISABLEQUICKITEM1
318 BUTTONDISABLEBARDSONG
319 BUTTONDISABLEQUICKITEM2
320 BUTTONDISABLEQUICKITEM3
321 BUTTONDISABLEABILITY
322 BUTTONDISABLEFINDTRAPS
323 AID
324 BLESS
325 CHANT
326 DRAWUPONHOLYMIGHT
327 CHANTBAD
328 DISABLESPELLTYPEWIZARD
329 DISABLESPELLTYPEPRIEST
330 DISABLESPELLTYPEINNATE
331 WINGBUFFET
387 ACIDDAMAGEBONUS
388 COLDDAMAGEBONUS
389 CRUSHINGDAMAGEBONUS
390 ELECTRICITYDAMAGEBONUS
391 FIREDAMAGEBONUS
392 PIERCINGDAMAGEBONUS
393 POISONDAMAGEBONUS
394 MAGICDAMAGEBONUS
395 MISSILEDAMAGEBONUS
396 SLASHINGDAMAGEBONUS
397 MAGICFIREDAMAGEBONUS
398 MAGICCOLDDAMAGEBONUS
399 STUNNINGDAMAGEBONUS
400 WEIGHTALLOWANCEMOD
401 ENCHANTMENT_IMMUNITY
402 DW_ITEM_SLEEP
403 DW_ITEM_HOLD
404 DW_ITEM_LEVELDRAIN
405 DW_ITEM_PANIC
406 DW_ITEM_STUN
407 DW_ITEM_SLAY
408 DW_ITEM_CONFUSION
409 DW_ITEM_SLOW
410 DW_ITEM_MM
411 DW_ITEM_CHARM
412 DW_ITEM_PSIBLAST
413 DW_ITEM_EGOWHIP
414 DW_ITEM_PSIDOM
415 DW_ITEM_PSIMAZE
416 DW_ITEM_SILENCE
417 DW_ITEM_POISON
418 DW_ITEM_ANTIWEB
419 DW_ITEM_PETRIFY
420 DW_ITEM_DISINTEGRATE
421 DW_ITEM_MAZE

Edited by The Imp, 17 December 2013 - 03:00 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.