pixeltris/Lotd

Couldn't find the install directory for Legacy of the Duelist

Ewfgqez opened this issue · 6 comments

Hey,

I'm new to VS and my knowledge is severly lacking. I tried building the program but got the following error:

System.Exception
HResult=0x80131500
Message=Couldn't find the install directory for Legacy of the Duelist 'C:\Program Files (x86)\Steam\steamapps\common\Yu-Gi-Oh! Legacy of the Duelist'
Source=Lotd
StackTrace:
at Lotd.LotdArchive.Load() in C:\Users\Claud\Desktop\Lotd-master\Lotd-master\Lotd\LotdArchive.cs:line 48
at Lotd.Manager.Load() in C:\Users\Claud\Desktop\Lotd-master\Lotd-master\Lotd\Manager.cs:line 38
at Lotd.Program.Main() in C:\Users\Claud\Desktop\Lotd-master\Lotd-master\Lotd\Program.cs:line 28

Reading from the other thread #4, I know the problem is in the install directory location. However, I also use a pirated version of the game. I saw the suggestion by obtaining the registry key unfortunatelly that is way beyond my skills to try and fix this on my own so I'm kind of stuck at the moment.

Any help would be much appreciated.

Edit 1; I "fixed" the install directory error

   public static string GetInstallDirectory()
    {
        string installDir = "D:\\Games\\Yu-Gi-Oh! Legacy of the Duelist";

        return installDir;
    }
}

I managed to open the programme, Duel Starter at least, but when I run the game it just chrashes and I get the following error:

Unhandled exception at 0x00007FFAABC2DF23 (ntdll.dll) in YuGiOh.exe: 0xC0000005: Access violation writing location 0x0000000000000024.

The game works fine if I don't lunch the programme beforehand.

Edit 2; I played around with the Thread.Sleep(2000); line and I got the game to launch by setting a larger delay but as soon the programme loads the game stops responding and crashes.

OS is Windows 10 Home, build 17763.737

It could be that some things are changed in the pirated version of the game that causes the crash (in which case I can't do a lot to fix it, as I use the official version). And yes this tool requires the steam folder lookup in order to find the installed game location (maybe it would have made sense to add an open file dialog when it fails to find it).

Some things are definitely different. I attached the game files from my install folder.
Because the pirated version is the steam version there are some steam files. Not sure if that is helpful though.

I got the programme to build and start but the game chrases when I launch it with Duel Starter open.

Game Folder
SteamworksFix Folder

Edit 1; when I try to debug the crash with VS this is what I get.

I would need to do some kind of binary diff of the pirated exe to see what's up. It's likely crashing due to differences in the exe, the other files shouldn't matter.

I see, thnx for taking your time to reply. I was hoping to get it to work with the pirated version as I've put lots of hours in the save file.

An extra question, if you maybe know. Because the tool includes a save editor, would it be possible to edit the save file of the base Steam version of the game and unlock the DLC cards without purchasing the DLC. The base game is not that expensive but I don't want to purachase all the DLC.

Yes. You would probably want to back up your save before you did that if your save file is important to you. If your save file isn't important to you, then you could just download a save file which has everything (which you should be easy enough to find online).