1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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

KAG Server configuration

Discussion in 'Server Help' started by heX_, Mar 5, 2015.

  1. heX_

    heX_ Bison Rider

    Messages:
    193
    I can't config my server. I've followed the server_setup_info.txt , which calls for execution of the dedicatedserver.sh script, but I can't execute scripts remotely. I'm not sure if that has already been done by the server host (the server is up & running, joinable on the KAG client, but I can't change any settings); but there is no "Base/Scripts/dedicated_autoconfig.gm" file. Manually creating this file and entering some parameters also did not work. /kag/autoconfig.cfg is also not accepted by the server (it doesn't load the settings), nor is /kag/server_autoconfig.cfg which I've created manually.
    Then on the wiki it says the config file is "KAGServ/autoconfig.cfg", however I do not have that folder (or is KAGServ meant to mean the root folder? Placing either autoconfig.cfg or server_autoconfig.cfg in the root folder also accomplishes nothing)
    I'm thinking this may all be because the dedicatedserver.sh script has not been run, but I don't know for sure.
    What can I do?
     
  2. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Hey,

    Upon launching your server it should download all the needed files - Whenever I start up a new server, I download and extract a fresh server copy, launch the server once to updated it and then edit my settings.

    Settings like player slots, name of the server and other basic information is located in: /KAG/autoconfig.cfg

    The dedicated_autoconfig.cfg was for Classic KAG and it was essentially the autoconfig for classic, holding all the informations for slots etc. So to re-itterate, you should be using the autoconfig file located in your /KAG/ folder.

    I also tend to run the executable directory, via ./KAGdedi rather than the dedicatedserver.sh but whatever tickles your fancy!
     
  3. heX_

    heX_ Bison Rider

    Messages:
    193
    Thanks, that's very helpful already. However the /KAG/autoconfig.cfg file is not being used by the server. I've changed sv_name and it still defaults to "default Server" ingame, even though the autoconfig.cfg file remains unchanged. I'm gonna try to remove the game trough FTP and reinstall using the server image from kag2d.com instead of letting the server host take care of it. The problem is I can't run scripts or executable directories (didn't know that was a thing tbh) over FTP afaik. I'll check back when I have more info.
    --- Double Post Merged, Mar 6, 2015, Original Post Date: Mar 6, 2015 ---
    I'm not having any luck with this. Can anyone take a look at the log file? i'm not really finding anything in there that refers to the autoconfig file not loading.
    --- Double Post Merged, Mar 7, 2015 ---
    So I've gotten a bit further now. KAG automatically creates autoconfig.cfg in my root folder (NOT in the /kag folder) and runs /kag/base/scripts/server_autostart.as at startup. The only way for me to change my server settings so far is through the autostart script. If I modify the file and restart server, the script runs again and overwrites autoconfig.cfg with the settings described in server_autostart.as .
    Is there anyway to disable autostart.as from running? Also, any ideas on why the autoconfig file is placed in (and read from) my root folder?
     

    Attached Files:

    Last edited: Mar 7, 2015
  4. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Hey! Sorry it took so long to reply, I've been busy over the long weekend (yay 3 day weekends).

    I haven't seen a configuration like that before, could be permissions in the KAGServ directory? I'd say it's something to do with your company hosting, but I could be wrong. As for disabling autostart, I believe it is needed to initialize some stuff for the KAG engine, again I could be wrong.

    You could edit your dedicatedserver.sh file to read the autoconfig from your root directory... Something like this:

    Code:
    #!/bin/bash
    echo "Running KAG dedicated server"
    chmod +x KAGdedi
    ./KAGdedi autostart Scripts/server_autostart.as autoconfig /root/PathToAutoconfig/autoconfig.cfg
    That may need some tweaking, such as using '../' for previous directories, as I'm not sure if KAG has the ability to load files outside of it's directory - another alternative option would be moving your autoconfig that was being created in the strange directory and pasting it in your scripts or mods folder and loading it from there.

    Let me know if this helps and how you go :) Who is your hosting company by the way?

    //EDIT: You can always join the IRC channel #KAG on Quakenet for real time support (sometimes troublesooting these issues are easier when you can back and forth and there are some more knowledgeable people than myself there).
     
    Last edited: Mar 9, 2015
  5. heX_

    heX_ Bison Rider

    Messages:
    193
    Thanks for getting back to me. My host is nitrado.net . My log files may look unfamiliar since I'm using the debug logs from nitrado (which record from the moment the server is started, as opposed to the server logs in ../kag/logs which seem to start later)
    I've tried moving the created autoconfig to all sorts of locations but to no avail; it ignores it and creates a new autoconfig file.
    I tried editing the dedicatedserver.sh script but that also does not seem to help, even with the full path written.
    Even stranger is that when I now delete the autoconfig file(s) and return server_autostart.as to its default state (since modifying it results in the server being marked as "modded" which is unwanted behaviour for me), it still creates an autoconfig file with the settings that were previously written in server_autostart.as . I have no idea where it would even load these settings from now, as it's not written in any script or config file that I know of.
    This all has me scratching my head quite a bit. I'm going to try out some more setups and update this thread when I have more info. I might also pop in the IRC.

    Just wanted to say thanks again for taking the time to offer help and advice :)
     
  6. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    No worries, it's something I haven't come across in my time hosting servers, so I'll ping a few people that might know what's going on anyways.

    @Galen @Geti @Furai (Figured you guys might know what's up/could help if you check this)
     
  7. heX_

    heX_ Bison Rider

    Messages:
    193
    It appears to work now. I think one of the problems was I was editing autoconifg while server was running, then restarted, instead of stopping server, editing config and then starting, which is what I'm doing now. It seems to accept the autoconfig file now (in my root folder, it still doesn't look in /kag) and my autostart script is unmodded so server shows up as unmodded.
    I might reinstall server and try again to see what the problem was, but I might just keep it running now that it finally works right :)
    Incidentally, what is the option to enable voting? Do I edit the seclev for "normal" ?
     
  8. Leo

    Leo Haxor

    Messages:
    503
    You got it right there. Changes at autoconfig file do not work if you do them while server's running. Took me a while to notice too ::):
     
    blackjoker77777 likes this.