llde / xOBSE

Oblivion Script extender source
250 stars 36 forks source link

ModTable::Get().GetModIndex giving the wrong index #211

Open kksvt opened 1 year ago

kksvt commented 1 year ago

If Oblivion.esm isn't checked in the load order in Launcher->Data Files (which appears to be the default setting for certain versions of the game) it will still be loaded, however it will cause ModTable::Get().GetModIndex to return a wrong index for all masters and plugins (shifted by one), as Oblivion.esm will not be an entry in the list of active mods.

llde commented 1 year ago

Hi, I tryed but can't reproduce, can you give me exact steps?

kksvt commented 1 year ago
  1. Run the Oblivion Launcher.
  2. Click on Data Files.
  3. Uncheck Oblivion.esm (Master File)
  4. Click on Ok to close the Data Files window.
  5. Click on Play to launch the game.
  6. Oblivion.esm will no longer be the 1st (0th) mod in the array returned by DataHandler::GetActiveModList() (even though the master file is still very much active), causing all mod indices to be shifted by one in the returned array, which in turns causes problems when a plugin needs to determine the correct index.

I tested it on vanilla Oblivion (Steam and GOG) with just OBSE and it persists.

llde commented 1 year ago

I did test these exact steps. Oblivion.exe is still present.