Get Missing Components Feature

Discussion in 'General Discussion' started by Kevko, Jun 26, 2013.

  1. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I got your PM Pudlea. I am on vacation this week so I haven't been around a computer at all. I will try to get something to you some time this week. Worst case next week. Sorry for the delay.
     
  2. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I wanted to package up the source code from my GetMod service so others could host it on their own servers and add improvements if they want. I wanted to improve on it a little before packaging but I have been really busy so I just decided to release it as is. I moved my MySQL database parameters out to a config.php and then removed my host/user/password from the code. I also extracted the schema for my database table so you can simply run an SQL to build the correct table.

    So, to use this service you need to first create a database on your MySQL server of if you want you can use an existing database. Then run the included CREATETABLE_redirs.sql to create the redirs table. Next you have to edit the config.php file with your MySQL hostname, username, password and database name. Once that is done you should be able to browse to addmod.php and add your first mod.

    You can download the source here:
    https://www.dropbox.com/s/7z0onqa33p6glh6/GetMod.zip

    I know some people didn't trust that my service would stay online and would rather host the redirector on their own servers. Hopefully this source will motivate more people to make proper use of rF2's Get Missing Components feature. It still looks like very few leagues have made use of it which is a shame.

    BTW, I still plan to leave my service running. It is a free webhost and maintenance free so I have no reason not to leave it up.

    For any PHP devs out there, don't laugh at my code, I do very little coding in PHP. Hahahaha.

    One last thing. I don't need and credits or anything if people use this or modify it. That is just silly IMO. But if you improve on it, maybe share your improvements in this thread for others to learn from.
     
  3. Drathuu

    Drathuu Registered

    Joined:
    Oct 14, 2010
    Messages:
    349
    Likes Received:
    97
    Nice work Noel and thankyou for sharing I know Pudlea sorted it for our servers (which are up publicly on non race nights) and if setup properly work perfectly.
     
  4. jrg_carrion94

    jrg_carrion94 Registered

    Joined:
    May 27, 2012
    Messages:
    88
    Likes Received:
    0
    Same opinion here, it's bad to see that you have the current car and track that is being played and you cant enter because of another content. Will you change this ISI?
     
  5. 88mphTim

    88mphTim racesimcentral.net

    Joined:
    Sep 23, 2010
    Messages:
    10,840
    Likes Received:
    314
    No plans to at this point. We prefer the way this works over you joining a server and just getting dumped.
     
  6. yifter

    yifter Registered

    Joined:
    Dec 11, 2010
    Messages:
    99
    Likes Received:
    1
    Thanks Noel!
     
  7. Kevko

    Kevko Registered

    Joined:
    May 17, 2013
    Messages:
    40
    Likes Received:
    0
    Is it possible in the future that it could work something like this?

    1) Attempt to join a server.
    2) Server recognizes that it has one or more mods in its rotation that you do not have.
    3) Missing components screen pops up. But rather than a get all or nothing button, there are check boxes beside each component. Have the option to download selected components.
    4) After step 3), if components are still missing from the client, they are removed from the server.

    If I know I only have time for 1 or 2 races, it's disheartening to try to join a server where I have the current car and track installed, but am unable to do so because I don't have the dozen other tracks that are in the rotation for that server.
     
  8. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    1,509
    Likes Received:
    755
    If i am right, this works only for components?

    Is there any way to make it work for vmods?

    The Problem is, that most of the bigger communitys build their own vmod for special series.
    So you often have all needed components except the vmod of the community and so you can't join the server.

    I would like to use that feature to enable direct download for vmods too.

    regards
    Bernd
     
  9. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    The vmods already auto download directly from the server. Check the multiplayer.ini file on the server to make sure it is enabled (it is by default) and also in that file you will see the port number used for the HTTP server. Make sure you have that port open in your firewall.
     
  10. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    1,509
    Likes Received:
    755
    I think all this is done here.
    I've opened the choosen port (i've changed the default one with a new inside the given range) for in-/outgoing traffic and TCP and UDP.
    And in Multiplayer.ini is set:
    Enable Autodownloads="1"

    But in game nothing happens the join-button is inactive and the button don't changes itself into "mod" or something else, like it does when missing a comp.
    Did i forget something?
    Something more has to be done?
     
  11. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    This should be it. What is the name of your server? I will see if it works for me.
     
  12. Bernd

    Bernd Registered

    Joined:
    Jul 9, 2013
    Messages:
    1,509
    Likes Received:
    755
    Thanks a lot for your hints Noel.

    I've get it work finally.

    What i've done now is:

    1. opened the Port for in- and outgoing traffic for TCP and UDP protocol, that is set in Multiplayer.ini at line: HTTP Server Port="XXXXX"
    (Changing the default port is no problem, just stay into the given range)

    2. be sure that in Multiplayer.ini the line:Enable Autodownloads="1" the Value is set to "1" and NOT "0"

    3. on Server/Gamefolder from which you start your dedicated server:
    set the "Packages Dir" which is displayed on bottom right in the modmanager, to the default path.
    (default is: [Your rFactor2 installation folder]/Packages)
    Put your vmod into the Packages folder and install it from there.

    AND.... and that was the last "problem".

    It seems as if the Client has to set the "Packages Dir" to default too!!

    I had set it to another location and the download always failed.
    After i've changed it into default one, it worked.

    Now i'm, with help from Noel done and all works fine :)

    regards
     
    Last edited by a moderator: Jul 21, 2013
  13. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I have good news. It looks like Mediafire will work well with GetMod. I just need to add some code to my GetMod.php to take a MF link and resolve the direct link which it then passes off to rF2.
     
  14. Jonas Lex

    Jonas Lex Registered

    Joined:
    Nov 2, 2012
    Messages:
    4
    Likes Received:
    0
    Same problem as many others aparantly, I click "get missing components", then it says "starting download" repeatingly without actually downloading anything.
    Changed the line to Autodownloads=1 in the multiplayer.ini and also opened the http-port from the ini but no success.
    Packages dir links to the right folder too.
    Any more suggestions?
     
  15. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    What components was it trying to download because as of now only ISI components support it.

    I built this public GetMod system for anyone to use but so far the only person to actually use it is the RaceFactor league and my league (VOR). It has been working fine at our league although the connection time out is incredibly sort on rF2's HTTP client so sometimes you have to join a few times before everything is successful.
     
  16. Jonas Lex

    Jonas Lex Registered

    Joined:
    Nov 2, 2012
    Messages:
    4
    Likes Received:
    0
    Thx for the info Noel, would be nice if more used your system or if the rfactor system worked, hopefully one will come soon.
    I was assuming that the button worked for modding content as well since it was hard for me to believe that all 25 people on a server looked up the 7 mod tracks necessary to join the server, seems like a lot of work to me.
    Is there an easier way at the moment to get the tracks necessary to join a server other than searching for every single track?
     
  17. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    The rFactor system does work. Modders just haven't learned or simply can't be bothered to implement it. It reminds me of ISI's old RaceCast feature. Modders refused to submit the details for thier mod to ISI so that they could add it toRaceCast. Funny how modders have the time to build a whole mod but can't take the last 3 mins to build a few thumbnails of their mod to submit to RaceCast. Same goes for GetMod. It will probably die before it ever takes off simply because pasting a URL into a text box when packaging is too much.

    My guess is we will never see GetMod used for anything other then ISI's content and password protected league servers where the league admins take the time to repackage mods so they support GetMod.

    To answer your question. Yes, you will have to locate all the components by hand. There is a sticky somewhere on the forums that has a torrent that you can use to download almost every track out there in one place.

    Edit: Here is the thread with the torrent: http://isiforums.net/f/showthread.php/7103-Download-All-locations-(torrent)
     
  18. 88mphTim

    88mphTim racesimcentral.net

    Joined:
    Sep 23, 2010
    Messages:
    10,840
    Likes Received:
    314
    Hosts need to stop doing what they're doing with the vMods doing that. The result you're asking for is the same as what you currently have if they do that.
     
  19. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Hello,
    many thanks for the script Noel. At the moment i stuck on the problem, that rF2 won`t work with my pathes. I get allways the error "Didn`t Install everything. Check Component URLs for validity."

    View attachment 12093

    I get a small file on the client side (~700 kb) with this information:

    Code:
    {getmod%2ephp?sig=afff58fc846be99f12ce786f0f4caf8984f56bc8a359a5fd86617beb67008ee6}
    
    Raceserver Project Race
    
    {http://*******/}
    *=zensored

    This is what i filled into the url field:

    Code:
    http://www.************/downloads/rfactor2/BES_Sound_v1.1.rfcmp
    *=zensored

    Where rfactor2 is a directory link, pointed to the proper "Packages" folder.

    And here the url filled into the rfcmp file:

    Code:
    http://www.************/rf2getmod/getmod.php
    *=zensored

    Path to getmod:

    Code:
    C:\inetpub\wwwroot\rf2getmod
    With the directlink (from field url in the database) the files are reacheable and downloadable, mime types are proper added to IIS. It seems a problem on the client side? The client rf2 is installed with different path for the data files.

    Need help please....
     
    Last edited by a moderator: Mar 23, 2014
  20. crz

    crz Registered

    Joined:
    Sep 22, 2012
    Messages:
    299
    Likes Received:
    0
    Does this work in a browser?

    Code:
    http://www.************/rf2getmod/getmod.php?sig=afff58fc846be99f12ce786f0f4caf8984f56bc8a359a5fd86617beb67008ee6
    Edit:
    Bilder sagen mehr als 1000 Sternchen ... ;) Ich hab das mal versucht und bekomme einen 404 wenn ich bei dir ?sig=... anhänge, getmod.php kann ich aber aufrufen. Vorausgesetzt die ID ist noch aktuell, würde ich sagen dein IIS hat ein Problem mit dem link zu deinem Packages Verzeichnis. Schon mal ohne Link versucht?
     
    Last edited by a moderator: Mar 23, 2014

Share This Page