Jump to content

[REL] Mod Downloader (V 1.2.1 OUT NOW)


xXMADEXx

Recommended Posts

Hello everybody,

This is a resource that I made to download modded vehicle files, as you play on the server, so you don't have to wait for the pre-download to download the vehicle mods, greatly decreasing download time. This resource is similar to my HTTP Mod Downloader resource, however it doesn't require a local web server, because it uses MTA's downloadFile function that was introduced in MTA 1.4.

Resource setup

1. Create a new folder in {mta_dir}/server/mods/deathmatch/resources called "ModDownloader"

2. Download the ModDownloader resource from the MTA community website

3. Extract the contents of ModDownloader.zip into the ModDownloader folder

4. Start the resource using /start ModDownloader

5. In game, type /mods to open the interface

6. Add mods using the instructions below

Installing modded vehicles

1. Find the mod that you wish to install

2. Once the mod is downloaded, place the new .txd and .dff files in /resources/ModDownloader/mods/vehicles

3. Navigate back to the main directory for ModDownloader (where the meta.xml is located -- /resources/ModDownloader) and open 'smods.xml'

4. Find where it says '' - this is where we need to insert your mod

5. Inside the '' and '' past the following line:

6. Now you need to fill out the proper information for the line you just inserted. Use the following information for help:

name: This will be the modded vehicle name (eg. Z800 Monster Energy)

txd: This is the name of the .txd file you just put into the 'vehicles' directory (eg. fcr900.txd) (You don't need to include the full file path, just the file name)

dff: This is the name of the .dff file you just put into the 'vehicles' directory (eg. fcr900.dff) (You don't need to include the full file path, just the file name)

replace: This is the vehicle ID that you wish this mod to replace. View vehicle IDs at https://wiki.multitheftauto.com/wiki/Vehicle_IDs (eg. 521)

Using the example information, my mod line would look like this:

7. Once you have finished inserting your mod(s) you need to save the smods.xml file

8. Once the file has been saved, you need to restart the ModDownloader resource. Use /restart moddownloader - This will check for new mods and add them to the list

9. In game, use /mods to view your mod!

Installing modded skins

1. Find the mod that you wish to install

2. Once the mod is downloaded, place the new .txd and .dff files in /resources/ModDownloader/mods/skins

3. Navigate back to the main directory for ModDownloader (where the meta.xml is located -- /resources/ModDownloader) and open 'smods.xml'

4. Find where it says '' - this is where we need to insert your mod

5. Inside the '' and '' past the following line:

6. Now you need to fill out the proper information for the line you just inserted. Use the following information for help:

name: This will be the modded skins name (eg. New Firefighter LAFD)

txd: This is the name of the .txd file you just put into the 'skins' directory (eg. lafd1.txd) (You don't need to include the full file path, just the file name)

dff: This is the name of the .dff file you just put into the 'skins' directory (eg. lafd1.dff) (You don't need to include the full file path, just the file name)

replace: This is the skin ID that you wish this mod to replace. View skin IDs at https://wiki.sa-mp.com/wiki/Skins:All (eg. 277)

Using the example information, my mod line would look like this:

7. Once you have finished inserting your mod(s) you need to save the smods.xml file

8. Once the file has been saved, you need to restart the ModDownloader resource. Use /restart moddownloader - This will check for new mods and add them to the list

9. In game, use /mods to view your mod!

Installing modded weapons

1. Find the mod that you wish to install

2. Once the mod is downloaded, place the new .txd and .dff files in /resources/ModDownloader/mods/weapons

3. Navigate back to the main directory for ModDownloader (where the meta.xml is located -- /resources/ModDownloader) and open 'smods.xml'

4. Find where it says '' - this is where we need to insert your mod

5. Inside the '' and '' past the following line:

6. Now you need to fill out the proper information for the line you just inserted. Use the following information for help:

name: This will be the modded weapons name (eg. Improved Fire Extinguisher)

txd: This is the name of the .txd file you just put into the 'weapons' directory (eg. fire_extinguisher.txd) (You don't need to include the full file path, just the file name)

dff: This is the name of the .dff file you just put into the 'weapons' directory (eg. fire_extinguisher.dff) (You don't need to include the full file path, just the file name)

replace: This is the WEAPON MODEL ID that you wish this mod to replace. View weapon model IDs at https://wiki.sa-mp.com/wiki/Weapons (eg. 366)

Using the example information, my mod line would look like this:

7. Once you have finished inserting your mod(s) you need to save the smods.xml file

8. Once the file has been saved, you need to restart the ModDownloader resource. Use /restart moddownloader - This will check for new mods and add them to the list

9. In game, use /mods to view your mod!

Uninstalling vehicle mods

1. Stop the "ModDownloader" resource, if it's running

2. Delete the files you wish to remove from "ModDownloader/mods/MOD TYPE"

3. Open meta.xml

4. Remove the child that goes to "mods/MOD TYPE/TXD_FILE"

5. remove the child that goes to "mods/MOD TYPE/DFF_FILE"

6. Save meta.xml and start the resource again

Screenshots

http://imgur.com/PS3IFh7,KOxgo46,5udUeOc,xPb7uX6

If any bugs are found, please let me know via Skype (Madex-MTA) or a forum PM.

Any and all feedback is gratefully appreciated!

Download the resource @ https://community.multitheftauto.com/in ... s&id=11265

Edited by Guest
Link to comment
  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

Holy smokes I was looking for something like this, thank you. Does it support custom handling? Does it handle more than one model per ID ? (i.e: allow players to choose between models that replace the same car)

At the moment it only supports replacing vehicle models, nothing to do with handlings. I haven't decided if I'll add some type of cusotm handling data yet, but probably wont because it's not hard to script custom handling with setModelHandling.

Link to comment
Holy smokes I was looking for something like this, thank you. Does it support custom handling? Does it handle more than one model per ID ? (i.e: allow players to choose between models that replace the same car)

At the moment it only supports replacing vehicle models, nothing to do with handlings. I haven't decided if I'll add some type of cusotm handling data yet, but probably wont because it's not hard to script custom handling with setModelHandling.

If such thing is so easy to implement why would you simply discard such a small yet important feature, considering your resource is 100% focused on replacing vehicles, which benefit and sometimes require custom handling to work as the author originally intended? Not complaining, just really intrigued. :|

Link to comment

Great job xXMADEXx keep it up, i got a few suggestions of course if you allow.

1. There should be a setting , should mods be enabled (automaticly) when player join or not.

2. Create a progress bar istead of dxtext (optional).

Link to comment
Holy smokes I was looking for something like this, thank you. Does it support custom handling? Does it handle more than one model per ID ? (i.e: allow players to choose between models that replace the same car)

At the moment it only supports replacing vehicle models, nothing to do with handlings. I haven't decided if I'll add some type of cusotm handling data yet, but probably wont because it's not hard to script custom handling with setModelHandling.

If such thing is so easy to implement why would you simply discard such a small yet important feature, considering your resource is 100% focused on replacing vehicles, which benefit and sometimes require custom handling to work as the author originally intended? Not complaining, just really intrigued. :|

Well it's a bit of a different story, when trying to implement it to the mod downloader. It would be much more difficult to build a way to add custom handling files into the mod downloader, because of the way that I scripted it. It would just be easier to use the setModelHandling function.

Awesome

Thank you!

Great job xXMADEXx keep it up, i got a few suggestions of course if you allow.

1. There should be a setting , should mods be enabled (automaticly) when player join or not.

2. Create a progress bar istead of dxtext (optional).

I'll probably end up creating a force-enable here pretty soon.

I like the progress bar idea, however I don't think I'm going to do it, simply for the reason that I would be unable to get live/percentages. Meaning, the progress bar would only increase after a file finished downloading, because MTA doesn't have a way to get the percentage that a file download is currently at.

Thank you for the feedback.

Link to comment
  • 1 month later...

Why it takes too much time to download only 8 files aka 4 vehicle mods even when my ping is around 180? If I download them via mod loader, it is much faster. But nvm, good job!

EDIT: I edited meta.xml a bit, it was set to download="false". I made them true. Still 20 MB download? Don't you think it's the same download mb as mod loader?

Link to comment
Why it takes too much time to download only 8 files aka 4 vehicle mods even when my ping is around 180? If I download them via mod loader, it is much faster. But nvm, good job!

EDIT: I edited meta.xml a bit, it was set to download="false". I made them true. Still 20 MB download? Don't you think it's the same download mb as mod loader?

What are you talking about? this is just a custom downloader which download the mods in background , so you haven't to wait 1-2 hours to download more than 200MB mods or more.

Link to comment
Why it takes too much time to download only 8 files aka 4 vehicle mods even when my ping is around 180? If I download them via mod loader, it is much faster. But nvm, good job!

EDIT: I edited meta.xml a bit, it was set to download="false". I made them true. Still 20 MB download? Don't you think it's the same download mb as mod loader?

You must be doing something wrong. The ModDownloader script is only about 12kb of client scripts. You don't need edit the meta at all, the script does it all.

Please follow these steps:

1) Stop the ModDownloader script, if it is running

2) Open the meta.xml, and replace all the contents with the following:

<meta> 
    <info author="xXMADEXx" type="script" version="1.0.1" name="Mod Downloader" /> 
     
    <oop>true</oop> 
    <script src="sLoader.lua" type="server" /> 
    <script src="sUpdater.lua" type="server" /> 
     
    <script src="cFunctions.lua" type="client" /> 
    <script src="cDownloader.lua" type="client" /> 
    <script src="cMods.lua" type="client" /> 
    <script src="cInter.lua" type="client" /> 
     
    <aclrequest> 
        <!-- Acess to restart self after meta.xml has been modified (sLoader.lua) --> 
        <right name="function.restartResource" access="true"></right> 
         
        <!-- Access to check for updates (sUpdater.lua) --> 
        <right name="function.callRemote" access="true"></right> 
    </aclrequest> 
  
</meta> 

3) Save & Exist the meta.xml

4) Open smods.xml and confirm all the mods are correct and exist

5) Save & exist smods.xml

6) Make sure resource.ModDownloader has access to function.restartResource

7) Start ModDownloader, it will check for dff/txd files missing in the meta.xml and add them automatically

Link to comment
  • 1 month later...
Is it possible so that No one need to Enable All mods ? And we can enable it manually ? e.g If Any one join server , he dont need to enable it and Downloading will start on its own

What do you mean? That's already how the script is.

When the player joins, the server will send the player a list of the mods to download with their hashes of the files. The client then checks to see if the files are already downloaded, and if they are, then the script will check the file hashes. If the hashes don't match it will delete the file, and re-dwonload it, but if it does exist, it will set the mod status according to what is in the xml file from the users last visit.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...