Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
The Hero

Simple DLL loader

Recommended Posts

The Hero

Yo guys,

for quite some time I've been mad that we're abusing the .asi extension for our mods. ASI files are renamed DLL files used as plugins for the miles sound system (mss32) as used by III and VC and as such they were convenient to use as these two games load them automatically. San Andreas however does not use mss so custom asi loaders were written, which was a questionable choice to begin with. Not only that but then *other* asi loaders were written for III and VC which clashed with the mss loader, because the mss loader loads asi files relatively late (before going into the menu) and not all asis are compatible with being loaded earlier (e.g. Silent's trails for VC). This led to the situation of having to have *two* directories for asis, one for files to be loaded early and one for files to be loaded late. The file extension was of no help because in both cases it had be "asi". As a result many people had problems putting the files into the correct directories, and that was not due to their stupidity but due to ours (speaking for the people who make these sort of mods).

 

So here I propose a very simple solution: instead of a loader finding files automagically in various directories there is *one* file (dlls.cfg) having one file per line that is to be loaded by the loader. The advantages of this are:

- use your own extension (no more f*cking asi!)

- put the files whereever you want

- control the order in which files are loaded

- have a clear view of what's being loaded at all

 

To implement this I forked TAG's Ultimate ASI Loader, implemented what I described above and called it the Simple DLL Loader. And here you can get it:

https://github.com/aap/simpledllloader/releases

 

 

Just read the readme how to install and use it.

 

As an example, this is my dlls.cfg for III:

 

 

 

dlls\wndmode.dlldlls\III.VC.SA.LimitAdjuster.dlldlls\debugging.dlldlls\sharptrails.dlldlls\skygfx.dll

 

and it works perfectly

Edited by The Hero

Share this post


Link to post
Share on other sites
guard3

So I can just rename .asi to .dll and load it through cfg? Even mods that were released in .dll?

Edited by guard3

Share this post


Link to post
Share on other sites
gts.

What's wrong with ASIs? Also, who uses Silent's VC Trails if sharptrails includes them and even better. And remember, Silent's VC Trails is outdated, back then everybody was using the mss32 loader.

 

So I can just rename .asi to .dll and load it through cfg? Even mods that were released in .dll?

Yes and you can do the same thing but backwards with Ultimate ASI Loader. DLL to ASI. :p

Edited by gts.

Share this post


Link to post
Share on other sites
The Hero

So I can just rename .asi to .dll and load it through cfg? Even mods that were released in .dll?

Yes, but that depends on the mod. If the .dll actually *replaces* the functionality of the original one that will (probably?) not work (d3d8/9.dlls often do this). However if the dll just reroutes the exported functions and mainly does its own thing, then sure you can use this loader to load it.

Edited by The Hero

Share this post


Link to post
Share on other sites
Inadequate

 

So I can just rename .asi to .dll and load it through cfg? Even mods that were released in .dll?

Yes, but that depends on the mod. If the .dll actually *replaces* the functionality of the original one that will (probably?) not work (d3d8/9.dlls often do this). However if the dll just reroutes the exported functions and mainly does its own thing, then sure you can use this loader to load it.

About this... for instance, UltraThing is named d3d9.dll and includes another library named as d3dx9_42.dll. Will work with this loader?

Share this post


Link to post
Share on other sites
dkluin

Good work.

Share this post


Link to post
Share on other sites
The Hero

 

 

So I can just rename .asi to .dll and load it through cfg? Even mods that were released in .dll?

Yes, but that depends on the mod. If the .dll actually *replaces* the functionality of the original one that will (probably?) not work (d3d8/9.dlls often do this). However if the dll just reroutes the exported functions and mainly does its own thing, then sure you can use this loader to load it.

 

About this... for instance, UltraThing is named d3d9.dll and includes another library named as d3dx9_42.dll. Will work with this loader?

 

Probably, but try it.

Share this post


Link to post
Share on other sites
The Hero

Overcame my laziness and added back vorbisfile.dll support again. Note that you can't just replace vorbisfile.dll as with UAL but have to rename the original to vorbisfilehooked.dll.

Share this post


Link to post
Share on other sites
Silent

bad mod

Share this post


Link to post
Share on other sites
Mr.Arrow

Very good.

Share this post


Link to post
Share on other sites
LINK/2012

Why isn't this an asi plugin???? Why doesn't it work?????

Share this post


Link to post
Share on other sites
Inadequate

Can I ask... Wasn't better to merge that position thing to Ultimate ASI Loader instead of make a whole new loader? I mean, the way that this loader loads the scripts by positions, as your dll.cfg example. Like this if this thing was UAL in the global.ini:

scripts\wndmode.asiscripts\III.VC.SA.LimitAdjuster.asiscripts\debugging.asiscripts\sharptrails.asiscripts\skygfx.asi

I'm not demanding or something like that, it is only a question.

Share this post


Link to post
Share on other sites
The Hero

That's pretty much what I did though. Only I didn't merge it but replace the old behaviour.

Share this post


Link to post
Share on other sites
BlackScout

Am I retarded?

I don't get it, it doesn't work.

AIx1NOq.png

 

Naming as dinput8.dll does nothing.

Naming as vorbisFile and creating a vorbisFileHooked throws me this crash.

Share this post


Link to post
Share on other sites
The Hero

Creating? That doesn't sound like you renamed the original vorbisfile to vorbisfilehooked...

Share this post


Link to post
Share on other sites
CRRPGMykael

Seriously what the f*ck

 

I added dinput8.dll to my directory (x64) under every single name in the readme (ddraw, d3d11, etc etc).

I renamed vorbisfile.dll to vorbisfilehooked.dll, I created a dll.cfg where I listed some .dll file names, but nothing works. I've already got a bunch of different .dll's from other mods (for instance, I have a .dll called VorbisHooked.dll).

 

Whenever I start the game I get .dll related errors. Usually it's "Could not initialize BASS sound system", other times it's "missing vorbisfile.dll", and finally the typical 0xc00000 type errors.

 

I absolutely have no idea where to go from here. Help.

Share this post


Link to post
Share on other sites
The Hero

You can't use the x64 version with GTA. It's a 32 bit game.

Share this post


Link to post
Share on other sites
CRRPGMykael

Kinda begs the question "why was it even included"?

Anyway I got SkyGFX to work again by just renaming it to .asi ¯\_(ツ)_/¯

I think the DLL drama stems from a lot of people not knowing you can even do that lmao

Share this post


Link to post
Share on other sites
The Hero

I've explained it on every page of every thread and in every readme that you can rename dll to asi. If people still don't get it, I can't help them.

The 64 bit version is included because the dll loader is just a fork of TAG's asi loader and that one has 64 bit support.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.