Quantcast

Jump to content

» «
Photo

Simple DLL loader

18 replies to this topic
The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#1

Posted 3 weeks ago Edited by The Hero, 2 weeks ago.

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/a...leases/tag/v1.1


Just read the readme how to install and use it.

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

and it works perfectly
  • Wesser, MW_29, -Anti- and 14 others like this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#2

Posted 3 weeks ago Edited by guard3, 3 weeks ago.

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


gts.
  • gts.

    Gangsta

  • Members
  • Joined: 20 Jun 2015
  • United-States

#3

Posted 3 weeks ago Edited by gts., 3 weeks ago.

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


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#4

Posted 3 weeks ago Edited by The Hero, 3 weeks ago.

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.

Inadequate
  • Inadequate

    Midnight Emulator

  • Members
  • Joined: 11 Apr 2012
  • None

#5

Posted 3 weeks ago

 

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?


dkluin
  • dkluin

    GTA:Underground Developer

  • Members
  • Joined: 11 Jun 2013
  • Netherlands
  • Best Conversion 2016 [GTA: Underground]

#6

Posted 3 weeks ago

Good work.


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#7

Posted 3 weeks ago

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.

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#8

Posted 3 weeks ago

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.
  • Tomasak likes this

Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#9

Posted 3 weeks ago

bad mod
  • MW_29, Blackbird88, spartaque12 and 7 others like this

Mr.Arrow
  • Mr.Arrow

    God Save the Penis

  • Members
  • Joined: 08 Nov 2011
  • United-Kingdom

#10

Posted 3 weeks ago

Very good.

LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#11

Posted 3 weeks ago

Why isn't this an asi plugin???? Why doesn't it work?????
  • mirh, dkluin and Philips_27 like this

Inadequate
  • Inadequate

    Midnight Emulator

  • Members
  • Joined: 11 Apr 2012
  • None

#12

Posted 3 weeks ago

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.asi
scripts\III.VC.SA.LimitAdjuster.asi
scripts\debugging.asi
scripts\sharptrails.asi
scripts\skygfx.asi

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

  • Blackbird88 likes this

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#13

Posted 3 weeks ago

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

BlackScout
  • BlackScout

    A Ninja

  • Members
  • Joined: 08 Sep 2013
  • None

#14

Posted A week ago

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.


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#15

Posted A week ago

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

CRRPGMykael
  • CRRPGMykael

    Square Civilian

  • Members
  • Joined: 30 Apr 2011
  • None

#16

Posted 17 hours ago

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.


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#17

Posted 17 hours ago

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

CRRPGMykael
  • CRRPGMykael

    Square Civilian

  • Members
  • Joined: 30 Apr 2011
  • None

#18

Posted 17 hours ago

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


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Most Helpful Modding 2016 [Honorable mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#19

Posted 17 hours ago

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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users