elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.15k stars 82 forks source link

Issues when using Ultimate ASI Loader alongside DXWrapper #250

Closed cammy8580 closed 5 months ago

cammy8580 commented 5 months ago

DXWrapper's ASI loader function is great, but unfortunately, the UAL code used in the game isn't updated often, and when attempting to use an updated UAL alongside dxwrapper, it comes with issues pertaining to not let UAL load the ASIs.

Two problems arise with it. The first one being if dxwrapper's ASI loading feature is disabled, It also disables the ASI loading function of any sort of other ASI loader. This isn't ideal, since it won't allow for UAL to work at all.

The other problem being that enabling script loading in dxwrapper.ini completely blocks UAL, not allowing for the new features caused by the later updates. This also isn't ideal, because it doesn't let you use the newer features introduced in the updates.

There are a couple solutions that can be done to fix it.

  1. Update the code for UALs newer features (possibly the most ideal)
  2. Allow for ASI loaders to be used outside of dxwrapper when the LoadPlugins option is set to 0

Hoping to see this looked into, would be really awesome to see fixed for when dxwrapper!

elishacloud commented 5 months ago

1. Update the code for UALs newer features (possibly the most ideal)

What features of UALs are missing from dxwrapper?

2. Allow for ASI loaders to be used outside of dxwrapper when the LoadPlugins option is set to 0

There is nothing in dxwrapper that prevents other ASI loaders. In fact, you can even using dxwrapper to load other UAL tools. You can use the LoadCustomDllPath to load tools like the Ultimate ASI Loader.

Also, you can use the Ultimate ASI Loader to load dxwrapper. Just put dxwrapper.dll and dxwrapper.ini in the scripts folder.

cammy8580 commented 5 months ago

What features of UALs are missing from dxwrapper?

Specific stuff, such as allowing the fusion overloader for GTA IV.

There is nothing in dxwrapper that prevents other ASI loaders. In fact, you can even using dxwrapper to load other UAL tools. You can use the LoadCustomDllPath to load tools like the Ultimate ASI Loader.

I just had a problem in particular with using an external UAL with LoadPlugins = 0. Kept getting error 126 when launching the game for every ASI.

Also, you can use the Ultimate ASI Loader to load dxwrapper. Just put dxwrapper.dll and dxwrapper.ini in the scripts folder.

Really? I thought it was only with the .asi version. I'll have to try this out.

elishacloud commented 5 months ago

You can rename dxwrapper.dll to dxwrapper.asi. Dxwrapper does not care what extension it is using.

cammy8580 commented 5 months ago

You can rename dxwrapper.dll to dxwrapper.asi. Dxwrapper does not care what extension it is using.

Oops, I just realized I accidentally formatted the reply incorrectly, and my reply was grouped in the quotes. Edited it to fix it.

cammy8580 commented 5 months ago

You can rename dxwrapper.dll to dxwrapper.asi. Dxwrapper does not care what extension it is using.

Update, According to some of the friends I talked to in the IV modding community, I think the reason why dxwrapper may have been working poorly is due a conflict with another mod that seemingly does not like other wrappers/injectables. It seems like I have fixed that problem, but just to be sure, I'll further test to make sure everything goes well.

Also, make sure to check out my edited post. I made some formatting mistakes and forgot to check markdown before posting so only one section of the message showed normally.

elishacloud commented 5 months ago

Thanks.

As far as the missing features, can you give me more specific details? Is there a list somewhere? What exactly is "allowing the fusion overloader for GTA IV"?

I just had a problem in particular with using an external UAL with LoadPlugins = 0. Kept getting error 126 when launching the game for every ASI.

This sounds like a bug with the other UAL. Dxwraper literally just attempts to load the other dlls. It could be that dxwrapper hooks something that the other UAL's want to hook. That sounds like an issue with the other UAL's not handling this gracefully. Furthermore, since I just hotfix the hooks by writing to memory they should be able to hook on top of my hook, allowing for both hooks.

cammy8580 commented 5 months ago

Thanks.

As far as the missing features, can you give me more specific details? Is there a list somewhere? What exactly is "allowing the fusion overloader for GTA IV"?

To my understanding, when FusionFix 2.0 released for GTAIV, Ultimate ASI Loader had an update to work alongside FF to essentially establish a modloader for the project. I think there may have been more features, but this one currently is the biggest notable one introduced in recent updates.

After a bit of messing around, I found that the game seemed to act as normal after installing it on a less modded copy of the game. As described before, there's a specific mod (IV SDK .net I think?) that tends to have a problem with other wrappers/injectors when there are mutiple at once, and it caused for dxwrapper to just not at all work as intended. It's a known problem with that project, and the creator has absolutely no clue as to what may be happening.

This sounds like a bug with the other UAL. Dxwraper literally just attempts to load the other dlls. It could be that dxwrapper hooks something that the other UAL's want to hook. That sounds like an issue with the other UAL's not handling this gracefully. Furthermore, since I just hotfix the hooks by writing to memory they should be able to hook on top of my hook, allowing for both hooks.

That makes sense, but now that I know it wasn't dxwrapper, nor UAL, I think it's safe to close the issue.

elishacloud commented 5 months ago

when FusionFix 2.0 released for GTAIV, Ultimate ASI Loader had an update to work alongside FF to essentially establish a modloader for the project.

Ok, I see. I am not really trying to add custom code for things like this. I will let Ultimate ASI Loader handle that.

I think it's safe to close the issue.

Ok, closing the issue.