Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHRMODELS_orig replaced with Mod Loader DLL? #245

Open
MegAmi24 opened this issue Oct 31, 2024 · 3 comments
Open

CHRMODELS_orig replaced with Mod Loader DLL? #245

MegAmi24 opened this issue Oct 31, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MegAmi24
Copy link

MegAmi24 commented Oct 31, 2024

Description
When trying to play the game, this error appears instead:
image
I've checked and confirmed CHRMODELS_orig.dll exists in the system folder.

Disabling the Material Color Fixes patch produces a standard crash.

Both the CHRMODELS_orig.dll error and the disabled Material Color Fixes crash occur regardless of any mods being enabled. I just ran the SADX Mod Installer and checked for updates in SA Mod Manager, so everything should be the latest version.

Steps Taken
Steps to reproduce the behavior:

  1. Install SADX on Steam
  2. Run SADX Mod Installer
  3. After SA Mod Manager sets up the mod loader, codes, etc, click Save & Play
  4. See CHRMODELS_orig.dll error
  5. Disable the Material Color Fixes patch and click Save & Play
  6. See crash

Expected behavior
The game boots up.

Crash dump for when Material Color Fixes is disabled:
03_04_21_Dump__.zip

@MegAmi24 MegAmi24 added the bug Something isn't working label Oct 31, 2024
@PiKeyAr
Copy link
Member

PiKeyAr commented Oct 31, 2024

This error means the data structures that are supposed to be loaded from CHRMODELS_orig.DLL aren't present in memory, which is a critical error so the game can't boot. The most likely reason for this is that the file CHRMODELS_orig.DLL isn't what it's supposed to be. The only way to fix this is to get back the original CHRMODELS.DLL from the vanilla game.

In the original game, CHRMODELS.DLL is the file containing playable character models. When the Mod Loader is installed, CHRMODELS.DLL is renamed to CHRMODELS_orig.DLL, and the Mod Loader's DLL is copied as CHRMODELS.DLL. So when the game loads character models, it loads the Mod Loader DLL first, which in turn loads CHRMODELS_orig.DLL.

I've heard of a similar error before, and my guess is that somehow during Mod Loader installation the original CHRMODELS.DLL was replaced by a copy of the Mod Loader DLL without a proper backup, and then this copy was assumed to be the original CHRMODELS.DLL. As a result, you probably have the Mod Loader DLL as both CHRMODELS.DLL and CHRMODELS_orig.DLL. You can check the size of CHRMODELS_orig.DLL, the correct file should be around 7MB, but the Mod Loader DLL is about 1MB.

As for why this happened, I'm not sure. On systems other than Windows XP (where it installs the legacy Manager), the Mod Installer does not touch CHRMODELS or CHRMODELS_orig, all it does is copy the Mod Manager's EXE file to the game directory and let it handle things from there.

@MegAmi24
Copy link
Author

CHRMODELS_orig.dll was indeed replaced with the custom version and reinstalling the game and rerunning SADX Mod Installer fixed the issue. Thanks for the response!

@MegAmi24 MegAmi24 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
@PiKeyAr
Copy link
Member

PiKeyAr commented Nov 2, 2024

I think this issue should be kept open since it's a serious problem if it happens due to a bug, however it's not an issue with the Loader itself. So I'll transfer this to the Manager repo for the time being.

@PiKeyAr PiKeyAr reopened this Nov 2, 2024
@PiKeyAr PiKeyAr transferred this issue from X-Hax/sadx-mod-loader Nov 2, 2024
@PiKeyAr PiKeyAr changed the title Error and crash on startup CHRMODELS_orig replaced with Mod Loader DLL? Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants