Gibberlings3 / SpellRevisions

A mod for the Baldur's Gate 2 engine (BG2, Tutu, BGT, BGEE, BG2EE, EET)

Home Page:http://gibberlings3.github.io/SpellRevisions/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[AERBOD01.CRE] -> [override] Patching Failed (COPY) (Invalid_argument("String.sub / Bytes.sub")

CodeSpartan opened this issue · comments

The only mods I have installed before spell revision are

  • bg2 fixpack
  • divine remix
Installing [Update Spellbooks of Joinable NPCs] [v4 Beta 18]

Please be patient, this may take a moment...
Copying and patching 1 file ...
Copying and patching 1 file ...
Copying and patching 4752 files ...
Copying and patching 172 files ...

AERBOD01.CRE => AERIE
Copying and patching 1 file ...
ERROR: [AERBOD01.CRE] -> [override] Patching Failed (COPY) (Invalid_argument("String.sub / Bytes.sub"))
Stopping installation because of error.
Stopping installation because of error.
Stopping installation because of error.
Stopping installation because of error.

ERROR Installing [Update Spellbooks of Joinable NPCs], rolling back to previous state
Will uninstall   0 files for [SPELL_REV/SETUP-SPELL_REV.TP2] component 60.
Uninstalled      0 files for [SPELL_REV/SETUP-SPELL_REV.TP2] component 60.
ERROR: Invalid_argument("String.sub / Bytes.sub")
Please make a backup of the file: SETUP-SPELL_REV.DEBUG and look for support at: marco.montagnoli83@hotmail.it

Debug log: here

I nailed the problem down to the "spheres" component of Divine Remix. Not sure whose bug this is.

Thanks. That error message is coming from OCaml itself and I'm not sure what's setting it off.

This component (Update Spellbooks of Joinable NPCs) normally updates both divine and arcane casters, but is supposed to only update arcane casters when DR is detected (due to the difficulty determining appropriate spells with the sphere system).

However, it looks like the detection for DR may no longer be working, because the component number for DR's sphere system changed from 0 to 1000 in DR v8.

ACTION_IF NOT MOD_IS_INSTALLED ~Divine_Remix~ ~0~ BEGIN

To avoid reassigning spells for divine casters, this check needs to be updated to:

ACTION_IF NOT MOD_IS_INSTALLED ~Divine_Remix~ ~1000~ BEGIN

It looks like the error you received occurred while it was attempting to update divine casters, so this change may resolve the issue, but I can't be certain.

I can confirm that this fix works.