1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you have a problem and need help, create a new thread with a title that briefly describes the problem.
    Do not use titles like 'Help!' or 'I have a problem!'
    Dismiss Notice
  3. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Windows Hosting a server, problems experienced

Discussion in 'Server Help' started by Diago, Jul 28, 2013.

  1. Diago

    Diago Builder Stabber

    Messages:
    18
    I am experiencing some problems that are not addressed in related guides or wikis.

    I have downloaded and unzipped the KAG dedicated server files into my KAG directory. If I try to run a server using a GUI like this one, then I get the following error. This is the contents of my custom_autostart.gm:
    Code:
    // Generated by Serverconfig
        newWorld(``);
        switchGameState(0);
        startServer();
        LoadRules(`Rules/Sandbox/gamemode.cfg`);
        LoadMapCycle(`Scripts/custom_mapcycle.cfg`);
        LoadMap(``);
    If I run dedicatedserver.bat then it automatically reverts to TDM despite what the settings might be in dedicated_autostart.gm. I can then join my server but the server constantly restarts (due to less than 2 players being present I guess).

    How do I set the game mode and map?
    OR
    How do use a server GUI without an error?

    My PC particulars
    Windows 7 64bit
    6GB Ram
    Nvidia 460GTX
    Wireless internet with forwarded ports and no firewall
    </br>--- merged: Jul 28, 2013 10:18 AM ---</br>
    It would seem that the server settings are to be found in autoconfig.cfg in the KAG directory, and not in any of the files in \Base\Scripts as directed in the wiki and other guides.

    Running dedicatedserver.bat ought to work now and I will test it out soon with additional players.
     
  2. Kouji

    Kouji Cold, Uncaring, Sadistic, Evil and Cruel Meanie Administrator Global Moderator Forum Moderator Tester
    1. MOLEing Over Large Estates - [MOLE]
    2. REKINS OF SEAS: Super Crew of Ultimate Havoking 2: Return of King of KAG: Chapter 420blazeit - REKIN

    Messages:
    2,910
    First of all, the GUI server setup things are broken cause of an update, and they haven't been updated since that update. So first things first, get a clean install, GUI server setup added unnecessary files and redirects to wrong files. Once you have a clean install, it's pretty simple.

    Unless you are using a custom gamemode, simply go to KAG\Base\Scripts and look for the dedicated_autostart.gm and look for this line: global autostartswitch = 1;
    Change it to the gamemode you'd like to play with 0 being CTF, 1 being TDM, 2 being sandbox, 3 being zombies and 4 being for RTDM. (If you want to add a custom gamemode, you'll need to add a copy this:
    Code:
    else if (autostartswitch == <some#>) //<Gamemode name>
    {
    LoadRules("Rules/<gamemode_folder>/gamemode.cfg");
    LoadMapCycle( "Scripts/mapcycle.cfg" );
    LoadMap( "" );
    print(`Loaded <GameMode> default config`);
    }
    and change the stuff in <less than/greater than signs>

    Changing the mapcycle is as simple as just going to KAG\Base\Scripts folder and changing the mapcycle.cfg, but you'll need to know the directory of where you maps are. mostly likely than not, it'll just be in the maps folder so it'll be a list that looks like: Maps\map1.png; Maps\map2.png; Maps\map3.kag; Maps\map4.cfg; (with .pngs being .pngs, .kag being the kag version of a map and .cfg being the generators). If your maps are in a subfolder (like the tdm maps), you'll need to change it to point to that subdirectory; so for TDM, it'd be Maps\TDM\map1.png; Maps\TDM\map2.png; etc.

    Addtionally, you'll want to change your dedicated_autoconfig.gm to change the number players, whether it's gold or not, how many spec slots and etc. After that just run the dedicatedserver.bat
     
  3. Diago

    Diago Builder Stabber

    Messages:
    18
    Thanks Kouji for the informative post.

    I uninstalled, re-installed and updated KAG, but there is no dedicated_autostart.gm file under ...KAG\Base\Scripts. Only autostart.as and server_autostart.as even after running dedicatedserver.bat.

    The server settings still seem to depend on the contents of autoconfig.cfg in the KAG directory. TDM mode still constantly restarts but changing it to WAR mode with sv_gamemode = WAR resolves that problem.

    I can successfully host a game that others can join so there are no more problems to address for me personally. Nonetheless it is a bemusing circumstance.
     
  4. Kouji

    Kouji Cold, Uncaring, Sadistic, Evil and Cruel Meanie Administrator Global Moderator Forum Moderator Tester
    1. MOLEing Over Large Estates - [MOLE]
    2. REKINS OF SEAS: Super Crew of Ultimate Havoking 2: Return of King of KAG: Chapter 420blazeit - REKIN

    Messages:
    2,910
    Well, see the problem is that you wanted a beta server, which has completely different files from a Classic server. Since this is the classic section, I assumed you wanted to set up a classic server and not a beta server. If you need a bit more info on beta servers, here: https://forum.kag2d.com/threads/server-setup.13519/

    Just be careful about posting in the right section next time.
     
  5. Diago

    Diago Builder Stabber

    Messages:
    18
    That explains a lot. Thanks for the link.