Announcement

Collapse
No announcement yet.

HowTo: Move settings from your command line into your .ini files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HowTo: Move settings from your command line into your .ini files

    * This is a repost of another thread, using a different message title in order to appeal to a different target audience. *

    In the original release it was necessary to manually specify a large number of settings in the command line. As part of the patch a significant amount of these settings are no longer required. In fact, they may actually be HURTING you. The software now automatically detects some settings that used to be required. Other settings have been optionally moved into the .ini files.


    It used to be that this was a 'standard' command line:
    Code:
    ut3.exe server vCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?GameMode=3?numplay=4?maxplayers=12?NumPublicConnections=12?NumPrivateConnections=0?NumOpenPublicConnections=12?NumOpenPrivateConnections=0?bShouldAdvertise=True?bIsDedicated=True?PureServer=1?timelimit=20?goalscore=5?botskill=3?AdminPassword=MyAdminPassword  -login=MyGamespyLogin -password=MyGamespyPassword -unattended
    Since applying the patch, this exact same command line can be shortened to this:
    Code:
    ut3.exe server vCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?numplay=4?maxplayers=12?botskill=5?AdminPassword=MyAdminPassword  -login=MyGamespyLogin -password=MyGamespyPassword -unattended
    In fact, if I really wanted to push this to be as short as possible, this works too:
    Code:
    ut3.exe server vCTF-Suspense?numplay=4?Botskill=5?AdminPassword=MyAdminPassword  -login=MyGamespyLogin -password=MyGamespyPassword -unattended

    So, how did I get it so short? Its simple, yet complicated.

    The short answer is that almost all of these settings are now located in the .ini files. If you know what to change then you can change it, and remove it from the command line. When the server starts it will read the .ini files and load your desired settings.

    The long answer is that these settings are scattered throughout the .ini file(s) so there are a lot of places to edit them. Below are some examples. Obviously you will have to modify these to suit your desired gametype and settings.

    -----

    Old commandline setting:
    - ?Game=UTGameContent.UTVehicleCTFGame_Content

    New UTGame.ini file setting:
    - [Engine.GameInfo]
    - DefaultServerGame=UTGameContent.UTVehicleCTFGame_C ontent

    -----

    Old commandline setting:
    - ?GameMode=3

    New UTGame.ini file setting:
    - [not needed] - The server now knows to set the GameMode to 3 when its set to load a UTVehicleCTFGame. Same goes for any other gametype.

    -----

    Old commandline setting:
    - ?numplay=4

    New UTGame.ini file setting:
    - [not found] - I can't find an .ini setting that states the desired # of bots

    -----

    Old commandline setting:
    - ?maxplayers=12

    New UTGame.ini file setting:
    - [Engine.GameInfo]
    - MaxPlayers=12

    -----

    Old commandline settings:
    - ?NumPublicConnections=12
    - ?NumPrivateConnections=0
    - ?NumOpenPublicConnections=12
    - ?NumOpenPrivateConnections=0

    New UTGame.ini file setting:
    - [not needed] - The server automatically determines these settings.

    -----

    Old commandline setting:
    - ?bShouldAdvertise=True

    New UTGame.ini file setting:
    - [not needed / none found] - The server now advertises itself by default. I could find no setting in an .ini file to control this. I suspect that you can disable server advertisement by using this in the commandline as '?ShouldAdvertise=False' if you wanted.

    -----

    Old commandline setting:
    - ?bIsDedicated=True

    New UTGame.ini file setting:
    - [not needed] - The server now knows whether it is operating in dedicated mode or not.

    -----

    Old commandline setting:
    - ?PureServer=1

    New UTGame.ini file setting:
    - [not needed] - The server now knows whether it is "pure" or not.

    -----

    Old commandline setting:
    - ?timelimit=20

    New UTGame.ini file setting:
    - [UTGameContent.UTVehicleCTFGame_Content]
    - TimeLimit=20

    -----

    Old commandline setting:
    - ?goalscore=5

    New UTGame.ini file setting:
    - [UTGameContent.UTVehicleCTFGame_Content]
    - GoalScore=5

    -----

    Old commandline setting:
    - ?botskill=3

    New UTGame.ini file setting:
    - [not found] - I can't find an .ini setting that states the desired botskill. Leaving this out of the commandline sets the botskill to Average.

    -----

    Old commandline setting:
    - ?ServerDescription=This Is My Server Description

    New UTGame.ini file setting:
    - [Engine.GameReplicationInfo]
    - ServerName=This Is My Server Description

    -----

    So there you have it. Your commandline can be VERY short as long as you hard-code the settings in your .ini files.

    #2
    yet again a big thank you!

    *gets to work on server*

    Comment


      #3
      Very nice!

      Thanks man for this and all your admin contributions. You've helped turn an admin's nightmare into just a scary dream.

      Sticky vote!

      Comment


        #4
        Ya gotta luv those simple, but complicated things. Well done.

        Comment


          #5
          Excellent as always... This is great for most of us who run the servers off a dedicated box...

          Comment


            #6
            BUMP again. PLEASE STICKY THIS THREAD ADMINS

            Comment


              #7
              I have a question. Will the server run better with a shorter commandline or is its just easier to read or something?

              Comment


                #8
                Server should run better from the point of view that having the wrong (old) commands in the command line can hurt.

                Comment


                  #9
                  thanks for the info

                  Comment


                    #10
                    Question about the numplay variable...

                    I have a 1v1 server so numplay is set to 1 in my command line. I don't want any bots. Occasionally, I hop on and I think it's been voted to TDM and there are bots in there. So I think something is overriding the command line value when a new gametype is selected (my theory atm).

                    So is there a way to just turn off all bots all the time? I don't want them - ever.

                    Comment


                      #11
                      If you're using the LocalMap entry in UTEngine.ini instead of specifying starting settings on the server's command line, you may have noticed that, frustratingly, the game's processing of this line has several bugs associated with it. Luckily, though, with just a few minutes' work and knowledge of how to address the bugs, it is fairly easy work around them.

                      The biggest bug is that the game often only reads up to a period (".") somewhere in the line, and then stops. Periods are common, such as in the specification of the DefaultGame ("UTGame.UTDeathmatch" by default), and you will also see them in many mutator specifications, so this is a commonly stumbled-upon condition. Our workaround for this is to add garbage characters to the end of the LocalMap line -- often something very simple such as a space and then another period character is all that is needed. Sometimes more characters, different random characters, or additional "." characters are required.

                      I don't see it nearly as often, but the LocalMap line is also processed incompletely when it is particularly long. It is a good idea to try to keep it short, and minimize the amount of variables it specifies (putting them elsewhere when you can). Some variables, like "NumPublicConnections" and "LockedServer", are no longer necessary (as of patch 1.1) and can be safely removed without re-adding them in another file.

                      I have also noticed that a question mark ("?") is necessary at the end of the line, before the garbage characters, for the last variable to be processed correctly. Otherwise, the game will think the garbage characters are being assigned to the last variable.

                      If you're not sure how much of your LocalMap line is being read by UT3, just open up the UTGame/Logs/DedicatedServer.log file and look for the LoadMap entry, which will usually be near the end of the log if the server was recently started. If you see only a partial line there, try adding more garbage characters to LocalMap (for instance, " as.ad.sfa.asdf.as"), and, if that does not work, try finding ways to shorten the line.

                      Hope this helps..

                      -DM

                      Comment


                        #12
                        I'm sorry but I am not following you. I am using a command line for my starting parameters. When I do a search on LocalMap in my UTEngine.ini, this is the only line I see:

                        LocalMap=UTFrontEnd.ut3

                        So I'm stuck here I guess.

                        Comment


                          #13
                          Originally posted by EggSuckingLeech View Post
                          I have a 1v1 server so numplay is set to 1 in my command line. I don't want any bots. Occasionally, I hop on and I think it's been voted to TDM and there are bots in there.
                          Sorry to hijack your question, but I thought it was impossible to vote for different gametypes? Doesn't the server need to be restarted with a new Game= parameter to change gamemode?

                          As for your own question, I assume you've checked the NumPlay setting in the ini's right?

                          Comment


                            #14
                            I use the CustomUT mutator - that's how diff gametypes are voted.

                            I found no such Numplay setting in the inis (which is what the OP said in the beginning actually).

                            Comment

                            Working...
                            X