rF2 - How to setup a dedicated server or quick-host + tools & Info

Discussion in 'Wiki' started by Denstjiro, Oct 29, 2013.

  1. Denstjiro

    Denstjiro Registered

    Joined:
    Oct 6, 2010
    Messages:
    2,952
    Likes Received:
    14
    Update: may 6th 2014

    We released a new wiki and all of the below (updated) info is now integrated within it.
    check out the Dedicated Server and Hosting section in the new wiki:

    http://legends-league.com/wiki/Rfactor2

    This thread will not be updated anymore.

    [HR][/HR]



    [build 382-494-590]

    Questions on dedicated servers, hosting and how-to's keep going round and round, might as well attempt to put it in one place.
    I'm not doing this as an expert but more by experience so bare with me and hopefully the smart people out there will come in and correct me on items or help me add more.

    It will start with the basics and then progress into the more in-depth issues and the paraphernalia of it all.

    [HR][/HR]
    Terminology:

    Dedicated server is an external machine (usually rented) running the sim 24/7
    Host is your local rf2 sim hosting a game. (referred to as Quick-host) often used for just a few hours.
    They both work the same but there can be differences, more on that below.

    A mod is a Package with cars that modders create for us to have fun with. [.rfcmp]
    A vmod is the file that a server needs in order to know what content is going to be used [.rfmod]

    [HR][/HR]
    Basics:

    A Dedicated server works the same as your local sim. you need to have remote access to the external machine, install Rf2 Lite, upload mods & tracks, install them, etc. etc.
    [remote access will differ from host to host, some will have full control, others only ftp, or less]

    You cannot just start a server, select a mod and track and be on your way, you first need to create a vmod which then will be a selectable item in your dedicated server window.
    [a vmod can be created locally on your own pc and ftp'd into the server+installed, or you do it on the dedicated machine itself]

    After the vmod is created simply open rf2 on the dedicated and click host [more on multiple profiles later]

    • select the vmod you just created
    • click vehicles (tweak if needed by removing unwanted vehicles)
    • click Config (same routine. But here you can also select weather properties which include how to set the rubber-configurations for each session and/or separate event)
    • click Options, set them to your liking and then Load Track.

    When the server is actually running it should say ''matcher status: Server added Successfully'' (and have an ID) [pic]
    Checksum your server online by joining or here.

    If the server does not show in the browser you need to double check in the server Multiplayer.ini if:
    Announce Host="1" // Whether servers will attempt to register with the matchmaking service
    is set to 1 indeed. (should be by default)

    Also you would want to double check Port settings.

    Related Thread for troubleshooting.

    Related Files: Core FTP - Cute FTP - VNC [remote desktop]

    [HR][/HR]
    Additionally:

    Because ftp is the main tool for uploading to the dedicated machine it would make sense to have your rf2 Data folder set to:
    Drive:\rFactor2\Packages\
    As apposed to documents.

    In the server window you can change data rates by choosing Connection Type 'custom'

    When creating a vmod the first thing you do is create its name, this will be displayed in the server lobby. Let it make sense!
    ''Megane and Clio 2 layouts'' is much more recognizable then ''awesome l33t drivingz''
    (especially since at the time of writing its not allways clear which cars a server is using)

    There is a wide range of additional settings in both the Multiplayer.ini and the player.PLR
    From how many practise sessions are going to happen to how drivers exit the track, Parc Ferme settings and much much more. Worth checking out.

    [HR][/HR]

    Direct server downloads vs External downloads

    You can set the server to let people directly download and install mod/track from your server:
    In the Multiplayer.ini
    Code:
    HTTP Server Enabled="1" // Whether the dedicated server starts a HTTP server
    HTTP Server Max File Size="500" // Maximum file size, in MB, that the HTTP server will provide
    HTTP Server Document Root="Packages" // Document root for HTTP server. This path is relative to path stored in data.path. data.path located in root install path
    This would be used for quick-hosts in general. Those with questionable connections as quick-host could set Server Enabled''0''

    Take note: when creating a vmod you need to add the sounds as well. otherwise people installing directly will have none.

    You can also set things up so that clients download/install from external sources.
    For this checksum Noel's guide and tools.

    Note that ISI Content will already have external download links.

    [HR][/HR]

    Multiple server Profiles

    Explained in this Wiki
    Note: Ports have changed

    If your dedicated server box has tools like an auto scheduler (windows) then you could also have the scheduler start/close different profiles.
    Particularly handy when different profiles are rotating and/or are run with different settings.

    [HR][/HR]

    XML Results

    Your event XML results can be found in: UserData/LOG/Results

    If you have a website then you can setup a database and have the results displayed manually.
    Or you can use tools like Simresults.net as offered in the third party plugins forum

    Note: If results give errors, in most cases it is because of grammar in chat lines, delete chat from drivers and/or messages that look funny and save.

    Make sure how your dedicated Machine operates. some are set to delete xml/replays within a timeframe. Not everyone is able to change this so it is best to grab the files right after a race.

    Related Files: Notepad++ [view & edit xml and other rf2 files]

    [HR][/HR]

    Admin commands

    Code:
    /vote yes  [same as pressing YES button]
    /vote no [same as pressing NO button]
    /ping [same as pressing button]
    /w [whisper to given player - can be just the first few letters of player's name if they are unique]
    /whisper [same functionality as "/w" ]
    /callvote nextsession [proceeds to next session (practice to qual, for example)]
    /callvote nextrace [proceeds to next event in dedicated server track list]
    /callvote event [proceeds to given event (such as "24 Hours of Toban" or "Spa")] 
    /callvote restartrace [restarts the race]
    /callvote restartwarmup [client request to go to the beginning of warmup]
    /restartwarmup [admin/server command to go to the beginning of warmup]
    /callvote restartweekend [goes back to practice]
    /callvote addai [adds 1 AI]
    /callvote add5ai [adds 5 AI]
    /callvote kick [kick specified player out of race]
    /callvote ban [bans specified player from server] 
    /admin [take over administrator (wrong or no password = stop being administrator)]
    /editgrid [admin command to move the specified player to the given position on the grid - note that you should do the grid from first to last or you may fail to achieve the expected results] 
    /setmass [admin/server command to apply a penalty mass (0-255 kg) to the specified player with immediate effect, lasting for the rest of the weekend]
    /changelaps [admin/server command to adjust the number of completed laps (-10 to +10) to the specified player for the purpose of allowing live stewards' input into the game's scoring system] 
    /addpenalty [admin/server command adds a penalty to the given player. The following are valid values for : -2=longest line, -1=drive-thru, 0-60=stop/go penalty number of seconds]
    /subpenalty [admin/server command removes a penalty from the given player. The following are valid values for : 0=remove one stop/go penalty, 1=remove one drive-thru penalty, 2=remove one longest line penalty, 3=remove all penalties]
    /throwyellow [] [admin/server command starts a full-course caution for the given number of laps (must be at least 2). If laps is not given, normal randomized value will apply]
    /clearyellow [admin/server command nds a full-course caution as soon as possible, regardless of the planned number of laps]
    /racelength [] [admin/server command changes the race length for the next race: =0 sets a % length race, =1 sets a -lap race, =2 sets a -minute (timed) race, =3 sets a -lap and -minute race]
    /shutdownserver [admin command tells a dedicated server to exit immediately]
    /set upload [change upload speed (works on own machine only, administrator can't change server's upload at this time)]
    /set download [change download speed (same as above)]
    /set nagle <0 or 1> [can only be done on server - specifies whether questionable Nagle TCP algorithm is used]
    /set warp <0.1 - 3.0> [in future, will affect voicechat. The warp connotation comes from the period of time to take in between sending each voice packet. 1.0 is the default] 
    /batch [used to execute batchfile commands] 
    /dq drivername [disqualifies driver]
    /undq drivername [removes an unwanted DQ] 
    /restartwarmup [encase drivers disco just before the race]
    
    Take Note: some commands do not work in certain sessions. For example a gridedit from Batch, only works in a Warmup session
    And changing lapcount with /racelength will not show the new lapcount until the session has changed. Even more so, when changing it in the Warmup it will never show until you enter the track for the race.

    [HR][/HR]

    Editing your Grid

    You could edit a grid by remote in the live server window (+ -)

    Or use a tool like Gridedit to do it for you.
    Info inside the file. For rf2 simply place the exe inside Userdata/LOG/Results.
    Related thread

    [HR][/HR]

    Livetiming and other tools

    Simple redirect, just checksum this forum

    But please be aware that some tools could effect the server performance. just like not all local plugins are good for your sim, not all tools are always hog-free. So inform yourself on what people have to say about it before you go install items.

    One tool is particularly handy, the server message plugin will let you edit a txt file and everyone that joins will receive a private /whisper.
    So if you are not around as admin, you are still able to hand out info on the event, your rules, league website, etc.
    Update: This tool can have effects on xml result files. it seems to create weird text and that causes the xml files to cause errors when used on the web.
    Otherwise this plugin appears to be functioning without issues.

    [HR][/HR]

    Batch files

    Batch files are easy to use. For example adding weight to individual cars.
    Place a txt file in (your local) UserData/LOG/Results, rename it to mass.ini and include your updated info from race to race:
    Code:
    //text for reminders and info
    //double slash gets ignored
    
    /setmass 185 Tim Wheatley
    /setmass 145 Gjon whathisname
    /setmass 40 Indira Ghandi
    /setmass 26 Denstjiro Ganriu
    /setmass 25 Flo Rida
    /setmass 16 Wayne Kerr
    /setmass 05 John Kerr
    
    Sign in as admin onto the server then type /batch Mass.ini
    It will only add the weight to the drivers who are actually in on the server and provided the names in the batch file are spelt the same as the driver player name on the server it will allocate the mass weight increase in one go.

    It does not accumulate weights so you can safely do it again with changes.

    after a reset/restart weekend on the server all handicaps are zero again.

    The batch ini does not recognize numbers or brackets etc. in names.

    Setmass without a batchfile [manual]

    Login as admin on the server
    type: /setmass 75 Tim Wheatley
    would give Tim 75KG's on his car for the remaining of the weekend.
    /setmass 0 Tim Wheatley would clear him again

    Take note: if a driver leaves a sessions he needs to get the weight re-assigned [in both manual and batch version]

    Warning: Different cars react differently to different weights. Too much weight could completely break the mod itself so some (intensive) testing would be advised.





    [HR][/HR]

    Quick Hosting​


    This is of course open to debate but in general when hosting a game for an evening or a few hours it is worth considering some items:

    • vmods with multiple tracks means less people joining (as they either don't have them or don't want to download)
    • The easier you make it for people to join the better. so vmod+1track, default mod, etc. will most likely see more people join.
    • Ideally a vmod-name would give info on the event e.g. Car+info (track name is already covered in browser)
    • Double check if your vmod is actually working.
    • ISI content already have external download links build in, so there will be no additional server-load when people download upon joining.
    • Using ISI content will probably give you more traffic as well as most people will already have it installed.
    • Lengthy practise sessions often will see people give up prematurely.
    • Lengthy races often get abandoned soon.
    • Make the race too short and drivers will go mental to try and win in just a few laps.
    • Formation laps often cause problems (drivers thinking they can race etc) best not have a formation lap at all.
    • Its cool to have admin powers but take it seriously. Abuse will often result in drivers leaving and possibly a bad server-reputation with fewer traffic. Where as creating a constructive environment can do the opposite, drivers might want to return regularly to your server.


    [HR][/HR]

    That's about it for now. I'm sure there is more to be added, just shout and I will update. And hopefully it will be of use for people.
    Sorry for any grammar mistakes. i'm just a poor Dutchman :/

    Mods: if you feel the need to edit info when things change, be my guest :)
     
    Last edited by a moderator: May 6, 2014
    yashiman likes this.
  2. Denstjiro

    Denstjiro Registered

    Joined:
    Oct 6, 2010
    Messages:
    2,952
    Likes Received:
    14
    Reserving 2nd post for future additions.
     
  3. Nazirull Safry Paijo

    Nazirull Safry Paijo Registered

    Joined:
    May 28, 2011
    Messages:
    1,417
    Likes Received:
    35
    These are nice points shared. And should be pinned :)

    Thanks!
     
  4. nultweezes

    nultweezes Registered

    Joined:
    Jun 27, 2014
    Messages:
    83
    Likes Received:
    0
    I rented an external server, which has only FTP access so I canĀ“t use the host console. What file do I need to edit to change the cars and tracks used by the server? I already uploaded the vmod.
    Thanks in advance.
     
  5. wgeuze

    wgeuze Registered

    Joined:
    Oct 1, 2012
    Messages:
    1,608
    Likes Received:
    63
    Just a quick question, would it be possible to run a server on a device such as a raspberry Pi ?
     
  6. hrodrigues

    hrodrigues Registered

    Joined:
    Feb 2, 2015
    Messages:
    3
    Likes Received:
    1
    Hi guys, i have a small problem, i can create a host, we (me and my friends) can find the my server, but only i can enter, the other guys can't.
    We have the same vmod, we tried with diferent vmod, and nothing.
    They can find the server, but can not enter server.
    Can anyone help?
     

Share This Page