Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

      1. News
      2. Red Dead Online
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

DaBOSS54320

Questions about ASI plugins

Recommended Posts

DaBOSS54320

So as I understand it, .asi files are basically .dll files renamed and are loaded into the game's memory through an asi loader, such as xliveless. I've also seen there are SDKs around here to help me call the game's native script functions if needed. But... being the type of person I am... I wanna know more about what ASI files exactly are and how I can take full advantage of them myself. If anyone could answer any of my questions and/or point me in the right direction to research it that'd be lovely.

 

First, what does ASI even stand for and where did ASI files/plugins originate? Was it something used official by R* or was it made by someone else or for something else?

 

How do people find the memory addresses of the scripting functions when they want to call them in an ASI plugin? I see there is lists of native functions and what I assume to be where they are in memory (or is it something else?), but now my question is how do people even go about finding these? I'm not an expert with memory type stuff like this, but I'm interested in it.

 

What do I need to do exactly to call the scripting functions when I get the addresses? Again I've seen there are SDKs that let me call them but I'm curious exactly how that works.

 

I know GTA IV is an old game at this point but I still love it, and I'm interested in modding it. I've done .net mods before using ScriptHookDotNet.dll but I wanna understand more, plus I'm better with C/C++ over the .net languages anyways.

Share this post


Link to post
Share on other sites
Jitnaught

I've always been curious of these things too.

Share this post


Link to post
Share on other sites
thehambone

But... being the type of person I am... I wanna know more about what ASI files exactly are and how I can take full advantage of them myself.

You and me both. ;) I can answer a few of your questions.

 

First, what does ASI even stand for and where did ASI files/plugins originate? Was it something used official by R* or was it made by someone else or for something else?

As far as I know, ASI mods originated through an exploit in GTA III's and GTA Vice City's sound system. These games use the Miles Sound System for audio. Some files that go along with this library contain the .asi extension. Here you can see a file named Mp3dec.asi in the 'mss' folder in my GTA III game directory.

Long ago, somebody whose name has probably been lost to time discovered that the Miles Sound System will load any file with an .asi extension like a DLL and "hook" it into the game as it launches. Since GTA III and VC use the Miles Sound System, no "ASI Loader" is needed to use ASI mods -- simply drop the file into the game root or the 'mss' directory and launch the game. When SA came around, Rockstar stopped using the Miles Sound System, so clever modders had to find another way to hook into the game.

I'm not sure what ASI stands for, but I'm sure it's an acronym for something related to the Miles Sound System.

 

How do people find the memory addresses of the scripting functions when they want to call them in an ASI plugin? I see there is lists of native functions and what I assume to be where they are in memory (or is it something else?), but now my question is how do people even go about finding these? I'm not an expert with memory type stuff like this, but I'm interested in it.

I've been searching for the answer to this question for the last year. From what I've gathered, a good understanding of how programs work at a low level is necessary. People with a good understanding of Assembly language can disassemble the game executable and search for functions in the disassembled code. Once they know the address of the function they're looking for, as well as any parameters it needs, they can call it from a DLL (ASI) using the address.

 

What do I need to do exactly to call the scripting functions when I get the addresses? Again I've seen there are SDKs that let me call them but I'm curious exactly how that works.

I think all you need to know is the function header (return type and arguments) and the address of the function. SDKs simply take this information and present it in a more user-friendly manner by taking care of all of the grunt work of dealing with addresses and whatnot.

 

 

I hope this helps a little bit. :) I'm no expert modder, so anyone feel free to correct me if I've presented any incorrect information.

Share this post


Link to post
Share on other sites
Jitnaught

Thanks for the info! :D

Edited by LetsPlayOrDy

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

×

Important Information

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