Mod download URL override

Discussion in 'Wish Lists' started by Sylpheed, Sep 23, 2013.

  1. Sylpheed

    Sylpheed Registered

    Joined:
    Jul 4, 2013
    Messages:
    6
    Likes Received:
    0
    Hi everyone,

    I'm fairly new to rFactor2 and very happy with it but i was quite disapointed by mod download management.
    I understood that download URL are bundled in mod and that mod developpers have to host their modules and point the right URL in the module.

    At first, this sounded quite smart for updating issues and such to me, but in real life, its a real pain to get mods has most modders doesnt host their modules, know what this url is for, etc.

    We are running a server and we are willing to provide mods download for players. But with this design, it seems that we even can't (please correct me if i'm wrong!).

    I also read Noel Hibbard's post concerning its own customized getmod. It sounds great too but still require all mod updates which may never occur.


    So my idea is:

    Would it be possible to have a server feature that would provide a "fallback URL" with this kind of scheme:

    - Server admin set up a web directory will all mods
    - Server admin set up a "fallback url" in server config which point to that previous directory

    - Player join in
    - If it doesn’t have required mods, client try to download mod from rfmod/rfcmp URL normally. (to keep current system advantages)
    - If download fails from 404/non existant DNS/etc, it then try to download the mods on server provided URL.


    That would make player's life greatly easier to me. Its a pain to crawl through google, paying sites and such to download mods while there may be people ready to host them.

    Its quite a waste that such a nice update system is not really usable because of thoses URL issues :(

    What do you think ?

    Christophe
     
    Last edited by a moderator: Sep 27, 2013
  2. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    It isn't too hard to repackage a mod to put in your own GetMod URL (I did a video tutorial that is somewhere around here) but I agree, we need a way to override the URL that is in the original rfcmp with our own. It should be part of the vmod creation process. As it is the GetMod URLs are extracted from the rfcmps and then embedded in the rfmod (vmod) when you create it. So having an override should be easy.

    Edit: Here is my video tutorial. I need to redo it and have voice instructions so people know what I am doing. I also want to demonstrate how to use my GetMod service. It has a lot of advantages over what I demonstrated in the video.
     
    Last edited by a moderator: Sep 26, 2013
  3. Radar

    Radar Registered

    Joined:
    Oct 20, 2010
    Messages:
    687
    Likes Received:
    60
    @ Sylpheed. I've raised this exact problem as Noel would know.

    RaceFactor do use his provided service (who use my dedicated server) but I raised this on behalf of anybody else who wish to just set up a server, whack on some tracks and just want to race with their mates, or the more serious who maybe don't have as much time to be repackaging the tracks, mods etc that come out (OK it's fine at the moment, but when more and more content comes out, it will get worse)..

    My approach to the 'GET Mod' was probably a little more simpler (maybe) was to use the 'rfmod' file that the server admins / communities create with it's URL to the preferred link as the 'Primary' look-up and then use the 'rfcmp' as it's secondary lookup.

    The 'rfMod' is basically the series you are creating (cars and tracks) which is a very small file, not heavy on the servers bandwidth, so when it grabs this file there is no reason why it then can't look at the URL within this file as it's primary source of content to be downloaded from and only when this fails does it resort to the URL within the rfcmp (if it's in the rfcmp)...

    My FTP is pretty quick, I'd much prefer to be using this for it's communities and members alike but there is no way I would like to be using the URL to this FTP and releasing to the public. Then there's the flip coin... Lets say I did use the FTP link in the rfcmp file, some tracks come from this and locally all is fast and fine, then this one track is trying to download from a site that is temporarily down, or is slow to download and that person can't join the server..

    With Noel's latest he is able to provide one URL link that may have multiple links within that one URL which is great but it's still affectively using one URL and if that service goes down (lets say for maintenance) then there is no fall back.

    Your idea Sylpheed is good, not sure if this could work from a dedicated server GUI but it would sure make this easier for Server admins or communities alike to be able to use their own URL through either their 'rfmod' or server GUI URL as it's Primary, then use either Noels services or alternate in the rfcmp as it's secondary look-up.
     
  4. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Well the URLs are already stored in the rfmod so storing an override should be a simple change to the mas2 tool. But your idea is even better to use this override URL as a primary and the URLs it pulls out of the rfcmp's as a backup but this would require a change to the mas2 tool and the game itself. Still an easy change I would think. Starting off with using our own override as the only URL and not having a fallback would be a good start though.
     
  5. Sylpheed

    Sylpheed Registered

    Joined:
    Jul 4, 2013
    Messages:
    6
    Likes Received:
    0
    Hi Noel & Radar,

    Thanks for your fast feedback and interest :)

    You're right about the rfmod: as we anyway have to build one to select customized cars/tracks selection, adding custom URL here may be a good place.
    I tried it but i still have problems (server starts with my vmod but i cant join the server), but i will retry and check video again, i must had done something wrong.

    I still find this quite complicated for a game ... why not just having a cars + tracks mod selection menus at server startup ? Is that maybe related to sync and/or hack protection issues ?



    (Sorry about my bad english and typos in first post :) )
     
  6. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
  7. Sylpheed

    Sylpheed Registered

    Joined:
    Jul 4, 2013
    Messages:
    6
    Likes Received:
    0
    True ! Thats exactly my thought :)


    Yes i have watched your video tutorial, and ok i will check the new one, thanks.



    I added the URL in the rfmod. But actually i was just too in a hurry to test and i added my package directory instead of a getmod URL. :eek:

    I have an error while trying to register package ("Undetermined Error while registering mod - Mod ID"), may that be related ? Do packages have to be register ?


    I cant find any "?sig=" in my web server logs which is quite strange but i must have messed up something, i will retry from scratch tonight and check your getmod service
     
    Last edited by a moderator: Sep 27, 2013
  8. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    rfcmps do not have to be registered with ISI but rfmods (vmods) do. The error you got while registering your vmod ("Undetermined Error while registering mod - Mod ID") was probably because you failed to increment the version number so you are trying to register a mod/version that is already registered. Just change the version to 1.1 or something like that and try registering again.

    If you repackage an rfcmp you then have to uninstall the original rfcmp and then install your new rfcmp. After the new repackaged rfcmp is installed you then have to build a new vmod. When you create a vmod, the URLs are extracted from the rfcmps and embedded in the vmod. So if you change the URL in an rfcmp, you have to rebuild the vmod to extract and embed the new URL.

    The URL you use in your rfcmp needs to point directly to your rfcmp. Not to a homepage. Also, your webserver may not like the extra ?sig= that gets appended to the end of the URL which will result in a 404 error and rF2 will give up. Your best bet is to register an account on my GetMod service so you get your own GetMod URL (Ex: http://getmod.srrs-racing.net/getmod.php/sylpheed). After that you just use the same URL in all of your packages and then register the sig of each rfcmp on my server along with the download URLs that point to your server (directly to the rfcmp on your server). Think of my service as the TinyURL/Goo.gl/Bit.ly for rFactor. rF2 will read the GetMod URL and then append ?sig=<sig of your rfcmp> . My server then looks up the sig in the database and then redirects rF2 to the actually download link (or links if you register mirrors) on your server.
     

Share This Page